{-# 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.CreativeGroups.List
(
CreativeGroupsListResource
, creativeGroupsList
, CreativeGroupsList
, cglSearchString
, cglIds
, cglProFileId
, cglSortOrder
, cglGroupNumber
, cglPageToken
, cglSortField
, cglAdvertiserIds
, cglMaxResults
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type CreativeGroupsListResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"creativeGroups" :>
QueryParam "searchString" Text :>
QueryParams "ids" (Textual Int64) :>
QueryParam "sortOrder" CreativeGroupsListSortOrder :>
QueryParam "groupNumber" (Textual Int32) :>
QueryParam "pageToken" Text :>
QueryParam "sortField" CreativeGroupsListSortField :>
QueryParams "advertiserIds" (Textual Int64) :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] CreativeGroupsListResponse
data CreativeGroupsList = CreativeGroupsList'
{ _cglSearchString :: !(Maybe Text)
, _cglIds :: !(Maybe [Textual Int64])
, _cglProFileId :: !(Textual Int64)
, _cglSortOrder :: !CreativeGroupsListSortOrder
, _cglGroupNumber :: !(Maybe (Textual Int32))
, _cglPageToken :: !(Maybe Text)
, _cglSortField :: !CreativeGroupsListSortField
, _cglAdvertiserIds :: !(Maybe [Textual Int64])
, _cglMaxResults :: !(Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
creativeGroupsList
:: Int64
-> CreativeGroupsList
creativeGroupsList pCglProFileId_ =
CreativeGroupsList'
{ _cglSearchString = Nothing
, _cglIds = Nothing
, _cglProFileId = _Coerce # pCglProFileId_
, _cglSortOrder = CGLSOAscending
, _cglGroupNumber = Nothing
, _cglPageToken = Nothing
, _cglSortField = CGLSFID
, _cglAdvertiserIds = Nothing
, _cglMaxResults = 1000
}
cglSearchString :: Lens' CreativeGroupsList (Maybe Text)
cglSearchString
= lens _cglSearchString
(\ s a -> s{_cglSearchString = a})
cglIds :: Lens' CreativeGroupsList [Int64]
cglIds
= lens _cglIds (\ s a -> s{_cglIds = a}) . _Default .
_Coerce
cglProFileId :: Lens' CreativeGroupsList Int64
cglProFileId
= lens _cglProFileId (\ s a -> s{_cglProFileId = a})
. _Coerce
cglSortOrder :: Lens' CreativeGroupsList CreativeGroupsListSortOrder
cglSortOrder
= lens _cglSortOrder (\ s a -> s{_cglSortOrder = a})
cglGroupNumber :: Lens' CreativeGroupsList (Maybe Int32)
cglGroupNumber
= lens _cglGroupNumber
(\ s a -> s{_cglGroupNumber = a})
. mapping _Coerce
cglPageToken :: Lens' CreativeGroupsList (Maybe Text)
cglPageToken
= lens _cglPageToken (\ s a -> s{_cglPageToken = a})
cglSortField :: Lens' CreativeGroupsList CreativeGroupsListSortField
cglSortField
= lens _cglSortField (\ s a -> s{_cglSortField = a})
cglAdvertiserIds :: Lens' CreativeGroupsList [Int64]
cglAdvertiserIds
= lens _cglAdvertiserIds
(\ s a -> s{_cglAdvertiserIds = a})
. _Default
. _Coerce
cglMaxResults :: Lens' CreativeGroupsList Int32
cglMaxResults
= lens _cglMaxResults
(\ s a -> s{_cglMaxResults = a})
. _Coerce
instance GoogleRequest CreativeGroupsList where
type Rs CreativeGroupsList =
CreativeGroupsListResponse
type Scopes CreativeGroupsList =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient CreativeGroupsList'{..}
= go _cglProFileId _cglSearchString
(_cglIds ^. _Default)
(Just _cglSortOrder)
_cglGroupNumber
_cglPageToken
(Just _cglSortField)
(_cglAdvertiserIds ^. _Default)
(Just _cglMaxResults)
(Just AltJSON)
dFAReportingService
where go
= buildClient
(Proxy :: Proxy CreativeGroupsListResource)
mempty