module Stratosphere.EMRServerless.Application.SchedulerConfigurationProperty (
SchedulerConfigurationProperty(..),
mkSchedulerConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SchedulerConfigurationProperty
=
SchedulerConfigurationProperty {SchedulerConfigurationProperty -> ()
haddock_workaround_ :: (),
SchedulerConfigurationProperty -> Maybe (Value Integer)
maxConcurrentRuns :: (Prelude.Maybe (Value Prelude.Integer)),
SchedulerConfigurationProperty -> Maybe (Value Integer)
queueTimeoutMinutes :: (Prelude.Maybe (Value Prelude.Integer))}
deriving stock (SchedulerConfigurationProperty
-> SchedulerConfigurationProperty -> Bool
(SchedulerConfigurationProperty
-> SchedulerConfigurationProperty -> Bool)
-> (SchedulerConfigurationProperty
-> SchedulerConfigurationProperty -> Bool)
-> Eq SchedulerConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SchedulerConfigurationProperty
-> SchedulerConfigurationProperty -> Bool
== :: SchedulerConfigurationProperty
-> SchedulerConfigurationProperty -> Bool
$c/= :: SchedulerConfigurationProperty
-> SchedulerConfigurationProperty -> Bool
/= :: SchedulerConfigurationProperty
-> SchedulerConfigurationProperty -> Bool
Prelude.Eq, Int -> SchedulerConfigurationProperty -> ShowS
[SchedulerConfigurationProperty] -> ShowS
SchedulerConfigurationProperty -> String
(Int -> SchedulerConfigurationProperty -> ShowS)
-> (SchedulerConfigurationProperty -> String)
-> ([SchedulerConfigurationProperty] -> ShowS)
-> Show SchedulerConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SchedulerConfigurationProperty -> ShowS
showsPrec :: Int -> SchedulerConfigurationProperty -> ShowS
$cshow :: SchedulerConfigurationProperty -> String
show :: SchedulerConfigurationProperty -> String
$cshowList :: [SchedulerConfigurationProperty] -> ShowS
showList :: [SchedulerConfigurationProperty] -> ShowS
Prelude.Show)
mkSchedulerConfigurationProperty :: SchedulerConfigurationProperty
mkSchedulerConfigurationProperty :: SchedulerConfigurationProperty
mkSchedulerConfigurationProperty
= SchedulerConfigurationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), maxConcurrentRuns :: Maybe (Value Integer)
maxConcurrentRuns = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
queueTimeoutMinutes :: Maybe (Value Integer)
queueTimeoutMinutes = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SchedulerConfigurationProperty where
toResourceProperties :: SchedulerConfigurationProperty -> ResourceProperties
toResourceProperties SchedulerConfigurationProperty {Maybe (Value Integer)
()
haddock_workaround_ :: SchedulerConfigurationProperty -> ()
maxConcurrentRuns :: SchedulerConfigurationProperty -> Maybe (Value Integer)
queueTimeoutMinutes :: SchedulerConfigurationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
maxConcurrentRuns :: Maybe (Value Integer)
queueTimeoutMinutes :: Maybe (Value Integer)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::EMRServerless::Application.SchedulerConfiguration",
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 -> 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
"MaxConcurrentRuns" (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)
maxConcurrentRuns,
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
"QueueTimeoutMinutes" (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)
queueTimeoutMinutes])}
instance JSON.ToJSON SchedulerConfigurationProperty where
toJSON :: SchedulerConfigurationProperty -> Value
toJSON SchedulerConfigurationProperty {Maybe (Value Integer)
()
haddock_workaround_ :: SchedulerConfigurationProperty -> ()
maxConcurrentRuns :: SchedulerConfigurationProperty -> Maybe (Value Integer)
queueTimeoutMinutes :: SchedulerConfigurationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
maxConcurrentRuns :: Maybe (Value Integer)
queueTimeoutMinutes :: 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 -> 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
"MaxConcurrentRuns" (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)
maxConcurrentRuns,
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
"QueueTimeoutMinutes" (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)
queueTimeoutMinutes]))
instance Property "MaxConcurrentRuns" SchedulerConfigurationProperty where
type PropertyType "MaxConcurrentRuns" SchedulerConfigurationProperty = Value Prelude.Integer
set :: PropertyType "MaxConcurrentRuns" SchedulerConfigurationProperty
-> SchedulerConfigurationProperty -> SchedulerConfigurationProperty
set PropertyType "MaxConcurrentRuns" SchedulerConfigurationProperty
newValue SchedulerConfigurationProperty {Maybe (Value Integer)
()
haddock_workaround_ :: SchedulerConfigurationProperty -> ()
maxConcurrentRuns :: SchedulerConfigurationProperty -> Maybe (Value Integer)
queueTimeoutMinutes :: SchedulerConfigurationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
maxConcurrentRuns :: Maybe (Value Integer)
queueTimeoutMinutes :: Maybe (Value Integer)
..}
= SchedulerConfigurationProperty
{maxConcurrentRuns :: Maybe (Value Integer)
maxConcurrentRuns = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MaxConcurrentRuns" SchedulerConfigurationProperty
Value Integer
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
queueTimeoutMinutes :: Maybe (Value Integer)
haddock_workaround_ :: ()
queueTimeoutMinutes :: Maybe (Value Integer)
..}
instance Property "QueueTimeoutMinutes" SchedulerConfigurationProperty where
type PropertyType "QueueTimeoutMinutes" SchedulerConfigurationProperty = Value Prelude.Integer
set :: PropertyType "QueueTimeoutMinutes" SchedulerConfigurationProperty
-> SchedulerConfigurationProperty -> SchedulerConfigurationProperty
set PropertyType "QueueTimeoutMinutes" SchedulerConfigurationProperty
newValue SchedulerConfigurationProperty {Maybe (Value Integer)
()
haddock_workaround_ :: SchedulerConfigurationProperty -> ()
maxConcurrentRuns :: SchedulerConfigurationProperty -> Maybe (Value Integer)
queueTimeoutMinutes :: SchedulerConfigurationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
maxConcurrentRuns :: Maybe (Value Integer)
queueTimeoutMinutes :: Maybe (Value Integer)
..}
= SchedulerConfigurationProperty
{queueTimeoutMinutes :: Maybe (Value Integer)
queueTimeoutMinutes = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "QueueTimeoutMinutes" SchedulerConfigurationProperty
Value Integer
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
maxConcurrentRuns :: Maybe (Value Integer)
haddock_workaround_ :: ()
maxConcurrentRuns :: Maybe (Value Integer)
..}