{-# 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.ListBucketInventoryConfigurations
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns a list of inventory configurations for the bucket. You can have
-- up to 1,000 analytics configurations per bucket.
--
-- This action supports list pagination and does not return more than 100
-- configurations at a time. Always check the @IsTruncated@ element in the
-- response. If there are no more configurations to list, @IsTruncated@ is
-- set to false. If there are more configurations to list, @IsTruncated@ is
-- set to true, and there is a value in @NextContinuationToken@. You use
-- the @NextContinuationToken@ value to continue the pagination of the list
-- by passing the value in continuation-token in the request to @GET@ the
-- next page.
--
-- To use this operation, you must have permissions to perform the
-- @s3:GetInventoryConfiguration@ 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>.
--
-- 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
-- @ListBucketInventoryConfigurations@:
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketInventoryConfiguration.html GetBucketInventoryConfiguration>
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketInventoryConfiguration.html DeleteBucketInventoryConfiguration>
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketInventoryConfiguration.html PutBucketInventoryConfiguration>
module Amazonka.S3.ListBucketInventoryConfigurations
  ( -- * Creating a Request
    ListBucketInventoryConfigurations (..),
    newListBucketInventoryConfigurations,

    -- * Request Lenses
    listBucketInventoryConfigurations_continuationToken,
    listBucketInventoryConfigurations_expectedBucketOwner,
    listBucketInventoryConfigurations_bucket,

    -- * Destructuring the Response
    ListBucketInventoryConfigurationsResponse (..),
    newListBucketInventoryConfigurationsResponse,

    -- * Response Lenses
    listBucketInventoryConfigurationsResponse_continuationToken,
    listBucketInventoryConfigurationsResponse_inventoryConfigurationList,
    listBucketInventoryConfigurationsResponse_isTruncated,
    listBucketInventoryConfigurationsResponse_nextContinuationToken,
    listBucketInventoryConfigurationsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.S3.Types

-- | /See:/ 'newListBucketInventoryConfigurations' smart constructor.
data ListBucketInventoryConfigurations = ListBucketInventoryConfigurations'
  { -- | The marker used to continue an inventory configuration listing that has
    -- been truncated. Use the NextContinuationToken from a previously
    -- truncated list response to continue the listing. The continuation token
    -- is an opaque value that Amazon S3 understands.
    ListBucketInventoryConfigurations -> Maybe Text
continuationToken :: Prelude.Maybe Prelude.Text,
    -- | The account ID of the expected bucket owner. If the bucket is owned by a
    -- different account, the request fails with the HTTP status code
    -- @403 Forbidden@ (access denied).
    ListBucketInventoryConfigurations -> Maybe Text
expectedBucketOwner :: Prelude.Maybe Prelude.Text,
    -- | The name of the bucket containing the inventory configurations to
    -- retrieve.
    ListBucketInventoryConfigurations -> BucketName
bucket :: BucketName
  }
  deriving (ListBucketInventoryConfigurations
-> ListBucketInventoryConfigurations -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListBucketInventoryConfigurations
-> ListBucketInventoryConfigurations -> Bool
$c/= :: ListBucketInventoryConfigurations
-> ListBucketInventoryConfigurations -> Bool
== :: ListBucketInventoryConfigurations
-> ListBucketInventoryConfigurations -> Bool
$c== :: ListBucketInventoryConfigurations
-> ListBucketInventoryConfigurations -> Bool
Prelude.Eq, ReadPrec [ListBucketInventoryConfigurations]
ReadPrec ListBucketInventoryConfigurations
Int -> ReadS ListBucketInventoryConfigurations
ReadS [ListBucketInventoryConfigurations]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListBucketInventoryConfigurations]
$creadListPrec :: ReadPrec [ListBucketInventoryConfigurations]
readPrec :: ReadPrec ListBucketInventoryConfigurations
$creadPrec :: ReadPrec ListBucketInventoryConfigurations
readList :: ReadS [ListBucketInventoryConfigurations]
$creadList :: ReadS [ListBucketInventoryConfigurations]
readsPrec :: Int -> ReadS ListBucketInventoryConfigurations
$creadsPrec :: Int -> ReadS ListBucketInventoryConfigurations
Prelude.Read, Int -> ListBucketInventoryConfigurations -> ShowS
[ListBucketInventoryConfigurations] -> ShowS
ListBucketInventoryConfigurations -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListBucketInventoryConfigurations] -> ShowS
$cshowList :: [ListBucketInventoryConfigurations] -> ShowS
show :: ListBucketInventoryConfigurations -> String
$cshow :: ListBucketInventoryConfigurations -> String
showsPrec :: Int -> ListBucketInventoryConfigurations -> ShowS
$cshowsPrec :: Int -> ListBucketInventoryConfigurations -> ShowS
Prelude.Show, forall x.
Rep ListBucketInventoryConfigurations x
-> ListBucketInventoryConfigurations
forall x.
ListBucketInventoryConfigurations
-> Rep ListBucketInventoryConfigurations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListBucketInventoryConfigurations x
-> ListBucketInventoryConfigurations
$cfrom :: forall x.
ListBucketInventoryConfigurations
-> Rep ListBucketInventoryConfigurations x
Prelude.Generic)

-- |
-- Create a value of 'ListBucketInventoryConfigurations' 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:
--
-- 'continuationToken', 'listBucketInventoryConfigurations_continuationToken' - The marker used to continue an inventory configuration listing that has
-- been truncated. Use the NextContinuationToken from a previously
-- truncated list response to continue the listing. The continuation token
-- is an opaque value that Amazon S3 understands.
--
-- 'expectedBucketOwner', 'listBucketInventoryConfigurations_expectedBucketOwner' - The account ID of the expected bucket owner. If the bucket is owned by a
-- different account, the request fails with the HTTP status code
-- @403 Forbidden@ (access denied).
--
-- 'bucket', 'listBucketInventoryConfigurations_bucket' - The name of the bucket containing the inventory configurations to
-- retrieve.
newListBucketInventoryConfigurations ::
  -- | 'bucket'
  BucketName ->
  ListBucketInventoryConfigurations
newListBucketInventoryConfigurations :: BucketName -> ListBucketInventoryConfigurations
newListBucketInventoryConfigurations BucketName
pBucket_ =
  ListBucketInventoryConfigurations'
    { $sel:continuationToken:ListBucketInventoryConfigurations' :: Maybe Text
continuationToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:expectedBucketOwner:ListBucketInventoryConfigurations' :: Maybe Text
expectedBucketOwner = forall a. Maybe a
Prelude.Nothing,
      $sel:bucket:ListBucketInventoryConfigurations' :: BucketName
bucket = BucketName
pBucket_
    }

-- | The marker used to continue an inventory configuration listing that has
-- been truncated. Use the NextContinuationToken from a previously
-- truncated list response to continue the listing. The continuation token
-- is an opaque value that Amazon S3 understands.
listBucketInventoryConfigurations_continuationToken :: Lens.Lens' ListBucketInventoryConfigurations (Prelude.Maybe Prelude.Text)
listBucketInventoryConfigurations_continuationToken :: Lens' ListBucketInventoryConfigurations (Maybe Text)
listBucketInventoryConfigurations_continuationToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBucketInventoryConfigurations' {Maybe Text
continuationToken :: Maybe Text
$sel:continuationToken:ListBucketInventoryConfigurations' :: ListBucketInventoryConfigurations -> Maybe Text
continuationToken} -> Maybe Text
continuationToken) (\s :: ListBucketInventoryConfigurations
s@ListBucketInventoryConfigurations' {} Maybe Text
a -> ListBucketInventoryConfigurations
s {$sel:continuationToken:ListBucketInventoryConfigurations' :: Maybe Text
continuationToken = Maybe Text
a} :: ListBucketInventoryConfigurations)

-- | The account ID of the expected bucket owner. If the bucket is owned by a
-- different account, the request fails with the HTTP status code
-- @403 Forbidden@ (access denied).
listBucketInventoryConfigurations_expectedBucketOwner :: Lens.Lens' ListBucketInventoryConfigurations (Prelude.Maybe Prelude.Text)
listBucketInventoryConfigurations_expectedBucketOwner :: Lens' ListBucketInventoryConfigurations (Maybe Text)
listBucketInventoryConfigurations_expectedBucketOwner = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBucketInventoryConfigurations' {Maybe Text
expectedBucketOwner :: Maybe Text
$sel:expectedBucketOwner:ListBucketInventoryConfigurations' :: ListBucketInventoryConfigurations -> Maybe Text
expectedBucketOwner} -> Maybe Text
expectedBucketOwner) (\s :: ListBucketInventoryConfigurations
s@ListBucketInventoryConfigurations' {} Maybe Text
a -> ListBucketInventoryConfigurations
s {$sel:expectedBucketOwner:ListBucketInventoryConfigurations' :: Maybe Text
expectedBucketOwner = Maybe Text
a} :: ListBucketInventoryConfigurations)

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

instance
  Core.AWSRequest
    ListBucketInventoryConfigurations
  where
  type
    AWSResponse ListBucketInventoryConfigurations =
      ListBucketInventoryConfigurationsResponse
  request :: (Service -> Service)
-> ListBucketInventoryConfigurations
-> Request ListBucketInventoryConfigurations
request Service -> Service
overrides =
    forall a. Request a -> Request a
Request.s3vhost
      forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListBucketInventoryConfigurations
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse ListBucketInventoryConfigurations)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text
-> Maybe [InventoryConfiguration]
-> Maybe Bool
-> Maybe Text
-> Int
-> ListBucketInventoryConfigurationsResponse
ListBucketInventoryConfigurationsResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ContinuationToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may
                            (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"InventoryConfiguration")
                            [Node]
x
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"IsTruncated")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"NextContinuationToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    ListBucketInventoryConfigurations
  where
  hashWithSalt :: Int -> ListBucketInventoryConfigurations -> Int
hashWithSalt
    Int
_salt
    ListBucketInventoryConfigurations' {Maybe Text
BucketName
bucket :: BucketName
expectedBucketOwner :: Maybe Text
continuationToken :: Maybe Text
$sel:bucket:ListBucketInventoryConfigurations' :: ListBucketInventoryConfigurations -> BucketName
$sel:expectedBucketOwner:ListBucketInventoryConfigurations' :: ListBucketInventoryConfigurations -> Maybe Text
$sel:continuationToken:ListBucketInventoryConfigurations' :: ListBucketInventoryConfigurations -> Maybe Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
continuationToken
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
expectedBucketOwner
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` BucketName
bucket

instance
  Prelude.NFData
    ListBucketInventoryConfigurations
  where
  rnf :: ListBucketInventoryConfigurations -> ()
rnf ListBucketInventoryConfigurations' {Maybe Text
BucketName
bucket :: BucketName
expectedBucketOwner :: Maybe Text
continuationToken :: Maybe Text
$sel:bucket:ListBucketInventoryConfigurations' :: ListBucketInventoryConfigurations -> BucketName
$sel:expectedBucketOwner:ListBucketInventoryConfigurations' :: ListBucketInventoryConfigurations -> Maybe Text
$sel:continuationToken:ListBucketInventoryConfigurations' :: ListBucketInventoryConfigurations -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
continuationToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
expectedBucketOwner
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf BucketName
bucket

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

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

instance
  Data.ToQuery
    ListBucketInventoryConfigurations
  where
  toQuery :: ListBucketInventoryConfigurations -> QueryString
toQuery ListBucketInventoryConfigurations' {Maybe Text
BucketName
bucket :: BucketName
expectedBucketOwner :: Maybe Text
continuationToken :: Maybe Text
$sel:bucket:ListBucketInventoryConfigurations' :: ListBucketInventoryConfigurations -> BucketName
$sel:expectedBucketOwner:ListBucketInventoryConfigurations' :: ListBucketInventoryConfigurations -> Maybe Text
$sel:continuationToken:ListBucketInventoryConfigurations' :: ListBucketInventoryConfigurations -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"continuation-token" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
continuationToken,
        QueryString
"inventory"
      ]

-- | /See:/ 'newListBucketInventoryConfigurationsResponse' smart constructor.
data ListBucketInventoryConfigurationsResponse = ListBucketInventoryConfigurationsResponse'
  { -- | If sent in the request, the marker that is used as a starting point for
    -- this inventory configuration list response.
    ListBucketInventoryConfigurationsResponse -> Maybe Text
continuationToken :: Prelude.Maybe Prelude.Text,
    -- | The list of inventory configurations for a bucket.
    ListBucketInventoryConfigurationsResponse
-> Maybe [InventoryConfiguration]
inventoryConfigurationList :: Prelude.Maybe [InventoryConfiguration],
    -- | Tells whether the returned list of inventory configurations is complete.
    -- A value of true indicates that the list is not complete and the
    -- NextContinuationToken is provided for a subsequent request.
    ListBucketInventoryConfigurationsResponse -> Maybe Bool
isTruncated :: Prelude.Maybe Prelude.Bool,
    -- | The marker used to continue this inventory configuration listing. Use
    -- the @NextContinuationToken@ from this response to continue the listing
    -- in a subsequent request. The continuation token is an opaque value that
    -- Amazon S3 understands.
    ListBucketInventoryConfigurationsResponse -> Maybe Text
nextContinuationToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListBucketInventoryConfigurationsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListBucketInventoryConfigurationsResponse
-> ListBucketInventoryConfigurationsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListBucketInventoryConfigurationsResponse
-> ListBucketInventoryConfigurationsResponse -> Bool
$c/= :: ListBucketInventoryConfigurationsResponse
-> ListBucketInventoryConfigurationsResponse -> Bool
== :: ListBucketInventoryConfigurationsResponse
-> ListBucketInventoryConfigurationsResponse -> Bool
$c== :: ListBucketInventoryConfigurationsResponse
-> ListBucketInventoryConfigurationsResponse -> Bool
Prelude.Eq, Int -> ListBucketInventoryConfigurationsResponse -> ShowS
[ListBucketInventoryConfigurationsResponse] -> ShowS
ListBucketInventoryConfigurationsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListBucketInventoryConfigurationsResponse] -> ShowS
$cshowList :: [ListBucketInventoryConfigurationsResponse] -> ShowS
show :: ListBucketInventoryConfigurationsResponse -> String
$cshow :: ListBucketInventoryConfigurationsResponse -> String
showsPrec :: Int -> ListBucketInventoryConfigurationsResponse -> ShowS
$cshowsPrec :: Int -> ListBucketInventoryConfigurationsResponse -> ShowS
Prelude.Show, forall x.
Rep ListBucketInventoryConfigurationsResponse x
-> ListBucketInventoryConfigurationsResponse
forall x.
ListBucketInventoryConfigurationsResponse
-> Rep ListBucketInventoryConfigurationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListBucketInventoryConfigurationsResponse x
-> ListBucketInventoryConfigurationsResponse
$cfrom :: forall x.
ListBucketInventoryConfigurationsResponse
-> Rep ListBucketInventoryConfigurationsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListBucketInventoryConfigurationsResponse' 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:
--
-- 'continuationToken', 'listBucketInventoryConfigurationsResponse_continuationToken' - If sent in the request, the marker that is used as a starting point for
-- this inventory configuration list response.
--
-- 'inventoryConfigurationList', 'listBucketInventoryConfigurationsResponse_inventoryConfigurationList' - The list of inventory configurations for a bucket.
--
-- 'isTruncated', 'listBucketInventoryConfigurationsResponse_isTruncated' - Tells whether the returned list of inventory configurations is complete.
-- A value of true indicates that the list is not complete and the
-- NextContinuationToken is provided for a subsequent request.
--
-- 'nextContinuationToken', 'listBucketInventoryConfigurationsResponse_nextContinuationToken' - The marker used to continue this inventory configuration listing. Use
-- the @NextContinuationToken@ from this response to continue the listing
-- in a subsequent request. The continuation token is an opaque value that
-- Amazon S3 understands.
--
-- 'httpStatus', 'listBucketInventoryConfigurationsResponse_httpStatus' - The response's http status code.
newListBucketInventoryConfigurationsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListBucketInventoryConfigurationsResponse
newListBucketInventoryConfigurationsResponse :: Int -> ListBucketInventoryConfigurationsResponse
newListBucketInventoryConfigurationsResponse
  Int
pHttpStatus_ =
    ListBucketInventoryConfigurationsResponse'
      { $sel:continuationToken:ListBucketInventoryConfigurationsResponse' :: Maybe Text
continuationToken =
          forall a. Maybe a
Prelude.Nothing,
        $sel:inventoryConfigurationList:ListBucketInventoryConfigurationsResponse' :: Maybe [InventoryConfiguration]
inventoryConfigurationList =
          forall a. Maybe a
Prelude.Nothing,
        $sel:isTruncated:ListBucketInventoryConfigurationsResponse' :: Maybe Bool
isTruncated = forall a. Maybe a
Prelude.Nothing,
        $sel:nextContinuationToken:ListBucketInventoryConfigurationsResponse' :: Maybe Text
nextContinuationToken =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListBucketInventoryConfigurationsResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | If sent in the request, the marker that is used as a starting point for
-- this inventory configuration list response.
listBucketInventoryConfigurationsResponse_continuationToken :: Lens.Lens' ListBucketInventoryConfigurationsResponse (Prelude.Maybe Prelude.Text)
listBucketInventoryConfigurationsResponse_continuationToken :: Lens' ListBucketInventoryConfigurationsResponse (Maybe Text)
listBucketInventoryConfigurationsResponse_continuationToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBucketInventoryConfigurationsResponse' {Maybe Text
continuationToken :: Maybe Text
$sel:continuationToken:ListBucketInventoryConfigurationsResponse' :: ListBucketInventoryConfigurationsResponse -> Maybe Text
continuationToken} -> Maybe Text
continuationToken) (\s :: ListBucketInventoryConfigurationsResponse
s@ListBucketInventoryConfigurationsResponse' {} Maybe Text
a -> ListBucketInventoryConfigurationsResponse
s {$sel:continuationToken:ListBucketInventoryConfigurationsResponse' :: Maybe Text
continuationToken = Maybe Text
a} :: ListBucketInventoryConfigurationsResponse)

-- | The list of inventory configurations for a bucket.
listBucketInventoryConfigurationsResponse_inventoryConfigurationList :: Lens.Lens' ListBucketInventoryConfigurationsResponse (Prelude.Maybe [InventoryConfiguration])
listBucketInventoryConfigurationsResponse_inventoryConfigurationList :: Lens'
  ListBucketInventoryConfigurationsResponse
  (Maybe [InventoryConfiguration])
listBucketInventoryConfigurationsResponse_inventoryConfigurationList = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBucketInventoryConfigurationsResponse' {Maybe [InventoryConfiguration]
inventoryConfigurationList :: Maybe [InventoryConfiguration]
$sel:inventoryConfigurationList:ListBucketInventoryConfigurationsResponse' :: ListBucketInventoryConfigurationsResponse
-> Maybe [InventoryConfiguration]
inventoryConfigurationList} -> Maybe [InventoryConfiguration]
inventoryConfigurationList) (\s :: ListBucketInventoryConfigurationsResponse
s@ListBucketInventoryConfigurationsResponse' {} Maybe [InventoryConfiguration]
a -> ListBucketInventoryConfigurationsResponse
s {$sel:inventoryConfigurationList:ListBucketInventoryConfigurationsResponse' :: Maybe [InventoryConfiguration]
inventoryConfigurationList = Maybe [InventoryConfiguration]
a} :: ListBucketInventoryConfigurationsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Tells whether the returned list of inventory configurations is complete.
-- A value of true indicates that the list is not complete and the
-- NextContinuationToken is provided for a subsequent request.
listBucketInventoryConfigurationsResponse_isTruncated :: Lens.Lens' ListBucketInventoryConfigurationsResponse (Prelude.Maybe Prelude.Bool)
listBucketInventoryConfigurationsResponse_isTruncated :: Lens' ListBucketInventoryConfigurationsResponse (Maybe Bool)
listBucketInventoryConfigurationsResponse_isTruncated = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBucketInventoryConfigurationsResponse' {Maybe Bool
isTruncated :: Maybe Bool
$sel:isTruncated:ListBucketInventoryConfigurationsResponse' :: ListBucketInventoryConfigurationsResponse -> Maybe Bool
isTruncated} -> Maybe Bool
isTruncated) (\s :: ListBucketInventoryConfigurationsResponse
s@ListBucketInventoryConfigurationsResponse' {} Maybe Bool
a -> ListBucketInventoryConfigurationsResponse
s {$sel:isTruncated:ListBucketInventoryConfigurationsResponse' :: Maybe Bool
isTruncated = Maybe Bool
a} :: ListBucketInventoryConfigurationsResponse)

-- | The marker used to continue this inventory configuration listing. Use
-- the @NextContinuationToken@ from this response to continue the listing
-- in a subsequent request. The continuation token is an opaque value that
-- Amazon S3 understands.
listBucketInventoryConfigurationsResponse_nextContinuationToken :: Lens.Lens' ListBucketInventoryConfigurationsResponse (Prelude.Maybe Prelude.Text)
listBucketInventoryConfigurationsResponse_nextContinuationToken :: Lens' ListBucketInventoryConfigurationsResponse (Maybe Text)
listBucketInventoryConfigurationsResponse_nextContinuationToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBucketInventoryConfigurationsResponse' {Maybe Text
nextContinuationToken :: Maybe Text
$sel:nextContinuationToken:ListBucketInventoryConfigurationsResponse' :: ListBucketInventoryConfigurationsResponse -> Maybe Text
nextContinuationToken} -> Maybe Text
nextContinuationToken) (\s :: ListBucketInventoryConfigurationsResponse
s@ListBucketInventoryConfigurationsResponse' {} Maybe Text
a -> ListBucketInventoryConfigurationsResponse
s {$sel:nextContinuationToken:ListBucketInventoryConfigurationsResponse' :: Maybe Text
nextContinuationToken = Maybe Text
a} :: ListBucketInventoryConfigurationsResponse)

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

instance
  Prelude.NFData
    ListBucketInventoryConfigurationsResponse
  where
  rnf :: ListBucketInventoryConfigurationsResponse -> ()
rnf ListBucketInventoryConfigurationsResponse' {Int
Maybe Bool
Maybe [InventoryConfiguration]
Maybe Text
httpStatus :: Int
nextContinuationToken :: Maybe Text
isTruncated :: Maybe Bool
inventoryConfigurationList :: Maybe [InventoryConfiguration]
continuationToken :: Maybe Text
$sel:httpStatus:ListBucketInventoryConfigurationsResponse' :: ListBucketInventoryConfigurationsResponse -> Int
$sel:nextContinuationToken:ListBucketInventoryConfigurationsResponse' :: ListBucketInventoryConfigurationsResponse -> Maybe Text
$sel:isTruncated:ListBucketInventoryConfigurationsResponse' :: ListBucketInventoryConfigurationsResponse -> Maybe Bool
$sel:inventoryConfigurationList:ListBucketInventoryConfigurationsResponse' :: ListBucketInventoryConfigurationsResponse
-> Maybe [InventoryConfiguration]
$sel:continuationToken:ListBucketInventoryConfigurationsResponse' :: ListBucketInventoryConfigurationsResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
continuationToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [InventoryConfiguration]
inventoryConfigurationList
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
isTruncated
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextContinuationToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus