{-# 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.Accounts.Reports.Saved.List
(
AccountsReportsSavedListResource
, accountsReportsSavedList
, AccountsReportsSavedList
, arslAccountId
, arslPageToken
, arslMaxResults
) where
import Network.Google.AdSense.Types
import Network.Google.Prelude
type AccountsReportsSavedListResource =
"adsense" :>
"v1.4" :>
"accounts" :>
Capture "accountId" Text :>
"reports" :>
"saved" :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :> Get '[JSON] SavedReports
data AccountsReportsSavedList = AccountsReportsSavedList'
{ _arslAccountId :: !Text
, _arslPageToken :: !(Maybe Text)
, _arslMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
accountsReportsSavedList
:: Text
-> AccountsReportsSavedList
accountsReportsSavedList pArslAccountId_ =
AccountsReportsSavedList'
{ _arslAccountId = pArslAccountId_
, _arslPageToken = Nothing
, _arslMaxResults = Nothing
}
arslAccountId :: Lens' AccountsReportsSavedList Text
arslAccountId
= lens _arslAccountId
(\ s a -> s{_arslAccountId = a})
arslPageToken :: Lens' AccountsReportsSavedList (Maybe Text)
arslPageToken
= lens _arslPageToken
(\ s a -> s{_arslPageToken = a})
arslMaxResults :: Lens' AccountsReportsSavedList (Maybe Int32)
arslMaxResults
= lens _arslMaxResults
(\ s a -> s{_arslMaxResults = a})
. mapping _Coerce
instance GoogleRequest AccountsReportsSavedList where
type Rs AccountsReportsSavedList = SavedReports
type Scopes AccountsReportsSavedList =
'["https://www.googleapis.com/auth/adsense",
"https://www.googleapis.com/auth/adsense.readonly"]
requestClient AccountsReportsSavedList'{..}
= go _arslAccountId _arslPageToken _arslMaxResults
(Just AltJSON)
adSenseService
where go
= buildClient
(Proxy :: Proxy AccountsReportsSavedListResource)
mempty