{-# 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.AttachLoadBalancerToSubnets
-- 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)
--
-- Adds one or more subnets to the set of configured subnets for the
-- specified load balancer.
--
-- The load balancer evenly distributes requests across all registered
-- subnets. For more information, see
-- <https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-manage-subnets.html Add or Remove Subnets for Your Load Balancer in a VPC>
-- in the /Classic Load Balancers Guide/.
module Amazonka.ELB.AttachLoadBalancerToSubnets
  ( -- * Creating a Request
    AttachLoadBalancerToSubnets (..),
    newAttachLoadBalancerToSubnets,

    -- * Request Lenses
    attachLoadBalancerToSubnets_loadBalancerName,
    attachLoadBalancerToSubnets_subnets,

    -- * Destructuring the Response
    AttachLoadBalancerToSubnetsResponse (..),
    newAttachLoadBalancerToSubnetsResponse,

    -- * Response Lenses
    attachLoadBalancerToSubnetsResponse_subnets,
    attachLoadBalancerToSubnetsResponse_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 AttachLoaBalancerToSubnets.
--
-- /See:/ 'newAttachLoadBalancerToSubnets' smart constructor.
data AttachLoadBalancerToSubnets = AttachLoadBalancerToSubnets'
  { -- | The name of the load balancer.
    AttachLoadBalancerToSubnets -> Text
loadBalancerName :: Prelude.Text,
    -- | The IDs of the subnets to add. You can add only one subnet per
    -- Availability Zone.
    AttachLoadBalancerToSubnets -> [Text]
subnets :: [Prelude.Text]
  }
  deriving (AttachLoadBalancerToSubnets -> AttachLoadBalancerToSubnets -> Bool
(AttachLoadBalancerToSubnets
 -> AttachLoadBalancerToSubnets -> Bool)
-> (AttachLoadBalancerToSubnets
    -> AttachLoadBalancerToSubnets -> Bool)
-> Eq AttachLoadBalancerToSubnets
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AttachLoadBalancerToSubnets -> AttachLoadBalancerToSubnets -> Bool
$c/= :: AttachLoadBalancerToSubnets -> AttachLoadBalancerToSubnets -> Bool
== :: AttachLoadBalancerToSubnets -> AttachLoadBalancerToSubnets -> Bool
$c== :: AttachLoadBalancerToSubnets -> AttachLoadBalancerToSubnets -> Bool
Prelude.Eq, ReadPrec [AttachLoadBalancerToSubnets]
ReadPrec AttachLoadBalancerToSubnets
Int -> ReadS AttachLoadBalancerToSubnets
ReadS [AttachLoadBalancerToSubnets]
(Int -> ReadS AttachLoadBalancerToSubnets)
-> ReadS [AttachLoadBalancerToSubnets]
-> ReadPrec AttachLoadBalancerToSubnets
-> ReadPrec [AttachLoadBalancerToSubnets]
-> Read AttachLoadBalancerToSubnets
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AttachLoadBalancerToSubnets]
$creadListPrec :: ReadPrec [AttachLoadBalancerToSubnets]
readPrec :: ReadPrec AttachLoadBalancerToSubnets
$creadPrec :: ReadPrec AttachLoadBalancerToSubnets
readList :: ReadS [AttachLoadBalancerToSubnets]
$creadList :: ReadS [AttachLoadBalancerToSubnets]
readsPrec :: Int -> ReadS AttachLoadBalancerToSubnets
$creadsPrec :: Int -> ReadS AttachLoadBalancerToSubnets
Prelude.Read, Int -> AttachLoadBalancerToSubnets -> ShowS
[AttachLoadBalancerToSubnets] -> ShowS
AttachLoadBalancerToSubnets -> String
(Int -> AttachLoadBalancerToSubnets -> ShowS)
-> (AttachLoadBalancerToSubnets -> String)
-> ([AttachLoadBalancerToSubnets] -> ShowS)
-> Show AttachLoadBalancerToSubnets
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AttachLoadBalancerToSubnets] -> ShowS
$cshowList :: [AttachLoadBalancerToSubnets] -> ShowS
show :: AttachLoadBalancerToSubnets -> String
$cshow :: AttachLoadBalancerToSubnets -> String
showsPrec :: Int -> AttachLoadBalancerToSubnets -> ShowS
$cshowsPrec :: Int -> AttachLoadBalancerToSubnets -> ShowS
Prelude.Show, (forall x.
 AttachLoadBalancerToSubnets -> Rep AttachLoadBalancerToSubnets x)
-> (forall x.
    Rep AttachLoadBalancerToSubnets x -> AttachLoadBalancerToSubnets)
-> Generic AttachLoadBalancerToSubnets
forall x.
Rep AttachLoadBalancerToSubnets x -> AttachLoadBalancerToSubnets
forall x.
AttachLoadBalancerToSubnets -> Rep AttachLoadBalancerToSubnets x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AttachLoadBalancerToSubnets x -> AttachLoadBalancerToSubnets
$cfrom :: forall x.
AttachLoadBalancerToSubnets -> Rep AttachLoadBalancerToSubnets x
Prelude.Generic)

-- |
-- Create a value of 'AttachLoadBalancerToSubnets' 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', 'attachLoadBalancerToSubnets_loadBalancerName' - The name of the load balancer.
--
-- 'subnets', 'attachLoadBalancerToSubnets_subnets' - The IDs of the subnets to add. You can add only one subnet per
-- Availability Zone.
newAttachLoadBalancerToSubnets ::
  -- | 'loadBalancerName'
  Prelude.Text ->
  AttachLoadBalancerToSubnets
newAttachLoadBalancerToSubnets :: Text -> AttachLoadBalancerToSubnets
newAttachLoadBalancerToSubnets Text
pLoadBalancerName_ =
  AttachLoadBalancerToSubnets' :: Text -> [Text] -> AttachLoadBalancerToSubnets
AttachLoadBalancerToSubnets'
    { $sel:loadBalancerName:AttachLoadBalancerToSubnets' :: Text
loadBalancerName =
        Text
pLoadBalancerName_,
      $sel:subnets:AttachLoadBalancerToSubnets' :: [Text]
subnets = [Text]
forall a. Monoid a => a
Prelude.mempty
    }

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

-- | The IDs of the subnets to add. You can add only one subnet per
-- Availability Zone.
attachLoadBalancerToSubnets_subnets :: Lens.Lens' AttachLoadBalancerToSubnets [Prelude.Text]
attachLoadBalancerToSubnets_subnets :: ([Text] -> f [Text])
-> AttachLoadBalancerToSubnets -> f AttachLoadBalancerToSubnets
attachLoadBalancerToSubnets_subnets = (AttachLoadBalancerToSubnets -> [Text])
-> (AttachLoadBalancerToSubnets
    -> [Text] -> AttachLoadBalancerToSubnets)
-> Lens
     AttachLoadBalancerToSubnets
     AttachLoadBalancerToSubnets
     [Text]
     [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AttachLoadBalancerToSubnets' {[Text]
subnets :: [Text]
$sel:subnets:AttachLoadBalancerToSubnets' :: AttachLoadBalancerToSubnets -> [Text]
subnets} -> [Text]
subnets) (\s :: AttachLoadBalancerToSubnets
s@AttachLoadBalancerToSubnets' {} [Text]
a -> AttachLoadBalancerToSubnets
s {$sel:subnets:AttachLoadBalancerToSubnets' :: [Text]
subnets = [Text]
a} :: AttachLoadBalancerToSubnets) (([Text] -> f [Text])
 -> AttachLoadBalancerToSubnets -> f AttachLoadBalancerToSubnets)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> AttachLoadBalancerToSubnets
-> f AttachLoadBalancerToSubnets
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 AttachLoadBalancerToSubnets where
  type
    AWSResponse AttachLoadBalancerToSubnets =
      AttachLoadBalancerToSubnetsResponse
  request :: AttachLoadBalancerToSubnets -> Request AttachLoadBalancerToSubnets
request = Service
-> AttachLoadBalancerToSubnets
-> Request AttachLoadBalancerToSubnets
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy AttachLoadBalancerToSubnets
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse AttachLoadBalancerToSubnets)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse AttachLoadBalancerToSubnets))
-> Logger
-> Service
-> Proxy AttachLoadBalancerToSubnets
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse AttachLoadBalancerToSubnets)))
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
"AttachLoadBalancerToSubnetsResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe [Text] -> Int -> AttachLoadBalancerToSubnetsResponse
AttachLoadBalancerToSubnetsResponse'
            (Maybe [Text] -> Int -> AttachLoadBalancerToSubnetsResponse)
-> Either String (Maybe [Text])
-> Either String (Int -> AttachLoadBalancerToSubnetsResponse)
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 -> AttachLoadBalancerToSubnetsResponse)
-> Either String Int
-> Either String AttachLoadBalancerToSubnetsResponse
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 AttachLoadBalancerToSubnets

instance Prelude.NFData AttachLoadBalancerToSubnets

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

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

instance Core.ToQuery AttachLoadBalancerToSubnets where
  toQuery :: AttachLoadBalancerToSubnets -> QueryString
toQuery AttachLoadBalancerToSubnets' {[Text]
Text
subnets :: [Text]
loadBalancerName :: Text
$sel:subnets:AttachLoadBalancerToSubnets' :: AttachLoadBalancerToSubnets -> [Text]
$sel:loadBalancerName:AttachLoadBalancerToSubnets' :: AttachLoadBalancerToSubnets -> 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
"AttachLoadBalancerToSubnets" ::
                      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 AttachLoadBalancerToSubnets.
--
-- /See:/ 'newAttachLoadBalancerToSubnetsResponse' smart constructor.
data AttachLoadBalancerToSubnetsResponse = AttachLoadBalancerToSubnetsResponse'
  { -- | The IDs of the subnets attached to the load balancer.
    AttachLoadBalancerToSubnetsResponse -> Maybe [Text]
subnets :: Prelude.Maybe [Prelude.Text],
    -- | The response's http status code.
    AttachLoadBalancerToSubnetsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (AttachLoadBalancerToSubnetsResponse
-> AttachLoadBalancerToSubnetsResponse -> Bool
(AttachLoadBalancerToSubnetsResponse
 -> AttachLoadBalancerToSubnetsResponse -> Bool)
-> (AttachLoadBalancerToSubnetsResponse
    -> AttachLoadBalancerToSubnetsResponse -> Bool)
-> Eq AttachLoadBalancerToSubnetsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AttachLoadBalancerToSubnetsResponse
-> AttachLoadBalancerToSubnetsResponse -> Bool
$c/= :: AttachLoadBalancerToSubnetsResponse
-> AttachLoadBalancerToSubnetsResponse -> Bool
== :: AttachLoadBalancerToSubnetsResponse
-> AttachLoadBalancerToSubnetsResponse -> Bool
$c== :: AttachLoadBalancerToSubnetsResponse
-> AttachLoadBalancerToSubnetsResponse -> Bool
Prelude.Eq, ReadPrec [AttachLoadBalancerToSubnetsResponse]
ReadPrec AttachLoadBalancerToSubnetsResponse
Int -> ReadS AttachLoadBalancerToSubnetsResponse
ReadS [AttachLoadBalancerToSubnetsResponse]
(Int -> ReadS AttachLoadBalancerToSubnetsResponse)
-> ReadS [AttachLoadBalancerToSubnetsResponse]
-> ReadPrec AttachLoadBalancerToSubnetsResponse
-> ReadPrec [AttachLoadBalancerToSubnetsResponse]
-> Read AttachLoadBalancerToSubnetsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AttachLoadBalancerToSubnetsResponse]
$creadListPrec :: ReadPrec [AttachLoadBalancerToSubnetsResponse]
readPrec :: ReadPrec AttachLoadBalancerToSubnetsResponse
$creadPrec :: ReadPrec AttachLoadBalancerToSubnetsResponse
readList :: ReadS [AttachLoadBalancerToSubnetsResponse]
$creadList :: ReadS [AttachLoadBalancerToSubnetsResponse]
readsPrec :: Int -> ReadS AttachLoadBalancerToSubnetsResponse
$creadsPrec :: Int -> ReadS AttachLoadBalancerToSubnetsResponse
Prelude.Read, Int -> AttachLoadBalancerToSubnetsResponse -> ShowS
[AttachLoadBalancerToSubnetsResponse] -> ShowS
AttachLoadBalancerToSubnetsResponse -> String
(Int -> AttachLoadBalancerToSubnetsResponse -> ShowS)
-> (AttachLoadBalancerToSubnetsResponse -> String)
-> ([AttachLoadBalancerToSubnetsResponse] -> ShowS)
-> Show AttachLoadBalancerToSubnetsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AttachLoadBalancerToSubnetsResponse] -> ShowS
$cshowList :: [AttachLoadBalancerToSubnetsResponse] -> ShowS
show :: AttachLoadBalancerToSubnetsResponse -> String
$cshow :: AttachLoadBalancerToSubnetsResponse -> String
showsPrec :: Int -> AttachLoadBalancerToSubnetsResponse -> ShowS
$cshowsPrec :: Int -> AttachLoadBalancerToSubnetsResponse -> ShowS
Prelude.Show, (forall x.
 AttachLoadBalancerToSubnetsResponse
 -> Rep AttachLoadBalancerToSubnetsResponse x)
-> (forall x.
    Rep AttachLoadBalancerToSubnetsResponse x
    -> AttachLoadBalancerToSubnetsResponse)
-> Generic AttachLoadBalancerToSubnetsResponse
forall x.
Rep AttachLoadBalancerToSubnetsResponse x
-> AttachLoadBalancerToSubnetsResponse
forall x.
AttachLoadBalancerToSubnetsResponse
-> Rep AttachLoadBalancerToSubnetsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AttachLoadBalancerToSubnetsResponse x
-> AttachLoadBalancerToSubnetsResponse
$cfrom :: forall x.
AttachLoadBalancerToSubnetsResponse
-> Rep AttachLoadBalancerToSubnetsResponse x
Prelude.Generic)

-- |
-- Create a value of 'AttachLoadBalancerToSubnetsResponse' 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', 'attachLoadBalancerToSubnetsResponse_subnets' - The IDs of the subnets attached to the load balancer.
--
-- 'httpStatus', 'attachLoadBalancerToSubnetsResponse_httpStatus' - The response's http status code.
newAttachLoadBalancerToSubnetsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  AttachLoadBalancerToSubnetsResponse
newAttachLoadBalancerToSubnetsResponse :: Int -> AttachLoadBalancerToSubnetsResponse
newAttachLoadBalancerToSubnetsResponse Int
pHttpStatus_ =
  AttachLoadBalancerToSubnetsResponse' :: Maybe [Text] -> Int -> AttachLoadBalancerToSubnetsResponse
AttachLoadBalancerToSubnetsResponse'
    { $sel:subnets:AttachLoadBalancerToSubnetsResponse' :: Maybe [Text]
subnets =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:AttachLoadBalancerToSubnetsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

instance
  Prelude.NFData
    AttachLoadBalancerToSubnetsResponse