{-# 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.List
(
ReportsListResource
, reportsList
, ReportsList
, rlProFileId
, rlSortOrder
, rlScope
, rlPageToken
, rlSortField
, rlMaxResults
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type ReportsListResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"reports" :>
QueryParam "sortOrder" ReportsListSortOrder :>
QueryParam "scope" ReportsListScope :>
QueryParam "pageToken" Text :>
QueryParam "sortField" ReportsListSortField :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :> Get '[JSON] ReportList
data ReportsList = ReportsList'
{ _rlProFileId :: !(Textual Int64)
, _rlSortOrder :: !ReportsListSortOrder
, _rlScope :: !ReportsListScope
, _rlPageToken :: !(Maybe Text)
, _rlSortField :: !ReportsListSortField
, _rlMaxResults :: !(Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
reportsList
:: Int64
-> ReportsList
reportsList pRlProFileId_ =
ReportsList'
{ _rlProFileId = _Coerce # pRlProFileId_
, _rlSortOrder = RLSODescending
, _rlScope = Mine
, _rlPageToken = Nothing
, _rlSortField = RLSFLastModifiedTime
, _rlMaxResults = 10
}
rlProFileId :: Lens' ReportsList Int64
rlProFileId
= lens _rlProFileId (\ s a -> s{_rlProFileId = a}) .
_Coerce
rlSortOrder :: Lens' ReportsList ReportsListSortOrder
rlSortOrder
= lens _rlSortOrder (\ s a -> s{_rlSortOrder = a})
rlScope :: Lens' ReportsList ReportsListScope
rlScope = lens _rlScope (\ s a -> s{_rlScope = a})
rlPageToken :: Lens' ReportsList (Maybe Text)
rlPageToken
= lens _rlPageToken (\ s a -> s{_rlPageToken = a})
rlSortField :: Lens' ReportsList ReportsListSortField
rlSortField
= lens _rlSortField (\ s a -> s{_rlSortField = a})
rlMaxResults :: Lens' ReportsList Int32
rlMaxResults
= lens _rlMaxResults (\ s a -> s{_rlMaxResults = a})
. _Coerce
instance GoogleRequest ReportsList where
type Rs ReportsList = ReportList
type Scopes ReportsList =
'["https://www.googleapis.com/auth/dfareporting"]
requestClient ReportsList'{..}
= go _rlProFileId (Just _rlSortOrder) (Just _rlScope)
_rlPageToken
(Just _rlSortField)
(Just _rlMaxResults)
(Just AltJSON)
dFAReportingService
where go
= buildClient (Proxy :: Proxy ReportsListResource)
mempty