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