{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.AppMesh.Types.VirtualGatewayHealthCheckPolicy where
import Amazonka.AppMesh.Types.VirtualGatewayPortProtocol
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data VirtualGatewayHealthCheckPolicy = VirtualGatewayHealthCheckPolicy'
{
VirtualGatewayHealthCheckPolicy -> Maybe Text
path :: Prelude.Maybe Prelude.Text,
VirtualGatewayHealthCheckPolicy -> Maybe Natural
port :: Prelude.Maybe Prelude.Natural,
VirtualGatewayHealthCheckPolicy -> Natural
healthyThreshold :: Prelude.Natural,
VirtualGatewayHealthCheckPolicy -> Natural
intervalMillis :: Prelude.Natural,
VirtualGatewayHealthCheckPolicy -> VirtualGatewayPortProtocol
protocol :: VirtualGatewayPortProtocol,
VirtualGatewayHealthCheckPolicy -> Natural
timeoutMillis :: Prelude.Natural,
VirtualGatewayHealthCheckPolicy -> Natural
unhealthyThreshold :: Prelude.Natural
}
deriving (VirtualGatewayHealthCheckPolicy
-> VirtualGatewayHealthCheckPolicy -> Bool
(VirtualGatewayHealthCheckPolicy
-> VirtualGatewayHealthCheckPolicy -> Bool)
-> (VirtualGatewayHealthCheckPolicy
-> VirtualGatewayHealthCheckPolicy -> Bool)
-> Eq VirtualGatewayHealthCheckPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VirtualGatewayHealthCheckPolicy
-> VirtualGatewayHealthCheckPolicy -> Bool
$c/= :: VirtualGatewayHealthCheckPolicy
-> VirtualGatewayHealthCheckPolicy -> Bool
== :: VirtualGatewayHealthCheckPolicy
-> VirtualGatewayHealthCheckPolicy -> Bool
$c== :: VirtualGatewayHealthCheckPolicy
-> VirtualGatewayHealthCheckPolicy -> Bool
Prelude.Eq, ReadPrec [VirtualGatewayHealthCheckPolicy]
ReadPrec VirtualGatewayHealthCheckPolicy
Int -> ReadS VirtualGatewayHealthCheckPolicy
ReadS [VirtualGatewayHealthCheckPolicy]
(Int -> ReadS VirtualGatewayHealthCheckPolicy)
-> ReadS [VirtualGatewayHealthCheckPolicy]
-> ReadPrec VirtualGatewayHealthCheckPolicy
-> ReadPrec [VirtualGatewayHealthCheckPolicy]
-> Read VirtualGatewayHealthCheckPolicy
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VirtualGatewayHealthCheckPolicy]
$creadListPrec :: ReadPrec [VirtualGatewayHealthCheckPolicy]
readPrec :: ReadPrec VirtualGatewayHealthCheckPolicy
$creadPrec :: ReadPrec VirtualGatewayHealthCheckPolicy
readList :: ReadS [VirtualGatewayHealthCheckPolicy]
$creadList :: ReadS [VirtualGatewayHealthCheckPolicy]
readsPrec :: Int -> ReadS VirtualGatewayHealthCheckPolicy
$creadsPrec :: Int -> ReadS VirtualGatewayHealthCheckPolicy
Prelude.Read, Int -> VirtualGatewayHealthCheckPolicy -> ShowS
[VirtualGatewayHealthCheckPolicy] -> ShowS
VirtualGatewayHealthCheckPolicy -> String
(Int -> VirtualGatewayHealthCheckPolicy -> ShowS)
-> (VirtualGatewayHealthCheckPolicy -> String)
-> ([VirtualGatewayHealthCheckPolicy] -> ShowS)
-> Show VirtualGatewayHealthCheckPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VirtualGatewayHealthCheckPolicy] -> ShowS
$cshowList :: [VirtualGatewayHealthCheckPolicy] -> ShowS
show :: VirtualGatewayHealthCheckPolicy -> String
$cshow :: VirtualGatewayHealthCheckPolicy -> String
showsPrec :: Int -> VirtualGatewayHealthCheckPolicy -> ShowS
$cshowsPrec :: Int -> VirtualGatewayHealthCheckPolicy -> ShowS
Prelude.Show, (forall x.
VirtualGatewayHealthCheckPolicy
-> Rep VirtualGatewayHealthCheckPolicy x)
-> (forall x.
Rep VirtualGatewayHealthCheckPolicy x
-> VirtualGatewayHealthCheckPolicy)
-> Generic VirtualGatewayHealthCheckPolicy
forall x.
Rep VirtualGatewayHealthCheckPolicy x
-> VirtualGatewayHealthCheckPolicy
forall x.
VirtualGatewayHealthCheckPolicy
-> Rep VirtualGatewayHealthCheckPolicy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep VirtualGatewayHealthCheckPolicy x
-> VirtualGatewayHealthCheckPolicy
$cfrom :: forall x.
VirtualGatewayHealthCheckPolicy
-> Rep VirtualGatewayHealthCheckPolicy x
Prelude.Generic)
newVirtualGatewayHealthCheckPolicy ::
Prelude.Natural ->
Prelude.Natural ->
VirtualGatewayPortProtocol ->
Prelude.Natural ->
Prelude.Natural ->
VirtualGatewayHealthCheckPolicy
newVirtualGatewayHealthCheckPolicy :: Natural
-> Natural
-> VirtualGatewayPortProtocol
-> Natural
-> Natural
-> VirtualGatewayHealthCheckPolicy
newVirtualGatewayHealthCheckPolicy
Natural
pHealthyThreshold_
Natural
pIntervalMillis_
VirtualGatewayPortProtocol
pProtocol_
Natural
pTimeoutMillis_
Natural
pUnhealthyThreshold_ =
VirtualGatewayHealthCheckPolicy' :: Maybe Text
-> Maybe Natural
-> Natural
-> Natural
-> VirtualGatewayPortProtocol
-> Natural
-> Natural
-> VirtualGatewayHealthCheckPolicy
VirtualGatewayHealthCheckPolicy'
{ $sel:path:VirtualGatewayHealthCheckPolicy' :: Maybe Text
path =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:port:VirtualGatewayHealthCheckPolicy' :: Maybe Natural
port = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:healthyThreshold:VirtualGatewayHealthCheckPolicy' :: Natural
healthyThreshold = Natural
pHealthyThreshold_,
$sel:intervalMillis:VirtualGatewayHealthCheckPolicy' :: Natural
intervalMillis = Natural
pIntervalMillis_,
$sel:protocol:VirtualGatewayHealthCheckPolicy' :: VirtualGatewayPortProtocol
protocol = VirtualGatewayPortProtocol
pProtocol_,
$sel:timeoutMillis:VirtualGatewayHealthCheckPolicy' :: Natural
timeoutMillis = Natural
pTimeoutMillis_,
$sel:unhealthyThreshold:VirtualGatewayHealthCheckPolicy' :: Natural
unhealthyThreshold = Natural
pUnhealthyThreshold_
}
virtualGatewayHealthCheckPolicy_path :: Lens.Lens' VirtualGatewayHealthCheckPolicy (Prelude.Maybe Prelude.Text)
virtualGatewayHealthCheckPolicy_path :: (Maybe Text -> f (Maybe Text))
-> VirtualGatewayHealthCheckPolicy
-> f VirtualGatewayHealthCheckPolicy
virtualGatewayHealthCheckPolicy_path = (VirtualGatewayHealthCheckPolicy -> Maybe Text)
-> (VirtualGatewayHealthCheckPolicy
-> Maybe Text -> VirtualGatewayHealthCheckPolicy)
-> Lens
VirtualGatewayHealthCheckPolicy
VirtualGatewayHealthCheckPolicy
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualGatewayHealthCheckPolicy' {Maybe Text
path :: Maybe Text
$sel:path:VirtualGatewayHealthCheckPolicy' :: VirtualGatewayHealthCheckPolicy -> Maybe Text
path} -> Maybe Text
path) (\s :: VirtualGatewayHealthCheckPolicy
s@VirtualGatewayHealthCheckPolicy' {} Maybe Text
a -> VirtualGatewayHealthCheckPolicy
s {$sel:path:VirtualGatewayHealthCheckPolicy' :: Maybe Text
path = Maybe Text
a} :: VirtualGatewayHealthCheckPolicy)
virtualGatewayHealthCheckPolicy_port :: Lens.Lens' VirtualGatewayHealthCheckPolicy (Prelude.Maybe Prelude.Natural)
virtualGatewayHealthCheckPolicy_port :: (Maybe Natural -> f (Maybe Natural))
-> VirtualGatewayHealthCheckPolicy
-> f VirtualGatewayHealthCheckPolicy
virtualGatewayHealthCheckPolicy_port = (VirtualGatewayHealthCheckPolicy -> Maybe Natural)
-> (VirtualGatewayHealthCheckPolicy
-> Maybe Natural -> VirtualGatewayHealthCheckPolicy)
-> Lens
VirtualGatewayHealthCheckPolicy
VirtualGatewayHealthCheckPolicy
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualGatewayHealthCheckPolicy' {Maybe Natural
port :: Maybe Natural
$sel:port:VirtualGatewayHealthCheckPolicy' :: VirtualGatewayHealthCheckPolicy -> Maybe Natural
port} -> Maybe Natural
port) (\s :: VirtualGatewayHealthCheckPolicy
s@VirtualGatewayHealthCheckPolicy' {} Maybe Natural
a -> VirtualGatewayHealthCheckPolicy
s {$sel:port:VirtualGatewayHealthCheckPolicy' :: Maybe Natural
port = Maybe Natural
a} :: VirtualGatewayHealthCheckPolicy)
virtualGatewayHealthCheckPolicy_healthyThreshold :: Lens.Lens' VirtualGatewayHealthCheckPolicy Prelude.Natural
virtualGatewayHealthCheckPolicy_healthyThreshold :: (Natural -> f Natural)
-> VirtualGatewayHealthCheckPolicy
-> f VirtualGatewayHealthCheckPolicy
virtualGatewayHealthCheckPolicy_healthyThreshold = (VirtualGatewayHealthCheckPolicy -> Natural)
-> (VirtualGatewayHealthCheckPolicy
-> Natural -> VirtualGatewayHealthCheckPolicy)
-> Lens
VirtualGatewayHealthCheckPolicy
VirtualGatewayHealthCheckPolicy
Natural
Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualGatewayHealthCheckPolicy' {Natural
healthyThreshold :: Natural
$sel:healthyThreshold:VirtualGatewayHealthCheckPolicy' :: VirtualGatewayHealthCheckPolicy -> Natural
healthyThreshold} -> Natural
healthyThreshold) (\s :: VirtualGatewayHealthCheckPolicy
s@VirtualGatewayHealthCheckPolicy' {} Natural
a -> VirtualGatewayHealthCheckPolicy
s {$sel:healthyThreshold:VirtualGatewayHealthCheckPolicy' :: Natural
healthyThreshold = Natural
a} :: VirtualGatewayHealthCheckPolicy)
virtualGatewayHealthCheckPolicy_intervalMillis :: Lens.Lens' VirtualGatewayHealthCheckPolicy Prelude.Natural
virtualGatewayHealthCheckPolicy_intervalMillis :: (Natural -> f Natural)
-> VirtualGatewayHealthCheckPolicy
-> f VirtualGatewayHealthCheckPolicy
virtualGatewayHealthCheckPolicy_intervalMillis = (VirtualGatewayHealthCheckPolicy -> Natural)
-> (VirtualGatewayHealthCheckPolicy
-> Natural -> VirtualGatewayHealthCheckPolicy)
-> Lens
VirtualGatewayHealthCheckPolicy
VirtualGatewayHealthCheckPolicy
Natural
Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualGatewayHealthCheckPolicy' {Natural
intervalMillis :: Natural
$sel:intervalMillis:VirtualGatewayHealthCheckPolicy' :: VirtualGatewayHealthCheckPolicy -> Natural
intervalMillis} -> Natural
intervalMillis) (\s :: VirtualGatewayHealthCheckPolicy
s@VirtualGatewayHealthCheckPolicy' {} Natural
a -> VirtualGatewayHealthCheckPolicy
s {$sel:intervalMillis:VirtualGatewayHealthCheckPolicy' :: Natural
intervalMillis = Natural
a} :: VirtualGatewayHealthCheckPolicy)
virtualGatewayHealthCheckPolicy_protocol :: Lens.Lens' VirtualGatewayHealthCheckPolicy VirtualGatewayPortProtocol
virtualGatewayHealthCheckPolicy_protocol :: (VirtualGatewayPortProtocol -> f VirtualGatewayPortProtocol)
-> VirtualGatewayHealthCheckPolicy
-> f VirtualGatewayHealthCheckPolicy
virtualGatewayHealthCheckPolicy_protocol = (VirtualGatewayHealthCheckPolicy -> VirtualGatewayPortProtocol)
-> (VirtualGatewayHealthCheckPolicy
-> VirtualGatewayPortProtocol -> VirtualGatewayHealthCheckPolicy)
-> Lens
VirtualGatewayHealthCheckPolicy
VirtualGatewayHealthCheckPolicy
VirtualGatewayPortProtocol
VirtualGatewayPortProtocol
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualGatewayHealthCheckPolicy' {VirtualGatewayPortProtocol
protocol :: VirtualGatewayPortProtocol
$sel:protocol:VirtualGatewayHealthCheckPolicy' :: VirtualGatewayHealthCheckPolicy -> VirtualGatewayPortProtocol
protocol} -> VirtualGatewayPortProtocol
protocol) (\s :: VirtualGatewayHealthCheckPolicy
s@VirtualGatewayHealthCheckPolicy' {} VirtualGatewayPortProtocol
a -> VirtualGatewayHealthCheckPolicy
s {$sel:protocol:VirtualGatewayHealthCheckPolicy' :: VirtualGatewayPortProtocol
protocol = VirtualGatewayPortProtocol
a} :: VirtualGatewayHealthCheckPolicy)
virtualGatewayHealthCheckPolicy_timeoutMillis :: Lens.Lens' VirtualGatewayHealthCheckPolicy Prelude.Natural
virtualGatewayHealthCheckPolicy_timeoutMillis :: (Natural -> f Natural)
-> VirtualGatewayHealthCheckPolicy
-> f VirtualGatewayHealthCheckPolicy
virtualGatewayHealthCheckPolicy_timeoutMillis = (VirtualGatewayHealthCheckPolicy -> Natural)
-> (VirtualGatewayHealthCheckPolicy
-> Natural -> VirtualGatewayHealthCheckPolicy)
-> Lens
VirtualGatewayHealthCheckPolicy
VirtualGatewayHealthCheckPolicy
Natural
Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualGatewayHealthCheckPolicy' {Natural
timeoutMillis :: Natural
$sel:timeoutMillis:VirtualGatewayHealthCheckPolicy' :: VirtualGatewayHealthCheckPolicy -> Natural
timeoutMillis} -> Natural
timeoutMillis) (\s :: VirtualGatewayHealthCheckPolicy
s@VirtualGatewayHealthCheckPolicy' {} Natural
a -> VirtualGatewayHealthCheckPolicy
s {$sel:timeoutMillis:VirtualGatewayHealthCheckPolicy' :: Natural
timeoutMillis = Natural
a} :: VirtualGatewayHealthCheckPolicy)
virtualGatewayHealthCheckPolicy_unhealthyThreshold :: Lens.Lens' VirtualGatewayHealthCheckPolicy Prelude.Natural
virtualGatewayHealthCheckPolicy_unhealthyThreshold :: (Natural -> f Natural)
-> VirtualGatewayHealthCheckPolicy
-> f VirtualGatewayHealthCheckPolicy
virtualGatewayHealthCheckPolicy_unhealthyThreshold = (VirtualGatewayHealthCheckPolicy -> Natural)
-> (VirtualGatewayHealthCheckPolicy
-> Natural -> VirtualGatewayHealthCheckPolicy)
-> Lens
VirtualGatewayHealthCheckPolicy
VirtualGatewayHealthCheckPolicy
Natural
Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualGatewayHealthCheckPolicy' {Natural
unhealthyThreshold :: Natural
$sel:unhealthyThreshold:VirtualGatewayHealthCheckPolicy' :: VirtualGatewayHealthCheckPolicy -> Natural
unhealthyThreshold} -> Natural
unhealthyThreshold) (\s :: VirtualGatewayHealthCheckPolicy
s@VirtualGatewayHealthCheckPolicy' {} Natural
a -> VirtualGatewayHealthCheckPolicy
s {$sel:unhealthyThreshold:VirtualGatewayHealthCheckPolicy' :: Natural
unhealthyThreshold = Natural
a} :: VirtualGatewayHealthCheckPolicy)
instance
Core.FromJSON
VirtualGatewayHealthCheckPolicy
where
parseJSON :: Value -> Parser VirtualGatewayHealthCheckPolicy
parseJSON =
String
-> (Object -> Parser VirtualGatewayHealthCheckPolicy)
-> Value
-> Parser VirtualGatewayHealthCheckPolicy
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"VirtualGatewayHealthCheckPolicy"
( \Object
x ->
Maybe Text
-> Maybe Natural
-> Natural
-> Natural
-> VirtualGatewayPortProtocol
-> Natural
-> Natural
-> VirtualGatewayHealthCheckPolicy
VirtualGatewayHealthCheckPolicy'
(Maybe Text
-> Maybe Natural
-> Natural
-> Natural
-> VirtualGatewayPortProtocol
-> Natural
-> Natural
-> VirtualGatewayHealthCheckPolicy)
-> Parser (Maybe Text)
-> Parser
(Maybe Natural
-> Natural
-> Natural
-> VirtualGatewayPortProtocol
-> Natural
-> Natural
-> VirtualGatewayHealthCheckPolicy)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"path")
Parser
(Maybe Natural
-> Natural
-> Natural
-> VirtualGatewayPortProtocol
-> Natural
-> Natural
-> VirtualGatewayHealthCheckPolicy)
-> Parser (Maybe Natural)
-> Parser
(Natural
-> Natural
-> VirtualGatewayPortProtocol
-> Natural
-> Natural
-> VirtualGatewayHealthCheckPolicy)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"port")
Parser
(Natural
-> Natural
-> VirtualGatewayPortProtocol
-> Natural
-> Natural
-> VirtualGatewayHealthCheckPolicy)
-> Parser Natural
-> Parser
(Natural
-> VirtualGatewayPortProtocol
-> Natural
-> Natural
-> VirtualGatewayHealthCheckPolicy)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Natural
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"healthyThreshold")
Parser
(Natural
-> VirtualGatewayPortProtocol
-> Natural
-> Natural
-> VirtualGatewayHealthCheckPolicy)
-> Parser Natural
-> Parser
(VirtualGatewayPortProtocol
-> Natural -> Natural -> VirtualGatewayHealthCheckPolicy)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Natural
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"intervalMillis")
Parser
(VirtualGatewayPortProtocol
-> Natural -> Natural -> VirtualGatewayHealthCheckPolicy)
-> Parser VirtualGatewayPortProtocol
-> Parser (Natural -> Natural -> VirtualGatewayHealthCheckPolicy)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser VirtualGatewayPortProtocol
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"protocol")
Parser (Natural -> Natural -> VirtualGatewayHealthCheckPolicy)
-> Parser Natural
-> Parser (Natural -> VirtualGatewayHealthCheckPolicy)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Natural
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"timeoutMillis")
Parser (Natural -> VirtualGatewayHealthCheckPolicy)
-> Parser Natural -> Parser VirtualGatewayHealthCheckPolicy
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Natural
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"unhealthyThreshold")
)
instance
Prelude.Hashable
VirtualGatewayHealthCheckPolicy
instance
Prelude.NFData
VirtualGatewayHealthCheckPolicy
instance Core.ToJSON VirtualGatewayHealthCheckPolicy where
toJSON :: VirtualGatewayHealthCheckPolicy -> Value
toJSON VirtualGatewayHealthCheckPolicy' {Natural
Maybe Natural
Maybe Text
VirtualGatewayPortProtocol
unhealthyThreshold :: Natural
timeoutMillis :: Natural
protocol :: VirtualGatewayPortProtocol
intervalMillis :: Natural
healthyThreshold :: Natural
port :: Maybe Natural
path :: Maybe Text
$sel:unhealthyThreshold:VirtualGatewayHealthCheckPolicy' :: VirtualGatewayHealthCheckPolicy -> Natural
$sel:timeoutMillis:VirtualGatewayHealthCheckPolicy' :: VirtualGatewayHealthCheckPolicy -> Natural
$sel:protocol:VirtualGatewayHealthCheckPolicy' :: VirtualGatewayHealthCheckPolicy -> VirtualGatewayPortProtocol
$sel:intervalMillis:VirtualGatewayHealthCheckPolicy' :: VirtualGatewayHealthCheckPolicy -> Natural
$sel:healthyThreshold:VirtualGatewayHealthCheckPolicy' :: VirtualGatewayHealthCheckPolicy -> Natural
$sel:port:VirtualGatewayHealthCheckPolicy' :: VirtualGatewayHealthCheckPolicy -> Maybe Natural
$sel:path:VirtualGatewayHealthCheckPolicy' :: VirtualGatewayHealthCheckPolicy -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"path" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
path,
(Text
"port" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
port,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"healthyThreshold" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Natural
healthyThreshold),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"intervalMillis" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Natural
intervalMillis),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"protocol" Text -> VirtualGatewayPortProtocol -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= VirtualGatewayPortProtocol
protocol),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"timeoutMillis" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Natural
timeoutMillis),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"unhealthyThreshold" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Natural
unhealthyThreshold)
]
)