module Stratosphere.EMRServerless.Application.WorkerConfigurationProperty (
WorkerConfigurationProperty(..), mkWorkerConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data WorkerConfigurationProperty
=
WorkerConfigurationProperty {WorkerConfigurationProperty -> ()
haddock_workaround_ :: (),
WorkerConfigurationProperty -> Value Text
cpu :: (Value Prelude.Text),
WorkerConfigurationProperty -> Maybe (Value Text)
disk :: (Prelude.Maybe (Value Prelude.Text)),
WorkerConfigurationProperty -> Maybe (Value Text)
diskType :: (Prelude.Maybe (Value Prelude.Text)),
WorkerConfigurationProperty -> Value Text
memory :: (Value Prelude.Text)}
deriving stock (WorkerConfigurationProperty -> WorkerConfigurationProperty -> Bool
(WorkerConfigurationProperty
-> WorkerConfigurationProperty -> Bool)
-> (WorkerConfigurationProperty
-> WorkerConfigurationProperty -> Bool)
-> Eq WorkerConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: WorkerConfigurationProperty -> WorkerConfigurationProperty -> Bool
== :: WorkerConfigurationProperty -> WorkerConfigurationProperty -> Bool
$c/= :: WorkerConfigurationProperty -> WorkerConfigurationProperty -> Bool
/= :: WorkerConfigurationProperty -> WorkerConfigurationProperty -> Bool
Prelude.Eq, Int -> WorkerConfigurationProperty -> ShowS
[WorkerConfigurationProperty] -> ShowS
WorkerConfigurationProperty -> String
(Int -> WorkerConfigurationProperty -> ShowS)
-> (WorkerConfigurationProperty -> String)
-> ([WorkerConfigurationProperty] -> ShowS)
-> Show WorkerConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> WorkerConfigurationProperty -> ShowS
showsPrec :: Int -> WorkerConfigurationProperty -> ShowS
$cshow :: WorkerConfigurationProperty -> String
show :: WorkerConfigurationProperty -> String
$cshowList :: [WorkerConfigurationProperty] -> ShowS
showList :: [WorkerConfigurationProperty] -> ShowS
Prelude.Show)
mkWorkerConfigurationProperty ::
Value Prelude.Text
-> Value Prelude.Text -> WorkerConfigurationProperty
mkWorkerConfigurationProperty :: Value Text -> Value Text -> WorkerConfigurationProperty
mkWorkerConfigurationProperty Value Text
cpu Value Text
memory
= WorkerConfigurationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), cpu :: Value Text
cpu = Value Text
cpu, memory :: Value Text
memory = Value Text
memory,
disk :: Maybe (Value Text)
disk = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, diskType :: Maybe (Value Text)
diskType = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties WorkerConfigurationProperty where
toResourceProperties :: WorkerConfigurationProperty -> ResourceProperties
toResourceProperties WorkerConfigurationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: WorkerConfigurationProperty -> ()
cpu :: WorkerConfigurationProperty -> Value Text
disk :: WorkerConfigurationProperty -> Maybe (Value Text)
diskType :: WorkerConfigurationProperty -> Maybe (Value Text)
memory :: WorkerConfigurationProperty -> Value Text
haddock_workaround_ :: ()
cpu :: Value Text
disk :: Maybe (Value Text)
diskType :: Maybe (Value Text)
memory :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::EMRServerless::Application.WorkerConfiguration",
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
"Cpu" 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..= Value Text
cpu, Key
"Memory" 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..= Value Text
memory]
([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
"Disk" (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)
disk,
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
"DiskType" (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)
diskType]))}
instance JSON.ToJSON WorkerConfigurationProperty where
toJSON :: WorkerConfigurationProperty -> Value
toJSON WorkerConfigurationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: WorkerConfigurationProperty -> ()
cpu :: WorkerConfigurationProperty -> Value Text
disk :: WorkerConfigurationProperty -> Maybe (Value Text)
diskType :: WorkerConfigurationProperty -> Maybe (Value Text)
memory :: WorkerConfigurationProperty -> Value Text
haddock_workaround_ :: ()
cpu :: Value Text
disk :: Maybe (Value Text)
diskType :: Maybe (Value Text)
memory :: Value Text
..}
= [(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
"Cpu" 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..= Value Text
cpu, Key
"Memory" 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..= Value Text
memory]
([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
"Disk" (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)
disk,
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
"DiskType" (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)
diskType])))
instance Property "Cpu" WorkerConfigurationProperty where
type PropertyType "Cpu" WorkerConfigurationProperty = Value Prelude.Text
set :: PropertyType "Cpu" WorkerConfigurationProperty
-> WorkerConfigurationProperty -> WorkerConfigurationProperty
set PropertyType "Cpu" WorkerConfigurationProperty
newValue WorkerConfigurationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: WorkerConfigurationProperty -> ()
cpu :: WorkerConfigurationProperty -> Value Text
disk :: WorkerConfigurationProperty -> Maybe (Value Text)
diskType :: WorkerConfigurationProperty -> Maybe (Value Text)
memory :: WorkerConfigurationProperty -> Value Text
haddock_workaround_ :: ()
cpu :: Value Text
disk :: Maybe (Value Text)
diskType :: Maybe (Value Text)
memory :: Value Text
..}
= WorkerConfigurationProperty {cpu :: Value Text
cpu = PropertyType "Cpu" WorkerConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
disk :: Maybe (Value Text)
diskType :: Maybe (Value Text)
memory :: Value Text
haddock_workaround_ :: ()
disk :: Maybe (Value Text)
diskType :: Maybe (Value Text)
memory :: Value Text
..}
instance Property "Disk" WorkerConfigurationProperty where
type PropertyType "Disk" WorkerConfigurationProperty = Value Prelude.Text
set :: PropertyType "Disk" WorkerConfigurationProperty
-> WorkerConfigurationProperty -> WorkerConfigurationProperty
set PropertyType "Disk" WorkerConfigurationProperty
newValue WorkerConfigurationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: WorkerConfigurationProperty -> ()
cpu :: WorkerConfigurationProperty -> Value Text
disk :: WorkerConfigurationProperty -> Maybe (Value Text)
diskType :: WorkerConfigurationProperty -> Maybe (Value Text)
memory :: WorkerConfigurationProperty -> Value Text
haddock_workaround_ :: ()
cpu :: Value Text
disk :: Maybe (Value Text)
diskType :: Maybe (Value Text)
memory :: Value Text
..}
= WorkerConfigurationProperty {disk :: Maybe (Value Text)
disk = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Disk" WorkerConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
cpu :: Value Text
diskType :: Maybe (Value Text)
memory :: Value Text
haddock_workaround_ :: ()
cpu :: Value Text
diskType :: Maybe (Value Text)
memory :: Value Text
..}
instance Property "DiskType" WorkerConfigurationProperty where
type PropertyType "DiskType" WorkerConfigurationProperty = Value Prelude.Text
set :: PropertyType "DiskType" WorkerConfigurationProperty
-> WorkerConfigurationProperty -> WorkerConfigurationProperty
set PropertyType "DiskType" WorkerConfigurationProperty
newValue WorkerConfigurationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: WorkerConfigurationProperty -> ()
cpu :: WorkerConfigurationProperty -> Value Text
disk :: WorkerConfigurationProperty -> Maybe (Value Text)
diskType :: WorkerConfigurationProperty -> Maybe (Value Text)
memory :: WorkerConfigurationProperty -> Value Text
haddock_workaround_ :: ()
cpu :: Value Text
disk :: Maybe (Value Text)
diskType :: Maybe (Value Text)
memory :: Value Text
..}
= WorkerConfigurationProperty
{diskType :: Maybe (Value Text)
diskType = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DiskType" WorkerConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
cpu :: Value Text
disk :: Maybe (Value Text)
memory :: Value Text
haddock_workaround_ :: ()
cpu :: Value Text
disk :: Maybe (Value Text)
memory :: Value Text
..}
instance Property "Memory" WorkerConfigurationProperty where
type PropertyType "Memory" WorkerConfigurationProperty = Value Prelude.Text
set :: PropertyType "Memory" WorkerConfigurationProperty
-> WorkerConfigurationProperty -> WorkerConfigurationProperty
set PropertyType "Memory" WorkerConfigurationProperty
newValue WorkerConfigurationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: WorkerConfigurationProperty -> ()
cpu :: WorkerConfigurationProperty -> Value Text
disk :: WorkerConfigurationProperty -> Maybe (Value Text)
diskType :: WorkerConfigurationProperty -> Maybe (Value Text)
memory :: WorkerConfigurationProperty -> Value Text
haddock_workaround_ :: ()
cpu :: Value Text
disk :: Maybe (Value Text)
diskType :: Maybe (Value Text)
memory :: Value Text
..}
= WorkerConfigurationProperty {memory :: Value Text
memory = PropertyType "Memory" WorkerConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
cpu :: Value Text
disk :: Maybe (Value Text)
diskType :: Maybe (Value Text)
haddock_workaround_ :: ()
cpu :: Value Text
disk :: Maybe (Value Text)
diskType :: Maybe (Value Text)
..}