{-# 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.ListObjectsV2
-- 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 some or all (up to 1,000) of the objects in a bucket with each
-- request. You can use the request parameters as selection criteria to
-- return a subset of the objects in a bucket. A @200 OK@ response can
-- contain valid or invalid XML. Make sure to design your application to
-- parse the contents of the response and handle it appropriately. Objects
-- are returned sorted in an ascending order of the respective key names in
-- the list. For more information about listing objects, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/ListingKeysUsingAPIs.html Listing object keys programmatically>
--
-- To use this operation, you must have READ access to the bucket.
--
-- To use this action in an Identity and Access Management (IAM) policy,
-- you must have permissions to perform the @s3:ListBucket@ 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>.
--
-- This section describes the latest revision of this action. We recommend
-- that you use this revised API for application development. For backward
-- compatibility, Amazon S3 continues to support the prior version of this
-- API,
-- <https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html ListObjects>.
--
-- To get a list of your buckets, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html ListBuckets>.
--
-- The following operations are related to @ListObjectsV2@:
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html GetObject>
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html PutObject>
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html CreateBucket>
--
-- This operation returns paginated results.
module Amazonka.S3.ListObjectsV2
  ( -- * Creating a Request
    ListObjectsV2 (..),
    newListObjectsV2,

    -- * Request Lenses
    listObjectsV2_continuationToken,
    listObjectsV2_delimiter,
    listObjectsV2_encodingType,
    listObjectsV2_expectedBucketOwner,
    listObjectsV2_fetchOwner,
    listObjectsV2_maxKeys,
    listObjectsV2_prefix,
    listObjectsV2_requestPayer,
    listObjectsV2_startAfter,
    listObjectsV2_bucket,

    -- * Destructuring the Response
    ListObjectsV2Response (..),
    newListObjectsV2Response,

    -- * Response Lenses
    listObjectsV2Response_commonPrefixes,
    listObjectsV2Response_contents,
    listObjectsV2Response_continuationToken,
    listObjectsV2Response_delimiter,
    listObjectsV2Response_encodingType,
    listObjectsV2Response_isTruncated,
    listObjectsV2Response_keyCount,
    listObjectsV2Response_maxKeys,
    listObjectsV2Response_name,
    listObjectsV2Response_nextContinuationToken,
    listObjectsV2Response_prefix,
    listObjectsV2Response_startAfter,
    listObjectsV2Response_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:/ 'newListObjectsV2' smart constructor.
data ListObjectsV2 = ListObjectsV2'
  { -- | ContinuationToken indicates Amazon S3 that the list is being continued
    -- on this bucket with a token. ContinuationToken is obfuscated and is not
    -- a real key.
    ListObjectsV2 -> Maybe Text
continuationToken :: Prelude.Maybe Prelude.Text,
    -- | A delimiter is a character you use to group keys.
    ListObjectsV2 -> Maybe Delimiter
delimiter :: Prelude.Maybe Delimiter,
    -- | Encoding type used by Amazon S3 to encode object keys in the response.
    ListObjectsV2 -> Maybe EncodingType
encodingType :: Prelude.Maybe EncodingType,
    -- | 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).
    ListObjectsV2 -> Maybe Text
expectedBucketOwner :: Prelude.Maybe Prelude.Text,
    -- | The owner field is not present in listV2 by default, if you want to
    -- return owner field with each key in the result then set the fetch owner
    -- field to true.
    ListObjectsV2 -> Maybe Bool
fetchOwner :: Prelude.Maybe Prelude.Bool,
    -- | Sets the maximum number of keys returned in the response. By default the
    -- action returns up to 1,000 key names. The response might contain fewer
    -- keys but will never contain more.
    ListObjectsV2 -> Maybe Int
maxKeys :: Prelude.Maybe Prelude.Int,
    -- | Limits the response to keys that begin with the specified prefix.
    ListObjectsV2 -> Maybe Text
prefix :: Prelude.Maybe Prelude.Text,
    -- | Confirms that the requester knows that she or he will be charged for the
    -- list objects request in V2 style. Bucket owners need not specify this
    -- parameter in their requests.
    ListObjectsV2 -> Maybe RequestPayer
requestPayer :: Prelude.Maybe RequestPayer,
    -- | StartAfter is where you want Amazon S3 to start listing from. Amazon S3
    -- starts listing after this specified key. StartAfter can be any key in
    -- the bucket.
    ListObjectsV2 -> Maybe Text
startAfter :: Prelude.Maybe Prelude.Text,
    -- | Bucket name to list.
    --
    -- When using this action with an access point, you must direct requests to
    -- the access point hostname. The access point hostname takes the form
    -- /AccessPointName/-/AccountId/.s3-accesspoint./Region/.amazonaws.com.
    -- When using this action with an access point through the Amazon Web
    -- Services SDKs, you provide the access point ARN in place of the bucket
    -- name. For more information about access point ARNs, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html Using access points>
    -- in the /Amazon S3 User Guide/.
    --
    -- When using this action with Amazon S3 on Outposts, you must direct
    -- requests to the S3 on Outposts hostname. The S3 on Outposts hostname
    -- takes the form
    -- @ @/@AccessPointName@/@-@/@AccountId@/@.@/@outpostID@/@.s3-outposts.@/@Region@/@.amazonaws.com@.
    -- When using this action with S3 on Outposts through the Amazon Web
    -- Services SDKs, you provide the Outposts bucket ARN in place of the
    -- bucket name. For more information about S3 on Outposts ARNs, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html Using Amazon S3 on Outposts>
    -- in the /Amazon S3 User Guide/.
    ListObjectsV2 -> BucketName
bucket :: BucketName
  }
  deriving (ListObjectsV2 -> ListObjectsV2 -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListObjectsV2 -> ListObjectsV2 -> Bool
$c/= :: ListObjectsV2 -> ListObjectsV2 -> Bool
== :: ListObjectsV2 -> ListObjectsV2 -> Bool
$c== :: ListObjectsV2 -> ListObjectsV2 -> Bool
Prelude.Eq, ReadPrec [ListObjectsV2]
ReadPrec ListObjectsV2
Int -> ReadS ListObjectsV2
ReadS [ListObjectsV2]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListObjectsV2]
$creadListPrec :: ReadPrec [ListObjectsV2]
readPrec :: ReadPrec ListObjectsV2
$creadPrec :: ReadPrec ListObjectsV2
readList :: ReadS [ListObjectsV2]
$creadList :: ReadS [ListObjectsV2]
readsPrec :: Int -> ReadS ListObjectsV2
$creadsPrec :: Int -> ReadS ListObjectsV2
Prelude.Read, Int -> ListObjectsV2 -> ShowS
[ListObjectsV2] -> ShowS
ListObjectsV2 -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListObjectsV2] -> ShowS
$cshowList :: [ListObjectsV2] -> ShowS
show :: ListObjectsV2 -> String
$cshow :: ListObjectsV2 -> String
showsPrec :: Int -> ListObjectsV2 -> ShowS
$cshowsPrec :: Int -> ListObjectsV2 -> ShowS
Prelude.Show, forall x. Rep ListObjectsV2 x -> ListObjectsV2
forall x. ListObjectsV2 -> Rep ListObjectsV2 x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListObjectsV2 x -> ListObjectsV2
$cfrom :: forall x. ListObjectsV2 -> Rep ListObjectsV2 x
Prelude.Generic)

-- |
-- Create a value of 'ListObjectsV2' 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', 'listObjectsV2_continuationToken' - ContinuationToken indicates Amazon S3 that the list is being continued
-- on this bucket with a token. ContinuationToken is obfuscated and is not
-- a real key.
--
-- 'delimiter', 'listObjectsV2_delimiter' - A delimiter is a character you use to group keys.
--
-- 'encodingType', 'listObjectsV2_encodingType' - Encoding type used by Amazon S3 to encode object keys in the response.
--
-- 'expectedBucketOwner', 'listObjectsV2_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).
--
-- 'fetchOwner', 'listObjectsV2_fetchOwner' - The owner field is not present in listV2 by default, if you want to
-- return owner field with each key in the result then set the fetch owner
-- field to true.
--
-- 'maxKeys', 'listObjectsV2_maxKeys' - Sets the maximum number of keys returned in the response. By default the
-- action returns up to 1,000 key names. The response might contain fewer
-- keys but will never contain more.
--
-- 'prefix', 'listObjectsV2_prefix' - Limits the response to keys that begin with the specified prefix.
--
-- 'requestPayer', 'listObjectsV2_requestPayer' - Confirms that the requester knows that she or he will be charged for the
-- list objects request in V2 style. Bucket owners need not specify this
-- parameter in their requests.
--
-- 'startAfter', 'listObjectsV2_startAfter' - StartAfter is where you want Amazon S3 to start listing from. Amazon S3
-- starts listing after this specified key. StartAfter can be any key in
-- the bucket.
--
-- 'bucket', 'listObjectsV2_bucket' - Bucket name to list.
--
-- When using this action with an access point, you must direct requests to
-- the access point hostname. The access point hostname takes the form
-- /AccessPointName/-/AccountId/.s3-accesspoint./Region/.amazonaws.com.
-- When using this action with an access point through the Amazon Web
-- Services SDKs, you provide the access point ARN in place of the bucket
-- name. For more information about access point ARNs, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html Using access points>
-- in the /Amazon S3 User Guide/.
--
-- When using this action with Amazon S3 on Outposts, you must direct
-- requests to the S3 on Outposts hostname. The S3 on Outposts hostname
-- takes the form
-- @ @/@AccessPointName@/@-@/@AccountId@/@.@/@outpostID@/@.s3-outposts.@/@Region@/@.amazonaws.com@.
-- When using this action with S3 on Outposts through the Amazon Web
-- Services SDKs, you provide the Outposts bucket ARN in place of the
-- bucket name. For more information about S3 on Outposts ARNs, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html Using Amazon S3 on Outposts>
-- in the /Amazon S3 User Guide/.
newListObjectsV2 ::
  -- | 'bucket'
  BucketName ->
  ListObjectsV2
newListObjectsV2 :: BucketName -> ListObjectsV2
newListObjectsV2 BucketName
pBucket_ =
  ListObjectsV2'
    { $sel:continuationToken:ListObjectsV2' :: Maybe Text
continuationToken = forall a. Maybe a
Prelude.Nothing,
      $sel:delimiter:ListObjectsV2' :: Maybe Delimiter
delimiter = forall a. Maybe a
Prelude.Nothing,
      $sel:encodingType:ListObjectsV2' :: Maybe EncodingType
encodingType = forall a. Maybe a
Prelude.Nothing,
      $sel:expectedBucketOwner:ListObjectsV2' :: Maybe Text
expectedBucketOwner = forall a. Maybe a
Prelude.Nothing,
      $sel:fetchOwner:ListObjectsV2' :: Maybe Bool
fetchOwner = forall a. Maybe a
Prelude.Nothing,
      $sel:maxKeys:ListObjectsV2' :: Maybe Int
maxKeys = forall a. Maybe a
Prelude.Nothing,
      $sel:prefix:ListObjectsV2' :: Maybe Text
prefix = forall a. Maybe a
Prelude.Nothing,
      $sel:requestPayer:ListObjectsV2' :: Maybe RequestPayer
requestPayer = forall a. Maybe a
Prelude.Nothing,
      $sel:startAfter:ListObjectsV2' :: Maybe Text
startAfter = forall a. Maybe a
Prelude.Nothing,
      $sel:bucket:ListObjectsV2' :: BucketName
bucket = BucketName
pBucket_
    }

-- | ContinuationToken indicates Amazon S3 that the list is being continued
-- on this bucket with a token. ContinuationToken is obfuscated and is not
-- a real key.
listObjectsV2_continuationToken :: Lens.Lens' ListObjectsV2 (Prelude.Maybe Prelude.Text)
listObjectsV2_continuationToken :: Lens' ListObjectsV2 (Maybe Text)
listObjectsV2_continuationToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsV2' {Maybe Text
continuationToken :: Maybe Text
$sel:continuationToken:ListObjectsV2' :: ListObjectsV2 -> Maybe Text
continuationToken} -> Maybe Text
continuationToken) (\s :: ListObjectsV2
s@ListObjectsV2' {} Maybe Text
a -> ListObjectsV2
s {$sel:continuationToken:ListObjectsV2' :: Maybe Text
continuationToken = Maybe Text
a} :: ListObjectsV2)

-- | A delimiter is a character you use to group keys.
listObjectsV2_delimiter :: Lens.Lens' ListObjectsV2 (Prelude.Maybe Delimiter)
listObjectsV2_delimiter :: Lens' ListObjectsV2 (Maybe Delimiter)
listObjectsV2_delimiter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsV2' {Maybe Delimiter
delimiter :: Maybe Delimiter
$sel:delimiter:ListObjectsV2' :: ListObjectsV2 -> Maybe Delimiter
delimiter} -> Maybe Delimiter
delimiter) (\s :: ListObjectsV2
s@ListObjectsV2' {} Maybe Delimiter
a -> ListObjectsV2
s {$sel:delimiter:ListObjectsV2' :: Maybe Delimiter
delimiter = Maybe Delimiter
a} :: ListObjectsV2)

-- | Encoding type used by Amazon S3 to encode object keys in the response.
listObjectsV2_encodingType :: Lens.Lens' ListObjectsV2 (Prelude.Maybe EncodingType)
listObjectsV2_encodingType :: Lens' ListObjectsV2 (Maybe EncodingType)
listObjectsV2_encodingType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsV2' {Maybe EncodingType
encodingType :: Maybe EncodingType
$sel:encodingType:ListObjectsV2' :: ListObjectsV2 -> Maybe EncodingType
encodingType} -> Maybe EncodingType
encodingType) (\s :: ListObjectsV2
s@ListObjectsV2' {} Maybe EncodingType
a -> ListObjectsV2
s {$sel:encodingType:ListObjectsV2' :: Maybe EncodingType
encodingType = Maybe EncodingType
a} :: ListObjectsV2)

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

-- | The owner field is not present in listV2 by default, if you want to
-- return owner field with each key in the result then set the fetch owner
-- field to true.
listObjectsV2_fetchOwner :: Lens.Lens' ListObjectsV2 (Prelude.Maybe Prelude.Bool)
listObjectsV2_fetchOwner :: Lens' ListObjectsV2 (Maybe Bool)
listObjectsV2_fetchOwner = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsV2' {Maybe Bool
fetchOwner :: Maybe Bool
$sel:fetchOwner:ListObjectsV2' :: ListObjectsV2 -> Maybe Bool
fetchOwner} -> Maybe Bool
fetchOwner) (\s :: ListObjectsV2
s@ListObjectsV2' {} Maybe Bool
a -> ListObjectsV2
s {$sel:fetchOwner:ListObjectsV2' :: Maybe Bool
fetchOwner = Maybe Bool
a} :: ListObjectsV2)

-- | Sets the maximum number of keys returned in the response. By default the
-- action returns up to 1,000 key names. The response might contain fewer
-- keys but will never contain more.
listObjectsV2_maxKeys :: Lens.Lens' ListObjectsV2 (Prelude.Maybe Prelude.Int)
listObjectsV2_maxKeys :: Lens' ListObjectsV2 (Maybe Int)
listObjectsV2_maxKeys = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsV2' {Maybe Int
maxKeys :: Maybe Int
$sel:maxKeys:ListObjectsV2' :: ListObjectsV2 -> Maybe Int
maxKeys} -> Maybe Int
maxKeys) (\s :: ListObjectsV2
s@ListObjectsV2' {} Maybe Int
a -> ListObjectsV2
s {$sel:maxKeys:ListObjectsV2' :: Maybe Int
maxKeys = Maybe Int
a} :: ListObjectsV2)

-- | Limits the response to keys that begin with the specified prefix.
listObjectsV2_prefix :: Lens.Lens' ListObjectsV2 (Prelude.Maybe Prelude.Text)
listObjectsV2_prefix :: Lens' ListObjectsV2 (Maybe Text)
listObjectsV2_prefix = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsV2' {Maybe Text
prefix :: Maybe Text
$sel:prefix:ListObjectsV2' :: ListObjectsV2 -> Maybe Text
prefix} -> Maybe Text
prefix) (\s :: ListObjectsV2
s@ListObjectsV2' {} Maybe Text
a -> ListObjectsV2
s {$sel:prefix:ListObjectsV2' :: Maybe Text
prefix = Maybe Text
a} :: ListObjectsV2)

-- | Confirms that the requester knows that she or he will be charged for the
-- list objects request in V2 style. Bucket owners need not specify this
-- parameter in their requests.
listObjectsV2_requestPayer :: Lens.Lens' ListObjectsV2 (Prelude.Maybe RequestPayer)
listObjectsV2_requestPayer :: Lens' ListObjectsV2 (Maybe RequestPayer)
listObjectsV2_requestPayer = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsV2' {Maybe RequestPayer
requestPayer :: Maybe RequestPayer
$sel:requestPayer:ListObjectsV2' :: ListObjectsV2 -> Maybe RequestPayer
requestPayer} -> Maybe RequestPayer
requestPayer) (\s :: ListObjectsV2
s@ListObjectsV2' {} Maybe RequestPayer
a -> ListObjectsV2
s {$sel:requestPayer:ListObjectsV2' :: Maybe RequestPayer
requestPayer = Maybe RequestPayer
a} :: ListObjectsV2)

-- | StartAfter is where you want Amazon S3 to start listing from. Amazon S3
-- starts listing after this specified key. StartAfter can be any key in
-- the bucket.
listObjectsV2_startAfter :: Lens.Lens' ListObjectsV2 (Prelude.Maybe Prelude.Text)
listObjectsV2_startAfter :: Lens' ListObjectsV2 (Maybe Text)
listObjectsV2_startAfter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsV2' {Maybe Text
startAfter :: Maybe Text
$sel:startAfter:ListObjectsV2' :: ListObjectsV2 -> Maybe Text
startAfter} -> Maybe Text
startAfter) (\s :: ListObjectsV2
s@ListObjectsV2' {} Maybe Text
a -> ListObjectsV2
s {$sel:startAfter:ListObjectsV2' :: Maybe Text
startAfter = Maybe Text
a} :: ListObjectsV2)

-- | Bucket name to list.
--
-- When using this action with an access point, you must direct requests to
-- the access point hostname. The access point hostname takes the form
-- /AccessPointName/-/AccountId/.s3-accesspoint./Region/.amazonaws.com.
-- When using this action with an access point through the Amazon Web
-- Services SDKs, you provide the access point ARN in place of the bucket
-- name. For more information about access point ARNs, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html Using access points>
-- in the /Amazon S3 User Guide/.
--
-- When using this action with Amazon S3 on Outposts, you must direct
-- requests to the S3 on Outposts hostname. The S3 on Outposts hostname
-- takes the form
-- @ @/@AccessPointName@/@-@/@AccountId@/@.@/@outpostID@/@.s3-outposts.@/@Region@/@.amazonaws.com@.
-- When using this action with S3 on Outposts through the Amazon Web
-- Services SDKs, you provide the Outposts bucket ARN in place of the
-- bucket name. For more information about S3 on Outposts ARNs, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html Using Amazon S3 on Outposts>
-- in the /Amazon S3 User Guide/.
listObjectsV2_bucket :: Lens.Lens' ListObjectsV2 BucketName
listObjectsV2_bucket :: Lens' ListObjectsV2 BucketName
listObjectsV2_bucket = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsV2' {BucketName
bucket :: BucketName
$sel:bucket:ListObjectsV2' :: ListObjectsV2 -> BucketName
bucket} -> BucketName
bucket) (\s :: ListObjectsV2
s@ListObjectsV2' {} BucketName
a -> ListObjectsV2
s {$sel:bucket:ListObjectsV2' :: BucketName
bucket = BucketName
a} :: ListObjectsV2)

instance Core.AWSPager ListObjectsV2 where
  page :: ListObjectsV2 -> AWSResponse ListObjectsV2 -> Maybe ListObjectsV2
page ListObjectsV2
rq AWSResponse ListObjectsV2
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListObjectsV2
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListObjectsV2Response (Maybe Bool)
listObjectsV2Response_isTruncated
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. Maybe a -> Bool
Prelude.isNothing
        ( AWSResponse ListObjectsV2
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListObjectsV2Response (Maybe Text)
listObjectsV2Response_nextContinuationToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListObjectsV2
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListObjectsV2 (Maybe Text)
listObjectsV2_continuationToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListObjectsV2
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListObjectsV2Response (Maybe Text)
listObjectsV2Response_nextContinuationToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListObjectsV2 where
  type
    AWSResponse ListObjectsV2 =
      ListObjectsV2Response
  request :: (Service -> Service) -> ListObjectsV2 -> Request ListObjectsV2
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 ListObjectsV2
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListObjectsV2)))
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 [CommonPrefix]
-> Maybe [Object]
-> Maybe Text
-> Maybe Delimiter
-> Maybe EncodingType
-> Maybe Bool
-> Maybe Int
-> Maybe Int
-> Maybe BucketName
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> ListObjectsV2Response
ListObjectsV2Response'
            forall (f :: * -> *) a b. Functor 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
"CommonPrefixes") [Node]
x)
            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
"Contents") [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
"ContinuationToken")
            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
"Delimiter")
            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
"EncodingType")
            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
"KeyCount")
            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
"MaxKeys")
            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
"Name")
            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.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Prefix")
            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
"StartAfter")
            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 ListObjectsV2 where
  hashWithSalt :: Int -> ListObjectsV2 -> Int
hashWithSalt Int
_salt ListObjectsV2' {Maybe Bool
Maybe Delimiter
Maybe Int
Maybe Text
Maybe EncodingType
Maybe RequestPayer
BucketName
bucket :: BucketName
startAfter :: Maybe Text
requestPayer :: Maybe RequestPayer
prefix :: Maybe Text
maxKeys :: Maybe Int
fetchOwner :: Maybe Bool
expectedBucketOwner :: Maybe Text
encodingType :: Maybe EncodingType
delimiter :: Maybe Delimiter
continuationToken :: Maybe Text
$sel:bucket:ListObjectsV2' :: ListObjectsV2 -> BucketName
$sel:startAfter:ListObjectsV2' :: ListObjectsV2 -> Maybe Text
$sel:requestPayer:ListObjectsV2' :: ListObjectsV2 -> Maybe RequestPayer
$sel:prefix:ListObjectsV2' :: ListObjectsV2 -> Maybe Text
$sel:maxKeys:ListObjectsV2' :: ListObjectsV2 -> Maybe Int
$sel:fetchOwner:ListObjectsV2' :: ListObjectsV2 -> Maybe Bool
$sel:expectedBucketOwner:ListObjectsV2' :: ListObjectsV2 -> Maybe Text
$sel:encodingType:ListObjectsV2' :: ListObjectsV2 -> Maybe EncodingType
$sel:delimiter:ListObjectsV2' :: ListObjectsV2 -> Maybe Delimiter
$sel:continuationToken:ListObjectsV2' :: ListObjectsV2 -> 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 Delimiter
delimiter
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EncodingType
encodingType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
expectedBucketOwner
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
fetchOwner
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxKeys
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
prefix
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RequestPayer
requestPayer
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
startAfter
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` BucketName
bucket

instance Prelude.NFData ListObjectsV2 where
  rnf :: ListObjectsV2 -> ()
rnf ListObjectsV2' {Maybe Bool
Maybe Delimiter
Maybe Int
Maybe Text
Maybe EncodingType
Maybe RequestPayer
BucketName
bucket :: BucketName
startAfter :: Maybe Text
requestPayer :: Maybe RequestPayer
prefix :: Maybe Text
maxKeys :: Maybe Int
fetchOwner :: Maybe Bool
expectedBucketOwner :: Maybe Text
encodingType :: Maybe EncodingType
delimiter :: Maybe Delimiter
continuationToken :: Maybe Text
$sel:bucket:ListObjectsV2' :: ListObjectsV2 -> BucketName
$sel:startAfter:ListObjectsV2' :: ListObjectsV2 -> Maybe Text
$sel:requestPayer:ListObjectsV2' :: ListObjectsV2 -> Maybe RequestPayer
$sel:prefix:ListObjectsV2' :: ListObjectsV2 -> Maybe Text
$sel:maxKeys:ListObjectsV2' :: ListObjectsV2 -> Maybe Int
$sel:fetchOwner:ListObjectsV2' :: ListObjectsV2 -> Maybe Bool
$sel:expectedBucketOwner:ListObjectsV2' :: ListObjectsV2 -> Maybe Text
$sel:encodingType:ListObjectsV2' :: ListObjectsV2 -> Maybe EncodingType
$sel:delimiter:ListObjectsV2' :: ListObjectsV2 -> Maybe Delimiter
$sel:continuationToken:ListObjectsV2' :: ListObjectsV2 -> 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 Delimiter
delimiter
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EncodingType
encodingType
      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 Maybe Bool
fetchOwner
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxKeys
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
prefix
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RequestPayer
requestPayer
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
startAfter
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf BucketName
bucket

instance Data.ToHeaders ListObjectsV2 where
  toHeaders :: ListObjectsV2 -> ResponseHeaders
toHeaders ListObjectsV2' {Maybe Bool
Maybe Delimiter
Maybe Int
Maybe Text
Maybe EncodingType
Maybe RequestPayer
BucketName
bucket :: BucketName
startAfter :: Maybe Text
requestPayer :: Maybe RequestPayer
prefix :: Maybe Text
maxKeys :: Maybe Int
fetchOwner :: Maybe Bool
expectedBucketOwner :: Maybe Text
encodingType :: Maybe EncodingType
delimiter :: Maybe Delimiter
continuationToken :: Maybe Text
$sel:bucket:ListObjectsV2' :: ListObjectsV2 -> BucketName
$sel:startAfter:ListObjectsV2' :: ListObjectsV2 -> Maybe Text
$sel:requestPayer:ListObjectsV2' :: ListObjectsV2 -> Maybe RequestPayer
$sel:prefix:ListObjectsV2' :: ListObjectsV2 -> Maybe Text
$sel:maxKeys:ListObjectsV2' :: ListObjectsV2 -> Maybe Int
$sel:fetchOwner:ListObjectsV2' :: ListObjectsV2 -> Maybe Bool
$sel:expectedBucketOwner:ListObjectsV2' :: ListObjectsV2 -> Maybe Text
$sel:encodingType:ListObjectsV2' :: ListObjectsV2 -> Maybe EncodingType
$sel:delimiter:ListObjectsV2' :: ListObjectsV2 -> Maybe Delimiter
$sel:continuationToken:ListObjectsV2' :: ListObjectsV2 -> 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,
        HeaderName
"x-amz-request-payer" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe RequestPayer
requestPayer
      ]

instance Data.ToPath ListObjectsV2 where
  toPath :: ListObjectsV2 -> ByteString
toPath ListObjectsV2' {Maybe Bool
Maybe Delimiter
Maybe Int
Maybe Text
Maybe EncodingType
Maybe RequestPayer
BucketName
bucket :: BucketName
startAfter :: Maybe Text
requestPayer :: Maybe RequestPayer
prefix :: Maybe Text
maxKeys :: Maybe Int
fetchOwner :: Maybe Bool
expectedBucketOwner :: Maybe Text
encodingType :: Maybe EncodingType
delimiter :: Maybe Delimiter
continuationToken :: Maybe Text
$sel:bucket:ListObjectsV2' :: ListObjectsV2 -> BucketName
$sel:startAfter:ListObjectsV2' :: ListObjectsV2 -> Maybe Text
$sel:requestPayer:ListObjectsV2' :: ListObjectsV2 -> Maybe RequestPayer
$sel:prefix:ListObjectsV2' :: ListObjectsV2 -> Maybe Text
$sel:maxKeys:ListObjectsV2' :: ListObjectsV2 -> Maybe Int
$sel:fetchOwner:ListObjectsV2' :: ListObjectsV2 -> Maybe Bool
$sel:expectedBucketOwner:ListObjectsV2' :: ListObjectsV2 -> Maybe Text
$sel:encodingType:ListObjectsV2' :: ListObjectsV2 -> Maybe EncodingType
$sel:delimiter:ListObjectsV2' :: ListObjectsV2 -> Maybe Delimiter
$sel:continuationToken:ListObjectsV2' :: ListObjectsV2 -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"/", forall a. ToByteString a => a -> ByteString
Data.toBS BucketName
bucket]

instance Data.ToQuery ListObjectsV2 where
  toQuery :: ListObjectsV2 -> QueryString
toQuery ListObjectsV2' {Maybe Bool
Maybe Delimiter
Maybe Int
Maybe Text
Maybe EncodingType
Maybe RequestPayer
BucketName
bucket :: BucketName
startAfter :: Maybe Text
requestPayer :: Maybe RequestPayer
prefix :: Maybe Text
maxKeys :: Maybe Int
fetchOwner :: Maybe Bool
expectedBucketOwner :: Maybe Text
encodingType :: Maybe EncodingType
delimiter :: Maybe Delimiter
continuationToken :: Maybe Text
$sel:bucket:ListObjectsV2' :: ListObjectsV2 -> BucketName
$sel:startAfter:ListObjectsV2' :: ListObjectsV2 -> Maybe Text
$sel:requestPayer:ListObjectsV2' :: ListObjectsV2 -> Maybe RequestPayer
$sel:prefix:ListObjectsV2' :: ListObjectsV2 -> Maybe Text
$sel:maxKeys:ListObjectsV2' :: ListObjectsV2 -> Maybe Int
$sel:fetchOwner:ListObjectsV2' :: ListObjectsV2 -> Maybe Bool
$sel:expectedBucketOwner:ListObjectsV2' :: ListObjectsV2 -> Maybe Text
$sel:encodingType:ListObjectsV2' :: ListObjectsV2 -> Maybe EncodingType
$sel:delimiter:ListObjectsV2' :: ListObjectsV2 -> Maybe Delimiter
$sel:continuationToken:ListObjectsV2' :: ListObjectsV2 -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"continuation-token" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
continuationToken,
        ByteString
"delimiter" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Delimiter
delimiter,
        ByteString
"encoding-type" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe EncodingType
encodingType,
        ByteString
"fetch-owner" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
fetchOwner,
        ByteString
"max-keys" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
maxKeys,
        ByteString
"prefix" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
prefix,
        ByteString
"start-after" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
startAfter,
        QueryString
"list-type=2"
      ]

-- | /See:/ 'newListObjectsV2Response' smart constructor.
data ListObjectsV2Response = ListObjectsV2Response'
  { -- | All of the keys (up to 1,000) rolled up into a common prefix count as a
    -- single return when calculating the number of returns.
    --
    -- A response can contain @CommonPrefixes@ only if you specify a delimiter.
    --
    -- @CommonPrefixes@ contains all (if there are any) keys between @Prefix@
    -- and the next occurrence of the string specified by a delimiter.
    --
    -- @CommonPrefixes@ lists keys that act like subdirectories in the
    -- directory specified by @Prefix@.
    --
    -- For example, if the prefix is @notes\/@ and the delimiter is a slash
    -- (@\/@) as in @notes\/summer\/july@, the common prefix is
    -- @notes\/summer\/@. All of the keys that roll up into a common prefix
    -- count as a single return when calculating the number of returns.
    ListObjectsV2Response -> Maybe [CommonPrefix]
commonPrefixes :: Prelude.Maybe [CommonPrefix],
    -- | Metadata about each object returned.
    ListObjectsV2Response -> Maybe [Object]
contents :: Prelude.Maybe [Object],
    -- | If ContinuationToken was sent with the request, it is included in the
    -- response.
    ListObjectsV2Response -> Maybe Text
continuationToken :: Prelude.Maybe Prelude.Text,
    -- | Causes keys that contain the same string between the prefix and the
    -- first occurrence of the delimiter to be rolled up into a single result
    -- element in the CommonPrefixes collection. These rolled-up keys are not
    -- returned elsewhere in the response. Each rolled-up result counts as only
    -- one return against the @MaxKeys@ value.
    ListObjectsV2Response -> Maybe Delimiter
delimiter :: Prelude.Maybe Delimiter,
    -- | Encoding type used by Amazon S3 to encode object key names in the XML
    -- response.
    --
    -- If you specify the encoding-type request parameter, Amazon S3 includes
    -- this element in the response, and returns encoded key name values in the
    -- following response elements:
    --
    -- @Delimiter, Prefix, Key,@ and @StartAfter@.
    ListObjectsV2Response -> Maybe EncodingType
encodingType :: Prelude.Maybe EncodingType,
    -- | Set to false if all of the results were returned. Set to true if more
    -- keys are available to return. If the number of results exceeds that
    -- specified by MaxKeys, all of the results might not be returned.
    ListObjectsV2Response -> Maybe Bool
isTruncated :: Prelude.Maybe Prelude.Bool,
    -- | KeyCount is the number of keys returned with this request. KeyCount will
    -- always be less than or equals to MaxKeys field. Say you ask for 50 keys,
    -- your result will include less than equals 50 keys
    ListObjectsV2Response -> Maybe Int
keyCount :: Prelude.Maybe Prelude.Int,
    -- | Sets the maximum number of keys returned in the response. By default the
    -- action returns up to 1,000 key names. The response might contain fewer
    -- keys but will never contain more.
    ListObjectsV2Response -> Maybe Int
maxKeys :: Prelude.Maybe Prelude.Int,
    -- | The bucket name.
    --
    -- When using this action with an access point, you must direct requests to
    -- the access point hostname. The access point hostname takes the form
    -- /AccessPointName/-/AccountId/.s3-accesspoint./Region/.amazonaws.com.
    -- When using this action with an access point through the Amazon Web
    -- Services SDKs, you provide the access point ARN in place of the bucket
    -- name. For more information about access point ARNs, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html Using access points>
    -- in the /Amazon S3 User Guide/.
    --
    -- When using this action with Amazon S3 on Outposts, you must direct
    -- requests to the S3 on Outposts hostname. The S3 on Outposts hostname
    -- takes the form
    -- @ @/@AccessPointName@/@-@/@AccountId@/@.@/@outpostID@/@.s3-outposts.@/@Region@/@.amazonaws.com@.
    -- When using this action with S3 on Outposts through the Amazon Web
    -- Services SDKs, you provide the Outposts bucket ARN in place of the
    -- bucket name. For more information about S3 on Outposts ARNs, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html Using Amazon S3 on Outposts>
    -- in the /Amazon S3 User Guide/.
    ListObjectsV2Response -> Maybe BucketName
name :: Prelude.Maybe BucketName,
    -- | @NextContinuationToken@ is sent when @isTruncated@ is true, which means
    -- there are more keys in the bucket that can be listed. The next list
    -- requests to Amazon S3 can be continued with this
    -- @NextContinuationToken@. @NextContinuationToken@ is obfuscated and is
    -- not a real key
    ListObjectsV2Response -> Maybe Text
nextContinuationToken :: Prelude.Maybe Prelude.Text,
    -- | Keys that begin with the indicated prefix.
    ListObjectsV2Response -> Maybe Text
prefix :: Prelude.Maybe Prelude.Text,
    -- | If StartAfter was sent with the request, it is included in the response.
    ListObjectsV2Response -> Maybe Text
startAfter :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListObjectsV2Response -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListObjectsV2Response -> ListObjectsV2Response -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListObjectsV2Response -> ListObjectsV2Response -> Bool
$c/= :: ListObjectsV2Response -> ListObjectsV2Response -> Bool
== :: ListObjectsV2Response -> ListObjectsV2Response -> Bool
$c== :: ListObjectsV2Response -> ListObjectsV2Response -> Bool
Prelude.Eq, ReadPrec [ListObjectsV2Response]
ReadPrec ListObjectsV2Response
Int -> ReadS ListObjectsV2Response
ReadS [ListObjectsV2Response]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListObjectsV2Response]
$creadListPrec :: ReadPrec [ListObjectsV2Response]
readPrec :: ReadPrec ListObjectsV2Response
$creadPrec :: ReadPrec ListObjectsV2Response
readList :: ReadS [ListObjectsV2Response]
$creadList :: ReadS [ListObjectsV2Response]
readsPrec :: Int -> ReadS ListObjectsV2Response
$creadsPrec :: Int -> ReadS ListObjectsV2Response
Prelude.Read, Int -> ListObjectsV2Response -> ShowS
[ListObjectsV2Response] -> ShowS
ListObjectsV2Response -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListObjectsV2Response] -> ShowS
$cshowList :: [ListObjectsV2Response] -> ShowS
show :: ListObjectsV2Response -> String
$cshow :: ListObjectsV2Response -> String
showsPrec :: Int -> ListObjectsV2Response -> ShowS
$cshowsPrec :: Int -> ListObjectsV2Response -> ShowS
Prelude.Show, forall x. Rep ListObjectsV2Response x -> ListObjectsV2Response
forall x. ListObjectsV2Response -> Rep ListObjectsV2Response x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListObjectsV2Response x -> ListObjectsV2Response
$cfrom :: forall x. ListObjectsV2Response -> Rep ListObjectsV2Response x
Prelude.Generic)

-- |
-- Create a value of 'ListObjectsV2Response' 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:
--
-- 'commonPrefixes', 'listObjectsV2Response_commonPrefixes' - All of the keys (up to 1,000) rolled up into a common prefix count as a
-- single return when calculating the number of returns.
--
-- A response can contain @CommonPrefixes@ only if you specify a delimiter.
--
-- @CommonPrefixes@ contains all (if there are any) keys between @Prefix@
-- and the next occurrence of the string specified by a delimiter.
--
-- @CommonPrefixes@ lists keys that act like subdirectories in the
-- directory specified by @Prefix@.
--
-- For example, if the prefix is @notes\/@ and the delimiter is a slash
-- (@\/@) as in @notes\/summer\/july@, the common prefix is
-- @notes\/summer\/@. All of the keys that roll up into a common prefix
-- count as a single return when calculating the number of returns.
--
-- 'contents', 'listObjectsV2Response_contents' - Metadata about each object returned.
--
-- 'continuationToken', 'listObjectsV2Response_continuationToken' - If ContinuationToken was sent with the request, it is included in the
-- response.
--
-- 'delimiter', 'listObjectsV2Response_delimiter' - Causes keys that contain the same string between the prefix and the
-- first occurrence of the delimiter to be rolled up into a single result
-- element in the CommonPrefixes collection. These rolled-up keys are not
-- returned elsewhere in the response. Each rolled-up result counts as only
-- one return against the @MaxKeys@ value.
--
-- 'encodingType', 'listObjectsV2Response_encodingType' - Encoding type used by Amazon S3 to encode object key names in the XML
-- response.
--
-- If you specify the encoding-type request parameter, Amazon S3 includes
-- this element in the response, and returns encoded key name values in the
-- following response elements:
--
-- @Delimiter, Prefix, Key,@ and @StartAfter@.
--
-- 'isTruncated', 'listObjectsV2Response_isTruncated' - Set to false if all of the results were returned. Set to true if more
-- keys are available to return. If the number of results exceeds that
-- specified by MaxKeys, all of the results might not be returned.
--
-- 'keyCount', 'listObjectsV2Response_keyCount' - KeyCount is the number of keys returned with this request. KeyCount will
-- always be less than or equals to MaxKeys field. Say you ask for 50 keys,
-- your result will include less than equals 50 keys
--
-- 'maxKeys', 'listObjectsV2Response_maxKeys' - Sets the maximum number of keys returned in the response. By default the
-- action returns up to 1,000 key names. The response might contain fewer
-- keys but will never contain more.
--
-- 'name', 'listObjectsV2Response_name' - The bucket name.
--
-- When using this action with an access point, you must direct requests to
-- the access point hostname. The access point hostname takes the form
-- /AccessPointName/-/AccountId/.s3-accesspoint./Region/.amazonaws.com.
-- When using this action with an access point through the Amazon Web
-- Services SDKs, you provide the access point ARN in place of the bucket
-- name. For more information about access point ARNs, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html Using access points>
-- in the /Amazon S3 User Guide/.
--
-- When using this action with Amazon S3 on Outposts, you must direct
-- requests to the S3 on Outposts hostname. The S3 on Outposts hostname
-- takes the form
-- @ @/@AccessPointName@/@-@/@AccountId@/@.@/@outpostID@/@.s3-outposts.@/@Region@/@.amazonaws.com@.
-- When using this action with S3 on Outposts through the Amazon Web
-- Services SDKs, you provide the Outposts bucket ARN in place of the
-- bucket name. For more information about S3 on Outposts ARNs, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html Using Amazon S3 on Outposts>
-- in the /Amazon S3 User Guide/.
--
-- 'nextContinuationToken', 'listObjectsV2Response_nextContinuationToken' - @NextContinuationToken@ is sent when @isTruncated@ is true, which means
-- there are more keys in the bucket that can be listed. The next list
-- requests to Amazon S3 can be continued with this
-- @NextContinuationToken@. @NextContinuationToken@ is obfuscated and is
-- not a real key
--
-- 'prefix', 'listObjectsV2Response_prefix' - Keys that begin with the indicated prefix.
--
-- 'startAfter', 'listObjectsV2Response_startAfter' - If StartAfter was sent with the request, it is included in the response.
--
-- 'httpStatus', 'listObjectsV2Response_httpStatus' - The response's http status code.
newListObjectsV2Response ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListObjectsV2Response
newListObjectsV2Response :: Int -> ListObjectsV2Response
newListObjectsV2Response Int
pHttpStatus_ =
  ListObjectsV2Response'
    { $sel:commonPrefixes:ListObjectsV2Response' :: Maybe [CommonPrefix]
commonPrefixes =
        forall a. Maybe a
Prelude.Nothing,
      $sel:contents:ListObjectsV2Response' :: Maybe [Object]
contents = forall a. Maybe a
Prelude.Nothing,
      $sel:continuationToken:ListObjectsV2Response' :: Maybe Text
continuationToken = forall a. Maybe a
Prelude.Nothing,
      $sel:delimiter:ListObjectsV2Response' :: Maybe Delimiter
delimiter = forall a. Maybe a
Prelude.Nothing,
      $sel:encodingType:ListObjectsV2Response' :: Maybe EncodingType
encodingType = forall a. Maybe a
Prelude.Nothing,
      $sel:isTruncated:ListObjectsV2Response' :: Maybe Bool
isTruncated = forall a. Maybe a
Prelude.Nothing,
      $sel:keyCount:ListObjectsV2Response' :: Maybe Int
keyCount = forall a. Maybe a
Prelude.Nothing,
      $sel:maxKeys:ListObjectsV2Response' :: Maybe Int
maxKeys = forall a. Maybe a
Prelude.Nothing,
      $sel:name:ListObjectsV2Response' :: Maybe BucketName
name = forall a. Maybe a
Prelude.Nothing,
      $sel:nextContinuationToken:ListObjectsV2Response' :: Maybe Text
nextContinuationToken = forall a. Maybe a
Prelude.Nothing,
      $sel:prefix:ListObjectsV2Response' :: Maybe Text
prefix = forall a. Maybe a
Prelude.Nothing,
      $sel:startAfter:ListObjectsV2Response' :: Maybe Text
startAfter = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListObjectsV2Response' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | All of the keys (up to 1,000) rolled up into a common prefix count as a
-- single return when calculating the number of returns.
--
-- A response can contain @CommonPrefixes@ only if you specify a delimiter.
--
-- @CommonPrefixes@ contains all (if there are any) keys between @Prefix@
-- and the next occurrence of the string specified by a delimiter.
--
-- @CommonPrefixes@ lists keys that act like subdirectories in the
-- directory specified by @Prefix@.
--
-- For example, if the prefix is @notes\/@ and the delimiter is a slash
-- (@\/@) as in @notes\/summer\/july@, the common prefix is
-- @notes\/summer\/@. All of the keys that roll up into a common prefix
-- count as a single return when calculating the number of returns.
listObjectsV2Response_commonPrefixes :: Lens.Lens' ListObjectsV2Response (Prelude.Maybe [CommonPrefix])
listObjectsV2Response_commonPrefixes :: Lens' ListObjectsV2Response (Maybe [CommonPrefix])
listObjectsV2Response_commonPrefixes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsV2Response' {Maybe [CommonPrefix]
commonPrefixes :: Maybe [CommonPrefix]
$sel:commonPrefixes:ListObjectsV2Response' :: ListObjectsV2Response -> Maybe [CommonPrefix]
commonPrefixes} -> Maybe [CommonPrefix]
commonPrefixes) (\s :: ListObjectsV2Response
s@ListObjectsV2Response' {} Maybe [CommonPrefix]
a -> ListObjectsV2Response
s {$sel:commonPrefixes:ListObjectsV2Response' :: Maybe [CommonPrefix]
commonPrefixes = Maybe [CommonPrefix]
a} :: ListObjectsV2Response) 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

-- | Metadata about each object returned.
listObjectsV2Response_contents :: Lens.Lens' ListObjectsV2Response (Prelude.Maybe [Object])
listObjectsV2Response_contents :: Lens' ListObjectsV2Response (Maybe [Object])
listObjectsV2Response_contents = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsV2Response' {Maybe [Object]
contents :: Maybe [Object]
$sel:contents:ListObjectsV2Response' :: ListObjectsV2Response -> Maybe [Object]
contents} -> Maybe [Object]
contents) (\s :: ListObjectsV2Response
s@ListObjectsV2Response' {} Maybe [Object]
a -> ListObjectsV2Response
s {$sel:contents:ListObjectsV2Response' :: Maybe [Object]
contents = Maybe [Object]
a} :: ListObjectsV2Response) 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

-- | If ContinuationToken was sent with the request, it is included in the
-- response.
listObjectsV2Response_continuationToken :: Lens.Lens' ListObjectsV2Response (Prelude.Maybe Prelude.Text)
listObjectsV2Response_continuationToken :: Lens' ListObjectsV2Response (Maybe Text)
listObjectsV2Response_continuationToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsV2Response' {Maybe Text
continuationToken :: Maybe Text
$sel:continuationToken:ListObjectsV2Response' :: ListObjectsV2Response -> Maybe Text
continuationToken} -> Maybe Text
continuationToken) (\s :: ListObjectsV2Response
s@ListObjectsV2Response' {} Maybe Text
a -> ListObjectsV2Response
s {$sel:continuationToken:ListObjectsV2Response' :: Maybe Text
continuationToken = Maybe Text
a} :: ListObjectsV2Response)

-- | Causes keys that contain the same string between the prefix and the
-- first occurrence of the delimiter to be rolled up into a single result
-- element in the CommonPrefixes collection. These rolled-up keys are not
-- returned elsewhere in the response. Each rolled-up result counts as only
-- one return against the @MaxKeys@ value.
listObjectsV2Response_delimiter :: Lens.Lens' ListObjectsV2Response (Prelude.Maybe Delimiter)
listObjectsV2Response_delimiter :: Lens' ListObjectsV2Response (Maybe Delimiter)
listObjectsV2Response_delimiter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsV2Response' {Maybe Delimiter
delimiter :: Maybe Delimiter
$sel:delimiter:ListObjectsV2Response' :: ListObjectsV2Response -> Maybe Delimiter
delimiter} -> Maybe Delimiter
delimiter) (\s :: ListObjectsV2Response
s@ListObjectsV2Response' {} Maybe Delimiter
a -> ListObjectsV2Response
s {$sel:delimiter:ListObjectsV2Response' :: Maybe Delimiter
delimiter = Maybe Delimiter
a} :: ListObjectsV2Response)

-- | Encoding type used by Amazon S3 to encode object key names in the XML
-- response.
--
-- If you specify the encoding-type request parameter, Amazon S3 includes
-- this element in the response, and returns encoded key name values in the
-- following response elements:
--
-- @Delimiter, Prefix, Key,@ and @StartAfter@.
listObjectsV2Response_encodingType :: Lens.Lens' ListObjectsV2Response (Prelude.Maybe EncodingType)
listObjectsV2Response_encodingType :: Lens' ListObjectsV2Response (Maybe EncodingType)
listObjectsV2Response_encodingType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsV2Response' {Maybe EncodingType
encodingType :: Maybe EncodingType
$sel:encodingType:ListObjectsV2Response' :: ListObjectsV2Response -> Maybe EncodingType
encodingType} -> Maybe EncodingType
encodingType) (\s :: ListObjectsV2Response
s@ListObjectsV2Response' {} Maybe EncodingType
a -> ListObjectsV2Response
s {$sel:encodingType:ListObjectsV2Response' :: Maybe EncodingType
encodingType = Maybe EncodingType
a} :: ListObjectsV2Response)

-- | Set to false if all of the results were returned. Set to true if more
-- keys are available to return. If the number of results exceeds that
-- specified by MaxKeys, all of the results might not be returned.
listObjectsV2Response_isTruncated :: Lens.Lens' ListObjectsV2Response (Prelude.Maybe Prelude.Bool)
listObjectsV2Response_isTruncated :: Lens' ListObjectsV2Response (Maybe Bool)
listObjectsV2Response_isTruncated = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsV2Response' {Maybe Bool
isTruncated :: Maybe Bool
$sel:isTruncated:ListObjectsV2Response' :: ListObjectsV2Response -> Maybe Bool
isTruncated} -> Maybe Bool
isTruncated) (\s :: ListObjectsV2Response
s@ListObjectsV2Response' {} Maybe Bool
a -> ListObjectsV2Response
s {$sel:isTruncated:ListObjectsV2Response' :: Maybe Bool
isTruncated = Maybe Bool
a} :: ListObjectsV2Response)

-- | KeyCount is the number of keys returned with this request. KeyCount will
-- always be less than or equals to MaxKeys field. Say you ask for 50 keys,
-- your result will include less than equals 50 keys
listObjectsV2Response_keyCount :: Lens.Lens' ListObjectsV2Response (Prelude.Maybe Prelude.Int)
listObjectsV2Response_keyCount :: Lens' ListObjectsV2Response (Maybe Int)
listObjectsV2Response_keyCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsV2Response' {Maybe Int
keyCount :: Maybe Int
$sel:keyCount:ListObjectsV2Response' :: ListObjectsV2Response -> Maybe Int
keyCount} -> Maybe Int
keyCount) (\s :: ListObjectsV2Response
s@ListObjectsV2Response' {} Maybe Int
a -> ListObjectsV2Response
s {$sel:keyCount:ListObjectsV2Response' :: Maybe Int
keyCount = Maybe Int
a} :: ListObjectsV2Response)

-- | Sets the maximum number of keys returned in the response. By default the
-- action returns up to 1,000 key names. The response might contain fewer
-- keys but will never contain more.
listObjectsV2Response_maxKeys :: Lens.Lens' ListObjectsV2Response (Prelude.Maybe Prelude.Int)
listObjectsV2Response_maxKeys :: Lens' ListObjectsV2Response (Maybe Int)
listObjectsV2Response_maxKeys = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsV2Response' {Maybe Int
maxKeys :: Maybe Int
$sel:maxKeys:ListObjectsV2Response' :: ListObjectsV2Response -> Maybe Int
maxKeys} -> Maybe Int
maxKeys) (\s :: ListObjectsV2Response
s@ListObjectsV2Response' {} Maybe Int
a -> ListObjectsV2Response
s {$sel:maxKeys:ListObjectsV2Response' :: Maybe Int
maxKeys = Maybe Int
a} :: ListObjectsV2Response)

-- | The bucket name.
--
-- When using this action with an access point, you must direct requests to
-- the access point hostname. The access point hostname takes the form
-- /AccessPointName/-/AccountId/.s3-accesspoint./Region/.amazonaws.com.
-- When using this action with an access point through the Amazon Web
-- Services SDKs, you provide the access point ARN in place of the bucket
-- name. For more information about access point ARNs, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html Using access points>
-- in the /Amazon S3 User Guide/.
--
-- When using this action with Amazon S3 on Outposts, you must direct
-- requests to the S3 on Outposts hostname. The S3 on Outposts hostname
-- takes the form
-- @ @/@AccessPointName@/@-@/@AccountId@/@.@/@outpostID@/@.s3-outposts.@/@Region@/@.amazonaws.com@.
-- When using this action with S3 on Outposts through the Amazon Web
-- Services SDKs, you provide the Outposts bucket ARN in place of the
-- bucket name. For more information about S3 on Outposts ARNs, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html Using Amazon S3 on Outposts>
-- in the /Amazon S3 User Guide/.
listObjectsV2Response_name :: Lens.Lens' ListObjectsV2Response (Prelude.Maybe BucketName)
listObjectsV2Response_name :: Lens' ListObjectsV2Response (Maybe BucketName)
listObjectsV2Response_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsV2Response' {Maybe BucketName
name :: Maybe BucketName
$sel:name:ListObjectsV2Response' :: ListObjectsV2Response -> Maybe BucketName
name} -> Maybe BucketName
name) (\s :: ListObjectsV2Response
s@ListObjectsV2Response' {} Maybe BucketName
a -> ListObjectsV2Response
s {$sel:name:ListObjectsV2Response' :: Maybe BucketName
name = Maybe BucketName
a} :: ListObjectsV2Response)

-- | @NextContinuationToken@ is sent when @isTruncated@ is true, which means
-- there are more keys in the bucket that can be listed. The next list
-- requests to Amazon S3 can be continued with this
-- @NextContinuationToken@. @NextContinuationToken@ is obfuscated and is
-- not a real key
listObjectsV2Response_nextContinuationToken :: Lens.Lens' ListObjectsV2Response (Prelude.Maybe Prelude.Text)
listObjectsV2Response_nextContinuationToken :: Lens' ListObjectsV2Response (Maybe Text)
listObjectsV2Response_nextContinuationToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsV2Response' {Maybe Text
nextContinuationToken :: Maybe Text
$sel:nextContinuationToken:ListObjectsV2Response' :: ListObjectsV2Response -> Maybe Text
nextContinuationToken} -> Maybe Text
nextContinuationToken) (\s :: ListObjectsV2Response
s@ListObjectsV2Response' {} Maybe Text
a -> ListObjectsV2Response
s {$sel:nextContinuationToken:ListObjectsV2Response' :: Maybe Text
nextContinuationToken = Maybe Text
a} :: ListObjectsV2Response)

-- | Keys that begin with the indicated prefix.
listObjectsV2Response_prefix :: Lens.Lens' ListObjectsV2Response (Prelude.Maybe Prelude.Text)
listObjectsV2Response_prefix :: Lens' ListObjectsV2Response (Maybe Text)
listObjectsV2Response_prefix = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsV2Response' {Maybe Text
prefix :: Maybe Text
$sel:prefix:ListObjectsV2Response' :: ListObjectsV2Response -> Maybe Text
prefix} -> Maybe Text
prefix) (\s :: ListObjectsV2Response
s@ListObjectsV2Response' {} Maybe Text
a -> ListObjectsV2Response
s {$sel:prefix:ListObjectsV2Response' :: Maybe Text
prefix = Maybe Text
a} :: ListObjectsV2Response)

-- | If StartAfter was sent with the request, it is included in the response.
listObjectsV2Response_startAfter :: Lens.Lens' ListObjectsV2Response (Prelude.Maybe Prelude.Text)
listObjectsV2Response_startAfter :: Lens' ListObjectsV2Response (Maybe Text)
listObjectsV2Response_startAfter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsV2Response' {Maybe Text
startAfter :: Maybe Text
$sel:startAfter:ListObjectsV2Response' :: ListObjectsV2Response -> Maybe Text
startAfter} -> Maybe Text
startAfter) (\s :: ListObjectsV2Response
s@ListObjectsV2Response' {} Maybe Text
a -> ListObjectsV2Response
s {$sel:startAfter:ListObjectsV2Response' :: Maybe Text
startAfter = Maybe Text
a} :: ListObjectsV2Response)

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

instance Prelude.NFData ListObjectsV2Response where
  rnf :: ListObjectsV2Response -> ()
rnf ListObjectsV2Response' {Int
Maybe Bool
Maybe Delimiter
Maybe Int
Maybe [CommonPrefix]
Maybe [Object]
Maybe Text
Maybe BucketName
Maybe EncodingType
httpStatus :: Int
startAfter :: Maybe Text
prefix :: Maybe Text
nextContinuationToken :: Maybe Text
name :: Maybe BucketName
maxKeys :: Maybe Int
keyCount :: Maybe Int
isTruncated :: Maybe Bool
encodingType :: Maybe EncodingType
delimiter :: Maybe Delimiter
continuationToken :: Maybe Text
contents :: Maybe [Object]
commonPrefixes :: Maybe [CommonPrefix]
$sel:httpStatus:ListObjectsV2Response' :: ListObjectsV2Response -> Int
$sel:startAfter:ListObjectsV2Response' :: ListObjectsV2Response -> Maybe Text
$sel:prefix:ListObjectsV2Response' :: ListObjectsV2Response -> Maybe Text
$sel:nextContinuationToken:ListObjectsV2Response' :: ListObjectsV2Response -> Maybe Text
$sel:name:ListObjectsV2Response' :: ListObjectsV2Response -> Maybe BucketName
$sel:maxKeys:ListObjectsV2Response' :: ListObjectsV2Response -> Maybe Int
$sel:keyCount:ListObjectsV2Response' :: ListObjectsV2Response -> Maybe Int
$sel:isTruncated:ListObjectsV2Response' :: ListObjectsV2Response -> Maybe Bool
$sel:encodingType:ListObjectsV2Response' :: ListObjectsV2Response -> Maybe EncodingType
$sel:delimiter:ListObjectsV2Response' :: ListObjectsV2Response -> Maybe Delimiter
$sel:continuationToken:ListObjectsV2Response' :: ListObjectsV2Response -> Maybe Text
$sel:contents:ListObjectsV2Response' :: ListObjectsV2Response -> Maybe [Object]
$sel:commonPrefixes:ListObjectsV2Response' :: ListObjectsV2Response -> Maybe [CommonPrefix]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [CommonPrefix]
commonPrefixes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Object]
contents
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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 Delimiter
delimiter
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EncodingType
encodingType
      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 Int
keyCount
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxKeys
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe BucketName
name
      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 Maybe Text
prefix
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
startAfter
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus