{-# 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.GameLift.Types.ScalingPolicy where
import qualified Amazonka.Core as Core
import Amazonka.GameLift.Types.ComparisonOperatorType
import Amazonka.GameLift.Types.LocationUpdateStatus
import Amazonka.GameLift.Types.MetricName
import Amazonka.GameLift.Types.PolicyType
import Amazonka.GameLift.Types.ScalingAdjustmentType
import Amazonka.GameLift.Types.ScalingStatusType
import Amazonka.GameLift.Types.TargetConfiguration
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ScalingPolicy = ScalingPolicy'
{
ScalingPolicy -> Maybe ScalingStatusType
status :: Prelude.Maybe ScalingStatusType,
ScalingPolicy -> Maybe ScalingAdjustmentType
scalingAdjustmentType :: Prelude.Maybe ScalingAdjustmentType,
ScalingPolicy -> Maybe Text
location :: Prelude.Maybe Prelude.Text,
ScalingPolicy -> Maybe Natural
evaluationPeriods :: Prelude.Maybe Prelude.Natural,
ScalingPolicy -> Maybe PolicyType
policyType :: Prelude.Maybe PolicyType,
ScalingPolicy -> Maybe MetricName
metricName :: Prelude.Maybe MetricName,
ScalingPolicy -> Maybe Text
fleetArn :: Prelude.Maybe Prelude.Text,
ScalingPolicy -> Maybe ComparisonOperatorType
comparisonOperator :: Prelude.Maybe ComparisonOperatorType,
ScalingPolicy -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
ScalingPolicy -> Maybe Double
threshold :: Prelude.Maybe Prelude.Double,
ScalingPolicy -> Maybe Int
scalingAdjustment :: Prelude.Maybe Prelude.Int,
ScalingPolicy -> Maybe LocationUpdateStatus
updateStatus :: Prelude.Maybe LocationUpdateStatus,
ScalingPolicy -> Maybe Text
fleetId :: Prelude.Maybe Prelude.Text,
ScalingPolicy -> Maybe TargetConfiguration
targetConfiguration :: Prelude.Maybe TargetConfiguration
}
deriving (ScalingPolicy -> ScalingPolicy -> Bool
(ScalingPolicy -> ScalingPolicy -> Bool)
-> (ScalingPolicy -> ScalingPolicy -> Bool) -> Eq ScalingPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ScalingPolicy -> ScalingPolicy -> Bool
$c/= :: ScalingPolicy -> ScalingPolicy -> Bool
== :: ScalingPolicy -> ScalingPolicy -> Bool
$c== :: ScalingPolicy -> ScalingPolicy -> Bool
Prelude.Eq, ReadPrec [ScalingPolicy]
ReadPrec ScalingPolicy
Int -> ReadS ScalingPolicy
ReadS [ScalingPolicy]
(Int -> ReadS ScalingPolicy)
-> ReadS [ScalingPolicy]
-> ReadPrec ScalingPolicy
-> ReadPrec [ScalingPolicy]
-> Read ScalingPolicy
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ScalingPolicy]
$creadListPrec :: ReadPrec [ScalingPolicy]
readPrec :: ReadPrec ScalingPolicy
$creadPrec :: ReadPrec ScalingPolicy
readList :: ReadS [ScalingPolicy]
$creadList :: ReadS [ScalingPolicy]
readsPrec :: Int -> ReadS ScalingPolicy
$creadsPrec :: Int -> ReadS ScalingPolicy
Prelude.Read, Int -> ScalingPolicy -> ShowS
[ScalingPolicy] -> ShowS
ScalingPolicy -> String
(Int -> ScalingPolicy -> ShowS)
-> (ScalingPolicy -> String)
-> ([ScalingPolicy] -> ShowS)
-> Show ScalingPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ScalingPolicy] -> ShowS
$cshowList :: [ScalingPolicy] -> ShowS
show :: ScalingPolicy -> String
$cshow :: ScalingPolicy -> String
showsPrec :: Int -> ScalingPolicy -> ShowS
$cshowsPrec :: Int -> ScalingPolicy -> ShowS
Prelude.Show, (forall x. ScalingPolicy -> Rep ScalingPolicy x)
-> (forall x. Rep ScalingPolicy x -> ScalingPolicy)
-> Generic ScalingPolicy
forall x. Rep ScalingPolicy x -> ScalingPolicy
forall x. ScalingPolicy -> Rep ScalingPolicy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ScalingPolicy x -> ScalingPolicy
$cfrom :: forall x. ScalingPolicy -> Rep ScalingPolicy x
Prelude.Generic)
newScalingPolicy ::
ScalingPolicy
newScalingPolicy :: ScalingPolicy
newScalingPolicy =
ScalingPolicy' :: Maybe ScalingStatusType
-> Maybe ScalingAdjustmentType
-> Maybe Text
-> Maybe Natural
-> Maybe PolicyType
-> Maybe MetricName
-> Maybe Text
-> Maybe ComparisonOperatorType
-> Maybe Text
-> Maybe Double
-> Maybe Int
-> Maybe LocationUpdateStatus
-> Maybe Text
-> Maybe TargetConfiguration
-> ScalingPolicy
ScalingPolicy'
{ $sel:status:ScalingPolicy' :: Maybe ScalingStatusType
status = Maybe ScalingStatusType
forall a. Maybe a
Prelude.Nothing,
$sel:scalingAdjustmentType:ScalingPolicy' :: Maybe ScalingAdjustmentType
scalingAdjustmentType = Maybe ScalingAdjustmentType
forall a. Maybe a
Prelude.Nothing,
$sel:location:ScalingPolicy' :: Maybe Text
location = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:evaluationPeriods:ScalingPolicy' :: Maybe Natural
evaluationPeriods = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:policyType:ScalingPolicy' :: Maybe PolicyType
policyType = Maybe PolicyType
forall a. Maybe a
Prelude.Nothing,
$sel:metricName:ScalingPolicy' :: Maybe MetricName
metricName = Maybe MetricName
forall a. Maybe a
Prelude.Nothing,
$sel:fleetArn:ScalingPolicy' :: Maybe Text
fleetArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:comparisonOperator:ScalingPolicy' :: Maybe ComparisonOperatorType
comparisonOperator = Maybe ComparisonOperatorType
forall a. Maybe a
Prelude.Nothing,
$sel:name:ScalingPolicy' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:threshold:ScalingPolicy' :: Maybe Double
threshold = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:scalingAdjustment:ScalingPolicy' :: Maybe Int
scalingAdjustment = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:updateStatus:ScalingPolicy' :: Maybe LocationUpdateStatus
updateStatus = Maybe LocationUpdateStatus
forall a. Maybe a
Prelude.Nothing,
$sel:fleetId:ScalingPolicy' :: Maybe Text
fleetId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:targetConfiguration:ScalingPolicy' :: Maybe TargetConfiguration
targetConfiguration = Maybe TargetConfiguration
forall a. Maybe a
Prelude.Nothing
}
scalingPolicy_status :: Lens.Lens' ScalingPolicy (Prelude.Maybe ScalingStatusType)
scalingPolicy_status :: (Maybe ScalingStatusType -> f (Maybe ScalingStatusType))
-> ScalingPolicy -> f ScalingPolicy
scalingPolicy_status = (ScalingPolicy -> Maybe ScalingStatusType)
-> (ScalingPolicy -> Maybe ScalingStatusType -> ScalingPolicy)
-> Lens
ScalingPolicy
ScalingPolicy
(Maybe ScalingStatusType)
(Maybe ScalingStatusType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScalingPolicy' {Maybe ScalingStatusType
status :: Maybe ScalingStatusType
$sel:status:ScalingPolicy' :: ScalingPolicy -> Maybe ScalingStatusType
status} -> Maybe ScalingStatusType
status) (\s :: ScalingPolicy
s@ScalingPolicy' {} Maybe ScalingStatusType
a -> ScalingPolicy
s {$sel:status:ScalingPolicy' :: Maybe ScalingStatusType
status = Maybe ScalingStatusType
a} :: ScalingPolicy)
scalingPolicy_scalingAdjustmentType :: Lens.Lens' ScalingPolicy (Prelude.Maybe ScalingAdjustmentType)
scalingPolicy_scalingAdjustmentType :: (Maybe ScalingAdjustmentType -> f (Maybe ScalingAdjustmentType))
-> ScalingPolicy -> f ScalingPolicy
scalingPolicy_scalingAdjustmentType = (ScalingPolicy -> Maybe ScalingAdjustmentType)
-> (ScalingPolicy -> Maybe ScalingAdjustmentType -> ScalingPolicy)
-> Lens
ScalingPolicy
ScalingPolicy
(Maybe ScalingAdjustmentType)
(Maybe ScalingAdjustmentType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScalingPolicy' {Maybe ScalingAdjustmentType
scalingAdjustmentType :: Maybe ScalingAdjustmentType
$sel:scalingAdjustmentType:ScalingPolicy' :: ScalingPolicy -> Maybe ScalingAdjustmentType
scalingAdjustmentType} -> Maybe ScalingAdjustmentType
scalingAdjustmentType) (\s :: ScalingPolicy
s@ScalingPolicy' {} Maybe ScalingAdjustmentType
a -> ScalingPolicy
s {$sel:scalingAdjustmentType:ScalingPolicy' :: Maybe ScalingAdjustmentType
scalingAdjustmentType = Maybe ScalingAdjustmentType
a} :: ScalingPolicy)
scalingPolicy_location :: Lens.Lens' ScalingPolicy (Prelude.Maybe Prelude.Text)
scalingPolicy_location :: (Maybe Text -> f (Maybe Text)) -> ScalingPolicy -> f ScalingPolicy
scalingPolicy_location = (ScalingPolicy -> Maybe Text)
-> (ScalingPolicy -> Maybe Text -> ScalingPolicy)
-> Lens ScalingPolicy ScalingPolicy (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScalingPolicy' {Maybe Text
location :: Maybe Text
$sel:location:ScalingPolicy' :: ScalingPolicy -> Maybe Text
location} -> Maybe Text
location) (\s :: ScalingPolicy
s@ScalingPolicy' {} Maybe Text
a -> ScalingPolicy
s {$sel:location:ScalingPolicy' :: Maybe Text
location = Maybe Text
a} :: ScalingPolicy)
scalingPolicy_evaluationPeriods :: Lens.Lens' ScalingPolicy (Prelude.Maybe Prelude.Natural)
scalingPolicy_evaluationPeriods :: (Maybe Natural -> f (Maybe Natural))
-> ScalingPolicy -> f ScalingPolicy
scalingPolicy_evaluationPeriods = (ScalingPolicy -> Maybe Natural)
-> (ScalingPolicy -> Maybe Natural -> ScalingPolicy)
-> Lens ScalingPolicy ScalingPolicy (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScalingPolicy' {Maybe Natural
evaluationPeriods :: Maybe Natural
$sel:evaluationPeriods:ScalingPolicy' :: ScalingPolicy -> Maybe Natural
evaluationPeriods} -> Maybe Natural
evaluationPeriods) (\s :: ScalingPolicy
s@ScalingPolicy' {} Maybe Natural
a -> ScalingPolicy
s {$sel:evaluationPeriods:ScalingPolicy' :: Maybe Natural
evaluationPeriods = Maybe Natural
a} :: ScalingPolicy)
scalingPolicy_policyType :: Lens.Lens' ScalingPolicy (Prelude.Maybe PolicyType)
scalingPolicy_policyType :: (Maybe PolicyType -> f (Maybe PolicyType))
-> ScalingPolicy -> f ScalingPolicy
scalingPolicy_policyType = (ScalingPolicy -> Maybe PolicyType)
-> (ScalingPolicy -> Maybe PolicyType -> ScalingPolicy)
-> Lens
ScalingPolicy ScalingPolicy (Maybe PolicyType) (Maybe PolicyType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScalingPolicy' {Maybe PolicyType
policyType :: Maybe PolicyType
$sel:policyType:ScalingPolicy' :: ScalingPolicy -> Maybe PolicyType
policyType} -> Maybe PolicyType
policyType) (\s :: ScalingPolicy
s@ScalingPolicy' {} Maybe PolicyType
a -> ScalingPolicy
s {$sel:policyType:ScalingPolicy' :: Maybe PolicyType
policyType = Maybe PolicyType
a} :: ScalingPolicy)
scalingPolicy_metricName :: Lens.Lens' ScalingPolicy (Prelude.Maybe MetricName)
scalingPolicy_metricName :: (Maybe MetricName -> f (Maybe MetricName))
-> ScalingPolicy -> f ScalingPolicy
scalingPolicy_metricName = (ScalingPolicy -> Maybe MetricName)
-> (ScalingPolicy -> Maybe MetricName -> ScalingPolicy)
-> Lens
ScalingPolicy ScalingPolicy (Maybe MetricName) (Maybe MetricName)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScalingPolicy' {Maybe MetricName
metricName :: Maybe MetricName
$sel:metricName:ScalingPolicy' :: ScalingPolicy -> Maybe MetricName
metricName} -> Maybe MetricName
metricName) (\s :: ScalingPolicy
s@ScalingPolicy' {} Maybe MetricName
a -> ScalingPolicy
s {$sel:metricName:ScalingPolicy' :: Maybe MetricName
metricName = Maybe MetricName
a} :: ScalingPolicy)
scalingPolicy_fleetArn :: Lens.Lens' ScalingPolicy (Prelude.Maybe Prelude.Text)
scalingPolicy_fleetArn :: (Maybe Text -> f (Maybe Text)) -> ScalingPolicy -> f ScalingPolicy
scalingPolicy_fleetArn = (ScalingPolicy -> Maybe Text)
-> (ScalingPolicy -> Maybe Text -> ScalingPolicy)
-> Lens ScalingPolicy ScalingPolicy (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScalingPolicy' {Maybe Text
fleetArn :: Maybe Text
$sel:fleetArn:ScalingPolicy' :: ScalingPolicy -> Maybe Text
fleetArn} -> Maybe Text
fleetArn) (\s :: ScalingPolicy
s@ScalingPolicy' {} Maybe Text
a -> ScalingPolicy
s {$sel:fleetArn:ScalingPolicy' :: Maybe Text
fleetArn = Maybe Text
a} :: ScalingPolicy)
scalingPolicy_comparisonOperator :: Lens.Lens' ScalingPolicy (Prelude.Maybe ComparisonOperatorType)
scalingPolicy_comparisonOperator :: (Maybe ComparisonOperatorType -> f (Maybe ComparisonOperatorType))
-> ScalingPolicy -> f ScalingPolicy
scalingPolicy_comparisonOperator = (ScalingPolicy -> Maybe ComparisonOperatorType)
-> (ScalingPolicy -> Maybe ComparisonOperatorType -> ScalingPolicy)
-> Lens
ScalingPolicy
ScalingPolicy
(Maybe ComparisonOperatorType)
(Maybe ComparisonOperatorType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScalingPolicy' {Maybe ComparisonOperatorType
comparisonOperator :: Maybe ComparisonOperatorType
$sel:comparisonOperator:ScalingPolicy' :: ScalingPolicy -> Maybe ComparisonOperatorType
comparisonOperator} -> Maybe ComparisonOperatorType
comparisonOperator) (\s :: ScalingPolicy
s@ScalingPolicy' {} Maybe ComparisonOperatorType
a -> ScalingPolicy
s {$sel:comparisonOperator:ScalingPolicy' :: Maybe ComparisonOperatorType
comparisonOperator = Maybe ComparisonOperatorType
a} :: ScalingPolicy)
scalingPolicy_name :: Lens.Lens' ScalingPolicy (Prelude.Maybe Prelude.Text)
scalingPolicy_name :: (Maybe Text -> f (Maybe Text)) -> ScalingPolicy -> f ScalingPolicy
scalingPolicy_name = (ScalingPolicy -> Maybe Text)
-> (ScalingPolicy -> Maybe Text -> ScalingPolicy)
-> Lens ScalingPolicy ScalingPolicy (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScalingPolicy' {Maybe Text
name :: Maybe Text
$sel:name:ScalingPolicy' :: ScalingPolicy -> Maybe Text
name} -> Maybe Text
name) (\s :: ScalingPolicy
s@ScalingPolicy' {} Maybe Text
a -> ScalingPolicy
s {$sel:name:ScalingPolicy' :: Maybe Text
name = Maybe Text
a} :: ScalingPolicy)
scalingPolicy_threshold :: Lens.Lens' ScalingPolicy (Prelude.Maybe Prelude.Double)
scalingPolicy_threshold :: (Maybe Double -> f (Maybe Double))
-> ScalingPolicy -> f ScalingPolicy
scalingPolicy_threshold = (ScalingPolicy -> Maybe Double)
-> (ScalingPolicy -> Maybe Double -> ScalingPolicy)
-> Lens ScalingPolicy ScalingPolicy (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScalingPolicy' {Maybe Double
threshold :: Maybe Double
$sel:threshold:ScalingPolicy' :: ScalingPolicy -> Maybe Double
threshold} -> Maybe Double
threshold) (\s :: ScalingPolicy
s@ScalingPolicy' {} Maybe Double
a -> ScalingPolicy
s {$sel:threshold:ScalingPolicy' :: Maybe Double
threshold = Maybe Double
a} :: ScalingPolicy)
scalingPolicy_scalingAdjustment :: Lens.Lens' ScalingPolicy (Prelude.Maybe Prelude.Int)
scalingPolicy_scalingAdjustment :: (Maybe Int -> f (Maybe Int)) -> ScalingPolicy -> f ScalingPolicy
scalingPolicy_scalingAdjustment = (ScalingPolicy -> Maybe Int)
-> (ScalingPolicy -> Maybe Int -> ScalingPolicy)
-> Lens ScalingPolicy ScalingPolicy (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScalingPolicy' {Maybe Int
scalingAdjustment :: Maybe Int
$sel:scalingAdjustment:ScalingPolicy' :: ScalingPolicy -> Maybe Int
scalingAdjustment} -> Maybe Int
scalingAdjustment) (\s :: ScalingPolicy
s@ScalingPolicy' {} Maybe Int
a -> ScalingPolicy
s {$sel:scalingAdjustment:ScalingPolicy' :: Maybe Int
scalingAdjustment = Maybe Int
a} :: ScalingPolicy)
scalingPolicy_updateStatus :: Lens.Lens' ScalingPolicy (Prelude.Maybe LocationUpdateStatus)
scalingPolicy_updateStatus :: (Maybe LocationUpdateStatus -> f (Maybe LocationUpdateStatus))
-> ScalingPolicy -> f ScalingPolicy
scalingPolicy_updateStatus = (ScalingPolicy -> Maybe LocationUpdateStatus)
-> (ScalingPolicy -> Maybe LocationUpdateStatus -> ScalingPolicy)
-> Lens
ScalingPolicy
ScalingPolicy
(Maybe LocationUpdateStatus)
(Maybe LocationUpdateStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScalingPolicy' {Maybe LocationUpdateStatus
updateStatus :: Maybe LocationUpdateStatus
$sel:updateStatus:ScalingPolicy' :: ScalingPolicy -> Maybe LocationUpdateStatus
updateStatus} -> Maybe LocationUpdateStatus
updateStatus) (\s :: ScalingPolicy
s@ScalingPolicy' {} Maybe LocationUpdateStatus
a -> ScalingPolicy
s {$sel:updateStatus:ScalingPolicy' :: Maybe LocationUpdateStatus
updateStatus = Maybe LocationUpdateStatus
a} :: ScalingPolicy)
scalingPolicy_fleetId :: Lens.Lens' ScalingPolicy (Prelude.Maybe Prelude.Text)
scalingPolicy_fleetId :: (Maybe Text -> f (Maybe Text)) -> ScalingPolicy -> f ScalingPolicy
scalingPolicy_fleetId = (ScalingPolicy -> Maybe Text)
-> (ScalingPolicy -> Maybe Text -> ScalingPolicy)
-> Lens ScalingPolicy ScalingPolicy (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScalingPolicy' {Maybe Text
fleetId :: Maybe Text
$sel:fleetId:ScalingPolicy' :: ScalingPolicy -> Maybe Text
fleetId} -> Maybe Text
fleetId) (\s :: ScalingPolicy
s@ScalingPolicy' {} Maybe Text
a -> ScalingPolicy
s {$sel:fleetId:ScalingPolicy' :: Maybe Text
fleetId = Maybe Text
a} :: ScalingPolicy)
scalingPolicy_targetConfiguration :: Lens.Lens' ScalingPolicy (Prelude.Maybe TargetConfiguration)
scalingPolicy_targetConfiguration :: (Maybe TargetConfiguration -> f (Maybe TargetConfiguration))
-> ScalingPolicy -> f ScalingPolicy
scalingPolicy_targetConfiguration = (ScalingPolicy -> Maybe TargetConfiguration)
-> (ScalingPolicy -> Maybe TargetConfiguration -> ScalingPolicy)
-> Lens
ScalingPolicy
ScalingPolicy
(Maybe TargetConfiguration)
(Maybe TargetConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScalingPolicy' {Maybe TargetConfiguration
targetConfiguration :: Maybe TargetConfiguration
$sel:targetConfiguration:ScalingPolicy' :: ScalingPolicy -> Maybe TargetConfiguration
targetConfiguration} -> Maybe TargetConfiguration
targetConfiguration) (\s :: ScalingPolicy
s@ScalingPolicy' {} Maybe TargetConfiguration
a -> ScalingPolicy
s {$sel:targetConfiguration:ScalingPolicy' :: Maybe TargetConfiguration
targetConfiguration = Maybe TargetConfiguration
a} :: ScalingPolicy)
instance Core.FromJSON ScalingPolicy where
parseJSON :: Value -> Parser ScalingPolicy
parseJSON =
String
-> (Object -> Parser ScalingPolicy)
-> Value
-> Parser ScalingPolicy
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ScalingPolicy"
( \Object
x ->
Maybe ScalingStatusType
-> Maybe ScalingAdjustmentType
-> Maybe Text
-> Maybe Natural
-> Maybe PolicyType
-> Maybe MetricName
-> Maybe Text
-> Maybe ComparisonOperatorType
-> Maybe Text
-> Maybe Double
-> Maybe Int
-> Maybe LocationUpdateStatus
-> Maybe Text
-> Maybe TargetConfiguration
-> ScalingPolicy
ScalingPolicy'
(Maybe ScalingStatusType
-> Maybe ScalingAdjustmentType
-> Maybe Text
-> Maybe Natural
-> Maybe PolicyType
-> Maybe MetricName
-> Maybe Text
-> Maybe ComparisonOperatorType
-> Maybe Text
-> Maybe Double
-> Maybe Int
-> Maybe LocationUpdateStatus
-> Maybe Text
-> Maybe TargetConfiguration
-> ScalingPolicy)
-> Parser (Maybe ScalingStatusType)
-> Parser
(Maybe ScalingAdjustmentType
-> Maybe Text
-> Maybe Natural
-> Maybe PolicyType
-> Maybe MetricName
-> Maybe Text
-> Maybe ComparisonOperatorType
-> Maybe Text
-> Maybe Double
-> Maybe Int
-> Maybe LocationUpdateStatus
-> Maybe Text
-> Maybe TargetConfiguration
-> ScalingPolicy)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ScalingStatusType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser
(Maybe ScalingAdjustmentType
-> Maybe Text
-> Maybe Natural
-> Maybe PolicyType
-> Maybe MetricName
-> Maybe Text
-> Maybe ComparisonOperatorType
-> Maybe Text
-> Maybe Double
-> Maybe Int
-> Maybe LocationUpdateStatus
-> Maybe Text
-> Maybe TargetConfiguration
-> ScalingPolicy)
-> Parser (Maybe ScalingAdjustmentType)
-> Parser
(Maybe Text
-> Maybe Natural
-> Maybe PolicyType
-> Maybe MetricName
-> Maybe Text
-> Maybe ComparisonOperatorType
-> Maybe Text
-> Maybe Double
-> Maybe Int
-> Maybe LocationUpdateStatus
-> Maybe Text
-> Maybe TargetConfiguration
-> ScalingPolicy)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ScalingAdjustmentType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ScalingAdjustmentType")
Parser
(Maybe Text
-> Maybe Natural
-> Maybe PolicyType
-> Maybe MetricName
-> Maybe Text
-> Maybe ComparisonOperatorType
-> Maybe Text
-> Maybe Double
-> Maybe Int
-> Maybe LocationUpdateStatus
-> Maybe Text
-> Maybe TargetConfiguration
-> ScalingPolicy)
-> Parser (Maybe Text)
-> Parser
(Maybe Natural
-> Maybe PolicyType
-> Maybe MetricName
-> Maybe Text
-> Maybe ComparisonOperatorType
-> Maybe Text
-> Maybe Double
-> Maybe Int
-> Maybe LocationUpdateStatus
-> Maybe Text
-> Maybe TargetConfiguration
-> ScalingPolicy)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Location")
Parser
(Maybe Natural
-> Maybe PolicyType
-> Maybe MetricName
-> Maybe Text
-> Maybe ComparisonOperatorType
-> Maybe Text
-> Maybe Double
-> Maybe Int
-> Maybe LocationUpdateStatus
-> Maybe Text
-> Maybe TargetConfiguration
-> ScalingPolicy)
-> Parser (Maybe Natural)
-> Parser
(Maybe PolicyType
-> Maybe MetricName
-> Maybe Text
-> Maybe ComparisonOperatorType
-> Maybe Text
-> Maybe Double
-> Maybe Int
-> Maybe LocationUpdateStatus
-> Maybe Text
-> Maybe TargetConfiguration
-> ScalingPolicy)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EvaluationPeriods")
Parser
(Maybe PolicyType
-> Maybe MetricName
-> Maybe Text
-> Maybe ComparisonOperatorType
-> Maybe Text
-> Maybe Double
-> Maybe Int
-> Maybe LocationUpdateStatus
-> Maybe Text
-> Maybe TargetConfiguration
-> ScalingPolicy)
-> Parser (Maybe PolicyType)
-> Parser
(Maybe MetricName
-> Maybe Text
-> Maybe ComparisonOperatorType
-> Maybe Text
-> Maybe Double
-> Maybe Int
-> Maybe LocationUpdateStatus
-> Maybe Text
-> Maybe TargetConfiguration
-> ScalingPolicy)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PolicyType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PolicyType")
Parser
(Maybe MetricName
-> Maybe Text
-> Maybe ComparisonOperatorType
-> Maybe Text
-> Maybe Double
-> Maybe Int
-> Maybe LocationUpdateStatus
-> Maybe Text
-> Maybe TargetConfiguration
-> ScalingPolicy)
-> Parser (Maybe MetricName)
-> Parser
(Maybe Text
-> Maybe ComparisonOperatorType
-> Maybe Text
-> Maybe Double
-> Maybe Int
-> Maybe LocationUpdateStatus
-> Maybe Text
-> Maybe TargetConfiguration
-> ScalingPolicy)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MetricName)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MetricName")
Parser
(Maybe Text
-> Maybe ComparisonOperatorType
-> Maybe Text
-> Maybe Double
-> Maybe Int
-> Maybe LocationUpdateStatus
-> Maybe Text
-> Maybe TargetConfiguration
-> ScalingPolicy)
-> Parser (Maybe Text)
-> Parser
(Maybe ComparisonOperatorType
-> Maybe Text
-> Maybe Double
-> Maybe Int
-> Maybe LocationUpdateStatus
-> Maybe Text
-> Maybe TargetConfiguration
-> ScalingPolicy)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FleetArn")
Parser
(Maybe ComparisonOperatorType
-> Maybe Text
-> Maybe Double
-> Maybe Int
-> Maybe LocationUpdateStatus
-> Maybe Text
-> Maybe TargetConfiguration
-> ScalingPolicy)
-> Parser (Maybe ComparisonOperatorType)
-> Parser
(Maybe Text
-> Maybe Double
-> Maybe Int
-> Maybe LocationUpdateStatus
-> Maybe Text
-> Maybe TargetConfiguration
-> ScalingPolicy)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ComparisonOperatorType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ComparisonOperator")
Parser
(Maybe Text
-> Maybe Double
-> Maybe Int
-> Maybe LocationUpdateStatus
-> Maybe Text
-> Maybe TargetConfiguration
-> ScalingPolicy)
-> Parser (Maybe Text)
-> Parser
(Maybe Double
-> Maybe Int
-> Maybe LocationUpdateStatus
-> Maybe Text
-> Maybe TargetConfiguration
-> ScalingPolicy)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Name")
Parser
(Maybe Double
-> Maybe Int
-> Maybe LocationUpdateStatus
-> Maybe Text
-> Maybe TargetConfiguration
-> ScalingPolicy)
-> Parser (Maybe Double)
-> Parser
(Maybe Int
-> Maybe LocationUpdateStatus
-> Maybe Text
-> Maybe TargetConfiguration
-> ScalingPolicy)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Threshold")
Parser
(Maybe Int
-> Maybe LocationUpdateStatus
-> Maybe Text
-> Maybe TargetConfiguration
-> ScalingPolicy)
-> Parser (Maybe Int)
-> Parser
(Maybe LocationUpdateStatus
-> Maybe Text -> Maybe TargetConfiguration -> ScalingPolicy)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ScalingAdjustment")
Parser
(Maybe LocationUpdateStatus
-> Maybe Text -> Maybe TargetConfiguration -> ScalingPolicy)
-> Parser (Maybe LocationUpdateStatus)
-> Parser
(Maybe Text -> Maybe TargetConfiguration -> ScalingPolicy)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LocationUpdateStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"UpdateStatus")
Parser (Maybe Text -> Maybe TargetConfiguration -> ScalingPolicy)
-> Parser (Maybe Text)
-> Parser (Maybe TargetConfiguration -> ScalingPolicy)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FleetId")
Parser (Maybe TargetConfiguration -> ScalingPolicy)
-> Parser (Maybe TargetConfiguration) -> Parser ScalingPolicy
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TargetConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TargetConfiguration")
)
instance Prelude.Hashable ScalingPolicy
instance Prelude.NFData ScalingPolicy