{-# 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.ElastiCache.Types.RegionalConfiguration where
import qualified Amazonka.Core as Core
import Amazonka.ElastiCache.Types.ReshardingConfiguration
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RegionalConfiguration = RegionalConfiguration'
{
RegionalConfiguration -> Text
replicationGroupId :: Prelude.Text,
RegionalConfiguration -> Text
replicationGroupRegion :: Prelude.Text,
RegionalConfiguration -> [ReshardingConfiguration]
reshardingConfiguration :: [ReshardingConfiguration]
}
deriving (RegionalConfiguration -> RegionalConfiguration -> Bool
(RegionalConfiguration -> RegionalConfiguration -> Bool)
-> (RegionalConfiguration -> RegionalConfiguration -> Bool)
-> Eq RegionalConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RegionalConfiguration -> RegionalConfiguration -> Bool
$c/= :: RegionalConfiguration -> RegionalConfiguration -> Bool
== :: RegionalConfiguration -> RegionalConfiguration -> Bool
$c== :: RegionalConfiguration -> RegionalConfiguration -> Bool
Prelude.Eq, ReadPrec [RegionalConfiguration]
ReadPrec RegionalConfiguration
Int -> ReadS RegionalConfiguration
ReadS [RegionalConfiguration]
(Int -> ReadS RegionalConfiguration)
-> ReadS [RegionalConfiguration]
-> ReadPrec RegionalConfiguration
-> ReadPrec [RegionalConfiguration]
-> Read RegionalConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RegionalConfiguration]
$creadListPrec :: ReadPrec [RegionalConfiguration]
readPrec :: ReadPrec RegionalConfiguration
$creadPrec :: ReadPrec RegionalConfiguration
readList :: ReadS [RegionalConfiguration]
$creadList :: ReadS [RegionalConfiguration]
readsPrec :: Int -> ReadS RegionalConfiguration
$creadsPrec :: Int -> ReadS RegionalConfiguration
Prelude.Read, Int -> RegionalConfiguration -> ShowS
[RegionalConfiguration] -> ShowS
RegionalConfiguration -> String
(Int -> RegionalConfiguration -> ShowS)
-> (RegionalConfiguration -> String)
-> ([RegionalConfiguration] -> ShowS)
-> Show RegionalConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RegionalConfiguration] -> ShowS
$cshowList :: [RegionalConfiguration] -> ShowS
show :: RegionalConfiguration -> String
$cshow :: RegionalConfiguration -> String
showsPrec :: Int -> RegionalConfiguration -> ShowS
$cshowsPrec :: Int -> RegionalConfiguration -> ShowS
Prelude.Show, (forall x. RegionalConfiguration -> Rep RegionalConfiguration x)
-> (forall x. Rep RegionalConfiguration x -> RegionalConfiguration)
-> Generic RegionalConfiguration
forall x. Rep RegionalConfiguration x -> RegionalConfiguration
forall x. RegionalConfiguration -> Rep RegionalConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RegionalConfiguration x -> RegionalConfiguration
$cfrom :: forall x. RegionalConfiguration -> Rep RegionalConfiguration x
Prelude.Generic)
newRegionalConfiguration ::
Prelude.Text ->
Prelude.Text ->
RegionalConfiguration
newRegionalConfiguration :: Text -> Text -> RegionalConfiguration
newRegionalConfiguration
Text
pReplicationGroupId_
Text
pReplicationGroupRegion_ =
RegionalConfiguration' :: Text -> Text -> [ReshardingConfiguration] -> RegionalConfiguration
RegionalConfiguration'
{ $sel:replicationGroupId:RegionalConfiguration' :: Text
replicationGroupId =
Text
pReplicationGroupId_,
$sel:replicationGroupRegion:RegionalConfiguration' :: Text
replicationGroupRegion = Text
pReplicationGroupRegion_,
$sel:reshardingConfiguration:RegionalConfiguration' :: [ReshardingConfiguration]
reshardingConfiguration = [ReshardingConfiguration]
forall a. Monoid a => a
Prelude.mempty
}
regionalConfiguration_replicationGroupId :: Lens.Lens' RegionalConfiguration Prelude.Text
regionalConfiguration_replicationGroupId :: (Text -> f Text)
-> RegionalConfiguration -> f RegionalConfiguration
regionalConfiguration_replicationGroupId = (RegionalConfiguration -> Text)
-> (RegionalConfiguration -> Text -> RegionalConfiguration)
-> Lens RegionalConfiguration RegionalConfiguration Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegionalConfiguration' {Text
replicationGroupId :: Text
$sel:replicationGroupId:RegionalConfiguration' :: RegionalConfiguration -> Text
replicationGroupId} -> Text
replicationGroupId) (\s :: RegionalConfiguration
s@RegionalConfiguration' {} Text
a -> RegionalConfiguration
s {$sel:replicationGroupId:RegionalConfiguration' :: Text
replicationGroupId = Text
a} :: RegionalConfiguration)
regionalConfiguration_replicationGroupRegion :: Lens.Lens' RegionalConfiguration Prelude.Text
regionalConfiguration_replicationGroupRegion :: (Text -> f Text)
-> RegionalConfiguration -> f RegionalConfiguration
regionalConfiguration_replicationGroupRegion = (RegionalConfiguration -> Text)
-> (RegionalConfiguration -> Text -> RegionalConfiguration)
-> Lens RegionalConfiguration RegionalConfiguration Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegionalConfiguration' {Text
replicationGroupRegion :: Text
$sel:replicationGroupRegion:RegionalConfiguration' :: RegionalConfiguration -> Text
replicationGroupRegion} -> Text
replicationGroupRegion) (\s :: RegionalConfiguration
s@RegionalConfiguration' {} Text
a -> RegionalConfiguration
s {$sel:replicationGroupRegion:RegionalConfiguration' :: Text
replicationGroupRegion = Text
a} :: RegionalConfiguration)
regionalConfiguration_reshardingConfiguration :: Lens.Lens' RegionalConfiguration [ReshardingConfiguration]
regionalConfiguration_reshardingConfiguration :: ([ReshardingConfiguration] -> f [ReshardingConfiguration])
-> RegionalConfiguration -> f RegionalConfiguration
regionalConfiguration_reshardingConfiguration = (RegionalConfiguration -> [ReshardingConfiguration])
-> (RegionalConfiguration
-> [ReshardingConfiguration] -> RegionalConfiguration)
-> Lens
RegionalConfiguration
RegionalConfiguration
[ReshardingConfiguration]
[ReshardingConfiguration]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegionalConfiguration' {[ReshardingConfiguration]
reshardingConfiguration :: [ReshardingConfiguration]
$sel:reshardingConfiguration:RegionalConfiguration' :: RegionalConfiguration -> [ReshardingConfiguration]
reshardingConfiguration} -> [ReshardingConfiguration]
reshardingConfiguration) (\s :: RegionalConfiguration
s@RegionalConfiguration' {} [ReshardingConfiguration]
a -> RegionalConfiguration
s {$sel:reshardingConfiguration:RegionalConfiguration' :: [ReshardingConfiguration]
reshardingConfiguration = [ReshardingConfiguration]
a} :: RegionalConfiguration) (([ReshardingConfiguration] -> f [ReshardingConfiguration])
-> RegionalConfiguration -> f RegionalConfiguration)
-> (([ReshardingConfiguration] -> f [ReshardingConfiguration])
-> [ReshardingConfiguration] -> f [ReshardingConfiguration])
-> ([ReshardingConfiguration] -> f [ReshardingConfiguration])
-> RegionalConfiguration
-> f RegionalConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ReshardingConfiguration] -> f [ReshardingConfiguration])
-> [ReshardingConfiguration] -> f [ReshardingConfiguration]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Prelude.Hashable RegionalConfiguration
instance Prelude.NFData RegionalConfiguration
instance Core.ToQuery RegionalConfiguration where
toQuery :: RegionalConfiguration -> QueryString
toQuery RegionalConfiguration' {[ReshardingConfiguration]
Text
reshardingConfiguration :: [ReshardingConfiguration]
replicationGroupRegion :: Text
replicationGroupId :: Text
$sel:reshardingConfiguration:RegionalConfiguration' :: RegionalConfiguration -> [ReshardingConfiguration]
$sel:replicationGroupRegion:RegionalConfiguration' :: RegionalConfiguration -> Text
$sel:replicationGroupId:RegionalConfiguration' :: RegionalConfiguration -> Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"ReplicationGroupId" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
replicationGroupId,
ByteString
"ReplicationGroupRegion"
ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
replicationGroupRegion,
ByteString
"ReshardingConfiguration"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ByteString -> [ReshardingConfiguration] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList
ByteString
"ReshardingConfiguration"
[ReshardingConfiguration]
reshardingConfiguration
]