{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- 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>.
--
-- To distribute large files to many people, you can save bandwidth costs
-- by using BitTorrent. For more information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/S3Torrent.html Amazon S3 Torrent>.
-- 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.
--
-- -   You need the @s3:GetObjectVersion@ permission to access a specific
--     version of an object.
--
-- -   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_ifMatch,
    getObject_versionId,
    getObject_responseContentType,
    getObject_responseContentDisposition,
    getObject_responseContentLanguage,
    getObject_sSECustomerAlgorithm,
    getObject_sSECustomerKey,
    getObject_requestPayer,
    getObject_responseContentEncoding,
    getObject_ifModifiedSince,
    getObject_partNumber,
    getObject_range,
    getObject_ifUnmodifiedSince,
    getObject_sSECustomerKeyMD5,
    getObject_responseCacheControl,
    getObject_responseExpires,
    getObject_ifNoneMatch,
    getObject_expectedBucketOwner,
    getObject_bucket,
    getObject_key,

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

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

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

-- | /See:/ 'newGetObject' smart constructor.
data GetObject = GetObject'
  { -- | Return the object only if its entity tag (ETag) is the same as the one
    -- specified, otherwise return a 412 (precondition failed).
    GetObject -> Maybe Text
ifMatch :: Prelude.Maybe Prelude.Text,
    -- | VersionId used to reference a specific version of the object.
    GetObject -> Maybe ObjectVersionId
versionId :: Prelude.Maybe ObjectVersionId,
    -- | Sets the @Content-Type@ header of the response.
    GetObject -> Maybe Text
responseContentType :: Prelude.Maybe Prelude.Text,
    -- | Sets the @Content-Disposition@ header of the response
    GetObject -> Maybe Text
responseContentDisposition :: Prelude.Maybe Prelude.Text,
    -- | Sets the @Content-Language@ header of the response.
    GetObject -> Maybe Text
responseContentLanguage :: Prelude.Maybe Prelude.Text,
    -- | 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 (Core.Sensitive Prelude.Text),
    GetObject -> Maybe RequestPayer
requestPayer :: Prelude.Maybe RequestPayer,
    -- | Sets the @Content-Encoding@ header of the response.
    GetObject -> Maybe Text
responseContentEncoding :: Prelude.Maybe Prelude.Text,
    -- | Return the object only if it has been modified since the specified time,
    -- otherwise return a 304 (not modified).
    GetObject -> Maybe ISO8601
ifModifiedSince :: Prelude.Maybe Core.ISO8601,
    -- | Part number of the object being read. This is a positive integer between
    -- 1 and 10,000. Effectively performs a \'ranged\' 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,
    -- | Return the object only if it has not been modified since the specified
    -- time, otherwise return a 412 (precondition failed).
    GetObject -> Maybe ISO8601
ifUnmodifiedSince :: Prelude.Maybe Core.ISO8601,
    -- | Specifies the 128-bit MD5 digest of the encryption key according to RFC
    -- 1321. Amazon S3 uses this header for a message integrity check to ensure
    -- that the encryption key was transmitted without error.
    GetObject -> Maybe Text
sSECustomerKeyMD5 :: Prelude.Maybe Prelude.Text,
    -- | Sets the @Cache-Control@ header of the response.
    GetObject -> Maybe Text
responseCacheControl :: Prelude.Maybe Prelude.Text,
    -- | Sets the @Expires@ header of the response.
    GetObject -> Maybe ISO8601
responseExpires :: Prelude.Maybe Core.ISO8601,
    -- | Return the object only if its entity tag (ETag) is different from the
    -- one specified, otherwise return a 304 (not modified).
    GetObject -> Maybe Text
ifNoneMatch :: Prelude.Maybe Prelude.Text,
    -- | The account ID of the expected bucket owner. If the bucket is owned by a
    -- different account, the request will fail with an HTTP
    -- @403 (Access Denied)@ error.
    GetObject -> Maybe Text
expectedBucketOwner :: Prelude.Maybe Prelude.Text,
    -- | 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 using S3 on Outposts through the Amazon Web
    -- Services SDKs, you provide the Outposts bucket ARN in place of the
    -- bucket name. For more information about S3 on Outposts ARNs, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html Using S3 on Outposts>
    -- in the /Amazon S3 User Guide/.
    GetObject -> BucketName
bucket :: BucketName,
    -- | Key of the object to get.
    GetObject -> ObjectKey
key :: ObjectKey
  }
  deriving (GetObject -> GetObject -> Bool
(GetObject -> GetObject -> Bool)
-> (GetObject -> GetObject -> Bool) -> Eq GetObject
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
(Int -> GetObject -> ShowS)
-> (GetObject -> String)
-> ([GetObject] -> ShowS)
-> Show GetObject
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. GetObject -> Rep GetObject x)
-> (forall x. Rep GetObject x -> GetObject) -> Generic GetObject
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:
--
-- '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).
--
-- 'versionId', 'getObject_versionId' - VersionId used to reference a specific version of the object.
--
-- 'responseContentType', 'getObject_responseContentType' - Sets the @Content-Type@ header of the response.
--
-- 'responseContentDisposition', 'getObject_responseContentDisposition' - Sets the @Content-Disposition@ header of the response
--
-- 'responseContentLanguage', 'getObject_responseContentLanguage' - Sets the @Content-Language@ 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.
--
-- 'requestPayer', 'getObject_requestPayer' - Undocumented member.
--
-- 'responseContentEncoding', 'getObject_responseContentEncoding' - Sets the @Content-Encoding@ header of the response.
--
-- 'ifModifiedSince', 'getObject_ifModifiedSince' - Return the object only if it has been modified since the specified time,
-- otherwise return a 304 (not modified).
--
-- '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.
--
-- 'ifUnmodifiedSince', 'getObject_ifUnmodifiedSince' - Return the object only if it has not been modified since the specified
-- time, otherwise return a 412 (precondition failed).
--
-- '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.
--
-- 'responseCacheControl', 'getObject_responseCacheControl' - Sets the @Cache-Control@ header of the response.
--
-- 'responseExpires', 'getObject_responseExpires' - Sets the @Expires@ header of the response.
--
-- 'ifNoneMatch', 'getObject_ifNoneMatch' - Return the object only if its entity tag (ETag) is different from the
-- one specified, otherwise return a 304 (not modified).
--
-- 'expectedBucketOwner', 'getObject_expectedBucketOwner' - The account ID of the expected bucket owner. If the bucket is owned by a
-- different account, the request will fail with an HTTP
-- @403 (Access Denied)@ error.
--
-- 'bucket', '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 using S3 on Outposts through the Amazon Web
-- Services SDKs, you provide the Outposts bucket ARN in place of the
-- bucket name. For more information about S3 on Outposts ARNs, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html Using S3 on Outposts>
-- in the /Amazon S3 User Guide/.
--
-- 'key', 'getObject_key' - Key of the object to get.
newGetObject ::
  -- | 'bucket'
  BucketName ->
  -- | 'key'
  ObjectKey ->
  GetObject
newGetObject :: BucketName -> ObjectKey -> GetObject
newGetObject BucketName
pBucket_ ObjectKey
pKey_ =
  GetObject' :: Maybe Text
-> Maybe ObjectVersionId
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe RequestPayer
-> Maybe Text
-> Maybe ISO8601
-> Maybe Int
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> BucketName
-> ObjectKey
-> GetObject
GetObject'
    { $sel:ifMatch:GetObject' :: Maybe Text
ifMatch = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:versionId:GetObject' :: Maybe ObjectVersionId
versionId = Maybe ObjectVersionId
forall a. Maybe a
Prelude.Nothing,
      $sel:responseContentType:GetObject' :: Maybe Text
responseContentType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:responseContentDisposition:GetObject' :: Maybe Text
responseContentDisposition = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:responseContentLanguage:GetObject' :: Maybe Text
responseContentLanguage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerAlgorithm:GetObject' :: Maybe Text
sSECustomerAlgorithm = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerKey:GetObject' :: Maybe (Sensitive Text)
sSECustomerKey = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:requestPayer:GetObject' :: Maybe RequestPayer
requestPayer = Maybe RequestPayer
forall a. Maybe a
Prelude.Nothing,
      $sel:responseContentEncoding:GetObject' :: Maybe Text
responseContentEncoding = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ifModifiedSince:GetObject' :: Maybe ISO8601
ifModifiedSince = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:partNumber:GetObject' :: Maybe Int
partNumber = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:range:GetObject' :: Maybe Text
range = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ifUnmodifiedSince:GetObject' :: Maybe ISO8601
ifUnmodifiedSince = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerKeyMD5:GetObject' :: Maybe Text
sSECustomerKeyMD5 = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:responseCacheControl:GetObject' :: Maybe Text
responseCacheControl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:responseExpires:GetObject' :: Maybe ISO8601
responseExpires = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:ifNoneMatch:GetObject' :: Maybe Text
ifNoneMatch = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:expectedBucketOwner:GetObject' :: Maybe Text
expectedBucketOwner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:bucket:GetObject' :: BucketName
bucket = BucketName
pBucket_,
      $sel:key:GetObject' :: ObjectKey
key = ObjectKey
pKey_
    }

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

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

-- | Sets the @Content-Type@ header of the response.
getObject_responseContentType :: Lens.Lens' GetObject (Prelude.Maybe Prelude.Text)
getObject_responseContentType :: (Maybe Text -> f (Maybe Text)) -> GetObject -> f GetObject
getObject_responseContentType = (GetObject -> Maybe Text)
-> (GetObject -> Maybe Text -> GetObject)
-> Lens GetObject GetObject (Maybe Text) (Maybe Text)
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 @Content-Disposition@ header of the response
getObject_responseContentDisposition :: Lens.Lens' GetObject (Prelude.Maybe Prelude.Text)
getObject_responseContentDisposition :: (Maybe Text -> f (Maybe Text)) -> GetObject -> f GetObject
getObject_responseContentDisposition = (GetObject -> Maybe Text)
-> (GetObject -> Maybe Text -> GetObject)
-> Lens GetObject GetObject (Maybe Text) (Maybe Text)
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-Language@ header of the response.
getObject_responseContentLanguage :: Lens.Lens' GetObject (Prelude.Maybe Prelude.Text)
getObject_responseContentLanguage :: (Maybe Text -> f (Maybe Text)) -> GetObject -> f GetObject
getObject_responseContentLanguage = (GetObject -> Maybe Text)
-> (GetObject -> Maybe Text -> GetObject)
-> Lens GetObject GetObject (Maybe Text) (Maybe Text)
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)

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

-- | Undocumented member.
getObject_requestPayer :: Lens.Lens' GetObject (Prelude.Maybe RequestPayer)
getObject_requestPayer :: (Maybe RequestPayer -> f (Maybe RequestPayer))
-> GetObject -> f GetObject
getObject_requestPayer = (GetObject -> Maybe RequestPayer)
-> (GetObject -> Maybe RequestPayer -> GetObject)
-> Lens
     GetObject GetObject (Maybe RequestPayer) (Maybe 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 @Content-Encoding@ header of the response.
getObject_responseContentEncoding :: Lens.Lens' GetObject (Prelude.Maybe Prelude.Text)
getObject_responseContentEncoding :: (Maybe Text -> f (Maybe Text)) -> GetObject -> f GetObject
getObject_responseContentEncoding = (GetObject -> Maybe Text)
-> (GetObject -> Maybe Text -> GetObject)
-> Lens GetObject GetObject (Maybe Text) (Maybe Text)
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)

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

-- | Part number of the object being read. This is a positive integer between
-- 1 and 10,000. Effectively performs a \'ranged\' 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 :: (Maybe Int -> f (Maybe Int)) -> GetObject -> f GetObject
getObject_partNumber = (GetObject -> Maybe Int)
-> (GetObject -> Maybe Int -> GetObject)
-> Lens GetObject GetObject (Maybe Int) (Maybe Int)
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 :: (Maybe Text -> f (Maybe Text)) -> GetObject -> f GetObject
getObject_range = (GetObject -> Maybe Text)
-> (GetObject -> Maybe Text -> GetObject)
-> Lens GetObject GetObject (Maybe Text) (Maybe Text)
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)

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

-- | Specifies the 128-bit MD5 digest of the encryption key according to RFC
-- 1321. Amazon S3 uses this header for a message integrity check to ensure
-- that the encryption key was transmitted without error.
getObject_sSECustomerKeyMD5 :: Lens.Lens' GetObject (Prelude.Maybe Prelude.Text)
getObject_sSECustomerKeyMD5 :: (Maybe Text -> f (Maybe Text)) -> GetObject -> f GetObject
getObject_sSECustomerKeyMD5 = (GetObject -> Maybe Text)
-> (GetObject -> Maybe Text -> GetObject)
-> Lens GetObject GetObject (Maybe Text) (Maybe Text)
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)

-- | Sets the @Cache-Control@ header of the response.
getObject_responseCacheControl :: Lens.Lens' GetObject (Prelude.Maybe Prelude.Text)
getObject_responseCacheControl :: (Maybe Text -> f (Maybe Text)) -> GetObject -> f GetObject
getObject_responseCacheControl = (GetObject -> Maybe Text)
-> (GetObject -> Maybe Text -> GetObject)
-> Lens GetObject GetObject (Maybe Text) (Maybe Text)
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 @Expires@ header of the response.
getObject_responseExpires :: Lens.Lens' GetObject (Prelude.Maybe Prelude.UTCTime)
getObject_responseExpires :: (Maybe UTCTime -> f (Maybe UTCTime)) -> GetObject -> f GetObject
getObject_responseExpires = (GetObject -> Maybe ISO8601)
-> (GetObject -> Maybe ISO8601 -> GetObject)
-> Lens GetObject GetObject (Maybe ISO8601) (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetObject' {Maybe ISO8601
responseExpires :: Maybe ISO8601
$sel:responseExpires:GetObject' :: GetObject -> Maybe ISO8601
responseExpires} -> Maybe ISO8601
responseExpires) (\s :: GetObject
s@GetObject' {} Maybe ISO8601
a -> GetObject
s {$sel:responseExpires:GetObject' :: Maybe ISO8601
responseExpires = Maybe ISO8601
a} :: GetObject) ((Maybe ISO8601 -> f (Maybe ISO8601)) -> GetObject -> f GetObject)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetObject
-> f GetObject
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
     (Maybe ISO8601) (Maybe ISO8601) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

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

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

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

instance Prelude.Hashable GetObject

instance Prelude.NFData GetObject

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

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

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

-- | /See:/ 'newGetObjectResponse' smart constructor.
data GetObjectResponse = GetObjectResponse'
  { GetObjectResponse -> Maybe RequestCharged
requestCharged :: Prelude.Maybe RequestCharged,
    -- | The count of parts this object has.
    GetObjectResponse -> Maybe Int
partsCount :: Prelude.Maybe Prelude.Int,
    -- | An ETag is an opaque identifier assigned by a web server to a specific
    -- version of a resource found at a URL.
    GetObjectResponse -> Maybe ETag
eTag :: Prelude.Maybe ETag,
    -- | Version of the object.
    GetObjectResponse -> Maybe ObjectVersionId
versionId :: Prelude.Maybe ObjectVersionId,
    -- | Size of the body in bytes.
    GetObjectResponse -> Maybe Integer
contentLength :: Prelude.Maybe Prelude.Integer,
    -- | The Object Lock mode currently in place for this object.
    GetObjectResponse -> Maybe ObjectLockMode
objectLockMode :: Prelude.Maybe ObjectLockMode,
    -- | The date and time at which the object is no longer cacheable.
    GetObjectResponse -> Maybe ISO8601
expires :: Prelude.Maybe Core.ISO8601,
    -- | Provides information about object restoration action and expiration time
    -- of the restored object copy.
    GetObjectResponse -> Maybe Text
restore :: Prelude.Maybe Prelude.Text,
    -- | If the object expiration is configured (see PUT Bucket lifecycle), the
    -- response includes this header. It includes the expiry-date and rule-id
    -- key-value pairs providing object expiration information. The value of
    -- the rule-id is URL encoded.
    GetObjectResponse -> Maybe Text
expiration :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether the object retrieved was (true) or was not (false) a
    -- Delete Marker. If false, this response header does not appear in the
    -- response.
    GetObjectResponse -> Maybe Bool
deleteMarker :: Prelude.Maybe Prelude.Bool,
    -- | 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,
    -- | The number of tags, if any, on the object.
    GetObjectResponse -> Maybe Int
tagCount :: Prelude.Maybe Prelude.Int,
    -- | 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 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,
    -- | 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,
    -- | Indicates that a range of bytes was specified.
    GetObjectResponse -> Maybe Text
acceptRanges :: Prelude.Maybe Prelude.Text,
    -- | Provides storage class information of the object. Amazon S3 returns this
    -- header for all objects except for S3 Standard storage class objects.
    GetObjectResponse -> Maybe StorageClass
storageClass :: Prelude.Maybe StorageClass,
    -- | If server-side encryption with a customer-provided encryption key was
    -- requested, the response will include this header to provide round-trip
    -- message integrity verification of the customer-provided encryption key.
    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 (Core.Sensitive Prelude.Text),
    -- | Specifies what content encodings have been applied to the object and
    -- thus what decoding mechanisms must be applied to obtain the media-type
    -- referenced by the Content-Type header field.
    GetObjectResponse -> Maybe Text
contentEncoding :: Prelude.Maybe Prelude.Text,
    -- | The date and time when this object\'s Object Lock will expire.
    GetObjectResponse -> Maybe ISO8601
objectLockRetainUntilDate :: Prelude.Maybe Core.ISO8601,
    -- | A map of metadata to store with the object in S3.
    GetObjectResponse -> HashMap Text Text
metadata :: Prelude.HashMap Prelude.Text Prelude.Text,
    -- | 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,
    -- | Specifies caching behavior along the request\/reply chain.
    GetObjectResponse -> Maybe Text
cacheControl :: Prelude.Maybe Prelude.Text,
    -- | The language the content is in.
    GetObjectResponse -> Maybe Text
contentLanguage :: Prelude.Maybe Prelude.Text,
    -- | Creation date of the object.
    GetObjectResponse -> Maybe ISO8601
lastModified :: Prelude.Maybe Core.ISO8601,
    -- | 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,
    -- | Specifies presentational information for the object.
    GetObjectResponse -> Maybe Text
contentDisposition :: Prelude.Maybe Prelude.Text,
    -- | The portion of the object returned in the response.
    GetObjectResponse -> Maybe Text
contentRange :: Prelude.Maybe 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,
    -- | A standard MIME type describing the format of the object data.
    GetObjectResponse -> Maybe Text
contentType :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetObjectResponse -> Int
httpStatus :: Prelude.Int,
    -- | Object data.
    GetObjectResponse -> ResponseBody
body :: Core.ResponseBody
  }
  deriving (Int -> GetObjectResponse -> ShowS
[GetObjectResponse] -> ShowS
GetObjectResponse -> String
(Int -> GetObjectResponse -> ShowS)
-> (GetObjectResponse -> String)
-> ([GetObjectResponse] -> ShowS)
-> Show GetObjectResponse
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. GetObjectResponse -> Rep GetObjectResponse x)
-> (forall x. Rep GetObjectResponse x -> GetObjectResponse)
-> Generic GetObjectResponse
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:
--
-- 'requestCharged', 'getObjectResponse_requestCharged' - Undocumented member.
--
-- 'partsCount', 'getObjectResponse_partsCount' - The count of parts this object has.
--
-- 'eTag', 'getObjectResponse_eTag' - An ETag is an opaque identifier assigned by a web server to a specific
-- version of a resource found at a URL.
--
-- 'versionId', 'getObjectResponse_versionId' - Version of the object.
--
-- 'contentLength', 'getObjectResponse_contentLength' - Size of the body in bytes.
--
-- 'objectLockMode', 'getObjectResponse_objectLockMode' - The Object Lock mode currently in place for this object.
--
-- 'expires', 'getObjectResponse_expires' - The date and time at which the object is no longer cacheable.
--
-- 'restore', 'getObjectResponse_restore' - Provides information about object restoration action and expiration time
-- of the restored object copy.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- 'tagCount', 'getObjectResponse_tagCount' - The number of tags, if any, on the object.
--
-- '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.
--
-- 'bucketKeyEnabled', 'getObjectResponse_bucketKeyEnabled' - Indicates whether the object uses an S3 Bucket Key for server-side
-- encryption with Amazon Web Services KMS (SSE-KMS).
--
-- '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.
--
-- 'acceptRanges', 'getObjectResponse_acceptRanges' - Indicates that a range of bytes was specified.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- 'objectLockRetainUntilDate', 'getObjectResponse_objectLockRetainUntilDate' - The date and time when this object\'s Object Lock will expire.
--
-- 'metadata', 'getObjectResponse_metadata' - A map of metadata to store with the object in S3.
--
-- '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.
--
-- 'cacheControl', 'getObjectResponse_cacheControl' - Specifies caching behavior along the request\/reply chain.
--
-- 'contentLanguage', 'getObjectResponse_contentLanguage' - The language the content is in.
--
-- 'lastModified', 'getObjectResponse_lastModified' - Creation date of the object.
--
-- '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.
--
-- 'contentDisposition', 'getObjectResponse_contentDisposition' - Specifies presentational information for the object.
--
-- 'contentRange', 'getObjectResponse_contentRange' - The portion of the object returned in the response.
--
-- 'serverSideEncryption', 'getObjectResponse_serverSideEncryption' - The server-side encryption algorithm used when storing this object in
-- Amazon S3 (for example, AES256, aws:kms).
--
-- 'contentType', 'getObjectResponse_contentType' - A standard MIME type describing the format of the object data.
--
-- 'httpStatus', 'getObjectResponse_httpStatus' - The response's http status code.
--
-- 'body', 'getObjectResponse_body' - Object data.
newGetObjectResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'body'
  Core.ResponseBody ->
  GetObjectResponse
newGetObjectResponse :: Int -> ResponseBody -> GetObjectResponse
newGetObjectResponse Int
pHttpStatus_ ResponseBody
pBody_ =
  GetObjectResponse' :: Maybe RequestCharged
-> Maybe Int
-> Maybe ETag
-> Maybe ObjectVersionId
-> Maybe Integer
-> Maybe ObjectLockMode
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe StorageClass
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe ISO8601
-> HashMap Text Text
-> Maybe ReplicationStatus
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe ObjectLockLegalHoldStatus
-> Maybe Text
-> Maybe Text
-> Maybe ServerSideEncryption
-> Maybe Text
-> Int
-> ResponseBody
-> GetObjectResponse
GetObjectResponse'
    { $sel:requestCharged:GetObjectResponse' :: Maybe RequestCharged
requestCharged =
        Maybe RequestCharged
forall a. Maybe a
Prelude.Nothing,
      $sel:partsCount:GetObjectResponse' :: Maybe Int
partsCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:eTag:GetObjectResponse' :: Maybe ETag
eTag = Maybe ETag
forall a. Maybe a
Prelude.Nothing,
      $sel:versionId:GetObjectResponse' :: Maybe ObjectVersionId
versionId = Maybe ObjectVersionId
forall a. Maybe a
Prelude.Nothing,
      $sel:contentLength:GetObjectResponse' :: Maybe Integer
contentLength = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:objectLockMode:GetObjectResponse' :: Maybe ObjectLockMode
objectLockMode = Maybe ObjectLockMode
forall a. Maybe a
Prelude.Nothing,
      $sel:expires:GetObjectResponse' :: Maybe ISO8601
expires = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:restore:GetObjectResponse' :: Maybe Text
restore = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:expiration:GetObjectResponse' :: Maybe Text
expiration = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:deleteMarker:GetObjectResponse' :: Maybe Bool
deleteMarker = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerAlgorithm:GetObjectResponse' :: Maybe Text
sSECustomerAlgorithm = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tagCount:GetObjectResponse' :: Maybe Int
tagCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:missingMeta:GetObjectResponse' :: Maybe Int
missingMeta = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:bucketKeyEnabled:GetObjectResponse' :: Maybe Bool
bucketKeyEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:websiteRedirectLocation:GetObjectResponse' :: Maybe Text
websiteRedirectLocation = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:acceptRanges:GetObjectResponse' :: Maybe Text
acceptRanges = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:storageClass:GetObjectResponse' :: Maybe StorageClass
storageClass = Maybe StorageClass
forall a. Maybe a
Prelude.Nothing,
      $sel:sSECustomerKeyMD5:GetObjectResponse' :: Maybe Text
sSECustomerKeyMD5 = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sSEKMSKeyId:GetObjectResponse' :: Maybe (Sensitive Text)
sSEKMSKeyId = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:contentEncoding:GetObjectResponse' :: Maybe Text
contentEncoding = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:objectLockRetainUntilDate:GetObjectResponse' :: Maybe ISO8601
objectLockRetainUntilDate = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:metadata:GetObjectResponse' :: HashMap Text Text
metadata = HashMap Text Text
forall a. Monoid a => a
Prelude.mempty,
      $sel:replicationStatus:GetObjectResponse' :: Maybe ReplicationStatus
replicationStatus = Maybe ReplicationStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:cacheControl:GetObjectResponse' :: Maybe Text
cacheControl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:contentLanguage:GetObjectResponse' :: Maybe Text
contentLanguage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModified:GetObjectResponse' :: Maybe ISO8601
lastModified = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:objectLockLegalHoldStatus:GetObjectResponse' :: Maybe ObjectLockLegalHoldStatus
objectLockLegalHoldStatus = Maybe ObjectLockLegalHoldStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:contentDisposition:GetObjectResponse' :: Maybe Text
contentDisposition = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:contentRange:GetObjectResponse' :: Maybe Text
contentRange = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:serverSideEncryption:GetObjectResponse' :: Maybe ServerSideEncryption
serverSideEncryption = Maybe ServerSideEncryption
forall a. Maybe a
Prelude.Nothing,
      $sel:contentType:GetObjectResponse' :: Maybe Text
contentType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetObjectResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:body:GetObjectResponse' :: ResponseBody
body = ResponseBody
pBody_
    }

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

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

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

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

-- | Size of the body in bytes.
getObjectResponse_contentLength :: Lens.Lens' GetObjectResponse (Prelude.Maybe Prelude.Integer)
getObjectResponse_contentLength :: (Maybe Integer -> f (Maybe Integer))
-> GetObjectResponse -> f GetObjectResponse
getObjectResponse_contentLength = (GetObjectResponse -> Maybe Integer)
-> (GetObjectResponse -> Maybe Integer -> GetObjectResponse)
-> Lens
     GetObjectResponse GetObjectResponse (Maybe Integer) (Maybe Integer)
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 Object Lock mode currently in place for this object.
getObjectResponse_objectLockMode :: Lens.Lens' GetObjectResponse (Prelude.Maybe ObjectLockMode)
getObjectResponse_objectLockMode :: (Maybe ObjectLockMode -> f (Maybe ObjectLockMode))
-> GetObjectResponse -> f GetObjectResponse
getObjectResponse_objectLockMode = (GetObjectResponse -> Maybe ObjectLockMode)
-> (GetObjectResponse -> Maybe ObjectLockMode -> GetObjectResponse)
-> Lens
     GetObjectResponse
     GetObjectResponse
     (Maybe ObjectLockMode)
     (Maybe 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 at which the object is no longer cacheable.
getObjectResponse_expires :: Lens.Lens' GetObjectResponse (Prelude.Maybe Prelude.UTCTime)
getObjectResponse_expires :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetObjectResponse -> f GetObjectResponse
getObjectResponse_expires = (GetObjectResponse -> Maybe ISO8601)
-> (GetObjectResponse -> Maybe ISO8601 -> GetObjectResponse)
-> Lens
     GetObjectResponse GetObjectResponse (Maybe ISO8601) (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetObjectResponse' {Maybe ISO8601
expires :: Maybe ISO8601
$sel:expires:GetObjectResponse' :: GetObjectResponse -> Maybe ISO8601
expires} -> Maybe ISO8601
expires) (\s :: GetObjectResponse
s@GetObjectResponse' {} Maybe ISO8601
a -> GetObjectResponse
s {$sel:expires:GetObjectResponse' :: Maybe ISO8601
expires = Maybe ISO8601
a} :: GetObjectResponse) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> GetObjectResponse -> f GetObjectResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetObjectResponse
-> f GetObjectResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
     (Maybe ISO8601) (Maybe ISO8601) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> GetObjectResponse -> f GetObjectResponse
getObjectResponse_restore = (GetObjectResponse -> Maybe Text)
-> (GetObjectResponse -> Maybe Text -> GetObjectResponse)
-> Lens
     GetObjectResponse GetObjectResponse (Maybe Text) (Maybe Text)
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 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 :: (Maybe Text -> f (Maybe Text))
-> GetObjectResponse -> f GetObjectResponse
getObjectResponse_expiration = (GetObjectResponse -> Maybe Text)
-> (GetObjectResponse -> Maybe Text -> GetObjectResponse)
-> Lens
     GetObjectResponse GetObjectResponse (Maybe Text) (Maybe Text)
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)

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

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

-- | The number of tags, if any, on the object.
getObjectResponse_tagCount :: Lens.Lens' GetObjectResponse (Prelude.Maybe Prelude.Int)
getObjectResponse_tagCount :: (Maybe Int -> f (Maybe Int))
-> GetObjectResponse -> f GetObjectResponse
getObjectResponse_tagCount = (GetObjectResponse -> Maybe Int)
-> (GetObjectResponse -> Maybe Int -> GetObjectResponse)
-> Lens GetObjectResponse GetObjectResponse (Maybe Int) (Maybe Int)
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)

-- | 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 :: (Maybe Int -> f (Maybe Int))
-> GetObjectResponse -> f GetObjectResponse
getObjectResponse_missingMeta = (GetObjectResponse -> Maybe Int)
-> (GetObjectResponse -> Maybe Int -> GetObjectResponse)
-> Lens GetObjectResponse GetObjectResponse (Maybe Int) (Maybe Int)
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 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 :: (Maybe Bool -> f (Maybe Bool))
-> GetObjectResponse -> f GetObjectResponse
getObjectResponse_bucketKeyEnabled = (GetObjectResponse -> Maybe Bool)
-> (GetObjectResponse -> Maybe Bool -> GetObjectResponse)
-> Lens
     GetObjectResponse GetObjectResponse (Maybe Bool) (Maybe Bool)
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)

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

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

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

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

-- | Specifies what content encodings have been applied to the object and
-- thus what decoding mechanisms must be applied to obtain the media-type
-- referenced by the Content-Type header field.
getObjectResponse_contentEncoding :: Lens.Lens' GetObjectResponse (Prelude.Maybe Prelude.Text)
getObjectResponse_contentEncoding :: (Maybe Text -> f (Maybe Text))
-> GetObjectResponse -> f GetObjectResponse
getObjectResponse_contentEncoding = (GetObjectResponse -> Maybe Text)
-> (GetObjectResponse -> Maybe Text -> GetObjectResponse)
-> Lens
     GetObjectResponse GetObjectResponse (Maybe Text) (Maybe Text)
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 date and time when this object\'s Object Lock will expire.
getObjectResponse_objectLockRetainUntilDate :: Lens.Lens' GetObjectResponse (Prelude.Maybe Prelude.UTCTime)
getObjectResponse_objectLockRetainUntilDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetObjectResponse -> f GetObjectResponse
getObjectResponse_objectLockRetainUntilDate = (GetObjectResponse -> Maybe ISO8601)
-> (GetObjectResponse -> Maybe ISO8601 -> GetObjectResponse)
-> Lens
     GetObjectResponse GetObjectResponse (Maybe ISO8601) (Maybe ISO8601)
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) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> GetObjectResponse -> f GetObjectResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetObjectResponse
-> f GetObjectResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
     (Maybe ISO8601) (Maybe ISO8601) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

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

-- | Amazon S3 can return this 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 :: (Maybe ReplicationStatus -> f (Maybe ReplicationStatus))
-> GetObjectResponse -> f GetObjectResponse
getObjectResponse_replicationStatus = (GetObjectResponse -> Maybe ReplicationStatus)
-> (GetObjectResponse
    -> Maybe ReplicationStatus -> GetObjectResponse)
-> Lens
     GetObjectResponse
     GetObjectResponse
     (Maybe ReplicationStatus)
     (Maybe 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)

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

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

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

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

-- | The portion of the object returned in the response.
getObjectResponse_contentRange :: Lens.Lens' GetObjectResponse (Prelude.Maybe Prelude.Text)
getObjectResponse_contentRange :: (Maybe Text -> f (Maybe Text))
-> GetObjectResponse -> f GetObjectResponse
getObjectResponse_contentRange = (GetObjectResponse -> Maybe Text)
-> (GetObjectResponse -> Maybe Text -> GetObjectResponse)
-> Lens
     GetObjectResponse GetObjectResponse (Maybe Text) (Maybe Text)
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)

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

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

-- | The response's http status code.
getObjectResponse_httpStatus :: Lens.Lens' GetObjectResponse Prelude.Int
getObjectResponse_httpStatus :: (Int -> f Int) -> GetObjectResponse -> f GetObjectResponse
getObjectResponse_httpStatus = (GetObjectResponse -> Int)
-> (GetObjectResponse -> Int -> GetObjectResponse)
-> Lens GetObjectResponse GetObjectResponse Int Int
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 Core.ResponseBody
getObjectResponse_body :: (ResponseBody -> f ResponseBody)
-> GetObjectResponse -> f GetObjectResponse
getObjectResponse_body = (GetObjectResponse -> ResponseBody)
-> (GetObjectResponse -> ResponseBody -> GetObjectResponse)
-> Lens
     GetObjectResponse GetObjectResponse ResponseBody ResponseBody
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)