{-# 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-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 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_nextContinuationToken,
    listBucketInventoryConfigurationsResponse_isTruncated,
    listBucketInventoryConfigurationsResponse_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:/ '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 will fail with an HTTP
    -- @403 (Access Denied)@ error.
    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
(ListBucketInventoryConfigurations
 -> ListBucketInventoryConfigurations -> Bool)
-> (ListBucketInventoryConfigurations
    -> ListBucketInventoryConfigurations -> Bool)
-> Eq ListBucketInventoryConfigurations
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]
(Int -> ReadS ListBucketInventoryConfigurations)
-> ReadS [ListBucketInventoryConfigurations]
-> ReadPrec ListBucketInventoryConfigurations
-> ReadPrec [ListBucketInventoryConfigurations]
-> Read 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
(Int -> ListBucketInventoryConfigurations -> ShowS)
-> (ListBucketInventoryConfigurations -> String)
-> ([ListBucketInventoryConfigurations] -> ShowS)
-> Show ListBucketInventoryConfigurations
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.
 ListBucketInventoryConfigurations
 -> Rep ListBucketInventoryConfigurations x)
-> (forall x.
    Rep ListBucketInventoryConfigurations x
    -> ListBucketInventoryConfigurations)
-> Generic ListBucketInventoryConfigurations
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 will fail with an HTTP
-- @403 (Access Denied)@ error.
--
-- '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' :: Maybe Text
-> Maybe Text -> BucketName -> ListBucketInventoryConfigurations
ListBucketInventoryConfigurations'
    { $sel:continuationToken:ListBucketInventoryConfigurations' :: Maybe Text
continuationToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:expectedBucketOwner:ListBucketInventoryConfigurations' :: Maybe Text
expectedBucketOwner = Maybe Text
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 :: (Maybe Text -> f (Maybe Text))
-> ListBucketInventoryConfigurations
-> f ListBucketInventoryConfigurations
listBucketInventoryConfigurations_continuationToken = (ListBucketInventoryConfigurations -> Maybe Text)
-> (ListBucketInventoryConfigurations
    -> Maybe Text -> ListBucketInventoryConfigurations)
-> Lens
     ListBucketInventoryConfigurations
     ListBucketInventoryConfigurations
     (Maybe Text)
     (Maybe Text)
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 will fail with an HTTP
-- @403 (Access Denied)@ error.
listBucketInventoryConfigurations_expectedBucketOwner :: Lens.Lens' ListBucketInventoryConfigurations (Prelude.Maybe Prelude.Text)
listBucketInventoryConfigurations_expectedBucketOwner :: (Maybe Text -> f (Maybe Text))
-> ListBucketInventoryConfigurations
-> f ListBucketInventoryConfigurations
listBucketInventoryConfigurations_expectedBucketOwner = (ListBucketInventoryConfigurations -> Maybe Text)
-> (ListBucketInventoryConfigurations
    -> Maybe Text -> ListBucketInventoryConfigurations)
-> Lens
     ListBucketInventoryConfigurations
     ListBucketInventoryConfigurations
     (Maybe Text)
     (Maybe Text)
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 :: (BucketName -> f BucketName)
-> ListBucketInventoryConfigurations
-> f ListBucketInventoryConfigurations
listBucketInventoryConfigurations_bucket = (ListBucketInventoryConfigurations -> BucketName)
-> (ListBucketInventoryConfigurations
    -> BucketName -> ListBucketInventoryConfigurations)
-> Lens
     ListBucketInventoryConfigurations
     ListBucketInventoryConfigurations
     BucketName
     BucketName
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 :: ListBucketInventoryConfigurations
-> Request ListBucketInventoryConfigurations
request =
    Request ListBucketInventoryConfigurations
-> Request ListBucketInventoryConfigurations
forall a. Request a -> Request a
Request.s3vhost
      (Request ListBucketInventoryConfigurations
 -> Request ListBucketInventoryConfigurations)
-> (ListBucketInventoryConfigurations
    -> Request ListBucketInventoryConfigurations)
-> ListBucketInventoryConfigurations
-> Request ListBucketInventoryConfigurations
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Service
-> ListBucketInventoryConfigurations
-> Request ListBucketInventoryConfigurations
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListBucketInventoryConfigurations
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse ListBucketInventoryConfigurations)))
response =
    (Int
 -> ResponseHeaders
 -> [Node]
 -> Either String (AWSResponse ListBucketInventoryConfigurations))
-> Logger
-> Service
-> Proxy ListBucketInventoryConfigurations
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse ListBucketInventoryConfigurations)))
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 Text
-> Maybe [InventoryConfiguration]
-> Maybe Text
-> Maybe Bool
-> Int
-> ListBucketInventoryConfigurationsResponse
ListBucketInventoryConfigurationsResponse'
            (Maybe Text
 -> Maybe [InventoryConfiguration]
 -> Maybe Text
 -> Maybe Bool
 -> Int
 -> ListBucketInventoryConfigurationsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [InventoryConfiguration]
      -> Maybe Text
      -> Maybe Bool
      -> Int
      -> ListBucketInventoryConfigurationsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ContinuationToken")
              Either
  String
  (Maybe [InventoryConfiguration]
   -> Maybe Text
   -> Maybe Bool
   -> Int
   -> ListBucketInventoryConfigurationsResponse)
-> Either String (Maybe [InventoryConfiguration])
-> Either
     String
     (Maybe Text
      -> Maybe Bool -> Int -> ListBucketInventoryConfigurationsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( ([Node] -> Either String [InventoryConfiguration])
-> [Node] -> Either String (Maybe [InventoryConfiguration])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may
                              (Text -> [Node] -> Either String [InventoryConfiguration]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"InventoryConfiguration")
                              [Node]
x
                          )
              Either
  String
  (Maybe Text
   -> Maybe Bool -> Int -> ListBucketInventoryConfigurationsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Bool -> Int -> ListBucketInventoryConfigurationsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"NextContinuationToken")
              Either
  String
  (Maybe Bool -> Int -> ListBucketInventoryConfigurationsResponse)
-> Either String (Maybe Bool)
-> Either String (Int -> ListBucketInventoryConfigurationsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"IsTruncated")
              Either String (Int -> ListBucketInventoryConfigurationsResponse)
-> Either String Int
-> Either String ListBucketInventoryConfigurationsResponse
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
    ListBucketInventoryConfigurations

instance
  Prelude.NFData
    ListBucketInventoryConfigurations

instance
  Core.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
..} =
    [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
    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
..} =
    [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
    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
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"continuation-token" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: 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],
    -- | 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,
    -- | 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 response's http status code.
    ListBucketInventoryConfigurationsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListBucketInventoryConfigurationsResponse
-> ListBucketInventoryConfigurationsResponse -> Bool
(ListBucketInventoryConfigurationsResponse
 -> ListBucketInventoryConfigurationsResponse -> Bool)
-> (ListBucketInventoryConfigurationsResponse
    -> ListBucketInventoryConfigurationsResponse -> Bool)
-> Eq ListBucketInventoryConfigurationsResponse
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
(Int -> ListBucketInventoryConfigurationsResponse -> ShowS)
-> (ListBucketInventoryConfigurationsResponse -> String)
-> ([ListBucketInventoryConfigurationsResponse] -> ShowS)
-> Show ListBucketInventoryConfigurationsResponse
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.
 ListBucketInventoryConfigurationsResponse
 -> Rep ListBucketInventoryConfigurationsResponse x)
-> (forall x.
    Rep ListBucketInventoryConfigurationsResponse x
    -> ListBucketInventoryConfigurationsResponse)
-> Generic ListBucketInventoryConfigurationsResponse
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.
--
-- '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.
--
-- '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.
--
-- 'httpStatus', 'listBucketInventoryConfigurationsResponse_httpStatus' - The response's http status code.
newListBucketInventoryConfigurationsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListBucketInventoryConfigurationsResponse
newListBucketInventoryConfigurationsResponse :: Int -> ListBucketInventoryConfigurationsResponse
newListBucketInventoryConfigurationsResponse
  Int
pHttpStatus_ =
    ListBucketInventoryConfigurationsResponse' :: Maybe Text
-> Maybe [InventoryConfiguration]
-> Maybe Text
-> Maybe Bool
-> Int
-> ListBucketInventoryConfigurationsResponse
ListBucketInventoryConfigurationsResponse'
      { $sel:continuationToken:ListBucketInventoryConfigurationsResponse' :: Maybe Text
continuationToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:inventoryConfigurationList:ListBucketInventoryConfigurationsResponse' :: Maybe [InventoryConfiguration]
inventoryConfigurationList =
          Maybe [InventoryConfiguration]
forall a. Maybe a
Prelude.Nothing,
        $sel:nextContinuationToken:ListBucketInventoryConfigurationsResponse' :: Maybe Text
nextContinuationToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:isTruncated:ListBucketInventoryConfigurationsResponse' :: Maybe Bool
isTruncated = Maybe Bool
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 :: (Maybe Text -> f (Maybe Text))
-> ListBucketInventoryConfigurationsResponse
-> f ListBucketInventoryConfigurationsResponse
listBucketInventoryConfigurationsResponse_continuationToken = (ListBucketInventoryConfigurationsResponse -> Maybe Text)
-> (ListBucketInventoryConfigurationsResponse
    -> Maybe Text -> ListBucketInventoryConfigurationsResponse)
-> Lens
     ListBucketInventoryConfigurationsResponse
     ListBucketInventoryConfigurationsResponse
     (Maybe Text)
     (Maybe Text)
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 :: (Maybe [InventoryConfiguration]
 -> f (Maybe [InventoryConfiguration]))
-> ListBucketInventoryConfigurationsResponse
-> f ListBucketInventoryConfigurationsResponse
listBucketInventoryConfigurationsResponse_inventoryConfigurationList = (ListBucketInventoryConfigurationsResponse
 -> Maybe [InventoryConfiguration])
-> (ListBucketInventoryConfigurationsResponse
    -> Maybe [InventoryConfiguration]
    -> ListBucketInventoryConfigurationsResponse)
-> Lens
     ListBucketInventoryConfigurationsResponse
     ListBucketInventoryConfigurationsResponse
     (Maybe [InventoryConfiguration])
     (Maybe [InventoryConfiguration])
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) ((Maybe [InventoryConfiguration]
  -> f (Maybe [InventoryConfiguration]))
 -> ListBucketInventoryConfigurationsResponse
 -> f ListBucketInventoryConfigurationsResponse)
-> ((Maybe [InventoryConfiguration]
     -> f (Maybe [InventoryConfiguration]))
    -> Maybe [InventoryConfiguration]
    -> f (Maybe [InventoryConfiguration]))
-> (Maybe [InventoryConfiguration]
    -> f (Maybe [InventoryConfiguration]))
-> ListBucketInventoryConfigurationsResponse
-> f ListBucketInventoryConfigurationsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [InventoryConfiguration]
  [InventoryConfiguration]
  [InventoryConfiguration]
  [InventoryConfiguration]
-> Iso
     (Maybe [InventoryConfiguration])
     (Maybe [InventoryConfiguration])
     (Maybe [InventoryConfiguration])
     (Maybe [InventoryConfiguration])
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 AnIso
  [InventoryConfiguration]
  [InventoryConfiguration]
  [InventoryConfiguration]
  [InventoryConfiguration]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> ListBucketInventoryConfigurationsResponse
-> f ListBucketInventoryConfigurationsResponse
listBucketInventoryConfigurationsResponse_nextContinuationToken = (ListBucketInventoryConfigurationsResponse -> Maybe Text)
-> (ListBucketInventoryConfigurationsResponse
    -> Maybe Text -> ListBucketInventoryConfigurationsResponse)
-> Lens
     ListBucketInventoryConfigurationsResponse
     ListBucketInventoryConfigurationsResponse
     (Maybe Text)
     (Maybe Text)
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)

-- | 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 :: (Maybe Bool -> f (Maybe Bool))
-> ListBucketInventoryConfigurationsResponse
-> f ListBucketInventoryConfigurationsResponse
listBucketInventoryConfigurationsResponse_isTruncated = (ListBucketInventoryConfigurationsResponse -> Maybe Bool)
-> (ListBucketInventoryConfigurationsResponse
    -> Maybe Bool -> ListBucketInventoryConfigurationsResponse)
-> Lens
     ListBucketInventoryConfigurationsResponse
     ListBucketInventoryConfigurationsResponse
     (Maybe Bool)
     (Maybe Bool)
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 response's http status code.
listBucketInventoryConfigurationsResponse_httpStatus :: Lens.Lens' ListBucketInventoryConfigurationsResponse Prelude.Int
listBucketInventoryConfigurationsResponse_httpStatus :: (Int -> f Int)
-> ListBucketInventoryConfigurationsResponse
-> f ListBucketInventoryConfigurationsResponse
listBucketInventoryConfigurationsResponse_httpStatus = (ListBucketInventoryConfigurationsResponse -> Int)
-> (ListBucketInventoryConfigurationsResponse
    -> Int -> ListBucketInventoryConfigurationsResponse)
-> Lens
     ListBucketInventoryConfigurationsResponse
     ListBucketInventoryConfigurationsResponse
     Int
     Int
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