{-# 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.DeleteBucketOwnershipControls
(
DeleteBucketOwnershipControls (..),
newDeleteBucketOwnershipControls,
deleteBucketOwnershipControls_expectedBucketOwner,
deleteBucketOwnershipControls_bucket,
DeleteBucketOwnershipControlsResponse (..),
newDeleteBucketOwnershipControlsResponse,
)
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 DeleteBucketOwnershipControls = DeleteBucketOwnershipControls'
{
DeleteBucketOwnershipControls -> Maybe Text
expectedBucketOwner :: Prelude.Maybe Prelude.Text,
DeleteBucketOwnershipControls -> BucketName
bucket :: BucketName
}
deriving (DeleteBucketOwnershipControls
-> DeleteBucketOwnershipControls -> Bool
(DeleteBucketOwnershipControls
-> DeleteBucketOwnershipControls -> Bool)
-> (DeleteBucketOwnershipControls
-> DeleteBucketOwnershipControls -> Bool)
-> Eq DeleteBucketOwnershipControls
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteBucketOwnershipControls
-> DeleteBucketOwnershipControls -> Bool
$c/= :: DeleteBucketOwnershipControls
-> DeleteBucketOwnershipControls -> Bool
== :: DeleteBucketOwnershipControls
-> DeleteBucketOwnershipControls -> Bool
$c== :: DeleteBucketOwnershipControls
-> DeleteBucketOwnershipControls -> Bool
Prelude.Eq, ReadPrec [DeleteBucketOwnershipControls]
ReadPrec DeleteBucketOwnershipControls
Int -> ReadS DeleteBucketOwnershipControls
ReadS [DeleteBucketOwnershipControls]
(Int -> ReadS DeleteBucketOwnershipControls)
-> ReadS [DeleteBucketOwnershipControls]
-> ReadPrec DeleteBucketOwnershipControls
-> ReadPrec [DeleteBucketOwnershipControls]
-> Read DeleteBucketOwnershipControls
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteBucketOwnershipControls]
$creadListPrec :: ReadPrec [DeleteBucketOwnershipControls]
readPrec :: ReadPrec DeleteBucketOwnershipControls
$creadPrec :: ReadPrec DeleteBucketOwnershipControls
readList :: ReadS [DeleteBucketOwnershipControls]
$creadList :: ReadS [DeleteBucketOwnershipControls]
readsPrec :: Int -> ReadS DeleteBucketOwnershipControls
$creadsPrec :: Int -> ReadS DeleteBucketOwnershipControls
Prelude.Read, Int -> DeleteBucketOwnershipControls -> ShowS
[DeleteBucketOwnershipControls] -> ShowS
DeleteBucketOwnershipControls -> String
(Int -> DeleteBucketOwnershipControls -> ShowS)
-> (DeleteBucketOwnershipControls -> String)
-> ([DeleteBucketOwnershipControls] -> ShowS)
-> Show DeleteBucketOwnershipControls
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteBucketOwnershipControls] -> ShowS
$cshowList :: [DeleteBucketOwnershipControls] -> ShowS
show :: DeleteBucketOwnershipControls -> String
$cshow :: DeleteBucketOwnershipControls -> String
showsPrec :: Int -> DeleteBucketOwnershipControls -> ShowS
$cshowsPrec :: Int -> DeleteBucketOwnershipControls -> ShowS
Prelude.Show, (forall x.
DeleteBucketOwnershipControls
-> Rep DeleteBucketOwnershipControls x)
-> (forall x.
Rep DeleteBucketOwnershipControls x
-> DeleteBucketOwnershipControls)
-> Generic DeleteBucketOwnershipControls
forall x.
Rep DeleteBucketOwnershipControls x
-> DeleteBucketOwnershipControls
forall x.
DeleteBucketOwnershipControls
-> Rep DeleteBucketOwnershipControls x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteBucketOwnershipControls x
-> DeleteBucketOwnershipControls
$cfrom :: forall x.
DeleteBucketOwnershipControls
-> Rep DeleteBucketOwnershipControls x
Prelude.Generic)
newDeleteBucketOwnershipControls ::
BucketName ->
DeleteBucketOwnershipControls
newDeleteBucketOwnershipControls :: BucketName -> DeleteBucketOwnershipControls
newDeleteBucketOwnershipControls BucketName
pBucket_ =
DeleteBucketOwnershipControls' :: Maybe Text -> BucketName -> DeleteBucketOwnershipControls
DeleteBucketOwnershipControls'
{ $sel:expectedBucketOwner:DeleteBucketOwnershipControls' :: Maybe Text
expectedBucketOwner =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:bucket:DeleteBucketOwnershipControls' :: BucketName
bucket = BucketName
pBucket_
}
deleteBucketOwnershipControls_expectedBucketOwner :: Lens.Lens' DeleteBucketOwnershipControls (Prelude.Maybe Prelude.Text)
deleteBucketOwnershipControls_expectedBucketOwner :: (Maybe Text -> f (Maybe Text))
-> DeleteBucketOwnershipControls -> f DeleteBucketOwnershipControls
deleteBucketOwnershipControls_expectedBucketOwner = (DeleteBucketOwnershipControls -> Maybe Text)
-> (DeleteBucketOwnershipControls
-> Maybe Text -> DeleteBucketOwnershipControls)
-> Lens
DeleteBucketOwnershipControls
DeleteBucketOwnershipControls
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteBucketOwnershipControls' {Maybe Text
expectedBucketOwner :: Maybe Text
$sel:expectedBucketOwner:DeleteBucketOwnershipControls' :: DeleteBucketOwnershipControls -> Maybe Text
expectedBucketOwner} -> Maybe Text
expectedBucketOwner) (\s :: DeleteBucketOwnershipControls
s@DeleteBucketOwnershipControls' {} Maybe Text
a -> DeleteBucketOwnershipControls
s {$sel:expectedBucketOwner:DeleteBucketOwnershipControls' :: Maybe Text
expectedBucketOwner = Maybe Text
a} :: DeleteBucketOwnershipControls)
deleteBucketOwnershipControls_bucket :: Lens.Lens' DeleteBucketOwnershipControls BucketName
deleteBucketOwnershipControls_bucket :: (BucketName -> f BucketName)
-> DeleteBucketOwnershipControls -> f DeleteBucketOwnershipControls
deleteBucketOwnershipControls_bucket = (DeleteBucketOwnershipControls -> BucketName)
-> (DeleteBucketOwnershipControls
-> BucketName -> DeleteBucketOwnershipControls)
-> Lens
DeleteBucketOwnershipControls
DeleteBucketOwnershipControls
BucketName
BucketName
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteBucketOwnershipControls' {BucketName
bucket :: BucketName
$sel:bucket:DeleteBucketOwnershipControls' :: DeleteBucketOwnershipControls -> BucketName
bucket} -> BucketName
bucket) (\s :: DeleteBucketOwnershipControls
s@DeleteBucketOwnershipControls' {} BucketName
a -> DeleteBucketOwnershipControls
s {$sel:bucket:DeleteBucketOwnershipControls' :: BucketName
bucket = BucketName
a} :: DeleteBucketOwnershipControls)
instance
Core.AWSRequest
DeleteBucketOwnershipControls
where
type
AWSResponse DeleteBucketOwnershipControls =
DeleteBucketOwnershipControlsResponse
request :: DeleteBucketOwnershipControls
-> Request DeleteBucketOwnershipControls
request =
Request DeleteBucketOwnershipControls
-> Request DeleteBucketOwnershipControls
forall a. Request a -> Request a
Request.s3vhost
(Request DeleteBucketOwnershipControls
-> Request DeleteBucketOwnershipControls)
-> (DeleteBucketOwnershipControls
-> Request DeleteBucketOwnershipControls)
-> DeleteBucketOwnershipControls
-> Request DeleteBucketOwnershipControls
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Service
-> DeleteBucketOwnershipControls
-> Request DeleteBucketOwnershipControls
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteBucketOwnershipControls
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteBucketOwnershipControls)))
response =
AWSResponse DeleteBucketOwnershipControls
-> Logger
-> Service
-> Proxy DeleteBucketOwnershipControls
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteBucketOwnershipControls)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse DeleteBucketOwnershipControls
DeleteBucketOwnershipControlsResponse
DeleteBucketOwnershipControlsResponse'
instance
Prelude.Hashable
DeleteBucketOwnershipControls
instance Prelude.NFData DeleteBucketOwnershipControls
instance Core.ToHeaders DeleteBucketOwnershipControls where
toHeaders :: DeleteBucketOwnershipControls -> [Header]
toHeaders DeleteBucketOwnershipControls' {Maybe Text
BucketName
bucket :: BucketName
expectedBucketOwner :: Maybe Text
$sel:bucket:DeleteBucketOwnershipControls' :: DeleteBucketOwnershipControls -> BucketName
$sel:expectedBucketOwner:DeleteBucketOwnershipControls' :: DeleteBucketOwnershipControls -> Maybe Text
..} =
[[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"x-amz-expected-bucket-owner"
HeaderName -> Maybe Text -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# Maybe Text
expectedBucketOwner
]
instance Core.ToPath DeleteBucketOwnershipControls where
toPath :: DeleteBucketOwnershipControls -> ByteString
toPath DeleteBucketOwnershipControls' {Maybe Text
BucketName
bucket :: BucketName
expectedBucketOwner :: Maybe Text
$sel:bucket:DeleteBucketOwnershipControls' :: DeleteBucketOwnershipControls -> BucketName
$sel:expectedBucketOwner:DeleteBucketOwnershipControls' :: DeleteBucketOwnershipControls -> 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 DeleteBucketOwnershipControls where
toQuery :: DeleteBucketOwnershipControls -> QueryString
toQuery =
QueryString -> DeleteBucketOwnershipControls -> QueryString
forall a b. a -> b -> a
Prelude.const
([QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat [QueryString
"ownershipControls"])
data DeleteBucketOwnershipControlsResponse = DeleteBucketOwnershipControlsResponse'
{
}
deriving (DeleteBucketOwnershipControlsResponse
-> DeleteBucketOwnershipControlsResponse -> Bool
(DeleteBucketOwnershipControlsResponse
-> DeleteBucketOwnershipControlsResponse -> Bool)
-> (DeleteBucketOwnershipControlsResponse
-> DeleteBucketOwnershipControlsResponse -> Bool)
-> Eq DeleteBucketOwnershipControlsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteBucketOwnershipControlsResponse
-> DeleteBucketOwnershipControlsResponse -> Bool
$c/= :: DeleteBucketOwnershipControlsResponse
-> DeleteBucketOwnershipControlsResponse -> Bool
== :: DeleteBucketOwnershipControlsResponse
-> DeleteBucketOwnershipControlsResponse -> Bool
$c== :: DeleteBucketOwnershipControlsResponse
-> DeleteBucketOwnershipControlsResponse -> Bool
Prelude.Eq, ReadPrec [DeleteBucketOwnershipControlsResponse]
ReadPrec DeleteBucketOwnershipControlsResponse
Int -> ReadS DeleteBucketOwnershipControlsResponse
ReadS [DeleteBucketOwnershipControlsResponse]
(Int -> ReadS DeleteBucketOwnershipControlsResponse)
-> ReadS [DeleteBucketOwnershipControlsResponse]
-> ReadPrec DeleteBucketOwnershipControlsResponse
-> ReadPrec [DeleteBucketOwnershipControlsResponse]
-> Read DeleteBucketOwnershipControlsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteBucketOwnershipControlsResponse]
$creadListPrec :: ReadPrec [DeleteBucketOwnershipControlsResponse]
readPrec :: ReadPrec DeleteBucketOwnershipControlsResponse
$creadPrec :: ReadPrec DeleteBucketOwnershipControlsResponse
readList :: ReadS [DeleteBucketOwnershipControlsResponse]
$creadList :: ReadS [DeleteBucketOwnershipControlsResponse]
readsPrec :: Int -> ReadS DeleteBucketOwnershipControlsResponse
$creadsPrec :: Int -> ReadS DeleteBucketOwnershipControlsResponse
Prelude.Read, Int -> DeleteBucketOwnershipControlsResponse -> ShowS
[DeleteBucketOwnershipControlsResponse] -> ShowS
DeleteBucketOwnershipControlsResponse -> String
(Int -> DeleteBucketOwnershipControlsResponse -> ShowS)
-> (DeleteBucketOwnershipControlsResponse -> String)
-> ([DeleteBucketOwnershipControlsResponse] -> ShowS)
-> Show DeleteBucketOwnershipControlsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteBucketOwnershipControlsResponse] -> ShowS
$cshowList :: [DeleteBucketOwnershipControlsResponse] -> ShowS
show :: DeleteBucketOwnershipControlsResponse -> String
$cshow :: DeleteBucketOwnershipControlsResponse -> String
showsPrec :: Int -> DeleteBucketOwnershipControlsResponse -> ShowS
$cshowsPrec :: Int -> DeleteBucketOwnershipControlsResponse -> ShowS
Prelude.Show, (forall x.
DeleteBucketOwnershipControlsResponse
-> Rep DeleteBucketOwnershipControlsResponse x)
-> (forall x.
Rep DeleteBucketOwnershipControlsResponse x
-> DeleteBucketOwnershipControlsResponse)
-> Generic DeleteBucketOwnershipControlsResponse
forall x.
Rep DeleteBucketOwnershipControlsResponse x
-> DeleteBucketOwnershipControlsResponse
forall x.
DeleteBucketOwnershipControlsResponse
-> Rep DeleteBucketOwnershipControlsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteBucketOwnershipControlsResponse x
-> DeleteBucketOwnershipControlsResponse
$cfrom :: forall x.
DeleteBucketOwnershipControlsResponse
-> Rep DeleteBucketOwnershipControlsResponse x
Prelude.Generic)
newDeleteBucketOwnershipControlsResponse ::
DeleteBucketOwnershipControlsResponse
newDeleteBucketOwnershipControlsResponse :: DeleteBucketOwnershipControlsResponse
newDeleteBucketOwnershipControlsResponse =
DeleteBucketOwnershipControlsResponse
DeleteBucketOwnershipControlsResponse'
instance
Prelude.NFData
DeleteBucketOwnershipControlsResponse