{-# 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.CopyObject
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a copy of an object that is already stored in Amazon S3.
--
-- You can store individual objects of up to 5 TB in Amazon S3. You create
-- a copy of your object up to 5 GB in size in a single atomic action using
-- this API. However, to copy an object greater than 5 GB, you must use the
-- multipart upload Upload Part - Copy (UploadPartCopy) API. For more
-- information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjctsUsingRESTMPUapi.html Copy Object Using the REST Multipart Upload API>.
--
-- All copy requests must be authenticated. Additionally, you must have
-- /read/ access to the source object and /write/ access to the destination
-- bucket. For more information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html REST Authentication>.
-- Both the Region that you want to copy the object from and the Region
-- that you want to copy the object to must be enabled for your account.
--
-- A copy request might return an error when Amazon S3 receives the copy
-- request or while Amazon S3 is copying the files. If the error occurs
-- before the copy action starts, you receive a standard Amazon S3 error.
-- If the error occurs during the copy operation, the error response is
-- embedded in the @200 OK@ response. This means that a @200 OK@ response
-- can contain either a success or an error. Design your application to
-- parse the contents of the response and handle it appropriately.
--
-- If the copy is successful, you receive a response with information about
-- the copied object.
--
-- If the request is an HTTP 1.1 request, the response is chunk encoded. If
-- it were not, it would not contain the content-length, and you would need
-- to read the entire body.
--
-- The copy request charge is based on the storage class and Region that
-- you specify for the destination object. For pricing information, see
-- <http://aws.amazon.com/s3/pricing/ Amazon S3 pricing>.
--
-- Amazon S3 transfer acceleration does not support cross-Region copies. If
-- you request a cross-Region copy using a transfer acceleration endpoint,
-- you get a 400 @Bad Request@ error. For more information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html Transfer Acceleration>.
--
-- __Metadata__
--
-- When copying an object, you can preserve all metadata (default) or
-- specify new metadata. However, the ACL is not preserved and is set to
-- private for the user making the request. To override the default ACL
-- setting, specify a new ACL when generating a copy request. For more
-- information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html Using ACLs>.
--
-- To specify whether you want the object metadata copied from the source
-- object or replaced with metadata provided in the request, you can
-- optionally add the @x-amz-metadata-directive@ header. When you grant
-- permissions, you can use the @s3:x-amz-metadata-directive@ condition key
-- to enforce certain metadata behavior when objects are uploaded. For more
-- information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/amazon-s3-policy-keys.html Specifying Conditions in a Policy>
-- in the /Amazon S3 User Guide/. For a complete list of Amazon S3-specific
-- condition keys, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/list_amazons3.html Actions, Resources, and Condition Keys for Amazon S3>.
--
-- __x-amz-copy-source-if Headers__
--
-- To only copy an object under certain conditions, such as whether the
-- @Etag@ matches or whether the object was modified before or after a
-- specified date, use the following request parameters:
--
-- -   @x-amz-copy-source-if-match@
--
-- -   @x-amz-copy-source-if-none-match@
--
-- -   @x-amz-copy-source-if-unmodified-since@
--
-- -   @x-amz-copy-source-if-modified-since@
--
-- If both the @x-amz-copy-source-if-match@ and
-- @x-amz-copy-source-if-unmodified-since@ headers are present in the
-- request and evaluate as follows, Amazon S3 returns @200 OK@ and copies
-- the data:
--
-- -   @x-amz-copy-source-if-match@ condition evaluates to true
--
-- -   @x-amz-copy-source-if-unmodified-since@ condition evaluates to false
--
-- If both the @x-amz-copy-source-if-none-match@ and
-- @x-amz-copy-source-if-modified-since@ headers are present in the request
-- and evaluate as follows, Amazon S3 returns the @412 Precondition Failed@
-- response code:
--
-- -   @x-amz-copy-source-if-none-match@ condition evaluates to false
--
-- -   @x-amz-copy-source-if-modified-since@ condition evaluates to true
--
-- All headers with the @x-amz-@ prefix, including @x-amz-copy-source@,
-- must be signed.
--
-- __Server-side encryption__
--
-- When you perform a CopyObject operation, you can optionally use the
-- appropriate encryption-related headers to encrypt the object using
-- server-side encryption with Amazon Web Services managed encryption keys
-- (SSE-S3 or SSE-KMS) or a customer-provided encryption key. With
-- server-side encryption, Amazon S3 encrypts your data as it writes it to
-- disks in its data centers and decrypts the data when you access it. For
-- more information about server-side encryption, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html Using Server-Side Encryption>.
--
-- If a target object uses SSE-KMS, you can enable an S3 Bucket Key for the
-- object. For more information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html Amazon S3 Bucket Keys>
-- in the /Amazon S3 User Guide/.
--
-- __Access Control List (ACL)-Specific Request Headers__
--
-- When copying an object, you can optionally use headers to grant
-- ACL-based permissions. 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 ACL
-- on the object. For more information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html Access Control List (ACL) Overview>
-- and
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html Managing ACLs Using the REST API>.
--
-- If the bucket that you\'re copying objects to uses the bucket owner
-- enforced setting for S3 Object Ownership, ACLs are disabled and no
-- longer affect permissions. Buckets that use this setting only accept PUT
-- requests that don\'t specify an ACL or PUT requests that specify bucket
-- owner full control ACLs, such as the @bucket-owner-full-control@ canned
-- ACL or an equivalent form of this ACL expressed in the XML format.
--
-- For more information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html Controlling ownership of objects and disabling ACLs>
-- in the /Amazon S3 User Guide/.
--
-- If your bucket uses the bucket owner enforced setting for Object
-- Ownership, all objects written to the bucket by any account will be
-- owned by the bucket owner.
--
-- __Checksums__
--
-- When copying an object, if it has a checksum, that checksum will be
-- copied to the new object by default. When you copy the object over, you
-- may optionally specify a different checksum algorithm to use with the
-- @x-amz-checksum-algorithm@ header.
--
-- __Storage Class Options__
--
-- You can use the @CopyObject@ action to change the storage class of an
-- object that is already stored in Amazon S3 using the @StorageClass@
-- parameter. For more information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html Storage Classes>
-- in the /Amazon S3 User Guide/.
--
-- __Versioning__
--
-- By default, @x-amz-copy-source@ identifies the current version of an
-- object to copy. If the current version is a delete marker, Amazon S3
-- behaves as if the object was deleted. To copy a different version, use
-- the @versionId@ subresource.
--
-- If you enable versioning on the target bucket, Amazon S3 generates a
-- unique version ID for the object being copied. This version ID is
-- different from the version ID of the source object. Amazon S3 returns
-- the version ID of the copied object in the @x-amz-version-id@ response
-- header in the response.
--
-- If you do not enable versioning or suspend it on the target bucket, the
-- version ID that Amazon S3 generates is always null.
--
-- If the source object\'s storage class is GLACIER, you must restore a
-- copy of this object before you can use it as a source object for the
-- copy operation. For more information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html RestoreObject>.
--
-- The following operations are related to @CopyObject@:
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html PutObject>
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html GetObject>
--
-- For more information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectsExamples.html Copying Objects>.
module Amazonka.S3.CopyObject
  ( -- * Creating a Request
    CopyObject (..),
    newCopyObject,

    -- * Request Lenses
    copyObject_acl,
    copyObject_bucketKeyEnabled,
    copyObject_cacheControl,
    copyObject_checksumAlgorithm,
    copyObject_contentDisposition,
    copyObject_contentEncoding,
    copyObject_contentLanguage,
    copyObject_contentType,
    copyObject_copySourceIfMatch,
    copyObject_copySourceIfModifiedSince,
    copyObject_copySourceIfNoneMatch,
    copyObject_copySourceIfUnmodifiedSince,
    copyObject_copySourceSSECustomerAlgorithm,
    copyObject_copySourceSSECustomerKey,
    copyObject_copySourceSSECustomerKeyMD5,
    copyObject_expectedBucketOwner,
    copyObject_expectedSourceBucketOwner,
    copyObject_expires,
    copyObject_grantFullControl,
    copyObject_grantRead,
    copyObject_grantReadACP,
    copyObject_grantWriteACP,
    copyObject_metadata,
    copyObject_metadataDirective,
    copyObject_objectLockLegalHoldStatus,
    copyObject_objectLockMode,
    copyObject_objectLockRetainUntilDate,
    copyObject_requestPayer,
    copyObject_sSECustomerAlgorithm,
    copyObject_sSECustomerKey,
    copyObject_sSECustomerKeyMD5,
    copyObject_sSEKMSEncryptionContext,
    copyObject_sSEKMSKeyId,
    copyObject_serverSideEncryption,
    copyObject_storageClass,
    copyObject_tagging,
    copyObject_taggingDirective,
    copyObject_websiteRedirectLocation,
    copyObject_bucket,
    copyObject_copySource,
    copyObject_key,

    -- * Destructuring the Response
    CopyObjectResponse (..),
    newCopyObjectResponse,

    -- * Response Lenses
    copyObjectResponse_bucketKeyEnabled,
    copyObjectResponse_copyObjectResult,
    copyObjectResponse_copySourceVersionId,
    copyObjectResponse_expiration,
    copyObjectResponse_requestCharged,
    copyObjectResponse_sSECustomerAlgorithm,
    copyObjectResponse_sSECustomerKeyMD5,
    copyObjectResponse_sSEKMSEncryptionContext,
    copyObjectResponse_sSEKMSKeyId,
    copyObjectResponse_serverSideEncryption,
    copyObjectResponse_versionId,
    copyObjectResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.S3.Types

-- | /See:/ 'newCopyObject' smart constructor.
data CopyObject = CopyObject'
  { -- | The canned ACL to apply to the object.
    --
    -- This action is not supported by Amazon S3 on Outposts.
    CopyObject -> Maybe ObjectCannedACL
acl :: Prelude.Maybe ObjectCannedACL,
    -- | 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 a COPY action doesn’t affect bucket-level
    -- settings for S3 Bucket Key.
    CopyObject -> Maybe Bool
bucketKeyEnabled :: Prelude.Maybe Prelude.Bool,
    -- | Specifies caching behavior along the request\/reply chain.
    CopyObject -> Maybe Text
cacheControl :: Prelude.Maybe Prelude.Text,
    -- | Indicates the algorithm you want Amazon S3 to use to create the checksum
    -- for the object. For more information, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html Checking object integrity>
    -- in the /Amazon S3 User Guide/.
    CopyObject -> Maybe ChecksumAlgorithm
checksumAlgorithm :: Prelude.Maybe ChecksumAlgorithm,
    -- | Specifies presentational information for the object.
    CopyObject -> Maybe Text
contentDisposition :: 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.
    CopyObject -> Maybe Text
contentEncoding :: Prelude.Maybe Prelude.Text,
    -- | The language the content is in.
    CopyObject -> Maybe Text
contentLanguage :: Prelude.Maybe Prelude.Text,
    -- | A standard MIME type describing the format of the object data.
    CopyObject -> Maybe Text
contentType :: Prelude.Maybe Prelude.Text,
    -- | Copies the object if its entity tag (ETag) matches the specified tag.
    CopyObject -> Maybe Text
copySourceIfMatch :: Prelude.Maybe Prelude.Text,
    -- | Copies the object if it has been modified since the specified time.
    CopyObject -> Maybe RFC822
copySourceIfModifiedSince :: Prelude.Maybe Data.RFC822,
    -- | Copies the object if its entity tag (ETag) is different than the
    -- specified ETag.
    CopyObject -> Maybe Text
copySourceIfNoneMatch :: Prelude.Maybe Prelude.Text,
    -- | Copies the object if it hasn\'t been modified since the specified time.
    CopyObject -> Maybe RFC822
copySourceIfUnmodifiedSince :: Prelude.Maybe Data.RFC822,
    -- | Specifies the algorithm to use when decrypting the source object (for
    -- example, AES256).
    CopyObject -> Maybe Text
copySourceSSECustomerAlgorithm :: Prelude.Maybe Prelude.Text,
    -- | Specifies the customer-provided encryption key for Amazon S3 to use to
    -- decrypt the source object. The encryption key provided in this header
    -- must be one that was used when the source object was created.
    CopyObject -> Maybe (Sensitive Text)
copySourceSSECustomerKey :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | 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.
    CopyObject -> Maybe Text
copySourceSSECustomerKeyMD5 :: Prelude.Maybe Prelude.Text,
    -- | The account ID of the expected destination bucket owner. If the
    -- destination bucket is owned by a different account, the request fails
    -- with the HTTP status code @403 Forbidden@ (access denied).
    CopyObject -> Maybe Text
expectedBucketOwner :: Prelude.Maybe Prelude.Text,
    -- | The account ID of the expected source bucket owner. If the source bucket
    -- is owned by a different account, the request fails with the HTTP status
    -- code @403 Forbidden@ (access denied).
    CopyObject -> Maybe Text
expectedSourceBucketOwner :: Prelude.Maybe Prelude.Text,
    -- | The date and time at which the object is no longer cacheable.
    CopyObject -> Maybe RFC822
expires :: Prelude.Maybe Data.RFC822,
    -- | Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the
    -- object.
    --
    -- This action is not supported by Amazon S3 on Outposts.
    CopyObject -> Maybe Text
grantFullControl :: Prelude.Maybe Prelude.Text,
    -- | Allows grantee to read the object data and its metadata.
    --
    -- This action is not supported by Amazon S3 on Outposts.
    CopyObject -> Maybe Text
grantRead :: Prelude.Maybe Prelude.Text,
    -- | Allows grantee to read the object ACL.
    --
    -- This action is not supported by Amazon S3 on Outposts.
    CopyObject -> Maybe Text
grantReadACP :: Prelude.Maybe Prelude.Text,
    -- | Allows grantee to write the ACL for the applicable object.
    --
    -- This action is not supported by Amazon S3 on Outposts.
    CopyObject -> Maybe Text
grantWriteACP :: Prelude.Maybe Prelude.Text,
    -- | A map of metadata to store with the object in S3.
    CopyObject -> HashMap Text Text
metadata :: Prelude.HashMap Prelude.Text Prelude.Text,
    -- | Specifies whether the metadata is copied from the source object or
    -- replaced with metadata provided in the request.
    CopyObject -> Maybe MetadataDirective
metadataDirective :: Prelude.Maybe MetadataDirective,
    -- | Specifies whether you want to apply a legal hold to the copied object.
    CopyObject -> Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus :: Prelude.Maybe ObjectLockLegalHoldStatus,
    -- | The Object Lock mode that you want to apply to the copied object.
    CopyObject -> Maybe ObjectLockMode
objectLockMode :: Prelude.Maybe ObjectLockMode,
    -- | The date and time when you want the copied object\'s Object Lock to
    -- expire.
    CopyObject -> Maybe ISO8601
objectLockRetainUntilDate :: Prelude.Maybe Data.ISO8601,
    CopyObject -> Maybe RequestPayer
requestPayer :: Prelude.Maybe RequestPayer,
    -- | Specifies the algorithm to use to when encrypting the object (for
    -- example, AES256).
    CopyObject -> 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.
    CopyObject -> Maybe (Sensitive Text)
sSECustomerKey :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | 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.
    CopyObject -> Maybe Text
sSECustomerKeyMD5 :: Prelude.Maybe 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.
    CopyObject -> Maybe (Sensitive Text)
sSEKMSEncryptionContext :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | Specifies the Amazon Web Services KMS key ID 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/.
    CopyObject -> Maybe (Sensitive Text)
sSEKMSKeyId :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The server-side encryption algorithm used when storing this object in
    -- Amazon S3 (for example, AES256, aws:kms).
    CopyObject -> Maybe ServerSideEncryption
serverSideEncryption :: Prelude.Maybe ServerSideEncryption,
    -- | 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/.
    CopyObject -> Maybe StorageClass
storageClass :: Prelude.Maybe StorageClass,
    -- | The tag-set for the object destination object this value must be used in
    -- conjunction with the @TaggingDirective@. The tag-set must be encoded as
    -- URL Query parameters.
    CopyObject -> Maybe Text
tagging :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether the object tag-set are copied from the source object
    -- or replaced with tag-set provided in the request.
    CopyObject -> Maybe TaggingDirective
taggingDirective :: Prelude.Maybe TaggingDirective,
    -- | 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.
    CopyObject -> Maybe Text
websiteRedirectLocation :: Prelude.Maybe Prelude.Text,
    -- | The name of the destination bucket.
    --
    -- When using this action with an access point, you must direct requests to
    -- the access point hostname. The access point hostname takes the form
    -- /AccessPointName/-/AccountId/.s3-accesspoint./Region/.amazonaws.com.
    -- When using this action with an access point through the Amazon Web
    -- Services SDKs, you provide the access point ARN in place of the bucket
    -- name. For more information about access point ARNs, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html Using access points>
    -- in the /Amazon S3 User Guide/.
    --
    -- When using this action with Amazon S3 on Outposts, you must direct
    -- requests to the S3 on Outposts hostname. The S3 on Outposts hostname
    -- takes the form
    -- @ @/@AccessPointName@/@-@/@AccountId@/@.@/@outpostID@/@.s3-outposts.@/@Region@/@.amazonaws.com@.
    -- When using this action with S3 on Outposts through the Amazon Web
    -- Services SDKs, you provide the Outposts bucket ARN in place of the
    -- bucket name. For more information about S3 on Outposts ARNs, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html Using Amazon S3 on Outposts>
    -- in the /Amazon S3 User Guide/.
    CopyObject -> BucketName
bucket :: BucketName,
    -- | Specifies the source object for the copy operation. You specify the
    -- value in one of two formats, depending on whether you want to access the
    -- source object through an
    -- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html access point>:
    --
    -- -   For objects not accessed through an access point, specify the name
    --     of the source bucket and the key of the source object, separated by
    --     a slash (\/). For example, to copy the object @reports\/january.pdf@
    --     from the bucket @awsexamplebucket@, use
    --     @awsexamplebucket\/reports\/january.pdf@. The value must be
    --     URL-encoded.
    --
    -- -   For objects accessed through access points, specify the Amazon
    --     Resource Name (ARN) of the object as accessed through the access
    --     point, in the format
    --     @arn:aws:s3:\<Region>:\<account-id>:accesspoint\/\<access-point-name>\/object\/\<key>@.
    --     For example, to copy the object @reports\/january.pdf@ through
    --     access point @my-access-point@ owned by account @123456789012@ in
    --     Region @us-west-2@, use the URL encoding of
    --     @arn:aws:s3:us-west-2:123456789012:accesspoint\/my-access-point\/object\/reports\/january.pdf@.
    --     The value must be URL encoded.
    --
    --     Amazon S3 supports copy operations using access points only when the
    --     source and destination buckets are in the same Amazon Web Services
    --     Region.
    --
    --     Alternatively, for objects accessed through Amazon S3 on Outposts,
    --     specify the ARN of the object as accessed in the format
    --     @arn:aws:s3-outposts:\<Region>:\<account-id>:outpost\/\<outpost-id>\/object\/\<key>@.
    --     For example, to copy the object @reports\/january.pdf@ through
    --     outpost @my-outpost@ owned by account @123456789012@ in Region
    --     @us-west-2@, use the URL encoding of
    --     @arn:aws:s3-outposts:us-west-2:123456789012:outpost\/my-outpost\/object\/reports\/january.pdf@.
    --     The value must be URL-encoded.
    --
    -- To copy a specific version of an object, append
    -- @?versionId=\<version-id>@ to the value (for example,
    -- @awsexamplebucket\/reports\/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893@).
    -- If you don\'t specify a version ID, Amazon S3 copies the latest version
    -- of the source object.
    CopyObject -> Text
copySource :: Prelude.Text,
    -- | The key of the destination object.
    CopyObject -> ObjectKey
key :: ObjectKey
  }
  deriving (CopyObject -> CopyObject -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CopyObject -> CopyObject -> Bool
$c/= :: CopyObject -> CopyObject -> Bool
== :: CopyObject -> CopyObject -> Bool
$c== :: CopyObject -> CopyObject -> Bool
Prelude.Eq, Int -> CopyObject -> ShowS
[CopyObject] -> ShowS
CopyObject -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CopyObject] -> ShowS
$cshowList :: [CopyObject] -> ShowS
show :: CopyObject -> String
$cshow :: CopyObject -> String
showsPrec :: Int -> CopyObject -> ShowS
$cshowsPrec :: Int -> CopyObject -> ShowS
Prelude.Show, forall x. Rep CopyObject x -> CopyObject
forall x. CopyObject -> Rep CopyObject x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CopyObject x -> CopyObject
$cfrom :: forall x. CopyObject -> Rep CopyObject x
Prelude.Generic)

-- |
-- Create a value of 'CopyObject' 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:
--
-- 'acl', 'copyObject_acl' - The canned ACL to apply to the object.
--
-- This action is not supported by Amazon S3 on Outposts.
--
-- 'bucketKeyEnabled', 'copyObject_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 a COPY action doesn’t affect bucket-level
-- settings for S3 Bucket Key.
--
-- 'cacheControl', 'copyObject_cacheControl' - Specifies caching behavior along the request\/reply chain.
--
-- 'checksumAlgorithm', 'copyObject_checksumAlgorithm' - Indicates the algorithm you want Amazon S3 to use to create the checksum
-- for the object. For more information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html Checking object integrity>
-- in the /Amazon S3 User Guide/.
--
-- 'contentDisposition', 'copyObject_contentDisposition' - Specifies presentational information for the object.
--
-- 'contentEncoding', 'copyObject_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.
--
-- 'contentLanguage', 'copyObject_contentLanguage' - The language the content is in.
--
-- 'contentType', 'copyObject_contentType' - A standard MIME type describing the format of the object data.
--
-- 'copySourceIfMatch', 'copyObject_copySourceIfMatch' - Copies the object if its entity tag (ETag) matches the specified tag.
--
-- 'copySourceIfModifiedSince', 'copyObject_copySourceIfModifiedSince' - Copies the object if it has been modified since the specified time.
--
-- 'copySourceIfNoneMatch', 'copyObject_copySourceIfNoneMatch' - Copies the object if its entity tag (ETag) is different than the
-- specified ETag.
--
-- 'copySourceIfUnmodifiedSince', 'copyObject_copySourceIfUnmodifiedSince' - Copies the object if it hasn\'t been modified since the specified time.
--
-- 'copySourceSSECustomerAlgorithm', 'copyObject_copySourceSSECustomerAlgorithm' - Specifies the algorithm to use when decrypting the source object (for
-- example, AES256).
--
-- 'copySourceSSECustomerKey', 'copyObject_copySourceSSECustomerKey' - Specifies the customer-provided encryption key for Amazon S3 to use to
-- decrypt the source object. The encryption key provided in this header
-- must be one that was used when the source object was created.
--
-- 'copySourceSSECustomerKeyMD5', 'copyObject_copySourceSSECustomerKeyMD5' - 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.
--
-- 'expectedBucketOwner', 'copyObject_expectedBucketOwner' - The account ID of the expected destination bucket owner. If the
-- destination bucket is owned by a different account, the request fails
-- with the HTTP status code @403 Forbidden@ (access denied).
--
-- 'expectedSourceBucketOwner', 'copyObject_expectedSourceBucketOwner' - The account ID of the expected source bucket owner. If the source bucket
-- is owned by a different account, the request fails with the HTTP status
-- code @403 Forbidden@ (access denied).
--
-- 'expires', 'copyObject_expires' - The date and time at which the object is no longer cacheable.
--
-- 'grantFullControl', 'copyObject_grantFullControl' - Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the
-- object.
--
-- This action is not supported by Amazon S3 on Outposts.
--
-- 'grantRead', 'copyObject_grantRead' - Allows grantee to read the object data and its metadata.
--
-- This action is not supported by Amazon S3 on Outposts.
--
-- 'grantReadACP', 'copyObject_grantReadACP' - Allows grantee to read the object ACL.
--
-- This action is not supported by Amazon S3 on Outposts.
--
-- 'grantWriteACP', 'copyObject_grantWriteACP' - Allows grantee to write the ACL for the applicable object.
--
-- This action is not supported by Amazon S3 on Outposts.
--
-- 'metadata', 'copyObject_metadata' - A map of metadata to store with the object in S3.
--
-- 'metadataDirective', 'copyObject_metadataDirective' - Specifies whether the metadata is copied from the source object or
-- replaced with metadata provided in the request.
--
-- 'objectLockLegalHoldStatus', 'copyObject_objectLockLegalHoldStatus' - Specifies whether you want to apply a legal hold to the copied object.
--
-- 'objectLockMode', 'copyObject_objectLockMode' - The Object Lock mode that you want to apply to the copied object.
--
-- 'objectLockRetainUntilDate', 'copyObject_objectLockRetainUntilDate' - The date and time when you want the copied object\'s Object Lock to
-- expire.
--
-- 'requestPayer', 'copyObject_requestPayer' - Undocumented member.
--
-- 'sSECustomerAlgorithm', 'copyObject_sSECustomerAlgorithm' - Specifies the algorithm to use to when encrypting the object (for
-- example, AES256).
--
-- 'sSECustomerKey', 'copyObject_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.
--
-- 'sSECustomerKeyMD5', 'copyObject_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.
--
-- 'sSEKMSEncryptionContext', 'copyObject_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.
--
-- 'sSEKMSKeyId', 'copyObject_sSEKMSKeyId' - Specifies the Amazon Web Services KMS key ID 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/.
--
-- 'serverSideEncryption', 'copyObject_serverSideEncryption' - The server-side encryption algorithm used when storing this object in
-- Amazon S3 (for example, AES256, aws:kms).
--
-- 'storageClass', 'copyObject_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/.
--
-- 'tagging', 'copyObject_tagging' - The tag-set for the object destination object this value must be used in
-- conjunction with the @TaggingDirective@. The tag-set must be encoded as
-- URL Query parameters.
--
-- 'taggingDirective', 'copyObject_taggingDirective' - Specifies whether the object tag-set are copied from the source object
-- or replaced with tag-set provided in the request.
--
-- 'websiteRedirectLocation', 'copyObject_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.
--
-- 'bucket', 'copyObject_bucket' - The name of the destination bucket.
--
-- When using this action with an access point, you must direct requests to
-- the access point hostname. The access point hostname takes the form
-- /AccessPointName/-/AccountId/.s3-accesspoint./Region/.amazonaws.com.
-- When using this action with an access point through the Amazon Web
-- Services SDKs, you provide the access point ARN in place of the bucket
-- name. For more information about access point ARNs, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html Using access points>
-- in the /Amazon S3 User Guide/.
--
-- When using this action with Amazon S3 on Outposts, you must direct
-- requests to the S3 on Outposts hostname. The S3 on Outposts hostname
-- takes the form
-- @ @/@AccessPointName@/@-@/@AccountId@/@.@/@outpostID@/@.s3-outposts.@/@Region@/@.amazonaws.com@.
-- When using this action with S3 on Outposts through the Amazon Web
-- Services SDKs, you provide the Outposts bucket ARN in place of the
-- bucket name. For more information about S3 on Outposts ARNs, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html Using Amazon S3 on Outposts>
-- in the /Amazon S3 User Guide/.
--
-- 'copySource', 'copyObject_copySource' - Specifies the source object for the copy operation. You specify the
-- value in one of two formats, depending on whether you want to access the
-- source object through an
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html access point>:
--
-- -   For objects not accessed through an access point, specify the name
--     of the source bucket and the key of the source object, separated by
--     a slash (\/). For example, to copy the object @reports\/january.pdf@
--     from the bucket @awsexamplebucket@, use
--     @awsexamplebucket\/reports\/january.pdf@. The value must be
--     URL-encoded.
--
-- -   For objects accessed through access points, specify the Amazon
--     Resource Name (ARN) of the object as accessed through the access
--     point, in the format
--     @arn:aws:s3:\<Region>:\<account-id>:accesspoint\/\<access-point-name>\/object\/\<key>@.
--     For example, to copy the object @reports\/january.pdf@ through
--     access point @my-access-point@ owned by account @123456789012@ in
--     Region @us-west-2@, use the URL encoding of
--     @arn:aws:s3:us-west-2:123456789012:accesspoint\/my-access-point\/object\/reports\/january.pdf@.
--     The value must be URL encoded.
--
--     Amazon S3 supports copy operations using access points only when the
--     source and destination buckets are in the same Amazon Web Services
--     Region.
--
--     Alternatively, for objects accessed through Amazon S3 on Outposts,
--     specify the ARN of the object as accessed in the format
--     @arn:aws:s3-outposts:\<Region>:\<account-id>:outpost\/\<outpost-id>\/object\/\<key>@.
--     For example, to copy the object @reports\/january.pdf@ through
--     outpost @my-outpost@ owned by account @123456789012@ in Region
--     @us-west-2@, use the URL encoding of
--     @arn:aws:s3-outposts:us-west-2:123456789012:outpost\/my-outpost\/object\/reports\/january.pdf@.
--     The value must be URL-encoded.
--
-- To copy a specific version of an object, append
-- @?versionId=\<version-id>@ to the value (for example,
-- @awsexamplebucket\/reports\/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893@).
-- If you don\'t specify a version ID, Amazon S3 copies the latest version
-- of the source object.
--
-- 'key', 'copyObject_key' - The key of the destination object.
newCopyObject ::
  -- | 'bucket'
  BucketName ->
  -- | 'copySource'
  Prelude.Text ->
  -- | 'key'
  ObjectKey ->
  CopyObject
newCopyObject :: BucketName -> Text -> ObjectKey -> CopyObject
newCopyObject BucketName
pBucket_ Text
pCopySource_ ObjectKey
pKey_ =
  CopyObject'
    { $sel:acl:CopyObject' :: Maybe ObjectCannedACL
acl = forall a. Maybe a
Prelude.Nothing,
      $sel:bucketKeyEnabled:CopyObject' :: Maybe Bool
bucketKeyEnabled = forall a. Maybe a
Prelude.Nothing,
      $sel:cacheControl:CopyObject' :: Maybe Text
cacheControl = forall a. Maybe a
Prelude.Nothing,
      $sel:checksumAlgorithm:CopyObject' :: Maybe ChecksumAlgorithm
checksumAlgorithm = forall a. Maybe a
Prelude.Nothing,
      $sel:contentDisposition:CopyObject' :: Maybe Text
contentDisposition = forall a. Maybe a
Prelude.Nothing,
      $sel:contentEncoding:CopyObject' :: Maybe Text
contentEncoding = forall a. Maybe a
Prelude.Nothing,
      $sel:contentLanguage:CopyObject' :: Maybe Text
contentLanguage = forall a. Maybe a
Prelude.Nothing,
      $sel:contentType:CopyObject' :: Maybe Text
contentType = forall a. Maybe a
Prelude.Nothing,
      $sel:copySourceIfMatch:CopyObject' :: Maybe Text
copySourceIfMatch = forall a. Maybe a
Prelude.Nothing,
      $sel:copySourceIfModifiedSince:CopyObject' :: Maybe RFC822
copySourceIfModifiedSince = forall a. Maybe a
Prelude.Nothing,
      $sel:copySourceIfNoneMatch:CopyObject' :: Maybe Text
copySourceIfNoneMatch = forall a. Maybe a
Prelude.Nothing,
      $sel:copySourceIfUnmodifiedSince:CopyObject' :: Maybe RFC822
copySourceIfUnmodifiedSince = forall a. Maybe a
Prelude.Nothing,
      $sel:copySourceSSECustomerAlgorithm:CopyObject' :: Maybe Text
copySourceSSECustomerAlgorithm = forall a. Maybe a
Prelude.Nothing,
      $sel:copySourceSSECustomerKey:CopyObject' :: Maybe (Sensitive Text)
copySourceSSECustomerKey = forall a. Maybe a
Prelude.Nothing,
      $sel:copySourceSSECustomerKeyMD5:CopyObject' :: Maybe Text
copySourceSSECustomerKeyMD5 = forall a. Maybe a
Prelude.Nothing,
      $sel:expectedBucketOwner:CopyObject' :: Maybe Text
expectedBucketOwner = forall a. Maybe a
Prelude.Nothing,
      $sel:expectedSourceBucketOwner:CopyObject' :: Maybe Text
expectedSourceBucketOwner = forall a. Maybe a
Prelude.Nothing,
      $sel:expires:CopyObject' :: Maybe RFC822
expires = forall a. Maybe a
Prelude.Nothing,
      $sel:grantFullControl:CopyObject' :: Maybe Text
grantFullControl = forall a. Maybe a
Prelude.Nothing,
      $sel:grantRead:CopyObject' :: Maybe Text
grantRead = forall a. Maybe a
Prelude.Nothing,
      $sel:grantReadACP:CopyObject' :: Maybe Text
grantReadACP = forall a. Maybe a
Prelude.Nothing,
      $sel:grantWriteACP:CopyObject' :: Maybe Text
grantWriteACP = forall a. Maybe a
Prelude.Nothing,
      $sel:metadata:CopyObject' :: HashMap Text Text
metadata = forall a. Monoid a => a
Prelude.mempty,
      $sel:metadataDirective:CopyObject' :: Maybe MetadataDirective
metadataDirective = forall a. Maybe a
Prelude.Nothing,
      $sel:objectLockLegalHoldStatus:CopyObject' :: Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:objectLockMode:CopyObject' :: Maybe ObjectLockMode
objectLockMode = forall a. Maybe a
Prelude.Nothing,
      $sel:objectLockRetainUntilDate:CopyObject' :: Maybe ISO8601
objectLockRetainUntilDate = forall a. Maybe a
Prelude.Nothing,
      $sel:requestPayer:CopyObject' :: Maybe RequestPayer
requestPayer = forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerAlgorithm:CopyObject' :: Maybe Text
sSECustomerAlgorithm = forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerKey:CopyObject' :: Maybe (Sensitive Text)
sSECustomerKey = forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerKeyMD5:CopyObject' :: Maybe Text
sSECustomerKeyMD5 = forall a. Maybe a
Prelude.Nothing,
      $sel:sSEKMSEncryptionContext:CopyObject' :: Maybe (Sensitive Text)
sSEKMSEncryptionContext = forall a. Maybe a
Prelude.Nothing,
      $sel:sSEKMSKeyId:CopyObject' :: Maybe (Sensitive Text)
sSEKMSKeyId = forall a. Maybe a
Prelude.Nothing,
      $sel:serverSideEncryption:CopyObject' :: Maybe ServerSideEncryption
serverSideEncryption = forall a. Maybe a
Prelude.Nothing,
      $sel:storageClass:CopyObject' :: Maybe StorageClass
storageClass = forall a. Maybe a
Prelude.Nothing,
      $sel:tagging:CopyObject' :: Maybe Text
tagging = forall a. Maybe a
Prelude.Nothing,
      $sel:taggingDirective:CopyObject' :: Maybe TaggingDirective
taggingDirective = forall a. Maybe a
Prelude.Nothing,
      $sel:websiteRedirectLocation:CopyObject' :: Maybe Text
websiteRedirectLocation = forall a. Maybe a
Prelude.Nothing,
      $sel:bucket:CopyObject' :: BucketName
bucket = BucketName
pBucket_,
      $sel:copySource:CopyObject' :: Text
copySource = Text
pCopySource_,
      $sel:key:CopyObject' :: ObjectKey
key = ObjectKey
pKey_
    }

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

-- | 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 a COPY action doesn’t affect bucket-level
-- settings for S3 Bucket Key.
copyObject_bucketKeyEnabled :: Lens.Lens' CopyObject (Prelude.Maybe Prelude.Bool)
copyObject_bucketKeyEnabled :: Lens' CopyObject (Maybe Bool)
copyObject_bucketKeyEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyObject' {Maybe Bool
bucketKeyEnabled :: Maybe Bool
$sel:bucketKeyEnabled:CopyObject' :: CopyObject -> Maybe Bool
bucketKeyEnabled} -> Maybe Bool
bucketKeyEnabled) (\s :: CopyObject
s@CopyObject' {} Maybe Bool
a -> CopyObject
s {$sel:bucketKeyEnabled:CopyObject' :: Maybe Bool
bucketKeyEnabled = Maybe Bool
a} :: CopyObject)

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

-- | Indicates the algorithm you want Amazon S3 to use to create the checksum
-- for the object. For more information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html Checking object integrity>
-- in the /Amazon S3 User Guide/.
copyObject_checksumAlgorithm :: Lens.Lens' CopyObject (Prelude.Maybe ChecksumAlgorithm)
copyObject_checksumAlgorithm :: Lens' CopyObject (Maybe ChecksumAlgorithm)
copyObject_checksumAlgorithm = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyObject' {Maybe ChecksumAlgorithm
checksumAlgorithm :: Maybe ChecksumAlgorithm
$sel:checksumAlgorithm:CopyObject' :: CopyObject -> Maybe ChecksumAlgorithm
checksumAlgorithm} -> Maybe ChecksumAlgorithm
checksumAlgorithm) (\s :: CopyObject
s@CopyObject' {} Maybe ChecksumAlgorithm
a -> CopyObject
s {$sel:checksumAlgorithm:CopyObject' :: Maybe ChecksumAlgorithm
checksumAlgorithm = Maybe ChecksumAlgorithm
a} :: CopyObject)

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

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

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

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

-- | Copies the object if its entity tag (ETag) matches the specified tag.
copyObject_copySourceIfMatch :: Lens.Lens' CopyObject (Prelude.Maybe Prelude.Text)
copyObject_copySourceIfMatch :: Lens' CopyObject (Maybe Text)
copyObject_copySourceIfMatch = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyObject' {Maybe Text
copySourceIfMatch :: Maybe Text
$sel:copySourceIfMatch:CopyObject' :: CopyObject -> Maybe Text
copySourceIfMatch} -> Maybe Text
copySourceIfMatch) (\s :: CopyObject
s@CopyObject' {} Maybe Text
a -> CopyObject
s {$sel:copySourceIfMatch:CopyObject' :: Maybe Text
copySourceIfMatch = Maybe Text
a} :: CopyObject)

-- | Copies the object if it has been modified since the specified time.
copyObject_copySourceIfModifiedSince :: Lens.Lens' CopyObject (Prelude.Maybe Prelude.UTCTime)
copyObject_copySourceIfModifiedSince :: Lens' CopyObject (Maybe UTCTime)
copyObject_copySourceIfModifiedSince = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyObject' {Maybe RFC822
copySourceIfModifiedSince :: Maybe RFC822
$sel:copySourceIfModifiedSince:CopyObject' :: CopyObject -> Maybe RFC822
copySourceIfModifiedSince} -> Maybe RFC822
copySourceIfModifiedSince) (\s :: CopyObject
s@CopyObject' {} Maybe RFC822
a -> CopyObject
s {$sel:copySourceIfModifiedSince:CopyObject' :: Maybe RFC822
copySourceIfModifiedSince = Maybe RFC822
a} :: CopyObject) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | Copies the object if its entity tag (ETag) is different than the
-- specified ETag.
copyObject_copySourceIfNoneMatch :: Lens.Lens' CopyObject (Prelude.Maybe Prelude.Text)
copyObject_copySourceIfNoneMatch :: Lens' CopyObject (Maybe Text)
copyObject_copySourceIfNoneMatch = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyObject' {Maybe Text
copySourceIfNoneMatch :: Maybe Text
$sel:copySourceIfNoneMatch:CopyObject' :: CopyObject -> Maybe Text
copySourceIfNoneMatch} -> Maybe Text
copySourceIfNoneMatch) (\s :: CopyObject
s@CopyObject' {} Maybe Text
a -> CopyObject
s {$sel:copySourceIfNoneMatch:CopyObject' :: Maybe Text
copySourceIfNoneMatch = Maybe Text
a} :: CopyObject)

-- | Copies the object if it hasn\'t been modified since the specified time.
copyObject_copySourceIfUnmodifiedSince :: Lens.Lens' CopyObject (Prelude.Maybe Prelude.UTCTime)
copyObject_copySourceIfUnmodifiedSince :: Lens' CopyObject (Maybe UTCTime)
copyObject_copySourceIfUnmodifiedSince = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyObject' {Maybe RFC822
copySourceIfUnmodifiedSince :: Maybe RFC822
$sel:copySourceIfUnmodifiedSince:CopyObject' :: CopyObject -> Maybe RFC822
copySourceIfUnmodifiedSince} -> Maybe RFC822
copySourceIfUnmodifiedSince) (\s :: CopyObject
s@CopyObject' {} Maybe RFC822
a -> CopyObject
s {$sel:copySourceIfUnmodifiedSince:CopyObject' :: Maybe RFC822
copySourceIfUnmodifiedSince = Maybe RFC822
a} :: CopyObject) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | Specifies the algorithm to use when decrypting the source object (for
-- example, AES256).
copyObject_copySourceSSECustomerAlgorithm :: Lens.Lens' CopyObject (Prelude.Maybe Prelude.Text)
copyObject_copySourceSSECustomerAlgorithm :: Lens' CopyObject (Maybe Text)
copyObject_copySourceSSECustomerAlgorithm = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyObject' {Maybe Text
copySourceSSECustomerAlgorithm :: Maybe Text
$sel:copySourceSSECustomerAlgorithm:CopyObject' :: CopyObject -> Maybe Text
copySourceSSECustomerAlgorithm} -> Maybe Text
copySourceSSECustomerAlgorithm) (\s :: CopyObject
s@CopyObject' {} Maybe Text
a -> CopyObject
s {$sel:copySourceSSECustomerAlgorithm:CopyObject' :: Maybe Text
copySourceSSECustomerAlgorithm = Maybe Text
a} :: CopyObject)

-- | Specifies the customer-provided encryption key for Amazon S3 to use to
-- decrypt the source object. The encryption key provided in this header
-- must be one that was used when the source object was created.
copyObject_copySourceSSECustomerKey :: Lens.Lens' CopyObject (Prelude.Maybe Prelude.Text)
copyObject_copySourceSSECustomerKey :: Lens' CopyObject (Maybe Text)
copyObject_copySourceSSECustomerKey = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyObject' {Maybe (Sensitive Text)
copySourceSSECustomerKey :: Maybe (Sensitive Text)
$sel:copySourceSSECustomerKey:CopyObject' :: CopyObject -> Maybe (Sensitive Text)
copySourceSSECustomerKey} -> Maybe (Sensitive Text)
copySourceSSECustomerKey) (\s :: CopyObject
s@CopyObject' {} Maybe (Sensitive Text)
a -> CopyObject
s {$sel:copySourceSSECustomerKey:CopyObject' :: Maybe (Sensitive Text)
copySourceSSECustomerKey = Maybe (Sensitive Text)
a} :: CopyObject) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall a. Iso' (Sensitive a) a
Data._Sensitive

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

-- | The account ID of the expected destination bucket owner. If the
-- destination bucket is owned by a different account, the request fails
-- with the HTTP status code @403 Forbidden@ (access denied).
copyObject_expectedBucketOwner :: Lens.Lens' CopyObject (Prelude.Maybe Prelude.Text)
copyObject_expectedBucketOwner :: Lens' CopyObject (Maybe Text)
copyObject_expectedBucketOwner = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyObject' {Maybe Text
expectedBucketOwner :: Maybe Text
$sel:expectedBucketOwner:CopyObject' :: CopyObject -> Maybe Text
expectedBucketOwner} -> Maybe Text
expectedBucketOwner) (\s :: CopyObject
s@CopyObject' {} Maybe Text
a -> CopyObject
s {$sel:expectedBucketOwner:CopyObject' :: Maybe Text
expectedBucketOwner = Maybe Text
a} :: CopyObject)

-- | The account ID of the expected source bucket owner. If the source bucket
-- is owned by a different account, the request fails with the HTTP status
-- code @403 Forbidden@ (access denied).
copyObject_expectedSourceBucketOwner :: Lens.Lens' CopyObject (Prelude.Maybe Prelude.Text)
copyObject_expectedSourceBucketOwner :: Lens' CopyObject (Maybe Text)
copyObject_expectedSourceBucketOwner = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyObject' {Maybe Text
expectedSourceBucketOwner :: Maybe Text
$sel:expectedSourceBucketOwner:CopyObject' :: CopyObject -> Maybe Text
expectedSourceBucketOwner} -> Maybe Text
expectedSourceBucketOwner) (\s :: CopyObject
s@CopyObject' {} Maybe Text
a -> CopyObject
s {$sel:expectedSourceBucketOwner:CopyObject' :: Maybe Text
expectedSourceBucketOwner = Maybe Text
a} :: CopyObject)

-- | The date and time at which the object is no longer cacheable.
copyObject_expires :: Lens.Lens' CopyObject (Prelude.Maybe Prelude.UTCTime)
copyObject_expires :: Lens' CopyObject (Maybe UTCTime)
copyObject_expires = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyObject' {Maybe RFC822
expires :: Maybe RFC822
$sel:expires:CopyObject' :: CopyObject -> Maybe RFC822
expires} -> Maybe RFC822
expires) (\s :: CopyObject
s@CopyObject' {} Maybe RFC822
a -> CopyObject
s {$sel:expires:CopyObject' :: Maybe RFC822
expires = Maybe RFC822
a} :: CopyObject) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

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

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

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

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

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

-- | Specifies whether the metadata is copied from the source object or
-- replaced with metadata provided in the request.
copyObject_metadataDirective :: Lens.Lens' CopyObject (Prelude.Maybe MetadataDirective)
copyObject_metadataDirective :: Lens' CopyObject (Maybe MetadataDirective)
copyObject_metadataDirective = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyObject' {Maybe MetadataDirective
metadataDirective :: Maybe MetadataDirective
$sel:metadataDirective:CopyObject' :: CopyObject -> Maybe MetadataDirective
metadataDirective} -> Maybe MetadataDirective
metadataDirective) (\s :: CopyObject
s@CopyObject' {} Maybe MetadataDirective
a -> CopyObject
s {$sel:metadataDirective:CopyObject' :: Maybe MetadataDirective
metadataDirective = Maybe MetadataDirective
a} :: CopyObject)

-- | Specifies whether you want to apply a legal hold to the copied object.
copyObject_objectLockLegalHoldStatus :: Lens.Lens' CopyObject (Prelude.Maybe ObjectLockLegalHoldStatus)
copyObject_objectLockLegalHoldStatus :: Lens' CopyObject (Maybe ObjectLockLegalHoldStatus)
copyObject_objectLockLegalHoldStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyObject' {Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus :: Maybe ObjectLockLegalHoldStatus
$sel:objectLockLegalHoldStatus:CopyObject' :: CopyObject -> Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus} -> Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus) (\s :: CopyObject
s@CopyObject' {} Maybe ObjectLockLegalHoldStatus
a -> CopyObject
s {$sel:objectLockLegalHoldStatus:CopyObject' :: Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus = Maybe ObjectLockLegalHoldStatus
a} :: CopyObject)

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

-- | The date and time when you want the copied object\'s Object Lock to
-- expire.
copyObject_objectLockRetainUntilDate :: Lens.Lens' CopyObject (Prelude.Maybe Prelude.UTCTime)
copyObject_objectLockRetainUntilDate :: Lens' CopyObject (Maybe UTCTime)
copyObject_objectLockRetainUntilDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyObject' {Maybe ISO8601
objectLockRetainUntilDate :: Maybe ISO8601
$sel:objectLockRetainUntilDate:CopyObject' :: CopyObject -> Maybe ISO8601
objectLockRetainUntilDate} -> Maybe ISO8601
objectLockRetainUntilDate) (\s :: CopyObject
s@CopyObject' {} Maybe ISO8601
a -> CopyObject
s {$sel:objectLockRetainUntilDate:CopyObject' :: Maybe ISO8601
objectLockRetainUntilDate = Maybe ISO8601
a} :: CopyObject) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

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

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

-- | 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.
copyObject_sSECustomerKey :: Lens.Lens' CopyObject (Prelude.Maybe Prelude.Text)
copyObject_sSECustomerKey :: Lens' CopyObject (Maybe Text)
copyObject_sSECustomerKey = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyObject' {Maybe (Sensitive Text)
sSECustomerKey :: Maybe (Sensitive Text)
$sel:sSECustomerKey:CopyObject' :: CopyObject -> Maybe (Sensitive Text)
sSECustomerKey} -> Maybe (Sensitive Text)
sSECustomerKey) (\s :: CopyObject
s@CopyObject' {} Maybe (Sensitive Text)
a -> CopyObject
s {$sel:sSECustomerKey:CopyObject' :: Maybe (Sensitive Text)
sSECustomerKey = Maybe (Sensitive Text)
a} :: CopyObject) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall a. Iso' (Sensitive a) a
Data._Sensitive

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

-- | 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.
copyObject_sSEKMSEncryptionContext :: Lens.Lens' CopyObject (Prelude.Maybe Prelude.Text)
copyObject_sSEKMSEncryptionContext :: Lens' CopyObject (Maybe Text)
copyObject_sSEKMSEncryptionContext = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyObject' {Maybe (Sensitive Text)
sSEKMSEncryptionContext :: Maybe (Sensitive Text)
$sel:sSEKMSEncryptionContext:CopyObject' :: CopyObject -> Maybe (Sensitive Text)
sSEKMSEncryptionContext} -> Maybe (Sensitive Text)
sSEKMSEncryptionContext) (\s :: CopyObject
s@CopyObject' {} Maybe (Sensitive Text)
a -> CopyObject
s {$sel:sSEKMSEncryptionContext:CopyObject' :: Maybe (Sensitive Text)
sSEKMSEncryptionContext = Maybe (Sensitive Text)
a} :: CopyObject) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall a. Iso' (Sensitive a) a
Data._Sensitive

-- | Specifies the Amazon Web Services KMS key ID 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/.
copyObject_sSEKMSKeyId :: Lens.Lens' CopyObject (Prelude.Maybe Prelude.Text)
copyObject_sSEKMSKeyId :: Lens' CopyObject (Maybe Text)
copyObject_sSEKMSKeyId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyObject' {Maybe (Sensitive Text)
sSEKMSKeyId :: Maybe (Sensitive Text)
$sel:sSEKMSKeyId:CopyObject' :: CopyObject -> Maybe (Sensitive Text)
sSEKMSKeyId} -> Maybe (Sensitive Text)
sSEKMSKeyId) (\s :: CopyObject
s@CopyObject' {} Maybe (Sensitive Text)
a -> CopyObject
s {$sel:sSEKMSKeyId:CopyObject' :: Maybe (Sensitive Text)
sSEKMSKeyId = Maybe (Sensitive Text)
a} :: CopyObject) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall a. Iso' (Sensitive a) a
Data._Sensitive

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

-- | 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/.
copyObject_storageClass :: Lens.Lens' CopyObject (Prelude.Maybe StorageClass)
copyObject_storageClass :: Lens' CopyObject (Maybe StorageClass)
copyObject_storageClass = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyObject' {Maybe StorageClass
storageClass :: Maybe StorageClass
$sel:storageClass:CopyObject' :: CopyObject -> Maybe StorageClass
storageClass} -> Maybe StorageClass
storageClass) (\s :: CopyObject
s@CopyObject' {} Maybe StorageClass
a -> CopyObject
s {$sel:storageClass:CopyObject' :: Maybe StorageClass
storageClass = Maybe StorageClass
a} :: CopyObject)

-- | The tag-set for the object destination object this value must be used in
-- conjunction with the @TaggingDirective@. The tag-set must be encoded as
-- URL Query parameters.
copyObject_tagging :: Lens.Lens' CopyObject (Prelude.Maybe Prelude.Text)
copyObject_tagging :: Lens' CopyObject (Maybe Text)
copyObject_tagging = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyObject' {Maybe Text
tagging :: Maybe Text
$sel:tagging:CopyObject' :: CopyObject -> Maybe Text
tagging} -> Maybe Text
tagging) (\s :: CopyObject
s@CopyObject' {} Maybe Text
a -> CopyObject
s {$sel:tagging:CopyObject' :: Maybe Text
tagging = Maybe Text
a} :: CopyObject)

-- | Specifies whether the object tag-set are copied from the source object
-- or replaced with tag-set provided in the request.
copyObject_taggingDirective :: Lens.Lens' CopyObject (Prelude.Maybe TaggingDirective)
copyObject_taggingDirective :: Lens' CopyObject (Maybe TaggingDirective)
copyObject_taggingDirective = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyObject' {Maybe TaggingDirective
taggingDirective :: Maybe TaggingDirective
$sel:taggingDirective:CopyObject' :: CopyObject -> Maybe TaggingDirective
taggingDirective} -> Maybe TaggingDirective
taggingDirective) (\s :: CopyObject
s@CopyObject' {} Maybe TaggingDirective
a -> CopyObject
s {$sel:taggingDirective:CopyObject' :: Maybe TaggingDirective
taggingDirective = Maybe TaggingDirective
a} :: CopyObject)

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

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

-- | Specifies the source object for the copy operation. You specify the
-- value in one of two formats, depending on whether you want to access the
-- source object through an
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html access point>:
--
-- -   For objects not accessed through an access point, specify the name
--     of the source bucket and the key of the source object, separated by
--     a slash (\/). For example, to copy the object @reports\/january.pdf@
--     from the bucket @awsexamplebucket@, use
--     @awsexamplebucket\/reports\/january.pdf@. The value must be
--     URL-encoded.
--
-- -   For objects accessed through access points, specify the Amazon
--     Resource Name (ARN) of the object as accessed through the access
--     point, in the format
--     @arn:aws:s3:\<Region>:\<account-id>:accesspoint\/\<access-point-name>\/object\/\<key>@.
--     For example, to copy the object @reports\/january.pdf@ through
--     access point @my-access-point@ owned by account @123456789012@ in
--     Region @us-west-2@, use the URL encoding of
--     @arn:aws:s3:us-west-2:123456789012:accesspoint\/my-access-point\/object\/reports\/january.pdf@.
--     The value must be URL encoded.
--
--     Amazon S3 supports copy operations using access points only when the
--     source and destination buckets are in the same Amazon Web Services
--     Region.
--
--     Alternatively, for objects accessed through Amazon S3 on Outposts,
--     specify the ARN of the object as accessed in the format
--     @arn:aws:s3-outposts:\<Region>:\<account-id>:outpost\/\<outpost-id>\/object\/\<key>@.
--     For example, to copy the object @reports\/january.pdf@ through
--     outpost @my-outpost@ owned by account @123456789012@ in Region
--     @us-west-2@, use the URL encoding of
--     @arn:aws:s3-outposts:us-west-2:123456789012:outpost\/my-outpost\/object\/reports\/january.pdf@.
--     The value must be URL-encoded.
--
-- To copy a specific version of an object, append
-- @?versionId=\<version-id>@ to the value (for example,
-- @awsexamplebucket\/reports\/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893@).
-- If you don\'t specify a version ID, Amazon S3 copies the latest version
-- of the source object.
copyObject_copySource :: Lens.Lens' CopyObject Prelude.Text
copyObject_copySource :: Lens' CopyObject Text
copyObject_copySource = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyObject' {Text
copySource :: Text
$sel:copySource:CopyObject' :: CopyObject -> Text
copySource} -> Text
copySource) (\s :: CopyObject
s@CopyObject' {} Text
a -> CopyObject
s {$sel:copySource:CopyObject' :: Text
copySource = Text
a} :: CopyObject)

-- | The key of the destination object.
copyObject_key :: Lens.Lens' CopyObject ObjectKey
copyObject_key :: Lens' CopyObject ObjectKey
copyObject_key = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyObject' {ObjectKey
key :: ObjectKey
$sel:key:CopyObject' :: CopyObject -> ObjectKey
key} -> ObjectKey
key) (\s :: CopyObject
s@CopyObject' {} ObjectKey
a -> CopyObject
s {$sel:key:CopyObject' :: ObjectKey
key = ObjectKey
a} :: CopyObject)

instance Core.AWSRequest CopyObject where
  type AWSResponse CopyObject = CopyObjectResponse
  request :: (Service -> Service) -> CopyObject -> Request CopyObject
request Service -> Service
overrides =
    forall a. Request a -> Request a
Request.s3vhost
      forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a. ToRequest a => Service -> a -> Request a
Request.put (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CopyObject
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CopyObject)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Bool
-> Maybe CopyObjectResult
-> Maybe Text
-> Maybe Text
-> Maybe RequestCharged
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe ServerSideEncryption
-> Maybe ObjectVersionId
-> Int
-> CopyObjectResponse
CopyObjectResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( ResponseHeaders
h
                            forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-server-side-encryption-bucket-key-enabled"
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall a. FromXML a => [Node] -> Either String a
Data.parseXML [Node]
x)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-copy-source-version-id")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-expiration")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-request-charged")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( ResponseHeaders
h
                            forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-server-side-encryption-customer-algorithm"
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( ResponseHeaders
h
                            forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-server-side-encryption-customer-key-MD5"
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-server-side-encryption-context")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( ResponseHeaders
h
                            forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-server-side-encryption-aws-kms-key-id"
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-server-side-encryption")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-version-id")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CopyObject where
  hashWithSalt :: Int -> CopyObject -> Int
hashWithSalt Int
_salt CopyObject' {Maybe Bool
Maybe Text
Maybe (Sensitive Text)
Maybe ISO8601
Maybe RFC822
Maybe ChecksumAlgorithm
Maybe MetadataDirective
Maybe ObjectCannedACL
Maybe ObjectLockLegalHoldStatus
Maybe ObjectLockMode
Maybe RequestPayer
Maybe ServerSideEncryption
Maybe StorageClass
Maybe TaggingDirective
Text
HashMap Text Text
ObjectKey
BucketName
key :: ObjectKey
copySource :: Text
bucket :: BucketName
websiteRedirectLocation :: Maybe Text
taggingDirective :: Maybe TaggingDirective
tagging :: Maybe Text
storageClass :: Maybe StorageClass
serverSideEncryption :: Maybe ServerSideEncryption
sSEKMSKeyId :: Maybe (Sensitive Text)
sSEKMSEncryptionContext :: Maybe (Sensitive Text)
sSECustomerKeyMD5 :: Maybe Text
sSECustomerKey :: Maybe (Sensitive Text)
sSECustomerAlgorithm :: Maybe Text
requestPayer :: Maybe RequestPayer
objectLockRetainUntilDate :: Maybe ISO8601
objectLockMode :: Maybe ObjectLockMode
objectLockLegalHoldStatus :: Maybe ObjectLockLegalHoldStatus
metadataDirective :: Maybe MetadataDirective
metadata :: HashMap Text Text
grantWriteACP :: Maybe Text
grantReadACP :: Maybe Text
grantRead :: Maybe Text
grantFullControl :: Maybe Text
expires :: Maybe RFC822
expectedSourceBucketOwner :: Maybe Text
expectedBucketOwner :: Maybe Text
copySourceSSECustomerKeyMD5 :: Maybe Text
copySourceSSECustomerKey :: Maybe (Sensitive Text)
copySourceSSECustomerAlgorithm :: Maybe Text
copySourceIfUnmodifiedSince :: Maybe RFC822
copySourceIfNoneMatch :: Maybe Text
copySourceIfModifiedSince :: Maybe RFC822
copySourceIfMatch :: Maybe Text
contentType :: Maybe Text
contentLanguage :: Maybe Text
contentEncoding :: Maybe Text
contentDisposition :: Maybe Text
checksumAlgorithm :: Maybe ChecksumAlgorithm
cacheControl :: Maybe Text
bucketKeyEnabled :: Maybe Bool
acl :: Maybe ObjectCannedACL
$sel:key:CopyObject' :: CopyObject -> ObjectKey
$sel:copySource:CopyObject' :: CopyObject -> Text
$sel:bucket:CopyObject' :: CopyObject -> BucketName
$sel:websiteRedirectLocation:CopyObject' :: CopyObject -> Maybe Text
$sel:taggingDirective:CopyObject' :: CopyObject -> Maybe TaggingDirective
$sel:tagging:CopyObject' :: CopyObject -> Maybe Text
$sel:storageClass:CopyObject' :: CopyObject -> Maybe StorageClass
$sel:serverSideEncryption:CopyObject' :: CopyObject -> Maybe ServerSideEncryption
$sel:sSEKMSKeyId:CopyObject' :: CopyObject -> Maybe (Sensitive Text)
$sel:sSEKMSEncryptionContext:CopyObject' :: CopyObject -> Maybe (Sensitive Text)
$sel:sSECustomerKeyMD5:CopyObject' :: CopyObject -> Maybe Text
$sel:sSECustomerKey:CopyObject' :: CopyObject -> Maybe (Sensitive Text)
$sel:sSECustomerAlgorithm:CopyObject' :: CopyObject -> Maybe Text
$sel:requestPayer:CopyObject' :: CopyObject -> Maybe RequestPayer
$sel:objectLockRetainUntilDate:CopyObject' :: CopyObject -> Maybe ISO8601
$sel:objectLockMode:CopyObject' :: CopyObject -> Maybe ObjectLockMode
$sel:objectLockLegalHoldStatus:CopyObject' :: CopyObject -> Maybe ObjectLockLegalHoldStatus
$sel:metadataDirective:CopyObject' :: CopyObject -> Maybe MetadataDirective
$sel:metadata:CopyObject' :: CopyObject -> HashMap Text Text
$sel:grantWriteACP:CopyObject' :: CopyObject -> Maybe Text
$sel:grantReadACP:CopyObject' :: CopyObject -> Maybe Text
$sel:grantRead:CopyObject' :: CopyObject -> Maybe Text
$sel:grantFullControl:CopyObject' :: CopyObject -> Maybe Text
$sel:expires:CopyObject' :: CopyObject -> Maybe RFC822
$sel:expectedSourceBucketOwner:CopyObject' :: CopyObject -> Maybe Text
$sel:expectedBucketOwner:CopyObject' :: CopyObject -> Maybe Text
$sel:copySourceSSECustomerKeyMD5:CopyObject' :: CopyObject -> Maybe Text
$sel:copySourceSSECustomerKey:CopyObject' :: CopyObject -> Maybe (Sensitive Text)
$sel:copySourceSSECustomerAlgorithm:CopyObject' :: CopyObject -> Maybe Text
$sel:copySourceIfUnmodifiedSince:CopyObject' :: CopyObject -> Maybe RFC822
$sel:copySourceIfNoneMatch:CopyObject' :: CopyObject -> Maybe Text
$sel:copySourceIfModifiedSince:CopyObject' :: CopyObject -> Maybe RFC822
$sel:copySourceIfMatch:CopyObject' :: CopyObject -> Maybe Text
$sel:contentType:CopyObject' :: CopyObject -> Maybe Text
$sel:contentLanguage:CopyObject' :: CopyObject -> Maybe Text
$sel:contentEncoding:CopyObject' :: CopyObject -> Maybe Text
$sel:contentDisposition:CopyObject' :: CopyObject -> Maybe Text
$sel:checksumAlgorithm:CopyObject' :: CopyObject -> Maybe ChecksumAlgorithm
$sel:cacheControl:CopyObject' :: CopyObject -> Maybe Text
$sel:bucketKeyEnabled:CopyObject' :: CopyObject -> Maybe Bool
$sel:acl:CopyObject' :: CopyObject -> Maybe ObjectCannedACL
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ObjectCannedACL
acl
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
bucketKeyEnabled
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cacheControl
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ChecksumAlgorithm
checksumAlgorithm
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
contentDisposition
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
contentEncoding
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
contentLanguage
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
contentType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
copySourceIfMatch
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RFC822
copySourceIfModifiedSince
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
copySourceIfNoneMatch
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RFC822
copySourceIfUnmodifiedSince
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
copySourceSSECustomerAlgorithm
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
copySourceSSECustomerKey
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
copySourceSSECustomerKeyMD5
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
expectedBucketOwner
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
expectedSourceBucketOwner
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RFC822
expires
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
grantFullControl
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
grantRead
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
grantReadACP
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
grantWriteACP
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` HashMap Text Text
metadata
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MetadataDirective
metadataDirective
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ObjectLockMode
objectLockMode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
objectLockRetainUntilDate
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RequestPayer
requestPayer
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sSECustomerAlgorithm
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
sSECustomerKey
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sSECustomerKeyMD5
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
sSEKMSEncryptionContext
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
sSEKMSKeyId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ServerSideEncryption
serverSideEncryption
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StorageClass
storageClass
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
tagging
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TaggingDirective
taggingDirective
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
websiteRedirectLocation
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` BucketName
bucket
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
copySource
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ObjectKey
key

instance Prelude.NFData CopyObject where
  rnf :: CopyObject -> ()
rnf CopyObject' {Maybe Bool
Maybe Text
Maybe (Sensitive Text)
Maybe ISO8601
Maybe RFC822
Maybe ChecksumAlgorithm
Maybe MetadataDirective
Maybe ObjectCannedACL
Maybe ObjectLockLegalHoldStatus
Maybe ObjectLockMode
Maybe RequestPayer
Maybe ServerSideEncryption
Maybe StorageClass
Maybe TaggingDirective
Text
HashMap Text Text
ObjectKey
BucketName
key :: ObjectKey
copySource :: Text
bucket :: BucketName
websiteRedirectLocation :: Maybe Text
taggingDirective :: Maybe TaggingDirective
tagging :: Maybe Text
storageClass :: Maybe StorageClass
serverSideEncryption :: Maybe ServerSideEncryption
sSEKMSKeyId :: Maybe (Sensitive Text)
sSEKMSEncryptionContext :: Maybe (Sensitive Text)
sSECustomerKeyMD5 :: Maybe Text
sSECustomerKey :: Maybe (Sensitive Text)
sSECustomerAlgorithm :: Maybe Text
requestPayer :: Maybe RequestPayer
objectLockRetainUntilDate :: Maybe ISO8601
objectLockMode :: Maybe ObjectLockMode
objectLockLegalHoldStatus :: Maybe ObjectLockLegalHoldStatus
metadataDirective :: Maybe MetadataDirective
metadata :: HashMap Text Text
grantWriteACP :: Maybe Text
grantReadACP :: Maybe Text
grantRead :: Maybe Text
grantFullControl :: Maybe Text
expires :: Maybe RFC822
expectedSourceBucketOwner :: Maybe Text
expectedBucketOwner :: Maybe Text
copySourceSSECustomerKeyMD5 :: Maybe Text
copySourceSSECustomerKey :: Maybe (Sensitive Text)
copySourceSSECustomerAlgorithm :: Maybe Text
copySourceIfUnmodifiedSince :: Maybe RFC822
copySourceIfNoneMatch :: Maybe Text
copySourceIfModifiedSince :: Maybe RFC822
copySourceIfMatch :: Maybe Text
contentType :: Maybe Text
contentLanguage :: Maybe Text
contentEncoding :: Maybe Text
contentDisposition :: Maybe Text
checksumAlgorithm :: Maybe ChecksumAlgorithm
cacheControl :: Maybe Text
bucketKeyEnabled :: Maybe Bool
acl :: Maybe ObjectCannedACL
$sel:key:CopyObject' :: CopyObject -> ObjectKey
$sel:copySource:CopyObject' :: CopyObject -> Text
$sel:bucket:CopyObject' :: CopyObject -> BucketName
$sel:websiteRedirectLocation:CopyObject' :: CopyObject -> Maybe Text
$sel:taggingDirective:CopyObject' :: CopyObject -> Maybe TaggingDirective
$sel:tagging:CopyObject' :: CopyObject -> Maybe Text
$sel:storageClass:CopyObject' :: CopyObject -> Maybe StorageClass
$sel:serverSideEncryption:CopyObject' :: CopyObject -> Maybe ServerSideEncryption
$sel:sSEKMSKeyId:CopyObject' :: CopyObject -> Maybe (Sensitive Text)
$sel:sSEKMSEncryptionContext:CopyObject' :: CopyObject -> Maybe (Sensitive Text)
$sel:sSECustomerKeyMD5:CopyObject' :: CopyObject -> Maybe Text
$sel:sSECustomerKey:CopyObject' :: CopyObject -> Maybe (Sensitive Text)
$sel:sSECustomerAlgorithm:CopyObject' :: CopyObject -> Maybe Text
$sel:requestPayer:CopyObject' :: CopyObject -> Maybe RequestPayer
$sel:objectLockRetainUntilDate:CopyObject' :: CopyObject -> Maybe ISO8601
$sel:objectLockMode:CopyObject' :: CopyObject -> Maybe ObjectLockMode
$sel:objectLockLegalHoldStatus:CopyObject' :: CopyObject -> Maybe ObjectLockLegalHoldStatus
$sel:metadataDirective:CopyObject' :: CopyObject -> Maybe MetadataDirective
$sel:metadata:CopyObject' :: CopyObject -> HashMap Text Text
$sel:grantWriteACP:CopyObject' :: CopyObject -> Maybe Text
$sel:grantReadACP:CopyObject' :: CopyObject -> Maybe Text
$sel:grantRead:CopyObject' :: CopyObject -> Maybe Text
$sel:grantFullControl:CopyObject' :: CopyObject -> Maybe Text
$sel:expires:CopyObject' :: CopyObject -> Maybe RFC822
$sel:expectedSourceBucketOwner:CopyObject' :: CopyObject -> Maybe Text
$sel:expectedBucketOwner:CopyObject' :: CopyObject -> Maybe Text
$sel:copySourceSSECustomerKeyMD5:CopyObject' :: CopyObject -> Maybe Text
$sel:copySourceSSECustomerKey:CopyObject' :: CopyObject -> Maybe (Sensitive Text)
$sel:copySourceSSECustomerAlgorithm:CopyObject' :: CopyObject -> Maybe Text
$sel:copySourceIfUnmodifiedSince:CopyObject' :: CopyObject -> Maybe RFC822
$sel:copySourceIfNoneMatch:CopyObject' :: CopyObject -> Maybe Text
$sel:copySourceIfModifiedSince:CopyObject' :: CopyObject -> Maybe RFC822
$sel:copySourceIfMatch:CopyObject' :: CopyObject -> Maybe Text
$sel:contentType:CopyObject' :: CopyObject -> Maybe Text
$sel:contentLanguage:CopyObject' :: CopyObject -> Maybe Text
$sel:contentEncoding:CopyObject' :: CopyObject -> Maybe Text
$sel:contentDisposition:CopyObject' :: CopyObject -> Maybe Text
$sel:checksumAlgorithm:CopyObject' :: CopyObject -> Maybe ChecksumAlgorithm
$sel:cacheControl:CopyObject' :: CopyObject -> Maybe Text
$sel:bucketKeyEnabled:CopyObject' :: CopyObject -> Maybe Bool
$sel:acl:CopyObject' :: CopyObject -> Maybe ObjectCannedACL
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe ObjectCannedACL
acl
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
bucketKeyEnabled
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cacheControl
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ChecksumAlgorithm
checksumAlgorithm
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
contentDisposition
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
contentEncoding
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
contentLanguage
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
contentType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
copySourceIfMatch
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RFC822
copySourceIfModifiedSince
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
copySourceIfNoneMatch
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RFC822
copySourceIfUnmodifiedSince
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
copySourceSSECustomerAlgorithm
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
copySourceSSECustomerKey
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
copySourceSSECustomerKeyMD5
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
expectedBucketOwner
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Text
expectedSourceBucketOwner
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RFC822
expires
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
grantFullControl
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
grantRead
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
grantReadACP
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
grantWriteACP
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf HashMap Text Text
metadata
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe MetadataDirective
metadataDirective
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe ObjectLockMode
objectLockMode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe ISO8601
objectLockRetainUntilDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe RequestPayer
requestPayer
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Text
sSECustomerAlgorithm
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe (Sensitive Text)
sSECustomerKey
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Text
sSECustomerKeyMD5
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe (Sensitive Text)
sSEKMSEncryptionContext
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe (Sensitive Text)
sSEKMSKeyId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe ServerSideEncryption
serverSideEncryption
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe StorageClass
storageClass
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Text
tagging
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe TaggingDirective
taggingDirective
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Text
websiteRedirectLocation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        BucketName
bucket
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Text
copySource
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        ObjectKey
key

instance Data.ToHeaders CopyObject where
  toHeaders :: CopyObject -> ResponseHeaders
toHeaders CopyObject' {Maybe Bool
Maybe Text
Maybe (Sensitive Text)
Maybe ISO8601
Maybe RFC822
Maybe ChecksumAlgorithm
Maybe MetadataDirective
Maybe ObjectCannedACL
Maybe ObjectLockLegalHoldStatus
Maybe ObjectLockMode
Maybe RequestPayer
Maybe ServerSideEncryption
Maybe StorageClass
Maybe TaggingDirective
Text
HashMap Text Text
ObjectKey
BucketName
key :: ObjectKey
copySource :: Text
bucket :: BucketName
websiteRedirectLocation :: Maybe Text
taggingDirective :: Maybe TaggingDirective
tagging :: Maybe Text
storageClass :: Maybe StorageClass
serverSideEncryption :: Maybe ServerSideEncryption
sSEKMSKeyId :: Maybe (Sensitive Text)
sSEKMSEncryptionContext :: Maybe (Sensitive Text)
sSECustomerKeyMD5 :: Maybe Text
sSECustomerKey :: Maybe (Sensitive Text)
sSECustomerAlgorithm :: Maybe Text
requestPayer :: Maybe RequestPayer
objectLockRetainUntilDate :: Maybe ISO8601
objectLockMode :: Maybe ObjectLockMode
objectLockLegalHoldStatus :: Maybe ObjectLockLegalHoldStatus
metadataDirective :: Maybe MetadataDirective
metadata :: HashMap Text Text
grantWriteACP :: Maybe Text
grantReadACP :: Maybe Text
grantRead :: Maybe Text
grantFullControl :: Maybe Text
expires :: Maybe RFC822
expectedSourceBucketOwner :: Maybe Text
expectedBucketOwner :: Maybe Text
copySourceSSECustomerKeyMD5 :: Maybe Text
copySourceSSECustomerKey :: Maybe (Sensitive Text)
copySourceSSECustomerAlgorithm :: Maybe Text
copySourceIfUnmodifiedSince :: Maybe RFC822
copySourceIfNoneMatch :: Maybe Text
copySourceIfModifiedSince :: Maybe RFC822
copySourceIfMatch :: Maybe Text
contentType :: Maybe Text
contentLanguage :: Maybe Text
contentEncoding :: Maybe Text
contentDisposition :: Maybe Text
checksumAlgorithm :: Maybe ChecksumAlgorithm
cacheControl :: Maybe Text
bucketKeyEnabled :: Maybe Bool
acl :: Maybe ObjectCannedACL
$sel:key:CopyObject' :: CopyObject -> ObjectKey
$sel:copySource:CopyObject' :: CopyObject -> Text
$sel:bucket:CopyObject' :: CopyObject -> BucketName
$sel:websiteRedirectLocation:CopyObject' :: CopyObject -> Maybe Text
$sel:taggingDirective:CopyObject' :: CopyObject -> Maybe TaggingDirective
$sel:tagging:CopyObject' :: CopyObject -> Maybe Text
$sel:storageClass:CopyObject' :: CopyObject -> Maybe StorageClass
$sel:serverSideEncryption:CopyObject' :: CopyObject -> Maybe ServerSideEncryption
$sel:sSEKMSKeyId:CopyObject' :: CopyObject -> Maybe (Sensitive Text)
$sel:sSEKMSEncryptionContext:CopyObject' :: CopyObject -> Maybe (Sensitive Text)
$sel:sSECustomerKeyMD5:CopyObject' :: CopyObject -> Maybe Text
$sel:sSECustomerKey:CopyObject' :: CopyObject -> Maybe (Sensitive Text)
$sel:sSECustomerAlgorithm:CopyObject' :: CopyObject -> Maybe Text
$sel:requestPayer:CopyObject' :: CopyObject -> Maybe RequestPayer
$sel:objectLockRetainUntilDate:CopyObject' :: CopyObject -> Maybe ISO8601
$sel:objectLockMode:CopyObject' :: CopyObject -> Maybe ObjectLockMode
$sel:objectLockLegalHoldStatus:CopyObject' :: CopyObject -> Maybe ObjectLockLegalHoldStatus
$sel:metadataDirective:CopyObject' :: CopyObject -> Maybe MetadataDirective
$sel:metadata:CopyObject' :: CopyObject -> HashMap Text Text
$sel:grantWriteACP:CopyObject' :: CopyObject -> Maybe Text
$sel:grantReadACP:CopyObject' :: CopyObject -> Maybe Text
$sel:grantRead:CopyObject' :: CopyObject -> Maybe Text
$sel:grantFullControl:CopyObject' :: CopyObject -> Maybe Text
$sel:expires:CopyObject' :: CopyObject -> Maybe RFC822
$sel:expectedSourceBucketOwner:CopyObject' :: CopyObject -> Maybe Text
$sel:expectedBucketOwner:CopyObject' :: CopyObject -> Maybe Text
$sel:copySourceSSECustomerKeyMD5:CopyObject' :: CopyObject -> Maybe Text
$sel:copySourceSSECustomerKey:CopyObject' :: CopyObject -> Maybe (Sensitive Text)
$sel:copySourceSSECustomerAlgorithm:CopyObject' :: CopyObject -> Maybe Text
$sel:copySourceIfUnmodifiedSince:CopyObject' :: CopyObject -> Maybe RFC822
$sel:copySourceIfNoneMatch:CopyObject' :: CopyObject -> Maybe Text
$sel:copySourceIfModifiedSince:CopyObject' :: CopyObject -> Maybe RFC822
$sel:copySourceIfMatch:CopyObject' :: CopyObject -> Maybe Text
$sel:contentType:CopyObject' :: CopyObject -> Maybe Text
$sel:contentLanguage:CopyObject' :: CopyObject -> Maybe Text
$sel:contentEncoding:CopyObject' :: CopyObject -> Maybe Text
$sel:contentDisposition:CopyObject' :: CopyObject -> Maybe Text
$sel:checksumAlgorithm:CopyObject' :: CopyObject -> Maybe ChecksumAlgorithm
$sel:cacheControl:CopyObject' :: CopyObject -> Maybe Text
$sel:bucketKeyEnabled:CopyObject' :: CopyObject -> Maybe Bool
$sel:acl:CopyObject' :: CopyObject -> Maybe ObjectCannedACL
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ HeaderName
"x-amz-acl" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe ObjectCannedACL
acl,
        HeaderName
"x-amz-server-side-encryption-bucket-key-enabled"
          forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Bool
bucketKeyEnabled,
        HeaderName
"Cache-Control" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
cacheControl,
        HeaderName
"x-amz-checksum-algorithm" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe ChecksumAlgorithm
checksumAlgorithm,
        HeaderName
"Content-Disposition" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
contentDisposition,
        HeaderName
"Content-Encoding" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
contentEncoding,
        HeaderName
"Content-Language" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
contentLanguage,
        HeaderName
"Content-Type" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
contentType,
        HeaderName
"x-amz-copy-source-if-match"
          forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
copySourceIfMatch,
        HeaderName
"x-amz-copy-source-if-modified-since"
          forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe RFC822
copySourceIfModifiedSince,
        HeaderName
"x-amz-copy-source-if-none-match"
          forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
copySourceIfNoneMatch,
        HeaderName
"x-amz-copy-source-if-unmodified-since"
          forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe RFC822
copySourceIfUnmodifiedSince,
        HeaderName
"x-amz-copy-source-server-side-encryption-customer-algorithm"
          forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
copySourceSSECustomerAlgorithm,
        HeaderName
"x-amz-copy-source-server-side-encryption-customer-key"
          forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe (Sensitive Text)
copySourceSSECustomerKey,
        HeaderName
"x-amz-copy-source-server-side-encryption-customer-key-MD5"
          forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
copySourceSSECustomerKeyMD5,
        HeaderName
"x-amz-expected-bucket-owner"
          forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
expectedBucketOwner,
        HeaderName
"x-amz-source-expected-bucket-owner"
          forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
expectedSourceBucketOwner,
        HeaderName
"Expires" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe RFC822
expires,
        HeaderName
"x-amz-grant-full-control" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
grantFullControl,
        HeaderName
"x-amz-grant-read" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
grantRead,
        HeaderName
"x-amz-grant-read-acp" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
grantReadACP,
        HeaderName
"x-amz-grant-write-acp" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
grantWriteACP,
        HeaderName
"x-amz-meta-" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# HashMap Text Text
metadata,
        HeaderName
"x-amz-metadata-directive" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe MetadataDirective
metadataDirective,
        HeaderName
"x-amz-object-lock-legal-hold"
          forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus,
        HeaderName
"x-amz-object-lock-mode" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe ObjectLockMode
objectLockMode,
        HeaderName
"x-amz-object-lock-retain-until-date"
          forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe ISO8601
objectLockRetainUntilDate,
        HeaderName
"x-amz-request-payer" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe RequestPayer
requestPayer,
        HeaderName
"x-amz-server-side-encryption-customer-algorithm"
          forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
sSECustomerAlgorithm,
        HeaderName
"x-amz-server-side-encryption-customer-key"
          forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe (Sensitive Text)
sSECustomerKey,
        HeaderName
"x-amz-server-side-encryption-customer-key-MD5"
          forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
sSECustomerKeyMD5,
        HeaderName
"x-amz-server-side-encryption-context"
          forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe (Sensitive Text)
sSEKMSEncryptionContext,
        HeaderName
"x-amz-server-side-encryption-aws-kms-key-id"
          forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe (Sensitive Text)
sSEKMSKeyId,
        HeaderName
"x-amz-server-side-encryption"
          forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe ServerSideEncryption
serverSideEncryption,
        HeaderName
"x-amz-storage-class" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe StorageClass
storageClass,
        HeaderName
"x-amz-tagging" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
tagging,
        HeaderName
"x-amz-tagging-directive" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe TaggingDirective
taggingDirective,
        HeaderName
"x-amz-website-redirect-location"
          forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
websiteRedirectLocation,
        HeaderName
"x-amz-copy-source" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Text
copySource
      ]

instance Data.ToPath CopyObject where
  toPath :: CopyObject -> ByteString
toPath CopyObject' {Maybe Bool
Maybe Text
Maybe (Sensitive Text)
Maybe ISO8601
Maybe RFC822
Maybe ChecksumAlgorithm
Maybe MetadataDirective
Maybe ObjectCannedACL
Maybe ObjectLockLegalHoldStatus
Maybe ObjectLockMode
Maybe RequestPayer
Maybe ServerSideEncryption
Maybe StorageClass
Maybe TaggingDirective
Text
HashMap Text Text
ObjectKey
BucketName
key :: ObjectKey
copySource :: Text
bucket :: BucketName
websiteRedirectLocation :: Maybe Text
taggingDirective :: Maybe TaggingDirective
tagging :: Maybe Text
storageClass :: Maybe StorageClass
serverSideEncryption :: Maybe ServerSideEncryption
sSEKMSKeyId :: Maybe (Sensitive Text)
sSEKMSEncryptionContext :: Maybe (Sensitive Text)
sSECustomerKeyMD5 :: Maybe Text
sSECustomerKey :: Maybe (Sensitive Text)
sSECustomerAlgorithm :: Maybe Text
requestPayer :: Maybe RequestPayer
objectLockRetainUntilDate :: Maybe ISO8601
objectLockMode :: Maybe ObjectLockMode
objectLockLegalHoldStatus :: Maybe ObjectLockLegalHoldStatus
metadataDirective :: Maybe MetadataDirective
metadata :: HashMap Text Text
grantWriteACP :: Maybe Text
grantReadACP :: Maybe Text
grantRead :: Maybe Text
grantFullControl :: Maybe Text
expires :: Maybe RFC822
expectedSourceBucketOwner :: Maybe Text
expectedBucketOwner :: Maybe Text
copySourceSSECustomerKeyMD5 :: Maybe Text
copySourceSSECustomerKey :: Maybe (Sensitive Text)
copySourceSSECustomerAlgorithm :: Maybe Text
copySourceIfUnmodifiedSince :: Maybe RFC822
copySourceIfNoneMatch :: Maybe Text
copySourceIfModifiedSince :: Maybe RFC822
copySourceIfMatch :: Maybe Text
contentType :: Maybe Text
contentLanguage :: Maybe Text
contentEncoding :: Maybe Text
contentDisposition :: Maybe Text
checksumAlgorithm :: Maybe ChecksumAlgorithm
cacheControl :: Maybe Text
bucketKeyEnabled :: Maybe Bool
acl :: Maybe ObjectCannedACL
$sel:key:CopyObject' :: CopyObject -> ObjectKey
$sel:copySource:CopyObject' :: CopyObject -> Text
$sel:bucket:CopyObject' :: CopyObject -> BucketName
$sel:websiteRedirectLocation:CopyObject' :: CopyObject -> Maybe Text
$sel:taggingDirective:CopyObject' :: CopyObject -> Maybe TaggingDirective
$sel:tagging:CopyObject' :: CopyObject -> Maybe Text
$sel:storageClass:CopyObject' :: CopyObject -> Maybe StorageClass
$sel:serverSideEncryption:CopyObject' :: CopyObject -> Maybe ServerSideEncryption
$sel:sSEKMSKeyId:CopyObject' :: CopyObject -> Maybe (Sensitive Text)
$sel:sSEKMSEncryptionContext:CopyObject' :: CopyObject -> Maybe (Sensitive Text)
$sel:sSECustomerKeyMD5:CopyObject' :: CopyObject -> Maybe Text
$sel:sSECustomerKey:CopyObject' :: CopyObject -> Maybe (Sensitive Text)
$sel:sSECustomerAlgorithm:CopyObject' :: CopyObject -> Maybe Text
$sel:requestPayer:CopyObject' :: CopyObject -> Maybe RequestPayer
$sel:objectLockRetainUntilDate:CopyObject' :: CopyObject -> Maybe ISO8601
$sel:objectLockMode:CopyObject' :: CopyObject -> Maybe ObjectLockMode
$sel:objectLockLegalHoldStatus:CopyObject' :: CopyObject -> Maybe ObjectLockLegalHoldStatus
$sel:metadataDirective:CopyObject' :: CopyObject -> Maybe MetadataDirective
$sel:metadata:CopyObject' :: CopyObject -> HashMap Text Text
$sel:grantWriteACP:CopyObject' :: CopyObject -> Maybe Text
$sel:grantReadACP:CopyObject' :: CopyObject -> Maybe Text
$sel:grantRead:CopyObject' :: CopyObject -> Maybe Text
$sel:grantFullControl:CopyObject' :: CopyObject -> Maybe Text
$sel:expires:CopyObject' :: CopyObject -> Maybe RFC822
$sel:expectedSourceBucketOwner:CopyObject' :: CopyObject -> Maybe Text
$sel:expectedBucketOwner:CopyObject' :: CopyObject -> Maybe Text
$sel:copySourceSSECustomerKeyMD5:CopyObject' :: CopyObject -> Maybe Text
$sel:copySourceSSECustomerKey:CopyObject' :: CopyObject -> Maybe (Sensitive Text)
$sel:copySourceSSECustomerAlgorithm:CopyObject' :: CopyObject -> Maybe Text
$sel:copySourceIfUnmodifiedSince:CopyObject' :: CopyObject -> Maybe RFC822
$sel:copySourceIfNoneMatch:CopyObject' :: CopyObject -> Maybe Text
$sel:copySourceIfModifiedSince:CopyObject' :: CopyObject -> Maybe RFC822
$sel:copySourceIfMatch:CopyObject' :: CopyObject -> Maybe Text
$sel:contentType:CopyObject' :: CopyObject -> Maybe Text
$sel:contentLanguage:CopyObject' :: CopyObject -> Maybe Text
$sel:contentEncoding:CopyObject' :: CopyObject -> Maybe Text
$sel:contentDisposition:CopyObject' :: CopyObject -> Maybe Text
$sel:checksumAlgorithm:CopyObject' :: CopyObject -> Maybe ChecksumAlgorithm
$sel:cacheControl:CopyObject' :: CopyObject -> Maybe Text
$sel:bucketKeyEnabled:CopyObject' :: CopyObject -> Maybe Bool
$sel:acl:CopyObject' :: CopyObject -> Maybe ObjectCannedACL
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/", forall a. ToByteString a => a -> ByteString
Data.toBS BucketName
bucket, ByteString
"/", forall a. ToByteString a => a -> ByteString
Data.toBS ObjectKey
key]

instance Data.ToQuery CopyObject where
  toQuery :: CopyObject -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newCopyObjectResponse' smart constructor.
data CopyObjectResponse = CopyObjectResponse'
  { -- | Indicates whether the copied object uses an S3 Bucket Key for
    -- server-side encryption with Amazon Web Services KMS (SSE-KMS).
    CopyObjectResponse -> Maybe Bool
bucketKeyEnabled :: Prelude.Maybe Prelude.Bool,
    -- | Container for all response elements.
    CopyObjectResponse -> Maybe CopyObjectResult
copyObjectResult :: Prelude.Maybe CopyObjectResult,
    -- | Version of the copied object in the destination bucket.
    CopyObjectResponse -> Maybe Text
copySourceVersionId :: Prelude.Maybe Prelude.Text,
    -- | If the object expiration is configured, the response includes this
    -- header.
    CopyObjectResponse -> Maybe Text
expiration :: Prelude.Maybe Prelude.Text,
    CopyObjectResponse -> Maybe RequestCharged
requestCharged :: Prelude.Maybe RequestCharged,
    -- | If server-side encryption with a customer-provided encryption key was
    -- requested, the response will include this header confirming the
    -- encryption algorithm used.
    CopyObjectResponse -> Maybe Text
sSECustomerAlgorithm :: Prelude.Maybe Prelude.Text,
    -- | 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.
    CopyObjectResponse -> Maybe Text
sSECustomerKeyMD5 :: Prelude.Maybe 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.
    CopyObjectResponse -> Maybe (Sensitive Text)
sSEKMSEncryptionContext :: Prelude.Maybe (Data.Sensitive 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.
    CopyObjectResponse -> Maybe (Sensitive Text)
sSEKMSKeyId :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The server-side encryption algorithm used when storing this object in
    -- Amazon S3 (for example, AES256, aws:kms).
    CopyObjectResponse -> Maybe ServerSideEncryption
serverSideEncryption :: Prelude.Maybe ServerSideEncryption,
    -- | Version ID of the newly created copy.
    CopyObjectResponse -> Maybe ObjectVersionId
versionId :: Prelude.Maybe ObjectVersionId,
    -- | The response's http status code.
    CopyObjectResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CopyObjectResponse -> CopyObjectResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CopyObjectResponse -> CopyObjectResponse -> Bool
$c/= :: CopyObjectResponse -> CopyObjectResponse -> Bool
== :: CopyObjectResponse -> CopyObjectResponse -> Bool
$c== :: CopyObjectResponse -> CopyObjectResponse -> Bool
Prelude.Eq, Int -> CopyObjectResponse -> ShowS
[CopyObjectResponse] -> ShowS
CopyObjectResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CopyObjectResponse] -> ShowS
$cshowList :: [CopyObjectResponse] -> ShowS
show :: CopyObjectResponse -> String
$cshow :: CopyObjectResponse -> String
showsPrec :: Int -> CopyObjectResponse -> ShowS
$cshowsPrec :: Int -> CopyObjectResponse -> ShowS
Prelude.Show, forall x. Rep CopyObjectResponse x -> CopyObjectResponse
forall x. CopyObjectResponse -> Rep CopyObjectResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CopyObjectResponse x -> CopyObjectResponse
$cfrom :: forall x. CopyObjectResponse -> Rep CopyObjectResponse x
Prelude.Generic)

-- |
-- Create a value of 'CopyObjectResponse' 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:
--
-- 'bucketKeyEnabled', 'copyObjectResponse_bucketKeyEnabled' - Indicates whether the copied object uses an S3 Bucket Key for
-- server-side encryption with Amazon Web Services KMS (SSE-KMS).
--
-- 'copyObjectResult', 'copyObjectResponse_copyObjectResult' - Container for all response elements.
--
-- 'copySourceVersionId', 'copyObjectResponse_copySourceVersionId' - Version of the copied object in the destination bucket.
--
-- 'expiration', 'copyObjectResponse_expiration' - If the object expiration is configured, the response includes this
-- header.
--
-- 'requestCharged', 'copyObjectResponse_requestCharged' - Undocumented member.
--
-- 'sSECustomerAlgorithm', 'copyObjectResponse_sSECustomerAlgorithm' - If server-side encryption with a customer-provided encryption key was
-- requested, the response will include this header confirming the
-- encryption algorithm used.
--
-- 'sSECustomerKeyMD5', 'copyObjectResponse_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.
--
-- 'sSEKMSEncryptionContext', 'copyObjectResponse_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.
--
-- 'sSEKMSKeyId', 'copyObjectResponse_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.
--
-- 'serverSideEncryption', 'copyObjectResponse_serverSideEncryption' - The server-side encryption algorithm used when storing this object in
-- Amazon S3 (for example, AES256, aws:kms).
--
-- 'versionId', 'copyObjectResponse_versionId' - Version ID of the newly created copy.
--
-- 'httpStatus', 'copyObjectResponse_httpStatus' - The response's http status code.
newCopyObjectResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CopyObjectResponse
newCopyObjectResponse :: Int -> CopyObjectResponse
newCopyObjectResponse Int
pHttpStatus_ =
  CopyObjectResponse'
    { $sel:bucketKeyEnabled:CopyObjectResponse' :: Maybe Bool
bucketKeyEnabled =
        forall a. Maybe a
Prelude.Nothing,
      $sel:copyObjectResult:CopyObjectResponse' :: Maybe CopyObjectResult
copyObjectResult = forall a. Maybe a
Prelude.Nothing,
      $sel:copySourceVersionId:CopyObjectResponse' :: Maybe Text
copySourceVersionId = forall a. Maybe a
Prelude.Nothing,
      $sel:expiration:CopyObjectResponse' :: Maybe Text
expiration = forall a. Maybe a
Prelude.Nothing,
      $sel:requestCharged:CopyObjectResponse' :: Maybe RequestCharged
requestCharged = forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerAlgorithm:CopyObjectResponse' :: Maybe Text
sSECustomerAlgorithm = forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerKeyMD5:CopyObjectResponse' :: Maybe Text
sSECustomerKeyMD5 = forall a. Maybe a
Prelude.Nothing,
      $sel:sSEKMSEncryptionContext:CopyObjectResponse' :: Maybe (Sensitive Text)
sSEKMSEncryptionContext = forall a. Maybe a
Prelude.Nothing,
      $sel:sSEKMSKeyId:CopyObjectResponse' :: Maybe (Sensitive Text)
sSEKMSKeyId = forall a. Maybe a
Prelude.Nothing,
      $sel:serverSideEncryption:CopyObjectResponse' :: Maybe ServerSideEncryption
serverSideEncryption = forall a. Maybe a
Prelude.Nothing,
      $sel:versionId:CopyObjectResponse' :: Maybe ObjectVersionId
versionId = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CopyObjectResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | Container for all response elements.
copyObjectResponse_copyObjectResult :: Lens.Lens' CopyObjectResponse (Prelude.Maybe CopyObjectResult)
copyObjectResponse_copyObjectResult :: Lens' CopyObjectResponse (Maybe CopyObjectResult)
copyObjectResponse_copyObjectResult = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyObjectResponse' {Maybe CopyObjectResult
copyObjectResult :: Maybe CopyObjectResult
$sel:copyObjectResult:CopyObjectResponse' :: CopyObjectResponse -> Maybe CopyObjectResult
copyObjectResult} -> Maybe CopyObjectResult
copyObjectResult) (\s :: CopyObjectResponse
s@CopyObjectResponse' {} Maybe CopyObjectResult
a -> CopyObjectResponse
s {$sel:copyObjectResult:CopyObjectResponse' :: Maybe CopyObjectResult
copyObjectResult = Maybe CopyObjectResult
a} :: CopyObjectResponse)

-- | Version of the copied object in the destination bucket.
copyObjectResponse_copySourceVersionId :: Lens.Lens' CopyObjectResponse (Prelude.Maybe Prelude.Text)
copyObjectResponse_copySourceVersionId :: Lens' CopyObjectResponse (Maybe Text)
copyObjectResponse_copySourceVersionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyObjectResponse' {Maybe Text
copySourceVersionId :: Maybe Text
$sel:copySourceVersionId:CopyObjectResponse' :: CopyObjectResponse -> Maybe Text
copySourceVersionId} -> Maybe Text
copySourceVersionId) (\s :: CopyObjectResponse
s@CopyObjectResponse' {} Maybe Text
a -> CopyObjectResponse
s {$sel:copySourceVersionId:CopyObjectResponse' :: Maybe Text
copySourceVersionId = Maybe Text
a} :: CopyObjectResponse)

-- | If the object expiration is configured, the response includes this
-- header.
copyObjectResponse_expiration :: Lens.Lens' CopyObjectResponse (Prelude.Maybe Prelude.Text)
copyObjectResponse_expiration :: Lens' CopyObjectResponse (Maybe Text)
copyObjectResponse_expiration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyObjectResponse' {Maybe Text
expiration :: Maybe Text
$sel:expiration:CopyObjectResponse' :: CopyObjectResponse -> Maybe Text
expiration} -> Maybe Text
expiration) (\s :: CopyObjectResponse
s@CopyObjectResponse' {} Maybe Text
a -> CopyObjectResponse
s {$sel:expiration:CopyObjectResponse' :: Maybe Text
expiration = Maybe Text
a} :: CopyObjectResponse)

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

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

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

-- | 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.
copyObjectResponse_sSEKMSEncryptionContext :: Lens.Lens' CopyObjectResponse (Prelude.Maybe Prelude.Text)
copyObjectResponse_sSEKMSEncryptionContext :: Lens' CopyObjectResponse (Maybe Text)
copyObjectResponse_sSEKMSEncryptionContext = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyObjectResponse' {Maybe (Sensitive Text)
sSEKMSEncryptionContext :: Maybe (Sensitive Text)
$sel:sSEKMSEncryptionContext:CopyObjectResponse' :: CopyObjectResponse -> Maybe (Sensitive Text)
sSEKMSEncryptionContext} -> Maybe (Sensitive Text)
sSEKMSEncryptionContext) (\s :: CopyObjectResponse
s@CopyObjectResponse' {} Maybe (Sensitive Text)
a -> CopyObjectResponse
s {$sel:sSEKMSEncryptionContext:CopyObjectResponse' :: Maybe (Sensitive Text)
sSEKMSEncryptionContext = Maybe (Sensitive Text)
a} :: CopyObjectResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall a. Iso' (Sensitive a) a
Data._Sensitive

-- | 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.
copyObjectResponse_sSEKMSKeyId :: Lens.Lens' CopyObjectResponse (Prelude.Maybe Prelude.Text)
copyObjectResponse_sSEKMSKeyId :: Lens' CopyObjectResponse (Maybe Text)
copyObjectResponse_sSEKMSKeyId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyObjectResponse' {Maybe (Sensitive Text)
sSEKMSKeyId :: Maybe (Sensitive Text)
$sel:sSEKMSKeyId:CopyObjectResponse' :: CopyObjectResponse -> Maybe (Sensitive Text)
sSEKMSKeyId} -> Maybe (Sensitive Text)
sSEKMSKeyId) (\s :: CopyObjectResponse
s@CopyObjectResponse' {} Maybe (Sensitive Text)
a -> CopyObjectResponse
s {$sel:sSEKMSKeyId:CopyObjectResponse' :: Maybe (Sensitive Text)
sSEKMSKeyId = Maybe (Sensitive Text)
a} :: CopyObjectResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall a. Iso' (Sensitive a) a
Data._Sensitive

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

-- | Version ID of the newly created copy.
copyObjectResponse_versionId :: Lens.Lens' CopyObjectResponse (Prelude.Maybe ObjectVersionId)
copyObjectResponse_versionId :: Lens' CopyObjectResponse (Maybe ObjectVersionId)
copyObjectResponse_versionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyObjectResponse' {Maybe ObjectVersionId
versionId :: Maybe ObjectVersionId
$sel:versionId:CopyObjectResponse' :: CopyObjectResponse -> Maybe ObjectVersionId
versionId} -> Maybe ObjectVersionId
versionId) (\s :: CopyObjectResponse
s@CopyObjectResponse' {} Maybe ObjectVersionId
a -> CopyObjectResponse
s {$sel:versionId:CopyObjectResponse' :: Maybe ObjectVersionId
versionId = Maybe ObjectVersionId
a} :: CopyObjectResponse)

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

instance Prelude.NFData CopyObjectResponse where
  rnf :: CopyObjectResponse -> ()
rnf CopyObjectResponse' {Int
Maybe Bool
Maybe Text
Maybe (Sensitive Text)
Maybe ObjectVersionId
Maybe CopyObjectResult
Maybe RequestCharged
Maybe ServerSideEncryption
httpStatus :: Int
versionId :: Maybe ObjectVersionId
serverSideEncryption :: Maybe ServerSideEncryption
sSEKMSKeyId :: Maybe (Sensitive Text)
sSEKMSEncryptionContext :: Maybe (Sensitive Text)
sSECustomerKeyMD5 :: Maybe Text
sSECustomerAlgorithm :: Maybe Text
requestCharged :: Maybe RequestCharged
expiration :: Maybe Text
copySourceVersionId :: Maybe Text
copyObjectResult :: Maybe CopyObjectResult
bucketKeyEnabled :: Maybe Bool
$sel:httpStatus:CopyObjectResponse' :: CopyObjectResponse -> Int
$sel:versionId:CopyObjectResponse' :: CopyObjectResponse -> Maybe ObjectVersionId
$sel:serverSideEncryption:CopyObjectResponse' :: CopyObjectResponse -> Maybe ServerSideEncryption
$sel:sSEKMSKeyId:CopyObjectResponse' :: CopyObjectResponse -> Maybe (Sensitive Text)
$sel:sSEKMSEncryptionContext:CopyObjectResponse' :: CopyObjectResponse -> Maybe (Sensitive Text)
$sel:sSECustomerKeyMD5:CopyObjectResponse' :: CopyObjectResponse -> Maybe Text
$sel:sSECustomerAlgorithm:CopyObjectResponse' :: CopyObjectResponse -> Maybe Text
$sel:requestCharged:CopyObjectResponse' :: CopyObjectResponse -> Maybe RequestCharged
$sel:expiration:CopyObjectResponse' :: CopyObjectResponse -> Maybe Text
$sel:copySourceVersionId:CopyObjectResponse' :: CopyObjectResponse -> Maybe Text
$sel:copyObjectResult:CopyObjectResponse' :: CopyObjectResponse -> Maybe CopyObjectResult
$sel:bucketKeyEnabled:CopyObjectResponse' :: CopyObjectResponse -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
bucketKeyEnabled
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CopyObjectResult
copyObjectResult
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
copySourceVersionId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
expiration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RequestCharged
requestCharged
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sSECustomerAlgorithm
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sSECustomerKeyMD5
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
sSEKMSEncryptionContext
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
sSEKMSKeyId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ServerSideEncryption
serverSideEncryption
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ObjectVersionId
versionId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus