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