{-# 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.StorageGateway.UpdateBandwidthRateLimit
-- 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 bandwidth rate limits of a gateway. You can update both the
-- upload and download bandwidth rate limit or specify only one of the two.
-- If you don\'t set a bandwidth rate limit, the existing rate limit
-- remains. This operation is supported for the stored volume, cached
-- volume, and tape gateway types.
--
-- By default, a gateway\'s bandwidth rate limits are not set. If you
-- don\'t set any limit, the gateway does not have any limitations on its
-- bandwidth usage and could potentially use the maximum available
-- bandwidth.
--
-- To specify which gateway to update, use the Amazon Resource Name (ARN)
-- of the gateway in your request.
module Amazonka.StorageGateway.UpdateBandwidthRateLimit
  ( -- * Creating a Request
    UpdateBandwidthRateLimit (..),
    newUpdateBandwidthRateLimit,

    -- * Request Lenses
    updateBandwidthRateLimit_averageUploadRateLimitInBitsPerSec,
    updateBandwidthRateLimit_averageDownloadRateLimitInBitsPerSec,
    updateBandwidthRateLimit_gatewayARN,

    -- * Destructuring the Response
    UpdateBandwidthRateLimitResponse (..),
    newUpdateBandwidthRateLimitResponse,

    -- * Response Lenses
    updateBandwidthRateLimitResponse_gatewayARN,
    updateBandwidthRateLimitResponse_httpStatus,
  )
where

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

-- | A JSON object containing one or more of the following fields:
--
-- -   UpdateBandwidthRateLimitInput$AverageDownloadRateLimitInBitsPerSec
--
-- -   UpdateBandwidthRateLimitInput$AverageUploadRateLimitInBitsPerSec
--
-- /See:/ 'newUpdateBandwidthRateLimit' smart constructor.
data UpdateBandwidthRateLimit = UpdateBandwidthRateLimit'
  { -- | The average upload bandwidth rate limit in bits per second.
    UpdateBandwidthRateLimit -> Maybe Natural
averageUploadRateLimitInBitsPerSec :: Prelude.Maybe Prelude.Natural,
    -- | The average download bandwidth rate limit in bits per second.
    UpdateBandwidthRateLimit -> Maybe Natural
averageDownloadRateLimitInBitsPerSec :: Prelude.Maybe Prelude.Natural,
    UpdateBandwidthRateLimit -> Text
gatewayARN :: Prelude.Text
  }
  deriving (UpdateBandwidthRateLimit -> UpdateBandwidthRateLimit -> Bool
(UpdateBandwidthRateLimit -> UpdateBandwidthRateLimit -> Bool)
-> (UpdateBandwidthRateLimit -> UpdateBandwidthRateLimit -> Bool)
-> Eq UpdateBandwidthRateLimit
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateBandwidthRateLimit -> UpdateBandwidthRateLimit -> Bool
$c/= :: UpdateBandwidthRateLimit -> UpdateBandwidthRateLimit -> Bool
== :: UpdateBandwidthRateLimit -> UpdateBandwidthRateLimit -> Bool
$c== :: UpdateBandwidthRateLimit -> UpdateBandwidthRateLimit -> Bool
Prelude.Eq, ReadPrec [UpdateBandwidthRateLimit]
ReadPrec UpdateBandwidthRateLimit
Int -> ReadS UpdateBandwidthRateLimit
ReadS [UpdateBandwidthRateLimit]
(Int -> ReadS UpdateBandwidthRateLimit)
-> ReadS [UpdateBandwidthRateLimit]
-> ReadPrec UpdateBandwidthRateLimit
-> ReadPrec [UpdateBandwidthRateLimit]
-> Read UpdateBandwidthRateLimit
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateBandwidthRateLimit]
$creadListPrec :: ReadPrec [UpdateBandwidthRateLimit]
readPrec :: ReadPrec UpdateBandwidthRateLimit
$creadPrec :: ReadPrec UpdateBandwidthRateLimit
readList :: ReadS [UpdateBandwidthRateLimit]
$creadList :: ReadS [UpdateBandwidthRateLimit]
readsPrec :: Int -> ReadS UpdateBandwidthRateLimit
$creadsPrec :: Int -> ReadS UpdateBandwidthRateLimit
Prelude.Read, Int -> UpdateBandwidthRateLimit -> ShowS
[UpdateBandwidthRateLimit] -> ShowS
UpdateBandwidthRateLimit -> String
(Int -> UpdateBandwidthRateLimit -> ShowS)
-> (UpdateBandwidthRateLimit -> String)
-> ([UpdateBandwidthRateLimit] -> ShowS)
-> Show UpdateBandwidthRateLimit
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateBandwidthRateLimit] -> ShowS
$cshowList :: [UpdateBandwidthRateLimit] -> ShowS
show :: UpdateBandwidthRateLimit -> String
$cshow :: UpdateBandwidthRateLimit -> String
showsPrec :: Int -> UpdateBandwidthRateLimit -> ShowS
$cshowsPrec :: Int -> UpdateBandwidthRateLimit -> ShowS
Prelude.Show, (forall x.
 UpdateBandwidthRateLimit -> Rep UpdateBandwidthRateLimit x)
-> (forall x.
    Rep UpdateBandwidthRateLimit x -> UpdateBandwidthRateLimit)
-> Generic UpdateBandwidthRateLimit
forall x.
Rep UpdateBandwidthRateLimit x -> UpdateBandwidthRateLimit
forall x.
UpdateBandwidthRateLimit -> Rep UpdateBandwidthRateLimit x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateBandwidthRateLimit x -> UpdateBandwidthRateLimit
$cfrom :: forall x.
UpdateBandwidthRateLimit -> Rep UpdateBandwidthRateLimit x
Prelude.Generic)

-- |
-- Create a value of 'UpdateBandwidthRateLimit' 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:
--
-- 'averageUploadRateLimitInBitsPerSec', 'updateBandwidthRateLimit_averageUploadRateLimitInBitsPerSec' - The average upload bandwidth rate limit in bits per second.
--
-- 'averageDownloadRateLimitInBitsPerSec', 'updateBandwidthRateLimit_averageDownloadRateLimitInBitsPerSec' - The average download bandwidth rate limit in bits per second.
--
-- 'gatewayARN', 'updateBandwidthRateLimit_gatewayARN' - Undocumented member.
newUpdateBandwidthRateLimit ::
  -- | 'gatewayARN'
  Prelude.Text ->
  UpdateBandwidthRateLimit
newUpdateBandwidthRateLimit :: Text -> UpdateBandwidthRateLimit
newUpdateBandwidthRateLimit Text
pGatewayARN_ =
  UpdateBandwidthRateLimit' :: Maybe Natural -> Maybe Natural -> Text -> UpdateBandwidthRateLimit
UpdateBandwidthRateLimit'
    { $sel:averageUploadRateLimitInBitsPerSec:UpdateBandwidthRateLimit' :: Maybe Natural
averageUploadRateLimitInBitsPerSec =
        Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:averageDownloadRateLimitInBitsPerSec:UpdateBandwidthRateLimit' :: Maybe Natural
averageDownloadRateLimitInBitsPerSec =
        Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:gatewayARN:UpdateBandwidthRateLimit' :: Text
gatewayARN = Text
pGatewayARN_
    }

-- | The average upload bandwidth rate limit in bits per second.
updateBandwidthRateLimit_averageUploadRateLimitInBitsPerSec :: Lens.Lens' UpdateBandwidthRateLimit (Prelude.Maybe Prelude.Natural)
updateBandwidthRateLimit_averageUploadRateLimitInBitsPerSec :: (Maybe Natural -> f (Maybe Natural))
-> UpdateBandwidthRateLimit -> f UpdateBandwidthRateLimit
updateBandwidthRateLimit_averageUploadRateLimitInBitsPerSec = (UpdateBandwidthRateLimit -> Maybe Natural)
-> (UpdateBandwidthRateLimit
    -> Maybe Natural -> UpdateBandwidthRateLimit)
-> Lens
     UpdateBandwidthRateLimit
     UpdateBandwidthRateLimit
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBandwidthRateLimit' {Maybe Natural
averageUploadRateLimitInBitsPerSec :: Maybe Natural
$sel:averageUploadRateLimitInBitsPerSec:UpdateBandwidthRateLimit' :: UpdateBandwidthRateLimit -> Maybe Natural
averageUploadRateLimitInBitsPerSec} -> Maybe Natural
averageUploadRateLimitInBitsPerSec) (\s :: UpdateBandwidthRateLimit
s@UpdateBandwidthRateLimit' {} Maybe Natural
a -> UpdateBandwidthRateLimit
s {$sel:averageUploadRateLimitInBitsPerSec:UpdateBandwidthRateLimit' :: Maybe Natural
averageUploadRateLimitInBitsPerSec = Maybe Natural
a} :: UpdateBandwidthRateLimit)

-- | The average download bandwidth rate limit in bits per second.
updateBandwidthRateLimit_averageDownloadRateLimitInBitsPerSec :: Lens.Lens' UpdateBandwidthRateLimit (Prelude.Maybe Prelude.Natural)
updateBandwidthRateLimit_averageDownloadRateLimitInBitsPerSec :: (Maybe Natural -> f (Maybe Natural))
-> UpdateBandwidthRateLimit -> f UpdateBandwidthRateLimit
updateBandwidthRateLimit_averageDownloadRateLimitInBitsPerSec = (UpdateBandwidthRateLimit -> Maybe Natural)
-> (UpdateBandwidthRateLimit
    -> Maybe Natural -> UpdateBandwidthRateLimit)
-> Lens
     UpdateBandwidthRateLimit
     UpdateBandwidthRateLimit
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBandwidthRateLimit' {Maybe Natural
averageDownloadRateLimitInBitsPerSec :: Maybe Natural
$sel:averageDownloadRateLimitInBitsPerSec:UpdateBandwidthRateLimit' :: UpdateBandwidthRateLimit -> Maybe Natural
averageDownloadRateLimitInBitsPerSec} -> Maybe Natural
averageDownloadRateLimitInBitsPerSec) (\s :: UpdateBandwidthRateLimit
s@UpdateBandwidthRateLimit' {} Maybe Natural
a -> UpdateBandwidthRateLimit
s {$sel:averageDownloadRateLimitInBitsPerSec:UpdateBandwidthRateLimit' :: Maybe Natural
averageDownloadRateLimitInBitsPerSec = Maybe Natural
a} :: UpdateBandwidthRateLimit)

-- | Undocumented member.
updateBandwidthRateLimit_gatewayARN :: Lens.Lens' UpdateBandwidthRateLimit Prelude.Text
updateBandwidthRateLimit_gatewayARN :: (Text -> f Text)
-> UpdateBandwidthRateLimit -> f UpdateBandwidthRateLimit
updateBandwidthRateLimit_gatewayARN = (UpdateBandwidthRateLimit -> Text)
-> (UpdateBandwidthRateLimit -> Text -> UpdateBandwidthRateLimit)
-> Lens UpdateBandwidthRateLimit UpdateBandwidthRateLimit Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBandwidthRateLimit' {Text
gatewayARN :: Text
$sel:gatewayARN:UpdateBandwidthRateLimit' :: UpdateBandwidthRateLimit -> Text
gatewayARN} -> Text
gatewayARN) (\s :: UpdateBandwidthRateLimit
s@UpdateBandwidthRateLimit' {} Text
a -> UpdateBandwidthRateLimit
s {$sel:gatewayARN:UpdateBandwidthRateLimit' :: Text
gatewayARN = Text
a} :: UpdateBandwidthRateLimit)

instance Core.AWSRequest UpdateBandwidthRateLimit where
  type
    AWSResponse UpdateBandwidthRateLimit =
      UpdateBandwidthRateLimitResponse
  request :: UpdateBandwidthRateLimit -> Request UpdateBandwidthRateLimit
request = Service
-> UpdateBandwidthRateLimit -> Request UpdateBandwidthRateLimit
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateBandwidthRateLimit
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateBandwidthRateLimit)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateBandwidthRateLimit))
-> Logger
-> Service
-> Proxy UpdateBandwidthRateLimit
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateBandwidthRateLimit)))
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 Text -> Int -> UpdateBandwidthRateLimitResponse
UpdateBandwidthRateLimitResponse'
            (Maybe Text -> Int -> UpdateBandwidthRateLimitResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdateBandwidthRateLimitResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"GatewayARN")
            Either String (Int -> UpdateBandwidthRateLimitResponse)
-> Either String Int
-> Either String UpdateBandwidthRateLimitResponse
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 UpdateBandwidthRateLimit

instance Prelude.NFData UpdateBandwidthRateLimit

instance Core.ToHeaders UpdateBandwidthRateLimit where
  toHeaders :: UpdateBandwidthRateLimit -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateBandwidthRateLimit -> 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
"StorageGateway_20130630.UpdateBandwidthRateLimit" ::
                          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 UpdateBandwidthRateLimit where
  toJSON :: UpdateBandwidthRateLimit -> Value
toJSON UpdateBandwidthRateLimit' {Maybe Natural
Text
gatewayARN :: Text
averageDownloadRateLimitInBitsPerSec :: Maybe Natural
averageUploadRateLimitInBitsPerSec :: Maybe Natural
$sel:gatewayARN:UpdateBandwidthRateLimit' :: UpdateBandwidthRateLimit -> Text
$sel:averageDownloadRateLimitInBitsPerSec:UpdateBandwidthRateLimit' :: UpdateBandwidthRateLimit -> Maybe Natural
$sel:averageUploadRateLimitInBitsPerSec:UpdateBandwidthRateLimit' :: UpdateBandwidthRateLimit -> Maybe Natural
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"AverageUploadRateLimitInBitsPerSec" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
averageUploadRateLimitInBitsPerSec,
            (Text
"AverageDownloadRateLimitInBitsPerSec" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
averageDownloadRateLimitInBitsPerSec,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"GatewayARN" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
gatewayARN)
          ]
      )

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

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

-- | A JSON object containing the Amazon Resource Name (ARN) of the gateway
-- whose throttle information was updated.
--
-- /See:/ 'newUpdateBandwidthRateLimitResponse' smart constructor.
data UpdateBandwidthRateLimitResponse = UpdateBandwidthRateLimitResponse'
  { UpdateBandwidthRateLimitResponse -> Maybe Text
gatewayARN :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdateBandwidthRateLimitResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateBandwidthRateLimitResponse
-> UpdateBandwidthRateLimitResponse -> Bool
(UpdateBandwidthRateLimitResponse
 -> UpdateBandwidthRateLimitResponse -> Bool)
-> (UpdateBandwidthRateLimitResponse
    -> UpdateBandwidthRateLimitResponse -> Bool)
-> Eq UpdateBandwidthRateLimitResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateBandwidthRateLimitResponse
-> UpdateBandwidthRateLimitResponse -> Bool
$c/= :: UpdateBandwidthRateLimitResponse
-> UpdateBandwidthRateLimitResponse -> Bool
== :: UpdateBandwidthRateLimitResponse
-> UpdateBandwidthRateLimitResponse -> Bool
$c== :: UpdateBandwidthRateLimitResponse
-> UpdateBandwidthRateLimitResponse -> Bool
Prelude.Eq, ReadPrec [UpdateBandwidthRateLimitResponse]
ReadPrec UpdateBandwidthRateLimitResponse
Int -> ReadS UpdateBandwidthRateLimitResponse
ReadS [UpdateBandwidthRateLimitResponse]
(Int -> ReadS UpdateBandwidthRateLimitResponse)
-> ReadS [UpdateBandwidthRateLimitResponse]
-> ReadPrec UpdateBandwidthRateLimitResponse
-> ReadPrec [UpdateBandwidthRateLimitResponse]
-> Read UpdateBandwidthRateLimitResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateBandwidthRateLimitResponse]
$creadListPrec :: ReadPrec [UpdateBandwidthRateLimitResponse]
readPrec :: ReadPrec UpdateBandwidthRateLimitResponse
$creadPrec :: ReadPrec UpdateBandwidthRateLimitResponse
readList :: ReadS [UpdateBandwidthRateLimitResponse]
$creadList :: ReadS [UpdateBandwidthRateLimitResponse]
readsPrec :: Int -> ReadS UpdateBandwidthRateLimitResponse
$creadsPrec :: Int -> ReadS UpdateBandwidthRateLimitResponse
Prelude.Read, Int -> UpdateBandwidthRateLimitResponse -> ShowS
[UpdateBandwidthRateLimitResponse] -> ShowS
UpdateBandwidthRateLimitResponse -> String
(Int -> UpdateBandwidthRateLimitResponse -> ShowS)
-> (UpdateBandwidthRateLimitResponse -> String)
-> ([UpdateBandwidthRateLimitResponse] -> ShowS)
-> Show UpdateBandwidthRateLimitResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateBandwidthRateLimitResponse] -> ShowS
$cshowList :: [UpdateBandwidthRateLimitResponse] -> ShowS
show :: UpdateBandwidthRateLimitResponse -> String
$cshow :: UpdateBandwidthRateLimitResponse -> String
showsPrec :: Int -> UpdateBandwidthRateLimitResponse -> ShowS
$cshowsPrec :: Int -> UpdateBandwidthRateLimitResponse -> ShowS
Prelude.Show, (forall x.
 UpdateBandwidthRateLimitResponse
 -> Rep UpdateBandwidthRateLimitResponse x)
-> (forall x.
    Rep UpdateBandwidthRateLimitResponse x
    -> UpdateBandwidthRateLimitResponse)
-> Generic UpdateBandwidthRateLimitResponse
forall x.
Rep UpdateBandwidthRateLimitResponse x
-> UpdateBandwidthRateLimitResponse
forall x.
UpdateBandwidthRateLimitResponse
-> Rep UpdateBandwidthRateLimitResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateBandwidthRateLimitResponse x
-> UpdateBandwidthRateLimitResponse
$cfrom :: forall x.
UpdateBandwidthRateLimitResponse
-> Rep UpdateBandwidthRateLimitResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateBandwidthRateLimitResponse' 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:
--
-- 'gatewayARN', 'updateBandwidthRateLimitResponse_gatewayARN' - Undocumented member.
--
-- 'httpStatus', 'updateBandwidthRateLimitResponse_httpStatus' - The response's http status code.
newUpdateBandwidthRateLimitResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateBandwidthRateLimitResponse
newUpdateBandwidthRateLimitResponse :: Int -> UpdateBandwidthRateLimitResponse
newUpdateBandwidthRateLimitResponse Int
pHttpStatus_ =
  UpdateBandwidthRateLimitResponse' :: Maybe Text -> Int -> UpdateBandwidthRateLimitResponse
UpdateBandwidthRateLimitResponse'
    { $sel:gatewayARN:UpdateBandwidthRateLimitResponse' :: Maybe Text
gatewayARN =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateBandwidthRateLimitResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
updateBandwidthRateLimitResponse_gatewayARN :: Lens.Lens' UpdateBandwidthRateLimitResponse (Prelude.Maybe Prelude.Text)
updateBandwidthRateLimitResponse_gatewayARN :: (Maybe Text -> f (Maybe Text))
-> UpdateBandwidthRateLimitResponse
-> f UpdateBandwidthRateLimitResponse
updateBandwidthRateLimitResponse_gatewayARN = (UpdateBandwidthRateLimitResponse -> Maybe Text)
-> (UpdateBandwidthRateLimitResponse
    -> Maybe Text -> UpdateBandwidthRateLimitResponse)
-> Lens
     UpdateBandwidthRateLimitResponse
     UpdateBandwidthRateLimitResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBandwidthRateLimitResponse' {Maybe Text
gatewayARN :: Maybe Text
$sel:gatewayARN:UpdateBandwidthRateLimitResponse' :: UpdateBandwidthRateLimitResponse -> Maybe Text
gatewayARN} -> Maybe Text
gatewayARN) (\s :: UpdateBandwidthRateLimitResponse
s@UpdateBandwidthRateLimitResponse' {} Maybe Text
a -> UpdateBandwidthRateLimitResponse
s {$sel:gatewayARN:UpdateBandwidthRateLimitResponse' :: Maybe Text
gatewayARN = Maybe Text
a} :: UpdateBandwidthRateLimitResponse)

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

instance
  Prelude.NFData
    UpdateBandwidthRateLimitResponse