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