{-# 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.ApplicationAutoScaling.Types.SuspendedState where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data SuspendedState = SuspendedState'
{
SuspendedState -> Maybe Bool
dynamicScalingInSuspended :: Prelude.Maybe Prelude.Bool,
SuspendedState -> Maybe Bool
dynamicScalingOutSuspended :: Prelude.Maybe Prelude.Bool,
SuspendedState -> Maybe Bool
scheduledScalingSuspended :: Prelude.Maybe Prelude.Bool
}
deriving (SuspendedState -> SuspendedState -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SuspendedState -> SuspendedState -> Bool
$c/= :: SuspendedState -> SuspendedState -> Bool
== :: SuspendedState -> SuspendedState -> Bool
$c== :: SuspendedState -> SuspendedState -> Bool
Prelude.Eq, ReadPrec [SuspendedState]
ReadPrec SuspendedState
Int -> ReadS SuspendedState
ReadS [SuspendedState]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SuspendedState]
$creadListPrec :: ReadPrec [SuspendedState]
readPrec :: ReadPrec SuspendedState
$creadPrec :: ReadPrec SuspendedState
readList :: ReadS [SuspendedState]
$creadList :: ReadS [SuspendedState]
readsPrec :: Int -> ReadS SuspendedState
$creadsPrec :: Int -> ReadS SuspendedState
Prelude.Read, Int -> SuspendedState -> ShowS
[SuspendedState] -> ShowS
SuspendedState -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SuspendedState] -> ShowS
$cshowList :: [SuspendedState] -> ShowS
show :: SuspendedState -> String
$cshow :: SuspendedState -> String
showsPrec :: Int -> SuspendedState -> ShowS
$cshowsPrec :: Int -> SuspendedState -> ShowS
Prelude.Show, forall x. Rep SuspendedState x -> SuspendedState
forall x. SuspendedState -> Rep SuspendedState x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SuspendedState x -> SuspendedState
$cfrom :: forall x. SuspendedState -> Rep SuspendedState x
Prelude.Generic)
newSuspendedState ::
SuspendedState
newSuspendedState :: SuspendedState
newSuspendedState =
SuspendedState'
{ $sel:dynamicScalingInSuspended:SuspendedState' :: Maybe Bool
dynamicScalingInSuspended =
forall a. Maybe a
Prelude.Nothing,
$sel:dynamicScalingOutSuspended:SuspendedState' :: Maybe Bool
dynamicScalingOutSuspended = forall a. Maybe a
Prelude.Nothing,
$sel:scheduledScalingSuspended:SuspendedState' :: Maybe Bool
scheduledScalingSuspended = forall a. Maybe a
Prelude.Nothing
}
suspendedState_dynamicScalingInSuspended :: Lens.Lens' SuspendedState (Prelude.Maybe Prelude.Bool)
suspendedState_dynamicScalingInSuspended :: Lens' SuspendedState (Maybe Bool)
suspendedState_dynamicScalingInSuspended = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SuspendedState' {Maybe Bool
dynamicScalingInSuspended :: Maybe Bool
$sel:dynamicScalingInSuspended:SuspendedState' :: SuspendedState -> Maybe Bool
dynamicScalingInSuspended} -> Maybe Bool
dynamicScalingInSuspended) (\s :: SuspendedState
s@SuspendedState' {} Maybe Bool
a -> SuspendedState
s {$sel:dynamicScalingInSuspended:SuspendedState' :: Maybe Bool
dynamicScalingInSuspended = Maybe Bool
a} :: SuspendedState)
suspendedState_dynamicScalingOutSuspended :: Lens.Lens' SuspendedState (Prelude.Maybe Prelude.Bool)
suspendedState_dynamicScalingOutSuspended :: Lens' SuspendedState (Maybe Bool)
suspendedState_dynamicScalingOutSuspended = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SuspendedState' {Maybe Bool
dynamicScalingOutSuspended :: Maybe Bool
$sel:dynamicScalingOutSuspended:SuspendedState' :: SuspendedState -> Maybe Bool
dynamicScalingOutSuspended} -> Maybe Bool
dynamicScalingOutSuspended) (\s :: SuspendedState
s@SuspendedState' {} Maybe Bool
a -> SuspendedState
s {$sel:dynamicScalingOutSuspended:SuspendedState' :: Maybe Bool
dynamicScalingOutSuspended = Maybe Bool
a} :: SuspendedState)
suspendedState_scheduledScalingSuspended :: Lens.Lens' SuspendedState (Prelude.Maybe Prelude.Bool)
suspendedState_scheduledScalingSuspended :: Lens' SuspendedState (Maybe Bool)
suspendedState_scheduledScalingSuspended = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SuspendedState' {Maybe Bool
scheduledScalingSuspended :: Maybe Bool
$sel:scheduledScalingSuspended:SuspendedState' :: SuspendedState -> Maybe Bool
scheduledScalingSuspended} -> Maybe Bool
scheduledScalingSuspended) (\s :: SuspendedState
s@SuspendedState' {} Maybe Bool
a -> SuspendedState
s {$sel:scheduledScalingSuspended:SuspendedState' :: Maybe Bool
scheduledScalingSuspended = Maybe Bool
a} :: SuspendedState)
instance Data.FromJSON SuspendedState where
parseJSON :: Value -> Parser SuspendedState
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"SuspendedState"
( \Object
x ->
Maybe Bool -> Maybe Bool -> Maybe Bool -> SuspendedState
SuspendedState'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DynamicScalingInSuspended")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DynamicScalingOutSuspended")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ScheduledScalingSuspended")
)
instance Prelude.Hashable SuspendedState where
hashWithSalt :: Int -> SuspendedState -> Int
hashWithSalt Int
_salt SuspendedState' {Maybe Bool
scheduledScalingSuspended :: Maybe Bool
dynamicScalingOutSuspended :: Maybe Bool
dynamicScalingInSuspended :: Maybe Bool
$sel:scheduledScalingSuspended:SuspendedState' :: SuspendedState -> Maybe Bool
$sel:dynamicScalingOutSuspended:SuspendedState' :: SuspendedState -> Maybe Bool
$sel:dynamicScalingInSuspended:SuspendedState' :: SuspendedState -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dynamicScalingInSuspended
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dynamicScalingOutSuspended
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
scheduledScalingSuspended
instance Prelude.NFData SuspendedState where
rnf :: SuspendedState -> ()
rnf SuspendedState' {Maybe Bool
scheduledScalingSuspended :: Maybe Bool
dynamicScalingOutSuspended :: Maybe Bool
dynamicScalingInSuspended :: Maybe Bool
$sel:scheduledScalingSuspended:SuspendedState' :: SuspendedState -> Maybe Bool
$sel:dynamicScalingOutSuspended:SuspendedState' :: SuspendedState -> Maybe Bool
$sel:dynamicScalingInSuspended:SuspendedState' :: SuspendedState -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
dynamicScalingInSuspended
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
dynamicScalingOutSuspended
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
scheduledScalingSuspended
instance Data.ToJSON SuspendedState where
toJSON :: SuspendedState -> Value
toJSON SuspendedState' {Maybe Bool
scheduledScalingSuspended :: Maybe Bool
dynamicScalingOutSuspended :: Maybe Bool
dynamicScalingInSuspended :: Maybe Bool
$sel:scheduledScalingSuspended:SuspendedState' :: SuspendedState -> Maybe Bool
$sel:dynamicScalingOutSuspended:SuspendedState' :: SuspendedState -> Maybe Bool
$sel:dynamicScalingInSuspended:SuspendedState' :: SuspendedState -> Maybe Bool
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"DynamicScalingInSuspended" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
dynamicScalingInSuspended,
(Key
"DynamicScalingOutSuspended" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
dynamicScalingOutSuspended,
(Key
"ScheduledScalingSuspended" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
scheduledScalingSuspended
]
)