{-# 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.Generate
(
AccountsReportsSavedGenerateResource
, accountsReportsSavedGenerate
, AccountsReportsSavedGenerate
, arsgLocale
, arsgSavedReportId
, arsgAccountId
, arsgStartIndex
, arsgMaxResults
) where
import Network.Google.AdSense.Types
import Network.Google.Prelude
type AccountsReportsSavedGenerateResource =
"adsense" :>
"v1.4" :>
"accounts" :>
Capture "accountId" Text :>
"reports" :>
Capture "savedReportId" Text :>
QueryParam "locale" Text :>
QueryParam "startIndex" (Textual Int32) :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] AdsenseReportsGenerateResponse
data AccountsReportsSavedGenerate = AccountsReportsSavedGenerate'
{ _arsgLocale :: !(Maybe Text)
, _arsgSavedReportId :: !Text
, _arsgAccountId :: !Text
, _arsgStartIndex :: !(Maybe (Textual Int32))
, _arsgMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
accountsReportsSavedGenerate
:: Text
-> Text
-> AccountsReportsSavedGenerate
accountsReportsSavedGenerate pArsgSavedReportId_ pArsgAccountId_ =
AccountsReportsSavedGenerate'
{ _arsgLocale = Nothing
, _arsgSavedReportId = pArsgSavedReportId_
, _arsgAccountId = pArsgAccountId_
, _arsgStartIndex = Nothing
, _arsgMaxResults = Nothing
}
arsgLocale :: Lens' AccountsReportsSavedGenerate (Maybe Text)
arsgLocale
= lens _arsgLocale (\ s a -> s{_arsgLocale = a})
arsgSavedReportId :: Lens' AccountsReportsSavedGenerate Text
arsgSavedReportId
= lens _arsgSavedReportId
(\ s a -> s{_arsgSavedReportId = a})
arsgAccountId :: Lens' AccountsReportsSavedGenerate Text
arsgAccountId
= lens _arsgAccountId
(\ s a -> s{_arsgAccountId = a})
arsgStartIndex :: Lens' AccountsReportsSavedGenerate (Maybe Int32)
arsgStartIndex
= lens _arsgStartIndex
(\ s a -> s{_arsgStartIndex = a})
. mapping _Coerce
arsgMaxResults :: Lens' AccountsReportsSavedGenerate (Maybe Int32)
arsgMaxResults
= lens _arsgMaxResults
(\ s a -> s{_arsgMaxResults = a})
. mapping _Coerce
instance GoogleRequest AccountsReportsSavedGenerate
where
type Rs AccountsReportsSavedGenerate =
AdsenseReportsGenerateResponse
type Scopes AccountsReportsSavedGenerate =
'["https://www.googleapis.com/auth/adsense",
"https://www.googleapis.com/auth/adsense.readonly"]
requestClient AccountsReportsSavedGenerate'{..}
= go _arsgAccountId _arsgSavedReportId _arsgLocale
_arsgStartIndex
_arsgMaxResults
(Just AltJSON)
adSenseService
where go
= buildClient
(Proxy :: Proxy AccountsReportsSavedGenerateResource)
mempty