{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

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

-- |
-- Module      : Amazonka.ELB.DisableAvailabilityZonesForLoadBalancer
-- 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)
--
-- Removes the specified Availability Zones from the set of Availability
-- Zones for the specified load balancer in EC2-Classic or a default VPC.
--
-- For load balancers in a non-default VPC, use
-- DetachLoadBalancerFromSubnets.
--
-- There must be at least one Availability Zone registered with a load
-- balancer at all times. After an Availability Zone is removed, all
-- instances registered with the load balancer that are in the removed
-- Availability Zone go into the @OutOfService@ state. Then, the load
-- balancer attempts to equally balance the traffic among its remaining
-- Availability Zones.
--
-- For more information, see
-- <https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-disable-az.html Add or Remove Availability Zones>
-- in the /Classic Load Balancers Guide/.
module Amazonka.ELB.DisableAvailabilityZonesForLoadBalancer
  ( -- * Creating a Request
    DisableAvailabilityZonesForLoadBalancer (..),
    newDisableAvailabilityZonesForLoadBalancer,

    -- * Request Lenses
    disableAvailabilityZonesForLoadBalancer_loadBalancerName,
    disableAvailabilityZonesForLoadBalancer_availabilityZones,

    -- * Destructuring the Response
    DisableAvailabilityZonesForLoadBalancerResponse (..),
    newDisableAvailabilityZonesForLoadBalancerResponse,

    -- * Response Lenses
    disableAvailabilityZonesForLoadBalancerResponse_availabilityZones,
    disableAvailabilityZonesForLoadBalancerResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.ELB.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | Contains the parameters for DisableAvailabilityZonesForLoadBalancer.
--
-- /See:/ 'newDisableAvailabilityZonesForLoadBalancer' smart constructor.
data DisableAvailabilityZonesForLoadBalancer = DisableAvailabilityZonesForLoadBalancer'
  { -- | The name of the load balancer.
    DisableAvailabilityZonesForLoadBalancer -> Text
loadBalancerName :: Prelude.Text,
    -- | The Availability Zones.
    DisableAvailabilityZonesForLoadBalancer -> [Text]
availabilityZones :: [Prelude.Text]
  }
  deriving (DisableAvailabilityZonesForLoadBalancer
-> DisableAvailabilityZonesForLoadBalancer -> Bool
(DisableAvailabilityZonesForLoadBalancer
 -> DisableAvailabilityZonesForLoadBalancer -> Bool)
-> (DisableAvailabilityZonesForLoadBalancer
    -> DisableAvailabilityZonesForLoadBalancer -> Bool)
-> Eq DisableAvailabilityZonesForLoadBalancer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisableAvailabilityZonesForLoadBalancer
-> DisableAvailabilityZonesForLoadBalancer -> Bool
$c/= :: DisableAvailabilityZonesForLoadBalancer
-> DisableAvailabilityZonesForLoadBalancer -> Bool
== :: DisableAvailabilityZonesForLoadBalancer
-> DisableAvailabilityZonesForLoadBalancer -> Bool
$c== :: DisableAvailabilityZonesForLoadBalancer
-> DisableAvailabilityZonesForLoadBalancer -> Bool
Prelude.Eq, ReadPrec [DisableAvailabilityZonesForLoadBalancer]
ReadPrec DisableAvailabilityZonesForLoadBalancer
Int -> ReadS DisableAvailabilityZonesForLoadBalancer
ReadS [DisableAvailabilityZonesForLoadBalancer]
(Int -> ReadS DisableAvailabilityZonesForLoadBalancer)
-> ReadS [DisableAvailabilityZonesForLoadBalancer]
-> ReadPrec DisableAvailabilityZonesForLoadBalancer
-> ReadPrec [DisableAvailabilityZonesForLoadBalancer]
-> Read DisableAvailabilityZonesForLoadBalancer
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisableAvailabilityZonesForLoadBalancer]
$creadListPrec :: ReadPrec [DisableAvailabilityZonesForLoadBalancer]
readPrec :: ReadPrec DisableAvailabilityZonesForLoadBalancer
$creadPrec :: ReadPrec DisableAvailabilityZonesForLoadBalancer
readList :: ReadS [DisableAvailabilityZonesForLoadBalancer]
$creadList :: ReadS [DisableAvailabilityZonesForLoadBalancer]
readsPrec :: Int -> ReadS DisableAvailabilityZonesForLoadBalancer
$creadsPrec :: Int -> ReadS DisableAvailabilityZonesForLoadBalancer
Prelude.Read, Int -> DisableAvailabilityZonesForLoadBalancer -> ShowS
[DisableAvailabilityZonesForLoadBalancer] -> ShowS
DisableAvailabilityZonesForLoadBalancer -> String
(Int -> DisableAvailabilityZonesForLoadBalancer -> ShowS)
-> (DisableAvailabilityZonesForLoadBalancer -> String)
-> ([DisableAvailabilityZonesForLoadBalancer] -> ShowS)
-> Show DisableAvailabilityZonesForLoadBalancer
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisableAvailabilityZonesForLoadBalancer] -> ShowS
$cshowList :: [DisableAvailabilityZonesForLoadBalancer] -> ShowS
show :: DisableAvailabilityZonesForLoadBalancer -> String
$cshow :: DisableAvailabilityZonesForLoadBalancer -> String
showsPrec :: Int -> DisableAvailabilityZonesForLoadBalancer -> ShowS
$cshowsPrec :: Int -> DisableAvailabilityZonesForLoadBalancer -> ShowS
Prelude.Show, (forall x.
 DisableAvailabilityZonesForLoadBalancer
 -> Rep DisableAvailabilityZonesForLoadBalancer x)
-> (forall x.
    Rep DisableAvailabilityZonesForLoadBalancer x
    -> DisableAvailabilityZonesForLoadBalancer)
-> Generic DisableAvailabilityZonesForLoadBalancer
forall x.
Rep DisableAvailabilityZonesForLoadBalancer x
-> DisableAvailabilityZonesForLoadBalancer
forall x.
DisableAvailabilityZonesForLoadBalancer
-> Rep DisableAvailabilityZonesForLoadBalancer x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisableAvailabilityZonesForLoadBalancer x
-> DisableAvailabilityZonesForLoadBalancer
$cfrom :: forall x.
DisableAvailabilityZonesForLoadBalancer
-> Rep DisableAvailabilityZonesForLoadBalancer x
Prelude.Generic)

-- |
-- Create a value of 'DisableAvailabilityZonesForLoadBalancer' 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:
--
-- 'loadBalancerName', 'disableAvailabilityZonesForLoadBalancer_loadBalancerName' - The name of the load balancer.
--
-- 'availabilityZones', 'disableAvailabilityZonesForLoadBalancer_availabilityZones' - The Availability Zones.
newDisableAvailabilityZonesForLoadBalancer ::
  -- | 'loadBalancerName'
  Prelude.Text ->
  DisableAvailabilityZonesForLoadBalancer
newDisableAvailabilityZonesForLoadBalancer :: Text -> DisableAvailabilityZonesForLoadBalancer
newDisableAvailabilityZonesForLoadBalancer
  Text
pLoadBalancerName_ =
    DisableAvailabilityZonesForLoadBalancer' :: Text -> [Text] -> DisableAvailabilityZonesForLoadBalancer
DisableAvailabilityZonesForLoadBalancer'
      { $sel:loadBalancerName:DisableAvailabilityZonesForLoadBalancer' :: Text
loadBalancerName =
          Text
pLoadBalancerName_,
        $sel:availabilityZones:DisableAvailabilityZonesForLoadBalancer' :: [Text]
availabilityZones = [Text]
forall a. Monoid a => a
Prelude.mempty
      }

-- | The name of the load balancer.
disableAvailabilityZonesForLoadBalancer_loadBalancerName :: Lens.Lens' DisableAvailabilityZonesForLoadBalancer Prelude.Text
disableAvailabilityZonesForLoadBalancer_loadBalancerName :: (Text -> f Text)
-> DisableAvailabilityZonesForLoadBalancer
-> f DisableAvailabilityZonesForLoadBalancer
disableAvailabilityZonesForLoadBalancer_loadBalancerName = (DisableAvailabilityZonesForLoadBalancer -> Text)
-> (DisableAvailabilityZonesForLoadBalancer
    -> Text -> DisableAvailabilityZonesForLoadBalancer)
-> Lens
     DisableAvailabilityZonesForLoadBalancer
     DisableAvailabilityZonesForLoadBalancer
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisableAvailabilityZonesForLoadBalancer' {Text
loadBalancerName :: Text
$sel:loadBalancerName:DisableAvailabilityZonesForLoadBalancer' :: DisableAvailabilityZonesForLoadBalancer -> Text
loadBalancerName} -> Text
loadBalancerName) (\s :: DisableAvailabilityZonesForLoadBalancer
s@DisableAvailabilityZonesForLoadBalancer' {} Text
a -> DisableAvailabilityZonesForLoadBalancer
s {$sel:loadBalancerName:DisableAvailabilityZonesForLoadBalancer' :: Text
loadBalancerName = Text
a} :: DisableAvailabilityZonesForLoadBalancer)

-- | The Availability Zones.
disableAvailabilityZonesForLoadBalancer_availabilityZones :: Lens.Lens' DisableAvailabilityZonesForLoadBalancer [Prelude.Text]
disableAvailabilityZonesForLoadBalancer_availabilityZones :: ([Text] -> f [Text])
-> DisableAvailabilityZonesForLoadBalancer
-> f DisableAvailabilityZonesForLoadBalancer
disableAvailabilityZonesForLoadBalancer_availabilityZones = (DisableAvailabilityZonesForLoadBalancer -> [Text])
-> (DisableAvailabilityZonesForLoadBalancer
    -> [Text] -> DisableAvailabilityZonesForLoadBalancer)
-> Lens
     DisableAvailabilityZonesForLoadBalancer
     DisableAvailabilityZonesForLoadBalancer
     [Text]
     [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisableAvailabilityZonesForLoadBalancer' {[Text]
availabilityZones :: [Text]
$sel:availabilityZones:DisableAvailabilityZonesForLoadBalancer' :: DisableAvailabilityZonesForLoadBalancer -> [Text]
availabilityZones} -> [Text]
availabilityZones) (\s :: DisableAvailabilityZonesForLoadBalancer
s@DisableAvailabilityZonesForLoadBalancer' {} [Text]
a -> DisableAvailabilityZonesForLoadBalancer
s {$sel:availabilityZones:DisableAvailabilityZonesForLoadBalancer' :: [Text]
availabilityZones = [Text]
a} :: DisableAvailabilityZonesForLoadBalancer) (([Text] -> f [Text])
 -> DisableAvailabilityZonesForLoadBalancer
 -> f DisableAvailabilityZonesForLoadBalancer)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> DisableAvailabilityZonesForLoadBalancer
-> f DisableAvailabilityZonesForLoadBalancer
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Core.AWSRequest
    DisableAvailabilityZonesForLoadBalancer
  where
  type
    AWSResponse
      DisableAvailabilityZonesForLoadBalancer =
      DisableAvailabilityZonesForLoadBalancerResponse
  request :: DisableAvailabilityZonesForLoadBalancer
-> Request DisableAvailabilityZonesForLoadBalancer
request = Service
-> DisableAvailabilityZonesForLoadBalancer
-> Request DisableAvailabilityZonesForLoadBalancer
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy DisableAvailabilityZonesForLoadBalancer
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse DisableAvailabilityZonesForLoadBalancer)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either
         String (AWSResponse DisableAvailabilityZonesForLoadBalancer))
-> Logger
-> Service
-> Proxy DisableAvailabilityZonesForLoadBalancer
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse DisableAvailabilityZonesForLoadBalancer)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"DisableAvailabilityZonesForLoadBalancerResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe [Text]
-> Int -> DisableAvailabilityZonesForLoadBalancerResponse
DisableAvailabilityZonesForLoadBalancerResponse'
            (Maybe [Text]
 -> Int -> DisableAvailabilityZonesForLoadBalancerResponse)
-> Either String (Maybe [Text])
-> Either
     String (Int -> DisableAvailabilityZonesForLoadBalancerResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"AvailabilityZones"
                            Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                            Either String [Node]
-> ([Node] -> Either String (Maybe [Text]))
-> Either String (Maybe [Text])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Text])
-> [Node] -> Either String (Maybe [Text])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Text]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                        )
              Either
  String (Int -> DisableAvailabilityZonesForLoadBalancerResponse)
-> Either String Int
-> Either String DisableAvailabilityZonesForLoadBalancerResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    DisableAvailabilityZonesForLoadBalancer

instance
  Prelude.NFData
    DisableAvailabilityZonesForLoadBalancer

instance
  Core.ToHeaders
    DisableAvailabilityZonesForLoadBalancer
  where
  toHeaders :: DisableAvailabilityZonesForLoadBalancer -> ResponseHeaders
toHeaders = ResponseHeaders
-> DisableAvailabilityZonesForLoadBalancer -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance
  Core.ToPath
    DisableAvailabilityZonesForLoadBalancer
  where
  toPath :: DisableAvailabilityZonesForLoadBalancer -> ByteString
toPath = ByteString -> DisableAvailabilityZonesForLoadBalancer -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance
  Core.ToQuery
    DisableAvailabilityZonesForLoadBalancer
  where
  toQuery :: DisableAvailabilityZonesForLoadBalancer -> QueryString
toQuery DisableAvailabilityZonesForLoadBalancer' {[Text]
Text
availabilityZones :: [Text]
loadBalancerName :: Text
$sel:availabilityZones:DisableAvailabilityZonesForLoadBalancer' :: DisableAvailabilityZonesForLoadBalancer -> [Text]
$sel:loadBalancerName:DisableAvailabilityZonesForLoadBalancer' :: DisableAvailabilityZonesForLoadBalancer -> Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ( ByteString
"DisableAvailabilityZonesForLoadBalancer" ::
                      Prelude.ByteString
                  ),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2012-06-01" :: Prelude.ByteString),
        ByteString
"LoadBalancerName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
loadBalancerName,
        ByteString
"AvailabilityZones"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" [Text]
availabilityZones
      ]

-- | Contains the output for DisableAvailabilityZonesForLoadBalancer.
--
-- /See:/ 'newDisableAvailabilityZonesForLoadBalancerResponse' smart constructor.
data DisableAvailabilityZonesForLoadBalancerResponse = DisableAvailabilityZonesForLoadBalancerResponse'
  { -- | The remaining Availability Zones for the load balancer.
    DisableAvailabilityZonesForLoadBalancerResponse -> Maybe [Text]
availabilityZones :: Prelude.Maybe [Prelude.Text],
    -- | The response's http status code.
    DisableAvailabilityZonesForLoadBalancerResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DisableAvailabilityZonesForLoadBalancerResponse
-> DisableAvailabilityZonesForLoadBalancerResponse -> Bool
(DisableAvailabilityZonesForLoadBalancerResponse
 -> DisableAvailabilityZonesForLoadBalancerResponse -> Bool)
-> (DisableAvailabilityZonesForLoadBalancerResponse
    -> DisableAvailabilityZonesForLoadBalancerResponse -> Bool)
-> Eq DisableAvailabilityZonesForLoadBalancerResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisableAvailabilityZonesForLoadBalancerResponse
-> DisableAvailabilityZonesForLoadBalancerResponse -> Bool
$c/= :: DisableAvailabilityZonesForLoadBalancerResponse
-> DisableAvailabilityZonesForLoadBalancerResponse -> Bool
== :: DisableAvailabilityZonesForLoadBalancerResponse
-> DisableAvailabilityZonesForLoadBalancerResponse -> Bool
$c== :: DisableAvailabilityZonesForLoadBalancerResponse
-> DisableAvailabilityZonesForLoadBalancerResponse -> Bool
Prelude.Eq, ReadPrec [DisableAvailabilityZonesForLoadBalancerResponse]
ReadPrec DisableAvailabilityZonesForLoadBalancerResponse
Int -> ReadS DisableAvailabilityZonesForLoadBalancerResponse
ReadS [DisableAvailabilityZonesForLoadBalancerResponse]
(Int -> ReadS DisableAvailabilityZonesForLoadBalancerResponse)
-> ReadS [DisableAvailabilityZonesForLoadBalancerResponse]
-> ReadPrec DisableAvailabilityZonesForLoadBalancerResponse
-> ReadPrec [DisableAvailabilityZonesForLoadBalancerResponse]
-> Read DisableAvailabilityZonesForLoadBalancerResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisableAvailabilityZonesForLoadBalancerResponse]
$creadListPrec :: ReadPrec [DisableAvailabilityZonesForLoadBalancerResponse]
readPrec :: ReadPrec DisableAvailabilityZonesForLoadBalancerResponse
$creadPrec :: ReadPrec DisableAvailabilityZonesForLoadBalancerResponse
readList :: ReadS [DisableAvailabilityZonesForLoadBalancerResponse]
$creadList :: ReadS [DisableAvailabilityZonesForLoadBalancerResponse]
readsPrec :: Int -> ReadS DisableAvailabilityZonesForLoadBalancerResponse
$creadsPrec :: Int -> ReadS DisableAvailabilityZonesForLoadBalancerResponse
Prelude.Read, Int -> DisableAvailabilityZonesForLoadBalancerResponse -> ShowS
[DisableAvailabilityZonesForLoadBalancerResponse] -> ShowS
DisableAvailabilityZonesForLoadBalancerResponse -> String
(Int -> DisableAvailabilityZonesForLoadBalancerResponse -> ShowS)
-> (DisableAvailabilityZonesForLoadBalancerResponse -> String)
-> ([DisableAvailabilityZonesForLoadBalancerResponse] -> ShowS)
-> Show DisableAvailabilityZonesForLoadBalancerResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisableAvailabilityZonesForLoadBalancerResponse] -> ShowS
$cshowList :: [DisableAvailabilityZonesForLoadBalancerResponse] -> ShowS
show :: DisableAvailabilityZonesForLoadBalancerResponse -> String
$cshow :: DisableAvailabilityZonesForLoadBalancerResponse -> String
showsPrec :: Int -> DisableAvailabilityZonesForLoadBalancerResponse -> ShowS
$cshowsPrec :: Int -> DisableAvailabilityZonesForLoadBalancerResponse -> ShowS
Prelude.Show, (forall x.
 DisableAvailabilityZonesForLoadBalancerResponse
 -> Rep DisableAvailabilityZonesForLoadBalancerResponse x)
-> (forall x.
    Rep DisableAvailabilityZonesForLoadBalancerResponse x
    -> DisableAvailabilityZonesForLoadBalancerResponse)
-> Generic DisableAvailabilityZonesForLoadBalancerResponse
forall x.
Rep DisableAvailabilityZonesForLoadBalancerResponse x
-> DisableAvailabilityZonesForLoadBalancerResponse
forall x.
DisableAvailabilityZonesForLoadBalancerResponse
-> Rep DisableAvailabilityZonesForLoadBalancerResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisableAvailabilityZonesForLoadBalancerResponse x
-> DisableAvailabilityZonesForLoadBalancerResponse
$cfrom :: forall x.
DisableAvailabilityZonesForLoadBalancerResponse
-> Rep DisableAvailabilityZonesForLoadBalancerResponse x
Prelude.Generic)

-- |
-- Create a value of 'DisableAvailabilityZonesForLoadBalancerResponse' 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:
--
-- 'availabilityZones', 'disableAvailabilityZonesForLoadBalancerResponse_availabilityZones' - The remaining Availability Zones for the load balancer.
--
-- 'httpStatus', 'disableAvailabilityZonesForLoadBalancerResponse_httpStatus' - The response's http status code.
newDisableAvailabilityZonesForLoadBalancerResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DisableAvailabilityZonesForLoadBalancerResponse
newDisableAvailabilityZonesForLoadBalancerResponse :: Int -> DisableAvailabilityZonesForLoadBalancerResponse
newDisableAvailabilityZonesForLoadBalancerResponse
  Int
pHttpStatus_ =
    DisableAvailabilityZonesForLoadBalancerResponse' :: Maybe [Text]
-> Int -> DisableAvailabilityZonesForLoadBalancerResponse
DisableAvailabilityZonesForLoadBalancerResponse'
      { $sel:availabilityZones:DisableAvailabilityZonesForLoadBalancerResponse' :: Maybe [Text]
availabilityZones =
          Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DisableAvailabilityZonesForLoadBalancerResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The remaining Availability Zones for the load balancer.
disableAvailabilityZonesForLoadBalancerResponse_availabilityZones :: Lens.Lens' DisableAvailabilityZonesForLoadBalancerResponse (Prelude.Maybe [Prelude.Text])
disableAvailabilityZonesForLoadBalancerResponse_availabilityZones :: (Maybe [Text] -> f (Maybe [Text]))
-> DisableAvailabilityZonesForLoadBalancerResponse
-> f DisableAvailabilityZonesForLoadBalancerResponse
disableAvailabilityZonesForLoadBalancerResponse_availabilityZones = (DisableAvailabilityZonesForLoadBalancerResponse -> Maybe [Text])
-> (DisableAvailabilityZonesForLoadBalancerResponse
    -> Maybe [Text] -> DisableAvailabilityZonesForLoadBalancerResponse)
-> Lens
     DisableAvailabilityZonesForLoadBalancerResponse
     DisableAvailabilityZonesForLoadBalancerResponse
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisableAvailabilityZonesForLoadBalancerResponse' {Maybe [Text]
availabilityZones :: Maybe [Text]
$sel:availabilityZones:DisableAvailabilityZonesForLoadBalancerResponse' :: DisableAvailabilityZonesForLoadBalancerResponse -> Maybe [Text]
availabilityZones} -> Maybe [Text]
availabilityZones) (\s :: DisableAvailabilityZonesForLoadBalancerResponse
s@DisableAvailabilityZonesForLoadBalancerResponse' {} Maybe [Text]
a -> DisableAvailabilityZonesForLoadBalancerResponse
s {$sel:availabilityZones:DisableAvailabilityZonesForLoadBalancerResponse' :: Maybe [Text]
availabilityZones = Maybe [Text]
a} :: DisableAvailabilityZonesForLoadBalancerResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> DisableAvailabilityZonesForLoadBalancerResponse
 -> f DisableAvailabilityZonesForLoadBalancerResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DisableAvailabilityZonesForLoadBalancerResponse
-> f DisableAvailabilityZonesForLoadBalancerResponse
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 response's http status code.
disableAvailabilityZonesForLoadBalancerResponse_httpStatus :: Lens.Lens' DisableAvailabilityZonesForLoadBalancerResponse Prelude.Int
disableAvailabilityZonesForLoadBalancerResponse_httpStatus :: (Int -> f Int)
-> DisableAvailabilityZonesForLoadBalancerResponse
-> f DisableAvailabilityZonesForLoadBalancerResponse
disableAvailabilityZonesForLoadBalancerResponse_httpStatus = (DisableAvailabilityZonesForLoadBalancerResponse -> Int)
-> (DisableAvailabilityZonesForLoadBalancerResponse
    -> Int -> DisableAvailabilityZonesForLoadBalancerResponse)
-> Lens
     DisableAvailabilityZonesForLoadBalancerResponse
     DisableAvailabilityZonesForLoadBalancerResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisableAvailabilityZonesForLoadBalancerResponse' {Int
httpStatus :: Int
$sel:httpStatus:DisableAvailabilityZonesForLoadBalancerResponse' :: DisableAvailabilityZonesForLoadBalancerResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DisableAvailabilityZonesForLoadBalancerResponse
s@DisableAvailabilityZonesForLoadBalancerResponse' {} Int
a -> DisableAvailabilityZonesForLoadBalancerResponse
s {$sel:httpStatus:DisableAvailabilityZonesForLoadBalancerResponse' :: Int
httpStatus = Int
a} :: DisableAvailabilityZonesForLoadBalancerResponse)

instance
  Prelude.NFData
    DisableAvailabilityZonesForLoadBalancerResponse