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" :>
"v2.5" :>
"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 :: !(Maybe ContentCategoriesListSortOrder)
, _cclPageToken :: !(Maybe Text)
, _cclSortField :: !(Maybe ContentCategoriesListSortField)
, _cclMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
contentCategoriesList
:: Int64
-> ContentCategoriesList
contentCategoriesList pCclProFileId_ =
ContentCategoriesList'
{ _cclSearchString = Nothing
, _cclIds = Nothing
, _cclProFileId = _Coerce # pCclProFileId_
, _cclSortOrder = Nothing
, _cclPageToken = Nothing
, _cclSortField = Nothing
, _cclMaxResults = Nothing
}
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 (Maybe 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 (Maybe ContentCategoriesListSortField)
cclSortField
= lens _cclSortField (\ s a -> s{_cclSortField = a})
cclMaxResults :: Lens' ContentCategoriesList (Maybe Int32)
cclMaxResults
= lens _cclMaxResults
(\ s a -> s{_cclMaxResults = a})
. mapping _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)
_cclSortOrder
_cclPageToken
_cclSortField
_cclMaxResults
(Just AltJSON)
dFAReportingService
where go
= buildClient
(Proxy :: Proxy ContentCategoriesListResource)
mempty