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