{-# 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.OpsWorks.Types.ElasticLoadBalancer
-- 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.OpsWorks.Types.ElasticLoadBalancer where

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

-- | Describes an Elastic Load Balancing instance.
--
-- /See:/ 'newElasticLoadBalancer' smart constructor.
data ElasticLoadBalancer = ElasticLoadBalancer'
  { -- | A list of subnet IDs, if the stack is running in a VPC.
    ElasticLoadBalancer -> Maybe [Text]
subnetIds :: Prelude.Maybe [Prelude.Text],
    -- | The VPC ID.
    ElasticLoadBalancer -> Maybe Text
vpcId :: Prelude.Maybe Prelude.Text,
    -- | A list of Availability Zones.
    ElasticLoadBalancer -> Maybe [Text]
availabilityZones :: Prelude.Maybe [Prelude.Text],
    -- | The instance\'s AWS region.
    ElasticLoadBalancer -> Maybe Text
region :: Prelude.Maybe Prelude.Text,
    -- | The Elastic Load Balancing instance\'s name.
    ElasticLoadBalancer -> Maybe Text
elasticLoadBalancerName :: Prelude.Maybe Prelude.Text,
    -- | The ID of the stack that the instance is associated with.
    ElasticLoadBalancer -> Maybe Text
stackId :: Prelude.Maybe Prelude.Text,
    -- | A list of the EC2 instances that the Elastic Load Balancing instance is
    -- managing traffic for.
    ElasticLoadBalancer -> Maybe [Text]
ec2InstanceIds :: Prelude.Maybe [Prelude.Text],
    -- | The ID of the layer that the instance is attached to.
    ElasticLoadBalancer -> Maybe Text
layerId :: Prelude.Maybe Prelude.Text,
    -- | The instance\'s public DNS name.
    ElasticLoadBalancer -> Maybe Text
dnsName :: Prelude.Maybe Prelude.Text
  }
  deriving (ElasticLoadBalancer -> ElasticLoadBalancer -> Bool
(ElasticLoadBalancer -> ElasticLoadBalancer -> Bool)
-> (ElasticLoadBalancer -> ElasticLoadBalancer -> Bool)
-> Eq ElasticLoadBalancer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ElasticLoadBalancer -> ElasticLoadBalancer -> Bool
$c/= :: ElasticLoadBalancer -> ElasticLoadBalancer -> Bool
== :: ElasticLoadBalancer -> ElasticLoadBalancer -> Bool
$c== :: ElasticLoadBalancer -> ElasticLoadBalancer -> Bool
Prelude.Eq, ReadPrec [ElasticLoadBalancer]
ReadPrec ElasticLoadBalancer
Int -> ReadS ElasticLoadBalancer
ReadS [ElasticLoadBalancer]
(Int -> ReadS ElasticLoadBalancer)
-> ReadS [ElasticLoadBalancer]
-> ReadPrec ElasticLoadBalancer
-> ReadPrec [ElasticLoadBalancer]
-> Read ElasticLoadBalancer
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ElasticLoadBalancer]
$creadListPrec :: ReadPrec [ElasticLoadBalancer]
readPrec :: ReadPrec ElasticLoadBalancer
$creadPrec :: ReadPrec ElasticLoadBalancer
readList :: ReadS [ElasticLoadBalancer]
$creadList :: ReadS [ElasticLoadBalancer]
readsPrec :: Int -> ReadS ElasticLoadBalancer
$creadsPrec :: Int -> ReadS ElasticLoadBalancer
Prelude.Read, Int -> ElasticLoadBalancer -> ShowS
[ElasticLoadBalancer] -> ShowS
ElasticLoadBalancer -> String
(Int -> ElasticLoadBalancer -> ShowS)
-> (ElasticLoadBalancer -> String)
-> ([ElasticLoadBalancer] -> ShowS)
-> Show ElasticLoadBalancer
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ElasticLoadBalancer] -> ShowS
$cshowList :: [ElasticLoadBalancer] -> ShowS
show :: ElasticLoadBalancer -> String
$cshow :: ElasticLoadBalancer -> String
showsPrec :: Int -> ElasticLoadBalancer -> ShowS
$cshowsPrec :: Int -> ElasticLoadBalancer -> ShowS
Prelude.Show, (forall x. ElasticLoadBalancer -> Rep ElasticLoadBalancer x)
-> (forall x. Rep ElasticLoadBalancer x -> ElasticLoadBalancer)
-> Generic ElasticLoadBalancer
forall x. Rep ElasticLoadBalancer x -> ElasticLoadBalancer
forall x. ElasticLoadBalancer -> Rep ElasticLoadBalancer x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ElasticLoadBalancer x -> ElasticLoadBalancer
$cfrom :: forall x. ElasticLoadBalancer -> Rep ElasticLoadBalancer x
Prelude.Generic)

-- |
-- Create a value of 'ElasticLoadBalancer' 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:
--
-- 'subnetIds', 'elasticLoadBalancer_subnetIds' - A list of subnet IDs, if the stack is running in a VPC.
--
-- 'vpcId', 'elasticLoadBalancer_vpcId' - The VPC ID.
--
-- 'availabilityZones', 'elasticLoadBalancer_availabilityZones' - A list of Availability Zones.
--
-- 'region', 'elasticLoadBalancer_region' - The instance\'s AWS region.
--
-- 'elasticLoadBalancerName', 'elasticLoadBalancer_elasticLoadBalancerName' - The Elastic Load Balancing instance\'s name.
--
-- 'stackId', 'elasticLoadBalancer_stackId' - The ID of the stack that the instance is associated with.
--
-- 'ec2InstanceIds', 'elasticLoadBalancer_ec2InstanceIds' - A list of the EC2 instances that the Elastic Load Balancing instance is
-- managing traffic for.
--
-- 'layerId', 'elasticLoadBalancer_layerId' - The ID of the layer that the instance is attached to.
--
-- 'dnsName', 'elasticLoadBalancer_dnsName' - The instance\'s public DNS name.
newElasticLoadBalancer ::
  ElasticLoadBalancer
newElasticLoadBalancer :: ElasticLoadBalancer
newElasticLoadBalancer =
  ElasticLoadBalancer' :: Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> ElasticLoadBalancer
ElasticLoadBalancer'
    { $sel:subnetIds:ElasticLoadBalancer' :: Maybe [Text]
subnetIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:vpcId:ElasticLoadBalancer' :: Maybe Text
vpcId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:availabilityZones:ElasticLoadBalancer' :: Maybe [Text]
availabilityZones = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:region:ElasticLoadBalancer' :: Maybe Text
region = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:elasticLoadBalancerName:ElasticLoadBalancer' :: Maybe Text
elasticLoadBalancerName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:stackId:ElasticLoadBalancer' :: Maybe Text
stackId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ec2InstanceIds:ElasticLoadBalancer' :: Maybe [Text]
ec2InstanceIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:layerId:ElasticLoadBalancer' :: Maybe Text
layerId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dnsName:ElasticLoadBalancer' :: Maybe Text
dnsName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | A list of subnet IDs, if the stack is running in a VPC.
elasticLoadBalancer_subnetIds :: Lens.Lens' ElasticLoadBalancer (Prelude.Maybe [Prelude.Text])
elasticLoadBalancer_subnetIds :: (Maybe [Text] -> f (Maybe [Text]))
-> ElasticLoadBalancer -> f ElasticLoadBalancer
elasticLoadBalancer_subnetIds = (ElasticLoadBalancer -> Maybe [Text])
-> (ElasticLoadBalancer -> Maybe [Text] -> ElasticLoadBalancer)
-> Lens
     ElasticLoadBalancer
     ElasticLoadBalancer
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticLoadBalancer' {Maybe [Text]
subnetIds :: Maybe [Text]
$sel:subnetIds:ElasticLoadBalancer' :: ElasticLoadBalancer -> Maybe [Text]
subnetIds} -> Maybe [Text]
subnetIds) (\s :: ElasticLoadBalancer
s@ElasticLoadBalancer' {} Maybe [Text]
a -> ElasticLoadBalancer
s {$sel:subnetIds:ElasticLoadBalancer' :: Maybe [Text]
subnetIds = Maybe [Text]
a} :: ElasticLoadBalancer) ((Maybe [Text] -> f (Maybe [Text]))
 -> ElasticLoadBalancer -> f ElasticLoadBalancer)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ElasticLoadBalancer
-> f ElasticLoadBalancer
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The VPC ID.
elasticLoadBalancer_vpcId :: Lens.Lens' ElasticLoadBalancer (Prelude.Maybe Prelude.Text)
elasticLoadBalancer_vpcId :: (Maybe Text -> f (Maybe Text))
-> ElasticLoadBalancer -> f ElasticLoadBalancer
elasticLoadBalancer_vpcId = (ElasticLoadBalancer -> Maybe Text)
-> (ElasticLoadBalancer -> Maybe Text -> ElasticLoadBalancer)
-> Lens
     ElasticLoadBalancer ElasticLoadBalancer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticLoadBalancer' {Maybe Text
vpcId :: Maybe Text
$sel:vpcId:ElasticLoadBalancer' :: ElasticLoadBalancer -> Maybe Text
vpcId} -> Maybe Text
vpcId) (\s :: ElasticLoadBalancer
s@ElasticLoadBalancer' {} Maybe Text
a -> ElasticLoadBalancer
s {$sel:vpcId:ElasticLoadBalancer' :: Maybe Text
vpcId = Maybe Text
a} :: ElasticLoadBalancer)

-- | A list of Availability Zones.
elasticLoadBalancer_availabilityZones :: Lens.Lens' ElasticLoadBalancer (Prelude.Maybe [Prelude.Text])
elasticLoadBalancer_availabilityZones :: (Maybe [Text] -> f (Maybe [Text]))
-> ElasticLoadBalancer -> f ElasticLoadBalancer
elasticLoadBalancer_availabilityZones = (ElasticLoadBalancer -> Maybe [Text])
-> (ElasticLoadBalancer -> Maybe [Text] -> ElasticLoadBalancer)
-> Lens
     ElasticLoadBalancer
     ElasticLoadBalancer
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticLoadBalancer' {Maybe [Text]
availabilityZones :: Maybe [Text]
$sel:availabilityZones:ElasticLoadBalancer' :: ElasticLoadBalancer -> Maybe [Text]
availabilityZones} -> Maybe [Text]
availabilityZones) (\s :: ElasticLoadBalancer
s@ElasticLoadBalancer' {} Maybe [Text]
a -> ElasticLoadBalancer
s {$sel:availabilityZones:ElasticLoadBalancer' :: Maybe [Text]
availabilityZones = Maybe [Text]
a} :: ElasticLoadBalancer) ((Maybe [Text] -> f (Maybe [Text]))
 -> ElasticLoadBalancer -> f ElasticLoadBalancer)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ElasticLoadBalancer
-> f ElasticLoadBalancer
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The instance\'s AWS region.
elasticLoadBalancer_region :: Lens.Lens' ElasticLoadBalancer (Prelude.Maybe Prelude.Text)
elasticLoadBalancer_region :: (Maybe Text -> f (Maybe Text))
-> ElasticLoadBalancer -> f ElasticLoadBalancer
elasticLoadBalancer_region = (ElasticLoadBalancer -> Maybe Text)
-> (ElasticLoadBalancer -> Maybe Text -> ElasticLoadBalancer)
-> Lens
     ElasticLoadBalancer ElasticLoadBalancer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticLoadBalancer' {Maybe Text
region :: Maybe Text
$sel:region:ElasticLoadBalancer' :: ElasticLoadBalancer -> Maybe Text
region} -> Maybe Text
region) (\s :: ElasticLoadBalancer
s@ElasticLoadBalancer' {} Maybe Text
a -> ElasticLoadBalancer
s {$sel:region:ElasticLoadBalancer' :: Maybe Text
region = Maybe Text
a} :: ElasticLoadBalancer)

-- | The Elastic Load Balancing instance\'s name.
elasticLoadBalancer_elasticLoadBalancerName :: Lens.Lens' ElasticLoadBalancer (Prelude.Maybe Prelude.Text)
elasticLoadBalancer_elasticLoadBalancerName :: (Maybe Text -> f (Maybe Text))
-> ElasticLoadBalancer -> f ElasticLoadBalancer
elasticLoadBalancer_elasticLoadBalancerName = (ElasticLoadBalancer -> Maybe Text)
-> (ElasticLoadBalancer -> Maybe Text -> ElasticLoadBalancer)
-> Lens
     ElasticLoadBalancer ElasticLoadBalancer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticLoadBalancer' {Maybe Text
elasticLoadBalancerName :: Maybe Text
$sel:elasticLoadBalancerName:ElasticLoadBalancer' :: ElasticLoadBalancer -> Maybe Text
elasticLoadBalancerName} -> Maybe Text
elasticLoadBalancerName) (\s :: ElasticLoadBalancer
s@ElasticLoadBalancer' {} Maybe Text
a -> ElasticLoadBalancer
s {$sel:elasticLoadBalancerName:ElasticLoadBalancer' :: Maybe Text
elasticLoadBalancerName = Maybe Text
a} :: ElasticLoadBalancer)

-- | The ID of the stack that the instance is associated with.
elasticLoadBalancer_stackId :: Lens.Lens' ElasticLoadBalancer (Prelude.Maybe Prelude.Text)
elasticLoadBalancer_stackId :: (Maybe Text -> f (Maybe Text))
-> ElasticLoadBalancer -> f ElasticLoadBalancer
elasticLoadBalancer_stackId = (ElasticLoadBalancer -> Maybe Text)
-> (ElasticLoadBalancer -> Maybe Text -> ElasticLoadBalancer)
-> Lens
     ElasticLoadBalancer ElasticLoadBalancer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticLoadBalancer' {Maybe Text
stackId :: Maybe Text
$sel:stackId:ElasticLoadBalancer' :: ElasticLoadBalancer -> Maybe Text
stackId} -> Maybe Text
stackId) (\s :: ElasticLoadBalancer
s@ElasticLoadBalancer' {} Maybe Text
a -> ElasticLoadBalancer
s {$sel:stackId:ElasticLoadBalancer' :: Maybe Text
stackId = Maybe Text
a} :: ElasticLoadBalancer)

-- | A list of the EC2 instances that the Elastic Load Balancing instance is
-- managing traffic for.
elasticLoadBalancer_ec2InstanceIds :: Lens.Lens' ElasticLoadBalancer (Prelude.Maybe [Prelude.Text])
elasticLoadBalancer_ec2InstanceIds :: (Maybe [Text] -> f (Maybe [Text]))
-> ElasticLoadBalancer -> f ElasticLoadBalancer
elasticLoadBalancer_ec2InstanceIds = (ElasticLoadBalancer -> Maybe [Text])
-> (ElasticLoadBalancer -> Maybe [Text] -> ElasticLoadBalancer)
-> Lens
     ElasticLoadBalancer
     ElasticLoadBalancer
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticLoadBalancer' {Maybe [Text]
ec2InstanceIds :: Maybe [Text]
$sel:ec2InstanceIds:ElasticLoadBalancer' :: ElasticLoadBalancer -> Maybe [Text]
ec2InstanceIds} -> Maybe [Text]
ec2InstanceIds) (\s :: ElasticLoadBalancer
s@ElasticLoadBalancer' {} Maybe [Text]
a -> ElasticLoadBalancer
s {$sel:ec2InstanceIds:ElasticLoadBalancer' :: Maybe [Text]
ec2InstanceIds = Maybe [Text]
a} :: ElasticLoadBalancer) ((Maybe [Text] -> f (Maybe [Text]))
 -> ElasticLoadBalancer -> f ElasticLoadBalancer)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ElasticLoadBalancer
-> f ElasticLoadBalancer
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The ID of the layer that the instance is attached to.
elasticLoadBalancer_layerId :: Lens.Lens' ElasticLoadBalancer (Prelude.Maybe Prelude.Text)
elasticLoadBalancer_layerId :: (Maybe Text -> f (Maybe Text))
-> ElasticLoadBalancer -> f ElasticLoadBalancer
elasticLoadBalancer_layerId = (ElasticLoadBalancer -> Maybe Text)
-> (ElasticLoadBalancer -> Maybe Text -> ElasticLoadBalancer)
-> Lens
     ElasticLoadBalancer ElasticLoadBalancer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticLoadBalancer' {Maybe Text
layerId :: Maybe Text
$sel:layerId:ElasticLoadBalancer' :: ElasticLoadBalancer -> Maybe Text
layerId} -> Maybe Text
layerId) (\s :: ElasticLoadBalancer
s@ElasticLoadBalancer' {} Maybe Text
a -> ElasticLoadBalancer
s {$sel:layerId:ElasticLoadBalancer' :: Maybe Text
layerId = Maybe Text
a} :: ElasticLoadBalancer)

-- | The instance\'s public DNS name.
elasticLoadBalancer_dnsName :: Lens.Lens' ElasticLoadBalancer (Prelude.Maybe Prelude.Text)
elasticLoadBalancer_dnsName :: (Maybe Text -> f (Maybe Text))
-> ElasticLoadBalancer -> f ElasticLoadBalancer
elasticLoadBalancer_dnsName = (ElasticLoadBalancer -> Maybe Text)
-> (ElasticLoadBalancer -> Maybe Text -> ElasticLoadBalancer)
-> Lens
     ElasticLoadBalancer ElasticLoadBalancer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticLoadBalancer' {Maybe Text
dnsName :: Maybe Text
$sel:dnsName:ElasticLoadBalancer' :: ElasticLoadBalancer -> Maybe Text
dnsName} -> Maybe Text
dnsName) (\s :: ElasticLoadBalancer
s@ElasticLoadBalancer' {} Maybe Text
a -> ElasticLoadBalancer
s {$sel:dnsName:ElasticLoadBalancer' :: Maybe Text
dnsName = Maybe Text
a} :: ElasticLoadBalancer)

instance Core.FromJSON ElasticLoadBalancer where
  parseJSON :: Value -> Parser ElasticLoadBalancer
parseJSON =
    String
-> (Object -> Parser ElasticLoadBalancer)
-> Value
-> Parser ElasticLoadBalancer
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ElasticLoadBalancer"
      ( \Object
x ->
          Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> ElasticLoadBalancer
ElasticLoadBalancer'
            (Maybe [Text]
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe Text
 -> ElasticLoadBalancer)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> ElasticLoadBalancer)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SubnetIds" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> ElasticLoadBalancer)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> ElasticLoadBalancer)
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
"VpcId")
            Parser
  (Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> ElasticLoadBalancer)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> ElasticLoadBalancer)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AvailabilityZones"
                            Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> ElasticLoadBalancer)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> ElasticLoadBalancer)
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
"Region")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> ElasticLoadBalancer)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [Text] -> Maybe Text -> Maybe Text -> ElasticLoadBalancer)
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
"ElasticLoadBalancerName")
            Parser
  (Maybe Text
   -> Maybe [Text] -> Maybe Text -> Maybe Text -> ElasticLoadBalancer)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text] -> Maybe Text -> Maybe Text -> ElasticLoadBalancer)
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
"StackId")
            Parser
  (Maybe [Text] -> Maybe Text -> Maybe Text -> ElasticLoadBalancer)
-> Parser (Maybe [Text])
-> Parser (Maybe Text -> Maybe Text -> ElasticLoadBalancer)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Ec2InstanceIds" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Parser (Maybe Text -> Maybe Text -> ElasticLoadBalancer)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> ElasticLoadBalancer)
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
"LayerId")
            Parser (Maybe Text -> ElasticLoadBalancer)
-> Parser (Maybe Text) -> Parser ElasticLoadBalancer
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")
      )

instance Prelude.Hashable ElasticLoadBalancer

instance Prelude.NFData ElasticLoadBalancer