{-# 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.Users.Delete
(
UsersDeleteResource
, usersDelete
, UsersDelete
, udProject
, udName
, udHost
, udInstance
) where
import Network.Google.Prelude
import Network.Google.SQLAdmin.Types
type UsersDeleteResource =
"sql" :>
"v1beta4" :>
"projects" :>
Capture "project" Text :>
"instances" :>
Capture "instance" Text :>
"users" :>
QueryParam "host" Text :>
QueryParam "name" Text :>
QueryParam "alt" AltJSON :> Delete '[JSON] Operation
data UsersDelete = UsersDelete'
{ _udProject :: !Text
, _udName :: !Text
, _udHost :: !Text
, _udInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersDelete
:: Text
-> Text
-> Text
-> Text
-> UsersDelete
usersDelete pUdProject_ pUdName_ pUdHost_ pUdInstance_ =
UsersDelete'
{ _udProject = pUdProject_
, _udName = pUdName_
, _udHost = pUdHost_
, _udInstance = pUdInstance_
}
udProject :: Lens' UsersDelete Text
udProject
= lens _udProject (\ s a -> s{_udProject = a})
udName :: Lens' UsersDelete Text
udName = lens _udName (\ s a -> s{_udName = a})
udHost :: Lens' UsersDelete Text
udHost = lens _udHost (\ s a -> s{_udHost = a})
udInstance :: Lens' UsersDelete Text
udInstance
= lens _udInstance (\ s a -> s{_udInstance = a})
instance GoogleRequest UsersDelete where
type Rs UsersDelete = Operation
type Scopes UsersDelete =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/sqlservice.admin"]
requestClient UsersDelete'{..}
= go _udProject _udInstance (Just _udHost)
(Just _udName)
(Just AltJSON)
sQLAdminService
where go
= buildClient (Proxy :: Proxy UsersDeleteResource)
mempty