{-# 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.AwsElbLoadBalancerAttributes
-- 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.AwsElbLoadBalancerAttributes where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SecurityHub.Types.AwsElbLoadBalancerAccessLog
import Amazonka.SecurityHub.Types.AwsElbLoadBalancerConnectionDraining
import Amazonka.SecurityHub.Types.AwsElbLoadBalancerConnectionSettings
import Amazonka.SecurityHub.Types.AwsElbLoadBalancerCrossZoneLoadBalancing

-- | Contains attributes for the load balancer.
--
-- /See:/ 'newAwsElbLoadBalancerAttributes' smart constructor.
data AwsElbLoadBalancerAttributes = AwsElbLoadBalancerAttributes'
  { -- | Cross-zone load balancing settings for the load balancer.
    --
    -- If cross-zone load balancing is enabled, the load balancer routes the
    -- request traffic evenly across all instances regardless of the
    -- Availability Zones.
    AwsElbLoadBalancerAttributes
-> Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
crossZoneLoadBalancing :: Prelude.Maybe AwsElbLoadBalancerCrossZoneLoadBalancing,
    -- | Information about the access log configuration for the load balancer.
    --
    -- If the access log is enabled, the load balancer captures detailed
    -- information about all requests. It delivers the information to a
    -- specified S3 bucket.
    AwsElbLoadBalancerAttributes -> Maybe AwsElbLoadBalancerAccessLog
accessLog :: Prelude.Maybe AwsElbLoadBalancerAccessLog,
    -- | Connection settings for the load balancer.
    --
    -- If an idle timeout is configured, the load balancer allows connections
    -- to remain idle for the specified duration. When a connection is idle, no
    -- data is sent over the connection.
    AwsElbLoadBalancerAttributes
-> Maybe AwsElbLoadBalancerConnectionSettings
connectionSettings :: Prelude.Maybe AwsElbLoadBalancerConnectionSettings,
    -- | Information about the connection draining configuration for the load
    -- balancer.
    --
    -- If connection draining is enabled, the load balancer allows existing
    -- requests to complete before it shifts traffic away from a deregistered
    -- or unhealthy instance.
    AwsElbLoadBalancerAttributes
-> Maybe AwsElbLoadBalancerConnectionDraining
connectionDraining :: Prelude.Maybe AwsElbLoadBalancerConnectionDraining
  }
  deriving (AwsElbLoadBalancerAttributes
-> AwsElbLoadBalancerAttributes -> Bool
(AwsElbLoadBalancerAttributes
 -> AwsElbLoadBalancerAttributes -> Bool)
-> (AwsElbLoadBalancerAttributes
    -> AwsElbLoadBalancerAttributes -> Bool)
-> Eq AwsElbLoadBalancerAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsElbLoadBalancerAttributes
-> AwsElbLoadBalancerAttributes -> Bool
$c/= :: AwsElbLoadBalancerAttributes
-> AwsElbLoadBalancerAttributes -> Bool
== :: AwsElbLoadBalancerAttributes
-> AwsElbLoadBalancerAttributes -> Bool
$c== :: AwsElbLoadBalancerAttributes
-> AwsElbLoadBalancerAttributes -> Bool
Prelude.Eq, ReadPrec [AwsElbLoadBalancerAttributes]
ReadPrec AwsElbLoadBalancerAttributes
Int -> ReadS AwsElbLoadBalancerAttributes
ReadS [AwsElbLoadBalancerAttributes]
(Int -> ReadS AwsElbLoadBalancerAttributes)
-> ReadS [AwsElbLoadBalancerAttributes]
-> ReadPrec AwsElbLoadBalancerAttributes
-> ReadPrec [AwsElbLoadBalancerAttributes]
-> Read AwsElbLoadBalancerAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsElbLoadBalancerAttributes]
$creadListPrec :: ReadPrec [AwsElbLoadBalancerAttributes]
readPrec :: ReadPrec AwsElbLoadBalancerAttributes
$creadPrec :: ReadPrec AwsElbLoadBalancerAttributes
readList :: ReadS [AwsElbLoadBalancerAttributes]
$creadList :: ReadS [AwsElbLoadBalancerAttributes]
readsPrec :: Int -> ReadS AwsElbLoadBalancerAttributes
$creadsPrec :: Int -> ReadS AwsElbLoadBalancerAttributes
Prelude.Read, Int -> AwsElbLoadBalancerAttributes -> ShowS
[AwsElbLoadBalancerAttributes] -> ShowS
AwsElbLoadBalancerAttributes -> String
(Int -> AwsElbLoadBalancerAttributes -> ShowS)
-> (AwsElbLoadBalancerAttributes -> String)
-> ([AwsElbLoadBalancerAttributes] -> ShowS)
-> Show AwsElbLoadBalancerAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsElbLoadBalancerAttributes] -> ShowS
$cshowList :: [AwsElbLoadBalancerAttributes] -> ShowS
show :: AwsElbLoadBalancerAttributes -> String
$cshow :: AwsElbLoadBalancerAttributes -> String
showsPrec :: Int -> AwsElbLoadBalancerAttributes -> ShowS
$cshowsPrec :: Int -> AwsElbLoadBalancerAttributes -> ShowS
Prelude.Show, (forall x.
 AwsElbLoadBalancerAttributes -> Rep AwsElbLoadBalancerAttributes x)
-> (forall x.
    Rep AwsElbLoadBalancerAttributes x -> AwsElbLoadBalancerAttributes)
-> Generic AwsElbLoadBalancerAttributes
forall x.
Rep AwsElbLoadBalancerAttributes x -> AwsElbLoadBalancerAttributes
forall x.
AwsElbLoadBalancerAttributes -> Rep AwsElbLoadBalancerAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsElbLoadBalancerAttributes x -> AwsElbLoadBalancerAttributes
$cfrom :: forall x.
AwsElbLoadBalancerAttributes -> Rep AwsElbLoadBalancerAttributes x
Prelude.Generic)

-- |
-- Create a value of 'AwsElbLoadBalancerAttributes' 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:
--
-- 'crossZoneLoadBalancing', 'awsElbLoadBalancerAttributes_crossZoneLoadBalancing' - Cross-zone load balancing settings for the load balancer.
--
-- If cross-zone load balancing is enabled, the load balancer routes the
-- request traffic evenly across all instances regardless of the
-- Availability Zones.
--
-- 'accessLog', 'awsElbLoadBalancerAttributes_accessLog' - Information about the access log configuration for the load balancer.
--
-- If the access log is enabled, the load balancer captures detailed
-- information about all requests. It delivers the information to a
-- specified S3 bucket.
--
-- 'connectionSettings', 'awsElbLoadBalancerAttributes_connectionSettings' - Connection settings for the load balancer.
--
-- If an idle timeout is configured, the load balancer allows connections
-- to remain idle for the specified duration. When a connection is idle, no
-- data is sent over the connection.
--
-- 'connectionDraining', 'awsElbLoadBalancerAttributes_connectionDraining' - Information about the connection draining configuration for the load
-- balancer.
--
-- If connection draining is enabled, the load balancer allows existing
-- requests to complete before it shifts traffic away from a deregistered
-- or unhealthy instance.
newAwsElbLoadBalancerAttributes ::
  AwsElbLoadBalancerAttributes
newAwsElbLoadBalancerAttributes :: AwsElbLoadBalancerAttributes
newAwsElbLoadBalancerAttributes =
  AwsElbLoadBalancerAttributes' :: Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
-> Maybe AwsElbLoadBalancerAccessLog
-> Maybe AwsElbLoadBalancerConnectionSettings
-> Maybe AwsElbLoadBalancerConnectionDraining
-> AwsElbLoadBalancerAttributes
AwsElbLoadBalancerAttributes'
    { $sel:crossZoneLoadBalancing:AwsElbLoadBalancerAttributes' :: Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
crossZoneLoadBalancing =
        Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
forall a. Maybe a
Prelude.Nothing,
      $sel:accessLog:AwsElbLoadBalancerAttributes' :: Maybe AwsElbLoadBalancerAccessLog
accessLog = Maybe AwsElbLoadBalancerAccessLog
forall a. Maybe a
Prelude.Nothing,
      $sel:connectionSettings:AwsElbLoadBalancerAttributes' :: Maybe AwsElbLoadBalancerConnectionSettings
connectionSettings = Maybe AwsElbLoadBalancerConnectionSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:connectionDraining:AwsElbLoadBalancerAttributes' :: Maybe AwsElbLoadBalancerConnectionDraining
connectionDraining = Maybe AwsElbLoadBalancerConnectionDraining
forall a. Maybe a
Prelude.Nothing
    }

-- | Cross-zone load balancing settings for the load balancer.
--
-- If cross-zone load balancing is enabled, the load balancer routes the
-- request traffic evenly across all instances regardless of the
-- Availability Zones.
awsElbLoadBalancerAttributes_crossZoneLoadBalancing :: Lens.Lens' AwsElbLoadBalancerAttributes (Prelude.Maybe AwsElbLoadBalancerCrossZoneLoadBalancing)
awsElbLoadBalancerAttributes_crossZoneLoadBalancing :: (Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
 -> f (Maybe AwsElbLoadBalancerCrossZoneLoadBalancing))
-> AwsElbLoadBalancerAttributes -> f AwsElbLoadBalancerAttributes
awsElbLoadBalancerAttributes_crossZoneLoadBalancing = (AwsElbLoadBalancerAttributes
 -> Maybe AwsElbLoadBalancerCrossZoneLoadBalancing)
-> (AwsElbLoadBalancerAttributes
    -> Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
    -> AwsElbLoadBalancerAttributes)
-> Lens
     AwsElbLoadBalancerAttributes
     AwsElbLoadBalancerAttributes
     (Maybe AwsElbLoadBalancerCrossZoneLoadBalancing)
     (Maybe AwsElbLoadBalancerCrossZoneLoadBalancing)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElbLoadBalancerAttributes' {Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
crossZoneLoadBalancing :: Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
$sel:crossZoneLoadBalancing:AwsElbLoadBalancerAttributes' :: AwsElbLoadBalancerAttributes
-> Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
crossZoneLoadBalancing} -> Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
crossZoneLoadBalancing) (\s :: AwsElbLoadBalancerAttributes
s@AwsElbLoadBalancerAttributes' {} Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
a -> AwsElbLoadBalancerAttributes
s {$sel:crossZoneLoadBalancing:AwsElbLoadBalancerAttributes' :: Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
crossZoneLoadBalancing = Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
a} :: AwsElbLoadBalancerAttributes)

-- | Information about the access log configuration for the load balancer.
--
-- If the access log is enabled, the load balancer captures detailed
-- information about all requests. It delivers the information to a
-- specified S3 bucket.
awsElbLoadBalancerAttributes_accessLog :: Lens.Lens' AwsElbLoadBalancerAttributes (Prelude.Maybe AwsElbLoadBalancerAccessLog)
awsElbLoadBalancerAttributes_accessLog :: (Maybe AwsElbLoadBalancerAccessLog
 -> f (Maybe AwsElbLoadBalancerAccessLog))
-> AwsElbLoadBalancerAttributes -> f AwsElbLoadBalancerAttributes
awsElbLoadBalancerAttributes_accessLog = (AwsElbLoadBalancerAttributes -> Maybe AwsElbLoadBalancerAccessLog)
-> (AwsElbLoadBalancerAttributes
    -> Maybe AwsElbLoadBalancerAccessLog
    -> AwsElbLoadBalancerAttributes)
-> Lens
     AwsElbLoadBalancerAttributes
     AwsElbLoadBalancerAttributes
     (Maybe AwsElbLoadBalancerAccessLog)
     (Maybe AwsElbLoadBalancerAccessLog)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElbLoadBalancerAttributes' {Maybe AwsElbLoadBalancerAccessLog
accessLog :: Maybe AwsElbLoadBalancerAccessLog
$sel:accessLog:AwsElbLoadBalancerAttributes' :: AwsElbLoadBalancerAttributes -> Maybe AwsElbLoadBalancerAccessLog
accessLog} -> Maybe AwsElbLoadBalancerAccessLog
accessLog) (\s :: AwsElbLoadBalancerAttributes
s@AwsElbLoadBalancerAttributes' {} Maybe AwsElbLoadBalancerAccessLog
a -> AwsElbLoadBalancerAttributes
s {$sel:accessLog:AwsElbLoadBalancerAttributes' :: Maybe AwsElbLoadBalancerAccessLog
accessLog = Maybe AwsElbLoadBalancerAccessLog
a} :: AwsElbLoadBalancerAttributes)

-- | Connection settings for the load balancer.
--
-- If an idle timeout is configured, the load balancer allows connections
-- to remain idle for the specified duration. When a connection is idle, no
-- data is sent over the connection.
awsElbLoadBalancerAttributes_connectionSettings :: Lens.Lens' AwsElbLoadBalancerAttributes (Prelude.Maybe AwsElbLoadBalancerConnectionSettings)
awsElbLoadBalancerAttributes_connectionSettings :: (Maybe AwsElbLoadBalancerConnectionSettings
 -> f (Maybe AwsElbLoadBalancerConnectionSettings))
-> AwsElbLoadBalancerAttributes -> f AwsElbLoadBalancerAttributes
awsElbLoadBalancerAttributes_connectionSettings = (AwsElbLoadBalancerAttributes
 -> Maybe AwsElbLoadBalancerConnectionSettings)
-> (AwsElbLoadBalancerAttributes
    -> Maybe AwsElbLoadBalancerConnectionSettings
    -> AwsElbLoadBalancerAttributes)
-> Lens
     AwsElbLoadBalancerAttributes
     AwsElbLoadBalancerAttributes
     (Maybe AwsElbLoadBalancerConnectionSettings)
     (Maybe AwsElbLoadBalancerConnectionSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElbLoadBalancerAttributes' {Maybe AwsElbLoadBalancerConnectionSettings
connectionSettings :: Maybe AwsElbLoadBalancerConnectionSettings
$sel:connectionSettings:AwsElbLoadBalancerAttributes' :: AwsElbLoadBalancerAttributes
-> Maybe AwsElbLoadBalancerConnectionSettings
connectionSettings} -> Maybe AwsElbLoadBalancerConnectionSettings
connectionSettings) (\s :: AwsElbLoadBalancerAttributes
s@AwsElbLoadBalancerAttributes' {} Maybe AwsElbLoadBalancerConnectionSettings
a -> AwsElbLoadBalancerAttributes
s {$sel:connectionSettings:AwsElbLoadBalancerAttributes' :: Maybe AwsElbLoadBalancerConnectionSettings
connectionSettings = Maybe AwsElbLoadBalancerConnectionSettings
a} :: AwsElbLoadBalancerAttributes)

-- | Information about the connection draining configuration for the load
-- balancer.
--
-- If connection draining is enabled, the load balancer allows existing
-- requests to complete before it shifts traffic away from a deregistered
-- or unhealthy instance.
awsElbLoadBalancerAttributes_connectionDraining :: Lens.Lens' AwsElbLoadBalancerAttributes (Prelude.Maybe AwsElbLoadBalancerConnectionDraining)
awsElbLoadBalancerAttributes_connectionDraining :: (Maybe AwsElbLoadBalancerConnectionDraining
 -> f (Maybe AwsElbLoadBalancerConnectionDraining))
-> AwsElbLoadBalancerAttributes -> f AwsElbLoadBalancerAttributes
awsElbLoadBalancerAttributes_connectionDraining = (AwsElbLoadBalancerAttributes
 -> Maybe AwsElbLoadBalancerConnectionDraining)
-> (AwsElbLoadBalancerAttributes
    -> Maybe AwsElbLoadBalancerConnectionDraining
    -> AwsElbLoadBalancerAttributes)
-> Lens
     AwsElbLoadBalancerAttributes
     AwsElbLoadBalancerAttributes
     (Maybe AwsElbLoadBalancerConnectionDraining)
     (Maybe AwsElbLoadBalancerConnectionDraining)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElbLoadBalancerAttributes' {Maybe AwsElbLoadBalancerConnectionDraining
connectionDraining :: Maybe AwsElbLoadBalancerConnectionDraining
$sel:connectionDraining:AwsElbLoadBalancerAttributes' :: AwsElbLoadBalancerAttributes
-> Maybe AwsElbLoadBalancerConnectionDraining
connectionDraining} -> Maybe AwsElbLoadBalancerConnectionDraining
connectionDraining) (\s :: AwsElbLoadBalancerAttributes
s@AwsElbLoadBalancerAttributes' {} Maybe AwsElbLoadBalancerConnectionDraining
a -> AwsElbLoadBalancerAttributes
s {$sel:connectionDraining:AwsElbLoadBalancerAttributes' :: Maybe AwsElbLoadBalancerConnectionDraining
connectionDraining = Maybe AwsElbLoadBalancerConnectionDraining
a} :: AwsElbLoadBalancerAttributes)

instance Core.FromJSON AwsElbLoadBalancerAttributes where
  parseJSON :: Value -> Parser AwsElbLoadBalancerAttributes
parseJSON =
    String
-> (Object -> Parser AwsElbLoadBalancerAttributes)
-> Value
-> Parser AwsElbLoadBalancerAttributes
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AwsElbLoadBalancerAttributes"
      ( \Object
x ->
          Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
-> Maybe AwsElbLoadBalancerAccessLog
-> Maybe AwsElbLoadBalancerConnectionSettings
-> Maybe AwsElbLoadBalancerConnectionDraining
-> AwsElbLoadBalancerAttributes
AwsElbLoadBalancerAttributes'
            (Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
 -> Maybe AwsElbLoadBalancerAccessLog
 -> Maybe AwsElbLoadBalancerConnectionSettings
 -> Maybe AwsElbLoadBalancerConnectionDraining
 -> AwsElbLoadBalancerAttributes)
-> Parser (Maybe AwsElbLoadBalancerCrossZoneLoadBalancing)
-> Parser
     (Maybe AwsElbLoadBalancerAccessLog
      -> Maybe AwsElbLoadBalancerConnectionSettings
      -> Maybe AwsElbLoadBalancerConnectionDraining
      -> AwsElbLoadBalancerAttributes)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text -> Parser (Maybe AwsElbLoadBalancerCrossZoneLoadBalancing)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CrossZoneLoadBalancing")
            Parser
  (Maybe AwsElbLoadBalancerAccessLog
   -> Maybe AwsElbLoadBalancerConnectionSettings
   -> Maybe AwsElbLoadBalancerConnectionDraining
   -> AwsElbLoadBalancerAttributes)
-> Parser (Maybe AwsElbLoadBalancerAccessLog)
-> Parser
     (Maybe AwsElbLoadBalancerConnectionSettings
      -> Maybe AwsElbLoadBalancerConnectionDraining
      -> AwsElbLoadBalancerAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AwsElbLoadBalancerAccessLog)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AccessLog")
            Parser
  (Maybe AwsElbLoadBalancerConnectionSettings
   -> Maybe AwsElbLoadBalancerConnectionDraining
   -> AwsElbLoadBalancerAttributes)
-> Parser (Maybe AwsElbLoadBalancerConnectionSettings)
-> Parser
     (Maybe AwsElbLoadBalancerConnectionDraining
      -> AwsElbLoadBalancerAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe AwsElbLoadBalancerConnectionSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ConnectionSettings")
            Parser
  (Maybe AwsElbLoadBalancerConnectionDraining
   -> AwsElbLoadBalancerAttributes)
-> Parser (Maybe AwsElbLoadBalancerConnectionDraining)
-> Parser AwsElbLoadBalancerAttributes
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe AwsElbLoadBalancerConnectionDraining)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ConnectionDraining")
      )

instance
  Prelude.Hashable
    AwsElbLoadBalancerAttributes

instance Prelude.NFData AwsElbLoadBalancerAttributes

instance Core.ToJSON AwsElbLoadBalancerAttributes where
  toJSON :: AwsElbLoadBalancerAttributes -> Value
toJSON AwsElbLoadBalancerAttributes' {Maybe AwsElbLoadBalancerAccessLog
Maybe AwsElbLoadBalancerConnectionDraining
Maybe AwsElbLoadBalancerConnectionSettings
Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
connectionDraining :: Maybe AwsElbLoadBalancerConnectionDraining
connectionSettings :: Maybe AwsElbLoadBalancerConnectionSettings
accessLog :: Maybe AwsElbLoadBalancerAccessLog
crossZoneLoadBalancing :: Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
$sel:connectionDraining:AwsElbLoadBalancerAttributes' :: AwsElbLoadBalancerAttributes
-> Maybe AwsElbLoadBalancerConnectionDraining
$sel:connectionSettings:AwsElbLoadBalancerAttributes' :: AwsElbLoadBalancerAttributes
-> Maybe AwsElbLoadBalancerConnectionSettings
$sel:accessLog:AwsElbLoadBalancerAttributes' :: AwsElbLoadBalancerAttributes -> Maybe AwsElbLoadBalancerAccessLog
$sel:crossZoneLoadBalancing:AwsElbLoadBalancerAttributes' :: AwsElbLoadBalancerAttributes
-> Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"CrossZoneLoadBalancing" Text -> AwsElbLoadBalancerCrossZoneLoadBalancing -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AwsElbLoadBalancerCrossZoneLoadBalancing -> Pair)
-> Maybe AwsElbLoadBalancerCrossZoneLoadBalancing -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
crossZoneLoadBalancing,
            (Text
"AccessLog" Text -> AwsElbLoadBalancerAccessLog -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AwsElbLoadBalancerAccessLog -> Pair)
-> Maybe AwsElbLoadBalancerAccessLog -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AwsElbLoadBalancerAccessLog
accessLog,
            (Text
"ConnectionSettings" Text -> AwsElbLoadBalancerConnectionSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AwsElbLoadBalancerConnectionSettings -> Pair)
-> Maybe AwsElbLoadBalancerConnectionSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AwsElbLoadBalancerConnectionSettings
connectionSettings,
            (Text
"ConnectionDraining" Text -> AwsElbLoadBalancerConnectionDraining -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AwsElbLoadBalancerConnectionDraining -> Pair)
-> Maybe AwsElbLoadBalancerConnectionDraining -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AwsElbLoadBalancerConnectionDraining
connectionDraining
          ]
      )