{-# 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.CreativeFieldValues.List
(
CreativeFieldValuesListResource
, creativeFieldValuesList
, CreativeFieldValuesList
, cfvlCreativeFieldId
, cfvlSearchString
, cfvlIds
, cfvlProFileId
, cfvlSortOrder
, cfvlPageToken
, cfvlSortField
, cfvlMaxResults
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type CreativeFieldValuesListResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"creativeFields" :>
Capture "creativeFieldId" (Textual Int64) :>
"creativeFieldValues" :>
QueryParam "searchString" Text :>
QueryParams "ids" (Textual Int64) :>
QueryParam "sortOrder"
CreativeFieldValuesListSortOrder
:>
QueryParam "pageToken" Text :>
QueryParam "sortField"
CreativeFieldValuesListSortField
:>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] CreativeFieldValuesListResponse
data CreativeFieldValuesList = CreativeFieldValuesList'
{ _cfvlCreativeFieldId :: !(Textual Int64)
, _cfvlSearchString :: !(Maybe Text)
, _cfvlIds :: !(Maybe [Textual Int64])
, _cfvlProFileId :: !(Textual Int64)
, _cfvlSortOrder :: !CreativeFieldValuesListSortOrder
, _cfvlPageToken :: !(Maybe Text)
, _cfvlSortField :: !CreativeFieldValuesListSortField
, _cfvlMaxResults :: !(Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
creativeFieldValuesList
:: Int64
-> Int64
-> CreativeFieldValuesList
creativeFieldValuesList pCfvlCreativeFieldId_ pCfvlProFileId_ =
CreativeFieldValuesList'
{ _cfvlCreativeFieldId = _Coerce # pCfvlCreativeFieldId_
, _cfvlSearchString = Nothing
, _cfvlIds = Nothing
, _cfvlProFileId = _Coerce # pCfvlProFileId_
, _cfvlSortOrder = CFVLSOAscending
, _cfvlPageToken = Nothing
, _cfvlSortField = CFVLSFID
, _cfvlMaxResults = 1000
}
cfvlCreativeFieldId :: Lens' CreativeFieldValuesList Int64
cfvlCreativeFieldId
= lens _cfvlCreativeFieldId
(\ s a -> s{_cfvlCreativeFieldId = a})
. _Coerce
cfvlSearchString :: Lens' CreativeFieldValuesList (Maybe Text)
cfvlSearchString
= lens _cfvlSearchString
(\ s a -> s{_cfvlSearchString = a})
cfvlIds :: Lens' CreativeFieldValuesList [Int64]
cfvlIds
= lens _cfvlIds (\ s a -> s{_cfvlIds = a}) . _Default
. _Coerce
cfvlProFileId :: Lens' CreativeFieldValuesList Int64
cfvlProFileId
= lens _cfvlProFileId
(\ s a -> s{_cfvlProFileId = a})
. _Coerce
cfvlSortOrder :: Lens' CreativeFieldValuesList CreativeFieldValuesListSortOrder
cfvlSortOrder
= lens _cfvlSortOrder
(\ s a -> s{_cfvlSortOrder = a})
cfvlPageToken :: Lens' CreativeFieldValuesList (Maybe Text)
cfvlPageToken
= lens _cfvlPageToken
(\ s a -> s{_cfvlPageToken = a})
cfvlSortField :: Lens' CreativeFieldValuesList CreativeFieldValuesListSortField
cfvlSortField
= lens _cfvlSortField
(\ s a -> s{_cfvlSortField = a})
cfvlMaxResults :: Lens' CreativeFieldValuesList Int32
cfvlMaxResults
= lens _cfvlMaxResults
(\ s a -> s{_cfvlMaxResults = a})
. _Coerce
instance GoogleRequest CreativeFieldValuesList where
type Rs CreativeFieldValuesList =
CreativeFieldValuesListResponse
type Scopes CreativeFieldValuesList =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient CreativeFieldValuesList'{..}
= go _cfvlProFileId _cfvlCreativeFieldId
_cfvlSearchString
(_cfvlIds ^. _Default)
(Just _cfvlSortOrder)
_cfvlPageToken
(Just _cfvlSortField)
(Just _cfvlMaxResults)
(Just AltJSON)
dFAReportingService
where go
= buildClient
(Proxy :: Proxy CreativeFieldValuesListResource)
mempty