{-# 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.ListParts
-- 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)
--
-- Lists the parts that have been uploaded for a specific multipart upload.
-- This operation must include the upload ID, which you obtain by sending
-- the initiate multipart upload request (see
-- <https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html CreateMultipartUpload>).
-- This request returns a maximum of 1,000 uploaded parts. The default
-- number of parts returned is 1,000 parts. You can restrict the number of
-- parts returned by specifying the @max-parts@ request parameter. If your
-- multipart upload consists of more than 1,000 parts, the response returns
-- an @IsTruncated@ field with the value of true, and a
-- @NextPartNumberMarker@ element. In subsequent @ListParts@ requests you
-- can include the part-number-marker query string parameter and set its
-- value to the @NextPartNumberMarker@ field value from the previous
-- response.
--
-- For more information on multipart uploads, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html Uploading Objects Using Multipart Upload>.
--
-- For information on permissions required to use the multipart upload API,
-- see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html Multipart Upload and Permissions>.
--
-- The following operations are related to @ListParts@:
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html CreateMultipartUpload>
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html UploadPart>
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html CompleteMultipartUpload>
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html AbortMultipartUpload>
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html ListMultipartUploads>
--
-- This operation returns paginated results.
module Amazonka.S3.ListParts
  ( -- * Creating a Request
    ListParts (..),
    newListParts,

    -- * Request Lenses
    listParts_maxParts,
    listParts_requestPayer,
    listParts_partNumberMarker,
    listParts_expectedBucketOwner,
    listParts_bucket,
    listParts_key,
    listParts_uploadId,

    -- * Destructuring the Response
    ListPartsResponse (..),
    newListPartsResponse,

    -- * Response Lenses
    listPartsResponse_parts,
    listPartsResponse_requestCharged,
    listPartsResponse_maxParts,
    listPartsResponse_initiator,
    listPartsResponse_bucket,
    listPartsResponse_abortDate,
    listPartsResponse_nextPartNumberMarker,
    listPartsResponse_abortRuleId,
    listPartsResponse_owner,
    listPartsResponse_key,
    listPartsResponse_storageClass,
    listPartsResponse_isTruncated,
    listPartsResponse_partNumberMarker,
    listPartsResponse_uploadId,
    listPartsResponse_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:/ 'newListParts' smart constructor.
data ListParts = ListParts'
  { -- | Sets the maximum number of parts to return.
    ListParts -> Maybe Int
maxParts :: Prelude.Maybe Prelude.Int,
    ListParts -> Maybe RequestPayer
requestPayer :: Prelude.Maybe RequestPayer,
    -- | Specifies the part after which listing should begin. Only parts with
    -- higher part numbers will be listed.
    ListParts -> Maybe Int
partNumberMarker :: Prelude.Maybe Prelude.Int,
    -- | 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.
    ListParts -> Maybe Text
expectedBucketOwner :: Prelude.Maybe Prelude.Text,
    -- | The name of the bucket to which the parts are being uploaded.
    --
    -- 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/.
    ListParts -> BucketName
bucket :: BucketName,
    -- | Object key for which the multipart upload was initiated.
    ListParts -> ObjectKey
key :: ObjectKey,
    -- | Upload ID identifying the multipart upload whose parts are being listed.
    ListParts -> Text
uploadId :: Prelude.Text
  }
  deriving (ListParts -> ListParts -> Bool
(ListParts -> ListParts -> Bool)
-> (ListParts -> ListParts -> Bool) -> Eq ListParts
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListParts -> ListParts -> Bool
$c/= :: ListParts -> ListParts -> Bool
== :: ListParts -> ListParts -> Bool
$c== :: ListParts -> ListParts -> Bool
Prelude.Eq, ReadPrec [ListParts]
ReadPrec ListParts
Int -> ReadS ListParts
ReadS [ListParts]
(Int -> ReadS ListParts)
-> ReadS [ListParts]
-> ReadPrec ListParts
-> ReadPrec [ListParts]
-> Read ListParts
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListParts]
$creadListPrec :: ReadPrec [ListParts]
readPrec :: ReadPrec ListParts
$creadPrec :: ReadPrec ListParts
readList :: ReadS [ListParts]
$creadList :: ReadS [ListParts]
readsPrec :: Int -> ReadS ListParts
$creadsPrec :: Int -> ReadS ListParts
Prelude.Read, Int -> ListParts -> ShowS
[ListParts] -> ShowS
ListParts -> String
(Int -> ListParts -> ShowS)
-> (ListParts -> String)
-> ([ListParts] -> ShowS)
-> Show ListParts
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListParts] -> ShowS
$cshowList :: [ListParts] -> ShowS
show :: ListParts -> String
$cshow :: ListParts -> String
showsPrec :: Int -> ListParts -> ShowS
$cshowsPrec :: Int -> ListParts -> ShowS
Prelude.Show, (forall x. ListParts -> Rep ListParts x)
-> (forall x. Rep ListParts x -> ListParts) -> Generic ListParts
forall x. Rep ListParts x -> ListParts
forall x. ListParts -> Rep ListParts x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListParts x -> ListParts
$cfrom :: forall x. ListParts -> Rep ListParts x
Prelude.Generic)

-- |
-- Create a value of 'ListParts' 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:
--
-- 'maxParts', 'listParts_maxParts' - Sets the maximum number of parts to return.
--
-- 'requestPayer', 'listParts_requestPayer' - Undocumented member.
--
-- 'partNumberMarker', 'listParts_partNumberMarker' - Specifies the part after which listing should begin. Only parts with
-- higher part numbers will be listed.
--
-- 'expectedBucketOwner', 'listParts_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', 'listParts_bucket' - The name of the bucket to which the parts are being uploaded.
--
-- 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/.
--
-- 'key', 'listParts_key' - Object key for which the multipart upload was initiated.
--
-- 'uploadId', 'listParts_uploadId' - Upload ID identifying the multipart upload whose parts are being listed.
newListParts ::
  -- | 'bucket'
  BucketName ->
  -- | 'key'
  ObjectKey ->
  -- | 'uploadId'
  Prelude.Text ->
  ListParts
newListParts :: BucketName -> ObjectKey -> Text -> ListParts
newListParts BucketName
pBucket_ ObjectKey
pKey_ Text
pUploadId_ =
  ListParts' :: Maybe Int
-> Maybe RequestPayer
-> Maybe Int
-> Maybe Text
-> BucketName
-> ObjectKey
-> Text
-> ListParts
ListParts'
    { $sel:maxParts:ListParts' :: Maybe Int
maxParts = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:requestPayer:ListParts' :: Maybe RequestPayer
requestPayer = Maybe RequestPayer
forall a. Maybe a
Prelude.Nothing,
      $sel:partNumberMarker:ListParts' :: Maybe Int
partNumberMarker = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:expectedBucketOwner:ListParts' :: Maybe Text
expectedBucketOwner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:bucket:ListParts' :: BucketName
bucket = BucketName
pBucket_,
      $sel:key:ListParts' :: ObjectKey
key = ObjectKey
pKey_,
      $sel:uploadId:ListParts' :: Text
uploadId = Text
pUploadId_
    }

-- | Sets the maximum number of parts to return.
listParts_maxParts :: Lens.Lens' ListParts (Prelude.Maybe Prelude.Int)
listParts_maxParts :: (Maybe Int -> f (Maybe Int)) -> ListParts -> f ListParts
listParts_maxParts = (ListParts -> Maybe Int)
-> (ListParts -> Maybe Int -> ListParts)
-> Lens ListParts ListParts (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListParts' {Maybe Int
maxParts :: Maybe Int
$sel:maxParts:ListParts' :: ListParts -> Maybe Int
maxParts} -> Maybe Int
maxParts) (\s :: ListParts
s@ListParts' {} Maybe Int
a -> ListParts
s {$sel:maxParts:ListParts' :: Maybe Int
maxParts = Maybe Int
a} :: ListParts)

-- | Undocumented member.
listParts_requestPayer :: Lens.Lens' ListParts (Prelude.Maybe RequestPayer)
listParts_requestPayer :: (Maybe RequestPayer -> f (Maybe RequestPayer))
-> ListParts -> f ListParts
listParts_requestPayer = (ListParts -> Maybe RequestPayer)
-> (ListParts -> Maybe RequestPayer -> ListParts)
-> Lens
     ListParts ListParts (Maybe RequestPayer) (Maybe RequestPayer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListParts' {Maybe RequestPayer
requestPayer :: Maybe RequestPayer
$sel:requestPayer:ListParts' :: ListParts -> Maybe RequestPayer
requestPayer} -> Maybe RequestPayer
requestPayer) (\s :: ListParts
s@ListParts' {} Maybe RequestPayer
a -> ListParts
s {$sel:requestPayer:ListParts' :: Maybe RequestPayer
requestPayer = Maybe RequestPayer
a} :: ListParts)

-- | Specifies the part after which listing should begin. Only parts with
-- higher part numbers will be listed.
listParts_partNumberMarker :: Lens.Lens' ListParts (Prelude.Maybe Prelude.Int)
listParts_partNumberMarker :: (Maybe Int -> f (Maybe Int)) -> ListParts -> f ListParts
listParts_partNumberMarker = (ListParts -> Maybe Int)
-> (ListParts -> Maybe Int -> ListParts)
-> Lens ListParts ListParts (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListParts' {Maybe Int
partNumberMarker :: Maybe Int
$sel:partNumberMarker:ListParts' :: ListParts -> Maybe Int
partNumberMarker} -> Maybe Int
partNumberMarker) (\s :: ListParts
s@ListParts' {} Maybe Int
a -> ListParts
s {$sel:partNumberMarker:ListParts' :: Maybe Int
partNumberMarker = Maybe Int
a} :: ListParts)

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

-- | The name of the bucket to which the parts are being uploaded.
--
-- 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/.
listParts_bucket :: Lens.Lens' ListParts BucketName
listParts_bucket :: (BucketName -> f BucketName) -> ListParts -> f ListParts
listParts_bucket = (ListParts -> BucketName)
-> (ListParts -> BucketName -> ListParts)
-> Lens ListParts ListParts BucketName BucketName
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListParts' {BucketName
bucket :: BucketName
$sel:bucket:ListParts' :: ListParts -> BucketName
bucket} -> BucketName
bucket) (\s :: ListParts
s@ListParts' {} BucketName
a -> ListParts
s {$sel:bucket:ListParts' :: BucketName
bucket = BucketName
a} :: ListParts)

-- | Object key for which the multipart upload was initiated.
listParts_key :: Lens.Lens' ListParts ObjectKey
listParts_key :: (ObjectKey -> f ObjectKey) -> ListParts -> f ListParts
listParts_key = (ListParts -> ObjectKey)
-> (ListParts -> ObjectKey -> ListParts)
-> Lens ListParts ListParts ObjectKey ObjectKey
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListParts' {ObjectKey
key :: ObjectKey
$sel:key:ListParts' :: ListParts -> ObjectKey
key} -> ObjectKey
key) (\s :: ListParts
s@ListParts' {} ObjectKey
a -> ListParts
s {$sel:key:ListParts' :: ObjectKey
key = ObjectKey
a} :: ListParts)

-- | Upload ID identifying the multipart upload whose parts are being listed.
listParts_uploadId :: Lens.Lens' ListParts Prelude.Text
listParts_uploadId :: (Text -> f Text) -> ListParts -> f ListParts
listParts_uploadId = (ListParts -> Text)
-> (ListParts -> Text -> ListParts)
-> Lens ListParts ListParts Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListParts' {Text
uploadId :: Text
$sel:uploadId:ListParts' :: ListParts -> Text
uploadId} -> Text
uploadId) (\s :: ListParts
s@ListParts' {} Text
a -> ListParts
s {$sel:uploadId:ListParts' :: Text
uploadId = Text
a} :: ListParts)

instance Core.AWSPager ListParts where
  page :: ListParts -> AWSResponse ListParts -> Maybe ListParts
page ListParts
rq AWSResponse ListParts
rs
    | Maybe Bool -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListParts
ListPartsResponse
rs
            ListPartsResponse
-> Getting (First Bool) ListPartsResponse Bool -> Maybe Bool
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Bool -> Const (First Bool) (Maybe Bool))
-> ListPartsResponse -> Const (First Bool) ListPartsResponse
Lens' ListPartsResponse (Maybe Bool)
listPartsResponse_isTruncated ((Maybe Bool -> Const (First Bool) (Maybe Bool))
 -> ListPartsResponse -> Const (First Bool) ListPartsResponse)
-> ((Bool -> Const (First Bool) Bool)
    -> Maybe Bool -> Const (First Bool) (Maybe Bool))
-> Getting (First Bool) ListPartsResponse 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 ListParts
forall a. Maybe a
Prelude.Nothing
    | Maybe Int -> Bool
forall a. Maybe a -> Bool
Prelude.isNothing
        ( AWSResponse ListParts
ListPartsResponse
rs
            ListPartsResponse
-> Getting (First Int) ListPartsResponse Int -> Maybe Int
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Int -> Const (First Int) (Maybe Int))
-> ListPartsResponse -> Const (First Int) ListPartsResponse
Lens' ListPartsResponse (Maybe Int)
listPartsResponse_nextPartNumberMarker
              ((Maybe Int -> Const (First Int) (Maybe Int))
 -> ListPartsResponse -> Const (First Int) ListPartsResponse)
-> ((Int -> Const (First Int) Int)
    -> Maybe Int -> Const (First Int) (Maybe Int))
-> Getting (First Int) ListPartsResponse Int
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Int -> Const (First Int) Int)
-> Maybe Int -> Const (First Int) (Maybe Int)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListParts
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListParts -> Maybe ListParts
forall a. a -> Maybe a
Prelude.Just (ListParts -> Maybe ListParts) -> ListParts -> Maybe ListParts
forall a b. (a -> b) -> a -> b
Prelude.$
        ListParts
rq
          ListParts -> (ListParts -> ListParts) -> ListParts
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Int -> Identity (Maybe Int))
-> ListParts -> Identity ListParts
Lens ListParts ListParts (Maybe Int) (Maybe Int)
listParts_partNumberMarker
          ((Maybe Int -> Identity (Maybe Int))
 -> ListParts -> Identity ListParts)
-> Maybe Int -> ListParts -> ListParts
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListParts
ListPartsResponse
rs
          ListPartsResponse
-> Getting (First Int) ListPartsResponse Int -> Maybe Int
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Int -> Const (First Int) (Maybe Int))
-> ListPartsResponse -> Const (First Int) ListPartsResponse
Lens' ListPartsResponse (Maybe Int)
listPartsResponse_nextPartNumberMarker
            ((Maybe Int -> Const (First Int) (Maybe Int))
 -> ListPartsResponse -> Const (First Int) ListPartsResponse)
-> ((Int -> Const (First Int) Int)
    -> Maybe Int -> Const (First Int) (Maybe Int))
-> Getting (First Int) ListPartsResponse Int
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Int -> Const (First Int) Int)
-> Maybe Int -> Const (First Int) (Maybe Int)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListParts where
  type AWSResponse ListParts = ListPartsResponse
  request :: ListParts -> Request ListParts
request =
    Request ListParts -> Request ListParts
forall a. Request a -> Request a
Request.s3vhost
      (Request ListParts -> Request ListParts)
-> (ListParts -> Request ListParts)
-> ListParts
-> Request ListParts
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Service -> ListParts -> Request ListParts
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListParts
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListParts)))
response =
    (Int
 -> ResponseHeaders
 -> [Node]
 -> Either String (AWSResponse ListParts))
-> Logger
-> Service
-> Proxy ListParts
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListParts)))
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 [Part]
-> Maybe RequestCharged
-> Maybe Int
-> Maybe Initiator
-> Maybe BucketName
-> Maybe ISO8601
-> Maybe Int
-> Maybe Text
-> Maybe Owner
-> Maybe ObjectKey
-> Maybe StorageClass
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Int
-> ListPartsResponse
ListPartsResponse'
            (Maybe [Part]
 -> Maybe RequestCharged
 -> Maybe Int
 -> Maybe Initiator
 -> Maybe BucketName
 -> Maybe ISO8601
 -> Maybe Int
 -> Maybe Text
 -> Maybe Owner
 -> Maybe ObjectKey
 -> Maybe StorageClass
 -> Maybe Bool
 -> Maybe Int
 -> Maybe Text
 -> Int
 -> ListPartsResponse)
-> Either String (Maybe [Part])
-> Either
     String
     (Maybe RequestCharged
      -> Maybe Int
      -> Maybe Initiator
      -> Maybe BucketName
      -> Maybe ISO8601
      -> Maybe Int
      -> Maybe Text
      -> Maybe Owner
      -> Maybe ObjectKey
      -> Maybe StorageClass
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Text
      -> Int
      -> ListPartsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (([Node] -> Either String [Part])
-> [Node] -> Either String (Maybe [Part])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Part]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"Part") [Node]
x)
            Either
  String
  (Maybe RequestCharged
   -> Maybe Int
   -> Maybe Initiator
   -> Maybe BucketName
   -> Maybe ISO8601
   -> Maybe Int
   -> Maybe Text
   -> Maybe Owner
   -> Maybe ObjectKey
   -> Maybe StorageClass
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Text
   -> Int
   -> ListPartsResponse)
-> Either String (Maybe RequestCharged)
-> Either
     String
     (Maybe Int
      -> Maybe Initiator
      -> Maybe BucketName
      -> Maybe ISO8601
      -> Maybe Int
      -> Maybe Text
      -> Maybe Owner
      -> Maybe ObjectKey
      -> Maybe StorageClass
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Text
      -> Int
      -> ListPartsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders
-> HeaderName -> Either String (Maybe RequestCharged)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-request-charged")
            Either
  String
  (Maybe Int
   -> Maybe Initiator
   -> Maybe BucketName
   -> Maybe ISO8601
   -> Maybe Int
   -> Maybe Text
   -> Maybe Owner
   -> Maybe ObjectKey
   -> Maybe StorageClass
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Text
   -> Int
   -> ListPartsResponse)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe Initiator
      -> Maybe BucketName
      -> Maybe ISO8601
      -> Maybe Int
      -> Maybe Text
      -> Maybe Owner
      -> Maybe ObjectKey
      -> Maybe StorageClass
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Text
      -> Int
      -> ListPartsResponse)
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
"MaxParts")
            Either
  String
  (Maybe Initiator
   -> Maybe BucketName
   -> Maybe ISO8601
   -> Maybe Int
   -> Maybe Text
   -> Maybe Owner
   -> Maybe ObjectKey
   -> Maybe StorageClass
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Text
   -> Int
   -> ListPartsResponse)
-> Either String (Maybe Initiator)
-> Either
     String
     (Maybe BucketName
      -> Maybe ISO8601
      -> Maybe Int
      -> Maybe Text
      -> Maybe Owner
      -> Maybe ObjectKey
      -> Maybe StorageClass
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Text
      -> Int
      -> ListPartsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Initiator)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Initiator")
            Either
  String
  (Maybe BucketName
   -> Maybe ISO8601
   -> Maybe Int
   -> Maybe Text
   -> Maybe Owner
   -> Maybe ObjectKey
   -> Maybe StorageClass
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Text
   -> Int
   -> ListPartsResponse)
-> Either String (Maybe BucketName)
-> Either
     String
     (Maybe ISO8601
      -> Maybe Int
      -> Maybe Text
      -> Maybe Owner
      -> Maybe ObjectKey
      -> Maybe StorageClass
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Text
      -> Int
      -> ListPartsResponse)
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
"Bucket")
            Either
  String
  (Maybe ISO8601
   -> Maybe Int
   -> Maybe Text
   -> Maybe Owner
   -> Maybe ObjectKey
   -> Maybe StorageClass
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Text
   -> Int
   -> ListPartsResponse)
-> Either String (Maybe ISO8601)
-> Either
     String
     (Maybe Int
      -> Maybe Text
      -> Maybe Owner
      -> Maybe ObjectKey
      -> Maybe StorageClass
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Text
      -> Int
      -> ListPartsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe ISO8601)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-abort-date")
            Either
  String
  (Maybe Int
   -> Maybe Text
   -> Maybe Owner
   -> Maybe ObjectKey
   -> Maybe StorageClass
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Text
   -> Int
   -> ListPartsResponse)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe Text
      -> Maybe Owner
      -> Maybe ObjectKey
      -> Maybe StorageClass
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Text
      -> Int
      -> ListPartsResponse)
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
"NextPartNumberMarker")
            Either
  String
  (Maybe Text
   -> Maybe Owner
   -> Maybe ObjectKey
   -> Maybe StorageClass
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Text
   -> Int
   -> ListPartsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Owner
      -> Maybe ObjectKey
      -> Maybe StorageClass
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Text
      -> Int
      -> ListPartsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe Text)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-abort-rule-id")
            Either
  String
  (Maybe Owner
   -> Maybe ObjectKey
   -> Maybe StorageClass
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Text
   -> Int
   -> ListPartsResponse)
-> Either String (Maybe Owner)
-> Either
     String
     (Maybe ObjectKey
      -> Maybe StorageClass
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Text
      -> Int
      -> ListPartsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Owner)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Owner")
            Either
  String
  (Maybe ObjectKey
   -> Maybe StorageClass
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Text
   -> Int
   -> ListPartsResponse)
-> Either String (Maybe ObjectKey)
-> Either
     String
     (Maybe StorageClass
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Text
      -> Int
      -> ListPartsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ObjectKey)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Key")
            Either
  String
  (Maybe StorageClass
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Text
   -> Int
   -> ListPartsResponse)
-> Either String (Maybe StorageClass)
-> Either
     String
     (Maybe Bool -> Maybe Int -> Maybe Text -> Int -> ListPartsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe StorageClass)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"StorageClass")
            Either
  String
  (Maybe Bool -> Maybe Int -> Maybe Text -> Int -> ListPartsResponse)
-> Either String (Maybe Bool)
-> Either
     String (Maybe Int -> Maybe Text -> Int -> ListPartsResponse)
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 Int -> Maybe Text -> Int -> ListPartsResponse)
-> Either String (Maybe Int)
-> Either String (Maybe Text -> Int -> ListPartsResponse)
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
"PartNumberMarker")
            Either String (Maybe Text -> Int -> ListPartsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListPartsResponse)
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
"UploadId")
            Either String (Int -> ListPartsResponse)
-> Either String Int -> Either String ListPartsResponse
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 ListParts

instance Prelude.NFData ListParts

instance Core.ToHeaders ListParts where
  toHeaders :: ListParts -> ResponseHeaders
toHeaders ListParts' {Maybe Int
Maybe Text
Maybe RequestPayer
Text
ObjectKey
BucketName
uploadId :: Text
key :: ObjectKey
bucket :: BucketName
expectedBucketOwner :: Maybe Text
partNumberMarker :: Maybe Int
requestPayer :: Maybe RequestPayer
maxParts :: Maybe Int
$sel:uploadId:ListParts' :: ListParts -> Text
$sel:key:ListParts' :: ListParts -> ObjectKey
$sel:bucket:ListParts' :: ListParts -> BucketName
$sel:expectedBucketOwner:ListParts' :: ListParts -> Maybe Text
$sel:partNumberMarker:ListParts' :: ListParts -> Maybe Int
$sel:requestPayer:ListParts' :: ListParts -> Maybe RequestPayer
$sel:maxParts:ListParts' :: ListParts -> Maybe Int
..} =
    [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 ListParts where
  toPath :: ListParts -> ByteString
toPath ListParts' {Maybe Int
Maybe Text
Maybe RequestPayer
Text
ObjectKey
BucketName
uploadId :: Text
key :: ObjectKey
bucket :: BucketName
expectedBucketOwner :: Maybe Text
partNumberMarker :: Maybe Int
requestPayer :: Maybe RequestPayer
maxParts :: Maybe Int
$sel:uploadId:ListParts' :: ListParts -> Text
$sel:key:ListParts' :: ListParts -> ObjectKey
$sel:bucket:ListParts' :: ListParts -> BucketName
$sel:expectedBucketOwner:ListParts' :: ListParts -> Maybe Text
$sel:partNumberMarker:ListParts' :: ListParts -> Maybe Int
$sel:requestPayer:ListParts' :: ListParts -> Maybe RequestPayer
$sel:maxParts:ListParts' :: ListParts -> Maybe Int
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/", BucketName -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS BucketName
bucket, ByteString
"/", ObjectKey -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS ObjectKey
key]

instance Core.ToQuery ListParts where
  toQuery :: ListParts -> QueryString
toQuery ListParts' {Maybe Int
Maybe Text
Maybe RequestPayer
Text
ObjectKey
BucketName
uploadId :: Text
key :: ObjectKey
bucket :: BucketName
expectedBucketOwner :: Maybe Text
partNumberMarker :: Maybe Int
requestPayer :: Maybe RequestPayer
maxParts :: Maybe Int
$sel:uploadId:ListParts' :: ListParts -> Text
$sel:key:ListParts' :: ListParts -> ObjectKey
$sel:bucket:ListParts' :: ListParts -> BucketName
$sel:expectedBucketOwner:ListParts' :: ListParts -> Maybe Text
$sel:partNumberMarker:ListParts' :: ListParts -> Maybe Int
$sel:requestPayer:ListParts' :: ListParts -> Maybe RequestPayer
$sel:maxParts:ListParts' :: ListParts -> Maybe Int
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"max-parts" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
maxParts,
        ByteString
"part-number-marker" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
partNumberMarker,
        ByteString
"uploadId" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
uploadId
      ]

-- | /See:/ 'newListPartsResponse' smart constructor.
data ListPartsResponse = ListPartsResponse'
  { -- | Container for elements related to a particular part. A response can
    -- contain zero or more @Part@ elements.
    ListPartsResponse -> Maybe [Part]
parts :: Prelude.Maybe [Part],
    ListPartsResponse -> Maybe RequestCharged
requestCharged :: Prelude.Maybe RequestCharged,
    -- | Maximum number of parts that were allowed in the response.
    ListPartsResponse -> Maybe Int
maxParts :: Prelude.Maybe Prelude.Int,
    -- | Container element that identifies who initiated the multipart upload. If
    -- the initiator is an Amazon Web Services account, this element provides
    -- the same information as the @Owner@ element. If the initiator is an IAM
    -- User, this element provides the user ARN and display name.
    ListPartsResponse -> Maybe Initiator
initiator :: Prelude.Maybe Initiator,
    -- | The name of the bucket to which the multipart upload was initiated. Does
    -- not return the access point ARN or access point alias if used.
    ListPartsResponse -> Maybe BucketName
bucket :: Prelude.Maybe BucketName,
    -- | If the bucket has a lifecycle rule configured with an action to abort
    -- incomplete multipart uploads and the prefix in the lifecycle rule
    -- matches the object name in the request, then the response includes this
    -- header indicating when the initiated multipart upload will become
    -- eligible for abort operation. For more information, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Policy>.
    --
    -- The response will also include the @x-amz-abort-rule-id@ header that
    -- will provide the ID of the lifecycle configuration rule that defines
    -- this action.
    ListPartsResponse -> Maybe ISO8601
abortDate :: Prelude.Maybe Core.ISO8601,
    -- | When a list is truncated, this element specifies the last part in the
    -- list, as well as the value to use for the part-number-marker request
    -- parameter in a subsequent request.
    ListPartsResponse -> Maybe Int
nextPartNumberMarker :: Prelude.Maybe Prelude.Int,
    -- | This header is returned along with the @x-amz-abort-date@ header. It
    -- identifies applicable lifecycle configuration rule that defines the
    -- action to abort incomplete multipart uploads.
    ListPartsResponse -> Maybe Text
abortRuleId :: Prelude.Maybe Prelude.Text,
    -- | Container element that identifies the object owner, after the object is
    -- created. If multipart upload is initiated by an IAM user, this element
    -- provides the parent account ID and display name.
    ListPartsResponse -> Maybe Owner
owner :: Prelude.Maybe Owner,
    -- | Object key for which the multipart upload was initiated.
    ListPartsResponse -> Maybe ObjectKey
key :: Prelude.Maybe ObjectKey,
    -- | Class of storage (STANDARD or REDUCED_REDUNDANCY) used to store the
    -- uploaded object.
    ListPartsResponse -> Maybe StorageClass
storageClass :: Prelude.Maybe StorageClass,
    -- | Indicates whether the returned list of parts is truncated. A true value
    -- indicates that the list was truncated. A list can be truncated if the
    -- number of parts exceeds the limit returned in the MaxParts element.
    ListPartsResponse -> Maybe Bool
isTruncated :: Prelude.Maybe Prelude.Bool,
    -- | When a list is truncated, this element specifies the last part in the
    -- list, as well as the value to use for the part-number-marker request
    -- parameter in a subsequent request.
    ListPartsResponse -> Maybe Int
partNumberMarker :: Prelude.Maybe Prelude.Int,
    -- | Upload ID identifying the multipart upload whose parts are being listed.
    ListPartsResponse -> Maybe Text
uploadId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListPartsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListPartsResponse -> ListPartsResponse -> Bool
(ListPartsResponse -> ListPartsResponse -> Bool)
-> (ListPartsResponse -> ListPartsResponse -> Bool)
-> Eq ListPartsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListPartsResponse -> ListPartsResponse -> Bool
$c/= :: ListPartsResponse -> ListPartsResponse -> Bool
== :: ListPartsResponse -> ListPartsResponse -> Bool
$c== :: ListPartsResponse -> ListPartsResponse -> Bool
Prelude.Eq, ReadPrec [ListPartsResponse]
ReadPrec ListPartsResponse
Int -> ReadS ListPartsResponse
ReadS [ListPartsResponse]
(Int -> ReadS ListPartsResponse)
-> ReadS [ListPartsResponse]
-> ReadPrec ListPartsResponse
-> ReadPrec [ListPartsResponse]
-> Read ListPartsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListPartsResponse]
$creadListPrec :: ReadPrec [ListPartsResponse]
readPrec :: ReadPrec ListPartsResponse
$creadPrec :: ReadPrec ListPartsResponse
readList :: ReadS [ListPartsResponse]
$creadList :: ReadS [ListPartsResponse]
readsPrec :: Int -> ReadS ListPartsResponse
$creadsPrec :: Int -> ReadS ListPartsResponse
Prelude.Read, Int -> ListPartsResponse -> ShowS
[ListPartsResponse] -> ShowS
ListPartsResponse -> String
(Int -> ListPartsResponse -> ShowS)
-> (ListPartsResponse -> String)
-> ([ListPartsResponse] -> ShowS)
-> Show ListPartsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListPartsResponse] -> ShowS
$cshowList :: [ListPartsResponse] -> ShowS
show :: ListPartsResponse -> String
$cshow :: ListPartsResponse -> String
showsPrec :: Int -> ListPartsResponse -> ShowS
$cshowsPrec :: Int -> ListPartsResponse -> ShowS
Prelude.Show, (forall x. ListPartsResponse -> Rep ListPartsResponse x)
-> (forall x. Rep ListPartsResponse x -> ListPartsResponse)
-> Generic ListPartsResponse
forall x. Rep ListPartsResponse x -> ListPartsResponse
forall x. ListPartsResponse -> Rep ListPartsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListPartsResponse x -> ListPartsResponse
$cfrom :: forall x. ListPartsResponse -> Rep ListPartsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListPartsResponse' 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:
--
-- 'parts', 'listPartsResponse_parts' - Container for elements related to a particular part. A response can
-- contain zero or more @Part@ elements.
--
-- 'requestCharged', 'listPartsResponse_requestCharged' - Undocumented member.
--
-- 'maxParts', 'listPartsResponse_maxParts' - Maximum number of parts that were allowed in the response.
--
-- 'initiator', 'listPartsResponse_initiator' - Container element that identifies who initiated the multipart upload. If
-- the initiator is an Amazon Web Services account, this element provides
-- the same information as the @Owner@ element. If the initiator is an IAM
-- User, this element provides the user ARN and display name.
--
-- 'bucket', 'listPartsResponse_bucket' - The name of the bucket to which the multipart upload was initiated. Does
-- not return the access point ARN or access point alias if used.
--
-- 'abortDate', 'listPartsResponse_abortDate' - If the bucket has a lifecycle rule configured with an action to abort
-- incomplete multipart uploads and the prefix in the lifecycle rule
-- matches the object name in the request, then the response includes this
-- header indicating when the initiated multipart upload will become
-- eligible for abort operation. For more information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Policy>.
--
-- The response will also include the @x-amz-abort-rule-id@ header that
-- will provide the ID of the lifecycle configuration rule that defines
-- this action.
--
-- 'nextPartNumberMarker', 'listPartsResponse_nextPartNumberMarker' - When a list is truncated, this element specifies the last part in the
-- list, as well as the value to use for the part-number-marker request
-- parameter in a subsequent request.
--
-- 'abortRuleId', 'listPartsResponse_abortRuleId' - This header is returned along with the @x-amz-abort-date@ header. It
-- identifies applicable lifecycle configuration rule that defines the
-- action to abort incomplete multipart uploads.
--
-- 'owner', 'listPartsResponse_owner' - Container element that identifies the object owner, after the object is
-- created. If multipart upload is initiated by an IAM user, this element
-- provides the parent account ID and display name.
--
-- 'key', 'listPartsResponse_key' - Object key for which the multipart upload was initiated.
--
-- 'storageClass', 'listPartsResponse_storageClass' - Class of storage (STANDARD or REDUCED_REDUNDANCY) used to store the
-- uploaded object.
--
-- 'isTruncated', 'listPartsResponse_isTruncated' - Indicates whether the returned list of parts is truncated. A true value
-- indicates that the list was truncated. A list can be truncated if the
-- number of parts exceeds the limit returned in the MaxParts element.
--
-- 'partNumberMarker', 'listPartsResponse_partNumberMarker' - When a list is truncated, this element specifies the last part in the
-- list, as well as the value to use for the part-number-marker request
-- parameter in a subsequent request.
--
-- 'uploadId', 'listPartsResponse_uploadId' - Upload ID identifying the multipart upload whose parts are being listed.
--
-- 'httpStatus', 'listPartsResponse_httpStatus' - The response's http status code.
newListPartsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListPartsResponse
newListPartsResponse :: Int -> ListPartsResponse
newListPartsResponse Int
pHttpStatus_ =
  ListPartsResponse' :: Maybe [Part]
-> Maybe RequestCharged
-> Maybe Int
-> Maybe Initiator
-> Maybe BucketName
-> Maybe ISO8601
-> Maybe Int
-> Maybe Text
-> Maybe Owner
-> Maybe ObjectKey
-> Maybe StorageClass
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Int
-> ListPartsResponse
ListPartsResponse'
    { $sel:parts:ListPartsResponse' :: Maybe [Part]
parts = Maybe [Part]
forall a. Maybe a
Prelude.Nothing,
      $sel:requestCharged:ListPartsResponse' :: Maybe RequestCharged
requestCharged = Maybe RequestCharged
forall a. Maybe a
Prelude.Nothing,
      $sel:maxParts:ListPartsResponse' :: Maybe Int
maxParts = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:initiator:ListPartsResponse' :: Maybe Initiator
initiator = Maybe Initiator
forall a. Maybe a
Prelude.Nothing,
      $sel:bucket:ListPartsResponse' :: Maybe BucketName
bucket = Maybe BucketName
forall a. Maybe a
Prelude.Nothing,
      $sel:abortDate:ListPartsResponse' :: Maybe ISO8601
abortDate = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:nextPartNumberMarker:ListPartsResponse' :: Maybe Int
nextPartNumberMarker = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:abortRuleId:ListPartsResponse' :: Maybe Text
abortRuleId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:owner:ListPartsResponse' :: Maybe Owner
owner = Maybe Owner
forall a. Maybe a
Prelude.Nothing,
      $sel:key:ListPartsResponse' :: Maybe ObjectKey
key = Maybe ObjectKey
forall a. Maybe a
Prelude.Nothing,
      $sel:storageClass:ListPartsResponse' :: Maybe StorageClass
storageClass = Maybe StorageClass
forall a. Maybe a
Prelude.Nothing,
      $sel:isTruncated:ListPartsResponse' :: Maybe Bool
isTruncated = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:partNumberMarker:ListPartsResponse' :: Maybe Int
partNumberMarker = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:uploadId:ListPartsResponse' :: Maybe Text
uploadId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListPartsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Container for elements related to a particular part. A response can
-- contain zero or more @Part@ elements.
listPartsResponse_parts :: Lens.Lens' ListPartsResponse (Prelude.Maybe [Part])
listPartsResponse_parts :: (Maybe [Part] -> f (Maybe [Part]))
-> ListPartsResponse -> f ListPartsResponse
listPartsResponse_parts = (ListPartsResponse -> Maybe [Part])
-> (ListPartsResponse -> Maybe [Part] -> ListPartsResponse)
-> Lens
     ListPartsResponse ListPartsResponse (Maybe [Part]) (Maybe [Part])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPartsResponse' {Maybe [Part]
parts :: Maybe [Part]
$sel:parts:ListPartsResponse' :: ListPartsResponse -> Maybe [Part]
parts} -> Maybe [Part]
parts) (\s :: ListPartsResponse
s@ListPartsResponse' {} Maybe [Part]
a -> ListPartsResponse
s {$sel:parts:ListPartsResponse' :: Maybe [Part]
parts = Maybe [Part]
a} :: ListPartsResponse) ((Maybe [Part] -> f (Maybe [Part]))
 -> ListPartsResponse -> f ListPartsResponse)
-> ((Maybe [Part] -> f (Maybe [Part]))
    -> Maybe [Part] -> f (Maybe [Part]))
-> (Maybe [Part] -> f (Maybe [Part]))
-> ListPartsResponse
-> f ListPartsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Part] [Part] [Part] [Part]
-> Iso (Maybe [Part]) (Maybe [Part]) (Maybe [Part]) (Maybe [Part])
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 [Part] [Part] [Part] [Part]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Undocumented member.
listPartsResponse_requestCharged :: Lens.Lens' ListPartsResponse (Prelude.Maybe RequestCharged)
listPartsResponse_requestCharged :: (Maybe RequestCharged -> f (Maybe RequestCharged))
-> ListPartsResponse -> f ListPartsResponse
listPartsResponse_requestCharged = (ListPartsResponse -> Maybe RequestCharged)
-> (ListPartsResponse -> Maybe RequestCharged -> ListPartsResponse)
-> Lens
     ListPartsResponse
     ListPartsResponse
     (Maybe RequestCharged)
     (Maybe RequestCharged)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPartsResponse' {Maybe RequestCharged
requestCharged :: Maybe RequestCharged
$sel:requestCharged:ListPartsResponse' :: ListPartsResponse -> Maybe RequestCharged
requestCharged} -> Maybe RequestCharged
requestCharged) (\s :: ListPartsResponse
s@ListPartsResponse' {} Maybe RequestCharged
a -> ListPartsResponse
s {$sel:requestCharged:ListPartsResponse' :: Maybe RequestCharged
requestCharged = Maybe RequestCharged
a} :: ListPartsResponse)

-- | Maximum number of parts that were allowed in the response.
listPartsResponse_maxParts :: Lens.Lens' ListPartsResponse (Prelude.Maybe Prelude.Int)
listPartsResponse_maxParts :: (Maybe Int -> f (Maybe Int))
-> ListPartsResponse -> f ListPartsResponse
listPartsResponse_maxParts = (ListPartsResponse -> Maybe Int)
-> (ListPartsResponse -> Maybe Int -> ListPartsResponse)
-> Lens' ListPartsResponse (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPartsResponse' {Maybe Int
maxParts :: Maybe Int
$sel:maxParts:ListPartsResponse' :: ListPartsResponse -> Maybe Int
maxParts} -> Maybe Int
maxParts) (\s :: ListPartsResponse
s@ListPartsResponse' {} Maybe Int
a -> ListPartsResponse
s {$sel:maxParts:ListPartsResponse' :: Maybe Int
maxParts = Maybe Int
a} :: ListPartsResponse)

-- | Container element that identifies who initiated the multipart upload. If
-- the initiator is an Amazon Web Services account, this element provides
-- the same information as the @Owner@ element. If the initiator is an IAM
-- User, this element provides the user ARN and display name.
listPartsResponse_initiator :: Lens.Lens' ListPartsResponse (Prelude.Maybe Initiator)
listPartsResponse_initiator :: (Maybe Initiator -> f (Maybe Initiator))
-> ListPartsResponse -> f ListPartsResponse
listPartsResponse_initiator = (ListPartsResponse -> Maybe Initiator)
-> (ListPartsResponse -> Maybe Initiator -> ListPartsResponse)
-> Lens
     ListPartsResponse
     ListPartsResponse
     (Maybe Initiator)
     (Maybe Initiator)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPartsResponse' {Maybe Initiator
initiator :: Maybe Initiator
$sel:initiator:ListPartsResponse' :: ListPartsResponse -> Maybe Initiator
initiator} -> Maybe Initiator
initiator) (\s :: ListPartsResponse
s@ListPartsResponse' {} Maybe Initiator
a -> ListPartsResponse
s {$sel:initiator:ListPartsResponse' :: Maybe Initiator
initiator = Maybe Initiator
a} :: ListPartsResponse)

-- | The name of the bucket to which the multipart upload was initiated. Does
-- not return the access point ARN or access point alias if used.
listPartsResponse_bucket :: Lens.Lens' ListPartsResponse (Prelude.Maybe BucketName)
listPartsResponse_bucket :: (Maybe BucketName -> f (Maybe BucketName))
-> ListPartsResponse -> f ListPartsResponse
listPartsResponse_bucket = (ListPartsResponse -> Maybe BucketName)
-> (ListPartsResponse -> Maybe BucketName -> ListPartsResponse)
-> Lens
     ListPartsResponse
     ListPartsResponse
     (Maybe BucketName)
     (Maybe BucketName)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPartsResponse' {Maybe BucketName
bucket :: Maybe BucketName
$sel:bucket:ListPartsResponse' :: ListPartsResponse -> Maybe BucketName
bucket} -> Maybe BucketName
bucket) (\s :: ListPartsResponse
s@ListPartsResponse' {} Maybe BucketName
a -> ListPartsResponse
s {$sel:bucket:ListPartsResponse' :: Maybe BucketName
bucket = Maybe BucketName
a} :: ListPartsResponse)

-- | If the bucket has a lifecycle rule configured with an action to abort
-- incomplete multipart uploads and the prefix in the lifecycle rule
-- matches the object name in the request, then the response includes this
-- header indicating when the initiated multipart upload will become
-- eligible for abort operation. For more information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Policy>.
--
-- The response will also include the @x-amz-abort-rule-id@ header that
-- will provide the ID of the lifecycle configuration rule that defines
-- this action.
listPartsResponse_abortDate :: Lens.Lens' ListPartsResponse (Prelude.Maybe Prelude.UTCTime)
listPartsResponse_abortDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListPartsResponse -> f ListPartsResponse
listPartsResponse_abortDate = (ListPartsResponse -> Maybe ISO8601)
-> (ListPartsResponse -> Maybe ISO8601 -> ListPartsResponse)
-> Lens
     ListPartsResponse ListPartsResponse (Maybe ISO8601) (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPartsResponse' {Maybe ISO8601
abortDate :: Maybe ISO8601
$sel:abortDate:ListPartsResponse' :: ListPartsResponse -> Maybe ISO8601
abortDate} -> Maybe ISO8601
abortDate) (\s :: ListPartsResponse
s@ListPartsResponse' {} Maybe ISO8601
a -> ListPartsResponse
s {$sel:abortDate:ListPartsResponse' :: Maybe ISO8601
abortDate = Maybe ISO8601
a} :: ListPartsResponse) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> ListPartsResponse -> f ListPartsResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListPartsResponse
-> f ListPartsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
     (Maybe ISO8601) (Maybe ISO8601) (Maybe UTCTime) (Maybe UTCTime)
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 ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | When a list is truncated, this element specifies the last part in the
-- list, as well as the value to use for the part-number-marker request
-- parameter in a subsequent request.
listPartsResponse_nextPartNumberMarker :: Lens.Lens' ListPartsResponse (Prelude.Maybe Prelude.Int)
listPartsResponse_nextPartNumberMarker :: (Maybe Int -> f (Maybe Int))
-> ListPartsResponse -> f ListPartsResponse
listPartsResponse_nextPartNumberMarker = (ListPartsResponse -> Maybe Int)
-> (ListPartsResponse -> Maybe Int -> ListPartsResponse)
-> Lens' ListPartsResponse (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPartsResponse' {Maybe Int
nextPartNumberMarker :: Maybe Int
$sel:nextPartNumberMarker:ListPartsResponse' :: ListPartsResponse -> Maybe Int
nextPartNumberMarker} -> Maybe Int
nextPartNumberMarker) (\s :: ListPartsResponse
s@ListPartsResponse' {} Maybe Int
a -> ListPartsResponse
s {$sel:nextPartNumberMarker:ListPartsResponse' :: Maybe Int
nextPartNumberMarker = Maybe Int
a} :: ListPartsResponse)

-- | This header is returned along with the @x-amz-abort-date@ header. It
-- identifies applicable lifecycle configuration rule that defines the
-- action to abort incomplete multipart uploads.
listPartsResponse_abortRuleId :: Lens.Lens' ListPartsResponse (Prelude.Maybe Prelude.Text)
listPartsResponse_abortRuleId :: (Maybe Text -> f (Maybe Text))
-> ListPartsResponse -> f ListPartsResponse
listPartsResponse_abortRuleId = (ListPartsResponse -> Maybe Text)
-> (ListPartsResponse -> Maybe Text -> ListPartsResponse)
-> Lens
     ListPartsResponse ListPartsResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPartsResponse' {Maybe Text
abortRuleId :: Maybe Text
$sel:abortRuleId:ListPartsResponse' :: ListPartsResponse -> Maybe Text
abortRuleId} -> Maybe Text
abortRuleId) (\s :: ListPartsResponse
s@ListPartsResponse' {} Maybe Text
a -> ListPartsResponse
s {$sel:abortRuleId:ListPartsResponse' :: Maybe Text
abortRuleId = Maybe Text
a} :: ListPartsResponse)

-- | Container element that identifies the object owner, after the object is
-- created. If multipart upload is initiated by an IAM user, this element
-- provides the parent account ID and display name.
listPartsResponse_owner :: Lens.Lens' ListPartsResponse (Prelude.Maybe Owner)
listPartsResponse_owner :: (Maybe Owner -> f (Maybe Owner))
-> ListPartsResponse -> f ListPartsResponse
listPartsResponse_owner = (ListPartsResponse -> Maybe Owner)
-> (ListPartsResponse -> Maybe Owner -> ListPartsResponse)
-> Lens
     ListPartsResponse ListPartsResponse (Maybe Owner) (Maybe Owner)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPartsResponse' {Maybe Owner
owner :: Maybe Owner
$sel:owner:ListPartsResponse' :: ListPartsResponse -> Maybe Owner
owner} -> Maybe Owner
owner) (\s :: ListPartsResponse
s@ListPartsResponse' {} Maybe Owner
a -> ListPartsResponse
s {$sel:owner:ListPartsResponse' :: Maybe Owner
owner = Maybe Owner
a} :: ListPartsResponse)

-- | Object key for which the multipart upload was initiated.
listPartsResponse_key :: Lens.Lens' ListPartsResponse (Prelude.Maybe ObjectKey)
listPartsResponse_key :: (Maybe ObjectKey -> f (Maybe ObjectKey))
-> ListPartsResponse -> f ListPartsResponse
listPartsResponse_key = (ListPartsResponse -> Maybe ObjectKey)
-> (ListPartsResponse -> Maybe ObjectKey -> ListPartsResponse)
-> Lens
     ListPartsResponse
     ListPartsResponse
     (Maybe ObjectKey)
     (Maybe ObjectKey)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPartsResponse' {Maybe ObjectKey
key :: Maybe ObjectKey
$sel:key:ListPartsResponse' :: ListPartsResponse -> Maybe ObjectKey
key} -> Maybe ObjectKey
key) (\s :: ListPartsResponse
s@ListPartsResponse' {} Maybe ObjectKey
a -> ListPartsResponse
s {$sel:key:ListPartsResponse' :: Maybe ObjectKey
key = Maybe ObjectKey
a} :: ListPartsResponse)

-- | Class of storage (STANDARD or REDUCED_REDUNDANCY) used to store the
-- uploaded object.
listPartsResponse_storageClass :: Lens.Lens' ListPartsResponse (Prelude.Maybe StorageClass)
listPartsResponse_storageClass :: (Maybe StorageClass -> f (Maybe StorageClass))
-> ListPartsResponse -> f ListPartsResponse
listPartsResponse_storageClass = (ListPartsResponse -> Maybe StorageClass)
-> (ListPartsResponse -> Maybe StorageClass -> ListPartsResponse)
-> Lens
     ListPartsResponse
     ListPartsResponse
     (Maybe StorageClass)
     (Maybe StorageClass)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPartsResponse' {Maybe StorageClass
storageClass :: Maybe StorageClass
$sel:storageClass:ListPartsResponse' :: ListPartsResponse -> Maybe StorageClass
storageClass} -> Maybe StorageClass
storageClass) (\s :: ListPartsResponse
s@ListPartsResponse' {} Maybe StorageClass
a -> ListPartsResponse
s {$sel:storageClass:ListPartsResponse' :: Maybe StorageClass
storageClass = Maybe StorageClass
a} :: ListPartsResponse)

-- | Indicates whether the returned list of parts is truncated. A true value
-- indicates that the list was truncated. A list can be truncated if the
-- number of parts exceeds the limit returned in the MaxParts element.
listPartsResponse_isTruncated :: Lens.Lens' ListPartsResponse (Prelude.Maybe Prelude.Bool)
listPartsResponse_isTruncated :: (Maybe Bool -> f (Maybe Bool))
-> ListPartsResponse -> f ListPartsResponse
listPartsResponse_isTruncated = (ListPartsResponse -> Maybe Bool)
-> (ListPartsResponse -> Maybe Bool -> ListPartsResponse)
-> Lens' ListPartsResponse (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPartsResponse' {Maybe Bool
isTruncated :: Maybe Bool
$sel:isTruncated:ListPartsResponse' :: ListPartsResponse -> Maybe Bool
isTruncated} -> Maybe Bool
isTruncated) (\s :: ListPartsResponse
s@ListPartsResponse' {} Maybe Bool
a -> ListPartsResponse
s {$sel:isTruncated:ListPartsResponse' :: Maybe Bool
isTruncated = Maybe Bool
a} :: ListPartsResponse)

-- | When a list is truncated, this element specifies the last part in the
-- list, as well as the value to use for the part-number-marker request
-- parameter in a subsequent request.
listPartsResponse_partNumberMarker :: Lens.Lens' ListPartsResponse (Prelude.Maybe Prelude.Int)
listPartsResponse_partNumberMarker :: (Maybe Int -> f (Maybe Int))
-> ListPartsResponse -> f ListPartsResponse
listPartsResponse_partNumberMarker = (ListPartsResponse -> Maybe Int)
-> (ListPartsResponse -> Maybe Int -> ListPartsResponse)
-> Lens' ListPartsResponse (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPartsResponse' {Maybe Int
partNumberMarker :: Maybe Int
$sel:partNumberMarker:ListPartsResponse' :: ListPartsResponse -> Maybe Int
partNumberMarker} -> Maybe Int
partNumberMarker) (\s :: ListPartsResponse
s@ListPartsResponse' {} Maybe Int
a -> ListPartsResponse
s {$sel:partNumberMarker:ListPartsResponse' :: Maybe Int
partNumberMarker = Maybe Int
a} :: ListPartsResponse)

-- | Upload ID identifying the multipart upload whose parts are being listed.
listPartsResponse_uploadId :: Lens.Lens' ListPartsResponse (Prelude.Maybe Prelude.Text)
listPartsResponse_uploadId :: (Maybe Text -> f (Maybe Text))
-> ListPartsResponse -> f ListPartsResponse
listPartsResponse_uploadId = (ListPartsResponse -> Maybe Text)
-> (ListPartsResponse -> Maybe Text -> ListPartsResponse)
-> Lens
     ListPartsResponse ListPartsResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPartsResponse' {Maybe Text
uploadId :: Maybe Text
$sel:uploadId:ListPartsResponse' :: ListPartsResponse -> Maybe Text
uploadId} -> Maybe Text
uploadId) (\s :: ListPartsResponse
s@ListPartsResponse' {} Maybe Text
a -> ListPartsResponse
s {$sel:uploadId:ListPartsResponse' :: Maybe Text
uploadId = Maybe Text
a} :: ListPartsResponse)

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

instance Prelude.NFData ListPartsResponse