{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Resource.Storage.Buckets.Delete
(
BucketsDeleteResource
, bucketsDelete
, BucketsDelete
, bdIfMetagenerationMatch
, bdBucket
, bdUserProject
, bdIfMetagenerationNotMatch
) where
import Network.Google.Prelude
import Network.Google.Storage.Types
type BucketsDeleteResource =
"storage" :>
"v1" :>
"b" :>
Capture "bucket" Text :>
QueryParam "ifMetagenerationMatch" (Textual Int64) :>
QueryParam "userProject" Text :>
QueryParam "ifMetagenerationNotMatch" (Textual Int64)
:> QueryParam "alt" AltJSON :> Delete '[JSON] ()
data BucketsDelete = BucketsDelete'
{ _bdIfMetagenerationMatch :: !(Maybe (Textual Int64))
, _bdBucket :: !Text
, _bdUserProject :: !(Maybe Text)
, _bdIfMetagenerationNotMatch :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
bucketsDelete
:: Text
-> BucketsDelete
bucketsDelete pBdBucket_ =
BucketsDelete'
{ _bdIfMetagenerationMatch = Nothing
, _bdBucket = pBdBucket_
, _bdUserProject = Nothing
, _bdIfMetagenerationNotMatch = Nothing
}
bdIfMetagenerationMatch :: Lens' BucketsDelete (Maybe Int64)
bdIfMetagenerationMatch
= lens _bdIfMetagenerationMatch
(\ s a -> s{_bdIfMetagenerationMatch = a})
. mapping _Coerce
bdBucket :: Lens' BucketsDelete Text
bdBucket = lens _bdBucket (\ s a -> s{_bdBucket = a})
bdUserProject :: Lens' BucketsDelete (Maybe Text)
bdUserProject
= lens _bdUserProject
(\ s a -> s{_bdUserProject = a})
bdIfMetagenerationNotMatch :: Lens' BucketsDelete (Maybe Int64)
bdIfMetagenerationNotMatch
= lens _bdIfMetagenerationNotMatch
(\ s a -> s{_bdIfMetagenerationNotMatch = a})
. mapping _Coerce
instance GoogleRequest BucketsDelete where
type Rs BucketsDelete = ()
type Scopes BucketsDelete =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/devstorage.full_control",
"https://www.googleapis.com/auth/devstorage.read_write"]
requestClient BucketsDelete'{..}
= go _bdBucket _bdIfMetagenerationMatch
_bdUserProject
_bdIfMetagenerationNotMatch
(Just AltJSON)
storageService
where go
= buildClient (Proxy :: Proxy BucketsDeleteResource)
mempty