{-# 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.ClusterPendingUpdates where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MemoryDb.Types.ACLsUpdateStatus
import Amazonka.MemoryDb.Types.PendingModifiedServiceUpdate
import Amazonka.MemoryDb.Types.ReshardingStatus
import qualified Amazonka.Prelude as Prelude
data ClusterPendingUpdates = ClusterPendingUpdates'
{
ClusterPendingUpdates -> Maybe ACLsUpdateStatus
aCLs :: Prelude.Maybe ACLsUpdateStatus,
ClusterPendingUpdates -> Maybe ReshardingStatus
resharding :: Prelude.Maybe ReshardingStatus,
ClusterPendingUpdates -> Maybe [PendingModifiedServiceUpdate]
serviceUpdates :: Prelude.Maybe [PendingModifiedServiceUpdate]
}
deriving (ClusterPendingUpdates -> ClusterPendingUpdates -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ClusterPendingUpdates -> ClusterPendingUpdates -> Bool
$c/= :: ClusterPendingUpdates -> ClusterPendingUpdates -> Bool
== :: ClusterPendingUpdates -> ClusterPendingUpdates -> Bool
$c== :: ClusterPendingUpdates -> ClusterPendingUpdates -> Bool
Prelude.Eq, ReadPrec [ClusterPendingUpdates]
ReadPrec ClusterPendingUpdates
Int -> ReadS ClusterPendingUpdates
ReadS [ClusterPendingUpdates]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ClusterPendingUpdates]
$creadListPrec :: ReadPrec [ClusterPendingUpdates]
readPrec :: ReadPrec ClusterPendingUpdates
$creadPrec :: ReadPrec ClusterPendingUpdates
readList :: ReadS [ClusterPendingUpdates]
$creadList :: ReadS [ClusterPendingUpdates]
readsPrec :: Int -> ReadS ClusterPendingUpdates
$creadsPrec :: Int -> ReadS ClusterPendingUpdates
Prelude.Read, Int -> ClusterPendingUpdates -> ShowS
[ClusterPendingUpdates] -> ShowS
ClusterPendingUpdates -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ClusterPendingUpdates] -> ShowS
$cshowList :: [ClusterPendingUpdates] -> ShowS
show :: ClusterPendingUpdates -> String
$cshow :: ClusterPendingUpdates -> String
showsPrec :: Int -> ClusterPendingUpdates -> ShowS
$cshowsPrec :: Int -> ClusterPendingUpdates -> ShowS
Prelude.Show, forall x. Rep ClusterPendingUpdates x -> ClusterPendingUpdates
forall x. ClusterPendingUpdates -> Rep ClusterPendingUpdates x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ClusterPendingUpdates x -> ClusterPendingUpdates
$cfrom :: forall x. ClusterPendingUpdates -> Rep ClusterPendingUpdates x
Prelude.Generic)
newClusterPendingUpdates ::
ClusterPendingUpdates
newClusterPendingUpdates :: ClusterPendingUpdates
newClusterPendingUpdates =
ClusterPendingUpdates'
{ $sel:aCLs:ClusterPendingUpdates' :: Maybe ACLsUpdateStatus
aCLs = forall a. Maybe a
Prelude.Nothing,
$sel:resharding:ClusterPendingUpdates' :: Maybe ReshardingStatus
resharding = forall a. Maybe a
Prelude.Nothing,
$sel:serviceUpdates:ClusterPendingUpdates' :: Maybe [PendingModifiedServiceUpdate]
serviceUpdates = forall a. Maybe a
Prelude.Nothing
}
clusterPendingUpdates_aCLs :: Lens.Lens' ClusterPendingUpdates (Prelude.Maybe ACLsUpdateStatus)
clusterPendingUpdates_aCLs :: Lens' ClusterPendingUpdates (Maybe ACLsUpdateStatus)
clusterPendingUpdates_aCLs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterPendingUpdates' {Maybe ACLsUpdateStatus
aCLs :: Maybe ACLsUpdateStatus
$sel:aCLs:ClusterPendingUpdates' :: ClusterPendingUpdates -> Maybe ACLsUpdateStatus
aCLs} -> Maybe ACLsUpdateStatus
aCLs) (\s :: ClusterPendingUpdates
s@ClusterPendingUpdates' {} Maybe ACLsUpdateStatus
a -> ClusterPendingUpdates
s {$sel:aCLs:ClusterPendingUpdates' :: Maybe ACLsUpdateStatus
aCLs = Maybe ACLsUpdateStatus
a} :: ClusterPendingUpdates)
clusterPendingUpdates_resharding :: Lens.Lens' ClusterPendingUpdates (Prelude.Maybe ReshardingStatus)
clusterPendingUpdates_resharding :: Lens' ClusterPendingUpdates (Maybe ReshardingStatus)
clusterPendingUpdates_resharding = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterPendingUpdates' {Maybe ReshardingStatus
resharding :: Maybe ReshardingStatus
$sel:resharding:ClusterPendingUpdates' :: ClusterPendingUpdates -> Maybe ReshardingStatus
resharding} -> Maybe ReshardingStatus
resharding) (\s :: ClusterPendingUpdates
s@ClusterPendingUpdates' {} Maybe ReshardingStatus
a -> ClusterPendingUpdates
s {$sel:resharding:ClusterPendingUpdates' :: Maybe ReshardingStatus
resharding = Maybe ReshardingStatus
a} :: ClusterPendingUpdates)
clusterPendingUpdates_serviceUpdates :: Lens.Lens' ClusterPendingUpdates (Prelude.Maybe [PendingModifiedServiceUpdate])
clusterPendingUpdates_serviceUpdates :: Lens' ClusterPendingUpdates (Maybe [PendingModifiedServiceUpdate])
clusterPendingUpdates_serviceUpdates = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterPendingUpdates' {Maybe [PendingModifiedServiceUpdate]
serviceUpdates :: Maybe [PendingModifiedServiceUpdate]
$sel:serviceUpdates:ClusterPendingUpdates' :: ClusterPendingUpdates -> Maybe [PendingModifiedServiceUpdate]
serviceUpdates} -> Maybe [PendingModifiedServiceUpdate]
serviceUpdates) (\s :: ClusterPendingUpdates
s@ClusterPendingUpdates' {} Maybe [PendingModifiedServiceUpdate]
a -> ClusterPendingUpdates
s {$sel:serviceUpdates:ClusterPendingUpdates' :: Maybe [PendingModifiedServiceUpdate]
serviceUpdates = Maybe [PendingModifiedServiceUpdate]
a} :: ClusterPendingUpdates) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON ClusterPendingUpdates where
parseJSON :: Value -> Parser ClusterPendingUpdates
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ClusterPendingUpdates"
( \Object
x ->
Maybe ACLsUpdateStatus
-> Maybe ReshardingStatus
-> Maybe [PendingModifiedServiceUpdate]
-> ClusterPendingUpdates
ClusterPendingUpdates'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ACLs")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Resharding")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ServiceUpdates"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable ClusterPendingUpdates where
hashWithSalt :: Int -> ClusterPendingUpdates -> Int
hashWithSalt Int
_salt ClusterPendingUpdates' {Maybe [PendingModifiedServiceUpdate]
Maybe ACLsUpdateStatus
Maybe ReshardingStatus
serviceUpdates :: Maybe [PendingModifiedServiceUpdate]
resharding :: Maybe ReshardingStatus
aCLs :: Maybe ACLsUpdateStatus
$sel:serviceUpdates:ClusterPendingUpdates' :: ClusterPendingUpdates -> Maybe [PendingModifiedServiceUpdate]
$sel:resharding:ClusterPendingUpdates' :: ClusterPendingUpdates -> Maybe ReshardingStatus
$sel:aCLs:ClusterPendingUpdates' :: ClusterPendingUpdates -> Maybe ACLsUpdateStatus
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ACLsUpdateStatus
aCLs
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ReshardingStatus
resharding
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [PendingModifiedServiceUpdate]
serviceUpdates
instance Prelude.NFData ClusterPendingUpdates where
rnf :: ClusterPendingUpdates -> ()
rnf ClusterPendingUpdates' {Maybe [PendingModifiedServiceUpdate]
Maybe ACLsUpdateStatus
Maybe ReshardingStatus
serviceUpdates :: Maybe [PendingModifiedServiceUpdate]
resharding :: Maybe ReshardingStatus
aCLs :: Maybe ACLsUpdateStatus
$sel:serviceUpdates:ClusterPendingUpdates' :: ClusterPendingUpdates -> Maybe [PendingModifiedServiceUpdate]
$sel:resharding:ClusterPendingUpdates' :: ClusterPendingUpdates -> Maybe ReshardingStatus
$sel:aCLs:ClusterPendingUpdates' :: ClusterPendingUpdates -> Maybe ACLsUpdateStatus
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ACLsUpdateStatus
aCLs
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ReshardingStatus
resharding
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [PendingModifiedServiceUpdate]
serviceUpdates