{-# 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.RoleAssignments.List
(
RoleAssignmentsListResource
, roleAssignmentsList
, RoleAssignmentsList
, ralRoleId
, ralCustomer
, ralPageToken
, ralUserKey
, ralMaxResults
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type RoleAssignmentsListResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customer" Text :>
"roleassignments" :>
QueryParam "roleId" Text :>
QueryParam "pageToken" Text :>
QueryParam "userKey" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] RoleAssignments
data RoleAssignmentsList = RoleAssignmentsList'
{ _ralRoleId :: !(Maybe Text)
, _ralCustomer :: !Text
, _ralPageToken :: !(Maybe Text)
, _ralUserKey :: !(Maybe Text)
, _ralMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
roleAssignmentsList
:: Text
-> RoleAssignmentsList
roleAssignmentsList pRalCustomer_ =
RoleAssignmentsList'
{ _ralRoleId = Nothing
, _ralCustomer = pRalCustomer_
, _ralPageToken = Nothing
, _ralUserKey = Nothing
, _ralMaxResults = Nothing
}
ralRoleId :: Lens' RoleAssignmentsList (Maybe Text)
ralRoleId
= lens _ralRoleId (\ s a -> s{_ralRoleId = a})
ralCustomer :: Lens' RoleAssignmentsList Text
ralCustomer
= lens _ralCustomer (\ s a -> s{_ralCustomer = a})
ralPageToken :: Lens' RoleAssignmentsList (Maybe Text)
ralPageToken
= lens _ralPageToken (\ s a -> s{_ralPageToken = a})
ralUserKey :: Lens' RoleAssignmentsList (Maybe Text)
ralUserKey
= lens _ralUserKey (\ s a -> s{_ralUserKey = a})
ralMaxResults :: Lens' RoleAssignmentsList (Maybe Int32)
ralMaxResults
= lens _ralMaxResults
(\ s a -> s{_ralMaxResults = a})
. mapping _Coerce
instance GoogleRequest RoleAssignmentsList where
type Rs RoleAssignmentsList = RoleAssignments
type Scopes RoleAssignmentsList =
'["https://www.googleapis.com/auth/admin.directory.rolemanagement",
"https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly"]
requestClient RoleAssignmentsList'{..}
= go _ralCustomer _ralRoleId _ralPageToken
_ralUserKey
_ralMaxResults
(Just AltJSON)
directoryService
where go
= buildClient
(Proxy :: Proxy RoleAssignmentsListResource)
mempty