{-# 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.Objects.Delete
(
ObjectsDeleteResource
, objectsDelete
, ObjectsDelete
, odIfMetagenerationMatch
, odIfGenerationNotMatch
, odIfGenerationMatch
, odBucket
, odUserProject
, odIfMetagenerationNotMatch
, odObject
, odGeneration
) where
import Network.Google.Prelude
import Network.Google.Storage.Types
type ObjectsDeleteResource =
"storage" :>
"v1" :>
"b" :>
Capture "bucket" Text :>
"o" :>
Capture "object" Text :>
QueryParam "ifMetagenerationMatch" (Textual Int64) :>
QueryParam "ifGenerationNotMatch" (Textual Int64) :>
QueryParam "ifGenerationMatch" (Textual Int64) :>
QueryParam "userProject" Text :>
QueryParam "ifMetagenerationNotMatch" (Textual Int64)
:>
QueryParam "generation" (Textual Int64) :>
QueryParam "alt" AltJSON :> Delete '[JSON] ()
data ObjectsDelete = ObjectsDelete'
{ _odIfMetagenerationMatch :: !(Maybe (Textual Int64))
, _odIfGenerationNotMatch :: !(Maybe (Textual Int64))
, _odIfGenerationMatch :: !(Maybe (Textual Int64))
, _odBucket :: !Text
, _odUserProject :: !(Maybe Text)
, _odIfMetagenerationNotMatch :: !(Maybe (Textual Int64))
, _odObject :: !Text
, _odGeneration :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
objectsDelete
:: Text
-> Text
-> ObjectsDelete
objectsDelete pOdBucket_ pOdObject_ =
ObjectsDelete'
{ _odIfMetagenerationMatch = Nothing
, _odIfGenerationNotMatch = Nothing
, _odIfGenerationMatch = Nothing
, _odBucket = pOdBucket_
, _odUserProject = Nothing
, _odIfMetagenerationNotMatch = Nothing
, _odObject = pOdObject_
, _odGeneration = Nothing
}
odIfMetagenerationMatch :: Lens' ObjectsDelete (Maybe Int64)
odIfMetagenerationMatch
= lens _odIfMetagenerationMatch
(\ s a -> s{_odIfMetagenerationMatch = a})
. mapping _Coerce
odIfGenerationNotMatch :: Lens' ObjectsDelete (Maybe Int64)
odIfGenerationNotMatch
= lens _odIfGenerationNotMatch
(\ s a -> s{_odIfGenerationNotMatch = a})
. mapping _Coerce
odIfGenerationMatch :: Lens' ObjectsDelete (Maybe Int64)
odIfGenerationMatch
= lens _odIfGenerationMatch
(\ s a -> s{_odIfGenerationMatch = a})
. mapping _Coerce
odBucket :: Lens' ObjectsDelete Text
odBucket = lens _odBucket (\ s a -> s{_odBucket = a})
odUserProject :: Lens' ObjectsDelete (Maybe Text)
odUserProject
= lens _odUserProject
(\ s a -> s{_odUserProject = a})
odIfMetagenerationNotMatch :: Lens' ObjectsDelete (Maybe Int64)
odIfMetagenerationNotMatch
= lens _odIfMetagenerationNotMatch
(\ s a -> s{_odIfMetagenerationNotMatch = a})
. mapping _Coerce
odObject :: Lens' ObjectsDelete Text
odObject = lens _odObject (\ s a -> s{_odObject = a})
odGeneration :: Lens' ObjectsDelete (Maybe Int64)
odGeneration
= lens _odGeneration (\ s a -> s{_odGeneration = a})
. mapping _Coerce
instance GoogleRequest ObjectsDelete where
type Rs ObjectsDelete = ()
type Scopes ObjectsDelete =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/devstorage.full_control",
"https://www.googleapis.com/auth/devstorage.read_write"]
requestClient ObjectsDelete'{..}
= go _odBucket _odObject _odIfMetagenerationMatch
_odIfGenerationNotMatch
_odIfGenerationMatch
_odUserProject
_odIfMetagenerationNotMatch
_odGeneration
(Just AltJSON)
storageService
where go
= buildClient (Proxy :: Proxy ObjectsDeleteResource)
mempty