{-# 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.GetBucketInventoryConfiguration
-- 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 an inventory configuration (identified by the inventory
-- configuration ID) from the bucket.
--
-- To use this operation, you must have permissions to perform the
-- @s3:GetInventoryConfiguration@ action. The bucket owner has this
-- permission by default and 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>.
--
-- For information about the Amazon S3 inventory feature, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html Amazon S3 Inventory>.
--
-- The following operations are related to
-- @GetBucketInventoryConfiguration@:
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketInventoryConfiguration.html DeleteBucketInventoryConfiguration>
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketInventoryConfigurations.html ListBucketInventoryConfigurations>
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketInventoryConfiguration.html PutBucketInventoryConfiguration>
module Amazonka.S3.GetBucketInventoryConfiguration
  ( -- * Creating a Request
    GetBucketInventoryConfiguration (..),
    newGetBucketInventoryConfiguration,

    -- * Request Lenses
    getBucketInventoryConfiguration_expectedBucketOwner,
    getBucketInventoryConfiguration_bucket,
    getBucketInventoryConfiguration_id,

    -- * Destructuring the Response
    GetBucketInventoryConfigurationResponse (..),
    newGetBucketInventoryConfigurationResponse,

    -- * Response Lenses
    getBucketInventoryConfigurationResponse_inventoryConfiguration,
    getBucketInventoryConfigurationResponse_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:/ 'newGetBucketInventoryConfiguration' smart constructor.
data GetBucketInventoryConfiguration = GetBucketInventoryConfiguration'
  { -- | 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.
    GetBucketInventoryConfiguration -> Maybe Text
expectedBucketOwner :: Prelude.Maybe Prelude.Text,
    -- | The name of the bucket containing the inventory configuration to
    -- retrieve.
    GetBucketInventoryConfiguration -> BucketName
bucket :: BucketName,
    -- | The ID used to identify the inventory configuration.
    GetBucketInventoryConfiguration -> Text
id :: Prelude.Text
  }
  deriving (GetBucketInventoryConfiguration
-> GetBucketInventoryConfiguration -> Bool
(GetBucketInventoryConfiguration
 -> GetBucketInventoryConfiguration -> Bool)
-> (GetBucketInventoryConfiguration
    -> GetBucketInventoryConfiguration -> Bool)
-> Eq GetBucketInventoryConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBucketInventoryConfiguration
-> GetBucketInventoryConfiguration -> Bool
$c/= :: GetBucketInventoryConfiguration
-> GetBucketInventoryConfiguration -> Bool
== :: GetBucketInventoryConfiguration
-> GetBucketInventoryConfiguration -> Bool
$c== :: GetBucketInventoryConfiguration
-> GetBucketInventoryConfiguration -> Bool
Prelude.Eq, ReadPrec [GetBucketInventoryConfiguration]
ReadPrec GetBucketInventoryConfiguration
Int -> ReadS GetBucketInventoryConfiguration
ReadS [GetBucketInventoryConfiguration]
(Int -> ReadS GetBucketInventoryConfiguration)
-> ReadS [GetBucketInventoryConfiguration]
-> ReadPrec GetBucketInventoryConfiguration
-> ReadPrec [GetBucketInventoryConfiguration]
-> Read GetBucketInventoryConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetBucketInventoryConfiguration]
$creadListPrec :: ReadPrec [GetBucketInventoryConfiguration]
readPrec :: ReadPrec GetBucketInventoryConfiguration
$creadPrec :: ReadPrec GetBucketInventoryConfiguration
readList :: ReadS [GetBucketInventoryConfiguration]
$creadList :: ReadS [GetBucketInventoryConfiguration]
readsPrec :: Int -> ReadS GetBucketInventoryConfiguration
$creadsPrec :: Int -> ReadS GetBucketInventoryConfiguration
Prelude.Read, Int -> GetBucketInventoryConfiguration -> ShowS
[GetBucketInventoryConfiguration] -> ShowS
GetBucketInventoryConfiguration -> String
(Int -> GetBucketInventoryConfiguration -> ShowS)
-> (GetBucketInventoryConfiguration -> String)
-> ([GetBucketInventoryConfiguration] -> ShowS)
-> Show GetBucketInventoryConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBucketInventoryConfiguration] -> ShowS
$cshowList :: [GetBucketInventoryConfiguration] -> ShowS
show :: GetBucketInventoryConfiguration -> String
$cshow :: GetBucketInventoryConfiguration -> String
showsPrec :: Int -> GetBucketInventoryConfiguration -> ShowS
$cshowsPrec :: Int -> GetBucketInventoryConfiguration -> ShowS
Prelude.Show, (forall x.
 GetBucketInventoryConfiguration
 -> Rep GetBucketInventoryConfiguration x)
-> (forall x.
    Rep GetBucketInventoryConfiguration x
    -> GetBucketInventoryConfiguration)
-> Generic GetBucketInventoryConfiguration
forall x.
Rep GetBucketInventoryConfiguration x
-> GetBucketInventoryConfiguration
forall x.
GetBucketInventoryConfiguration
-> Rep GetBucketInventoryConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetBucketInventoryConfiguration x
-> GetBucketInventoryConfiguration
$cfrom :: forall x.
GetBucketInventoryConfiguration
-> Rep GetBucketInventoryConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'GetBucketInventoryConfiguration' 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', 'getBucketInventoryConfiguration_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', 'getBucketInventoryConfiguration_bucket' - The name of the bucket containing the inventory configuration to
-- retrieve.
--
-- 'id', 'getBucketInventoryConfiguration_id' - The ID used to identify the inventory configuration.
newGetBucketInventoryConfiguration ::
  -- | 'bucket'
  BucketName ->
  -- | 'id'
  Prelude.Text ->
  GetBucketInventoryConfiguration
newGetBucketInventoryConfiguration :: BucketName -> Text -> GetBucketInventoryConfiguration
newGetBucketInventoryConfiguration BucketName
pBucket_ Text
pId_ =
  GetBucketInventoryConfiguration' :: Maybe Text -> BucketName -> Text -> GetBucketInventoryConfiguration
GetBucketInventoryConfiguration'
    { $sel:expectedBucketOwner:GetBucketInventoryConfiguration' :: Maybe Text
expectedBucketOwner =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:bucket:GetBucketInventoryConfiguration' :: BucketName
bucket = BucketName
pBucket_,
      $sel:id:GetBucketInventoryConfiguration' :: Text
id = Text
pId_
    }

-- | 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.
getBucketInventoryConfiguration_expectedBucketOwner :: Lens.Lens' GetBucketInventoryConfiguration (Prelude.Maybe Prelude.Text)
getBucketInventoryConfiguration_expectedBucketOwner :: (Maybe Text -> f (Maybe Text))
-> GetBucketInventoryConfiguration
-> f GetBucketInventoryConfiguration
getBucketInventoryConfiguration_expectedBucketOwner = (GetBucketInventoryConfiguration -> Maybe Text)
-> (GetBucketInventoryConfiguration
    -> Maybe Text -> GetBucketInventoryConfiguration)
-> Lens
     GetBucketInventoryConfiguration
     GetBucketInventoryConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBucketInventoryConfiguration' {Maybe Text
expectedBucketOwner :: Maybe Text
$sel:expectedBucketOwner:GetBucketInventoryConfiguration' :: GetBucketInventoryConfiguration -> Maybe Text
expectedBucketOwner} -> Maybe Text
expectedBucketOwner) (\s :: GetBucketInventoryConfiguration
s@GetBucketInventoryConfiguration' {} Maybe Text
a -> GetBucketInventoryConfiguration
s {$sel:expectedBucketOwner:GetBucketInventoryConfiguration' :: Maybe Text
expectedBucketOwner = Maybe Text
a} :: GetBucketInventoryConfiguration)

-- | The name of the bucket containing the inventory configuration to
-- retrieve.
getBucketInventoryConfiguration_bucket :: Lens.Lens' GetBucketInventoryConfiguration BucketName
getBucketInventoryConfiguration_bucket :: (BucketName -> f BucketName)
-> GetBucketInventoryConfiguration
-> f GetBucketInventoryConfiguration
getBucketInventoryConfiguration_bucket = (GetBucketInventoryConfiguration -> BucketName)
-> (GetBucketInventoryConfiguration
    -> BucketName -> GetBucketInventoryConfiguration)
-> Lens
     GetBucketInventoryConfiguration
     GetBucketInventoryConfiguration
     BucketName
     BucketName
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBucketInventoryConfiguration' {BucketName
bucket :: BucketName
$sel:bucket:GetBucketInventoryConfiguration' :: GetBucketInventoryConfiguration -> BucketName
bucket} -> BucketName
bucket) (\s :: GetBucketInventoryConfiguration
s@GetBucketInventoryConfiguration' {} BucketName
a -> GetBucketInventoryConfiguration
s {$sel:bucket:GetBucketInventoryConfiguration' :: BucketName
bucket = BucketName
a} :: GetBucketInventoryConfiguration)

-- | The ID used to identify the inventory configuration.
getBucketInventoryConfiguration_id :: Lens.Lens' GetBucketInventoryConfiguration Prelude.Text
getBucketInventoryConfiguration_id :: (Text -> f Text)
-> GetBucketInventoryConfiguration
-> f GetBucketInventoryConfiguration
getBucketInventoryConfiguration_id = (GetBucketInventoryConfiguration -> Text)
-> (GetBucketInventoryConfiguration
    -> Text -> GetBucketInventoryConfiguration)
-> Lens
     GetBucketInventoryConfiguration
     GetBucketInventoryConfiguration
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBucketInventoryConfiguration' {Text
id :: Text
$sel:id:GetBucketInventoryConfiguration' :: GetBucketInventoryConfiguration -> Text
id} -> Text
id) (\s :: GetBucketInventoryConfiguration
s@GetBucketInventoryConfiguration' {} Text
a -> GetBucketInventoryConfiguration
s {$sel:id:GetBucketInventoryConfiguration' :: Text
id = Text
a} :: GetBucketInventoryConfiguration)

instance
  Core.AWSRequest
    GetBucketInventoryConfiguration
  where
  type
    AWSResponse GetBucketInventoryConfiguration =
      GetBucketInventoryConfigurationResponse
  request :: GetBucketInventoryConfiguration
-> Request GetBucketInventoryConfiguration
request =
    Request GetBucketInventoryConfiguration
-> Request GetBucketInventoryConfiguration
forall a. Request a -> Request a
Request.s3vhost
      (Request GetBucketInventoryConfiguration
 -> Request GetBucketInventoryConfiguration)
-> (GetBucketInventoryConfiguration
    -> Request GetBucketInventoryConfiguration)
-> GetBucketInventoryConfiguration
-> Request GetBucketInventoryConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Service
-> GetBucketInventoryConfiguration
-> Request GetBucketInventoryConfiguration
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetBucketInventoryConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse GetBucketInventoryConfiguration)))
response =
    (Int
 -> ResponseHeaders
 -> [Node]
 -> Either String (AWSResponse GetBucketInventoryConfiguration))
-> Logger
-> Service
-> Proxy GetBucketInventoryConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse GetBucketInventoryConfiguration)))
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 InventoryConfiguration
-> Int -> GetBucketInventoryConfigurationResponse
GetBucketInventoryConfigurationResponse'
            (Maybe InventoryConfiguration
 -> Int -> GetBucketInventoryConfigurationResponse)
-> Either String (Maybe InventoryConfiguration)
-> Either String (Int -> GetBucketInventoryConfigurationResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node] -> Either String (Maybe InventoryConfiguration)
forall a. FromXML a => [Node] -> Either String a
Core.parseXML [Node]
x)
            Either String (Int -> GetBucketInventoryConfigurationResponse)
-> Either String Int
-> Either String GetBucketInventoryConfigurationResponse
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
    GetBucketInventoryConfiguration

instance
  Prelude.NFData
    GetBucketInventoryConfiguration

instance
  Core.ToHeaders
    GetBucketInventoryConfiguration
  where
  toHeaders :: GetBucketInventoryConfiguration -> ResponseHeaders
toHeaders GetBucketInventoryConfiguration' {Maybe Text
Text
BucketName
id :: Text
bucket :: BucketName
expectedBucketOwner :: Maybe Text
$sel:id:GetBucketInventoryConfiguration' :: GetBucketInventoryConfiguration -> Text
$sel:bucket:GetBucketInventoryConfiguration' :: GetBucketInventoryConfiguration -> BucketName
$sel:expectedBucketOwner:GetBucketInventoryConfiguration' :: GetBucketInventoryConfiguration -> 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 GetBucketInventoryConfiguration where
  toPath :: GetBucketInventoryConfiguration -> ByteString
toPath GetBucketInventoryConfiguration' {Maybe Text
Text
BucketName
id :: Text
bucket :: BucketName
expectedBucketOwner :: Maybe Text
$sel:id:GetBucketInventoryConfiguration' :: GetBucketInventoryConfiguration -> Text
$sel:bucket:GetBucketInventoryConfiguration' :: GetBucketInventoryConfiguration -> BucketName
$sel:expectedBucketOwner:GetBucketInventoryConfiguration' :: GetBucketInventoryConfiguration -> 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 GetBucketInventoryConfiguration where
  toQuery :: GetBucketInventoryConfiguration -> QueryString
toQuery GetBucketInventoryConfiguration' {Maybe Text
Text
BucketName
id :: Text
bucket :: BucketName
expectedBucketOwner :: Maybe Text
$sel:id:GetBucketInventoryConfiguration' :: GetBucketInventoryConfiguration -> Text
$sel:bucket:GetBucketInventoryConfiguration' :: GetBucketInventoryConfiguration -> BucketName
$sel:expectedBucketOwner:GetBucketInventoryConfiguration' :: GetBucketInventoryConfiguration -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"id" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
id, QueryString
"inventory"]

-- | /See:/ 'newGetBucketInventoryConfigurationResponse' smart constructor.
data GetBucketInventoryConfigurationResponse = GetBucketInventoryConfigurationResponse'
  { -- | Specifies the inventory configuration.
    GetBucketInventoryConfigurationResponse
-> Maybe InventoryConfiguration
inventoryConfiguration :: Prelude.Maybe InventoryConfiguration,
    -- | The response's http status code.
    GetBucketInventoryConfigurationResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetBucketInventoryConfigurationResponse
-> GetBucketInventoryConfigurationResponse -> Bool
(GetBucketInventoryConfigurationResponse
 -> GetBucketInventoryConfigurationResponse -> Bool)
-> (GetBucketInventoryConfigurationResponse
    -> GetBucketInventoryConfigurationResponse -> Bool)
-> Eq GetBucketInventoryConfigurationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBucketInventoryConfigurationResponse
-> GetBucketInventoryConfigurationResponse -> Bool
$c/= :: GetBucketInventoryConfigurationResponse
-> GetBucketInventoryConfigurationResponse -> Bool
== :: GetBucketInventoryConfigurationResponse
-> GetBucketInventoryConfigurationResponse -> Bool
$c== :: GetBucketInventoryConfigurationResponse
-> GetBucketInventoryConfigurationResponse -> Bool
Prelude.Eq, Int -> GetBucketInventoryConfigurationResponse -> ShowS
[GetBucketInventoryConfigurationResponse] -> ShowS
GetBucketInventoryConfigurationResponse -> String
(Int -> GetBucketInventoryConfigurationResponse -> ShowS)
-> (GetBucketInventoryConfigurationResponse -> String)
-> ([GetBucketInventoryConfigurationResponse] -> ShowS)
-> Show GetBucketInventoryConfigurationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBucketInventoryConfigurationResponse] -> ShowS
$cshowList :: [GetBucketInventoryConfigurationResponse] -> ShowS
show :: GetBucketInventoryConfigurationResponse -> String
$cshow :: GetBucketInventoryConfigurationResponse -> String
showsPrec :: Int -> GetBucketInventoryConfigurationResponse -> ShowS
$cshowsPrec :: Int -> GetBucketInventoryConfigurationResponse -> ShowS
Prelude.Show, (forall x.
 GetBucketInventoryConfigurationResponse
 -> Rep GetBucketInventoryConfigurationResponse x)
-> (forall x.
    Rep GetBucketInventoryConfigurationResponse x
    -> GetBucketInventoryConfigurationResponse)
-> Generic GetBucketInventoryConfigurationResponse
forall x.
Rep GetBucketInventoryConfigurationResponse x
-> GetBucketInventoryConfigurationResponse
forall x.
GetBucketInventoryConfigurationResponse
-> Rep GetBucketInventoryConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetBucketInventoryConfigurationResponse x
-> GetBucketInventoryConfigurationResponse
$cfrom :: forall x.
GetBucketInventoryConfigurationResponse
-> Rep GetBucketInventoryConfigurationResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetBucketInventoryConfigurationResponse' 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:
--
-- 'inventoryConfiguration', 'getBucketInventoryConfigurationResponse_inventoryConfiguration' - Specifies the inventory configuration.
--
-- 'httpStatus', 'getBucketInventoryConfigurationResponse_httpStatus' - The response's http status code.
newGetBucketInventoryConfigurationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetBucketInventoryConfigurationResponse
newGetBucketInventoryConfigurationResponse :: Int -> GetBucketInventoryConfigurationResponse
newGetBucketInventoryConfigurationResponse
  Int
pHttpStatus_ =
    GetBucketInventoryConfigurationResponse' :: Maybe InventoryConfiguration
-> Int -> GetBucketInventoryConfigurationResponse
GetBucketInventoryConfigurationResponse'
      { $sel:inventoryConfiguration:GetBucketInventoryConfigurationResponse' :: Maybe InventoryConfiguration
inventoryConfiguration =
          Maybe InventoryConfiguration
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:GetBucketInventoryConfigurationResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | Specifies the inventory configuration.
getBucketInventoryConfigurationResponse_inventoryConfiguration :: Lens.Lens' GetBucketInventoryConfigurationResponse (Prelude.Maybe InventoryConfiguration)
getBucketInventoryConfigurationResponse_inventoryConfiguration :: (Maybe InventoryConfiguration -> f (Maybe InventoryConfiguration))
-> GetBucketInventoryConfigurationResponse
-> f GetBucketInventoryConfigurationResponse
getBucketInventoryConfigurationResponse_inventoryConfiguration = (GetBucketInventoryConfigurationResponse
 -> Maybe InventoryConfiguration)
-> (GetBucketInventoryConfigurationResponse
    -> Maybe InventoryConfiguration
    -> GetBucketInventoryConfigurationResponse)
-> Lens
     GetBucketInventoryConfigurationResponse
     GetBucketInventoryConfigurationResponse
     (Maybe InventoryConfiguration)
     (Maybe InventoryConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBucketInventoryConfigurationResponse' {Maybe InventoryConfiguration
inventoryConfiguration :: Maybe InventoryConfiguration
$sel:inventoryConfiguration:GetBucketInventoryConfigurationResponse' :: GetBucketInventoryConfigurationResponse
-> Maybe InventoryConfiguration
inventoryConfiguration} -> Maybe InventoryConfiguration
inventoryConfiguration) (\s :: GetBucketInventoryConfigurationResponse
s@GetBucketInventoryConfigurationResponse' {} Maybe InventoryConfiguration
a -> GetBucketInventoryConfigurationResponse
s {$sel:inventoryConfiguration:GetBucketInventoryConfigurationResponse' :: Maybe InventoryConfiguration
inventoryConfiguration = Maybe InventoryConfiguration
a} :: GetBucketInventoryConfigurationResponse)

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

instance
  Prelude.NFData
    GetBucketInventoryConfigurationResponse