module Stratosphere.AppMesh.Route.HttpTimeoutProperty (
module Exports, HttpTimeoutProperty(..), mkHttpTimeoutProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.AppMesh.Route.DurationProperty as Exports
import Stratosphere.ResourceProperties
data HttpTimeoutProperty
=
HttpTimeoutProperty {HttpTimeoutProperty -> ()
haddock_workaround_ :: (),
HttpTimeoutProperty -> Maybe DurationProperty
idle :: (Prelude.Maybe DurationProperty),
HttpTimeoutProperty -> Maybe DurationProperty
perRequest :: (Prelude.Maybe DurationProperty)}
deriving stock (HttpTimeoutProperty -> HttpTimeoutProperty -> Bool
(HttpTimeoutProperty -> HttpTimeoutProperty -> Bool)
-> (HttpTimeoutProperty -> HttpTimeoutProperty -> Bool)
-> Eq HttpTimeoutProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: HttpTimeoutProperty -> HttpTimeoutProperty -> Bool
== :: HttpTimeoutProperty -> HttpTimeoutProperty -> Bool
$c/= :: HttpTimeoutProperty -> HttpTimeoutProperty -> Bool
/= :: HttpTimeoutProperty -> HttpTimeoutProperty -> Bool
Prelude.Eq, Int -> HttpTimeoutProperty -> ShowS
[HttpTimeoutProperty] -> ShowS
HttpTimeoutProperty -> String
(Int -> HttpTimeoutProperty -> ShowS)
-> (HttpTimeoutProperty -> String)
-> ([HttpTimeoutProperty] -> ShowS)
-> Show HttpTimeoutProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> HttpTimeoutProperty -> ShowS
showsPrec :: Int -> HttpTimeoutProperty -> ShowS
$cshow :: HttpTimeoutProperty -> String
show :: HttpTimeoutProperty -> String
$cshowList :: [HttpTimeoutProperty] -> ShowS
showList :: [HttpTimeoutProperty] -> ShowS
Prelude.Show)
mkHttpTimeoutProperty :: HttpTimeoutProperty
mkHttpTimeoutProperty :: HttpTimeoutProperty
mkHttpTimeoutProperty
= HttpTimeoutProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), idle :: Maybe DurationProperty
idle = Maybe DurationProperty
forall a. Maybe a
Prelude.Nothing,
perRequest :: Maybe DurationProperty
perRequest = Maybe DurationProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties HttpTimeoutProperty where
toResourceProperties :: HttpTimeoutProperty -> ResourceProperties
toResourceProperties HttpTimeoutProperty {Maybe DurationProperty
()
haddock_workaround_ :: HttpTimeoutProperty -> ()
idle :: HttpTimeoutProperty -> Maybe DurationProperty
perRequest :: HttpTimeoutProperty -> Maybe DurationProperty
haddock_workaround_ :: ()
idle :: Maybe DurationProperty
perRequest :: Maybe DurationProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::AppMesh::Route.HttpTimeout",
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 -> DurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Idle" (DurationProperty -> (Key, Value))
-> Maybe DurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DurationProperty
idle,
Key -> DurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PerRequest" (DurationProperty -> (Key, Value))
-> Maybe DurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DurationProperty
perRequest])}
instance JSON.ToJSON HttpTimeoutProperty where
toJSON :: HttpTimeoutProperty -> Value
toJSON HttpTimeoutProperty {Maybe DurationProperty
()
haddock_workaround_ :: HttpTimeoutProperty -> ()
idle :: HttpTimeoutProperty -> Maybe DurationProperty
perRequest :: HttpTimeoutProperty -> Maybe DurationProperty
haddock_workaround_ :: ()
idle :: Maybe DurationProperty
perRequest :: Maybe DurationProperty
..}
= [(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 -> DurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Idle" (DurationProperty -> (Key, Value))
-> Maybe DurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DurationProperty
idle,
Key -> DurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PerRequest" (DurationProperty -> (Key, Value))
-> Maybe DurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DurationProperty
perRequest]))
instance Property "Idle" HttpTimeoutProperty where
type PropertyType "Idle" HttpTimeoutProperty = DurationProperty
set :: PropertyType "Idle" HttpTimeoutProperty
-> HttpTimeoutProperty -> HttpTimeoutProperty
set PropertyType "Idle" HttpTimeoutProperty
newValue HttpTimeoutProperty {Maybe DurationProperty
()
haddock_workaround_ :: HttpTimeoutProperty -> ()
idle :: HttpTimeoutProperty -> Maybe DurationProperty
perRequest :: HttpTimeoutProperty -> Maybe DurationProperty
haddock_workaround_ :: ()
idle :: Maybe DurationProperty
perRequest :: Maybe DurationProperty
..}
= HttpTimeoutProperty {idle :: Maybe DurationProperty
idle = DurationProperty -> Maybe DurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Idle" HttpTimeoutProperty
DurationProperty
newValue, Maybe DurationProperty
()
haddock_workaround_ :: ()
perRequest :: Maybe DurationProperty
haddock_workaround_ :: ()
perRequest :: Maybe DurationProperty
..}
instance Property "PerRequest" HttpTimeoutProperty where
type PropertyType "PerRequest" HttpTimeoutProperty = DurationProperty
set :: PropertyType "PerRequest" HttpTimeoutProperty
-> HttpTimeoutProperty -> HttpTimeoutProperty
set PropertyType "PerRequest" HttpTimeoutProperty
newValue HttpTimeoutProperty {Maybe DurationProperty
()
haddock_workaround_ :: HttpTimeoutProperty -> ()
idle :: HttpTimeoutProperty -> Maybe DurationProperty
perRequest :: HttpTimeoutProperty -> Maybe DurationProperty
haddock_workaround_ :: ()
idle :: Maybe DurationProperty
perRequest :: Maybe DurationProperty
..}
= HttpTimeoutProperty {perRequest :: Maybe DurationProperty
perRequest = DurationProperty -> Maybe DurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PerRequest" HttpTimeoutProperty
DurationProperty
newValue, Maybe DurationProperty
()
haddock_workaround_ :: ()
idle :: Maybe DurationProperty
haddock_workaround_ :: ()
idle :: Maybe DurationProperty
..}