{-# 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.AccountUserProFiles.List
(
AccountUserProFilesListResource
, accountUserProFilesList
, AccountUserProFilesList
, aupflUserRoleId
, aupflSearchString
, aupflIds
, aupflProFileId
, aupflSortOrder
, aupflActive
, aupflPageToken
, aupflSortField
, aupflSubAccountId
, aupflMaxResults
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type AccountUserProFilesListResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"accountUserProfiles" :>
QueryParam "userRoleId" (Textual Int64) :>
QueryParam "searchString" Text :>
QueryParams "ids" (Textual Int64) :>
QueryParam "sortOrder"
AccountUserProFilesListSortOrder
:>
QueryParam "active" Bool :>
QueryParam "pageToken" Text :>
QueryParam "sortField"
AccountUserProFilesListSortField
:>
QueryParam "subaccountId" (Textual Int64) :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] AccountUserProFilesListResponse
data AccountUserProFilesList = AccountUserProFilesList'
{ _aupflUserRoleId :: !(Maybe (Textual Int64))
, _aupflSearchString :: !(Maybe Text)
, _aupflIds :: !(Maybe [Textual Int64])
, _aupflProFileId :: !(Textual Int64)
, _aupflSortOrder :: !AccountUserProFilesListSortOrder
, _aupflActive :: !(Maybe Bool)
, _aupflPageToken :: !(Maybe Text)
, _aupflSortField :: !AccountUserProFilesListSortField
, _aupflSubAccountId :: !(Maybe (Textual Int64))
, _aupflMaxResults :: !(Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
accountUserProFilesList
:: Int64
-> AccountUserProFilesList
accountUserProFilesList pAupflProFileId_ =
AccountUserProFilesList'
{ _aupflUserRoleId = Nothing
, _aupflSearchString = Nothing
, _aupflIds = Nothing
, _aupflProFileId = _Coerce # pAupflProFileId_
, _aupflSortOrder = AUPFLSOAscending
, _aupflActive = Nothing
, _aupflPageToken = Nothing
, _aupflSortField = AUPFLSFID
, _aupflSubAccountId = Nothing
, _aupflMaxResults = 1000
}
aupflUserRoleId :: Lens' AccountUserProFilesList (Maybe Int64)
aupflUserRoleId
= lens _aupflUserRoleId
(\ s a -> s{_aupflUserRoleId = a})
. mapping _Coerce
aupflSearchString :: Lens' AccountUserProFilesList (Maybe Text)
aupflSearchString
= lens _aupflSearchString
(\ s a -> s{_aupflSearchString = a})
aupflIds :: Lens' AccountUserProFilesList [Int64]
aupflIds
= lens _aupflIds (\ s a -> s{_aupflIds = a}) .
_Default
. _Coerce
aupflProFileId :: Lens' AccountUserProFilesList Int64
aupflProFileId
= lens _aupflProFileId
(\ s a -> s{_aupflProFileId = a})
. _Coerce
aupflSortOrder :: Lens' AccountUserProFilesList AccountUserProFilesListSortOrder
aupflSortOrder
= lens _aupflSortOrder
(\ s a -> s{_aupflSortOrder = a})
aupflActive :: Lens' AccountUserProFilesList (Maybe Bool)
aupflActive
= lens _aupflActive (\ s a -> s{_aupflActive = a})
aupflPageToken :: Lens' AccountUserProFilesList (Maybe Text)
aupflPageToken
= lens _aupflPageToken
(\ s a -> s{_aupflPageToken = a})
aupflSortField :: Lens' AccountUserProFilesList AccountUserProFilesListSortField
aupflSortField
= lens _aupflSortField
(\ s a -> s{_aupflSortField = a})
aupflSubAccountId :: Lens' AccountUserProFilesList (Maybe Int64)
aupflSubAccountId
= lens _aupflSubAccountId
(\ s a -> s{_aupflSubAccountId = a})
. mapping _Coerce
aupflMaxResults :: Lens' AccountUserProFilesList Int32
aupflMaxResults
= lens _aupflMaxResults
(\ s a -> s{_aupflMaxResults = a})
. _Coerce
instance GoogleRequest AccountUserProFilesList where
type Rs AccountUserProFilesList =
AccountUserProFilesListResponse
type Scopes AccountUserProFilesList =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient AccountUserProFilesList'{..}
= go _aupflProFileId _aupflUserRoleId
_aupflSearchString
(_aupflIds ^. _Default)
(Just _aupflSortOrder)
_aupflActive
_aupflPageToken
(Just _aupflSortField)
_aupflSubAccountId
(Just _aupflMaxResults)
(Just AltJSON)
dFAReportingService
where go
= buildClient
(Proxy :: Proxy AccountUserProFilesListResource)
mempty