{-# 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.CreativeFields.List
(
CreativeFieldsListResource
, creativeFieldsList
, CreativeFieldsList
, cflSearchString
, cflIds
, cflProFileId
, cflSortOrder
, cflPageToken
, cflSortField
, cflAdvertiserIds
, cflMaxResults
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type CreativeFieldsListResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"creativeFields" :>
QueryParam "searchString" Text :>
QueryParams "ids" (Textual Int64) :>
QueryParam "sortOrder" CreativeFieldsListSortOrder :>
QueryParam "pageToken" Text :>
QueryParam "sortField" CreativeFieldsListSortField :>
QueryParams "advertiserIds" (Textual Int64) :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] CreativeFieldsListResponse
data CreativeFieldsList = CreativeFieldsList'
{ _cflSearchString :: !(Maybe Text)
, _cflIds :: !(Maybe [Textual Int64])
, _cflProFileId :: !(Textual Int64)
, _cflSortOrder :: !CreativeFieldsListSortOrder
, _cflPageToken :: !(Maybe Text)
, _cflSortField :: !CreativeFieldsListSortField
, _cflAdvertiserIds :: !(Maybe [Textual Int64])
, _cflMaxResults :: !(Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
creativeFieldsList
:: Int64
-> CreativeFieldsList
creativeFieldsList pCflProFileId_ =
CreativeFieldsList'
{ _cflSearchString = Nothing
, _cflIds = Nothing
, _cflProFileId = _Coerce # pCflProFileId_
, _cflSortOrder = CFLSOAscending
, _cflPageToken = Nothing
, _cflSortField = CFLSFID
, _cflAdvertiserIds = Nothing
, _cflMaxResults = 1000
}
cflSearchString :: Lens' CreativeFieldsList (Maybe Text)
cflSearchString
= lens _cflSearchString
(\ s a -> s{_cflSearchString = a})
cflIds :: Lens' CreativeFieldsList [Int64]
cflIds
= lens _cflIds (\ s a -> s{_cflIds = a}) . _Default .
_Coerce
cflProFileId :: Lens' CreativeFieldsList Int64
cflProFileId
= lens _cflProFileId (\ s a -> s{_cflProFileId = a})
. _Coerce
cflSortOrder :: Lens' CreativeFieldsList CreativeFieldsListSortOrder
cflSortOrder
= lens _cflSortOrder (\ s a -> s{_cflSortOrder = a})
cflPageToken :: Lens' CreativeFieldsList (Maybe Text)
cflPageToken
= lens _cflPageToken (\ s a -> s{_cflPageToken = a})
cflSortField :: Lens' CreativeFieldsList CreativeFieldsListSortField
cflSortField
= lens _cflSortField (\ s a -> s{_cflSortField = a})
cflAdvertiserIds :: Lens' CreativeFieldsList [Int64]
cflAdvertiserIds
= lens _cflAdvertiserIds
(\ s a -> s{_cflAdvertiserIds = a})
. _Default
. _Coerce
cflMaxResults :: Lens' CreativeFieldsList Int32
cflMaxResults
= lens _cflMaxResults
(\ s a -> s{_cflMaxResults = a})
. _Coerce
instance GoogleRequest CreativeFieldsList where
type Rs CreativeFieldsList =
CreativeFieldsListResponse
type Scopes CreativeFieldsList =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient CreativeFieldsList'{..}
= go _cflProFileId _cflSearchString
(_cflIds ^. _Default)
(Just _cflSortOrder)
_cflPageToken
(Just _cflSortField)
(_cflAdvertiserIds ^. _Default)
(Just _cflMaxResults)
(Just AltJSON)
dFAReportingService
where go
= buildClient
(Proxy :: Proxy CreativeFieldsListResource)
mempty