{-# 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.MGN.Types.DataReplicationInitiationStep where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MGN.Types.DataReplicationInitiationStepName
import Amazonka.MGN.Types.DataReplicationInitiationStepStatus
import qualified Amazonka.Prelude as Prelude
data DataReplicationInitiationStep = DataReplicationInitiationStep'
{
DataReplicationInitiationStep
-> Maybe DataReplicationInitiationStepStatus
status :: Prelude.Maybe DataReplicationInitiationStepStatus,
DataReplicationInitiationStep
-> Maybe DataReplicationInitiationStepName
name :: Prelude.Maybe DataReplicationInitiationStepName
}
deriving (DataReplicationInitiationStep
-> DataReplicationInitiationStep -> Bool
(DataReplicationInitiationStep
-> DataReplicationInitiationStep -> Bool)
-> (DataReplicationInitiationStep
-> DataReplicationInitiationStep -> Bool)
-> Eq DataReplicationInitiationStep
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DataReplicationInitiationStep
-> DataReplicationInitiationStep -> Bool
$c/= :: DataReplicationInitiationStep
-> DataReplicationInitiationStep -> Bool
== :: DataReplicationInitiationStep
-> DataReplicationInitiationStep -> Bool
$c== :: DataReplicationInitiationStep
-> DataReplicationInitiationStep -> Bool
Prelude.Eq, ReadPrec [DataReplicationInitiationStep]
ReadPrec DataReplicationInitiationStep
Int -> ReadS DataReplicationInitiationStep
ReadS [DataReplicationInitiationStep]
(Int -> ReadS DataReplicationInitiationStep)
-> ReadS [DataReplicationInitiationStep]
-> ReadPrec DataReplicationInitiationStep
-> ReadPrec [DataReplicationInitiationStep]
-> Read DataReplicationInitiationStep
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DataReplicationInitiationStep]
$creadListPrec :: ReadPrec [DataReplicationInitiationStep]
readPrec :: ReadPrec DataReplicationInitiationStep
$creadPrec :: ReadPrec DataReplicationInitiationStep
readList :: ReadS [DataReplicationInitiationStep]
$creadList :: ReadS [DataReplicationInitiationStep]
readsPrec :: Int -> ReadS DataReplicationInitiationStep
$creadsPrec :: Int -> ReadS DataReplicationInitiationStep
Prelude.Read, Int -> DataReplicationInitiationStep -> ShowS
[DataReplicationInitiationStep] -> ShowS
DataReplicationInitiationStep -> String
(Int -> DataReplicationInitiationStep -> ShowS)
-> (DataReplicationInitiationStep -> String)
-> ([DataReplicationInitiationStep] -> ShowS)
-> Show DataReplicationInitiationStep
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DataReplicationInitiationStep] -> ShowS
$cshowList :: [DataReplicationInitiationStep] -> ShowS
show :: DataReplicationInitiationStep -> String
$cshow :: DataReplicationInitiationStep -> String
showsPrec :: Int -> DataReplicationInitiationStep -> ShowS
$cshowsPrec :: Int -> DataReplicationInitiationStep -> ShowS
Prelude.Show, (forall x.
DataReplicationInitiationStep
-> Rep DataReplicationInitiationStep x)
-> (forall x.
Rep DataReplicationInitiationStep x
-> DataReplicationInitiationStep)
-> Generic DataReplicationInitiationStep
forall x.
Rep DataReplicationInitiationStep x
-> DataReplicationInitiationStep
forall x.
DataReplicationInitiationStep
-> Rep DataReplicationInitiationStep x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DataReplicationInitiationStep x
-> DataReplicationInitiationStep
$cfrom :: forall x.
DataReplicationInitiationStep
-> Rep DataReplicationInitiationStep x
Prelude.Generic)
newDataReplicationInitiationStep ::
DataReplicationInitiationStep
newDataReplicationInitiationStep :: DataReplicationInitiationStep
newDataReplicationInitiationStep =
DataReplicationInitiationStep' :: Maybe DataReplicationInitiationStepStatus
-> Maybe DataReplicationInitiationStepName
-> DataReplicationInitiationStep
DataReplicationInitiationStep'
{ $sel:status:DataReplicationInitiationStep' :: Maybe DataReplicationInitiationStepStatus
status =
Maybe DataReplicationInitiationStepStatus
forall a. Maybe a
Prelude.Nothing,
$sel:name:DataReplicationInitiationStep' :: Maybe DataReplicationInitiationStepName
name = Maybe DataReplicationInitiationStepName
forall a. Maybe a
Prelude.Nothing
}
dataReplicationInitiationStep_status :: Lens.Lens' DataReplicationInitiationStep (Prelude.Maybe DataReplicationInitiationStepStatus)
dataReplicationInitiationStep_status :: (Maybe DataReplicationInitiationStepStatus
-> f (Maybe DataReplicationInitiationStepStatus))
-> DataReplicationInitiationStep -> f DataReplicationInitiationStep
dataReplicationInitiationStep_status = (DataReplicationInitiationStep
-> Maybe DataReplicationInitiationStepStatus)
-> (DataReplicationInitiationStep
-> Maybe DataReplicationInitiationStepStatus
-> DataReplicationInitiationStep)
-> Lens
DataReplicationInitiationStep
DataReplicationInitiationStep
(Maybe DataReplicationInitiationStepStatus)
(Maybe DataReplicationInitiationStepStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataReplicationInitiationStep' {Maybe DataReplicationInitiationStepStatus
status :: Maybe DataReplicationInitiationStepStatus
$sel:status:DataReplicationInitiationStep' :: DataReplicationInitiationStep
-> Maybe DataReplicationInitiationStepStatus
status} -> Maybe DataReplicationInitiationStepStatus
status) (\s :: DataReplicationInitiationStep
s@DataReplicationInitiationStep' {} Maybe DataReplicationInitiationStepStatus
a -> DataReplicationInitiationStep
s {$sel:status:DataReplicationInitiationStep' :: Maybe DataReplicationInitiationStepStatus
status = Maybe DataReplicationInitiationStepStatus
a} :: DataReplicationInitiationStep)
dataReplicationInitiationStep_name :: Lens.Lens' DataReplicationInitiationStep (Prelude.Maybe DataReplicationInitiationStepName)
dataReplicationInitiationStep_name :: (Maybe DataReplicationInitiationStepName
-> f (Maybe DataReplicationInitiationStepName))
-> DataReplicationInitiationStep -> f DataReplicationInitiationStep
dataReplicationInitiationStep_name = (DataReplicationInitiationStep
-> Maybe DataReplicationInitiationStepName)
-> (DataReplicationInitiationStep
-> Maybe DataReplicationInitiationStepName
-> DataReplicationInitiationStep)
-> Lens
DataReplicationInitiationStep
DataReplicationInitiationStep
(Maybe DataReplicationInitiationStepName)
(Maybe DataReplicationInitiationStepName)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataReplicationInitiationStep' {Maybe DataReplicationInitiationStepName
name :: Maybe DataReplicationInitiationStepName
$sel:name:DataReplicationInitiationStep' :: DataReplicationInitiationStep
-> Maybe DataReplicationInitiationStepName
name} -> Maybe DataReplicationInitiationStepName
name) (\s :: DataReplicationInitiationStep
s@DataReplicationInitiationStep' {} Maybe DataReplicationInitiationStepName
a -> DataReplicationInitiationStep
s {$sel:name:DataReplicationInitiationStep' :: Maybe DataReplicationInitiationStepName
name = Maybe DataReplicationInitiationStepName
a} :: DataReplicationInitiationStep)
instance Core.FromJSON DataReplicationInitiationStep where
parseJSON :: Value -> Parser DataReplicationInitiationStep
parseJSON =
String
-> (Object -> Parser DataReplicationInitiationStep)
-> Value
-> Parser DataReplicationInitiationStep
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DataReplicationInitiationStep"
( \Object
x ->
Maybe DataReplicationInitiationStepStatus
-> Maybe DataReplicationInitiationStepName
-> DataReplicationInitiationStep
DataReplicationInitiationStep'
(Maybe DataReplicationInitiationStepStatus
-> Maybe DataReplicationInitiationStepName
-> DataReplicationInitiationStep)
-> Parser (Maybe DataReplicationInitiationStepStatus)
-> Parser
(Maybe DataReplicationInitiationStepName
-> DataReplicationInitiationStep)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text -> Parser (Maybe DataReplicationInitiationStepStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
Parser
(Maybe DataReplicationInitiationStepName
-> DataReplicationInitiationStep)
-> Parser (Maybe DataReplicationInitiationStepName)
-> Parser DataReplicationInitiationStep
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DataReplicationInitiationStepName)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"name")
)
instance
Prelude.Hashable
DataReplicationInitiationStep
instance Prelude.NFData DataReplicationInitiationStep