{-# 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.AdSense.Reports.Saved.List
(
ReportsSavedListResource
, reportsSavedList
, ReportsSavedList
, rslPageToken
, rslMaxResults
) where
import Network.Google.AdSense.Types
import Network.Google.Prelude
type ReportsSavedListResource =
"adsense" :>
"v1.4" :>
"reports" :>
"saved" :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :> Get '[JSON] SavedReports
data ReportsSavedList = ReportsSavedList'
{ _rslPageToken :: !(Maybe Text)
, _rslMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
reportsSavedList
:: ReportsSavedList
reportsSavedList =
ReportsSavedList'
{ _rslPageToken = Nothing
, _rslMaxResults = Nothing
}
rslPageToken :: Lens' ReportsSavedList (Maybe Text)
rslPageToken
= lens _rslPageToken (\ s a -> s{_rslPageToken = a})
rslMaxResults :: Lens' ReportsSavedList (Maybe Int32)
rslMaxResults
= lens _rslMaxResults
(\ s a -> s{_rslMaxResults = a})
. mapping _Coerce
instance GoogleRequest ReportsSavedList where
type Rs ReportsSavedList = SavedReports
type Scopes ReportsSavedList =
'["https://www.googleapis.com/auth/adsense",
"https://www.googleapis.com/auth/adsense.readonly"]
requestClient ReportsSavedList'{..}
= go _rslPageToken _rslMaxResults (Just AltJSON)
adSenseService
where go
= buildClient
(Proxy :: Proxy ReportsSavedListResource)
mempty