{-# 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.GetBucketVersioning
-- 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)
--
-- Returns the versioning state of a bucket.
--
-- To retrieve the versioning state of a bucket, you must be the bucket
-- owner.
--
-- This implementation also returns the MFA Delete status of the versioning
-- state. If the MFA Delete status is @enabled@, the bucket owner must use
-- an authentication device to change the versioning state of the bucket.
--
-- The following operations are related to @GetBucketVersioning@:
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html GetObject>
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html PutObject>
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html DeleteObject>
module Amazonka.S3.GetBucketVersioning
  ( -- * Creating a Request
    GetBucketVersioning (..),
    newGetBucketVersioning,

    -- * Request Lenses
    getBucketVersioning_expectedBucketOwner,
    getBucketVersioning_bucket,

    -- * Destructuring the Response
    GetBucketVersioningResponse (..),
    newGetBucketVersioningResponse,

    -- * Response Lenses
    getBucketVersioningResponse_status,
    getBucketVersioningResponse_mfaDelete,
    getBucketVersioningResponse_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:/ 'newGetBucketVersioning' smart constructor.
data GetBucketVersioning = GetBucketVersioning'
  { -- | 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.
    GetBucketVersioning -> Maybe Text
expectedBucketOwner :: Prelude.Maybe Prelude.Text,
    -- | The name of the bucket for which to get the versioning information.
    GetBucketVersioning -> BucketName
bucket :: BucketName
  }
  deriving (GetBucketVersioning -> GetBucketVersioning -> Bool
(GetBucketVersioning -> GetBucketVersioning -> Bool)
-> (GetBucketVersioning -> GetBucketVersioning -> Bool)
-> Eq GetBucketVersioning
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBucketVersioning -> GetBucketVersioning -> Bool
$c/= :: GetBucketVersioning -> GetBucketVersioning -> Bool
== :: GetBucketVersioning -> GetBucketVersioning -> Bool
$c== :: GetBucketVersioning -> GetBucketVersioning -> Bool
Prelude.Eq, ReadPrec [GetBucketVersioning]
ReadPrec GetBucketVersioning
Int -> ReadS GetBucketVersioning
ReadS [GetBucketVersioning]
(Int -> ReadS GetBucketVersioning)
-> ReadS [GetBucketVersioning]
-> ReadPrec GetBucketVersioning
-> ReadPrec [GetBucketVersioning]
-> Read GetBucketVersioning
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetBucketVersioning]
$creadListPrec :: ReadPrec [GetBucketVersioning]
readPrec :: ReadPrec GetBucketVersioning
$creadPrec :: ReadPrec GetBucketVersioning
readList :: ReadS [GetBucketVersioning]
$creadList :: ReadS [GetBucketVersioning]
readsPrec :: Int -> ReadS GetBucketVersioning
$creadsPrec :: Int -> ReadS GetBucketVersioning
Prelude.Read, Int -> GetBucketVersioning -> ShowS
[GetBucketVersioning] -> ShowS
GetBucketVersioning -> String
(Int -> GetBucketVersioning -> ShowS)
-> (GetBucketVersioning -> String)
-> ([GetBucketVersioning] -> ShowS)
-> Show GetBucketVersioning
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBucketVersioning] -> ShowS
$cshowList :: [GetBucketVersioning] -> ShowS
show :: GetBucketVersioning -> String
$cshow :: GetBucketVersioning -> String
showsPrec :: Int -> GetBucketVersioning -> ShowS
$cshowsPrec :: Int -> GetBucketVersioning -> ShowS
Prelude.Show, (forall x. GetBucketVersioning -> Rep GetBucketVersioning x)
-> (forall x. Rep GetBucketVersioning x -> GetBucketVersioning)
-> Generic GetBucketVersioning
forall x. Rep GetBucketVersioning x -> GetBucketVersioning
forall x. GetBucketVersioning -> Rep GetBucketVersioning x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetBucketVersioning x -> GetBucketVersioning
$cfrom :: forall x. GetBucketVersioning -> Rep GetBucketVersioning x
Prelude.Generic)

-- |
-- Create a value of 'GetBucketVersioning' 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', 'getBucketVersioning_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', 'getBucketVersioning_bucket' - The name of the bucket for which to get the versioning information.
newGetBucketVersioning ::
  -- | 'bucket'
  BucketName ->
  GetBucketVersioning
newGetBucketVersioning :: BucketName -> GetBucketVersioning
newGetBucketVersioning BucketName
pBucket_ =
  GetBucketVersioning' :: Maybe Text -> BucketName -> GetBucketVersioning
GetBucketVersioning'
    { $sel:expectedBucketOwner:GetBucketVersioning' :: Maybe Text
expectedBucketOwner =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:bucket:GetBucketVersioning' :: 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.
getBucketVersioning_expectedBucketOwner :: Lens.Lens' GetBucketVersioning (Prelude.Maybe Prelude.Text)
getBucketVersioning_expectedBucketOwner :: (Maybe Text -> f (Maybe Text))
-> GetBucketVersioning -> f GetBucketVersioning
getBucketVersioning_expectedBucketOwner = (GetBucketVersioning -> Maybe Text)
-> (GetBucketVersioning -> Maybe Text -> GetBucketVersioning)
-> Lens
     GetBucketVersioning GetBucketVersioning (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBucketVersioning' {Maybe Text
expectedBucketOwner :: Maybe Text
$sel:expectedBucketOwner:GetBucketVersioning' :: GetBucketVersioning -> Maybe Text
expectedBucketOwner} -> Maybe Text
expectedBucketOwner) (\s :: GetBucketVersioning
s@GetBucketVersioning' {} Maybe Text
a -> GetBucketVersioning
s {$sel:expectedBucketOwner:GetBucketVersioning' :: Maybe Text
expectedBucketOwner = Maybe Text
a} :: GetBucketVersioning)

-- | The name of the bucket for which to get the versioning information.
getBucketVersioning_bucket :: Lens.Lens' GetBucketVersioning BucketName
getBucketVersioning_bucket :: (BucketName -> f BucketName)
-> GetBucketVersioning -> f GetBucketVersioning
getBucketVersioning_bucket = (GetBucketVersioning -> BucketName)
-> (GetBucketVersioning -> BucketName -> GetBucketVersioning)
-> Lens
     GetBucketVersioning GetBucketVersioning BucketName BucketName
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBucketVersioning' {BucketName
bucket :: BucketName
$sel:bucket:GetBucketVersioning' :: GetBucketVersioning -> BucketName
bucket} -> BucketName
bucket) (\s :: GetBucketVersioning
s@GetBucketVersioning' {} BucketName
a -> GetBucketVersioning
s {$sel:bucket:GetBucketVersioning' :: BucketName
bucket = BucketName
a} :: GetBucketVersioning)

instance Core.AWSRequest GetBucketVersioning where
  type
    AWSResponse GetBucketVersioning =
      GetBucketVersioningResponse
  request :: GetBucketVersioning -> Request GetBucketVersioning
request =
    Request GetBucketVersioning -> Request GetBucketVersioning
forall a. Request a -> Request a
Request.s3vhost
      (Request GetBucketVersioning -> Request GetBucketVersioning)
-> (GetBucketVersioning -> Request GetBucketVersioning)
-> GetBucketVersioning
-> Request GetBucketVersioning
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Service -> GetBucketVersioning -> Request GetBucketVersioning
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetBucketVersioning
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetBucketVersioning)))
response =
    (Int
 -> ResponseHeaders
 -> [Node]
 -> Either String (AWSResponse GetBucketVersioning))
-> Logger
-> Service
-> Proxy GetBucketVersioning
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetBucketVersioning)))
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 BucketVersioningStatus
-> Maybe MFADeleteStatus -> Int -> GetBucketVersioningResponse
GetBucketVersioningResponse'
            (Maybe BucketVersioningStatus
 -> Maybe MFADeleteStatus -> Int -> GetBucketVersioningResponse)
-> Either String (Maybe BucketVersioningStatus)
-> Either
     String
     (Maybe MFADeleteStatus -> Int -> GetBucketVersioningResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe BucketVersioningStatus)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Status")
            Either
  String
  (Maybe MFADeleteStatus -> Int -> GetBucketVersioningResponse)
-> Either String (Maybe MFADeleteStatus)
-> Either String (Int -> GetBucketVersioningResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe MFADeleteStatus)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"MfaDelete")
            Either String (Int -> GetBucketVersioningResponse)
-> Either String Int -> Either String GetBucketVersioningResponse
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 GetBucketVersioning

instance Prelude.NFData GetBucketVersioning

instance Core.ToHeaders GetBucketVersioning where
  toHeaders :: GetBucketVersioning -> ResponseHeaders
toHeaders GetBucketVersioning' {Maybe Text
BucketName
bucket :: BucketName
expectedBucketOwner :: Maybe Text
$sel:bucket:GetBucketVersioning' :: GetBucketVersioning -> BucketName
$sel:expectedBucketOwner:GetBucketVersioning' :: GetBucketVersioning -> 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 GetBucketVersioning where
  toPath :: GetBucketVersioning -> ByteString
toPath GetBucketVersioning' {Maybe Text
BucketName
bucket :: BucketName
expectedBucketOwner :: Maybe Text
$sel:bucket:GetBucketVersioning' :: GetBucketVersioning -> BucketName
$sel:expectedBucketOwner:GetBucketVersioning' :: GetBucketVersioning -> 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 GetBucketVersioning where
  toQuery :: GetBucketVersioning -> QueryString
toQuery =
    QueryString -> GetBucketVersioning -> QueryString
forall a b. a -> b -> a
Prelude.const ([QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat [QueryString
"versioning"])

-- | /See:/ 'newGetBucketVersioningResponse' smart constructor.
data GetBucketVersioningResponse = GetBucketVersioningResponse'
  { -- | The versioning state of the bucket.
    GetBucketVersioningResponse -> Maybe BucketVersioningStatus
status :: Prelude.Maybe BucketVersioningStatus,
    -- | Specifies whether MFA delete is enabled in the bucket versioning
    -- configuration. This element is only returned if the bucket has been
    -- configured with MFA delete. If the bucket has never been so configured,
    -- this element is not returned.
    GetBucketVersioningResponse -> Maybe MFADeleteStatus
mfaDelete :: Prelude.Maybe MFADeleteStatus,
    -- | The response's http status code.
    GetBucketVersioningResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetBucketVersioningResponse -> GetBucketVersioningResponse -> Bool
(GetBucketVersioningResponse
 -> GetBucketVersioningResponse -> Bool)
-> (GetBucketVersioningResponse
    -> GetBucketVersioningResponse -> Bool)
-> Eq GetBucketVersioningResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBucketVersioningResponse -> GetBucketVersioningResponse -> Bool
$c/= :: GetBucketVersioningResponse -> GetBucketVersioningResponse -> Bool
== :: GetBucketVersioningResponse -> GetBucketVersioningResponse -> Bool
$c== :: GetBucketVersioningResponse -> GetBucketVersioningResponse -> Bool
Prelude.Eq, ReadPrec [GetBucketVersioningResponse]
ReadPrec GetBucketVersioningResponse
Int -> ReadS GetBucketVersioningResponse
ReadS [GetBucketVersioningResponse]
(Int -> ReadS GetBucketVersioningResponse)
-> ReadS [GetBucketVersioningResponse]
-> ReadPrec GetBucketVersioningResponse
-> ReadPrec [GetBucketVersioningResponse]
-> Read GetBucketVersioningResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetBucketVersioningResponse]
$creadListPrec :: ReadPrec [GetBucketVersioningResponse]
readPrec :: ReadPrec GetBucketVersioningResponse
$creadPrec :: ReadPrec GetBucketVersioningResponse
readList :: ReadS [GetBucketVersioningResponse]
$creadList :: ReadS [GetBucketVersioningResponse]
readsPrec :: Int -> ReadS GetBucketVersioningResponse
$creadsPrec :: Int -> ReadS GetBucketVersioningResponse
Prelude.Read, Int -> GetBucketVersioningResponse -> ShowS
[GetBucketVersioningResponse] -> ShowS
GetBucketVersioningResponse -> String
(Int -> GetBucketVersioningResponse -> ShowS)
-> (GetBucketVersioningResponse -> String)
-> ([GetBucketVersioningResponse] -> ShowS)
-> Show GetBucketVersioningResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBucketVersioningResponse] -> ShowS
$cshowList :: [GetBucketVersioningResponse] -> ShowS
show :: GetBucketVersioningResponse -> String
$cshow :: GetBucketVersioningResponse -> String
showsPrec :: Int -> GetBucketVersioningResponse -> ShowS
$cshowsPrec :: Int -> GetBucketVersioningResponse -> ShowS
Prelude.Show, (forall x.
 GetBucketVersioningResponse -> Rep GetBucketVersioningResponse x)
-> (forall x.
    Rep GetBucketVersioningResponse x -> GetBucketVersioningResponse)
-> Generic GetBucketVersioningResponse
forall x.
Rep GetBucketVersioningResponse x -> GetBucketVersioningResponse
forall x.
GetBucketVersioningResponse -> Rep GetBucketVersioningResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetBucketVersioningResponse x -> GetBucketVersioningResponse
$cfrom :: forall x.
GetBucketVersioningResponse -> Rep GetBucketVersioningResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetBucketVersioningResponse' 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', 'getBucketVersioningResponse_status' - The versioning state of the bucket.
--
-- 'mfaDelete', 'getBucketVersioningResponse_mfaDelete' - Specifies whether MFA delete is enabled in the bucket versioning
-- configuration. This element is only returned if the bucket has been
-- configured with MFA delete. If the bucket has never been so configured,
-- this element is not returned.
--
-- 'httpStatus', 'getBucketVersioningResponse_httpStatus' - The response's http status code.
newGetBucketVersioningResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetBucketVersioningResponse
newGetBucketVersioningResponse :: Int -> GetBucketVersioningResponse
newGetBucketVersioningResponse Int
pHttpStatus_ =
  GetBucketVersioningResponse' :: Maybe BucketVersioningStatus
-> Maybe MFADeleteStatus -> Int -> GetBucketVersioningResponse
GetBucketVersioningResponse'
    { $sel:status:GetBucketVersioningResponse' :: Maybe BucketVersioningStatus
status =
        Maybe BucketVersioningStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:mfaDelete:GetBucketVersioningResponse' :: Maybe MFADeleteStatus
mfaDelete = Maybe MFADeleteStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetBucketVersioningResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The versioning state of the bucket.
getBucketVersioningResponse_status :: Lens.Lens' GetBucketVersioningResponse (Prelude.Maybe BucketVersioningStatus)
getBucketVersioningResponse_status :: (Maybe BucketVersioningStatus -> f (Maybe BucketVersioningStatus))
-> GetBucketVersioningResponse -> f GetBucketVersioningResponse
getBucketVersioningResponse_status = (GetBucketVersioningResponse -> Maybe BucketVersioningStatus)
-> (GetBucketVersioningResponse
    -> Maybe BucketVersioningStatus -> GetBucketVersioningResponse)
-> Lens
     GetBucketVersioningResponse
     GetBucketVersioningResponse
     (Maybe BucketVersioningStatus)
     (Maybe BucketVersioningStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBucketVersioningResponse' {Maybe BucketVersioningStatus
status :: Maybe BucketVersioningStatus
$sel:status:GetBucketVersioningResponse' :: GetBucketVersioningResponse -> Maybe BucketVersioningStatus
status} -> Maybe BucketVersioningStatus
status) (\s :: GetBucketVersioningResponse
s@GetBucketVersioningResponse' {} Maybe BucketVersioningStatus
a -> GetBucketVersioningResponse
s {$sel:status:GetBucketVersioningResponse' :: Maybe BucketVersioningStatus
status = Maybe BucketVersioningStatus
a} :: GetBucketVersioningResponse)

-- | Specifies whether MFA delete is enabled in the bucket versioning
-- configuration. This element is only returned if the bucket has been
-- configured with MFA delete. If the bucket has never been so configured,
-- this element is not returned.
getBucketVersioningResponse_mfaDelete :: Lens.Lens' GetBucketVersioningResponse (Prelude.Maybe MFADeleteStatus)
getBucketVersioningResponse_mfaDelete :: (Maybe MFADeleteStatus -> f (Maybe MFADeleteStatus))
-> GetBucketVersioningResponse -> f GetBucketVersioningResponse
getBucketVersioningResponse_mfaDelete = (GetBucketVersioningResponse -> Maybe MFADeleteStatus)
-> (GetBucketVersioningResponse
    -> Maybe MFADeleteStatus -> GetBucketVersioningResponse)
-> Lens
     GetBucketVersioningResponse
     GetBucketVersioningResponse
     (Maybe MFADeleteStatus)
     (Maybe MFADeleteStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBucketVersioningResponse' {Maybe MFADeleteStatus
mfaDelete :: Maybe MFADeleteStatus
$sel:mfaDelete:GetBucketVersioningResponse' :: GetBucketVersioningResponse -> Maybe MFADeleteStatus
mfaDelete} -> Maybe MFADeleteStatus
mfaDelete) (\s :: GetBucketVersioningResponse
s@GetBucketVersioningResponse' {} Maybe MFADeleteStatus
a -> GetBucketVersioningResponse
s {$sel:mfaDelete:GetBucketVersioningResponse' :: Maybe MFADeleteStatus
mfaDelete = Maybe MFADeleteStatus
a} :: GetBucketVersioningResponse)

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

instance Prelude.NFData GetBucketVersioningResponse