{-# 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.Roles.List
(
RolesListResource
, rolesList
, RolesList
, rlCustomer
, rlPageToken
, rlMaxResults
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type RolesListResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customer" Text :>
"roles" :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :> Get '[JSON] Roles
data RolesList = RolesList'
{ _rlCustomer :: !Text
, _rlPageToken :: !(Maybe Text)
, _rlMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
rolesList
:: Text
-> RolesList
rolesList pRlCustomer_ =
RolesList'
{ _rlCustomer = pRlCustomer_
, _rlPageToken = Nothing
, _rlMaxResults = Nothing
}
rlCustomer :: Lens' RolesList Text
rlCustomer
= lens _rlCustomer (\ s a -> s{_rlCustomer = a})
rlPageToken :: Lens' RolesList (Maybe Text)
rlPageToken
= lens _rlPageToken (\ s a -> s{_rlPageToken = a})
rlMaxResults :: Lens' RolesList (Maybe Int32)
rlMaxResults
= lens _rlMaxResults (\ s a -> s{_rlMaxResults = a})
. mapping _Coerce
instance GoogleRequest RolesList where
type Rs RolesList = Roles
type Scopes RolesList =
'["https://www.googleapis.com/auth/admin.directory.rolemanagement",
"https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly"]
requestClient RolesList'{..}
= go _rlCustomer _rlPageToken _rlMaxResults
(Just AltJSON)
directoryService
where go
= buildClient (Proxy :: Proxy RolesListResource)
mempty