{-# 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.UpdateReplicationGroupMemberAction 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 UpdateReplicationGroupMemberAction = UpdateReplicationGroupMemberAction'
{
UpdateReplicationGroupMemberAction -> Maybe Text
kmsMasterKeyId :: Prelude.Maybe Prelude.Text,
UpdateReplicationGroupMemberAction
-> Maybe ProvisionedThroughputOverride
provisionedThroughputOverride :: Prelude.Maybe ProvisionedThroughputOverride,
UpdateReplicationGroupMemberAction
-> Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
globalSecondaryIndexes :: Prelude.Maybe (Prelude.NonEmpty ReplicaGlobalSecondaryIndex),
UpdateReplicationGroupMemberAction -> Text
regionName :: Prelude.Text
}
deriving (UpdateReplicationGroupMemberAction
-> UpdateReplicationGroupMemberAction -> Bool
(UpdateReplicationGroupMemberAction
-> UpdateReplicationGroupMemberAction -> Bool)
-> (UpdateReplicationGroupMemberAction
-> UpdateReplicationGroupMemberAction -> Bool)
-> Eq UpdateReplicationGroupMemberAction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateReplicationGroupMemberAction
-> UpdateReplicationGroupMemberAction -> Bool
$c/= :: UpdateReplicationGroupMemberAction
-> UpdateReplicationGroupMemberAction -> Bool
== :: UpdateReplicationGroupMemberAction
-> UpdateReplicationGroupMemberAction -> Bool
$c== :: UpdateReplicationGroupMemberAction
-> UpdateReplicationGroupMemberAction -> Bool
Prelude.Eq, ReadPrec [UpdateReplicationGroupMemberAction]
ReadPrec UpdateReplicationGroupMemberAction
Int -> ReadS UpdateReplicationGroupMemberAction
ReadS [UpdateReplicationGroupMemberAction]
(Int -> ReadS UpdateReplicationGroupMemberAction)
-> ReadS [UpdateReplicationGroupMemberAction]
-> ReadPrec UpdateReplicationGroupMemberAction
-> ReadPrec [UpdateReplicationGroupMemberAction]
-> Read UpdateReplicationGroupMemberAction
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateReplicationGroupMemberAction]
$creadListPrec :: ReadPrec [UpdateReplicationGroupMemberAction]
readPrec :: ReadPrec UpdateReplicationGroupMemberAction
$creadPrec :: ReadPrec UpdateReplicationGroupMemberAction
readList :: ReadS [UpdateReplicationGroupMemberAction]
$creadList :: ReadS [UpdateReplicationGroupMemberAction]
readsPrec :: Int -> ReadS UpdateReplicationGroupMemberAction
$creadsPrec :: Int -> ReadS UpdateReplicationGroupMemberAction
Prelude.Read, Int -> UpdateReplicationGroupMemberAction -> ShowS
[UpdateReplicationGroupMemberAction] -> ShowS
UpdateReplicationGroupMemberAction -> String
(Int -> UpdateReplicationGroupMemberAction -> ShowS)
-> (UpdateReplicationGroupMemberAction -> String)
-> ([UpdateReplicationGroupMemberAction] -> ShowS)
-> Show UpdateReplicationGroupMemberAction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateReplicationGroupMemberAction] -> ShowS
$cshowList :: [UpdateReplicationGroupMemberAction] -> ShowS
show :: UpdateReplicationGroupMemberAction -> String
$cshow :: UpdateReplicationGroupMemberAction -> String
showsPrec :: Int -> UpdateReplicationGroupMemberAction -> ShowS
$cshowsPrec :: Int -> UpdateReplicationGroupMemberAction -> ShowS
Prelude.Show, (forall x.
UpdateReplicationGroupMemberAction
-> Rep UpdateReplicationGroupMemberAction x)
-> (forall x.
Rep UpdateReplicationGroupMemberAction x
-> UpdateReplicationGroupMemberAction)
-> Generic UpdateReplicationGroupMemberAction
forall x.
Rep UpdateReplicationGroupMemberAction x
-> UpdateReplicationGroupMemberAction
forall x.
UpdateReplicationGroupMemberAction
-> Rep UpdateReplicationGroupMemberAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateReplicationGroupMemberAction x
-> UpdateReplicationGroupMemberAction
$cfrom :: forall x.
UpdateReplicationGroupMemberAction
-> Rep UpdateReplicationGroupMemberAction x
Prelude.Generic)
newUpdateReplicationGroupMemberAction ::
Prelude.Text ->
UpdateReplicationGroupMemberAction
newUpdateReplicationGroupMemberAction :: Text -> UpdateReplicationGroupMemberAction
newUpdateReplicationGroupMemberAction Text
pRegionName_ =
UpdateReplicationGroupMemberAction' :: Maybe Text
-> Maybe ProvisionedThroughputOverride
-> Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
-> Text
-> UpdateReplicationGroupMemberAction
UpdateReplicationGroupMemberAction'
{ $sel:kmsMasterKeyId:UpdateReplicationGroupMemberAction' :: Maybe Text
kmsMasterKeyId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:provisionedThroughputOverride:UpdateReplicationGroupMemberAction' :: Maybe ProvisionedThroughputOverride
provisionedThroughputOverride =
Maybe ProvisionedThroughputOverride
forall a. Maybe a
Prelude.Nothing,
$sel:globalSecondaryIndexes:UpdateReplicationGroupMemberAction' :: Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
globalSecondaryIndexes =
Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
forall a. Maybe a
Prelude.Nothing,
$sel:regionName:UpdateReplicationGroupMemberAction' :: Text
regionName = Text
pRegionName_
}
updateReplicationGroupMemberAction_kmsMasterKeyId :: Lens.Lens' UpdateReplicationGroupMemberAction (Prelude.Maybe Prelude.Text)
updateReplicationGroupMemberAction_kmsMasterKeyId :: (Maybe Text -> f (Maybe Text))
-> UpdateReplicationGroupMemberAction
-> f UpdateReplicationGroupMemberAction
updateReplicationGroupMemberAction_kmsMasterKeyId = (UpdateReplicationGroupMemberAction -> Maybe Text)
-> (UpdateReplicationGroupMemberAction
-> Maybe Text -> UpdateReplicationGroupMemberAction)
-> Lens
UpdateReplicationGroupMemberAction
UpdateReplicationGroupMemberAction
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateReplicationGroupMemberAction' {Maybe Text
kmsMasterKeyId :: Maybe Text
$sel:kmsMasterKeyId:UpdateReplicationGroupMemberAction' :: UpdateReplicationGroupMemberAction -> Maybe Text
kmsMasterKeyId} -> Maybe Text
kmsMasterKeyId) (\s :: UpdateReplicationGroupMemberAction
s@UpdateReplicationGroupMemberAction' {} Maybe Text
a -> UpdateReplicationGroupMemberAction
s {$sel:kmsMasterKeyId:UpdateReplicationGroupMemberAction' :: Maybe Text
kmsMasterKeyId = Maybe Text
a} :: UpdateReplicationGroupMemberAction)
updateReplicationGroupMemberAction_provisionedThroughputOverride :: Lens.Lens' UpdateReplicationGroupMemberAction (Prelude.Maybe ProvisionedThroughputOverride)
updateReplicationGroupMemberAction_provisionedThroughputOverride :: (Maybe ProvisionedThroughputOverride
-> f (Maybe ProvisionedThroughputOverride))
-> UpdateReplicationGroupMemberAction
-> f UpdateReplicationGroupMemberAction
updateReplicationGroupMemberAction_provisionedThroughputOverride = (UpdateReplicationGroupMemberAction
-> Maybe ProvisionedThroughputOverride)
-> (UpdateReplicationGroupMemberAction
-> Maybe ProvisionedThroughputOverride
-> UpdateReplicationGroupMemberAction)
-> Lens
UpdateReplicationGroupMemberAction
UpdateReplicationGroupMemberAction
(Maybe ProvisionedThroughputOverride)
(Maybe ProvisionedThroughputOverride)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateReplicationGroupMemberAction' {Maybe ProvisionedThroughputOverride
provisionedThroughputOverride :: Maybe ProvisionedThroughputOverride
$sel:provisionedThroughputOverride:UpdateReplicationGroupMemberAction' :: UpdateReplicationGroupMemberAction
-> Maybe ProvisionedThroughputOverride
provisionedThroughputOverride} -> Maybe ProvisionedThroughputOverride
provisionedThroughputOverride) (\s :: UpdateReplicationGroupMemberAction
s@UpdateReplicationGroupMemberAction' {} Maybe ProvisionedThroughputOverride
a -> UpdateReplicationGroupMemberAction
s {$sel:provisionedThroughputOverride:UpdateReplicationGroupMemberAction' :: Maybe ProvisionedThroughputOverride
provisionedThroughputOverride = Maybe ProvisionedThroughputOverride
a} :: UpdateReplicationGroupMemberAction)
updateReplicationGroupMemberAction_globalSecondaryIndexes :: Lens.Lens' UpdateReplicationGroupMemberAction (Prelude.Maybe (Prelude.NonEmpty ReplicaGlobalSecondaryIndex))
updateReplicationGroupMemberAction_globalSecondaryIndexes :: (Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
-> f (Maybe (NonEmpty ReplicaGlobalSecondaryIndex)))
-> UpdateReplicationGroupMemberAction
-> f UpdateReplicationGroupMemberAction
updateReplicationGroupMemberAction_globalSecondaryIndexes = (UpdateReplicationGroupMemberAction
-> Maybe (NonEmpty ReplicaGlobalSecondaryIndex))
-> (UpdateReplicationGroupMemberAction
-> Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
-> UpdateReplicationGroupMemberAction)
-> Lens
UpdateReplicationGroupMemberAction
UpdateReplicationGroupMemberAction
(Maybe (NonEmpty ReplicaGlobalSecondaryIndex))
(Maybe (NonEmpty ReplicaGlobalSecondaryIndex))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateReplicationGroupMemberAction' {Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
globalSecondaryIndexes :: Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
$sel:globalSecondaryIndexes:UpdateReplicationGroupMemberAction' :: UpdateReplicationGroupMemberAction
-> Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
globalSecondaryIndexes} -> Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
globalSecondaryIndexes) (\s :: UpdateReplicationGroupMemberAction
s@UpdateReplicationGroupMemberAction' {} Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
a -> UpdateReplicationGroupMemberAction
s {$sel:globalSecondaryIndexes:UpdateReplicationGroupMemberAction' :: Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
globalSecondaryIndexes = Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
a} :: UpdateReplicationGroupMemberAction) ((Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
-> f (Maybe (NonEmpty ReplicaGlobalSecondaryIndex)))
-> UpdateReplicationGroupMemberAction
-> f UpdateReplicationGroupMemberAction)
-> ((Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
-> f (Maybe (NonEmpty ReplicaGlobalSecondaryIndex)))
-> Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
-> f (Maybe (NonEmpty ReplicaGlobalSecondaryIndex)))
-> (Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
-> f (Maybe (NonEmpty ReplicaGlobalSecondaryIndex)))
-> UpdateReplicationGroupMemberAction
-> f UpdateReplicationGroupMemberAction
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
updateReplicationGroupMemberAction_regionName :: Lens.Lens' UpdateReplicationGroupMemberAction Prelude.Text
updateReplicationGroupMemberAction_regionName :: (Text -> f Text)
-> UpdateReplicationGroupMemberAction
-> f UpdateReplicationGroupMemberAction
updateReplicationGroupMemberAction_regionName = (UpdateReplicationGroupMemberAction -> Text)
-> (UpdateReplicationGroupMemberAction
-> Text -> UpdateReplicationGroupMemberAction)
-> Lens
UpdateReplicationGroupMemberAction
UpdateReplicationGroupMemberAction
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateReplicationGroupMemberAction' {Text
regionName :: Text
$sel:regionName:UpdateReplicationGroupMemberAction' :: UpdateReplicationGroupMemberAction -> Text
regionName} -> Text
regionName) (\s :: UpdateReplicationGroupMemberAction
s@UpdateReplicationGroupMemberAction' {} Text
a -> UpdateReplicationGroupMemberAction
s {$sel:regionName:UpdateReplicationGroupMemberAction' :: Text
regionName = Text
a} :: UpdateReplicationGroupMemberAction)
instance
Prelude.Hashable
UpdateReplicationGroupMemberAction
instance
Prelude.NFData
UpdateReplicationGroupMemberAction
instance
Core.ToJSON
UpdateReplicationGroupMemberAction
where
toJSON :: UpdateReplicationGroupMemberAction -> Value
toJSON UpdateReplicationGroupMemberAction' {Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
Maybe Text
Maybe ProvisionedThroughputOverride
Text
regionName :: Text
globalSecondaryIndexes :: Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
provisionedThroughputOverride :: Maybe ProvisionedThroughputOverride
kmsMasterKeyId :: Maybe Text
$sel:regionName:UpdateReplicationGroupMemberAction' :: UpdateReplicationGroupMemberAction -> Text
$sel:globalSecondaryIndexes:UpdateReplicationGroupMemberAction' :: UpdateReplicationGroupMemberAction
-> Maybe (NonEmpty ReplicaGlobalSecondaryIndex)
$sel:provisionedThroughputOverride:UpdateReplicationGroupMemberAction' :: UpdateReplicationGroupMemberAction
-> Maybe ProvisionedThroughputOverride
$sel:kmsMasterKeyId:UpdateReplicationGroupMemberAction' :: UpdateReplicationGroupMemberAction -> 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)
]
)