{-# 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.ListObjects
-- 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 some or all (up to 1,000) of the objects in a bucket. 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. Be sure to design your application to parse the contents of the
-- response and handle it appropriately.
--
-- This action has been revised. We recommend that you use the newer
-- version,
-- <https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html ListObjectsV2>,
-- when developing applications. For backward compatibility, Amazon S3
-- continues to support @ListObjects@.
--
-- The following operations are related to @ListObjects@:
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html 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>
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html ListBuckets>
--
-- This operation returns paginated results.
module Amazonka.S3.ListObjects
  ( -- * Creating a Request
    ListObjects (..),
    newListObjects,

    -- * Request Lenses
    listObjects_prefix,
    listObjects_encodingType,
    listObjects_requestPayer,
    listObjects_marker,
    listObjects_maxKeys,
    listObjects_delimiter,
    listObjects_expectedBucketOwner,
    listObjects_bucket,

    -- * Destructuring the Response
    ListObjectsResponse (..),
    newListObjectsResponse,

    -- * Response Lenses
    listObjectsResponse_contents,
    listObjectsResponse_prefix,
    listObjectsResponse_commonPrefixes,
    listObjectsResponse_encodingType,
    listObjectsResponse_name,
    listObjectsResponse_marker,
    listObjectsResponse_nextMarker,
    listObjectsResponse_maxKeys,
    listObjectsResponse_isTruncated,
    listObjectsResponse_delimiter,
    listObjectsResponse_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:/ 'newListObjects' smart constructor.
data ListObjects = ListObjects'
  { -- | Limits the response to keys that begin with the specified prefix.
    ListObjects -> Maybe Text
prefix :: Prelude.Maybe Prelude.Text,
    ListObjects -> Maybe EncodingType
encodingType :: Prelude.Maybe EncodingType,
    -- | Confirms that the requester knows that she or he will be charged for the
    -- list objects request. Bucket owners need not specify this parameter in
    -- their requests.
    ListObjects -> Maybe RequestPayer
requestPayer :: Prelude.Maybe RequestPayer,
    -- | Marker is where you want Amazon S3 to start listing from. Amazon S3
    -- starts listing after this specified key. Marker can be any key in the
    -- bucket.
    ListObjects -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | 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.
    ListObjects -> Maybe Int
maxKeys :: Prelude.Maybe Prelude.Int,
    -- | A delimiter is a character you use to group keys.
    ListObjects -> Maybe Delimiter
delimiter :: Prelude.Maybe Delimiter,
    -- | 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.
    ListObjects -> Maybe Text
expectedBucketOwner :: Prelude.Maybe Prelude.Text,
    -- | The name of the bucket containing the objects.
    --
    -- 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 using 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 S3 on Outposts>
    -- in the /Amazon S3 User Guide/.
    ListObjects -> BucketName
bucket :: BucketName
  }
  deriving (ListObjects -> ListObjects -> Bool
(ListObjects -> ListObjects -> Bool)
-> (ListObjects -> ListObjects -> Bool) -> Eq ListObjects
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListObjects -> ListObjects -> Bool
$c/= :: ListObjects -> ListObjects -> Bool
== :: ListObjects -> ListObjects -> Bool
$c== :: ListObjects -> ListObjects -> Bool
Prelude.Eq, ReadPrec [ListObjects]
ReadPrec ListObjects
Int -> ReadS ListObjects
ReadS [ListObjects]
(Int -> ReadS ListObjects)
-> ReadS [ListObjects]
-> ReadPrec ListObjects
-> ReadPrec [ListObjects]
-> Read ListObjects
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListObjects]
$creadListPrec :: ReadPrec [ListObjects]
readPrec :: ReadPrec ListObjects
$creadPrec :: ReadPrec ListObjects
readList :: ReadS [ListObjects]
$creadList :: ReadS [ListObjects]
readsPrec :: Int -> ReadS ListObjects
$creadsPrec :: Int -> ReadS ListObjects
Prelude.Read, Int -> ListObjects -> ShowS
[ListObjects] -> ShowS
ListObjects -> String
(Int -> ListObjects -> ShowS)
-> (ListObjects -> String)
-> ([ListObjects] -> ShowS)
-> Show ListObjects
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListObjects] -> ShowS
$cshowList :: [ListObjects] -> ShowS
show :: ListObjects -> String
$cshow :: ListObjects -> String
showsPrec :: Int -> ListObjects -> ShowS
$cshowsPrec :: Int -> ListObjects -> ShowS
Prelude.Show, (forall x. ListObjects -> Rep ListObjects x)
-> (forall x. Rep ListObjects x -> ListObjects)
-> Generic ListObjects
forall x. Rep ListObjects x -> ListObjects
forall x. ListObjects -> Rep ListObjects x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListObjects x -> ListObjects
$cfrom :: forall x. ListObjects -> Rep ListObjects x
Prelude.Generic)

-- |
-- Create a value of 'ListObjects' 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:
--
-- 'prefix', 'listObjects_prefix' - Limits the response to keys that begin with the specified prefix.
--
-- 'encodingType', 'listObjects_encodingType' - Undocumented member.
--
-- 'requestPayer', 'listObjects_requestPayer' - Confirms that the requester knows that she or he will be charged for the
-- list objects request. Bucket owners need not specify this parameter in
-- their requests.
--
-- 'marker', 'listObjects_marker' - Marker is where you want Amazon S3 to start listing from. Amazon S3
-- starts listing after this specified key. Marker can be any key in the
-- bucket.
--
-- 'maxKeys', 'listObjects_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.
--
-- 'delimiter', 'listObjects_delimiter' - A delimiter is a character you use to group keys.
--
-- 'expectedBucketOwner', 'listObjects_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', 'listObjects_bucket' - The name of the bucket containing the objects.
--
-- 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 using 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 S3 on Outposts>
-- in the /Amazon S3 User Guide/.
newListObjects ::
  -- | 'bucket'
  BucketName ->
  ListObjects
newListObjects :: BucketName -> ListObjects
newListObjects BucketName
pBucket_ =
  ListObjects' :: Maybe Text
-> Maybe EncodingType
-> Maybe RequestPayer
-> Maybe Text
-> Maybe Int
-> Maybe Delimiter
-> Maybe Text
-> BucketName
-> ListObjects
ListObjects'
    { $sel:prefix:ListObjects' :: Maybe Text
prefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:encodingType:ListObjects' :: Maybe EncodingType
encodingType = Maybe EncodingType
forall a. Maybe a
Prelude.Nothing,
      $sel:requestPayer:ListObjects' :: Maybe RequestPayer
requestPayer = Maybe RequestPayer
forall a. Maybe a
Prelude.Nothing,
      $sel:marker:ListObjects' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxKeys:ListObjects' :: Maybe Int
maxKeys = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:delimiter:ListObjects' :: Maybe Delimiter
delimiter = Maybe Delimiter
forall a. Maybe a
Prelude.Nothing,
      $sel:expectedBucketOwner:ListObjects' :: Maybe Text
expectedBucketOwner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:bucket:ListObjects' :: BucketName
bucket = BucketName
pBucket_
    }

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

-- | Undocumented member.
listObjects_encodingType :: Lens.Lens' ListObjects (Prelude.Maybe EncodingType)
listObjects_encodingType :: (Maybe EncodingType -> f (Maybe EncodingType))
-> ListObjects -> f ListObjects
listObjects_encodingType = (ListObjects -> Maybe EncodingType)
-> (ListObjects -> Maybe EncodingType -> ListObjects)
-> Lens
     ListObjects ListObjects (Maybe EncodingType) (Maybe EncodingType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjects' {Maybe EncodingType
encodingType :: Maybe EncodingType
$sel:encodingType:ListObjects' :: ListObjects -> Maybe EncodingType
encodingType} -> Maybe EncodingType
encodingType) (\s :: ListObjects
s@ListObjects' {} Maybe EncodingType
a -> ListObjects
s {$sel:encodingType:ListObjects' :: Maybe EncodingType
encodingType = Maybe EncodingType
a} :: ListObjects)

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

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

-- | 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.
listObjects_maxKeys :: Lens.Lens' ListObjects (Prelude.Maybe Prelude.Int)
listObjects_maxKeys :: (Maybe Int -> f (Maybe Int)) -> ListObjects -> f ListObjects
listObjects_maxKeys = (ListObjects -> Maybe Int)
-> (ListObjects -> Maybe Int -> ListObjects)
-> Lens ListObjects ListObjects (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjects' {Maybe Int
maxKeys :: Maybe Int
$sel:maxKeys:ListObjects' :: ListObjects -> Maybe Int
maxKeys} -> Maybe Int
maxKeys) (\s :: ListObjects
s@ListObjects' {} Maybe Int
a -> ListObjects
s {$sel:maxKeys:ListObjects' :: Maybe Int
maxKeys = Maybe Int
a} :: ListObjects)

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

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

-- | The name of the bucket containing the objects.
--
-- 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 using 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 S3 on Outposts>
-- in the /Amazon S3 User Guide/.
listObjects_bucket :: Lens.Lens' ListObjects BucketName
listObjects_bucket :: (BucketName -> f BucketName) -> ListObjects -> f ListObjects
listObjects_bucket = (ListObjects -> BucketName)
-> (ListObjects -> BucketName -> ListObjects)
-> Lens ListObjects ListObjects BucketName BucketName
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjects' {BucketName
bucket :: BucketName
$sel:bucket:ListObjects' :: ListObjects -> BucketName
bucket} -> BucketName
bucket) (\s :: ListObjects
s@ListObjects' {} BucketName
a -> ListObjects
s {$sel:bucket:ListObjects' :: BucketName
bucket = BucketName
a} :: ListObjects)

instance Core.AWSPager ListObjects where
  page :: ListObjects -> AWSResponse ListObjects -> Maybe ListObjects
page ListObjects
rq AWSResponse ListObjects
rs
    | Maybe Bool -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListObjects
ListObjectsResponse
rs
            ListObjectsResponse
-> Getting (First Bool) ListObjectsResponse Bool -> Maybe Bool
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Bool -> Const (First Bool) (Maybe Bool))
-> ListObjectsResponse -> Const (First Bool) ListObjectsResponse
Lens' ListObjectsResponse (Maybe Bool)
listObjectsResponse_isTruncated ((Maybe Bool -> Const (First Bool) (Maybe Bool))
 -> ListObjectsResponse -> Const (First Bool) ListObjectsResponse)
-> ((Bool -> Const (First Bool) Bool)
    -> Maybe Bool -> Const (First Bool) (Maybe Bool))
-> Getting (First Bool) ListObjectsResponse Bool
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Bool -> Const (First Bool) Bool)
-> Maybe Bool -> Const (First Bool) (Maybe Bool)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListObjects
forall a. Maybe a
Prelude.Nothing
    | Maybe Text -> Bool
forall a. Maybe a -> Bool
Prelude.isNothing
        ( AWSResponse ListObjects
ListObjectsResponse
rs
            ListObjectsResponse
-> Getting (Maybe Text) ListObjectsResponse (Maybe Text)
-> Maybe Text
forall s a. s -> Getting a s a -> a
Lens.^. (ListObjectsResponse -> Maybe Text)
-> (ListObjectsResponse -> Maybe ObjectKey)
-> Getter ListObjectsResponse (Maybe Text)
forall (f :: * -> *) a b s.
(Alternative f, ToText a, ToText b) =>
(s -> f a) -> (s -> f b) -> Getter s (f Text)
Core.choice
              ( ListObjectsResponse
-> Getting (First Text) ListObjectsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^?
                  ( (Maybe Text -> Const (First Text) (Maybe Text))
-> ListObjectsResponse -> Const (First Text) ListObjectsResponse
Lens' ListObjectsResponse (Maybe Text)
listObjectsResponse_nextMarker
                      ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListObjectsResponse -> Const (First Text) ListObjectsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListObjectsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                  )
              )
              ( ListObjectsResponse
-> Getting (First ObjectKey) ListObjectsResponse ObjectKey
-> Maybe ObjectKey
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^?
                  ( (Maybe [Object] -> Const (First ObjectKey) (Maybe [Object]))
-> ListObjectsResponse
-> Const (First ObjectKey) ListObjectsResponse
Lens' ListObjectsResponse (Maybe [Object])
listObjectsResponse_contents ((Maybe [Object] -> Const (First ObjectKey) (Maybe [Object]))
 -> ListObjectsResponse
 -> Const (First ObjectKey) ListObjectsResponse)
-> ((ObjectKey -> Const (First ObjectKey) ObjectKey)
    -> Maybe [Object] -> Const (First ObjectKey) (Maybe [Object]))
-> Getting (First ObjectKey) ListObjectsResponse ObjectKey
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Object] -> Const (First ObjectKey) [Object])
-> Maybe [Object] -> Const (First ObjectKey) (Maybe [Object])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                      (([Object] -> Const (First ObjectKey) [Object])
 -> Maybe [Object] -> Const (First ObjectKey) (Maybe [Object]))
-> ((ObjectKey -> Const (First ObjectKey) ObjectKey)
    -> [Object] -> Const (First ObjectKey) [Object])
-> (ObjectKey -> Const (First ObjectKey) ObjectKey)
-> Maybe [Object]
-> Const (First ObjectKey) (Maybe [Object])
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Object -> Const (First ObjectKey) Object)
-> [Object] -> Const (First ObjectKey) [Object]
forall s a. Snoc s s a a => Traversal' s a
Lens._last
                      ((Object -> Const (First ObjectKey) Object)
 -> [Object] -> Const (First ObjectKey) [Object])
-> ((ObjectKey -> Const (First ObjectKey) ObjectKey)
    -> Object -> Const (First ObjectKey) Object)
-> (ObjectKey -> Const (First ObjectKey) ObjectKey)
-> [Object]
-> Const (First ObjectKey) [Object]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ObjectKey -> Const (First ObjectKey) ObjectKey)
-> Object -> Const (First ObjectKey) Object
Lens' Object ObjectKey
object_key
                  )
              )
        ) =
      Maybe ListObjects
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListObjects -> Maybe ListObjects
forall a. a -> Maybe a
Prelude.Just (ListObjects -> Maybe ListObjects)
-> ListObjects -> Maybe ListObjects
forall a b. (a -> b) -> a -> b
Prelude.$
        ListObjects
rq
          ListObjects -> (ListObjects -> ListObjects) -> ListObjects
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListObjects -> Identity ListObjects
Lens ListObjects ListObjects (Maybe Text) (Maybe Text)
listObjects_marker
          ((Maybe Text -> Identity (Maybe Text))
 -> ListObjects -> Identity ListObjects)
-> Maybe Text -> ListObjects -> ListObjects
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListObjects
ListObjectsResponse
rs
          ListObjectsResponse
-> Getting (Maybe Text) ListObjectsResponse (Maybe Text)
-> Maybe Text
forall s a. s -> Getting a s a -> a
Lens.^. (ListObjectsResponse -> Maybe Text)
-> (ListObjectsResponse -> Maybe ObjectKey)
-> Getter ListObjectsResponse (Maybe Text)
forall (f :: * -> *) a b s.
(Alternative f, ToText a, ToText b) =>
(s -> f a) -> (s -> f b) -> Getter s (f Text)
Core.choice
            ( ListObjectsResponse
-> Getting (First Text) ListObjectsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^?
                ( (Maybe Text -> Const (First Text) (Maybe Text))
-> ListObjectsResponse -> Const (First Text) ListObjectsResponse
Lens' ListObjectsResponse (Maybe Text)
listObjectsResponse_nextMarker
                    ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListObjectsResponse -> Const (First Text) ListObjectsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListObjectsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                )
            )
            ( ListObjectsResponse
-> Getting (First ObjectKey) ListObjectsResponse ObjectKey
-> Maybe ObjectKey
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^?
                ( (Maybe [Object] -> Const (First ObjectKey) (Maybe [Object]))
-> ListObjectsResponse
-> Const (First ObjectKey) ListObjectsResponse
Lens' ListObjectsResponse (Maybe [Object])
listObjectsResponse_contents ((Maybe [Object] -> Const (First ObjectKey) (Maybe [Object]))
 -> ListObjectsResponse
 -> Const (First ObjectKey) ListObjectsResponse)
-> ((ObjectKey -> Const (First ObjectKey) ObjectKey)
    -> Maybe [Object] -> Const (First ObjectKey) (Maybe [Object]))
-> Getting (First ObjectKey) ListObjectsResponse ObjectKey
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Object] -> Const (First ObjectKey) [Object])
-> Maybe [Object] -> Const (First ObjectKey) (Maybe [Object])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    (([Object] -> Const (First ObjectKey) [Object])
 -> Maybe [Object] -> Const (First ObjectKey) (Maybe [Object]))
-> ((ObjectKey -> Const (First ObjectKey) ObjectKey)
    -> [Object] -> Const (First ObjectKey) [Object])
-> (ObjectKey -> Const (First ObjectKey) ObjectKey)
-> Maybe [Object]
-> Const (First ObjectKey) (Maybe [Object])
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Object -> Const (First ObjectKey) Object)
-> [Object] -> Const (First ObjectKey) [Object]
forall s a. Snoc s s a a => Traversal' s a
Lens._last
                    ((Object -> Const (First ObjectKey) Object)
 -> [Object] -> Const (First ObjectKey) [Object])
-> ((ObjectKey -> Const (First ObjectKey) ObjectKey)
    -> Object -> Const (First ObjectKey) Object)
-> (ObjectKey -> Const (First ObjectKey) ObjectKey)
-> [Object]
-> Const (First ObjectKey) [Object]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ObjectKey -> Const (First ObjectKey) ObjectKey)
-> Object -> Const (First ObjectKey) Object
Lens' Object ObjectKey
object_key
                )
            )

instance Core.AWSRequest ListObjects where
  type AWSResponse ListObjects = ListObjectsResponse
  request :: ListObjects -> Request ListObjects
request =
    Request ListObjects -> Request ListObjects
forall a. Request a -> Request a
Request.s3vhost
      (Request ListObjects -> Request ListObjects)
-> (ListObjects -> Request ListObjects)
-> ListObjects
-> Request ListObjects
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Service -> ListObjects -> Request ListObjects
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListObjects
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListObjects)))
response =
    (Int
 -> ResponseHeaders
 -> [Node]
 -> Either String (AWSResponse ListObjects))
-> Logger
-> Service
-> Proxy ListObjects
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListObjects)))
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 [Object]
-> Maybe Text
-> Maybe [CommonPrefix]
-> Maybe EncodingType
-> Maybe BucketName
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Delimiter
-> Int
-> ListObjectsResponse
ListObjectsResponse'
            (Maybe [Object]
 -> Maybe Text
 -> Maybe [CommonPrefix]
 -> Maybe EncodingType
 -> Maybe BucketName
 -> Maybe Text
 -> Maybe Text
 -> Maybe Int
 -> Maybe Bool
 -> Maybe Delimiter
 -> Int
 -> ListObjectsResponse)
-> Either String (Maybe [Object])
-> Either
     String
     (Maybe Text
      -> Maybe [CommonPrefix]
      -> Maybe EncodingType
      -> Maybe BucketName
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> Maybe Delimiter
      -> Int
      -> ListObjectsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (([Node] -> Either String [Object])
-> [Node] -> Either String (Maybe [Object])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Object]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"Contents") [Node]
x)
            Either
  String
  (Maybe Text
   -> Maybe [CommonPrefix]
   -> Maybe EncodingType
   -> Maybe BucketName
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> Maybe Delimiter
   -> Int
   -> ListObjectsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [CommonPrefix]
      -> Maybe EncodingType
      -> Maybe BucketName
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> Maybe Delimiter
      -> Int
      -> ListObjectsResponse)
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
"Prefix")
            Either
  String
  (Maybe [CommonPrefix]
   -> Maybe EncodingType
   -> Maybe BucketName
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> Maybe Delimiter
   -> Int
   -> ListObjectsResponse)
-> Either String (Maybe [CommonPrefix])
-> Either
     String
     (Maybe EncodingType
      -> Maybe BucketName
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> Maybe Delimiter
      -> Int
      -> ListObjectsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (([Node] -> Either String [CommonPrefix])
-> [Node] -> Either String (Maybe [CommonPrefix])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [CommonPrefix]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"CommonPrefixes") [Node]
x)
            Either
  String
  (Maybe EncodingType
   -> Maybe BucketName
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> Maybe Delimiter
   -> Int
   -> ListObjectsResponse)
-> Either String (Maybe EncodingType)
-> Either
     String
     (Maybe BucketName
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> Maybe Delimiter
      -> Int
      -> ListObjectsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe EncodingType)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"EncodingType")
            Either
  String
  (Maybe BucketName
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> Maybe Delimiter
   -> Int
   -> ListObjectsResponse)
-> Either String (Maybe BucketName)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> Maybe Delimiter
      -> Int
      -> ListObjectsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe BucketName)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Name")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> Maybe Delimiter
   -> Int
   -> ListObjectsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> Maybe Delimiter
      -> Int
      -> ListObjectsResponse)
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
"Marker")
            Either
  String
  (Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> Maybe Delimiter
   -> Int
   -> ListObjectsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Int
      -> Maybe Bool -> Maybe Delimiter -> Int -> ListObjectsResponse)
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
"NextMarker")
            Either
  String
  (Maybe Int
   -> Maybe Bool -> Maybe Delimiter -> Int -> ListObjectsResponse)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe Bool -> Maybe Delimiter -> Int -> ListObjectsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"MaxKeys")
            Either
  String
  (Maybe Bool -> Maybe Delimiter -> Int -> ListObjectsResponse)
-> Either String (Maybe Bool)
-> Either String (Maybe Delimiter -> Int -> ListObjectsResponse)
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 (Maybe Delimiter -> Int -> ListObjectsResponse)
-> Either String (Maybe Delimiter)
-> Either String (Int -> ListObjectsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Delimiter)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Delimiter")
            Either String (Int -> ListObjectsResponse)
-> Either String Int -> Either String ListObjectsResponse
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 ListObjects

instance Prelude.NFData ListObjects

instance Core.ToHeaders ListObjects where
  toHeaders :: ListObjects -> ResponseHeaders
toHeaders ListObjects' {Maybe Delimiter
Maybe Int
Maybe Text
Maybe EncodingType
Maybe RequestPayer
BucketName
bucket :: BucketName
expectedBucketOwner :: Maybe Text
delimiter :: Maybe Delimiter
maxKeys :: Maybe Int
marker :: Maybe Text
requestPayer :: Maybe RequestPayer
encodingType :: Maybe EncodingType
prefix :: Maybe Text
$sel:bucket:ListObjects' :: ListObjects -> BucketName
$sel:expectedBucketOwner:ListObjects' :: ListObjects -> Maybe Text
$sel:delimiter:ListObjects' :: ListObjects -> Maybe Delimiter
$sel:maxKeys:ListObjects' :: ListObjects -> Maybe Int
$sel:marker:ListObjects' :: ListObjects -> Maybe Text
$sel:requestPayer:ListObjects' :: ListObjects -> Maybe RequestPayer
$sel:encodingType:ListObjects' :: ListObjects -> Maybe EncodingType
$sel:prefix:ListObjects' :: ListObjects -> Maybe Text
..} =
    [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ HeaderName
"x-amz-request-payer" HeaderName -> Maybe RequestPayer -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe RequestPayer
requestPayer,
        HeaderName
"x-amz-expected-bucket-owner"
          HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
expectedBucketOwner
      ]

instance Core.ToPath ListObjects where
  toPath :: ListObjects -> ByteString
toPath ListObjects' {Maybe Delimiter
Maybe Int
Maybe Text
Maybe EncodingType
Maybe RequestPayer
BucketName
bucket :: BucketName
expectedBucketOwner :: Maybe Text
delimiter :: Maybe Delimiter
maxKeys :: Maybe Int
marker :: Maybe Text
requestPayer :: Maybe RequestPayer
encodingType :: Maybe EncodingType
prefix :: Maybe Text
$sel:bucket:ListObjects' :: ListObjects -> BucketName
$sel:expectedBucketOwner:ListObjects' :: ListObjects -> Maybe Text
$sel:delimiter:ListObjects' :: ListObjects -> Maybe Delimiter
$sel:maxKeys:ListObjects' :: ListObjects -> Maybe Int
$sel:marker:ListObjects' :: ListObjects -> Maybe Text
$sel:requestPayer:ListObjects' :: ListObjects -> Maybe RequestPayer
$sel:encodingType:ListObjects' :: ListObjects -> Maybe EncodingType
$sel:prefix:ListObjects' :: ListObjects -> 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 ListObjects where
  toQuery :: ListObjects -> QueryString
toQuery ListObjects' {Maybe Delimiter
Maybe Int
Maybe Text
Maybe EncodingType
Maybe RequestPayer
BucketName
bucket :: BucketName
expectedBucketOwner :: Maybe Text
delimiter :: Maybe Delimiter
maxKeys :: Maybe Int
marker :: Maybe Text
requestPayer :: Maybe RequestPayer
encodingType :: Maybe EncodingType
prefix :: Maybe Text
$sel:bucket:ListObjects' :: ListObjects -> BucketName
$sel:expectedBucketOwner:ListObjects' :: ListObjects -> Maybe Text
$sel:delimiter:ListObjects' :: ListObjects -> Maybe Delimiter
$sel:maxKeys:ListObjects' :: ListObjects -> Maybe Int
$sel:marker:ListObjects' :: ListObjects -> Maybe Text
$sel:requestPayer:ListObjects' :: ListObjects -> Maybe RequestPayer
$sel:encodingType:ListObjects' :: ListObjects -> Maybe EncodingType
$sel:prefix:ListObjects' :: ListObjects -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"prefix" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
prefix,
        ByteString
"encoding-type" ByteString -> Maybe EncodingType -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe EncodingType
encodingType,
        ByteString
"marker" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
marker,
        ByteString
"max-keys" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
maxKeys,
        ByteString
"delimiter" ByteString -> Maybe Delimiter -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Delimiter
delimiter
      ]

-- | /See:/ 'newListObjectsResponse' smart constructor.
data ListObjectsResponse = ListObjectsResponse'
  { -- | Metadata about each object returned.
    ListObjectsResponse -> Maybe [Object]
contents :: Prelude.Maybe [Object],
    -- | Keys that begin with the indicated prefix.
    ListObjectsResponse -> Maybe Text
prefix :: Prelude.Maybe Prelude.Text,
    -- | All of the keys (up to 1,000) rolled up in 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 the 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.
    ListObjectsResponse -> Maybe [CommonPrefix]
commonPrefixes :: Prelude.Maybe [CommonPrefix],
    -- | Encoding type used by Amazon S3 to encode object keys in the response.
    ListObjectsResponse -> Maybe EncodingType
encodingType :: Prelude.Maybe EncodingType,
    -- | The bucket name.
    ListObjectsResponse -> Maybe BucketName
name :: Prelude.Maybe BucketName,
    -- | Indicates where in the bucket listing begins. Marker is included in the
    -- response if it was sent with the request.
    ListObjectsResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | When response is truncated (the IsTruncated element value in the
    -- response is true), you can use the key name in this field as marker in
    -- the subsequent request to get next set of objects. Amazon S3 lists
    -- objects in alphabetical order Note: This element is returned only if you
    -- have delimiter request parameter specified. If response does not include
    -- the NextMarker and it is truncated, you can use the value of the last
    -- Key in the response as the marker in the subsequent request to get the
    -- next set of object keys.
    ListObjectsResponse -> Maybe Text
nextMarker :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of keys returned in the response body.
    ListObjectsResponse -> Maybe Int
maxKeys :: Prelude.Maybe Prelude.Int,
    -- | A flag that indicates whether Amazon S3 returned all of the results that
    -- satisfied the search criteria.
    ListObjectsResponse -> Maybe Bool
isTruncated :: Prelude.Maybe Prelude.Bool,
    -- | 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.
    ListObjectsResponse -> Maybe Delimiter
delimiter :: Prelude.Maybe Delimiter,
    -- | The response's http status code.
    ListObjectsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListObjectsResponse -> ListObjectsResponse -> Bool
(ListObjectsResponse -> ListObjectsResponse -> Bool)
-> (ListObjectsResponse -> ListObjectsResponse -> Bool)
-> Eq ListObjectsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListObjectsResponse -> ListObjectsResponse -> Bool
$c/= :: ListObjectsResponse -> ListObjectsResponse -> Bool
== :: ListObjectsResponse -> ListObjectsResponse -> Bool
$c== :: ListObjectsResponse -> ListObjectsResponse -> Bool
Prelude.Eq, ReadPrec [ListObjectsResponse]
ReadPrec ListObjectsResponse
Int -> ReadS ListObjectsResponse
ReadS [ListObjectsResponse]
(Int -> ReadS ListObjectsResponse)
-> ReadS [ListObjectsResponse]
-> ReadPrec ListObjectsResponse
-> ReadPrec [ListObjectsResponse]
-> Read ListObjectsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListObjectsResponse]
$creadListPrec :: ReadPrec [ListObjectsResponse]
readPrec :: ReadPrec ListObjectsResponse
$creadPrec :: ReadPrec ListObjectsResponse
readList :: ReadS [ListObjectsResponse]
$creadList :: ReadS [ListObjectsResponse]
readsPrec :: Int -> ReadS ListObjectsResponse
$creadsPrec :: Int -> ReadS ListObjectsResponse
Prelude.Read, Int -> ListObjectsResponse -> ShowS
[ListObjectsResponse] -> ShowS
ListObjectsResponse -> String
(Int -> ListObjectsResponse -> ShowS)
-> (ListObjectsResponse -> String)
-> ([ListObjectsResponse] -> ShowS)
-> Show ListObjectsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListObjectsResponse] -> ShowS
$cshowList :: [ListObjectsResponse] -> ShowS
show :: ListObjectsResponse -> String
$cshow :: ListObjectsResponse -> String
showsPrec :: Int -> ListObjectsResponse -> ShowS
$cshowsPrec :: Int -> ListObjectsResponse -> ShowS
Prelude.Show, (forall x. ListObjectsResponse -> Rep ListObjectsResponse x)
-> (forall x. Rep ListObjectsResponse x -> ListObjectsResponse)
-> Generic ListObjectsResponse
forall x. Rep ListObjectsResponse x -> ListObjectsResponse
forall x. ListObjectsResponse -> Rep ListObjectsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListObjectsResponse x -> ListObjectsResponse
$cfrom :: forall x. ListObjectsResponse -> Rep ListObjectsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListObjectsResponse' 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:
--
-- 'contents', 'listObjectsResponse_contents' - Metadata about each object returned.
--
-- 'prefix', 'listObjectsResponse_prefix' - Keys that begin with the indicated prefix.
--
-- 'commonPrefixes', 'listObjectsResponse_commonPrefixes' - All of the keys (up to 1,000) rolled up in 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 the 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.
--
-- 'encodingType', 'listObjectsResponse_encodingType' - Encoding type used by Amazon S3 to encode object keys in the response.
--
-- 'name', 'listObjectsResponse_name' - The bucket name.
--
-- 'marker', 'listObjectsResponse_marker' - Indicates where in the bucket listing begins. Marker is included in the
-- response if it was sent with the request.
--
-- 'nextMarker', 'listObjectsResponse_nextMarker' - When response is truncated (the IsTruncated element value in the
-- response is true), you can use the key name in this field as marker in
-- the subsequent request to get next set of objects. Amazon S3 lists
-- objects in alphabetical order Note: This element is returned only if you
-- have delimiter request parameter specified. If response does not include
-- the NextMarker and it is truncated, you can use the value of the last
-- Key in the response as the marker in the subsequent request to get the
-- next set of object keys.
--
-- 'maxKeys', 'listObjectsResponse_maxKeys' - The maximum number of keys returned in the response body.
--
-- 'isTruncated', 'listObjectsResponse_isTruncated' - A flag that indicates whether Amazon S3 returned all of the results that
-- satisfied the search criteria.
--
-- 'delimiter', 'listObjectsResponse_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.
--
-- 'httpStatus', 'listObjectsResponse_httpStatus' - The response's http status code.
newListObjectsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListObjectsResponse
newListObjectsResponse :: Int -> ListObjectsResponse
newListObjectsResponse Int
pHttpStatus_ =
  ListObjectsResponse' :: Maybe [Object]
-> Maybe Text
-> Maybe [CommonPrefix]
-> Maybe EncodingType
-> Maybe BucketName
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Delimiter
-> Int
-> ListObjectsResponse
ListObjectsResponse'
    { $sel:contents:ListObjectsResponse' :: Maybe [Object]
contents = Maybe [Object]
forall a. Maybe a
Prelude.Nothing,
      $sel:prefix:ListObjectsResponse' :: Maybe Text
prefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:commonPrefixes:ListObjectsResponse' :: Maybe [CommonPrefix]
commonPrefixes = Maybe [CommonPrefix]
forall a. Maybe a
Prelude.Nothing,
      $sel:encodingType:ListObjectsResponse' :: Maybe EncodingType
encodingType = Maybe EncodingType
forall a. Maybe a
Prelude.Nothing,
      $sel:name:ListObjectsResponse' :: Maybe BucketName
name = Maybe BucketName
forall a. Maybe a
Prelude.Nothing,
      $sel:marker:ListObjectsResponse' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextMarker:ListObjectsResponse' :: Maybe Text
nextMarker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxKeys:ListObjectsResponse' :: Maybe Int
maxKeys = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:isTruncated:ListObjectsResponse' :: Maybe Bool
isTruncated = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:delimiter:ListObjectsResponse' :: Maybe Delimiter
delimiter = Maybe Delimiter
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListObjectsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Metadata about each object returned.
listObjectsResponse_contents :: Lens.Lens' ListObjectsResponse (Prelude.Maybe [Object])
listObjectsResponse_contents :: (Maybe [Object] -> f (Maybe [Object]))
-> ListObjectsResponse -> f ListObjectsResponse
listObjectsResponse_contents = (ListObjectsResponse -> Maybe [Object])
-> (ListObjectsResponse -> Maybe [Object] -> ListObjectsResponse)
-> Lens' ListObjectsResponse (Maybe [Object])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsResponse' {Maybe [Object]
contents :: Maybe [Object]
$sel:contents:ListObjectsResponse' :: ListObjectsResponse -> Maybe [Object]
contents} -> Maybe [Object]
contents) (\s :: ListObjectsResponse
s@ListObjectsResponse' {} Maybe [Object]
a -> ListObjectsResponse
s {$sel:contents:ListObjectsResponse' :: Maybe [Object]
contents = Maybe [Object]
a} :: ListObjectsResponse) ((Maybe [Object] -> f (Maybe [Object]))
 -> ListObjectsResponse -> f ListObjectsResponse)
-> ((Maybe [Object] -> f (Maybe [Object]))
    -> Maybe [Object] -> f (Maybe [Object]))
-> (Maybe [Object] -> f (Maybe [Object]))
-> ListObjectsResponse
-> f ListObjectsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Object] [Object] [Object] [Object]
-> Iso
     (Maybe [Object]) (Maybe [Object]) (Maybe [Object]) (Maybe [Object])
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 [Object] [Object] [Object] [Object]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | All of the keys (up to 1,000) rolled up in 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 the 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.
listObjectsResponse_commonPrefixes :: Lens.Lens' ListObjectsResponse (Prelude.Maybe [CommonPrefix])
listObjectsResponse_commonPrefixes :: (Maybe [CommonPrefix] -> f (Maybe [CommonPrefix]))
-> ListObjectsResponse -> f ListObjectsResponse
listObjectsResponse_commonPrefixes = (ListObjectsResponse -> Maybe [CommonPrefix])
-> (ListObjectsResponse
    -> Maybe [CommonPrefix] -> ListObjectsResponse)
-> Lens
     ListObjectsResponse
     ListObjectsResponse
     (Maybe [CommonPrefix])
     (Maybe [CommonPrefix])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsResponse' {Maybe [CommonPrefix]
commonPrefixes :: Maybe [CommonPrefix]
$sel:commonPrefixes:ListObjectsResponse' :: ListObjectsResponse -> Maybe [CommonPrefix]
commonPrefixes} -> Maybe [CommonPrefix]
commonPrefixes) (\s :: ListObjectsResponse
s@ListObjectsResponse' {} Maybe [CommonPrefix]
a -> ListObjectsResponse
s {$sel:commonPrefixes:ListObjectsResponse' :: Maybe [CommonPrefix]
commonPrefixes = Maybe [CommonPrefix]
a} :: ListObjectsResponse) ((Maybe [CommonPrefix] -> f (Maybe [CommonPrefix]))
 -> ListObjectsResponse -> f ListObjectsResponse)
-> ((Maybe [CommonPrefix] -> f (Maybe [CommonPrefix]))
    -> Maybe [CommonPrefix] -> f (Maybe [CommonPrefix]))
-> (Maybe [CommonPrefix] -> f (Maybe [CommonPrefix]))
-> ListObjectsResponse
-> f ListObjectsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [CommonPrefix] [CommonPrefix] [CommonPrefix] [CommonPrefix]
-> Iso
     (Maybe [CommonPrefix])
     (Maybe [CommonPrefix])
     (Maybe [CommonPrefix])
     (Maybe [CommonPrefix])
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 [CommonPrefix] [CommonPrefix] [CommonPrefix] [CommonPrefix]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | The bucket name.
listObjectsResponse_name :: Lens.Lens' ListObjectsResponse (Prelude.Maybe BucketName)
listObjectsResponse_name :: (Maybe BucketName -> f (Maybe BucketName))
-> ListObjectsResponse -> f ListObjectsResponse
listObjectsResponse_name = (ListObjectsResponse -> Maybe BucketName)
-> (ListObjectsResponse -> Maybe BucketName -> ListObjectsResponse)
-> Lens
     ListObjectsResponse
     ListObjectsResponse
     (Maybe BucketName)
     (Maybe BucketName)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsResponse' {Maybe BucketName
name :: Maybe BucketName
$sel:name:ListObjectsResponse' :: ListObjectsResponse -> Maybe BucketName
name} -> Maybe BucketName
name) (\s :: ListObjectsResponse
s@ListObjectsResponse' {} Maybe BucketName
a -> ListObjectsResponse
s {$sel:name:ListObjectsResponse' :: Maybe BucketName
name = Maybe BucketName
a} :: ListObjectsResponse)

-- | Indicates where in the bucket listing begins. Marker is included in the
-- response if it was sent with the request.
listObjectsResponse_marker :: Lens.Lens' ListObjectsResponse (Prelude.Maybe Prelude.Text)
listObjectsResponse_marker :: (Maybe Text -> f (Maybe Text))
-> ListObjectsResponse -> f ListObjectsResponse
listObjectsResponse_marker = (ListObjectsResponse -> Maybe Text)
-> (ListObjectsResponse -> Maybe Text -> ListObjectsResponse)
-> Lens' ListObjectsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:ListObjectsResponse' :: ListObjectsResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListObjectsResponse
s@ListObjectsResponse' {} Maybe Text
a -> ListObjectsResponse
s {$sel:marker:ListObjectsResponse' :: Maybe Text
marker = Maybe Text
a} :: ListObjectsResponse)

-- | When response is truncated (the IsTruncated element value in the
-- response is true), you can use the key name in this field as marker in
-- the subsequent request to get next set of objects. Amazon S3 lists
-- objects in alphabetical order Note: This element is returned only if you
-- have delimiter request parameter specified. If response does not include
-- the NextMarker and it is truncated, you can use the value of the last
-- Key in the response as the marker in the subsequent request to get the
-- next set of object keys.
listObjectsResponse_nextMarker :: Lens.Lens' ListObjectsResponse (Prelude.Maybe Prelude.Text)
listObjectsResponse_nextMarker :: (Maybe Text -> f (Maybe Text))
-> ListObjectsResponse -> f ListObjectsResponse
listObjectsResponse_nextMarker = (ListObjectsResponse -> Maybe Text)
-> (ListObjectsResponse -> Maybe Text -> ListObjectsResponse)
-> Lens' ListObjectsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsResponse' {Maybe Text
nextMarker :: Maybe Text
$sel:nextMarker:ListObjectsResponse' :: ListObjectsResponse -> Maybe Text
nextMarker} -> Maybe Text
nextMarker) (\s :: ListObjectsResponse
s@ListObjectsResponse' {} Maybe Text
a -> ListObjectsResponse
s {$sel:nextMarker:ListObjectsResponse' :: Maybe Text
nextMarker = Maybe Text
a} :: ListObjectsResponse)

-- | The maximum number of keys returned in the response body.
listObjectsResponse_maxKeys :: Lens.Lens' ListObjectsResponse (Prelude.Maybe Prelude.Int)
listObjectsResponse_maxKeys :: (Maybe Int -> f (Maybe Int))
-> ListObjectsResponse -> f ListObjectsResponse
listObjectsResponse_maxKeys = (ListObjectsResponse -> Maybe Int)
-> (ListObjectsResponse -> Maybe Int -> ListObjectsResponse)
-> Lens
     ListObjectsResponse ListObjectsResponse (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsResponse' {Maybe Int
maxKeys :: Maybe Int
$sel:maxKeys:ListObjectsResponse' :: ListObjectsResponse -> Maybe Int
maxKeys} -> Maybe Int
maxKeys) (\s :: ListObjectsResponse
s@ListObjectsResponse' {} Maybe Int
a -> ListObjectsResponse
s {$sel:maxKeys:ListObjectsResponse' :: Maybe Int
maxKeys = Maybe Int
a} :: ListObjectsResponse)

-- | A flag that indicates whether Amazon S3 returned all of the results that
-- satisfied the search criteria.
listObjectsResponse_isTruncated :: Lens.Lens' ListObjectsResponse (Prelude.Maybe Prelude.Bool)
listObjectsResponse_isTruncated :: (Maybe Bool -> f (Maybe Bool))
-> ListObjectsResponse -> f ListObjectsResponse
listObjectsResponse_isTruncated = (ListObjectsResponse -> Maybe Bool)
-> (ListObjectsResponse -> Maybe Bool -> ListObjectsResponse)
-> Lens' ListObjectsResponse (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsResponse' {Maybe Bool
isTruncated :: Maybe Bool
$sel:isTruncated:ListObjectsResponse' :: ListObjectsResponse -> Maybe Bool
isTruncated} -> Maybe Bool
isTruncated) (\s :: ListObjectsResponse
s@ListObjectsResponse' {} Maybe Bool
a -> ListObjectsResponse
s {$sel:isTruncated:ListObjectsResponse' :: Maybe Bool
isTruncated = Maybe Bool
a} :: ListObjectsResponse)

-- | 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.
listObjectsResponse_delimiter :: Lens.Lens' ListObjectsResponse (Prelude.Maybe Delimiter)
listObjectsResponse_delimiter :: (Maybe Delimiter -> f (Maybe Delimiter))
-> ListObjectsResponse -> f ListObjectsResponse
listObjectsResponse_delimiter = (ListObjectsResponse -> Maybe Delimiter)
-> (ListObjectsResponse -> Maybe Delimiter -> ListObjectsResponse)
-> Lens
     ListObjectsResponse
     ListObjectsResponse
     (Maybe Delimiter)
     (Maybe Delimiter)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsResponse' {Maybe Delimiter
delimiter :: Maybe Delimiter
$sel:delimiter:ListObjectsResponse' :: ListObjectsResponse -> Maybe Delimiter
delimiter} -> Maybe Delimiter
delimiter) (\s :: ListObjectsResponse
s@ListObjectsResponse' {} Maybe Delimiter
a -> ListObjectsResponse
s {$sel:delimiter:ListObjectsResponse' :: Maybe Delimiter
delimiter = Maybe Delimiter
a} :: ListObjectsResponse)

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

instance Prelude.NFData ListObjectsResponse