{-# 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.Lightsail.Types.LoadBalancer
-- 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.Lightsail.Types.LoadBalancer where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Lightsail.Types.InstanceHealthSummary
import Amazonka.Lightsail.Types.IpAddressType
import Amazonka.Lightsail.Types.LoadBalancerAttributeName
import Amazonka.Lightsail.Types.LoadBalancerProtocol
import Amazonka.Lightsail.Types.LoadBalancerState
import Amazonka.Lightsail.Types.LoadBalancerTlsCertificateSummary
import Amazonka.Lightsail.Types.ResourceLocation
import Amazonka.Lightsail.Types.ResourceType
import Amazonka.Lightsail.Types.Tag
import qualified Amazonka.Prelude as Prelude

-- | Describes a load balancer.
--
-- /See:/ 'newLoadBalancer' smart constructor.
data LoadBalancer = LoadBalancer'
  { -- | The path you specified to perform your health checks. If no path is
    -- specified, the load balancer tries to make a request to the default
    -- (root) page.
    LoadBalancer -> Maybe Text
healthCheckPath :: Prelude.Maybe Prelude.Text,
    -- | The status of your load balancer. Valid values are below.
    LoadBalancer -> Maybe LoadBalancerState
state :: Prelude.Maybe LoadBalancerState,
    -- | The resource type (e.g., @LoadBalancer@.
    LoadBalancer -> Maybe ResourceType
resourceType :: Prelude.Maybe ResourceType,
    -- | The Amazon Resource Name (ARN) of the load balancer.
    LoadBalancer -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The date when your load balancer was created.
    LoadBalancer -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | The AWS Region where your load balancer was created (e.g.,
    -- @us-east-2a@). Lightsail automatically creates your load balancer across
    -- Availability Zones.
    LoadBalancer -> Maybe ResourceLocation
location :: Prelude.Maybe ResourceLocation,
    -- | The port where the load balancer will direct traffic to your Lightsail
    -- instances. For HTTP traffic, it\'s port 80. For HTTPS traffic, it\'s
    -- port 443.
    LoadBalancer -> Maybe Int
instancePort :: Prelude.Maybe Prelude.Int,
    -- | A string to string map of the configuration options for your load
    -- balancer. Valid values are listed below.
    LoadBalancer -> Maybe (HashMap LoadBalancerAttributeName Text)
configurationOptions :: Prelude.Maybe (Prelude.HashMap LoadBalancerAttributeName Prelude.Text),
    -- | The protocol you have enabled for your load balancer. Valid values are
    -- below.
    --
    -- You can\'t just have @HTTP_HTTPS@, but you can have just @HTTP@.
    LoadBalancer -> Maybe LoadBalancerProtocol
protocol :: Prelude.Maybe LoadBalancerProtocol,
    -- | An array of LoadBalancerTlsCertificateSummary objects that provide
    -- additional information about the SSL\/TLS certificates. For example, if
    -- @true@, the certificate is attached to the load balancer.
    LoadBalancer -> Maybe [LoadBalancerTlsCertificateSummary]
tlsCertificateSummaries :: Prelude.Maybe [LoadBalancerTlsCertificateSummary],
    -- | The name of the load balancer (e.g., @my-load-balancer@).
    LoadBalancer -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The IP address type of the load balancer.
    --
    -- The possible values are @ipv4@ for IPv4 only, and @dualstack@ for IPv4
    -- and IPv6.
    LoadBalancer -> Maybe IpAddressType
ipAddressType :: Prelude.Maybe IpAddressType,
    -- | The support code. Include this code in your email to support when you
    -- have questions about your Lightsail load balancer. This code enables our
    -- support team to look up your Lightsail information more easily.
    LoadBalancer -> Maybe Text
supportCode :: Prelude.Maybe Prelude.Text,
    -- | An array of public port settings for your load balancer. For HTTP, use
    -- port 80. For HTTPS, use port 443.
    LoadBalancer -> Maybe [Int]
publicPorts :: Prelude.Maybe [Prelude.Int],
    -- | The DNS name of your Lightsail load balancer.
    LoadBalancer -> Maybe Text
dnsName :: Prelude.Maybe Prelude.Text,
    -- | An array of InstanceHealthSummary objects describing the health of the
    -- load balancer.
    LoadBalancer -> Maybe [InstanceHealthSummary]
instanceHealthSummary :: Prelude.Maybe [InstanceHealthSummary],
    -- | The tag keys and optional values for the resource. For more information
    -- about tags in Lightsail, see the
    -- <https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-tags Amazon Lightsail Developer Guide>.
    LoadBalancer -> Maybe [Tag]
tags :: Prelude.Maybe [Tag]
  }
  deriving (LoadBalancer -> LoadBalancer -> Bool
(LoadBalancer -> LoadBalancer -> Bool)
-> (LoadBalancer -> LoadBalancer -> Bool) -> Eq LoadBalancer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LoadBalancer -> LoadBalancer -> Bool
$c/= :: LoadBalancer -> LoadBalancer -> Bool
== :: LoadBalancer -> LoadBalancer -> Bool
$c== :: LoadBalancer -> LoadBalancer -> Bool
Prelude.Eq, ReadPrec [LoadBalancer]
ReadPrec LoadBalancer
Int -> ReadS LoadBalancer
ReadS [LoadBalancer]
(Int -> ReadS LoadBalancer)
-> ReadS [LoadBalancer]
-> ReadPrec LoadBalancer
-> ReadPrec [LoadBalancer]
-> Read LoadBalancer
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LoadBalancer]
$creadListPrec :: ReadPrec [LoadBalancer]
readPrec :: ReadPrec LoadBalancer
$creadPrec :: ReadPrec LoadBalancer
readList :: ReadS [LoadBalancer]
$creadList :: ReadS [LoadBalancer]
readsPrec :: Int -> ReadS LoadBalancer
$creadsPrec :: Int -> ReadS LoadBalancer
Prelude.Read, Int -> LoadBalancer -> ShowS
[LoadBalancer] -> ShowS
LoadBalancer -> String
(Int -> LoadBalancer -> ShowS)
-> (LoadBalancer -> String)
-> ([LoadBalancer] -> ShowS)
-> Show LoadBalancer
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LoadBalancer] -> ShowS
$cshowList :: [LoadBalancer] -> ShowS
show :: LoadBalancer -> String
$cshow :: LoadBalancer -> String
showsPrec :: Int -> LoadBalancer -> ShowS
$cshowsPrec :: Int -> LoadBalancer -> ShowS
Prelude.Show, (forall x. LoadBalancer -> Rep LoadBalancer x)
-> (forall x. Rep LoadBalancer x -> LoadBalancer)
-> Generic LoadBalancer
forall x. Rep LoadBalancer x -> LoadBalancer
forall x. LoadBalancer -> Rep LoadBalancer x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LoadBalancer x -> LoadBalancer
$cfrom :: forall x. LoadBalancer -> Rep LoadBalancer x
Prelude.Generic)

-- |
-- Create a value of 'LoadBalancer' 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:
--
-- 'healthCheckPath', 'loadBalancer_healthCheckPath' - The path you specified to perform your health checks. If no path is
-- specified, the load balancer tries to make a request to the default
-- (root) page.
--
-- 'state', 'loadBalancer_state' - The status of your load balancer. Valid values are below.
--
-- 'resourceType', 'loadBalancer_resourceType' - The resource type (e.g., @LoadBalancer@.
--
-- 'arn', 'loadBalancer_arn' - The Amazon Resource Name (ARN) of the load balancer.
--
-- 'createdAt', 'loadBalancer_createdAt' - The date when your load balancer was created.
--
-- 'location', 'loadBalancer_location' - The AWS Region where your load balancer was created (e.g.,
-- @us-east-2a@). Lightsail automatically creates your load balancer across
-- Availability Zones.
--
-- 'instancePort', 'loadBalancer_instancePort' - The port where the load balancer will direct traffic to your Lightsail
-- instances. For HTTP traffic, it\'s port 80. For HTTPS traffic, it\'s
-- port 443.
--
-- 'configurationOptions', 'loadBalancer_configurationOptions' - A string to string map of the configuration options for your load
-- balancer. Valid values are listed below.
--
-- 'protocol', 'loadBalancer_protocol' - The protocol you have enabled for your load balancer. Valid values are
-- below.
--
-- You can\'t just have @HTTP_HTTPS@, but you can have just @HTTP@.
--
-- 'tlsCertificateSummaries', 'loadBalancer_tlsCertificateSummaries' - An array of LoadBalancerTlsCertificateSummary objects that provide
-- additional information about the SSL\/TLS certificates. For example, if
-- @true@, the certificate is attached to the load balancer.
--
-- 'name', 'loadBalancer_name' - The name of the load balancer (e.g., @my-load-balancer@).
--
-- 'ipAddressType', 'loadBalancer_ipAddressType' - The IP address type of the load balancer.
--
-- The possible values are @ipv4@ for IPv4 only, and @dualstack@ for IPv4
-- and IPv6.
--
-- 'supportCode', 'loadBalancer_supportCode' - The support code. Include this code in your email to support when you
-- have questions about your Lightsail load balancer. This code enables our
-- support team to look up your Lightsail information more easily.
--
-- 'publicPorts', 'loadBalancer_publicPorts' - An array of public port settings for your load balancer. For HTTP, use
-- port 80. For HTTPS, use port 443.
--
-- 'dnsName', 'loadBalancer_dnsName' - The DNS name of your Lightsail load balancer.
--
-- 'instanceHealthSummary', 'loadBalancer_instanceHealthSummary' - An array of InstanceHealthSummary objects describing the health of the
-- load balancer.
--
-- 'tags', 'loadBalancer_tags' - The tag keys and optional values for the resource. For more information
-- about tags in Lightsail, see the
-- <https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-tags Amazon Lightsail Developer Guide>.
newLoadBalancer ::
  LoadBalancer
newLoadBalancer :: LoadBalancer
newLoadBalancer =
  LoadBalancer' :: Maybe Text
-> Maybe LoadBalancerState
-> Maybe ResourceType
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Int
-> Maybe (HashMap LoadBalancerAttributeName Text)
-> Maybe LoadBalancerProtocol
-> Maybe [LoadBalancerTlsCertificateSummary]
-> Maybe Text
-> Maybe IpAddressType
-> Maybe Text
-> Maybe [Int]
-> Maybe Text
-> Maybe [InstanceHealthSummary]
-> Maybe [Tag]
-> LoadBalancer
LoadBalancer'
    { $sel:healthCheckPath:LoadBalancer' :: Maybe Text
healthCheckPath = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:state:LoadBalancer' :: Maybe LoadBalancerState
state = Maybe LoadBalancerState
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceType:LoadBalancer' :: Maybe ResourceType
resourceType = Maybe ResourceType
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:LoadBalancer' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:LoadBalancer' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:location:LoadBalancer' :: Maybe ResourceLocation
location = Maybe ResourceLocation
forall a. Maybe a
Prelude.Nothing,
      $sel:instancePort:LoadBalancer' :: Maybe Int
instancePort = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:configurationOptions:LoadBalancer' :: Maybe (HashMap LoadBalancerAttributeName Text)
configurationOptions = Maybe (HashMap LoadBalancerAttributeName Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:protocol:LoadBalancer' :: Maybe LoadBalancerProtocol
protocol = Maybe LoadBalancerProtocol
forall a. Maybe a
Prelude.Nothing,
      $sel:tlsCertificateSummaries:LoadBalancer' :: Maybe [LoadBalancerTlsCertificateSummary]
tlsCertificateSummaries = Maybe [LoadBalancerTlsCertificateSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:name:LoadBalancer' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ipAddressType:LoadBalancer' :: Maybe IpAddressType
ipAddressType = Maybe IpAddressType
forall a. Maybe a
Prelude.Nothing,
      $sel:supportCode:LoadBalancer' :: Maybe Text
supportCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:publicPorts:LoadBalancer' :: Maybe [Int]
publicPorts = Maybe [Int]
forall a. Maybe a
Prelude.Nothing,
      $sel:dnsName:LoadBalancer' :: Maybe Text
dnsName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:instanceHealthSummary:LoadBalancer' :: Maybe [InstanceHealthSummary]
instanceHealthSummary = Maybe [InstanceHealthSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:LoadBalancer' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing
    }

-- | The path you specified to perform your health checks. If no path is
-- specified, the load balancer tries to make a request to the default
-- (root) page.
loadBalancer_healthCheckPath :: Lens.Lens' LoadBalancer (Prelude.Maybe Prelude.Text)
loadBalancer_healthCheckPath :: (Maybe Text -> f (Maybe Text)) -> LoadBalancer -> f LoadBalancer
loadBalancer_healthCheckPath = (LoadBalancer -> Maybe Text)
-> (LoadBalancer -> Maybe Text -> LoadBalancer)
-> Lens LoadBalancer LoadBalancer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoadBalancer' {Maybe Text
healthCheckPath :: Maybe Text
$sel:healthCheckPath:LoadBalancer' :: LoadBalancer -> Maybe Text
healthCheckPath} -> Maybe Text
healthCheckPath) (\s :: LoadBalancer
s@LoadBalancer' {} Maybe Text
a -> LoadBalancer
s {$sel:healthCheckPath:LoadBalancer' :: Maybe Text
healthCheckPath = Maybe Text
a} :: LoadBalancer)

-- | The status of your load balancer. Valid values are below.
loadBalancer_state :: Lens.Lens' LoadBalancer (Prelude.Maybe LoadBalancerState)
loadBalancer_state :: (Maybe LoadBalancerState -> f (Maybe LoadBalancerState))
-> LoadBalancer -> f LoadBalancer
loadBalancer_state = (LoadBalancer -> Maybe LoadBalancerState)
-> (LoadBalancer -> Maybe LoadBalancerState -> LoadBalancer)
-> Lens
     LoadBalancer
     LoadBalancer
     (Maybe LoadBalancerState)
     (Maybe LoadBalancerState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoadBalancer' {Maybe LoadBalancerState
state :: Maybe LoadBalancerState
$sel:state:LoadBalancer' :: LoadBalancer -> Maybe LoadBalancerState
state} -> Maybe LoadBalancerState
state) (\s :: LoadBalancer
s@LoadBalancer' {} Maybe LoadBalancerState
a -> LoadBalancer
s {$sel:state:LoadBalancer' :: Maybe LoadBalancerState
state = Maybe LoadBalancerState
a} :: LoadBalancer)

-- | The resource type (e.g., @LoadBalancer@.
loadBalancer_resourceType :: Lens.Lens' LoadBalancer (Prelude.Maybe ResourceType)
loadBalancer_resourceType :: (Maybe ResourceType -> f (Maybe ResourceType))
-> LoadBalancer -> f LoadBalancer
loadBalancer_resourceType = (LoadBalancer -> Maybe ResourceType)
-> (LoadBalancer -> Maybe ResourceType -> LoadBalancer)
-> Lens
     LoadBalancer LoadBalancer (Maybe ResourceType) (Maybe ResourceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoadBalancer' {Maybe ResourceType
resourceType :: Maybe ResourceType
$sel:resourceType:LoadBalancer' :: LoadBalancer -> Maybe ResourceType
resourceType} -> Maybe ResourceType
resourceType) (\s :: LoadBalancer
s@LoadBalancer' {} Maybe ResourceType
a -> LoadBalancer
s {$sel:resourceType:LoadBalancer' :: Maybe ResourceType
resourceType = Maybe ResourceType
a} :: LoadBalancer)

-- | The Amazon Resource Name (ARN) of the load balancer.
loadBalancer_arn :: Lens.Lens' LoadBalancer (Prelude.Maybe Prelude.Text)
loadBalancer_arn :: (Maybe Text -> f (Maybe Text)) -> LoadBalancer -> f LoadBalancer
loadBalancer_arn = (LoadBalancer -> Maybe Text)
-> (LoadBalancer -> Maybe Text -> LoadBalancer)
-> Lens LoadBalancer LoadBalancer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoadBalancer' {Maybe Text
arn :: Maybe Text
$sel:arn:LoadBalancer' :: LoadBalancer -> Maybe Text
arn} -> Maybe Text
arn) (\s :: LoadBalancer
s@LoadBalancer' {} Maybe Text
a -> LoadBalancer
s {$sel:arn:LoadBalancer' :: Maybe Text
arn = Maybe Text
a} :: LoadBalancer)

-- | The date when your load balancer was created.
loadBalancer_createdAt :: Lens.Lens' LoadBalancer (Prelude.Maybe Prelude.UTCTime)
loadBalancer_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> LoadBalancer -> f LoadBalancer
loadBalancer_createdAt = (LoadBalancer -> Maybe POSIX)
-> (LoadBalancer -> Maybe POSIX -> LoadBalancer)
-> Lens LoadBalancer LoadBalancer (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoadBalancer' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:LoadBalancer' :: LoadBalancer -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: LoadBalancer
s@LoadBalancer' {} Maybe POSIX
a -> LoadBalancer
s {$sel:createdAt:LoadBalancer' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: LoadBalancer) ((Maybe POSIX -> f (Maybe POSIX))
 -> LoadBalancer -> f LoadBalancer)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> LoadBalancer
-> f LoadBalancer
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The AWS Region where your load balancer was created (e.g.,
-- @us-east-2a@). Lightsail automatically creates your load balancer across
-- Availability Zones.
loadBalancer_location :: Lens.Lens' LoadBalancer (Prelude.Maybe ResourceLocation)
loadBalancer_location :: (Maybe ResourceLocation -> f (Maybe ResourceLocation))
-> LoadBalancer -> f LoadBalancer
loadBalancer_location = (LoadBalancer -> Maybe ResourceLocation)
-> (LoadBalancer -> Maybe ResourceLocation -> LoadBalancer)
-> Lens
     LoadBalancer
     LoadBalancer
     (Maybe ResourceLocation)
     (Maybe ResourceLocation)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoadBalancer' {Maybe ResourceLocation
location :: Maybe ResourceLocation
$sel:location:LoadBalancer' :: LoadBalancer -> Maybe ResourceLocation
location} -> Maybe ResourceLocation
location) (\s :: LoadBalancer
s@LoadBalancer' {} Maybe ResourceLocation
a -> LoadBalancer
s {$sel:location:LoadBalancer' :: Maybe ResourceLocation
location = Maybe ResourceLocation
a} :: LoadBalancer)

-- | The port where the load balancer will direct traffic to your Lightsail
-- instances. For HTTP traffic, it\'s port 80. For HTTPS traffic, it\'s
-- port 443.
loadBalancer_instancePort :: Lens.Lens' LoadBalancer (Prelude.Maybe Prelude.Int)
loadBalancer_instancePort :: (Maybe Int -> f (Maybe Int)) -> LoadBalancer -> f LoadBalancer
loadBalancer_instancePort = (LoadBalancer -> Maybe Int)
-> (LoadBalancer -> Maybe Int -> LoadBalancer)
-> Lens LoadBalancer LoadBalancer (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoadBalancer' {Maybe Int
instancePort :: Maybe Int
$sel:instancePort:LoadBalancer' :: LoadBalancer -> Maybe Int
instancePort} -> Maybe Int
instancePort) (\s :: LoadBalancer
s@LoadBalancer' {} Maybe Int
a -> LoadBalancer
s {$sel:instancePort:LoadBalancer' :: Maybe Int
instancePort = Maybe Int
a} :: LoadBalancer)

-- | A string to string map of the configuration options for your load
-- balancer. Valid values are listed below.
loadBalancer_configurationOptions :: Lens.Lens' LoadBalancer (Prelude.Maybe (Prelude.HashMap LoadBalancerAttributeName Prelude.Text))
loadBalancer_configurationOptions :: (Maybe (HashMap LoadBalancerAttributeName Text)
 -> f (Maybe (HashMap LoadBalancerAttributeName Text)))
-> LoadBalancer -> f LoadBalancer
loadBalancer_configurationOptions = (LoadBalancer -> Maybe (HashMap LoadBalancerAttributeName Text))
-> (LoadBalancer
    -> Maybe (HashMap LoadBalancerAttributeName Text) -> LoadBalancer)
-> Lens
     LoadBalancer
     LoadBalancer
     (Maybe (HashMap LoadBalancerAttributeName Text))
     (Maybe (HashMap LoadBalancerAttributeName Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoadBalancer' {Maybe (HashMap LoadBalancerAttributeName Text)
configurationOptions :: Maybe (HashMap LoadBalancerAttributeName Text)
$sel:configurationOptions:LoadBalancer' :: LoadBalancer -> Maybe (HashMap LoadBalancerAttributeName Text)
configurationOptions} -> Maybe (HashMap LoadBalancerAttributeName Text)
configurationOptions) (\s :: LoadBalancer
s@LoadBalancer' {} Maybe (HashMap LoadBalancerAttributeName Text)
a -> LoadBalancer
s {$sel:configurationOptions:LoadBalancer' :: Maybe (HashMap LoadBalancerAttributeName Text)
configurationOptions = Maybe (HashMap LoadBalancerAttributeName Text)
a} :: LoadBalancer) ((Maybe (HashMap LoadBalancerAttributeName Text)
  -> f (Maybe (HashMap LoadBalancerAttributeName Text)))
 -> LoadBalancer -> f LoadBalancer)
-> ((Maybe (HashMap LoadBalancerAttributeName Text)
     -> f (Maybe (HashMap LoadBalancerAttributeName Text)))
    -> Maybe (HashMap LoadBalancerAttributeName Text)
    -> f (Maybe (HashMap LoadBalancerAttributeName Text)))
-> (Maybe (HashMap LoadBalancerAttributeName Text)
    -> f (Maybe (HashMap LoadBalancerAttributeName Text)))
-> LoadBalancer
-> f LoadBalancer
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap LoadBalancerAttributeName Text)
  (HashMap LoadBalancerAttributeName Text)
  (HashMap LoadBalancerAttributeName Text)
  (HashMap LoadBalancerAttributeName Text)
-> Iso
     (Maybe (HashMap LoadBalancerAttributeName Text))
     (Maybe (HashMap LoadBalancerAttributeName Text))
     (Maybe (HashMap LoadBalancerAttributeName Text))
     (Maybe (HashMap LoadBalancerAttributeName Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap LoadBalancerAttributeName Text)
  (HashMap LoadBalancerAttributeName Text)
  (HashMap LoadBalancerAttributeName Text)
  (HashMap LoadBalancerAttributeName Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The protocol you have enabled for your load balancer. Valid values are
-- below.
--
-- You can\'t just have @HTTP_HTTPS@, but you can have just @HTTP@.
loadBalancer_protocol :: Lens.Lens' LoadBalancer (Prelude.Maybe LoadBalancerProtocol)
loadBalancer_protocol :: (Maybe LoadBalancerProtocol -> f (Maybe LoadBalancerProtocol))
-> LoadBalancer -> f LoadBalancer
loadBalancer_protocol = (LoadBalancer -> Maybe LoadBalancerProtocol)
-> (LoadBalancer -> Maybe LoadBalancerProtocol -> LoadBalancer)
-> Lens
     LoadBalancer
     LoadBalancer
     (Maybe LoadBalancerProtocol)
     (Maybe LoadBalancerProtocol)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoadBalancer' {Maybe LoadBalancerProtocol
protocol :: Maybe LoadBalancerProtocol
$sel:protocol:LoadBalancer' :: LoadBalancer -> Maybe LoadBalancerProtocol
protocol} -> Maybe LoadBalancerProtocol
protocol) (\s :: LoadBalancer
s@LoadBalancer' {} Maybe LoadBalancerProtocol
a -> LoadBalancer
s {$sel:protocol:LoadBalancer' :: Maybe LoadBalancerProtocol
protocol = Maybe LoadBalancerProtocol
a} :: LoadBalancer)

-- | An array of LoadBalancerTlsCertificateSummary objects that provide
-- additional information about the SSL\/TLS certificates. For example, if
-- @true@, the certificate is attached to the load balancer.
loadBalancer_tlsCertificateSummaries :: Lens.Lens' LoadBalancer (Prelude.Maybe [LoadBalancerTlsCertificateSummary])
loadBalancer_tlsCertificateSummaries :: (Maybe [LoadBalancerTlsCertificateSummary]
 -> f (Maybe [LoadBalancerTlsCertificateSummary]))
-> LoadBalancer -> f LoadBalancer
loadBalancer_tlsCertificateSummaries = (LoadBalancer -> Maybe [LoadBalancerTlsCertificateSummary])
-> (LoadBalancer
    -> Maybe [LoadBalancerTlsCertificateSummary] -> LoadBalancer)
-> Lens
     LoadBalancer
     LoadBalancer
     (Maybe [LoadBalancerTlsCertificateSummary])
     (Maybe [LoadBalancerTlsCertificateSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoadBalancer' {Maybe [LoadBalancerTlsCertificateSummary]
tlsCertificateSummaries :: Maybe [LoadBalancerTlsCertificateSummary]
$sel:tlsCertificateSummaries:LoadBalancer' :: LoadBalancer -> Maybe [LoadBalancerTlsCertificateSummary]
tlsCertificateSummaries} -> Maybe [LoadBalancerTlsCertificateSummary]
tlsCertificateSummaries) (\s :: LoadBalancer
s@LoadBalancer' {} Maybe [LoadBalancerTlsCertificateSummary]
a -> LoadBalancer
s {$sel:tlsCertificateSummaries:LoadBalancer' :: Maybe [LoadBalancerTlsCertificateSummary]
tlsCertificateSummaries = Maybe [LoadBalancerTlsCertificateSummary]
a} :: LoadBalancer) ((Maybe [LoadBalancerTlsCertificateSummary]
  -> f (Maybe [LoadBalancerTlsCertificateSummary]))
 -> LoadBalancer -> f LoadBalancer)
-> ((Maybe [LoadBalancerTlsCertificateSummary]
     -> f (Maybe [LoadBalancerTlsCertificateSummary]))
    -> Maybe [LoadBalancerTlsCertificateSummary]
    -> f (Maybe [LoadBalancerTlsCertificateSummary]))
-> (Maybe [LoadBalancerTlsCertificateSummary]
    -> f (Maybe [LoadBalancerTlsCertificateSummary]))
-> LoadBalancer
-> f LoadBalancer
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [LoadBalancerTlsCertificateSummary]
  [LoadBalancerTlsCertificateSummary]
  [LoadBalancerTlsCertificateSummary]
  [LoadBalancerTlsCertificateSummary]
-> Iso
     (Maybe [LoadBalancerTlsCertificateSummary])
     (Maybe [LoadBalancerTlsCertificateSummary])
     (Maybe [LoadBalancerTlsCertificateSummary])
     (Maybe [LoadBalancerTlsCertificateSummary])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [LoadBalancerTlsCertificateSummary]
  [LoadBalancerTlsCertificateSummary]
  [LoadBalancerTlsCertificateSummary]
  [LoadBalancerTlsCertificateSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the load balancer (e.g., @my-load-balancer@).
loadBalancer_name :: Lens.Lens' LoadBalancer (Prelude.Maybe Prelude.Text)
loadBalancer_name :: (Maybe Text -> f (Maybe Text)) -> LoadBalancer -> f LoadBalancer
loadBalancer_name = (LoadBalancer -> Maybe Text)
-> (LoadBalancer -> Maybe Text -> LoadBalancer)
-> Lens LoadBalancer LoadBalancer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoadBalancer' {Maybe Text
name :: Maybe Text
$sel:name:LoadBalancer' :: LoadBalancer -> Maybe Text
name} -> Maybe Text
name) (\s :: LoadBalancer
s@LoadBalancer' {} Maybe Text
a -> LoadBalancer
s {$sel:name:LoadBalancer' :: Maybe Text
name = Maybe Text
a} :: LoadBalancer)

-- | The IP address type of the load balancer.
--
-- The possible values are @ipv4@ for IPv4 only, and @dualstack@ for IPv4
-- and IPv6.
loadBalancer_ipAddressType :: Lens.Lens' LoadBalancer (Prelude.Maybe IpAddressType)
loadBalancer_ipAddressType :: (Maybe IpAddressType -> f (Maybe IpAddressType))
-> LoadBalancer -> f LoadBalancer
loadBalancer_ipAddressType = (LoadBalancer -> Maybe IpAddressType)
-> (LoadBalancer -> Maybe IpAddressType -> LoadBalancer)
-> Lens
     LoadBalancer
     LoadBalancer
     (Maybe IpAddressType)
     (Maybe IpAddressType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoadBalancer' {Maybe IpAddressType
ipAddressType :: Maybe IpAddressType
$sel:ipAddressType:LoadBalancer' :: LoadBalancer -> Maybe IpAddressType
ipAddressType} -> Maybe IpAddressType
ipAddressType) (\s :: LoadBalancer
s@LoadBalancer' {} Maybe IpAddressType
a -> LoadBalancer
s {$sel:ipAddressType:LoadBalancer' :: Maybe IpAddressType
ipAddressType = Maybe IpAddressType
a} :: LoadBalancer)

-- | The support code. Include this code in your email to support when you
-- have questions about your Lightsail load balancer. This code enables our
-- support team to look up your Lightsail information more easily.
loadBalancer_supportCode :: Lens.Lens' LoadBalancer (Prelude.Maybe Prelude.Text)
loadBalancer_supportCode :: (Maybe Text -> f (Maybe Text)) -> LoadBalancer -> f LoadBalancer
loadBalancer_supportCode = (LoadBalancer -> Maybe Text)
-> (LoadBalancer -> Maybe Text -> LoadBalancer)
-> Lens LoadBalancer LoadBalancer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoadBalancer' {Maybe Text
supportCode :: Maybe Text
$sel:supportCode:LoadBalancer' :: LoadBalancer -> Maybe Text
supportCode} -> Maybe Text
supportCode) (\s :: LoadBalancer
s@LoadBalancer' {} Maybe Text
a -> LoadBalancer
s {$sel:supportCode:LoadBalancer' :: Maybe Text
supportCode = Maybe Text
a} :: LoadBalancer)

-- | An array of public port settings for your load balancer. For HTTP, use
-- port 80. For HTTPS, use port 443.
loadBalancer_publicPorts :: Lens.Lens' LoadBalancer (Prelude.Maybe [Prelude.Int])
loadBalancer_publicPorts :: (Maybe [Int] -> f (Maybe [Int])) -> LoadBalancer -> f LoadBalancer
loadBalancer_publicPorts = (LoadBalancer -> Maybe [Int])
-> (LoadBalancer -> Maybe [Int] -> LoadBalancer)
-> Lens LoadBalancer LoadBalancer (Maybe [Int]) (Maybe [Int])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoadBalancer' {Maybe [Int]
publicPorts :: Maybe [Int]
$sel:publicPorts:LoadBalancer' :: LoadBalancer -> Maybe [Int]
publicPorts} -> Maybe [Int]
publicPorts) (\s :: LoadBalancer
s@LoadBalancer' {} Maybe [Int]
a -> LoadBalancer
s {$sel:publicPorts:LoadBalancer' :: Maybe [Int]
publicPorts = Maybe [Int]
a} :: LoadBalancer) ((Maybe [Int] -> f (Maybe [Int]))
 -> LoadBalancer -> f LoadBalancer)
-> ((Maybe [Int] -> f (Maybe [Int]))
    -> Maybe [Int] -> f (Maybe [Int]))
-> (Maybe [Int] -> f (Maybe [Int]))
-> LoadBalancer
-> f LoadBalancer
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Int] [Int] [Int] [Int]
-> Iso (Maybe [Int]) (Maybe [Int]) (Maybe [Int]) (Maybe [Int])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Int] [Int] [Int] [Int]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The DNS name of your Lightsail load balancer.
loadBalancer_dnsName :: Lens.Lens' LoadBalancer (Prelude.Maybe Prelude.Text)
loadBalancer_dnsName :: (Maybe Text -> f (Maybe Text)) -> LoadBalancer -> f LoadBalancer
loadBalancer_dnsName = (LoadBalancer -> Maybe Text)
-> (LoadBalancer -> Maybe Text -> LoadBalancer)
-> Lens LoadBalancer LoadBalancer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoadBalancer' {Maybe Text
dnsName :: Maybe Text
$sel:dnsName:LoadBalancer' :: LoadBalancer -> Maybe Text
dnsName} -> Maybe Text
dnsName) (\s :: LoadBalancer
s@LoadBalancer' {} Maybe Text
a -> LoadBalancer
s {$sel:dnsName:LoadBalancer' :: Maybe Text
dnsName = Maybe Text
a} :: LoadBalancer)

-- | An array of InstanceHealthSummary objects describing the health of the
-- load balancer.
loadBalancer_instanceHealthSummary :: Lens.Lens' LoadBalancer (Prelude.Maybe [InstanceHealthSummary])
loadBalancer_instanceHealthSummary :: (Maybe [InstanceHealthSummary]
 -> f (Maybe [InstanceHealthSummary]))
-> LoadBalancer -> f LoadBalancer
loadBalancer_instanceHealthSummary = (LoadBalancer -> Maybe [InstanceHealthSummary])
-> (LoadBalancer -> Maybe [InstanceHealthSummary] -> LoadBalancer)
-> Lens
     LoadBalancer
     LoadBalancer
     (Maybe [InstanceHealthSummary])
     (Maybe [InstanceHealthSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoadBalancer' {Maybe [InstanceHealthSummary]
instanceHealthSummary :: Maybe [InstanceHealthSummary]
$sel:instanceHealthSummary:LoadBalancer' :: LoadBalancer -> Maybe [InstanceHealthSummary]
instanceHealthSummary} -> Maybe [InstanceHealthSummary]
instanceHealthSummary) (\s :: LoadBalancer
s@LoadBalancer' {} Maybe [InstanceHealthSummary]
a -> LoadBalancer
s {$sel:instanceHealthSummary:LoadBalancer' :: Maybe [InstanceHealthSummary]
instanceHealthSummary = Maybe [InstanceHealthSummary]
a} :: LoadBalancer) ((Maybe [InstanceHealthSummary]
  -> f (Maybe [InstanceHealthSummary]))
 -> LoadBalancer -> f LoadBalancer)
-> ((Maybe [InstanceHealthSummary]
     -> f (Maybe [InstanceHealthSummary]))
    -> Maybe [InstanceHealthSummary]
    -> f (Maybe [InstanceHealthSummary]))
-> (Maybe [InstanceHealthSummary]
    -> f (Maybe [InstanceHealthSummary]))
-> LoadBalancer
-> f LoadBalancer
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [InstanceHealthSummary]
  [InstanceHealthSummary]
  [InstanceHealthSummary]
  [InstanceHealthSummary]
-> Iso
     (Maybe [InstanceHealthSummary])
     (Maybe [InstanceHealthSummary])
     (Maybe [InstanceHealthSummary])
     (Maybe [InstanceHealthSummary])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [InstanceHealthSummary]
  [InstanceHealthSummary]
  [InstanceHealthSummary]
  [InstanceHealthSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The tag keys and optional values for the resource. For more information
-- about tags in Lightsail, see the
-- <https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-tags Amazon Lightsail Developer Guide>.
loadBalancer_tags :: Lens.Lens' LoadBalancer (Prelude.Maybe [Tag])
loadBalancer_tags :: (Maybe [Tag] -> f (Maybe [Tag])) -> LoadBalancer -> f LoadBalancer
loadBalancer_tags = (LoadBalancer -> Maybe [Tag])
-> (LoadBalancer -> Maybe [Tag] -> LoadBalancer)
-> Lens LoadBalancer LoadBalancer (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoadBalancer' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:LoadBalancer' :: LoadBalancer -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: LoadBalancer
s@LoadBalancer' {} Maybe [Tag]
a -> LoadBalancer
s {$sel:tags:LoadBalancer' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: LoadBalancer) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> LoadBalancer -> f LoadBalancer)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> LoadBalancer
-> f LoadBalancer
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.FromJSON LoadBalancer where
  parseJSON :: Value -> Parser LoadBalancer
parseJSON =
    String
-> (Object -> Parser LoadBalancer) -> Value -> Parser LoadBalancer
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"LoadBalancer"
      ( \Object
x ->
          Maybe Text
-> Maybe LoadBalancerState
-> Maybe ResourceType
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Int
-> Maybe (HashMap LoadBalancerAttributeName Text)
-> Maybe LoadBalancerProtocol
-> Maybe [LoadBalancerTlsCertificateSummary]
-> Maybe Text
-> Maybe IpAddressType
-> Maybe Text
-> Maybe [Int]
-> Maybe Text
-> Maybe [InstanceHealthSummary]
-> Maybe [Tag]
-> LoadBalancer
LoadBalancer'
            (Maybe Text
 -> Maybe LoadBalancerState
 -> Maybe ResourceType
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe ResourceLocation
 -> Maybe Int
 -> Maybe (HashMap LoadBalancerAttributeName Text)
 -> Maybe LoadBalancerProtocol
 -> Maybe [LoadBalancerTlsCertificateSummary]
 -> Maybe Text
 -> Maybe IpAddressType
 -> Maybe Text
 -> Maybe [Int]
 -> Maybe Text
 -> Maybe [InstanceHealthSummary]
 -> Maybe [Tag]
 -> LoadBalancer)
-> Parser (Maybe Text)
-> Parser
     (Maybe LoadBalancerState
      -> Maybe ResourceType
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe ResourceLocation
      -> Maybe Int
      -> Maybe (HashMap LoadBalancerAttributeName Text)
      -> Maybe LoadBalancerProtocol
      -> Maybe [LoadBalancerTlsCertificateSummary]
      -> Maybe Text
      -> Maybe IpAddressType
      -> Maybe Text
      -> Maybe [Int]
      -> Maybe Text
      -> Maybe [InstanceHealthSummary]
      -> Maybe [Tag]
      -> LoadBalancer)
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
"healthCheckPath")
            Parser
  (Maybe LoadBalancerState
   -> Maybe ResourceType
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe ResourceLocation
   -> Maybe Int
   -> Maybe (HashMap LoadBalancerAttributeName Text)
   -> Maybe LoadBalancerProtocol
   -> Maybe [LoadBalancerTlsCertificateSummary]
   -> Maybe Text
   -> Maybe IpAddressType
   -> Maybe Text
   -> Maybe [Int]
   -> Maybe Text
   -> Maybe [InstanceHealthSummary]
   -> Maybe [Tag]
   -> LoadBalancer)
-> Parser (Maybe LoadBalancerState)
-> Parser
     (Maybe ResourceType
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe ResourceLocation
      -> Maybe Int
      -> Maybe (HashMap LoadBalancerAttributeName Text)
      -> Maybe LoadBalancerProtocol
      -> Maybe [LoadBalancerTlsCertificateSummary]
      -> Maybe Text
      -> Maybe IpAddressType
      -> Maybe Text
      -> Maybe [Int]
      -> Maybe Text
      -> Maybe [InstanceHealthSummary]
      -> Maybe [Tag]
      -> LoadBalancer)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LoadBalancerState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"state")
            Parser
  (Maybe ResourceType
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe ResourceLocation
   -> Maybe Int
   -> Maybe (HashMap LoadBalancerAttributeName Text)
   -> Maybe LoadBalancerProtocol
   -> Maybe [LoadBalancerTlsCertificateSummary]
   -> Maybe Text
   -> Maybe IpAddressType
   -> Maybe Text
   -> Maybe [Int]
   -> Maybe Text
   -> Maybe [InstanceHealthSummary]
   -> Maybe [Tag]
   -> LoadBalancer)
-> Parser (Maybe ResourceType)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe ResourceLocation
      -> Maybe Int
      -> Maybe (HashMap LoadBalancerAttributeName Text)
      -> Maybe LoadBalancerProtocol
      -> Maybe [LoadBalancerTlsCertificateSummary]
      -> Maybe Text
      -> Maybe IpAddressType
      -> Maybe Text
      -> Maybe [Int]
      -> Maybe Text
      -> Maybe [InstanceHealthSummary]
      -> Maybe [Tag]
      -> LoadBalancer)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ResourceType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"resourceType")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe ResourceLocation
   -> Maybe Int
   -> Maybe (HashMap LoadBalancerAttributeName Text)
   -> Maybe LoadBalancerProtocol
   -> Maybe [LoadBalancerTlsCertificateSummary]
   -> Maybe Text
   -> Maybe IpAddressType
   -> Maybe Text
   -> Maybe [Int]
   -> Maybe Text
   -> Maybe [InstanceHealthSummary]
   -> Maybe [Tag]
   -> LoadBalancer)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe ResourceLocation
      -> Maybe Int
      -> Maybe (HashMap LoadBalancerAttributeName Text)
      -> Maybe LoadBalancerProtocol
      -> Maybe [LoadBalancerTlsCertificateSummary]
      -> Maybe Text
      -> Maybe IpAddressType
      -> Maybe Text
      -> Maybe [Int]
      -> Maybe Text
      -> Maybe [InstanceHealthSummary]
      -> Maybe [Tag]
      -> LoadBalancer)
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
"arn")
            Parser
  (Maybe POSIX
   -> Maybe ResourceLocation
   -> Maybe Int
   -> Maybe (HashMap LoadBalancerAttributeName Text)
   -> Maybe LoadBalancerProtocol
   -> Maybe [LoadBalancerTlsCertificateSummary]
   -> Maybe Text
   -> Maybe IpAddressType
   -> Maybe Text
   -> Maybe [Int]
   -> Maybe Text
   -> Maybe [InstanceHealthSummary]
   -> Maybe [Tag]
   -> LoadBalancer)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe ResourceLocation
      -> Maybe Int
      -> Maybe (HashMap LoadBalancerAttributeName Text)
      -> Maybe LoadBalancerProtocol
      -> Maybe [LoadBalancerTlsCertificateSummary]
      -> Maybe Text
      -> Maybe IpAddressType
      -> Maybe Text
      -> Maybe [Int]
      -> Maybe Text
      -> Maybe [InstanceHealthSummary]
      -> Maybe [Tag]
      -> LoadBalancer)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"createdAt")
            Parser
  (Maybe ResourceLocation
   -> Maybe Int
   -> Maybe (HashMap LoadBalancerAttributeName Text)
   -> Maybe LoadBalancerProtocol
   -> Maybe [LoadBalancerTlsCertificateSummary]
   -> Maybe Text
   -> Maybe IpAddressType
   -> Maybe Text
   -> Maybe [Int]
   -> Maybe Text
   -> Maybe [InstanceHealthSummary]
   -> Maybe [Tag]
   -> LoadBalancer)
-> Parser (Maybe ResourceLocation)
-> Parser
     (Maybe Int
      -> Maybe (HashMap LoadBalancerAttributeName Text)
      -> Maybe LoadBalancerProtocol
      -> Maybe [LoadBalancerTlsCertificateSummary]
      -> Maybe Text
      -> Maybe IpAddressType
      -> Maybe Text
      -> Maybe [Int]
      -> Maybe Text
      -> Maybe [InstanceHealthSummary]
      -> Maybe [Tag]
      -> LoadBalancer)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ResourceLocation)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"location")
            Parser
  (Maybe Int
   -> Maybe (HashMap LoadBalancerAttributeName Text)
   -> Maybe LoadBalancerProtocol
   -> Maybe [LoadBalancerTlsCertificateSummary]
   -> Maybe Text
   -> Maybe IpAddressType
   -> Maybe Text
   -> Maybe [Int]
   -> Maybe Text
   -> Maybe [InstanceHealthSummary]
   -> Maybe [Tag]
   -> LoadBalancer)
-> Parser (Maybe Int)
-> Parser
     (Maybe (HashMap LoadBalancerAttributeName Text)
      -> Maybe LoadBalancerProtocol
      -> Maybe [LoadBalancerTlsCertificateSummary]
      -> Maybe Text
      -> Maybe IpAddressType
      -> Maybe Text
      -> Maybe [Int]
      -> Maybe Text
      -> Maybe [InstanceHealthSummary]
      -> Maybe [Tag]
      -> LoadBalancer)
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
"instancePort")
            Parser
  (Maybe (HashMap LoadBalancerAttributeName Text)
   -> Maybe LoadBalancerProtocol
   -> Maybe [LoadBalancerTlsCertificateSummary]
   -> Maybe Text
   -> Maybe IpAddressType
   -> Maybe Text
   -> Maybe [Int]
   -> Maybe Text
   -> Maybe [InstanceHealthSummary]
   -> Maybe [Tag]
   -> LoadBalancer)
-> Parser (Maybe (HashMap LoadBalancerAttributeName Text))
-> Parser
     (Maybe LoadBalancerProtocol
      -> Maybe [LoadBalancerTlsCertificateSummary]
      -> Maybe Text
      -> Maybe IpAddressType
      -> Maybe Text
      -> Maybe [Int]
      -> Maybe Text
      -> Maybe [InstanceHealthSummary]
      -> Maybe [Tag]
      -> LoadBalancer)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Parser (Maybe (Maybe (HashMap LoadBalancerAttributeName Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"configurationOptions"
                            Parser (Maybe (Maybe (HashMap LoadBalancerAttributeName Text)))
-> Maybe (HashMap LoadBalancerAttributeName Text)
-> Parser (Maybe (HashMap LoadBalancerAttributeName Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap LoadBalancerAttributeName Text)
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe LoadBalancerProtocol
   -> Maybe [LoadBalancerTlsCertificateSummary]
   -> Maybe Text
   -> Maybe IpAddressType
   -> Maybe Text
   -> Maybe [Int]
   -> Maybe Text
   -> Maybe [InstanceHealthSummary]
   -> Maybe [Tag]
   -> LoadBalancer)
-> Parser (Maybe LoadBalancerProtocol)
-> Parser
     (Maybe [LoadBalancerTlsCertificateSummary]
      -> Maybe Text
      -> Maybe IpAddressType
      -> Maybe Text
      -> Maybe [Int]
      -> Maybe Text
      -> Maybe [InstanceHealthSummary]
      -> Maybe [Tag]
      -> LoadBalancer)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LoadBalancerProtocol)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"protocol")
            Parser
  (Maybe [LoadBalancerTlsCertificateSummary]
   -> Maybe Text
   -> Maybe IpAddressType
   -> Maybe Text
   -> Maybe [Int]
   -> Maybe Text
   -> Maybe [InstanceHealthSummary]
   -> Maybe [Tag]
   -> LoadBalancer)
-> Parser (Maybe [LoadBalancerTlsCertificateSummary])
-> Parser
     (Maybe Text
      -> Maybe IpAddressType
      -> Maybe Text
      -> Maybe [Int]
      -> Maybe Text
      -> Maybe [InstanceHealthSummary]
      -> Maybe [Tag]
      -> LoadBalancer)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Parser (Maybe (Maybe [LoadBalancerTlsCertificateSummary]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tlsCertificateSummaries"
                            Parser (Maybe (Maybe [LoadBalancerTlsCertificateSummary]))
-> Maybe [LoadBalancerTlsCertificateSummary]
-> Parser (Maybe [LoadBalancerTlsCertificateSummary])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [LoadBalancerTlsCertificateSummary]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Text
   -> Maybe IpAddressType
   -> Maybe Text
   -> Maybe [Int]
   -> Maybe Text
   -> Maybe [InstanceHealthSummary]
   -> Maybe [Tag]
   -> LoadBalancer)
-> Parser (Maybe Text)
-> Parser
     (Maybe IpAddressType
      -> Maybe Text
      -> Maybe [Int]
      -> Maybe Text
      -> Maybe [InstanceHealthSummary]
      -> Maybe [Tag]
      -> LoadBalancer)
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
"name")
            Parser
  (Maybe IpAddressType
   -> Maybe Text
   -> Maybe [Int]
   -> Maybe Text
   -> Maybe [InstanceHealthSummary]
   -> Maybe [Tag]
   -> LoadBalancer)
-> Parser (Maybe IpAddressType)
-> Parser
     (Maybe Text
      -> Maybe [Int]
      -> Maybe Text
      -> Maybe [InstanceHealthSummary]
      -> Maybe [Tag]
      -> LoadBalancer)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe IpAddressType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ipAddressType")
            Parser
  (Maybe Text
   -> Maybe [Int]
   -> Maybe Text
   -> Maybe [InstanceHealthSummary]
   -> Maybe [Tag]
   -> LoadBalancer)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Int]
      -> Maybe Text
      -> Maybe [InstanceHealthSummary]
      -> Maybe [Tag]
      -> LoadBalancer)
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
"supportCode")
            Parser
  (Maybe [Int]
   -> Maybe Text
   -> Maybe [InstanceHealthSummary]
   -> Maybe [Tag]
   -> LoadBalancer)
-> Parser (Maybe [Int])
-> Parser
     (Maybe Text
      -> Maybe [InstanceHealthSummary] -> Maybe [Tag] -> LoadBalancer)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Int]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"publicPorts" Parser (Maybe (Maybe [Int])) -> Maybe [Int] -> Parser (Maybe [Int])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Int]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe [InstanceHealthSummary] -> Maybe [Tag] -> LoadBalancer)
-> Parser (Maybe Text)
-> Parser
     (Maybe [InstanceHealthSummary] -> Maybe [Tag] -> LoadBalancer)
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
"dnsName")
            Parser
  (Maybe [InstanceHealthSummary] -> Maybe [Tag] -> LoadBalancer)
-> Parser (Maybe [InstanceHealthSummary])
-> Parser (Maybe [Tag] -> LoadBalancer)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [InstanceHealthSummary]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"instanceHealthSummary"
                            Parser (Maybe (Maybe [InstanceHealthSummary]))
-> Maybe [InstanceHealthSummary]
-> Parser (Maybe [InstanceHealthSummary])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [InstanceHealthSummary]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser (Maybe [Tag] -> LoadBalancer)
-> Parser (Maybe [Tag]) -> Parser LoadBalancer
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Tag]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe [Tag])) -> Maybe [Tag] -> Parser (Maybe [Tag])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Tag]
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable LoadBalancer

instance Prelude.NFData LoadBalancer