module Stratosphere.EMRServerless.Application.InitialCapacityConfigProperty (
module Exports, InitialCapacityConfigProperty(..),
mkInitialCapacityConfigProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.EMRServerless.Application.WorkerConfigurationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data InitialCapacityConfigProperty
=
InitialCapacityConfigProperty {InitialCapacityConfigProperty -> ()
haddock_workaround_ :: (),
InitialCapacityConfigProperty -> WorkerConfigurationProperty
workerConfiguration :: WorkerConfigurationProperty,
InitialCapacityConfigProperty -> Value Integer
workerCount :: (Value Prelude.Integer)}
deriving stock (InitialCapacityConfigProperty
-> InitialCapacityConfigProperty -> Bool
(InitialCapacityConfigProperty
-> InitialCapacityConfigProperty -> Bool)
-> (InitialCapacityConfigProperty
-> InitialCapacityConfigProperty -> Bool)
-> Eq InitialCapacityConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InitialCapacityConfigProperty
-> InitialCapacityConfigProperty -> Bool
== :: InitialCapacityConfigProperty
-> InitialCapacityConfigProperty -> Bool
$c/= :: InitialCapacityConfigProperty
-> InitialCapacityConfigProperty -> Bool
/= :: InitialCapacityConfigProperty
-> InitialCapacityConfigProperty -> Bool
Prelude.Eq, Int -> InitialCapacityConfigProperty -> ShowS
[InitialCapacityConfigProperty] -> ShowS
InitialCapacityConfigProperty -> String
(Int -> InitialCapacityConfigProperty -> ShowS)
-> (InitialCapacityConfigProperty -> String)
-> ([InitialCapacityConfigProperty] -> ShowS)
-> Show InitialCapacityConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InitialCapacityConfigProperty -> ShowS
showsPrec :: Int -> InitialCapacityConfigProperty -> ShowS
$cshow :: InitialCapacityConfigProperty -> String
show :: InitialCapacityConfigProperty -> String
$cshowList :: [InitialCapacityConfigProperty] -> ShowS
showList :: [InitialCapacityConfigProperty] -> ShowS
Prelude.Show)
mkInitialCapacityConfigProperty ::
WorkerConfigurationProperty
-> Value Prelude.Integer -> InitialCapacityConfigProperty
mkInitialCapacityConfigProperty :: WorkerConfigurationProperty
-> Value Integer -> InitialCapacityConfigProperty
mkInitialCapacityConfigProperty WorkerConfigurationProperty
workerConfiguration Value Integer
workerCount
= InitialCapacityConfigProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (),
workerConfiguration :: WorkerConfigurationProperty
workerConfiguration = WorkerConfigurationProperty
workerConfiguration,
workerCount :: Value Integer
workerCount = Value Integer
workerCount}
instance ToResourceProperties InitialCapacityConfigProperty where
toResourceProperties :: InitialCapacityConfigProperty -> ResourceProperties
toResourceProperties InitialCapacityConfigProperty {()
Value Integer
WorkerConfigurationProperty
haddock_workaround_ :: InitialCapacityConfigProperty -> ()
workerConfiguration :: InitialCapacityConfigProperty -> WorkerConfigurationProperty
workerCount :: InitialCapacityConfigProperty -> Value Integer
haddock_workaround_ :: ()
workerConfiguration :: WorkerConfigurationProperty
workerCount :: Value Integer
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::EMRServerless::Application.InitialCapacityConfig",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Key
"WorkerConfiguration" Key -> WorkerConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= WorkerConfigurationProperty
workerConfiguration,
Key
"WorkerCount" 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
workerCount]}
instance JSON.ToJSON InitialCapacityConfigProperty where
toJSON :: InitialCapacityConfigProperty -> Value
toJSON InitialCapacityConfigProperty {()
Value Integer
WorkerConfigurationProperty
haddock_workaround_ :: InitialCapacityConfigProperty -> ()
workerConfiguration :: InitialCapacityConfigProperty -> WorkerConfigurationProperty
workerCount :: InitialCapacityConfigProperty -> Value Integer
haddock_workaround_ :: ()
workerConfiguration :: WorkerConfigurationProperty
workerCount :: Value Integer
..}
= [(Key, Value)] -> Value
JSON.object
[Key
"WorkerConfiguration" Key -> WorkerConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= WorkerConfigurationProperty
workerConfiguration,
Key
"WorkerCount" 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
workerCount]
instance Property "WorkerConfiguration" InitialCapacityConfigProperty where
type PropertyType "WorkerConfiguration" InitialCapacityConfigProperty = WorkerConfigurationProperty
set :: PropertyType "WorkerConfiguration" InitialCapacityConfigProperty
-> InitialCapacityConfigProperty -> InitialCapacityConfigProperty
set PropertyType "WorkerConfiguration" InitialCapacityConfigProperty
newValue InitialCapacityConfigProperty {()
Value Integer
WorkerConfigurationProperty
haddock_workaround_ :: InitialCapacityConfigProperty -> ()
workerConfiguration :: InitialCapacityConfigProperty -> WorkerConfigurationProperty
workerCount :: InitialCapacityConfigProperty -> Value Integer
haddock_workaround_ :: ()
workerConfiguration :: WorkerConfigurationProperty
workerCount :: Value Integer
..}
= InitialCapacityConfigProperty
{workerConfiguration :: WorkerConfigurationProperty
workerConfiguration = PropertyType "WorkerConfiguration" InitialCapacityConfigProperty
WorkerConfigurationProperty
newValue, ()
Value Integer
haddock_workaround_ :: ()
workerCount :: Value Integer
haddock_workaround_ :: ()
workerCount :: Value Integer
..}
instance Property "WorkerCount" InitialCapacityConfigProperty where
type PropertyType "WorkerCount" InitialCapacityConfigProperty = Value Prelude.Integer
set :: PropertyType "WorkerCount" InitialCapacityConfigProperty
-> InitialCapacityConfigProperty -> InitialCapacityConfigProperty
set PropertyType "WorkerCount" InitialCapacityConfigProperty
newValue InitialCapacityConfigProperty {()
Value Integer
WorkerConfigurationProperty
haddock_workaround_ :: InitialCapacityConfigProperty -> ()
workerConfiguration :: InitialCapacityConfigProperty -> WorkerConfigurationProperty
workerCount :: InitialCapacityConfigProperty -> Value Integer
haddock_workaround_ :: ()
workerConfiguration :: WorkerConfigurationProperty
workerCount :: Value Integer
..}
= InitialCapacityConfigProperty {workerCount :: Value Integer
workerCount = PropertyType "WorkerCount" InitialCapacityConfigProperty
Value Integer
newValue, ()
WorkerConfigurationProperty
haddock_workaround_ :: ()
workerConfiguration :: WorkerConfigurationProperty
haddock_workaround_ :: ()
workerConfiguration :: WorkerConfigurationProperty
..}