{-# 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.PutObject
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Adds an object to a bucket. You must have WRITE permissions on a bucket
-- to add an object to it.
--
-- Amazon S3 never adds partial objects; if you receive a success response,
-- Amazon S3 added the entire object to the bucket.
--
-- Amazon S3 is a distributed system. If it receives multiple write
-- requests for the same object simultaneously, it overwrites all but the
-- last object written. Amazon S3 does not provide object locking; if you
-- need this, make sure to build it into your application layer or use
-- versioning instead.
--
-- To ensure that data is not corrupted traversing the network, use the
-- @Content-MD5@ header. When you use this header, Amazon S3 checks the
-- object against the provided MD5 value and, if they do not match, returns
-- an error. Additionally, you can calculate the MD5 while putting an
-- object to Amazon S3 and compare the returned ETag to the calculated MD5
-- value.
--
-- -   To successfully complete the @PutObject@ request, you must have the
--     @s3:PutObject@ in your IAM permissions.
--
-- -   To successfully change the objects acl of your @PutObject@ request,
--     you must have the @s3:PutObjectAcl@ in your IAM permissions.
--
-- -   The @Content-MD5@ header is required for any request to upload an
--     object with a retention period configured using Amazon S3 Object
--     Lock. For more information about Amazon S3 Object Lock, see
--     <https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html Amazon S3 Object Lock Overview>
--     in the /Amazon S3 User Guide/.
--
-- __Server-side Encryption__
--
-- You can optionally request server-side encryption. 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. You have the
-- option to provide your own encryption key or use Amazon Web Services
-- managed encryption keys (SSE-S3 or SSE-KMS). For more information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html Using Server-Side Encryption>.
--
-- If you request server-side encryption using Amazon Web Services Key
-- Management Service (SSE-KMS), you can enable an S3 Bucket Key at the
-- object-level. 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__
--
-- You can 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 uploading 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. PUT
-- requests that contain other ACLs (for example, custom grants to certain
-- Amazon Web Services accounts) fail and return a @400@ error with the
-- error code @AccessControlListNotSupported@.
--
-- 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.
--
-- __Storage Class Options__
--
-- 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/.
--
-- __Versioning__
--
-- If you enable versioning for a bucket, Amazon S3 automatically generates
-- a unique version ID for the object being stored. Amazon S3 returns this
-- ID in the response. When you enable versioning for a bucket, if Amazon
-- S3 receives multiple write requests for the same object simultaneously,
-- it stores all of the objects.
--
-- For more information about versioning, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/AddingObjectstoVersioningEnabledBuckets.html Adding Objects to Versioning Enabled Buckets>.
-- For information about returning the versioning state of a bucket, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html GetBucketVersioning>.
--
-- __Related Resources__
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html CopyObject>
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html DeleteObject>
module Amazonka.S3.PutObject
  ( -- * Creating a Request
    PutObject (..),
    newPutObject,

    -- * Request Lenses
    putObject_acl,
    putObject_bucketKeyEnabled,
    putObject_cacheControl,
    putObject_checksumAlgorithm,
    putObject_checksumCRC32,
    putObject_checksumCRC32C,
    putObject_checksumSHA1,
    putObject_checksumSHA256,
    putObject_contentDisposition,
    putObject_contentEncoding,
    putObject_contentLanguage,
    putObject_contentLength,
    putObject_contentMD5,
    putObject_contentType,
    putObject_expectedBucketOwner,
    putObject_expires,
    putObject_grantFullControl,
    putObject_grantRead,
    putObject_grantReadACP,
    putObject_grantWriteACP,
    putObject_metadata,
    putObject_objectLockLegalHoldStatus,
    putObject_objectLockMode,
    putObject_objectLockRetainUntilDate,
    putObject_requestPayer,
    putObject_sSECustomerAlgorithm,
    putObject_sSECustomerKey,
    putObject_sSECustomerKeyMD5,
    putObject_sSEKMSEncryptionContext,
    putObject_sSEKMSKeyId,
    putObject_serverSideEncryption,
    putObject_storageClass,
    putObject_tagging,
    putObject_websiteRedirectLocation,
    putObject_bucket,
    putObject_key,
    putObject_body,

    -- * Destructuring the Response
    PutObjectResponse (..),
    newPutObjectResponse,

    -- * Response Lenses
    putObjectResponse_bucketKeyEnabled,
    putObjectResponse_checksumCRC32,
    putObjectResponse_checksumCRC32C,
    putObjectResponse_checksumSHA1,
    putObjectResponse_checksumSHA256,
    putObjectResponse_eTag,
    putObjectResponse_expiration,
    putObjectResponse_requestCharged,
    putObjectResponse_sSECustomerAlgorithm,
    putObjectResponse_sSECustomerKeyMD5,
    putObjectResponse_sSEKMSEncryptionContext,
    putObjectResponse_sSEKMSKeyId,
    putObjectResponse_serverSideEncryption,
    putObjectResponse_versionId,
    putObjectResponse_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:/ 'newPutObject' smart constructor.
data PutObject = PutObject'
  { -- | The canned ACL to apply to the object. For more information, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL Canned ACL>.
    --
    -- This action is not supported by Amazon S3 on Outposts.
    PutObject -> 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 PUT action doesn’t affect bucket-level
    -- settings for S3 Bucket Key.
    PutObject -> Maybe Bool
bucketKeyEnabled :: Prelude.Maybe Prelude.Bool,
    -- | Can be used to specify caching behavior along the request\/reply chain.
    -- For more information, see
    -- <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9>.
    PutObject -> Maybe Text
cacheControl :: Prelude.Maybe Prelude.Text,
    -- | Indicates the algorithm used to create the checksum for the object when
    -- using the SDK. This header will not provide any additional functionality
    -- if not using the SDK. When sending this header, there must be a
    -- corresponding @x-amz-checksum@ or @x-amz-trailer@ header sent.
    -- Otherwise, Amazon S3 fails the request with the HTTP status code
    -- @400 Bad Request@. 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/.
    --
    -- If you provide an individual checksum, Amazon S3 ignores any provided
    -- @ChecksumAlgorithm@ parameter.
    PutObject -> Maybe ChecksumAlgorithm
checksumAlgorithm :: Prelude.Maybe ChecksumAlgorithm,
    -- | This header can be used as a data integrity check to verify that the
    -- data received is the same data that was originally sent. This header
    -- specifies the base64-encoded, 32-bit CRC32 checksum of 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/.
    PutObject -> Maybe Text
checksumCRC32 :: Prelude.Maybe Prelude.Text,
    -- | This header can be used as a data integrity check to verify that the
    -- data received is the same data that was originally sent. This header
    -- specifies the base64-encoded, 32-bit CRC32C checksum of 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/.
    PutObject -> Maybe Text
checksumCRC32C :: Prelude.Maybe Prelude.Text,
    -- | This header can be used as a data integrity check to verify that the
    -- data received is the same data that was originally sent. This header
    -- specifies the base64-encoded, 160-bit SHA-1 digest of 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/.
    PutObject -> Maybe Text
checksumSHA1 :: Prelude.Maybe Prelude.Text,
    -- | This header can be used as a data integrity check to verify that the
    -- data received is the same data that was originally sent. This header
    -- specifies the base64-encoded, 256-bit SHA-256 digest of 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/.
    PutObject -> Maybe Text
checksumSHA256 :: Prelude.Maybe Prelude.Text,
    -- | Specifies presentational information for the object. For more
    -- information, see
    -- <http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1>.
    PutObject -> 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. For more information, see
    -- <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11>.
    PutObject -> Maybe Text
contentEncoding :: Prelude.Maybe Prelude.Text,
    -- | The language the content is in.
    PutObject -> Maybe Text
contentLanguage :: Prelude.Maybe Prelude.Text,
    -- | Size of the body in bytes. This parameter is useful when the size of the
    -- body cannot be determined automatically. For more information, see
    -- <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13>.
    PutObject -> Maybe Integer
contentLength :: Prelude.Maybe Prelude.Integer,
    -- | The base64-encoded 128-bit MD5 digest of the message (without the
    -- headers) according to RFC 1864. This header can be used as a message
    -- integrity check to verify that the data is the same data that was
    -- originally sent. Although it is optional, we recommend using the
    -- Content-MD5 mechanism as an end-to-end integrity check. For more
    -- information about REST request authentication, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html REST Authentication>.
    PutObject -> Maybe Text
contentMD5 :: Prelude.Maybe Prelude.Text,
    -- | A standard MIME type describing the format of the contents. For more
    -- information, see
    -- <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17>.
    PutObject -> Maybe Text
contentType :: Prelude.Maybe Prelude.Text,
    -- | The account ID of the expected bucket owner. If the bucket is owned by a
    -- different account, the request fails with the HTTP status code
    -- @403 Forbidden@ (access denied).
    PutObject -> Maybe Text
expectedBucketOwner :: Prelude.Maybe Prelude.Text,
    -- | The date and time at which the object is no longer cacheable. For more
    -- information, see
    -- <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21>.
    PutObject -> 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.
    PutObject -> 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.
    PutObject -> Maybe Text
grantRead :: Prelude.Maybe Prelude.Text,
    -- | Allows grantee to read the object ACL.
    --
    -- This action is not supported by Amazon S3 on Outposts.
    PutObject -> 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.
    PutObject -> Maybe Text
grantWriteACP :: Prelude.Maybe Prelude.Text,
    -- | A map of metadata to store with the object in S3.
    PutObject -> HashMap Text Text
metadata :: Prelude.HashMap Prelude.Text Prelude.Text,
    -- | Specifies whether a legal hold will be applied to this object. For more
    -- information about S3 Object Lock, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html Object Lock>.
    PutObject -> Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus :: Prelude.Maybe ObjectLockLegalHoldStatus,
    -- | The Object Lock mode that you want to apply to this object.
    PutObject -> Maybe ObjectLockMode
objectLockMode :: Prelude.Maybe ObjectLockMode,
    -- | The date and time when you want this object\'s Object Lock to expire.
    -- Must be formatted as a timestamp parameter.
    PutObject -> Maybe ISO8601
objectLockRetainUntilDate :: Prelude.Maybe Data.ISO8601,
    PutObject -> Maybe RequestPayer
requestPayer :: Prelude.Maybe RequestPayer,
    -- | Specifies the algorithm to use to when encrypting the object (for
    -- example, AES256).
    PutObject -> 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.
    PutObject -> 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.
    PutObject -> 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.
    PutObject -> Maybe (Sensitive Text)
sSEKMSEncryptionContext :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | If @x-amz-server-side-encryption@ is present and has the value of
    -- @aws:kms@, this header specifies the ID of the Amazon Web Services Key
    -- Management Service (Amazon Web Services KMS) symmetrical customer
    -- managed key that was used for the object. If you specify
    -- @x-amz-server-side-encryption:aws:kms@, but do not
    -- provide@ x-amz-server-side-encryption-aws-kms-key-id@, Amazon S3 uses
    -- the Amazon Web Services managed key to protect the data. If the KMS key
    -- does not exist in the same account issuing the command, you must use the
    -- full ARN and not just the ID.
    PutObject -> 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).
    PutObject -> 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/.
    PutObject -> Maybe StorageClass
storageClass :: Prelude.Maybe StorageClass,
    -- | The tag-set for the object. The tag-set must be encoded as URL Query
    -- parameters. (For example, \"Key1=Value1\")
    PutObject -> Maybe Text
tagging :: Prelude.Maybe Prelude.Text,
    -- | 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. For
    -- information about object metadata, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html Object Key and Metadata>.
    --
    -- In the following example, the request header sets the redirect to an
    -- object (anotherPage.html) in the same bucket:
    --
    -- @x-amz-website-redirect-location: \/anotherPage.html@
    --
    -- In the following example, the request header sets the object redirect to
    -- another website:
    --
    -- @x-amz-website-redirect-location: http:\/\/www.example.com\/@
    --
    -- For more information about website hosting in Amazon S3, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html Hosting Websites on Amazon S3>
    -- and
    -- <https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html How to Configure Website Page Redirects>.
    PutObject -> Maybe Text
websiteRedirectLocation :: Prelude.Maybe Prelude.Text,
    -- | The bucket name to which the PUT action was initiated.
    --
    -- 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/.
    PutObject -> BucketName
bucket :: BucketName,
    -- | Object key for which the PUT action was initiated.
    PutObject -> ObjectKey
key :: ObjectKey,
    -- | Object data.
    PutObject -> RequestBody
body :: Data.RequestBody
  }
  deriving (Int -> PutObject -> ShowS
[PutObject] -> ShowS
PutObject -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutObject] -> ShowS
$cshowList :: [PutObject] -> ShowS
show :: PutObject -> String
$cshow :: PutObject -> String
showsPrec :: Int -> PutObject -> ShowS
$cshowsPrec :: Int -> PutObject -> ShowS
Prelude.Show, forall x. Rep PutObject x -> PutObject
forall x. PutObject -> Rep PutObject x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutObject x -> PutObject
$cfrom :: forall x. PutObject -> Rep PutObject x
Prelude.Generic)

-- |
-- Create a value of 'PutObject' 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', 'putObject_acl' - The canned ACL to apply to the object. For more information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL Canned ACL>.
--
-- This action is not supported by Amazon S3 on Outposts.
--
-- 'bucketKeyEnabled', 'putObject_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 PUT action doesn’t affect bucket-level
-- settings for S3 Bucket Key.
--
-- 'cacheControl', 'putObject_cacheControl' - Can be used to specify caching behavior along the request\/reply chain.
-- For more information, see
-- <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9>.
--
-- 'checksumAlgorithm', 'putObject_checksumAlgorithm' - Indicates the algorithm used to create the checksum for the object when
-- using the SDK. This header will not provide any additional functionality
-- if not using the SDK. When sending this header, there must be a
-- corresponding @x-amz-checksum@ or @x-amz-trailer@ header sent.
-- Otherwise, Amazon S3 fails the request with the HTTP status code
-- @400 Bad Request@. 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/.
--
-- If you provide an individual checksum, Amazon S3 ignores any provided
-- @ChecksumAlgorithm@ parameter.
--
-- 'checksumCRC32', 'putObject_checksumCRC32' - This header can be used as a data integrity check to verify that the
-- data received is the same data that was originally sent. This header
-- specifies the base64-encoded, 32-bit CRC32 checksum of 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/.
--
-- 'checksumCRC32C', 'putObject_checksumCRC32C' - This header can be used as a data integrity check to verify that the
-- data received is the same data that was originally sent. This header
-- specifies the base64-encoded, 32-bit CRC32C checksum of 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/.
--
-- 'checksumSHA1', 'putObject_checksumSHA1' - This header can be used as a data integrity check to verify that the
-- data received is the same data that was originally sent. This header
-- specifies the base64-encoded, 160-bit SHA-1 digest of 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/.
--
-- 'checksumSHA256', 'putObject_checksumSHA256' - This header can be used as a data integrity check to verify that the
-- data received is the same data that was originally sent. This header
-- specifies the base64-encoded, 256-bit SHA-256 digest of 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', 'putObject_contentDisposition' - Specifies presentational information for the object. For more
-- information, see
-- <http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1>.
--
-- 'contentEncoding', 'putObject_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. For more information, see
-- <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11>.
--
-- 'contentLanguage', 'putObject_contentLanguage' - The language the content is in.
--
-- 'contentLength', 'putObject_contentLength' - Size of the body in bytes. This parameter is useful when the size of the
-- body cannot be determined automatically. For more information, see
-- <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13>.
--
-- 'contentMD5', 'putObject_contentMD5' - The base64-encoded 128-bit MD5 digest of the message (without the
-- headers) according to RFC 1864. This header can be used as a message
-- integrity check to verify that the data is the same data that was
-- originally sent. Although it is optional, we recommend using the
-- Content-MD5 mechanism as an end-to-end integrity check. For more
-- information about REST request authentication, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html REST Authentication>.
--
-- 'contentType', 'putObject_contentType' - A standard MIME type describing the format of the contents. For more
-- information, see
-- <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17>.
--
-- 'expectedBucketOwner', 'putObject_expectedBucketOwner' - The account ID of the expected bucket owner. If the bucket is owned by a
-- different account, the request fails with the HTTP status code
-- @403 Forbidden@ (access denied).
--
-- 'expires', 'putObject_expires' - The date and time at which the object is no longer cacheable. For more
-- information, see
-- <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21>.
--
-- 'grantFullControl', 'putObject_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', 'putObject_grantRead' - Allows grantee to read the object data and its metadata.
--
-- This action is not supported by Amazon S3 on Outposts.
--
-- 'grantReadACP', 'putObject_grantReadACP' - Allows grantee to read the object ACL.
--
-- This action is not supported by Amazon S3 on Outposts.
--
-- 'grantWriteACP', 'putObject_grantWriteACP' - Allows grantee to write the ACL for the applicable object.
--
-- This action is not supported by Amazon S3 on Outposts.
--
-- 'metadata', 'putObject_metadata' - A map of metadata to store with the object in S3.
--
-- 'objectLockLegalHoldStatus', 'putObject_objectLockLegalHoldStatus' - Specifies whether a legal hold will be applied to this object. For more
-- information about S3 Object Lock, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html Object Lock>.
--
-- 'objectLockMode', 'putObject_objectLockMode' - The Object Lock mode that you want to apply to this object.
--
-- 'objectLockRetainUntilDate', 'putObject_objectLockRetainUntilDate' - The date and time when you want this object\'s Object Lock to expire.
-- Must be formatted as a timestamp parameter.
--
-- 'requestPayer', 'putObject_requestPayer' - Undocumented member.
--
-- 'sSECustomerAlgorithm', 'putObject_sSECustomerAlgorithm' - Specifies the algorithm to use to when encrypting the object (for
-- example, AES256).
--
-- 'sSECustomerKey', 'putObject_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', 'putObject_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', 'putObject_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', 'putObject_sSEKMSKeyId' - If @x-amz-server-side-encryption@ is present and has the value of
-- @aws:kms@, this header specifies the ID of the Amazon Web Services Key
-- Management Service (Amazon Web Services KMS) symmetrical customer
-- managed key that was used for the object. If you specify
-- @x-amz-server-side-encryption:aws:kms@, but do not
-- provide@ x-amz-server-side-encryption-aws-kms-key-id@, Amazon S3 uses
-- the Amazon Web Services managed key to protect the data. If the KMS key
-- does not exist in the same account issuing the command, you must use the
-- full ARN and not just the ID.
--
-- 'serverSideEncryption', 'putObject_serverSideEncryption' - The server-side encryption algorithm used when storing this object in
-- Amazon S3 (for example, AES256, aws:kms).
--
-- 'storageClass', 'putObject_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', 'putObject_tagging' - The tag-set for the object. The tag-set must be encoded as URL Query
-- parameters. (For example, \"Key1=Value1\")
--
-- 'websiteRedirectLocation', 'putObject_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. For
-- information about object metadata, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html Object Key and Metadata>.
--
-- In the following example, the request header sets the redirect to an
-- object (anotherPage.html) in the same bucket:
--
-- @x-amz-website-redirect-location: \/anotherPage.html@
--
-- In the following example, the request header sets the object redirect to
-- another website:
--
-- @x-amz-website-redirect-location: http:\/\/www.example.com\/@
--
-- For more information about website hosting in Amazon S3, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html Hosting Websites on Amazon S3>
-- and
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html How to Configure Website Page Redirects>.
--
-- 'bucket', 'putObject_bucket' - The bucket name to which the PUT action was initiated.
--
-- 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/.
--
-- 'key', 'putObject_key' - Object key for which the PUT action was initiated.
--
-- 'body', 'putObject_body' - Object data.
newPutObject ::
  -- | 'bucket'
  BucketName ->
  -- | 'key'
  ObjectKey ->
  -- | 'body'
  Data.RequestBody ->
  PutObject
newPutObject :: BucketName -> ObjectKey -> RequestBody -> PutObject
newPutObject BucketName
pBucket_ ObjectKey
pKey_ RequestBody
pBody_ =
  PutObject'
    { $sel:acl:PutObject' :: Maybe ObjectCannedACL
acl = forall a. Maybe a
Prelude.Nothing,
      $sel:bucketKeyEnabled:PutObject' :: Maybe Bool
bucketKeyEnabled = forall a. Maybe a
Prelude.Nothing,
      $sel:cacheControl:PutObject' :: Maybe Text
cacheControl = forall a. Maybe a
Prelude.Nothing,
      $sel:checksumAlgorithm:PutObject' :: Maybe ChecksumAlgorithm
checksumAlgorithm = forall a. Maybe a
Prelude.Nothing,
      $sel:checksumCRC32:PutObject' :: Maybe Text
checksumCRC32 = forall a. Maybe a
Prelude.Nothing,
      $sel:checksumCRC32C:PutObject' :: Maybe Text
checksumCRC32C = forall a. Maybe a
Prelude.Nothing,
      $sel:checksumSHA1:PutObject' :: Maybe Text
checksumSHA1 = forall a. Maybe a
Prelude.Nothing,
      $sel:checksumSHA256:PutObject' :: Maybe Text
checksumSHA256 = forall a. Maybe a
Prelude.Nothing,
      $sel:contentDisposition:PutObject' :: Maybe Text
contentDisposition = forall a. Maybe a
Prelude.Nothing,
      $sel:contentEncoding:PutObject' :: Maybe Text
contentEncoding = forall a. Maybe a
Prelude.Nothing,
      $sel:contentLanguage:PutObject' :: Maybe Text
contentLanguage = forall a. Maybe a
Prelude.Nothing,
      $sel:contentLength:PutObject' :: Maybe Integer
contentLength = forall a. Maybe a
Prelude.Nothing,
      $sel:contentMD5:PutObject' :: Maybe Text
contentMD5 = forall a. Maybe a
Prelude.Nothing,
      $sel:contentType:PutObject' :: Maybe Text
contentType = forall a. Maybe a
Prelude.Nothing,
      $sel:expectedBucketOwner:PutObject' :: Maybe Text
expectedBucketOwner = forall a. Maybe a
Prelude.Nothing,
      $sel:expires:PutObject' :: Maybe RFC822
expires = forall a. Maybe a
Prelude.Nothing,
      $sel:grantFullControl:PutObject' :: Maybe Text
grantFullControl = forall a. Maybe a
Prelude.Nothing,
      $sel:grantRead:PutObject' :: Maybe Text
grantRead = forall a. Maybe a
Prelude.Nothing,
      $sel:grantReadACP:PutObject' :: Maybe Text
grantReadACP = forall a. Maybe a
Prelude.Nothing,
      $sel:grantWriteACP:PutObject' :: Maybe Text
grantWriteACP = forall a. Maybe a
Prelude.Nothing,
      $sel:metadata:PutObject' :: HashMap Text Text
metadata = forall a. Monoid a => a
Prelude.mempty,
      $sel:objectLockLegalHoldStatus:PutObject' :: Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:objectLockMode:PutObject' :: Maybe ObjectLockMode
objectLockMode = forall a. Maybe a
Prelude.Nothing,
      $sel:objectLockRetainUntilDate:PutObject' :: Maybe ISO8601
objectLockRetainUntilDate = forall a. Maybe a
Prelude.Nothing,
      $sel:requestPayer:PutObject' :: Maybe RequestPayer
requestPayer = forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerAlgorithm:PutObject' :: Maybe Text
sSECustomerAlgorithm = forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerKey:PutObject' :: Maybe (Sensitive Text)
sSECustomerKey = forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerKeyMD5:PutObject' :: Maybe Text
sSECustomerKeyMD5 = forall a. Maybe a
Prelude.Nothing,
      $sel:sSEKMSEncryptionContext:PutObject' :: Maybe (Sensitive Text)
sSEKMSEncryptionContext = forall a. Maybe a
Prelude.Nothing,
      $sel:sSEKMSKeyId:PutObject' :: Maybe (Sensitive Text)
sSEKMSKeyId = forall a. Maybe a
Prelude.Nothing,
      $sel:serverSideEncryption:PutObject' :: Maybe ServerSideEncryption
serverSideEncryption = forall a. Maybe a
Prelude.Nothing,
      $sel:storageClass:PutObject' :: Maybe StorageClass
storageClass = forall a. Maybe a
Prelude.Nothing,
      $sel:tagging:PutObject' :: Maybe Text
tagging = forall a. Maybe a
Prelude.Nothing,
      $sel:websiteRedirectLocation:PutObject' :: Maybe Text
websiteRedirectLocation = forall a. Maybe a
Prelude.Nothing,
      $sel:bucket:PutObject' :: BucketName
bucket = BucketName
pBucket_,
      $sel:key:PutObject' :: ObjectKey
key = ObjectKey
pKey_,
      $sel:body:PutObject' :: RequestBody
body = RequestBody
pBody_
    }

-- | The canned ACL to apply to the object. For more information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL Canned ACL>.
--
-- This action is not supported by Amazon S3 on Outposts.
putObject_acl :: Lens.Lens' PutObject (Prelude.Maybe ObjectCannedACL)
putObject_acl :: Lens' PutObject (Maybe ObjectCannedACL)
putObject_acl = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObject' {Maybe ObjectCannedACL
acl :: Maybe ObjectCannedACL
$sel:acl:PutObject' :: PutObject -> Maybe ObjectCannedACL
acl} -> Maybe ObjectCannedACL
acl) (\s :: PutObject
s@PutObject' {} Maybe ObjectCannedACL
a -> PutObject
s {$sel:acl:PutObject' :: Maybe ObjectCannedACL
acl = Maybe ObjectCannedACL
a} :: PutObject)

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

-- | Can be used to specify caching behavior along the request\/reply chain.
-- For more information, see
-- <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9>.
putObject_cacheControl :: Lens.Lens' PutObject (Prelude.Maybe Prelude.Text)
putObject_cacheControl :: Lens' PutObject (Maybe Text)
putObject_cacheControl = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObject' {Maybe Text
cacheControl :: Maybe Text
$sel:cacheControl:PutObject' :: PutObject -> Maybe Text
cacheControl} -> Maybe Text
cacheControl) (\s :: PutObject
s@PutObject' {} Maybe Text
a -> PutObject
s {$sel:cacheControl:PutObject' :: Maybe Text
cacheControl = Maybe Text
a} :: PutObject)

-- | Indicates the algorithm used to create the checksum for the object when
-- using the SDK. This header will not provide any additional functionality
-- if not using the SDK. When sending this header, there must be a
-- corresponding @x-amz-checksum@ or @x-amz-trailer@ header sent.
-- Otherwise, Amazon S3 fails the request with the HTTP status code
-- @400 Bad Request@. 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/.
--
-- If you provide an individual checksum, Amazon S3 ignores any provided
-- @ChecksumAlgorithm@ parameter.
putObject_checksumAlgorithm :: Lens.Lens' PutObject (Prelude.Maybe ChecksumAlgorithm)
putObject_checksumAlgorithm :: Lens' PutObject (Maybe ChecksumAlgorithm)
putObject_checksumAlgorithm = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObject' {Maybe ChecksumAlgorithm
checksumAlgorithm :: Maybe ChecksumAlgorithm
$sel:checksumAlgorithm:PutObject' :: PutObject -> Maybe ChecksumAlgorithm
checksumAlgorithm} -> Maybe ChecksumAlgorithm
checksumAlgorithm) (\s :: PutObject
s@PutObject' {} Maybe ChecksumAlgorithm
a -> PutObject
s {$sel:checksumAlgorithm:PutObject' :: Maybe ChecksumAlgorithm
checksumAlgorithm = Maybe ChecksumAlgorithm
a} :: PutObject)

-- | This header can be used as a data integrity check to verify that the
-- data received is the same data that was originally sent. This header
-- specifies the base64-encoded, 32-bit CRC32 checksum of 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/.
putObject_checksumCRC32 :: Lens.Lens' PutObject (Prelude.Maybe Prelude.Text)
putObject_checksumCRC32 :: Lens' PutObject (Maybe Text)
putObject_checksumCRC32 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObject' {Maybe Text
checksumCRC32 :: Maybe Text
$sel:checksumCRC32:PutObject' :: PutObject -> Maybe Text
checksumCRC32} -> Maybe Text
checksumCRC32) (\s :: PutObject
s@PutObject' {} Maybe Text
a -> PutObject
s {$sel:checksumCRC32:PutObject' :: Maybe Text
checksumCRC32 = Maybe Text
a} :: PutObject)

-- | This header can be used as a data integrity check to verify that the
-- data received is the same data that was originally sent. This header
-- specifies the base64-encoded, 32-bit CRC32C checksum of 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/.
putObject_checksumCRC32C :: Lens.Lens' PutObject (Prelude.Maybe Prelude.Text)
putObject_checksumCRC32C :: Lens' PutObject (Maybe Text)
putObject_checksumCRC32C = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObject' {Maybe Text
checksumCRC32C :: Maybe Text
$sel:checksumCRC32C:PutObject' :: PutObject -> Maybe Text
checksumCRC32C} -> Maybe Text
checksumCRC32C) (\s :: PutObject
s@PutObject' {} Maybe Text
a -> PutObject
s {$sel:checksumCRC32C:PutObject' :: Maybe Text
checksumCRC32C = Maybe Text
a} :: PutObject)

-- | This header can be used as a data integrity check to verify that the
-- data received is the same data that was originally sent. This header
-- specifies the base64-encoded, 160-bit SHA-1 digest of 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/.
putObject_checksumSHA1 :: Lens.Lens' PutObject (Prelude.Maybe Prelude.Text)
putObject_checksumSHA1 :: Lens' PutObject (Maybe Text)
putObject_checksumSHA1 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObject' {Maybe Text
checksumSHA1 :: Maybe Text
$sel:checksumSHA1:PutObject' :: PutObject -> Maybe Text
checksumSHA1} -> Maybe Text
checksumSHA1) (\s :: PutObject
s@PutObject' {} Maybe Text
a -> PutObject
s {$sel:checksumSHA1:PutObject' :: Maybe Text
checksumSHA1 = Maybe Text
a} :: PutObject)

-- | This header can be used as a data integrity check to verify that the
-- data received is the same data that was originally sent. This header
-- specifies the base64-encoded, 256-bit SHA-256 digest of 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/.
putObject_checksumSHA256 :: Lens.Lens' PutObject (Prelude.Maybe Prelude.Text)
putObject_checksumSHA256 :: Lens' PutObject (Maybe Text)
putObject_checksumSHA256 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObject' {Maybe Text
checksumSHA256 :: Maybe Text
$sel:checksumSHA256:PutObject' :: PutObject -> Maybe Text
checksumSHA256} -> Maybe Text
checksumSHA256) (\s :: PutObject
s@PutObject' {} Maybe Text
a -> PutObject
s {$sel:checksumSHA256:PutObject' :: Maybe Text
checksumSHA256 = Maybe Text
a} :: PutObject)

-- | Specifies presentational information for the object. For more
-- information, see
-- <http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1>.
putObject_contentDisposition :: Lens.Lens' PutObject (Prelude.Maybe Prelude.Text)
putObject_contentDisposition :: Lens' PutObject (Maybe Text)
putObject_contentDisposition = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObject' {Maybe Text
contentDisposition :: Maybe Text
$sel:contentDisposition:PutObject' :: PutObject -> Maybe Text
contentDisposition} -> Maybe Text
contentDisposition) (\s :: PutObject
s@PutObject' {} Maybe Text
a -> PutObject
s {$sel:contentDisposition:PutObject' :: Maybe Text
contentDisposition = Maybe Text
a} :: PutObject)

-- | 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. For more information, see
-- <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11>.
putObject_contentEncoding :: Lens.Lens' PutObject (Prelude.Maybe Prelude.Text)
putObject_contentEncoding :: Lens' PutObject (Maybe Text)
putObject_contentEncoding = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObject' {Maybe Text
contentEncoding :: Maybe Text
$sel:contentEncoding:PutObject' :: PutObject -> Maybe Text
contentEncoding} -> Maybe Text
contentEncoding) (\s :: PutObject
s@PutObject' {} Maybe Text
a -> PutObject
s {$sel:contentEncoding:PutObject' :: Maybe Text
contentEncoding = Maybe Text
a} :: PutObject)

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

-- | Size of the body in bytes. This parameter is useful when the size of the
-- body cannot be determined automatically. For more information, see
-- <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13>.
putObject_contentLength :: Lens.Lens' PutObject (Prelude.Maybe Prelude.Integer)
putObject_contentLength :: Lens' PutObject (Maybe Integer)
putObject_contentLength = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObject' {Maybe Integer
contentLength :: Maybe Integer
$sel:contentLength:PutObject' :: PutObject -> Maybe Integer
contentLength} -> Maybe Integer
contentLength) (\s :: PutObject
s@PutObject' {} Maybe Integer
a -> PutObject
s {$sel:contentLength:PutObject' :: Maybe Integer
contentLength = Maybe Integer
a} :: PutObject)

-- | The base64-encoded 128-bit MD5 digest of the message (without the
-- headers) according to RFC 1864. This header can be used as a message
-- integrity check to verify that the data is the same data that was
-- originally sent. Although it is optional, we recommend using the
-- Content-MD5 mechanism as an end-to-end integrity check. For more
-- information about REST request authentication, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html REST Authentication>.
putObject_contentMD5 :: Lens.Lens' PutObject (Prelude.Maybe Prelude.Text)
putObject_contentMD5 :: Lens' PutObject (Maybe Text)
putObject_contentMD5 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObject' {Maybe Text
contentMD5 :: Maybe Text
$sel:contentMD5:PutObject' :: PutObject -> Maybe Text
contentMD5} -> Maybe Text
contentMD5) (\s :: PutObject
s@PutObject' {} Maybe Text
a -> PutObject
s {$sel:contentMD5:PutObject' :: Maybe Text
contentMD5 = Maybe Text
a} :: PutObject)

-- | A standard MIME type describing the format of the contents. For more
-- information, see
-- <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17>.
putObject_contentType :: Lens.Lens' PutObject (Prelude.Maybe Prelude.Text)
putObject_contentType :: Lens' PutObject (Maybe Text)
putObject_contentType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObject' {Maybe Text
contentType :: Maybe Text
$sel:contentType:PutObject' :: PutObject -> Maybe Text
contentType} -> Maybe Text
contentType) (\s :: PutObject
s@PutObject' {} Maybe Text
a -> PutObject
s {$sel:contentType:PutObject' :: Maybe Text
contentType = Maybe Text
a} :: PutObject)

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

-- | The date and time at which the object is no longer cacheable. For more
-- information, see
-- <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21>.
putObject_expires :: Lens.Lens' PutObject (Prelude.Maybe Prelude.UTCTime)
putObject_expires :: Lens' PutObject (Maybe UTCTime)
putObject_expires = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObject' {Maybe RFC822
expires :: Maybe RFC822
$sel:expires:PutObject' :: PutObject -> Maybe RFC822
expires} -> Maybe RFC822
expires) (\s :: PutObject
s@PutObject' {} Maybe RFC822
a -> PutObject
s {$sel:expires:PutObject' :: Maybe RFC822
expires = Maybe RFC822
a} :: PutObject) 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.
putObject_grantFullControl :: Lens.Lens' PutObject (Prelude.Maybe Prelude.Text)
putObject_grantFullControl :: Lens' PutObject (Maybe Text)
putObject_grantFullControl = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObject' {Maybe Text
grantFullControl :: Maybe Text
$sel:grantFullControl:PutObject' :: PutObject -> Maybe Text
grantFullControl} -> Maybe Text
grantFullControl) (\s :: PutObject
s@PutObject' {} Maybe Text
a -> PutObject
s {$sel:grantFullControl:PutObject' :: Maybe Text
grantFullControl = Maybe Text
a} :: PutObject)

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

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

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

-- | A map of metadata to store with the object in S3.
putObject_metadata :: Lens.Lens' PutObject (Prelude.HashMap Prelude.Text Prelude.Text)
putObject_metadata :: Lens' PutObject (HashMap Text Text)
putObject_metadata = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObject' {HashMap Text Text
metadata :: HashMap Text Text
$sel:metadata:PutObject' :: PutObject -> HashMap Text Text
metadata} -> HashMap Text Text
metadata) (\s :: PutObject
s@PutObject' {} HashMap Text Text
a -> PutObject
s {$sel:metadata:PutObject' :: HashMap Text Text
metadata = HashMap Text Text
a} :: PutObject) 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 a legal hold will be applied to this object. For more
-- information about S3 Object Lock, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html Object Lock>.
putObject_objectLockLegalHoldStatus :: Lens.Lens' PutObject (Prelude.Maybe ObjectLockLegalHoldStatus)
putObject_objectLockLegalHoldStatus :: Lens' PutObject (Maybe ObjectLockLegalHoldStatus)
putObject_objectLockLegalHoldStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObject' {Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus :: Maybe ObjectLockLegalHoldStatus
$sel:objectLockLegalHoldStatus:PutObject' :: PutObject -> Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus} -> Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus) (\s :: PutObject
s@PutObject' {} Maybe ObjectLockLegalHoldStatus
a -> PutObject
s {$sel:objectLockLegalHoldStatus:PutObject' :: Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus = Maybe ObjectLockLegalHoldStatus
a} :: PutObject)

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

-- | The date and time when you want this object\'s Object Lock to expire.
-- Must be formatted as a timestamp parameter.
putObject_objectLockRetainUntilDate :: Lens.Lens' PutObject (Prelude.Maybe Prelude.UTCTime)
putObject_objectLockRetainUntilDate :: Lens' PutObject (Maybe UTCTime)
putObject_objectLockRetainUntilDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObject' {Maybe ISO8601
objectLockRetainUntilDate :: Maybe ISO8601
$sel:objectLockRetainUntilDate:PutObject' :: PutObject -> Maybe ISO8601
objectLockRetainUntilDate} -> Maybe ISO8601
objectLockRetainUntilDate) (\s :: PutObject
s@PutObject' {} Maybe ISO8601
a -> PutObject
s {$sel:objectLockRetainUntilDate:PutObject' :: Maybe ISO8601
objectLockRetainUntilDate = Maybe ISO8601
a} :: PutObject) 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.
putObject_requestPayer :: Lens.Lens' PutObject (Prelude.Maybe RequestPayer)
putObject_requestPayer :: Lens' PutObject (Maybe RequestPayer)
putObject_requestPayer = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObject' {Maybe RequestPayer
requestPayer :: Maybe RequestPayer
$sel:requestPayer:PutObject' :: PutObject -> Maybe RequestPayer
requestPayer} -> Maybe RequestPayer
requestPayer) (\s :: PutObject
s@PutObject' {} Maybe RequestPayer
a -> PutObject
s {$sel:requestPayer:PutObject' :: Maybe RequestPayer
requestPayer = Maybe RequestPayer
a} :: PutObject)

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

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

-- | 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.
putObject_sSEKMSEncryptionContext :: Lens.Lens' PutObject (Prelude.Maybe Prelude.Text)
putObject_sSEKMSEncryptionContext :: Lens' PutObject (Maybe Text)
putObject_sSEKMSEncryptionContext = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObject' {Maybe (Sensitive Text)
sSEKMSEncryptionContext :: Maybe (Sensitive Text)
$sel:sSEKMSEncryptionContext:PutObject' :: PutObject -> Maybe (Sensitive Text)
sSEKMSEncryptionContext} -> Maybe (Sensitive Text)
sSEKMSEncryptionContext) (\s :: PutObject
s@PutObject' {} Maybe (Sensitive Text)
a -> PutObject
s {$sel:sSEKMSEncryptionContext:PutObject' :: Maybe (Sensitive Text)
sSEKMSEncryptionContext = Maybe (Sensitive Text)
a} :: PutObject) 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 @x-amz-server-side-encryption@ is present and has the value of
-- @aws:kms@, this header specifies the ID of the Amazon Web Services Key
-- Management Service (Amazon Web Services KMS) symmetrical customer
-- managed key that was used for the object. If you specify
-- @x-amz-server-side-encryption:aws:kms@, but do not
-- provide@ x-amz-server-side-encryption-aws-kms-key-id@, Amazon S3 uses
-- the Amazon Web Services managed key to protect the data. If the KMS key
-- does not exist in the same account issuing the command, you must use the
-- full ARN and not just the ID.
putObject_sSEKMSKeyId :: Lens.Lens' PutObject (Prelude.Maybe Prelude.Text)
putObject_sSEKMSKeyId :: Lens' PutObject (Maybe Text)
putObject_sSEKMSKeyId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObject' {Maybe (Sensitive Text)
sSEKMSKeyId :: Maybe (Sensitive Text)
$sel:sSEKMSKeyId:PutObject' :: PutObject -> Maybe (Sensitive Text)
sSEKMSKeyId} -> Maybe (Sensitive Text)
sSEKMSKeyId) (\s :: PutObject
s@PutObject' {} Maybe (Sensitive Text)
a -> PutObject
s {$sel:sSEKMSKeyId:PutObject' :: Maybe (Sensitive Text)
sSEKMSKeyId = Maybe (Sensitive Text)
a} :: PutObject) 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).
putObject_serverSideEncryption :: Lens.Lens' PutObject (Prelude.Maybe ServerSideEncryption)
putObject_serverSideEncryption :: Lens' PutObject (Maybe ServerSideEncryption)
putObject_serverSideEncryption = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObject' {Maybe ServerSideEncryption
serverSideEncryption :: Maybe ServerSideEncryption
$sel:serverSideEncryption:PutObject' :: PutObject -> Maybe ServerSideEncryption
serverSideEncryption} -> Maybe ServerSideEncryption
serverSideEncryption) (\s :: PutObject
s@PutObject' {} Maybe ServerSideEncryption
a -> PutObject
s {$sel:serverSideEncryption:PutObject' :: Maybe ServerSideEncryption
serverSideEncryption = Maybe ServerSideEncryption
a} :: PutObject)

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

-- | The tag-set for the object. The tag-set must be encoded as URL Query
-- parameters. (For example, \"Key1=Value1\")
putObject_tagging :: Lens.Lens' PutObject (Prelude.Maybe Prelude.Text)
putObject_tagging :: Lens' PutObject (Maybe Text)
putObject_tagging = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObject' {Maybe Text
tagging :: Maybe Text
$sel:tagging:PutObject' :: PutObject -> Maybe Text
tagging} -> Maybe Text
tagging) (\s :: PutObject
s@PutObject' {} Maybe Text
a -> PutObject
s {$sel:tagging:PutObject' :: Maybe Text
tagging = Maybe Text
a} :: PutObject)

-- | 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. For
-- information about object metadata, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html Object Key and Metadata>.
--
-- In the following example, the request header sets the redirect to an
-- object (anotherPage.html) in the same bucket:
--
-- @x-amz-website-redirect-location: \/anotherPage.html@
--
-- In the following example, the request header sets the object redirect to
-- another website:
--
-- @x-amz-website-redirect-location: http:\/\/www.example.com\/@
--
-- For more information about website hosting in Amazon S3, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html Hosting Websites on Amazon S3>
-- and
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html How to Configure Website Page Redirects>.
putObject_websiteRedirectLocation :: Lens.Lens' PutObject (Prelude.Maybe Prelude.Text)
putObject_websiteRedirectLocation :: Lens' PutObject (Maybe Text)
putObject_websiteRedirectLocation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObject' {Maybe Text
websiteRedirectLocation :: Maybe Text
$sel:websiteRedirectLocation:PutObject' :: PutObject -> Maybe Text
websiteRedirectLocation} -> Maybe Text
websiteRedirectLocation) (\s :: PutObject
s@PutObject' {} Maybe Text
a -> PutObject
s {$sel:websiteRedirectLocation:PutObject' :: Maybe Text
websiteRedirectLocation = Maybe Text
a} :: PutObject)

-- | The bucket name to which the PUT action was initiated.
--
-- 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/.
putObject_bucket :: Lens.Lens' PutObject BucketName
putObject_bucket :: Lens' PutObject BucketName
putObject_bucket = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObject' {BucketName
bucket :: BucketName
$sel:bucket:PutObject' :: PutObject -> BucketName
bucket} -> BucketName
bucket) (\s :: PutObject
s@PutObject' {} BucketName
a -> PutObject
s {$sel:bucket:PutObject' :: BucketName
bucket = BucketName
a} :: PutObject)

-- | Object key for which the PUT action was initiated.
putObject_key :: Lens.Lens' PutObject ObjectKey
putObject_key :: Lens' PutObject ObjectKey
putObject_key = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObject' {ObjectKey
key :: ObjectKey
$sel:key:PutObject' :: PutObject -> ObjectKey
key} -> ObjectKey
key) (\s :: PutObject
s@PutObject' {} ObjectKey
a -> PutObject
s {$sel:key:PutObject' :: ObjectKey
key = ObjectKey
a} :: PutObject)

-- | Object data.
putObject_body :: Lens.Lens' PutObject Data.RequestBody
putObject_body :: Lens' PutObject RequestBody
putObject_body = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObject' {RequestBody
body :: RequestBody
$sel:body:PutObject' :: PutObject -> RequestBody
body} -> RequestBody
body) (\s :: PutObject
s@PutObject' {} RequestBody
a -> PutObject
s {$sel:body:PutObject' :: RequestBody
body = RequestBody
a} :: PutObject)

instance Core.AWSRequest PutObject where
  type AWSResponse PutObject = PutObjectResponse
  request :: (Service -> Service) -> PutObject -> Request PutObject
request Service -> Service
overrides =
    forall a. Request a -> Request a
Request.expectHeader
      forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a. Request a -> Request a
Request.s3vhost
      forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a. (ToRequest a, ToBody a) => Service -> a -> Request a
Request.putBody (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy PutObject
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse PutObject)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ETag
-> Maybe Text
-> Maybe RequestCharged
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe ServerSideEncryption
-> Maybe ObjectVersionId
-> Int
-> PutObjectResponse
PutObjectResponse'
            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.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-checksum-crc32")
            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-checksum-crc32c")
            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-checksum-sha1")
            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-checksum-sha256")
            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
"ETag")
            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 Data.ToBody PutObject where
  toBody :: PutObject -> RequestBody
toBody PutObject' {Maybe Bool
Maybe Integer
Maybe Text
Maybe (Sensitive Text)
Maybe ISO8601
Maybe RFC822
Maybe ChecksumAlgorithm
Maybe ObjectCannedACL
Maybe ObjectLockLegalHoldStatus
Maybe ObjectLockMode
Maybe RequestPayer
Maybe ServerSideEncryption
Maybe StorageClass
HashMap Text Text
RequestBody
ObjectKey
BucketName
body :: RequestBody
key :: ObjectKey
bucket :: BucketName
websiteRedirectLocation :: Maybe Text
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
metadata :: HashMap Text Text
grantWriteACP :: Maybe Text
grantReadACP :: Maybe Text
grantRead :: Maybe Text
grantFullControl :: Maybe Text
expires :: Maybe RFC822
expectedBucketOwner :: Maybe Text
contentType :: Maybe Text
contentMD5 :: Maybe Text
contentLength :: Maybe Integer
contentLanguage :: Maybe Text
contentEncoding :: Maybe Text
contentDisposition :: Maybe Text
checksumSHA256 :: Maybe Text
checksumSHA1 :: Maybe Text
checksumCRC32C :: Maybe Text
checksumCRC32 :: Maybe Text
checksumAlgorithm :: Maybe ChecksumAlgorithm
cacheControl :: Maybe Text
bucketKeyEnabled :: Maybe Bool
acl :: Maybe ObjectCannedACL
$sel:body:PutObject' :: PutObject -> RequestBody
$sel:key:PutObject' :: PutObject -> ObjectKey
$sel:bucket:PutObject' :: PutObject -> BucketName
$sel:websiteRedirectLocation:PutObject' :: PutObject -> Maybe Text
$sel:tagging:PutObject' :: PutObject -> Maybe Text
$sel:storageClass:PutObject' :: PutObject -> Maybe StorageClass
$sel:serverSideEncryption:PutObject' :: PutObject -> Maybe ServerSideEncryption
$sel:sSEKMSKeyId:PutObject' :: PutObject -> Maybe (Sensitive Text)
$sel:sSEKMSEncryptionContext:PutObject' :: PutObject -> Maybe (Sensitive Text)
$sel:sSECustomerKeyMD5:PutObject' :: PutObject -> Maybe Text
$sel:sSECustomerKey:PutObject' :: PutObject -> Maybe (Sensitive Text)
$sel:sSECustomerAlgorithm:PutObject' :: PutObject -> Maybe Text
$sel:requestPayer:PutObject' :: PutObject -> Maybe RequestPayer
$sel:objectLockRetainUntilDate:PutObject' :: PutObject -> Maybe ISO8601
$sel:objectLockMode:PutObject' :: PutObject -> Maybe ObjectLockMode
$sel:objectLockLegalHoldStatus:PutObject' :: PutObject -> Maybe ObjectLockLegalHoldStatus
$sel:metadata:PutObject' :: PutObject -> HashMap Text Text
$sel:grantWriteACP:PutObject' :: PutObject -> Maybe Text
$sel:grantReadACP:PutObject' :: PutObject -> Maybe Text
$sel:grantRead:PutObject' :: PutObject -> Maybe Text
$sel:grantFullControl:PutObject' :: PutObject -> Maybe Text
$sel:expires:PutObject' :: PutObject -> Maybe RFC822
$sel:expectedBucketOwner:PutObject' :: PutObject -> Maybe Text
$sel:contentType:PutObject' :: PutObject -> Maybe Text
$sel:contentMD5:PutObject' :: PutObject -> Maybe Text
$sel:contentLength:PutObject' :: PutObject -> Maybe Integer
$sel:contentLanguage:PutObject' :: PutObject -> Maybe Text
$sel:contentEncoding:PutObject' :: PutObject -> Maybe Text
$sel:contentDisposition:PutObject' :: PutObject -> Maybe Text
$sel:checksumSHA256:PutObject' :: PutObject -> Maybe Text
$sel:checksumSHA1:PutObject' :: PutObject -> Maybe Text
$sel:checksumCRC32C:PutObject' :: PutObject -> Maybe Text
$sel:checksumCRC32:PutObject' :: PutObject -> Maybe Text
$sel:checksumAlgorithm:PutObject' :: PutObject -> Maybe ChecksumAlgorithm
$sel:cacheControl:PutObject' :: PutObject -> Maybe Text
$sel:bucketKeyEnabled:PutObject' :: PutObject -> Maybe Bool
$sel:acl:PutObject' :: PutObject -> Maybe ObjectCannedACL
..} = forall a. ToBody a => a -> RequestBody
Data.toBody RequestBody
body

instance Data.ToHeaders PutObject where
  toHeaders :: PutObject -> ResponseHeaders
toHeaders PutObject' {Maybe Bool
Maybe Integer
Maybe Text
Maybe (Sensitive Text)
Maybe ISO8601
Maybe RFC822
Maybe ChecksumAlgorithm
Maybe ObjectCannedACL
Maybe ObjectLockLegalHoldStatus
Maybe ObjectLockMode
Maybe RequestPayer
Maybe ServerSideEncryption
Maybe StorageClass
HashMap Text Text
RequestBody
ObjectKey
BucketName
body :: RequestBody
key :: ObjectKey
bucket :: BucketName
websiteRedirectLocation :: Maybe Text
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
metadata :: HashMap Text Text
grantWriteACP :: Maybe Text
grantReadACP :: Maybe Text
grantRead :: Maybe Text
grantFullControl :: Maybe Text
expires :: Maybe RFC822
expectedBucketOwner :: Maybe Text
contentType :: Maybe Text
contentMD5 :: Maybe Text
contentLength :: Maybe Integer
contentLanguage :: Maybe Text
contentEncoding :: Maybe Text
contentDisposition :: Maybe Text
checksumSHA256 :: Maybe Text
checksumSHA1 :: Maybe Text
checksumCRC32C :: Maybe Text
checksumCRC32 :: Maybe Text
checksumAlgorithm :: Maybe ChecksumAlgorithm
cacheControl :: Maybe Text
bucketKeyEnabled :: Maybe Bool
acl :: Maybe ObjectCannedACL
$sel:body:PutObject' :: PutObject -> RequestBody
$sel:key:PutObject' :: PutObject -> ObjectKey
$sel:bucket:PutObject' :: PutObject -> BucketName
$sel:websiteRedirectLocation:PutObject' :: PutObject -> Maybe Text
$sel:tagging:PutObject' :: PutObject -> Maybe Text
$sel:storageClass:PutObject' :: PutObject -> Maybe StorageClass
$sel:serverSideEncryption:PutObject' :: PutObject -> Maybe ServerSideEncryption
$sel:sSEKMSKeyId:PutObject' :: PutObject -> Maybe (Sensitive Text)
$sel:sSEKMSEncryptionContext:PutObject' :: PutObject -> Maybe (Sensitive Text)
$sel:sSECustomerKeyMD5:PutObject' :: PutObject -> Maybe Text
$sel:sSECustomerKey:PutObject' :: PutObject -> Maybe (Sensitive Text)
$sel:sSECustomerAlgorithm:PutObject' :: PutObject -> Maybe Text
$sel:requestPayer:PutObject' :: PutObject -> Maybe RequestPayer
$sel:objectLockRetainUntilDate:PutObject' :: PutObject -> Maybe ISO8601
$sel:objectLockMode:PutObject' :: PutObject -> Maybe ObjectLockMode
$sel:objectLockLegalHoldStatus:PutObject' :: PutObject -> Maybe ObjectLockLegalHoldStatus
$sel:metadata:PutObject' :: PutObject -> HashMap Text Text
$sel:grantWriteACP:PutObject' :: PutObject -> Maybe Text
$sel:grantReadACP:PutObject' :: PutObject -> Maybe Text
$sel:grantRead:PutObject' :: PutObject -> Maybe Text
$sel:grantFullControl:PutObject' :: PutObject -> Maybe Text
$sel:expires:PutObject' :: PutObject -> Maybe RFC822
$sel:expectedBucketOwner:PutObject' :: PutObject -> Maybe Text
$sel:contentType:PutObject' :: PutObject -> Maybe Text
$sel:contentMD5:PutObject' :: PutObject -> Maybe Text
$sel:contentLength:PutObject' :: PutObject -> Maybe Integer
$sel:contentLanguage:PutObject' :: PutObject -> Maybe Text
$sel:contentEncoding:PutObject' :: PutObject -> Maybe Text
$sel:contentDisposition:PutObject' :: PutObject -> Maybe Text
$sel:checksumSHA256:PutObject' :: PutObject -> Maybe Text
$sel:checksumSHA1:PutObject' :: PutObject -> Maybe Text
$sel:checksumCRC32C:PutObject' :: PutObject -> Maybe Text
$sel:checksumCRC32:PutObject' :: PutObject -> Maybe Text
$sel:checksumAlgorithm:PutObject' :: PutObject -> Maybe ChecksumAlgorithm
$sel:cacheControl:PutObject' :: PutObject -> Maybe Text
$sel:bucketKeyEnabled:PutObject' :: PutObject -> Maybe Bool
$sel:acl:PutObject' :: PutObject -> 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-sdk-checksum-algorithm"
          forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe ChecksumAlgorithm
checksumAlgorithm,
        HeaderName
"x-amz-checksum-crc32" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
checksumCRC32,
        HeaderName
"x-amz-checksum-crc32c" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
checksumCRC32C,
        HeaderName
"x-amz-checksum-sha1" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
checksumSHA1,
        HeaderName
"x-amz-checksum-sha256" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
checksumSHA256,
        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-Length" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Integer
contentLength,
        HeaderName
"Content-MD5" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
contentMD5,
        HeaderName
"Content-Type" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
contentType,
        HeaderName
"x-amz-expected-bucket-owner"
          forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
expectedBucketOwner,
        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-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-website-redirect-location"
          forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
websiteRedirectLocation
      ]

instance Data.ToPath PutObject where
  toPath :: PutObject -> ByteString
toPath PutObject' {Maybe Bool
Maybe Integer
Maybe Text
Maybe (Sensitive Text)
Maybe ISO8601
Maybe RFC822
Maybe ChecksumAlgorithm
Maybe ObjectCannedACL
Maybe ObjectLockLegalHoldStatus
Maybe ObjectLockMode
Maybe RequestPayer
Maybe ServerSideEncryption
Maybe StorageClass
HashMap Text Text
RequestBody
ObjectKey
BucketName
body :: RequestBody
key :: ObjectKey
bucket :: BucketName
websiteRedirectLocation :: Maybe Text
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
metadata :: HashMap Text Text
grantWriteACP :: Maybe Text
grantReadACP :: Maybe Text
grantRead :: Maybe Text
grantFullControl :: Maybe Text
expires :: Maybe RFC822
expectedBucketOwner :: Maybe Text
contentType :: Maybe Text
contentMD5 :: Maybe Text
contentLength :: Maybe Integer
contentLanguage :: Maybe Text
contentEncoding :: Maybe Text
contentDisposition :: Maybe Text
checksumSHA256 :: Maybe Text
checksumSHA1 :: Maybe Text
checksumCRC32C :: Maybe Text
checksumCRC32 :: Maybe Text
checksumAlgorithm :: Maybe ChecksumAlgorithm
cacheControl :: Maybe Text
bucketKeyEnabled :: Maybe Bool
acl :: Maybe ObjectCannedACL
$sel:body:PutObject' :: PutObject -> RequestBody
$sel:key:PutObject' :: PutObject -> ObjectKey
$sel:bucket:PutObject' :: PutObject -> BucketName
$sel:websiteRedirectLocation:PutObject' :: PutObject -> Maybe Text
$sel:tagging:PutObject' :: PutObject -> Maybe Text
$sel:storageClass:PutObject' :: PutObject -> Maybe StorageClass
$sel:serverSideEncryption:PutObject' :: PutObject -> Maybe ServerSideEncryption
$sel:sSEKMSKeyId:PutObject' :: PutObject -> Maybe (Sensitive Text)
$sel:sSEKMSEncryptionContext:PutObject' :: PutObject -> Maybe (Sensitive Text)
$sel:sSECustomerKeyMD5:PutObject' :: PutObject -> Maybe Text
$sel:sSECustomerKey:PutObject' :: PutObject -> Maybe (Sensitive Text)
$sel:sSECustomerAlgorithm:PutObject' :: PutObject -> Maybe Text
$sel:requestPayer:PutObject' :: PutObject -> Maybe RequestPayer
$sel:objectLockRetainUntilDate:PutObject' :: PutObject -> Maybe ISO8601
$sel:objectLockMode:PutObject' :: PutObject -> Maybe ObjectLockMode
$sel:objectLockLegalHoldStatus:PutObject' :: PutObject -> Maybe ObjectLockLegalHoldStatus
$sel:metadata:PutObject' :: PutObject -> HashMap Text Text
$sel:grantWriteACP:PutObject' :: PutObject -> Maybe Text
$sel:grantReadACP:PutObject' :: PutObject -> Maybe Text
$sel:grantRead:PutObject' :: PutObject -> Maybe Text
$sel:grantFullControl:PutObject' :: PutObject -> Maybe Text
$sel:expires:PutObject' :: PutObject -> Maybe RFC822
$sel:expectedBucketOwner:PutObject' :: PutObject -> Maybe Text
$sel:contentType:PutObject' :: PutObject -> Maybe Text
$sel:contentMD5:PutObject' :: PutObject -> Maybe Text
$sel:contentLength:PutObject' :: PutObject -> Maybe Integer
$sel:contentLanguage:PutObject' :: PutObject -> Maybe Text
$sel:contentEncoding:PutObject' :: PutObject -> Maybe Text
$sel:contentDisposition:PutObject' :: PutObject -> Maybe Text
$sel:checksumSHA256:PutObject' :: PutObject -> Maybe Text
$sel:checksumSHA1:PutObject' :: PutObject -> Maybe Text
$sel:checksumCRC32C:PutObject' :: PutObject -> Maybe Text
$sel:checksumCRC32:PutObject' :: PutObject -> Maybe Text
$sel:checksumAlgorithm:PutObject' :: PutObject -> Maybe ChecksumAlgorithm
$sel:cacheControl:PutObject' :: PutObject -> Maybe Text
$sel:bucketKeyEnabled:PutObject' :: PutObject -> Maybe Bool
$sel:acl:PutObject' :: PutObject -> 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 PutObject where
  toQuery :: PutObject -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newPutObjectResponse' smart constructor.
data PutObjectResponse = PutObjectResponse'
  { -- | Indicates whether the uploaded object uses an S3 Bucket Key for
    -- server-side encryption with Amazon Web Services KMS (SSE-KMS).
    PutObjectResponse -> Maybe Bool
bucketKeyEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The base64-encoded, 32-bit CRC32 checksum of the object. This will only
    -- be present if it was uploaded with the object. With multipart uploads,
    -- this may not be a checksum value of the object. For more information
    -- about how checksums are calculated with multipart uploads, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums Checking object integrity>
    -- in the /Amazon S3 User Guide/.
    PutObjectResponse -> Maybe Text
checksumCRC32 :: Prelude.Maybe Prelude.Text,
    -- | The base64-encoded, 32-bit CRC32C checksum of the object. This will only
    -- be present if it was uploaded with the object. With multipart uploads,
    -- this may not be a checksum value of the object. For more information
    -- about how checksums are calculated with multipart uploads, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums Checking object integrity>
    -- in the /Amazon S3 User Guide/.
    PutObjectResponse -> Maybe Text
checksumCRC32C :: Prelude.Maybe Prelude.Text,
    -- | The base64-encoded, 160-bit SHA-1 digest of the object. This will only
    -- be present if it was uploaded with the object. With multipart uploads,
    -- this may not be a checksum value of the object. For more information
    -- about how checksums are calculated with multipart uploads, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums Checking object integrity>
    -- in the /Amazon S3 User Guide/.
    PutObjectResponse -> Maybe Text
checksumSHA1 :: Prelude.Maybe Prelude.Text,
    -- | The base64-encoded, 256-bit SHA-256 digest of the object. This will only
    -- be present if it was uploaded with the object. With multipart uploads,
    -- this may not be a checksum value of the object. For more information
    -- about how checksums are calculated with multipart uploads, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums Checking object integrity>
    -- in the /Amazon S3 User Guide/.
    PutObjectResponse -> Maybe Text
checksumSHA256 :: Prelude.Maybe Prelude.Text,
    -- | Entity tag for the uploaded object.
    PutObjectResponse -> Maybe ETag
eTag :: Prelude.Maybe ETag,
    -- | If the expiration is configured for the object (see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html PutBucketLifecycleConfiguration>),
    -- the response includes this header. It includes the @expiry-date@ and
    -- @rule-id@ key-value pairs that provide information about object
    -- expiration. The value of the @rule-id@ is URL-encoded.
    PutObjectResponse -> Maybe Text
expiration :: Prelude.Maybe Prelude.Text,
    PutObjectResponse -> 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.
    PutObjectResponse -> 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.
    PutObjectResponse -> 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.
    PutObjectResponse -> Maybe (Sensitive Text)
sSEKMSEncryptionContext :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | If @x-amz-server-side-encryption@ is present and has the value of
    -- @aws:kms@, this header 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.
    PutObjectResponse -> Maybe (Sensitive Text)
sSEKMSKeyId :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | If you specified server-side encryption either with an Amazon Web
    -- Services KMS key or Amazon S3-managed encryption key in your PUT
    -- request, the response includes this header. It confirms the encryption
    -- algorithm that Amazon S3 used to encrypt the object.
    PutObjectResponse -> Maybe ServerSideEncryption
serverSideEncryption :: Prelude.Maybe ServerSideEncryption,
    -- | Version of the object.
    PutObjectResponse -> Maybe ObjectVersionId
versionId :: Prelude.Maybe ObjectVersionId,
    -- | The response's http status code.
    PutObjectResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (PutObjectResponse -> PutObjectResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutObjectResponse -> PutObjectResponse -> Bool
$c/= :: PutObjectResponse -> PutObjectResponse -> Bool
== :: PutObjectResponse -> PutObjectResponse -> Bool
$c== :: PutObjectResponse -> PutObjectResponse -> Bool
Prelude.Eq, Int -> PutObjectResponse -> ShowS
[PutObjectResponse] -> ShowS
PutObjectResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutObjectResponse] -> ShowS
$cshowList :: [PutObjectResponse] -> ShowS
show :: PutObjectResponse -> String
$cshow :: PutObjectResponse -> String
showsPrec :: Int -> PutObjectResponse -> ShowS
$cshowsPrec :: Int -> PutObjectResponse -> ShowS
Prelude.Show, forall x. Rep PutObjectResponse x -> PutObjectResponse
forall x. PutObjectResponse -> Rep PutObjectResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutObjectResponse x -> PutObjectResponse
$cfrom :: forall x. PutObjectResponse -> Rep PutObjectResponse x
Prelude.Generic)

-- |
-- Create a value of 'PutObjectResponse' 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', 'putObjectResponse_bucketKeyEnabled' - Indicates whether the uploaded object uses an S3 Bucket Key for
-- server-side encryption with Amazon Web Services KMS (SSE-KMS).
--
-- 'checksumCRC32', 'putObjectResponse_checksumCRC32' - The base64-encoded, 32-bit CRC32 checksum of the object. This will only
-- be present if it was uploaded with the object. With multipart uploads,
-- this may not be a checksum value of the object. For more information
-- about how checksums are calculated with multipart uploads, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums Checking object integrity>
-- in the /Amazon S3 User Guide/.
--
-- 'checksumCRC32C', 'putObjectResponse_checksumCRC32C' - The base64-encoded, 32-bit CRC32C checksum of the object. This will only
-- be present if it was uploaded with the object. With multipart uploads,
-- this may not be a checksum value of the object. For more information
-- about how checksums are calculated with multipart uploads, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums Checking object integrity>
-- in the /Amazon S3 User Guide/.
--
-- 'checksumSHA1', 'putObjectResponse_checksumSHA1' - The base64-encoded, 160-bit SHA-1 digest of the object. This will only
-- be present if it was uploaded with the object. With multipart uploads,
-- this may not be a checksum value of the object. For more information
-- about how checksums are calculated with multipart uploads, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums Checking object integrity>
-- in the /Amazon S3 User Guide/.
--
-- 'checksumSHA256', 'putObjectResponse_checksumSHA256' - The base64-encoded, 256-bit SHA-256 digest of the object. This will only
-- be present if it was uploaded with the object. With multipart uploads,
-- this may not be a checksum value of the object. For more information
-- about how checksums are calculated with multipart uploads, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums Checking object integrity>
-- in the /Amazon S3 User Guide/.
--
-- 'eTag', 'putObjectResponse_eTag' - Entity tag for the uploaded object.
--
-- 'expiration', 'putObjectResponse_expiration' - If the expiration is configured for the object (see
-- <https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html PutBucketLifecycleConfiguration>),
-- the response includes this header. It includes the @expiry-date@ and
-- @rule-id@ key-value pairs that provide information about object
-- expiration. The value of the @rule-id@ is URL-encoded.
--
-- 'requestCharged', 'putObjectResponse_requestCharged' - Undocumented member.
--
-- 'sSECustomerAlgorithm', 'putObjectResponse_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', 'putObjectResponse_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', 'putObjectResponse_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', 'putObjectResponse_sSEKMSKeyId' - If @x-amz-server-side-encryption@ is present and has the value of
-- @aws:kms@, this header 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', 'putObjectResponse_serverSideEncryption' - If you specified server-side encryption either with an Amazon Web
-- Services KMS key or Amazon S3-managed encryption key in your PUT
-- request, the response includes this header. It confirms the encryption
-- algorithm that Amazon S3 used to encrypt the object.
--
-- 'versionId', 'putObjectResponse_versionId' - Version of the object.
--
-- 'httpStatus', 'putObjectResponse_httpStatus' - The response's http status code.
newPutObjectResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  PutObjectResponse
newPutObjectResponse :: Int -> PutObjectResponse
newPutObjectResponse Int
pHttpStatus_ =
  PutObjectResponse'
    { $sel:bucketKeyEnabled:PutObjectResponse' :: Maybe Bool
bucketKeyEnabled =
        forall a. Maybe a
Prelude.Nothing,
      $sel:checksumCRC32:PutObjectResponse' :: Maybe Text
checksumCRC32 = forall a. Maybe a
Prelude.Nothing,
      $sel:checksumCRC32C:PutObjectResponse' :: Maybe Text
checksumCRC32C = forall a. Maybe a
Prelude.Nothing,
      $sel:checksumSHA1:PutObjectResponse' :: Maybe Text
checksumSHA1 = forall a. Maybe a
Prelude.Nothing,
      $sel:checksumSHA256:PutObjectResponse' :: Maybe Text
checksumSHA256 = forall a. Maybe a
Prelude.Nothing,
      $sel:eTag:PutObjectResponse' :: Maybe ETag
eTag = forall a. Maybe a
Prelude.Nothing,
      $sel:expiration:PutObjectResponse' :: Maybe Text
expiration = forall a. Maybe a
Prelude.Nothing,
      $sel:requestCharged:PutObjectResponse' :: Maybe RequestCharged
requestCharged = forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerAlgorithm:PutObjectResponse' :: Maybe Text
sSECustomerAlgorithm = forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerKeyMD5:PutObjectResponse' :: Maybe Text
sSECustomerKeyMD5 = forall a. Maybe a
Prelude.Nothing,
      $sel:sSEKMSEncryptionContext:PutObjectResponse' :: Maybe (Sensitive Text)
sSEKMSEncryptionContext = forall a. Maybe a
Prelude.Nothing,
      $sel:sSEKMSKeyId:PutObjectResponse' :: Maybe (Sensitive Text)
sSEKMSKeyId = forall a. Maybe a
Prelude.Nothing,
      $sel:serverSideEncryption:PutObjectResponse' :: Maybe ServerSideEncryption
serverSideEncryption = forall a. Maybe a
Prelude.Nothing,
      $sel:versionId:PutObjectResponse' :: Maybe ObjectVersionId
versionId = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:PutObjectResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | The base64-encoded, 32-bit CRC32 checksum of the object. This will only
-- be present if it was uploaded with the object. With multipart uploads,
-- this may not be a checksum value of the object. For more information
-- about how checksums are calculated with multipart uploads, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums Checking object integrity>
-- in the /Amazon S3 User Guide/.
putObjectResponse_checksumCRC32 :: Lens.Lens' PutObjectResponse (Prelude.Maybe Prelude.Text)
putObjectResponse_checksumCRC32 :: Lens' PutObjectResponse (Maybe Text)
putObjectResponse_checksumCRC32 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObjectResponse' {Maybe Text
checksumCRC32 :: Maybe Text
$sel:checksumCRC32:PutObjectResponse' :: PutObjectResponse -> Maybe Text
checksumCRC32} -> Maybe Text
checksumCRC32) (\s :: PutObjectResponse
s@PutObjectResponse' {} Maybe Text
a -> PutObjectResponse
s {$sel:checksumCRC32:PutObjectResponse' :: Maybe Text
checksumCRC32 = Maybe Text
a} :: PutObjectResponse)

-- | The base64-encoded, 32-bit CRC32C checksum of the object. This will only
-- be present if it was uploaded with the object. With multipart uploads,
-- this may not be a checksum value of the object. For more information
-- about how checksums are calculated with multipart uploads, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums Checking object integrity>
-- in the /Amazon S3 User Guide/.
putObjectResponse_checksumCRC32C :: Lens.Lens' PutObjectResponse (Prelude.Maybe Prelude.Text)
putObjectResponse_checksumCRC32C :: Lens' PutObjectResponse (Maybe Text)
putObjectResponse_checksumCRC32C = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObjectResponse' {Maybe Text
checksumCRC32C :: Maybe Text
$sel:checksumCRC32C:PutObjectResponse' :: PutObjectResponse -> Maybe Text
checksumCRC32C} -> Maybe Text
checksumCRC32C) (\s :: PutObjectResponse
s@PutObjectResponse' {} Maybe Text
a -> PutObjectResponse
s {$sel:checksumCRC32C:PutObjectResponse' :: Maybe Text
checksumCRC32C = Maybe Text
a} :: PutObjectResponse)

-- | The base64-encoded, 160-bit SHA-1 digest of the object. This will only
-- be present if it was uploaded with the object. With multipart uploads,
-- this may not be a checksum value of the object. For more information
-- about how checksums are calculated with multipart uploads, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums Checking object integrity>
-- in the /Amazon S3 User Guide/.
putObjectResponse_checksumSHA1 :: Lens.Lens' PutObjectResponse (Prelude.Maybe Prelude.Text)
putObjectResponse_checksumSHA1 :: Lens' PutObjectResponse (Maybe Text)
putObjectResponse_checksumSHA1 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObjectResponse' {Maybe Text
checksumSHA1 :: Maybe Text
$sel:checksumSHA1:PutObjectResponse' :: PutObjectResponse -> Maybe Text
checksumSHA1} -> Maybe Text
checksumSHA1) (\s :: PutObjectResponse
s@PutObjectResponse' {} Maybe Text
a -> PutObjectResponse
s {$sel:checksumSHA1:PutObjectResponse' :: Maybe Text
checksumSHA1 = Maybe Text
a} :: PutObjectResponse)

-- | The base64-encoded, 256-bit SHA-256 digest of the object. This will only
-- be present if it was uploaded with the object. With multipart uploads,
-- this may not be a checksum value of the object. For more information
-- about how checksums are calculated with multipart uploads, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums Checking object integrity>
-- in the /Amazon S3 User Guide/.
putObjectResponse_checksumSHA256 :: Lens.Lens' PutObjectResponse (Prelude.Maybe Prelude.Text)
putObjectResponse_checksumSHA256 :: Lens' PutObjectResponse (Maybe Text)
putObjectResponse_checksumSHA256 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObjectResponse' {Maybe Text
checksumSHA256 :: Maybe Text
$sel:checksumSHA256:PutObjectResponse' :: PutObjectResponse -> Maybe Text
checksumSHA256} -> Maybe Text
checksumSHA256) (\s :: PutObjectResponse
s@PutObjectResponse' {} Maybe Text
a -> PutObjectResponse
s {$sel:checksumSHA256:PutObjectResponse' :: Maybe Text
checksumSHA256 = Maybe Text
a} :: PutObjectResponse)

-- | Entity tag for the uploaded object.
putObjectResponse_eTag :: Lens.Lens' PutObjectResponse (Prelude.Maybe ETag)
putObjectResponse_eTag :: Lens' PutObjectResponse (Maybe ETag)
putObjectResponse_eTag = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObjectResponse' {Maybe ETag
eTag :: Maybe ETag
$sel:eTag:PutObjectResponse' :: PutObjectResponse -> Maybe ETag
eTag} -> Maybe ETag
eTag) (\s :: PutObjectResponse
s@PutObjectResponse' {} Maybe ETag
a -> PutObjectResponse
s {$sel:eTag:PutObjectResponse' :: Maybe ETag
eTag = Maybe ETag
a} :: PutObjectResponse)

-- | If the expiration is configured for the object (see
-- <https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html PutBucketLifecycleConfiguration>),
-- the response includes this header. It includes the @expiry-date@ and
-- @rule-id@ key-value pairs that provide information about object
-- expiration. The value of the @rule-id@ is URL-encoded.
putObjectResponse_expiration :: Lens.Lens' PutObjectResponse (Prelude.Maybe Prelude.Text)
putObjectResponse_expiration :: Lens' PutObjectResponse (Maybe Text)
putObjectResponse_expiration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObjectResponse' {Maybe Text
expiration :: Maybe Text
$sel:expiration:PutObjectResponse' :: PutObjectResponse -> Maybe Text
expiration} -> Maybe Text
expiration) (\s :: PutObjectResponse
s@PutObjectResponse' {} Maybe Text
a -> PutObjectResponse
s {$sel:expiration:PutObjectResponse' :: Maybe Text
expiration = Maybe Text
a} :: PutObjectResponse)

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

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

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

-- | 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.
putObjectResponse_sSEKMSEncryptionContext :: Lens.Lens' PutObjectResponse (Prelude.Maybe Prelude.Text)
putObjectResponse_sSEKMSEncryptionContext :: Lens' PutObjectResponse (Maybe Text)
putObjectResponse_sSEKMSEncryptionContext = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObjectResponse' {Maybe (Sensitive Text)
sSEKMSEncryptionContext :: Maybe (Sensitive Text)
$sel:sSEKMSEncryptionContext:PutObjectResponse' :: PutObjectResponse -> Maybe (Sensitive Text)
sSEKMSEncryptionContext} -> Maybe (Sensitive Text)
sSEKMSEncryptionContext) (\s :: PutObjectResponse
s@PutObjectResponse' {} Maybe (Sensitive Text)
a -> PutObjectResponse
s {$sel:sSEKMSEncryptionContext:PutObjectResponse' :: Maybe (Sensitive Text)
sSEKMSEncryptionContext = Maybe (Sensitive Text)
a} :: PutObjectResponse) 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 @x-amz-server-side-encryption@ is present and has the value of
-- @aws:kms@, this header 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.
putObjectResponse_sSEKMSKeyId :: Lens.Lens' PutObjectResponse (Prelude.Maybe Prelude.Text)
putObjectResponse_sSEKMSKeyId :: Lens' PutObjectResponse (Maybe Text)
putObjectResponse_sSEKMSKeyId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObjectResponse' {Maybe (Sensitive Text)
sSEKMSKeyId :: Maybe (Sensitive Text)
$sel:sSEKMSKeyId:PutObjectResponse' :: PutObjectResponse -> Maybe (Sensitive Text)
sSEKMSKeyId} -> Maybe (Sensitive Text)
sSEKMSKeyId) (\s :: PutObjectResponse
s@PutObjectResponse' {} Maybe (Sensitive Text)
a -> PutObjectResponse
s {$sel:sSEKMSKeyId:PutObjectResponse' :: Maybe (Sensitive Text)
sSEKMSKeyId = Maybe (Sensitive Text)
a} :: PutObjectResponse) 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 you specified server-side encryption either with an Amazon Web
-- Services KMS key or Amazon S3-managed encryption key in your PUT
-- request, the response includes this header. It confirms the encryption
-- algorithm that Amazon S3 used to encrypt the object.
putObjectResponse_serverSideEncryption :: Lens.Lens' PutObjectResponse (Prelude.Maybe ServerSideEncryption)
putObjectResponse_serverSideEncryption :: Lens' PutObjectResponse (Maybe ServerSideEncryption)
putObjectResponse_serverSideEncryption = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObjectResponse' {Maybe ServerSideEncryption
serverSideEncryption :: Maybe ServerSideEncryption
$sel:serverSideEncryption:PutObjectResponse' :: PutObjectResponse -> Maybe ServerSideEncryption
serverSideEncryption} -> Maybe ServerSideEncryption
serverSideEncryption) (\s :: PutObjectResponse
s@PutObjectResponse' {} Maybe ServerSideEncryption
a -> PutObjectResponse
s {$sel:serverSideEncryption:PutObjectResponse' :: Maybe ServerSideEncryption
serverSideEncryption = Maybe ServerSideEncryption
a} :: PutObjectResponse)

-- | Version of the object.
putObjectResponse_versionId :: Lens.Lens' PutObjectResponse (Prelude.Maybe ObjectVersionId)
putObjectResponse_versionId :: Lens' PutObjectResponse (Maybe ObjectVersionId)
putObjectResponse_versionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObjectResponse' {Maybe ObjectVersionId
versionId :: Maybe ObjectVersionId
$sel:versionId:PutObjectResponse' :: PutObjectResponse -> Maybe ObjectVersionId
versionId} -> Maybe ObjectVersionId
versionId) (\s :: PutObjectResponse
s@PutObjectResponse' {} Maybe ObjectVersionId
a -> PutObjectResponse
s {$sel:versionId:PutObjectResponse' :: Maybe ObjectVersionId
versionId = Maybe ObjectVersionId
a} :: PutObjectResponse)

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

instance Prelude.NFData PutObjectResponse where
  rnf :: PutObjectResponse -> ()
rnf PutObjectResponse' {Int
Maybe Bool
Maybe Text
Maybe (Sensitive Text)
Maybe ObjectVersionId
Maybe ETag
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
eTag :: Maybe ETag
checksumSHA256 :: Maybe Text
checksumSHA1 :: Maybe Text
checksumCRC32C :: Maybe Text
checksumCRC32 :: Maybe Text
bucketKeyEnabled :: Maybe Bool
$sel:httpStatus:PutObjectResponse' :: PutObjectResponse -> Int
$sel:versionId:PutObjectResponse' :: PutObjectResponse -> Maybe ObjectVersionId
$sel:serverSideEncryption:PutObjectResponse' :: PutObjectResponse -> Maybe ServerSideEncryption
$sel:sSEKMSKeyId:PutObjectResponse' :: PutObjectResponse -> Maybe (Sensitive Text)
$sel:sSEKMSEncryptionContext:PutObjectResponse' :: PutObjectResponse -> Maybe (Sensitive Text)
$sel:sSECustomerKeyMD5:PutObjectResponse' :: PutObjectResponse -> Maybe Text
$sel:sSECustomerAlgorithm:PutObjectResponse' :: PutObjectResponse -> Maybe Text
$sel:requestCharged:PutObjectResponse' :: PutObjectResponse -> Maybe RequestCharged
$sel:expiration:PutObjectResponse' :: PutObjectResponse -> Maybe Text
$sel:eTag:PutObjectResponse' :: PutObjectResponse -> Maybe ETag
$sel:checksumSHA256:PutObjectResponse' :: PutObjectResponse -> Maybe Text
$sel:checksumSHA1:PutObjectResponse' :: PutObjectResponse -> Maybe Text
$sel:checksumCRC32C:PutObjectResponse' :: PutObjectResponse -> Maybe Text
$sel:checksumCRC32:PutObjectResponse' :: PutObjectResponse -> Maybe Text
$sel:bucketKeyEnabled:PutObjectResponse' :: PutObjectResponse -> 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 Text
checksumCRC32
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
checksumCRC32C
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
checksumSHA1
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
checksumSHA256
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ETag
eTag
      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