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