{-# 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.DeleteObjects
(
DeleteObjects (..),
newDeleteObjects,
deleteObjects_mfa,
deleteObjects_requestPayer,
deleteObjects_bypassGovernanceRetention,
deleteObjects_expectedBucketOwner,
deleteObjects_bucket,
deleteObjects_delete,
DeleteObjectsResponse (..),
newDeleteObjectsResponse,
deleteObjectsResponse_requestCharged,
deleteObjectsResponse_deleted,
deleteObjectsResponse_errors,
deleteObjectsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.S3.Types
data DeleteObjects = DeleteObjects'
{
DeleteObjects -> Maybe Text
mfa :: Prelude.Maybe Prelude.Text,
DeleteObjects -> Maybe RequestPayer
requestPayer :: Prelude.Maybe RequestPayer,
DeleteObjects -> Maybe Bool
bypassGovernanceRetention :: Prelude.Maybe Prelude.Bool,
DeleteObjects -> Maybe Text
expectedBucketOwner :: Prelude.Maybe Prelude.Text,
DeleteObjects -> BucketName
bucket :: BucketName,
DeleteObjects -> Delete
delete' :: Delete
}
deriving (DeleteObjects -> DeleteObjects -> Bool
(DeleteObjects -> DeleteObjects -> Bool)
-> (DeleteObjects -> DeleteObjects -> Bool) -> Eq DeleteObjects
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteObjects -> DeleteObjects -> Bool
$c/= :: DeleteObjects -> DeleteObjects -> Bool
== :: DeleteObjects -> DeleteObjects -> Bool
$c== :: DeleteObjects -> DeleteObjects -> Bool
Prelude.Eq, ReadPrec [DeleteObjects]
ReadPrec DeleteObjects
Int -> ReadS DeleteObjects
ReadS [DeleteObjects]
(Int -> ReadS DeleteObjects)
-> ReadS [DeleteObjects]
-> ReadPrec DeleteObjects
-> ReadPrec [DeleteObjects]
-> Read DeleteObjects
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteObjects]
$creadListPrec :: ReadPrec [DeleteObjects]
readPrec :: ReadPrec DeleteObjects
$creadPrec :: ReadPrec DeleteObjects
readList :: ReadS [DeleteObjects]
$creadList :: ReadS [DeleteObjects]
readsPrec :: Int -> ReadS DeleteObjects
$creadsPrec :: Int -> ReadS DeleteObjects
Prelude.Read, Int -> DeleteObjects -> ShowS
[DeleteObjects] -> ShowS
DeleteObjects -> String
(Int -> DeleteObjects -> ShowS)
-> (DeleteObjects -> String)
-> ([DeleteObjects] -> ShowS)
-> Show DeleteObjects
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteObjects] -> ShowS
$cshowList :: [DeleteObjects] -> ShowS
show :: DeleteObjects -> String
$cshow :: DeleteObjects -> String
showsPrec :: Int -> DeleteObjects -> ShowS
$cshowsPrec :: Int -> DeleteObjects -> ShowS
Prelude.Show, (forall x. DeleteObjects -> Rep DeleteObjects x)
-> (forall x. Rep DeleteObjects x -> DeleteObjects)
-> Generic DeleteObjects
forall x. Rep DeleteObjects x -> DeleteObjects
forall x. DeleteObjects -> Rep DeleteObjects x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteObjects x -> DeleteObjects
$cfrom :: forall x. DeleteObjects -> Rep DeleteObjects x
Prelude.Generic)
newDeleteObjects ::
BucketName ->
Delete ->
DeleteObjects
newDeleteObjects :: BucketName -> Delete -> DeleteObjects
newDeleteObjects BucketName
pBucket_ Delete
pDelete_ =
DeleteObjects' :: Maybe Text
-> Maybe RequestPayer
-> Maybe Bool
-> Maybe Text
-> BucketName
-> Delete
-> DeleteObjects
DeleteObjects'
{ $sel:mfa:DeleteObjects' :: Maybe Text
mfa = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:requestPayer:DeleteObjects' :: Maybe RequestPayer
requestPayer = Maybe RequestPayer
forall a. Maybe a
Prelude.Nothing,
$sel:bypassGovernanceRetention:DeleteObjects' :: Maybe Bool
bypassGovernanceRetention = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:expectedBucketOwner:DeleteObjects' :: Maybe Text
expectedBucketOwner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:bucket:DeleteObjects' :: BucketName
bucket = BucketName
pBucket_,
$sel:delete':DeleteObjects' :: Delete
delete' = Delete
pDelete_
}
deleteObjects_mfa :: Lens.Lens' DeleteObjects (Prelude.Maybe Prelude.Text)
deleteObjects_mfa :: (Maybe Text -> f (Maybe Text)) -> DeleteObjects -> f DeleteObjects
deleteObjects_mfa = (DeleteObjects -> Maybe Text)
-> (DeleteObjects -> Maybe Text -> DeleteObjects)
-> Lens DeleteObjects DeleteObjects (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteObjects' {Maybe Text
mfa :: Maybe Text
$sel:mfa:DeleteObjects' :: DeleteObjects -> Maybe Text
mfa} -> Maybe Text
mfa) (\s :: DeleteObjects
s@DeleteObjects' {} Maybe Text
a -> DeleteObjects
s {$sel:mfa:DeleteObjects' :: Maybe Text
mfa = Maybe Text
a} :: DeleteObjects)
deleteObjects_requestPayer :: Lens.Lens' DeleteObjects (Prelude.Maybe RequestPayer)
deleteObjects_requestPayer :: (Maybe RequestPayer -> f (Maybe RequestPayer))
-> DeleteObjects -> f DeleteObjects
deleteObjects_requestPayer = (DeleteObjects -> Maybe RequestPayer)
-> (DeleteObjects -> Maybe RequestPayer -> DeleteObjects)
-> Lens
DeleteObjects
DeleteObjects
(Maybe RequestPayer)
(Maybe RequestPayer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteObjects' {Maybe RequestPayer
requestPayer :: Maybe RequestPayer
$sel:requestPayer:DeleteObjects' :: DeleteObjects -> Maybe RequestPayer
requestPayer} -> Maybe RequestPayer
requestPayer) (\s :: DeleteObjects
s@DeleteObjects' {} Maybe RequestPayer
a -> DeleteObjects
s {$sel:requestPayer:DeleteObjects' :: Maybe RequestPayer
requestPayer = Maybe RequestPayer
a} :: DeleteObjects)
deleteObjects_bypassGovernanceRetention :: Lens.Lens' DeleteObjects (Prelude.Maybe Prelude.Bool)
deleteObjects_bypassGovernanceRetention :: (Maybe Bool -> f (Maybe Bool)) -> DeleteObjects -> f DeleteObjects
deleteObjects_bypassGovernanceRetention = (DeleteObjects -> Maybe Bool)
-> (DeleteObjects -> Maybe Bool -> DeleteObjects)
-> Lens DeleteObjects DeleteObjects (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteObjects' {Maybe Bool
bypassGovernanceRetention :: Maybe Bool
$sel:bypassGovernanceRetention:DeleteObjects' :: DeleteObjects -> Maybe Bool
bypassGovernanceRetention} -> Maybe Bool
bypassGovernanceRetention) (\s :: DeleteObjects
s@DeleteObjects' {} Maybe Bool
a -> DeleteObjects
s {$sel:bypassGovernanceRetention:DeleteObjects' :: Maybe Bool
bypassGovernanceRetention = Maybe Bool
a} :: DeleteObjects)
deleteObjects_expectedBucketOwner :: Lens.Lens' DeleteObjects (Prelude.Maybe Prelude.Text)
deleteObjects_expectedBucketOwner :: (Maybe Text -> f (Maybe Text)) -> DeleteObjects -> f DeleteObjects
deleteObjects_expectedBucketOwner = (DeleteObjects -> Maybe Text)
-> (DeleteObjects -> Maybe Text -> DeleteObjects)
-> Lens DeleteObjects DeleteObjects (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteObjects' {Maybe Text
expectedBucketOwner :: Maybe Text
$sel:expectedBucketOwner:DeleteObjects' :: DeleteObjects -> Maybe Text
expectedBucketOwner} -> Maybe Text
expectedBucketOwner) (\s :: DeleteObjects
s@DeleteObjects' {} Maybe Text
a -> DeleteObjects
s {$sel:expectedBucketOwner:DeleteObjects' :: Maybe Text
expectedBucketOwner = Maybe Text
a} :: DeleteObjects)
deleteObjects_bucket :: Lens.Lens' DeleteObjects BucketName
deleteObjects_bucket :: (BucketName -> f BucketName) -> DeleteObjects -> f DeleteObjects
deleteObjects_bucket = (DeleteObjects -> BucketName)
-> (DeleteObjects -> BucketName -> DeleteObjects)
-> Lens DeleteObjects DeleteObjects BucketName BucketName
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteObjects' {BucketName
bucket :: BucketName
$sel:bucket:DeleteObjects' :: DeleteObjects -> BucketName
bucket} -> BucketName
bucket) (\s :: DeleteObjects
s@DeleteObjects' {} BucketName
a -> DeleteObjects
s {$sel:bucket:DeleteObjects' :: BucketName
bucket = BucketName
a} :: DeleteObjects)
deleteObjects_delete :: Lens.Lens' DeleteObjects Delete
deleteObjects_delete :: (Delete -> f Delete) -> DeleteObjects -> f DeleteObjects
deleteObjects_delete = (DeleteObjects -> Delete)
-> (DeleteObjects -> Delete -> DeleteObjects)
-> Lens DeleteObjects DeleteObjects Delete Delete
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteObjects' {Delete
delete' :: Delete
$sel:delete':DeleteObjects' :: DeleteObjects -> Delete
delete'} -> Delete
delete') (\s :: DeleteObjects
s@DeleteObjects' {} Delete
a -> DeleteObjects
s {$sel:delete':DeleteObjects' :: Delete
delete' = Delete
a} :: DeleteObjects)
instance Core.AWSRequest DeleteObjects where
type
AWSResponse DeleteObjects =
DeleteObjectsResponse
request :: DeleteObjects -> Request DeleteObjects
request =
Request DeleteObjects -> Request DeleteObjects
forall a. Request a -> Request a
Request.contentMD5Header
(Request DeleteObjects -> Request DeleteObjects)
-> (DeleteObjects -> Request DeleteObjects)
-> DeleteObjects
-> Request DeleteObjects
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Request DeleteObjects -> Request DeleteObjects
forall a. Request a -> Request a
Request.s3vhost
(Request DeleteObjects -> Request DeleteObjects)
-> (DeleteObjects -> Request DeleteObjects)
-> DeleteObjects
-> Request DeleteObjects
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Service -> DeleteObjects -> Request DeleteObjects
forall a. (ToRequest a, ToElement a) => Service -> a -> Request a
Request.postXML Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteObjects
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteObjects)))
response =
(Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse DeleteObjects))
-> Logger
-> Service
-> Proxy DeleteObjects
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteObjects)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe RequestCharged
-> Maybe [DeletedObject]
-> Maybe [S3ServiceError]
-> Int
-> DeleteObjectsResponse
DeleteObjectsResponse'
(Maybe RequestCharged
-> Maybe [DeletedObject]
-> Maybe [S3ServiceError]
-> Int
-> DeleteObjectsResponse)
-> Either String (Maybe RequestCharged)
-> Either
String
(Maybe [DeletedObject]
-> Maybe [S3ServiceError] -> Int -> DeleteObjectsResponse)
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 [DeletedObject]
-> Maybe [S3ServiceError] -> Int -> DeleteObjectsResponse)
-> Either String (Maybe [DeletedObject])
-> Either
String (Maybe [S3ServiceError] -> Int -> DeleteObjectsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (([Node] -> Either String [DeletedObject])
-> [Node] -> Either String (Maybe [DeletedObject])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [DeletedObject]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"Deleted") [Node]
x)
Either
String (Maybe [S3ServiceError] -> Int -> DeleteObjectsResponse)
-> Either String (Maybe [S3ServiceError])
-> Either String (Int -> DeleteObjectsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (([Node] -> Either String [S3ServiceError])
-> [Node] -> Either String (Maybe [S3ServiceError])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [S3ServiceError]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"Error") [Node]
x)
Either String (Int -> DeleteObjectsResponse)
-> Either String Int -> Either String DeleteObjectsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable DeleteObjects
instance Prelude.NFData DeleteObjects
instance Core.ToElement DeleteObjects where
toElement :: DeleteObjects -> Element
toElement DeleteObjects' {Maybe Bool
Maybe Text
Maybe RequestPayer
BucketName
Delete
delete' :: Delete
bucket :: BucketName
expectedBucketOwner :: Maybe Text
bypassGovernanceRetention :: Maybe Bool
requestPayer :: Maybe RequestPayer
mfa :: Maybe Text
$sel:delete':DeleteObjects' :: DeleteObjects -> Delete
$sel:bucket:DeleteObjects' :: DeleteObjects -> BucketName
$sel:expectedBucketOwner:DeleteObjects' :: DeleteObjects -> Maybe Text
$sel:bypassGovernanceRetention:DeleteObjects' :: DeleteObjects -> Maybe Bool
$sel:requestPayer:DeleteObjects' :: DeleteObjects -> Maybe RequestPayer
$sel:mfa:DeleteObjects' :: DeleteObjects -> Maybe Text
..} =
Name -> Delete -> Element
forall a. ToXML a => Name -> a -> Element
Core.mkElement
Name
"{http://s3.amazonaws.com/doc/2006-03-01/}Delete"
Delete
delete'
instance Core.ToHeaders DeleteObjects where
toHeaders :: DeleteObjects -> ResponseHeaders
toHeaders DeleteObjects' {Maybe Bool
Maybe Text
Maybe RequestPayer
BucketName
Delete
delete' :: Delete
bucket :: BucketName
expectedBucketOwner :: Maybe Text
bypassGovernanceRetention :: Maybe Bool
requestPayer :: Maybe RequestPayer
mfa :: Maybe Text
$sel:delete':DeleteObjects' :: DeleteObjects -> Delete
$sel:bucket:DeleteObjects' :: DeleteObjects -> BucketName
$sel:expectedBucketOwner:DeleteObjects' :: DeleteObjects -> Maybe Text
$sel:bypassGovernanceRetention:DeleteObjects' :: DeleteObjects -> Maybe Bool
$sel:requestPayer:DeleteObjects' :: DeleteObjects -> Maybe RequestPayer
$sel:mfa:DeleteObjects' :: DeleteObjects -> Maybe Text
..} =
[ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"x-amz-mfa" HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
mfa,
HeaderName
"x-amz-request-payer" HeaderName -> Maybe RequestPayer -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe RequestPayer
requestPayer,
HeaderName
"x-amz-bypass-governance-retention"
HeaderName -> Maybe Bool -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Bool
bypassGovernanceRetention,
HeaderName
"x-amz-expected-bucket-owner"
HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
expectedBucketOwner
]
instance Core.ToPath DeleteObjects where
toPath :: DeleteObjects -> ByteString
toPath DeleteObjects' {Maybe Bool
Maybe Text
Maybe RequestPayer
BucketName
Delete
delete' :: Delete
bucket :: BucketName
expectedBucketOwner :: Maybe Text
bypassGovernanceRetention :: Maybe Bool
requestPayer :: Maybe RequestPayer
mfa :: Maybe Text
$sel:delete':DeleteObjects' :: DeleteObjects -> Delete
$sel:bucket:DeleteObjects' :: DeleteObjects -> BucketName
$sel:expectedBucketOwner:DeleteObjects' :: DeleteObjects -> Maybe Text
$sel:bypassGovernanceRetention:DeleteObjects' :: DeleteObjects -> Maybe Bool
$sel:requestPayer:DeleteObjects' :: DeleteObjects -> Maybe RequestPayer
$sel:mfa:DeleteObjects' :: DeleteObjects -> 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]
instance Core.ToQuery DeleteObjects where
toQuery :: DeleteObjects -> QueryString
toQuery = QueryString -> DeleteObjects -> QueryString
forall a b. a -> b -> a
Prelude.const ([QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat [QueryString
"delete"])
data DeleteObjectsResponse = DeleteObjectsResponse'
{ DeleteObjectsResponse -> Maybe RequestCharged
requestCharged :: Prelude.Maybe RequestCharged,
DeleteObjectsResponse -> Maybe [DeletedObject]
deleted :: Prelude.Maybe [DeletedObject],
DeleteObjectsResponse -> Maybe [S3ServiceError]
errors :: Prelude.Maybe [S3ServiceError],
DeleteObjectsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteObjectsResponse -> DeleteObjectsResponse -> Bool
(DeleteObjectsResponse -> DeleteObjectsResponse -> Bool)
-> (DeleteObjectsResponse -> DeleteObjectsResponse -> Bool)
-> Eq DeleteObjectsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteObjectsResponse -> DeleteObjectsResponse -> Bool
$c/= :: DeleteObjectsResponse -> DeleteObjectsResponse -> Bool
== :: DeleteObjectsResponse -> DeleteObjectsResponse -> Bool
$c== :: DeleteObjectsResponse -> DeleteObjectsResponse -> Bool
Prelude.Eq, ReadPrec [DeleteObjectsResponse]
ReadPrec DeleteObjectsResponse
Int -> ReadS DeleteObjectsResponse
ReadS [DeleteObjectsResponse]
(Int -> ReadS DeleteObjectsResponse)
-> ReadS [DeleteObjectsResponse]
-> ReadPrec DeleteObjectsResponse
-> ReadPrec [DeleteObjectsResponse]
-> Read DeleteObjectsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteObjectsResponse]
$creadListPrec :: ReadPrec [DeleteObjectsResponse]
readPrec :: ReadPrec DeleteObjectsResponse
$creadPrec :: ReadPrec DeleteObjectsResponse
readList :: ReadS [DeleteObjectsResponse]
$creadList :: ReadS [DeleteObjectsResponse]
readsPrec :: Int -> ReadS DeleteObjectsResponse
$creadsPrec :: Int -> ReadS DeleteObjectsResponse
Prelude.Read, Int -> DeleteObjectsResponse -> ShowS
[DeleteObjectsResponse] -> ShowS
DeleteObjectsResponse -> String
(Int -> DeleteObjectsResponse -> ShowS)
-> (DeleteObjectsResponse -> String)
-> ([DeleteObjectsResponse] -> ShowS)
-> Show DeleteObjectsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteObjectsResponse] -> ShowS
$cshowList :: [DeleteObjectsResponse] -> ShowS
show :: DeleteObjectsResponse -> String
$cshow :: DeleteObjectsResponse -> String
showsPrec :: Int -> DeleteObjectsResponse -> ShowS
$cshowsPrec :: Int -> DeleteObjectsResponse -> ShowS
Prelude.Show, (forall x. DeleteObjectsResponse -> Rep DeleteObjectsResponse x)
-> (forall x. Rep DeleteObjectsResponse x -> DeleteObjectsResponse)
-> Generic DeleteObjectsResponse
forall x. Rep DeleteObjectsResponse x -> DeleteObjectsResponse
forall x. DeleteObjectsResponse -> Rep DeleteObjectsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteObjectsResponse x -> DeleteObjectsResponse
$cfrom :: forall x. DeleteObjectsResponse -> Rep DeleteObjectsResponse x
Prelude.Generic)
newDeleteObjectsResponse ::
Prelude.Int ->
DeleteObjectsResponse
newDeleteObjectsResponse :: Int -> DeleteObjectsResponse
newDeleteObjectsResponse Int
pHttpStatus_ =
DeleteObjectsResponse' :: Maybe RequestCharged
-> Maybe [DeletedObject]
-> Maybe [S3ServiceError]
-> Int
-> DeleteObjectsResponse
DeleteObjectsResponse'
{ $sel:requestCharged:DeleteObjectsResponse' :: Maybe RequestCharged
requestCharged =
Maybe RequestCharged
forall a. Maybe a
Prelude.Nothing,
$sel:deleted:DeleteObjectsResponse' :: Maybe [DeletedObject]
deleted = Maybe [DeletedObject]
forall a. Maybe a
Prelude.Nothing,
$sel:errors:DeleteObjectsResponse' :: Maybe [S3ServiceError]
errors = Maybe [S3ServiceError]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DeleteObjectsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
deleteObjectsResponse_requestCharged :: Lens.Lens' DeleteObjectsResponse (Prelude.Maybe RequestCharged)
deleteObjectsResponse_requestCharged :: (Maybe RequestCharged -> f (Maybe RequestCharged))
-> DeleteObjectsResponse -> f DeleteObjectsResponse
deleteObjectsResponse_requestCharged = (DeleteObjectsResponse -> Maybe RequestCharged)
-> (DeleteObjectsResponse
-> Maybe RequestCharged -> DeleteObjectsResponse)
-> Lens
DeleteObjectsResponse
DeleteObjectsResponse
(Maybe RequestCharged)
(Maybe RequestCharged)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteObjectsResponse' {Maybe RequestCharged
requestCharged :: Maybe RequestCharged
$sel:requestCharged:DeleteObjectsResponse' :: DeleteObjectsResponse -> Maybe RequestCharged
requestCharged} -> Maybe RequestCharged
requestCharged) (\s :: DeleteObjectsResponse
s@DeleteObjectsResponse' {} Maybe RequestCharged
a -> DeleteObjectsResponse
s {$sel:requestCharged:DeleteObjectsResponse' :: Maybe RequestCharged
requestCharged = Maybe RequestCharged
a} :: DeleteObjectsResponse)
deleteObjectsResponse_deleted :: Lens.Lens' DeleteObjectsResponse (Prelude.Maybe [DeletedObject])
deleteObjectsResponse_deleted :: (Maybe [DeletedObject] -> f (Maybe [DeletedObject]))
-> DeleteObjectsResponse -> f DeleteObjectsResponse
deleteObjectsResponse_deleted = (DeleteObjectsResponse -> Maybe [DeletedObject])
-> (DeleteObjectsResponse
-> Maybe [DeletedObject] -> DeleteObjectsResponse)
-> Lens
DeleteObjectsResponse
DeleteObjectsResponse
(Maybe [DeletedObject])
(Maybe [DeletedObject])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteObjectsResponse' {Maybe [DeletedObject]
deleted :: Maybe [DeletedObject]
$sel:deleted:DeleteObjectsResponse' :: DeleteObjectsResponse -> Maybe [DeletedObject]
deleted} -> Maybe [DeletedObject]
deleted) (\s :: DeleteObjectsResponse
s@DeleteObjectsResponse' {} Maybe [DeletedObject]
a -> DeleteObjectsResponse
s {$sel:deleted:DeleteObjectsResponse' :: Maybe [DeletedObject]
deleted = Maybe [DeletedObject]
a} :: DeleteObjectsResponse) ((Maybe [DeletedObject] -> f (Maybe [DeletedObject]))
-> DeleteObjectsResponse -> f DeleteObjectsResponse)
-> ((Maybe [DeletedObject] -> f (Maybe [DeletedObject]))
-> Maybe [DeletedObject] -> f (Maybe [DeletedObject]))
-> (Maybe [DeletedObject] -> f (Maybe [DeletedObject]))
-> DeleteObjectsResponse
-> f DeleteObjectsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[DeletedObject] [DeletedObject] [DeletedObject] [DeletedObject]
-> Iso
(Maybe [DeletedObject])
(Maybe [DeletedObject])
(Maybe [DeletedObject])
(Maybe [DeletedObject])
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
[DeletedObject] [DeletedObject] [DeletedObject] [DeletedObject]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
deleteObjectsResponse_errors :: Lens.Lens' DeleteObjectsResponse (Prelude.Maybe [S3ServiceError])
deleteObjectsResponse_errors :: (Maybe [S3ServiceError] -> f (Maybe [S3ServiceError]))
-> DeleteObjectsResponse -> f DeleteObjectsResponse
deleteObjectsResponse_errors = (DeleteObjectsResponse -> Maybe [S3ServiceError])
-> (DeleteObjectsResponse
-> Maybe [S3ServiceError] -> DeleteObjectsResponse)
-> Lens
DeleteObjectsResponse
DeleteObjectsResponse
(Maybe [S3ServiceError])
(Maybe [S3ServiceError])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteObjectsResponse' {Maybe [S3ServiceError]
errors :: Maybe [S3ServiceError]
$sel:errors:DeleteObjectsResponse' :: DeleteObjectsResponse -> Maybe [S3ServiceError]
errors} -> Maybe [S3ServiceError]
errors) (\s :: DeleteObjectsResponse
s@DeleteObjectsResponse' {} Maybe [S3ServiceError]
a -> DeleteObjectsResponse
s {$sel:errors:DeleteObjectsResponse' :: Maybe [S3ServiceError]
errors = Maybe [S3ServiceError]
a} :: DeleteObjectsResponse) ((Maybe [S3ServiceError] -> f (Maybe [S3ServiceError]))
-> DeleteObjectsResponse -> f DeleteObjectsResponse)
-> ((Maybe [S3ServiceError] -> f (Maybe [S3ServiceError]))
-> Maybe [S3ServiceError] -> f (Maybe [S3ServiceError]))
-> (Maybe [S3ServiceError] -> f (Maybe [S3ServiceError]))
-> DeleteObjectsResponse
-> f DeleteObjectsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[S3ServiceError] [S3ServiceError] [S3ServiceError] [S3ServiceError]
-> Iso
(Maybe [S3ServiceError])
(Maybe [S3ServiceError])
(Maybe [S3ServiceError])
(Maybe [S3ServiceError])
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
[S3ServiceError] [S3ServiceError] [S3ServiceError] [S3ServiceError]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
deleteObjectsResponse_httpStatus :: Lens.Lens' DeleteObjectsResponse Prelude.Int
deleteObjectsResponse_httpStatus :: (Int -> f Int) -> DeleteObjectsResponse -> f DeleteObjectsResponse
deleteObjectsResponse_httpStatus = (DeleteObjectsResponse -> Int)
-> (DeleteObjectsResponse -> Int -> DeleteObjectsResponse)
-> Lens DeleteObjectsResponse DeleteObjectsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteObjectsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteObjectsResponse' :: DeleteObjectsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteObjectsResponse
s@DeleteObjectsResponse' {} Int
a -> DeleteObjectsResponse
s {$sel:httpStatus:DeleteObjectsResponse' :: Int
httpStatus = Int
a} :: DeleteObjectsResponse)
instance Prelude.NFData DeleteObjectsResponse