{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Network.AWS.S3.DeleteBucket
(
deleteBucket
, DeleteBucket
, dbBucket
, deleteBucketResponse
, DeleteBucketResponse
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.S3.Types
import Network.AWS.S3.Types.Product
newtype DeleteBucket = DeleteBucket'
{ _dbBucket :: BucketName
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteBucket
:: BucketName
-> DeleteBucket
deleteBucket pBucket_ = DeleteBucket' {_dbBucket = pBucket_}
dbBucket :: Lens' DeleteBucket BucketName
dbBucket = lens _dbBucket (\ s a -> s{_dbBucket = a})
instance AWSRequest DeleteBucket where
type Rs DeleteBucket = DeleteBucketResponse
request = delete s3
response = receiveNull DeleteBucketResponse'
instance Hashable DeleteBucket where
instance NFData DeleteBucket where
instance ToHeaders DeleteBucket where
toHeaders = const mempty
instance ToPath DeleteBucket where
toPath DeleteBucket'{..}
= mconcat ["/", toBS _dbBucket]
instance ToQuery DeleteBucket where
toQuery = const mempty
data DeleteBucketResponse =
DeleteBucketResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteBucketResponse
:: DeleteBucketResponse
deleteBucketResponse = DeleteBucketResponse'
instance NFData DeleteBucketResponse where