{-# 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.Generate
(
ReportsSavedGenerateResource
, reportsSavedGenerate
, ReportsSavedGenerate
, rsgLocale
, rsgSavedReportId
, rsgStartIndex
, rsgMaxResults
) where
import Network.Google.AdSense.Types
import Network.Google.Prelude
type ReportsSavedGenerateResource =
"adsense" :>
"v1.4" :>
"reports" :>
Capture "savedReportId" Text :>
QueryParam "locale" Text :>
QueryParam "startIndex" (Textual Int32) :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] AdsenseReportsGenerateResponse
data ReportsSavedGenerate = ReportsSavedGenerate'
{ _rsgLocale :: !(Maybe Text)
, _rsgSavedReportId :: !Text
, _rsgStartIndex :: !(Maybe (Textual Int32))
, _rsgMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
reportsSavedGenerate
:: Text
-> ReportsSavedGenerate
reportsSavedGenerate pRsgSavedReportId_ =
ReportsSavedGenerate'
{ _rsgLocale = Nothing
, _rsgSavedReportId = pRsgSavedReportId_
, _rsgStartIndex = Nothing
, _rsgMaxResults = Nothing
}
rsgLocale :: Lens' ReportsSavedGenerate (Maybe Text)
rsgLocale
= lens _rsgLocale (\ s a -> s{_rsgLocale = a})
rsgSavedReportId :: Lens' ReportsSavedGenerate Text
rsgSavedReportId
= lens _rsgSavedReportId
(\ s a -> s{_rsgSavedReportId = a})
rsgStartIndex :: Lens' ReportsSavedGenerate (Maybe Int32)
rsgStartIndex
= lens _rsgStartIndex
(\ s a -> s{_rsgStartIndex = a})
. mapping _Coerce
rsgMaxResults :: Lens' ReportsSavedGenerate (Maybe Int32)
rsgMaxResults
= lens _rsgMaxResults
(\ s a -> s{_rsgMaxResults = a})
. mapping _Coerce
instance GoogleRequest ReportsSavedGenerate where
type Rs ReportsSavedGenerate =
AdsenseReportsGenerateResponse
type Scopes ReportsSavedGenerate =
'["https://www.googleapis.com/auth/adsense",
"https://www.googleapis.com/auth/adsense.readonly"]
requestClient ReportsSavedGenerate'{..}
= go _rsgSavedReportId _rsgLocale _rsgStartIndex
_rsgMaxResults
(Just AltJSON)
adSenseService
where go
= buildClient
(Proxy :: Proxy ReportsSavedGenerateResource)
mempty