module Stratosphere.AppMesh.Route.HttpRetryPolicyProperty (
        module Exports, HttpRetryPolicyProperty(..),
        mkHttpRetryPolicyProperty
    ) 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 HttpRetryPolicyProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-route-httpretrypolicy.html>
    HttpRetryPolicyProperty {HttpRetryPolicyProperty -> ()
haddock_workaround_ :: (),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-route-httpretrypolicy.html#cfn-appmesh-route-httpretrypolicy-httpretryevents>
                             HttpRetryPolicyProperty -> Maybe (ValueList Text)
httpRetryEvents :: (Prelude.Maybe (ValueList Prelude.Text)),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-route-httpretrypolicy.html#cfn-appmesh-route-httpretrypolicy-maxretries>
                             HttpRetryPolicyProperty -> Value Integer
maxRetries :: (Value Prelude.Integer),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-route-httpretrypolicy.html#cfn-appmesh-route-httpretrypolicy-perretrytimeout>
                             HttpRetryPolicyProperty -> DurationProperty
perRetryTimeout :: DurationProperty,
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-route-httpretrypolicy.html#cfn-appmesh-route-httpretrypolicy-tcpretryevents>
                             HttpRetryPolicyProperty -> Maybe (ValueList Text)
tcpRetryEvents :: (Prelude.Maybe (ValueList Prelude.Text))}
  deriving stock (HttpRetryPolicyProperty -> HttpRetryPolicyProperty -> Bool
(HttpRetryPolicyProperty -> HttpRetryPolicyProperty -> Bool)
-> (HttpRetryPolicyProperty -> HttpRetryPolicyProperty -> Bool)
-> Eq HttpRetryPolicyProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: HttpRetryPolicyProperty -> HttpRetryPolicyProperty -> Bool
== :: HttpRetryPolicyProperty -> HttpRetryPolicyProperty -> Bool
$c/= :: HttpRetryPolicyProperty -> HttpRetryPolicyProperty -> Bool
/= :: HttpRetryPolicyProperty -> HttpRetryPolicyProperty -> Bool
Prelude.Eq, Int -> HttpRetryPolicyProperty -> ShowS
[HttpRetryPolicyProperty] -> ShowS
HttpRetryPolicyProperty -> String
(Int -> HttpRetryPolicyProperty -> ShowS)
-> (HttpRetryPolicyProperty -> String)
-> ([HttpRetryPolicyProperty] -> ShowS)
-> Show HttpRetryPolicyProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> HttpRetryPolicyProperty -> ShowS
showsPrec :: Int -> HttpRetryPolicyProperty -> ShowS
$cshow :: HttpRetryPolicyProperty -> String
show :: HttpRetryPolicyProperty -> String
$cshowList :: [HttpRetryPolicyProperty] -> ShowS
showList :: [HttpRetryPolicyProperty] -> ShowS
Prelude.Show)
mkHttpRetryPolicyProperty ::
  Value Prelude.Integer
  -> DurationProperty -> HttpRetryPolicyProperty
mkHttpRetryPolicyProperty :: Value Integer -> DurationProperty -> HttpRetryPolicyProperty
mkHttpRetryPolicyProperty Value Integer
maxRetries DurationProperty
perRetryTimeout
  = HttpRetryPolicyProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), maxRetries :: Value Integer
maxRetries = Value Integer
maxRetries,
       perRetryTimeout :: DurationProperty
perRetryTimeout = DurationProperty
perRetryTimeout,
       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 HttpRetryPolicyProperty where
  toResourceProperties :: HttpRetryPolicyProperty -> ResourceProperties
toResourceProperties HttpRetryPolicyProperty {Maybe (ValueList Text)
()
Value Integer
DurationProperty
haddock_workaround_ :: HttpRetryPolicyProperty -> ()
httpRetryEvents :: HttpRetryPolicyProperty -> Maybe (ValueList Text)
maxRetries :: HttpRetryPolicyProperty -> Value Integer
perRetryTimeout :: HttpRetryPolicyProperty -> DurationProperty
tcpRetryEvents :: HttpRetryPolicyProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
httpRetryEvents :: Maybe (ValueList Text)
maxRetries :: Value Integer
perRetryTimeout :: DurationProperty
tcpRetryEvents :: Maybe (ValueList Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AppMesh::Route.HttpRetryPolicy",
         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
"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 HttpRetryPolicyProperty where
  toJSON :: HttpRetryPolicyProperty -> Value
toJSON HttpRetryPolicyProperty {Maybe (ValueList Text)
()
Value Integer
DurationProperty
haddock_workaround_ :: HttpRetryPolicyProperty -> ()
httpRetryEvents :: HttpRetryPolicyProperty -> Maybe (ValueList Text)
maxRetries :: HttpRetryPolicyProperty -> Value Integer
perRetryTimeout :: HttpRetryPolicyProperty -> DurationProperty
tcpRetryEvents :: HttpRetryPolicyProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
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
"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 "HttpRetryEvents" HttpRetryPolicyProperty where
  type PropertyType "HttpRetryEvents" HttpRetryPolicyProperty = ValueList Prelude.Text
  set :: PropertyType "HttpRetryEvents" HttpRetryPolicyProperty
-> HttpRetryPolicyProperty -> HttpRetryPolicyProperty
set PropertyType "HttpRetryEvents" HttpRetryPolicyProperty
newValue HttpRetryPolicyProperty {Maybe (ValueList Text)
()
Value Integer
DurationProperty
haddock_workaround_ :: HttpRetryPolicyProperty -> ()
httpRetryEvents :: HttpRetryPolicyProperty -> Maybe (ValueList Text)
maxRetries :: HttpRetryPolicyProperty -> Value Integer
perRetryTimeout :: HttpRetryPolicyProperty -> DurationProperty
tcpRetryEvents :: HttpRetryPolicyProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
httpRetryEvents :: Maybe (ValueList Text)
maxRetries :: Value Integer
perRetryTimeout :: DurationProperty
tcpRetryEvents :: Maybe (ValueList Text)
..}
    = HttpRetryPolicyProperty
        {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" HttpRetryPolicyProperty
ValueList Text
newValue, Maybe (ValueList Text)
()
Value Integer
DurationProperty
haddock_workaround_ :: ()
maxRetries :: Value Integer
perRetryTimeout :: DurationProperty
tcpRetryEvents :: Maybe (ValueList Text)
haddock_workaround_ :: ()
maxRetries :: Value Integer
perRetryTimeout :: DurationProperty
tcpRetryEvents :: Maybe (ValueList Text)
..}
instance Property "MaxRetries" HttpRetryPolicyProperty where
  type PropertyType "MaxRetries" HttpRetryPolicyProperty = Value Prelude.Integer
  set :: PropertyType "MaxRetries" HttpRetryPolicyProperty
-> HttpRetryPolicyProperty -> HttpRetryPolicyProperty
set PropertyType "MaxRetries" HttpRetryPolicyProperty
newValue HttpRetryPolicyProperty {Maybe (ValueList Text)
()
Value Integer
DurationProperty
haddock_workaround_ :: HttpRetryPolicyProperty -> ()
httpRetryEvents :: HttpRetryPolicyProperty -> Maybe (ValueList Text)
maxRetries :: HttpRetryPolicyProperty -> Value Integer
perRetryTimeout :: HttpRetryPolicyProperty -> DurationProperty
tcpRetryEvents :: HttpRetryPolicyProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
httpRetryEvents :: Maybe (ValueList Text)
maxRetries :: Value Integer
perRetryTimeout :: DurationProperty
tcpRetryEvents :: Maybe (ValueList Text)
..}
    = HttpRetryPolicyProperty {maxRetries :: Value Integer
maxRetries = PropertyType "MaxRetries" HttpRetryPolicyProperty
Value Integer
newValue, Maybe (ValueList Text)
()
DurationProperty
haddock_workaround_ :: ()
httpRetryEvents :: Maybe (ValueList Text)
perRetryTimeout :: DurationProperty
tcpRetryEvents :: Maybe (ValueList Text)
haddock_workaround_ :: ()
httpRetryEvents :: Maybe (ValueList Text)
perRetryTimeout :: DurationProperty
tcpRetryEvents :: Maybe (ValueList Text)
..}
instance Property "PerRetryTimeout" HttpRetryPolicyProperty where
  type PropertyType "PerRetryTimeout" HttpRetryPolicyProperty = DurationProperty
  set :: PropertyType "PerRetryTimeout" HttpRetryPolicyProperty
-> HttpRetryPolicyProperty -> HttpRetryPolicyProperty
set PropertyType "PerRetryTimeout" HttpRetryPolicyProperty
newValue HttpRetryPolicyProperty {Maybe (ValueList Text)
()
Value Integer
DurationProperty
haddock_workaround_ :: HttpRetryPolicyProperty -> ()
httpRetryEvents :: HttpRetryPolicyProperty -> Maybe (ValueList Text)
maxRetries :: HttpRetryPolicyProperty -> Value Integer
perRetryTimeout :: HttpRetryPolicyProperty -> DurationProperty
tcpRetryEvents :: HttpRetryPolicyProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
httpRetryEvents :: Maybe (ValueList Text)
maxRetries :: Value Integer
perRetryTimeout :: DurationProperty
tcpRetryEvents :: Maybe (ValueList Text)
..}
    = HttpRetryPolicyProperty {perRetryTimeout :: DurationProperty
perRetryTimeout = PropertyType "PerRetryTimeout" HttpRetryPolicyProperty
DurationProperty
newValue, Maybe (ValueList Text)
()
Value Integer
haddock_workaround_ :: ()
httpRetryEvents :: Maybe (ValueList Text)
maxRetries :: Value Integer
tcpRetryEvents :: Maybe (ValueList Text)
haddock_workaround_ :: ()
httpRetryEvents :: Maybe (ValueList Text)
maxRetries :: Value Integer
tcpRetryEvents :: Maybe (ValueList Text)
..}
instance Property "TcpRetryEvents" HttpRetryPolicyProperty where
  type PropertyType "TcpRetryEvents" HttpRetryPolicyProperty = ValueList Prelude.Text
  set :: PropertyType "TcpRetryEvents" HttpRetryPolicyProperty
-> HttpRetryPolicyProperty -> HttpRetryPolicyProperty
set PropertyType "TcpRetryEvents" HttpRetryPolicyProperty
newValue HttpRetryPolicyProperty {Maybe (ValueList Text)
()
Value Integer
DurationProperty
haddock_workaround_ :: HttpRetryPolicyProperty -> ()
httpRetryEvents :: HttpRetryPolicyProperty -> Maybe (ValueList Text)
maxRetries :: HttpRetryPolicyProperty -> Value Integer
perRetryTimeout :: HttpRetryPolicyProperty -> DurationProperty
tcpRetryEvents :: HttpRetryPolicyProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
httpRetryEvents :: Maybe (ValueList Text)
maxRetries :: Value Integer
perRetryTimeout :: DurationProperty
tcpRetryEvents :: Maybe (ValueList Text)
..}
    = HttpRetryPolicyProperty
        {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" HttpRetryPolicyProperty
ValueList Text
newValue, Maybe (ValueList Text)
()
Value Integer
DurationProperty
haddock_workaround_ :: ()
httpRetryEvents :: Maybe (ValueList Text)
maxRetries :: Value Integer
perRetryTimeout :: DurationProperty
haddock_workaround_ :: ()
httpRetryEvents :: Maybe (ValueList Text)
maxRetries :: Value Integer
perRetryTimeout :: DurationProperty
..}