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