{-# 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.S3.GetBucketAccelerateConfiguration
-- 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)
--
-- This implementation of the GET action uses the @accelerate@ subresource
-- to return the Transfer Acceleration state of a bucket, which is either
-- @Enabled@ or @Suspended@. Amazon S3 Transfer Acceleration is a
-- bucket-level feature that enables you to perform faster data transfers
-- to and from Amazon S3.
--
-- To use this operation, you must have permission to perform the
-- @s3:GetAccelerateConfiguration@ action. The bucket owner has this
-- permission by default. The bucket owner can grant this permission to
-- others. For more information about permissions, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources Permissions Related to Bucket Subresource Operations>
-- and
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html Managing Access Permissions to your Amazon S3 Resources>
-- in the /Amazon S3 User Guide/.
--
-- You set the Transfer Acceleration state of an existing bucket to
-- @Enabled@ or @Suspended@ by using the
-- <https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAccelerateConfiguration.html PutBucketAccelerateConfiguration>
-- operation.
--
-- A GET @accelerate@ request does not return a state value for a bucket
-- that has no transfer acceleration state. A bucket has no Transfer
-- Acceleration state if a state has never been set on the bucket.
--
-- For more information about transfer acceleration, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html Transfer Acceleration>
-- in the Amazon S3 User Guide.
--
-- __Related Resources__
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAccelerateConfiguration.html PutBucketAccelerateConfiguration>
module Amazonka.S3.GetBucketAccelerateConfiguration
  ( -- * Creating a Request
    GetBucketAccelerateConfiguration (..),
    newGetBucketAccelerateConfiguration,

    -- * Request Lenses
    getBucketAccelerateConfiguration_expectedBucketOwner,
    getBucketAccelerateConfiguration_bucket,

    -- * Destructuring the Response
    GetBucketAccelerateConfigurationResponse (..),
    newGetBucketAccelerateConfigurationResponse,

    -- * Response Lenses
    getBucketAccelerateConfigurationResponse_status,
    getBucketAccelerateConfigurationResponse_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.S3.Types

-- | /See:/ 'newGetBucketAccelerateConfiguration' smart constructor.
data GetBucketAccelerateConfiguration = GetBucketAccelerateConfiguration'
  { -- | The account ID of the expected bucket owner. If the bucket is owned by a
    -- different account, the request will fail with an HTTP
    -- @403 (Access Denied)@ error.
    GetBucketAccelerateConfiguration -> Maybe Text
expectedBucketOwner :: Prelude.Maybe Prelude.Text,
    -- | The name of the bucket for which the accelerate configuration is
    -- retrieved.
    GetBucketAccelerateConfiguration -> BucketName
bucket :: BucketName
  }
  deriving (GetBucketAccelerateConfiguration
-> GetBucketAccelerateConfiguration -> Bool
(GetBucketAccelerateConfiguration
 -> GetBucketAccelerateConfiguration -> Bool)
-> (GetBucketAccelerateConfiguration
    -> GetBucketAccelerateConfiguration -> Bool)
-> Eq GetBucketAccelerateConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBucketAccelerateConfiguration
-> GetBucketAccelerateConfiguration -> Bool
$c/= :: GetBucketAccelerateConfiguration
-> GetBucketAccelerateConfiguration -> Bool
== :: GetBucketAccelerateConfiguration
-> GetBucketAccelerateConfiguration -> Bool
$c== :: GetBucketAccelerateConfiguration
-> GetBucketAccelerateConfiguration -> Bool
Prelude.Eq, ReadPrec [GetBucketAccelerateConfiguration]
ReadPrec GetBucketAccelerateConfiguration
Int -> ReadS GetBucketAccelerateConfiguration
ReadS [GetBucketAccelerateConfiguration]
(Int -> ReadS GetBucketAccelerateConfiguration)
-> ReadS [GetBucketAccelerateConfiguration]
-> ReadPrec GetBucketAccelerateConfiguration
-> ReadPrec [GetBucketAccelerateConfiguration]
-> Read GetBucketAccelerateConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetBucketAccelerateConfiguration]
$creadListPrec :: ReadPrec [GetBucketAccelerateConfiguration]
readPrec :: ReadPrec GetBucketAccelerateConfiguration
$creadPrec :: ReadPrec GetBucketAccelerateConfiguration
readList :: ReadS [GetBucketAccelerateConfiguration]
$creadList :: ReadS [GetBucketAccelerateConfiguration]
readsPrec :: Int -> ReadS GetBucketAccelerateConfiguration
$creadsPrec :: Int -> ReadS GetBucketAccelerateConfiguration
Prelude.Read, Int -> GetBucketAccelerateConfiguration -> ShowS
[GetBucketAccelerateConfiguration] -> ShowS
GetBucketAccelerateConfiguration -> String
(Int -> GetBucketAccelerateConfiguration -> ShowS)
-> (GetBucketAccelerateConfiguration -> String)
-> ([GetBucketAccelerateConfiguration] -> ShowS)
-> Show GetBucketAccelerateConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBucketAccelerateConfiguration] -> ShowS
$cshowList :: [GetBucketAccelerateConfiguration] -> ShowS
show :: GetBucketAccelerateConfiguration -> String
$cshow :: GetBucketAccelerateConfiguration -> String
showsPrec :: Int -> GetBucketAccelerateConfiguration -> ShowS
$cshowsPrec :: Int -> GetBucketAccelerateConfiguration -> ShowS
Prelude.Show, (forall x.
 GetBucketAccelerateConfiguration
 -> Rep GetBucketAccelerateConfiguration x)
-> (forall x.
    Rep GetBucketAccelerateConfiguration x
    -> GetBucketAccelerateConfiguration)
-> Generic GetBucketAccelerateConfiguration
forall x.
Rep GetBucketAccelerateConfiguration x
-> GetBucketAccelerateConfiguration
forall x.
GetBucketAccelerateConfiguration
-> Rep GetBucketAccelerateConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetBucketAccelerateConfiguration x
-> GetBucketAccelerateConfiguration
$cfrom :: forall x.
GetBucketAccelerateConfiguration
-> Rep GetBucketAccelerateConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'GetBucketAccelerateConfiguration' 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:
--
-- 'expectedBucketOwner', 'getBucketAccelerateConfiguration_expectedBucketOwner' - The account ID of the expected bucket owner. If the bucket is owned by a
-- different account, the request will fail with an HTTP
-- @403 (Access Denied)@ error.
--
-- 'bucket', 'getBucketAccelerateConfiguration_bucket' - The name of the bucket for which the accelerate configuration is
-- retrieved.
newGetBucketAccelerateConfiguration ::
  -- | 'bucket'
  BucketName ->
  GetBucketAccelerateConfiguration
newGetBucketAccelerateConfiguration :: BucketName -> GetBucketAccelerateConfiguration
newGetBucketAccelerateConfiguration BucketName
pBucket_ =
  GetBucketAccelerateConfiguration' :: Maybe Text -> BucketName -> GetBucketAccelerateConfiguration
GetBucketAccelerateConfiguration'
    { $sel:expectedBucketOwner:GetBucketAccelerateConfiguration' :: Maybe Text
expectedBucketOwner =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:bucket:GetBucketAccelerateConfiguration' :: BucketName
bucket = BucketName
pBucket_
    }

-- | The account ID of the expected bucket owner. If the bucket is owned by a
-- different account, the request will fail with an HTTP
-- @403 (Access Denied)@ error.
getBucketAccelerateConfiguration_expectedBucketOwner :: Lens.Lens' GetBucketAccelerateConfiguration (Prelude.Maybe Prelude.Text)
getBucketAccelerateConfiguration_expectedBucketOwner :: (Maybe Text -> f (Maybe Text))
-> GetBucketAccelerateConfiguration
-> f GetBucketAccelerateConfiguration
getBucketAccelerateConfiguration_expectedBucketOwner = (GetBucketAccelerateConfiguration -> Maybe Text)
-> (GetBucketAccelerateConfiguration
    -> Maybe Text -> GetBucketAccelerateConfiguration)
-> Lens
     GetBucketAccelerateConfiguration
     GetBucketAccelerateConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBucketAccelerateConfiguration' {Maybe Text
expectedBucketOwner :: Maybe Text
$sel:expectedBucketOwner:GetBucketAccelerateConfiguration' :: GetBucketAccelerateConfiguration -> Maybe Text
expectedBucketOwner} -> Maybe Text
expectedBucketOwner) (\s :: GetBucketAccelerateConfiguration
s@GetBucketAccelerateConfiguration' {} Maybe Text
a -> GetBucketAccelerateConfiguration
s {$sel:expectedBucketOwner:GetBucketAccelerateConfiguration' :: Maybe Text
expectedBucketOwner = Maybe Text
a} :: GetBucketAccelerateConfiguration)

-- | The name of the bucket for which the accelerate configuration is
-- retrieved.
getBucketAccelerateConfiguration_bucket :: Lens.Lens' GetBucketAccelerateConfiguration BucketName
getBucketAccelerateConfiguration_bucket :: (BucketName -> f BucketName)
-> GetBucketAccelerateConfiguration
-> f GetBucketAccelerateConfiguration
getBucketAccelerateConfiguration_bucket = (GetBucketAccelerateConfiguration -> BucketName)
-> (GetBucketAccelerateConfiguration
    -> BucketName -> GetBucketAccelerateConfiguration)
-> Lens
     GetBucketAccelerateConfiguration
     GetBucketAccelerateConfiguration
     BucketName
     BucketName
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBucketAccelerateConfiguration' {BucketName
bucket :: BucketName
$sel:bucket:GetBucketAccelerateConfiguration' :: GetBucketAccelerateConfiguration -> BucketName
bucket} -> BucketName
bucket) (\s :: GetBucketAccelerateConfiguration
s@GetBucketAccelerateConfiguration' {} BucketName
a -> GetBucketAccelerateConfiguration
s {$sel:bucket:GetBucketAccelerateConfiguration' :: BucketName
bucket = BucketName
a} :: GetBucketAccelerateConfiguration)

instance
  Core.AWSRequest
    GetBucketAccelerateConfiguration
  where
  type
    AWSResponse GetBucketAccelerateConfiguration =
      GetBucketAccelerateConfigurationResponse
  request :: GetBucketAccelerateConfiguration
-> Request GetBucketAccelerateConfiguration
request =
    Request GetBucketAccelerateConfiguration
-> Request GetBucketAccelerateConfiguration
forall a. Request a -> Request a
Request.s3vhost
      (Request GetBucketAccelerateConfiguration
 -> Request GetBucketAccelerateConfiguration)
-> (GetBucketAccelerateConfiguration
    -> Request GetBucketAccelerateConfiguration)
-> GetBucketAccelerateConfiguration
-> Request GetBucketAccelerateConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Service
-> GetBucketAccelerateConfiguration
-> Request GetBucketAccelerateConfiguration
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetBucketAccelerateConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse GetBucketAccelerateConfiguration)))
response =
    (Int
 -> ResponseHeaders
 -> [Node]
 -> Either String (AWSResponse GetBucketAccelerateConfiguration))
-> Logger
-> Service
-> Proxy GetBucketAccelerateConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse GetBucketAccelerateConfiguration)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe BucketAccelerateStatus
-> Int -> GetBucketAccelerateConfigurationResponse
GetBucketAccelerateConfigurationResponse'
            (Maybe BucketAccelerateStatus
 -> Int -> GetBucketAccelerateConfigurationResponse)
-> Either String (Maybe BucketAccelerateStatus)
-> Either String (Int -> GetBucketAccelerateConfigurationResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe BucketAccelerateStatus)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Status")
            Either String (Int -> GetBucketAccelerateConfigurationResponse)
-> Either String Int
-> Either String GetBucketAccelerateConfigurationResponse
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
    GetBucketAccelerateConfiguration

instance
  Prelude.NFData
    GetBucketAccelerateConfiguration

instance
  Core.ToHeaders
    GetBucketAccelerateConfiguration
  where
  toHeaders :: GetBucketAccelerateConfiguration -> ResponseHeaders
toHeaders GetBucketAccelerateConfiguration' {Maybe Text
BucketName
bucket :: BucketName
expectedBucketOwner :: Maybe Text
$sel:bucket:GetBucketAccelerateConfiguration' :: GetBucketAccelerateConfiguration -> BucketName
$sel:expectedBucketOwner:GetBucketAccelerateConfiguration' :: GetBucketAccelerateConfiguration -> Maybe Text
..} =
    [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ HeaderName
"x-amz-expected-bucket-owner"
          HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
expectedBucketOwner
      ]

instance Core.ToPath GetBucketAccelerateConfiguration where
  toPath :: GetBucketAccelerateConfiguration -> ByteString
toPath GetBucketAccelerateConfiguration' {Maybe Text
BucketName
bucket :: BucketName
expectedBucketOwner :: Maybe Text
$sel:bucket:GetBucketAccelerateConfiguration' :: GetBucketAccelerateConfiguration -> BucketName
$sel:expectedBucketOwner:GetBucketAccelerateConfiguration' :: GetBucketAccelerateConfiguration -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"/", BucketName -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS BucketName
bucket]

instance
  Core.ToQuery
    GetBucketAccelerateConfiguration
  where
  toQuery :: GetBucketAccelerateConfiguration -> QueryString
toQuery =
    QueryString -> GetBucketAccelerateConfiguration -> QueryString
forall a b. a -> b -> a
Prelude.const ([QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat [QueryString
"accelerate"])

-- | /See:/ 'newGetBucketAccelerateConfigurationResponse' smart constructor.
data GetBucketAccelerateConfigurationResponse = GetBucketAccelerateConfigurationResponse'
  { -- | The accelerate configuration of the bucket.
    GetBucketAccelerateConfigurationResponse
-> Maybe BucketAccelerateStatus
status :: Prelude.Maybe BucketAccelerateStatus,
    -- | The response's http status code.
    GetBucketAccelerateConfigurationResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetBucketAccelerateConfigurationResponse
-> GetBucketAccelerateConfigurationResponse -> Bool
(GetBucketAccelerateConfigurationResponse
 -> GetBucketAccelerateConfigurationResponse -> Bool)
-> (GetBucketAccelerateConfigurationResponse
    -> GetBucketAccelerateConfigurationResponse -> Bool)
-> Eq GetBucketAccelerateConfigurationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBucketAccelerateConfigurationResponse
-> GetBucketAccelerateConfigurationResponse -> Bool
$c/= :: GetBucketAccelerateConfigurationResponse
-> GetBucketAccelerateConfigurationResponse -> Bool
== :: GetBucketAccelerateConfigurationResponse
-> GetBucketAccelerateConfigurationResponse -> Bool
$c== :: GetBucketAccelerateConfigurationResponse
-> GetBucketAccelerateConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [GetBucketAccelerateConfigurationResponse]
ReadPrec GetBucketAccelerateConfigurationResponse
Int -> ReadS GetBucketAccelerateConfigurationResponse
ReadS [GetBucketAccelerateConfigurationResponse]
(Int -> ReadS GetBucketAccelerateConfigurationResponse)
-> ReadS [GetBucketAccelerateConfigurationResponse]
-> ReadPrec GetBucketAccelerateConfigurationResponse
-> ReadPrec [GetBucketAccelerateConfigurationResponse]
-> Read GetBucketAccelerateConfigurationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetBucketAccelerateConfigurationResponse]
$creadListPrec :: ReadPrec [GetBucketAccelerateConfigurationResponse]
readPrec :: ReadPrec GetBucketAccelerateConfigurationResponse
$creadPrec :: ReadPrec GetBucketAccelerateConfigurationResponse
readList :: ReadS [GetBucketAccelerateConfigurationResponse]
$creadList :: ReadS [GetBucketAccelerateConfigurationResponse]
readsPrec :: Int -> ReadS GetBucketAccelerateConfigurationResponse
$creadsPrec :: Int -> ReadS GetBucketAccelerateConfigurationResponse
Prelude.Read, Int -> GetBucketAccelerateConfigurationResponse -> ShowS
[GetBucketAccelerateConfigurationResponse] -> ShowS
GetBucketAccelerateConfigurationResponse -> String
(Int -> GetBucketAccelerateConfigurationResponse -> ShowS)
-> (GetBucketAccelerateConfigurationResponse -> String)
-> ([GetBucketAccelerateConfigurationResponse] -> ShowS)
-> Show GetBucketAccelerateConfigurationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBucketAccelerateConfigurationResponse] -> ShowS
$cshowList :: [GetBucketAccelerateConfigurationResponse] -> ShowS
show :: GetBucketAccelerateConfigurationResponse -> String
$cshow :: GetBucketAccelerateConfigurationResponse -> String
showsPrec :: Int -> GetBucketAccelerateConfigurationResponse -> ShowS
$cshowsPrec :: Int -> GetBucketAccelerateConfigurationResponse -> ShowS
Prelude.Show, (forall x.
 GetBucketAccelerateConfigurationResponse
 -> Rep GetBucketAccelerateConfigurationResponse x)
-> (forall x.
    Rep GetBucketAccelerateConfigurationResponse x
    -> GetBucketAccelerateConfigurationResponse)
-> Generic GetBucketAccelerateConfigurationResponse
forall x.
Rep GetBucketAccelerateConfigurationResponse x
-> GetBucketAccelerateConfigurationResponse
forall x.
GetBucketAccelerateConfigurationResponse
-> Rep GetBucketAccelerateConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetBucketAccelerateConfigurationResponse x
-> GetBucketAccelerateConfigurationResponse
$cfrom :: forall x.
GetBucketAccelerateConfigurationResponse
-> Rep GetBucketAccelerateConfigurationResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetBucketAccelerateConfigurationResponse' 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:
--
-- 'status', 'getBucketAccelerateConfigurationResponse_status' - The accelerate configuration of the bucket.
--
-- 'httpStatus', 'getBucketAccelerateConfigurationResponse_httpStatus' - The response's http status code.
newGetBucketAccelerateConfigurationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetBucketAccelerateConfigurationResponse
newGetBucketAccelerateConfigurationResponse :: Int -> GetBucketAccelerateConfigurationResponse
newGetBucketAccelerateConfigurationResponse
  Int
pHttpStatus_ =
    GetBucketAccelerateConfigurationResponse' :: Maybe BucketAccelerateStatus
-> Int -> GetBucketAccelerateConfigurationResponse
GetBucketAccelerateConfigurationResponse'
      { $sel:status:GetBucketAccelerateConfigurationResponse' :: Maybe BucketAccelerateStatus
status =
          Maybe BucketAccelerateStatus
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:GetBucketAccelerateConfigurationResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The accelerate configuration of the bucket.
getBucketAccelerateConfigurationResponse_status :: Lens.Lens' GetBucketAccelerateConfigurationResponse (Prelude.Maybe BucketAccelerateStatus)
getBucketAccelerateConfigurationResponse_status :: (Maybe BucketAccelerateStatus -> f (Maybe BucketAccelerateStatus))
-> GetBucketAccelerateConfigurationResponse
-> f GetBucketAccelerateConfigurationResponse
getBucketAccelerateConfigurationResponse_status = (GetBucketAccelerateConfigurationResponse
 -> Maybe BucketAccelerateStatus)
-> (GetBucketAccelerateConfigurationResponse
    -> Maybe BucketAccelerateStatus
    -> GetBucketAccelerateConfigurationResponse)
-> Lens
     GetBucketAccelerateConfigurationResponse
     GetBucketAccelerateConfigurationResponse
     (Maybe BucketAccelerateStatus)
     (Maybe BucketAccelerateStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBucketAccelerateConfigurationResponse' {Maybe BucketAccelerateStatus
status :: Maybe BucketAccelerateStatus
$sel:status:GetBucketAccelerateConfigurationResponse' :: GetBucketAccelerateConfigurationResponse
-> Maybe BucketAccelerateStatus
status} -> Maybe BucketAccelerateStatus
status) (\s :: GetBucketAccelerateConfigurationResponse
s@GetBucketAccelerateConfigurationResponse' {} Maybe BucketAccelerateStatus
a -> GetBucketAccelerateConfigurationResponse
s {$sel:status:GetBucketAccelerateConfigurationResponse' :: Maybe BucketAccelerateStatus
status = Maybe BucketAccelerateStatus
a} :: GetBucketAccelerateConfigurationResponse)

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

instance
  Prelude.NFData
    GetBucketAccelerateConfigurationResponse