{-# 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.DeregisterInstancesFromLoadBalancer
-- 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)
--
-- Deregisters the specified instances from the specified load balancer.
-- After the instance is deregistered, it no longer receives traffic from
-- the load balancer.
--
-- You can use DescribeLoadBalancers to verify that the instance is
-- deregistered from the load balancer.
--
-- For more information, see
-- <https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-deregister-register-instances.html Register or De-Register EC2 Instances>
-- in the /Classic Load Balancers Guide/.
module Amazonka.ELB.DeregisterInstancesFromLoadBalancer
  ( -- * Creating a Request
    DeregisterInstancesFromLoadBalancer (..),
    newDeregisterInstancesFromLoadBalancer,

    -- * Request Lenses
    deregisterInstancesFromLoadBalancer_loadBalancerName,
    deregisterInstancesFromLoadBalancer_instances,

    -- * Destructuring the Response
    DeregisterInstancesFromLoadBalancerResponse (..),
    newDeregisterInstancesFromLoadBalancerResponse,

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

-- |
-- Create a value of 'DeregisterInstancesFromLoadBalancer' 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', 'deregisterInstancesFromLoadBalancer_loadBalancerName' - The name of the load balancer.
--
-- 'instances', 'deregisterInstancesFromLoadBalancer_instances' - The IDs of the instances.
newDeregisterInstancesFromLoadBalancer ::
  -- | 'loadBalancerName'
  Prelude.Text ->
  DeregisterInstancesFromLoadBalancer
newDeregisterInstancesFromLoadBalancer :: Text -> DeregisterInstancesFromLoadBalancer
newDeregisterInstancesFromLoadBalancer
  Text
pLoadBalancerName_ =
    DeregisterInstancesFromLoadBalancer' :: Text -> [Instance] -> DeregisterInstancesFromLoadBalancer
DeregisterInstancesFromLoadBalancer'
      { $sel:loadBalancerName:DeregisterInstancesFromLoadBalancer' :: Text
loadBalancerName =
          Text
pLoadBalancerName_,
        $sel:instances:DeregisterInstancesFromLoadBalancer' :: [Instance]
instances = [Instance]
forall a. Monoid a => a
Prelude.mempty
      }

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

-- | The IDs of the instances.
deregisterInstancesFromLoadBalancer_instances :: Lens.Lens' DeregisterInstancesFromLoadBalancer [Instance]
deregisterInstancesFromLoadBalancer_instances :: ([Instance] -> f [Instance])
-> DeregisterInstancesFromLoadBalancer
-> f DeregisterInstancesFromLoadBalancer
deregisterInstancesFromLoadBalancer_instances = (DeregisterInstancesFromLoadBalancer -> [Instance])
-> (DeregisterInstancesFromLoadBalancer
    -> [Instance] -> DeregisterInstancesFromLoadBalancer)
-> Lens
     DeregisterInstancesFromLoadBalancer
     DeregisterInstancesFromLoadBalancer
     [Instance]
     [Instance]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeregisterInstancesFromLoadBalancer' {[Instance]
instances :: [Instance]
$sel:instances:DeregisterInstancesFromLoadBalancer' :: DeregisterInstancesFromLoadBalancer -> [Instance]
instances} -> [Instance]
instances) (\s :: DeregisterInstancesFromLoadBalancer
s@DeregisterInstancesFromLoadBalancer' {} [Instance]
a -> DeregisterInstancesFromLoadBalancer
s {$sel:instances:DeregisterInstancesFromLoadBalancer' :: [Instance]
instances = [Instance]
a} :: DeregisterInstancesFromLoadBalancer) (([Instance] -> f [Instance])
 -> DeregisterInstancesFromLoadBalancer
 -> f DeregisterInstancesFromLoadBalancer)
-> (([Instance] -> f [Instance]) -> [Instance] -> f [Instance])
-> ([Instance] -> f [Instance])
-> DeregisterInstancesFromLoadBalancer
-> f DeregisterInstancesFromLoadBalancer
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Instance] -> f [Instance]) -> [Instance] -> f [Instance]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Core.AWSRequest
    DeregisterInstancesFromLoadBalancer
  where
  type
    AWSResponse DeregisterInstancesFromLoadBalancer =
      DeregisterInstancesFromLoadBalancerResponse
  request :: DeregisterInstancesFromLoadBalancer
-> Request DeregisterInstancesFromLoadBalancer
request = Service
-> DeregisterInstancesFromLoadBalancer
-> Request DeregisterInstancesFromLoadBalancer
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy DeregisterInstancesFromLoadBalancer
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse DeregisterInstancesFromLoadBalancer)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse DeregisterInstancesFromLoadBalancer))
-> Logger
-> Service
-> Proxy DeregisterInstancesFromLoadBalancer
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse DeregisterInstancesFromLoadBalancer)))
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
"DeregisterInstancesFromLoadBalancerResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe [Instance]
-> Int -> DeregisterInstancesFromLoadBalancerResponse
DeregisterInstancesFromLoadBalancerResponse'
            (Maybe [Instance]
 -> Int -> DeregisterInstancesFromLoadBalancerResponse)
-> Either String (Maybe [Instance])
-> Either
     String (Int -> DeregisterInstancesFromLoadBalancerResponse)
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
"Instances" 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 [Instance]))
-> Either String (Maybe [Instance])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Instance])
-> [Node] -> Either String (Maybe [Instance])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Instance]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                        )
              Either String (Int -> DeregisterInstancesFromLoadBalancerResponse)
-> Either String Int
-> Either String DeregisterInstancesFromLoadBalancerResponse
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
    DeregisterInstancesFromLoadBalancer

instance
  Prelude.NFData
    DeregisterInstancesFromLoadBalancer

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

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

instance
  Core.ToQuery
    DeregisterInstancesFromLoadBalancer
  where
  toQuery :: DeregisterInstancesFromLoadBalancer -> QueryString
toQuery DeregisterInstancesFromLoadBalancer' {[Instance]
Text
instances :: [Instance]
loadBalancerName :: Text
$sel:instances:DeregisterInstancesFromLoadBalancer' :: DeregisterInstancesFromLoadBalancer -> [Instance]
$sel:loadBalancerName:DeregisterInstancesFromLoadBalancer' :: DeregisterInstancesFromLoadBalancer -> 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
"DeregisterInstancesFromLoadBalancer" ::
                      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
"Instances"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ByteString -> [Instance] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" [Instance]
instances
      ]

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

-- |
-- Create a value of 'DeregisterInstancesFromLoadBalancerResponse' 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:
--
-- 'instances', 'deregisterInstancesFromLoadBalancerResponse_instances' - The remaining instances registered with the load balancer.
--
-- 'httpStatus', 'deregisterInstancesFromLoadBalancerResponse_httpStatus' - The response's http status code.
newDeregisterInstancesFromLoadBalancerResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DeregisterInstancesFromLoadBalancerResponse
newDeregisterInstancesFromLoadBalancerResponse :: Int -> DeregisterInstancesFromLoadBalancerResponse
newDeregisterInstancesFromLoadBalancerResponse
  Int
pHttpStatus_ =
    DeregisterInstancesFromLoadBalancerResponse' :: Maybe [Instance]
-> Int -> DeregisterInstancesFromLoadBalancerResponse
DeregisterInstancesFromLoadBalancerResponse'
      { $sel:instances:DeregisterInstancesFromLoadBalancerResponse' :: Maybe [Instance]
instances =
          Maybe [Instance]
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DeregisterInstancesFromLoadBalancerResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The remaining instances registered with the load balancer.
deregisterInstancesFromLoadBalancerResponse_instances :: Lens.Lens' DeregisterInstancesFromLoadBalancerResponse (Prelude.Maybe [Instance])
deregisterInstancesFromLoadBalancerResponse_instances :: (Maybe [Instance] -> f (Maybe [Instance]))
-> DeregisterInstancesFromLoadBalancerResponse
-> f DeregisterInstancesFromLoadBalancerResponse
deregisterInstancesFromLoadBalancerResponse_instances = (DeregisterInstancesFromLoadBalancerResponse -> Maybe [Instance])
-> (DeregisterInstancesFromLoadBalancerResponse
    -> Maybe [Instance] -> DeregisterInstancesFromLoadBalancerResponse)
-> Lens
     DeregisterInstancesFromLoadBalancerResponse
     DeregisterInstancesFromLoadBalancerResponse
     (Maybe [Instance])
     (Maybe [Instance])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeregisterInstancesFromLoadBalancerResponse' {Maybe [Instance]
instances :: Maybe [Instance]
$sel:instances:DeregisterInstancesFromLoadBalancerResponse' :: DeregisterInstancesFromLoadBalancerResponse -> Maybe [Instance]
instances} -> Maybe [Instance]
instances) (\s :: DeregisterInstancesFromLoadBalancerResponse
s@DeregisterInstancesFromLoadBalancerResponse' {} Maybe [Instance]
a -> DeregisterInstancesFromLoadBalancerResponse
s {$sel:instances:DeregisterInstancesFromLoadBalancerResponse' :: Maybe [Instance]
instances = Maybe [Instance]
a} :: DeregisterInstancesFromLoadBalancerResponse) ((Maybe [Instance] -> f (Maybe [Instance]))
 -> DeregisterInstancesFromLoadBalancerResponse
 -> f DeregisterInstancesFromLoadBalancerResponse)
-> ((Maybe [Instance] -> f (Maybe [Instance]))
    -> Maybe [Instance] -> f (Maybe [Instance]))
-> (Maybe [Instance] -> f (Maybe [Instance]))
-> DeregisterInstancesFromLoadBalancerResponse
-> f DeregisterInstancesFromLoadBalancerResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Instance] [Instance] [Instance] [Instance]
-> Iso
     (Maybe [Instance])
     (Maybe [Instance])
     (Maybe [Instance])
     (Maybe [Instance])
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 [Instance] [Instance] [Instance] [Instance]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
deregisterInstancesFromLoadBalancerResponse_httpStatus :: Lens.Lens' DeregisterInstancesFromLoadBalancerResponse Prelude.Int
deregisterInstancesFromLoadBalancerResponse_httpStatus :: (Int -> f Int)
-> DeregisterInstancesFromLoadBalancerResponse
-> f DeregisterInstancesFromLoadBalancerResponse
deregisterInstancesFromLoadBalancerResponse_httpStatus = (DeregisterInstancesFromLoadBalancerResponse -> Int)
-> (DeregisterInstancesFromLoadBalancerResponse
    -> Int -> DeregisterInstancesFromLoadBalancerResponse)
-> Lens
     DeregisterInstancesFromLoadBalancerResponse
     DeregisterInstancesFromLoadBalancerResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeregisterInstancesFromLoadBalancerResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeregisterInstancesFromLoadBalancerResponse' :: DeregisterInstancesFromLoadBalancerResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeregisterInstancesFromLoadBalancerResponse
s@DeregisterInstancesFromLoadBalancerResponse' {} Int
a -> DeregisterInstancesFromLoadBalancerResponse
s {$sel:httpStatus:DeregisterInstancesFromLoadBalancerResponse' :: Int
httpStatus = Int
a} :: DeregisterInstancesFromLoadBalancerResponse)

instance
  Prelude.NFData
    DeregisterInstancesFromLoadBalancerResponse