{-# 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.Advertisers.List
(
AdvertisersListResource
, advertisersList
, AdvertisersList
, allStatus
, allOnlyParent
, allSearchString
, allIds
, allIncludeAdvertisersWithoutGroupsOnly
, allProFileId
, allSortOrder
, allAdvertiserGroupIds
, allPageToken
, allSortField
, allSubAccountId
, allFloodlightConfigurationIds
, allMaxResults
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type AdvertisersListResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"advertisers" :>
QueryParam "status" AdvertisersListStatus :>
QueryParam "onlyParent" Bool :>
QueryParam "searchString" Text :>
QueryParams "ids" (Textual Int64) :>
QueryParam "includeAdvertisersWithoutGroupsOnly" Bool
:>
QueryParam "sortOrder" AdvertisersListSortOrder :>
QueryParams "advertiserGroupIds" (Textual Int64) :>
QueryParam "pageToken" Text :>
QueryParam "sortField" AdvertisersListSortField
:>
QueryParam "subaccountId" (Textual Int64) :>
QueryParams "floodlightConfigurationIds"
(Textual Int64)
:>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] AdvertisersListResponse
data AdvertisersList = AdvertisersList'
{ _allStatus :: !(Maybe AdvertisersListStatus)
, _allOnlyParent :: !(Maybe Bool)
, _allSearchString :: !(Maybe Text)
, _allIds :: !(Maybe [Textual Int64])
, _allIncludeAdvertisersWithoutGroupsOnly :: !(Maybe Bool)
, _allProFileId :: !(Textual Int64)
, _allSortOrder :: !AdvertisersListSortOrder
, _allAdvertiserGroupIds :: !(Maybe [Textual Int64])
, _allPageToken :: !(Maybe Text)
, _allSortField :: !AdvertisersListSortField
, _allSubAccountId :: !(Maybe (Textual Int64))
, _allFloodlightConfigurationIds :: !(Maybe [Textual Int64])
, _allMaxResults :: !(Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
advertisersList
:: Int64
-> AdvertisersList
advertisersList pAllProFileId_ =
AdvertisersList'
{ _allStatus = Nothing
, _allOnlyParent = Nothing
, _allSearchString = Nothing
, _allIds = Nothing
, _allIncludeAdvertisersWithoutGroupsOnly = Nothing
, _allProFileId = _Coerce # pAllProFileId_
, _allSortOrder = ALSOAscending
, _allAdvertiserGroupIds = Nothing
, _allPageToken = Nothing
, _allSortField = ID
, _allSubAccountId = Nothing
, _allFloodlightConfigurationIds = Nothing
, _allMaxResults = 1000
}
allStatus :: Lens' AdvertisersList (Maybe AdvertisersListStatus)
allStatus
= lens _allStatus (\ s a -> s{_allStatus = a})
allOnlyParent :: Lens' AdvertisersList (Maybe Bool)
allOnlyParent
= lens _allOnlyParent
(\ s a -> s{_allOnlyParent = a})
allSearchString :: Lens' AdvertisersList (Maybe Text)
allSearchString
= lens _allSearchString
(\ s a -> s{_allSearchString = a})
allIds :: Lens' AdvertisersList [Int64]
allIds
= lens _allIds (\ s a -> s{_allIds = a}) . _Default .
_Coerce
allIncludeAdvertisersWithoutGroupsOnly :: Lens' AdvertisersList (Maybe Bool)
allIncludeAdvertisersWithoutGroupsOnly
= lens _allIncludeAdvertisersWithoutGroupsOnly
(\ s a ->
s{_allIncludeAdvertisersWithoutGroupsOnly = a})
allProFileId :: Lens' AdvertisersList Int64
allProFileId
= lens _allProFileId (\ s a -> s{_allProFileId = a})
. _Coerce
allSortOrder :: Lens' AdvertisersList AdvertisersListSortOrder
allSortOrder
= lens _allSortOrder (\ s a -> s{_allSortOrder = a})
allAdvertiserGroupIds :: Lens' AdvertisersList [Int64]
allAdvertiserGroupIds
= lens _allAdvertiserGroupIds
(\ s a -> s{_allAdvertiserGroupIds = a})
. _Default
. _Coerce
allPageToken :: Lens' AdvertisersList (Maybe Text)
allPageToken
= lens _allPageToken (\ s a -> s{_allPageToken = a})
allSortField :: Lens' AdvertisersList AdvertisersListSortField
allSortField
= lens _allSortField (\ s a -> s{_allSortField = a})
allSubAccountId :: Lens' AdvertisersList (Maybe Int64)
allSubAccountId
= lens _allSubAccountId
(\ s a -> s{_allSubAccountId = a})
. mapping _Coerce
allFloodlightConfigurationIds :: Lens' AdvertisersList [Int64]
allFloodlightConfigurationIds
= lens _allFloodlightConfigurationIds
(\ s a -> s{_allFloodlightConfigurationIds = a})
. _Default
. _Coerce
allMaxResults :: Lens' AdvertisersList Int32
allMaxResults
= lens _allMaxResults
(\ s a -> s{_allMaxResults = a})
. _Coerce
instance GoogleRequest AdvertisersList where
type Rs AdvertisersList = AdvertisersListResponse
type Scopes AdvertisersList =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient AdvertisersList'{..}
= go _allProFileId _allStatus _allOnlyParent
_allSearchString
(_allIds ^. _Default)
_allIncludeAdvertisersWithoutGroupsOnly
(Just _allSortOrder)
(_allAdvertiserGroupIds ^. _Default)
_allPageToken
(Just _allSortField)
_allSubAccountId
(_allFloodlightConfigurationIds ^. _Default)
(Just _allMaxResults)
(Just AltJSON)
dFAReportingService
where go
= buildClient
(Proxy :: Proxy AdvertisersListResource)
mempty