module Network.Google.Resource.DFAReporting.AdvertiserGroups.List
(
AdvertiserGroupsListResource
, advertiserGroupsList
, AdvertiserGroupsList
, aglSearchString
, aglIds
, aglProFileId
, aglSortOrder
, aglPageToken
, aglSortField
, aglMaxResults
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type AdvertiserGroupsListResource =
"dfareporting" :>
"v2.5" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"advertiserGroups" :>
QueryParam "searchString" Text :>
QueryParams "ids" (Textual Int64) :>
QueryParam "sortOrder" AdvertiserGroupsListSortOrder
:>
QueryParam "pageToken" Text :>
QueryParam "sortField" AdvertiserGroupsListSortField
:>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] AdvertiserGroupsListResponse
data AdvertiserGroupsList = AdvertiserGroupsList'
{ _aglSearchString :: !(Maybe Text)
, _aglIds :: !(Maybe [Textual Int64])
, _aglProFileId :: !(Textual Int64)
, _aglSortOrder :: !(Maybe AdvertiserGroupsListSortOrder)
, _aglPageToken :: !(Maybe Text)
, _aglSortField :: !(Maybe AdvertiserGroupsListSortField)
, _aglMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
advertiserGroupsList
:: Int64
-> AdvertiserGroupsList
advertiserGroupsList pAglProFileId_ =
AdvertiserGroupsList'
{ _aglSearchString = Nothing
, _aglIds = Nothing
, _aglProFileId = _Coerce # pAglProFileId_
, _aglSortOrder = Nothing
, _aglPageToken = Nothing
, _aglSortField = Nothing
, _aglMaxResults = Nothing
}
aglSearchString :: Lens' AdvertiserGroupsList (Maybe Text)
aglSearchString
= lens _aglSearchString
(\ s a -> s{_aglSearchString = a})
aglIds :: Lens' AdvertiserGroupsList [Int64]
aglIds
= lens _aglIds (\ s a -> s{_aglIds = a}) . _Default .
_Coerce
aglProFileId :: Lens' AdvertiserGroupsList Int64
aglProFileId
= lens _aglProFileId (\ s a -> s{_aglProFileId = a})
. _Coerce
aglSortOrder :: Lens' AdvertiserGroupsList (Maybe AdvertiserGroupsListSortOrder)
aglSortOrder
= lens _aglSortOrder (\ s a -> s{_aglSortOrder = a})
aglPageToken :: Lens' AdvertiserGroupsList (Maybe Text)
aglPageToken
= lens _aglPageToken (\ s a -> s{_aglPageToken = a})
aglSortField :: Lens' AdvertiserGroupsList (Maybe AdvertiserGroupsListSortField)
aglSortField
= lens _aglSortField (\ s a -> s{_aglSortField = a})
aglMaxResults :: Lens' AdvertiserGroupsList (Maybe Int32)
aglMaxResults
= lens _aglMaxResults
(\ s a -> s{_aglMaxResults = a})
. mapping _Coerce
instance GoogleRequest AdvertiserGroupsList where
type Rs AdvertiserGroupsList =
AdvertiserGroupsListResponse
type Scopes AdvertiserGroupsList =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient AdvertiserGroupsList'{..}
= go _aglProFileId _aglSearchString
(_aglIds ^. _Default)
_aglSortOrder
_aglPageToken
_aglSortField
_aglMaxResults
(Just AltJSON)
dFAReportingService
where go
= buildClient
(Proxy :: Proxy AdvertiserGroupsListResource)
mempty