module Stratosphere.EMRServerless.Application.AutoStopConfigurationProperty (
        AutoStopConfigurationProperty(..), mkAutoStopConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AutoStopConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrserverless-application-autostopconfiguration.html>
    AutoStopConfigurationProperty {AutoStopConfigurationProperty -> ()
haddock_workaround_ :: (),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrserverless-application-autostopconfiguration.html#cfn-emrserverless-application-autostopconfiguration-enabled>
                                   AutoStopConfigurationProperty -> Maybe (Value Bool)
enabled :: (Prelude.Maybe (Value Prelude.Bool)),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrserverless-application-autostopconfiguration.html#cfn-emrserverless-application-autostopconfiguration-idletimeoutminutes>
                                   AutoStopConfigurationProperty -> Maybe (Value Integer)
idleTimeoutMinutes :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (AutoStopConfigurationProperty
-> AutoStopConfigurationProperty -> Bool
(AutoStopConfigurationProperty
 -> AutoStopConfigurationProperty -> Bool)
-> (AutoStopConfigurationProperty
    -> AutoStopConfigurationProperty -> Bool)
-> Eq AutoStopConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AutoStopConfigurationProperty
-> AutoStopConfigurationProperty -> Bool
== :: AutoStopConfigurationProperty
-> AutoStopConfigurationProperty -> Bool
$c/= :: AutoStopConfigurationProperty
-> AutoStopConfigurationProperty -> Bool
/= :: AutoStopConfigurationProperty
-> AutoStopConfigurationProperty -> Bool
Prelude.Eq, Int -> AutoStopConfigurationProperty -> ShowS
[AutoStopConfigurationProperty] -> ShowS
AutoStopConfigurationProperty -> String
(Int -> AutoStopConfigurationProperty -> ShowS)
-> (AutoStopConfigurationProperty -> String)
-> ([AutoStopConfigurationProperty] -> ShowS)
-> Show AutoStopConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AutoStopConfigurationProperty -> ShowS
showsPrec :: Int -> AutoStopConfigurationProperty -> ShowS
$cshow :: AutoStopConfigurationProperty -> String
show :: AutoStopConfigurationProperty -> String
$cshowList :: [AutoStopConfigurationProperty] -> ShowS
showList :: [AutoStopConfigurationProperty] -> ShowS
Prelude.Show)
mkAutoStopConfigurationProperty :: AutoStopConfigurationProperty
mkAutoStopConfigurationProperty :: AutoStopConfigurationProperty
mkAutoStopConfigurationProperty
  = AutoStopConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), enabled :: Maybe (Value Bool)
enabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
       idleTimeoutMinutes :: Maybe (Value Integer)
idleTimeoutMinutes = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AutoStopConfigurationProperty where
  toResourceProperties :: AutoStopConfigurationProperty -> ResourceProperties
toResourceProperties AutoStopConfigurationProperty {Maybe (Value Bool)
Maybe (Value Integer)
()
haddock_workaround_ :: AutoStopConfigurationProperty -> ()
enabled :: AutoStopConfigurationProperty -> Maybe (Value Bool)
idleTimeoutMinutes :: AutoStopConfigurationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
idleTimeoutMinutes :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EMRServerless::Application.AutoStopConfiguration",
         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,
                            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
"IdleTimeoutMinutes" (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)
idleTimeoutMinutes])}
instance JSON.ToJSON AutoStopConfigurationProperty where
  toJSON :: AutoStopConfigurationProperty -> Value
toJSON AutoStopConfigurationProperty {Maybe (Value Bool)
Maybe (Value Integer)
()
haddock_workaround_ :: AutoStopConfigurationProperty -> ()
enabled :: AutoStopConfigurationProperty -> Maybe (Value Bool)
idleTimeoutMinutes :: AutoStopConfigurationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
idleTimeoutMinutes :: 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 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,
               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
"IdleTimeoutMinutes" (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)
idleTimeoutMinutes]))
instance Property "Enabled" AutoStopConfigurationProperty where
  type PropertyType "Enabled" AutoStopConfigurationProperty = Value Prelude.Bool
  set :: PropertyType "Enabled" AutoStopConfigurationProperty
-> AutoStopConfigurationProperty -> AutoStopConfigurationProperty
set PropertyType "Enabled" AutoStopConfigurationProperty
newValue AutoStopConfigurationProperty {Maybe (Value Bool)
Maybe (Value Integer)
()
haddock_workaround_ :: AutoStopConfigurationProperty -> ()
enabled :: AutoStopConfigurationProperty -> Maybe (Value Bool)
idleTimeoutMinutes :: AutoStopConfigurationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
idleTimeoutMinutes :: Maybe (Value Integer)
..}
    = AutoStopConfigurationProperty
        {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" AutoStopConfigurationProperty
Value Bool
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
idleTimeoutMinutes :: Maybe (Value Integer)
haddock_workaround_ :: ()
idleTimeoutMinutes :: Maybe (Value Integer)
..}
instance Property "IdleTimeoutMinutes" AutoStopConfigurationProperty where
  type PropertyType "IdleTimeoutMinutes" AutoStopConfigurationProperty = Value Prelude.Integer
  set :: PropertyType "IdleTimeoutMinutes" AutoStopConfigurationProperty
-> AutoStopConfigurationProperty -> AutoStopConfigurationProperty
set PropertyType "IdleTimeoutMinutes" AutoStopConfigurationProperty
newValue AutoStopConfigurationProperty {Maybe (Value Bool)
Maybe (Value Integer)
()
haddock_workaround_ :: AutoStopConfigurationProperty -> ()
enabled :: AutoStopConfigurationProperty -> Maybe (Value Bool)
idleTimeoutMinutes :: AutoStopConfigurationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
idleTimeoutMinutes :: Maybe (Value Integer)
..}
    = AutoStopConfigurationProperty
        {idleTimeoutMinutes :: Maybe (Value Integer)
idleTimeoutMinutes = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "IdleTimeoutMinutes" AutoStopConfigurationProperty
Value Integer
newValue, Maybe (Value Bool)
()
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
..}