{-# 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.MacieV2.Types.ReplicationDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data ReplicationDetails = ReplicationDetails'
{
ReplicationDetails -> Maybe Bool
replicated :: Prelude.Maybe Prelude.Bool,
ReplicationDetails -> Maybe Bool
replicatedExternally :: Prelude.Maybe Prelude.Bool,
ReplicationDetails -> Maybe [Text]
replicationAccounts :: Prelude.Maybe [Prelude.Text]
}
deriving (ReplicationDetails -> ReplicationDetails -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReplicationDetails -> ReplicationDetails -> Bool
$c/= :: ReplicationDetails -> ReplicationDetails -> Bool
== :: ReplicationDetails -> ReplicationDetails -> Bool
$c== :: ReplicationDetails -> ReplicationDetails -> Bool
Prelude.Eq, ReadPrec [ReplicationDetails]
ReadPrec ReplicationDetails
Int -> ReadS ReplicationDetails
ReadS [ReplicationDetails]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReplicationDetails]
$creadListPrec :: ReadPrec [ReplicationDetails]
readPrec :: ReadPrec ReplicationDetails
$creadPrec :: ReadPrec ReplicationDetails
readList :: ReadS [ReplicationDetails]
$creadList :: ReadS [ReplicationDetails]
readsPrec :: Int -> ReadS ReplicationDetails
$creadsPrec :: Int -> ReadS ReplicationDetails
Prelude.Read, Int -> ReplicationDetails -> ShowS
[ReplicationDetails] -> ShowS
ReplicationDetails -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReplicationDetails] -> ShowS
$cshowList :: [ReplicationDetails] -> ShowS
show :: ReplicationDetails -> String
$cshow :: ReplicationDetails -> String
showsPrec :: Int -> ReplicationDetails -> ShowS
$cshowsPrec :: Int -> ReplicationDetails -> ShowS
Prelude.Show, forall x. Rep ReplicationDetails x -> ReplicationDetails
forall x. ReplicationDetails -> Rep ReplicationDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ReplicationDetails x -> ReplicationDetails
$cfrom :: forall x. ReplicationDetails -> Rep ReplicationDetails x
Prelude.Generic)
newReplicationDetails ::
ReplicationDetails
newReplicationDetails :: ReplicationDetails
newReplicationDetails =
ReplicationDetails'
{ $sel:replicated:ReplicationDetails' :: Maybe Bool
replicated = forall a. Maybe a
Prelude.Nothing,
$sel:replicatedExternally:ReplicationDetails' :: Maybe Bool
replicatedExternally = forall a. Maybe a
Prelude.Nothing,
$sel:replicationAccounts:ReplicationDetails' :: Maybe [Text]
replicationAccounts = forall a. Maybe a
Prelude.Nothing
}
replicationDetails_replicated :: Lens.Lens' ReplicationDetails (Prelude.Maybe Prelude.Bool)
replicationDetails_replicated :: Lens' ReplicationDetails (Maybe Bool)
replicationDetails_replicated = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationDetails' {Maybe Bool
replicated :: Maybe Bool
$sel:replicated:ReplicationDetails' :: ReplicationDetails -> Maybe Bool
replicated} -> Maybe Bool
replicated) (\s :: ReplicationDetails
s@ReplicationDetails' {} Maybe Bool
a -> ReplicationDetails
s {$sel:replicated:ReplicationDetails' :: Maybe Bool
replicated = Maybe Bool
a} :: ReplicationDetails)
replicationDetails_replicatedExternally :: Lens.Lens' ReplicationDetails (Prelude.Maybe Prelude.Bool)
replicationDetails_replicatedExternally :: Lens' ReplicationDetails (Maybe Bool)
replicationDetails_replicatedExternally = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationDetails' {Maybe Bool
replicatedExternally :: Maybe Bool
$sel:replicatedExternally:ReplicationDetails' :: ReplicationDetails -> Maybe Bool
replicatedExternally} -> Maybe Bool
replicatedExternally) (\s :: ReplicationDetails
s@ReplicationDetails' {} Maybe Bool
a -> ReplicationDetails
s {$sel:replicatedExternally:ReplicationDetails' :: Maybe Bool
replicatedExternally = Maybe Bool
a} :: ReplicationDetails)
replicationDetails_replicationAccounts :: Lens.Lens' ReplicationDetails (Prelude.Maybe [Prelude.Text])
replicationDetails_replicationAccounts :: Lens' ReplicationDetails (Maybe [Text])
replicationDetails_replicationAccounts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationDetails' {Maybe [Text]
replicationAccounts :: Maybe [Text]
$sel:replicationAccounts:ReplicationDetails' :: ReplicationDetails -> Maybe [Text]
replicationAccounts} -> Maybe [Text]
replicationAccounts) (\s :: ReplicationDetails
s@ReplicationDetails' {} Maybe [Text]
a -> ReplicationDetails
s {$sel:replicationAccounts:ReplicationDetails' :: Maybe [Text]
replicationAccounts = Maybe [Text]
a} :: ReplicationDetails) 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 ReplicationDetails where
parseJSON :: Value -> Parser ReplicationDetails
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ReplicationDetails"
( \Object
x ->
Maybe Bool -> Maybe Bool -> Maybe [Text] -> ReplicationDetails
ReplicationDetails'
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
"replicated")
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
"replicatedExternally")
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
"replicationAccounts"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable ReplicationDetails where
hashWithSalt :: Int -> ReplicationDetails -> Int
hashWithSalt Int
_salt ReplicationDetails' {Maybe Bool
Maybe [Text]
replicationAccounts :: Maybe [Text]
replicatedExternally :: Maybe Bool
replicated :: Maybe Bool
$sel:replicationAccounts:ReplicationDetails' :: ReplicationDetails -> Maybe [Text]
$sel:replicatedExternally:ReplicationDetails' :: ReplicationDetails -> Maybe Bool
$sel:replicated:ReplicationDetails' :: ReplicationDetails -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
replicated
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
replicatedExternally
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
replicationAccounts
instance Prelude.NFData ReplicationDetails where
rnf :: ReplicationDetails -> ()
rnf ReplicationDetails' {Maybe Bool
Maybe [Text]
replicationAccounts :: Maybe [Text]
replicatedExternally :: Maybe Bool
replicated :: Maybe Bool
$sel:replicationAccounts:ReplicationDetails' :: ReplicationDetails -> Maybe [Text]
$sel:replicatedExternally:ReplicationDetails' :: ReplicationDetails -> Maybe Bool
$sel:replicated:ReplicationDetails' :: ReplicationDetails -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
replicated
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
replicatedExternally
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
replicationAccounts