module Stratosphere.AppMesh.Route.GrpcRetryPolicyProperty (
module Exports, GrpcRetryPolicyProperty(..),
mkGrpcRetryPolicyProperty
) 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
import Stratosphere.Value
data GrpcRetryPolicyProperty
=
GrpcRetryPolicyProperty {GrpcRetryPolicyProperty -> ()
haddock_workaround_ :: (),
GrpcRetryPolicyProperty -> Maybe (ValueList Text)
grpcRetryEvents :: (Prelude.Maybe (ValueList Prelude.Text)),
GrpcRetryPolicyProperty -> Maybe (ValueList Text)
httpRetryEvents :: (Prelude.Maybe (ValueList Prelude.Text)),
GrpcRetryPolicyProperty -> Value Integer
maxRetries :: (Value Prelude.Integer),
GrpcRetryPolicyProperty -> DurationProperty
perRetryTimeout :: DurationProperty,
GrpcRetryPolicyProperty -> Maybe (ValueList Text)
tcpRetryEvents :: (Prelude.Maybe (ValueList Prelude.Text))}
deriving stock (GrpcRetryPolicyProperty -> GrpcRetryPolicyProperty -> Bool
(GrpcRetryPolicyProperty -> GrpcRetryPolicyProperty -> Bool)
-> (GrpcRetryPolicyProperty -> GrpcRetryPolicyProperty -> Bool)
-> Eq GrpcRetryPolicyProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GrpcRetryPolicyProperty -> GrpcRetryPolicyProperty -> Bool
== :: GrpcRetryPolicyProperty -> GrpcRetryPolicyProperty -> Bool
$c/= :: GrpcRetryPolicyProperty -> GrpcRetryPolicyProperty -> Bool
/= :: GrpcRetryPolicyProperty -> GrpcRetryPolicyProperty -> Bool
Prelude.Eq, Int -> GrpcRetryPolicyProperty -> ShowS
[GrpcRetryPolicyProperty] -> ShowS
GrpcRetryPolicyProperty -> String
(Int -> GrpcRetryPolicyProperty -> ShowS)
-> (GrpcRetryPolicyProperty -> String)
-> ([GrpcRetryPolicyProperty] -> ShowS)
-> Show GrpcRetryPolicyProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GrpcRetryPolicyProperty -> ShowS
showsPrec :: Int -> GrpcRetryPolicyProperty -> ShowS
$cshow :: GrpcRetryPolicyProperty -> String
show :: GrpcRetryPolicyProperty -> String
$cshowList :: [GrpcRetryPolicyProperty] -> ShowS
showList :: [GrpcRetryPolicyProperty] -> ShowS
Prelude.Show)
mkGrpcRetryPolicyProperty ::
Value Prelude.Integer
-> DurationProperty -> GrpcRetryPolicyProperty
mkGrpcRetryPolicyProperty :: Value Integer -> DurationProperty -> GrpcRetryPolicyProperty
mkGrpcRetryPolicyProperty Value Integer
maxRetries DurationProperty
perRetryTimeout
= GrpcRetryPolicyProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), maxRetries :: Value Integer
maxRetries = Value Integer
maxRetries,
perRetryTimeout :: DurationProperty
perRetryTimeout = DurationProperty
perRetryTimeout,
grpcRetryEvents :: Maybe (ValueList Text)
grpcRetryEvents = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing,
httpRetryEvents :: Maybe (ValueList Text)
httpRetryEvents = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing,
tcpRetryEvents :: Maybe (ValueList Text)
tcpRetryEvents = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties GrpcRetryPolicyProperty where
toResourceProperties :: GrpcRetryPolicyProperty -> ResourceProperties
toResourceProperties GrpcRetryPolicyProperty {Maybe (ValueList Text)
()
Value Integer
DurationProperty
haddock_workaround_ :: GrpcRetryPolicyProperty -> ()
grpcRetryEvents :: GrpcRetryPolicyProperty -> Maybe (ValueList Text)
httpRetryEvents :: GrpcRetryPolicyProperty -> Maybe (ValueList Text)
maxRetries :: GrpcRetryPolicyProperty -> Value Integer
perRetryTimeout :: GrpcRetryPolicyProperty -> DurationProperty
tcpRetryEvents :: GrpcRetryPolicyProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
grpcRetryEvents :: Maybe (ValueList Text)
httpRetryEvents :: Maybe (ValueList Text)
maxRetries :: Value Integer
perRetryTimeout :: DurationProperty
tcpRetryEvents :: Maybe (ValueList Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::AppMesh::Route.GrpcRetryPolicy",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"MaxRetries" 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..= Value Integer
maxRetries,
Key
"PerRetryTimeout" 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..= DurationProperty
perRetryTimeout]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"GrpcRetryEvents" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
grpcRetryEvents,
Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"HttpRetryEvents" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
httpRetryEvents,
Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TcpRetryEvents" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
tcpRetryEvents]))}
instance JSON.ToJSON GrpcRetryPolicyProperty where
toJSON :: GrpcRetryPolicyProperty -> Value
toJSON GrpcRetryPolicyProperty {Maybe (ValueList Text)
()
Value Integer
DurationProperty
haddock_workaround_ :: GrpcRetryPolicyProperty -> ()
grpcRetryEvents :: GrpcRetryPolicyProperty -> Maybe (ValueList Text)
httpRetryEvents :: GrpcRetryPolicyProperty -> Maybe (ValueList Text)
maxRetries :: GrpcRetryPolicyProperty -> Value Integer
perRetryTimeout :: GrpcRetryPolicyProperty -> DurationProperty
tcpRetryEvents :: GrpcRetryPolicyProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
grpcRetryEvents :: Maybe (ValueList Text)
httpRetryEvents :: Maybe (ValueList Text)
maxRetries :: Value Integer
perRetryTimeout :: DurationProperty
tcpRetryEvents :: Maybe (ValueList Text)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"MaxRetries" 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..= Value Integer
maxRetries,
Key
"PerRetryTimeout" 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..= DurationProperty
perRetryTimeout]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"GrpcRetryEvents" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
grpcRetryEvents,
Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"HttpRetryEvents" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
httpRetryEvents,
Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TcpRetryEvents" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
tcpRetryEvents])))
instance Property "GrpcRetryEvents" GrpcRetryPolicyProperty where
type PropertyType "GrpcRetryEvents" GrpcRetryPolicyProperty = ValueList Prelude.Text
set :: PropertyType "GrpcRetryEvents" GrpcRetryPolicyProperty
-> GrpcRetryPolicyProperty -> GrpcRetryPolicyProperty
set PropertyType "GrpcRetryEvents" GrpcRetryPolicyProperty
newValue GrpcRetryPolicyProperty {Maybe (ValueList Text)
()
Value Integer
DurationProperty
haddock_workaround_ :: GrpcRetryPolicyProperty -> ()
grpcRetryEvents :: GrpcRetryPolicyProperty -> Maybe (ValueList Text)
httpRetryEvents :: GrpcRetryPolicyProperty -> Maybe (ValueList Text)
maxRetries :: GrpcRetryPolicyProperty -> Value Integer
perRetryTimeout :: GrpcRetryPolicyProperty -> DurationProperty
tcpRetryEvents :: GrpcRetryPolicyProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
grpcRetryEvents :: Maybe (ValueList Text)
httpRetryEvents :: Maybe (ValueList Text)
maxRetries :: Value Integer
perRetryTimeout :: DurationProperty
tcpRetryEvents :: Maybe (ValueList Text)
..}
= GrpcRetryPolicyProperty
{grpcRetryEvents :: Maybe (ValueList Text)
grpcRetryEvents = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "GrpcRetryEvents" GrpcRetryPolicyProperty
ValueList Text
newValue, Maybe (ValueList Text)
()
Value Integer
DurationProperty
haddock_workaround_ :: ()
httpRetryEvents :: Maybe (ValueList Text)
maxRetries :: Value Integer
perRetryTimeout :: DurationProperty
tcpRetryEvents :: Maybe (ValueList Text)
haddock_workaround_ :: ()
httpRetryEvents :: Maybe (ValueList Text)
maxRetries :: Value Integer
perRetryTimeout :: DurationProperty
tcpRetryEvents :: Maybe (ValueList Text)
..}
instance Property "HttpRetryEvents" GrpcRetryPolicyProperty where
type PropertyType "HttpRetryEvents" GrpcRetryPolicyProperty = ValueList Prelude.Text
set :: PropertyType "HttpRetryEvents" GrpcRetryPolicyProperty
-> GrpcRetryPolicyProperty -> GrpcRetryPolicyProperty
set PropertyType "HttpRetryEvents" GrpcRetryPolicyProperty
newValue GrpcRetryPolicyProperty {Maybe (ValueList Text)
()
Value Integer
DurationProperty
haddock_workaround_ :: GrpcRetryPolicyProperty -> ()
grpcRetryEvents :: GrpcRetryPolicyProperty -> Maybe (ValueList Text)
httpRetryEvents :: GrpcRetryPolicyProperty -> Maybe (ValueList Text)
maxRetries :: GrpcRetryPolicyProperty -> Value Integer
perRetryTimeout :: GrpcRetryPolicyProperty -> DurationProperty
tcpRetryEvents :: GrpcRetryPolicyProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
grpcRetryEvents :: Maybe (ValueList Text)
httpRetryEvents :: Maybe (ValueList Text)
maxRetries :: Value Integer
perRetryTimeout :: DurationProperty
tcpRetryEvents :: Maybe (ValueList Text)
..}
= GrpcRetryPolicyProperty
{httpRetryEvents :: Maybe (ValueList Text)
httpRetryEvents = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "HttpRetryEvents" GrpcRetryPolicyProperty
ValueList Text
newValue, Maybe (ValueList Text)
()
Value Integer
DurationProperty
haddock_workaround_ :: ()
grpcRetryEvents :: Maybe (ValueList Text)
maxRetries :: Value Integer
perRetryTimeout :: DurationProperty
tcpRetryEvents :: Maybe (ValueList Text)
haddock_workaround_ :: ()
grpcRetryEvents :: Maybe (ValueList Text)
maxRetries :: Value Integer
perRetryTimeout :: DurationProperty
tcpRetryEvents :: Maybe (ValueList Text)
..}
instance Property "MaxRetries" GrpcRetryPolicyProperty where
type PropertyType "MaxRetries" GrpcRetryPolicyProperty = Value Prelude.Integer
set :: PropertyType "MaxRetries" GrpcRetryPolicyProperty
-> GrpcRetryPolicyProperty -> GrpcRetryPolicyProperty
set PropertyType "MaxRetries" GrpcRetryPolicyProperty
newValue GrpcRetryPolicyProperty {Maybe (ValueList Text)
()
Value Integer
DurationProperty
haddock_workaround_ :: GrpcRetryPolicyProperty -> ()
grpcRetryEvents :: GrpcRetryPolicyProperty -> Maybe (ValueList Text)
httpRetryEvents :: GrpcRetryPolicyProperty -> Maybe (ValueList Text)
maxRetries :: GrpcRetryPolicyProperty -> Value Integer
perRetryTimeout :: GrpcRetryPolicyProperty -> DurationProperty
tcpRetryEvents :: GrpcRetryPolicyProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
grpcRetryEvents :: Maybe (ValueList Text)
httpRetryEvents :: Maybe (ValueList Text)
maxRetries :: Value Integer
perRetryTimeout :: DurationProperty
tcpRetryEvents :: Maybe (ValueList Text)
..}
= GrpcRetryPolicyProperty {maxRetries :: Value Integer
maxRetries = PropertyType "MaxRetries" GrpcRetryPolicyProperty
Value Integer
newValue, Maybe (ValueList Text)
()
DurationProperty
haddock_workaround_ :: ()
grpcRetryEvents :: Maybe (ValueList Text)
httpRetryEvents :: Maybe (ValueList Text)
perRetryTimeout :: DurationProperty
tcpRetryEvents :: Maybe (ValueList Text)
haddock_workaround_ :: ()
grpcRetryEvents :: Maybe (ValueList Text)
httpRetryEvents :: Maybe (ValueList Text)
perRetryTimeout :: DurationProperty
tcpRetryEvents :: Maybe (ValueList Text)
..}
instance Property "PerRetryTimeout" GrpcRetryPolicyProperty where
type PropertyType "PerRetryTimeout" GrpcRetryPolicyProperty = DurationProperty
set :: PropertyType "PerRetryTimeout" GrpcRetryPolicyProperty
-> GrpcRetryPolicyProperty -> GrpcRetryPolicyProperty
set PropertyType "PerRetryTimeout" GrpcRetryPolicyProperty
newValue GrpcRetryPolicyProperty {Maybe (ValueList Text)
()
Value Integer
DurationProperty
haddock_workaround_ :: GrpcRetryPolicyProperty -> ()
grpcRetryEvents :: GrpcRetryPolicyProperty -> Maybe (ValueList Text)
httpRetryEvents :: GrpcRetryPolicyProperty -> Maybe (ValueList Text)
maxRetries :: GrpcRetryPolicyProperty -> Value Integer
perRetryTimeout :: GrpcRetryPolicyProperty -> DurationProperty
tcpRetryEvents :: GrpcRetryPolicyProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
grpcRetryEvents :: Maybe (ValueList Text)
httpRetryEvents :: Maybe (ValueList Text)
maxRetries :: Value Integer
perRetryTimeout :: DurationProperty
tcpRetryEvents :: Maybe (ValueList Text)
..}
= GrpcRetryPolicyProperty {perRetryTimeout :: DurationProperty
perRetryTimeout = PropertyType "PerRetryTimeout" GrpcRetryPolicyProperty
DurationProperty
newValue, Maybe (ValueList Text)
()
Value Integer
haddock_workaround_ :: ()
grpcRetryEvents :: Maybe (ValueList Text)
httpRetryEvents :: Maybe (ValueList Text)
maxRetries :: Value Integer
tcpRetryEvents :: Maybe (ValueList Text)
haddock_workaround_ :: ()
grpcRetryEvents :: Maybe (ValueList Text)
httpRetryEvents :: Maybe (ValueList Text)
maxRetries :: Value Integer
tcpRetryEvents :: Maybe (ValueList Text)
..}
instance Property "TcpRetryEvents" GrpcRetryPolicyProperty where
type PropertyType "TcpRetryEvents" GrpcRetryPolicyProperty = ValueList Prelude.Text
set :: PropertyType "TcpRetryEvents" GrpcRetryPolicyProperty
-> GrpcRetryPolicyProperty -> GrpcRetryPolicyProperty
set PropertyType "TcpRetryEvents" GrpcRetryPolicyProperty
newValue GrpcRetryPolicyProperty {Maybe (ValueList Text)
()
Value Integer
DurationProperty
haddock_workaround_ :: GrpcRetryPolicyProperty -> ()
grpcRetryEvents :: GrpcRetryPolicyProperty -> Maybe (ValueList Text)
httpRetryEvents :: GrpcRetryPolicyProperty -> Maybe (ValueList Text)
maxRetries :: GrpcRetryPolicyProperty -> Value Integer
perRetryTimeout :: GrpcRetryPolicyProperty -> DurationProperty
tcpRetryEvents :: GrpcRetryPolicyProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
grpcRetryEvents :: Maybe (ValueList Text)
httpRetryEvents :: Maybe (ValueList Text)
maxRetries :: Value Integer
perRetryTimeout :: DurationProperty
tcpRetryEvents :: Maybe (ValueList Text)
..}
= GrpcRetryPolicyProperty
{tcpRetryEvents :: Maybe (ValueList Text)
tcpRetryEvents = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TcpRetryEvents" GrpcRetryPolicyProperty
ValueList Text
newValue, Maybe (ValueList Text)
()
Value Integer
DurationProperty
haddock_workaround_ :: ()
grpcRetryEvents :: Maybe (ValueList Text)
httpRetryEvents :: Maybe (ValueList Text)
maxRetries :: Value Integer
perRetryTimeout :: DurationProperty
haddock_workaround_ :: ()
grpcRetryEvents :: Maybe (ValueList Text)
httpRetryEvents :: Maybe (ValueList Text)
maxRetries :: Value Integer
perRetryTimeout :: DurationProperty
..}