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