module Stratosphere.IoT.TopicRule.DynamoDBv2ActionProperty (
module Exports, DynamoDBv2ActionProperty(..),
mkDynamoDBv2ActionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.IoT.TopicRule.PutItemInputProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DynamoDBv2ActionProperty
=
DynamoDBv2ActionProperty {DynamoDBv2ActionProperty -> ()
haddock_workaround_ :: (),
DynamoDBv2ActionProperty -> Maybe PutItemInputProperty
putItem :: (Prelude.Maybe PutItemInputProperty),
DynamoDBv2ActionProperty -> Maybe (Value Text)
roleArn :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (DynamoDBv2ActionProperty -> DynamoDBv2ActionProperty -> Bool
(DynamoDBv2ActionProperty -> DynamoDBv2ActionProperty -> Bool)
-> (DynamoDBv2ActionProperty -> DynamoDBv2ActionProperty -> Bool)
-> Eq DynamoDBv2ActionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DynamoDBv2ActionProperty -> DynamoDBv2ActionProperty -> Bool
== :: DynamoDBv2ActionProperty -> DynamoDBv2ActionProperty -> Bool
$c/= :: DynamoDBv2ActionProperty -> DynamoDBv2ActionProperty -> Bool
/= :: DynamoDBv2ActionProperty -> DynamoDBv2ActionProperty -> Bool
Prelude.Eq, Int -> DynamoDBv2ActionProperty -> ShowS
[DynamoDBv2ActionProperty] -> ShowS
DynamoDBv2ActionProperty -> String
(Int -> DynamoDBv2ActionProperty -> ShowS)
-> (DynamoDBv2ActionProperty -> String)
-> ([DynamoDBv2ActionProperty] -> ShowS)
-> Show DynamoDBv2ActionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DynamoDBv2ActionProperty -> ShowS
showsPrec :: Int -> DynamoDBv2ActionProperty -> ShowS
$cshow :: DynamoDBv2ActionProperty -> String
show :: DynamoDBv2ActionProperty -> String
$cshowList :: [DynamoDBv2ActionProperty] -> ShowS
showList :: [DynamoDBv2ActionProperty] -> ShowS
Prelude.Show)
mkDynamoDBv2ActionProperty :: DynamoDBv2ActionProperty
mkDynamoDBv2ActionProperty :: DynamoDBv2ActionProperty
mkDynamoDBv2ActionProperty
= DynamoDBv2ActionProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), putItem :: Maybe PutItemInputProperty
putItem = Maybe PutItemInputProperty
forall a. Maybe a
Prelude.Nothing,
roleArn :: Maybe (Value Text)
roleArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DynamoDBv2ActionProperty where
toResourceProperties :: DynamoDBv2ActionProperty -> ResourceProperties
toResourceProperties DynamoDBv2ActionProperty {Maybe (Value Text)
Maybe PutItemInputProperty
()
haddock_workaround_ :: DynamoDBv2ActionProperty -> ()
putItem :: DynamoDBv2ActionProperty -> Maybe PutItemInputProperty
roleArn :: DynamoDBv2ActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
putItem :: Maybe PutItemInputProperty
roleArn :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::IoT::TopicRule.DynamoDBv2Action",
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 -> PutItemInputProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PutItem" (PutItemInputProperty -> (Key, Value))
-> Maybe PutItemInputProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PutItemInputProperty
putItem,
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
"RoleArn" (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)
roleArn])}
instance JSON.ToJSON DynamoDBv2ActionProperty where
toJSON :: DynamoDBv2ActionProperty -> Value
toJSON DynamoDBv2ActionProperty {Maybe (Value Text)
Maybe PutItemInputProperty
()
haddock_workaround_ :: DynamoDBv2ActionProperty -> ()
putItem :: DynamoDBv2ActionProperty -> Maybe PutItemInputProperty
roleArn :: DynamoDBv2ActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
putItem :: Maybe PutItemInputProperty
roleArn :: 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 -> PutItemInputProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PutItem" (PutItemInputProperty -> (Key, Value))
-> Maybe PutItemInputProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PutItemInputProperty
putItem,
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
"RoleArn" (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)
roleArn]))
instance Property "PutItem" DynamoDBv2ActionProperty where
type PropertyType "PutItem" DynamoDBv2ActionProperty = PutItemInputProperty
set :: PropertyType "PutItem" DynamoDBv2ActionProperty
-> DynamoDBv2ActionProperty -> DynamoDBv2ActionProperty
set PropertyType "PutItem" DynamoDBv2ActionProperty
newValue DynamoDBv2ActionProperty {Maybe (Value Text)
Maybe PutItemInputProperty
()
haddock_workaround_ :: DynamoDBv2ActionProperty -> ()
putItem :: DynamoDBv2ActionProperty -> Maybe PutItemInputProperty
roleArn :: DynamoDBv2ActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
putItem :: Maybe PutItemInputProperty
roleArn :: Maybe (Value Text)
..}
= DynamoDBv2ActionProperty {putItem :: Maybe PutItemInputProperty
putItem = PutItemInputProperty -> Maybe PutItemInputProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PutItem" DynamoDBv2ActionProperty
PutItemInputProperty
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
roleArn :: Maybe (Value Text)
haddock_workaround_ :: ()
roleArn :: Maybe (Value Text)
..}
instance Property "RoleArn" DynamoDBv2ActionProperty where
type PropertyType "RoleArn" DynamoDBv2ActionProperty = Value Prelude.Text
set :: PropertyType "RoleArn" DynamoDBv2ActionProperty
-> DynamoDBv2ActionProperty -> DynamoDBv2ActionProperty
set PropertyType "RoleArn" DynamoDBv2ActionProperty
newValue DynamoDBv2ActionProperty {Maybe (Value Text)
Maybe PutItemInputProperty
()
haddock_workaround_ :: DynamoDBv2ActionProperty -> ()
putItem :: DynamoDBv2ActionProperty -> Maybe PutItemInputProperty
roleArn :: DynamoDBv2ActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
putItem :: Maybe PutItemInputProperty
roleArn :: Maybe (Value Text)
..}
= DynamoDBv2ActionProperty {roleArn :: Maybe (Value Text)
roleArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RoleArn" DynamoDBv2ActionProperty
Value Text
newValue, Maybe PutItemInputProperty
()
haddock_workaround_ :: ()
putItem :: Maybe PutItemInputProperty
haddock_workaround_ :: ()
putItem :: Maybe PutItemInputProperty
..}