{-# 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.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" :>
"v3.2" :>
"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 :: !AdvertiserGroupsListSortOrder
, _aglPageToken :: !(Maybe Text)
, _aglSortField :: !AdvertiserGroupsListSortField
, _aglMaxResults :: !(Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
advertiserGroupsList
:: Int64
-> AdvertiserGroupsList
advertiserGroupsList pAglProFileId_ =
AdvertiserGroupsList'
{ _aglSearchString = Nothing
, _aglIds = Nothing
, _aglProFileId = _Coerce # pAglProFileId_
, _aglSortOrder = AGLSOAscending
, _aglPageToken = Nothing
, _aglSortField = AGLSFID
, _aglMaxResults = 1000
}
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 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 AdvertiserGroupsListSortField
aglSortField
= lens _aglSortField (\ s a -> s{_aglSortField = a})
aglMaxResults :: Lens' AdvertiserGroupsList Int32
aglMaxResults
= lens _aglMaxResults
(\ s a -> s{_aglMaxResults = a})
. _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)
(Just _aglSortOrder)
_aglPageToken
(Just _aglSortField)
(Just _aglMaxResults)
(Just AltJSON)
dFAReportingService
where go
= buildClient
(Proxy :: Proxy AdvertiserGroupsListResource)
mempty