{-# 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.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 DeleteBucketOwnershipControls = DeleteBucketOwnershipControls'
{
DeleteBucketOwnershipControls -> Maybe Text
expectedBucketOwner :: Prelude.Maybe Prelude.Text,
DeleteBucketOwnershipControls -> BucketName
bucket :: BucketName
}
deriving (DeleteBucketOwnershipControls
-> DeleteBucketOwnershipControls -> Bool
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]
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
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.
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'
{ $sel:expectedBucketOwner:DeleteBucketOwnershipControls' :: Maybe Text
expectedBucketOwner =
forall a. Maybe a
Prelude.Nothing,
$sel:bucket:DeleteBucketOwnershipControls' :: BucketName
bucket = BucketName
pBucket_
}
deleteBucketOwnershipControls_expectedBucketOwner :: Lens.Lens' DeleteBucketOwnershipControls (Prelude.Maybe Prelude.Text)
deleteBucketOwnershipControls_expectedBucketOwner :: Lens' DeleteBucketOwnershipControls (Maybe Text)
deleteBucketOwnershipControls_expectedBucketOwner = 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 :: Lens' DeleteBucketOwnershipControls BucketName
deleteBucketOwnershipControls_bucket = 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 :: (Service -> Service)
-> DeleteBucketOwnershipControls
-> Request DeleteBucketOwnershipControls
request Service -> Service
overrides =
forall a. Request a -> Request a
Request.s3vhost
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a. ToRequest a => Service -> a -> Request a
Request.delete (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteBucketOwnershipControls
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteBucketOwnershipControls)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
DeleteBucketOwnershipControlsResponse
DeleteBucketOwnershipControlsResponse'
instance
Prelude.Hashable
DeleteBucketOwnershipControls
where
hashWithSalt :: Int -> DeleteBucketOwnershipControls -> Int
hashWithSalt Int
_salt DeleteBucketOwnershipControls' {Maybe Text
BucketName
bucket :: BucketName
expectedBucketOwner :: Maybe Text
$sel:bucket:DeleteBucketOwnershipControls' :: DeleteBucketOwnershipControls -> BucketName
$sel:expectedBucketOwner:DeleteBucketOwnershipControls' :: DeleteBucketOwnershipControls -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
expectedBucketOwner
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` BucketName
bucket
instance Prelude.NFData DeleteBucketOwnershipControls where
rnf :: DeleteBucketOwnershipControls -> ()
rnf DeleteBucketOwnershipControls' {Maybe Text
BucketName
bucket :: BucketName
expectedBucketOwner :: Maybe Text
$sel:bucket:DeleteBucketOwnershipControls' :: DeleteBucketOwnershipControls -> BucketName
$sel:expectedBucketOwner:DeleteBucketOwnershipControls' :: DeleteBucketOwnershipControls -> Maybe Text
..} =
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 BucketName
bucket
instance Data.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
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"x-amz-expected-bucket-owner"
forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# Maybe Text
expectedBucketOwner
]
instance Data.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
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"/", forall a. ToByteString a => a -> ByteString
Data.toBS BucketName
bucket]
instance Data.ToQuery DeleteBucketOwnershipControls where
toQuery :: DeleteBucketOwnershipControls -> QueryString
toQuery =
forall a b. a -> b -> a
Prelude.const
(forall a. Monoid a => [a] -> a
Prelude.mconcat [QueryString
"ownershipControls"])
data DeleteBucketOwnershipControlsResponse = DeleteBucketOwnershipControlsResponse'
{
}
deriving (DeleteBucketOwnershipControlsResponse
-> DeleteBucketOwnershipControlsResponse -> Bool
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]
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
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.
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
where
rnf :: DeleteBucketOwnershipControlsResponse -> ()
rnf DeleteBucketOwnershipControlsResponse
_ = ()