{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- 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 action is related to @HeadObject@:
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html GetObject>
module Amazonka.S3.HeadObject
  ( -- * Creating a Request
    HeadObject (..),
    newHeadObject,

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

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

    -- * Response Lenses
    headObjectResponse_requestCharged,
    headObjectResponse_partsCount,
    headObjectResponse_eTag,
    headObjectResponse_versionId,
    headObjectResponse_contentLength,
    headObjectResponse_objectLockMode,
    headObjectResponse_expires,
    headObjectResponse_restore,
    headObjectResponse_expiration,
    headObjectResponse_deleteMarker,
    headObjectResponse_archiveStatus,
    headObjectResponse_sSECustomerAlgorithm,
    headObjectResponse_missingMeta,
    headObjectResponse_bucketKeyEnabled,
    headObjectResponse_websiteRedirectLocation,
    headObjectResponse_acceptRanges,
    headObjectResponse_storageClass,
    headObjectResponse_sSECustomerKeyMD5,
    headObjectResponse_sSEKMSKeyId,
    headObjectResponse_contentEncoding,
    headObjectResponse_objectLockRetainUntilDate,
    headObjectResponse_metadata,
    headObjectResponse_replicationStatus,
    headObjectResponse_cacheControl,
    headObjectResponse_contentLanguage,
    headObjectResponse_lastModified,
    headObjectResponse_objectLockLegalHoldStatus,
    headObjectResponse_contentDisposition,
    headObjectResponse_serverSideEncryption,
    headObjectResponse_contentType,
    headObjectResponse_httpStatus,
  )
where

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

-- | /See:/ 'newHeadObject' smart constructor.
data HeadObject = HeadObject'
  { -- | Return the object only if its entity tag (ETag) is the same as the one
    -- specified, otherwise return a 412 (precondition failed).
    HeadObject -> Maybe Text
ifMatch :: Prelude.Maybe Prelude.Text,
    -- | VersionId used to reference a specific version of the object.
    HeadObject -> Maybe ObjectVersionId
versionId :: Prelude.Maybe ObjectVersionId,
    -- | 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 (Core.Sensitive Prelude.Text),
    HeadObject -> Maybe RequestPayer
requestPayer :: Prelude.Maybe RequestPayer,
    -- | Return the object only if it has been modified since the specified time,
    -- otherwise return a 304 (not modified).
    HeadObject -> Maybe ISO8601
ifModifiedSince :: Prelude.Maybe Core.ISO8601,
    -- | 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,
    -- | Downloads the specified range bytes of an object. For more information
    -- about the HTTP Range header, see
    -- <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35>.
    --
    -- Amazon S3 doesn\'t support retrieving multiple ranges of data per @GET@
    -- request.
    HeadObject -> Maybe Text
range :: Prelude.Maybe Prelude.Text,
    -- | Return the object only if it has not been modified since the specified
    -- time, otherwise return a 412 (precondition failed).
    HeadObject -> Maybe ISO8601
ifUnmodifiedSince :: Prelude.Maybe Core.ISO8601,
    -- | 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,
    -- | Return the object only if its entity tag (ETag) is different from the
    -- one specified, otherwise return a 304 (not modified).
    HeadObject -> Maybe Text
ifNoneMatch :: Prelude.Maybe Prelude.Text,
    -- | The account ID of the expected bucket owner. If the bucket is owned by a
    -- different account, the request will fail with an HTTP
    -- @403 (Access Denied)@ error.
    HeadObject -> Maybe Text
expectedBucketOwner :: Prelude.Maybe Prelude.Text,
    -- | 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 using S3 on Outposts through the Amazon Web
    -- Services SDKs, you provide the Outposts bucket ARN in place of the
    -- bucket name. For more information about S3 on Outposts ARNs, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html Using S3 on Outposts>
    -- in the /Amazon S3 User Guide/.
    HeadObject -> BucketName
bucket :: BucketName,
    -- | The object key.
    HeadObject -> ObjectKey
key :: ObjectKey
  }
  deriving (HeadObject -> HeadObject -> Bool
(HeadObject -> HeadObject -> Bool)
-> (HeadObject -> HeadObject -> Bool) -> Eq HeadObject
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
(Int -> HeadObject -> ShowS)
-> (HeadObject -> String)
-> ([HeadObject] -> ShowS)
-> Show HeadObject
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. HeadObject -> Rep HeadObject x)
-> (forall x. Rep HeadObject x -> HeadObject) -> Generic HeadObject
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:
--
-- '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).
--
-- 'versionId', 'headObject_versionId' - VersionId used to reference a specific version of the object.
--
-- '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.
--
-- 'requestPayer', 'headObject_requestPayer' - Undocumented member.
--
-- 'ifModifiedSince', 'headObject_ifModifiedSince' - Return the object only if it has been modified since the specified time,
-- otherwise return a 304 (not modified).
--
-- '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' - Downloads the specified range bytes of an object. For more information
-- about the HTTP Range header, see
-- <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35>.
--
-- Amazon S3 doesn\'t support retrieving multiple ranges of data per @GET@
-- request.
--
-- 'ifUnmodifiedSince', 'headObject_ifUnmodifiedSince' - Return the object only if it has not been modified since the specified
-- time, otherwise return a 412 (precondition failed).
--
-- '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.
--
-- 'ifNoneMatch', 'headObject_ifNoneMatch' - Return the object only if its entity tag (ETag) is different from the
-- one specified, otherwise return a 304 (not modified).
--
-- 'expectedBucketOwner', 'headObject_expectedBucketOwner' - The account ID of the expected bucket owner. If the bucket is owned by a
-- different account, the request will fail with an HTTP
-- @403 (Access Denied)@ error.
--
-- 'bucket', '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 using S3 on Outposts through the Amazon Web
-- Services SDKs, you provide the Outposts bucket ARN in place of the
-- bucket name. For more information about S3 on Outposts ARNs, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html Using S3 on Outposts>
-- in the /Amazon S3 User Guide/.
--
-- 'key', 'headObject_key' - The object key.
newHeadObject ::
  -- | 'bucket'
  BucketName ->
  -- | 'key'
  ObjectKey ->
  HeadObject
newHeadObject :: BucketName -> ObjectKey -> HeadObject
newHeadObject BucketName
pBucket_ ObjectKey
pKey_ =
  HeadObject' :: Maybe Text
-> Maybe ObjectVersionId
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe RequestPayer
-> Maybe ISO8601
-> Maybe Int
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> BucketName
-> ObjectKey
-> HeadObject
HeadObject'
    { $sel:ifMatch:HeadObject' :: Maybe Text
ifMatch = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:versionId:HeadObject' :: Maybe ObjectVersionId
versionId = Maybe ObjectVersionId
forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerAlgorithm:HeadObject' :: Maybe Text
sSECustomerAlgorithm = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerKey:HeadObject' :: Maybe (Sensitive Text)
sSECustomerKey = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:requestPayer:HeadObject' :: Maybe RequestPayer
requestPayer = Maybe RequestPayer
forall a. Maybe a
Prelude.Nothing,
      $sel:ifModifiedSince:HeadObject' :: Maybe ISO8601
ifModifiedSince = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:partNumber:HeadObject' :: Maybe Int
partNumber = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:range:HeadObject' :: Maybe Text
range = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ifUnmodifiedSince:HeadObject' :: Maybe ISO8601
ifUnmodifiedSince = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerKeyMD5:HeadObject' :: Maybe Text
sSECustomerKeyMD5 = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ifNoneMatch:HeadObject' :: Maybe Text
ifNoneMatch = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:expectedBucketOwner:HeadObject' :: Maybe Text
expectedBucketOwner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:bucket:HeadObject' :: BucketName
bucket = BucketName
pBucket_,
      $sel:key:HeadObject' :: ObjectKey
key = ObjectKey
pKey_
    }

-- | Return the object only if its entity tag (ETag) is the same as the one
-- specified, otherwise return a 412 (precondition failed).
headObject_ifMatch :: Lens.Lens' HeadObject (Prelude.Maybe Prelude.Text)
headObject_ifMatch :: (Maybe Text -> f (Maybe Text)) -> HeadObject -> f HeadObject
headObject_ifMatch = (HeadObject -> Maybe Text)
-> (HeadObject -> Maybe Text -> HeadObject)
-> Lens HeadObject HeadObject (Maybe Text) (Maybe Text)
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)

-- | VersionId used to reference a specific version of the object.
headObject_versionId :: Lens.Lens' HeadObject (Prelude.Maybe ObjectVersionId)
headObject_versionId :: (Maybe ObjectVersionId -> f (Maybe ObjectVersionId))
-> HeadObject -> f HeadObject
headObject_versionId = (HeadObject -> Maybe ObjectVersionId)
-> (HeadObject -> Maybe ObjectVersionId -> HeadObject)
-> Lens
     HeadObject
     HeadObject
     (Maybe ObjectVersionId)
     (Maybe ObjectVersionId)
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)

-- | Specifies the algorithm to use to when encrypting the object (for
-- example, AES256).
headObject_sSECustomerAlgorithm :: Lens.Lens' HeadObject (Prelude.Maybe Prelude.Text)
headObject_sSECustomerAlgorithm :: (Maybe Text -> f (Maybe Text)) -> HeadObject -> f HeadObject
headObject_sSECustomerAlgorithm = (HeadObject -> Maybe Text)
-> (HeadObject -> Maybe Text -> HeadObject)
-> Lens HeadObject HeadObject (Maybe Text) (Maybe Text)
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 :: (Maybe Text -> f (Maybe Text)) -> HeadObject -> f HeadObject
headObject_sSECustomerKey = (HeadObject -> Maybe (Sensitive Text))
-> (HeadObject -> Maybe (Sensitive Text) -> HeadObject)
-> Lens
     HeadObject
     HeadObject
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
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) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> HeadObject -> f HeadObject)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> HeadObject
-> f HeadObject
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe Text)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | Undocumented member.
headObject_requestPayer :: Lens.Lens' HeadObject (Prelude.Maybe RequestPayer)
headObject_requestPayer :: (Maybe RequestPayer -> f (Maybe RequestPayer))
-> HeadObject -> f HeadObject
headObject_requestPayer = (HeadObject -> Maybe RequestPayer)
-> (HeadObject -> Maybe RequestPayer -> HeadObject)
-> Lens
     HeadObject HeadObject (Maybe RequestPayer) (Maybe 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)

-- | Return the object only if it has been modified since the specified time,
-- otherwise return a 304 (not modified).
headObject_ifModifiedSince :: Lens.Lens' HeadObject (Prelude.Maybe Prelude.UTCTime)
headObject_ifModifiedSince :: (Maybe UTCTime -> f (Maybe UTCTime)) -> HeadObject -> f HeadObject
headObject_ifModifiedSince = (HeadObject -> Maybe ISO8601)
-> (HeadObject -> Maybe ISO8601 -> HeadObject)
-> Lens HeadObject HeadObject (Maybe ISO8601) (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HeadObject' {Maybe ISO8601
ifModifiedSince :: Maybe ISO8601
$sel:ifModifiedSince:HeadObject' :: HeadObject -> Maybe ISO8601
ifModifiedSince} -> Maybe ISO8601
ifModifiedSince) (\s :: HeadObject
s@HeadObject' {} Maybe ISO8601
a -> HeadObject
s {$sel:ifModifiedSince:HeadObject' :: Maybe ISO8601
ifModifiedSince = Maybe ISO8601
a} :: HeadObject) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> HeadObject -> f HeadObject)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> HeadObject
-> f HeadObject
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
     (Maybe ISO8601) (Maybe ISO8601) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | 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 :: (Maybe Int -> f (Maybe Int)) -> HeadObject -> f HeadObject
headObject_partNumber = (HeadObject -> Maybe Int)
-> (HeadObject -> Maybe Int -> HeadObject)
-> Lens HeadObject HeadObject (Maybe Int) (Maybe Int)
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)

-- | Downloads the specified range bytes of an object. For more information
-- about the HTTP Range header, see
-- <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35>.
--
-- Amazon S3 doesn\'t support retrieving multiple ranges of data per @GET@
-- request.
headObject_range :: Lens.Lens' HeadObject (Prelude.Maybe Prelude.Text)
headObject_range :: (Maybe Text -> f (Maybe Text)) -> HeadObject -> f HeadObject
headObject_range = (HeadObject -> Maybe Text)
-> (HeadObject -> Maybe Text -> HeadObject)
-> Lens HeadObject HeadObject (Maybe Text) (Maybe Text)
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)

-- | Return the object only if it has not been modified since the specified
-- time, otherwise return a 412 (precondition failed).
headObject_ifUnmodifiedSince :: Lens.Lens' HeadObject (Prelude.Maybe Prelude.UTCTime)
headObject_ifUnmodifiedSince :: (Maybe UTCTime -> f (Maybe UTCTime)) -> HeadObject -> f HeadObject
headObject_ifUnmodifiedSince = (HeadObject -> Maybe ISO8601)
-> (HeadObject -> Maybe ISO8601 -> HeadObject)
-> Lens HeadObject HeadObject (Maybe ISO8601) (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HeadObject' {Maybe ISO8601
ifUnmodifiedSince :: Maybe ISO8601
$sel:ifUnmodifiedSince:HeadObject' :: HeadObject -> Maybe ISO8601
ifUnmodifiedSince} -> Maybe ISO8601
ifUnmodifiedSince) (\s :: HeadObject
s@HeadObject' {} Maybe ISO8601
a -> HeadObject
s {$sel:ifUnmodifiedSince:HeadObject' :: Maybe ISO8601
ifUnmodifiedSince = Maybe ISO8601
a} :: HeadObject) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> HeadObject -> f HeadObject)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> HeadObject
-> f HeadObject
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
     (Maybe ISO8601) (Maybe ISO8601) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | 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 :: (Maybe Text -> f (Maybe Text)) -> HeadObject -> f HeadObject
headObject_sSECustomerKeyMD5 = (HeadObject -> Maybe Text)
-> (HeadObject -> Maybe Text -> HeadObject)
-> Lens HeadObject HeadObject (Maybe Text) (Maybe Text)
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)

-- | Return the object only if its entity tag (ETag) is different from the
-- one specified, otherwise return a 304 (not modified).
headObject_ifNoneMatch :: Lens.Lens' HeadObject (Prelude.Maybe Prelude.Text)
headObject_ifNoneMatch :: (Maybe Text -> f (Maybe Text)) -> HeadObject -> f HeadObject
headObject_ifNoneMatch = (HeadObject -> Maybe Text)
-> (HeadObject -> Maybe Text -> HeadObject)
-> Lens HeadObject HeadObject (Maybe Text) (Maybe Text)
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)

-- | The account ID of the expected bucket owner. If the bucket is owned by a
-- different account, the request will fail with an HTTP
-- @403 (Access Denied)@ error.
headObject_expectedBucketOwner :: Lens.Lens' HeadObject (Prelude.Maybe Prelude.Text)
headObject_expectedBucketOwner :: (Maybe Text -> f (Maybe Text)) -> HeadObject -> f HeadObject
headObject_expectedBucketOwner = (HeadObject -> Maybe Text)
-> (HeadObject -> Maybe Text -> HeadObject)
-> Lens HeadObject HeadObject (Maybe Text) (Maybe Text)
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)

-- | 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 using S3 on Outposts through the Amazon Web
-- Services SDKs, you provide the Outposts bucket ARN in place of the
-- bucket name. For more information about S3 on Outposts ARNs, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html Using S3 on Outposts>
-- in the /Amazon S3 User Guide/.
headObject_bucket :: Lens.Lens' HeadObject BucketName
headObject_bucket :: (BucketName -> f BucketName) -> HeadObject -> f HeadObject
headObject_bucket = (HeadObject -> BucketName)
-> (HeadObject -> BucketName -> HeadObject)
-> Lens HeadObject HeadObject BucketName BucketName
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 :: (ObjectKey -> f ObjectKey) -> HeadObject -> f HeadObject
headObject_key = (HeadObject -> ObjectKey)
-> (HeadObject -> ObjectKey -> HeadObject)
-> Lens HeadObject HeadObject ObjectKey ObjectKey
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 :: HeadObject -> Request HeadObject
request =
    Request HeadObject -> Request HeadObject
forall a. Request a -> Request a
Request.s3vhost
      (Request HeadObject -> Request HeadObject)
-> (HeadObject -> Request HeadObject)
-> HeadObject
-> Request HeadObject
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Service -> HeadObject -> Request HeadObject
forall a. ToRequest a => Service -> a -> Request a
Request.head' Service
defaultService
  response :: Logger
-> Service
-> Proxy HeadObject
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse HeadObject)))
response =
    (Int
 -> ResponseHeaders -> () -> Either String (AWSResponse HeadObject))
-> Logger
-> Service
-> Proxy HeadObject
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse HeadObject)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Maybe RequestCharged
-> Maybe Int
-> Maybe ETag
-> Maybe ObjectVersionId
-> Maybe Integer
-> Maybe ObjectLockMode
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe ArchiveStatus
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe StorageClass
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe ISO8601
-> HashMap Text Text
-> Maybe ReplicationStatus
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe ObjectLockLegalHoldStatus
-> Maybe Text
-> Maybe ServerSideEncryption
-> Maybe Text
-> Int
-> HeadObjectResponse
HeadObjectResponse'
            (Maybe RequestCharged
 -> Maybe Int
 -> Maybe ETag
 -> Maybe ObjectVersionId
 -> Maybe Integer
 -> Maybe ObjectLockMode
 -> Maybe ISO8601
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe ArchiveStatus
 -> Maybe Text
 -> Maybe Int
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Maybe StorageClass
 -> Maybe Text
 -> Maybe (Sensitive Text)
 -> Maybe Text
 -> Maybe ISO8601
 -> HashMap Text Text
 -> Maybe ReplicationStatus
 -> Maybe Text
 -> Maybe Text
 -> Maybe ISO8601
 -> Maybe ObjectLockLegalHoldStatus
 -> Maybe Text
 -> Maybe ServerSideEncryption
 -> Maybe Text
 -> Int
 -> HeadObjectResponse)
-> Either String (Maybe RequestCharged)
-> Either
     String
     (Maybe Int
      -> Maybe ETag
      -> Maybe ObjectVersionId
      -> Maybe Integer
      -> Maybe ObjectLockMode
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe ArchiveStatus
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StorageClass
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe ISO8601
      -> HashMap Text Text
      -> Maybe ReplicationStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe ObjectLockLegalHoldStatus
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe Text
      -> Int
      -> HeadObjectResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (ResponseHeaders
h ResponseHeaders
-> HeaderName -> Either String (Maybe RequestCharged)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-request-charged")
            Either
  String
  (Maybe Int
   -> Maybe ETag
   -> Maybe ObjectVersionId
   -> Maybe Integer
   -> Maybe ObjectLockMode
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe ArchiveStatus
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StorageClass
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe ISO8601
   -> HashMap Text Text
   -> Maybe ReplicationStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe ObjectLockLegalHoldStatus
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe Text
   -> Int
   -> HeadObjectResponse)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe ETag
      -> Maybe ObjectVersionId
      -> Maybe Integer
      -> Maybe ObjectLockMode
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe ArchiveStatus
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StorageClass
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe ISO8601
      -> HashMap Text Text
      -> Maybe ReplicationStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe ObjectLockLegalHoldStatus
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe Text
      -> Int
      -> HeadObjectResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe Int)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-mp-parts-count")
            Either
  String
  (Maybe ETag
   -> Maybe ObjectVersionId
   -> Maybe Integer
   -> Maybe ObjectLockMode
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe ArchiveStatus
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StorageClass
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe ISO8601
   -> HashMap Text Text
   -> Maybe ReplicationStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe ObjectLockLegalHoldStatus
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe Text
   -> Int
   -> HeadObjectResponse)
-> Either String (Maybe ETag)
-> Either
     String
     (Maybe ObjectVersionId
      -> Maybe Integer
      -> Maybe ObjectLockMode
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe ArchiveStatus
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StorageClass
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe ISO8601
      -> HashMap Text Text
      -> Maybe ReplicationStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe ObjectLockLegalHoldStatus
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe Text
      -> Int
      -> HeadObjectResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe ETag)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"ETag")
            Either
  String
  (Maybe ObjectVersionId
   -> Maybe Integer
   -> Maybe ObjectLockMode
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe ArchiveStatus
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StorageClass
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe ISO8601
   -> HashMap Text Text
   -> Maybe ReplicationStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe ObjectLockLegalHoldStatus
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe Text
   -> Int
   -> HeadObjectResponse)
-> Either String (Maybe ObjectVersionId)
-> Either
     String
     (Maybe Integer
      -> Maybe ObjectLockMode
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe ArchiveStatus
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StorageClass
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe ISO8601
      -> HashMap Text Text
      -> Maybe ReplicationStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe ObjectLockLegalHoldStatus
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe Text
      -> Int
      -> HeadObjectResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders
-> HeaderName -> Either String (Maybe ObjectVersionId)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-version-id")
            Either
  String
  (Maybe Integer
   -> Maybe ObjectLockMode
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe ArchiveStatus
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StorageClass
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe ISO8601
   -> HashMap Text Text
   -> Maybe ReplicationStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe ObjectLockLegalHoldStatus
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe Text
   -> Int
   -> HeadObjectResponse)
-> Either String (Maybe Integer)
-> Either
     String
     (Maybe ObjectLockMode
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe ArchiveStatus
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StorageClass
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe ISO8601
      -> HashMap Text Text
      -> Maybe ReplicationStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe ObjectLockLegalHoldStatus
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe Text
      -> Int
      -> HeadObjectResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe Integer)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"Content-Length")
            Either
  String
  (Maybe ObjectLockMode
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe ArchiveStatus
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StorageClass
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe ISO8601
   -> HashMap Text Text
   -> Maybe ReplicationStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe ObjectLockLegalHoldStatus
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe Text
   -> Int
   -> HeadObjectResponse)
-> Either String (Maybe ObjectLockMode)
-> Either
     String
     (Maybe ISO8601
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe ArchiveStatus
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StorageClass
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe ISO8601
      -> HashMap Text Text
      -> Maybe ReplicationStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe ObjectLockLegalHoldStatus
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe Text
      -> Int
      -> HeadObjectResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders
-> HeaderName -> Either String (Maybe ObjectLockMode)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-object-lock-mode")
            Either
  String
  (Maybe ISO8601
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe ArchiveStatus
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StorageClass
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe ISO8601
   -> HashMap Text Text
   -> Maybe ReplicationStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe ObjectLockLegalHoldStatus
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe Text
   -> Int
   -> HeadObjectResponse)
-> Either String (Maybe ISO8601)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe ArchiveStatus
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StorageClass
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe ISO8601
      -> HashMap Text Text
      -> Maybe ReplicationStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe ObjectLockLegalHoldStatus
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe Text
      -> Int
      -> HeadObjectResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe ISO8601)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"Expires")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe ArchiveStatus
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StorageClass
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe ISO8601
   -> HashMap Text Text
   -> Maybe ReplicationStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe ObjectLockLegalHoldStatus
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe Text
   -> Int
   -> HeadObjectResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Bool
      -> Maybe ArchiveStatus
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StorageClass
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe ISO8601
      -> HashMap Text Text
      -> Maybe ReplicationStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe ObjectLockLegalHoldStatus
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe Text
      -> Int
      -> HeadObjectResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe Text)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-restore")
            Either
  String
  (Maybe Text
   -> Maybe Bool
   -> Maybe ArchiveStatus
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StorageClass
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe ISO8601
   -> HashMap Text Text
   -> Maybe ReplicationStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe ObjectLockLegalHoldStatus
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe Text
   -> Int
   -> HeadObjectResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Bool
      -> Maybe ArchiveStatus
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StorageClass
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe ISO8601
      -> HashMap Text Text
      -> Maybe ReplicationStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe ObjectLockLegalHoldStatus
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe Text
      -> Int
      -> HeadObjectResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe Text)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-expiration")
            Either
  String
  (Maybe Bool
   -> Maybe ArchiveStatus
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StorageClass
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe ISO8601
   -> HashMap Text Text
   -> Maybe ReplicationStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe ObjectLockLegalHoldStatus
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe Text
   -> Int
   -> HeadObjectResponse)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe ArchiveStatus
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StorageClass
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe ISO8601
      -> HashMap Text Text
      -> Maybe ReplicationStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe ObjectLockLegalHoldStatus
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe Text
      -> Int
      -> HeadObjectResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe Bool)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-delete-marker")
            Either
  String
  (Maybe ArchiveStatus
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StorageClass
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe ISO8601
   -> HashMap Text Text
   -> Maybe ReplicationStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe ObjectLockLegalHoldStatus
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe Text
   -> Int
   -> HeadObjectResponse)
-> Either String (Maybe ArchiveStatus)
-> Either
     String
     (Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StorageClass
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe ISO8601
      -> HashMap Text Text
      -> Maybe ReplicationStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe ObjectLockLegalHoldStatus
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe Text
      -> Int
      -> HeadObjectResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders
-> HeaderName -> Either String (Maybe ArchiveStatus)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-archive-status")
            Either
  String
  (Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StorageClass
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe ISO8601
   -> HashMap Text Text
   -> Maybe ReplicationStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe ObjectLockLegalHoldStatus
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe Text
   -> Int
   -> HeadObjectResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Int
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StorageClass
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe ISO8601
      -> HashMap Text Text
      -> Maybe ReplicationStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe ObjectLockLegalHoldStatus
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe Text
      -> Int
      -> HeadObjectResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( ResponseHeaders
h
                            ResponseHeaders -> HeaderName -> Either String (Maybe Text)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-server-side-encryption-customer-algorithm"
                        )
            Either
  String
  (Maybe Int
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StorageClass
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe ISO8601
   -> HashMap Text Text
   -> Maybe ReplicationStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe ObjectLockLegalHoldStatus
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe Text
   -> Int
   -> HeadObjectResponse)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StorageClass
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe ISO8601
      -> HashMap Text Text
      -> Maybe ReplicationStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe ObjectLockLegalHoldStatus
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe Text
      -> Int
      -> HeadObjectResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe Int)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-missing-meta")
            Either
  String
  (Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StorageClass
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe ISO8601
   -> HashMap Text Text
   -> Maybe ReplicationStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe ObjectLockLegalHoldStatus
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe Text
   -> Int
   -> HeadObjectResponse)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe StorageClass
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe ISO8601
      -> HashMap Text Text
      -> Maybe ReplicationStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe ObjectLockLegalHoldStatus
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe Text
      -> Int
      -> HeadObjectResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( ResponseHeaders
h
                            ResponseHeaders -> HeaderName -> Either String (Maybe Bool)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-server-side-encryption-bucket-key-enabled"
                        )
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe StorageClass
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe ISO8601
   -> HashMap Text Text
   -> Maybe ReplicationStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe ObjectLockLegalHoldStatus
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe Text
   -> Int
   -> HeadObjectResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe StorageClass
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe ISO8601
      -> HashMap Text Text
      -> Maybe ReplicationStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe ObjectLockLegalHoldStatus
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe Text
      -> Int
      -> HeadObjectResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe Text)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-website-redirect-location")
            Either
  String
  (Maybe Text
   -> Maybe StorageClass
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe ISO8601
   -> HashMap Text Text
   -> Maybe ReplicationStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe ObjectLockLegalHoldStatus
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe Text
   -> Int
   -> HeadObjectResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe StorageClass
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe ISO8601
      -> HashMap Text Text
      -> Maybe ReplicationStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe ObjectLockLegalHoldStatus
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe Text
      -> Int
      -> HeadObjectResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe Text)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"accept-ranges")
            Either
  String
  (Maybe StorageClass
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe ISO8601
   -> HashMap Text Text
   -> Maybe ReplicationStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe ObjectLockLegalHoldStatus
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe Text
   -> Int
   -> HeadObjectResponse)
-> Either String (Maybe StorageClass)
-> Either
     String
     (Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe ISO8601
      -> HashMap Text Text
      -> Maybe ReplicationStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe ObjectLockLegalHoldStatus
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe Text
      -> Int
      -> HeadObjectResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe StorageClass)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-storage-class")
            Either
  String
  (Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe ISO8601
   -> HashMap Text Text
   -> Maybe ReplicationStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe ObjectLockLegalHoldStatus
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe Text
   -> Int
   -> HeadObjectResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe ISO8601
      -> HashMap Text Text
      -> Maybe ReplicationStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe ObjectLockLegalHoldStatus
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe Text
      -> Int
      -> HeadObjectResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( ResponseHeaders
h
                            ResponseHeaders -> HeaderName -> Either String (Maybe Text)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-server-side-encryption-customer-key-MD5"
                        )
            Either
  String
  (Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe ISO8601
   -> HashMap Text Text
   -> Maybe ReplicationStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe ObjectLockLegalHoldStatus
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe Text
   -> Int
   -> HeadObjectResponse)
-> Either String (Maybe (Sensitive Text))
-> Either
     String
     (Maybe Text
      -> Maybe ISO8601
      -> HashMap Text Text
      -> Maybe ReplicationStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe ObjectLockLegalHoldStatus
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe Text
      -> Int
      -> HeadObjectResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( ResponseHeaders
h
                            ResponseHeaders
-> HeaderName -> Either String (Maybe (Sensitive Text))
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-server-side-encryption-aws-kms-key-id"
                        )
            Either
  String
  (Maybe Text
   -> Maybe ISO8601
   -> HashMap Text Text
   -> Maybe ReplicationStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe ObjectLockLegalHoldStatus
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe Text
   -> Int
   -> HeadObjectResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ISO8601
      -> HashMap Text Text
      -> Maybe ReplicationStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe ObjectLockLegalHoldStatus
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe Text
      -> Int
      -> HeadObjectResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe Text)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"Content-Encoding")
            Either
  String
  (Maybe ISO8601
   -> HashMap Text Text
   -> Maybe ReplicationStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe ObjectLockLegalHoldStatus
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe Text
   -> Int
   -> HeadObjectResponse)
-> Either String (Maybe ISO8601)
-> Either
     String
     (HashMap Text Text
      -> Maybe ReplicationStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe ObjectLockLegalHoldStatus
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe Text
      -> Int
      -> HeadObjectResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe ISO8601)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-object-lock-retain-until-date")
            Either
  String
  (HashMap Text Text
   -> Maybe ReplicationStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe ObjectLockLegalHoldStatus
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe Text
   -> Int
   -> HeadObjectResponse)
-> Either String (HashMap Text Text)
-> Either
     String
     (Maybe ReplicationStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe ObjectLockLegalHoldStatus
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe Text
      -> Int
      -> HeadObjectResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ByteString -> ResponseHeaders -> Either String (HashMap Text Text)
forall a.
FromText a =>
ByteString -> ResponseHeaders -> Either String (HashMap Text a)
Core.parseHeadersMap ByteString
"x-amz-meta-" ResponseHeaders
h)
            Either
  String
  (Maybe ReplicationStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe ObjectLockLegalHoldStatus
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe Text
   -> Int
   -> HeadObjectResponse)
-> Either String (Maybe ReplicationStatus)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe ObjectLockLegalHoldStatus
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe Text
      -> Int
      -> HeadObjectResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders
-> HeaderName -> Either String (Maybe ReplicationStatus)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-replication-status")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe ObjectLockLegalHoldStatus
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe Text
   -> Int
   -> HeadObjectResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe ISO8601
      -> Maybe ObjectLockLegalHoldStatus
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe Text
      -> Int
      -> HeadObjectResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe Text)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"Cache-Control")
            Either
  String
  (Maybe Text
   -> Maybe ISO8601
   -> Maybe ObjectLockLegalHoldStatus
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe Text
   -> Int
   -> HeadObjectResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ISO8601
      -> Maybe ObjectLockLegalHoldStatus
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe Text
      -> Int
      -> HeadObjectResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe Text)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"Content-Language")
            Either
  String
  (Maybe ISO8601
   -> Maybe ObjectLockLegalHoldStatus
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe Text
   -> Int
   -> HeadObjectResponse)
-> Either String (Maybe ISO8601)
-> Either
     String
     (Maybe ObjectLockLegalHoldStatus
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe Text
      -> Int
      -> HeadObjectResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe ISO8601)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"Last-Modified")
            Either
  String
  (Maybe ObjectLockLegalHoldStatus
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe Text
   -> Int
   -> HeadObjectResponse)
-> Either String (Maybe ObjectLockLegalHoldStatus)
-> Either
     String
     (Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe Text
      -> Int
      -> HeadObjectResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders
-> HeaderName -> Either String (Maybe ObjectLockLegalHoldStatus)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-object-lock-legal-hold")
            Either
  String
  (Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe Text
   -> Int
   -> HeadObjectResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ServerSideEncryption
      -> Maybe Text -> Int -> HeadObjectResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe Text)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"Content-Disposition")
            Either
  String
  (Maybe ServerSideEncryption
   -> Maybe Text -> Int -> HeadObjectResponse)
-> Either String (Maybe ServerSideEncryption)
-> Either String (Maybe Text -> Int -> HeadObjectResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders
-> HeaderName -> Either String (Maybe ServerSideEncryption)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-server-side-encryption")
            Either String (Maybe Text -> Int -> HeadObjectResponse)
-> Either String (Maybe Text)
-> Either String (Int -> HeadObjectResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe Text)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"Content-Type")
            Either String (Int -> HeadObjectResponse)
-> Either String Int -> Either String HeadObjectResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable HeadObject

instance Prelude.NFData HeadObject

instance Core.ToHeaders HeadObject where
  toHeaders :: HeadObject -> ResponseHeaders
toHeaders HeadObject' {Maybe Int
Maybe Text
Maybe (Sensitive Text)
Maybe ISO8601
Maybe ObjectVersionId
Maybe RequestPayer
ObjectKey
BucketName
key :: ObjectKey
bucket :: BucketName
expectedBucketOwner :: Maybe Text
ifNoneMatch :: Maybe Text
sSECustomerKeyMD5 :: Maybe Text
ifUnmodifiedSince :: Maybe ISO8601
range :: Maybe Text
partNumber :: Maybe Int
ifModifiedSince :: Maybe ISO8601
requestPayer :: Maybe RequestPayer
sSECustomerKey :: Maybe (Sensitive Text)
sSECustomerAlgorithm :: Maybe Text
versionId :: Maybe ObjectVersionId
ifMatch :: Maybe Text
$sel:key:HeadObject' :: HeadObject -> ObjectKey
$sel:bucket:HeadObject' :: HeadObject -> BucketName
$sel:expectedBucketOwner:HeadObject' :: HeadObject -> Maybe Text
$sel:ifNoneMatch:HeadObject' :: HeadObject -> Maybe Text
$sel:sSECustomerKeyMD5:HeadObject' :: HeadObject -> Maybe Text
$sel:ifUnmodifiedSince:HeadObject' :: HeadObject -> Maybe ISO8601
$sel:range:HeadObject' :: HeadObject -> Maybe Text
$sel:partNumber:HeadObject' :: HeadObject -> Maybe Int
$sel:ifModifiedSince:HeadObject' :: HeadObject -> Maybe ISO8601
$sel:requestPayer:HeadObject' :: HeadObject -> Maybe RequestPayer
$sel:sSECustomerKey:HeadObject' :: HeadObject -> Maybe (Sensitive Text)
$sel:sSECustomerAlgorithm:HeadObject' :: HeadObject -> Maybe Text
$sel:versionId:HeadObject' :: HeadObject -> Maybe ObjectVersionId
$sel:ifMatch:HeadObject' :: HeadObject -> Maybe Text
..} =
    [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ HeaderName
"If-Match" HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
ifMatch,
        HeaderName
"x-amz-server-side-encryption-customer-algorithm"
          HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
sSECustomerAlgorithm,
        HeaderName
"x-amz-server-side-encryption-customer-key"
          HeaderName -> Maybe (Sensitive Text) -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe (Sensitive Text)
sSECustomerKey,
        HeaderName
"x-amz-request-payer" HeaderName -> Maybe RequestPayer -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe RequestPayer
requestPayer,
        HeaderName
"If-Modified-Since" HeaderName -> Maybe ISO8601 -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe ISO8601
ifModifiedSince,
        HeaderName
"Range" HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
range,
        HeaderName
"If-Unmodified-Since" HeaderName -> Maybe ISO8601 -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe ISO8601
ifUnmodifiedSince,
        HeaderName
"x-amz-server-side-encryption-customer-key-MD5"
          HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
sSECustomerKeyMD5,
        HeaderName
"If-None-Match" HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
ifNoneMatch,
        HeaderName
"x-amz-expected-bucket-owner"
          HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
expectedBucketOwner
      ]

instance Core.ToPath HeadObject where
  toPath :: HeadObject -> ByteString
toPath HeadObject' {Maybe Int
Maybe Text
Maybe (Sensitive Text)
Maybe ISO8601
Maybe ObjectVersionId
Maybe RequestPayer
ObjectKey
BucketName
key :: ObjectKey
bucket :: BucketName
expectedBucketOwner :: Maybe Text
ifNoneMatch :: Maybe Text
sSECustomerKeyMD5 :: Maybe Text
ifUnmodifiedSince :: Maybe ISO8601
range :: Maybe Text
partNumber :: Maybe Int
ifModifiedSince :: Maybe ISO8601
requestPayer :: Maybe RequestPayer
sSECustomerKey :: Maybe (Sensitive Text)
sSECustomerAlgorithm :: Maybe Text
versionId :: Maybe ObjectVersionId
ifMatch :: Maybe Text
$sel:key:HeadObject' :: HeadObject -> ObjectKey
$sel:bucket:HeadObject' :: HeadObject -> BucketName
$sel:expectedBucketOwner:HeadObject' :: HeadObject -> Maybe Text
$sel:ifNoneMatch:HeadObject' :: HeadObject -> Maybe Text
$sel:sSECustomerKeyMD5:HeadObject' :: HeadObject -> Maybe Text
$sel:ifUnmodifiedSince:HeadObject' :: HeadObject -> Maybe ISO8601
$sel:range:HeadObject' :: HeadObject -> Maybe Text
$sel:partNumber:HeadObject' :: HeadObject -> Maybe Int
$sel:ifModifiedSince:HeadObject' :: HeadObject -> Maybe ISO8601
$sel:requestPayer:HeadObject' :: HeadObject -> Maybe RequestPayer
$sel:sSECustomerKey:HeadObject' :: HeadObject -> Maybe (Sensitive Text)
$sel:sSECustomerAlgorithm:HeadObject' :: HeadObject -> Maybe Text
$sel:versionId:HeadObject' :: HeadObject -> Maybe ObjectVersionId
$sel:ifMatch:HeadObject' :: HeadObject -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/", BucketName -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS BucketName
bucket, ByteString
"/", ObjectKey -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS ObjectKey
key]

instance Core.ToQuery HeadObject where
  toQuery :: HeadObject -> QueryString
toQuery HeadObject' {Maybe Int
Maybe Text
Maybe (Sensitive Text)
Maybe ISO8601
Maybe ObjectVersionId
Maybe RequestPayer
ObjectKey
BucketName
key :: ObjectKey
bucket :: BucketName
expectedBucketOwner :: Maybe Text
ifNoneMatch :: Maybe Text
sSECustomerKeyMD5 :: Maybe Text
ifUnmodifiedSince :: Maybe ISO8601
range :: Maybe Text
partNumber :: Maybe Int
ifModifiedSince :: Maybe ISO8601
requestPayer :: Maybe RequestPayer
sSECustomerKey :: Maybe (Sensitive Text)
sSECustomerAlgorithm :: Maybe Text
versionId :: Maybe ObjectVersionId
ifMatch :: Maybe Text
$sel:key:HeadObject' :: HeadObject -> ObjectKey
$sel:bucket:HeadObject' :: HeadObject -> BucketName
$sel:expectedBucketOwner:HeadObject' :: HeadObject -> Maybe Text
$sel:ifNoneMatch:HeadObject' :: HeadObject -> Maybe Text
$sel:sSECustomerKeyMD5:HeadObject' :: HeadObject -> Maybe Text
$sel:ifUnmodifiedSince:HeadObject' :: HeadObject -> Maybe ISO8601
$sel:range:HeadObject' :: HeadObject -> Maybe Text
$sel:partNumber:HeadObject' :: HeadObject -> Maybe Int
$sel:ifModifiedSince:HeadObject' :: HeadObject -> Maybe ISO8601
$sel:requestPayer:HeadObject' :: HeadObject -> Maybe RequestPayer
$sel:sSECustomerKey:HeadObject' :: HeadObject -> Maybe (Sensitive Text)
$sel:sSECustomerAlgorithm:HeadObject' :: HeadObject -> Maybe Text
$sel:versionId:HeadObject' :: HeadObject -> Maybe ObjectVersionId
$sel:ifMatch:HeadObject' :: HeadObject -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"versionId" ByteString -> Maybe ObjectVersionId -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe ObjectVersionId
versionId,
        ByteString
"partNumber" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
partNumber
      ]

-- | /See:/ 'newHeadObjectResponse' smart constructor.
data HeadObjectResponse = HeadObjectResponse'
  { HeadObjectResponse -> Maybe RequestCharged
requestCharged :: Prelude.Maybe RequestCharged,
    -- | The count of parts this object has.
    HeadObjectResponse -> Maybe Int
partsCount :: Prelude.Maybe Prelude.Int,
    -- | An 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,
    -- | Version of the object.
    HeadObjectResponse -> Maybe ObjectVersionId
versionId :: Prelude.Maybe ObjectVersionId,
    -- | Size of the body in bytes.
    HeadObjectResponse -> Maybe Integer
contentLength :: Prelude.Maybe Prelude.Integer,
    -- | 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 at which the object is no longer cacheable.
    HeadObjectResponse -> Maybe ISO8601
expires :: Prelude.Maybe Core.ISO8601,
    -- | 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 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,
    -- | 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,
    -- | The archive state of the head object.
    HeadObjectResponse -> Maybe ArchiveStatus
archiveStatus :: Prelude.Maybe ArchiveStatus,
    -- | 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,
    -- | 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,
    -- | 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,
    -- | 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,
    -- | Indicates that a range of bytes was specified.
    HeadObjectResponse -> Maybe Text
acceptRanges :: Prelude.Maybe Prelude.Text,
    -- | 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,
    -- | 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 (Core.Sensitive 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 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 Core.ISO8601,
    -- | A map of metadata to store with the object in S3.
    HeadObjectResponse -> HashMap Text Text
metadata :: Prelude.HashMap Prelude.Text Prelude.Text,
    -- | 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,
    -- | Specifies caching behavior along the request\/reply chain.
    HeadObjectResponse -> Maybe Text
cacheControl :: Prelude.Maybe Prelude.Text,
    -- | The language the content is in.
    HeadObjectResponse -> Maybe Text
contentLanguage :: Prelude.Maybe Prelude.Text,
    -- | Creation date of the object.
    HeadObjectResponse -> Maybe ISO8601
lastModified :: Prelude.Maybe Core.ISO8601,
    -- | 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,
    -- | Specifies presentational information for the object.
    HeadObjectResponse -> Maybe Text
contentDisposition :: Prelude.Maybe 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,
    -- | A standard MIME type describing the format of the object data.
    HeadObjectResponse -> Maybe Text
contentType :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    HeadObjectResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (HeadObjectResponse -> HeadObjectResponse -> Bool
(HeadObjectResponse -> HeadObjectResponse -> Bool)
-> (HeadObjectResponse -> HeadObjectResponse -> Bool)
-> Eq HeadObjectResponse
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
(Int -> HeadObjectResponse -> ShowS)
-> (HeadObjectResponse -> String)
-> ([HeadObjectResponse] -> ShowS)
-> Show HeadObjectResponse
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. HeadObjectResponse -> Rep HeadObjectResponse x)
-> (forall x. Rep HeadObjectResponse x -> HeadObjectResponse)
-> Generic HeadObjectResponse
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:
--
-- 'requestCharged', 'headObjectResponse_requestCharged' - Undocumented member.
--
-- 'partsCount', 'headObjectResponse_partsCount' - The count of parts this object has.
--
-- 'eTag', 'headObjectResponse_eTag' - An ETag is an opaque identifier assigned by a web server to a specific
-- version of a resource found at a URL.
--
-- 'versionId', 'headObjectResponse_versionId' - Version of the object.
--
-- 'contentLength', 'headObjectResponse_contentLength' - Size of the body in bytes.
--
-- '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>.
--
-- 'expires', 'headObjectResponse_expires' - The date and time at which the object is no longer cacheable.
--
-- '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>.
--
-- '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.
--
-- '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.
--
-- 'archiveStatus', 'headObjectResponse_archiveStatus' - The archive state of the head object.
--
-- '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.
--
-- '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.
--
-- 'bucketKeyEnabled', 'headObjectResponse_bucketKeyEnabled' - Indicates whether the object uses an S3 Bucket Key for server-side
-- encryption with Amazon Web Services KMS (SSE-KMS).
--
-- '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.
--
-- 'acceptRanges', 'headObjectResponse_acceptRanges' - Indicates that a range of bytes was specified.
--
-- '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>.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- 'metadata', 'headObjectResponse_metadata' - A map of metadata to store with the object in S3.
--
-- '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>.
--
-- 'cacheControl', 'headObjectResponse_cacheControl' - Specifies caching behavior along the request\/reply chain.
--
-- 'contentLanguage', 'headObjectResponse_contentLanguage' - The language the content is in.
--
-- 'lastModified', 'headObjectResponse_lastModified' - Creation date of the object.
--
-- '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>.
--
-- 'contentDisposition', 'headObjectResponse_contentDisposition' - Specifies presentational information 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).
--
-- 'contentType', 'headObjectResponse_contentType' - A standard MIME type describing the format of the object data.
--
-- 'httpStatus', 'headObjectResponse_httpStatus' - The response's http status code.
newHeadObjectResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  HeadObjectResponse
newHeadObjectResponse :: Int -> HeadObjectResponse
newHeadObjectResponse Int
pHttpStatus_ =
  HeadObjectResponse' :: Maybe RequestCharged
-> Maybe Int
-> Maybe ETag
-> Maybe ObjectVersionId
-> Maybe Integer
-> Maybe ObjectLockMode
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe ArchiveStatus
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe StorageClass
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe ISO8601
-> HashMap Text Text
-> Maybe ReplicationStatus
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe ObjectLockLegalHoldStatus
-> Maybe Text
-> Maybe ServerSideEncryption
-> Maybe Text
-> Int
-> HeadObjectResponse
HeadObjectResponse'
    { $sel:requestCharged:HeadObjectResponse' :: Maybe RequestCharged
requestCharged =
        Maybe RequestCharged
forall a. Maybe a
Prelude.Nothing,
      $sel:partsCount:HeadObjectResponse' :: Maybe Int
partsCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:eTag:HeadObjectResponse' :: Maybe ETag
eTag = Maybe ETag
forall a. Maybe a
Prelude.Nothing,
      $sel:versionId:HeadObjectResponse' :: Maybe ObjectVersionId
versionId = Maybe ObjectVersionId
forall a. Maybe a
Prelude.Nothing,
      $sel:contentLength:HeadObjectResponse' :: Maybe Integer
contentLength = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:objectLockMode:HeadObjectResponse' :: Maybe ObjectLockMode
objectLockMode = Maybe ObjectLockMode
forall a. Maybe a
Prelude.Nothing,
      $sel:expires:HeadObjectResponse' :: Maybe ISO8601
expires = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:restore:HeadObjectResponse' :: Maybe Text
restore = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:expiration:HeadObjectResponse' :: Maybe Text
expiration = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:deleteMarker:HeadObjectResponse' :: Maybe Bool
deleteMarker = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:archiveStatus:HeadObjectResponse' :: Maybe ArchiveStatus
archiveStatus = Maybe ArchiveStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerAlgorithm:HeadObjectResponse' :: Maybe Text
sSECustomerAlgorithm = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:missingMeta:HeadObjectResponse' :: Maybe Int
missingMeta = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:bucketKeyEnabled:HeadObjectResponse' :: Maybe Bool
bucketKeyEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:websiteRedirectLocation:HeadObjectResponse' :: Maybe Text
websiteRedirectLocation = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:acceptRanges:HeadObjectResponse' :: Maybe Text
acceptRanges = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:storageClass:HeadObjectResponse' :: Maybe StorageClass
storageClass = Maybe StorageClass
forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerKeyMD5:HeadObjectResponse' :: Maybe Text
sSECustomerKeyMD5 = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sSEKMSKeyId:HeadObjectResponse' :: Maybe (Sensitive Text)
sSEKMSKeyId = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:contentEncoding:HeadObjectResponse' :: Maybe Text
contentEncoding = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:objectLockRetainUntilDate:HeadObjectResponse' :: Maybe ISO8601
objectLockRetainUntilDate = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:metadata:HeadObjectResponse' :: HashMap Text Text
metadata = HashMap Text Text
forall a. Monoid a => a
Prelude.mempty,
      $sel:replicationStatus:HeadObjectResponse' :: Maybe ReplicationStatus
replicationStatus = Maybe ReplicationStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:cacheControl:HeadObjectResponse' :: Maybe Text
cacheControl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:contentLanguage:HeadObjectResponse' :: Maybe Text
contentLanguage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModified:HeadObjectResponse' :: Maybe ISO8601
lastModified = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:objectLockLegalHoldStatus:HeadObjectResponse' :: Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus = Maybe ObjectLockLegalHoldStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:contentDisposition:HeadObjectResponse' :: Maybe Text
contentDisposition = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:serverSideEncryption:HeadObjectResponse' :: Maybe ServerSideEncryption
serverSideEncryption = Maybe ServerSideEncryption
forall a. Maybe a
Prelude.Nothing,
      $sel:contentType:HeadObjectResponse' :: Maybe Text
contentType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:HeadObjectResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
headObjectResponse_requestCharged :: Lens.Lens' HeadObjectResponse (Prelude.Maybe RequestCharged)
headObjectResponse_requestCharged :: (Maybe RequestCharged -> f (Maybe RequestCharged))
-> HeadObjectResponse -> f HeadObjectResponse
headObjectResponse_requestCharged = (HeadObjectResponse -> Maybe RequestCharged)
-> (HeadObjectResponse
    -> Maybe RequestCharged -> HeadObjectResponse)
-> Lens
     HeadObjectResponse
     HeadObjectResponse
     (Maybe RequestCharged)
     (Maybe 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)

-- | The count of parts this object has.
headObjectResponse_partsCount :: Lens.Lens' HeadObjectResponse (Prelude.Maybe Prelude.Int)
headObjectResponse_partsCount :: (Maybe Int -> f (Maybe Int))
-> HeadObjectResponse -> f HeadObjectResponse
headObjectResponse_partsCount = (HeadObjectResponse -> Maybe Int)
-> (HeadObjectResponse -> Maybe Int -> HeadObjectResponse)
-> Lens
     HeadObjectResponse HeadObjectResponse (Maybe Int) (Maybe Int)
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)

-- | An 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 :: (Maybe ETag -> f (Maybe ETag))
-> HeadObjectResponse -> f HeadObjectResponse
headObjectResponse_eTag = (HeadObjectResponse -> Maybe ETag)
-> (HeadObjectResponse -> Maybe ETag -> HeadObjectResponse)
-> Lens
     HeadObjectResponse HeadObjectResponse (Maybe ETag) (Maybe 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)

-- | Version of the object.
headObjectResponse_versionId :: Lens.Lens' HeadObjectResponse (Prelude.Maybe ObjectVersionId)
headObjectResponse_versionId :: (Maybe ObjectVersionId -> f (Maybe ObjectVersionId))
-> HeadObjectResponse -> f HeadObjectResponse
headObjectResponse_versionId = (HeadObjectResponse -> Maybe ObjectVersionId)
-> (HeadObjectResponse
    -> Maybe ObjectVersionId -> HeadObjectResponse)
-> Lens
     HeadObjectResponse
     HeadObjectResponse
     (Maybe ObjectVersionId)
     (Maybe ObjectVersionId)
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)

-- | Size of the body in bytes.
headObjectResponse_contentLength :: Lens.Lens' HeadObjectResponse (Prelude.Maybe Prelude.Integer)
headObjectResponse_contentLength :: (Maybe Integer -> f (Maybe Integer))
-> HeadObjectResponse -> f HeadObjectResponse
headObjectResponse_contentLength = (HeadObjectResponse -> Maybe Integer)
-> (HeadObjectResponse -> Maybe Integer -> HeadObjectResponse)
-> Lens
     HeadObjectResponse
     HeadObjectResponse
     (Maybe Integer)
     (Maybe Integer)
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)

-- | 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 :: (Maybe ObjectLockMode -> f (Maybe ObjectLockMode))
-> HeadObjectResponse -> f HeadObjectResponse
headObjectResponse_objectLockMode = (HeadObjectResponse -> Maybe ObjectLockMode)
-> (HeadObjectResponse
    -> Maybe ObjectLockMode -> HeadObjectResponse)
-> Lens
     HeadObjectResponse
     HeadObjectResponse
     (Maybe ObjectLockMode)
     (Maybe 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 at which the object is no longer cacheable.
headObjectResponse_expires :: Lens.Lens' HeadObjectResponse (Prelude.Maybe Prelude.UTCTime)
headObjectResponse_expires :: (Maybe UTCTime -> f (Maybe UTCTime))
-> HeadObjectResponse -> f HeadObjectResponse
headObjectResponse_expires = (HeadObjectResponse -> Maybe ISO8601)
-> (HeadObjectResponse -> Maybe ISO8601 -> HeadObjectResponse)
-> Lens
     HeadObjectResponse
     HeadObjectResponse
     (Maybe ISO8601)
     (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HeadObjectResponse' {Maybe ISO8601
expires :: Maybe ISO8601
$sel:expires:HeadObjectResponse' :: HeadObjectResponse -> Maybe ISO8601
expires} -> Maybe ISO8601
expires) (\s :: HeadObjectResponse
s@HeadObjectResponse' {} Maybe ISO8601
a -> HeadObjectResponse
s {$sel:expires:HeadObjectResponse' :: Maybe ISO8601
expires = Maybe ISO8601
a} :: HeadObjectResponse) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> HeadObjectResponse -> f HeadObjectResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> HeadObjectResponse
-> f HeadObjectResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
     (Maybe ISO8601) (Maybe ISO8601) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> HeadObjectResponse -> f HeadObjectResponse
headObjectResponse_restore = (HeadObjectResponse -> Maybe Text)
-> (HeadObjectResponse -> Maybe Text -> HeadObjectResponse)
-> Lens
     HeadObjectResponse HeadObjectResponse (Maybe Text) (Maybe Text)
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 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 :: (Maybe Text -> f (Maybe Text))
-> HeadObjectResponse -> f HeadObjectResponse
headObjectResponse_expiration = (HeadObjectResponse -> Maybe Text)
-> (HeadObjectResponse -> Maybe Text -> HeadObjectResponse)
-> Lens
     HeadObjectResponse HeadObjectResponse (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe Bool -> f (Maybe Bool))
-> HeadObjectResponse -> f HeadObjectResponse
headObjectResponse_deleteMarker = (HeadObjectResponse -> Maybe Bool)
-> (HeadObjectResponse -> Maybe Bool -> HeadObjectResponse)
-> Lens
     HeadObjectResponse HeadObjectResponse (Maybe Bool) (Maybe Bool)
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)

-- | The archive state of the head object.
headObjectResponse_archiveStatus :: Lens.Lens' HeadObjectResponse (Prelude.Maybe ArchiveStatus)
headObjectResponse_archiveStatus :: (Maybe ArchiveStatus -> f (Maybe ArchiveStatus))
-> HeadObjectResponse -> f HeadObjectResponse
headObjectResponse_archiveStatus = (HeadObjectResponse -> Maybe ArchiveStatus)
-> (HeadObjectResponse
    -> Maybe ArchiveStatus -> HeadObjectResponse)
-> Lens
     HeadObjectResponse
     HeadObjectResponse
     (Maybe ArchiveStatus)
     (Maybe 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)

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> HeadObjectResponse -> f HeadObjectResponse
headObjectResponse_sSECustomerAlgorithm = (HeadObjectResponse -> Maybe Text)
-> (HeadObjectResponse -> Maybe Text -> HeadObjectResponse)
-> Lens
     HeadObjectResponse HeadObjectResponse (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe Int -> f (Maybe Int))
-> HeadObjectResponse -> f HeadObjectResponse
headObjectResponse_missingMeta = (HeadObjectResponse -> Maybe Int)
-> (HeadObjectResponse -> Maybe Int -> HeadObjectResponse)
-> Lens
     HeadObjectResponse HeadObjectResponse (Maybe Int) (Maybe Int)
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)

-- | 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 :: (Maybe Bool -> f (Maybe Bool))
-> HeadObjectResponse -> f HeadObjectResponse
headObjectResponse_bucketKeyEnabled = (HeadObjectResponse -> Maybe Bool)
-> (HeadObjectResponse -> Maybe Bool -> HeadObjectResponse)
-> Lens
     HeadObjectResponse HeadObjectResponse (Maybe Bool) (Maybe Bool)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> HeadObjectResponse -> f HeadObjectResponse
headObjectResponse_websiteRedirectLocation = (HeadObjectResponse -> Maybe Text)
-> (HeadObjectResponse -> Maybe Text -> HeadObjectResponse)
-> Lens
     HeadObjectResponse HeadObjectResponse (Maybe Text) (Maybe Text)
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)

-- | Indicates that a range of bytes was specified.
headObjectResponse_acceptRanges :: Lens.Lens' HeadObjectResponse (Prelude.Maybe Prelude.Text)
headObjectResponse_acceptRanges :: (Maybe Text -> f (Maybe Text))
-> HeadObjectResponse -> f HeadObjectResponse
headObjectResponse_acceptRanges = (HeadObjectResponse -> Maybe Text)
-> (HeadObjectResponse -> Maybe Text -> HeadObjectResponse)
-> Lens
     HeadObjectResponse HeadObjectResponse (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe StorageClass -> f (Maybe StorageClass))
-> HeadObjectResponse -> f HeadObjectResponse
headObjectResponse_storageClass = (HeadObjectResponse -> Maybe StorageClass)
-> (HeadObjectResponse -> Maybe StorageClass -> HeadObjectResponse)
-> Lens
     HeadObjectResponse
     HeadObjectResponse
     (Maybe StorageClass)
     (Maybe 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)

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> HeadObjectResponse -> f HeadObjectResponse
headObjectResponse_sSECustomerKeyMD5 = (HeadObjectResponse -> Maybe Text)
-> (HeadObjectResponse -> Maybe Text -> HeadObjectResponse)
-> Lens
     HeadObjectResponse HeadObjectResponse (Maybe Text) (Maybe Text)
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 :: (Maybe Text -> f (Maybe Text))
-> HeadObjectResponse -> f HeadObjectResponse
headObjectResponse_sSEKMSKeyId = (HeadObjectResponse -> Maybe (Sensitive Text))
-> (HeadObjectResponse
    -> Maybe (Sensitive Text) -> HeadObjectResponse)
-> Lens
     HeadObjectResponse
     HeadObjectResponse
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
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) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> HeadObjectResponse -> f HeadObjectResponse)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> HeadObjectResponse
-> f HeadObjectResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe Text)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | Specifies 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 :: (Maybe Text -> f (Maybe Text))
-> HeadObjectResponse -> f HeadObjectResponse
headObjectResponse_contentEncoding = (HeadObjectResponse -> Maybe Text)
-> (HeadObjectResponse -> Maybe Text -> HeadObjectResponse)
-> Lens
     HeadObjectResponse HeadObjectResponse (Maybe Text) (Maybe Text)
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 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 :: (Maybe UTCTime -> f (Maybe UTCTime))
-> HeadObjectResponse -> f HeadObjectResponse
headObjectResponse_objectLockRetainUntilDate = (HeadObjectResponse -> Maybe ISO8601)
-> (HeadObjectResponse -> Maybe ISO8601 -> HeadObjectResponse)
-> Lens
     HeadObjectResponse
     HeadObjectResponse
     (Maybe ISO8601)
     (Maybe ISO8601)
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) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> HeadObjectResponse -> f HeadObjectResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> HeadObjectResponse
-> f HeadObjectResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
     (Maybe ISO8601) (Maybe ISO8601) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | A map of metadata to store with the object in S3.
headObjectResponse_metadata :: Lens.Lens' HeadObjectResponse (Prelude.HashMap Prelude.Text Prelude.Text)
headObjectResponse_metadata :: (HashMap Text Text -> f (HashMap Text Text))
-> HeadObjectResponse -> f HeadObjectResponse
headObjectResponse_metadata = (HeadObjectResponse -> HashMap Text Text)
-> (HeadObjectResponse -> HashMap Text Text -> HeadObjectResponse)
-> Lens
     HeadObjectResponse
     HeadObjectResponse
     (HashMap Text Text)
     (HashMap Text Text)
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) ((HashMap Text Text -> f (HashMap Text Text))
 -> HeadObjectResponse -> f HeadObjectResponse)
-> ((HashMap Text Text -> f (HashMap Text Text))
    -> HashMap Text Text -> f (HashMap Text Text))
-> (HashMap Text Text -> f (HashMap Text Text))
-> HeadObjectResponse
-> f HeadObjectResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (HashMap Text Text -> f (HashMap Text Text))
-> HashMap Text Text -> f (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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 :: (Maybe ReplicationStatus -> f (Maybe ReplicationStatus))
-> HeadObjectResponse -> f HeadObjectResponse
headObjectResponse_replicationStatus = (HeadObjectResponse -> Maybe ReplicationStatus)
-> (HeadObjectResponse
    -> Maybe ReplicationStatus -> HeadObjectResponse)
-> Lens
     HeadObjectResponse
     HeadObjectResponse
     (Maybe ReplicationStatus)
     (Maybe 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)

-- | Specifies caching behavior along the request\/reply chain.
headObjectResponse_cacheControl :: Lens.Lens' HeadObjectResponse (Prelude.Maybe Prelude.Text)
headObjectResponse_cacheControl :: (Maybe Text -> f (Maybe Text))
-> HeadObjectResponse -> f HeadObjectResponse
headObjectResponse_cacheControl = (HeadObjectResponse -> Maybe Text)
-> (HeadObjectResponse -> Maybe Text -> HeadObjectResponse)
-> Lens
     HeadObjectResponse HeadObjectResponse (Maybe Text) (Maybe Text)
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 language the content is in.
headObjectResponse_contentLanguage :: Lens.Lens' HeadObjectResponse (Prelude.Maybe Prelude.Text)
headObjectResponse_contentLanguage :: (Maybe Text -> f (Maybe Text))
-> HeadObjectResponse -> f HeadObjectResponse
headObjectResponse_contentLanguage = (HeadObjectResponse -> Maybe Text)
-> (HeadObjectResponse -> Maybe Text -> HeadObjectResponse)
-> Lens
     HeadObjectResponse HeadObjectResponse (Maybe Text) (Maybe Text)
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)

-- | Creation date of the object.
headObjectResponse_lastModified :: Lens.Lens' HeadObjectResponse (Prelude.Maybe Prelude.UTCTime)
headObjectResponse_lastModified :: (Maybe UTCTime -> f (Maybe UTCTime))
-> HeadObjectResponse -> f HeadObjectResponse
headObjectResponse_lastModified = (HeadObjectResponse -> Maybe ISO8601)
-> (HeadObjectResponse -> Maybe ISO8601 -> HeadObjectResponse)
-> Lens
     HeadObjectResponse
     HeadObjectResponse
     (Maybe ISO8601)
     (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HeadObjectResponse' {Maybe ISO8601
lastModified :: Maybe ISO8601
$sel:lastModified:HeadObjectResponse' :: HeadObjectResponse -> Maybe ISO8601
lastModified} -> Maybe ISO8601
lastModified) (\s :: HeadObjectResponse
s@HeadObjectResponse' {} Maybe ISO8601
a -> HeadObjectResponse
s {$sel:lastModified:HeadObjectResponse' :: Maybe ISO8601
lastModified = Maybe ISO8601
a} :: HeadObjectResponse) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> HeadObjectResponse -> f HeadObjectResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> HeadObjectResponse
-> f HeadObjectResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
     (Maybe ISO8601) (Maybe ISO8601) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | 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 :: (Maybe ObjectLockLegalHoldStatus
 -> f (Maybe ObjectLockLegalHoldStatus))
-> HeadObjectResponse -> f HeadObjectResponse
headObjectResponse_objectLockLegalHoldStatus = (HeadObjectResponse -> Maybe ObjectLockLegalHoldStatus)
-> (HeadObjectResponse
    -> Maybe ObjectLockLegalHoldStatus -> HeadObjectResponse)
-> Lens
     HeadObjectResponse
     HeadObjectResponse
     (Maybe ObjectLockLegalHoldStatus)
     (Maybe 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)

-- | Specifies presentational information for the object.
headObjectResponse_contentDisposition :: Lens.Lens' HeadObjectResponse (Prelude.Maybe Prelude.Text)
headObjectResponse_contentDisposition :: (Maybe Text -> f (Maybe Text))
-> HeadObjectResponse -> f HeadObjectResponse
headObjectResponse_contentDisposition = (HeadObjectResponse -> Maybe Text)
-> (HeadObjectResponse -> Maybe Text -> HeadObjectResponse)
-> Lens
     HeadObjectResponse HeadObjectResponse (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe ServerSideEncryption -> f (Maybe ServerSideEncryption))
-> HeadObjectResponse -> f HeadObjectResponse
headObjectResponse_serverSideEncryption = (HeadObjectResponse -> Maybe ServerSideEncryption)
-> (HeadObjectResponse
    -> Maybe ServerSideEncryption -> HeadObjectResponse)
-> Lens
     HeadObjectResponse
     HeadObjectResponse
     (Maybe ServerSideEncryption)
     (Maybe 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)

-- | A standard MIME type describing the format of the object data.
headObjectResponse_contentType :: Lens.Lens' HeadObjectResponse (Prelude.Maybe Prelude.Text)
headObjectResponse_contentType :: (Maybe Text -> f (Maybe Text))
-> HeadObjectResponse -> f HeadObjectResponse
headObjectResponse_contentType = (HeadObjectResponse -> Maybe Text)
-> (HeadObjectResponse -> Maybe Text -> HeadObjectResponse)
-> Lens
     HeadObjectResponse HeadObjectResponse (Maybe Text) (Maybe Text)
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)

-- | The response's http status code.
headObjectResponse_httpStatus :: Lens.Lens' HeadObjectResponse Prelude.Int
headObjectResponse_httpStatus :: (Int -> f Int) -> HeadObjectResponse -> f HeadObjectResponse
headObjectResponse_httpStatus = (HeadObjectResponse -> Int)
-> (HeadObjectResponse -> Int -> HeadObjectResponse)
-> Lens HeadObjectResponse HeadObjectResponse Int Int
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