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