{-# 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.Campaigns.List
(
CampaignsListResource
, campaignsList
, CampaignsList
, clExcludedIds
, clSearchString
, clIds
, clProFileId
, clSortOrder
, clAdvertiserGroupIds
, clAtLeastOneOptimizationActivity
, clOverriddenEventTagId
, clPageToken
, clSortField
, clSubAccountId
, clAdvertiserIds
, clArchived
, clMaxResults
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type CampaignsListResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"campaigns" :>
QueryParams "excludedIds" (Textual Int64) :>
QueryParam "searchString" Text :>
QueryParams "ids" (Textual Int64) :>
QueryParam "sortOrder" CampaignsListSortOrder :>
QueryParams "advertiserGroupIds" (Textual Int64) :>
QueryParam "atLeastOneOptimizationActivity" Bool :>
QueryParam "overriddenEventTagId" (Textual Int64) :>
QueryParam "pageToken" Text :>
QueryParam "sortField" CampaignsListSortField :>
QueryParam "subaccountId" (Textual Int64) :>
QueryParams "advertiserIds" (Textual Int64)
:>
QueryParam "archived" Bool :>
QueryParam "maxResults" (Textual Int32)
:>
QueryParam "alt" AltJSON :>
Get '[JSON] CampaignsListResponse
data CampaignsList = CampaignsList'
{ _clExcludedIds :: !(Maybe [Textual Int64])
, _clSearchString :: !(Maybe Text)
, _clIds :: !(Maybe [Textual Int64])
, _clProFileId :: !(Textual Int64)
, _clSortOrder :: !CampaignsListSortOrder
, _clAdvertiserGroupIds :: !(Maybe [Textual Int64])
, _clAtLeastOneOptimizationActivity :: !(Maybe Bool)
, _clOverriddenEventTagId :: !(Maybe (Textual Int64))
, _clPageToken :: !(Maybe Text)
, _clSortField :: !CampaignsListSortField
, _clSubAccountId :: !(Maybe (Textual Int64))
, _clAdvertiserIds :: !(Maybe [Textual Int64])
, _clArchived :: !(Maybe Bool)
, _clMaxResults :: !(Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
campaignsList
:: Int64
-> CampaignsList
campaignsList pClProFileId_ =
CampaignsList'
{ _clExcludedIds = Nothing
, _clSearchString = Nothing
, _clIds = Nothing
, _clProFileId = _Coerce # pClProFileId_
, _clSortOrder = CLSOAscending
, _clAdvertiserGroupIds = Nothing
, _clAtLeastOneOptimizationActivity = Nothing
, _clOverriddenEventTagId = Nothing
, _clPageToken = Nothing
, _clSortField = CLSFID
, _clSubAccountId = Nothing
, _clAdvertiserIds = Nothing
, _clArchived = Nothing
, _clMaxResults = 1000
}
clExcludedIds :: Lens' CampaignsList [Int64]
clExcludedIds
= lens _clExcludedIds
(\ s a -> s{_clExcludedIds = a})
. _Default
. _Coerce
clSearchString :: Lens' CampaignsList (Maybe Text)
clSearchString
= lens _clSearchString
(\ s a -> s{_clSearchString = a})
clIds :: Lens' CampaignsList [Int64]
clIds
= lens _clIds (\ s a -> s{_clIds = a}) . _Default .
_Coerce
clProFileId :: Lens' CampaignsList Int64
clProFileId
= lens _clProFileId (\ s a -> s{_clProFileId = a}) .
_Coerce
clSortOrder :: Lens' CampaignsList CampaignsListSortOrder
clSortOrder
= lens _clSortOrder (\ s a -> s{_clSortOrder = a})
clAdvertiserGroupIds :: Lens' CampaignsList [Int64]
clAdvertiserGroupIds
= lens _clAdvertiserGroupIds
(\ s a -> s{_clAdvertiserGroupIds = a})
. _Default
. _Coerce
clAtLeastOneOptimizationActivity :: Lens' CampaignsList (Maybe Bool)
clAtLeastOneOptimizationActivity
= lens _clAtLeastOneOptimizationActivity
(\ s a -> s{_clAtLeastOneOptimizationActivity = a})
clOverriddenEventTagId :: Lens' CampaignsList (Maybe Int64)
clOverriddenEventTagId
= lens _clOverriddenEventTagId
(\ s a -> s{_clOverriddenEventTagId = a})
. mapping _Coerce
clPageToken :: Lens' CampaignsList (Maybe Text)
clPageToken
= lens _clPageToken (\ s a -> s{_clPageToken = a})
clSortField :: Lens' CampaignsList CampaignsListSortField
clSortField
= lens _clSortField (\ s a -> s{_clSortField = a})
clSubAccountId :: Lens' CampaignsList (Maybe Int64)
clSubAccountId
= lens _clSubAccountId
(\ s a -> s{_clSubAccountId = a})
. mapping _Coerce
clAdvertiserIds :: Lens' CampaignsList [Int64]
clAdvertiserIds
= lens _clAdvertiserIds
(\ s a -> s{_clAdvertiserIds = a})
. _Default
. _Coerce
clArchived :: Lens' CampaignsList (Maybe Bool)
clArchived
= lens _clArchived (\ s a -> s{_clArchived = a})
clMaxResults :: Lens' CampaignsList Int32
clMaxResults
= lens _clMaxResults (\ s a -> s{_clMaxResults = a})
. _Coerce
instance GoogleRequest CampaignsList where
type Rs CampaignsList = CampaignsListResponse
type Scopes CampaignsList =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient CampaignsList'{..}
= go _clProFileId (_clExcludedIds ^. _Default)
_clSearchString
(_clIds ^. _Default)
(Just _clSortOrder)
(_clAdvertiserGroupIds ^. _Default)
_clAtLeastOneOptimizationActivity
_clOverriddenEventTagId
_clPageToken
(Just _clSortField)
_clSubAccountId
(_clAdvertiserIds ^. _Default)
_clArchived
(Just _clMaxResults)
(Just AltJSON)
dFAReportingService
where go
= buildClient (Proxy :: Proxy CampaignsListResource)
mempty