{-# 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.AnalyticsReporting.Reports.BatchGet
(
ReportsBatchGetResource
, reportsBatchGet
, ReportsBatchGet
, rbgXgafv
, rbgUploadProtocol
, rbgAccessToken
, rbgUploadType
, rbgPayload
, rbgCallback
) where
import Network.Google.AnalyticsReporting.Types
import Network.Google.Prelude
type ReportsBatchGetResource =
"v4" :>
"reports:batchGet" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] GetReportsRequest :>
Post '[JSON] GetReportsResponse
data ReportsBatchGet = ReportsBatchGet'
{ _rbgXgafv :: !(Maybe Xgafv)
, _rbgUploadProtocol :: !(Maybe Text)
, _rbgAccessToken :: !(Maybe Text)
, _rbgUploadType :: !(Maybe Text)
, _rbgPayload :: !GetReportsRequest
, _rbgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
reportsBatchGet
:: GetReportsRequest
-> ReportsBatchGet
reportsBatchGet pRbgPayload_ =
ReportsBatchGet'
{ _rbgXgafv = Nothing
, _rbgUploadProtocol = Nothing
, _rbgAccessToken = Nothing
, _rbgUploadType = Nothing
, _rbgPayload = pRbgPayload_
, _rbgCallback = Nothing
}
rbgXgafv :: Lens' ReportsBatchGet (Maybe Xgafv)
rbgXgafv = lens _rbgXgafv (\ s a -> s{_rbgXgafv = a})
rbgUploadProtocol :: Lens' ReportsBatchGet (Maybe Text)
rbgUploadProtocol
= lens _rbgUploadProtocol
(\ s a -> s{_rbgUploadProtocol = a})
rbgAccessToken :: Lens' ReportsBatchGet (Maybe Text)
rbgAccessToken
= lens _rbgAccessToken
(\ s a -> s{_rbgAccessToken = a})
rbgUploadType :: Lens' ReportsBatchGet (Maybe Text)
rbgUploadType
= lens _rbgUploadType
(\ s a -> s{_rbgUploadType = a})
rbgPayload :: Lens' ReportsBatchGet GetReportsRequest
rbgPayload
= lens _rbgPayload (\ s a -> s{_rbgPayload = a})
rbgCallback :: Lens' ReportsBatchGet (Maybe Text)
rbgCallback
= lens _rbgCallback (\ s a -> s{_rbgCallback = a})
instance GoogleRequest ReportsBatchGet where
type Rs ReportsBatchGet = GetReportsResponse
type Scopes ReportsBatchGet =
'["https://www.googleapis.com/auth/analytics",
"https://www.googleapis.com/auth/analytics.readonly"]
requestClient ReportsBatchGet'{..}
= go _rbgXgafv _rbgUploadProtocol _rbgAccessToken
_rbgUploadType
_rbgCallback
(Just AltJSON)
_rbgPayload
analyticsReportingService
where go
= buildClient
(Proxy :: Proxy ReportsBatchGetResource)
mempty