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