{-# 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.SecurityHub.Types.AwsElbLoadBalancerHealthCheck
-- 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.SecurityHub.Types.AwsElbLoadBalancerHealthCheck where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Contains information about the health checks that are conducted on the
-- load balancer.
--
-- /See:/ 'newAwsElbLoadBalancerHealthCheck' smart constructor.
data AwsElbLoadBalancerHealthCheck = AwsElbLoadBalancerHealthCheck'
  { -- | The number of consecutive health check successes required before the
    -- instance is moved to the Healthy state.
    AwsElbLoadBalancerHealthCheck -> Maybe Int
healthyThreshold :: Prelude.Maybe Prelude.Int,
    -- | The approximate interval, in seconds, between health checks of an
    -- individual instance.
    AwsElbLoadBalancerHealthCheck -> Maybe Int
interval :: Prelude.Maybe Prelude.Int,
    -- | The amount of time, in seconds, during which no response means a failed
    -- health check.
    AwsElbLoadBalancerHealthCheck -> Maybe Int
timeout :: Prelude.Maybe Prelude.Int,
    -- | The number of consecutive health check failures that must occur before
    -- the instance is moved to the Unhealthy state.
    AwsElbLoadBalancerHealthCheck -> Maybe Int
unhealthyThreshold :: Prelude.Maybe Prelude.Int,
    -- | The instance that is being checked. The target specifies the protocol
    -- and port. The available protocols are TCP, SSL, HTTP, and HTTPS. The
    -- range of valid ports is 1 through 65535.
    --
    -- For the HTTP and HTTPS protocols, the target also specifies the ping
    -- path.
    --
    -- For the TCP protocol, the target is specified as @TCP: \<port> @.
    --
    -- For the SSL protocol, the target is specified as @SSL.\<port> @.
    --
    -- For the HTTP and HTTPS protocols, the target is specified as
    -- @ \<protocol>:\<port>\/\<path to ping> @.
    AwsElbLoadBalancerHealthCheck -> Maybe Text
target :: Prelude.Maybe Prelude.Text
  }
  deriving (AwsElbLoadBalancerHealthCheck
-> AwsElbLoadBalancerHealthCheck -> Bool
(AwsElbLoadBalancerHealthCheck
 -> AwsElbLoadBalancerHealthCheck -> Bool)
-> (AwsElbLoadBalancerHealthCheck
    -> AwsElbLoadBalancerHealthCheck -> Bool)
-> Eq AwsElbLoadBalancerHealthCheck
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsElbLoadBalancerHealthCheck
-> AwsElbLoadBalancerHealthCheck -> Bool
$c/= :: AwsElbLoadBalancerHealthCheck
-> AwsElbLoadBalancerHealthCheck -> Bool
== :: AwsElbLoadBalancerHealthCheck
-> AwsElbLoadBalancerHealthCheck -> Bool
$c== :: AwsElbLoadBalancerHealthCheck
-> AwsElbLoadBalancerHealthCheck -> Bool
Prelude.Eq, ReadPrec [AwsElbLoadBalancerHealthCheck]
ReadPrec AwsElbLoadBalancerHealthCheck
Int -> ReadS AwsElbLoadBalancerHealthCheck
ReadS [AwsElbLoadBalancerHealthCheck]
(Int -> ReadS AwsElbLoadBalancerHealthCheck)
-> ReadS [AwsElbLoadBalancerHealthCheck]
-> ReadPrec AwsElbLoadBalancerHealthCheck
-> ReadPrec [AwsElbLoadBalancerHealthCheck]
-> Read AwsElbLoadBalancerHealthCheck
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsElbLoadBalancerHealthCheck]
$creadListPrec :: ReadPrec [AwsElbLoadBalancerHealthCheck]
readPrec :: ReadPrec AwsElbLoadBalancerHealthCheck
$creadPrec :: ReadPrec AwsElbLoadBalancerHealthCheck
readList :: ReadS [AwsElbLoadBalancerHealthCheck]
$creadList :: ReadS [AwsElbLoadBalancerHealthCheck]
readsPrec :: Int -> ReadS AwsElbLoadBalancerHealthCheck
$creadsPrec :: Int -> ReadS AwsElbLoadBalancerHealthCheck
Prelude.Read, Int -> AwsElbLoadBalancerHealthCheck -> ShowS
[AwsElbLoadBalancerHealthCheck] -> ShowS
AwsElbLoadBalancerHealthCheck -> String
(Int -> AwsElbLoadBalancerHealthCheck -> ShowS)
-> (AwsElbLoadBalancerHealthCheck -> String)
-> ([AwsElbLoadBalancerHealthCheck] -> ShowS)
-> Show AwsElbLoadBalancerHealthCheck
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsElbLoadBalancerHealthCheck] -> ShowS
$cshowList :: [AwsElbLoadBalancerHealthCheck] -> ShowS
show :: AwsElbLoadBalancerHealthCheck -> String
$cshow :: AwsElbLoadBalancerHealthCheck -> String
showsPrec :: Int -> AwsElbLoadBalancerHealthCheck -> ShowS
$cshowsPrec :: Int -> AwsElbLoadBalancerHealthCheck -> ShowS
Prelude.Show, (forall x.
 AwsElbLoadBalancerHealthCheck
 -> Rep AwsElbLoadBalancerHealthCheck x)
-> (forall x.
    Rep AwsElbLoadBalancerHealthCheck x
    -> AwsElbLoadBalancerHealthCheck)
-> Generic AwsElbLoadBalancerHealthCheck
forall x.
Rep AwsElbLoadBalancerHealthCheck x
-> AwsElbLoadBalancerHealthCheck
forall x.
AwsElbLoadBalancerHealthCheck
-> Rep AwsElbLoadBalancerHealthCheck x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsElbLoadBalancerHealthCheck x
-> AwsElbLoadBalancerHealthCheck
$cfrom :: forall x.
AwsElbLoadBalancerHealthCheck
-> Rep AwsElbLoadBalancerHealthCheck x
Prelude.Generic)

-- |
-- Create a value of 'AwsElbLoadBalancerHealthCheck' 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:
--
-- 'healthyThreshold', 'awsElbLoadBalancerHealthCheck_healthyThreshold' - The number of consecutive health check successes required before the
-- instance is moved to the Healthy state.
--
-- 'interval', 'awsElbLoadBalancerHealthCheck_interval' - The approximate interval, in seconds, between health checks of an
-- individual instance.
--
-- 'timeout', 'awsElbLoadBalancerHealthCheck_timeout' - The amount of time, in seconds, during which no response means a failed
-- health check.
--
-- 'unhealthyThreshold', 'awsElbLoadBalancerHealthCheck_unhealthyThreshold' - The number of consecutive health check failures that must occur before
-- the instance is moved to the Unhealthy state.
--
-- 'target', 'awsElbLoadBalancerHealthCheck_target' - The instance that is being checked. The target specifies the protocol
-- and port. The available protocols are TCP, SSL, HTTP, and HTTPS. The
-- range of valid ports is 1 through 65535.
--
-- For the HTTP and HTTPS protocols, the target also specifies the ping
-- path.
--
-- For the TCP protocol, the target is specified as @TCP: \<port> @.
--
-- For the SSL protocol, the target is specified as @SSL.\<port> @.
--
-- For the HTTP and HTTPS protocols, the target is specified as
-- @ \<protocol>:\<port>\/\<path to ping> @.
newAwsElbLoadBalancerHealthCheck ::
  AwsElbLoadBalancerHealthCheck
newAwsElbLoadBalancerHealthCheck :: AwsElbLoadBalancerHealthCheck
newAwsElbLoadBalancerHealthCheck =
  AwsElbLoadBalancerHealthCheck' :: Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> AwsElbLoadBalancerHealthCheck
AwsElbLoadBalancerHealthCheck'
    { $sel:healthyThreshold:AwsElbLoadBalancerHealthCheck' :: Maybe Int
healthyThreshold =
        Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:interval:AwsElbLoadBalancerHealthCheck' :: Maybe Int
interval = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:timeout:AwsElbLoadBalancerHealthCheck' :: Maybe Int
timeout = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:unhealthyThreshold:AwsElbLoadBalancerHealthCheck' :: Maybe Int
unhealthyThreshold = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:target:AwsElbLoadBalancerHealthCheck' :: Maybe Text
target = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The number of consecutive health check successes required before the
-- instance is moved to the Healthy state.
awsElbLoadBalancerHealthCheck_healthyThreshold :: Lens.Lens' AwsElbLoadBalancerHealthCheck (Prelude.Maybe Prelude.Int)
awsElbLoadBalancerHealthCheck_healthyThreshold :: (Maybe Int -> f (Maybe Int))
-> AwsElbLoadBalancerHealthCheck -> f AwsElbLoadBalancerHealthCheck
awsElbLoadBalancerHealthCheck_healthyThreshold = (AwsElbLoadBalancerHealthCheck -> Maybe Int)
-> (AwsElbLoadBalancerHealthCheck
    -> Maybe Int -> AwsElbLoadBalancerHealthCheck)
-> Lens
     AwsElbLoadBalancerHealthCheck
     AwsElbLoadBalancerHealthCheck
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElbLoadBalancerHealthCheck' {Maybe Int
healthyThreshold :: Maybe Int
$sel:healthyThreshold:AwsElbLoadBalancerHealthCheck' :: AwsElbLoadBalancerHealthCheck -> Maybe Int
healthyThreshold} -> Maybe Int
healthyThreshold) (\s :: AwsElbLoadBalancerHealthCheck
s@AwsElbLoadBalancerHealthCheck' {} Maybe Int
a -> AwsElbLoadBalancerHealthCheck
s {$sel:healthyThreshold:AwsElbLoadBalancerHealthCheck' :: Maybe Int
healthyThreshold = Maybe Int
a} :: AwsElbLoadBalancerHealthCheck)

-- | The approximate interval, in seconds, between health checks of an
-- individual instance.
awsElbLoadBalancerHealthCheck_interval :: Lens.Lens' AwsElbLoadBalancerHealthCheck (Prelude.Maybe Prelude.Int)
awsElbLoadBalancerHealthCheck_interval :: (Maybe Int -> f (Maybe Int))
-> AwsElbLoadBalancerHealthCheck -> f AwsElbLoadBalancerHealthCheck
awsElbLoadBalancerHealthCheck_interval = (AwsElbLoadBalancerHealthCheck -> Maybe Int)
-> (AwsElbLoadBalancerHealthCheck
    -> Maybe Int -> AwsElbLoadBalancerHealthCheck)
-> Lens
     AwsElbLoadBalancerHealthCheck
     AwsElbLoadBalancerHealthCheck
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElbLoadBalancerHealthCheck' {Maybe Int
interval :: Maybe Int
$sel:interval:AwsElbLoadBalancerHealthCheck' :: AwsElbLoadBalancerHealthCheck -> Maybe Int
interval} -> Maybe Int
interval) (\s :: AwsElbLoadBalancerHealthCheck
s@AwsElbLoadBalancerHealthCheck' {} Maybe Int
a -> AwsElbLoadBalancerHealthCheck
s {$sel:interval:AwsElbLoadBalancerHealthCheck' :: Maybe Int
interval = Maybe Int
a} :: AwsElbLoadBalancerHealthCheck)

-- | The amount of time, in seconds, during which no response means a failed
-- health check.
awsElbLoadBalancerHealthCheck_timeout :: Lens.Lens' AwsElbLoadBalancerHealthCheck (Prelude.Maybe Prelude.Int)
awsElbLoadBalancerHealthCheck_timeout :: (Maybe Int -> f (Maybe Int))
-> AwsElbLoadBalancerHealthCheck -> f AwsElbLoadBalancerHealthCheck
awsElbLoadBalancerHealthCheck_timeout = (AwsElbLoadBalancerHealthCheck -> Maybe Int)
-> (AwsElbLoadBalancerHealthCheck
    -> Maybe Int -> AwsElbLoadBalancerHealthCheck)
-> Lens
     AwsElbLoadBalancerHealthCheck
     AwsElbLoadBalancerHealthCheck
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElbLoadBalancerHealthCheck' {Maybe Int
timeout :: Maybe Int
$sel:timeout:AwsElbLoadBalancerHealthCheck' :: AwsElbLoadBalancerHealthCheck -> Maybe Int
timeout} -> Maybe Int
timeout) (\s :: AwsElbLoadBalancerHealthCheck
s@AwsElbLoadBalancerHealthCheck' {} Maybe Int
a -> AwsElbLoadBalancerHealthCheck
s {$sel:timeout:AwsElbLoadBalancerHealthCheck' :: Maybe Int
timeout = Maybe Int
a} :: AwsElbLoadBalancerHealthCheck)

-- | The number of consecutive health check failures that must occur before
-- the instance is moved to the Unhealthy state.
awsElbLoadBalancerHealthCheck_unhealthyThreshold :: Lens.Lens' AwsElbLoadBalancerHealthCheck (Prelude.Maybe Prelude.Int)
awsElbLoadBalancerHealthCheck_unhealthyThreshold :: (Maybe Int -> f (Maybe Int))
-> AwsElbLoadBalancerHealthCheck -> f AwsElbLoadBalancerHealthCheck
awsElbLoadBalancerHealthCheck_unhealthyThreshold = (AwsElbLoadBalancerHealthCheck -> Maybe Int)
-> (AwsElbLoadBalancerHealthCheck
    -> Maybe Int -> AwsElbLoadBalancerHealthCheck)
-> Lens
     AwsElbLoadBalancerHealthCheck
     AwsElbLoadBalancerHealthCheck
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElbLoadBalancerHealthCheck' {Maybe Int
unhealthyThreshold :: Maybe Int
$sel:unhealthyThreshold:AwsElbLoadBalancerHealthCheck' :: AwsElbLoadBalancerHealthCheck -> Maybe Int
unhealthyThreshold} -> Maybe Int
unhealthyThreshold) (\s :: AwsElbLoadBalancerHealthCheck
s@AwsElbLoadBalancerHealthCheck' {} Maybe Int
a -> AwsElbLoadBalancerHealthCheck
s {$sel:unhealthyThreshold:AwsElbLoadBalancerHealthCheck' :: Maybe Int
unhealthyThreshold = Maybe Int
a} :: AwsElbLoadBalancerHealthCheck)

-- | The instance that is being checked. The target specifies the protocol
-- and port. The available protocols are TCP, SSL, HTTP, and HTTPS. The
-- range of valid ports is 1 through 65535.
--
-- For the HTTP and HTTPS protocols, the target also specifies the ping
-- path.
--
-- For the TCP protocol, the target is specified as @TCP: \<port> @.
--
-- For the SSL protocol, the target is specified as @SSL.\<port> @.
--
-- For the HTTP and HTTPS protocols, the target is specified as
-- @ \<protocol>:\<port>\/\<path to ping> @.
awsElbLoadBalancerHealthCheck_target :: Lens.Lens' AwsElbLoadBalancerHealthCheck (Prelude.Maybe Prelude.Text)
awsElbLoadBalancerHealthCheck_target :: (Maybe Text -> f (Maybe Text))
-> AwsElbLoadBalancerHealthCheck -> f AwsElbLoadBalancerHealthCheck
awsElbLoadBalancerHealthCheck_target = (AwsElbLoadBalancerHealthCheck -> Maybe Text)
-> (AwsElbLoadBalancerHealthCheck
    -> Maybe Text -> AwsElbLoadBalancerHealthCheck)
-> Lens
     AwsElbLoadBalancerHealthCheck
     AwsElbLoadBalancerHealthCheck
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElbLoadBalancerHealthCheck' {Maybe Text
target :: Maybe Text
$sel:target:AwsElbLoadBalancerHealthCheck' :: AwsElbLoadBalancerHealthCheck -> Maybe Text
target} -> Maybe Text
target) (\s :: AwsElbLoadBalancerHealthCheck
s@AwsElbLoadBalancerHealthCheck' {} Maybe Text
a -> AwsElbLoadBalancerHealthCheck
s {$sel:target:AwsElbLoadBalancerHealthCheck' :: Maybe Text
target = Maybe Text
a} :: AwsElbLoadBalancerHealthCheck)

instance Core.FromJSON AwsElbLoadBalancerHealthCheck where
  parseJSON :: Value -> Parser AwsElbLoadBalancerHealthCheck
parseJSON =
    String
-> (Object -> Parser AwsElbLoadBalancerHealthCheck)
-> Value
-> Parser AwsElbLoadBalancerHealthCheck
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AwsElbLoadBalancerHealthCheck"
      ( \Object
x ->
          Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> AwsElbLoadBalancerHealthCheck
AwsElbLoadBalancerHealthCheck'
            (Maybe Int
 -> Maybe Int
 -> Maybe Int
 -> Maybe Int
 -> Maybe Text
 -> AwsElbLoadBalancerHealthCheck)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> AwsElbLoadBalancerHealthCheck)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"HealthyThreshold")
            Parser
  (Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> AwsElbLoadBalancerHealthCheck)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe Int -> Maybe Text -> AwsElbLoadBalancerHealthCheck)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Interval")
            Parser
  (Maybe Int
   -> Maybe Int -> Maybe Text -> AwsElbLoadBalancerHealthCheck)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int -> Maybe Text -> AwsElbLoadBalancerHealthCheck)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Timeout")
            Parser (Maybe Int -> Maybe Text -> AwsElbLoadBalancerHealthCheck)
-> Parser (Maybe Int)
-> Parser (Maybe Text -> AwsElbLoadBalancerHealthCheck)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"UnhealthyThreshold")
            Parser (Maybe Text -> AwsElbLoadBalancerHealthCheck)
-> Parser (Maybe Text) -> Parser AwsElbLoadBalancerHealthCheck
forall (f :: * -> *) a b. Applicative f => 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
"Target")
      )

instance
  Prelude.Hashable
    AwsElbLoadBalancerHealthCheck

instance Prelude.NFData AwsElbLoadBalancerHealthCheck

instance Core.ToJSON AwsElbLoadBalancerHealthCheck where
  toJSON :: AwsElbLoadBalancerHealthCheck -> Value
toJSON AwsElbLoadBalancerHealthCheck' {Maybe Int
Maybe Text
target :: Maybe Text
unhealthyThreshold :: Maybe Int
timeout :: Maybe Int
interval :: Maybe Int
healthyThreshold :: Maybe Int
$sel:target:AwsElbLoadBalancerHealthCheck' :: AwsElbLoadBalancerHealthCheck -> Maybe Text
$sel:unhealthyThreshold:AwsElbLoadBalancerHealthCheck' :: AwsElbLoadBalancerHealthCheck -> Maybe Int
$sel:timeout:AwsElbLoadBalancerHealthCheck' :: AwsElbLoadBalancerHealthCheck -> Maybe Int
$sel:interval:AwsElbLoadBalancerHealthCheck' :: AwsElbLoadBalancerHealthCheck -> Maybe Int
$sel:healthyThreshold:AwsElbLoadBalancerHealthCheck' :: AwsElbLoadBalancerHealthCheck -> Maybe Int
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"HealthyThreshold" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
healthyThreshold,
            (Text
"Interval" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
interval,
            (Text
"Timeout" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
timeout,
            (Text
"UnhealthyThreshold" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
unhealthyThreshold,
            (Text
"Target" 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
target
          ]
      )