{-# 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.YouTubeReporting.Jobs.Reports.Get
(
JobsReportsGetResource
, jobsReportsGet
, JobsReportsGet
, jrgXgafv
, jrgJobId
, jrgUploadProtocol
, jrgAccessToken
, jrgReportId
, jrgUploadType
, jrgOnBehalfOfContentOwner
, jrgCallback
) where
import Network.Google.Prelude
import Network.Google.YouTubeReporting.Types
type JobsReportsGetResource =
"v1" :>
"jobs" :>
Capture "jobId" Text :>
"reports" :>
Capture "reportId" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "onBehalfOfContentOwner" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Report
data JobsReportsGet = JobsReportsGet'
{ _jrgXgafv :: !(Maybe Xgafv)
, _jrgJobId :: !Text
, _jrgUploadProtocol :: !(Maybe Text)
, _jrgAccessToken :: !(Maybe Text)
, _jrgReportId :: !Text
, _jrgUploadType :: !(Maybe Text)
, _jrgOnBehalfOfContentOwner :: !(Maybe Text)
, _jrgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
jobsReportsGet
:: Text
-> Text
-> JobsReportsGet
jobsReportsGet pJrgJobId_ pJrgReportId_ =
JobsReportsGet'
{ _jrgXgafv = Nothing
, _jrgJobId = pJrgJobId_
, _jrgUploadProtocol = Nothing
, _jrgAccessToken = Nothing
, _jrgReportId = pJrgReportId_
, _jrgUploadType = Nothing
, _jrgOnBehalfOfContentOwner = Nothing
, _jrgCallback = Nothing
}
jrgXgafv :: Lens' JobsReportsGet (Maybe Xgafv)
jrgXgafv = lens _jrgXgafv (\ s a -> s{_jrgXgafv = a})
jrgJobId :: Lens' JobsReportsGet Text
jrgJobId = lens _jrgJobId (\ s a -> s{_jrgJobId = a})
jrgUploadProtocol :: Lens' JobsReportsGet (Maybe Text)
jrgUploadProtocol
= lens _jrgUploadProtocol
(\ s a -> s{_jrgUploadProtocol = a})
jrgAccessToken :: Lens' JobsReportsGet (Maybe Text)
jrgAccessToken
= lens _jrgAccessToken
(\ s a -> s{_jrgAccessToken = a})
jrgReportId :: Lens' JobsReportsGet Text
jrgReportId
= lens _jrgReportId (\ s a -> s{_jrgReportId = a})
jrgUploadType :: Lens' JobsReportsGet (Maybe Text)
jrgUploadType
= lens _jrgUploadType
(\ s a -> s{_jrgUploadType = a})
jrgOnBehalfOfContentOwner :: Lens' JobsReportsGet (Maybe Text)
jrgOnBehalfOfContentOwner
= lens _jrgOnBehalfOfContentOwner
(\ s a -> s{_jrgOnBehalfOfContentOwner = a})
jrgCallback :: Lens' JobsReportsGet (Maybe Text)
jrgCallback
= lens _jrgCallback (\ s a -> s{_jrgCallback = a})
instance GoogleRequest JobsReportsGet where
type Rs JobsReportsGet = Report
type Scopes JobsReportsGet =
'["https://www.googleapis.com/auth/yt-analytics-monetary.readonly",
"https://www.googleapis.com/auth/yt-analytics.readonly"]
requestClient JobsReportsGet'{..}
= go _jrgJobId _jrgReportId _jrgXgafv
_jrgUploadProtocol
_jrgAccessToken
_jrgUploadType
_jrgOnBehalfOfContentOwner
_jrgCallback
(Just AltJSON)
youTubeReportingService
where go
= buildClient (Proxy :: Proxy JobsReportsGetResource)
mempty