{-# 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.Reports.Files.List
(
ReportsFilesListResource
, reportsFilesList
, ReportsFilesList
, rflReportId
, rflProFileId
, rflSortOrder
, rflPageToken
, rflSortField
, rflMaxResults
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type ReportsFilesListResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"reports" :>
Capture "reportId" (Textual Int64) :>
"files" :>
QueryParam "sortOrder" ReportsFilesListSortOrder :>
QueryParam "pageToken" Text :>
QueryParam "sortField" ReportsFilesListSortField :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :> Get '[JSON] FileList
data ReportsFilesList = ReportsFilesList'
{ _rflReportId :: !(Textual Int64)
, _rflProFileId :: !(Textual Int64)
, _rflSortOrder :: !ReportsFilesListSortOrder
, _rflPageToken :: !(Maybe Text)
, _rflSortField :: !ReportsFilesListSortField
, _rflMaxResults :: !(Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
reportsFilesList
:: Int64
-> Int64
-> ReportsFilesList
reportsFilesList pRflReportId_ pRflProFileId_ =
ReportsFilesList'
{ _rflReportId = _Coerce # pRflReportId_
, _rflProFileId = _Coerce # pRflProFileId_
, _rflSortOrder = RFLSODescending
, _rflPageToken = Nothing
, _rflSortField = RFLSFLastModifiedTime
, _rflMaxResults = 10
}
rflReportId :: Lens' ReportsFilesList Int64
rflReportId
= lens _rflReportId (\ s a -> s{_rflReportId = a}) .
_Coerce
rflProFileId :: Lens' ReportsFilesList Int64
rflProFileId
= lens _rflProFileId (\ s a -> s{_rflProFileId = a})
. _Coerce
rflSortOrder :: Lens' ReportsFilesList ReportsFilesListSortOrder
rflSortOrder
= lens _rflSortOrder (\ s a -> s{_rflSortOrder = a})
rflPageToken :: Lens' ReportsFilesList (Maybe Text)
rflPageToken
= lens _rflPageToken (\ s a -> s{_rflPageToken = a})
rflSortField :: Lens' ReportsFilesList ReportsFilesListSortField
rflSortField
= lens _rflSortField (\ s a -> s{_rflSortField = a})
rflMaxResults :: Lens' ReportsFilesList Int32
rflMaxResults
= lens _rflMaxResults
(\ s a -> s{_rflMaxResults = a})
. _Coerce
instance GoogleRequest ReportsFilesList where
type Rs ReportsFilesList = FileList
type Scopes ReportsFilesList =
'["https://www.googleapis.com/auth/dfareporting"]
requestClient ReportsFilesList'{..}
= go _rflProFileId _rflReportId (Just _rflSortOrder)
_rflPageToken
(Just _rflSortField)
(Just _rflMaxResults)
(Just AltJSON)
dFAReportingService
where go
= buildClient
(Proxy :: Proxy ReportsFilesListResource)
mempty