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