{-# 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.CreateMultipartUpload
-- 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)
--
-- This action initiates a multipart upload and returns an upload ID. This
-- upload ID is used to associate all of the parts in the specific
-- multipart upload. You specify this upload ID in each of your subsequent
-- upload part requests (see
-- <https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html UploadPart>).
-- You also include this upload ID in the final request to either complete
-- or abort the multipart upload request.
--
-- For more information about multipart uploads, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html Multipart Upload Overview>.
--
-- If you have configured a lifecycle rule to abort incomplete multipart
-- uploads, the upload must complete within the number of days specified in
-- the bucket lifecycle configuration. Otherwise, the incomplete multipart
-- upload becomes eligible for an abort action and Amazon S3 aborts the
-- multipart upload. 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>.
--
-- For information about the permissions required to use the multipart
-- upload API, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html Multipart Upload and Permissions>.
--
-- For request signing, multipart upload is just a series of regular
-- requests. You initiate a multipart upload, send one or more requests to
-- upload parts, and then complete the multipart upload process. You sign
-- each request individually. There is nothing special about signing
-- multipart upload requests. For more information about signing, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html Authenticating Requests (Amazon Web Services Signature Version 4)>.
--
-- After you initiate a multipart upload and upload one or more parts, to
-- stop being charged for storing the uploaded parts, you must either
-- complete or abort the multipart upload. Amazon S3 frees up the space
-- used to store the parts and stop charging you for storing them only
-- after you either complete or abort a multipart upload.
--
-- You can optionally request server-side encryption. For server-side
-- encryption, Amazon S3 encrypts your data as it writes it to disks in its
-- data centers and decrypts it when you access it. You can provide your
-- own encryption key, or use Amazon Web Services KMS keys or Amazon
-- S3-managed encryption keys. If you choose to provide your own encryption
-- key, the request headers you provide in
-- <https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html UploadPart>
-- and
-- <https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html UploadPartCopy>
-- requests must match the headers you used in the request to initiate the
-- upload by using @CreateMultipartUpload@.
--
-- To perform a multipart upload with encryption using an Amazon Web
-- Services KMS key, the requester must have permission to the
-- @kms:Decrypt@ and @kms:GenerateDataKey*@ actions on the key. These
-- permissions are required because Amazon S3 must decrypt and read data
-- from the encrypted file parts before it completes the multipart upload.
-- For more information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions Multipart upload API and permissions>
-- in the /Amazon S3 User Guide/.
--
-- If your Identity and Access Management (IAM) user or role is in the same
-- Amazon Web Services account as the KMS key, then you must have these
-- permissions on the key policy. If your IAM user or role belongs to a
-- different account than the key, then you must have the permissions on
-- both the key policy and your IAM user or role.
--
-- For more information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html Protecting Data Using Server-Side Encryption>.
--
-- [Access Permissions]
--     When copying an object, you can optionally specify the accounts or
--     groups that should be granted specific permissions on the new
--     object. There are two ways to grant the permissions using the
--     request headers:
--
--     -   Specify a canned ACL with the @x-amz-acl@ request header. For
--         more information, see
--         <https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL Canned ACL>.
--
--     -   Specify access permissions explicitly with the
--         @x-amz-grant-read@, @x-amz-grant-read-acp@,
--         @x-amz-grant-write-acp@, and @x-amz-grant-full-control@ headers.
--         These parameters map to the set of permissions that Amazon S3
--         supports in an ACL. For more information, see
--         <https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html Access Control List (ACL) Overview>.
--
--     You can use either a canned ACL or specify access permissions
--     explicitly. You cannot do both.
--
-- [Server-Side- Encryption-Specific Request Headers]
--     You can optionally tell Amazon S3 to encrypt data at rest using
--     server-side encryption. Server-side encryption is for data
--     encryption at rest. Amazon S3 encrypts your data as it writes it to
--     disks in its data centers and decrypts it when you access it. The
--     option you use depends on whether you want to use Amazon Web
--     Services managed encryption keys or provide your own encryption key.
--
--     -   Use encryption keys managed by Amazon S3 or customer managed key
--         stored in Amazon Web Services Key Management Service (Amazon Web
--         Services KMS) – If you want Amazon Web Services to manage the
--         keys used to encrypt data, specify the following headers in the
--         request.
--
--         -   x-amz-server-side-encryption
--
--         -   x-amz-server-side-encryption-aws-kms-key-id
--
--         -   x-amz-server-side-encryption-context
--
--         If you specify @x-amz-server-side-encryption:aws:kms@, but
--         don\'t provide @x-amz-server-side-encryption-aws-kms-key-id@,
--         Amazon S3 uses the Amazon Web Services managed key in Amazon Web
--         Services KMS to protect the data.
--
--         All GET and PUT requests for an object protected by Amazon Web
--         Services KMS fail if you don\'t make them with SSL or by using
--         SigV4.
--
--         For more information about server-side encryption with KMS key
--         (SSE-KMS), see
--         <https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html Protecting Data Using Server-Side Encryption with KMS keys>.
--
--     -   Use customer-provided encryption keys – If you want to manage
--         your own encryption keys, provide all the following headers in
--         the request.
--
--         -   x-amz-server-side-encryption-customer-algorithm
--
--         -   x-amz-server-side-encryption-customer-key
--
--         -   x-amz-server-side-encryption-customer-key-MD5
--
--         For more information about server-side encryption with KMS keys
--         (SSE-KMS), see
--         <https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html Protecting Data Using Server-Side Encryption with KMS keys>.
--
-- [Access-Control-List (ACL)-Specific Request Headers]
--     You also can use the following access control–related headers with
--     this operation. By default, all objects are private. Only the owner
--     has full access control. When adding a new object, you can grant
--     permissions to individual Amazon Web Services accounts or to
--     predefined groups defined by Amazon S3. These permissions are then
--     added to the access control list (ACL) on the object. For more
--     information, see
--     <https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html Using ACLs>.
--     With this operation, you can grant access permissions using one of
--     the following two methods:
--
--     -   Specify a canned ACL (@x-amz-acl@) — Amazon S3 supports a set of
--         predefined ACLs, known as /canned ACLs/. Each canned ACL has a
--         predefined set of grantees and permissions. For more
--         information, see
--         <https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL Canned ACL>.
--
--     -   Specify access permissions explicitly — To explicitly grant
--         access permissions to specific Amazon Web Services accounts or
--         groups, use the following headers. Each header maps to specific
--         permissions that Amazon S3 supports in an ACL. For more
--         information, see
--         <https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html Access Control List (ACL) Overview>.
--         In the header, you specify a list of grantees who get the
--         specific permission. To grant permissions explicitly, use:
--
--         -   x-amz-grant-read
--
--         -   x-amz-grant-write
--
--         -   x-amz-grant-read-acp
--
--         -   x-amz-grant-write-acp
--
--         -   x-amz-grant-full-control
--
--         You specify each grantee as a type=value pair, where the type is
--         one of the following:
--
--         -   @id@ – if the value specified is the canonical user ID of an
--             Amazon Web Services account
--
--         -   @uri@ – if you are granting permissions to a predefined
--             group
--
--         -   @emailAddress@ – if the value specified is the email address
--             of an Amazon Web Services account
--
--             Using email addresses to specify a grantee is only supported
--             in the following Amazon Web Services Regions:
--
--             -   US East (N. Virginia)
--
--             -   US West (N. California)
--
--             -   US West (Oregon)
--
--             -   Asia Pacific (Singapore)
--
--             -   Asia Pacific (Sydney)
--
--             -   Asia Pacific (Tokyo)
--
--             -   Europe (Ireland)
--
--             -   South America (São Paulo)
--
--             For a list of all the Amazon S3 supported Regions and
--             endpoints, see
--             <https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region Regions and Endpoints>
--             in the Amazon Web Services General Reference.
--
--         For example, the following @x-amz-grant-read@ header grants the
--         Amazon Web Services accounts identified by account IDs
--         permissions to read object data and its metadata:
--
--         @x-amz-grant-read: id=\"11112222333\", id=\"444455556666\" @
--
-- The following operations are related to @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_ListParts.html ListParts>
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html ListMultipartUploads>
module Amazonka.S3.CreateMultipartUpload
  ( -- * Creating a Request
    CreateMultipartUpload (..),
    newCreateMultipartUpload,

    -- * Request Lenses
    createMultipartUpload_objectLockMode,
    createMultipartUpload_expires,
    createMultipartUpload_grantReadACP,
    createMultipartUpload_sSECustomerAlgorithm,
    createMultipartUpload_sSECustomerKey,
    createMultipartUpload_requestPayer,
    createMultipartUpload_grantWriteACP,
    createMultipartUpload_bucketKeyEnabled,
    createMultipartUpload_websiteRedirectLocation,
    createMultipartUpload_grantRead,
    createMultipartUpload_storageClass,
    createMultipartUpload_sSECustomerKeyMD5,
    createMultipartUpload_sSEKMSKeyId,
    createMultipartUpload_grantFullControl,
    createMultipartUpload_contentEncoding,
    createMultipartUpload_tagging,
    createMultipartUpload_objectLockRetainUntilDate,
    createMultipartUpload_metadata,
    createMultipartUpload_sSEKMSEncryptionContext,
    createMultipartUpload_cacheControl,
    createMultipartUpload_contentLanguage,
    createMultipartUpload_objectLockLegalHoldStatus,
    createMultipartUpload_acl,
    createMultipartUpload_contentDisposition,
    createMultipartUpload_expectedBucketOwner,
    createMultipartUpload_serverSideEncryption,
    createMultipartUpload_contentType,
    createMultipartUpload_bucket,
    createMultipartUpload_key,

    -- * Destructuring the Response
    CreateMultipartUploadResponse (..),
    newCreateMultipartUploadResponse,

    -- * Response Lenses
    createMultipartUploadResponse_requestCharged,
    createMultipartUploadResponse_bucket,
    createMultipartUploadResponse_sSECustomerAlgorithm,
    createMultipartUploadResponse_abortDate,
    createMultipartUploadResponse_abortRuleId,
    createMultipartUploadResponse_bucketKeyEnabled,
    createMultipartUploadResponse_key,
    createMultipartUploadResponse_sSECustomerKeyMD5,
    createMultipartUploadResponse_sSEKMSKeyId,
    createMultipartUploadResponse_sSEKMSEncryptionContext,
    createMultipartUploadResponse_uploadId,
    createMultipartUploadResponse_serverSideEncryption,
    createMultipartUploadResponse_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:/ 'newCreateMultipartUpload' smart constructor.
data CreateMultipartUpload = CreateMultipartUpload'
  { -- | Specifies the Object Lock mode that you want to apply to the uploaded
    -- object.
    CreateMultipartUpload -> Maybe ObjectLockMode
objectLockMode :: Prelude.Maybe ObjectLockMode,
    -- | The date and time at which the object is no longer cacheable.
    CreateMultipartUpload -> Maybe ISO8601
expires :: Prelude.Maybe Core.ISO8601,
    -- | Allows grantee to read the object ACL.
    --
    -- This action is not supported by Amazon S3 on Outposts.
    CreateMultipartUpload -> Maybe Text
grantReadACP :: Prelude.Maybe Prelude.Text,
    -- | Specifies the algorithm to use to when encrypting the object (for
    -- example, AES256).
    CreateMultipartUpload -> Maybe Text
sSECustomerAlgorithm :: Prelude.Maybe Prelude.Text,
    -- | Specifies the customer-provided encryption key for Amazon S3 to use in
    -- encrypting data. This value is used to store the object and then it is
    -- discarded; Amazon S3 does not store the encryption key. The key must be
    -- appropriate for use with the algorithm specified in the
    -- @x-amz-server-side-encryption-customer-algorithm@ header.
    CreateMultipartUpload -> Maybe (Sensitive Text)
sSECustomerKey :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    CreateMultipartUpload -> Maybe RequestPayer
requestPayer :: Prelude.Maybe RequestPayer,
    -- | Allows grantee to write the ACL for the applicable object.
    --
    -- This action is not supported by Amazon S3 on Outposts.
    CreateMultipartUpload -> Maybe Text
grantWriteACP :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether Amazon S3 should use an S3 Bucket Key for object
    -- encryption with server-side encryption using AWS KMS (SSE-KMS). Setting
    -- this header to @true@ causes Amazon S3 to use an S3 Bucket Key for
    -- object encryption with SSE-KMS.
    --
    -- Specifying this header with an object action doesn’t affect bucket-level
    -- settings for S3 Bucket Key.
    CreateMultipartUpload -> Maybe Bool
bucketKeyEnabled :: Prelude.Maybe Prelude.Bool,
    -- | If the bucket is configured as a website, redirects requests for this
    -- object to another object in the same bucket or to an external URL.
    -- Amazon S3 stores the value of this header in the object metadata.
    CreateMultipartUpload -> Maybe Text
websiteRedirectLocation :: Prelude.Maybe Prelude.Text,
    -- | Allows grantee to read the object data and its metadata.
    --
    -- This action is not supported by Amazon S3 on Outposts.
    CreateMultipartUpload -> Maybe Text
grantRead :: Prelude.Maybe Prelude.Text,
    -- | By default, Amazon S3 uses the STANDARD Storage Class to store newly
    -- created objects. The STANDARD storage class provides high durability and
    -- high availability. Depending on performance needs, you can specify a
    -- different Storage Class. Amazon S3 on Outposts only uses the OUTPOSTS
    -- Storage Class. For more information, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html Storage Classes>
    -- in the /Amazon S3 User Guide/.
    CreateMultipartUpload -> Maybe StorageClass
storageClass :: Prelude.Maybe StorageClass,
    -- | Specifies the 128-bit MD5 digest of the encryption key according to RFC
    -- 1321. Amazon S3 uses this header for a message integrity check to ensure
    -- that the encryption key was transmitted without error.
    CreateMultipartUpload -> Maybe Text
sSECustomerKeyMD5 :: Prelude.Maybe Prelude.Text,
    -- | Specifies the ID of the symmetric customer managed key to use for object
    -- encryption. All GET and PUT requests for an object protected by Amazon
    -- Web Services KMS will fail if not made via SSL or using SigV4. For
    -- information about configuring using any of the officially supported
    -- Amazon Web Services SDKs and Amazon Web Services CLI, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version Specifying the Signature Version in Request Authentication>
    -- in the /Amazon S3 User Guide/.
    CreateMultipartUpload -> Maybe (Sensitive Text)
sSEKMSKeyId :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the
    -- object.
    --
    -- This action is not supported by Amazon S3 on Outposts.
    CreateMultipartUpload -> Maybe Text
grantFullControl :: Prelude.Maybe Prelude.Text,
    -- | Specifies what content encodings have been applied to the object and
    -- thus what decoding mechanisms must be applied to obtain the media-type
    -- referenced by the Content-Type header field.
    CreateMultipartUpload -> Maybe Text
contentEncoding :: Prelude.Maybe Prelude.Text,
    -- | The tag-set for the object. The tag-set must be encoded as URL Query
    -- parameters.
    CreateMultipartUpload -> Maybe Text
tagging :: Prelude.Maybe Prelude.Text,
    -- | Specifies the date and time when you want the Object Lock to expire.
    CreateMultipartUpload -> Maybe ISO8601
objectLockRetainUntilDate :: Prelude.Maybe Core.ISO8601,
    -- | A map of metadata to store with the object in S3.
    CreateMultipartUpload -> HashMap Text Text
metadata :: Prelude.HashMap Prelude.Text Prelude.Text,
    -- | Specifies the Amazon Web Services KMS Encryption Context to use for
    -- object encryption. The value of this header is a base64-encoded UTF-8
    -- string holding JSON with the encryption context key-value pairs.
    CreateMultipartUpload -> Maybe (Sensitive Text)
sSEKMSEncryptionContext :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | Specifies caching behavior along the request\/reply chain.
    CreateMultipartUpload -> Maybe Text
cacheControl :: Prelude.Maybe Prelude.Text,
    -- | The language the content is in.
    CreateMultipartUpload -> Maybe Text
contentLanguage :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether you want to apply a Legal Hold to the uploaded object.
    CreateMultipartUpload -> Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus :: Prelude.Maybe ObjectLockLegalHoldStatus,
    -- | The canned ACL to apply to the object.
    --
    -- This action is not supported by Amazon S3 on Outposts.
    CreateMultipartUpload -> Maybe ObjectCannedACL
acl :: Prelude.Maybe ObjectCannedACL,
    -- | Specifies presentational information for the object.
    CreateMultipartUpload -> Maybe Text
contentDisposition :: Prelude.Maybe Prelude.Text,
    -- | The account ID of the expected bucket owner. If the bucket is owned by a
    -- different account, the request will fail with an HTTP
    -- @403 (Access Denied)@ error.
    CreateMultipartUpload -> Maybe Text
expectedBucketOwner :: Prelude.Maybe Prelude.Text,
    -- | The server-side encryption algorithm used when storing this object in
    -- Amazon S3 (for example, AES256, aws:kms).
    CreateMultipartUpload -> Maybe ServerSideEncryption
serverSideEncryption :: Prelude.Maybe ServerSideEncryption,
    -- | A standard MIME type describing the format of the object data.
    CreateMultipartUpload -> Maybe Text
contentType :: Prelude.Maybe Prelude.Text,
    -- | The name of the bucket to which to initiate the upload
    --
    -- 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/.
    CreateMultipartUpload -> BucketName
bucket :: BucketName,
    -- | Object key for which the multipart upload is to be initiated.
    CreateMultipartUpload -> ObjectKey
key :: ObjectKey
  }
  deriving (CreateMultipartUpload -> CreateMultipartUpload -> Bool
(CreateMultipartUpload -> CreateMultipartUpload -> Bool)
-> (CreateMultipartUpload -> CreateMultipartUpload -> Bool)
-> Eq CreateMultipartUpload
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateMultipartUpload -> CreateMultipartUpload -> Bool
$c/= :: CreateMultipartUpload -> CreateMultipartUpload -> Bool
== :: CreateMultipartUpload -> CreateMultipartUpload -> Bool
$c== :: CreateMultipartUpload -> CreateMultipartUpload -> Bool
Prelude.Eq, Int -> CreateMultipartUpload -> ShowS
[CreateMultipartUpload] -> ShowS
CreateMultipartUpload -> String
(Int -> CreateMultipartUpload -> ShowS)
-> (CreateMultipartUpload -> String)
-> ([CreateMultipartUpload] -> ShowS)
-> Show CreateMultipartUpload
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateMultipartUpload] -> ShowS
$cshowList :: [CreateMultipartUpload] -> ShowS
show :: CreateMultipartUpload -> String
$cshow :: CreateMultipartUpload -> String
showsPrec :: Int -> CreateMultipartUpload -> ShowS
$cshowsPrec :: Int -> CreateMultipartUpload -> ShowS
Prelude.Show, (forall x. CreateMultipartUpload -> Rep CreateMultipartUpload x)
-> (forall x. Rep CreateMultipartUpload x -> CreateMultipartUpload)
-> Generic CreateMultipartUpload
forall x. Rep CreateMultipartUpload x -> CreateMultipartUpload
forall x. CreateMultipartUpload -> Rep CreateMultipartUpload x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateMultipartUpload x -> CreateMultipartUpload
$cfrom :: forall x. CreateMultipartUpload -> Rep CreateMultipartUpload x
Prelude.Generic)

-- |
-- Create a value of 'CreateMultipartUpload' 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:
--
-- 'objectLockMode', 'createMultipartUpload_objectLockMode' - Specifies the Object Lock mode that you want to apply to the uploaded
-- object.
--
-- 'expires', 'createMultipartUpload_expires' - The date and time at which the object is no longer cacheable.
--
-- 'grantReadACP', 'createMultipartUpload_grantReadACP' - Allows grantee to read the object ACL.
--
-- This action is not supported by Amazon S3 on Outposts.
--
-- 'sSECustomerAlgorithm', 'createMultipartUpload_sSECustomerAlgorithm' - Specifies the algorithm to use to when encrypting the object (for
-- example, AES256).
--
-- 'sSECustomerKey', 'createMultipartUpload_sSECustomerKey' - Specifies the customer-provided encryption key for Amazon S3 to use in
-- encrypting data. This value is used to store the object and then it is
-- discarded; Amazon S3 does not store the encryption key. The key must be
-- appropriate for use with the algorithm specified in the
-- @x-amz-server-side-encryption-customer-algorithm@ header.
--
-- 'requestPayer', 'createMultipartUpload_requestPayer' - Undocumented member.
--
-- 'grantWriteACP', 'createMultipartUpload_grantWriteACP' - Allows grantee to write the ACL for the applicable object.
--
-- This action is not supported by Amazon S3 on Outposts.
--
-- 'bucketKeyEnabled', 'createMultipartUpload_bucketKeyEnabled' - Specifies whether Amazon S3 should use an S3 Bucket Key for object
-- encryption with server-side encryption using AWS KMS (SSE-KMS). Setting
-- this header to @true@ causes Amazon S3 to use an S3 Bucket Key for
-- object encryption with SSE-KMS.
--
-- Specifying this header with an object action doesn’t affect bucket-level
-- settings for S3 Bucket Key.
--
-- 'websiteRedirectLocation', 'createMultipartUpload_websiteRedirectLocation' - If the bucket is configured as a website, redirects requests for this
-- object to another object in the same bucket or to an external URL.
-- Amazon S3 stores the value of this header in the object metadata.
--
-- 'grantRead', 'createMultipartUpload_grantRead' - Allows grantee to read the object data and its metadata.
--
-- This action is not supported by Amazon S3 on Outposts.
--
-- 'storageClass', 'createMultipartUpload_storageClass' - By default, Amazon S3 uses the STANDARD Storage Class to store newly
-- created objects. The STANDARD storage class provides high durability and
-- high availability. Depending on performance needs, you can specify a
-- different Storage Class. Amazon S3 on Outposts only uses the OUTPOSTS
-- Storage Class. For more information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html Storage Classes>
-- in the /Amazon S3 User Guide/.
--
-- 'sSECustomerKeyMD5', 'createMultipartUpload_sSECustomerKeyMD5' - Specifies the 128-bit MD5 digest of the encryption key according to RFC
-- 1321. Amazon S3 uses this header for a message integrity check to ensure
-- that the encryption key was transmitted without error.
--
-- 'sSEKMSKeyId', 'createMultipartUpload_sSEKMSKeyId' - Specifies the ID of the symmetric customer managed key to use for object
-- encryption. All GET and PUT requests for an object protected by Amazon
-- Web Services KMS will fail if not made via SSL or using SigV4. For
-- information about configuring using any of the officially supported
-- Amazon Web Services SDKs and Amazon Web Services CLI, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version Specifying the Signature Version in Request Authentication>
-- in the /Amazon S3 User Guide/.
--
-- 'grantFullControl', 'createMultipartUpload_grantFullControl' - Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the
-- object.
--
-- This action is not supported by Amazon S3 on Outposts.
--
-- 'contentEncoding', 'createMultipartUpload_contentEncoding' - Specifies what content encodings have been applied to the object and
-- thus what decoding mechanisms must be applied to obtain the media-type
-- referenced by the Content-Type header field.
--
-- 'tagging', 'createMultipartUpload_tagging' - The tag-set for the object. The tag-set must be encoded as URL Query
-- parameters.
--
-- 'objectLockRetainUntilDate', 'createMultipartUpload_objectLockRetainUntilDate' - Specifies the date and time when you want the Object Lock to expire.
--
-- 'metadata', 'createMultipartUpload_metadata' - A map of metadata to store with the object in S3.
--
-- 'sSEKMSEncryptionContext', 'createMultipartUpload_sSEKMSEncryptionContext' - Specifies the Amazon Web Services KMS Encryption Context to use for
-- object encryption. The value of this header is a base64-encoded UTF-8
-- string holding JSON with the encryption context key-value pairs.
--
-- 'cacheControl', 'createMultipartUpload_cacheControl' - Specifies caching behavior along the request\/reply chain.
--
-- 'contentLanguage', 'createMultipartUpload_contentLanguage' - The language the content is in.
--
-- 'objectLockLegalHoldStatus', 'createMultipartUpload_objectLockLegalHoldStatus' - Specifies whether you want to apply a Legal Hold to the uploaded object.
--
-- 'acl', 'createMultipartUpload_acl' - The canned ACL to apply to the object.
--
-- This action is not supported by Amazon S3 on Outposts.
--
-- 'contentDisposition', 'createMultipartUpload_contentDisposition' - Specifies presentational information for the object.
--
-- 'expectedBucketOwner', 'createMultipartUpload_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.
--
-- 'serverSideEncryption', 'createMultipartUpload_serverSideEncryption' - The server-side encryption algorithm used when storing this object in
-- Amazon S3 (for example, AES256, aws:kms).
--
-- 'contentType', 'createMultipartUpload_contentType' - A standard MIME type describing the format of the object data.
--
-- 'bucket', 'createMultipartUpload_bucket' - The name of the bucket to which to initiate the upload
--
-- 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', 'createMultipartUpload_key' - Object key for which the multipart upload is to be initiated.
newCreateMultipartUpload ::
  -- | 'bucket'
  BucketName ->
  -- | 'key'
  ObjectKey ->
  CreateMultipartUpload
newCreateMultipartUpload :: BucketName -> ObjectKey -> CreateMultipartUpload
newCreateMultipartUpload BucketName
pBucket_ ObjectKey
pKey_ =
  CreateMultipartUpload' :: Maybe ObjectLockMode
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe RequestPayer
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe StorageClass
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> HashMap Text Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe ObjectLockLegalHoldStatus
-> Maybe ObjectCannedACL
-> Maybe Text
-> Maybe Text
-> Maybe ServerSideEncryption
-> Maybe Text
-> BucketName
-> ObjectKey
-> CreateMultipartUpload
CreateMultipartUpload'
    { $sel:objectLockMode:CreateMultipartUpload' :: Maybe ObjectLockMode
objectLockMode =
        Maybe ObjectLockMode
forall a. Maybe a
Prelude.Nothing,
      $sel:expires:CreateMultipartUpload' :: Maybe ISO8601
expires = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:grantReadACP:CreateMultipartUpload' :: Maybe Text
grantReadACP = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerAlgorithm:CreateMultipartUpload' :: Maybe Text
sSECustomerAlgorithm = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerKey:CreateMultipartUpload' :: Maybe (Sensitive Text)
sSECustomerKey = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:requestPayer:CreateMultipartUpload' :: Maybe RequestPayer
requestPayer = Maybe RequestPayer
forall a. Maybe a
Prelude.Nothing,
      $sel:grantWriteACP:CreateMultipartUpload' :: Maybe Text
grantWriteACP = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:bucketKeyEnabled:CreateMultipartUpload' :: Maybe Bool
bucketKeyEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:websiteRedirectLocation:CreateMultipartUpload' :: Maybe Text
websiteRedirectLocation = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:grantRead:CreateMultipartUpload' :: Maybe Text
grantRead = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:storageClass:CreateMultipartUpload' :: Maybe StorageClass
storageClass = Maybe StorageClass
forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerKeyMD5:CreateMultipartUpload' :: Maybe Text
sSECustomerKeyMD5 = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sSEKMSKeyId:CreateMultipartUpload' :: Maybe (Sensitive Text)
sSEKMSKeyId = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:grantFullControl:CreateMultipartUpload' :: Maybe Text
grantFullControl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:contentEncoding:CreateMultipartUpload' :: Maybe Text
contentEncoding = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tagging:CreateMultipartUpload' :: Maybe Text
tagging = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:objectLockRetainUntilDate:CreateMultipartUpload' :: Maybe ISO8601
objectLockRetainUntilDate = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:metadata:CreateMultipartUpload' :: HashMap Text Text
metadata = HashMap Text Text
forall a. Monoid a => a
Prelude.mempty,
      $sel:sSEKMSEncryptionContext:CreateMultipartUpload' :: Maybe (Sensitive Text)
sSEKMSEncryptionContext = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:cacheControl:CreateMultipartUpload' :: Maybe Text
cacheControl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:contentLanguage:CreateMultipartUpload' :: Maybe Text
contentLanguage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:objectLockLegalHoldStatus:CreateMultipartUpload' :: Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus = Maybe ObjectLockLegalHoldStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:acl:CreateMultipartUpload' :: Maybe ObjectCannedACL
acl = Maybe ObjectCannedACL
forall a. Maybe a
Prelude.Nothing,
      $sel:contentDisposition:CreateMultipartUpload' :: Maybe Text
contentDisposition = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:expectedBucketOwner:CreateMultipartUpload' :: Maybe Text
expectedBucketOwner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:serverSideEncryption:CreateMultipartUpload' :: Maybe ServerSideEncryption
serverSideEncryption = Maybe ServerSideEncryption
forall a. Maybe a
Prelude.Nothing,
      $sel:contentType:CreateMultipartUpload' :: Maybe Text
contentType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:bucket:CreateMultipartUpload' :: BucketName
bucket = BucketName
pBucket_,
      $sel:key:CreateMultipartUpload' :: ObjectKey
key = ObjectKey
pKey_
    }

-- | Specifies the Object Lock mode that you want to apply to the uploaded
-- object.
createMultipartUpload_objectLockMode :: Lens.Lens' CreateMultipartUpload (Prelude.Maybe ObjectLockMode)
createMultipartUpload_objectLockMode :: (Maybe ObjectLockMode -> f (Maybe ObjectLockMode))
-> CreateMultipartUpload -> f CreateMultipartUpload
createMultipartUpload_objectLockMode = (CreateMultipartUpload -> Maybe ObjectLockMode)
-> (CreateMultipartUpload
    -> Maybe ObjectLockMode -> CreateMultipartUpload)
-> Lens
     CreateMultipartUpload
     CreateMultipartUpload
     (Maybe ObjectLockMode)
     (Maybe ObjectLockMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUpload' {Maybe ObjectLockMode
objectLockMode :: Maybe ObjectLockMode
$sel:objectLockMode:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe ObjectLockMode
objectLockMode} -> Maybe ObjectLockMode
objectLockMode) (\s :: CreateMultipartUpload
s@CreateMultipartUpload' {} Maybe ObjectLockMode
a -> CreateMultipartUpload
s {$sel:objectLockMode:CreateMultipartUpload' :: Maybe ObjectLockMode
objectLockMode = Maybe ObjectLockMode
a} :: CreateMultipartUpload)

-- | The date and time at which the object is no longer cacheable.
createMultipartUpload_expires :: Lens.Lens' CreateMultipartUpload (Prelude.Maybe Prelude.UTCTime)
createMultipartUpload_expires :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateMultipartUpload -> f CreateMultipartUpload
createMultipartUpload_expires = (CreateMultipartUpload -> Maybe ISO8601)
-> (CreateMultipartUpload
    -> Maybe ISO8601 -> CreateMultipartUpload)
-> Lens
     CreateMultipartUpload
     CreateMultipartUpload
     (Maybe ISO8601)
     (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUpload' {Maybe ISO8601
expires :: Maybe ISO8601
$sel:expires:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe ISO8601
expires} -> Maybe ISO8601
expires) (\s :: CreateMultipartUpload
s@CreateMultipartUpload' {} Maybe ISO8601
a -> CreateMultipartUpload
s {$sel:expires:CreateMultipartUpload' :: Maybe ISO8601
expires = Maybe ISO8601
a} :: CreateMultipartUpload) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> CreateMultipartUpload -> f CreateMultipartUpload)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateMultipartUpload
-> f CreateMultipartUpload
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

-- | Allows grantee to read the object ACL.
--
-- This action is not supported by Amazon S3 on Outposts.
createMultipartUpload_grantReadACP :: Lens.Lens' CreateMultipartUpload (Prelude.Maybe Prelude.Text)
createMultipartUpload_grantReadACP :: (Maybe Text -> f (Maybe Text))
-> CreateMultipartUpload -> f CreateMultipartUpload
createMultipartUpload_grantReadACP = (CreateMultipartUpload -> Maybe Text)
-> (CreateMultipartUpload -> Maybe Text -> CreateMultipartUpload)
-> Lens
     CreateMultipartUpload
     CreateMultipartUpload
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUpload' {Maybe Text
grantReadACP :: Maybe Text
$sel:grantReadACP:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
grantReadACP} -> Maybe Text
grantReadACP) (\s :: CreateMultipartUpload
s@CreateMultipartUpload' {} Maybe Text
a -> CreateMultipartUpload
s {$sel:grantReadACP:CreateMultipartUpload' :: Maybe Text
grantReadACP = Maybe Text
a} :: CreateMultipartUpload)

-- | Specifies the algorithm to use to when encrypting the object (for
-- example, AES256).
createMultipartUpload_sSECustomerAlgorithm :: Lens.Lens' CreateMultipartUpload (Prelude.Maybe Prelude.Text)
createMultipartUpload_sSECustomerAlgorithm :: (Maybe Text -> f (Maybe Text))
-> CreateMultipartUpload -> f CreateMultipartUpload
createMultipartUpload_sSECustomerAlgorithm = (CreateMultipartUpload -> Maybe Text)
-> (CreateMultipartUpload -> Maybe Text -> CreateMultipartUpload)
-> Lens
     CreateMultipartUpload
     CreateMultipartUpload
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUpload' {Maybe Text
sSECustomerAlgorithm :: Maybe Text
$sel:sSECustomerAlgorithm:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
sSECustomerAlgorithm} -> Maybe Text
sSECustomerAlgorithm) (\s :: CreateMultipartUpload
s@CreateMultipartUpload' {} Maybe Text
a -> CreateMultipartUpload
s {$sel:sSECustomerAlgorithm:CreateMultipartUpload' :: Maybe Text
sSECustomerAlgorithm = Maybe Text
a} :: CreateMultipartUpload)

-- | Specifies the customer-provided encryption key for Amazon S3 to use in
-- encrypting data. This value is used to store the object and then it is
-- discarded; Amazon S3 does not store the encryption key. The key must be
-- appropriate for use with the algorithm specified in the
-- @x-amz-server-side-encryption-customer-algorithm@ header.
createMultipartUpload_sSECustomerKey :: Lens.Lens' CreateMultipartUpload (Prelude.Maybe Prelude.Text)
createMultipartUpload_sSECustomerKey :: (Maybe Text -> f (Maybe Text))
-> CreateMultipartUpload -> f CreateMultipartUpload
createMultipartUpload_sSECustomerKey = (CreateMultipartUpload -> Maybe (Sensitive Text))
-> (CreateMultipartUpload
    -> Maybe (Sensitive Text) -> CreateMultipartUpload)
-> Lens
     CreateMultipartUpload
     CreateMultipartUpload
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUpload' {Maybe (Sensitive Text)
sSECustomerKey :: Maybe (Sensitive Text)
$sel:sSECustomerKey:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe (Sensitive Text)
sSECustomerKey} -> Maybe (Sensitive Text)
sSECustomerKey) (\s :: CreateMultipartUpload
s@CreateMultipartUpload' {} Maybe (Sensitive Text)
a -> CreateMultipartUpload
s {$sel:sSECustomerKey:CreateMultipartUpload' :: Maybe (Sensitive Text)
sSECustomerKey = Maybe (Sensitive Text)
a} :: CreateMultipartUpload) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> CreateMultipartUpload -> f CreateMultipartUpload)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> CreateMultipartUpload
-> f CreateMultipartUpload
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe Text)
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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

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

-- | Allows grantee to write the ACL for the applicable object.
--
-- This action is not supported by Amazon S3 on Outposts.
createMultipartUpload_grantWriteACP :: Lens.Lens' CreateMultipartUpload (Prelude.Maybe Prelude.Text)
createMultipartUpload_grantWriteACP :: (Maybe Text -> f (Maybe Text))
-> CreateMultipartUpload -> f CreateMultipartUpload
createMultipartUpload_grantWriteACP = (CreateMultipartUpload -> Maybe Text)
-> (CreateMultipartUpload -> Maybe Text -> CreateMultipartUpload)
-> Lens
     CreateMultipartUpload
     CreateMultipartUpload
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUpload' {Maybe Text
grantWriteACP :: Maybe Text
$sel:grantWriteACP:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
grantWriteACP} -> Maybe Text
grantWriteACP) (\s :: CreateMultipartUpload
s@CreateMultipartUpload' {} Maybe Text
a -> CreateMultipartUpload
s {$sel:grantWriteACP:CreateMultipartUpload' :: Maybe Text
grantWriteACP = Maybe Text
a} :: CreateMultipartUpload)

-- | Specifies whether Amazon S3 should use an S3 Bucket Key for object
-- encryption with server-side encryption using AWS KMS (SSE-KMS). Setting
-- this header to @true@ causes Amazon S3 to use an S3 Bucket Key for
-- object encryption with SSE-KMS.
--
-- Specifying this header with an object action doesn’t affect bucket-level
-- settings for S3 Bucket Key.
createMultipartUpload_bucketKeyEnabled :: Lens.Lens' CreateMultipartUpload (Prelude.Maybe Prelude.Bool)
createMultipartUpload_bucketKeyEnabled :: (Maybe Bool -> f (Maybe Bool))
-> CreateMultipartUpload -> f CreateMultipartUpload
createMultipartUpload_bucketKeyEnabled = (CreateMultipartUpload -> Maybe Bool)
-> (CreateMultipartUpload -> Maybe Bool -> CreateMultipartUpload)
-> Lens
     CreateMultipartUpload
     CreateMultipartUpload
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUpload' {Maybe Bool
bucketKeyEnabled :: Maybe Bool
$sel:bucketKeyEnabled:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Bool
bucketKeyEnabled} -> Maybe Bool
bucketKeyEnabled) (\s :: CreateMultipartUpload
s@CreateMultipartUpload' {} Maybe Bool
a -> CreateMultipartUpload
s {$sel:bucketKeyEnabled:CreateMultipartUpload' :: Maybe Bool
bucketKeyEnabled = Maybe Bool
a} :: CreateMultipartUpload)

-- | If the bucket is configured as a website, redirects requests for this
-- object to another object in the same bucket or to an external URL.
-- Amazon S3 stores the value of this header in the object metadata.
createMultipartUpload_websiteRedirectLocation :: Lens.Lens' CreateMultipartUpload (Prelude.Maybe Prelude.Text)
createMultipartUpload_websiteRedirectLocation :: (Maybe Text -> f (Maybe Text))
-> CreateMultipartUpload -> f CreateMultipartUpload
createMultipartUpload_websiteRedirectLocation = (CreateMultipartUpload -> Maybe Text)
-> (CreateMultipartUpload -> Maybe Text -> CreateMultipartUpload)
-> Lens
     CreateMultipartUpload
     CreateMultipartUpload
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUpload' {Maybe Text
websiteRedirectLocation :: Maybe Text
$sel:websiteRedirectLocation:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
websiteRedirectLocation} -> Maybe Text
websiteRedirectLocation) (\s :: CreateMultipartUpload
s@CreateMultipartUpload' {} Maybe Text
a -> CreateMultipartUpload
s {$sel:websiteRedirectLocation:CreateMultipartUpload' :: Maybe Text
websiteRedirectLocation = Maybe Text
a} :: CreateMultipartUpload)

-- | Allows grantee to read the object data and its metadata.
--
-- This action is not supported by Amazon S3 on Outposts.
createMultipartUpload_grantRead :: Lens.Lens' CreateMultipartUpload (Prelude.Maybe Prelude.Text)
createMultipartUpload_grantRead :: (Maybe Text -> f (Maybe Text))
-> CreateMultipartUpload -> f CreateMultipartUpload
createMultipartUpload_grantRead = (CreateMultipartUpload -> Maybe Text)
-> (CreateMultipartUpload -> Maybe Text -> CreateMultipartUpload)
-> Lens
     CreateMultipartUpload
     CreateMultipartUpload
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUpload' {Maybe Text
grantRead :: Maybe Text
$sel:grantRead:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
grantRead} -> Maybe Text
grantRead) (\s :: CreateMultipartUpload
s@CreateMultipartUpload' {} Maybe Text
a -> CreateMultipartUpload
s {$sel:grantRead:CreateMultipartUpload' :: Maybe Text
grantRead = Maybe Text
a} :: CreateMultipartUpload)

-- | By default, Amazon S3 uses the STANDARD Storage Class to store newly
-- created objects. The STANDARD storage class provides high durability and
-- high availability. Depending on performance needs, you can specify a
-- different Storage Class. Amazon S3 on Outposts only uses the OUTPOSTS
-- Storage Class. For more information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html Storage Classes>
-- in the /Amazon S3 User Guide/.
createMultipartUpload_storageClass :: Lens.Lens' CreateMultipartUpload (Prelude.Maybe StorageClass)
createMultipartUpload_storageClass :: (Maybe StorageClass -> f (Maybe StorageClass))
-> CreateMultipartUpload -> f CreateMultipartUpload
createMultipartUpload_storageClass = (CreateMultipartUpload -> Maybe StorageClass)
-> (CreateMultipartUpload
    -> Maybe StorageClass -> CreateMultipartUpload)
-> Lens
     CreateMultipartUpload
     CreateMultipartUpload
     (Maybe StorageClass)
     (Maybe StorageClass)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUpload' {Maybe StorageClass
storageClass :: Maybe StorageClass
$sel:storageClass:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe StorageClass
storageClass} -> Maybe StorageClass
storageClass) (\s :: CreateMultipartUpload
s@CreateMultipartUpload' {} Maybe StorageClass
a -> CreateMultipartUpload
s {$sel:storageClass:CreateMultipartUpload' :: Maybe StorageClass
storageClass = Maybe StorageClass
a} :: CreateMultipartUpload)

-- | Specifies the 128-bit MD5 digest of the encryption key according to RFC
-- 1321. Amazon S3 uses this header for a message integrity check to ensure
-- that the encryption key was transmitted without error.
createMultipartUpload_sSECustomerKeyMD5 :: Lens.Lens' CreateMultipartUpload (Prelude.Maybe Prelude.Text)
createMultipartUpload_sSECustomerKeyMD5 :: (Maybe Text -> f (Maybe Text))
-> CreateMultipartUpload -> f CreateMultipartUpload
createMultipartUpload_sSECustomerKeyMD5 = (CreateMultipartUpload -> Maybe Text)
-> (CreateMultipartUpload -> Maybe Text -> CreateMultipartUpload)
-> Lens
     CreateMultipartUpload
     CreateMultipartUpload
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUpload' {Maybe Text
sSECustomerKeyMD5 :: Maybe Text
$sel:sSECustomerKeyMD5:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
sSECustomerKeyMD5} -> Maybe Text
sSECustomerKeyMD5) (\s :: CreateMultipartUpload
s@CreateMultipartUpload' {} Maybe Text
a -> CreateMultipartUpload
s {$sel:sSECustomerKeyMD5:CreateMultipartUpload' :: Maybe Text
sSECustomerKeyMD5 = Maybe Text
a} :: CreateMultipartUpload)

-- | Specifies the ID of the symmetric customer managed key to use for object
-- encryption. All GET and PUT requests for an object protected by Amazon
-- Web Services KMS will fail if not made via SSL or using SigV4. For
-- information about configuring using any of the officially supported
-- Amazon Web Services SDKs and Amazon Web Services CLI, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version Specifying the Signature Version in Request Authentication>
-- in the /Amazon S3 User Guide/.
createMultipartUpload_sSEKMSKeyId :: Lens.Lens' CreateMultipartUpload (Prelude.Maybe Prelude.Text)
createMultipartUpload_sSEKMSKeyId :: (Maybe Text -> f (Maybe Text))
-> CreateMultipartUpload -> f CreateMultipartUpload
createMultipartUpload_sSEKMSKeyId = (CreateMultipartUpload -> Maybe (Sensitive Text))
-> (CreateMultipartUpload
    -> Maybe (Sensitive Text) -> CreateMultipartUpload)
-> Lens
     CreateMultipartUpload
     CreateMultipartUpload
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUpload' {Maybe (Sensitive Text)
sSEKMSKeyId :: Maybe (Sensitive Text)
$sel:sSEKMSKeyId:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe (Sensitive Text)
sSEKMSKeyId} -> Maybe (Sensitive Text)
sSEKMSKeyId) (\s :: CreateMultipartUpload
s@CreateMultipartUpload' {} Maybe (Sensitive Text)
a -> CreateMultipartUpload
s {$sel:sSEKMSKeyId:CreateMultipartUpload' :: Maybe (Sensitive Text)
sSEKMSKeyId = Maybe (Sensitive Text)
a} :: CreateMultipartUpload) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> CreateMultipartUpload -> f CreateMultipartUpload)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> CreateMultipartUpload
-> f CreateMultipartUpload
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe Text)
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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the
-- object.
--
-- This action is not supported by Amazon S3 on Outposts.
createMultipartUpload_grantFullControl :: Lens.Lens' CreateMultipartUpload (Prelude.Maybe Prelude.Text)
createMultipartUpload_grantFullControl :: (Maybe Text -> f (Maybe Text))
-> CreateMultipartUpload -> f CreateMultipartUpload
createMultipartUpload_grantFullControl = (CreateMultipartUpload -> Maybe Text)
-> (CreateMultipartUpload -> Maybe Text -> CreateMultipartUpload)
-> Lens
     CreateMultipartUpload
     CreateMultipartUpload
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUpload' {Maybe Text
grantFullControl :: Maybe Text
$sel:grantFullControl:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
grantFullControl} -> Maybe Text
grantFullControl) (\s :: CreateMultipartUpload
s@CreateMultipartUpload' {} Maybe Text
a -> CreateMultipartUpload
s {$sel:grantFullControl:CreateMultipartUpload' :: Maybe Text
grantFullControl = Maybe Text
a} :: CreateMultipartUpload)

-- | Specifies what content encodings have been applied to the object and
-- thus what decoding mechanisms must be applied to obtain the media-type
-- referenced by the Content-Type header field.
createMultipartUpload_contentEncoding :: Lens.Lens' CreateMultipartUpload (Prelude.Maybe Prelude.Text)
createMultipartUpload_contentEncoding :: (Maybe Text -> f (Maybe Text))
-> CreateMultipartUpload -> f CreateMultipartUpload
createMultipartUpload_contentEncoding = (CreateMultipartUpload -> Maybe Text)
-> (CreateMultipartUpload -> Maybe Text -> CreateMultipartUpload)
-> Lens
     CreateMultipartUpload
     CreateMultipartUpload
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUpload' {Maybe Text
contentEncoding :: Maybe Text
$sel:contentEncoding:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
contentEncoding} -> Maybe Text
contentEncoding) (\s :: CreateMultipartUpload
s@CreateMultipartUpload' {} Maybe Text
a -> CreateMultipartUpload
s {$sel:contentEncoding:CreateMultipartUpload' :: Maybe Text
contentEncoding = Maybe Text
a} :: CreateMultipartUpload)

-- | The tag-set for the object. The tag-set must be encoded as URL Query
-- parameters.
createMultipartUpload_tagging :: Lens.Lens' CreateMultipartUpload (Prelude.Maybe Prelude.Text)
createMultipartUpload_tagging :: (Maybe Text -> f (Maybe Text))
-> CreateMultipartUpload -> f CreateMultipartUpload
createMultipartUpload_tagging = (CreateMultipartUpload -> Maybe Text)
-> (CreateMultipartUpload -> Maybe Text -> CreateMultipartUpload)
-> Lens
     CreateMultipartUpload
     CreateMultipartUpload
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUpload' {Maybe Text
tagging :: Maybe Text
$sel:tagging:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
tagging} -> Maybe Text
tagging) (\s :: CreateMultipartUpload
s@CreateMultipartUpload' {} Maybe Text
a -> CreateMultipartUpload
s {$sel:tagging:CreateMultipartUpload' :: Maybe Text
tagging = Maybe Text
a} :: CreateMultipartUpload)

-- | Specifies the date and time when you want the Object Lock to expire.
createMultipartUpload_objectLockRetainUntilDate :: Lens.Lens' CreateMultipartUpload (Prelude.Maybe Prelude.UTCTime)
createMultipartUpload_objectLockRetainUntilDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateMultipartUpload -> f CreateMultipartUpload
createMultipartUpload_objectLockRetainUntilDate = (CreateMultipartUpload -> Maybe ISO8601)
-> (CreateMultipartUpload
    -> Maybe ISO8601 -> CreateMultipartUpload)
-> Lens
     CreateMultipartUpload
     CreateMultipartUpload
     (Maybe ISO8601)
     (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUpload' {Maybe ISO8601
objectLockRetainUntilDate :: Maybe ISO8601
$sel:objectLockRetainUntilDate:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe ISO8601
objectLockRetainUntilDate} -> Maybe ISO8601
objectLockRetainUntilDate) (\s :: CreateMultipartUpload
s@CreateMultipartUpload' {} Maybe ISO8601
a -> CreateMultipartUpload
s {$sel:objectLockRetainUntilDate:CreateMultipartUpload' :: Maybe ISO8601
objectLockRetainUntilDate = Maybe ISO8601
a} :: CreateMultipartUpload) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> CreateMultipartUpload -> f CreateMultipartUpload)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateMultipartUpload
-> f CreateMultipartUpload
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

-- | A map of metadata to store with the object in S3.
createMultipartUpload_metadata :: Lens.Lens' CreateMultipartUpload (Prelude.HashMap Prelude.Text Prelude.Text)
createMultipartUpload_metadata :: (HashMap Text Text -> f (HashMap Text Text))
-> CreateMultipartUpload -> f CreateMultipartUpload
createMultipartUpload_metadata = (CreateMultipartUpload -> HashMap Text Text)
-> (CreateMultipartUpload
    -> HashMap Text Text -> CreateMultipartUpload)
-> Lens
     CreateMultipartUpload
     CreateMultipartUpload
     (HashMap Text Text)
     (HashMap Text Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUpload' {HashMap Text Text
metadata :: HashMap Text Text
$sel:metadata:CreateMultipartUpload' :: CreateMultipartUpload -> HashMap Text Text
metadata} -> HashMap Text Text
metadata) (\s :: CreateMultipartUpload
s@CreateMultipartUpload' {} HashMap Text Text
a -> CreateMultipartUpload
s {$sel:metadata:CreateMultipartUpload' :: HashMap Text Text
metadata = HashMap Text Text
a} :: CreateMultipartUpload) ((HashMap Text Text -> f (HashMap Text Text))
 -> CreateMultipartUpload -> f CreateMultipartUpload)
-> ((HashMap Text Text -> f (HashMap Text Text))
    -> HashMap Text Text -> f (HashMap Text Text))
-> (HashMap Text Text -> f (HashMap Text Text))
-> CreateMultipartUpload
-> f CreateMultipartUpload
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (HashMap Text Text -> f (HashMap Text Text))
-> HashMap Text Text -> f (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Specifies the Amazon Web Services KMS Encryption Context to use for
-- object encryption. The value of this header is a base64-encoded UTF-8
-- string holding JSON with the encryption context key-value pairs.
createMultipartUpload_sSEKMSEncryptionContext :: Lens.Lens' CreateMultipartUpload (Prelude.Maybe Prelude.Text)
createMultipartUpload_sSEKMSEncryptionContext :: (Maybe Text -> f (Maybe Text))
-> CreateMultipartUpload -> f CreateMultipartUpload
createMultipartUpload_sSEKMSEncryptionContext = (CreateMultipartUpload -> Maybe (Sensitive Text))
-> (CreateMultipartUpload
    -> Maybe (Sensitive Text) -> CreateMultipartUpload)
-> Lens
     CreateMultipartUpload
     CreateMultipartUpload
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUpload' {Maybe (Sensitive Text)
sSEKMSEncryptionContext :: Maybe (Sensitive Text)
$sel:sSEKMSEncryptionContext:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe (Sensitive Text)
sSEKMSEncryptionContext} -> Maybe (Sensitive Text)
sSEKMSEncryptionContext) (\s :: CreateMultipartUpload
s@CreateMultipartUpload' {} Maybe (Sensitive Text)
a -> CreateMultipartUpload
s {$sel:sSEKMSEncryptionContext:CreateMultipartUpload' :: Maybe (Sensitive Text)
sSEKMSEncryptionContext = Maybe (Sensitive Text)
a} :: CreateMultipartUpload) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> CreateMultipartUpload -> f CreateMultipartUpload)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> CreateMultipartUpload
-> f CreateMultipartUpload
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe Text)
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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | Specifies caching behavior along the request\/reply chain.
createMultipartUpload_cacheControl :: Lens.Lens' CreateMultipartUpload (Prelude.Maybe Prelude.Text)
createMultipartUpload_cacheControl :: (Maybe Text -> f (Maybe Text))
-> CreateMultipartUpload -> f CreateMultipartUpload
createMultipartUpload_cacheControl = (CreateMultipartUpload -> Maybe Text)
-> (CreateMultipartUpload -> Maybe Text -> CreateMultipartUpload)
-> Lens
     CreateMultipartUpload
     CreateMultipartUpload
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUpload' {Maybe Text
cacheControl :: Maybe Text
$sel:cacheControl:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
cacheControl} -> Maybe Text
cacheControl) (\s :: CreateMultipartUpload
s@CreateMultipartUpload' {} Maybe Text
a -> CreateMultipartUpload
s {$sel:cacheControl:CreateMultipartUpload' :: Maybe Text
cacheControl = Maybe Text
a} :: CreateMultipartUpload)

-- | The language the content is in.
createMultipartUpload_contentLanguage :: Lens.Lens' CreateMultipartUpload (Prelude.Maybe Prelude.Text)
createMultipartUpload_contentLanguage :: (Maybe Text -> f (Maybe Text))
-> CreateMultipartUpload -> f CreateMultipartUpload
createMultipartUpload_contentLanguage = (CreateMultipartUpload -> Maybe Text)
-> (CreateMultipartUpload -> Maybe Text -> CreateMultipartUpload)
-> Lens
     CreateMultipartUpload
     CreateMultipartUpload
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUpload' {Maybe Text
contentLanguage :: Maybe Text
$sel:contentLanguage:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
contentLanguage} -> Maybe Text
contentLanguage) (\s :: CreateMultipartUpload
s@CreateMultipartUpload' {} Maybe Text
a -> CreateMultipartUpload
s {$sel:contentLanguage:CreateMultipartUpload' :: Maybe Text
contentLanguage = Maybe Text
a} :: CreateMultipartUpload)

-- | Specifies whether you want to apply a Legal Hold to the uploaded object.
createMultipartUpload_objectLockLegalHoldStatus :: Lens.Lens' CreateMultipartUpload (Prelude.Maybe ObjectLockLegalHoldStatus)
createMultipartUpload_objectLockLegalHoldStatus :: (Maybe ObjectLockLegalHoldStatus
 -> f (Maybe ObjectLockLegalHoldStatus))
-> CreateMultipartUpload -> f CreateMultipartUpload
createMultipartUpload_objectLockLegalHoldStatus = (CreateMultipartUpload -> Maybe ObjectLockLegalHoldStatus)
-> (CreateMultipartUpload
    -> Maybe ObjectLockLegalHoldStatus -> CreateMultipartUpload)
-> Lens
     CreateMultipartUpload
     CreateMultipartUpload
     (Maybe ObjectLockLegalHoldStatus)
     (Maybe ObjectLockLegalHoldStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUpload' {Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus :: Maybe ObjectLockLegalHoldStatus
$sel:objectLockLegalHoldStatus:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus} -> Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus) (\s :: CreateMultipartUpload
s@CreateMultipartUpload' {} Maybe ObjectLockLegalHoldStatus
a -> CreateMultipartUpload
s {$sel:objectLockLegalHoldStatus:CreateMultipartUpload' :: Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus = Maybe ObjectLockLegalHoldStatus
a} :: CreateMultipartUpload)

-- | The canned ACL to apply to the object.
--
-- This action is not supported by Amazon S3 on Outposts.
createMultipartUpload_acl :: Lens.Lens' CreateMultipartUpload (Prelude.Maybe ObjectCannedACL)
createMultipartUpload_acl :: (Maybe ObjectCannedACL -> f (Maybe ObjectCannedACL))
-> CreateMultipartUpload -> f CreateMultipartUpload
createMultipartUpload_acl = (CreateMultipartUpload -> Maybe ObjectCannedACL)
-> (CreateMultipartUpload
    -> Maybe ObjectCannedACL -> CreateMultipartUpload)
-> Lens
     CreateMultipartUpload
     CreateMultipartUpload
     (Maybe ObjectCannedACL)
     (Maybe ObjectCannedACL)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUpload' {Maybe ObjectCannedACL
acl :: Maybe ObjectCannedACL
$sel:acl:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe ObjectCannedACL
acl} -> Maybe ObjectCannedACL
acl) (\s :: CreateMultipartUpload
s@CreateMultipartUpload' {} Maybe ObjectCannedACL
a -> CreateMultipartUpload
s {$sel:acl:CreateMultipartUpload' :: Maybe ObjectCannedACL
acl = Maybe ObjectCannedACL
a} :: CreateMultipartUpload)

-- | Specifies presentational information for the object.
createMultipartUpload_contentDisposition :: Lens.Lens' CreateMultipartUpload (Prelude.Maybe Prelude.Text)
createMultipartUpload_contentDisposition :: (Maybe Text -> f (Maybe Text))
-> CreateMultipartUpload -> f CreateMultipartUpload
createMultipartUpload_contentDisposition = (CreateMultipartUpload -> Maybe Text)
-> (CreateMultipartUpload -> Maybe Text -> CreateMultipartUpload)
-> Lens
     CreateMultipartUpload
     CreateMultipartUpload
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUpload' {Maybe Text
contentDisposition :: Maybe Text
$sel:contentDisposition:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
contentDisposition} -> Maybe Text
contentDisposition) (\s :: CreateMultipartUpload
s@CreateMultipartUpload' {} Maybe Text
a -> CreateMultipartUpload
s {$sel:contentDisposition:CreateMultipartUpload' :: Maybe Text
contentDisposition = Maybe Text
a} :: CreateMultipartUpload)

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

-- | The server-side encryption algorithm used when storing this object in
-- Amazon S3 (for example, AES256, aws:kms).
createMultipartUpload_serverSideEncryption :: Lens.Lens' CreateMultipartUpload (Prelude.Maybe ServerSideEncryption)
createMultipartUpload_serverSideEncryption :: (Maybe ServerSideEncryption -> f (Maybe ServerSideEncryption))
-> CreateMultipartUpload -> f CreateMultipartUpload
createMultipartUpload_serverSideEncryption = (CreateMultipartUpload -> Maybe ServerSideEncryption)
-> (CreateMultipartUpload
    -> Maybe ServerSideEncryption -> CreateMultipartUpload)
-> Lens
     CreateMultipartUpload
     CreateMultipartUpload
     (Maybe ServerSideEncryption)
     (Maybe ServerSideEncryption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUpload' {Maybe ServerSideEncryption
serverSideEncryption :: Maybe ServerSideEncryption
$sel:serverSideEncryption:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe ServerSideEncryption
serverSideEncryption} -> Maybe ServerSideEncryption
serverSideEncryption) (\s :: CreateMultipartUpload
s@CreateMultipartUpload' {} Maybe ServerSideEncryption
a -> CreateMultipartUpload
s {$sel:serverSideEncryption:CreateMultipartUpload' :: Maybe ServerSideEncryption
serverSideEncryption = Maybe ServerSideEncryption
a} :: CreateMultipartUpload)

-- | A standard MIME type describing the format of the object data.
createMultipartUpload_contentType :: Lens.Lens' CreateMultipartUpload (Prelude.Maybe Prelude.Text)
createMultipartUpload_contentType :: (Maybe Text -> f (Maybe Text))
-> CreateMultipartUpload -> f CreateMultipartUpload
createMultipartUpload_contentType = (CreateMultipartUpload -> Maybe Text)
-> (CreateMultipartUpload -> Maybe Text -> CreateMultipartUpload)
-> Lens
     CreateMultipartUpload
     CreateMultipartUpload
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUpload' {Maybe Text
contentType :: Maybe Text
$sel:contentType:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
contentType} -> Maybe Text
contentType) (\s :: CreateMultipartUpload
s@CreateMultipartUpload' {} Maybe Text
a -> CreateMultipartUpload
s {$sel:contentType:CreateMultipartUpload' :: Maybe Text
contentType = Maybe Text
a} :: CreateMultipartUpload)

-- | The name of the bucket to which to initiate the upload
--
-- 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/.
createMultipartUpload_bucket :: Lens.Lens' CreateMultipartUpload BucketName
createMultipartUpload_bucket :: (BucketName -> f BucketName)
-> CreateMultipartUpload -> f CreateMultipartUpload
createMultipartUpload_bucket = (CreateMultipartUpload -> BucketName)
-> (CreateMultipartUpload -> BucketName -> CreateMultipartUpload)
-> Lens
     CreateMultipartUpload CreateMultipartUpload BucketName BucketName
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUpload' {BucketName
bucket :: BucketName
$sel:bucket:CreateMultipartUpload' :: CreateMultipartUpload -> BucketName
bucket} -> BucketName
bucket) (\s :: CreateMultipartUpload
s@CreateMultipartUpload' {} BucketName
a -> CreateMultipartUpload
s {$sel:bucket:CreateMultipartUpload' :: BucketName
bucket = BucketName
a} :: CreateMultipartUpload)

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

instance Core.AWSRequest CreateMultipartUpload where
  type
    AWSResponse CreateMultipartUpload =
      CreateMultipartUploadResponse
  request :: CreateMultipartUpload -> Request CreateMultipartUpload
request =
    Request CreateMultipartUpload -> Request CreateMultipartUpload
forall a. Request a -> Request a
Request.s3vhost
      (Request CreateMultipartUpload -> Request CreateMultipartUpload)
-> (CreateMultipartUpload -> Request CreateMultipartUpload)
-> CreateMultipartUpload
-> Request CreateMultipartUpload
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Service -> CreateMultipartUpload -> Request CreateMultipartUpload
forall a. ToRequest a => Service -> a -> Request a
Request.post Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateMultipartUpload
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateMultipartUpload)))
response =
    (Int
 -> ResponseHeaders
 -> [Node]
 -> Either String (AWSResponse CreateMultipartUpload))
-> Logger
-> Service
-> Proxy CreateMultipartUpload
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateMultipartUpload)))
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 RequestCharged
-> Maybe BucketName
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Bool
-> Maybe ObjectKey
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe ServerSideEncryption
-> Int
-> CreateMultipartUploadResponse
CreateMultipartUploadResponse'
            (Maybe RequestCharged
 -> Maybe BucketName
 -> Maybe Text
 -> Maybe ISO8601
 -> Maybe Text
 -> Maybe Bool
 -> Maybe ObjectKey
 -> Maybe Text
 -> Maybe (Sensitive Text)
 -> Maybe (Sensitive Text)
 -> Maybe Text
 -> Maybe ServerSideEncryption
 -> Int
 -> CreateMultipartUploadResponse)
-> Either String (Maybe RequestCharged)
-> Either
     String
     (Maybe BucketName
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Bool
      -> Maybe ObjectKey
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Int
      -> CreateMultipartUploadResponse)
forall (f :: * -> *) a b. Functor 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 BucketName
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Bool
   -> Maybe ObjectKey
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Int
   -> CreateMultipartUploadResponse)
-> Either String (Maybe BucketName)
-> Either
     String
     (Maybe Text
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Bool
      -> Maybe ObjectKey
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Int
      -> CreateMultipartUploadResponse)
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 Text
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Bool
   -> Maybe ObjectKey
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Int
   -> CreateMultipartUploadResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ISO8601
      -> Maybe Text
      -> Maybe Bool
      -> Maybe ObjectKey
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Int
      -> CreateMultipartUploadResponse)
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-server-side-encryption-customer-algorithm"
                        )
            Either
  String
  (Maybe ISO8601
   -> Maybe Text
   -> Maybe Bool
   -> Maybe ObjectKey
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Int
   -> CreateMultipartUploadResponse)
-> Either String (Maybe ISO8601)
-> Either
     String
     (Maybe Text
      -> Maybe Bool
      -> Maybe ObjectKey
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Int
      -> CreateMultipartUploadResponse)
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 Text
   -> Maybe Bool
   -> Maybe ObjectKey
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Int
   -> CreateMultipartUploadResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Bool
      -> Maybe ObjectKey
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Int
      -> CreateMultipartUploadResponse)
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 Bool
   -> Maybe ObjectKey
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Int
   -> CreateMultipartUploadResponse)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe ObjectKey
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Int
      -> CreateMultipartUploadResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( ResponseHeaders
h
                            ResponseHeaders -> HeaderName -> Either String (Maybe Bool)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-server-side-encryption-bucket-key-enabled"
                        )
            Either
  String
  (Maybe ObjectKey
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Int
   -> CreateMultipartUploadResponse)
-> Either String (Maybe ObjectKey)
-> Either
     String
     (Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Int
      -> CreateMultipartUploadResponse)
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 Text
   -> Maybe (Sensitive Text)
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Int
   -> CreateMultipartUploadResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (Sensitive Text)
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Int
      -> CreateMultipartUploadResponse)
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-server-side-encryption-customer-key-MD5"
                        )
            Either
  String
  (Maybe (Sensitive Text)
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Int
   -> CreateMultipartUploadResponse)
-> Either String (Maybe (Sensitive Text))
-> Either
     String
     (Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Int
      -> CreateMultipartUploadResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( ResponseHeaders
h
                            ResponseHeaders
-> HeaderName -> Either String (Maybe (Sensitive Text))
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-server-side-encryption-aws-kms-key-id"
                        )
            Either
  String
  (Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Int
   -> CreateMultipartUploadResponse)
-> Either String (Maybe (Sensitive Text))
-> Either
     String
     (Maybe Text
      -> Maybe ServerSideEncryption
      -> Int
      -> CreateMultipartUploadResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders
-> HeaderName -> Either String (Maybe (Sensitive Text))
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-server-side-encryption-context")
            Either
  String
  (Maybe Text
   -> Maybe ServerSideEncryption
   -> Int
   -> CreateMultipartUploadResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ServerSideEncryption
      -> Int -> CreateMultipartUploadResponse)
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
  (Maybe ServerSideEncryption
   -> Int -> CreateMultipartUploadResponse)
-> Either String (Maybe ServerSideEncryption)
-> Either String (Int -> CreateMultipartUploadResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders
-> HeaderName -> Either String (Maybe ServerSideEncryption)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-server-side-encryption")
            Either String (Int -> CreateMultipartUploadResponse)
-> Either String Int -> Either String CreateMultipartUploadResponse
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 CreateMultipartUpload

instance Prelude.NFData CreateMultipartUpload

instance Core.ToHeaders CreateMultipartUpload where
  toHeaders :: CreateMultipartUpload -> ResponseHeaders
toHeaders CreateMultipartUpload' {Maybe Bool
Maybe Text
Maybe (Sensitive Text)
Maybe ISO8601
Maybe ObjectCannedACL
Maybe ObjectLockLegalHoldStatus
Maybe ObjectLockMode
Maybe RequestPayer
Maybe ServerSideEncryption
Maybe StorageClass
HashMap Text Text
ObjectKey
BucketName
key :: ObjectKey
bucket :: BucketName
contentType :: Maybe Text
serverSideEncryption :: Maybe ServerSideEncryption
expectedBucketOwner :: Maybe Text
contentDisposition :: Maybe Text
acl :: Maybe ObjectCannedACL
objectLockLegalHoldStatus :: Maybe ObjectLockLegalHoldStatus
contentLanguage :: Maybe Text
cacheControl :: Maybe Text
sSEKMSEncryptionContext :: Maybe (Sensitive Text)
metadata :: HashMap Text Text
objectLockRetainUntilDate :: Maybe ISO8601
tagging :: Maybe Text
contentEncoding :: Maybe Text
grantFullControl :: Maybe Text
sSEKMSKeyId :: Maybe (Sensitive Text)
sSECustomerKeyMD5 :: Maybe Text
storageClass :: Maybe StorageClass
grantRead :: Maybe Text
websiteRedirectLocation :: Maybe Text
bucketKeyEnabled :: Maybe Bool
grantWriteACP :: Maybe Text
requestPayer :: Maybe RequestPayer
sSECustomerKey :: Maybe (Sensitive Text)
sSECustomerAlgorithm :: Maybe Text
grantReadACP :: Maybe Text
expires :: Maybe ISO8601
objectLockMode :: Maybe ObjectLockMode
$sel:key:CreateMultipartUpload' :: CreateMultipartUpload -> ObjectKey
$sel:bucket:CreateMultipartUpload' :: CreateMultipartUpload -> BucketName
$sel:contentType:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
$sel:serverSideEncryption:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe ServerSideEncryption
$sel:expectedBucketOwner:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
$sel:contentDisposition:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
$sel:acl:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe ObjectCannedACL
$sel:objectLockLegalHoldStatus:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe ObjectLockLegalHoldStatus
$sel:contentLanguage:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
$sel:cacheControl:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
$sel:sSEKMSEncryptionContext:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe (Sensitive Text)
$sel:metadata:CreateMultipartUpload' :: CreateMultipartUpload -> HashMap Text Text
$sel:objectLockRetainUntilDate:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe ISO8601
$sel:tagging:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
$sel:contentEncoding:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
$sel:grantFullControl:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
$sel:sSEKMSKeyId:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe (Sensitive Text)
$sel:sSECustomerKeyMD5:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
$sel:storageClass:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe StorageClass
$sel:grantRead:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
$sel:websiteRedirectLocation:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
$sel:bucketKeyEnabled:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Bool
$sel:grantWriteACP:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
$sel:requestPayer:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe RequestPayer
$sel:sSECustomerKey:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe (Sensitive Text)
$sel:sSECustomerAlgorithm:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
$sel:grantReadACP:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
$sel:expires:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe ISO8601
$sel:objectLockMode:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe ObjectLockMode
..} =
    [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ HeaderName
"x-amz-object-lock-mode" HeaderName -> Maybe ObjectLockMode -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe ObjectLockMode
objectLockMode,
        HeaderName
"Expires" HeaderName -> Maybe ISO8601 -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe ISO8601
expires,
        HeaderName
"x-amz-grant-read-acp" HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
grantReadACP,
        HeaderName
"x-amz-server-side-encryption-customer-algorithm"
          HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
sSECustomerAlgorithm,
        HeaderName
"x-amz-server-side-encryption-customer-key"
          HeaderName -> Maybe (Sensitive Text) -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe (Sensitive Text)
sSECustomerKey,
        HeaderName
"x-amz-request-payer" HeaderName -> Maybe RequestPayer -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe RequestPayer
requestPayer,
        HeaderName
"x-amz-grant-write-acp" HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
grantWriteACP,
        HeaderName
"x-amz-server-side-encryption-bucket-key-enabled"
          HeaderName -> Maybe Bool -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Bool
bucketKeyEnabled,
        HeaderName
"x-amz-website-redirect-location"
          HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
websiteRedirectLocation,
        HeaderName
"x-amz-grant-read" HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
grantRead,
        HeaderName
"x-amz-storage-class" HeaderName -> Maybe StorageClass -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe StorageClass
storageClass,
        HeaderName
"x-amz-server-side-encryption-customer-key-MD5"
          HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
sSECustomerKeyMD5,
        HeaderName
"x-amz-server-side-encryption-aws-kms-key-id"
          HeaderName -> Maybe (Sensitive Text) -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe (Sensitive Text)
sSEKMSKeyId,
        HeaderName
"x-amz-grant-full-control" HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
grantFullControl,
        HeaderName
"Content-Encoding" HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
contentEncoding,
        HeaderName
"x-amz-tagging" HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
tagging,
        HeaderName
"x-amz-object-lock-retain-until-date"
          HeaderName -> Maybe ISO8601 -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe ISO8601
objectLockRetainUntilDate,
        HeaderName
"x-amz-meta-" HeaderName -> HashMap Text Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# HashMap Text Text
metadata,
        HeaderName
"x-amz-server-side-encryption-context"
          HeaderName -> Maybe (Sensitive Text) -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe (Sensitive Text)
sSEKMSEncryptionContext,
        HeaderName
"Cache-Control" HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
cacheControl,
        HeaderName
"Content-Language" HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
contentLanguage,
        HeaderName
"x-amz-object-lock-legal-hold"
          HeaderName -> Maybe ObjectLockLegalHoldStatus -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus,
        HeaderName
"x-amz-acl" HeaderName -> Maybe ObjectCannedACL -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe ObjectCannedACL
acl,
        HeaderName
"Content-Disposition" HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
contentDisposition,
        HeaderName
"x-amz-expected-bucket-owner"
          HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
expectedBucketOwner,
        HeaderName
"x-amz-server-side-encryption"
          HeaderName -> Maybe ServerSideEncryption -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe ServerSideEncryption
serverSideEncryption,
        HeaderName
"Content-Type" HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
contentType
      ]

instance Core.ToPath CreateMultipartUpload where
  toPath :: CreateMultipartUpload -> ByteString
toPath CreateMultipartUpload' {Maybe Bool
Maybe Text
Maybe (Sensitive Text)
Maybe ISO8601
Maybe ObjectCannedACL
Maybe ObjectLockLegalHoldStatus
Maybe ObjectLockMode
Maybe RequestPayer
Maybe ServerSideEncryption
Maybe StorageClass
HashMap Text Text
ObjectKey
BucketName
key :: ObjectKey
bucket :: BucketName
contentType :: Maybe Text
serverSideEncryption :: Maybe ServerSideEncryption
expectedBucketOwner :: Maybe Text
contentDisposition :: Maybe Text
acl :: Maybe ObjectCannedACL
objectLockLegalHoldStatus :: Maybe ObjectLockLegalHoldStatus
contentLanguage :: Maybe Text
cacheControl :: Maybe Text
sSEKMSEncryptionContext :: Maybe (Sensitive Text)
metadata :: HashMap Text Text
objectLockRetainUntilDate :: Maybe ISO8601
tagging :: Maybe Text
contentEncoding :: Maybe Text
grantFullControl :: Maybe Text
sSEKMSKeyId :: Maybe (Sensitive Text)
sSECustomerKeyMD5 :: Maybe Text
storageClass :: Maybe StorageClass
grantRead :: Maybe Text
websiteRedirectLocation :: Maybe Text
bucketKeyEnabled :: Maybe Bool
grantWriteACP :: Maybe Text
requestPayer :: Maybe RequestPayer
sSECustomerKey :: Maybe (Sensitive Text)
sSECustomerAlgorithm :: Maybe Text
grantReadACP :: Maybe Text
expires :: Maybe ISO8601
objectLockMode :: Maybe ObjectLockMode
$sel:key:CreateMultipartUpload' :: CreateMultipartUpload -> ObjectKey
$sel:bucket:CreateMultipartUpload' :: CreateMultipartUpload -> BucketName
$sel:contentType:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
$sel:serverSideEncryption:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe ServerSideEncryption
$sel:expectedBucketOwner:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
$sel:contentDisposition:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
$sel:acl:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe ObjectCannedACL
$sel:objectLockLegalHoldStatus:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe ObjectLockLegalHoldStatus
$sel:contentLanguage:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
$sel:cacheControl:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
$sel:sSEKMSEncryptionContext:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe (Sensitive Text)
$sel:metadata:CreateMultipartUpload' :: CreateMultipartUpload -> HashMap Text Text
$sel:objectLockRetainUntilDate:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe ISO8601
$sel:tagging:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
$sel:contentEncoding:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
$sel:grantFullControl:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
$sel:sSEKMSKeyId:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe (Sensitive Text)
$sel:sSECustomerKeyMD5:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
$sel:storageClass:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe StorageClass
$sel:grantRead:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
$sel:websiteRedirectLocation:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
$sel:bucketKeyEnabled:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Bool
$sel:grantWriteACP:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
$sel:requestPayer:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe RequestPayer
$sel:sSECustomerKey:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe (Sensitive Text)
$sel:sSECustomerAlgorithm:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
$sel:grantReadACP:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe Text
$sel:expires:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe ISO8601
$sel:objectLockMode:CreateMultipartUpload' :: CreateMultipartUpload -> Maybe ObjectLockMode
..} =
    [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 CreateMultipartUpload where
  toQuery :: CreateMultipartUpload -> QueryString
toQuery = QueryString -> CreateMultipartUpload -> QueryString
forall a b. a -> b -> a
Prelude.const ([QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat [QueryString
"uploads"])

-- | /See:/ 'newCreateMultipartUploadResponse' smart constructor.
data CreateMultipartUploadResponse = CreateMultipartUploadResponse'
  { CreateMultipartUploadResponse -> Maybe RequestCharged
requestCharged :: Prelude.Maybe RequestCharged,
    -- | 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.
    --
    -- 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/.
    CreateMultipartUploadResponse -> Maybe BucketName
bucket :: Prelude.Maybe BucketName,
    -- | If server-side encryption with a customer-provided encryption key was
    -- requested, the response will include this header confirming the
    -- encryption algorithm used.
    CreateMultipartUploadResponse -> Maybe Text
sSECustomerAlgorithm :: Prelude.Maybe Prelude.Text,
    -- | 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, the response includes this
    -- header. The header indicates when the initiated multipart upload becomes
    -- eligible for an 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 also includes the @x-amz-abort-rule-id@ header that
    -- provides the ID of the lifecycle configuration rule that defines this
    -- action.
    CreateMultipartUploadResponse -> Maybe ISO8601
abortDate :: Prelude.Maybe Core.ISO8601,
    -- | This header is returned along with the @x-amz-abort-date@ header. It
    -- identifies the applicable lifecycle configuration rule that defines the
    -- action to abort incomplete multipart uploads.
    CreateMultipartUploadResponse -> Maybe Text
abortRuleId :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether the multipart upload uses an S3 Bucket Key for
    -- server-side encryption with Amazon Web Services KMS (SSE-KMS).
    CreateMultipartUploadResponse -> Maybe Bool
bucketKeyEnabled :: Prelude.Maybe Prelude.Bool,
    -- | Object key for which the multipart upload was initiated.
    CreateMultipartUploadResponse -> Maybe ObjectKey
key :: Prelude.Maybe ObjectKey,
    -- | If server-side encryption with a customer-provided encryption key was
    -- requested, the response will include this header to provide round-trip
    -- message integrity verification of the customer-provided encryption key.
    CreateMultipartUploadResponse -> Maybe Text
sSECustomerKeyMD5 :: Prelude.Maybe Prelude.Text,
    -- | If present, specifies the ID of the Amazon Web Services Key Management
    -- Service (Amazon Web Services KMS) symmetric customer managed key that
    -- was used for the object.
    CreateMultipartUploadResponse -> Maybe (Sensitive Text)
sSEKMSKeyId :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | If present, specifies the Amazon Web Services KMS Encryption Context to
    -- use for object encryption. The value of this header is a base64-encoded
    -- UTF-8 string holding JSON with the encryption context key-value pairs.
    CreateMultipartUploadResponse -> Maybe (Sensitive Text)
sSEKMSEncryptionContext :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | ID for the initiated multipart upload.
    CreateMultipartUploadResponse -> Maybe Text
uploadId :: Prelude.Maybe Prelude.Text,
    -- | The server-side encryption algorithm used when storing this object in
    -- Amazon S3 (for example, AES256, aws:kms).
    CreateMultipartUploadResponse -> Maybe ServerSideEncryption
serverSideEncryption :: Prelude.Maybe ServerSideEncryption,
    -- | The response's http status code.
    CreateMultipartUploadResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateMultipartUploadResponse
-> CreateMultipartUploadResponse -> Bool
(CreateMultipartUploadResponse
 -> CreateMultipartUploadResponse -> Bool)
-> (CreateMultipartUploadResponse
    -> CreateMultipartUploadResponse -> Bool)
-> Eq CreateMultipartUploadResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateMultipartUploadResponse
-> CreateMultipartUploadResponse -> Bool
$c/= :: CreateMultipartUploadResponse
-> CreateMultipartUploadResponse -> Bool
== :: CreateMultipartUploadResponse
-> CreateMultipartUploadResponse -> Bool
$c== :: CreateMultipartUploadResponse
-> CreateMultipartUploadResponse -> Bool
Prelude.Eq, Int -> CreateMultipartUploadResponse -> ShowS
[CreateMultipartUploadResponse] -> ShowS
CreateMultipartUploadResponse -> String
(Int -> CreateMultipartUploadResponse -> ShowS)
-> (CreateMultipartUploadResponse -> String)
-> ([CreateMultipartUploadResponse] -> ShowS)
-> Show CreateMultipartUploadResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateMultipartUploadResponse] -> ShowS
$cshowList :: [CreateMultipartUploadResponse] -> ShowS
show :: CreateMultipartUploadResponse -> String
$cshow :: CreateMultipartUploadResponse -> String
showsPrec :: Int -> CreateMultipartUploadResponse -> ShowS
$cshowsPrec :: Int -> CreateMultipartUploadResponse -> ShowS
Prelude.Show, (forall x.
 CreateMultipartUploadResponse
 -> Rep CreateMultipartUploadResponse x)
-> (forall x.
    Rep CreateMultipartUploadResponse x
    -> CreateMultipartUploadResponse)
-> Generic CreateMultipartUploadResponse
forall x.
Rep CreateMultipartUploadResponse x
-> CreateMultipartUploadResponse
forall x.
CreateMultipartUploadResponse
-> Rep CreateMultipartUploadResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateMultipartUploadResponse x
-> CreateMultipartUploadResponse
$cfrom :: forall x.
CreateMultipartUploadResponse
-> Rep CreateMultipartUploadResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateMultipartUploadResponse' 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:
--
-- 'requestCharged', 'createMultipartUploadResponse_requestCharged' - Undocumented member.
--
-- 'bucket', 'createMultipartUploadResponse_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.
--
-- 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/.
--
-- 'sSECustomerAlgorithm', 'createMultipartUploadResponse_sSECustomerAlgorithm' - If server-side encryption with a customer-provided encryption key was
-- requested, the response will include this header confirming the
-- encryption algorithm used.
--
-- 'abortDate', 'createMultipartUploadResponse_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, the response includes this
-- header. The header indicates when the initiated multipart upload becomes
-- eligible for an 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 also includes the @x-amz-abort-rule-id@ header that
-- provides the ID of the lifecycle configuration rule that defines this
-- action.
--
-- 'abortRuleId', 'createMultipartUploadResponse_abortRuleId' - This header is returned along with the @x-amz-abort-date@ header. It
-- identifies the applicable lifecycle configuration rule that defines the
-- action to abort incomplete multipart uploads.
--
-- 'bucketKeyEnabled', 'createMultipartUploadResponse_bucketKeyEnabled' - Indicates whether the multipart upload uses an S3 Bucket Key for
-- server-side encryption with Amazon Web Services KMS (SSE-KMS).
--
-- 'key', 'createMultipartUploadResponse_key' - Object key for which the multipart upload was initiated.
--
-- 'sSECustomerKeyMD5', 'createMultipartUploadResponse_sSECustomerKeyMD5' - If server-side encryption with a customer-provided encryption key was
-- requested, the response will include this header to provide round-trip
-- message integrity verification of the customer-provided encryption key.
--
-- 'sSEKMSKeyId', 'createMultipartUploadResponse_sSEKMSKeyId' - If present, specifies the ID of the Amazon Web Services Key Management
-- Service (Amazon Web Services KMS) symmetric customer managed key that
-- was used for the object.
--
-- 'sSEKMSEncryptionContext', 'createMultipartUploadResponse_sSEKMSEncryptionContext' - If present, specifies the Amazon Web Services KMS Encryption Context to
-- use for object encryption. The value of this header is a base64-encoded
-- UTF-8 string holding JSON with the encryption context key-value pairs.
--
-- 'uploadId', 'createMultipartUploadResponse_uploadId' - ID for the initiated multipart upload.
--
-- 'serverSideEncryption', 'createMultipartUploadResponse_serverSideEncryption' - The server-side encryption algorithm used when storing this object in
-- Amazon S3 (for example, AES256, aws:kms).
--
-- 'httpStatus', 'createMultipartUploadResponse_httpStatus' - The response's http status code.
newCreateMultipartUploadResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateMultipartUploadResponse
newCreateMultipartUploadResponse :: Int -> CreateMultipartUploadResponse
newCreateMultipartUploadResponse Int
pHttpStatus_ =
  CreateMultipartUploadResponse' :: Maybe RequestCharged
-> Maybe BucketName
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Bool
-> Maybe ObjectKey
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe ServerSideEncryption
-> Int
-> CreateMultipartUploadResponse
CreateMultipartUploadResponse'
    { $sel:requestCharged:CreateMultipartUploadResponse' :: Maybe RequestCharged
requestCharged =
        Maybe RequestCharged
forall a. Maybe a
Prelude.Nothing,
      $sel:bucket:CreateMultipartUploadResponse' :: Maybe BucketName
bucket = Maybe BucketName
forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerAlgorithm:CreateMultipartUploadResponse' :: Maybe Text
sSECustomerAlgorithm = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:abortDate:CreateMultipartUploadResponse' :: Maybe ISO8601
abortDate = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:abortRuleId:CreateMultipartUploadResponse' :: Maybe Text
abortRuleId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:bucketKeyEnabled:CreateMultipartUploadResponse' :: Maybe Bool
bucketKeyEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:key:CreateMultipartUploadResponse' :: Maybe ObjectKey
key = Maybe ObjectKey
forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerKeyMD5:CreateMultipartUploadResponse' :: Maybe Text
sSECustomerKeyMD5 = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sSEKMSKeyId:CreateMultipartUploadResponse' :: Maybe (Sensitive Text)
sSEKMSKeyId = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:sSEKMSEncryptionContext:CreateMultipartUploadResponse' :: Maybe (Sensitive Text)
sSEKMSEncryptionContext = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:uploadId:CreateMultipartUploadResponse' :: Maybe Text
uploadId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:serverSideEncryption:CreateMultipartUploadResponse' :: Maybe ServerSideEncryption
serverSideEncryption = Maybe ServerSideEncryption
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateMultipartUploadResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | 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.
--
-- 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/.
createMultipartUploadResponse_bucket :: Lens.Lens' CreateMultipartUploadResponse (Prelude.Maybe BucketName)
createMultipartUploadResponse_bucket :: (Maybe BucketName -> f (Maybe BucketName))
-> CreateMultipartUploadResponse -> f CreateMultipartUploadResponse
createMultipartUploadResponse_bucket = (CreateMultipartUploadResponse -> Maybe BucketName)
-> (CreateMultipartUploadResponse
    -> Maybe BucketName -> CreateMultipartUploadResponse)
-> Lens
     CreateMultipartUploadResponse
     CreateMultipartUploadResponse
     (Maybe BucketName)
     (Maybe BucketName)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUploadResponse' {Maybe BucketName
bucket :: Maybe BucketName
$sel:bucket:CreateMultipartUploadResponse' :: CreateMultipartUploadResponse -> Maybe BucketName
bucket} -> Maybe BucketName
bucket) (\s :: CreateMultipartUploadResponse
s@CreateMultipartUploadResponse' {} Maybe BucketName
a -> CreateMultipartUploadResponse
s {$sel:bucket:CreateMultipartUploadResponse' :: Maybe BucketName
bucket = Maybe BucketName
a} :: CreateMultipartUploadResponse)

-- | If server-side encryption with a customer-provided encryption key was
-- requested, the response will include this header confirming the
-- encryption algorithm used.
createMultipartUploadResponse_sSECustomerAlgorithm :: Lens.Lens' CreateMultipartUploadResponse (Prelude.Maybe Prelude.Text)
createMultipartUploadResponse_sSECustomerAlgorithm :: (Maybe Text -> f (Maybe Text))
-> CreateMultipartUploadResponse -> f CreateMultipartUploadResponse
createMultipartUploadResponse_sSECustomerAlgorithm = (CreateMultipartUploadResponse -> Maybe Text)
-> (CreateMultipartUploadResponse
    -> Maybe Text -> CreateMultipartUploadResponse)
-> Lens
     CreateMultipartUploadResponse
     CreateMultipartUploadResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUploadResponse' {Maybe Text
sSECustomerAlgorithm :: Maybe Text
$sel:sSECustomerAlgorithm:CreateMultipartUploadResponse' :: CreateMultipartUploadResponse -> Maybe Text
sSECustomerAlgorithm} -> Maybe Text
sSECustomerAlgorithm) (\s :: CreateMultipartUploadResponse
s@CreateMultipartUploadResponse' {} Maybe Text
a -> CreateMultipartUploadResponse
s {$sel:sSECustomerAlgorithm:CreateMultipartUploadResponse' :: Maybe Text
sSECustomerAlgorithm = Maybe Text
a} :: CreateMultipartUploadResponse)

-- | 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, the response includes this
-- header. The header indicates when the initiated multipart upload becomes
-- eligible for an 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 also includes the @x-amz-abort-rule-id@ header that
-- provides the ID of the lifecycle configuration rule that defines this
-- action.
createMultipartUploadResponse_abortDate :: Lens.Lens' CreateMultipartUploadResponse (Prelude.Maybe Prelude.UTCTime)
createMultipartUploadResponse_abortDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateMultipartUploadResponse -> f CreateMultipartUploadResponse
createMultipartUploadResponse_abortDate = (CreateMultipartUploadResponse -> Maybe ISO8601)
-> (CreateMultipartUploadResponse
    -> Maybe ISO8601 -> CreateMultipartUploadResponse)
-> Lens
     CreateMultipartUploadResponse
     CreateMultipartUploadResponse
     (Maybe ISO8601)
     (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUploadResponse' {Maybe ISO8601
abortDate :: Maybe ISO8601
$sel:abortDate:CreateMultipartUploadResponse' :: CreateMultipartUploadResponse -> Maybe ISO8601
abortDate} -> Maybe ISO8601
abortDate) (\s :: CreateMultipartUploadResponse
s@CreateMultipartUploadResponse' {} Maybe ISO8601
a -> CreateMultipartUploadResponse
s {$sel:abortDate:CreateMultipartUploadResponse' :: Maybe ISO8601
abortDate = Maybe ISO8601
a} :: CreateMultipartUploadResponse) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> CreateMultipartUploadResponse
 -> f CreateMultipartUploadResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateMultipartUploadResponse
-> f CreateMultipartUploadResponse
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

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

-- | Indicates whether the multipart upload uses an S3 Bucket Key for
-- server-side encryption with Amazon Web Services KMS (SSE-KMS).
createMultipartUploadResponse_bucketKeyEnabled :: Lens.Lens' CreateMultipartUploadResponse (Prelude.Maybe Prelude.Bool)
createMultipartUploadResponse_bucketKeyEnabled :: (Maybe Bool -> f (Maybe Bool))
-> CreateMultipartUploadResponse -> f CreateMultipartUploadResponse
createMultipartUploadResponse_bucketKeyEnabled = (CreateMultipartUploadResponse -> Maybe Bool)
-> (CreateMultipartUploadResponse
    -> Maybe Bool -> CreateMultipartUploadResponse)
-> Lens
     CreateMultipartUploadResponse
     CreateMultipartUploadResponse
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUploadResponse' {Maybe Bool
bucketKeyEnabled :: Maybe Bool
$sel:bucketKeyEnabled:CreateMultipartUploadResponse' :: CreateMultipartUploadResponse -> Maybe Bool
bucketKeyEnabled} -> Maybe Bool
bucketKeyEnabled) (\s :: CreateMultipartUploadResponse
s@CreateMultipartUploadResponse' {} Maybe Bool
a -> CreateMultipartUploadResponse
s {$sel:bucketKeyEnabled:CreateMultipartUploadResponse' :: Maybe Bool
bucketKeyEnabled = Maybe Bool
a} :: CreateMultipartUploadResponse)

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

-- | If server-side encryption with a customer-provided encryption key was
-- requested, the response will include this header to provide round-trip
-- message integrity verification of the customer-provided encryption key.
createMultipartUploadResponse_sSECustomerKeyMD5 :: Lens.Lens' CreateMultipartUploadResponse (Prelude.Maybe Prelude.Text)
createMultipartUploadResponse_sSECustomerKeyMD5 :: (Maybe Text -> f (Maybe Text))
-> CreateMultipartUploadResponse -> f CreateMultipartUploadResponse
createMultipartUploadResponse_sSECustomerKeyMD5 = (CreateMultipartUploadResponse -> Maybe Text)
-> (CreateMultipartUploadResponse
    -> Maybe Text -> CreateMultipartUploadResponse)
-> Lens
     CreateMultipartUploadResponse
     CreateMultipartUploadResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUploadResponse' {Maybe Text
sSECustomerKeyMD5 :: Maybe Text
$sel:sSECustomerKeyMD5:CreateMultipartUploadResponse' :: CreateMultipartUploadResponse -> Maybe Text
sSECustomerKeyMD5} -> Maybe Text
sSECustomerKeyMD5) (\s :: CreateMultipartUploadResponse
s@CreateMultipartUploadResponse' {} Maybe Text
a -> CreateMultipartUploadResponse
s {$sel:sSECustomerKeyMD5:CreateMultipartUploadResponse' :: Maybe Text
sSECustomerKeyMD5 = Maybe Text
a} :: CreateMultipartUploadResponse)

-- | If present, specifies the ID of the Amazon Web Services Key Management
-- Service (Amazon Web Services KMS) symmetric customer managed key that
-- was used for the object.
createMultipartUploadResponse_sSEKMSKeyId :: Lens.Lens' CreateMultipartUploadResponse (Prelude.Maybe Prelude.Text)
createMultipartUploadResponse_sSEKMSKeyId :: (Maybe Text -> f (Maybe Text))
-> CreateMultipartUploadResponse -> f CreateMultipartUploadResponse
createMultipartUploadResponse_sSEKMSKeyId = (CreateMultipartUploadResponse -> Maybe (Sensitive Text))
-> (CreateMultipartUploadResponse
    -> Maybe (Sensitive Text) -> CreateMultipartUploadResponse)
-> Lens
     CreateMultipartUploadResponse
     CreateMultipartUploadResponse
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUploadResponse' {Maybe (Sensitive Text)
sSEKMSKeyId :: Maybe (Sensitive Text)
$sel:sSEKMSKeyId:CreateMultipartUploadResponse' :: CreateMultipartUploadResponse -> Maybe (Sensitive Text)
sSEKMSKeyId} -> Maybe (Sensitive Text)
sSEKMSKeyId) (\s :: CreateMultipartUploadResponse
s@CreateMultipartUploadResponse' {} Maybe (Sensitive Text)
a -> CreateMultipartUploadResponse
s {$sel:sSEKMSKeyId:CreateMultipartUploadResponse' :: Maybe (Sensitive Text)
sSEKMSKeyId = Maybe (Sensitive Text)
a} :: CreateMultipartUploadResponse) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> CreateMultipartUploadResponse
 -> f CreateMultipartUploadResponse)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> CreateMultipartUploadResponse
-> f CreateMultipartUploadResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe Text)
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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | If present, specifies the Amazon Web Services KMS Encryption Context to
-- use for object encryption. The value of this header is a base64-encoded
-- UTF-8 string holding JSON with the encryption context key-value pairs.
createMultipartUploadResponse_sSEKMSEncryptionContext :: Lens.Lens' CreateMultipartUploadResponse (Prelude.Maybe Prelude.Text)
createMultipartUploadResponse_sSEKMSEncryptionContext :: (Maybe Text -> f (Maybe Text))
-> CreateMultipartUploadResponse -> f CreateMultipartUploadResponse
createMultipartUploadResponse_sSEKMSEncryptionContext = (CreateMultipartUploadResponse -> Maybe (Sensitive Text))
-> (CreateMultipartUploadResponse
    -> Maybe (Sensitive Text) -> CreateMultipartUploadResponse)
-> Lens
     CreateMultipartUploadResponse
     CreateMultipartUploadResponse
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUploadResponse' {Maybe (Sensitive Text)
sSEKMSEncryptionContext :: Maybe (Sensitive Text)
$sel:sSEKMSEncryptionContext:CreateMultipartUploadResponse' :: CreateMultipartUploadResponse -> Maybe (Sensitive Text)
sSEKMSEncryptionContext} -> Maybe (Sensitive Text)
sSEKMSEncryptionContext) (\s :: CreateMultipartUploadResponse
s@CreateMultipartUploadResponse' {} Maybe (Sensitive Text)
a -> CreateMultipartUploadResponse
s {$sel:sSEKMSEncryptionContext:CreateMultipartUploadResponse' :: Maybe (Sensitive Text)
sSEKMSEncryptionContext = Maybe (Sensitive Text)
a} :: CreateMultipartUploadResponse) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> CreateMultipartUploadResponse
 -> f CreateMultipartUploadResponse)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> CreateMultipartUploadResponse
-> f CreateMultipartUploadResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe Text)
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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | ID for the initiated multipart upload.
createMultipartUploadResponse_uploadId :: Lens.Lens' CreateMultipartUploadResponse (Prelude.Maybe Prelude.Text)
createMultipartUploadResponse_uploadId :: (Maybe Text -> f (Maybe Text))
-> CreateMultipartUploadResponse -> f CreateMultipartUploadResponse
createMultipartUploadResponse_uploadId = (CreateMultipartUploadResponse -> Maybe Text)
-> (CreateMultipartUploadResponse
    -> Maybe Text -> CreateMultipartUploadResponse)
-> Lens
     CreateMultipartUploadResponse
     CreateMultipartUploadResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUploadResponse' {Maybe Text
uploadId :: Maybe Text
$sel:uploadId:CreateMultipartUploadResponse' :: CreateMultipartUploadResponse -> Maybe Text
uploadId} -> Maybe Text
uploadId) (\s :: CreateMultipartUploadResponse
s@CreateMultipartUploadResponse' {} Maybe Text
a -> CreateMultipartUploadResponse
s {$sel:uploadId:CreateMultipartUploadResponse' :: Maybe Text
uploadId = Maybe Text
a} :: CreateMultipartUploadResponse)

-- | The server-side encryption algorithm used when storing this object in
-- Amazon S3 (for example, AES256, aws:kms).
createMultipartUploadResponse_serverSideEncryption :: Lens.Lens' CreateMultipartUploadResponse (Prelude.Maybe ServerSideEncryption)
createMultipartUploadResponse_serverSideEncryption :: (Maybe ServerSideEncryption -> f (Maybe ServerSideEncryption))
-> CreateMultipartUploadResponse -> f CreateMultipartUploadResponse
createMultipartUploadResponse_serverSideEncryption = (CreateMultipartUploadResponse -> Maybe ServerSideEncryption)
-> (CreateMultipartUploadResponse
    -> Maybe ServerSideEncryption -> CreateMultipartUploadResponse)
-> Lens
     CreateMultipartUploadResponse
     CreateMultipartUploadResponse
     (Maybe ServerSideEncryption)
     (Maybe ServerSideEncryption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultipartUploadResponse' {Maybe ServerSideEncryption
serverSideEncryption :: Maybe ServerSideEncryption
$sel:serverSideEncryption:CreateMultipartUploadResponse' :: CreateMultipartUploadResponse -> Maybe ServerSideEncryption
serverSideEncryption} -> Maybe ServerSideEncryption
serverSideEncryption) (\s :: CreateMultipartUploadResponse
s@CreateMultipartUploadResponse' {} Maybe ServerSideEncryption
a -> CreateMultipartUploadResponse
s {$sel:serverSideEncryption:CreateMultipartUploadResponse' :: Maybe ServerSideEncryption
serverSideEncryption = Maybe ServerSideEncryption
a} :: CreateMultipartUploadResponse)

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

instance Prelude.NFData CreateMultipartUploadResponse