module Stratosphere.EMR.InstanceGroupConfig.SimpleScalingPolicyConfigurationProperty (
SimpleScalingPolicyConfigurationProperty(..),
mkSimpleScalingPolicyConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SimpleScalingPolicyConfigurationProperty
=
SimpleScalingPolicyConfigurationProperty {SimpleScalingPolicyConfigurationProperty -> ()
haddock_workaround_ :: (),
SimpleScalingPolicyConfigurationProperty -> Maybe (Value Text)
adjustmentType :: (Prelude.Maybe (Value Prelude.Text)),
SimpleScalingPolicyConfigurationProperty -> Maybe (Value Integer)
coolDown :: (Prelude.Maybe (Value Prelude.Integer)),
SimpleScalingPolicyConfigurationProperty -> Value Integer
scalingAdjustment :: (Value Prelude.Integer)}
deriving stock (SimpleScalingPolicyConfigurationProperty
-> SimpleScalingPolicyConfigurationProperty -> Bool
(SimpleScalingPolicyConfigurationProperty
-> SimpleScalingPolicyConfigurationProperty -> Bool)
-> (SimpleScalingPolicyConfigurationProperty
-> SimpleScalingPolicyConfigurationProperty -> Bool)
-> Eq SimpleScalingPolicyConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SimpleScalingPolicyConfigurationProperty
-> SimpleScalingPolicyConfigurationProperty -> Bool
== :: SimpleScalingPolicyConfigurationProperty
-> SimpleScalingPolicyConfigurationProperty -> Bool
$c/= :: SimpleScalingPolicyConfigurationProperty
-> SimpleScalingPolicyConfigurationProperty -> Bool
/= :: SimpleScalingPolicyConfigurationProperty
-> SimpleScalingPolicyConfigurationProperty -> Bool
Prelude.Eq, Int -> SimpleScalingPolicyConfigurationProperty -> ShowS
[SimpleScalingPolicyConfigurationProperty] -> ShowS
SimpleScalingPolicyConfigurationProperty -> String
(Int -> SimpleScalingPolicyConfigurationProperty -> ShowS)
-> (SimpleScalingPolicyConfigurationProperty -> String)
-> ([SimpleScalingPolicyConfigurationProperty] -> ShowS)
-> Show SimpleScalingPolicyConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SimpleScalingPolicyConfigurationProperty -> ShowS
showsPrec :: Int -> SimpleScalingPolicyConfigurationProperty -> ShowS
$cshow :: SimpleScalingPolicyConfigurationProperty -> String
show :: SimpleScalingPolicyConfigurationProperty -> String
$cshowList :: [SimpleScalingPolicyConfigurationProperty] -> ShowS
showList :: [SimpleScalingPolicyConfigurationProperty] -> ShowS
Prelude.Show)
mkSimpleScalingPolicyConfigurationProperty ::
Value Prelude.Integer -> SimpleScalingPolicyConfigurationProperty
mkSimpleScalingPolicyConfigurationProperty :: Value Integer -> SimpleScalingPolicyConfigurationProperty
mkSimpleScalingPolicyConfigurationProperty Value Integer
scalingAdjustment
= SimpleScalingPolicyConfigurationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), scalingAdjustment :: Value Integer
scalingAdjustment = Value Integer
scalingAdjustment,
adjustmentType :: Maybe (Value Text)
adjustmentType = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, coolDown :: Maybe (Value Integer)
coolDown = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SimpleScalingPolicyConfigurationProperty where
toResourceProperties :: SimpleScalingPolicyConfigurationProperty -> ResourceProperties
toResourceProperties SimpleScalingPolicyConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Integer
haddock_workaround_ :: SimpleScalingPolicyConfigurationProperty -> ()
adjustmentType :: SimpleScalingPolicyConfigurationProperty -> Maybe (Value Text)
coolDown :: SimpleScalingPolicyConfigurationProperty -> Maybe (Value Integer)
scalingAdjustment :: SimpleScalingPolicyConfigurationProperty -> Value Integer
haddock_workaround_ :: ()
adjustmentType :: Maybe (Value Text)
coolDown :: Maybe (Value Integer)
scalingAdjustment :: Value Integer
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::EMR::InstanceGroupConfig.SimpleScalingPolicyConfiguration",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"ScalingAdjustment" Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Integer
scalingAdjustment]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AdjustmentType" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
adjustmentType,
Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CoolDown" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
coolDown]))}
instance JSON.ToJSON SimpleScalingPolicyConfigurationProperty where
toJSON :: SimpleScalingPolicyConfigurationProperty -> Value
toJSON SimpleScalingPolicyConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Integer
haddock_workaround_ :: SimpleScalingPolicyConfigurationProperty -> ()
adjustmentType :: SimpleScalingPolicyConfigurationProperty -> Maybe (Value Text)
coolDown :: SimpleScalingPolicyConfigurationProperty -> Maybe (Value Integer)
scalingAdjustment :: SimpleScalingPolicyConfigurationProperty -> Value Integer
haddock_workaround_ :: ()
adjustmentType :: Maybe (Value Text)
coolDown :: Maybe (Value Integer)
scalingAdjustment :: Value Integer
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"ScalingAdjustment" Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Integer
scalingAdjustment]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AdjustmentType" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
adjustmentType,
Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CoolDown" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
coolDown])))
instance Property "AdjustmentType" SimpleScalingPolicyConfigurationProperty where
type PropertyType "AdjustmentType" SimpleScalingPolicyConfigurationProperty = Value Prelude.Text
set :: PropertyType
"AdjustmentType" SimpleScalingPolicyConfigurationProperty
-> SimpleScalingPolicyConfigurationProperty
-> SimpleScalingPolicyConfigurationProperty
set PropertyType
"AdjustmentType" SimpleScalingPolicyConfigurationProperty
newValue SimpleScalingPolicyConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Integer
haddock_workaround_ :: SimpleScalingPolicyConfigurationProperty -> ()
adjustmentType :: SimpleScalingPolicyConfigurationProperty -> Maybe (Value Text)
coolDown :: SimpleScalingPolicyConfigurationProperty -> Maybe (Value Integer)
scalingAdjustment :: SimpleScalingPolicyConfigurationProperty -> Value Integer
haddock_workaround_ :: ()
adjustmentType :: Maybe (Value Text)
coolDown :: Maybe (Value Integer)
scalingAdjustment :: Value Integer
..}
= SimpleScalingPolicyConfigurationProperty
{adjustmentType :: Maybe (Value Text)
adjustmentType = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
"AdjustmentType" SimpleScalingPolicyConfigurationProperty
Value Text
newValue, Maybe (Value Integer)
()
Value Integer
haddock_workaround_ :: ()
coolDown :: Maybe (Value Integer)
scalingAdjustment :: Value Integer
haddock_workaround_ :: ()
coolDown :: Maybe (Value Integer)
scalingAdjustment :: Value Integer
..}
instance Property "CoolDown" SimpleScalingPolicyConfigurationProperty where
type PropertyType "CoolDown" SimpleScalingPolicyConfigurationProperty = Value Prelude.Integer
set :: PropertyType "CoolDown" SimpleScalingPolicyConfigurationProperty
-> SimpleScalingPolicyConfigurationProperty
-> SimpleScalingPolicyConfigurationProperty
set PropertyType "CoolDown" SimpleScalingPolicyConfigurationProperty
newValue SimpleScalingPolicyConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Integer
haddock_workaround_ :: SimpleScalingPolicyConfigurationProperty -> ()
adjustmentType :: SimpleScalingPolicyConfigurationProperty -> Maybe (Value Text)
coolDown :: SimpleScalingPolicyConfigurationProperty -> Maybe (Value Integer)
scalingAdjustment :: SimpleScalingPolicyConfigurationProperty -> Value Integer
haddock_workaround_ :: ()
adjustmentType :: Maybe (Value Text)
coolDown :: Maybe (Value Integer)
scalingAdjustment :: Value Integer
..}
= SimpleScalingPolicyConfigurationProperty
{coolDown :: Maybe (Value Integer)
coolDown = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CoolDown" SimpleScalingPolicyConfigurationProperty
Value Integer
newValue, Maybe (Value Text)
()
Value Integer
haddock_workaround_ :: ()
adjustmentType :: Maybe (Value Text)
scalingAdjustment :: Value Integer
haddock_workaround_ :: ()
adjustmentType :: Maybe (Value Text)
scalingAdjustment :: Value Integer
..}
instance Property "ScalingAdjustment" SimpleScalingPolicyConfigurationProperty where
type PropertyType "ScalingAdjustment" SimpleScalingPolicyConfigurationProperty = Value Prelude.Integer
set :: PropertyType
"ScalingAdjustment" SimpleScalingPolicyConfigurationProperty
-> SimpleScalingPolicyConfigurationProperty
-> SimpleScalingPolicyConfigurationProperty
set PropertyType
"ScalingAdjustment" SimpleScalingPolicyConfigurationProperty
newValue SimpleScalingPolicyConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Integer
haddock_workaround_ :: SimpleScalingPolicyConfigurationProperty -> ()
adjustmentType :: SimpleScalingPolicyConfigurationProperty -> Maybe (Value Text)
coolDown :: SimpleScalingPolicyConfigurationProperty -> Maybe (Value Integer)
scalingAdjustment :: SimpleScalingPolicyConfigurationProperty -> Value Integer
haddock_workaround_ :: ()
adjustmentType :: Maybe (Value Text)
coolDown :: Maybe (Value Integer)
scalingAdjustment :: Value Integer
..}
= SimpleScalingPolicyConfigurationProperty
{scalingAdjustment :: Value Integer
scalingAdjustment = PropertyType
"ScalingAdjustment" SimpleScalingPolicyConfigurationProperty
Value Integer
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
adjustmentType :: Maybe (Value Text)
coolDown :: Maybe (Value Integer)
haddock_workaround_ :: ()
adjustmentType :: Maybe (Value Text)
coolDown :: Maybe (Value Integer)
..}