module Stratosphere.EMR.Cluster.ManagedScalingPolicyProperty (
module Exports, ManagedScalingPolicyProperty(..),
mkManagedScalingPolicyProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.EMR.Cluster.ComputeLimitsProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ManagedScalingPolicyProperty
=
ManagedScalingPolicyProperty {ManagedScalingPolicyProperty -> ()
haddock_workaround_ :: (),
ManagedScalingPolicyProperty -> Maybe ComputeLimitsProperty
computeLimits :: (Prelude.Maybe ComputeLimitsProperty),
ManagedScalingPolicyProperty -> Maybe (Value Text)
scalingStrategy :: (Prelude.Maybe (Value Prelude.Text)),
ManagedScalingPolicyProperty -> Maybe (Value Integer)
utilizationPerformanceIndex :: (Prelude.Maybe (Value Prelude.Integer))}
deriving stock (ManagedScalingPolicyProperty
-> ManagedScalingPolicyProperty -> Bool
(ManagedScalingPolicyProperty
-> ManagedScalingPolicyProperty -> Bool)
-> (ManagedScalingPolicyProperty
-> ManagedScalingPolicyProperty -> Bool)
-> Eq ManagedScalingPolicyProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ManagedScalingPolicyProperty
-> ManagedScalingPolicyProperty -> Bool
== :: ManagedScalingPolicyProperty
-> ManagedScalingPolicyProperty -> Bool
$c/= :: ManagedScalingPolicyProperty
-> ManagedScalingPolicyProperty -> Bool
/= :: ManagedScalingPolicyProperty
-> ManagedScalingPolicyProperty -> Bool
Prelude.Eq, Int -> ManagedScalingPolicyProperty -> ShowS
[ManagedScalingPolicyProperty] -> ShowS
ManagedScalingPolicyProperty -> String
(Int -> ManagedScalingPolicyProperty -> ShowS)
-> (ManagedScalingPolicyProperty -> String)
-> ([ManagedScalingPolicyProperty] -> ShowS)
-> Show ManagedScalingPolicyProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ManagedScalingPolicyProperty -> ShowS
showsPrec :: Int -> ManagedScalingPolicyProperty -> ShowS
$cshow :: ManagedScalingPolicyProperty -> String
show :: ManagedScalingPolicyProperty -> String
$cshowList :: [ManagedScalingPolicyProperty] -> ShowS
showList :: [ManagedScalingPolicyProperty] -> ShowS
Prelude.Show)
mkManagedScalingPolicyProperty :: ManagedScalingPolicyProperty
mkManagedScalingPolicyProperty :: ManagedScalingPolicyProperty
mkManagedScalingPolicyProperty
= ManagedScalingPolicyProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), computeLimits :: Maybe ComputeLimitsProperty
computeLimits = Maybe ComputeLimitsProperty
forall a. Maybe a
Prelude.Nothing,
scalingStrategy :: Maybe (Value Text)
scalingStrategy = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
utilizationPerformanceIndex :: Maybe (Value Integer)
utilizationPerformanceIndex = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ManagedScalingPolicyProperty where
toResourceProperties :: ManagedScalingPolicyProperty -> ResourceProperties
toResourceProperties ManagedScalingPolicyProperty {Maybe (Value Integer)
Maybe (Value Text)
Maybe ComputeLimitsProperty
()
haddock_workaround_ :: ManagedScalingPolicyProperty -> ()
computeLimits :: ManagedScalingPolicyProperty -> Maybe ComputeLimitsProperty
scalingStrategy :: ManagedScalingPolicyProperty -> Maybe (Value Text)
utilizationPerformanceIndex :: ManagedScalingPolicyProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
computeLimits :: Maybe ComputeLimitsProperty
scalingStrategy :: Maybe (Value Text)
utilizationPerformanceIndex :: Maybe (Value Integer)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::EMR::Cluster.ManagedScalingPolicy",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> ComputeLimitsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ComputeLimits" (ComputeLimitsProperty -> (Key, Value))
-> Maybe ComputeLimitsProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ComputeLimitsProperty
computeLimits,
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
"ScalingStrategy" (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)
scalingStrategy,
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
"UtilizationPerformanceIndex"
(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)
utilizationPerformanceIndex])}
instance JSON.ToJSON ManagedScalingPolicyProperty where
toJSON :: ManagedScalingPolicyProperty -> Value
toJSON ManagedScalingPolicyProperty {Maybe (Value Integer)
Maybe (Value Text)
Maybe ComputeLimitsProperty
()
haddock_workaround_ :: ManagedScalingPolicyProperty -> ()
computeLimits :: ManagedScalingPolicyProperty -> Maybe ComputeLimitsProperty
scalingStrategy :: ManagedScalingPolicyProperty -> Maybe (Value Text)
utilizationPerformanceIndex :: ManagedScalingPolicyProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
computeLimits :: Maybe ComputeLimitsProperty
scalingStrategy :: Maybe (Value Text)
utilizationPerformanceIndex :: Maybe (Value Integer)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> ComputeLimitsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ComputeLimits" (ComputeLimitsProperty -> (Key, Value))
-> Maybe ComputeLimitsProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ComputeLimitsProperty
computeLimits,
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
"ScalingStrategy" (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)
scalingStrategy,
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
"UtilizationPerformanceIndex"
(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)
utilizationPerformanceIndex]))
instance Property "ComputeLimits" ManagedScalingPolicyProperty where
type PropertyType "ComputeLimits" ManagedScalingPolicyProperty = ComputeLimitsProperty
set :: PropertyType "ComputeLimits" ManagedScalingPolicyProperty
-> ManagedScalingPolicyProperty -> ManagedScalingPolicyProperty
set PropertyType "ComputeLimits" ManagedScalingPolicyProperty
newValue ManagedScalingPolicyProperty {Maybe (Value Integer)
Maybe (Value Text)
Maybe ComputeLimitsProperty
()
haddock_workaround_ :: ManagedScalingPolicyProperty -> ()
computeLimits :: ManagedScalingPolicyProperty -> Maybe ComputeLimitsProperty
scalingStrategy :: ManagedScalingPolicyProperty -> Maybe (Value Text)
utilizationPerformanceIndex :: ManagedScalingPolicyProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
computeLimits :: Maybe ComputeLimitsProperty
scalingStrategy :: Maybe (Value Text)
utilizationPerformanceIndex :: Maybe (Value Integer)
..}
= ManagedScalingPolicyProperty
{computeLimits :: Maybe ComputeLimitsProperty
computeLimits = ComputeLimitsProperty -> Maybe ComputeLimitsProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ComputeLimits" ManagedScalingPolicyProperty
ComputeLimitsProperty
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
scalingStrategy :: Maybe (Value Text)
utilizationPerformanceIndex :: Maybe (Value Integer)
haddock_workaround_ :: ()
scalingStrategy :: Maybe (Value Text)
utilizationPerformanceIndex :: Maybe (Value Integer)
..}
instance Property "ScalingStrategy" ManagedScalingPolicyProperty where
type PropertyType "ScalingStrategy" ManagedScalingPolicyProperty = Value Prelude.Text
set :: PropertyType "ScalingStrategy" ManagedScalingPolicyProperty
-> ManagedScalingPolicyProperty -> ManagedScalingPolicyProperty
set PropertyType "ScalingStrategy" ManagedScalingPolicyProperty
newValue ManagedScalingPolicyProperty {Maybe (Value Integer)
Maybe (Value Text)
Maybe ComputeLimitsProperty
()
haddock_workaround_ :: ManagedScalingPolicyProperty -> ()
computeLimits :: ManagedScalingPolicyProperty -> Maybe ComputeLimitsProperty
scalingStrategy :: ManagedScalingPolicyProperty -> Maybe (Value Text)
utilizationPerformanceIndex :: ManagedScalingPolicyProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
computeLimits :: Maybe ComputeLimitsProperty
scalingStrategy :: Maybe (Value Text)
utilizationPerformanceIndex :: Maybe (Value Integer)
..}
= ManagedScalingPolicyProperty
{scalingStrategy :: Maybe (Value Text)
scalingStrategy = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ScalingStrategy" ManagedScalingPolicyProperty
Value Text
newValue, Maybe (Value Integer)
Maybe ComputeLimitsProperty
()
haddock_workaround_ :: ()
computeLimits :: Maybe ComputeLimitsProperty
utilizationPerformanceIndex :: Maybe (Value Integer)
haddock_workaround_ :: ()
computeLimits :: Maybe ComputeLimitsProperty
utilizationPerformanceIndex :: Maybe (Value Integer)
..}
instance Property "UtilizationPerformanceIndex" ManagedScalingPolicyProperty where
type PropertyType "UtilizationPerformanceIndex" ManagedScalingPolicyProperty = Value Prelude.Integer
set :: PropertyType
"UtilizationPerformanceIndex" ManagedScalingPolicyProperty
-> ManagedScalingPolicyProperty -> ManagedScalingPolicyProperty
set PropertyType
"UtilizationPerformanceIndex" ManagedScalingPolicyProperty
newValue ManagedScalingPolicyProperty {Maybe (Value Integer)
Maybe (Value Text)
Maybe ComputeLimitsProperty
()
haddock_workaround_ :: ManagedScalingPolicyProperty -> ()
computeLimits :: ManagedScalingPolicyProperty -> Maybe ComputeLimitsProperty
scalingStrategy :: ManagedScalingPolicyProperty -> Maybe (Value Text)
utilizationPerformanceIndex :: ManagedScalingPolicyProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
computeLimits :: Maybe ComputeLimitsProperty
scalingStrategy :: Maybe (Value Text)
utilizationPerformanceIndex :: Maybe (Value Integer)
..}
= ManagedScalingPolicyProperty
{utilizationPerformanceIndex :: Maybe (Value Integer)
utilizationPerformanceIndex = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
"UtilizationPerformanceIndex" ManagedScalingPolicyProperty
Value Integer
newValue, Maybe (Value Text)
Maybe ComputeLimitsProperty
()
haddock_workaround_ :: ()
computeLimits :: Maybe ComputeLimitsProperty
scalingStrategy :: Maybe (Value Text)
haddock_workaround_ :: ()
computeLimits :: Maybe ComputeLimitsProperty
scalingStrategy :: Maybe (Value Text)
..}