{-# 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.HeadObject
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- The HEAD action retrieves metadata from an object without returning the
-- object itself. This action is useful if you\'re only interested in an
-- object\'s metadata. To use HEAD, you must have READ access to the
-- object.
--
-- A @HEAD@ request has the same options as a @GET@ action on an object.
-- The response is identical to the @GET@ response except that there is no
-- response body. Because of this, if the @HEAD@ request generates an
-- error, it returns a generic @404 Not Found@ or @403 Forbidden@ code. It
-- is not possible to retrieve the exact exception beyond these error
-- codes.
--
-- If you encrypt an object by using server-side encryption with
-- customer-provided encryption keys (SSE-C) when you store the object in
-- Amazon S3, then when you retrieve the metadata from the object, you must
-- use the following headers:
--
-- -   x-amz-server-side-encryption-customer-algorithm
--
-- -   x-amz-server-side-encryption-customer-key
--
-- -   x-amz-server-side-encryption-customer-key-MD5
--
-- For more information about SSE-C, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html Server-Side Encryption (Using Customer-Provided Encryption Keys)>.
--
-- -   Encryption request headers, like @x-amz-server-side-encryption@,
--     should not be sent for GET requests if your object uses server-side
--     encryption with KMS keys (SSE-KMS) or server-side encryption with
--     Amazon S3–managed encryption keys (SSE-S3). If your object does use
--     these types of keys, you’ll get an HTTP 400 BadRequest error.
--
-- -   The last modified property in this case is the creation date of the
--     object.
--
-- Request headers are limited to 8 KB in size. For more information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/API/RESTCommonRequestHeaders.html Common Request Headers>.
--
-- Consider the following when using request headers:
--
-- -   Consideration 1 – If both of the @If-Match@ and
--     @If-Unmodified-Since@ headers are present in the request as follows:
--
--     -   @If-Match@ condition evaluates to @true@, and;
--
--     -   @If-Unmodified-Since@ condition evaluates to @false@;
--
--     Then Amazon S3 returns @200 OK@ and the data requested.
--
-- -   Consideration 2 – If both of the @If-None-Match@ and
--     @If-Modified-Since@ headers are present in the request as follows:
--
--     -   @If-None-Match@ condition evaluates to @false@, and;
--
--     -   @If-Modified-Since@ condition evaluates to @true@;
--
--     Then Amazon S3 returns the @304 Not Modified@ response code.
--
-- For more information about conditional requests, see
-- <https://tools.ietf.org/html/rfc7232 RFC 7232>.
--
-- __Permissions__
--
-- You need the relevant read object (or version) permission for this
-- operation. For more information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html Specifying Permissions in a Policy>.
-- If the object you request does not exist, the error Amazon S3 returns
-- depends on whether you also have the s3:ListBucket permission.
--
-- -   If you have the @s3:ListBucket@ permission on the bucket, Amazon S3
--     returns an HTTP status code 404 (\"no such key\") error.
--
-- -   If you don’t have the @s3:ListBucket@ permission, Amazon S3 returns
--     an HTTP status code 403 (\"access denied\") error.
--
-- The following actions are related to @HeadObject@:
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html GetObject>
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html GetObjectAttributes>
module Amazonka.S3.HeadObject
  ( -- * Creating a Request
    HeadObject (..),
    newHeadObject,

    -- * Request Lenses
    headObject_checksumMode,
    headObject_expectedBucketOwner,
    headObject_ifMatch,
    headObject_ifModifiedSince,
    headObject_ifNoneMatch,
    headObject_ifUnmodifiedSince,
    headObject_partNumber,
    headObject_range,
    headObject_requestPayer,
    headObject_sSECustomerAlgorithm,
    headObject_sSECustomerKey,
    headObject_sSECustomerKeyMD5,
    headObject_versionId,
    headObject_bucket,
    headObject_key,

    -- * Destructuring the Response
    HeadObjectResponse (..),
    newHeadObjectResponse,

    -- * Response Lenses
    headObjectResponse_acceptRanges,
    headObjectResponse_archiveStatus,
    headObjectResponse_bucketKeyEnabled,
    headObjectResponse_cacheControl,
    headObjectResponse_checksumCRC32,
    headObjectResponse_checksumCRC32C,
    headObjectResponse_checksumSHA1,
    headObjectResponse_checksumSHA256,
    headObjectResponse_contentDisposition,
    headObjectResponse_contentEncoding,
    headObjectResponse_contentLanguage,
    headObjectResponse_contentLength,
    headObjectResponse_contentType,
    headObjectResponse_deleteMarker,
    headObjectResponse_eTag,
    headObjectResponse_expiration,
    headObjectResponse_expires,
    headObjectResponse_lastModified,
    headObjectResponse_metadata,
    headObjectResponse_missingMeta,
    headObjectResponse_objectLockLegalHoldStatus,
    headObjectResponse_objectLockMode,
    headObjectResponse_objectLockRetainUntilDate,
    headObjectResponse_partsCount,
    headObjectResponse_replicationStatus,
    headObjectResponse_requestCharged,
    headObjectResponse_restore,
    headObjectResponse_sSECustomerAlgorithm,
    headObjectResponse_sSECustomerKeyMD5,
    headObjectResponse_sSEKMSKeyId,
    headObjectResponse_serverSideEncryption,
    headObjectResponse_storageClass,
    headObjectResponse_versionId,
    headObjectResponse_websiteRedirectLocation,
    headObjectResponse_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:/ 'newHeadObject' smart constructor.
data HeadObject = HeadObject'
  { -- | To retrieve the checksum, this parameter must be enabled.
    --
    -- In addition, if you enable @ChecksumMode@ and the object is encrypted
    -- with Amazon Web Services Key Management Service (Amazon Web Services
    -- KMS), you must have permission to use the @kms:Decrypt@ action for the
    -- request to succeed.
    HeadObject -> Maybe ChecksumMode
checksumMode :: Prelude.Maybe ChecksumMode,
    -- | 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).
    HeadObject -> Maybe Text
expectedBucketOwner :: Prelude.Maybe Prelude.Text,
    -- | Return the object only if its entity tag (ETag) is the same as the one
    -- specified; otherwise, return a 412 (precondition failed) error.
    HeadObject -> Maybe Text
ifMatch :: Prelude.Maybe Prelude.Text,
    -- | Return the object only if it has been modified since the specified time;
    -- otherwise, return a 304 (not modified) error.
    HeadObject -> Maybe RFC822
ifModifiedSince :: Prelude.Maybe Data.RFC822,
    -- | Return the object only if its entity tag (ETag) is different from the
    -- one specified; otherwise, return a 304 (not modified) error.
    HeadObject -> Maybe Text
ifNoneMatch :: Prelude.Maybe Prelude.Text,
    -- | Return the object only if it has not been modified since the specified
    -- time; otherwise, return a 412 (precondition failed) error.
    HeadObject -> Maybe RFC822
ifUnmodifiedSince :: Prelude.Maybe Data.RFC822,
    -- | Part number of the object being read. This is a positive integer between
    -- 1 and 10,000. Effectively performs a \'ranged\' HEAD request for the
    -- part specified. Useful querying about the size of the part and the
    -- number of parts in this object.
    HeadObject -> Maybe Int
partNumber :: Prelude.Maybe Prelude.Int,
    -- | Because @HeadObject@ returns only the metadata for an object, this
    -- parameter has no effect.
    HeadObject -> Maybe Text
range :: Prelude.Maybe Prelude.Text,
    HeadObject -> Maybe RequestPayer
requestPayer :: Prelude.Maybe RequestPayer,
    -- | Specifies the algorithm to use to when encrypting the object (for
    -- example, AES256).
    HeadObject -> 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.
    HeadObject -> 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.
    HeadObject -> Maybe Text
sSECustomerKeyMD5 :: Prelude.Maybe Prelude.Text,
    -- | VersionId used to reference a specific version of the object.
    HeadObject -> Maybe ObjectVersionId
versionId :: Prelude.Maybe ObjectVersionId,
    -- | The name of the bucket containing the object.
    --
    -- 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/.
    HeadObject -> BucketName
bucket :: BucketName,
    -- | The object key.
    HeadObject -> ObjectKey
key :: ObjectKey
  }
  deriving (HeadObject -> HeadObject -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HeadObject -> HeadObject -> Bool
$c/= :: HeadObject -> HeadObject -> Bool
== :: HeadObject -> HeadObject -> Bool
$c== :: HeadObject -> HeadObject -> Bool
Prelude.Eq, Int -> HeadObject -> ShowS
[HeadObject] -> ShowS
HeadObject -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HeadObject] -> ShowS
$cshowList :: [HeadObject] -> ShowS
show :: HeadObject -> String
$cshow :: HeadObject -> String
showsPrec :: Int -> HeadObject -> ShowS
$cshowsPrec :: Int -> HeadObject -> ShowS
Prelude.Show, forall x. Rep HeadObject x -> HeadObject
forall x. HeadObject -> Rep HeadObject x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep HeadObject x -> HeadObject
$cfrom :: forall x. HeadObject -> Rep HeadObject x
Prelude.Generic)

-- |
-- Create a value of 'HeadObject' 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:
--
-- 'checksumMode', 'headObject_checksumMode' - To retrieve the checksum, this parameter must be enabled.
--
-- In addition, if you enable @ChecksumMode@ and the object is encrypted
-- with Amazon Web Services Key Management Service (Amazon Web Services
-- KMS), you must have permission to use the @kms:Decrypt@ action for the
-- request to succeed.
--
-- 'expectedBucketOwner', 'headObject_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).
--
-- 'ifMatch', 'headObject_ifMatch' - Return the object only if its entity tag (ETag) is the same as the one
-- specified; otherwise, return a 412 (precondition failed) error.
--
-- 'ifModifiedSince', 'headObject_ifModifiedSince' - Return the object only if it has been modified since the specified time;
-- otherwise, return a 304 (not modified) error.
--
-- 'ifNoneMatch', 'headObject_ifNoneMatch' - Return the object only if its entity tag (ETag) is different from the
-- one specified; otherwise, return a 304 (not modified) error.
--
-- 'ifUnmodifiedSince', 'headObject_ifUnmodifiedSince' - Return the object only if it has not been modified since the specified
-- time; otherwise, return a 412 (precondition failed) error.
--
-- 'partNumber', 'headObject_partNumber' - Part number of the object being read. This is a positive integer between
-- 1 and 10,000. Effectively performs a \'ranged\' HEAD request for the
-- part specified. Useful querying about the size of the part and the
-- number of parts in this object.
--
-- 'range', 'headObject_range' - Because @HeadObject@ returns only the metadata for an object, this
-- parameter has no effect.
--
-- 'requestPayer', 'headObject_requestPayer' - Undocumented member.
--
-- 'sSECustomerAlgorithm', 'headObject_sSECustomerAlgorithm' - Specifies the algorithm to use to when encrypting the object (for
-- example, AES256).
--
-- 'sSECustomerKey', 'headObject_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', 'headObject_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.
--
-- 'versionId', 'headObject_versionId' - VersionId used to reference a specific version of the object.
--
-- 'bucket', 'headObject_bucket' - The name of the bucket containing the object.
--
-- 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', 'headObject_key' - The object key.
newHeadObject ::
  -- | 'bucket'
  BucketName ->
  -- | 'key'
  ObjectKey ->
  HeadObject
newHeadObject :: BucketName -> ObjectKey -> HeadObject
newHeadObject BucketName
pBucket_ ObjectKey
pKey_ =
  HeadObject'
    { $sel:checksumMode:HeadObject' :: Maybe ChecksumMode
checksumMode = forall a. Maybe a
Prelude.Nothing,
      $sel:expectedBucketOwner:HeadObject' :: Maybe Text
expectedBucketOwner = forall a. Maybe a
Prelude.Nothing,
      $sel:ifMatch:HeadObject' :: Maybe Text
ifMatch = forall a. Maybe a
Prelude.Nothing,
      $sel:ifModifiedSince:HeadObject' :: Maybe RFC822
ifModifiedSince = forall a. Maybe a
Prelude.Nothing,
      $sel:ifNoneMatch:HeadObject' :: Maybe Text
ifNoneMatch = forall a. Maybe a
Prelude.Nothing,
      $sel:ifUnmodifiedSince:HeadObject' :: Maybe RFC822
ifUnmodifiedSince = forall a. Maybe a
Prelude.Nothing,
      $sel:partNumber:HeadObject' :: Maybe Int
partNumber = forall a. Maybe a
Prelude.Nothing,
      $sel:range:HeadObject' :: Maybe Text
range = forall a. Maybe a
Prelude.Nothing,
      $sel:requestPayer:HeadObject' :: Maybe RequestPayer
requestPayer = forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerAlgorithm:HeadObject' :: Maybe Text
sSECustomerAlgorithm = forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerKey:HeadObject' :: Maybe (Sensitive Text)
sSECustomerKey = forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerKeyMD5:HeadObject' :: Maybe Text
sSECustomerKeyMD5 = forall a. Maybe a
Prelude.Nothing,
      $sel:versionId:HeadObject' :: Maybe ObjectVersionId
versionId = forall a. Maybe a
Prelude.Nothing,
      $sel:bucket:HeadObject' :: BucketName
bucket = BucketName
pBucket_,
      $sel:key:HeadObject' :: ObjectKey
key = ObjectKey
pKey_
    }

-- | To retrieve the checksum, this parameter must be enabled.
--
-- In addition, if you enable @ChecksumMode@ and the object is encrypted
-- with Amazon Web Services Key Management Service (Amazon Web Services
-- KMS), you must have permission to use the @kms:Decrypt@ action for the
-- request to succeed.
headObject_checksumMode :: Lens.Lens' HeadObject (Prelude.Maybe ChecksumMode)
headObject_checksumMode :: Lens' HeadObject (Maybe ChecksumMode)
headObject_checksumMode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HeadObject' {Maybe ChecksumMode
checksumMode :: Maybe ChecksumMode
$sel:checksumMode:HeadObject' :: HeadObject -> Maybe ChecksumMode
checksumMode} -> Maybe ChecksumMode
checksumMode) (\s :: HeadObject
s@HeadObject' {} Maybe ChecksumMode
a -> HeadObject
s {$sel:checksumMode:HeadObject' :: Maybe ChecksumMode
checksumMode = Maybe ChecksumMode
a} :: HeadObject)

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

-- | Return the object only if its entity tag (ETag) is the same as the one
-- specified; otherwise, return a 412 (precondition failed) error.
headObject_ifMatch :: Lens.Lens' HeadObject (Prelude.Maybe Prelude.Text)
headObject_ifMatch :: Lens' HeadObject (Maybe Text)
headObject_ifMatch = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HeadObject' {Maybe Text
ifMatch :: Maybe Text
$sel:ifMatch:HeadObject' :: HeadObject -> Maybe Text
ifMatch} -> Maybe Text
ifMatch) (\s :: HeadObject
s@HeadObject' {} Maybe Text
a -> HeadObject
s {$sel:ifMatch:HeadObject' :: Maybe Text
ifMatch = Maybe Text
a} :: HeadObject)

-- | Return the object only if it has been modified since the specified time;
-- otherwise, return a 304 (not modified) error.
headObject_ifModifiedSince :: Lens.Lens' HeadObject (Prelude.Maybe Prelude.UTCTime)
headObject_ifModifiedSince :: Lens' HeadObject (Maybe UTCTime)
headObject_ifModifiedSince = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HeadObject' {Maybe RFC822
ifModifiedSince :: Maybe RFC822
$sel:ifModifiedSince:HeadObject' :: HeadObject -> Maybe RFC822
ifModifiedSince} -> Maybe RFC822
ifModifiedSince) (\s :: HeadObject
s@HeadObject' {} Maybe RFC822
a -> HeadObject
s {$sel:ifModifiedSince:HeadObject' :: Maybe RFC822
ifModifiedSince = Maybe RFC822
a} :: HeadObject) 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

-- | Return the object only if its entity tag (ETag) is different from the
-- one specified; otherwise, return a 304 (not modified) error.
headObject_ifNoneMatch :: Lens.Lens' HeadObject (Prelude.Maybe Prelude.Text)
headObject_ifNoneMatch :: Lens' HeadObject (Maybe Text)
headObject_ifNoneMatch = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HeadObject' {Maybe Text
ifNoneMatch :: Maybe Text
$sel:ifNoneMatch:HeadObject' :: HeadObject -> Maybe Text
ifNoneMatch} -> Maybe Text
ifNoneMatch) (\s :: HeadObject
s@HeadObject' {} Maybe Text
a -> HeadObject
s {$sel:ifNoneMatch:HeadObject' :: Maybe Text
ifNoneMatch = Maybe Text
a} :: HeadObject)

-- | Return the object only if it has not been modified since the specified
-- time; otherwise, return a 412 (precondition failed) error.
headObject_ifUnmodifiedSince :: Lens.Lens' HeadObject (Prelude.Maybe Prelude.UTCTime)
headObject_ifUnmodifiedSince :: Lens' HeadObject (Maybe UTCTime)
headObject_ifUnmodifiedSince = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HeadObject' {Maybe RFC822
ifUnmodifiedSince :: Maybe RFC822
$sel:ifUnmodifiedSince:HeadObject' :: HeadObject -> Maybe RFC822
ifUnmodifiedSince} -> Maybe RFC822
ifUnmodifiedSince) (\s :: HeadObject
s@HeadObject' {} Maybe RFC822
a -> HeadObject
s {$sel:ifUnmodifiedSince:HeadObject' :: Maybe RFC822
ifUnmodifiedSince = Maybe RFC822
a} :: HeadObject) 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

-- | Part number of the object being read. This is a positive integer between
-- 1 and 10,000. Effectively performs a \'ranged\' HEAD request for the
-- part specified. Useful querying about the size of the part and the
-- number of parts in this object.
headObject_partNumber :: Lens.Lens' HeadObject (Prelude.Maybe Prelude.Int)
headObject_partNumber :: Lens' HeadObject (Maybe Int)
headObject_partNumber = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HeadObject' {Maybe Int
partNumber :: Maybe Int
$sel:partNumber:HeadObject' :: HeadObject -> Maybe Int
partNumber} -> Maybe Int
partNumber) (\s :: HeadObject
s@HeadObject' {} Maybe Int
a -> HeadObject
s {$sel:partNumber:HeadObject' :: Maybe Int
partNumber = Maybe Int
a} :: HeadObject)

-- | Because @HeadObject@ returns only the metadata for an object, this
-- parameter has no effect.
headObject_range :: Lens.Lens' HeadObject (Prelude.Maybe Prelude.Text)
headObject_range :: Lens' HeadObject (Maybe Text)
headObject_range = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HeadObject' {Maybe Text
range :: Maybe Text
$sel:range:HeadObject' :: HeadObject -> Maybe Text
range} -> Maybe Text
range) (\s :: HeadObject
s@HeadObject' {} Maybe Text
a -> HeadObject
s {$sel:range:HeadObject' :: Maybe Text
range = Maybe Text
a} :: HeadObject)

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

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

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

-- | VersionId used to reference a specific version of the object.
headObject_versionId :: Lens.Lens' HeadObject (Prelude.Maybe ObjectVersionId)
headObject_versionId :: Lens' HeadObject (Maybe ObjectVersionId)
headObject_versionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HeadObject' {Maybe ObjectVersionId
versionId :: Maybe ObjectVersionId
$sel:versionId:HeadObject' :: HeadObject -> Maybe ObjectVersionId
versionId} -> Maybe ObjectVersionId
versionId) (\s :: HeadObject
s@HeadObject' {} Maybe ObjectVersionId
a -> HeadObject
s {$sel:versionId:HeadObject' :: Maybe ObjectVersionId
versionId = Maybe ObjectVersionId
a} :: HeadObject)

-- | The name of the bucket containing the object.
--
-- 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/.
headObject_bucket :: Lens.Lens' HeadObject BucketName
headObject_bucket :: Lens' HeadObject BucketName
headObject_bucket = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HeadObject' {BucketName
bucket :: BucketName
$sel:bucket:HeadObject' :: HeadObject -> BucketName
bucket} -> BucketName
bucket) (\s :: HeadObject
s@HeadObject' {} BucketName
a -> HeadObject
s {$sel:bucket:HeadObject' :: BucketName
bucket = BucketName
a} :: HeadObject)

-- | The object key.
headObject_key :: Lens.Lens' HeadObject ObjectKey
headObject_key :: Lens' HeadObject ObjectKey
headObject_key = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HeadObject' {ObjectKey
key :: ObjectKey
$sel:key:HeadObject' :: HeadObject -> ObjectKey
key} -> ObjectKey
key) (\s :: HeadObject
s@HeadObject' {} ObjectKey
a -> HeadObject
s {$sel:key:HeadObject' :: ObjectKey
key = ObjectKey
a} :: HeadObject)

instance Core.AWSRequest HeadObject where
  type AWSResponse HeadObject = HeadObjectResponse
  request :: (Service -> Service) -> HeadObject -> Request HeadObject
request Service -> Service
overrides =
    forall a. Request a -> Request a
Request.s3vhost
      forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a. ToRequest a => Service -> a -> Request a
Request.head' (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy HeadObject
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse HeadObject)))
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 Text
-> Maybe ArchiveStatus
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Bool
-> Maybe ETag
-> Maybe Text
-> Maybe RFC822
-> Maybe RFC822
-> HashMap Text Text
-> Maybe Int
-> Maybe ObjectLockLegalHoldStatus
-> Maybe ObjectLockMode
-> Maybe ISO8601
-> Maybe Int
-> Maybe ReplicationStatus
-> Maybe RequestCharged
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe ServerSideEncryption
-> Maybe StorageClass
-> Maybe ObjectVersionId
-> Maybe Text
-> Int
-> HeadObjectResponse
HeadObjectResponse'
            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
"accept-ranges")
            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-archive-status")
            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-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
"Cache-Control")
            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
"Content-Disposition")
            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
"Content-Encoding")
            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
"Content-Language")
            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
"Content-Length")
            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
"Content-Type")
            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-delete-marker")
            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
"Expires")
            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
"Last-Modified")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall a.
FromText a =>
ByteString -> ResponseHeaders -> Either String (HashMap Text a)
Data.parseHeadersMap ByteString
"x-amz-meta-" ResponseHeaders
h)
            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-missing-meta")
            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-object-lock-legal-hold")
            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-object-lock-mode")
            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-object-lock-retain-until-date")
            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-mp-parts-count")
            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-replication-status")
            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-restore")
            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-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-storage-class")
            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.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-website-redirect-location")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable HeadObject where
  hashWithSalt :: Int -> HeadObject -> Int
hashWithSalt Int
_salt HeadObject' {Maybe Int
Maybe Text
Maybe (Sensitive Text)
Maybe RFC822
Maybe ObjectVersionId
Maybe ChecksumMode
Maybe RequestPayer
ObjectKey
BucketName
key :: ObjectKey
bucket :: BucketName
versionId :: Maybe ObjectVersionId
sSECustomerKeyMD5 :: Maybe Text
sSECustomerKey :: Maybe (Sensitive Text)
sSECustomerAlgorithm :: Maybe Text
requestPayer :: Maybe RequestPayer
range :: Maybe Text
partNumber :: Maybe Int
ifUnmodifiedSince :: Maybe RFC822
ifNoneMatch :: Maybe Text
ifModifiedSince :: Maybe RFC822
ifMatch :: Maybe Text
expectedBucketOwner :: Maybe Text
checksumMode :: Maybe ChecksumMode
$sel:key:HeadObject' :: HeadObject -> ObjectKey
$sel:bucket:HeadObject' :: HeadObject -> BucketName
$sel:versionId:HeadObject' :: HeadObject -> Maybe ObjectVersionId
$sel:sSECustomerKeyMD5:HeadObject' :: HeadObject -> Maybe Text
$sel:sSECustomerKey:HeadObject' :: HeadObject -> Maybe (Sensitive Text)
$sel:sSECustomerAlgorithm:HeadObject' :: HeadObject -> Maybe Text
$sel:requestPayer:HeadObject' :: HeadObject -> Maybe RequestPayer
$sel:range:HeadObject' :: HeadObject -> Maybe Text
$sel:partNumber:HeadObject' :: HeadObject -> Maybe Int
$sel:ifUnmodifiedSince:HeadObject' :: HeadObject -> Maybe RFC822
$sel:ifNoneMatch:HeadObject' :: HeadObject -> Maybe Text
$sel:ifModifiedSince:HeadObject' :: HeadObject -> Maybe RFC822
$sel:ifMatch:HeadObject' :: HeadObject -> Maybe Text
$sel:expectedBucketOwner:HeadObject' :: HeadObject -> Maybe Text
$sel:checksumMode:HeadObject' :: HeadObject -> Maybe ChecksumMode
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ChecksumMode
checksumMode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
expectedBucketOwner
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ifMatch
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RFC822
ifModifiedSince
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ifNoneMatch
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RFC822
ifUnmodifiedSince
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
partNumber
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
range
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RequestPayer
requestPayer
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sSECustomerAlgorithm
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
sSECustomerKey
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sSECustomerKeyMD5
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ObjectVersionId
versionId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` BucketName
bucket
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ObjectKey
key

instance Prelude.NFData HeadObject where
  rnf :: HeadObject -> ()
rnf HeadObject' {Maybe Int
Maybe Text
Maybe (Sensitive Text)
Maybe RFC822
Maybe ObjectVersionId
Maybe ChecksumMode
Maybe RequestPayer
ObjectKey
BucketName
key :: ObjectKey
bucket :: BucketName
versionId :: Maybe ObjectVersionId
sSECustomerKeyMD5 :: Maybe Text
sSECustomerKey :: Maybe (Sensitive Text)
sSECustomerAlgorithm :: Maybe Text
requestPayer :: Maybe RequestPayer
range :: Maybe Text
partNumber :: Maybe Int
ifUnmodifiedSince :: Maybe RFC822
ifNoneMatch :: Maybe Text
ifModifiedSince :: Maybe RFC822
ifMatch :: Maybe Text
expectedBucketOwner :: Maybe Text
checksumMode :: Maybe ChecksumMode
$sel:key:HeadObject' :: HeadObject -> ObjectKey
$sel:bucket:HeadObject' :: HeadObject -> BucketName
$sel:versionId:HeadObject' :: HeadObject -> Maybe ObjectVersionId
$sel:sSECustomerKeyMD5:HeadObject' :: HeadObject -> Maybe Text
$sel:sSECustomerKey:HeadObject' :: HeadObject -> Maybe (Sensitive Text)
$sel:sSECustomerAlgorithm:HeadObject' :: HeadObject -> Maybe Text
$sel:requestPayer:HeadObject' :: HeadObject -> Maybe RequestPayer
$sel:range:HeadObject' :: HeadObject -> Maybe Text
$sel:partNumber:HeadObject' :: HeadObject -> Maybe Int
$sel:ifUnmodifiedSince:HeadObject' :: HeadObject -> Maybe RFC822
$sel:ifNoneMatch:HeadObject' :: HeadObject -> Maybe Text
$sel:ifModifiedSince:HeadObject' :: HeadObject -> Maybe RFC822
$sel:ifMatch:HeadObject' :: HeadObject -> Maybe Text
$sel:expectedBucketOwner:HeadObject' :: HeadObject -> Maybe Text
$sel:checksumMode:HeadObject' :: HeadObject -> Maybe ChecksumMode
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe ChecksumMode
checksumMode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
expectedBucketOwner
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ifMatch
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RFC822
ifModifiedSince
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ifNoneMatch
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RFC822
ifUnmodifiedSince
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
partNumber
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
range
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RequestPayer
requestPayer
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sSECustomerAlgorithm
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
sSECustomerKey
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sSECustomerKeyMD5
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ObjectVersionId
versionId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf BucketName
bucket
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ObjectKey
key

instance Data.ToHeaders HeadObject where
  toHeaders :: HeadObject -> ResponseHeaders
toHeaders HeadObject' {Maybe Int
Maybe Text
Maybe (Sensitive Text)
Maybe RFC822
Maybe ObjectVersionId
Maybe ChecksumMode
Maybe RequestPayer
ObjectKey
BucketName
key :: ObjectKey
bucket :: BucketName
versionId :: Maybe ObjectVersionId
sSECustomerKeyMD5 :: Maybe Text
sSECustomerKey :: Maybe (Sensitive Text)
sSECustomerAlgorithm :: Maybe Text
requestPayer :: Maybe RequestPayer
range :: Maybe Text
partNumber :: Maybe Int
ifUnmodifiedSince :: Maybe RFC822
ifNoneMatch :: Maybe Text
ifModifiedSince :: Maybe RFC822
ifMatch :: Maybe Text
expectedBucketOwner :: Maybe Text
checksumMode :: Maybe ChecksumMode
$sel:key:HeadObject' :: HeadObject -> ObjectKey
$sel:bucket:HeadObject' :: HeadObject -> BucketName
$sel:versionId:HeadObject' :: HeadObject -> Maybe ObjectVersionId
$sel:sSECustomerKeyMD5:HeadObject' :: HeadObject -> Maybe Text
$sel:sSECustomerKey:HeadObject' :: HeadObject -> Maybe (Sensitive Text)
$sel:sSECustomerAlgorithm:HeadObject' :: HeadObject -> Maybe Text
$sel:requestPayer:HeadObject' :: HeadObject -> Maybe RequestPayer
$sel:range:HeadObject' :: HeadObject -> Maybe Text
$sel:partNumber:HeadObject' :: HeadObject -> Maybe Int
$sel:ifUnmodifiedSince:HeadObject' :: HeadObject -> Maybe RFC822
$sel:ifNoneMatch:HeadObject' :: HeadObject -> Maybe Text
$sel:ifModifiedSince:HeadObject' :: HeadObject -> Maybe RFC822
$sel:ifMatch:HeadObject' :: HeadObject -> Maybe Text
$sel:expectedBucketOwner:HeadObject' :: HeadObject -> Maybe Text
$sel:checksumMode:HeadObject' :: HeadObject -> Maybe ChecksumMode
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ HeaderName
"x-amz-checksum-mode" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe ChecksumMode
checksumMode,
        HeaderName
"x-amz-expected-bucket-owner"
          forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
expectedBucketOwner,
        HeaderName
"If-Match" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
ifMatch,
        HeaderName
"If-Modified-Since" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe RFC822
ifModifiedSince,
        HeaderName
"If-None-Match" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
ifNoneMatch,
        HeaderName
"If-Unmodified-Since" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe RFC822
ifUnmodifiedSince,
        HeaderName
"Range" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
range,
        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
      ]

instance Data.ToPath HeadObject where
  toPath :: HeadObject -> ByteString
toPath HeadObject' {Maybe Int
Maybe Text
Maybe (Sensitive Text)
Maybe RFC822
Maybe ObjectVersionId
Maybe ChecksumMode
Maybe RequestPayer
ObjectKey
BucketName
key :: ObjectKey
bucket :: BucketName
versionId :: Maybe ObjectVersionId
sSECustomerKeyMD5 :: Maybe Text
sSECustomerKey :: Maybe (Sensitive Text)
sSECustomerAlgorithm :: Maybe Text
requestPayer :: Maybe RequestPayer
range :: Maybe Text
partNumber :: Maybe Int
ifUnmodifiedSince :: Maybe RFC822
ifNoneMatch :: Maybe Text
ifModifiedSince :: Maybe RFC822
ifMatch :: Maybe Text
expectedBucketOwner :: Maybe Text
checksumMode :: Maybe ChecksumMode
$sel:key:HeadObject' :: HeadObject -> ObjectKey
$sel:bucket:HeadObject' :: HeadObject -> BucketName
$sel:versionId:HeadObject' :: HeadObject -> Maybe ObjectVersionId
$sel:sSECustomerKeyMD5:HeadObject' :: HeadObject -> Maybe Text
$sel:sSECustomerKey:HeadObject' :: HeadObject -> Maybe (Sensitive Text)
$sel:sSECustomerAlgorithm:HeadObject' :: HeadObject -> Maybe Text
$sel:requestPayer:HeadObject' :: HeadObject -> Maybe RequestPayer
$sel:range:HeadObject' :: HeadObject -> Maybe Text
$sel:partNumber:HeadObject' :: HeadObject -> Maybe Int
$sel:ifUnmodifiedSince:HeadObject' :: HeadObject -> Maybe RFC822
$sel:ifNoneMatch:HeadObject' :: HeadObject -> Maybe Text
$sel:ifModifiedSince:HeadObject' :: HeadObject -> Maybe RFC822
$sel:ifMatch:HeadObject' :: HeadObject -> Maybe Text
$sel:expectedBucketOwner:HeadObject' :: HeadObject -> Maybe Text
$sel:checksumMode:HeadObject' :: HeadObject -> Maybe ChecksumMode
..} =
    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 HeadObject where
  toQuery :: HeadObject -> QueryString
toQuery HeadObject' {Maybe Int
Maybe Text
Maybe (Sensitive Text)
Maybe RFC822
Maybe ObjectVersionId
Maybe ChecksumMode
Maybe RequestPayer
ObjectKey
BucketName
key :: ObjectKey
bucket :: BucketName
versionId :: Maybe ObjectVersionId
sSECustomerKeyMD5 :: Maybe Text
sSECustomerKey :: Maybe (Sensitive Text)
sSECustomerAlgorithm :: Maybe Text
requestPayer :: Maybe RequestPayer
range :: Maybe Text
partNumber :: Maybe Int
ifUnmodifiedSince :: Maybe RFC822
ifNoneMatch :: Maybe Text
ifModifiedSince :: Maybe RFC822
ifMatch :: Maybe Text
expectedBucketOwner :: Maybe Text
checksumMode :: Maybe ChecksumMode
$sel:key:HeadObject' :: HeadObject -> ObjectKey
$sel:bucket:HeadObject' :: HeadObject -> BucketName
$sel:versionId:HeadObject' :: HeadObject -> Maybe ObjectVersionId
$sel:sSECustomerKeyMD5:HeadObject' :: HeadObject -> Maybe Text
$sel:sSECustomerKey:HeadObject' :: HeadObject -> Maybe (Sensitive Text)
$sel:sSECustomerAlgorithm:HeadObject' :: HeadObject -> Maybe Text
$sel:requestPayer:HeadObject' :: HeadObject -> Maybe RequestPayer
$sel:range:HeadObject' :: HeadObject -> Maybe Text
$sel:partNumber:HeadObject' :: HeadObject -> Maybe Int
$sel:ifUnmodifiedSince:HeadObject' :: HeadObject -> Maybe RFC822
$sel:ifNoneMatch:HeadObject' :: HeadObject -> Maybe Text
$sel:ifModifiedSince:HeadObject' :: HeadObject -> Maybe RFC822
$sel:ifMatch:HeadObject' :: HeadObject -> Maybe Text
$sel:expectedBucketOwner:HeadObject' :: HeadObject -> Maybe Text
$sel:checksumMode:HeadObject' :: HeadObject -> Maybe ChecksumMode
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"partNumber" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
partNumber,
        ByteString
"versionId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe ObjectVersionId
versionId
      ]

-- | /See:/ 'newHeadObjectResponse' smart constructor.
data HeadObjectResponse = HeadObjectResponse'
  { -- | Indicates that a range of bytes was specified.
    HeadObjectResponse -> Maybe Text
acceptRanges :: Prelude.Maybe Prelude.Text,
    -- | The archive state of the head object.
    HeadObjectResponse -> Maybe ArchiveStatus
archiveStatus :: Prelude.Maybe ArchiveStatus,
    -- | Indicates whether the object uses an S3 Bucket Key for server-side
    -- encryption with Amazon Web Services KMS (SSE-KMS).
    HeadObjectResponse -> Maybe Bool
bucketKeyEnabled :: Prelude.Maybe Prelude.Bool,
    -- | Specifies caching behavior along the request\/reply chain.
    HeadObjectResponse -> Maybe Text
cacheControl :: Prelude.Maybe Prelude.Text,
    -- | 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/.
    HeadObjectResponse -> 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/.
    HeadObjectResponse -> 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/.
    HeadObjectResponse -> 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/.
    HeadObjectResponse -> Maybe Text
checksumSHA256 :: Prelude.Maybe Prelude.Text,
    -- | Specifies presentational information for the object.
    HeadObjectResponse -> 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.
    HeadObjectResponse -> Maybe Text
contentEncoding :: Prelude.Maybe Prelude.Text,
    -- | The language the content is in.
    HeadObjectResponse -> Maybe Text
contentLanguage :: Prelude.Maybe Prelude.Text,
    -- | Size of the body in bytes.
    HeadObjectResponse -> Maybe Integer
contentLength :: Prelude.Maybe Prelude.Integer,
    -- | A standard MIME type describing the format of the object data.
    HeadObjectResponse -> Maybe Text
contentType :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether the object retrieved was (true) or was not (false) a
    -- Delete Marker. If false, this response header does not appear in the
    -- response.
    HeadObjectResponse -> Maybe Bool
deleteMarker :: Prelude.Maybe Prelude.Bool,
    -- | An entity tag (ETag) is an opaque identifier assigned by a web server to
    -- a specific version of a resource found at a URL.
    HeadObjectResponse -> Maybe ETag
eTag :: Prelude.Maybe ETag,
    -- | If the object expiration is configured (see PUT Bucket lifecycle), the
    -- response includes this header. It includes the @expiry-date@ and
    -- @rule-id@ key-value pairs providing object expiration information. The
    -- value of the @rule-id@ is URL-encoded.
    HeadObjectResponse -> Maybe Text
expiration :: Prelude.Maybe Prelude.Text,
    -- | The date and time at which the object is no longer cacheable.
    HeadObjectResponse -> Maybe RFC822
expires :: Prelude.Maybe Data.RFC822,
    -- | Creation date of the object.
    HeadObjectResponse -> Maybe RFC822
lastModified :: Prelude.Maybe Data.RFC822,
    -- | A map of metadata to store with the object in S3.
    HeadObjectResponse -> HashMap Text Text
metadata :: Prelude.HashMap Prelude.Text Prelude.Text,
    -- | This is set to the number of metadata entries not returned in
    -- @x-amz-meta@ headers. This can happen if you create metadata using an
    -- API like SOAP that supports more flexible metadata than the REST API.
    -- For example, using SOAP, you can create metadata whose values are not
    -- legal HTTP headers.
    HeadObjectResponse -> Maybe Int
missingMeta :: Prelude.Maybe Prelude.Int,
    -- | Specifies whether a legal hold is in effect for this object. This header
    -- is only returned if the requester has the @s3:GetObjectLegalHold@
    -- permission. This header is not returned if the specified version of this
    -- object has never had a legal hold applied. For more information about S3
    -- Object Lock, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html Object Lock>.
    HeadObjectResponse -> Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus :: Prelude.Maybe ObjectLockLegalHoldStatus,
    -- | The Object Lock mode, if any, that\'s in effect for this object. This
    -- header is only returned if the requester has the @s3:GetObjectRetention@
    -- permission. For more information about S3 Object Lock, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html Object Lock>.
    HeadObjectResponse -> Maybe ObjectLockMode
objectLockMode :: Prelude.Maybe ObjectLockMode,
    -- | The date and time when the Object Lock retention period expires. This
    -- header is only returned if the requester has the @s3:GetObjectRetention@
    -- permission.
    HeadObjectResponse -> Maybe ISO8601
objectLockRetainUntilDate :: Prelude.Maybe Data.ISO8601,
    -- | The count of parts this object has. This value is only returned if you
    -- specify @partNumber@ in your request and the object was uploaded as a
    -- multipart upload.
    HeadObjectResponse -> Maybe Int
partsCount :: Prelude.Maybe Prelude.Int,
    -- | Amazon S3 can return this header if your request involves a bucket that
    -- is either a source or a destination in a replication rule.
    --
    -- In replication, you have a source bucket on which you configure
    -- replication and destination bucket or buckets where Amazon S3 stores
    -- object replicas. When you request an object (@GetObject@) or object
    -- metadata (@HeadObject@) from these buckets, Amazon S3 will return the
    -- @x-amz-replication-status@ header in the response as follows:
    --
    -- -   __If requesting an object from the source bucket__, Amazon S3 will
    --     return the @x-amz-replication-status@ header if the object in your
    --     request is eligible for replication.
    --
    --     For example, suppose that in your replication configuration, you
    --     specify object prefix @TaxDocs@ requesting Amazon S3 to replicate
    --     objects with key prefix @TaxDocs@. Any objects you upload with this
    --     key name prefix, for example @TaxDocs\/document1.pdf@, are eligible
    --     for replication. For any object request with this key name prefix,
    --     Amazon S3 will return the @x-amz-replication-status@ header with
    --     value PENDING, COMPLETED or FAILED indicating object replication
    --     status.
    --
    -- -   __If requesting an object from a destination bucket__, Amazon S3
    --     will return the @x-amz-replication-status@ header with value REPLICA
    --     if the object in your request is a replica that Amazon S3 created
    --     and there is no replica modification replication in progress.
    --
    -- -   __When replicating objects to multiple destination buckets__, the
    --     @x-amz-replication-status@ header acts differently. The header of
    --     the source object will only return a value of COMPLETED when
    --     replication is successful to all destinations. The header will
    --     remain at value PENDING until replication has completed for all
    --     destinations. If one or more destinations fails replication the
    --     header will return FAILED.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html Replication>.
    HeadObjectResponse -> Maybe ReplicationStatus
replicationStatus :: Prelude.Maybe ReplicationStatus,
    HeadObjectResponse -> Maybe RequestCharged
requestCharged :: Prelude.Maybe RequestCharged,
    -- | If the object is an archived object (an object whose storage class is
    -- GLACIER), the response includes this header if either the archive
    -- restoration is in progress (see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html RestoreObject>
    -- or an archive copy is already restored.
    --
    -- If an archive copy is already restored, the header value indicates when
    -- Amazon S3 is scheduled to delete the object copy. For example:
    --
    -- @x-amz-restore: ongoing-request=\"false\", expiry-date=\"Fri, 21 Dec 2012 00:00:00 GMT\"@
    --
    -- If the object restoration is in progress, the header returns the value
    -- @ongoing-request=\"true\"@.
    --
    -- For more information about archiving objects, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html#lifecycle-transition-general-considerations Transitioning Objects: General Considerations>.
    HeadObjectResponse -> Maybe Text
restore :: Prelude.Maybe Prelude.Text,
    -- | If server-side encryption with a customer-provided encryption key was
    -- requested, the response will include this header confirming the
    -- encryption algorithm used.
    HeadObjectResponse -> 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.
    HeadObjectResponse -> Maybe Text
sSECustomerKeyMD5 :: Prelude.Maybe Prelude.Text,
    -- | If present, specifies the ID of the Amazon Web Services Key Management
    -- Service (Amazon Web Services KMS) symmetric customer managed key that
    -- was used for the object.
    HeadObjectResponse -> Maybe (Sensitive Text)
sSEKMSKeyId :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | If the object is stored using server-side encryption either with an
    -- Amazon Web Services KMS key or an Amazon S3-managed encryption key, the
    -- response includes this header with the value of the server-side
    -- encryption algorithm used when storing this object in Amazon S3 (for
    -- example, AES256, aws:kms).
    HeadObjectResponse -> Maybe ServerSideEncryption
serverSideEncryption :: Prelude.Maybe ServerSideEncryption,
    -- | Provides storage class information of the object. Amazon S3 returns this
    -- header for all objects except for S3 Standard storage class objects.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html Storage Classes>.
    HeadObjectResponse -> Maybe StorageClass
storageClass :: Prelude.Maybe StorageClass,
    -- | Version of the object.
    HeadObjectResponse -> Maybe ObjectVersionId
versionId :: Prelude.Maybe ObjectVersionId,
    -- | 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.
    HeadObjectResponse -> Maybe Text
websiteRedirectLocation :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    HeadObjectResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (HeadObjectResponse -> HeadObjectResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HeadObjectResponse -> HeadObjectResponse -> Bool
$c/= :: HeadObjectResponse -> HeadObjectResponse -> Bool
== :: HeadObjectResponse -> HeadObjectResponse -> Bool
$c== :: HeadObjectResponse -> HeadObjectResponse -> Bool
Prelude.Eq, Int -> HeadObjectResponse -> ShowS
[HeadObjectResponse] -> ShowS
HeadObjectResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HeadObjectResponse] -> ShowS
$cshowList :: [HeadObjectResponse] -> ShowS
show :: HeadObjectResponse -> String
$cshow :: HeadObjectResponse -> String
showsPrec :: Int -> HeadObjectResponse -> ShowS
$cshowsPrec :: Int -> HeadObjectResponse -> ShowS
Prelude.Show, forall x. Rep HeadObjectResponse x -> HeadObjectResponse
forall x. HeadObjectResponse -> Rep HeadObjectResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep HeadObjectResponse x -> HeadObjectResponse
$cfrom :: forall x. HeadObjectResponse -> Rep HeadObjectResponse x
Prelude.Generic)

-- |
-- Create a value of 'HeadObjectResponse' 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:
--
-- 'acceptRanges', 'headObjectResponse_acceptRanges' - Indicates that a range of bytes was specified.
--
-- 'archiveStatus', 'headObjectResponse_archiveStatus' - The archive state of the head object.
--
-- 'bucketKeyEnabled', 'headObjectResponse_bucketKeyEnabled' - Indicates whether the object uses an S3 Bucket Key for server-side
-- encryption with Amazon Web Services KMS (SSE-KMS).
--
-- 'cacheControl', 'headObjectResponse_cacheControl' - Specifies caching behavior along the request\/reply chain.
--
-- 'checksumCRC32', 'headObjectResponse_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', 'headObjectResponse_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', 'headObjectResponse_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', 'headObjectResponse_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/.
--
-- 'contentDisposition', 'headObjectResponse_contentDisposition' - Specifies presentational information for the object.
--
-- 'contentEncoding', 'headObjectResponse_contentEncoding' - Specifies what content encodings have been applied to the object and
-- thus what decoding mechanisms must be applied to obtain the media-type
-- referenced by the Content-Type header field.
--
-- 'contentLanguage', 'headObjectResponse_contentLanguage' - The language the content is in.
--
-- 'contentLength', 'headObjectResponse_contentLength' - Size of the body in bytes.
--
-- 'contentType', 'headObjectResponse_contentType' - A standard MIME type describing the format of the object data.
--
-- 'deleteMarker', 'headObjectResponse_deleteMarker' - Specifies whether the object retrieved was (true) or was not (false) a
-- Delete Marker. If false, this response header does not appear in the
-- response.
--
-- 'eTag', 'headObjectResponse_eTag' - An entity tag (ETag) is an opaque identifier assigned by a web server to
-- a specific version of a resource found at a URL.
--
-- 'expiration', 'headObjectResponse_expiration' - If the object expiration is configured (see PUT Bucket lifecycle), the
-- response includes this header. It includes the @expiry-date@ and
-- @rule-id@ key-value pairs providing object expiration information. The
-- value of the @rule-id@ is URL-encoded.
--
-- 'expires', 'headObjectResponse_expires' - The date and time at which the object is no longer cacheable.
--
-- 'lastModified', 'headObjectResponse_lastModified' - Creation date of the object.
--
-- 'metadata', 'headObjectResponse_metadata' - A map of metadata to store with the object in S3.
--
-- 'missingMeta', 'headObjectResponse_missingMeta' - This is set to the number of metadata entries not returned in
-- @x-amz-meta@ headers. This can happen if you create metadata using an
-- API like SOAP that supports more flexible metadata than the REST API.
-- For example, using SOAP, you can create metadata whose values are not
-- legal HTTP headers.
--
-- 'objectLockLegalHoldStatus', 'headObjectResponse_objectLockLegalHoldStatus' - Specifies whether a legal hold is in effect for this object. This header
-- is only returned if the requester has the @s3:GetObjectLegalHold@
-- permission. This header is not returned if the specified version of this
-- object has never had a legal hold applied. For more information about S3
-- Object Lock, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html Object Lock>.
--
-- 'objectLockMode', 'headObjectResponse_objectLockMode' - The Object Lock mode, if any, that\'s in effect for this object. This
-- header is only returned if the requester has the @s3:GetObjectRetention@
-- permission. For more information about S3 Object Lock, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html Object Lock>.
--
-- 'objectLockRetainUntilDate', 'headObjectResponse_objectLockRetainUntilDate' - The date and time when the Object Lock retention period expires. This
-- header is only returned if the requester has the @s3:GetObjectRetention@
-- permission.
--
-- 'partsCount', 'headObjectResponse_partsCount' - The count of parts this object has. This value is only returned if you
-- specify @partNumber@ in your request and the object was uploaded as a
-- multipart upload.
--
-- 'replicationStatus', 'headObjectResponse_replicationStatus' - Amazon S3 can return this header if your request involves a bucket that
-- is either a source or a destination in a replication rule.
--
-- In replication, you have a source bucket on which you configure
-- replication and destination bucket or buckets where Amazon S3 stores
-- object replicas. When you request an object (@GetObject@) or object
-- metadata (@HeadObject@) from these buckets, Amazon S3 will return the
-- @x-amz-replication-status@ header in the response as follows:
--
-- -   __If requesting an object from the source bucket__, Amazon S3 will
--     return the @x-amz-replication-status@ header if the object in your
--     request is eligible for replication.
--
--     For example, suppose that in your replication configuration, you
--     specify object prefix @TaxDocs@ requesting Amazon S3 to replicate
--     objects with key prefix @TaxDocs@. Any objects you upload with this
--     key name prefix, for example @TaxDocs\/document1.pdf@, are eligible
--     for replication. For any object request with this key name prefix,
--     Amazon S3 will return the @x-amz-replication-status@ header with
--     value PENDING, COMPLETED or FAILED indicating object replication
--     status.
--
-- -   __If requesting an object from a destination bucket__, Amazon S3
--     will return the @x-amz-replication-status@ header with value REPLICA
--     if the object in your request is a replica that Amazon S3 created
--     and there is no replica modification replication in progress.
--
-- -   __When replicating objects to multiple destination buckets__, the
--     @x-amz-replication-status@ header acts differently. The header of
--     the source object will only return a value of COMPLETED when
--     replication is successful to all destinations. The header will
--     remain at value PENDING until replication has completed for all
--     destinations. If one or more destinations fails replication the
--     header will return FAILED.
--
-- For more information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html Replication>.
--
-- 'requestCharged', 'headObjectResponse_requestCharged' - Undocumented member.
--
-- 'restore', 'headObjectResponse_restore' - If the object is an archived object (an object whose storage class is
-- GLACIER), the response includes this header if either the archive
-- restoration is in progress (see
-- <https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html RestoreObject>
-- or an archive copy is already restored.
--
-- If an archive copy is already restored, the header value indicates when
-- Amazon S3 is scheduled to delete the object copy. For example:
--
-- @x-amz-restore: ongoing-request=\"false\", expiry-date=\"Fri, 21 Dec 2012 00:00:00 GMT\"@
--
-- If the object restoration is in progress, the header returns the value
-- @ongoing-request=\"true\"@.
--
-- For more information about archiving objects, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html#lifecycle-transition-general-considerations Transitioning Objects: General Considerations>.
--
-- 'sSECustomerAlgorithm', 'headObjectResponse_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', 'headObjectResponse_sSECustomerKeyMD5' - If server-side encryption with a customer-provided encryption key was
-- requested, the response will include this header to provide round-trip
-- message integrity verification of the customer-provided encryption key.
--
-- 'sSEKMSKeyId', 'headObjectResponse_sSEKMSKeyId' - If present, specifies the ID of the Amazon Web Services Key Management
-- Service (Amazon Web Services KMS) symmetric customer managed key that
-- was used for the object.
--
-- 'serverSideEncryption', 'headObjectResponse_serverSideEncryption' - If the object is stored using server-side encryption either with an
-- Amazon Web Services KMS key or an Amazon S3-managed encryption key, the
-- response includes this header with the value of the server-side
-- encryption algorithm used when storing this object in Amazon S3 (for
-- example, AES256, aws:kms).
--
-- 'storageClass', 'headObjectResponse_storageClass' - Provides storage class information of the object. Amazon S3 returns this
-- header for all objects except for S3 Standard storage class objects.
--
-- For more information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html Storage Classes>.
--
-- 'versionId', 'headObjectResponse_versionId' - Version of the object.
--
-- 'websiteRedirectLocation', 'headObjectResponse_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.
--
-- 'httpStatus', 'headObjectResponse_httpStatus' - The response's http status code.
newHeadObjectResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  HeadObjectResponse
newHeadObjectResponse :: Int -> HeadObjectResponse
newHeadObjectResponse Int
pHttpStatus_ =
  HeadObjectResponse'
    { $sel:acceptRanges:HeadObjectResponse' :: Maybe Text
acceptRanges = forall a. Maybe a
Prelude.Nothing,
      $sel:archiveStatus:HeadObjectResponse' :: Maybe ArchiveStatus
archiveStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:bucketKeyEnabled:HeadObjectResponse' :: Maybe Bool
bucketKeyEnabled = forall a. Maybe a
Prelude.Nothing,
      $sel:cacheControl:HeadObjectResponse' :: Maybe Text
cacheControl = forall a. Maybe a
Prelude.Nothing,
      $sel:checksumCRC32:HeadObjectResponse' :: Maybe Text
checksumCRC32 = forall a. Maybe a
Prelude.Nothing,
      $sel:checksumCRC32C:HeadObjectResponse' :: Maybe Text
checksumCRC32C = forall a. Maybe a
Prelude.Nothing,
      $sel:checksumSHA1:HeadObjectResponse' :: Maybe Text
checksumSHA1 = forall a. Maybe a
Prelude.Nothing,
      $sel:checksumSHA256:HeadObjectResponse' :: Maybe Text
checksumSHA256 = forall a. Maybe a
Prelude.Nothing,
      $sel:contentDisposition:HeadObjectResponse' :: Maybe Text
contentDisposition = forall a. Maybe a
Prelude.Nothing,
      $sel:contentEncoding:HeadObjectResponse' :: Maybe Text
contentEncoding = forall a. Maybe a
Prelude.Nothing,
      $sel:contentLanguage:HeadObjectResponse' :: Maybe Text
contentLanguage = forall a. Maybe a
Prelude.Nothing,
      $sel:contentLength:HeadObjectResponse' :: Maybe Integer
contentLength = forall a. Maybe a
Prelude.Nothing,
      $sel:contentType:HeadObjectResponse' :: Maybe Text
contentType = forall a. Maybe a
Prelude.Nothing,
      $sel:deleteMarker:HeadObjectResponse' :: Maybe Bool
deleteMarker = forall a. Maybe a
Prelude.Nothing,
      $sel:eTag:HeadObjectResponse' :: Maybe ETag
eTag = forall a. Maybe a
Prelude.Nothing,
      $sel:expiration:HeadObjectResponse' :: Maybe Text
expiration = forall a. Maybe a
Prelude.Nothing,
      $sel:expires:HeadObjectResponse' :: Maybe RFC822
expires = forall a. Maybe a
Prelude.Nothing,
      $sel:lastModified:HeadObjectResponse' :: Maybe RFC822
lastModified = forall a. Maybe a
Prelude.Nothing,
      $sel:metadata:HeadObjectResponse' :: HashMap Text Text
metadata = forall a. Monoid a => a
Prelude.mempty,
      $sel:missingMeta:HeadObjectResponse' :: Maybe Int
missingMeta = forall a. Maybe a
Prelude.Nothing,
      $sel:objectLockLegalHoldStatus:HeadObjectResponse' :: Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:objectLockMode:HeadObjectResponse' :: Maybe ObjectLockMode
objectLockMode = forall a. Maybe a
Prelude.Nothing,
      $sel:objectLockRetainUntilDate:HeadObjectResponse' :: Maybe ISO8601
objectLockRetainUntilDate = forall a. Maybe a
Prelude.Nothing,
      $sel:partsCount:HeadObjectResponse' :: Maybe Int
partsCount = forall a. Maybe a
Prelude.Nothing,
      $sel:replicationStatus:HeadObjectResponse' :: Maybe ReplicationStatus
replicationStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:requestCharged:HeadObjectResponse' :: Maybe RequestCharged
requestCharged = forall a. Maybe a
Prelude.Nothing,
      $sel:restore:HeadObjectResponse' :: Maybe Text
restore = forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerAlgorithm:HeadObjectResponse' :: Maybe Text
sSECustomerAlgorithm = forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerKeyMD5:HeadObjectResponse' :: Maybe Text
sSECustomerKeyMD5 = forall a. Maybe a
Prelude.Nothing,
      $sel:sSEKMSKeyId:HeadObjectResponse' :: Maybe (Sensitive Text)
sSEKMSKeyId = forall a. Maybe a
Prelude.Nothing,
      $sel:serverSideEncryption:HeadObjectResponse' :: Maybe ServerSideEncryption
serverSideEncryption = forall a. Maybe a
Prelude.Nothing,
      $sel:storageClass:HeadObjectResponse' :: Maybe StorageClass
storageClass = forall a. Maybe a
Prelude.Nothing,
      $sel:versionId:HeadObjectResponse' :: Maybe ObjectVersionId
versionId = forall a. Maybe a
Prelude.Nothing,
      $sel:websiteRedirectLocation:HeadObjectResponse' :: Maybe Text
websiteRedirectLocation = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:HeadObjectResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Indicates that a range of bytes was specified.
headObjectResponse_acceptRanges :: Lens.Lens' HeadObjectResponse (Prelude.Maybe Prelude.Text)
headObjectResponse_acceptRanges :: Lens' HeadObjectResponse (Maybe Text)
headObjectResponse_acceptRanges = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HeadObjectResponse' {Maybe Text
acceptRanges :: Maybe Text
$sel:acceptRanges:HeadObjectResponse' :: HeadObjectResponse -> Maybe Text
acceptRanges} -> Maybe Text
acceptRanges) (\s :: HeadObjectResponse
s@HeadObjectResponse' {} Maybe Text
a -> HeadObjectResponse
s {$sel:acceptRanges:HeadObjectResponse' :: Maybe Text
acceptRanges = Maybe Text
a} :: HeadObjectResponse)

-- | The archive state of the head object.
headObjectResponse_archiveStatus :: Lens.Lens' HeadObjectResponse (Prelude.Maybe ArchiveStatus)
headObjectResponse_archiveStatus :: Lens' HeadObjectResponse (Maybe ArchiveStatus)
headObjectResponse_archiveStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HeadObjectResponse' {Maybe ArchiveStatus
archiveStatus :: Maybe ArchiveStatus
$sel:archiveStatus:HeadObjectResponse' :: HeadObjectResponse -> Maybe ArchiveStatus
archiveStatus} -> Maybe ArchiveStatus
archiveStatus) (\s :: HeadObjectResponse
s@HeadObjectResponse' {} Maybe ArchiveStatus
a -> HeadObjectResponse
s {$sel:archiveStatus:HeadObjectResponse' :: Maybe ArchiveStatus
archiveStatus = Maybe ArchiveStatus
a} :: HeadObjectResponse)

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

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

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

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

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

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

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

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

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

-- | Size of the body in bytes.
headObjectResponse_contentLength :: Lens.Lens' HeadObjectResponse (Prelude.Maybe Prelude.Integer)
headObjectResponse_contentLength :: Lens' HeadObjectResponse (Maybe Integer)
headObjectResponse_contentLength = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HeadObjectResponse' {Maybe Integer
contentLength :: Maybe Integer
$sel:contentLength:HeadObjectResponse' :: HeadObjectResponse -> Maybe Integer
contentLength} -> Maybe Integer
contentLength) (\s :: HeadObjectResponse
s@HeadObjectResponse' {} Maybe Integer
a -> HeadObjectResponse
s {$sel:contentLength:HeadObjectResponse' :: Maybe Integer
contentLength = Maybe Integer
a} :: HeadObjectResponse)

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

-- | Specifies whether the object retrieved was (true) or was not (false) a
-- Delete Marker. If false, this response header does not appear in the
-- response.
headObjectResponse_deleteMarker :: Lens.Lens' HeadObjectResponse (Prelude.Maybe Prelude.Bool)
headObjectResponse_deleteMarker :: Lens' HeadObjectResponse (Maybe Bool)
headObjectResponse_deleteMarker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HeadObjectResponse' {Maybe Bool
deleteMarker :: Maybe Bool
$sel:deleteMarker:HeadObjectResponse' :: HeadObjectResponse -> Maybe Bool
deleteMarker} -> Maybe Bool
deleteMarker) (\s :: HeadObjectResponse
s@HeadObjectResponse' {} Maybe Bool
a -> HeadObjectResponse
s {$sel:deleteMarker:HeadObjectResponse' :: Maybe Bool
deleteMarker = Maybe Bool
a} :: HeadObjectResponse)

-- | An entity tag (ETag) is an opaque identifier assigned by a web server to
-- a specific version of a resource found at a URL.
headObjectResponse_eTag :: Lens.Lens' HeadObjectResponse (Prelude.Maybe ETag)
headObjectResponse_eTag :: Lens' HeadObjectResponse (Maybe ETag)
headObjectResponse_eTag = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HeadObjectResponse' {Maybe ETag
eTag :: Maybe ETag
$sel:eTag:HeadObjectResponse' :: HeadObjectResponse -> Maybe ETag
eTag} -> Maybe ETag
eTag) (\s :: HeadObjectResponse
s@HeadObjectResponse' {} Maybe ETag
a -> HeadObjectResponse
s {$sel:eTag:HeadObjectResponse' :: Maybe ETag
eTag = Maybe ETag
a} :: HeadObjectResponse)

-- | If the object expiration is configured (see PUT Bucket lifecycle), the
-- response includes this header. It includes the @expiry-date@ and
-- @rule-id@ key-value pairs providing object expiration information. The
-- value of the @rule-id@ is URL-encoded.
headObjectResponse_expiration :: Lens.Lens' HeadObjectResponse (Prelude.Maybe Prelude.Text)
headObjectResponse_expiration :: Lens' HeadObjectResponse (Maybe Text)
headObjectResponse_expiration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HeadObjectResponse' {Maybe Text
expiration :: Maybe Text
$sel:expiration:HeadObjectResponse' :: HeadObjectResponse -> Maybe Text
expiration} -> Maybe Text
expiration) (\s :: HeadObjectResponse
s@HeadObjectResponse' {} Maybe Text
a -> HeadObjectResponse
s {$sel:expiration:HeadObjectResponse' :: Maybe Text
expiration = Maybe Text
a} :: HeadObjectResponse)

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

-- | Creation date of the object.
headObjectResponse_lastModified :: Lens.Lens' HeadObjectResponse (Prelude.Maybe Prelude.UTCTime)
headObjectResponse_lastModified :: Lens' HeadObjectResponse (Maybe UTCTime)
headObjectResponse_lastModified = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HeadObjectResponse' {Maybe RFC822
lastModified :: Maybe RFC822
$sel:lastModified:HeadObjectResponse' :: HeadObjectResponse -> Maybe RFC822
lastModified} -> Maybe RFC822
lastModified) (\s :: HeadObjectResponse
s@HeadObjectResponse' {} Maybe RFC822
a -> HeadObjectResponse
s {$sel:lastModified:HeadObjectResponse' :: Maybe RFC822
lastModified = Maybe RFC822
a} :: HeadObjectResponse) 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

-- | A map of metadata to store with the object in S3.
headObjectResponse_metadata :: Lens.Lens' HeadObjectResponse (Prelude.HashMap Prelude.Text Prelude.Text)
headObjectResponse_metadata :: Lens' HeadObjectResponse (HashMap Text Text)
headObjectResponse_metadata = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HeadObjectResponse' {HashMap Text Text
metadata :: HashMap Text Text
$sel:metadata:HeadObjectResponse' :: HeadObjectResponse -> HashMap Text Text
metadata} -> HashMap Text Text
metadata) (\s :: HeadObjectResponse
s@HeadObjectResponse' {} HashMap Text Text
a -> HeadObjectResponse
s {$sel:metadata:HeadObjectResponse' :: HashMap Text Text
metadata = HashMap Text Text
a} :: HeadObjectResponse) 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

-- | This is set to the number of metadata entries not returned in
-- @x-amz-meta@ headers. This can happen if you create metadata using an
-- API like SOAP that supports more flexible metadata than the REST API.
-- For example, using SOAP, you can create metadata whose values are not
-- legal HTTP headers.
headObjectResponse_missingMeta :: Lens.Lens' HeadObjectResponse (Prelude.Maybe Prelude.Int)
headObjectResponse_missingMeta :: Lens' HeadObjectResponse (Maybe Int)
headObjectResponse_missingMeta = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HeadObjectResponse' {Maybe Int
missingMeta :: Maybe Int
$sel:missingMeta:HeadObjectResponse' :: HeadObjectResponse -> Maybe Int
missingMeta} -> Maybe Int
missingMeta) (\s :: HeadObjectResponse
s@HeadObjectResponse' {} Maybe Int
a -> HeadObjectResponse
s {$sel:missingMeta:HeadObjectResponse' :: Maybe Int
missingMeta = Maybe Int
a} :: HeadObjectResponse)

-- | Specifies whether a legal hold is in effect for this object. This header
-- is only returned if the requester has the @s3:GetObjectLegalHold@
-- permission. This header is not returned if the specified version of this
-- object has never had a legal hold applied. For more information about S3
-- Object Lock, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html Object Lock>.
headObjectResponse_objectLockLegalHoldStatus :: Lens.Lens' HeadObjectResponse (Prelude.Maybe ObjectLockLegalHoldStatus)
headObjectResponse_objectLockLegalHoldStatus :: Lens' HeadObjectResponse (Maybe ObjectLockLegalHoldStatus)
headObjectResponse_objectLockLegalHoldStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HeadObjectResponse' {Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus :: Maybe ObjectLockLegalHoldStatus
$sel:objectLockLegalHoldStatus:HeadObjectResponse' :: HeadObjectResponse -> Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus} -> Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus) (\s :: HeadObjectResponse
s@HeadObjectResponse' {} Maybe ObjectLockLegalHoldStatus
a -> HeadObjectResponse
s {$sel:objectLockLegalHoldStatus:HeadObjectResponse' :: Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus = Maybe ObjectLockLegalHoldStatus
a} :: HeadObjectResponse)

-- | The Object Lock mode, if any, that\'s in effect for this object. This
-- header is only returned if the requester has the @s3:GetObjectRetention@
-- permission. For more information about S3 Object Lock, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html Object Lock>.
headObjectResponse_objectLockMode :: Lens.Lens' HeadObjectResponse (Prelude.Maybe ObjectLockMode)
headObjectResponse_objectLockMode :: Lens' HeadObjectResponse (Maybe ObjectLockMode)
headObjectResponse_objectLockMode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HeadObjectResponse' {Maybe ObjectLockMode
objectLockMode :: Maybe ObjectLockMode
$sel:objectLockMode:HeadObjectResponse' :: HeadObjectResponse -> Maybe ObjectLockMode
objectLockMode} -> Maybe ObjectLockMode
objectLockMode) (\s :: HeadObjectResponse
s@HeadObjectResponse' {} Maybe ObjectLockMode
a -> HeadObjectResponse
s {$sel:objectLockMode:HeadObjectResponse' :: Maybe ObjectLockMode
objectLockMode = Maybe ObjectLockMode
a} :: HeadObjectResponse)

-- | The date and time when the Object Lock retention period expires. This
-- header is only returned if the requester has the @s3:GetObjectRetention@
-- permission.
headObjectResponse_objectLockRetainUntilDate :: Lens.Lens' HeadObjectResponse (Prelude.Maybe Prelude.UTCTime)
headObjectResponse_objectLockRetainUntilDate :: Lens' HeadObjectResponse (Maybe UTCTime)
headObjectResponse_objectLockRetainUntilDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HeadObjectResponse' {Maybe ISO8601
objectLockRetainUntilDate :: Maybe ISO8601
$sel:objectLockRetainUntilDate:HeadObjectResponse' :: HeadObjectResponse -> Maybe ISO8601
objectLockRetainUntilDate} -> Maybe ISO8601
objectLockRetainUntilDate) (\s :: HeadObjectResponse
s@HeadObjectResponse' {} Maybe ISO8601
a -> HeadObjectResponse
s {$sel:objectLockRetainUntilDate:HeadObjectResponse' :: Maybe ISO8601
objectLockRetainUntilDate = Maybe ISO8601
a} :: HeadObjectResponse) 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

-- | The count of parts this object has. This value is only returned if you
-- specify @partNumber@ in your request and the object was uploaded as a
-- multipart upload.
headObjectResponse_partsCount :: Lens.Lens' HeadObjectResponse (Prelude.Maybe Prelude.Int)
headObjectResponse_partsCount :: Lens' HeadObjectResponse (Maybe Int)
headObjectResponse_partsCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HeadObjectResponse' {Maybe Int
partsCount :: Maybe Int
$sel:partsCount:HeadObjectResponse' :: HeadObjectResponse -> Maybe Int
partsCount} -> Maybe Int
partsCount) (\s :: HeadObjectResponse
s@HeadObjectResponse' {} Maybe Int
a -> HeadObjectResponse
s {$sel:partsCount:HeadObjectResponse' :: Maybe Int
partsCount = Maybe Int
a} :: HeadObjectResponse)

-- | Amazon S3 can return this header if your request involves a bucket that
-- is either a source or a destination in a replication rule.
--
-- In replication, you have a source bucket on which you configure
-- replication and destination bucket or buckets where Amazon S3 stores
-- object replicas. When you request an object (@GetObject@) or object
-- metadata (@HeadObject@) from these buckets, Amazon S3 will return the
-- @x-amz-replication-status@ header in the response as follows:
--
-- -   __If requesting an object from the source bucket__, Amazon S3 will
--     return the @x-amz-replication-status@ header if the object in your
--     request is eligible for replication.
--
--     For example, suppose that in your replication configuration, you
--     specify object prefix @TaxDocs@ requesting Amazon S3 to replicate
--     objects with key prefix @TaxDocs@. Any objects you upload with this
--     key name prefix, for example @TaxDocs\/document1.pdf@, are eligible
--     for replication. For any object request with this key name prefix,
--     Amazon S3 will return the @x-amz-replication-status@ header with
--     value PENDING, COMPLETED or FAILED indicating object replication
--     status.
--
-- -   __If requesting an object from a destination bucket__, Amazon S3
--     will return the @x-amz-replication-status@ header with value REPLICA
--     if the object in your request is a replica that Amazon S3 created
--     and there is no replica modification replication in progress.
--
-- -   __When replicating objects to multiple destination buckets__, the
--     @x-amz-replication-status@ header acts differently. The header of
--     the source object will only return a value of COMPLETED when
--     replication is successful to all destinations. The header will
--     remain at value PENDING until replication has completed for all
--     destinations. If one or more destinations fails replication the
--     header will return FAILED.
--
-- For more information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html Replication>.
headObjectResponse_replicationStatus :: Lens.Lens' HeadObjectResponse (Prelude.Maybe ReplicationStatus)
headObjectResponse_replicationStatus :: Lens' HeadObjectResponse (Maybe ReplicationStatus)
headObjectResponse_replicationStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HeadObjectResponse' {Maybe ReplicationStatus
replicationStatus :: Maybe ReplicationStatus
$sel:replicationStatus:HeadObjectResponse' :: HeadObjectResponse -> Maybe ReplicationStatus
replicationStatus} -> Maybe ReplicationStatus
replicationStatus) (\s :: HeadObjectResponse
s@HeadObjectResponse' {} Maybe ReplicationStatus
a -> HeadObjectResponse
s {$sel:replicationStatus:HeadObjectResponse' :: Maybe ReplicationStatus
replicationStatus = Maybe ReplicationStatus
a} :: HeadObjectResponse)

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

-- | If the object is an archived object (an object whose storage class is
-- GLACIER), the response includes this header if either the archive
-- restoration is in progress (see
-- <https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html RestoreObject>
-- or an archive copy is already restored.
--
-- If an archive copy is already restored, the header value indicates when
-- Amazon S3 is scheduled to delete the object copy. For example:
--
-- @x-amz-restore: ongoing-request=\"false\", expiry-date=\"Fri, 21 Dec 2012 00:00:00 GMT\"@
--
-- If the object restoration is in progress, the header returns the value
-- @ongoing-request=\"true\"@.
--
-- For more information about archiving objects, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html#lifecycle-transition-general-considerations Transitioning Objects: General Considerations>.
headObjectResponse_restore :: Lens.Lens' HeadObjectResponse (Prelude.Maybe Prelude.Text)
headObjectResponse_restore :: Lens' HeadObjectResponse (Maybe Text)
headObjectResponse_restore = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HeadObjectResponse' {Maybe Text
restore :: Maybe Text
$sel:restore:HeadObjectResponse' :: HeadObjectResponse -> Maybe Text
restore} -> Maybe Text
restore) (\s :: HeadObjectResponse
s@HeadObjectResponse' {} Maybe Text
a -> HeadObjectResponse
s {$sel:restore:HeadObjectResponse' :: Maybe Text
restore = Maybe Text
a} :: HeadObjectResponse)

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

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

-- | If present, specifies the ID of the Amazon Web Services Key Management
-- Service (Amazon Web Services KMS) symmetric customer managed key that
-- was used for the object.
headObjectResponse_sSEKMSKeyId :: Lens.Lens' HeadObjectResponse (Prelude.Maybe Prelude.Text)
headObjectResponse_sSEKMSKeyId :: Lens' HeadObjectResponse (Maybe Text)
headObjectResponse_sSEKMSKeyId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HeadObjectResponse' {Maybe (Sensitive Text)
sSEKMSKeyId :: Maybe (Sensitive Text)
$sel:sSEKMSKeyId:HeadObjectResponse' :: HeadObjectResponse -> Maybe (Sensitive Text)
sSEKMSKeyId} -> Maybe (Sensitive Text)
sSEKMSKeyId) (\s :: HeadObjectResponse
s@HeadObjectResponse' {} Maybe (Sensitive Text)
a -> HeadObjectResponse
s {$sel:sSEKMSKeyId:HeadObjectResponse' :: Maybe (Sensitive Text)
sSEKMSKeyId = Maybe (Sensitive Text)
a} :: HeadObjectResponse) 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 the object is stored using server-side encryption either with an
-- Amazon Web Services KMS key or an Amazon S3-managed encryption key, the
-- response includes this header with the value of the server-side
-- encryption algorithm used when storing this object in Amazon S3 (for
-- example, AES256, aws:kms).
headObjectResponse_serverSideEncryption :: Lens.Lens' HeadObjectResponse (Prelude.Maybe ServerSideEncryption)
headObjectResponse_serverSideEncryption :: Lens' HeadObjectResponse (Maybe ServerSideEncryption)
headObjectResponse_serverSideEncryption = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HeadObjectResponse' {Maybe ServerSideEncryption
serverSideEncryption :: Maybe ServerSideEncryption
$sel:serverSideEncryption:HeadObjectResponse' :: HeadObjectResponse -> Maybe ServerSideEncryption
serverSideEncryption} -> Maybe ServerSideEncryption
serverSideEncryption) (\s :: HeadObjectResponse
s@HeadObjectResponse' {} Maybe ServerSideEncryption
a -> HeadObjectResponse
s {$sel:serverSideEncryption:HeadObjectResponse' :: Maybe ServerSideEncryption
serverSideEncryption = Maybe ServerSideEncryption
a} :: HeadObjectResponse)

-- | Provides storage class information of the object. Amazon S3 returns this
-- header for all objects except for S3 Standard storage class objects.
--
-- For more information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html Storage Classes>.
headObjectResponse_storageClass :: Lens.Lens' HeadObjectResponse (Prelude.Maybe StorageClass)
headObjectResponse_storageClass :: Lens' HeadObjectResponse (Maybe StorageClass)
headObjectResponse_storageClass = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HeadObjectResponse' {Maybe StorageClass
storageClass :: Maybe StorageClass
$sel:storageClass:HeadObjectResponse' :: HeadObjectResponse -> Maybe StorageClass
storageClass} -> Maybe StorageClass
storageClass) (\s :: HeadObjectResponse
s@HeadObjectResponse' {} Maybe StorageClass
a -> HeadObjectResponse
s {$sel:storageClass:HeadObjectResponse' :: Maybe StorageClass
storageClass = Maybe StorageClass
a} :: HeadObjectResponse)

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

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

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

instance Prelude.NFData HeadObjectResponse where
  rnf :: HeadObjectResponse -> ()
rnf HeadObjectResponse' {Int
Maybe Bool
Maybe Int
Maybe Integer
Maybe Text
Maybe (Sensitive Text)
Maybe ISO8601
Maybe RFC822
Maybe ObjectVersionId
Maybe ETag
Maybe ArchiveStatus
Maybe ObjectLockLegalHoldStatus
Maybe ObjectLockMode
Maybe ReplicationStatus
Maybe RequestCharged
Maybe ServerSideEncryption
Maybe StorageClass
HashMap Text Text
httpStatus :: Int
websiteRedirectLocation :: Maybe Text
versionId :: Maybe ObjectVersionId
storageClass :: Maybe StorageClass
serverSideEncryption :: Maybe ServerSideEncryption
sSEKMSKeyId :: Maybe (Sensitive Text)
sSECustomerKeyMD5 :: Maybe Text
sSECustomerAlgorithm :: Maybe Text
restore :: Maybe Text
requestCharged :: Maybe RequestCharged
replicationStatus :: Maybe ReplicationStatus
partsCount :: Maybe Int
objectLockRetainUntilDate :: Maybe ISO8601
objectLockMode :: Maybe ObjectLockMode
objectLockLegalHoldStatus :: Maybe ObjectLockLegalHoldStatus
missingMeta :: Maybe Int
metadata :: HashMap Text Text
lastModified :: Maybe RFC822
expires :: Maybe RFC822
expiration :: Maybe Text
eTag :: Maybe ETag
deleteMarker :: Maybe Bool
contentType :: 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
cacheControl :: Maybe Text
bucketKeyEnabled :: Maybe Bool
archiveStatus :: Maybe ArchiveStatus
acceptRanges :: Maybe Text
$sel:httpStatus:HeadObjectResponse' :: HeadObjectResponse -> Int
$sel:websiteRedirectLocation:HeadObjectResponse' :: HeadObjectResponse -> Maybe Text
$sel:versionId:HeadObjectResponse' :: HeadObjectResponse -> Maybe ObjectVersionId
$sel:storageClass:HeadObjectResponse' :: HeadObjectResponse -> Maybe StorageClass
$sel:serverSideEncryption:HeadObjectResponse' :: HeadObjectResponse -> Maybe ServerSideEncryption
$sel:sSEKMSKeyId:HeadObjectResponse' :: HeadObjectResponse -> Maybe (Sensitive Text)
$sel:sSECustomerKeyMD5:HeadObjectResponse' :: HeadObjectResponse -> Maybe Text
$sel:sSECustomerAlgorithm:HeadObjectResponse' :: HeadObjectResponse -> Maybe Text
$sel:restore:HeadObjectResponse' :: HeadObjectResponse -> Maybe Text
$sel:requestCharged:HeadObjectResponse' :: HeadObjectResponse -> Maybe RequestCharged
$sel:replicationStatus:HeadObjectResponse' :: HeadObjectResponse -> Maybe ReplicationStatus
$sel:partsCount:HeadObjectResponse' :: HeadObjectResponse -> Maybe Int
$sel:objectLockRetainUntilDate:HeadObjectResponse' :: HeadObjectResponse -> Maybe ISO8601
$sel:objectLockMode:HeadObjectResponse' :: HeadObjectResponse -> Maybe ObjectLockMode
$sel:objectLockLegalHoldStatus:HeadObjectResponse' :: HeadObjectResponse -> Maybe ObjectLockLegalHoldStatus
$sel:missingMeta:HeadObjectResponse' :: HeadObjectResponse -> Maybe Int
$sel:metadata:HeadObjectResponse' :: HeadObjectResponse -> HashMap Text Text
$sel:lastModified:HeadObjectResponse' :: HeadObjectResponse -> Maybe RFC822
$sel:expires:HeadObjectResponse' :: HeadObjectResponse -> Maybe RFC822
$sel:expiration:HeadObjectResponse' :: HeadObjectResponse -> Maybe Text
$sel:eTag:HeadObjectResponse' :: HeadObjectResponse -> Maybe ETag
$sel:deleteMarker:HeadObjectResponse' :: HeadObjectResponse -> Maybe Bool
$sel:contentType:HeadObjectResponse' :: HeadObjectResponse -> Maybe Text
$sel:contentLength:HeadObjectResponse' :: HeadObjectResponse -> Maybe Integer
$sel:contentLanguage:HeadObjectResponse' :: HeadObjectResponse -> Maybe Text
$sel:contentEncoding:HeadObjectResponse' :: HeadObjectResponse -> Maybe Text
$sel:contentDisposition:HeadObjectResponse' :: HeadObjectResponse -> Maybe Text
$sel:checksumSHA256:HeadObjectResponse' :: HeadObjectResponse -> Maybe Text
$sel:checksumSHA1:HeadObjectResponse' :: HeadObjectResponse -> Maybe Text
$sel:checksumCRC32C:HeadObjectResponse' :: HeadObjectResponse -> Maybe Text
$sel:checksumCRC32:HeadObjectResponse' :: HeadObjectResponse -> Maybe Text
$sel:cacheControl:HeadObjectResponse' :: HeadObjectResponse -> Maybe Text
$sel:bucketKeyEnabled:HeadObjectResponse' :: HeadObjectResponse -> Maybe Bool
$sel:archiveStatus:HeadObjectResponse' :: HeadObjectResponse -> Maybe ArchiveStatus
$sel:acceptRanges:HeadObjectResponse' :: HeadObjectResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
acceptRanges
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ArchiveStatus
archiveStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
bucketKeyEnabled
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cacheControl
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe 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 Text
contentDisposition
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
contentEncoding
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
contentLanguage
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
contentLength
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
contentType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
deleteMarker
      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 RFC822
expires
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RFC822
lastModified
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf HashMap Text Text
metadata
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
missingMeta
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ObjectLockMode
objectLockMode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe ISO8601
objectLockRetainUntilDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
partsCount
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe ReplicationStatus
replicationStatus
      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
restore
      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)
sSEKMSKeyId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe ServerSideEncryption
serverSideEncryption
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe StorageClass
storageClass
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe ObjectVersionId
versionId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Text
websiteRedirectLocation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Int
httpStatus