{-# 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.Get
(
JobsGetResource
, jobsGet
, JobsGet
, jgXgafv
, jgJobId
, jgUploadProtocol
, jgAccessToken
, jgUploadType
, jgOnBehalfOfContentOwner
, jgCallback
) where
import Network.Google.Prelude
import Network.Google.YouTubeReporting.Types
type JobsGetResource =
"v1" :>
"jobs" :>
Capture "jobId" 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] Job
data JobsGet = JobsGet'
{ _jgXgafv :: !(Maybe Xgafv)
, _jgJobId :: !Text
, _jgUploadProtocol :: !(Maybe Text)
, _jgAccessToken :: !(Maybe Text)
, _jgUploadType :: !(Maybe Text)
, _jgOnBehalfOfContentOwner :: !(Maybe Text)
, _jgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
jobsGet
:: Text
-> JobsGet
jobsGet pJgJobId_ =
JobsGet'
{ _jgXgafv = Nothing
, _jgJobId = pJgJobId_
, _jgUploadProtocol = Nothing
, _jgAccessToken = Nothing
, _jgUploadType = Nothing
, _jgOnBehalfOfContentOwner = Nothing
, _jgCallback = Nothing
}
jgXgafv :: Lens' JobsGet (Maybe Xgafv)
jgXgafv = lens _jgXgafv (\ s a -> s{_jgXgafv = a})
jgJobId :: Lens' JobsGet Text
jgJobId = lens _jgJobId (\ s a -> s{_jgJobId = a})
jgUploadProtocol :: Lens' JobsGet (Maybe Text)
jgUploadProtocol
= lens _jgUploadProtocol
(\ s a -> s{_jgUploadProtocol = a})
jgAccessToken :: Lens' JobsGet (Maybe Text)
jgAccessToken
= lens _jgAccessToken
(\ s a -> s{_jgAccessToken = a})
jgUploadType :: Lens' JobsGet (Maybe Text)
jgUploadType
= lens _jgUploadType (\ s a -> s{_jgUploadType = a})
jgOnBehalfOfContentOwner :: Lens' JobsGet (Maybe Text)
jgOnBehalfOfContentOwner
= lens _jgOnBehalfOfContentOwner
(\ s a -> s{_jgOnBehalfOfContentOwner = a})
jgCallback :: Lens' JobsGet (Maybe Text)
jgCallback
= lens _jgCallback (\ s a -> s{_jgCallback = a})
instance GoogleRequest JobsGet where
type Rs JobsGet = Job
type Scopes JobsGet =
'["https://www.googleapis.com/auth/yt-analytics-monetary.readonly",
"https://www.googleapis.com/auth/yt-analytics.readonly"]
requestClient JobsGet'{..}
= go _jgJobId _jgXgafv _jgUploadProtocol
_jgAccessToken
_jgUploadType
_jgOnBehalfOfContentOwner
_jgCallback
(Just AltJSON)
youTubeReportingService
where go
= buildClient (Proxy :: Proxy JobsGetResource) mempty