{-# 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.UpdateLoadBalancerAttribute
-- 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)
--
-- Updates the specified attribute for a load balancer. You can only update
-- one attribute at a time.
--
-- The @update load balancer attribute@ 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.UpdateLoadBalancerAttribute
  ( -- * Creating a Request
    UpdateLoadBalancerAttribute (..),
    newUpdateLoadBalancerAttribute,

    -- * Request Lenses
    updateLoadBalancerAttribute_loadBalancerName,
    updateLoadBalancerAttribute_attributeName,
    updateLoadBalancerAttribute_attributeValue,

    -- * Destructuring the Response
    UpdateLoadBalancerAttributeResponse (..),
    newUpdateLoadBalancerAttributeResponse,

    -- * Response Lenses
    updateLoadBalancerAttributeResponse_operations,
    updateLoadBalancerAttributeResponse_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:/ 'newUpdateLoadBalancerAttribute' smart constructor.
data UpdateLoadBalancerAttribute = UpdateLoadBalancerAttribute'
  { -- | The name of the load balancer that you want to modify (e.g.,
    -- @my-load-balancer@.
    UpdateLoadBalancerAttribute -> Text
loadBalancerName :: Prelude.Text,
    -- | The name of the attribute you want to update. Valid values are below.
    UpdateLoadBalancerAttribute -> LoadBalancerAttributeName
attributeName :: LoadBalancerAttributeName,
    -- | The value that you want to specify for the attribute name.
    UpdateLoadBalancerAttribute -> Text
attributeValue :: Prelude.Text
  }
  deriving (UpdateLoadBalancerAttribute -> UpdateLoadBalancerAttribute -> Bool
(UpdateLoadBalancerAttribute
 -> UpdateLoadBalancerAttribute -> Bool)
-> (UpdateLoadBalancerAttribute
    -> UpdateLoadBalancerAttribute -> Bool)
-> Eq UpdateLoadBalancerAttribute
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateLoadBalancerAttribute -> UpdateLoadBalancerAttribute -> Bool
$c/= :: UpdateLoadBalancerAttribute -> UpdateLoadBalancerAttribute -> Bool
== :: UpdateLoadBalancerAttribute -> UpdateLoadBalancerAttribute -> Bool
$c== :: UpdateLoadBalancerAttribute -> UpdateLoadBalancerAttribute -> Bool
Prelude.Eq, ReadPrec [UpdateLoadBalancerAttribute]
ReadPrec UpdateLoadBalancerAttribute
Int -> ReadS UpdateLoadBalancerAttribute
ReadS [UpdateLoadBalancerAttribute]
(Int -> ReadS UpdateLoadBalancerAttribute)
-> ReadS [UpdateLoadBalancerAttribute]
-> ReadPrec UpdateLoadBalancerAttribute
-> ReadPrec [UpdateLoadBalancerAttribute]
-> Read UpdateLoadBalancerAttribute
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateLoadBalancerAttribute]
$creadListPrec :: ReadPrec [UpdateLoadBalancerAttribute]
readPrec :: ReadPrec UpdateLoadBalancerAttribute
$creadPrec :: ReadPrec UpdateLoadBalancerAttribute
readList :: ReadS [UpdateLoadBalancerAttribute]
$creadList :: ReadS [UpdateLoadBalancerAttribute]
readsPrec :: Int -> ReadS UpdateLoadBalancerAttribute
$creadsPrec :: Int -> ReadS UpdateLoadBalancerAttribute
Prelude.Read, Int -> UpdateLoadBalancerAttribute -> ShowS
[UpdateLoadBalancerAttribute] -> ShowS
UpdateLoadBalancerAttribute -> String
(Int -> UpdateLoadBalancerAttribute -> ShowS)
-> (UpdateLoadBalancerAttribute -> String)
-> ([UpdateLoadBalancerAttribute] -> ShowS)
-> Show UpdateLoadBalancerAttribute
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateLoadBalancerAttribute] -> ShowS
$cshowList :: [UpdateLoadBalancerAttribute] -> ShowS
show :: UpdateLoadBalancerAttribute -> String
$cshow :: UpdateLoadBalancerAttribute -> String
showsPrec :: Int -> UpdateLoadBalancerAttribute -> ShowS
$cshowsPrec :: Int -> UpdateLoadBalancerAttribute -> ShowS
Prelude.Show, (forall x.
 UpdateLoadBalancerAttribute -> Rep UpdateLoadBalancerAttribute x)
-> (forall x.
    Rep UpdateLoadBalancerAttribute x -> UpdateLoadBalancerAttribute)
-> Generic UpdateLoadBalancerAttribute
forall x.
Rep UpdateLoadBalancerAttribute x -> UpdateLoadBalancerAttribute
forall x.
UpdateLoadBalancerAttribute -> Rep UpdateLoadBalancerAttribute x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateLoadBalancerAttribute x -> UpdateLoadBalancerAttribute
$cfrom :: forall x.
UpdateLoadBalancerAttribute -> Rep UpdateLoadBalancerAttribute x
Prelude.Generic)

-- |
-- Create a value of 'UpdateLoadBalancerAttribute' 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', 'updateLoadBalancerAttribute_loadBalancerName' - The name of the load balancer that you want to modify (e.g.,
-- @my-load-balancer@.
--
-- 'attributeName', 'updateLoadBalancerAttribute_attributeName' - The name of the attribute you want to update. Valid values are below.
--
-- 'attributeValue', 'updateLoadBalancerAttribute_attributeValue' - The value that you want to specify for the attribute name.
newUpdateLoadBalancerAttribute ::
  -- | 'loadBalancerName'
  Prelude.Text ->
  -- | 'attributeName'
  LoadBalancerAttributeName ->
  -- | 'attributeValue'
  Prelude.Text ->
  UpdateLoadBalancerAttribute
newUpdateLoadBalancerAttribute :: Text
-> LoadBalancerAttributeName -> Text -> UpdateLoadBalancerAttribute
newUpdateLoadBalancerAttribute
  Text
pLoadBalancerName_
  LoadBalancerAttributeName
pAttributeName_
  Text
pAttributeValue_ =
    UpdateLoadBalancerAttribute' :: Text
-> LoadBalancerAttributeName -> Text -> UpdateLoadBalancerAttribute
UpdateLoadBalancerAttribute'
      { $sel:loadBalancerName:UpdateLoadBalancerAttribute' :: Text
loadBalancerName =
          Text
pLoadBalancerName_,
        $sel:attributeName:UpdateLoadBalancerAttribute' :: LoadBalancerAttributeName
attributeName = LoadBalancerAttributeName
pAttributeName_,
        $sel:attributeValue:UpdateLoadBalancerAttribute' :: Text
attributeValue = Text
pAttributeValue_
      }

-- | The name of the load balancer that you want to modify (e.g.,
-- @my-load-balancer@.
updateLoadBalancerAttribute_loadBalancerName :: Lens.Lens' UpdateLoadBalancerAttribute Prelude.Text
updateLoadBalancerAttribute_loadBalancerName :: (Text -> f Text)
-> UpdateLoadBalancerAttribute -> f UpdateLoadBalancerAttribute
updateLoadBalancerAttribute_loadBalancerName = (UpdateLoadBalancerAttribute -> Text)
-> (UpdateLoadBalancerAttribute
    -> Text -> UpdateLoadBalancerAttribute)
-> Lens
     UpdateLoadBalancerAttribute UpdateLoadBalancerAttribute Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLoadBalancerAttribute' {Text
loadBalancerName :: Text
$sel:loadBalancerName:UpdateLoadBalancerAttribute' :: UpdateLoadBalancerAttribute -> Text
loadBalancerName} -> Text
loadBalancerName) (\s :: UpdateLoadBalancerAttribute
s@UpdateLoadBalancerAttribute' {} Text
a -> UpdateLoadBalancerAttribute
s {$sel:loadBalancerName:UpdateLoadBalancerAttribute' :: Text
loadBalancerName = Text
a} :: UpdateLoadBalancerAttribute)

-- | The name of the attribute you want to update. Valid values are below.
updateLoadBalancerAttribute_attributeName :: Lens.Lens' UpdateLoadBalancerAttribute LoadBalancerAttributeName
updateLoadBalancerAttribute_attributeName :: (LoadBalancerAttributeName -> f LoadBalancerAttributeName)
-> UpdateLoadBalancerAttribute -> f UpdateLoadBalancerAttribute
updateLoadBalancerAttribute_attributeName = (UpdateLoadBalancerAttribute -> LoadBalancerAttributeName)
-> (UpdateLoadBalancerAttribute
    -> LoadBalancerAttributeName -> UpdateLoadBalancerAttribute)
-> Lens
     UpdateLoadBalancerAttribute
     UpdateLoadBalancerAttribute
     LoadBalancerAttributeName
     LoadBalancerAttributeName
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLoadBalancerAttribute' {LoadBalancerAttributeName
attributeName :: LoadBalancerAttributeName
$sel:attributeName:UpdateLoadBalancerAttribute' :: UpdateLoadBalancerAttribute -> LoadBalancerAttributeName
attributeName} -> LoadBalancerAttributeName
attributeName) (\s :: UpdateLoadBalancerAttribute
s@UpdateLoadBalancerAttribute' {} LoadBalancerAttributeName
a -> UpdateLoadBalancerAttribute
s {$sel:attributeName:UpdateLoadBalancerAttribute' :: LoadBalancerAttributeName
attributeName = LoadBalancerAttributeName
a} :: UpdateLoadBalancerAttribute)

-- | The value that you want to specify for the attribute name.
updateLoadBalancerAttribute_attributeValue :: Lens.Lens' UpdateLoadBalancerAttribute Prelude.Text
updateLoadBalancerAttribute_attributeValue :: (Text -> f Text)
-> UpdateLoadBalancerAttribute -> f UpdateLoadBalancerAttribute
updateLoadBalancerAttribute_attributeValue = (UpdateLoadBalancerAttribute -> Text)
-> (UpdateLoadBalancerAttribute
    -> Text -> UpdateLoadBalancerAttribute)
-> Lens
     UpdateLoadBalancerAttribute UpdateLoadBalancerAttribute Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLoadBalancerAttribute' {Text
attributeValue :: Text
$sel:attributeValue:UpdateLoadBalancerAttribute' :: UpdateLoadBalancerAttribute -> Text
attributeValue} -> Text
attributeValue) (\s :: UpdateLoadBalancerAttribute
s@UpdateLoadBalancerAttribute' {} Text
a -> UpdateLoadBalancerAttribute
s {$sel:attributeValue:UpdateLoadBalancerAttribute' :: Text
attributeValue = Text
a} :: UpdateLoadBalancerAttribute)

instance Core.AWSRequest UpdateLoadBalancerAttribute where
  type
    AWSResponse UpdateLoadBalancerAttribute =
      UpdateLoadBalancerAttributeResponse
  request :: UpdateLoadBalancerAttribute -> Request UpdateLoadBalancerAttribute
request = Service
-> UpdateLoadBalancerAttribute
-> Request UpdateLoadBalancerAttribute
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateLoadBalancerAttribute
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateLoadBalancerAttribute)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateLoadBalancerAttribute))
-> Logger
-> Service
-> Proxy UpdateLoadBalancerAttribute
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateLoadBalancerAttribute)))
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 -> UpdateLoadBalancerAttributeResponse
UpdateLoadBalancerAttributeResponse'
            (Maybe [Operation] -> Int -> UpdateLoadBalancerAttributeResponse)
-> Either String (Maybe [Operation])
-> Either String (Int -> UpdateLoadBalancerAttributeResponse)
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 -> UpdateLoadBalancerAttributeResponse)
-> Either String Int
-> Either String UpdateLoadBalancerAttributeResponse
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 UpdateLoadBalancerAttribute

instance Prelude.NFData UpdateLoadBalancerAttribute

instance Core.ToHeaders UpdateLoadBalancerAttribute where
  toHeaders :: UpdateLoadBalancerAttribute -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateLoadBalancerAttribute -> 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.UpdateLoadBalancerAttribute" ::
                          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 UpdateLoadBalancerAttribute where
  toJSON :: UpdateLoadBalancerAttribute -> Value
toJSON UpdateLoadBalancerAttribute' {Text
LoadBalancerAttributeName
attributeValue :: Text
attributeName :: LoadBalancerAttributeName
loadBalancerName :: Text
$sel:attributeValue:UpdateLoadBalancerAttribute' :: UpdateLoadBalancerAttribute -> Text
$sel:attributeName:UpdateLoadBalancerAttribute' :: UpdateLoadBalancerAttribute -> LoadBalancerAttributeName
$sel:loadBalancerName:UpdateLoadBalancerAttribute' :: UpdateLoadBalancerAttribute -> 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
"attributeName" Text -> LoadBalancerAttributeName -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= LoadBalancerAttributeName
attributeName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"attributeValue" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
attributeValue)
          ]
      )

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

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

-- | /See:/ 'newUpdateLoadBalancerAttributeResponse' smart constructor.
data UpdateLoadBalancerAttributeResponse = UpdateLoadBalancerAttributeResponse'
  { -- | 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.
    UpdateLoadBalancerAttributeResponse -> Maybe [Operation]
operations :: Prelude.Maybe [Operation],
    -- | The response's http status code.
    UpdateLoadBalancerAttributeResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateLoadBalancerAttributeResponse
-> UpdateLoadBalancerAttributeResponse -> Bool
(UpdateLoadBalancerAttributeResponse
 -> UpdateLoadBalancerAttributeResponse -> Bool)
-> (UpdateLoadBalancerAttributeResponse
    -> UpdateLoadBalancerAttributeResponse -> Bool)
-> Eq UpdateLoadBalancerAttributeResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateLoadBalancerAttributeResponse
-> UpdateLoadBalancerAttributeResponse -> Bool
$c/= :: UpdateLoadBalancerAttributeResponse
-> UpdateLoadBalancerAttributeResponse -> Bool
== :: UpdateLoadBalancerAttributeResponse
-> UpdateLoadBalancerAttributeResponse -> Bool
$c== :: UpdateLoadBalancerAttributeResponse
-> UpdateLoadBalancerAttributeResponse -> Bool
Prelude.Eq, ReadPrec [UpdateLoadBalancerAttributeResponse]
ReadPrec UpdateLoadBalancerAttributeResponse
Int -> ReadS UpdateLoadBalancerAttributeResponse
ReadS [UpdateLoadBalancerAttributeResponse]
(Int -> ReadS UpdateLoadBalancerAttributeResponse)
-> ReadS [UpdateLoadBalancerAttributeResponse]
-> ReadPrec UpdateLoadBalancerAttributeResponse
-> ReadPrec [UpdateLoadBalancerAttributeResponse]
-> Read UpdateLoadBalancerAttributeResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateLoadBalancerAttributeResponse]
$creadListPrec :: ReadPrec [UpdateLoadBalancerAttributeResponse]
readPrec :: ReadPrec UpdateLoadBalancerAttributeResponse
$creadPrec :: ReadPrec UpdateLoadBalancerAttributeResponse
readList :: ReadS [UpdateLoadBalancerAttributeResponse]
$creadList :: ReadS [UpdateLoadBalancerAttributeResponse]
readsPrec :: Int -> ReadS UpdateLoadBalancerAttributeResponse
$creadsPrec :: Int -> ReadS UpdateLoadBalancerAttributeResponse
Prelude.Read, Int -> UpdateLoadBalancerAttributeResponse -> ShowS
[UpdateLoadBalancerAttributeResponse] -> ShowS
UpdateLoadBalancerAttributeResponse -> String
(Int -> UpdateLoadBalancerAttributeResponse -> ShowS)
-> (UpdateLoadBalancerAttributeResponse -> String)
-> ([UpdateLoadBalancerAttributeResponse] -> ShowS)
-> Show UpdateLoadBalancerAttributeResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateLoadBalancerAttributeResponse] -> ShowS
$cshowList :: [UpdateLoadBalancerAttributeResponse] -> ShowS
show :: UpdateLoadBalancerAttributeResponse -> String
$cshow :: UpdateLoadBalancerAttributeResponse -> String
showsPrec :: Int -> UpdateLoadBalancerAttributeResponse -> ShowS
$cshowsPrec :: Int -> UpdateLoadBalancerAttributeResponse -> ShowS
Prelude.Show, (forall x.
 UpdateLoadBalancerAttributeResponse
 -> Rep UpdateLoadBalancerAttributeResponse x)
-> (forall x.
    Rep UpdateLoadBalancerAttributeResponse x
    -> UpdateLoadBalancerAttributeResponse)
-> Generic UpdateLoadBalancerAttributeResponse
forall x.
Rep UpdateLoadBalancerAttributeResponse x
-> UpdateLoadBalancerAttributeResponse
forall x.
UpdateLoadBalancerAttributeResponse
-> Rep UpdateLoadBalancerAttributeResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateLoadBalancerAttributeResponse x
-> UpdateLoadBalancerAttributeResponse
$cfrom :: forall x.
UpdateLoadBalancerAttributeResponse
-> Rep UpdateLoadBalancerAttributeResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateLoadBalancerAttributeResponse' 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', 'updateLoadBalancerAttributeResponse_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', 'updateLoadBalancerAttributeResponse_httpStatus' - The response's http status code.
newUpdateLoadBalancerAttributeResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateLoadBalancerAttributeResponse
newUpdateLoadBalancerAttributeResponse :: Int -> UpdateLoadBalancerAttributeResponse
newUpdateLoadBalancerAttributeResponse Int
pHttpStatus_ =
  UpdateLoadBalancerAttributeResponse' :: Maybe [Operation] -> Int -> UpdateLoadBalancerAttributeResponse
UpdateLoadBalancerAttributeResponse'
    { $sel:operations:UpdateLoadBalancerAttributeResponse' :: Maybe [Operation]
operations =
        Maybe [Operation]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateLoadBalancerAttributeResponse' :: 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.
updateLoadBalancerAttributeResponse_operations :: Lens.Lens' UpdateLoadBalancerAttributeResponse (Prelude.Maybe [Operation])
updateLoadBalancerAttributeResponse_operations :: (Maybe [Operation] -> f (Maybe [Operation]))
-> UpdateLoadBalancerAttributeResponse
-> f UpdateLoadBalancerAttributeResponse
updateLoadBalancerAttributeResponse_operations = (UpdateLoadBalancerAttributeResponse -> Maybe [Operation])
-> (UpdateLoadBalancerAttributeResponse
    -> Maybe [Operation] -> UpdateLoadBalancerAttributeResponse)
-> Lens
     UpdateLoadBalancerAttributeResponse
     UpdateLoadBalancerAttributeResponse
     (Maybe [Operation])
     (Maybe [Operation])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLoadBalancerAttributeResponse' {Maybe [Operation]
operations :: Maybe [Operation]
$sel:operations:UpdateLoadBalancerAttributeResponse' :: UpdateLoadBalancerAttributeResponse -> Maybe [Operation]
operations} -> Maybe [Operation]
operations) (\s :: UpdateLoadBalancerAttributeResponse
s@UpdateLoadBalancerAttributeResponse' {} Maybe [Operation]
a -> UpdateLoadBalancerAttributeResponse
s {$sel:operations:UpdateLoadBalancerAttributeResponse' :: Maybe [Operation]
operations = Maybe [Operation]
a} :: UpdateLoadBalancerAttributeResponse) ((Maybe [Operation] -> f (Maybe [Operation]))
 -> UpdateLoadBalancerAttributeResponse
 -> f UpdateLoadBalancerAttributeResponse)
-> ((Maybe [Operation] -> f (Maybe [Operation]))
    -> Maybe [Operation] -> f (Maybe [Operation]))
-> (Maybe [Operation] -> f (Maybe [Operation]))
-> UpdateLoadBalancerAttributeResponse
-> f UpdateLoadBalancerAttributeResponse
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.
updateLoadBalancerAttributeResponse_httpStatus :: Lens.Lens' UpdateLoadBalancerAttributeResponse Prelude.Int
updateLoadBalancerAttributeResponse_httpStatus :: (Int -> f Int)
-> UpdateLoadBalancerAttributeResponse
-> f UpdateLoadBalancerAttributeResponse
updateLoadBalancerAttributeResponse_httpStatus = (UpdateLoadBalancerAttributeResponse -> Int)
-> (UpdateLoadBalancerAttributeResponse
    -> Int -> UpdateLoadBalancerAttributeResponse)
-> Lens
     UpdateLoadBalancerAttributeResponse
     UpdateLoadBalancerAttributeResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLoadBalancerAttributeResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateLoadBalancerAttributeResponse' :: UpdateLoadBalancerAttributeResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateLoadBalancerAttributeResponse
s@UpdateLoadBalancerAttributeResponse' {} Int
a -> UpdateLoadBalancerAttributeResponse
s {$sel:httpStatus:UpdateLoadBalancerAttributeResponse' :: Int
httpStatus = Int
a} :: UpdateLoadBalancerAttributeResponse)

instance
  Prelude.NFData
    UpdateLoadBalancerAttributeResponse