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