{-# 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.DFAReporting.UserRoles.List
(
UserRolesListResource
, userRolesList
, UserRolesList
, urlSearchString
, urlIds
, urlProFileId
, urlSortOrder
, urlAccountUserRoleOnly
, urlPageToken
, urlSortField
, urlSubAccountId
, urlMaxResults
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type UserRolesListResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"userRoles" :>
QueryParam "searchString" Text :>
QueryParams "ids" (Textual Int64) :>
QueryParam "sortOrder" UserRolesListSortOrder :>
QueryParam "accountUserRoleOnly" Bool :>
QueryParam "pageToken" Text :>
QueryParam "sortField" UserRolesListSortField :>
QueryParam "subaccountId" (Textual Int64) :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] UserRolesListResponse
data UserRolesList = UserRolesList'
{ _urlSearchString :: !(Maybe Text)
, _urlIds :: !(Maybe [Textual Int64])
, _urlProFileId :: !(Textual Int64)
, _urlSortOrder :: !UserRolesListSortOrder
, _urlAccountUserRoleOnly :: !(Maybe Bool)
, _urlPageToken :: !(Maybe Text)
, _urlSortField :: !UserRolesListSortField
, _urlSubAccountId :: !(Maybe (Textual Int64))
, _urlMaxResults :: !(Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
userRolesList
:: Int64
-> UserRolesList
userRolesList pUrlProFileId_ =
UserRolesList'
{ _urlSearchString = Nothing
, _urlIds = Nothing
, _urlProFileId = _Coerce # pUrlProFileId_
, _urlSortOrder = URLSOAscending
, _urlAccountUserRoleOnly = Nothing
, _urlPageToken = Nothing
, _urlSortField = URLSFID
, _urlSubAccountId = Nothing
, _urlMaxResults = 1000
}
urlSearchString :: Lens' UserRolesList (Maybe Text)
urlSearchString
= lens _urlSearchString
(\ s a -> s{_urlSearchString = a})
urlIds :: Lens' UserRolesList [Int64]
urlIds
= lens _urlIds (\ s a -> s{_urlIds = a}) . _Default .
_Coerce
urlProFileId :: Lens' UserRolesList Int64
urlProFileId
= lens _urlProFileId (\ s a -> s{_urlProFileId = a})
. _Coerce
urlSortOrder :: Lens' UserRolesList UserRolesListSortOrder
urlSortOrder
= lens _urlSortOrder (\ s a -> s{_urlSortOrder = a})
urlAccountUserRoleOnly :: Lens' UserRolesList (Maybe Bool)
urlAccountUserRoleOnly
= lens _urlAccountUserRoleOnly
(\ s a -> s{_urlAccountUserRoleOnly = a})
urlPageToken :: Lens' UserRolesList (Maybe Text)
urlPageToken
= lens _urlPageToken (\ s a -> s{_urlPageToken = a})
urlSortField :: Lens' UserRolesList UserRolesListSortField
urlSortField
= lens _urlSortField (\ s a -> s{_urlSortField = a})
urlSubAccountId :: Lens' UserRolesList (Maybe Int64)
urlSubAccountId
= lens _urlSubAccountId
(\ s a -> s{_urlSubAccountId = a})
. mapping _Coerce
urlMaxResults :: Lens' UserRolesList Int32
urlMaxResults
= lens _urlMaxResults
(\ s a -> s{_urlMaxResults = a})
. _Coerce
instance GoogleRequest UserRolesList where
type Rs UserRolesList = UserRolesListResponse
type Scopes UserRolesList =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient UserRolesList'{..}
= go _urlProFileId _urlSearchString
(_urlIds ^. _Default)
(Just _urlSortOrder)
_urlAccountUserRoleOnly
_urlPageToken
(Just _urlSortField)
_urlSubAccountId
(Just _urlMaxResults)
(Just AltJSON)
dFAReportingService
where go
= buildClient (Proxy :: Proxy UserRolesListResource)
mempty