{-# 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.Script.Projects.GetMetrics
(
ProjectsGetMetricsResource
, projectsGetMetrics
, ProjectsGetMetrics
, pgmXgafv
, pgmUploadProtocol
, pgmAccessToken
, pgmUploadType
, pgmMetricsGranularity
, pgmScriptId
, pgmMetricsFilterDeploymentId
, pgmCallback
) where
import Network.Google.Prelude
import Network.Google.Script.Types
type ProjectsGetMetricsResource =
"v1" :>
"projects" :>
Capture "scriptId" Text :>
"metrics" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "metricsGranularity" Text :>
QueryParam "metricsFilter.deploymentId" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Metrics
data ProjectsGetMetrics = ProjectsGetMetrics'
{ _pgmXgafv :: !(Maybe Xgafv)
, _pgmUploadProtocol :: !(Maybe Text)
, _pgmAccessToken :: !(Maybe Text)
, _pgmUploadType :: !(Maybe Text)
, _pgmMetricsGranularity :: !(Maybe Text)
, _pgmScriptId :: !Text
, _pgmMetricsFilterDeploymentId :: !(Maybe Text)
, _pgmCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsGetMetrics
:: Text
-> ProjectsGetMetrics
projectsGetMetrics pPgmScriptId_ =
ProjectsGetMetrics'
{ _pgmXgafv = Nothing
, _pgmUploadProtocol = Nothing
, _pgmAccessToken = Nothing
, _pgmUploadType = Nothing
, _pgmMetricsGranularity = Nothing
, _pgmScriptId = pPgmScriptId_
, _pgmMetricsFilterDeploymentId = Nothing
, _pgmCallback = Nothing
}
pgmXgafv :: Lens' ProjectsGetMetrics (Maybe Xgafv)
pgmXgafv = lens _pgmXgafv (\ s a -> s{_pgmXgafv = a})
pgmUploadProtocol :: Lens' ProjectsGetMetrics (Maybe Text)
pgmUploadProtocol
= lens _pgmUploadProtocol
(\ s a -> s{_pgmUploadProtocol = a})
pgmAccessToken :: Lens' ProjectsGetMetrics (Maybe Text)
pgmAccessToken
= lens _pgmAccessToken
(\ s a -> s{_pgmAccessToken = a})
pgmUploadType :: Lens' ProjectsGetMetrics (Maybe Text)
pgmUploadType
= lens _pgmUploadType
(\ s a -> s{_pgmUploadType = a})
pgmMetricsGranularity :: Lens' ProjectsGetMetrics (Maybe Text)
pgmMetricsGranularity
= lens _pgmMetricsGranularity
(\ s a -> s{_pgmMetricsGranularity = a})
pgmScriptId :: Lens' ProjectsGetMetrics Text
pgmScriptId
= lens _pgmScriptId (\ s a -> s{_pgmScriptId = a})
pgmMetricsFilterDeploymentId :: Lens' ProjectsGetMetrics (Maybe Text)
pgmMetricsFilterDeploymentId
= lens _pgmMetricsFilterDeploymentId
(\ s a -> s{_pgmMetricsFilterDeploymentId = a})
pgmCallback :: Lens' ProjectsGetMetrics (Maybe Text)
pgmCallback
= lens _pgmCallback (\ s a -> s{_pgmCallback = a})
instance GoogleRequest ProjectsGetMetrics where
type Rs ProjectsGetMetrics = Metrics
type Scopes ProjectsGetMetrics =
'["https://www.googleapis.com/auth/script.metrics"]
requestClient ProjectsGetMetrics'{..}
= go _pgmScriptId _pgmXgafv _pgmUploadProtocol
_pgmAccessToken
_pgmUploadType
_pgmMetricsGranularity
_pgmMetricsFilterDeploymentId
_pgmCallback
(Just AltJSON)
scriptService
where go
= buildClient
(Proxy :: Proxy ProjectsGetMetricsResource)
mempty