module Stratosphere.RUM.AppMonitor.CustomEventsProperty (
CustomEventsProperty(..), mkCustomEventsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CustomEventsProperty
=
CustomEventsProperty {CustomEventsProperty -> ()
haddock_workaround_ :: (),
CustomEventsProperty -> Maybe (Value Text)
status :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (CustomEventsProperty -> CustomEventsProperty -> Bool
(CustomEventsProperty -> CustomEventsProperty -> Bool)
-> (CustomEventsProperty -> CustomEventsProperty -> Bool)
-> Eq CustomEventsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CustomEventsProperty -> CustomEventsProperty -> Bool
== :: CustomEventsProperty -> CustomEventsProperty -> Bool
$c/= :: CustomEventsProperty -> CustomEventsProperty -> Bool
/= :: CustomEventsProperty -> CustomEventsProperty -> Bool
Prelude.Eq, Int -> CustomEventsProperty -> ShowS
[CustomEventsProperty] -> ShowS
CustomEventsProperty -> String
(Int -> CustomEventsProperty -> ShowS)
-> (CustomEventsProperty -> String)
-> ([CustomEventsProperty] -> ShowS)
-> Show CustomEventsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CustomEventsProperty -> ShowS
showsPrec :: Int -> CustomEventsProperty -> ShowS
$cshow :: CustomEventsProperty -> String
show :: CustomEventsProperty -> String
$cshowList :: [CustomEventsProperty] -> ShowS
showList :: [CustomEventsProperty] -> ShowS
Prelude.Show)
mkCustomEventsProperty :: CustomEventsProperty
mkCustomEventsProperty :: CustomEventsProperty
mkCustomEventsProperty
= CustomEventsProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), status :: Maybe (Value Text)
status = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CustomEventsProperty where
toResourceProperties :: CustomEventsProperty -> ResourceProperties
toResourceProperties CustomEventsProperty {Maybe (Value Text)
()
haddock_workaround_ :: CustomEventsProperty -> ()
status :: CustomEventsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
status :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::RUM::AppMonitor.CustomEvents",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Status" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
status])}
instance JSON.ToJSON CustomEventsProperty where
toJSON :: CustomEventsProperty -> Value
toJSON CustomEventsProperty {Maybe (Value Text)
()
haddock_workaround_ :: CustomEventsProperty -> ()
status :: CustomEventsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
status :: Maybe (Value Text)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Status" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
status]))
instance Property "Status" CustomEventsProperty where
type PropertyType "Status" CustomEventsProperty = Value Prelude.Text
set :: PropertyType "Status" CustomEventsProperty
-> CustomEventsProperty -> CustomEventsProperty
set PropertyType "Status" CustomEventsProperty
newValue CustomEventsProperty {Maybe (Value Text)
()
haddock_workaround_ :: CustomEventsProperty -> ()
status :: CustomEventsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
status :: Maybe (Value Text)
..}
= CustomEventsProperty {status :: Maybe (Value Text)
status = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Status" CustomEventsProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}