{-# 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.GetObject
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Retrieves objects from Amazon S3. To use @GET@, you must have @READ@
-- access to the object. If you grant @READ@ access to the anonymous user,
-- you can return the object without using an authorization header.
--
-- An Amazon S3 bucket has no directory hierarchy such as you would find in
-- a typical computer file system. You can, however, create a logical
-- hierarchy by using object key names that imply a folder structure. For
-- example, instead of naming an object @sample.jpg@, you can name it
-- @photos\/2006\/February\/sample.jpg@.
--
-- To get an object from such a logical hierarchy, specify the full key
-- name for the object in the @GET@ operation. For a virtual hosted-style
-- request example, if you have the object
-- @photos\/2006\/February\/sample.jpg@, specify the resource as
-- @\/photos\/2006\/February\/sample.jpg@. For a path-style request
-- example, if you have the object @photos\/2006\/February\/sample.jpg@ in
-- the bucket named @examplebucket@, specify the resource as
-- @\/examplebucket\/photos\/2006\/February\/sample.jpg@. For more
-- information about request types, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html#VirtualHostingSpecifyBucket HTTP Host Header Bucket Specification>.
--
-- For more information about returning the ACL of an object, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html GetObjectAcl>.
--
-- If the object you are retrieving is stored in the S3 Glacier or S3
-- Glacier Deep Archive storage class, or S3 Intelligent-Tiering Archive or
-- S3 Intelligent-Tiering Deep Archive tiers, before you can retrieve the
-- object you must first restore a copy using
-- <https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html RestoreObject>.
-- Otherwise, this action returns an @InvalidObjectStateError@ error. For
-- information about restoring archived objects, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html Restoring Archived Objects>.
--
-- 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.
--
-- 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 GET 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)>.
--
-- Assuming you have the relevant permission to read object tags, the
-- response also returns the @x-amz-tagging-count@ header that provides the
-- count of number of tags associated with the object. You can use
-- <https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html GetObjectTagging>
-- to retrieve the tag set associated with an object.
--
-- __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
--     will return an HTTP status code 404 (\"no such key\") error.
--
-- -   If you don’t have the @s3:ListBucket@ permission, Amazon S3 will
--     return an HTTP status code 403 (\"access denied\") error.
--
-- __Versioning__
--
-- By default, the GET action returns the current version of an object. To
-- return a different version, use the @versionId@ subresource.
--
-- -   If you supply a @versionId@, you need the @s3:GetObjectVersion@
--     permission to access a specific version of an object. If you request
--     a specific version, you do not need to have the @s3:GetObject@
--     permission.
--
-- -   If the current version of the object is a delete marker, Amazon S3
--     behaves as if the object was deleted and includes
--     @x-amz-delete-marker: true@ in the response.
--
-- For more information about versioning, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html PutBucketVersioning>.
--
-- __Overriding Response Header Values__
--
-- There are times when you want to override certain response header values
-- in a GET response. For example, you might override the
-- @Content-Disposition@ response header value in your GET request.
--
-- You can override values for a set of response headers using the
-- following query parameters. These response header values are sent only
-- on a successful request, that is, when status code 200 OK is returned.
-- The set of headers you can override using these parameters is a subset
-- of the headers that Amazon S3 accepts when you create an object. The
-- response headers that you can override for the GET response are
-- @Content-Type@, @Content-Language@, @Expires@, @Cache-Control@,
-- @Content-Disposition@, and @Content-Encoding@. To override these header
-- values in the GET response, you use the following request parameters.
--
-- You must sign the request, either using an Authorization header or a
-- presigned URL, when using these parameters. They cannot be used with an
-- unsigned (anonymous) request.
--
-- -   @response-content-type@
--
-- -   @response-content-language@
--
-- -   @response-expires@
--
-- -   @response-cache-control@
--
-- -   @response-content-disposition@
--
-- -   @response-content-encoding@
--
-- __Additional Considerations about Request Headers__
--
-- 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, S3
-- returns 200 OK and the data requested.
--
-- 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, S3 returns 304 Not Modified response code.
--
-- For more information about conditional requests, see
-- <https://tools.ietf.org/html/rfc7232 RFC 7232>.
--
-- The following operations are related to @GetObject@:
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html ListBuckets>
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html GetObjectAcl>
module Amazonka.S3.GetObject
  ( -- * Creating a Request
    GetObject (..),
    newGetObject,

    -- * Request Lenses
    getObject_checksumMode,
    getObject_expectedBucketOwner,
    getObject_ifMatch,
    getObject_ifModifiedSince,
    getObject_ifNoneMatch,
    getObject_ifUnmodifiedSince,
    getObject_partNumber,
    getObject_range,
    getObject_requestPayer,
    getObject_responseCacheControl,
    getObject_responseContentDisposition,
    getObject_responseContentEncoding,
    getObject_responseContentLanguage,
    getObject_responseContentType,
    getObject_responseExpires,
    getObject_sSECustomerAlgorithm,
    getObject_sSECustomerKey,
    getObject_sSECustomerKeyMD5,
    getObject_versionId,
    getObject_bucket,
    getObject_key,

    -- * Destructuring the Response
    GetObjectResponse (..),
    newGetObjectResponse,

    -- * Response Lenses
    getObjectResponse_acceptRanges,
    getObjectResponse_bucketKeyEnabled,
    getObjectResponse_cacheControl,
    getObjectResponse_checksumCRC32,
    getObjectResponse_checksumCRC32C,
    getObjectResponse_checksumSHA1,
    getObjectResponse_checksumSHA256,
    getObjectResponse_contentDisposition,
    getObjectResponse_contentEncoding,
    getObjectResponse_contentLanguage,
    getObjectResponse_contentLength,
    getObjectResponse_contentRange,
    getObjectResponse_contentType,
    getObjectResponse_deleteMarker,
    getObjectResponse_eTag,
    getObjectResponse_expiration,
    getObjectResponse_expires,
    getObjectResponse_lastModified,
    getObjectResponse_metadata,
    getObjectResponse_missingMeta,
    getObjectResponse_objectLockLegalHoldStatus,
    getObjectResponse_objectLockMode,
    getObjectResponse_objectLockRetainUntilDate,
    getObjectResponse_partsCount,
    getObjectResponse_replicationStatus,
    getObjectResponse_requestCharged,
    getObjectResponse_restore,
    getObjectResponse_sSECustomerAlgorithm,
    getObjectResponse_sSECustomerKeyMD5,
    getObjectResponse_sSEKMSKeyId,
    getObjectResponse_serverSideEncryption,
    getObjectResponse_storageClass,
    getObjectResponse_tagCount,
    getObjectResponse_versionId,
    getObjectResponse_websiteRedirectLocation,
    getObjectResponse_httpStatus,
    getObjectResponse_body,
  )
where

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

-- | /See:/ 'newGetObject' smart constructor.
data GetObject = GetObject'
  { -- | To retrieve the checksum, this mode must be enabled.
    GetObject -> Maybe ChecksumMode
checksumMode :: Prelude.Maybe ChecksumMode,
    -- | The account ID of the expected bucket owner. If the bucket is owned by a
    -- different account, the request fails with the HTTP status code
    -- @403 Forbidden@ (access denied).
    GetObject -> Maybe Text
expectedBucketOwner :: Prelude.Maybe Prelude.Text,
    -- | Return the object only if its entity tag (ETag) is the same as the one
    -- specified; otherwise, return a 412 (precondition failed) error.
    GetObject -> Maybe Text
ifMatch :: Prelude.Maybe Prelude.Text,
    -- | Return the object only if it has been modified since the specified time;
    -- otherwise, return a 304 (not modified) error.
    GetObject -> Maybe RFC822
ifModifiedSince :: Prelude.Maybe Data.RFC822,
    -- | Return the object only if its entity tag (ETag) is different from the
    -- one specified; otherwise, return a 304 (not modified) error.
    GetObject -> Maybe Text
ifNoneMatch :: Prelude.Maybe Prelude.Text,
    -- | Return the object only if it has not been modified since the specified
    -- time; otherwise, return a 412 (precondition failed) error.
    GetObject -> Maybe RFC822
ifUnmodifiedSince :: Prelude.Maybe Data.RFC822,
    -- | Part number of the object being read. This is a positive integer between
    -- 1 and 10,000. Effectively performs a \'ranged\' GET request for the part
    -- specified. Useful for downloading just a part of an object.
    GetObject -> Maybe Int
partNumber :: Prelude.Maybe Prelude.Int,
    -- | Downloads the specified range bytes of an object. For more information
    -- about the HTTP Range header, see
    -- <https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35>.
    --
    -- Amazon S3 doesn\'t support retrieving multiple ranges of data per @GET@
    -- request.
    GetObject -> Maybe Text
range :: Prelude.Maybe Prelude.Text,
    GetObject -> Maybe RequestPayer
requestPayer :: Prelude.Maybe RequestPayer,
    -- | Sets the @Cache-Control@ header of the response.
    GetObject -> Maybe Text
responseCacheControl :: Prelude.Maybe Prelude.Text,
    -- | Sets the @Content-Disposition@ header of the response
    GetObject -> Maybe Text
responseContentDisposition :: Prelude.Maybe Prelude.Text,
    -- | Sets the @Content-Encoding@ header of the response.
    GetObject -> Maybe Text
responseContentEncoding :: Prelude.Maybe Prelude.Text,
    -- | Sets the @Content-Language@ header of the response.
    GetObject -> Maybe Text
responseContentLanguage :: Prelude.Maybe Prelude.Text,
    -- | Sets the @Content-Type@ header of the response.
    GetObject -> Maybe Text
responseContentType :: Prelude.Maybe Prelude.Text,
    -- | Sets the @Expires@ header of the response.
    GetObject -> Maybe RFC822
responseExpires :: Prelude.Maybe Data.RFC822,
    -- | Specifies the algorithm to use to when decrypting the object (for
    -- example, AES256).
    GetObject -> Maybe Text
sSECustomerAlgorithm :: Prelude.Maybe Prelude.Text,
    -- | Specifies the customer-provided encryption key for Amazon S3 used to
    -- encrypt the data. This value is used to decrypt the object when
    -- recovering it and must match the one used when storing the data. The key
    -- must be appropriate for use with the algorithm specified in the
    -- @x-amz-server-side-encryption-customer-algorithm@ header.
    GetObject -> Maybe (Sensitive Text)
sSECustomerKey :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | Specifies the 128-bit MD5 digest of the encryption key according to RFC
    -- 1321. Amazon S3 uses this header for a message integrity check to ensure
    -- that the encryption key was transmitted without error.
    GetObject -> Maybe Text
sSECustomerKeyMD5 :: Prelude.Maybe Prelude.Text,
    -- | VersionId used to reference a specific version of the object.
    GetObject -> Maybe ObjectVersionId
versionId :: Prelude.Maybe ObjectVersionId,
    -- | The bucket name 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 an Object Lambda access point the hostname takes the form
    -- /AccessPointName/-/AccountId/.s3-object-lambda./Region/.amazonaws.com.
    --
    -- When using this action with Amazon S3 on Outposts, you must direct
    -- requests to the S3 on Outposts hostname. The S3 on Outposts hostname
    -- takes the form
    -- @ @/@AccessPointName@/@-@/@AccountId@/@.@/@outpostID@/@.s3-outposts.@/@Region@/@.amazonaws.com@.
    -- When using this action with S3 on Outposts through the Amazon Web
    -- Services SDKs, you provide the Outposts bucket ARN in place of the
    -- bucket name. For more information about S3 on Outposts ARNs, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html Using Amazon S3 on Outposts>
    -- in the /Amazon S3 User Guide/.
    GetObject -> BucketName
bucket :: BucketName,
    -- | Key of the object to get.
    GetObject -> ObjectKey
key :: ObjectKey
  }
  deriving (GetObject -> GetObject -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetObject -> GetObject -> Bool
$c/= :: GetObject -> GetObject -> Bool
== :: GetObject -> GetObject -> Bool
$c== :: GetObject -> GetObject -> Bool
Prelude.Eq, Int -> GetObject -> ShowS
[GetObject] -> ShowS
GetObject -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetObject] -> ShowS
$cshowList :: [GetObject] -> ShowS
show :: GetObject -> String
$cshow :: GetObject -> String
showsPrec :: Int -> GetObject -> ShowS
$cshowsPrec :: Int -> GetObject -> ShowS
Prelude.Show, forall x. Rep GetObject x -> GetObject
forall x. GetObject -> Rep GetObject x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetObject x -> GetObject
$cfrom :: forall x. GetObject -> Rep GetObject x
Prelude.Generic)

-- |
-- Create a value of 'GetObject' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'checksumMode', 'getObject_checksumMode' - To retrieve the checksum, this mode must be enabled.
--
-- 'expectedBucketOwner', 'getObject_expectedBucketOwner' - The account ID of the expected bucket owner. If the bucket is owned by a
-- different account, the request fails with the HTTP status code
-- @403 Forbidden@ (access denied).
--
-- 'ifMatch', 'getObject_ifMatch' - Return the object only if its entity tag (ETag) is the same as the one
-- specified; otherwise, return a 412 (precondition failed) error.
--
-- 'ifModifiedSince', 'getObject_ifModifiedSince' - Return the object only if it has been modified since the specified time;
-- otherwise, return a 304 (not modified) error.
--
-- 'ifNoneMatch', 'getObject_ifNoneMatch' - Return the object only if its entity tag (ETag) is different from the
-- one specified; otherwise, return a 304 (not modified) error.
--
-- 'ifUnmodifiedSince', 'getObject_ifUnmodifiedSince' - Return the object only if it has not been modified since the specified
-- time; otherwise, return a 412 (precondition failed) error.
--
-- 'partNumber', 'getObject_partNumber' - Part number of the object being read. This is a positive integer between
-- 1 and 10,000. Effectively performs a \'ranged\' GET request for the part
-- specified. Useful for downloading just a part of an object.
--
-- 'range', 'getObject_range' - Downloads the specified range bytes of an object. For more information
-- about the HTTP Range header, see
-- <https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35>.
--
-- Amazon S3 doesn\'t support retrieving multiple ranges of data per @GET@
-- request.
--
-- 'requestPayer', 'getObject_requestPayer' - Undocumented member.
--
-- 'responseCacheControl', 'getObject_responseCacheControl' - Sets the @Cache-Control@ header of the response.
--
-- 'responseContentDisposition', 'getObject_responseContentDisposition' - Sets the @Content-Disposition@ header of the response
--
-- 'responseContentEncoding', 'getObject_responseContentEncoding' - Sets the @Content-Encoding@ header of the response.
--
-- 'responseContentLanguage', 'getObject_responseContentLanguage' - Sets the @Content-Language@ header of the response.
--
-- 'responseContentType', 'getObject_responseContentType' - Sets the @Content-Type@ header of the response.
--
-- 'responseExpires', 'getObject_responseExpires' - Sets the @Expires@ header of the response.
--
-- 'sSECustomerAlgorithm', 'getObject_sSECustomerAlgorithm' - Specifies the algorithm to use to when decrypting the object (for
-- example, AES256).
--
-- 'sSECustomerKey', 'getObject_sSECustomerKey' - Specifies the customer-provided encryption key for Amazon S3 used to
-- encrypt the data. This value is used to decrypt the object when
-- recovering it and must match the one used when storing the data. The key
-- must be appropriate for use with the algorithm specified in the
-- @x-amz-server-side-encryption-customer-algorithm@ header.
--
-- 'sSECustomerKeyMD5', 'getObject_sSECustomerKeyMD5' - Specifies the 128-bit MD5 digest of the encryption key according to RFC
-- 1321. Amazon S3 uses this header for a message integrity check to ensure
-- that the encryption key was transmitted without error.
--
-- 'versionId', 'getObject_versionId' - VersionId used to reference a specific version of the object.
--
-- 'bucket', 'getObject_bucket' - The bucket name 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 an Object Lambda access point the hostname takes the form
-- /AccessPointName/-/AccountId/.s3-object-lambda./Region/.amazonaws.com.
--
-- When using this action with Amazon S3 on Outposts, you must direct
-- requests to the S3 on Outposts hostname. The S3 on Outposts hostname
-- takes the form
-- @ @/@AccessPointName@/@-@/@AccountId@/@.@/@outpostID@/@.s3-outposts.@/@Region@/@.amazonaws.com@.
-- When using this action with S3 on Outposts through the Amazon Web
-- Services SDKs, you provide the Outposts bucket ARN in place of the
-- bucket name. For more information about S3 on Outposts ARNs, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html Using Amazon S3 on Outposts>
-- in the /Amazon S3 User Guide/.
--
-- 'key', 'getObject_key' - Key of the object to get.
newGetObject ::
  -- | 'bucket'
  BucketName ->
  -- | 'key'
  ObjectKey ->
  GetObject
newGetObject :: BucketName -> ObjectKey -> GetObject
newGetObject BucketName
pBucket_ ObjectKey
pKey_ =
  GetObject'
    { $sel:checksumMode:GetObject' :: Maybe ChecksumMode
checksumMode = forall a. Maybe a
Prelude.Nothing,
      $sel:expectedBucketOwner:GetObject' :: Maybe Text
expectedBucketOwner = forall a. Maybe a
Prelude.Nothing,
      $sel:ifMatch:GetObject' :: Maybe Text
ifMatch = forall a. Maybe a
Prelude.Nothing,
      $sel:ifModifiedSince:GetObject' :: Maybe RFC822
ifModifiedSince = forall a. Maybe a
Prelude.Nothing,
      $sel:ifNoneMatch:GetObject' :: Maybe Text
ifNoneMatch = forall a. Maybe a
Prelude.Nothing,
      $sel:ifUnmodifiedSince:GetObject' :: Maybe RFC822
ifUnmodifiedSince = forall a. Maybe a
Prelude.Nothing,
      $sel:partNumber:GetObject' :: Maybe Int
partNumber = forall a. Maybe a
Prelude.Nothing,
      $sel:range:GetObject' :: Maybe Text
range = forall a. Maybe a
Prelude.Nothing,
      $sel:requestPayer:GetObject' :: Maybe RequestPayer
requestPayer = forall a. Maybe a
Prelude.Nothing,
      $sel:responseCacheControl:GetObject' :: Maybe Text
responseCacheControl = forall a. Maybe a
Prelude.Nothing,
      $sel:responseContentDisposition:GetObject' :: Maybe Text
responseContentDisposition = forall a. Maybe a
Prelude.Nothing,
      $sel:responseContentEncoding:GetObject' :: Maybe Text
responseContentEncoding = forall a. Maybe a
Prelude.Nothing,
      $sel:responseContentLanguage:GetObject' :: Maybe Text
responseContentLanguage = forall a. Maybe a
Prelude.Nothing,
      $sel:responseContentType:GetObject' :: Maybe Text
responseContentType = forall a. Maybe a
Prelude.Nothing,
      $sel:responseExpires:GetObject' :: Maybe RFC822
responseExpires = forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerAlgorithm:GetObject' :: Maybe Text
sSECustomerAlgorithm = forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerKey:GetObject' :: Maybe (Sensitive Text)
sSECustomerKey = forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerKeyMD5:GetObject' :: Maybe Text
sSECustomerKeyMD5 = forall a. Maybe a
Prelude.Nothing,
      $sel:versionId:GetObject' :: Maybe ObjectVersionId
versionId = forall a. Maybe a
Prelude.Nothing,
      $sel:bucket:GetObject' :: BucketName
bucket = BucketName
pBucket_,
      $sel:key:GetObject' :: ObjectKey
key = ObjectKey
pKey_
    }

-- | To retrieve the checksum, this mode must be enabled.
getObject_checksumMode :: Lens.Lens' GetObject (Prelude.Maybe ChecksumMode)
getObject_checksumMode :: Lens' GetObject (Maybe ChecksumMode)
getObject_checksumMode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetObject' {Maybe ChecksumMode
checksumMode :: Maybe ChecksumMode
$sel:checksumMode:GetObject' :: GetObject -> Maybe ChecksumMode
checksumMode} -> Maybe ChecksumMode
checksumMode) (\s :: GetObject
s@GetObject' {} Maybe ChecksumMode
a -> GetObject
s {$sel:checksumMode:GetObject' :: Maybe ChecksumMode
checksumMode = Maybe ChecksumMode
a} :: GetObject)

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

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

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

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

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

-- | Part number of the object being read. This is a positive integer between
-- 1 and 10,000. Effectively performs a \'ranged\' GET request for the part
-- specified. Useful for downloading just a part of an object.
getObject_partNumber :: Lens.Lens' GetObject (Prelude.Maybe Prelude.Int)
getObject_partNumber :: Lens' GetObject (Maybe Int)
getObject_partNumber = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetObject' {Maybe Int
partNumber :: Maybe Int
$sel:partNumber:GetObject' :: GetObject -> Maybe Int
partNumber} -> Maybe Int
partNumber) (\s :: GetObject
s@GetObject' {} Maybe Int
a -> GetObject
s {$sel:partNumber:GetObject' :: Maybe Int
partNumber = Maybe Int
a} :: GetObject)

-- | Downloads the specified range bytes of an object. For more information
-- about the HTTP Range header, see
-- <https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35>.
--
-- Amazon S3 doesn\'t support retrieving multiple ranges of data per @GET@
-- request.
getObject_range :: Lens.Lens' GetObject (Prelude.Maybe Prelude.Text)
getObject_range :: Lens' GetObject (Maybe Text)
getObject_range = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetObject' {Maybe Text
range :: Maybe Text
$sel:range:GetObject' :: GetObject -> Maybe Text
range} -> Maybe Text
range) (\s :: GetObject
s@GetObject' {} Maybe Text
a -> GetObject
s {$sel:range:GetObject' :: Maybe Text
range = Maybe Text
a} :: GetObject)

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

-- | Sets the @Cache-Control@ header of the response.
getObject_responseCacheControl :: Lens.Lens' GetObject (Prelude.Maybe Prelude.Text)
getObject_responseCacheControl :: Lens' GetObject (Maybe Text)
getObject_responseCacheControl = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetObject' {Maybe Text
responseCacheControl :: Maybe Text
$sel:responseCacheControl:GetObject' :: GetObject -> Maybe Text
responseCacheControl} -> Maybe Text
responseCacheControl) (\s :: GetObject
s@GetObject' {} Maybe Text
a -> GetObject
s {$sel:responseCacheControl:GetObject' :: Maybe Text
responseCacheControl = Maybe Text
a} :: GetObject)

-- | Sets the @Content-Disposition@ header of the response
getObject_responseContentDisposition :: Lens.Lens' GetObject (Prelude.Maybe Prelude.Text)
getObject_responseContentDisposition :: Lens' GetObject (Maybe Text)
getObject_responseContentDisposition = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetObject' {Maybe Text
responseContentDisposition :: Maybe Text
$sel:responseContentDisposition:GetObject' :: GetObject -> Maybe Text
responseContentDisposition} -> Maybe Text
responseContentDisposition) (\s :: GetObject
s@GetObject' {} Maybe Text
a -> GetObject
s {$sel:responseContentDisposition:GetObject' :: Maybe Text
responseContentDisposition = Maybe Text
a} :: GetObject)

-- | Sets the @Content-Encoding@ header of the response.
getObject_responseContentEncoding :: Lens.Lens' GetObject (Prelude.Maybe Prelude.Text)
getObject_responseContentEncoding :: Lens' GetObject (Maybe Text)
getObject_responseContentEncoding = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetObject' {Maybe Text
responseContentEncoding :: Maybe Text
$sel:responseContentEncoding:GetObject' :: GetObject -> Maybe Text
responseContentEncoding} -> Maybe Text
responseContentEncoding) (\s :: GetObject
s@GetObject' {} Maybe Text
a -> GetObject
s {$sel:responseContentEncoding:GetObject' :: Maybe Text
responseContentEncoding = Maybe Text
a} :: GetObject)

-- | Sets the @Content-Language@ header of the response.
getObject_responseContentLanguage :: Lens.Lens' GetObject (Prelude.Maybe Prelude.Text)
getObject_responseContentLanguage :: Lens' GetObject (Maybe Text)
getObject_responseContentLanguage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetObject' {Maybe Text
responseContentLanguage :: Maybe Text
$sel:responseContentLanguage:GetObject' :: GetObject -> Maybe Text
responseContentLanguage} -> Maybe Text
responseContentLanguage) (\s :: GetObject
s@GetObject' {} Maybe Text
a -> GetObject
s {$sel:responseContentLanguage:GetObject' :: Maybe Text
responseContentLanguage = Maybe Text
a} :: GetObject)

-- | Sets the @Content-Type@ header of the response.
getObject_responseContentType :: Lens.Lens' GetObject (Prelude.Maybe Prelude.Text)
getObject_responseContentType :: Lens' GetObject (Maybe Text)
getObject_responseContentType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetObject' {Maybe Text
responseContentType :: Maybe Text
$sel:responseContentType:GetObject' :: GetObject -> Maybe Text
responseContentType} -> Maybe Text
responseContentType) (\s :: GetObject
s@GetObject' {} Maybe Text
a -> GetObject
s {$sel:responseContentType:GetObject' :: Maybe Text
responseContentType = Maybe Text
a} :: GetObject)

-- | Sets the @Expires@ header of the response.
getObject_responseExpires :: Lens.Lens' GetObject (Prelude.Maybe Prelude.UTCTime)
getObject_responseExpires :: Lens' GetObject (Maybe UTCTime)
getObject_responseExpires = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetObject' {Maybe RFC822
responseExpires :: Maybe RFC822
$sel:responseExpires:GetObject' :: GetObject -> Maybe RFC822
responseExpires} -> Maybe RFC822
responseExpires) (\s :: GetObject
s@GetObject' {} Maybe RFC822
a -> GetObject
s {$sel:responseExpires:GetObject' :: Maybe RFC822
responseExpires = Maybe RFC822
a} :: GetObject) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

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

-- | Specifies the customer-provided encryption key for Amazon S3 used to
-- encrypt the data. This value is used to decrypt the object when
-- recovering it and must match the one used when storing the data. The key
-- must be appropriate for use with the algorithm specified in the
-- @x-amz-server-side-encryption-customer-algorithm@ header.
getObject_sSECustomerKey :: Lens.Lens' GetObject (Prelude.Maybe Prelude.Text)
getObject_sSECustomerKey :: Lens' GetObject (Maybe Text)
getObject_sSECustomerKey = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetObject' {Maybe (Sensitive Text)
sSECustomerKey :: Maybe (Sensitive Text)
$sel:sSECustomerKey:GetObject' :: GetObject -> Maybe (Sensitive Text)
sSECustomerKey} -> Maybe (Sensitive Text)
sSECustomerKey) (\s :: GetObject
s@GetObject' {} Maybe (Sensitive Text)
a -> GetObject
s {$sel:sSECustomerKey:GetObject' :: Maybe (Sensitive Text)
sSECustomerKey = Maybe (Sensitive Text)
a} :: GetObject) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall a. Iso' (Sensitive a) a
Data._Sensitive

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

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

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

-- | Key of the object to get.
getObject_key :: Lens.Lens' GetObject ObjectKey
getObject_key :: Lens' GetObject ObjectKey
getObject_key = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetObject' {ObjectKey
key :: ObjectKey
$sel:key:GetObject' :: GetObject -> ObjectKey
key} -> ObjectKey
key) (\s :: GetObject
s@GetObject' {} ObjectKey
a -> GetObject
s {$sel:key:GetObject' :: ObjectKey
key = ObjectKey
a} :: GetObject)

instance Core.AWSRequest GetObject where
  type AWSResponse GetObject = GetObjectResponse
  request :: (Service -> Service) -> GetObject -> Request GetObject
request Service -> Service
overrides =
    forall a. Request a -> Request a
Request.s3vhost
      forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetObject
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetObject)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int
 -> ResponseHeaders
 -> ResponseBody
 -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveBody
      ( \Int
s ResponseHeaders
h ResponseBody
x ->
          Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe ETag
-> Maybe Text
-> Maybe RFC822
-> Maybe RFC822
-> HashMap Text Text
-> Maybe Int
-> Maybe ObjectLockLegalHoldStatus
-> Maybe ObjectLockMode
-> Maybe ISO8601
-> Maybe Int
-> Maybe ReplicationStatus
-> Maybe RequestCharged
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe ServerSideEncryption
-> Maybe StorageClass
-> Maybe Int
-> Maybe ObjectVersionId
-> Maybe Text
-> Int
-> ResponseBody
-> GetObjectResponse
GetObjectResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"accept-ranges")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( ResponseHeaders
h
                            forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-server-side-encryption-bucket-key-enabled"
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"Cache-Control")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-checksum-crc32")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-checksum-crc32c")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-checksum-sha1")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-checksum-sha256")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"Content-Disposition")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"Content-Encoding")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"Content-Language")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"Content-Length")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"Content-Range")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"Content-Type")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-delete-marker")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"ETag")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-expiration")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"Expires")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"Last-Modified")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall a.
FromText a =>
ByteString -> ResponseHeaders -> Either String (HashMap Text a)
Data.parseHeadersMap ByteString
"x-amz-meta-" ResponseHeaders
h)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-missing-meta")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-object-lock-legal-hold")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-object-lock-mode")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-object-lock-retain-until-date")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-mp-parts-count")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-replication-status")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-request-charged")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-restore")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( ResponseHeaders
h
                            forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-server-side-encryption-customer-algorithm"
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( ResponseHeaders
h
                            forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-server-side-encryption-customer-key-MD5"
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( ResponseHeaders
h
                            forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-server-side-encryption-aws-kms-key-id"
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-server-side-encryption")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-storage-class")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-tagging-count")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-version-id")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-website-redirect-location")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure ResponseBody
x)
      )

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

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

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

instance Data.ToPath GetObject where
  toPath :: GetObject -> ByteString
toPath GetObject' {Maybe Int
Maybe Text
Maybe (Sensitive Text)
Maybe RFC822
Maybe ObjectVersionId
Maybe ChecksumMode
Maybe RequestPayer
ObjectKey
BucketName
key :: ObjectKey
bucket :: BucketName
versionId :: Maybe ObjectVersionId
sSECustomerKeyMD5 :: Maybe Text
sSECustomerKey :: Maybe (Sensitive Text)
sSECustomerAlgorithm :: Maybe Text
responseExpires :: Maybe RFC822
responseContentType :: Maybe Text
responseContentLanguage :: Maybe Text
responseContentEncoding :: Maybe Text
responseContentDisposition :: Maybe Text
responseCacheControl :: Maybe Text
requestPayer :: Maybe RequestPayer
range :: Maybe Text
partNumber :: Maybe Int
ifUnmodifiedSince :: Maybe RFC822
ifNoneMatch :: Maybe Text
ifModifiedSince :: Maybe RFC822
ifMatch :: Maybe Text
expectedBucketOwner :: Maybe Text
checksumMode :: Maybe ChecksumMode
$sel:key:GetObject' :: GetObject -> ObjectKey
$sel:bucket:GetObject' :: GetObject -> BucketName
$sel:versionId:GetObject' :: GetObject -> Maybe ObjectVersionId
$sel:sSECustomerKeyMD5:GetObject' :: GetObject -> Maybe Text
$sel:sSECustomerKey:GetObject' :: GetObject -> Maybe (Sensitive Text)
$sel:sSECustomerAlgorithm:GetObject' :: GetObject -> Maybe Text
$sel:responseExpires:GetObject' :: GetObject -> Maybe RFC822
$sel:responseContentType:GetObject' :: GetObject -> Maybe Text
$sel:responseContentLanguage:GetObject' :: GetObject -> Maybe Text
$sel:responseContentEncoding:GetObject' :: GetObject -> Maybe Text
$sel:responseContentDisposition:GetObject' :: GetObject -> Maybe Text
$sel:responseCacheControl:GetObject' :: GetObject -> Maybe Text
$sel:requestPayer:GetObject' :: GetObject -> Maybe RequestPayer
$sel:range:GetObject' :: GetObject -> Maybe Text
$sel:partNumber:GetObject' :: GetObject -> Maybe Int
$sel:ifUnmodifiedSince:GetObject' :: GetObject -> Maybe RFC822
$sel:ifNoneMatch:GetObject' :: GetObject -> Maybe Text
$sel:ifModifiedSince:GetObject' :: GetObject -> Maybe RFC822
$sel:ifMatch:GetObject' :: GetObject -> Maybe Text
$sel:expectedBucketOwner:GetObject' :: GetObject -> Maybe Text
$sel:checksumMode:GetObject' :: GetObject -> Maybe ChecksumMode
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/", forall a. ToByteString a => a -> ByteString
Data.toBS BucketName
bucket, ByteString
"/", forall a. ToByteString a => a -> ByteString
Data.toBS ObjectKey
key]

instance Data.ToQuery GetObject where
  toQuery :: GetObject -> QueryString
toQuery GetObject' {Maybe Int
Maybe Text
Maybe (Sensitive Text)
Maybe RFC822
Maybe ObjectVersionId
Maybe ChecksumMode
Maybe RequestPayer
ObjectKey
BucketName
key :: ObjectKey
bucket :: BucketName
versionId :: Maybe ObjectVersionId
sSECustomerKeyMD5 :: Maybe Text
sSECustomerKey :: Maybe (Sensitive Text)
sSECustomerAlgorithm :: Maybe Text
responseExpires :: Maybe RFC822
responseContentType :: Maybe Text
responseContentLanguage :: Maybe Text
responseContentEncoding :: Maybe Text
responseContentDisposition :: Maybe Text
responseCacheControl :: Maybe Text
requestPayer :: Maybe RequestPayer
range :: Maybe Text
partNumber :: Maybe Int
ifUnmodifiedSince :: Maybe RFC822
ifNoneMatch :: Maybe Text
ifModifiedSince :: Maybe RFC822
ifMatch :: Maybe Text
expectedBucketOwner :: Maybe Text
checksumMode :: Maybe ChecksumMode
$sel:key:GetObject' :: GetObject -> ObjectKey
$sel:bucket:GetObject' :: GetObject -> BucketName
$sel:versionId:GetObject' :: GetObject -> Maybe ObjectVersionId
$sel:sSECustomerKeyMD5:GetObject' :: GetObject -> Maybe Text
$sel:sSECustomerKey:GetObject' :: GetObject -> Maybe (Sensitive Text)
$sel:sSECustomerAlgorithm:GetObject' :: GetObject -> Maybe Text
$sel:responseExpires:GetObject' :: GetObject -> Maybe RFC822
$sel:responseContentType:GetObject' :: GetObject -> Maybe Text
$sel:responseContentLanguage:GetObject' :: GetObject -> Maybe Text
$sel:responseContentEncoding:GetObject' :: GetObject -> Maybe Text
$sel:responseContentDisposition:GetObject' :: GetObject -> Maybe Text
$sel:responseCacheControl:GetObject' :: GetObject -> Maybe Text
$sel:requestPayer:GetObject' :: GetObject -> Maybe RequestPayer
$sel:range:GetObject' :: GetObject -> Maybe Text
$sel:partNumber:GetObject' :: GetObject -> Maybe Int
$sel:ifUnmodifiedSince:GetObject' :: GetObject -> Maybe RFC822
$sel:ifNoneMatch:GetObject' :: GetObject -> Maybe Text
$sel:ifModifiedSince:GetObject' :: GetObject -> Maybe RFC822
$sel:ifMatch:GetObject' :: GetObject -> Maybe Text
$sel:expectedBucketOwner:GetObject' :: GetObject -> Maybe Text
$sel:checksumMode:GetObject' :: GetObject -> Maybe ChecksumMode
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"partNumber" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
partNumber,
        ByteString
"response-cache-control"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
responseCacheControl,
        ByteString
"response-content-disposition"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
responseContentDisposition,
        ByteString
"response-content-encoding"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
responseContentEncoding,
        ByteString
"response-content-language"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
responseContentLanguage,
        ByteString
"response-content-type" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
responseContentType,
        ByteString
"response-expires" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe RFC822
responseExpires,
        ByteString
"versionId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe ObjectVersionId
versionId
      ]

-- | /See:/ 'newGetObjectResponse' smart constructor.
data GetObjectResponse = GetObjectResponse'
  { -- | Indicates that a range of bytes was specified.
    GetObjectResponse -> Maybe Text
acceptRanges :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether the object uses an S3 Bucket Key for server-side
    -- encryption with Amazon Web Services KMS (SSE-KMS).
    GetObjectResponse -> Maybe Bool
bucketKeyEnabled :: Prelude.Maybe Prelude.Bool,
    -- | Specifies caching behavior along the request\/reply chain.
    GetObjectResponse -> Maybe Text
cacheControl :: Prelude.Maybe Prelude.Text,
    -- | The base64-encoded, 32-bit CRC32 checksum of the object. This will only
    -- be present if it was uploaded with the object. With multipart uploads,
    -- this may not be a checksum value of the object. For more information
    -- about how checksums are calculated with multipart uploads, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums Checking object integrity>
    -- in the /Amazon S3 User Guide/.
    GetObjectResponse -> Maybe Text
checksumCRC32 :: Prelude.Maybe Prelude.Text,
    -- | The base64-encoded, 32-bit CRC32C checksum of the object. This will only
    -- be present if it was uploaded with the object. With multipart uploads,
    -- this may not be a checksum value of the object. For more information
    -- about how checksums are calculated with multipart uploads, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums Checking object integrity>
    -- in the /Amazon S3 User Guide/.
    GetObjectResponse -> Maybe Text
checksumCRC32C :: Prelude.Maybe Prelude.Text,
    -- | The base64-encoded, 160-bit SHA-1 digest of the object. This will only
    -- be present if it was uploaded with the object. With multipart uploads,
    -- this may not be a checksum value of the object. For more information
    -- about how checksums are calculated with multipart uploads, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums Checking object integrity>
    -- in the /Amazon S3 User Guide/.
    GetObjectResponse -> Maybe Text
checksumSHA1 :: Prelude.Maybe Prelude.Text,
    -- | The base64-encoded, 256-bit SHA-256 digest of the object. This will only
    -- be present if it was uploaded with the object. With multipart uploads,
    -- this may not be a checksum value of the object. For more information
    -- about how checksums are calculated with multipart uploads, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums Checking object integrity>
    -- in the /Amazon S3 User Guide/.
    GetObjectResponse -> Maybe Text
checksumSHA256 :: Prelude.Maybe Prelude.Text,
    -- | Specifies presentational information for the object.
    GetObjectResponse -> Maybe Text
contentDisposition :: Prelude.Maybe Prelude.Text,
    -- | Specifies what content encodings have been applied to the object and
    -- thus what decoding mechanisms must be applied to obtain the media-type
    -- referenced by the Content-Type header field.
    GetObjectResponse -> Maybe Text
contentEncoding :: Prelude.Maybe Prelude.Text,
    -- | The language the content is in.
    GetObjectResponse -> Maybe Text
contentLanguage :: Prelude.Maybe Prelude.Text,
    -- | Size of the body in bytes.
    GetObjectResponse -> Maybe Integer
contentLength :: Prelude.Maybe Prelude.Integer,
    -- | The portion of the object returned in the response.
    GetObjectResponse -> Maybe Text
contentRange :: Prelude.Maybe Prelude.Text,
    -- | A standard MIME type describing the format of the object data.
    GetObjectResponse -> Maybe Text
contentType :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether the object retrieved was (true) or was not (false) a
    -- Delete Marker. If false, this response header does not appear in the
    -- response.
    GetObjectResponse -> Maybe Bool
deleteMarker :: Prelude.Maybe Prelude.Bool,
    -- | An entity tag (ETag) is an opaque identifier assigned by a web server to
    -- a specific version of a resource found at a URL.
    GetObjectResponse -> Maybe ETag
eTag :: Prelude.Maybe ETag,
    -- | If the object expiration is configured (see PUT Bucket lifecycle), the
    -- response includes this header. It includes the @expiry-date@ and
    -- @rule-id@ key-value pairs providing object expiration information. The
    -- value of the @rule-id@ is URL-encoded.
    GetObjectResponse -> Maybe Text
expiration :: Prelude.Maybe Prelude.Text,
    -- | The date and time at which the object is no longer cacheable.
    GetObjectResponse -> Maybe RFC822
expires :: Prelude.Maybe Data.RFC822,
    -- | Creation date of the object.
    GetObjectResponse -> Maybe RFC822
lastModified :: Prelude.Maybe Data.RFC822,
    -- | A map of metadata to store with the object in S3.
    GetObjectResponse -> HashMap Text Text
metadata :: Prelude.HashMap Prelude.Text Prelude.Text,
    -- | This is set to the number of metadata entries not returned in
    -- @x-amz-meta@ headers. This can happen if you create metadata using an
    -- API like SOAP that supports more flexible metadata than the REST API.
    -- For example, using SOAP, you can create metadata whose values are not
    -- legal HTTP headers.
    GetObjectResponse -> Maybe Int
missingMeta :: Prelude.Maybe Prelude.Int,
    -- | Indicates whether this object has an active legal hold. This field is
    -- only returned if you have permission to view an object\'s legal hold
    -- status.
    GetObjectResponse -> Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus :: Prelude.Maybe ObjectLockLegalHoldStatus,
    -- | The Object Lock mode currently in place for this object.
    GetObjectResponse -> Maybe ObjectLockMode
objectLockMode :: Prelude.Maybe ObjectLockMode,
    -- | The date and time when this object\'s Object Lock will expire.
    GetObjectResponse -> Maybe ISO8601
objectLockRetainUntilDate :: Prelude.Maybe Data.ISO8601,
    -- | The count of parts this object has. This value is only returned if you
    -- specify @partNumber@ in your request and the object was uploaded as a
    -- multipart upload.
    GetObjectResponse -> Maybe Int
partsCount :: Prelude.Maybe Prelude.Int,
    -- | Amazon S3 can return this if your request involves a bucket that is
    -- either a source or destination in a replication rule.
    GetObjectResponse -> Maybe ReplicationStatus
replicationStatus :: Prelude.Maybe ReplicationStatus,
    GetObjectResponse -> Maybe RequestCharged
requestCharged :: Prelude.Maybe RequestCharged,
    -- | Provides information about object restoration action and expiration time
    -- of the restored object copy.
    GetObjectResponse -> Maybe Text
restore :: Prelude.Maybe Prelude.Text,
    -- | If server-side encryption with a customer-provided encryption key was
    -- requested, the response will include this header confirming the
    -- encryption algorithm used.
    GetObjectResponse -> Maybe Text
sSECustomerAlgorithm :: Prelude.Maybe Prelude.Text,
    -- | If server-side encryption with a customer-provided encryption key was
    -- requested, the response will include this header to provide round-trip
    -- message integrity verification of the customer-provided encryption key.
    GetObjectResponse -> 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.
    GetObjectResponse -> Maybe (Sensitive Text)
sSEKMSKeyId :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The server-side encryption algorithm used when storing this object in
    -- Amazon S3 (for example, AES256, aws:kms).
    GetObjectResponse -> Maybe ServerSideEncryption
serverSideEncryption :: Prelude.Maybe ServerSideEncryption,
    -- | Provides storage class information of the object. Amazon S3 returns this
    -- header for all objects except for S3 Standard storage class objects.
    GetObjectResponse -> Maybe StorageClass
storageClass :: Prelude.Maybe StorageClass,
    -- | The number of tags, if any, on the object.
    GetObjectResponse -> Maybe Int
tagCount :: Prelude.Maybe Prelude.Int,
    -- | Version of the object.
    GetObjectResponse -> Maybe ObjectVersionId
versionId :: Prelude.Maybe ObjectVersionId,
    -- | If the bucket is configured as a website, redirects requests for this
    -- object to another object in the same bucket or to an external URL.
    -- Amazon S3 stores the value of this header in the object metadata.
    GetObjectResponse -> Maybe Text
websiteRedirectLocation :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetObjectResponse -> Int
httpStatus :: Prelude.Int,
    -- | Object data.
    GetObjectResponse -> ResponseBody
body :: Data.ResponseBody
  }
  deriving (Int -> GetObjectResponse -> ShowS
[GetObjectResponse] -> ShowS
GetObjectResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetObjectResponse] -> ShowS
$cshowList :: [GetObjectResponse] -> ShowS
show :: GetObjectResponse -> String
$cshow :: GetObjectResponse -> String
showsPrec :: Int -> GetObjectResponse -> ShowS
$cshowsPrec :: Int -> GetObjectResponse -> ShowS
Prelude.Show, forall x. Rep GetObjectResponse x -> GetObjectResponse
forall x. GetObjectResponse -> Rep GetObjectResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetObjectResponse x -> GetObjectResponse
$cfrom :: forall x. GetObjectResponse -> Rep GetObjectResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetObjectResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'acceptRanges', 'getObjectResponse_acceptRanges' - Indicates that a range of bytes was specified.
--
-- 'bucketKeyEnabled', 'getObjectResponse_bucketKeyEnabled' - Indicates whether the object uses an S3 Bucket Key for server-side
-- encryption with Amazon Web Services KMS (SSE-KMS).
--
-- 'cacheControl', 'getObjectResponse_cacheControl' - Specifies caching behavior along the request\/reply chain.
--
-- 'checksumCRC32', 'getObjectResponse_checksumCRC32' - The base64-encoded, 32-bit CRC32 checksum of the object. This will only
-- be present if it was uploaded with the object. With multipart uploads,
-- this may not be a checksum value of the object. For more information
-- about how checksums are calculated with multipart uploads, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums Checking object integrity>
-- in the /Amazon S3 User Guide/.
--
-- 'checksumCRC32C', 'getObjectResponse_checksumCRC32C' - The base64-encoded, 32-bit CRC32C checksum of the object. This will only
-- be present if it was uploaded with the object. With multipart uploads,
-- this may not be a checksum value of the object. For more information
-- about how checksums are calculated with multipart uploads, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums Checking object integrity>
-- in the /Amazon S3 User Guide/.
--
-- 'checksumSHA1', 'getObjectResponse_checksumSHA1' - The base64-encoded, 160-bit SHA-1 digest of the object. This will only
-- be present if it was uploaded with the object. With multipart uploads,
-- this may not be a checksum value of the object. For more information
-- about how checksums are calculated with multipart uploads, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums Checking object integrity>
-- in the /Amazon S3 User Guide/.
--
-- 'checksumSHA256', 'getObjectResponse_checksumSHA256' - The base64-encoded, 256-bit SHA-256 digest of the object. This will only
-- be present if it was uploaded with the object. With multipart uploads,
-- this may not be a checksum value of the object. For more information
-- about how checksums are calculated with multipart uploads, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums Checking object integrity>
-- in the /Amazon S3 User Guide/.
--
-- 'contentDisposition', 'getObjectResponse_contentDisposition' - Specifies presentational information for the object.
--
-- 'contentEncoding', 'getObjectResponse_contentEncoding' - Specifies what content encodings have been applied to the object and
-- thus what decoding mechanisms must be applied to obtain the media-type
-- referenced by the Content-Type header field.
--
-- 'contentLanguage', 'getObjectResponse_contentLanguage' - The language the content is in.
--
-- 'contentLength', 'getObjectResponse_contentLength' - Size of the body in bytes.
--
-- 'contentRange', 'getObjectResponse_contentRange' - The portion of the object returned in the response.
--
-- 'contentType', 'getObjectResponse_contentType' - A standard MIME type describing the format of the object data.
--
-- 'deleteMarker', 'getObjectResponse_deleteMarker' - Specifies whether the object retrieved was (true) or was not (false) a
-- Delete Marker. If false, this response header does not appear in the
-- response.
--
-- 'eTag', 'getObjectResponse_eTag' - An entity tag (ETag) is an opaque identifier assigned by a web server to
-- a specific version of a resource found at a URL.
--
-- 'expiration', 'getObjectResponse_expiration' - If the object expiration is configured (see PUT Bucket lifecycle), the
-- response includes this header. It includes the @expiry-date@ and
-- @rule-id@ key-value pairs providing object expiration information. The
-- value of the @rule-id@ is URL-encoded.
--
-- 'expires', 'getObjectResponse_expires' - The date and time at which the object is no longer cacheable.
--
-- 'lastModified', 'getObjectResponse_lastModified' - Creation date of the object.
--
-- 'metadata', 'getObjectResponse_metadata' - A map of metadata to store with the object in S3.
--
-- 'missingMeta', 'getObjectResponse_missingMeta' - This is set to the number of metadata entries not returned in
-- @x-amz-meta@ headers. This can happen if you create metadata using an
-- API like SOAP that supports more flexible metadata than the REST API.
-- For example, using SOAP, you can create metadata whose values are not
-- legal HTTP headers.
--
-- 'objectLockLegalHoldStatus', 'getObjectResponse_objectLockLegalHoldStatus' - Indicates whether this object has an active legal hold. This field is
-- only returned if you have permission to view an object\'s legal hold
-- status.
--
-- 'objectLockMode', 'getObjectResponse_objectLockMode' - The Object Lock mode currently in place for this object.
--
-- 'objectLockRetainUntilDate', 'getObjectResponse_objectLockRetainUntilDate' - The date and time when this object\'s Object Lock will expire.
--
-- 'partsCount', 'getObjectResponse_partsCount' - The count of parts this object has. This value is only returned if you
-- specify @partNumber@ in your request and the object was uploaded as a
-- multipart upload.
--
-- 'replicationStatus', 'getObjectResponse_replicationStatus' - Amazon S3 can return this if your request involves a bucket that is
-- either a source or destination in a replication rule.
--
-- 'requestCharged', 'getObjectResponse_requestCharged' - Undocumented member.
--
-- 'restore', 'getObjectResponse_restore' - Provides information about object restoration action and expiration time
-- of the restored object copy.
--
-- 'sSECustomerAlgorithm', 'getObjectResponse_sSECustomerAlgorithm' - If server-side encryption with a customer-provided encryption key was
-- requested, the response will include this header confirming the
-- encryption algorithm used.
--
-- 'sSECustomerKeyMD5', 'getObjectResponse_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', 'getObjectResponse_sSEKMSKeyId' - If present, specifies the ID of the Amazon Web Services Key Management
-- Service (Amazon Web Services KMS) symmetric customer managed key that
-- was used for the object.
--
-- 'serverSideEncryption', 'getObjectResponse_serverSideEncryption' - The server-side encryption algorithm used when storing this object in
-- Amazon S3 (for example, AES256, aws:kms).
--
-- 'storageClass', 'getObjectResponse_storageClass' - Provides storage class information of the object. Amazon S3 returns this
-- header for all objects except for S3 Standard storage class objects.
--
-- 'tagCount', 'getObjectResponse_tagCount' - The number of tags, if any, on the object.
--
-- 'versionId', 'getObjectResponse_versionId' - Version of the object.
--
-- 'websiteRedirectLocation', 'getObjectResponse_websiteRedirectLocation' - If the bucket is configured as a website, redirects requests for this
-- object to another object in the same bucket or to an external URL.
-- Amazon S3 stores the value of this header in the object metadata.
--
-- 'httpStatus', 'getObjectResponse_httpStatus' - The response's http status code.
--
-- 'body', 'getObjectResponse_body' - Object data.
newGetObjectResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'body'
  Data.ResponseBody ->
  GetObjectResponse
newGetObjectResponse :: Int -> ResponseBody -> GetObjectResponse
newGetObjectResponse Int
pHttpStatus_ ResponseBody
pBody_ =
  GetObjectResponse'
    { $sel:acceptRanges:GetObjectResponse' :: Maybe Text
acceptRanges = forall a. Maybe a
Prelude.Nothing,
      $sel:bucketKeyEnabled:GetObjectResponse' :: Maybe Bool
bucketKeyEnabled = forall a. Maybe a
Prelude.Nothing,
      $sel:cacheControl:GetObjectResponse' :: Maybe Text
cacheControl = forall a. Maybe a
Prelude.Nothing,
      $sel:checksumCRC32:GetObjectResponse' :: Maybe Text
checksumCRC32 = forall a. Maybe a
Prelude.Nothing,
      $sel:checksumCRC32C:GetObjectResponse' :: Maybe Text
checksumCRC32C = forall a. Maybe a
Prelude.Nothing,
      $sel:checksumSHA1:GetObjectResponse' :: Maybe Text
checksumSHA1 = forall a. Maybe a
Prelude.Nothing,
      $sel:checksumSHA256:GetObjectResponse' :: Maybe Text
checksumSHA256 = forall a. Maybe a
Prelude.Nothing,
      $sel:contentDisposition:GetObjectResponse' :: Maybe Text
contentDisposition = forall a. Maybe a
Prelude.Nothing,
      $sel:contentEncoding:GetObjectResponse' :: Maybe Text
contentEncoding = forall a. Maybe a
Prelude.Nothing,
      $sel:contentLanguage:GetObjectResponse' :: Maybe Text
contentLanguage = forall a. Maybe a
Prelude.Nothing,
      $sel:contentLength:GetObjectResponse' :: Maybe Integer
contentLength = forall a. Maybe a
Prelude.Nothing,
      $sel:contentRange:GetObjectResponse' :: Maybe Text
contentRange = forall a. Maybe a
Prelude.Nothing,
      $sel:contentType:GetObjectResponse' :: Maybe Text
contentType = forall a. Maybe a
Prelude.Nothing,
      $sel:deleteMarker:GetObjectResponse' :: Maybe Bool
deleteMarker = forall a. Maybe a
Prelude.Nothing,
      $sel:eTag:GetObjectResponse' :: Maybe ETag
eTag = forall a. Maybe a
Prelude.Nothing,
      $sel:expiration:GetObjectResponse' :: Maybe Text
expiration = forall a. Maybe a
Prelude.Nothing,
      $sel:expires:GetObjectResponse' :: Maybe RFC822
expires = forall a. Maybe a
Prelude.Nothing,
      $sel:lastModified:GetObjectResponse' :: Maybe RFC822
lastModified = forall a. Maybe a
Prelude.Nothing,
      $sel:metadata:GetObjectResponse' :: HashMap Text Text
metadata = forall a. Monoid a => a
Prelude.mempty,
      $sel:missingMeta:GetObjectResponse' :: Maybe Int
missingMeta = forall a. Maybe a
Prelude.Nothing,
      $sel:objectLockLegalHoldStatus:GetObjectResponse' :: Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:objectLockMode:GetObjectResponse' :: Maybe ObjectLockMode
objectLockMode = forall a. Maybe a
Prelude.Nothing,
      $sel:objectLockRetainUntilDate:GetObjectResponse' :: Maybe ISO8601
objectLockRetainUntilDate = forall a. Maybe a
Prelude.Nothing,
      $sel:partsCount:GetObjectResponse' :: Maybe Int
partsCount = forall a. Maybe a
Prelude.Nothing,
      $sel:replicationStatus:GetObjectResponse' :: Maybe ReplicationStatus
replicationStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:requestCharged:GetObjectResponse' :: Maybe RequestCharged
requestCharged = forall a. Maybe a
Prelude.Nothing,
      $sel:restore:GetObjectResponse' :: Maybe Text
restore = forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerAlgorithm:GetObjectResponse' :: Maybe Text
sSECustomerAlgorithm = forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerKeyMD5:GetObjectResponse' :: Maybe Text
sSECustomerKeyMD5 = forall a. Maybe a
Prelude.Nothing,
      $sel:sSEKMSKeyId:GetObjectResponse' :: Maybe (Sensitive Text)
sSEKMSKeyId = forall a. Maybe a
Prelude.Nothing,
      $sel:serverSideEncryption:GetObjectResponse' :: Maybe ServerSideEncryption
serverSideEncryption = forall a. Maybe a
Prelude.Nothing,
      $sel:storageClass:GetObjectResponse' :: Maybe StorageClass
storageClass = forall a. Maybe a
Prelude.Nothing,
      $sel:tagCount:GetObjectResponse' :: Maybe Int
tagCount = forall a. Maybe a
Prelude.Nothing,
      $sel:versionId:GetObjectResponse' :: Maybe ObjectVersionId
versionId = forall a. Maybe a
Prelude.Nothing,
      $sel:websiteRedirectLocation:GetObjectResponse' :: Maybe Text
websiteRedirectLocation = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetObjectResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:body:GetObjectResponse' :: ResponseBody
body = ResponseBody
pBody_
    }

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

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

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

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

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

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

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

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

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

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

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

-- | The portion of the object returned in the response.
getObjectResponse_contentRange :: Lens.Lens' GetObjectResponse (Prelude.Maybe Prelude.Text)
getObjectResponse_contentRange :: Lens' GetObjectResponse (Maybe Text)
getObjectResponse_contentRange = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetObjectResponse' {Maybe Text
contentRange :: Maybe Text
$sel:contentRange:GetObjectResponse' :: GetObjectResponse -> Maybe Text
contentRange} -> Maybe Text
contentRange) (\s :: GetObjectResponse
s@GetObjectResponse' {} Maybe Text
a -> GetObjectResponse
s {$sel:contentRange:GetObjectResponse' :: Maybe Text
contentRange = Maybe Text
a} :: GetObjectResponse)

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

-- | 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.
getObjectResponse_deleteMarker :: Lens.Lens' GetObjectResponse (Prelude.Maybe Prelude.Bool)
getObjectResponse_deleteMarker :: Lens' GetObjectResponse (Maybe Bool)
getObjectResponse_deleteMarker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetObjectResponse' {Maybe Bool
deleteMarker :: Maybe Bool
$sel:deleteMarker:GetObjectResponse' :: GetObjectResponse -> Maybe Bool
deleteMarker} -> Maybe Bool
deleteMarker) (\s :: GetObjectResponse
s@GetObjectResponse' {} Maybe Bool
a -> GetObjectResponse
s {$sel:deleteMarker:GetObjectResponse' :: Maybe Bool
deleteMarker = Maybe Bool
a} :: GetObjectResponse)

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

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

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

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

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

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

-- | Indicates whether this object has an active legal hold. This field is
-- only returned if you have permission to view an object\'s legal hold
-- status.
getObjectResponse_objectLockLegalHoldStatus :: Lens.Lens' GetObjectResponse (Prelude.Maybe ObjectLockLegalHoldStatus)
getObjectResponse_objectLockLegalHoldStatus :: Lens' GetObjectResponse (Maybe ObjectLockLegalHoldStatus)
getObjectResponse_objectLockLegalHoldStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetObjectResponse' {Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus :: Maybe ObjectLockLegalHoldStatus
$sel:objectLockLegalHoldStatus:GetObjectResponse' :: GetObjectResponse -> Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus} -> Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus) (\s :: GetObjectResponse
s@GetObjectResponse' {} Maybe ObjectLockLegalHoldStatus
a -> GetObjectResponse
s {$sel:objectLockLegalHoldStatus:GetObjectResponse' :: Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus = Maybe ObjectLockLegalHoldStatus
a} :: GetObjectResponse)

-- | The Object Lock mode currently in place for this object.
getObjectResponse_objectLockMode :: Lens.Lens' GetObjectResponse (Prelude.Maybe ObjectLockMode)
getObjectResponse_objectLockMode :: Lens' GetObjectResponse (Maybe ObjectLockMode)
getObjectResponse_objectLockMode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetObjectResponse' {Maybe ObjectLockMode
objectLockMode :: Maybe ObjectLockMode
$sel:objectLockMode:GetObjectResponse' :: GetObjectResponse -> Maybe ObjectLockMode
objectLockMode} -> Maybe ObjectLockMode
objectLockMode) (\s :: GetObjectResponse
s@GetObjectResponse' {} Maybe ObjectLockMode
a -> GetObjectResponse
s {$sel:objectLockMode:GetObjectResponse' :: Maybe ObjectLockMode
objectLockMode = Maybe ObjectLockMode
a} :: GetObjectResponse)

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

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

-- | Amazon S3 can return this if your request involves a bucket that is
-- either a source or destination in a replication rule.
getObjectResponse_replicationStatus :: Lens.Lens' GetObjectResponse (Prelude.Maybe ReplicationStatus)
getObjectResponse_replicationStatus :: Lens' GetObjectResponse (Maybe ReplicationStatus)
getObjectResponse_replicationStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetObjectResponse' {Maybe ReplicationStatus
replicationStatus :: Maybe ReplicationStatus
$sel:replicationStatus:GetObjectResponse' :: GetObjectResponse -> Maybe ReplicationStatus
replicationStatus} -> Maybe ReplicationStatus
replicationStatus) (\s :: GetObjectResponse
s@GetObjectResponse' {} Maybe ReplicationStatus
a -> GetObjectResponse
s {$sel:replicationStatus:GetObjectResponse' :: Maybe ReplicationStatus
replicationStatus = Maybe ReplicationStatus
a} :: GetObjectResponse)

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

-- | Provides information about object restoration action and expiration time
-- of the restored object copy.
getObjectResponse_restore :: Lens.Lens' GetObjectResponse (Prelude.Maybe Prelude.Text)
getObjectResponse_restore :: Lens' GetObjectResponse (Maybe Text)
getObjectResponse_restore = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetObjectResponse' {Maybe Text
restore :: Maybe Text
$sel:restore:GetObjectResponse' :: GetObjectResponse -> Maybe Text
restore} -> Maybe Text
restore) (\s :: GetObjectResponse
s@GetObjectResponse' {} Maybe Text
a -> GetObjectResponse
s {$sel:restore:GetObjectResponse' :: Maybe Text
restore = Maybe Text
a} :: GetObjectResponse)

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

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

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

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

-- | Provides storage class information of the object. Amazon S3 returns this
-- header for all objects except for S3 Standard storage class objects.
getObjectResponse_storageClass :: Lens.Lens' GetObjectResponse (Prelude.Maybe StorageClass)
getObjectResponse_storageClass :: Lens' GetObjectResponse (Maybe StorageClass)
getObjectResponse_storageClass = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetObjectResponse' {Maybe StorageClass
storageClass :: Maybe StorageClass
$sel:storageClass:GetObjectResponse' :: GetObjectResponse -> Maybe StorageClass
storageClass} -> Maybe StorageClass
storageClass) (\s :: GetObjectResponse
s@GetObjectResponse' {} Maybe StorageClass
a -> GetObjectResponse
s {$sel:storageClass:GetObjectResponse' :: Maybe StorageClass
storageClass = Maybe StorageClass
a} :: GetObjectResponse)

-- | The number of tags, if any, on the object.
getObjectResponse_tagCount :: Lens.Lens' GetObjectResponse (Prelude.Maybe Prelude.Int)
getObjectResponse_tagCount :: Lens' GetObjectResponse (Maybe Int)
getObjectResponse_tagCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetObjectResponse' {Maybe Int
tagCount :: Maybe Int
$sel:tagCount:GetObjectResponse' :: GetObjectResponse -> Maybe Int
tagCount} -> Maybe Int
tagCount) (\s :: GetObjectResponse
s@GetObjectResponse' {} Maybe Int
a -> GetObjectResponse
s {$sel:tagCount:GetObjectResponse' :: Maybe Int
tagCount = Maybe Int
a} :: GetObjectResponse)

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

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

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

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