{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.IoT.Types.DynamoDBAction where
import qualified Amazonka.Core as Core
import Amazonka.IoT.Types.DynamoKeyType
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DynamoDBAction = DynamoDBAction'
{
DynamoDBAction -> Maybe DynamoKeyType
hashKeyType :: Prelude.Maybe DynamoKeyType,
DynamoDBAction -> Maybe Text
operation :: Prelude.Maybe Prelude.Text,
DynamoDBAction -> Maybe DynamoKeyType
rangeKeyType :: Prelude.Maybe DynamoKeyType,
DynamoDBAction -> Maybe Text
payloadField :: Prelude.Maybe Prelude.Text,
DynamoDBAction -> Maybe Text
rangeKeyField :: Prelude.Maybe Prelude.Text,
DynamoDBAction -> Maybe Text
rangeKeyValue :: Prelude.Maybe Prelude.Text,
DynamoDBAction -> Text
tableName :: Prelude.Text,
DynamoDBAction -> Text
roleArn :: Prelude.Text,
DynamoDBAction -> Text
hashKeyField :: Prelude.Text,
DynamoDBAction -> Text
hashKeyValue :: Prelude.Text
}
deriving (DynamoDBAction -> DynamoDBAction -> Bool
(DynamoDBAction -> DynamoDBAction -> Bool)
-> (DynamoDBAction -> DynamoDBAction -> Bool) -> Eq DynamoDBAction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DynamoDBAction -> DynamoDBAction -> Bool
$c/= :: DynamoDBAction -> DynamoDBAction -> Bool
== :: DynamoDBAction -> DynamoDBAction -> Bool
$c== :: DynamoDBAction -> DynamoDBAction -> Bool
Prelude.Eq, ReadPrec [DynamoDBAction]
ReadPrec DynamoDBAction
Int -> ReadS DynamoDBAction
ReadS [DynamoDBAction]
(Int -> ReadS DynamoDBAction)
-> ReadS [DynamoDBAction]
-> ReadPrec DynamoDBAction
-> ReadPrec [DynamoDBAction]
-> Read DynamoDBAction
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DynamoDBAction]
$creadListPrec :: ReadPrec [DynamoDBAction]
readPrec :: ReadPrec DynamoDBAction
$creadPrec :: ReadPrec DynamoDBAction
readList :: ReadS [DynamoDBAction]
$creadList :: ReadS [DynamoDBAction]
readsPrec :: Int -> ReadS DynamoDBAction
$creadsPrec :: Int -> ReadS DynamoDBAction
Prelude.Read, Int -> DynamoDBAction -> ShowS
[DynamoDBAction] -> ShowS
DynamoDBAction -> String
(Int -> DynamoDBAction -> ShowS)
-> (DynamoDBAction -> String)
-> ([DynamoDBAction] -> ShowS)
-> Show DynamoDBAction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DynamoDBAction] -> ShowS
$cshowList :: [DynamoDBAction] -> ShowS
show :: DynamoDBAction -> String
$cshow :: DynamoDBAction -> String
showsPrec :: Int -> DynamoDBAction -> ShowS
$cshowsPrec :: Int -> DynamoDBAction -> ShowS
Prelude.Show, (forall x. DynamoDBAction -> Rep DynamoDBAction x)
-> (forall x. Rep DynamoDBAction x -> DynamoDBAction)
-> Generic DynamoDBAction
forall x. Rep DynamoDBAction x -> DynamoDBAction
forall x. DynamoDBAction -> Rep DynamoDBAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DynamoDBAction x -> DynamoDBAction
$cfrom :: forall x. DynamoDBAction -> Rep DynamoDBAction x
Prelude.Generic)
newDynamoDBAction ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
DynamoDBAction
newDynamoDBAction :: Text -> Text -> Text -> Text -> DynamoDBAction
newDynamoDBAction
Text
pTableName_
Text
pRoleArn_
Text
pHashKeyField_
Text
pHashKeyValue_ =
DynamoDBAction' :: Maybe DynamoKeyType
-> Maybe Text
-> Maybe DynamoKeyType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> Text
-> DynamoDBAction
DynamoDBAction'
{ $sel:hashKeyType:DynamoDBAction' :: Maybe DynamoKeyType
hashKeyType = Maybe DynamoKeyType
forall a. Maybe a
Prelude.Nothing,
$sel:operation:DynamoDBAction' :: Maybe Text
operation = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:rangeKeyType:DynamoDBAction' :: Maybe DynamoKeyType
rangeKeyType = Maybe DynamoKeyType
forall a. Maybe a
Prelude.Nothing,
$sel:payloadField:DynamoDBAction' :: Maybe Text
payloadField = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:rangeKeyField:DynamoDBAction' :: Maybe Text
rangeKeyField = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:rangeKeyValue:DynamoDBAction' :: Maybe Text
rangeKeyValue = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tableName:DynamoDBAction' :: Text
tableName = Text
pTableName_,
$sel:roleArn:DynamoDBAction' :: Text
roleArn = Text
pRoleArn_,
$sel:hashKeyField:DynamoDBAction' :: Text
hashKeyField = Text
pHashKeyField_,
$sel:hashKeyValue:DynamoDBAction' :: Text
hashKeyValue = Text
pHashKeyValue_
}
dynamoDBAction_hashKeyType :: Lens.Lens' DynamoDBAction (Prelude.Maybe DynamoKeyType)
dynamoDBAction_hashKeyType :: (Maybe DynamoKeyType -> f (Maybe DynamoKeyType))
-> DynamoDBAction -> f DynamoDBAction
dynamoDBAction_hashKeyType = (DynamoDBAction -> Maybe DynamoKeyType)
-> (DynamoDBAction -> Maybe DynamoKeyType -> DynamoDBAction)
-> Lens
DynamoDBAction
DynamoDBAction
(Maybe DynamoKeyType)
(Maybe DynamoKeyType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DynamoDBAction' {Maybe DynamoKeyType
hashKeyType :: Maybe DynamoKeyType
$sel:hashKeyType:DynamoDBAction' :: DynamoDBAction -> Maybe DynamoKeyType
hashKeyType} -> Maybe DynamoKeyType
hashKeyType) (\s :: DynamoDBAction
s@DynamoDBAction' {} Maybe DynamoKeyType
a -> DynamoDBAction
s {$sel:hashKeyType:DynamoDBAction' :: Maybe DynamoKeyType
hashKeyType = Maybe DynamoKeyType
a} :: DynamoDBAction)
dynamoDBAction_operation :: Lens.Lens' DynamoDBAction (Prelude.Maybe Prelude.Text)
dynamoDBAction_operation :: (Maybe Text -> f (Maybe Text))
-> DynamoDBAction -> f DynamoDBAction
dynamoDBAction_operation = (DynamoDBAction -> Maybe Text)
-> (DynamoDBAction -> Maybe Text -> DynamoDBAction)
-> Lens DynamoDBAction DynamoDBAction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DynamoDBAction' {Maybe Text
operation :: Maybe Text
$sel:operation:DynamoDBAction' :: DynamoDBAction -> Maybe Text
operation} -> Maybe Text
operation) (\s :: DynamoDBAction
s@DynamoDBAction' {} Maybe Text
a -> DynamoDBAction
s {$sel:operation:DynamoDBAction' :: Maybe Text
operation = Maybe Text
a} :: DynamoDBAction)
dynamoDBAction_rangeKeyType :: Lens.Lens' DynamoDBAction (Prelude.Maybe DynamoKeyType)
dynamoDBAction_rangeKeyType :: (Maybe DynamoKeyType -> f (Maybe DynamoKeyType))
-> DynamoDBAction -> f DynamoDBAction
dynamoDBAction_rangeKeyType = (DynamoDBAction -> Maybe DynamoKeyType)
-> (DynamoDBAction -> Maybe DynamoKeyType -> DynamoDBAction)
-> Lens
DynamoDBAction
DynamoDBAction
(Maybe DynamoKeyType)
(Maybe DynamoKeyType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DynamoDBAction' {Maybe DynamoKeyType
rangeKeyType :: Maybe DynamoKeyType
$sel:rangeKeyType:DynamoDBAction' :: DynamoDBAction -> Maybe DynamoKeyType
rangeKeyType} -> Maybe DynamoKeyType
rangeKeyType) (\s :: DynamoDBAction
s@DynamoDBAction' {} Maybe DynamoKeyType
a -> DynamoDBAction
s {$sel:rangeKeyType:DynamoDBAction' :: Maybe DynamoKeyType
rangeKeyType = Maybe DynamoKeyType
a} :: DynamoDBAction)
dynamoDBAction_payloadField :: Lens.Lens' DynamoDBAction (Prelude.Maybe Prelude.Text)
dynamoDBAction_payloadField :: (Maybe Text -> f (Maybe Text))
-> DynamoDBAction -> f DynamoDBAction
dynamoDBAction_payloadField = (DynamoDBAction -> Maybe Text)
-> (DynamoDBAction -> Maybe Text -> DynamoDBAction)
-> Lens DynamoDBAction DynamoDBAction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DynamoDBAction' {Maybe Text
payloadField :: Maybe Text
$sel:payloadField:DynamoDBAction' :: DynamoDBAction -> Maybe Text
payloadField} -> Maybe Text
payloadField) (\s :: DynamoDBAction
s@DynamoDBAction' {} Maybe Text
a -> DynamoDBAction
s {$sel:payloadField:DynamoDBAction' :: Maybe Text
payloadField = Maybe Text
a} :: DynamoDBAction)
dynamoDBAction_rangeKeyField :: Lens.Lens' DynamoDBAction (Prelude.Maybe Prelude.Text)
dynamoDBAction_rangeKeyField :: (Maybe Text -> f (Maybe Text))
-> DynamoDBAction -> f DynamoDBAction
dynamoDBAction_rangeKeyField = (DynamoDBAction -> Maybe Text)
-> (DynamoDBAction -> Maybe Text -> DynamoDBAction)
-> Lens DynamoDBAction DynamoDBAction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DynamoDBAction' {Maybe Text
rangeKeyField :: Maybe Text
$sel:rangeKeyField:DynamoDBAction' :: DynamoDBAction -> Maybe Text
rangeKeyField} -> Maybe Text
rangeKeyField) (\s :: DynamoDBAction
s@DynamoDBAction' {} Maybe Text
a -> DynamoDBAction
s {$sel:rangeKeyField:DynamoDBAction' :: Maybe Text
rangeKeyField = Maybe Text
a} :: DynamoDBAction)
dynamoDBAction_rangeKeyValue :: Lens.Lens' DynamoDBAction (Prelude.Maybe Prelude.Text)
dynamoDBAction_rangeKeyValue :: (Maybe Text -> f (Maybe Text))
-> DynamoDBAction -> f DynamoDBAction
dynamoDBAction_rangeKeyValue = (DynamoDBAction -> Maybe Text)
-> (DynamoDBAction -> Maybe Text -> DynamoDBAction)
-> Lens DynamoDBAction DynamoDBAction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DynamoDBAction' {Maybe Text
rangeKeyValue :: Maybe Text
$sel:rangeKeyValue:DynamoDBAction' :: DynamoDBAction -> Maybe Text
rangeKeyValue} -> Maybe Text
rangeKeyValue) (\s :: DynamoDBAction
s@DynamoDBAction' {} Maybe Text
a -> DynamoDBAction
s {$sel:rangeKeyValue:DynamoDBAction' :: Maybe Text
rangeKeyValue = Maybe Text
a} :: DynamoDBAction)
dynamoDBAction_tableName :: Lens.Lens' DynamoDBAction Prelude.Text
dynamoDBAction_tableName :: (Text -> f Text) -> DynamoDBAction -> f DynamoDBAction
dynamoDBAction_tableName = (DynamoDBAction -> Text)
-> (DynamoDBAction -> Text -> DynamoDBAction)
-> Lens DynamoDBAction DynamoDBAction Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DynamoDBAction' {Text
tableName :: Text
$sel:tableName:DynamoDBAction' :: DynamoDBAction -> Text
tableName} -> Text
tableName) (\s :: DynamoDBAction
s@DynamoDBAction' {} Text
a -> DynamoDBAction
s {$sel:tableName:DynamoDBAction' :: Text
tableName = Text
a} :: DynamoDBAction)
dynamoDBAction_roleArn :: Lens.Lens' DynamoDBAction Prelude.Text
dynamoDBAction_roleArn :: (Text -> f Text) -> DynamoDBAction -> f DynamoDBAction
dynamoDBAction_roleArn = (DynamoDBAction -> Text)
-> (DynamoDBAction -> Text -> DynamoDBAction)
-> Lens DynamoDBAction DynamoDBAction Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DynamoDBAction' {Text
roleArn :: Text
$sel:roleArn:DynamoDBAction' :: DynamoDBAction -> Text
roleArn} -> Text
roleArn) (\s :: DynamoDBAction
s@DynamoDBAction' {} Text
a -> DynamoDBAction
s {$sel:roleArn:DynamoDBAction' :: Text
roleArn = Text
a} :: DynamoDBAction)
dynamoDBAction_hashKeyField :: Lens.Lens' DynamoDBAction Prelude.Text
dynamoDBAction_hashKeyField :: (Text -> f Text) -> DynamoDBAction -> f DynamoDBAction
dynamoDBAction_hashKeyField = (DynamoDBAction -> Text)
-> (DynamoDBAction -> Text -> DynamoDBAction)
-> Lens DynamoDBAction DynamoDBAction Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DynamoDBAction' {Text
hashKeyField :: Text
$sel:hashKeyField:DynamoDBAction' :: DynamoDBAction -> Text
hashKeyField} -> Text
hashKeyField) (\s :: DynamoDBAction
s@DynamoDBAction' {} Text
a -> DynamoDBAction
s {$sel:hashKeyField:DynamoDBAction' :: Text
hashKeyField = Text
a} :: DynamoDBAction)
dynamoDBAction_hashKeyValue :: Lens.Lens' DynamoDBAction Prelude.Text
dynamoDBAction_hashKeyValue :: (Text -> f Text) -> DynamoDBAction -> f DynamoDBAction
dynamoDBAction_hashKeyValue = (DynamoDBAction -> Text)
-> (DynamoDBAction -> Text -> DynamoDBAction)
-> Lens DynamoDBAction DynamoDBAction Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DynamoDBAction' {Text
hashKeyValue :: Text
$sel:hashKeyValue:DynamoDBAction' :: DynamoDBAction -> Text
hashKeyValue} -> Text
hashKeyValue) (\s :: DynamoDBAction
s@DynamoDBAction' {} Text
a -> DynamoDBAction
s {$sel:hashKeyValue:DynamoDBAction' :: Text
hashKeyValue = Text
a} :: DynamoDBAction)
instance Core.FromJSON DynamoDBAction where
parseJSON :: Value -> Parser DynamoDBAction
parseJSON =
String
-> (Object -> Parser DynamoDBAction)
-> Value
-> Parser DynamoDBAction
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DynamoDBAction"
( \Object
x ->
Maybe DynamoKeyType
-> Maybe Text
-> Maybe DynamoKeyType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> Text
-> DynamoDBAction
DynamoDBAction'
(Maybe DynamoKeyType
-> Maybe Text
-> Maybe DynamoKeyType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> Text
-> DynamoDBAction)
-> Parser (Maybe DynamoKeyType)
-> Parser
(Maybe Text
-> Maybe DynamoKeyType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> Text
-> DynamoDBAction)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe DynamoKeyType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"hashKeyType")
Parser
(Maybe Text
-> Maybe DynamoKeyType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> Text
-> DynamoDBAction)
-> Parser (Maybe Text)
-> Parser
(Maybe DynamoKeyType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> Text
-> DynamoDBAction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"operation")
Parser
(Maybe DynamoKeyType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> Text
-> DynamoDBAction)
-> Parser (Maybe DynamoKeyType)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> Text
-> DynamoDBAction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DynamoKeyType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"rangeKeyType")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> Text
-> DynamoDBAction)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Text -> Text -> Text -> Text -> DynamoDBAction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"payloadField")
Parser
(Maybe Text
-> Maybe Text -> Text -> Text -> Text -> Text -> DynamoDBAction)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Text -> Text -> Text -> Text -> DynamoDBAction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"rangeKeyField")
Parser
(Maybe Text -> Text -> Text -> Text -> Text -> DynamoDBAction)
-> Parser (Maybe Text)
-> Parser (Text -> Text -> Text -> Text -> DynamoDBAction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"rangeKeyValue")
Parser (Text -> Text -> Text -> Text -> DynamoDBAction)
-> Parser Text -> Parser (Text -> Text -> Text -> DynamoDBAction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"tableName")
Parser (Text -> Text -> Text -> DynamoDBAction)
-> Parser Text -> Parser (Text -> Text -> DynamoDBAction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"roleArn")
Parser (Text -> Text -> DynamoDBAction)
-> Parser Text -> Parser (Text -> DynamoDBAction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"hashKeyField")
Parser (Text -> DynamoDBAction)
-> Parser Text -> Parser DynamoDBAction
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"hashKeyValue")
)
instance Prelude.Hashable DynamoDBAction
instance Prelude.NFData DynamoDBAction
instance Core.ToJSON DynamoDBAction where
toJSON :: DynamoDBAction -> Value
toJSON DynamoDBAction' {Maybe Text
Maybe DynamoKeyType
Text
hashKeyValue :: Text
hashKeyField :: Text
roleArn :: Text
tableName :: Text
rangeKeyValue :: Maybe Text
rangeKeyField :: Maybe Text
payloadField :: Maybe Text
rangeKeyType :: Maybe DynamoKeyType
operation :: Maybe Text
hashKeyType :: Maybe DynamoKeyType
$sel:hashKeyValue:DynamoDBAction' :: DynamoDBAction -> Text
$sel:hashKeyField:DynamoDBAction' :: DynamoDBAction -> Text
$sel:roleArn:DynamoDBAction' :: DynamoDBAction -> Text
$sel:tableName:DynamoDBAction' :: DynamoDBAction -> Text
$sel:rangeKeyValue:DynamoDBAction' :: DynamoDBAction -> Maybe Text
$sel:rangeKeyField:DynamoDBAction' :: DynamoDBAction -> Maybe Text
$sel:payloadField:DynamoDBAction' :: DynamoDBAction -> Maybe Text
$sel:rangeKeyType:DynamoDBAction' :: DynamoDBAction -> Maybe DynamoKeyType
$sel:operation:DynamoDBAction' :: DynamoDBAction -> Maybe Text
$sel:hashKeyType:DynamoDBAction' :: DynamoDBAction -> Maybe DynamoKeyType
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"hashKeyType" Text -> DynamoKeyType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (DynamoKeyType -> Pair) -> Maybe DynamoKeyType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DynamoKeyType
hashKeyType,
(Text
"operation" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
operation,
(Text
"rangeKeyType" Text -> DynamoKeyType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (DynamoKeyType -> Pair) -> Maybe DynamoKeyType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DynamoKeyType
rangeKeyType,
(Text
"payloadField" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
payloadField,
(Text
"rangeKeyField" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
rangeKeyField,
(Text
"rangeKeyValue" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
rangeKeyValue,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"tableName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
tableName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"roleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
roleArn),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"hashKeyField" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
hashKeyField),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"hashKeyValue" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
hashKeyValue)
]
)