{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.AppMesh.Types.HealthCheckPolicy
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.AppMesh.Types.HealthCheckPolicy where

import Amazonka.AppMesh.Types.PortProtocol
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | An object that represents the health check policy for a virtual node\'s
-- listener.
--
-- /See:/ 'newHealthCheckPolicy' smart constructor.
data HealthCheckPolicy = HealthCheckPolicy'
  { -- | The destination path for the health check request. This value is only
    -- used if the specified protocol is HTTP or HTTP\/2. For any other
    -- protocol, this value is ignored.
    HealthCheckPolicy -> Maybe Text
path :: Prelude.Maybe Prelude.Text,
    -- | The destination port for the health check request. This port must match
    -- the port defined in the PortMapping for the listener.
    HealthCheckPolicy -> Maybe Natural
port :: Prelude.Maybe Prelude.Natural,
    -- | The number of consecutive successful health checks that must occur
    -- before declaring listener healthy.
    HealthCheckPolicy -> Natural
healthyThreshold :: Prelude.Natural,
    -- | The time period in milliseconds between each health check execution.
    HealthCheckPolicy -> Natural
intervalMillis :: Prelude.Natural,
    -- | The protocol for the health check request. If you specify @grpc@, then
    -- your service must conform to the
    -- <https://github.com/grpc/grpc/blob/master/doc/health-checking.md GRPC Health Checking Protocol>.
    HealthCheckPolicy -> PortProtocol
protocol :: PortProtocol,
    -- | The amount of time to wait when receiving a response from the health
    -- check, in milliseconds.
    HealthCheckPolicy -> Natural
timeoutMillis :: Prelude.Natural,
    -- | The number of consecutive failed health checks that must occur before
    -- declaring a virtual node unhealthy.
    HealthCheckPolicy -> Natural
unhealthyThreshold :: Prelude.Natural
  }
  deriving (HealthCheckPolicy -> HealthCheckPolicy -> Bool
(HealthCheckPolicy -> HealthCheckPolicy -> Bool)
-> (HealthCheckPolicy -> HealthCheckPolicy -> Bool)
-> Eq HealthCheckPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HealthCheckPolicy -> HealthCheckPolicy -> Bool
$c/= :: HealthCheckPolicy -> HealthCheckPolicy -> Bool
== :: HealthCheckPolicy -> HealthCheckPolicy -> Bool
$c== :: HealthCheckPolicy -> HealthCheckPolicy -> Bool
Prelude.Eq, ReadPrec [HealthCheckPolicy]
ReadPrec HealthCheckPolicy
Int -> ReadS HealthCheckPolicy
ReadS [HealthCheckPolicy]
(Int -> ReadS HealthCheckPolicy)
-> ReadS [HealthCheckPolicy]
-> ReadPrec HealthCheckPolicy
-> ReadPrec [HealthCheckPolicy]
-> Read HealthCheckPolicy
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HealthCheckPolicy]
$creadListPrec :: ReadPrec [HealthCheckPolicy]
readPrec :: ReadPrec HealthCheckPolicy
$creadPrec :: ReadPrec HealthCheckPolicy
readList :: ReadS [HealthCheckPolicy]
$creadList :: ReadS [HealthCheckPolicy]
readsPrec :: Int -> ReadS HealthCheckPolicy
$creadsPrec :: Int -> ReadS HealthCheckPolicy
Prelude.Read, Int -> HealthCheckPolicy -> ShowS
[HealthCheckPolicy] -> ShowS
HealthCheckPolicy -> String
(Int -> HealthCheckPolicy -> ShowS)
-> (HealthCheckPolicy -> String)
-> ([HealthCheckPolicy] -> ShowS)
-> Show HealthCheckPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HealthCheckPolicy] -> ShowS
$cshowList :: [HealthCheckPolicy] -> ShowS
show :: HealthCheckPolicy -> String
$cshow :: HealthCheckPolicy -> String
showsPrec :: Int -> HealthCheckPolicy -> ShowS
$cshowsPrec :: Int -> HealthCheckPolicy -> ShowS
Prelude.Show, (forall x. HealthCheckPolicy -> Rep HealthCheckPolicy x)
-> (forall x. Rep HealthCheckPolicy x -> HealthCheckPolicy)
-> Generic HealthCheckPolicy
forall x. Rep HealthCheckPolicy x -> HealthCheckPolicy
forall x. HealthCheckPolicy -> Rep HealthCheckPolicy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep HealthCheckPolicy x -> HealthCheckPolicy
$cfrom :: forall x. HealthCheckPolicy -> Rep HealthCheckPolicy x
Prelude.Generic)

-- |
-- Create a value of 'HealthCheckPolicy' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'path', 'healthCheckPolicy_path' - The destination path for the health check request. This value is only
-- used if the specified protocol is HTTP or HTTP\/2. For any other
-- protocol, this value is ignored.
--
-- 'port', 'healthCheckPolicy_port' - The destination port for the health check request. This port must match
-- the port defined in the PortMapping for the listener.
--
-- 'healthyThreshold', 'healthCheckPolicy_healthyThreshold' - The number of consecutive successful health checks that must occur
-- before declaring listener healthy.
--
-- 'intervalMillis', 'healthCheckPolicy_intervalMillis' - The time period in milliseconds between each health check execution.
--
-- 'protocol', 'healthCheckPolicy_protocol' - The protocol for the health check request. If you specify @grpc@, then
-- your service must conform to the
-- <https://github.com/grpc/grpc/blob/master/doc/health-checking.md GRPC Health Checking Protocol>.
--
-- 'timeoutMillis', 'healthCheckPolicy_timeoutMillis' - The amount of time to wait when receiving a response from the health
-- check, in milliseconds.
--
-- 'unhealthyThreshold', 'healthCheckPolicy_unhealthyThreshold' - The number of consecutive failed health checks that must occur before
-- declaring a virtual node unhealthy.
newHealthCheckPolicy ::
  -- | 'healthyThreshold'
  Prelude.Natural ->
  -- | 'intervalMillis'
  Prelude.Natural ->
  -- | 'protocol'
  PortProtocol ->
  -- | 'timeoutMillis'
  Prelude.Natural ->
  -- | 'unhealthyThreshold'
  Prelude.Natural ->
  HealthCheckPolicy
newHealthCheckPolicy :: Natural
-> Natural
-> PortProtocol
-> Natural
-> Natural
-> HealthCheckPolicy
newHealthCheckPolicy
  Natural
pHealthyThreshold_
  Natural
pIntervalMillis_
  PortProtocol
pProtocol_
  Natural
pTimeoutMillis_
  Natural
pUnhealthyThreshold_ =
    HealthCheckPolicy' :: Maybe Text
-> Maybe Natural
-> Natural
-> Natural
-> PortProtocol
-> Natural
-> Natural
-> HealthCheckPolicy
HealthCheckPolicy'
      { $sel:path:HealthCheckPolicy' :: Maybe Text
path = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:port:HealthCheckPolicy' :: Maybe Natural
port = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:healthyThreshold:HealthCheckPolicy' :: Natural
healthyThreshold = Natural
pHealthyThreshold_,
        $sel:intervalMillis:HealthCheckPolicy' :: Natural
intervalMillis = Natural
pIntervalMillis_,
        $sel:protocol:HealthCheckPolicy' :: PortProtocol
protocol = PortProtocol
pProtocol_,
        $sel:timeoutMillis:HealthCheckPolicy' :: Natural
timeoutMillis = Natural
pTimeoutMillis_,
        $sel:unhealthyThreshold:HealthCheckPolicy' :: Natural
unhealthyThreshold = Natural
pUnhealthyThreshold_
      }

-- | The destination path for the health check request. This value is only
-- used if the specified protocol is HTTP or HTTP\/2. For any other
-- protocol, this value is ignored.
healthCheckPolicy_path :: Lens.Lens' HealthCheckPolicy (Prelude.Maybe Prelude.Text)
healthCheckPolicy_path :: (Maybe Text -> f (Maybe Text))
-> HealthCheckPolicy -> f HealthCheckPolicy
healthCheckPolicy_path = (HealthCheckPolicy -> Maybe Text)
-> (HealthCheckPolicy -> Maybe Text -> HealthCheckPolicy)
-> Lens
     HealthCheckPolicy HealthCheckPolicy (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HealthCheckPolicy' {Maybe Text
path :: Maybe Text
$sel:path:HealthCheckPolicy' :: HealthCheckPolicy -> Maybe Text
path} -> Maybe Text
path) (\s :: HealthCheckPolicy
s@HealthCheckPolicy' {} Maybe Text
a -> HealthCheckPolicy
s {$sel:path:HealthCheckPolicy' :: Maybe Text
path = Maybe Text
a} :: HealthCheckPolicy)

-- | The destination port for the health check request. This port must match
-- the port defined in the PortMapping for the listener.
healthCheckPolicy_port :: Lens.Lens' HealthCheckPolicy (Prelude.Maybe Prelude.Natural)
healthCheckPolicy_port :: (Maybe Natural -> f (Maybe Natural))
-> HealthCheckPolicy -> f HealthCheckPolicy
healthCheckPolicy_port = (HealthCheckPolicy -> Maybe Natural)
-> (HealthCheckPolicy -> Maybe Natural -> HealthCheckPolicy)
-> Lens
     HealthCheckPolicy HealthCheckPolicy (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HealthCheckPolicy' {Maybe Natural
port :: Maybe Natural
$sel:port:HealthCheckPolicy' :: HealthCheckPolicy -> Maybe Natural
port} -> Maybe Natural
port) (\s :: HealthCheckPolicy
s@HealthCheckPolicy' {} Maybe Natural
a -> HealthCheckPolicy
s {$sel:port:HealthCheckPolicy' :: Maybe Natural
port = Maybe Natural
a} :: HealthCheckPolicy)

-- | The number of consecutive successful health checks that must occur
-- before declaring listener healthy.
healthCheckPolicy_healthyThreshold :: Lens.Lens' HealthCheckPolicy Prelude.Natural
healthCheckPolicy_healthyThreshold :: (Natural -> f Natural) -> HealthCheckPolicy -> f HealthCheckPolicy
healthCheckPolicy_healthyThreshold = (HealthCheckPolicy -> Natural)
-> (HealthCheckPolicy -> Natural -> HealthCheckPolicy)
-> Lens HealthCheckPolicy HealthCheckPolicy Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HealthCheckPolicy' {Natural
healthyThreshold :: Natural
$sel:healthyThreshold:HealthCheckPolicy' :: HealthCheckPolicy -> Natural
healthyThreshold} -> Natural
healthyThreshold) (\s :: HealthCheckPolicy
s@HealthCheckPolicy' {} Natural
a -> HealthCheckPolicy
s {$sel:healthyThreshold:HealthCheckPolicy' :: Natural
healthyThreshold = Natural
a} :: HealthCheckPolicy)

-- | The time period in milliseconds between each health check execution.
healthCheckPolicy_intervalMillis :: Lens.Lens' HealthCheckPolicy Prelude.Natural
healthCheckPolicy_intervalMillis :: (Natural -> f Natural) -> HealthCheckPolicy -> f HealthCheckPolicy
healthCheckPolicy_intervalMillis = (HealthCheckPolicy -> Natural)
-> (HealthCheckPolicy -> Natural -> HealthCheckPolicy)
-> Lens HealthCheckPolicy HealthCheckPolicy Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HealthCheckPolicy' {Natural
intervalMillis :: Natural
$sel:intervalMillis:HealthCheckPolicy' :: HealthCheckPolicy -> Natural
intervalMillis} -> Natural
intervalMillis) (\s :: HealthCheckPolicy
s@HealthCheckPolicy' {} Natural
a -> HealthCheckPolicy
s {$sel:intervalMillis:HealthCheckPolicy' :: Natural
intervalMillis = Natural
a} :: HealthCheckPolicy)

-- | The protocol for the health check request. If you specify @grpc@, then
-- your service must conform to the
-- <https://github.com/grpc/grpc/blob/master/doc/health-checking.md GRPC Health Checking Protocol>.
healthCheckPolicy_protocol :: Lens.Lens' HealthCheckPolicy PortProtocol
healthCheckPolicy_protocol :: (PortProtocol -> f PortProtocol)
-> HealthCheckPolicy -> f HealthCheckPolicy
healthCheckPolicy_protocol = (HealthCheckPolicy -> PortProtocol)
-> (HealthCheckPolicy -> PortProtocol -> HealthCheckPolicy)
-> Lens
     HealthCheckPolicy HealthCheckPolicy PortProtocol PortProtocol
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HealthCheckPolicy' {PortProtocol
protocol :: PortProtocol
$sel:protocol:HealthCheckPolicy' :: HealthCheckPolicy -> PortProtocol
protocol} -> PortProtocol
protocol) (\s :: HealthCheckPolicy
s@HealthCheckPolicy' {} PortProtocol
a -> HealthCheckPolicy
s {$sel:protocol:HealthCheckPolicy' :: PortProtocol
protocol = PortProtocol
a} :: HealthCheckPolicy)

-- | The amount of time to wait when receiving a response from the health
-- check, in milliseconds.
healthCheckPolicy_timeoutMillis :: Lens.Lens' HealthCheckPolicy Prelude.Natural
healthCheckPolicy_timeoutMillis :: (Natural -> f Natural) -> HealthCheckPolicy -> f HealthCheckPolicy
healthCheckPolicy_timeoutMillis = (HealthCheckPolicy -> Natural)
-> (HealthCheckPolicy -> Natural -> HealthCheckPolicy)
-> Lens HealthCheckPolicy HealthCheckPolicy Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HealthCheckPolicy' {Natural
timeoutMillis :: Natural
$sel:timeoutMillis:HealthCheckPolicy' :: HealthCheckPolicy -> Natural
timeoutMillis} -> Natural
timeoutMillis) (\s :: HealthCheckPolicy
s@HealthCheckPolicy' {} Natural
a -> HealthCheckPolicy
s {$sel:timeoutMillis:HealthCheckPolicy' :: Natural
timeoutMillis = Natural
a} :: HealthCheckPolicy)

-- | The number of consecutive failed health checks that must occur before
-- declaring a virtual node unhealthy.
healthCheckPolicy_unhealthyThreshold :: Lens.Lens' HealthCheckPolicy Prelude.Natural
healthCheckPolicy_unhealthyThreshold :: (Natural -> f Natural) -> HealthCheckPolicy -> f HealthCheckPolicy
healthCheckPolicy_unhealthyThreshold = (HealthCheckPolicy -> Natural)
-> (HealthCheckPolicy -> Natural -> HealthCheckPolicy)
-> Lens HealthCheckPolicy HealthCheckPolicy Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HealthCheckPolicy' {Natural
unhealthyThreshold :: Natural
$sel:unhealthyThreshold:HealthCheckPolicy' :: HealthCheckPolicy -> Natural
unhealthyThreshold} -> Natural
unhealthyThreshold) (\s :: HealthCheckPolicy
s@HealthCheckPolicy' {} Natural
a -> HealthCheckPolicy
s {$sel:unhealthyThreshold:HealthCheckPolicy' :: Natural
unhealthyThreshold = Natural
a} :: HealthCheckPolicy)

instance Core.FromJSON HealthCheckPolicy where
  parseJSON :: Value -> Parser HealthCheckPolicy
parseJSON =
    String
-> (Object -> Parser HealthCheckPolicy)
-> Value
-> Parser HealthCheckPolicy
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"HealthCheckPolicy"
      ( \Object
x ->
          Maybe Text
-> Maybe Natural
-> Natural
-> Natural
-> PortProtocol
-> Natural
-> Natural
-> HealthCheckPolicy
HealthCheckPolicy'
            (Maybe Text
 -> Maybe Natural
 -> Natural
 -> Natural
 -> PortProtocol
 -> Natural
 -> Natural
 -> HealthCheckPolicy)
-> Parser (Maybe Text)
-> Parser
     (Maybe Natural
      -> Natural
      -> Natural
      -> PortProtocol
      -> Natural
      -> Natural
      -> HealthCheckPolicy)
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
   -> PortProtocol
   -> Natural
   -> Natural
   -> HealthCheckPolicy)
-> Parser (Maybe Natural)
-> Parser
     (Natural
      -> Natural
      -> PortProtocol
      -> Natural
      -> Natural
      -> HealthCheckPolicy)
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
   -> PortProtocol
   -> Natural
   -> Natural
   -> HealthCheckPolicy)
-> Parser Natural
-> Parser
     (Natural
      -> PortProtocol -> Natural -> Natural -> HealthCheckPolicy)
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
   -> PortProtocol -> Natural -> Natural -> HealthCheckPolicy)
-> Parser Natural
-> Parser (PortProtocol -> Natural -> Natural -> HealthCheckPolicy)
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 (PortProtocol -> Natural -> Natural -> HealthCheckPolicy)
-> Parser PortProtocol
-> Parser (Natural -> Natural -> HealthCheckPolicy)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser PortProtocol
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"protocol")
            Parser (Natural -> Natural -> HealthCheckPolicy)
-> Parser Natural -> Parser (Natural -> HealthCheckPolicy)
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 -> HealthCheckPolicy)
-> Parser Natural -> Parser HealthCheckPolicy
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 HealthCheckPolicy

instance Prelude.NFData HealthCheckPolicy

instance Core.ToJSON HealthCheckPolicy where
  toJSON :: HealthCheckPolicy -> Value
toJSON HealthCheckPolicy' {Natural
Maybe Natural
Maybe Text
PortProtocol
unhealthyThreshold :: Natural
timeoutMillis :: Natural
protocol :: PortProtocol
intervalMillis :: Natural
healthyThreshold :: Natural
port :: Maybe Natural
path :: Maybe Text
$sel:unhealthyThreshold:HealthCheckPolicy' :: HealthCheckPolicy -> Natural
$sel:timeoutMillis:HealthCheckPolicy' :: HealthCheckPolicy -> Natural
$sel:protocol:HealthCheckPolicy' :: HealthCheckPolicy -> PortProtocol
$sel:intervalMillis:HealthCheckPolicy' :: HealthCheckPolicy -> Natural
$sel:healthyThreshold:HealthCheckPolicy' :: HealthCheckPolicy -> Natural
$sel:port:HealthCheckPolicy' :: HealthCheckPolicy -> Maybe Natural
$sel:path:HealthCheckPolicy' :: HealthCheckPolicy -> 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 -> PortProtocol -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= PortProtocol
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)
          ]
      )