module Stratosphere.AppSync.DataSource.DynamoDBConfigProperty (
module Exports, DynamoDBConfigProperty(..),
mkDynamoDBConfigProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.AppSync.DataSource.DeltaSyncConfigProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DynamoDBConfigProperty
=
DynamoDBConfigProperty {DynamoDBConfigProperty -> ()
haddock_workaround_ :: (),
DynamoDBConfigProperty -> Value Text
awsRegion :: (Value Prelude.Text),
DynamoDBConfigProperty -> Maybe DeltaSyncConfigProperty
deltaSyncConfig :: (Prelude.Maybe DeltaSyncConfigProperty),
DynamoDBConfigProperty -> Value Text
tableName :: (Value Prelude.Text),
DynamoDBConfigProperty -> Maybe (Value Bool)
useCallerCredentials :: (Prelude.Maybe (Value Prelude.Bool)),
DynamoDBConfigProperty -> Maybe (Value Bool)
versioned :: (Prelude.Maybe (Value Prelude.Bool))}
deriving stock (DynamoDBConfigProperty -> DynamoDBConfigProperty -> Bool
(DynamoDBConfigProperty -> DynamoDBConfigProperty -> Bool)
-> (DynamoDBConfigProperty -> DynamoDBConfigProperty -> Bool)
-> Eq DynamoDBConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DynamoDBConfigProperty -> DynamoDBConfigProperty -> Bool
== :: DynamoDBConfigProperty -> DynamoDBConfigProperty -> Bool
$c/= :: DynamoDBConfigProperty -> DynamoDBConfigProperty -> Bool
/= :: DynamoDBConfigProperty -> DynamoDBConfigProperty -> Bool
Prelude.Eq, Int -> DynamoDBConfigProperty -> ShowS
[DynamoDBConfigProperty] -> ShowS
DynamoDBConfigProperty -> String
(Int -> DynamoDBConfigProperty -> ShowS)
-> (DynamoDBConfigProperty -> String)
-> ([DynamoDBConfigProperty] -> ShowS)
-> Show DynamoDBConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DynamoDBConfigProperty -> ShowS
showsPrec :: Int -> DynamoDBConfigProperty -> ShowS
$cshow :: DynamoDBConfigProperty -> String
show :: DynamoDBConfigProperty -> String
$cshowList :: [DynamoDBConfigProperty] -> ShowS
showList :: [DynamoDBConfigProperty] -> ShowS
Prelude.Show)
mkDynamoDBConfigProperty ::
Value Prelude.Text -> Value Prelude.Text -> DynamoDBConfigProperty
mkDynamoDBConfigProperty :: Value Text -> Value Text -> DynamoDBConfigProperty
mkDynamoDBConfigProperty Value Text
awsRegion Value Text
tableName
= DynamoDBConfigProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), awsRegion :: Value Text
awsRegion = Value Text
awsRegion,
tableName :: Value Text
tableName = Value Text
tableName, deltaSyncConfig :: Maybe DeltaSyncConfigProperty
deltaSyncConfig = Maybe DeltaSyncConfigProperty
forall a. Maybe a
Prelude.Nothing,
useCallerCredentials :: Maybe (Value Bool)
useCallerCredentials = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
versioned :: Maybe (Value Bool)
versioned = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DynamoDBConfigProperty where
toResourceProperties :: DynamoDBConfigProperty -> ResourceProperties
toResourceProperties DynamoDBConfigProperty {Maybe (Value Bool)
Maybe DeltaSyncConfigProperty
()
Value Text
haddock_workaround_ :: DynamoDBConfigProperty -> ()
awsRegion :: DynamoDBConfigProperty -> Value Text
deltaSyncConfig :: DynamoDBConfigProperty -> Maybe DeltaSyncConfigProperty
tableName :: DynamoDBConfigProperty -> Value Text
useCallerCredentials :: DynamoDBConfigProperty -> Maybe (Value Bool)
versioned :: DynamoDBConfigProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
awsRegion :: Value Text
deltaSyncConfig :: Maybe DeltaSyncConfigProperty
tableName :: Value Text
useCallerCredentials :: Maybe (Value Bool)
versioned :: Maybe (Value Bool)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::AppSync::DataSource.DynamoDBConfig",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"AwsRegion" 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..= Value Text
awsRegion, Key
"TableName" 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..= Value Text
tableName]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> DeltaSyncConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DeltaSyncConfig" (DeltaSyncConfigProperty -> (Key, Value))
-> Maybe DeltaSyncConfigProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DeltaSyncConfigProperty
deltaSyncConfig,
Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"UseCallerCredentials" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
useCallerCredentials,
Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Versioned" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
versioned]))}
instance JSON.ToJSON DynamoDBConfigProperty where
toJSON :: DynamoDBConfigProperty -> Value
toJSON DynamoDBConfigProperty {Maybe (Value Bool)
Maybe DeltaSyncConfigProperty
()
Value Text
haddock_workaround_ :: DynamoDBConfigProperty -> ()
awsRegion :: DynamoDBConfigProperty -> Value Text
deltaSyncConfig :: DynamoDBConfigProperty -> Maybe DeltaSyncConfigProperty
tableName :: DynamoDBConfigProperty -> Value Text
useCallerCredentials :: DynamoDBConfigProperty -> Maybe (Value Bool)
versioned :: DynamoDBConfigProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
awsRegion :: Value Text
deltaSyncConfig :: Maybe DeltaSyncConfigProperty
tableName :: Value Text
useCallerCredentials :: Maybe (Value Bool)
versioned :: Maybe (Value Bool)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"AwsRegion" 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..= Value Text
awsRegion, Key
"TableName" 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..= Value Text
tableName]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> DeltaSyncConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DeltaSyncConfig" (DeltaSyncConfigProperty -> (Key, Value))
-> Maybe DeltaSyncConfigProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DeltaSyncConfigProperty
deltaSyncConfig,
Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"UseCallerCredentials" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
useCallerCredentials,
Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Versioned" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
versioned])))
instance Property "AwsRegion" DynamoDBConfigProperty where
type PropertyType "AwsRegion" DynamoDBConfigProperty = Value Prelude.Text
set :: PropertyType "AwsRegion" DynamoDBConfigProperty
-> DynamoDBConfigProperty -> DynamoDBConfigProperty
set PropertyType "AwsRegion" DynamoDBConfigProperty
newValue DynamoDBConfigProperty {Maybe (Value Bool)
Maybe DeltaSyncConfigProperty
()
Value Text
haddock_workaround_ :: DynamoDBConfigProperty -> ()
awsRegion :: DynamoDBConfigProperty -> Value Text
deltaSyncConfig :: DynamoDBConfigProperty -> Maybe DeltaSyncConfigProperty
tableName :: DynamoDBConfigProperty -> Value Text
useCallerCredentials :: DynamoDBConfigProperty -> Maybe (Value Bool)
versioned :: DynamoDBConfigProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
awsRegion :: Value Text
deltaSyncConfig :: Maybe DeltaSyncConfigProperty
tableName :: Value Text
useCallerCredentials :: Maybe (Value Bool)
versioned :: Maybe (Value Bool)
..}
= DynamoDBConfigProperty {awsRegion :: Value Text
awsRegion = PropertyType "AwsRegion" DynamoDBConfigProperty
Value Text
newValue, Maybe (Value Bool)
Maybe DeltaSyncConfigProperty
()
Value Text
haddock_workaround_ :: ()
deltaSyncConfig :: Maybe DeltaSyncConfigProperty
tableName :: Value Text
useCallerCredentials :: Maybe (Value Bool)
versioned :: Maybe (Value Bool)
haddock_workaround_ :: ()
deltaSyncConfig :: Maybe DeltaSyncConfigProperty
tableName :: Value Text
useCallerCredentials :: Maybe (Value Bool)
versioned :: Maybe (Value Bool)
..}
instance Property "DeltaSyncConfig" DynamoDBConfigProperty where
type PropertyType "DeltaSyncConfig" DynamoDBConfigProperty = DeltaSyncConfigProperty
set :: PropertyType "DeltaSyncConfig" DynamoDBConfigProperty
-> DynamoDBConfigProperty -> DynamoDBConfigProperty
set PropertyType "DeltaSyncConfig" DynamoDBConfigProperty
newValue DynamoDBConfigProperty {Maybe (Value Bool)
Maybe DeltaSyncConfigProperty
()
Value Text
haddock_workaround_ :: DynamoDBConfigProperty -> ()
awsRegion :: DynamoDBConfigProperty -> Value Text
deltaSyncConfig :: DynamoDBConfigProperty -> Maybe DeltaSyncConfigProperty
tableName :: DynamoDBConfigProperty -> Value Text
useCallerCredentials :: DynamoDBConfigProperty -> Maybe (Value Bool)
versioned :: DynamoDBConfigProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
awsRegion :: Value Text
deltaSyncConfig :: Maybe DeltaSyncConfigProperty
tableName :: Value Text
useCallerCredentials :: Maybe (Value Bool)
versioned :: Maybe (Value Bool)
..}
= DynamoDBConfigProperty
{deltaSyncConfig :: Maybe DeltaSyncConfigProperty
deltaSyncConfig = DeltaSyncConfigProperty -> Maybe DeltaSyncConfigProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DeltaSyncConfig" DynamoDBConfigProperty
DeltaSyncConfigProperty
newValue, Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
awsRegion :: Value Text
tableName :: Value Text
useCallerCredentials :: Maybe (Value Bool)
versioned :: Maybe (Value Bool)
haddock_workaround_ :: ()
awsRegion :: Value Text
tableName :: Value Text
useCallerCredentials :: Maybe (Value Bool)
versioned :: Maybe (Value Bool)
..}
instance Property "TableName" DynamoDBConfigProperty where
type PropertyType "TableName" DynamoDBConfigProperty = Value Prelude.Text
set :: PropertyType "TableName" DynamoDBConfigProperty
-> DynamoDBConfigProperty -> DynamoDBConfigProperty
set PropertyType "TableName" DynamoDBConfigProperty
newValue DynamoDBConfigProperty {Maybe (Value Bool)
Maybe DeltaSyncConfigProperty
()
Value Text
haddock_workaround_ :: DynamoDBConfigProperty -> ()
awsRegion :: DynamoDBConfigProperty -> Value Text
deltaSyncConfig :: DynamoDBConfigProperty -> Maybe DeltaSyncConfigProperty
tableName :: DynamoDBConfigProperty -> Value Text
useCallerCredentials :: DynamoDBConfigProperty -> Maybe (Value Bool)
versioned :: DynamoDBConfigProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
awsRegion :: Value Text
deltaSyncConfig :: Maybe DeltaSyncConfigProperty
tableName :: Value Text
useCallerCredentials :: Maybe (Value Bool)
versioned :: Maybe (Value Bool)
..}
= DynamoDBConfigProperty {tableName :: Value Text
tableName = PropertyType "TableName" DynamoDBConfigProperty
Value Text
newValue, Maybe (Value Bool)
Maybe DeltaSyncConfigProperty
()
Value Text
haddock_workaround_ :: ()
awsRegion :: Value Text
deltaSyncConfig :: Maybe DeltaSyncConfigProperty
useCallerCredentials :: Maybe (Value Bool)
versioned :: Maybe (Value Bool)
haddock_workaround_ :: ()
awsRegion :: Value Text
deltaSyncConfig :: Maybe DeltaSyncConfigProperty
useCallerCredentials :: Maybe (Value Bool)
versioned :: Maybe (Value Bool)
..}
instance Property "UseCallerCredentials" DynamoDBConfigProperty where
type PropertyType "UseCallerCredentials" DynamoDBConfigProperty = Value Prelude.Bool
set :: PropertyType "UseCallerCredentials" DynamoDBConfigProperty
-> DynamoDBConfigProperty -> DynamoDBConfigProperty
set PropertyType "UseCallerCredentials" DynamoDBConfigProperty
newValue DynamoDBConfigProperty {Maybe (Value Bool)
Maybe DeltaSyncConfigProperty
()
Value Text
haddock_workaround_ :: DynamoDBConfigProperty -> ()
awsRegion :: DynamoDBConfigProperty -> Value Text
deltaSyncConfig :: DynamoDBConfigProperty -> Maybe DeltaSyncConfigProperty
tableName :: DynamoDBConfigProperty -> Value Text
useCallerCredentials :: DynamoDBConfigProperty -> Maybe (Value Bool)
versioned :: DynamoDBConfigProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
awsRegion :: Value Text
deltaSyncConfig :: Maybe DeltaSyncConfigProperty
tableName :: Value Text
useCallerCredentials :: Maybe (Value Bool)
versioned :: Maybe (Value Bool)
..}
= DynamoDBConfigProperty
{useCallerCredentials :: Maybe (Value Bool)
useCallerCredentials = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "UseCallerCredentials" DynamoDBConfigProperty
Value Bool
newValue, Maybe (Value Bool)
Maybe DeltaSyncConfigProperty
()
Value Text
haddock_workaround_ :: ()
awsRegion :: Value Text
deltaSyncConfig :: Maybe DeltaSyncConfigProperty
tableName :: Value Text
versioned :: Maybe (Value Bool)
haddock_workaround_ :: ()
awsRegion :: Value Text
deltaSyncConfig :: Maybe DeltaSyncConfigProperty
tableName :: Value Text
versioned :: Maybe (Value Bool)
..}
instance Property "Versioned" DynamoDBConfigProperty where
type PropertyType "Versioned" DynamoDBConfigProperty = Value Prelude.Bool
set :: PropertyType "Versioned" DynamoDBConfigProperty
-> DynamoDBConfigProperty -> DynamoDBConfigProperty
set PropertyType "Versioned" DynamoDBConfigProperty
newValue DynamoDBConfigProperty {Maybe (Value Bool)
Maybe DeltaSyncConfigProperty
()
Value Text
haddock_workaround_ :: DynamoDBConfigProperty -> ()
awsRegion :: DynamoDBConfigProperty -> Value Text
deltaSyncConfig :: DynamoDBConfigProperty -> Maybe DeltaSyncConfigProperty
tableName :: DynamoDBConfigProperty -> Value Text
useCallerCredentials :: DynamoDBConfigProperty -> Maybe (Value Bool)
versioned :: DynamoDBConfigProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
awsRegion :: Value Text
deltaSyncConfig :: Maybe DeltaSyncConfigProperty
tableName :: Value Text
useCallerCredentials :: Maybe (Value Bool)
versioned :: Maybe (Value Bool)
..}
= DynamoDBConfigProperty {versioned :: Maybe (Value Bool)
versioned = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Versioned" DynamoDBConfigProperty
Value Bool
newValue, Maybe (Value Bool)
Maybe DeltaSyncConfigProperty
()
Value Text
haddock_workaround_ :: ()
awsRegion :: Value Text
deltaSyncConfig :: Maybe DeltaSyncConfigProperty
tableName :: Value Text
useCallerCredentials :: Maybe (Value Bool)
haddock_workaround_ :: ()
awsRegion :: Value Text
deltaSyncConfig :: Maybe DeltaSyncConfigProperty
tableName :: Value Text
useCallerCredentials :: Maybe (Value Bool)
..}