{-# 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 #-}
module Amazonka.S3.PutObjectLegalHold
(
PutObjectLegalHold (..),
newPutObjectLegalHold,
putObjectLegalHold_checksumAlgorithm,
putObjectLegalHold_contentMD5,
putObjectLegalHold_expectedBucketOwner,
putObjectLegalHold_legalHold,
putObjectLegalHold_requestPayer,
putObjectLegalHold_versionId,
putObjectLegalHold_bucket,
putObjectLegalHold_key,
PutObjectLegalHoldResponse (..),
newPutObjectLegalHoldResponse,
putObjectLegalHoldResponse_requestCharged,
putObjectLegalHoldResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.S3.Types
data PutObjectLegalHold = PutObjectLegalHold'
{
PutObjectLegalHold -> Maybe ChecksumAlgorithm
checksumAlgorithm :: Prelude.Maybe ChecksumAlgorithm,
PutObjectLegalHold -> Maybe Text
contentMD5 :: Prelude.Maybe Prelude.Text,
PutObjectLegalHold -> Maybe Text
expectedBucketOwner :: Prelude.Maybe Prelude.Text,
PutObjectLegalHold -> Maybe ObjectLockLegalHold
legalHold :: Prelude.Maybe ObjectLockLegalHold,
PutObjectLegalHold -> Maybe RequestPayer
requestPayer :: Prelude.Maybe RequestPayer,
PutObjectLegalHold -> Maybe ObjectVersionId
versionId :: Prelude.Maybe ObjectVersionId,
PutObjectLegalHold -> BucketName
bucket :: BucketName,
PutObjectLegalHold -> ObjectKey
key :: ObjectKey
}
deriving (PutObjectLegalHold -> PutObjectLegalHold -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutObjectLegalHold -> PutObjectLegalHold -> Bool
$c/= :: PutObjectLegalHold -> PutObjectLegalHold -> Bool
== :: PutObjectLegalHold -> PutObjectLegalHold -> Bool
$c== :: PutObjectLegalHold -> PutObjectLegalHold -> Bool
Prelude.Eq, ReadPrec [PutObjectLegalHold]
ReadPrec PutObjectLegalHold
Int -> ReadS PutObjectLegalHold
ReadS [PutObjectLegalHold]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutObjectLegalHold]
$creadListPrec :: ReadPrec [PutObjectLegalHold]
readPrec :: ReadPrec PutObjectLegalHold
$creadPrec :: ReadPrec PutObjectLegalHold
readList :: ReadS [PutObjectLegalHold]
$creadList :: ReadS [PutObjectLegalHold]
readsPrec :: Int -> ReadS PutObjectLegalHold
$creadsPrec :: Int -> ReadS PutObjectLegalHold
Prelude.Read, Int -> PutObjectLegalHold -> ShowS
[PutObjectLegalHold] -> ShowS
PutObjectLegalHold -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutObjectLegalHold] -> ShowS
$cshowList :: [PutObjectLegalHold] -> ShowS
show :: PutObjectLegalHold -> String
$cshow :: PutObjectLegalHold -> String
showsPrec :: Int -> PutObjectLegalHold -> ShowS
$cshowsPrec :: Int -> PutObjectLegalHold -> ShowS
Prelude.Show, forall x. Rep PutObjectLegalHold x -> PutObjectLegalHold
forall x. PutObjectLegalHold -> Rep PutObjectLegalHold x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutObjectLegalHold x -> PutObjectLegalHold
$cfrom :: forall x. PutObjectLegalHold -> Rep PutObjectLegalHold x
Prelude.Generic)
newPutObjectLegalHold ::
BucketName ->
ObjectKey ->
PutObjectLegalHold
newPutObjectLegalHold :: BucketName -> ObjectKey -> PutObjectLegalHold
newPutObjectLegalHold BucketName
pBucket_ ObjectKey
pKey_ =
PutObjectLegalHold'
{ $sel:checksumAlgorithm:PutObjectLegalHold' :: Maybe ChecksumAlgorithm
checksumAlgorithm =
forall a. Maybe a
Prelude.Nothing,
$sel:contentMD5:PutObjectLegalHold' :: Maybe Text
contentMD5 = forall a. Maybe a
Prelude.Nothing,
$sel:expectedBucketOwner:PutObjectLegalHold' :: Maybe Text
expectedBucketOwner = forall a. Maybe a
Prelude.Nothing,
$sel:legalHold:PutObjectLegalHold' :: Maybe ObjectLockLegalHold
legalHold = forall a. Maybe a
Prelude.Nothing,
$sel:requestPayer:PutObjectLegalHold' :: Maybe RequestPayer
requestPayer = forall a. Maybe a
Prelude.Nothing,
$sel:versionId:PutObjectLegalHold' :: Maybe ObjectVersionId
versionId = forall a. Maybe a
Prelude.Nothing,
$sel:bucket:PutObjectLegalHold' :: BucketName
bucket = BucketName
pBucket_,
$sel:key:PutObjectLegalHold' :: ObjectKey
key = ObjectKey
pKey_
}
putObjectLegalHold_checksumAlgorithm :: Lens.Lens' PutObjectLegalHold (Prelude.Maybe ChecksumAlgorithm)
putObjectLegalHold_checksumAlgorithm :: Lens' PutObjectLegalHold (Maybe ChecksumAlgorithm)
putObjectLegalHold_checksumAlgorithm = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObjectLegalHold' {Maybe ChecksumAlgorithm
checksumAlgorithm :: Maybe ChecksumAlgorithm
$sel:checksumAlgorithm:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe ChecksumAlgorithm
checksumAlgorithm} -> Maybe ChecksumAlgorithm
checksumAlgorithm) (\s :: PutObjectLegalHold
s@PutObjectLegalHold' {} Maybe ChecksumAlgorithm
a -> PutObjectLegalHold
s {$sel:checksumAlgorithm:PutObjectLegalHold' :: Maybe ChecksumAlgorithm
checksumAlgorithm = Maybe ChecksumAlgorithm
a} :: PutObjectLegalHold)
putObjectLegalHold_contentMD5 :: Lens.Lens' PutObjectLegalHold (Prelude.Maybe Prelude.Text)
putObjectLegalHold_contentMD5 :: Lens' PutObjectLegalHold (Maybe Text)
putObjectLegalHold_contentMD5 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObjectLegalHold' {Maybe Text
contentMD5 :: Maybe Text
$sel:contentMD5:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe Text
contentMD5} -> Maybe Text
contentMD5) (\s :: PutObjectLegalHold
s@PutObjectLegalHold' {} Maybe Text
a -> PutObjectLegalHold
s {$sel:contentMD5:PutObjectLegalHold' :: Maybe Text
contentMD5 = Maybe Text
a} :: PutObjectLegalHold)
putObjectLegalHold_expectedBucketOwner :: Lens.Lens' PutObjectLegalHold (Prelude.Maybe Prelude.Text)
putObjectLegalHold_expectedBucketOwner :: Lens' PutObjectLegalHold (Maybe Text)
putObjectLegalHold_expectedBucketOwner = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObjectLegalHold' {Maybe Text
expectedBucketOwner :: Maybe Text
$sel:expectedBucketOwner:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe Text
expectedBucketOwner} -> Maybe Text
expectedBucketOwner) (\s :: PutObjectLegalHold
s@PutObjectLegalHold' {} Maybe Text
a -> PutObjectLegalHold
s {$sel:expectedBucketOwner:PutObjectLegalHold' :: Maybe Text
expectedBucketOwner = Maybe Text
a} :: PutObjectLegalHold)
putObjectLegalHold_legalHold :: Lens.Lens' PutObjectLegalHold (Prelude.Maybe ObjectLockLegalHold)
putObjectLegalHold_legalHold :: Lens' PutObjectLegalHold (Maybe ObjectLockLegalHold)
putObjectLegalHold_legalHold = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObjectLegalHold' {Maybe ObjectLockLegalHold
legalHold :: Maybe ObjectLockLegalHold
$sel:legalHold:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe ObjectLockLegalHold
legalHold} -> Maybe ObjectLockLegalHold
legalHold) (\s :: PutObjectLegalHold
s@PutObjectLegalHold' {} Maybe ObjectLockLegalHold
a -> PutObjectLegalHold
s {$sel:legalHold:PutObjectLegalHold' :: Maybe ObjectLockLegalHold
legalHold = Maybe ObjectLockLegalHold
a} :: PutObjectLegalHold)
putObjectLegalHold_requestPayer :: Lens.Lens' PutObjectLegalHold (Prelude.Maybe RequestPayer)
putObjectLegalHold_requestPayer :: Lens' PutObjectLegalHold (Maybe RequestPayer)
putObjectLegalHold_requestPayer = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObjectLegalHold' {Maybe RequestPayer
requestPayer :: Maybe RequestPayer
$sel:requestPayer:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe RequestPayer
requestPayer} -> Maybe RequestPayer
requestPayer) (\s :: PutObjectLegalHold
s@PutObjectLegalHold' {} Maybe RequestPayer
a -> PutObjectLegalHold
s {$sel:requestPayer:PutObjectLegalHold' :: Maybe RequestPayer
requestPayer = Maybe RequestPayer
a} :: PutObjectLegalHold)
putObjectLegalHold_versionId :: Lens.Lens' PutObjectLegalHold (Prelude.Maybe ObjectVersionId)
putObjectLegalHold_versionId :: Lens' PutObjectLegalHold (Maybe ObjectVersionId)
putObjectLegalHold_versionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObjectLegalHold' {Maybe ObjectVersionId
versionId :: Maybe ObjectVersionId
$sel:versionId:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe ObjectVersionId
versionId} -> Maybe ObjectVersionId
versionId) (\s :: PutObjectLegalHold
s@PutObjectLegalHold' {} Maybe ObjectVersionId
a -> PutObjectLegalHold
s {$sel:versionId:PutObjectLegalHold' :: Maybe ObjectVersionId
versionId = Maybe ObjectVersionId
a} :: PutObjectLegalHold)
putObjectLegalHold_bucket :: Lens.Lens' PutObjectLegalHold BucketName
putObjectLegalHold_bucket :: Lens' PutObjectLegalHold BucketName
putObjectLegalHold_bucket = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObjectLegalHold' {BucketName
bucket :: BucketName
$sel:bucket:PutObjectLegalHold' :: PutObjectLegalHold -> BucketName
bucket} -> BucketName
bucket) (\s :: PutObjectLegalHold
s@PutObjectLegalHold' {} BucketName
a -> PutObjectLegalHold
s {$sel:bucket:PutObjectLegalHold' :: BucketName
bucket = BucketName
a} :: PutObjectLegalHold)
putObjectLegalHold_key :: Lens.Lens' PutObjectLegalHold ObjectKey
putObjectLegalHold_key :: Lens' PutObjectLegalHold ObjectKey
putObjectLegalHold_key = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObjectLegalHold' {ObjectKey
key :: ObjectKey
$sel:key:PutObjectLegalHold' :: PutObjectLegalHold -> ObjectKey
key} -> ObjectKey
key) (\s :: PutObjectLegalHold
s@PutObjectLegalHold' {} ObjectKey
a -> PutObjectLegalHold
s {$sel:key:PutObjectLegalHold' :: ObjectKey
key = ObjectKey
a} :: PutObjectLegalHold)
instance Core.AWSRequest PutObjectLegalHold where
type
AWSResponse PutObjectLegalHold =
PutObjectLegalHoldResponse
request :: (Service -> Service)
-> PutObjectLegalHold -> Request PutObjectLegalHold
request Service -> Service
overrides =
forall a. Request a -> Request a
Request.s3vhost
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a. (ToRequest a, ToElement a) => Service -> a -> Request a
Request.putXML (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy PutObjectLegalHold
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse PutObjectLegalHold)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Maybe RequestCharged -> Int -> PutObjectLegalHoldResponse
PutObjectLegalHoldResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"x-amz-request-charged")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable PutObjectLegalHold where
hashWithSalt :: Int -> PutObjectLegalHold -> Int
hashWithSalt Int
_salt PutObjectLegalHold' {Maybe Text
Maybe ObjectVersionId
Maybe ChecksumAlgorithm
Maybe ObjectLockLegalHold
Maybe RequestPayer
ObjectKey
BucketName
key :: ObjectKey
bucket :: BucketName
versionId :: Maybe ObjectVersionId
requestPayer :: Maybe RequestPayer
legalHold :: Maybe ObjectLockLegalHold
expectedBucketOwner :: Maybe Text
contentMD5 :: Maybe Text
checksumAlgorithm :: Maybe ChecksumAlgorithm
$sel:key:PutObjectLegalHold' :: PutObjectLegalHold -> ObjectKey
$sel:bucket:PutObjectLegalHold' :: PutObjectLegalHold -> BucketName
$sel:versionId:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe ObjectVersionId
$sel:requestPayer:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe RequestPayer
$sel:legalHold:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe ObjectLockLegalHold
$sel:expectedBucketOwner:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe Text
$sel:contentMD5:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe Text
$sel:checksumAlgorithm:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe ChecksumAlgorithm
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ChecksumAlgorithm
checksumAlgorithm
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
contentMD5
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
expectedBucketOwner
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ObjectLockLegalHold
legalHold
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RequestPayer
requestPayer
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ObjectVersionId
versionId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` BucketName
bucket
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ObjectKey
key
instance Prelude.NFData PutObjectLegalHold where
rnf :: PutObjectLegalHold -> ()
rnf PutObjectLegalHold' {Maybe Text
Maybe ObjectVersionId
Maybe ChecksumAlgorithm
Maybe ObjectLockLegalHold
Maybe RequestPayer
ObjectKey
BucketName
key :: ObjectKey
bucket :: BucketName
versionId :: Maybe ObjectVersionId
requestPayer :: Maybe RequestPayer
legalHold :: Maybe ObjectLockLegalHold
expectedBucketOwner :: Maybe Text
contentMD5 :: Maybe Text
checksumAlgorithm :: Maybe ChecksumAlgorithm
$sel:key:PutObjectLegalHold' :: PutObjectLegalHold -> ObjectKey
$sel:bucket:PutObjectLegalHold' :: PutObjectLegalHold -> BucketName
$sel:versionId:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe ObjectVersionId
$sel:requestPayer:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe RequestPayer
$sel:legalHold:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe ObjectLockLegalHold
$sel:expectedBucketOwner:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe Text
$sel:contentMD5:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe Text
$sel:checksumAlgorithm:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe ChecksumAlgorithm
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ChecksumAlgorithm
checksumAlgorithm
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
contentMD5
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
expectedBucketOwner
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ObjectLockLegalHold
legalHold
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RequestPayer
requestPayer
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ObjectVersionId
versionId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf BucketName
bucket
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ObjectKey
key
instance Data.ToElement PutObjectLegalHold where
toElement :: PutObjectLegalHold -> Element
toElement PutObjectLegalHold' {Maybe Text
Maybe ObjectVersionId
Maybe ChecksumAlgorithm
Maybe ObjectLockLegalHold
Maybe RequestPayer
ObjectKey
BucketName
key :: ObjectKey
bucket :: BucketName
versionId :: Maybe ObjectVersionId
requestPayer :: Maybe RequestPayer
legalHold :: Maybe ObjectLockLegalHold
expectedBucketOwner :: Maybe Text
contentMD5 :: Maybe Text
checksumAlgorithm :: Maybe ChecksumAlgorithm
$sel:key:PutObjectLegalHold' :: PutObjectLegalHold -> ObjectKey
$sel:bucket:PutObjectLegalHold' :: PutObjectLegalHold -> BucketName
$sel:versionId:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe ObjectVersionId
$sel:requestPayer:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe RequestPayer
$sel:legalHold:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe ObjectLockLegalHold
$sel:expectedBucketOwner:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe Text
$sel:contentMD5:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe Text
$sel:checksumAlgorithm:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe ChecksumAlgorithm
..} =
forall a. ToXML a => Name -> a -> Element
Data.mkElement
Name
"{http://s3.amazonaws.com/doc/2006-03-01/}LegalHold"
Maybe ObjectLockLegalHold
legalHold
instance Data.ToHeaders PutObjectLegalHold where
toHeaders :: PutObjectLegalHold -> ResponseHeaders
toHeaders PutObjectLegalHold' {Maybe Text
Maybe ObjectVersionId
Maybe ChecksumAlgorithm
Maybe ObjectLockLegalHold
Maybe RequestPayer
ObjectKey
BucketName
key :: ObjectKey
bucket :: BucketName
versionId :: Maybe ObjectVersionId
requestPayer :: Maybe RequestPayer
legalHold :: Maybe ObjectLockLegalHold
expectedBucketOwner :: Maybe Text
contentMD5 :: Maybe Text
checksumAlgorithm :: Maybe ChecksumAlgorithm
$sel:key:PutObjectLegalHold' :: PutObjectLegalHold -> ObjectKey
$sel:bucket:PutObjectLegalHold' :: PutObjectLegalHold -> BucketName
$sel:versionId:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe ObjectVersionId
$sel:requestPayer:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe RequestPayer
$sel:legalHold:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe ObjectLockLegalHold
$sel:expectedBucketOwner:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe Text
$sel:contentMD5:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe Text
$sel:checksumAlgorithm:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe ChecksumAlgorithm
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"x-amz-sdk-checksum-algorithm"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe ChecksumAlgorithm
checksumAlgorithm,
HeaderName
"Content-MD5" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
contentMD5,
HeaderName
"x-amz-expected-bucket-owner"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
expectedBucketOwner,
HeaderName
"x-amz-request-payer" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe RequestPayer
requestPayer
]
instance Data.ToPath PutObjectLegalHold where
toPath :: PutObjectLegalHold -> ByteString
toPath PutObjectLegalHold' {Maybe Text
Maybe ObjectVersionId
Maybe ChecksumAlgorithm
Maybe ObjectLockLegalHold
Maybe RequestPayer
ObjectKey
BucketName
key :: ObjectKey
bucket :: BucketName
versionId :: Maybe ObjectVersionId
requestPayer :: Maybe RequestPayer
legalHold :: Maybe ObjectLockLegalHold
expectedBucketOwner :: Maybe Text
contentMD5 :: Maybe Text
checksumAlgorithm :: Maybe ChecksumAlgorithm
$sel:key:PutObjectLegalHold' :: PutObjectLegalHold -> ObjectKey
$sel:bucket:PutObjectLegalHold' :: PutObjectLegalHold -> BucketName
$sel:versionId:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe ObjectVersionId
$sel:requestPayer:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe RequestPayer
$sel:legalHold:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe ObjectLockLegalHold
$sel:expectedBucketOwner:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe Text
$sel:contentMD5:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe Text
$sel:checksumAlgorithm:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe ChecksumAlgorithm
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/", forall a. ToByteString a => a -> ByteString
Data.toBS BucketName
bucket, ByteString
"/", forall a. ToByteString a => a -> ByteString
Data.toBS ObjectKey
key]
instance Data.ToQuery PutObjectLegalHold where
toQuery :: PutObjectLegalHold -> QueryString
toQuery PutObjectLegalHold' {Maybe Text
Maybe ObjectVersionId
Maybe ChecksumAlgorithm
Maybe ObjectLockLegalHold
Maybe RequestPayer
ObjectKey
BucketName
key :: ObjectKey
bucket :: BucketName
versionId :: Maybe ObjectVersionId
requestPayer :: Maybe RequestPayer
legalHold :: Maybe ObjectLockLegalHold
expectedBucketOwner :: Maybe Text
contentMD5 :: Maybe Text
checksumAlgorithm :: Maybe ChecksumAlgorithm
$sel:key:PutObjectLegalHold' :: PutObjectLegalHold -> ObjectKey
$sel:bucket:PutObjectLegalHold' :: PutObjectLegalHold -> BucketName
$sel:versionId:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe ObjectVersionId
$sel:requestPayer:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe RequestPayer
$sel:legalHold:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe ObjectLockLegalHold
$sel:expectedBucketOwner:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe Text
$sel:contentMD5:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe Text
$sel:checksumAlgorithm:PutObjectLegalHold' :: PutObjectLegalHold -> Maybe ChecksumAlgorithm
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"versionId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe ObjectVersionId
versionId, QueryString
"legal-hold"]
data PutObjectLegalHoldResponse = PutObjectLegalHoldResponse'
{ PutObjectLegalHoldResponse -> Maybe RequestCharged
requestCharged :: Prelude.Maybe RequestCharged,
PutObjectLegalHoldResponse -> Int
httpStatus :: Prelude.Int
}
deriving (PutObjectLegalHoldResponse -> PutObjectLegalHoldResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutObjectLegalHoldResponse -> PutObjectLegalHoldResponse -> Bool
$c/= :: PutObjectLegalHoldResponse -> PutObjectLegalHoldResponse -> Bool
== :: PutObjectLegalHoldResponse -> PutObjectLegalHoldResponse -> Bool
$c== :: PutObjectLegalHoldResponse -> PutObjectLegalHoldResponse -> Bool
Prelude.Eq, ReadPrec [PutObjectLegalHoldResponse]
ReadPrec PutObjectLegalHoldResponse
Int -> ReadS PutObjectLegalHoldResponse
ReadS [PutObjectLegalHoldResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutObjectLegalHoldResponse]
$creadListPrec :: ReadPrec [PutObjectLegalHoldResponse]
readPrec :: ReadPrec PutObjectLegalHoldResponse
$creadPrec :: ReadPrec PutObjectLegalHoldResponse
readList :: ReadS [PutObjectLegalHoldResponse]
$creadList :: ReadS [PutObjectLegalHoldResponse]
readsPrec :: Int -> ReadS PutObjectLegalHoldResponse
$creadsPrec :: Int -> ReadS PutObjectLegalHoldResponse
Prelude.Read, Int -> PutObjectLegalHoldResponse -> ShowS
[PutObjectLegalHoldResponse] -> ShowS
PutObjectLegalHoldResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutObjectLegalHoldResponse] -> ShowS
$cshowList :: [PutObjectLegalHoldResponse] -> ShowS
show :: PutObjectLegalHoldResponse -> String
$cshow :: PutObjectLegalHoldResponse -> String
showsPrec :: Int -> PutObjectLegalHoldResponse -> ShowS
$cshowsPrec :: Int -> PutObjectLegalHoldResponse -> ShowS
Prelude.Show, forall x.
Rep PutObjectLegalHoldResponse x -> PutObjectLegalHoldResponse
forall x.
PutObjectLegalHoldResponse -> Rep PutObjectLegalHoldResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PutObjectLegalHoldResponse x -> PutObjectLegalHoldResponse
$cfrom :: forall x.
PutObjectLegalHoldResponse -> Rep PutObjectLegalHoldResponse x
Prelude.Generic)
newPutObjectLegalHoldResponse ::
Prelude.Int ->
PutObjectLegalHoldResponse
newPutObjectLegalHoldResponse :: Int -> PutObjectLegalHoldResponse
newPutObjectLegalHoldResponse Int
pHttpStatus_ =
PutObjectLegalHoldResponse'
{ $sel:requestCharged:PutObjectLegalHoldResponse' :: Maybe RequestCharged
requestCharged =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:PutObjectLegalHoldResponse' :: Int
httpStatus = Int
pHttpStatus_
}
putObjectLegalHoldResponse_requestCharged :: Lens.Lens' PutObjectLegalHoldResponse (Prelude.Maybe RequestCharged)
putObjectLegalHoldResponse_requestCharged :: Lens' PutObjectLegalHoldResponse (Maybe RequestCharged)
putObjectLegalHoldResponse_requestCharged = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObjectLegalHoldResponse' {Maybe RequestCharged
requestCharged :: Maybe RequestCharged
$sel:requestCharged:PutObjectLegalHoldResponse' :: PutObjectLegalHoldResponse -> Maybe RequestCharged
requestCharged} -> Maybe RequestCharged
requestCharged) (\s :: PutObjectLegalHoldResponse
s@PutObjectLegalHoldResponse' {} Maybe RequestCharged
a -> PutObjectLegalHoldResponse
s {$sel:requestCharged:PutObjectLegalHoldResponse' :: Maybe RequestCharged
requestCharged = Maybe RequestCharged
a} :: PutObjectLegalHoldResponse)
putObjectLegalHoldResponse_httpStatus :: Lens.Lens' PutObjectLegalHoldResponse Prelude.Int
putObjectLegalHoldResponse_httpStatus :: Lens' PutObjectLegalHoldResponse Int
putObjectLegalHoldResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutObjectLegalHoldResponse' {Int
httpStatus :: Int
$sel:httpStatus:PutObjectLegalHoldResponse' :: PutObjectLegalHoldResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: PutObjectLegalHoldResponse
s@PutObjectLegalHoldResponse' {} Int
a -> PutObjectLegalHoldResponse
s {$sel:httpStatus:PutObjectLegalHoldResponse' :: Int
httpStatus = Int
a} :: PutObjectLegalHoldResponse)
instance Prelude.NFData PutObjectLegalHoldResponse where
rnf :: PutObjectLegalHoldResponse -> ()
rnf PutObjectLegalHoldResponse' {Int
Maybe RequestCharged
httpStatus :: Int
requestCharged :: Maybe RequestCharged
$sel:httpStatus:PutObjectLegalHoldResponse' :: PutObjectLegalHoldResponse -> Int
$sel:requestCharged:PutObjectLegalHoldResponse' :: PutObjectLegalHoldResponse -> Maybe RequestCharged
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe RequestCharged
requestCharged
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus