{-# 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.Directory.Privileges.List
(
PrivilegesListResource
, privilegesList
, PrivilegesList
, plCustomer
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type PrivilegesListResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customer" Text :>
"roles" :>
"ALL" :>
"privileges" :>
QueryParam "alt" AltJSON :> Get '[JSON] Privileges
newtype PrivilegesList = PrivilegesList'
{ _plCustomer :: Text
} deriving (Eq,Show,Data,Typeable,Generic)
privilegesList
:: Text
-> PrivilegesList
privilegesList pPlCustomer_ =
PrivilegesList'
{ _plCustomer = pPlCustomer_
}
plCustomer :: Lens' PrivilegesList Text
plCustomer
= lens _plCustomer (\ s a -> s{_plCustomer = a})
instance GoogleRequest PrivilegesList where
type Rs PrivilegesList = Privileges
type Scopes PrivilegesList =
'["https://www.googleapis.com/auth/admin.directory.rolemanagement",
"https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly"]
requestClient PrivilegesList'{..}
= go _plCustomer (Just AltJSON) directoryService
where go
= buildClient (Proxy :: Proxy PrivilegesListResource)
mempty