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