{-# 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.Lightsail.DetachInstancesFromLoadBalancer
-- 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)
--
-- Detaches the specified instances from a Lightsail load balancer.
--
-- This operation waits until the instances are no longer needed before
-- they are detached from the load balancer.
--
-- The @detach instances from load balancer@ operation supports tag-based
-- access control via resource tags applied to the resource identified by
-- @load balancer name@. For more information, see the
-- <https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-controlling-access-using-tags Amazon Lightsail Developer Guide>.
module Amazonka.Lightsail.DetachInstancesFromLoadBalancer
  ( -- * Creating a Request
    DetachInstancesFromLoadBalancer (..),
    newDetachInstancesFromLoadBalancer,

    -- * Request Lenses
    detachInstancesFromLoadBalancer_loadBalancerName,
    detachInstancesFromLoadBalancer_instanceNames,

    -- * Destructuring the Response
    DetachInstancesFromLoadBalancerResponse (..),
    newDetachInstancesFromLoadBalancerResponse,

    -- * Response Lenses
    detachInstancesFromLoadBalancerResponse_operations,
    detachInstancesFromLoadBalancerResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDetachInstancesFromLoadBalancer' smart constructor.
data DetachInstancesFromLoadBalancer = DetachInstancesFromLoadBalancer'
  { -- | The name of the Lightsail load balancer.
    DetachInstancesFromLoadBalancer -> Text
loadBalancerName :: Prelude.Text,
    -- | An array of strings containing the names of the instances you want to
    -- detach from the load balancer.
    DetachInstancesFromLoadBalancer -> [Text]
instanceNames :: [Prelude.Text]
  }
  deriving (DetachInstancesFromLoadBalancer
-> DetachInstancesFromLoadBalancer -> Bool
(DetachInstancesFromLoadBalancer
 -> DetachInstancesFromLoadBalancer -> Bool)
-> (DetachInstancesFromLoadBalancer
    -> DetachInstancesFromLoadBalancer -> Bool)
-> Eq DetachInstancesFromLoadBalancer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DetachInstancesFromLoadBalancer
-> DetachInstancesFromLoadBalancer -> Bool
$c/= :: DetachInstancesFromLoadBalancer
-> DetachInstancesFromLoadBalancer -> Bool
== :: DetachInstancesFromLoadBalancer
-> DetachInstancesFromLoadBalancer -> Bool
$c== :: DetachInstancesFromLoadBalancer
-> DetachInstancesFromLoadBalancer -> Bool
Prelude.Eq, ReadPrec [DetachInstancesFromLoadBalancer]
ReadPrec DetachInstancesFromLoadBalancer
Int -> ReadS DetachInstancesFromLoadBalancer
ReadS [DetachInstancesFromLoadBalancer]
(Int -> ReadS DetachInstancesFromLoadBalancer)
-> ReadS [DetachInstancesFromLoadBalancer]
-> ReadPrec DetachInstancesFromLoadBalancer
-> ReadPrec [DetachInstancesFromLoadBalancer]
-> Read DetachInstancesFromLoadBalancer
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DetachInstancesFromLoadBalancer]
$creadListPrec :: ReadPrec [DetachInstancesFromLoadBalancer]
readPrec :: ReadPrec DetachInstancesFromLoadBalancer
$creadPrec :: ReadPrec DetachInstancesFromLoadBalancer
readList :: ReadS [DetachInstancesFromLoadBalancer]
$creadList :: ReadS [DetachInstancesFromLoadBalancer]
readsPrec :: Int -> ReadS DetachInstancesFromLoadBalancer
$creadsPrec :: Int -> ReadS DetachInstancesFromLoadBalancer
Prelude.Read, Int -> DetachInstancesFromLoadBalancer -> ShowS
[DetachInstancesFromLoadBalancer] -> ShowS
DetachInstancesFromLoadBalancer -> String
(Int -> DetachInstancesFromLoadBalancer -> ShowS)
-> (DetachInstancesFromLoadBalancer -> String)
-> ([DetachInstancesFromLoadBalancer] -> ShowS)
-> Show DetachInstancesFromLoadBalancer
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DetachInstancesFromLoadBalancer] -> ShowS
$cshowList :: [DetachInstancesFromLoadBalancer] -> ShowS
show :: DetachInstancesFromLoadBalancer -> String
$cshow :: DetachInstancesFromLoadBalancer -> String
showsPrec :: Int -> DetachInstancesFromLoadBalancer -> ShowS
$cshowsPrec :: Int -> DetachInstancesFromLoadBalancer -> ShowS
Prelude.Show, (forall x.
 DetachInstancesFromLoadBalancer
 -> Rep DetachInstancesFromLoadBalancer x)
-> (forall x.
    Rep DetachInstancesFromLoadBalancer x
    -> DetachInstancesFromLoadBalancer)
-> Generic DetachInstancesFromLoadBalancer
forall x.
Rep DetachInstancesFromLoadBalancer x
-> DetachInstancesFromLoadBalancer
forall x.
DetachInstancesFromLoadBalancer
-> Rep DetachInstancesFromLoadBalancer x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DetachInstancesFromLoadBalancer x
-> DetachInstancesFromLoadBalancer
$cfrom :: forall x.
DetachInstancesFromLoadBalancer
-> Rep DetachInstancesFromLoadBalancer x
Prelude.Generic)

-- |
-- Create a value of 'DetachInstancesFromLoadBalancer' 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', 'detachInstancesFromLoadBalancer_loadBalancerName' - The name of the Lightsail load balancer.
--
-- 'instanceNames', 'detachInstancesFromLoadBalancer_instanceNames' - An array of strings containing the names of the instances you want to
-- detach from the load balancer.
newDetachInstancesFromLoadBalancer ::
  -- | 'loadBalancerName'
  Prelude.Text ->
  DetachInstancesFromLoadBalancer
newDetachInstancesFromLoadBalancer :: Text -> DetachInstancesFromLoadBalancer
newDetachInstancesFromLoadBalancer Text
pLoadBalancerName_ =
  DetachInstancesFromLoadBalancer' :: Text -> [Text] -> DetachInstancesFromLoadBalancer
DetachInstancesFromLoadBalancer'
    { $sel:loadBalancerName:DetachInstancesFromLoadBalancer' :: Text
loadBalancerName =
        Text
pLoadBalancerName_,
      $sel:instanceNames:DetachInstancesFromLoadBalancer' :: [Text]
instanceNames = [Text]
forall a. Monoid a => a
Prelude.mempty
    }

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

-- | An array of strings containing the names of the instances you want to
-- detach from the load balancer.
detachInstancesFromLoadBalancer_instanceNames :: Lens.Lens' DetachInstancesFromLoadBalancer [Prelude.Text]
detachInstancesFromLoadBalancer_instanceNames :: ([Text] -> f [Text])
-> DetachInstancesFromLoadBalancer
-> f DetachInstancesFromLoadBalancer
detachInstancesFromLoadBalancer_instanceNames = (DetachInstancesFromLoadBalancer -> [Text])
-> (DetachInstancesFromLoadBalancer
    -> [Text] -> DetachInstancesFromLoadBalancer)
-> Lens
     DetachInstancesFromLoadBalancer
     DetachInstancesFromLoadBalancer
     [Text]
     [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetachInstancesFromLoadBalancer' {[Text]
instanceNames :: [Text]
$sel:instanceNames:DetachInstancesFromLoadBalancer' :: DetachInstancesFromLoadBalancer -> [Text]
instanceNames} -> [Text]
instanceNames) (\s :: DetachInstancesFromLoadBalancer
s@DetachInstancesFromLoadBalancer' {} [Text]
a -> DetachInstancesFromLoadBalancer
s {$sel:instanceNames:DetachInstancesFromLoadBalancer' :: [Text]
instanceNames = [Text]
a} :: DetachInstancesFromLoadBalancer) (([Text] -> f [Text])
 -> DetachInstancesFromLoadBalancer
 -> f DetachInstancesFromLoadBalancer)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> DetachInstancesFromLoadBalancer
-> f DetachInstancesFromLoadBalancer
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
    DetachInstancesFromLoadBalancer
  where
  type
    AWSResponse DetachInstancesFromLoadBalancer =
      DetachInstancesFromLoadBalancerResponse
  request :: DetachInstancesFromLoadBalancer
-> Request DetachInstancesFromLoadBalancer
request = Service
-> DetachInstancesFromLoadBalancer
-> Request DetachInstancesFromLoadBalancer
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DetachInstancesFromLoadBalancer
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse DetachInstancesFromLoadBalancer)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DetachInstancesFromLoadBalancer))
-> Logger
-> Service
-> Proxy DetachInstancesFromLoadBalancer
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse DetachInstancesFromLoadBalancer)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [Operation] -> Int -> DetachInstancesFromLoadBalancerResponse
DetachInstancesFromLoadBalancerResponse'
            (Maybe [Operation]
 -> Int -> DetachInstancesFromLoadBalancerResponse)
-> Either String (Maybe [Operation])
-> Either String (Int -> DetachInstancesFromLoadBalancerResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [Operation]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"operations" Either String (Maybe (Maybe [Operation]))
-> Maybe [Operation] -> Either String (Maybe [Operation])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Operation]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> DetachInstancesFromLoadBalancerResponse)
-> Either String Int
-> Either String DetachInstancesFromLoadBalancerResponse
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
    DetachInstancesFromLoadBalancer

instance
  Prelude.NFData
    DetachInstancesFromLoadBalancer

instance
  Core.ToHeaders
    DetachInstancesFromLoadBalancer
  where
  toHeaders :: DetachInstancesFromLoadBalancer -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> DetachInstancesFromLoadBalancer -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"Lightsail_20161128.DetachInstancesFromLoadBalancer" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON DetachInstancesFromLoadBalancer where
  toJSON :: DetachInstancesFromLoadBalancer -> Value
toJSON DetachInstancesFromLoadBalancer' {[Text]
Text
instanceNames :: [Text]
loadBalancerName :: Text
$sel:instanceNames:DetachInstancesFromLoadBalancer' :: DetachInstancesFromLoadBalancer -> [Text]
$sel:loadBalancerName:DetachInstancesFromLoadBalancer' :: DetachInstancesFromLoadBalancer -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"loadBalancerName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
loadBalancerName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"instanceNames" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Text]
instanceNames)
          ]
      )

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

instance Core.ToQuery DetachInstancesFromLoadBalancer where
  toQuery :: DetachInstancesFromLoadBalancer -> QueryString
toQuery = QueryString -> DetachInstancesFromLoadBalancer -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newDetachInstancesFromLoadBalancerResponse' smart constructor.
data DetachInstancesFromLoadBalancerResponse = DetachInstancesFromLoadBalancerResponse'
  { -- | An array of objects that describe the result of the action, such as the
    -- status of the request, the timestamp of the request, and the resources
    -- affected by the request.
    DetachInstancesFromLoadBalancerResponse -> Maybe [Operation]
operations :: Prelude.Maybe [Operation],
    -- | The response's http status code.
    DetachInstancesFromLoadBalancerResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DetachInstancesFromLoadBalancerResponse
-> DetachInstancesFromLoadBalancerResponse -> Bool
(DetachInstancesFromLoadBalancerResponse
 -> DetachInstancesFromLoadBalancerResponse -> Bool)
-> (DetachInstancesFromLoadBalancerResponse
    -> DetachInstancesFromLoadBalancerResponse -> Bool)
-> Eq DetachInstancesFromLoadBalancerResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DetachInstancesFromLoadBalancerResponse
-> DetachInstancesFromLoadBalancerResponse -> Bool
$c/= :: DetachInstancesFromLoadBalancerResponse
-> DetachInstancesFromLoadBalancerResponse -> Bool
== :: DetachInstancesFromLoadBalancerResponse
-> DetachInstancesFromLoadBalancerResponse -> Bool
$c== :: DetachInstancesFromLoadBalancerResponse
-> DetachInstancesFromLoadBalancerResponse -> Bool
Prelude.Eq, ReadPrec [DetachInstancesFromLoadBalancerResponse]
ReadPrec DetachInstancesFromLoadBalancerResponse
Int -> ReadS DetachInstancesFromLoadBalancerResponse
ReadS [DetachInstancesFromLoadBalancerResponse]
(Int -> ReadS DetachInstancesFromLoadBalancerResponse)
-> ReadS [DetachInstancesFromLoadBalancerResponse]
-> ReadPrec DetachInstancesFromLoadBalancerResponse
-> ReadPrec [DetachInstancesFromLoadBalancerResponse]
-> Read DetachInstancesFromLoadBalancerResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DetachInstancesFromLoadBalancerResponse]
$creadListPrec :: ReadPrec [DetachInstancesFromLoadBalancerResponse]
readPrec :: ReadPrec DetachInstancesFromLoadBalancerResponse
$creadPrec :: ReadPrec DetachInstancesFromLoadBalancerResponse
readList :: ReadS [DetachInstancesFromLoadBalancerResponse]
$creadList :: ReadS [DetachInstancesFromLoadBalancerResponse]
readsPrec :: Int -> ReadS DetachInstancesFromLoadBalancerResponse
$creadsPrec :: Int -> ReadS DetachInstancesFromLoadBalancerResponse
Prelude.Read, Int -> DetachInstancesFromLoadBalancerResponse -> ShowS
[DetachInstancesFromLoadBalancerResponse] -> ShowS
DetachInstancesFromLoadBalancerResponse -> String
(Int -> DetachInstancesFromLoadBalancerResponse -> ShowS)
-> (DetachInstancesFromLoadBalancerResponse -> String)
-> ([DetachInstancesFromLoadBalancerResponse] -> ShowS)
-> Show DetachInstancesFromLoadBalancerResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DetachInstancesFromLoadBalancerResponse] -> ShowS
$cshowList :: [DetachInstancesFromLoadBalancerResponse] -> ShowS
show :: DetachInstancesFromLoadBalancerResponse -> String
$cshow :: DetachInstancesFromLoadBalancerResponse -> String
showsPrec :: Int -> DetachInstancesFromLoadBalancerResponse -> ShowS
$cshowsPrec :: Int -> DetachInstancesFromLoadBalancerResponse -> ShowS
Prelude.Show, (forall x.
 DetachInstancesFromLoadBalancerResponse
 -> Rep DetachInstancesFromLoadBalancerResponse x)
-> (forall x.
    Rep DetachInstancesFromLoadBalancerResponse x
    -> DetachInstancesFromLoadBalancerResponse)
-> Generic DetachInstancesFromLoadBalancerResponse
forall x.
Rep DetachInstancesFromLoadBalancerResponse x
-> DetachInstancesFromLoadBalancerResponse
forall x.
DetachInstancesFromLoadBalancerResponse
-> Rep DetachInstancesFromLoadBalancerResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DetachInstancesFromLoadBalancerResponse x
-> DetachInstancesFromLoadBalancerResponse
$cfrom :: forall x.
DetachInstancesFromLoadBalancerResponse
-> Rep DetachInstancesFromLoadBalancerResponse x
Prelude.Generic)

-- |
-- Create a value of 'DetachInstancesFromLoadBalancerResponse' 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:
--
-- 'operations', 'detachInstancesFromLoadBalancerResponse_operations' - An array of objects that describe the result of the action, such as the
-- status of the request, the timestamp of the request, and the resources
-- affected by the request.
--
-- 'httpStatus', 'detachInstancesFromLoadBalancerResponse_httpStatus' - The response's http status code.
newDetachInstancesFromLoadBalancerResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DetachInstancesFromLoadBalancerResponse
newDetachInstancesFromLoadBalancerResponse :: Int -> DetachInstancesFromLoadBalancerResponse
newDetachInstancesFromLoadBalancerResponse
  Int
pHttpStatus_ =
    DetachInstancesFromLoadBalancerResponse' :: Maybe [Operation] -> Int -> DetachInstancesFromLoadBalancerResponse
DetachInstancesFromLoadBalancerResponse'
      { $sel:operations:DetachInstancesFromLoadBalancerResponse' :: Maybe [Operation]
operations =
          Maybe [Operation]
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DetachInstancesFromLoadBalancerResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | An array of objects that describe the result of the action, such as the
-- status of the request, the timestamp of the request, and the resources
-- affected by the request.
detachInstancesFromLoadBalancerResponse_operations :: Lens.Lens' DetachInstancesFromLoadBalancerResponse (Prelude.Maybe [Operation])
detachInstancesFromLoadBalancerResponse_operations :: (Maybe [Operation] -> f (Maybe [Operation]))
-> DetachInstancesFromLoadBalancerResponse
-> f DetachInstancesFromLoadBalancerResponse
detachInstancesFromLoadBalancerResponse_operations = (DetachInstancesFromLoadBalancerResponse -> Maybe [Operation])
-> (DetachInstancesFromLoadBalancerResponse
    -> Maybe [Operation] -> DetachInstancesFromLoadBalancerResponse)
-> Lens
     DetachInstancesFromLoadBalancerResponse
     DetachInstancesFromLoadBalancerResponse
     (Maybe [Operation])
     (Maybe [Operation])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetachInstancesFromLoadBalancerResponse' {Maybe [Operation]
operations :: Maybe [Operation]
$sel:operations:DetachInstancesFromLoadBalancerResponse' :: DetachInstancesFromLoadBalancerResponse -> Maybe [Operation]
operations} -> Maybe [Operation]
operations) (\s :: DetachInstancesFromLoadBalancerResponse
s@DetachInstancesFromLoadBalancerResponse' {} Maybe [Operation]
a -> DetachInstancesFromLoadBalancerResponse
s {$sel:operations:DetachInstancesFromLoadBalancerResponse' :: Maybe [Operation]
operations = Maybe [Operation]
a} :: DetachInstancesFromLoadBalancerResponse) ((Maybe [Operation] -> f (Maybe [Operation]))
 -> DetachInstancesFromLoadBalancerResponse
 -> f DetachInstancesFromLoadBalancerResponse)
-> ((Maybe [Operation] -> f (Maybe [Operation]))
    -> Maybe [Operation] -> f (Maybe [Operation]))
-> (Maybe [Operation] -> f (Maybe [Operation]))
-> DetachInstancesFromLoadBalancerResponse
-> f DetachInstancesFromLoadBalancerResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Operation] [Operation] [Operation] [Operation]
-> Iso
     (Maybe [Operation])
     (Maybe [Operation])
     (Maybe [Operation])
     (Maybe [Operation])
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 [Operation] [Operation] [Operation] [Operation]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    DetachInstancesFromLoadBalancerResponse