{-# 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.DeleteReplicaAction where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.DynamoDB.Types.AttributeValue
import Amazonka.DynamoDB.Types.WriteRequest
import qualified Amazonka.Prelude as Prelude
data DeleteReplicaAction = DeleteReplicaAction'
{
DeleteReplicaAction -> Text
regionName :: Prelude.Text
}
deriving (DeleteReplicaAction -> DeleteReplicaAction -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteReplicaAction -> DeleteReplicaAction -> Bool
$c/= :: DeleteReplicaAction -> DeleteReplicaAction -> Bool
== :: DeleteReplicaAction -> DeleteReplicaAction -> Bool
$c== :: DeleteReplicaAction -> DeleteReplicaAction -> Bool
Prelude.Eq, ReadPrec [DeleteReplicaAction]
ReadPrec DeleteReplicaAction
Int -> ReadS DeleteReplicaAction
ReadS [DeleteReplicaAction]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteReplicaAction]
$creadListPrec :: ReadPrec [DeleteReplicaAction]
readPrec :: ReadPrec DeleteReplicaAction
$creadPrec :: ReadPrec DeleteReplicaAction
readList :: ReadS [DeleteReplicaAction]
$creadList :: ReadS [DeleteReplicaAction]
readsPrec :: Int -> ReadS DeleteReplicaAction
$creadsPrec :: Int -> ReadS DeleteReplicaAction
Prelude.Read, Int -> DeleteReplicaAction -> ShowS
[DeleteReplicaAction] -> ShowS
DeleteReplicaAction -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteReplicaAction] -> ShowS
$cshowList :: [DeleteReplicaAction] -> ShowS
show :: DeleteReplicaAction -> String
$cshow :: DeleteReplicaAction -> String
showsPrec :: Int -> DeleteReplicaAction -> ShowS
$cshowsPrec :: Int -> DeleteReplicaAction -> ShowS
Prelude.Show, forall x. Rep DeleteReplicaAction x -> DeleteReplicaAction
forall x. DeleteReplicaAction -> Rep DeleteReplicaAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteReplicaAction x -> DeleteReplicaAction
$cfrom :: forall x. DeleteReplicaAction -> Rep DeleteReplicaAction x
Prelude.Generic)
newDeleteReplicaAction ::
Prelude.Text ->
DeleteReplicaAction
newDeleteReplicaAction :: Text -> DeleteReplicaAction
newDeleteReplicaAction Text
pRegionName_ =
DeleteReplicaAction' {$sel:regionName:DeleteReplicaAction' :: Text
regionName = Text
pRegionName_}
deleteReplicaAction_regionName :: Lens.Lens' DeleteReplicaAction Prelude.Text
deleteReplicaAction_regionName :: Lens' DeleteReplicaAction Text
deleteReplicaAction_regionName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteReplicaAction' {Text
regionName :: Text
$sel:regionName:DeleteReplicaAction' :: DeleteReplicaAction -> Text
regionName} -> Text
regionName) (\s :: DeleteReplicaAction
s@DeleteReplicaAction' {} Text
a -> DeleteReplicaAction
s {$sel:regionName:DeleteReplicaAction' :: Text
regionName = Text
a} :: DeleteReplicaAction)
instance Prelude.Hashable DeleteReplicaAction where
hashWithSalt :: Int -> DeleteReplicaAction -> Int
hashWithSalt Int
_salt DeleteReplicaAction' {Text
regionName :: Text
$sel:regionName:DeleteReplicaAction' :: DeleteReplicaAction -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
regionName
instance Prelude.NFData DeleteReplicaAction where
rnf :: DeleteReplicaAction -> ()
rnf DeleteReplicaAction' {Text
regionName :: Text
$sel:regionName:DeleteReplicaAction' :: DeleteReplicaAction -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
regionName
instance Data.ToJSON DeleteReplicaAction where
toJSON :: DeleteReplicaAction -> Value
toJSON DeleteReplicaAction' {Text
regionName :: Text
$sel:regionName:DeleteReplicaAction' :: DeleteReplicaAction -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"RegionName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
regionName)]
)