{-# 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.Dataflow.Projects.Locations.Jobs.GetMetrics
(
ProjectsLocationsJobsGetMetricsResource
, projectsLocationsJobsGetMetrics
, ProjectsLocationsJobsGetMetrics
, pljgmXgafv
, pljgmJobId
, pljgmUploadProtocol
, pljgmLocation
, pljgmStartTime
, pljgmAccessToken
, pljgmUploadType
, pljgmProjectId
, pljgmCallback
) where
import Network.Google.Dataflow.Types
import Network.Google.Prelude
type ProjectsLocationsJobsGetMetricsResource =
"v1b3" :>
"projects" :>
Capture "projectId" Text :>
"locations" :>
Capture "location" Text :>
"jobs" :>
Capture "jobId" Text :>
"metrics" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "startTime" DateTime' :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] JobMetrics
data ProjectsLocationsJobsGetMetrics = ProjectsLocationsJobsGetMetrics'
{ _pljgmXgafv :: !(Maybe Xgafv)
, _pljgmJobId :: !Text
, _pljgmUploadProtocol :: !(Maybe Text)
, _pljgmLocation :: !Text
, _pljgmStartTime :: !(Maybe DateTime')
, _pljgmAccessToken :: !(Maybe Text)
, _pljgmUploadType :: !(Maybe Text)
, _pljgmProjectId :: !Text
, _pljgmCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsLocationsJobsGetMetrics
:: Text
-> Text
-> Text
-> ProjectsLocationsJobsGetMetrics
projectsLocationsJobsGetMetrics pPljgmJobId_ pPljgmLocation_ pPljgmProjectId_ =
ProjectsLocationsJobsGetMetrics'
{ _pljgmXgafv = Nothing
, _pljgmJobId = pPljgmJobId_
, _pljgmUploadProtocol = Nothing
, _pljgmLocation = pPljgmLocation_
, _pljgmStartTime = Nothing
, _pljgmAccessToken = Nothing
, _pljgmUploadType = Nothing
, _pljgmProjectId = pPljgmProjectId_
, _pljgmCallback = Nothing
}
pljgmXgafv :: Lens' ProjectsLocationsJobsGetMetrics (Maybe Xgafv)
pljgmXgafv
= lens _pljgmXgafv (\ s a -> s{_pljgmXgafv = a})
pljgmJobId :: Lens' ProjectsLocationsJobsGetMetrics Text
pljgmJobId
= lens _pljgmJobId (\ s a -> s{_pljgmJobId = a})
pljgmUploadProtocol :: Lens' ProjectsLocationsJobsGetMetrics (Maybe Text)
pljgmUploadProtocol
= lens _pljgmUploadProtocol
(\ s a -> s{_pljgmUploadProtocol = a})
pljgmLocation :: Lens' ProjectsLocationsJobsGetMetrics Text
pljgmLocation
= lens _pljgmLocation
(\ s a -> s{_pljgmLocation = a})
pljgmStartTime :: Lens' ProjectsLocationsJobsGetMetrics (Maybe UTCTime)
pljgmStartTime
= lens _pljgmStartTime
(\ s a -> s{_pljgmStartTime = a})
. mapping _DateTime
pljgmAccessToken :: Lens' ProjectsLocationsJobsGetMetrics (Maybe Text)
pljgmAccessToken
= lens _pljgmAccessToken
(\ s a -> s{_pljgmAccessToken = a})
pljgmUploadType :: Lens' ProjectsLocationsJobsGetMetrics (Maybe Text)
pljgmUploadType
= lens _pljgmUploadType
(\ s a -> s{_pljgmUploadType = a})
pljgmProjectId :: Lens' ProjectsLocationsJobsGetMetrics Text
pljgmProjectId
= lens _pljgmProjectId
(\ s a -> s{_pljgmProjectId = a})
pljgmCallback :: Lens' ProjectsLocationsJobsGetMetrics (Maybe Text)
pljgmCallback
= lens _pljgmCallback
(\ s a -> s{_pljgmCallback = a})
instance GoogleRequest
ProjectsLocationsJobsGetMetrics where
type Rs ProjectsLocationsJobsGetMetrics = JobMetrics
type Scopes ProjectsLocationsJobsGetMetrics =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly",
"https://www.googleapis.com/auth/userinfo.email"]
requestClient ProjectsLocationsJobsGetMetrics'{..}
= go _pljgmProjectId _pljgmLocation _pljgmJobId
_pljgmXgafv
_pljgmUploadProtocol
_pljgmStartTime
_pljgmAccessToken
_pljgmUploadType
_pljgmCallback
(Just AltJSON)
dataflowService
where go
= buildClient
(Proxy ::
Proxy ProjectsLocationsJobsGetMetricsResource)
mempty