{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
module Network.DO.Spaces.Actions.DeleteBucket
( DeleteBucket(..)
, DeleteBucketResponse
) where
import Control.Monad.Reader ( MonadReader(ask) )
import GHC.Generics ( Generic )
import Network.DO.Spaces.Types
newtype DeleteBucket = DeleteBucket
{ DeleteBucket -> Bucket
bucket :: Bucket
}
deriving stock ( Int -> DeleteBucket -> ShowS
[DeleteBucket] -> ShowS
DeleteBucket -> String
(Int -> DeleteBucket -> ShowS)
-> (DeleteBucket -> String)
-> ([DeleteBucket] -> ShowS)
-> Show DeleteBucket
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteBucket] -> ShowS
$cshowList :: [DeleteBucket] -> ShowS
show :: DeleteBucket -> String
$cshow :: DeleteBucket -> String
showsPrec :: Int -> DeleteBucket -> ShowS
$cshowsPrec :: Int -> DeleteBucket -> ShowS
Show, (forall x. DeleteBucket -> Rep DeleteBucket x)
-> (forall x. Rep DeleteBucket x -> DeleteBucket)
-> Generic DeleteBucket
forall x. Rep DeleteBucket x -> DeleteBucket
forall x. DeleteBucket -> Rep DeleteBucket x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteBucket x -> DeleteBucket
$cfrom :: forall x. DeleteBucket -> Rep DeleteBucket x
Generic )
deriving newtype ( DeleteBucket -> DeleteBucket -> Bool
(DeleteBucket -> DeleteBucket -> Bool)
-> (DeleteBucket -> DeleteBucket -> Bool) -> Eq DeleteBucket
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteBucket -> DeleteBucket -> Bool
$c/= :: DeleteBucket -> DeleteBucket -> Bool
== :: DeleteBucket -> DeleteBucket -> Bool
$c== :: DeleteBucket -> DeleteBucket -> Bool
Eq )
type DeleteBucketResponse = ()
instance MonadSpaces m => Action m DeleteBucket where
type ConsumedResponse DeleteBucket = DeleteBucketResponse
buildRequest :: DeleteBucket -> m SpacesRequestBuilder
buildRequest DeleteBucket { Bucket
bucket :: Bucket
$sel:bucket:DeleteBucket :: DeleteBucket -> Bucket
.. } = do
Spaces
spaces <- m Spaces
forall r (m :: * -> *). MonadReader r m => m r
ask
SpacesRequestBuilder -> m SpacesRequestBuilder
forall (f :: * -> *) a. Applicative f => a -> f a
pure SpacesRequestBuilder :: Spaces
-> Maybe RequestBody
-> Maybe Method
-> [Header]
-> Maybe Bucket
-> Maybe Object
-> Maybe Query
-> Maybe Query
-> Maybe Region
-> SpacesRequestBuilder
SpacesRequestBuilder
{ $sel:method:SpacesRequestBuilder :: Maybe Method
method = Method -> Maybe Method
forall a. a -> Maybe a
Just Method
DELETE
, $sel:bucket:SpacesRequestBuilder :: Maybe Bucket
bucket = Bucket -> Maybe Bucket
forall a. a -> Maybe a
Just Bucket
bucket
, $sel:body:SpacesRequestBuilder :: Maybe RequestBody
body = Maybe RequestBody
forall a. Maybe a
Nothing
, $sel:object:SpacesRequestBuilder :: Maybe Object
object = Maybe Object
forall a. Maybe a
Nothing
, $sel:queryString:SpacesRequestBuilder :: Maybe Query
queryString = Maybe Query
forall a. Maybe a
Nothing
, $sel:subresources:SpacesRequestBuilder :: Maybe Query
subresources = Maybe Query
forall a. Maybe a
Nothing
, $sel:headers:SpacesRequestBuilder :: [Header]
headers = [Header]
forall a. Monoid a => a
mempty
, $sel:overrideRegion:SpacesRequestBuilder :: Maybe Region
overrideRegion = Maybe Region
forall a. Maybe a
Nothing
, Spaces
$sel:spaces:SpacesRequestBuilder :: Spaces
spaces :: Spaces
..
}
consumeResponse :: RawResponse m -> m (ConsumedResponse DeleteBucket)
consumeResponse RawResponse m
_ = () -> m ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ()