{-# 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.SQL.Databases.Delete
(
DatabasesDeleteResource
, databasesDelete
, DatabasesDelete
, ddProject
, ddDatabase
, ddInstance
) where
import Network.Google.Prelude
import Network.Google.SQLAdmin.Types
type DatabasesDeleteResource =
"sql" :>
"v1beta4" :>
"projects" :>
Capture "project" Text :>
"instances" :>
Capture "instance" Text :>
"databases" :>
Capture "database" Text :>
QueryParam "alt" AltJSON :> Delete '[JSON] Operation
data DatabasesDelete = DatabasesDelete'
{ _ddProject :: !Text
, _ddDatabase :: !Text
, _ddInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
databasesDelete
:: Text
-> Text
-> Text
-> DatabasesDelete
databasesDelete pDdProject_ pDdDatabase_ pDdInstance_ =
DatabasesDelete'
{ _ddProject = pDdProject_
, _ddDatabase = pDdDatabase_
, _ddInstance = pDdInstance_
}
ddProject :: Lens' DatabasesDelete Text
ddProject
= lens _ddProject (\ s a -> s{_ddProject = a})
ddDatabase :: Lens' DatabasesDelete Text
ddDatabase
= lens _ddDatabase (\ s a -> s{_ddDatabase = a})
ddInstance :: Lens' DatabasesDelete Text
ddInstance
= lens _ddInstance (\ s a -> s{_ddInstance = a})
instance GoogleRequest DatabasesDelete where
type Rs DatabasesDelete = Operation
type Scopes DatabasesDelete =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/sqlservice.admin"]
requestClient DatabasesDelete'{..}
= go _ddProject _ddInstance _ddDatabase
(Just AltJSON)
sQLAdminService
where go
= buildClient
(Proxy :: Proxy DatabasesDeleteResource)
mempty