{-# 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.ContentCategories.List
(
ContentCategoriesListResource
, contentCategoriesList
, ContentCategoriesList
, cclSearchString
, cclIds
, cclProFileId
, cclSortOrder
, cclPageToken
, cclSortField
, cclMaxResults
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type ContentCategoriesListResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"contentCategories" :>
QueryParam "searchString" Text :>
QueryParams "ids" (Textual Int64) :>
QueryParam "sortOrder" ContentCategoriesListSortOrder
:>
QueryParam "pageToken" Text :>
QueryParam "sortField" ContentCategoriesListSortField
:>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] ContentCategoriesListResponse
data ContentCategoriesList = ContentCategoriesList'
{ _cclSearchString :: !(Maybe Text)
, _cclIds :: !(Maybe [Textual Int64])
, _cclProFileId :: !(Textual Int64)
, _cclSortOrder :: !ContentCategoriesListSortOrder
, _cclPageToken :: !(Maybe Text)
, _cclSortField :: !ContentCategoriesListSortField
, _cclMaxResults :: !(Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
contentCategoriesList
:: Int64
-> ContentCategoriesList
contentCategoriesList pCclProFileId_ =
ContentCategoriesList'
{ _cclSearchString = Nothing
, _cclIds = Nothing
, _cclProFileId = _Coerce # pCclProFileId_
, _cclSortOrder = CCLSOAscending
, _cclPageToken = Nothing
, _cclSortField = CCLSFID
, _cclMaxResults = 1000
}
cclSearchString :: Lens' ContentCategoriesList (Maybe Text)
cclSearchString
= lens _cclSearchString
(\ s a -> s{_cclSearchString = a})
cclIds :: Lens' ContentCategoriesList [Int64]
cclIds
= lens _cclIds (\ s a -> s{_cclIds = a}) . _Default .
_Coerce
cclProFileId :: Lens' ContentCategoriesList Int64
cclProFileId
= lens _cclProFileId (\ s a -> s{_cclProFileId = a})
. _Coerce
cclSortOrder :: Lens' ContentCategoriesList ContentCategoriesListSortOrder
cclSortOrder
= lens _cclSortOrder (\ s a -> s{_cclSortOrder = a})
cclPageToken :: Lens' ContentCategoriesList (Maybe Text)
cclPageToken
= lens _cclPageToken (\ s a -> s{_cclPageToken = a})
cclSortField :: Lens' ContentCategoriesList ContentCategoriesListSortField
cclSortField
= lens _cclSortField (\ s a -> s{_cclSortField = a})
cclMaxResults :: Lens' ContentCategoriesList Int32
cclMaxResults
= lens _cclMaxResults
(\ s a -> s{_cclMaxResults = a})
. _Coerce
instance GoogleRequest ContentCategoriesList where
type Rs ContentCategoriesList =
ContentCategoriesListResponse
type Scopes ContentCategoriesList =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient ContentCategoriesList'{..}
= go _cclProFileId _cclSearchString
(_cclIds ^. _Default)
(Just _cclSortOrder)
_cclPageToken
(Just _cclSortField)
(Just _cclMaxResults)
(Just AltJSON)
dFAReportingService
where go
= buildClient
(Proxy :: Proxy ContentCategoriesListResource)
mempty