{-# 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.Logging.Projects.Metrics.List
(
ProjectsMetricsListResource
, projectsMetricsList
, ProjectsMetricsList
, pmlParent
, pmlXgafv
, pmlUploadProtocol
, pmlAccessToken
, pmlUploadType
, pmlPageToken
, pmlPageSize
, pmlCallback
) where
import Network.Google.Logging.Types
import Network.Google.Prelude
type ProjectsMetricsListResource =
"v2" :>
Capture "parent" Text :>
"metrics" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "pageToken" Text :>
QueryParam "pageSize" (Textual Int32) :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] ListLogMetricsResponse
data ProjectsMetricsList = ProjectsMetricsList'
{ _pmlParent :: !Text
, _pmlXgafv :: !(Maybe Xgafv)
, _pmlUploadProtocol :: !(Maybe Text)
, _pmlAccessToken :: !(Maybe Text)
, _pmlUploadType :: !(Maybe Text)
, _pmlPageToken :: !(Maybe Text)
, _pmlPageSize :: !(Maybe (Textual Int32))
, _pmlCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsMetricsList
:: Text
-> ProjectsMetricsList
projectsMetricsList pPmlParent_ =
ProjectsMetricsList'
{ _pmlParent = pPmlParent_
, _pmlXgafv = Nothing
, _pmlUploadProtocol = Nothing
, _pmlAccessToken = Nothing
, _pmlUploadType = Nothing
, _pmlPageToken = Nothing
, _pmlPageSize = Nothing
, _pmlCallback = Nothing
}
pmlParent :: Lens' ProjectsMetricsList Text
pmlParent
= lens _pmlParent (\ s a -> s{_pmlParent = a})
pmlXgafv :: Lens' ProjectsMetricsList (Maybe Xgafv)
pmlXgafv = lens _pmlXgafv (\ s a -> s{_pmlXgafv = a})
pmlUploadProtocol :: Lens' ProjectsMetricsList (Maybe Text)
pmlUploadProtocol
= lens _pmlUploadProtocol
(\ s a -> s{_pmlUploadProtocol = a})
pmlAccessToken :: Lens' ProjectsMetricsList (Maybe Text)
pmlAccessToken
= lens _pmlAccessToken
(\ s a -> s{_pmlAccessToken = a})
pmlUploadType :: Lens' ProjectsMetricsList (Maybe Text)
pmlUploadType
= lens _pmlUploadType
(\ s a -> s{_pmlUploadType = a})
pmlPageToken :: Lens' ProjectsMetricsList (Maybe Text)
pmlPageToken
= lens _pmlPageToken (\ s a -> s{_pmlPageToken = a})
pmlPageSize :: Lens' ProjectsMetricsList (Maybe Int32)
pmlPageSize
= lens _pmlPageSize (\ s a -> s{_pmlPageSize = a}) .
mapping _Coerce
pmlCallback :: Lens' ProjectsMetricsList (Maybe Text)
pmlCallback
= lens _pmlCallback (\ s a -> s{_pmlCallback = a})
instance GoogleRequest ProjectsMetricsList where
type Rs ProjectsMetricsList = ListLogMetricsResponse
type Scopes ProjectsMetricsList =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/cloud-platform.read-only",
"https://www.googleapis.com/auth/logging.admin",
"https://www.googleapis.com/auth/logging.read"]
requestClient ProjectsMetricsList'{..}
= go _pmlParent _pmlXgafv _pmlUploadProtocol
_pmlAccessToken
_pmlUploadType
_pmlPageToken
_pmlPageSize
_pmlCallback
(Just AltJSON)
loggingService
where go
= buildClient
(Proxy :: Proxy ProjectsMetricsListResource)
mempty