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