{-# 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.SecretsManager.Types.ReplicationStatusType where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SecretsManager.Types.StatusType
data ReplicationStatusType = ReplicationStatusType'
{
ReplicationStatusType -> Maybe StatusType
status :: Prelude.Maybe StatusType,
ReplicationStatusType -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
ReplicationStatusType -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
ReplicationStatusType -> Maybe Text
region :: Prelude.Maybe Prelude.Text,
ReplicationStatusType -> Maybe POSIX
lastAccessedDate :: Prelude.Maybe Core.POSIX
}
deriving (ReplicationStatusType -> ReplicationStatusType -> Bool
(ReplicationStatusType -> ReplicationStatusType -> Bool)
-> (ReplicationStatusType -> ReplicationStatusType -> Bool)
-> Eq ReplicationStatusType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReplicationStatusType -> ReplicationStatusType -> Bool
$c/= :: ReplicationStatusType -> ReplicationStatusType -> Bool
== :: ReplicationStatusType -> ReplicationStatusType -> Bool
$c== :: ReplicationStatusType -> ReplicationStatusType -> Bool
Prelude.Eq, ReadPrec [ReplicationStatusType]
ReadPrec ReplicationStatusType
Int -> ReadS ReplicationStatusType
ReadS [ReplicationStatusType]
(Int -> ReadS ReplicationStatusType)
-> ReadS [ReplicationStatusType]
-> ReadPrec ReplicationStatusType
-> ReadPrec [ReplicationStatusType]
-> Read ReplicationStatusType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReplicationStatusType]
$creadListPrec :: ReadPrec [ReplicationStatusType]
readPrec :: ReadPrec ReplicationStatusType
$creadPrec :: ReadPrec ReplicationStatusType
readList :: ReadS [ReplicationStatusType]
$creadList :: ReadS [ReplicationStatusType]
readsPrec :: Int -> ReadS ReplicationStatusType
$creadsPrec :: Int -> ReadS ReplicationStatusType
Prelude.Read, Int -> ReplicationStatusType -> ShowS
[ReplicationStatusType] -> ShowS
ReplicationStatusType -> String
(Int -> ReplicationStatusType -> ShowS)
-> (ReplicationStatusType -> String)
-> ([ReplicationStatusType] -> ShowS)
-> Show ReplicationStatusType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReplicationStatusType] -> ShowS
$cshowList :: [ReplicationStatusType] -> ShowS
show :: ReplicationStatusType -> String
$cshow :: ReplicationStatusType -> String
showsPrec :: Int -> ReplicationStatusType -> ShowS
$cshowsPrec :: Int -> ReplicationStatusType -> ShowS
Prelude.Show, (forall x. ReplicationStatusType -> Rep ReplicationStatusType x)
-> (forall x. Rep ReplicationStatusType x -> ReplicationStatusType)
-> Generic ReplicationStatusType
forall x. Rep ReplicationStatusType x -> ReplicationStatusType
forall x. ReplicationStatusType -> Rep ReplicationStatusType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ReplicationStatusType x -> ReplicationStatusType
$cfrom :: forall x. ReplicationStatusType -> Rep ReplicationStatusType x
Prelude.Generic)
newReplicationStatusType ::
ReplicationStatusType
newReplicationStatusType :: ReplicationStatusType
newReplicationStatusType =
ReplicationStatusType' :: Maybe StatusType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> ReplicationStatusType
ReplicationStatusType'
{ $sel:status:ReplicationStatusType' :: Maybe StatusType
status = Maybe StatusType
forall a. Maybe a
Prelude.Nothing,
$sel:kmsKeyId:ReplicationStatusType' :: Maybe Text
kmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:statusMessage:ReplicationStatusType' :: Maybe Text
statusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:region:ReplicationStatusType' :: Maybe Text
region = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastAccessedDate:ReplicationStatusType' :: Maybe POSIX
lastAccessedDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
replicationStatusType_status :: Lens.Lens' ReplicationStatusType (Prelude.Maybe StatusType)
replicationStatusType_status :: (Maybe StatusType -> f (Maybe StatusType))
-> ReplicationStatusType -> f ReplicationStatusType
replicationStatusType_status = (ReplicationStatusType -> Maybe StatusType)
-> (ReplicationStatusType
-> Maybe StatusType -> ReplicationStatusType)
-> Lens
ReplicationStatusType
ReplicationStatusType
(Maybe StatusType)
(Maybe StatusType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationStatusType' {Maybe StatusType
status :: Maybe StatusType
$sel:status:ReplicationStatusType' :: ReplicationStatusType -> Maybe StatusType
status} -> Maybe StatusType
status) (\s :: ReplicationStatusType
s@ReplicationStatusType' {} Maybe StatusType
a -> ReplicationStatusType
s {$sel:status:ReplicationStatusType' :: Maybe StatusType
status = Maybe StatusType
a} :: ReplicationStatusType)
replicationStatusType_kmsKeyId :: Lens.Lens' ReplicationStatusType (Prelude.Maybe Prelude.Text)
replicationStatusType_kmsKeyId :: (Maybe Text -> f (Maybe Text))
-> ReplicationStatusType -> f ReplicationStatusType
replicationStatusType_kmsKeyId = (ReplicationStatusType -> Maybe Text)
-> (ReplicationStatusType -> Maybe Text -> ReplicationStatusType)
-> Lens
ReplicationStatusType
ReplicationStatusType
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationStatusType' {Maybe Text
kmsKeyId :: Maybe Text
$sel:kmsKeyId:ReplicationStatusType' :: ReplicationStatusType -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: ReplicationStatusType
s@ReplicationStatusType' {} Maybe Text
a -> ReplicationStatusType
s {$sel:kmsKeyId:ReplicationStatusType' :: Maybe Text
kmsKeyId = Maybe Text
a} :: ReplicationStatusType)
replicationStatusType_statusMessage :: Lens.Lens' ReplicationStatusType (Prelude.Maybe Prelude.Text)
replicationStatusType_statusMessage :: (Maybe Text -> f (Maybe Text))
-> ReplicationStatusType -> f ReplicationStatusType
replicationStatusType_statusMessage = (ReplicationStatusType -> Maybe Text)
-> (ReplicationStatusType -> Maybe Text -> ReplicationStatusType)
-> Lens
ReplicationStatusType
ReplicationStatusType
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationStatusType' {Maybe Text
statusMessage :: Maybe Text
$sel:statusMessage:ReplicationStatusType' :: ReplicationStatusType -> Maybe Text
statusMessage} -> Maybe Text
statusMessage) (\s :: ReplicationStatusType
s@ReplicationStatusType' {} Maybe Text
a -> ReplicationStatusType
s {$sel:statusMessage:ReplicationStatusType' :: Maybe Text
statusMessage = Maybe Text
a} :: ReplicationStatusType)
replicationStatusType_region :: Lens.Lens' ReplicationStatusType (Prelude.Maybe Prelude.Text)
replicationStatusType_region :: (Maybe Text -> f (Maybe Text))
-> ReplicationStatusType -> f ReplicationStatusType
replicationStatusType_region = (ReplicationStatusType -> Maybe Text)
-> (ReplicationStatusType -> Maybe Text -> ReplicationStatusType)
-> Lens
ReplicationStatusType
ReplicationStatusType
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationStatusType' {Maybe Text
region :: Maybe Text
$sel:region:ReplicationStatusType' :: ReplicationStatusType -> Maybe Text
region} -> Maybe Text
region) (\s :: ReplicationStatusType
s@ReplicationStatusType' {} Maybe Text
a -> ReplicationStatusType
s {$sel:region:ReplicationStatusType' :: Maybe Text
region = Maybe Text
a} :: ReplicationStatusType)
replicationStatusType_lastAccessedDate :: Lens.Lens' ReplicationStatusType (Prelude.Maybe Prelude.UTCTime)
replicationStatusType_lastAccessedDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ReplicationStatusType -> f ReplicationStatusType
replicationStatusType_lastAccessedDate = (ReplicationStatusType -> Maybe POSIX)
-> (ReplicationStatusType -> Maybe POSIX -> ReplicationStatusType)
-> Lens
ReplicationStatusType
ReplicationStatusType
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationStatusType' {Maybe POSIX
lastAccessedDate :: Maybe POSIX
$sel:lastAccessedDate:ReplicationStatusType' :: ReplicationStatusType -> Maybe POSIX
lastAccessedDate} -> Maybe POSIX
lastAccessedDate) (\s :: ReplicationStatusType
s@ReplicationStatusType' {} Maybe POSIX
a -> ReplicationStatusType
s {$sel:lastAccessedDate:ReplicationStatusType' :: Maybe POSIX
lastAccessedDate = Maybe POSIX
a} :: ReplicationStatusType) ((Maybe POSIX -> f (Maybe POSIX))
-> ReplicationStatusType -> f ReplicationStatusType)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ReplicationStatusType
-> f ReplicationStatusType
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instance Core.FromJSON ReplicationStatusType where
parseJSON :: Value -> Parser ReplicationStatusType
parseJSON =
String
-> (Object -> Parser ReplicationStatusType)
-> Value
-> Parser ReplicationStatusType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ReplicationStatusType"
( \Object
x ->
Maybe StatusType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> ReplicationStatusType
ReplicationStatusType'
(Maybe StatusType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> ReplicationStatusType)
-> Parser (Maybe StatusType)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> ReplicationStatusType)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe StatusType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> ReplicationStatusType)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe POSIX -> ReplicationStatusType)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"KmsKeyId")
Parser
(Maybe Text -> Maybe Text -> Maybe POSIX -> ReplicationStatusType)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe POSIX -> ReplicationStatusType)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StatusMessage")
Parser (Maybe Text -> Maybe POSIX -> ReplicationStatusType)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> ReplicationStatusType)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Region")
Parser (Maybe POSIX -> ReplicationStatusType)
-> Parser (Maybe POSIX) -> Parser ReplicationStatusType
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastAccessedDate")
)
instance Prelude.Hashable ReplicationStatusType
instance Prelude.NFData ReplicationStatusType