{-# 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.DetachLoadBalancerFromSubnets
-- 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 subnets from the set of configured subnets for the
-- load balancer.
--
-- After a subnet is removed, all EC2 instances registered with the load
-- balancer in the removed subnet go into the @OutOfService@ state. Then,
-- the load balancer balances the traffic among the remaining routable
-- subnets.
module Amazonka.ELB.DetachLoadBalancerFromSubnets
  ( -- * Creating a Request
    DetachLoadBalancerFromSubnets (..),
    newDetachLoadBalancerFromSubnets,

    -- * Request Lenses
    detachLoadBalancerFromSubnets_loadBalancerName,
    detachLoadBalancerFromSubnets_subnets,

    -- * Destructuring the Response
    DetachLoadBalancerFromSubnetsResponse (..),
    newDetachLoadBalancerFromSubnetsResponse,

    -- * Response Lenses
    detachLoadBalancerFromSubnetsResponse_subnets,
    detachLoadBalancerFromSubnetsResponse_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 DetachLoadBalancerFromSubnets.
--
-- /See:/ 'newDetachLoadBalancerFromSubnets' smart constructor.
data DetachLoadBalancerFromSubnets = DetachLoadBalancerFromSubnets'
  { -- | The name of the load balancer.
    DetachLoadBalancerFromSubnets -> Text
loadBalancerName :: Prelude.Text,
    -- | The IDs of the subnets.
    DetachLoadBalancerFromSubnets -> [Text]
subnets :: [Prelude.Text]
  }
  deriving (DetachLoadBalancerFromSubnets
-> DetachLoadBalancerFromSubnets -> Bool
(DetachLoadBalancerFromSubnets
 -> DetachLoadBalancerFromSubnets -> Bool)
-> (DetachLoadBalancerFromSubnets
    -> DetachLoadBalancerFromSubnets -> Bool)
-> Eq DetachLoadBalancerFromSubnets
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DetachLoadBalancerFromSubnets
-> DetachLoadBalancerFromSubnets -> Bool
$c/= :: DetachLoadBalancerFromSubnets
-> DetachLoadBalancerFromSubnets -> Bool
== :: DetachLoadBalancerFromSubnets
-> DetachLoadBalancerFromSubnets -> Bool
$c== :: DetachLoadBalancerFromSubnets
-> DetachLoadBalancerFromSubnets -> Bool
Prelude.Eq, ReadPrec [DetachLoadBalancerFromSubnets]
ReadPrec DetachLoadBalancerFromSubnets
Int -> ReadS DetachLoadBalancerFromSubnets
ReadS [DetachLoadBalancerFromSubnets]
(Int -> ReadS DetachLoadBalancerFromSubnets)
-> ReadS [DetachLoadBalancerFromSubnets]
-> ReadPrec DetachLoadBalancerFromSubnets
-> ReadPrec [DetachLoadBalancerFromSubnets]
-> Read DetachLoadBalancerFromSubnets
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DetachLoadBalancerFromSubnets]
$creadListPrec :: ReadPrec [DetachLoadBalancerFromSubnets]
readPrec :: ReadPrec DetachLoadBalancerFromSubnets
$creadPrec :: ReadPrec DetachLoadBalancerFromSubnets
readList :: ReadS [DetachLoadBalancerFromSubnets]
$creadList :: ReadS [DetachLoadBalancerFromSubnets]
readsPrec :: Int -> ReadS DetachLoadBalancerFromSubnets
$creadsPrec :: Int -> ReadS DetachLoadBalancerFromSubnets
Prelude.Read, Int -> DetachLoadBalancerFromSubnets -> ShowS
[DetachLoadBalancerFromSubnets] -> ShowS
DetachLoadBalancerFromSubnets -> String
(Int -> DetachLoadBalancerFromSubnets -> ShowS)
-> (DetachLoadBalancerFromSubnets -> String)
-> ([DetachLoadBalancerFromSubnets] -> ShowS)
-> Show DetachLoadBalancerFromSubnets
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DetachLoadBalancerFromSubnets] -> ShowS
$cshowList :: [DetachLoadBalancerFromSubnets] -> ShowS
show :: DetachLoadBalancerFromSubnets -> String
$cshow :: DetachLoadBalancerFromSubnets -> String
showsPrec :: Int -> DetachLoadBalancerFromSubnets -> ShowS
$cshowsPrec :: Int -> DetachLoadBalancerFromSubnets -> ShowS
Prelude.Show, (forall x.
 DetachLoadBalancerFromSubnets
 -> Rep DetachLoadBalancerFromSubnets x)
-> (forall x.
    Rep DetachLoadBalancerFromSubnets x
    -> DetachLoadBalancerFromSubnets)
-> Generic DetachLoadBalancerFromSubnets
forall x.
Rep DetachLoadBalancerFromSubnets x
-> DetachLoadBalancerFromSubnets
forall x.
DetachLoadBalancerFromSubnets
-> Rep DetachLoadBalancerFromSubnets x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DetachLoadBalancerFromSubnets x
-> DetachLoadBalancerFromSubnets
$cfrom :: forall x.
DetachLoadBalancerFromSubnets
-> Rep DetachLoadBalancerFromSubnets x
Prelude.Generic)

-- |
-- Create a value of 'DetachLoadBalancerFromSubnets' 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', 'detachLoadBalancerFromSubnets_loadBalancerName' - The name of the load balancer.
--
-- 'subnets', 'detachLoadBalancerFromSubnets_subnets' - The IDs of the subnets.
newDetachLoadBalancerFromSubnets ::
  -- | 'loadBalancerName'
  Prelude.Text ->
  DetachLoadBalancerFromSubnets
newDetachLoadBalancerFromSubnets :: Text -> DetachLoadBalancerFromSubnets
newDetachLoadBalancerFromSubnets Text
pLoadBalancerName_ =
  DetachLoadBalancerFromSubnets' :: Text -> [Text] -> DetachLoadBalancerFromSubnets
DetachLoadBalancerFromSubnets'
    { $sel:loadBalancerName:DetachLoadBalancerFromSubnets' :: Text
loadBalancerName =
        Text
pLoadBalancerName_,
      $sel:subnets:DetachLoadBalancerFromSubnets' :: [Text]
subnets = [Text]
forall a. Monoid a => a
Prelude.mempty
    }

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

-- | The IDs of the subnets.
detachLoadBalancerFromSubnets_subnets :: Lens.Lens' DetachLoadBalancerFromSubnets [Prelude.Text]
detachLoadBalancerFromSubnets_subnets :: ([Text] -> f [Text])
-> DetachLoadBalancerFromSubnets -> f DetachLoadBalancerFromSubnets
detachLoadBalancerFromSubnets_subnets = (DetachLoadBalancerFromSubnets -> [Text])
-> (DetachLoadBalancerFromSubnets
    -> [Text] -> DetachLoadBalancerFromSubnets)
-> Lens
     DetachLoadBalancerFromSubnets
     DetachLoadBalancerFromSubnets
     [Text]
     [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetachLoadBalancerFromSubnets' {[Text]
subnets :: [Text]
$sel:subnets:DetachLoadBalancerFromSubnets' :: DetachLoadBalancerFromSubnets -> [Text]
subnets} -> [Text]
subnets) (\s :: DetachLoadBalancerFromSubnets
s@DetachLoadBalancerFromSubnets' {} [Text]
a -> DetachLoadBalancerFromSubnets
s {$sel:subnets:DetachLoadBalancerFromSubnets' :: [Text]
subnets = [Text]
a} :: DetachLoadBalancerFromSubnets) (([Text] -> f [Text])
 -> DetachLoadBalancerFromSubnets
 -> f DetachLoadBalancerFromSubnets)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> DetachLoadBalancerFromSubnets
-> f DetachLoadBalancerFromSubnets
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
    DetachLoadBalancerFromSubnets
  where
  type
    AWSResponse DetachLoadBalancerFromSubnets =
      DetachLoadBalancerFromSubnetsResponse
  request :: DetachLoadBalancerFromSubnets
-> Request DetachLoadBalancerFromSubnets
request = Service
-> DetachLoadBalancerFromSubnets
-> Request DetachLoadBalancerFromSubnets
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy DetachLoadBalancerFromSubnets
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DetachLoadBalancerFromSubnets)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse DetachLoadBalancerFromSubnets))
-> Logger
-> Service
-> Proxy DetachLoadBalancerFromSubnets
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DetachLoadBalancerFromSubnets)))
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
"DetachLoadBalancerFromSubnetsResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe [Text] -> Int -> DetachLoadBalancerFromSubnetsResponse
DetachLoadBalancerFromSubnetsResponse'
            (Maybe [Text] -> Int -> DetachLoadBalancerFromSubnetsResponse)
-> Either String (Maybe [Text])
-> Either String (Int -> DetachLoadBalancerFromSubnetsResponse)
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
"Subnets" 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 -> DetachLoadBalancerFromSubnetsResponse)
-> Either String Int
-> Either String DetachLoadBalancerFromSubnetsResponse
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
    DetachLoadBalancerFromSubnets

instance Prelude.NFData DetachLoadBalancerFromSubnets

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

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

instance Core.ToQuery DetachLoadBalancerFromSubnets where
  toQuery :: DetachLoadBalancerFromSubnets -> QueryString
toQuery DetachLoadBalancerFromSubnets' {[Text]
Text
subnets :: [Text]
loadBalancerName :: Text
$sel:subnets:DetachLoadBalancerFromSubnets' :: DetachLoadBalancerFromSubnets -> [Text]
$sel:loadBalancerName:DetachLoadBalancerFromSubnets' :: DetachLoadBalancerFromSubnets -> 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
"DetachLoadBalancerFromSubnets" ::
                      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
"Subnets" 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]
subnets
      ]

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

-- |
-- Create a value of 'DetachLoadBalancerFromSubnetsResponse' 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:
--
-- 'subnets', 'detachLoadBalancerFromSubnetsResponse_subnets' - The IDs of the remaining subnets for the load balancer.
--
-- 'httpStatus', 'detachLoadBalancerFromSubnetsResponse_httpStatus' - The response's http status code.
newDetachLoadBalancerFromSubnetsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DetachLoadBalancerFromSubnetsResponse
newDetachLoadBalancerFromSubnetsResponse :: Int -> DetachLoadBalancerFromSubnetsResponse
newDetachLoadBalancerFromSubnetsResponse Int
pHttpStatus_ =
  DetachLoadBalancerFromSubnetsResponse' :: Maybe [Text] -> Int -> DetachLoadBalancerFromSubnetsResponse
DetachLoadBalancerFromSubnetsResponse'
    { $sel:subnets:DetachLoadBalancerFromSubnetsResponse' :: Maybe [Text]
subnets =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DetachLoadBalancerFromSubnetsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The IDs of the remaining subnets for the load balancer.
detachLoadBalancerFromSubnetsResponse_subnets :: Lens.Lens' DetachLoadBalancerFromSubnetsResponse (Prelude.Maybe [Prelude.Text])
detachLoadBalancerFromSubnetsResponse_subnets :: (Maybe [Text] -> f (Maybe [Text]))
-> DetachLoadBalancerFromSubnetsResponse
-> f DetachLoadBalancerFromSubnetsResponse
detachLoadBalancerFromSubnetsResponse_subnets = (DetachLoadBalancerFromSubnetsResponse -> Maybe [Text])
-> (DetachLoadBalancerFromSubnetsResponse
    -> Maybe [Text] -> DetachLoadBalancerFromSubnetsResponse)
-> Lens
     DetachLoadBalancerFromSubnetsResponse
     DetachLoadBalancerFromSubnetsResponse
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetachLoadBalancerFromSubnetsResponse' {Maybe [Text]
subnets :: Maybe [Text]
$sel:subnets:DetachLoadBalancerFromSubnetsResponse' :: DetachLoadBalancerFromSubnetsResponse -> Maybe [Text]
subnets} -> Maybe [Text]
subnets) (\s :: DetachLoadBalancerFromSubnetsResponse
s@DetachLoadBalancerFromSubnetsResponse' {} Maybe [Text]
a -> DetachLoadBalancerFromSubnetsResponse
s {$sel:subnets:DetachLoadBalancerFromSubnetsResponse' :: Maybe [Text]
subnets = Maybe [Text]
a} :: DetachLoadBalancerFromSubnetsResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> DetachLoadBalancerFromSubnetsResponse
 -> f DetachLoadBalancerFromSubnetsResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DetachLoadBalancerFromSubnetsResponse
-> f DetachLoadBalancerFromSubnetsResponse
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.
detachLoadBalancerFromSubnetsResponse_httpStatus :: Lens.Lens' DetachLoadBalancerFromSubnetsResponse Prelude.Int
detachLoadBalancerFromSubnetsResponse_httpStatus :: (Int -> f Int)
-> DetachLoadBalancerFromSubnetsResponse
-> f DetachLoadBalancerFromSubnetsResponse
detachLoadBalancerFromSubnetsResponse_httpStatus = (DetachLoadBalancerFromSubnetsResponse -> Int)
-> (DetachLoadBalancerFromSubnetsResponse
    -> Int -> DetachLoadBalancerFromSubnetsResponse)
-> Lens
     DetachLoadBalancerFromSubnetsResponse
     DetachLoadBalancerFromSubnetsResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetachLoadBalancerFromSubnetsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DetachLoadBalancerFromSubnetsResponse' :: DetachLoadBalancerFromSubnetsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DetachLoadBalancerFromSubnetsResponse
s@DetachLoadBalancerFromSubnetsResponse' {} Int
a -> DetachLoadBalancerFromSubnetsResponse
s {$sel:httpStatus:DetachLoadBalancerFromSubnetsResponse' :: Int
httpStatus = Int
a} :: DetachLoadBalancerFromSubnetsResponse)

instance
  Prelude.NFData
    DetachLoadBalancerFromSubnetsResponse