{-# 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.DynamoDB.Types.CreateReplicationGroupMemberAction where
import qualified Amazonka.Core as Core
import Amazonka.DynamoDB.Types.ProvisionedThroughputOverride
import Amazonka.DynamoDB.Types.ReplicaGlobalSecondaryIndex
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CreateReplicationGroupMemberAction = CreateReplicationGroupMemberAction'
{
CreateReplicationGroupMemberAction -> Maybe Text
kmsMasterKeyId :: Prelude.Maybe Prelude.Text,
CreateReplicationGroupMemberAction
-> Maybe ProvisionedThroughputOverride
provisionedThroughputOverride :: Prelude.Maybe ProvisionedThroughputOverride,
CreateReplicationGroupMemberAction
-> Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
globalSecondaryIndexes :: Prelude.Maybe (Prelude.NonEmpty ReplicaGlobalSecondaryIndex),
CreateReplicationGroupMemberAction -> Text
regionName :: Prelude.Text
}
deriving (CreateReplicationGroupMemberAction
-> CreateReplicationGroupMemberAction -> Bool
(CreateReplicationGroupMemberAction
-> CreateReplicationGroupMemberAction -> Bool)
-> (CreateReplicationGroupMemberAction
-> CreateReplicationGroupMemberAction -> Bool)
-> Eq CreateReplicationGroupMemberAction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateReplicationGroupMemberAction
-> CreateReplicationGroupMemberAction -> Bool
$c/= :: CreateReplicationGroupMemberAction
-> CreateReplicationGroupMemberAction -> Bool
== :: CreateReplicationGroupMemberAction
-> CreateReplicationGroupMemberAction -> Bool
$c== :: CreateReplicationGroupMemberAction
-> CreateReplicationGroupMemberAction -> Bool
Prelude.Eq, ReadPrec [CreateReplicationGroupMemberAction]
ReadPrec CreateReplicationGroupMemberAction
Int -> ReadS CreateReplicationGroupMemberAction
ReadS [CreateReplicationGroupMemberAction]
(Int -> ReadS CreateReplicationGroupMemberAction)
-> ReadS [CreateReplicationGroupMemberAction]
-> ReadPrec CreateReplicationGroupMemberAction
-> ReadPrec [CreateReplicationGroupMemberAction]
-> Read CreateReplicationGroupMemberAction
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateReplicationGroupMemberAction]
$creadListPrec :: ReadPrec [CreateReplicationGroupMemberAction]
readPrec :: ReadPrec CreateReplicationGroupMemberAction
$creadPrec :: ReadPrec CreateReplicationGroupMemberAction
readList :: ReadS [CreateReplicationGroupMemberAction]
$creadList :: ReadS [CreateReplicationGroupMemberAction]
readsPrec :: Int -> ReadS CreateReplicationGroupMemberAction
$creadsPrec :: Int -> ReadS CreateReplicationGroupMemberAction
Prelude.Read, Int -> CreateReplicationGroupMemberAction -> ShowS
[CreateReplicationGroupMemberAction] -> ShowS
CreateReplicationGroupMemberAction -> String
(Int -> CreateReplicationGroupMemberAction -> ShowS)
-> (CreateReplicationGroupMemberAction -> String)
-> ([CreateReplicationGroupMemberAction] -> ShowS)
-> Show CreateReplicationGroupMemberAction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateReplicationGroupMemberAction] -> ShowS
$cshowList :: [CreateReplicationGroupMemberAction] -> ShowS
show :: CreateReplicationGroupMemberAction -> String
$cshow :: CreateReplicationGroupMemberAction -> String
showsPrec :: Int -> CreateReplicationGroupMemberAction -> ShowS
$cshowsPrec :: Int -> CreateReplicationGroupMemberAction -> ShowS
Prelude.Show, (forall x.
CreateReplicationGroupMemberAction
-> Rep CreateReplicationGroupMemberAction x)
-> (forall x.
Rep CreateReplicationGroupMemberAction x
-> CreateReplicationGroupMemberAction)
-> Generic CreateReplicationGroupMemberAction
forall x.
Rep CreateReplicationGroupMemberAction x
-> CreateReplicationGroupMemberAction
forall x.
CreateReplicationGroupMemberAction
-> Rep CreateReplicationGroupMemberAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateReplicationGroupMemberAction x
-> CreateReplicationGroupMemberAction
$cfrom :: forall x.
CreateReplicationGroupMemberAction
-> Rep CreateReplicationGroupMemberAction x
Prelude.Generic)
newCreateReplicationGroupMemberAction ::
Prelude.Text ->
CreateReplicationGroupMemberAction
newCreateReplicationGroupMemberAction :: Text -> CreateReplicationGroupMemberAction
newCreateReplicationGroupMemberAction Text
pRegionName_ =
CreateReplicationGroupMemberAction' :: Maybe Text
-> Maybe ProvisionedThroughputOverride
-> Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
-> Text
-> CreateReplicationGroupMemberAction
CreateReplicationGroupMemberAction'
{ $sel:kmsMasterKeyId:CreateReplicationGroupMemberAction' :: Maybe Text
kmsMasterKeyId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:provisionedThroughputOverride:CreateReplicationGroupMemberAction' :: Maybe ProvisionedThroughputOverride
provisionedThroughputOverride =
Maybe ProvisionedThroughputOverride
forall a. Maybe a
Prelude.Nothing,
$sel:globalSecondaryIndexes:CreateReplicationGroupMemberAction' :: Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
globalSecondaryIndexes =
Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
forall a. Maybe a
Prelude.Nothing,
$sel:regionName:CreateReplicationGroupMemberAction' :: Text
regionName = Text
pRegionName_
}
createReplicationGroupMemberAction_kmsMasterKeyId :: Lens.Lens' CreateReplicationGroupMemberAction (Prelude.Maybe Prelude.Text)
createReplicationGroupMemberAction_kmsMasterKeyId :: (Maybe Text -> f (Maybe Text))
-> CreateReplicationGroupMemberAction
-> f CreateReplicationGroupMemberAction
createReplicationGroupMemberAction_kmsMasterKeyId = (CreateReplicationGroupMemberAction -> Maybe Text)
-> (CreateReplicationGroupMemberAction
-> Maybe Text -> CreateReplicationGroupMemberAction)
-> Lens
CreateReplicationGroupMemberAction
CreateReplicationGroupMemberAction
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroupMemberAction' {Maybe Text
kmsMasterKeyId :: Maybe Text
$sel:kmsMasterKeyId:CreateReplicationGroupMemberAction' :: CreateReplicationGroupMemberAction -> Maybe Text
kmsMasterKeyId} -> Maybe Text
kmsMasterKeyId) (\s :: CreateReplicationGroupMemberAction
s@CreateReplicationGroupMemberAction' {} Maybe Text
a -> CreateReplicationGroupMemberAction
s {$sel:kmsMasterKeyId:CreateReplicationGroupMemberAction' :: Maybe Text
kmsMasterKeyId = Maybe Text
a} :: CreateReplicationGroupMemberAction)
createReplicationGroupMemberAction_provisionedThroughputOverride :: Lens.Lens' CreateReplicationGroupMemberAction (Prelude.Maybe ProvisionedThroughputOverride)
createReplicationGroupMemberAction_provisionedThroughputOverride :: (Maybe ProvisionedThroughputOverride
-> f (Maybe ProvisionedThroughputOverride))
-> CreateReplicationGroupMemberAction
-> f CreateReplicationGroupMemberAction
createReplicationGroupMemberAction_provisionedThroughputOverride = (CreateReplicationGroupMemberAction
-> Maybe ProvisionedThroughputOverride)
-> (CreateReplicationGroupMemberAction
-> Maybe ProvisionedThroughputOverride
-> CreateReplicationGroupMemberAction)
-> Lens
CreateReplicationGroupMemberAction
CreateReplicationGroupMemberAction
(Maybe ProvisionedThroughputOverride)
(Maybe ProvisionedThroughputOverride)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroupMemberAction' {Maybe ProvisionedThroughputOverride
provisionedThroughputOverride :: Maybe ProvisionedThroughputOverride
$sel:provisionedThroughputOverride:CreateReplicationGroupMemberAction' :: CreateReplicationGroupMemberAction
-> Maybe ProvisionedThroughputOverride
provisionedThroughputOverride} -> Maybe ProvisionedThroughputOverride
provisionedThroughputOverride) (\s :: CreateReplicationGroupMemberAction
s@CreateReplicationGroupMemberAction' {} Maybe ProvisionedThroughputOverride
a -> CreateReplicationGroupMemberAction
s {$sel:provisionedThroughputOverride:CreateReplicationGroupMemberAction' :: Maybe ProvisionedThroughputOverride
provisionedThroughputOverride = Maybe ProvisionedThroughputOverride
a} :: CreateReplicationGroupMemberAction)
createReplicationGroupMemberAction_globalSecondaryIndexes :: Lens.Lens' CreateReplicationGroupMemberAction (Prelude.Maybe (Prelude.NonEmpty ReplicaGlobalSecondaryIndex))
createReplicationGroupMemberAction_globalSecondaryIndexes :: (Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
-> f (Maybe (NonEmpty ReplicaGlobalSecondaryIndex)))
-> CreateReplicationGroupMemberAction
-> f CreateReplicationGroupMemberAction
createReplicationGroupMemberAction_globalSecondaryIndexes = (CreateReplicationGroupMemberAction
-> Maybe (NonEmpty ReplicaGlobalSecondaryIndex))
-> (CreateReplicationGroupMemberAction
-> Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
-> CreateReplicationGroupMemberAction)
-> Lens
CreateReplicationGroupMemberAction
CreateReplicationGroupMemberAction
(Maybe (NonEmpty ReplicaGlobalSecondaryIndex))
(Maybe (NonEmpty ReplicaGlobalSecondaryIndex))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroupMemberAction' {Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
globalSecondaryIndexes :: Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
$sel:globalSecondaryIndexes:CreateReplicationGroupMemberAction' :: CreateReplicationGroupMemberAction
-> Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
globalSecondaryIndexes} -> Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
globalSecondaryIndexes) (\s :: CreateReplicationGroupMemberAction
s@CreateReplicationGroupMemberAction' {} Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
a -> CreateReplicationGroupMemberAction
s {$sel:globalSecondaryIndexes:CreateReplicationGroupMemberAction' :: Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
globalSecondaryIndexes = Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
a} :: CreateReplicationGroupMemberAction) ((Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
-> f (Maybe (NonEmpty ReplicaGlobalSecondaryIndex)))
-> CreateReplicationGroupMemberAction
-> f CreateReplicationGroupMemberAction)
-> ((Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
-> f (Maybe (NonEmpty ReplicaGlobalSecondaryIndex)))
-> Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
-> f (Maybe (NonEmpty ReplicaGlobalSecondaryIndex)))
-> (Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
-> f (Maybe (NonEmpty ReplicaGlobalSecondaryIndex)))
-> CreateReplicationGroupMemberAction
-> f CreateReplicationGroupMemberAction
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty ReplicaGlobalSecondaryIndex)
(NonEmpty ReplicaGlobalSecondaryIndex)
(NonEmpty ReplicaGlobalSecondaryIndex)
(NonEmpty ReplicaGlobalSecondaryIndex)
-> Iso
(Maybe (NonEmpty ReplicaGlobalSecondaryIndex))
(Maybe (NonEmpty ReplicaGlobalSecondaryIndex))
(Maybe (NonEmpty ReplicaGlobalSecondaryIndex))
(Maybe (NonEmpty ReplicaGlobalSecondaryIndex))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(NonEmpty ReplicaGlobalSecondaryIndex)
(NonEmpty ReplicaGlobalSecondaryIndex)
(NonEmpty ReplicaGlobalSecondaryIndex)
(NonEmpty ReplicaGlobalSecondaryIndex)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createReplicationGroupMemberAction_regionName :: Lens.Lens' CreateReplicationGroupMemberAction Prelude.Text
createReplicationGroupMemberAction_regionName :: (Text -> f Text)
-> CreateReplicationGroupMemberAction
-> f CreateReplicationGroupMemberAction
createReplicationGroupMemberAction_regionName = (CreateReplicationGroupMemberAction -> Text)
-> (CreateReplicationGroupMemberAction
-> Text -> CreateReplicationGroupMemberAction)
-> Lens
CreateReplicationGroupMemberAction
CreateReplicationGroupMemberAction
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroupMemberAction' {Text
regionName :: Text
$sel:regionName:CreateReplicationGroupMemberAction' :: CreateReplicationGroupMemberAction -> Text
regionName} -> Text
regionName) (\s :: CreateReplicationGroupMemberAction
s@CreateReplicationGroupMemberAction' {} Text
a -> CreateReplicationGroupMemberAction
s {$sel:regionName:CreateReplicationGroupMemberAction' :: Text
regionName = Text
a} :: CreateReplicationGroupMemberAction)
instance
Prelude.Hashable
CreateReplicationGroupMemberAction
instance
Prelude.NFData
CreateReplicationGroupMemberAction
instance
Core.ToJSON
CreateReplicationGroupMemberAction
where
toJSON :: CreateReplicationGroupMemberAction -> Value
toJSON CreateReplicationGroupMemberAction' {Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
Maybe Text
Maybe ProvisionedThroughputOverride
Text
regionName :: Text
globalSecondaryIndexes :: Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
provisionedThroughputOverride :: Maybe ProvisionedThroughputOverride
kmsMasterKeyId :: Maybe Text
$sel:regionName:CreateReplicationGroupMemberAction' :: CreateReplicationGroupMemberAction -> Text
$sel:globalSecondaryIndexes:CreateReplicationGroupMemberAction' :: CreateReplicationGroupMemberAction
-> Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
$sel:provisionedThroughputOverride:CreateReplicationGroupMemberAction' :: CreateReplicationGroupMemberAction
-> Maybe ProvisionedThroughputOverride
$sel:kmsMasterKeyId:CreateReplicationGroupMemberAction' :: CreateReplicationGroupMemberAction -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"KMSMasterKeyId" 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
kmsMasterKeyId,
(Text
"ProvisionedThroughputOverride" Text -> ProvisionedThroughputOverride -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ProvisionedThroughputOverride -> Pair)
-> Maybe ProvisionedThroughputOverride -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProvisionedThroughputOverride
provisionedThroughputOverride,
(Text
"GlobalSecondaryIndexes" Text -> NonEmpty ReplicaGlobalSecondaryIndex -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(NonEmpty ReplicaGlobalSecondaryIndex -> Pair)
-> Maybe (NonEmpty ReplicaGlobalSecondaryIndex) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
globalSecondaryIndexes,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"RegionName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
regionName)
]
)