{-# 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.ChangeServerLifeCycleStateSourceServerLifecycle where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MGN.Types.ChangeServerLifeCycleStateSourceServerLifecycleState
import qualified Amazonka.Prelude as Prelude
data ChangeServerLifeCycleStateSourceServerLifecycle = ChangeServerLifeCycleStateSourceServerLifecycle'
{
ChangeServerLifeCycleStateSourceServerLifecycle
-> ChangeServerLifeCycleStateSourceServerLifecycleState
state :: ChangeServerLifeCycleStateSourceServerLifecycleState
}
deriving (ChangeServerLifeCycleStateSourceServerLifecycle
-> ChangeServerLifeCycleStateSourceServerLifecycle -> Bool
(ChangeServerLifeCycleStateSourceServerLifecycle
-> ChangeServerLifeCycleStateSourceServerLifecycle -> Bool)
-> (ChangeServerLifeCycleStateSourceServerLifecycle
-> ChangeServerLifeCycleStateSourceServerLifecycle -> Bool)
-> Eq ChangeServerLifeCycleStateSourceServerLifecycle
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ChangeServerLifeCycleStateSourceServerLifecycle
-> ChangeServerLifeCycleStateSourceServerLifecycle -> Bool
$c/= :: ChangeServerLifeCycleStateSourceServerLifecycle
-> ChangeServerLifeCycleStateSourceServerLifecycle -> Bool
== :: ChangeServerLifeCycleStateSourceServerLifecycle
-> ChangeServerLifeCycleStateSourceServerLifecycle -> Bool
$c== :: ChangeServerLifeCycleStateSourceServerLifecycle
-> ChangeServerLifeCycleStateSourceServerLifecycle -> Bool
Prelude.Eq, ReadPrec [ChangeServerLifeCycleStateSourceServerLifecycle]
ReadPrec ChangeServerLifeCycleStateSourceServerLifecycle
Int -> ReadS ChangeServerLifeCycleStateSourceServerLifecycle
ReadS [ChangeServerLifeCycleStateSourceServerLifecycle]
(Int -> ReadS ChangeServerLifeCycleStateSourceServerLifecycle)
-> ReadS [ChangeServerLifeCycleStateSourceServerLifecycle]
-> ReadPrec ChangeServerLifeCycleStateSourceServerLifecycle
-> ReadPrec [ChangeServerLifeCycleStateSourceServerLifecycle]
-> Read ChangeServerLifeCycleStateSourceServerLifecycle
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ChangeServerLifeCycleStateSourceServerLifecycle]
$creadListPrec :: ReadPrec [ChangeServerLifeCycleStateSourceServerLifecycle]
readPrec :: ReadPrec ChangeServerLifeCycleStateSourceServerLifecycle
$creadPrec :: ReadPrec ChangeServerLifeCycleStateSourceServerLifecycle
readList :: ReadS [ChangeServerLifeCycleStateSourceServerLifecycle]
$creadList :: ReadS [ChangeServerLifeCycleStateSourceServerLifecycle]
readsPrec :: Int -> ReadS ChangeServerLifeCycleStateSourceServerLifecycle
$creadsPrec :: Int -> ReadS ChangeServerLifeCycleStateSourceServerLifecycle
Prelude.Read, Int -> ChangeServerLifeCycleStateSourceServerLifecycle -> ShowS
[ChangeServerLifeCycleStateSourceServerLifecycle] -> ShowS
ChangeServerLifeCycleStateSourceServerLifecycle -> String
(Int -> ChangeServerLifeCycleStateSourceServerLifecycle -> ShowS)
-> (ChangeServerLifeCycleStateSourceServerLifecycle -> String)
-> ([ChangeServerLifeCycleStateSourceServerLifecycle] -> ShowS)
-> Show ChangeServerLifeCycleStateSourceServerLifecycle
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ChangeServerLifeCycleStateSourceServerLifecycle] -> ShowS
$cshowList :: [ChangeServerLifeCycleStateSourceServerLifecycle] -> ShowS
show :: ChangeServerLifeCycleStateSourceServerLifecycle -> String
$cshow :: ChangeServerLifeCycleStateSourceServerLifecycle -> String
showsPrec :: Int -> ChangeServerLifeCycleStateSourceServerLifecycle -> ShowS
$cshowsPrec :: Int -> ChangeServerLifeCycleStateSourceServerLifecycle -> ShowS
Prelude.Show, (forall x.
ChangeServerLifeCycleStateSourceServerLifecycle
-> Rep ChangeServerLifeCycleStateSourceServerLifecycle x)
-> (forall x.
Rep ChangeServerLifeCycleStateSourceServerLifecycle x
-> ChangeServerLifeCycleStateSourceServerLifecycle)
-> Generic ChangeServerLifeCycleStateSourceServerLifecycle
forall x.
Rep ChangeServerLifeCycleStateSourceServerLifecycle x
-> ChangeServerLifeCycleStateSourceServerLifecycle
forall x.
ChangeServerLifeCycleStateSourceServerLifecycle
-> Rep ChangeServerLifeCycleStateSourceServerLifecycle x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ChangeServerLifeCycleStateSourceServerLifecycle x
-> ChangeServerLifeCycleStateSourceServerLifecycle
$cfrom :: forall x.
ChangeServerLifeCycleStateSourceServerLifecycle
-> Rep ChangeServerLifeCycleStateSourceServerLifecycle x
Prelude.Generic)
newChangeServerLifeCycleStateSourceServerLifecycle ::
ChangeServerLifeCycleStateSourceServerLifecycleState ->
ChangeServerLifeCycleStateSourceServerLifecycle
newChangeServerLifeCycleStateSourceServerLifecycle :: ChangeServerLifeCycleStateSourceServerLifecycleState
-> ChangeServerLifeCycleStateSourceServerLifecycle
newChangeServerLifeCycleStateSourceServerLifecycle
ChangeServerLifeCycleStateSourceServerLifecycleState
pState_ =
ChangeServerLifeCycleStateSourceServerLifecycle' :: ChangeServerLifeCycleStateSourceServerLifecycleState
-> ChangeServerLifeCycleStateSourceServerLifecycle
ChangeServerLifeCycleStateSourceServerLifecycle'
{ $sel:state:ChangeServerLifeCycleStateSourceServerLifecycle' :: ChangeServerLifeCycleStateSourceServerLifecycleState
state =
ChangeServerLifeCycleStateSourceServerLifecycleState
pState_
}
changeServerLifeCycleStateSourceServerLifecycle_state :: Lens.Lens' ChangeServerLifeCycleStateSourceServerLifecycle ChangeServerLifeCycleStateSourceServerLifecycleState
changeServerLifeCycleStateSourceServerLifecycle_state :: (ChangeServerLifeCycleStateSourceServerLifecycleState
-> f ChangeServerLifeCycleStateSourceServerLifecycleState)
-> ChangeServerLifeCycleStateSourceServerLifecycle
-> f ChangeServerLifeCycleStateSourceServerLifecycle
changeServerLifeCycleStateSourceServerLifecycle_state = (ChangeServerLifeCycleStateSourceServerLifecycle
-> ChangeServerLifeCycleStateSourceServerLifecycleState)
-> (ChangeServerLifeCycleStateSourceServerLifecycle
-> ChangeServerLifeCycleStateSourceServerLifecycleState
-> ChangeServerLifeCycleStateSourceServerLifecycle)
-> Lens
ChangeServerLifeCycleStateSourceServerLifecycle
ChangeServerLifeCycleStateSourceServerLifecycle
ChangeServerLifeCycleStateSourceServerLifecycleState
ChangeServerLifeCycleStateSourceServerLifecycleState
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChangeServerLifeCycleStateSourceServerLifecycle' {ChangeServerLifeCycleStateSourceServerLifecycleState
state :: ChangeServerLifeCycleStateSourceServerLifecycleState
$sel:state:ChangeServerLifeCycleStateSourceServerLifecycle' :: ChangeServerLifeCycleStateSourceServerLifecycle
-> ChangeServerLifeCycleStateSourceServerLifecycleState
state} -> ChangeServerLifeCycleStateSourceServerLifecycleState
state) (\s :: ChangeServerLifeCycleStateSourceServerLifecycle
s@ChangeServerLifeCycleStateSourceServerLifecycle' {} ChangeServerLifeCycleStateSourceServerLifecycleState
a -> ChangeServerLifeCycleStateSourceServerLifecycle
s {$sel:state:ChangeServerLifeCycleStateSourceServerLifecycle' :: ChangeServerLifeCycleStateSourceServerLifecycleState
state = ChangeServerLifeCycleStateSourceServerLifecycleState
a} :: ChangeServerLifeCycleStateSourceServerLifecycle)
instance
Prelude.Hashable
ChangeServerLifeCycleStateSourceServerLifecycle
instance
Prelude.NFData
ChangeServerLifeCycleStateSourceServerLifecycle
instance
Core.ToJSON
ChangeServerLifeCycleStateSourceServerLifecycle
where
toJSON :: ChangeServerLifeCycleStateSourceServerLifecycle -> Value
toJSON
ChangeServerLifeCycleStateSourceServerLifecycle' {ChangeServerLifeCycleStateSourceServerLifecycleState
state :: ChangeServerLifeCycleStateSourceServerLifecycleState
$sel:state:ChangeServerLifeCycleStateSourceServerLifecycle' :: ChangeServerLifeCycleStateSourceServerLifecycle
-> ChangeServerLifeCycleStateSourceServerLifecycleState
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"state" Text
-> ChangeServerLifeCycleStateSourceServerLifecycleState -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ChangeServerLifeCycleStateSourceServerLifecycleState
state)]
)