{-# 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.List
(
UsersListResource
, usersList
, UsersList
, ulProject
, ulInstance
) where
import Network.Google.Prelude
import Network.Google.SQLAdmin.Types
type UsersListResource =
"sql" :>
"v1beta4" :>
"projects" :>
Capture "project" Text :>
"instances" :>
Capture "instance" Text :>
"users" :>
QueryParam "alt" AltJSON :>
Get '[JSON] UsersListResponse
data UsersList = UsersList'
{ _ulProject :: !Text
, _ulInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersList
:: Text
-> Text
-> UsersList
usersList pUlProject_ pUlInstance_ =
UsersList'
{ _ulProject = pUlProject_
, _ulInstance = pUlInstance_
}
ulProject :: Lens' UsersList Text
ulProject
= lens _ulProject (\ s a -> s{_ulProject = a})
ulInstance :: Lens' UsersList Text
ulInstance
= lens _ulInstance (\ s a -> s{_ulInstance = a})
instance GoogleRequest UsersList where
type Rs UsersList = UsersListResponse
type Scopes UsersList =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/sqlservice.admin"]
requestClient UsersList'{..}
= go _ulProject _ulInstance (Just AltJSON)
sQLAdminService
where go
= buildClient (Proxy :: Proxy UsersListResource)
mempty