{-# 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.MemoryDb.Types.ReplicaConfigurationRequest where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ReplicaConfigurationRequest = ReplicaConfigurationRequest'
{
ReplicaConfigurationRequest -> Maybe Int
replicaCount :: Prelude.Maybe Prelude.Int
}
deriving (ReplicaConfigurationRequest -> ReplicaConfigurationRequest -> Bool
(ReplicaConfigurationRequest
-> ReplicaConfigurationRequest -> Bool)
-> (ReplicaConfigurationRequest
-> ReplicaConfigurationRequest -> Bool)
-> Eq ReplicaConfigurationRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReplicaConfigurationRequest -> ReplicaConfigurationRequest -> Bool
$c/= :: ReplicaConfigurationRequest -> ReplicaConfigurationRequest -> Bool
== :: ReplicaConfigurationRequest -> ReplicaConfigurationRequest -> Bool
$c== :: ReplicaConfigurationRequest -> ReplicaConfigurationRequest -> Bool
Prelude.Eq, ReadPrec [ReplicaConfigurationRequest]
ReadPrec ReplicaConfigurationRequest
Int -> ReadS ReplicaConfigurationRequest
ReadS [ReplicaConfigurationRequest]
(Int -> ReadS ReplicaConfigurationRequest)
-> ReadS [ReplicaConfigurationRequest]
-> ReadPrec ReplicaConfigurationRequest
-> ReadPrec [ReplicaConfigurationRequest]
-> Read ReplicaConfigurationRequest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReplicaConfigurationRequest]
$creadListPrec :: ReadPrec [ReplicaConfigurationRequest]
readPrec :: ReadPrec ReplicaConfigurationRequest
$creadPrec :: ReadPrec ReplicaConfigurationRequest
readList :: ReadS [ReplicaConfigurationRequest]
$creadList :: ReadS [ReplicaConfigurationRequest]
readsPrec :: Int -> ReadS ReplicaConfigurationRequest
$creadsPrec :: Int -> ReadS ReplicaConfigurationRequest
Prelude.Read, Int -> ReplicaConfigurationRequest -> ShowS
[ReplicaConfigurationRequest] -> ShowS
ReplicaConfigurationRequest -> String
(Int -> ReplicaConfigurationRequest -> ShowS)
-> (ReplicaConfigurationRequest -> String)
-> ([ReplicaConfigurationRequest] -> ShowS)
-> Show ReplicaConfigurationRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReplicaConfigurationRequest] -> ShowS
$cshowList :: [ReplicaConfigurationRequest] -> ShowS
show :: ReplicaConfigurationRequest -> String
$cshow :: ReplicaConfigurationRequest -> String
showsPrec :: Int -> ReplicaConfigurationRequest -> ShowS
$cshowsPrec :: Int -> ReplicaConfigurationRequest -> ShowS
Prelude.Show, (forall x.
ReplicaConfigurationRequest -> Rep ReplicaConfigurationRequest x)
-> (forall x.
Rep ReplicaConfigurationRequest x -> ReplicaConfigurationRequest)
-> Generic ReplicaConfigurationRequest
forall x.
Rep ReplicaConfigurationRequest x -> ReplicaConfigurationRequest
forall x.
ReplicaConfigurationRequest -> Rep ReplicaConfigurationRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ReplicaConfigurationRequest x -> ReplicaConfigurationRequest
$cfrom :: forall x.
ReplicaConfigurationRequest -> Rep ReplicaConfigurationRequest x
Prelude.Generic)
newReplicaConfigurationRequest ::
ReplicaConfigurationRequest
newReplicaConfigurationRequest :: ReplicaConfigurationRequest
newReplicaConfigurationRequest =
ReplicaConfigurationRequest' :: Maybe Int -> ReplicaConfigurationRequest
ReplicaConfigurationRequest'
{ $sel:replicaCount:ReplicaConfigurationRequest' :: Maybe Int
replicaCount =
Maybe Int
forall a. Maybe a
Prelude.Nothing
}
replicaConfigurationRequest_replicaCount :: Lens.Lens' ReplicaConfigurationRequest (Prelude.Maybe Prelude.Int)
replicaConfigurationRequest_replicaCount :: (Maybe Int -> f (Maybe Int))
-> ReplicaConfigurationRequest -> f ReplicaConfigurationRequest
replicaConfigurationRequest_replicaCount = (ReplicaConfigurationRequest -> Maybe Int)
-> (ReplicaConfigurationRequest
-> Maybe Int -> ReplicaConfigurationRequest)
-> Lens
ReplicaConfigurationRequest
ReplicaConfigurationRequest
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicaConfigurationRequest' {Maybe Int
replicaCount :: Maybe Int
$sel:replicaCount:ReplicaConfigurationRequest' :: ReplicaConfigurationRequest -> Maybe Int
replicaCount} -> Maybe Int
replicaCount) (\s :: ReplicaConfigurationRequest
s@ReplicaConfigurationRequest' {} Maybe Int
a -> ReplicaConfigurationRequest
s {$sel:replicaCount:ReplicaConfigurationRequest' :: Maybe Int
replicaCount = Maybe Int
a} :: ReplicaConfigurationRequest)
instance Prelude.Hashable ReplicaConfigurationRequest
instance Prelude.NFData ReplicaConfigurationRequest
instance Core.ToJSON ReplicaConfigurationRequest where
toJSON :: ReplicaConfigurationRequest -> Value
toJSON ReplicaConfigurationRequest' {Maybe Int
replicaCount :: Maybe Int
$sel:replicaCount:ReplicaConfigurationRequest' :: ReplicaConfigurationRequest -> Maybe Int
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Text
"ReplicaCount" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
replicaCount]
)