{-# 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.Creatives.List
(
CreativesListResource
, creativesList
, CreativesList
, cRenderingIds
, cAdvertiserId
, cSearchString
, cSizeIds
, cCompanionCreativeIds
, cCampaignId
, cTypes
, cIds
, cProFileId
, cSortOrder
, cActive
, cCreativeFieldIds
, cPageToken
, cSortField
, cStudioCreativeId
, cArchived
, cMaxResults
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type CreativesListResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"creatives" :>
QueryParams "renderingIds" (Textual Int64) :>
QueryParam "advertiserId" (Textual Int64) :>
QueryParam "searchString" Text :>
QueryParams "sizeIds" (Textual Int64) :>
QueryParams "companionCreativeIds" (Textual Int64) :>
QueryParam "campaignId" (Textual Int64) :>
QueryParams "types" CreativesListTypes :>
QueryParams "ids" (Textual Int64) :>
QueryParam "sortOrder" CreativesListSortOrder :>
QueryParam "active" Bool :>
QueryParams "creativeFieldIds"
(Textual Int64)
:>
QueryParam "pageToken" Text :>
QueryParam "sortField"
CreativesListSortField
:>
QueryParam "studioCreativeId"
(Textual Int64)
:>
QueryParam "archived" Bool :>
QueryParam "maxResults"
(Textual Int32)
:>
QueryParam "alt" AltJSON :>
Get '[JSON]
CreativesListResponse
data CreativesList = CreativesList'
{ _cRenderingIds :: !(Maybe [Textual Int64])
, _cAdvertiserId :: !(Maybe (Textual Int64))
, _cSearchString :: !(Maybe Text)
, _cSizeIds :: !(Maybe [Textual Int64])
, _cCompanionCreativeIds :: !(Maybe [Textual Int64])
, _cCampaignId :: !(Maybe (Textual Int64))
, _cTypes :: !(Maybe [CreativesListTypes])
, _cIds :: !(Maybe [Textual Int64])
, _cProFileId :: !(Textual Int64)
, _cSortOrder :: !CreativesListSortOrder
, _cActive :: !(Maybe Bool)
, _cCreativeFieldIds :: !(Maybe [Textual Int64])
, _cPageToken :: !(Maybe Text)
, _cSortField :: !CreativesListSortField
, _cStudioCreativeId :: !(Maybe (Textual Int64))
, _cArchived :: !(Maybe Bool)
, _cMaxResults :: !(Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
creativesList
:: Int64
-> CreativesList
creativesList pCProFileId_ =
CreativesList'
{ _cRenderingIds = Nothing
, _cAdvertiserId = Nothing
, _cSearchString = Nothing
, _cSizeIds = Nothing
, _cCompanionCreativeIds = Nothing
, _cCampaignId = Nothing
, _cTypes = Nothing
, _cIds = Nothing
, _cProFileId = _Coerce # pCProFileId_
, _cSortOrder = CAscending
, _cActive = Nothing
, _cCreativeFieldIds = Nothing
, _cPageToken = Nothing
, _cSortField = CID
, _cStudioCreativeId = Nothing
, _cArchived = Nothing
, _cMaxResults = 1000
}
cRenderingIds :: Lens' CreativesList [Int64]
cRenderingIds
= lens _cRenderingIds
(\ s a -> s{_cRenderingIds = a})
. _Default
. _Coerce
cAdvertiserId :: Lens' CreativesList (Maybe Int64)
cAdvertiserId
= lens _cAdvertiserId
(\ s a -> s{_cAdvertiserId = a})
. mapping _Coerce
cSearchString :: Lens' CreativesList (Maybe Text)
cSearchString
= lens _cSearchString
(\ s a -> s{_cSearchString = a})
cSizeIds :: Lens' CreativesList [Int64]
cSizeIds
= lens _cSizeIds (\ s a -> s{_cSizeIds = a}) .
_Default
. _Coerce
cCompanionCreativeIds :: Lens' CreativesList [Int64]
cCompanionCreativeIds
= lens _cCompanionCreativeIds
(\ s a -> s{_cCompanionCreativeIds = a})
. _Default
. _Coerce
cCampaignId :: Lens' CreativesList (Maybe Int64)
cCampaignId
= lens _cCampaignId (\ s a -> s{_cCampaignId = a}) .
mapping _Coerce
cTypes :: Lens' CreativesList [CreativesListTypes]
cTypes
= lens _cTypes (\ s a -> s{_cTypes = a}) . _Default .
_Coerce
cIds :: Lens' CreativesList [Int64]
cIds
= lens _cIds (\ s a -> s{_cIds = a}) . _Default .
_Coerce
cProFileId :: Lens' CreativesList Int64
cProFileId
= lens _cProFileId (\ s a -> s{_cProFileId = a}) .
_Coerce
cSortOrder :: Lens' CreativesList CreativesListSortOrder
cSortOrder
= lens _cSortOrder (\ s a -> s{_cSortOrder = a})
cActive :: Lens' CreativesList (Maybe Bool)
cActive = lens _cActive (\ s a -> s{_cActive = a})
cCreativeFieldIds :: Lens' CreativesList [Int64]
cCreativeFieldIds
= lens _cCreativeFieldIds
(\ s a -> s{_cCreativeFieldIds = a})
. _Default
. _Coerce
cPageToken :: Lens' CreativesList (Maybe Text)
cPageToken
= lens _cPageToken (\ s a -> s{_cPageToken = a})
cSortField :: Lens' CreativesList CreativesListSortField
cSortField
= lens _cSortField (\ s a -> s{_cSortField = a})
cStudioCreativeId :: Lens' CreativesList (Maybe Int64)
cStudioCreativeId
= lens _cStudioCreativeId
(\ s a -> s{_cStudioCreativeId = a})
. mapping _Coerce
cArchived :: Lens' CreativesList (Maybe Bool)
cArchived
= lens _cArchived (\ s a -> s{_cArchived = a})
cMaxResults :: Lens' CreativesList Int32
cMaxResults
= lens _cMaxResults (\ s a -> s{_cMaxResults = a}) .
_Coerce
instance GoogleRequest CreativesList where
type Rs CreativesList = CreativesListResponse
type Scopes CreativesList =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient CreativesList'{..}
= go _cProFileId (_cRenderingIds ^. _Default)
_cAdvertiserId
_cSearchString
(_cSizeIds ^. _Default)
(_cCompanionCreativeIds ^. _Default)
_cCampaignId
(_cTypes ^. _Default)
(_cIds ^. _Default)
(Just _cSortOrder)
_cActive
(_cCreativeFieldIds ^. _Default)
_cPageToken
(Just _cSortField)
_cStudioCreativeId
_cArchived
(Just _cMaxResults)
(Just AltJSON)
dFAReportingService
where go
= buildClient (Proxy :: Proxy CreativesListResource)
mempty