module Stratosphere.EMRServerless.Application.AutoStartConfigurationProperty (
AutoStartConfigurationProperty(..),
mkAutoStartConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AutoStartConfigurationProperty
=
AutoStartConfigurationProperty {AutoStartConfigurationProperty -> ()
haddock_workaround_ :: (),
AutoStartConfigurationProperty -> Maybe (Value Bool)
enabled :: (Prelude.Maybe (Value Prelude.Bool))}
deriving stock (AutoStartConfigurationProperty
-> AutoStartConfigurationProperty -> Bool
(AutoStartConfigurationProperty
-> AutoStartConfigurationProperty -> Bool)
-> (AutoStartConfigurationProperty
-> AutoStartConfigurationProperty -> Bool)
-> Eq AutoStartConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AutoStartConfigurationProperty
-> AutoStartConfigurationProperty -> Bool
== :: AutoStartConfigurationProperty
-> AutoStartConfigurationProperty -> Bool
$c/= :: AutoStartConfigurationProperty
-> AutoStartConfigurationProperty -> Bool
/= :: AutoStartConfigurationProperty
-> AutoStartConfigurationProperty -> Bool
Prelude.Eq, Int -> AutoStartConfigurationProperty -> ShowS
[AutoStartConfigurationProperty] -> ShowS
AutoStartConfigurationProperty -> String
(Int -> AutoStartConfigurationProperty -> ShowS)
-> (AutoStartConfigurationProperty -> String)
-> ([AutoStartConfigurationProperty] -> ShowS)
-> Show AutoStartConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AutoStartConfigurationProperty -> ShowS
showsPrec :: Int -> AutoStartConfigurationProperty -> ShowS
$cshow :: AutoStartConfigurationProperty -> String
show :: AutoStartConfigurationProperty -> String
$cshowList :: [AutoStartConfigurationProperty] -> ShowS
showList :: [AutoStartConfigurationProperty] -> ShowS
Prelude.Show)
mkAutoStartConfigurationProperty :: AutoStartConfigurationProperty
mkAutoStartConfigurationProperty :: AutoStartConfigurationProperty
mkAutoStartConfigurationProperty
= AutoStartConfigurationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), enabled :: Maybe (Value Bool)
enabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AutoStartConfigurationProperty where
toResourceProperties :: AutoStartConfigurationProperty -> ResourceProperties
toResourceProperties AutoStartConfigurationProperty {Maybe (Value Bool)
()
haddock_workaround_ :: AutoStartConfigurationProperty -> ()
enabled :: AutoStartConfigurationProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::EMRServerless::Application.AutoStartConfiguration",
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 Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Enabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
enabled])}
instance JSON.ToJSON AutoStartConfigurationProperty where
toJSON :: AutoStartConfigurationProperty -> Value
toJSON AutoStartConfigurationProperty {Maybe (Value Bool)
()
haddock_workaround_ :: AutoStartConfigurationProperty -> ()
enabled :: AutoStartConfigurationProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
..}
= [(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 Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Enabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
enabled]))
instance Property "Enabled" AutoStartConfigurationProperty where
type PropertyType "Enabled" AutoStartConfigurationProperty = Value Prelude.Bool
set :: PropertyType "Enabled" AutoStartConfigurationProperty
-> AutoStartConfigurationProperty -> AutoStartConfigurationProperty
set PropertyType "Enabled" AutoStartConfigurationProperty
newValue AutoStartConfigurationProperty {Maybe (Value Bool)
()
haddock_workaround_ :: AutoStartConfigurationProperty -> ()
enabled :: AutoStartConfigurationProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
..}
= AutoStartConfigurationProperty
{enabled :: Maybe (Value Bool)
enabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Enabled" AutoStartConfigurationProperty
Value Bool
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}