{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DeleteReplicaAction = DeleteReplicaAction'
{
DeleteReplicaAction -> Text
regionName :: Prelude.Text
}
deriving (DeleteReplicaAction -> DeleteReplicaAction -> Bool
(DeleteReplicaAction -> DeleteReplicaAction -> Bool)
-> (DeleteReplicaAction -> DeleteReplicaAction -> Bool)
-> Eq DeleteReplicaAction
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]
(Int -> ReadS DeleteReplicaAction)
-> ReadS [DeleteReplicaAction]
-> ReadPrec DeleteReplicaAction
-> ReadPrec [DeleteReplicaAction]
-> Read 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
(Int -> DeleteReplicaAction -> ShowS)
-> (DeleteReplicaAction -> String)
-> ([DeleteReplicaAction] -> ShowS)
-> Show DeleteReplicaAction
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. DeleteReplicaAction -> Rep DeleteReplicaAction x)
-> (forall x. Rep DeleteReplicaAction x -> DeleteReplicaAction)
-> Generic DeleteReplicaAction
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' :: Text -> DeleteReplicaAction
DeleteReplicaAction' {$sel:regionName:DeleteReplicaAction' :: Text
regionName = Text
pRegionName_}
deleteReplicaAction_regionName :: Lens.Lens' DeleteReplicaAction Prelude.Text
deleteReplicaAction_regionName :: (Text -> f Text) -> DeleteReplicaAction -> f DeleteReplicaAction
deleteReplicaAction_regionName = (DeleteReplicaAction -> Text)
-> (DeleteReplicaAction -> Text -> DeleteReplicaAction)
-> Lens DeleteReplicaAction DeleteReplicaAction Text Text
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
instance Prelude.NFData DeleteReplicaAction
instance Core.ToJSON DeleteReplicaAction where
toJSON :: DeleteReplicaAction -> Value
toJSON DeleteReplicaAction' {Text
regionName :: Text
$sel:regionName:DeleteReplicaAction' :: DeleteReplicaAction -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[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)]
)