{-# 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.TargetingTemplates.List
(
TargetingTemplatesListResource
, targetingTemplatesList
, TargetingTemplatesList
, ttlAdvertiserId
, ttlSearchString
, ttlIds
, ttlProFileId
, ttlSortOrder
, ttlPageToken
, ttlSortField
, ttlMaxResults
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type TargetingTemplatesListResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"targetingTemplates" :>
QueryParam "advertiserId" (Textual Int64) :>
QueryParam "searchString" Text :>
QueryParams "ids" (Textual Int64) :>
QueryParam "sortOrder"
TargetingTemplatesListSortOrder
:>
QueryParam "pageToken" Text :>
QueryParam "sortField"
TargetingTemplatesListSortField
:>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] TargetingTemplatesListResponse
data TargetingTemplatesList = TargetingTemplatesList'
{ _ttlAdvertiserId :: !(Maybe (Textual Int64))
, _ttlSearchString :: !(Maybe Text)
, _ttlIds :: !(Maybe [Textual Int64])
, _ttlProFileId :: !(Textual Int64)
, _ttlSortOrder :: !TargetingTemplatesListSortOrder
, _ttlPageToken :: !(Maybe Text)
, _ttlSortField :: !TargetingTemplatesListSortField
, _ttlMaxResults :: !(Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
targetingTemplatesList
:: Int64
-> TargetingTemplatesList
targetingTemplatesList pTtlProFileId_ =
TargetingTemplatesList'
{ _ttlAdvertiserId = Nothing
, _ttlSearchString = Nothing
, _ttlIds = Nothing
, _ttlProFileId = _Coerce # pTtlProFileId_
, _ttlSortOrder = TTLSOAscending
, _ttlPageToken = Nothing
, _ttlSortField = TTLSFID
, _ttlMaxResults = 1000
}
ttlAdvertiserId :: Lens' TargetingTemplatesList (Maybe Int64)
ttlAdvertiserId
= lens _ttlAdvertiserId
(\ s a -> s{_ttlAdvertiserId = a})
. mapping _Coerce
ttlSearchString :: Lens' TargetingTemplatesList (Maybe Text)
ttlSearchString
= lens _ttlSearchString
(\ s a -> s{_ttlSearchString = a})
ttlIds :: Lens' TargetingTemplatesList [Int64]
ttlIds
= lens _ttlIds (\ s a -> s{_ttlIds = a}) . _Default .
_Coerce
ttlProFileId :: Lens' TargetingTemplatesList Int64
ttlProFileId
= lens _ttlProFileId (\ s a -> s{_ttlProFileId = a})
. _Coerce
ttlSortOrder :: Lens' TargetingTemplatesList TargetingTemplatesListSortOrder
ttlSortOrder
= lens _ttlSortOrder (\ s a -> s{_ttlSortOrder = a})
ttlPageToken :: Lens' TargetingTemplatesList (Maybe Text)
ttlPageToken
= lens _ttlPageToken (\ s a -> s{_ttlPageToken = a})
ttlSortField :: Lens' TargetingTemplatesList TargetingTemplatesListSortField
ttlSortField
= lens _ttlSortField (\ s a -> s{_ttlSortField = a})
ttlMaxResults :: Lens' TargetingTemplatesList Int32
ttlMaxResults
= lens _ttlMaxResults
(\ s a -> s{_ttlMaxResults = a})
. _Coerce
instance GoogleRequest TargetingTemplatesList where
type Rs TargetingTemplatesList =
TargetingTemplatesListResponse
type Scopes TargetingTemplatesList =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient TargetingTemplatesList'{..}
= go _ttlProFileId _ttlAdvertiserId _ttlSearchString
(_ttlIds ^. _Default)
(Just _ttlSortOrder)
_ttlPageToken
(Just _ttlSortField)
(Just _ttlMaxResults)
(Just AltJSON)
dFAReportingService
where go
= buildClient
(Proxy :: Proxy TargetingTemplatesListResource)
mempty