module Stratosphere.Lambda.Function.TracingConfigProperty (
TracingConfigProperty(..), mkTracingConfigProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TracingConfigProperty
=
TracingConfigProperty {TracingConfigProperty -> ()
haddock_workaround_ :: (),
TracingConfigProperty -> Maybe (Value Text)
mode :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (TracingConfigProperty -> TracingConfigProperty -> Bool
(TracingConfigProperty -> TracingConfigProperty -> Bool)
-> (TracingConfigProperty -> TracingConfigProperty -> Bool)
-> Eq TracingConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TracingConfigProperty -> TracingConfigProperty -> Bool
== :: TracingConfigProperty -> TracingConfigProperty -> Bool
$c/= :: TracingConfigProperty -> TracingConfigProperty -> Bool
/= :: TracingConfigProperty -> TracingConfigProperty -> Bool
Prelude.Eq, Int -> TracingConfigProperty -> ShowS
[TracingConfigProperty] -> ShowS
TracingConfigProperty -> String
(Int -> TracingConfigProperty -> ShowS)
-> (TracingConfigProperty -> String)
-> ([TracingConfigProperty] -> ShowS)
-> Show TracingConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TracingConfigProperty -> ShowS
showsPrec :: Int -> TracingConfigProperty -> ShowS
$cshow :: TracingConfigProperty -> String
show :: TracingConfigProperty -> String
$cshowList :: [TracingConfigProperty] -> ShowS
showList :: [TracingConfigProperty] -> ShowS
Prelude.Show)
mkTracingConfigProperty :: TracingConfigProperty
mkTracingConfigProperty :: TracingConfigProperty
mkTracingConfigProperty
= TracingConfigProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), mode :: Maybe (Value Text)
mode = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TracingConfigProperty where
toResourceProperties :: TracingConfigProperty -> ResourceProperties
toResourceProperties TracingConfigProperty {Maybe (Value Text)
()
haddock_workaround_ :: TracingConfigProperty -> ()
mode :: TracingConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
mode :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Lambda::Function.TracingConfig",
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
"Mode" (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)
mode])}
instance JSON.ToJSON TracingConfigProperty where
toJSON :: TracingConfigProperty -> Value
toJSON TracingConfigProperty {Maybe (Value Text)
()
haddock_workaround_ :: TracingConfigProperty -> ()
mode :: TracingConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
mode :: 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
"Mode" (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)
mode]))
instance Property "Mode" TracingConfigProperty where
type PropertyType "Mode" TracingConfigProperty = Value Prelude.Text
set :: PropertyType "Mode" TracingConfigProperty
-> TracingConfigProperty -> TracingConfigProperty
set PropertyType "Mode" TracingConfigProperty
newValue TracingConfigProperty {Maybe (Value Text)
()
haddock_workaround_ :: TracingConfigProperty -> ()
mode :: TracingConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
mode :: Maybe (Value Text)
..}
= TracingConfigProperty {mode :: Maybe (Value Text)
mode = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Mode" TracingConfigProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}