{-# 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.Monitoring.Projects.MetricDescriptors.List
(
ProjectsMetricDescriptorsListResource
, projectsMetricDescriptorsList
, ProjectsMetricDescriptorsList
, pmdlXgafv
, pmdlUploadProtocol
, pmdlAccessToken
, pmdlUploadType
, pmdlName
, pmdlFilter
, pmdlPageToken
, pmdlPageSize
, pmdlCallback
) where
import Network.Google.Monitoring.Types
import Network.Google.Prelude
type ProjectsMetricDescriptorsListResource =
"v3" :>
Capture "name" Text :>
"metricDescriptors" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "filter" Text :>
QueryParam "pageToken" Text :>
QueryParam "pageSize" (Textual Int32) :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] ListMetricDescriptorsResponse
data ProjectsMetricDescriptorsList = ProjectsMetricDescriptorsList'
{ _pmdlXgafv :: !(Maybe Xgafv)
, _pmdlUploadProtocol :: !(Maybe Text)
, _pmdlAccessToken :: !(Maybe Text)
, _pmdlUploadType :: !(Maybe Text)
, _pmdlName :: !Text
, _pmdlFilter :: !(Maybe Text)
, _pmdlPageToken :: !(Maybe Text)
, _pmdlPageSize :: !(Maybe (Textual Int32))
, _pmdlCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsMetricDescriptorsList
:: Text
-> ProjectsMetricDescriptorsList
projectsMetricDescriptorsList pPmdlName_ =
ProjectsMetricDescriptorsList'
{ _pmdlXgafv = Nothing
, _pmdlUploadProtocol = Nothing
, _pmdlAccessToken = Nothing
, _pmdlUploadType = Nothing
, _pmdlName = pPmdlName_
, _pmdlFilter = Nothing
, _pmdlPageToken = Nothing
, _pmdlPageSize = Nothing
, _pmdlCallback = Nothing
}
pmdlXgafv :: Lens' ProjectsMetricDescriptorsList (Maybe Xgafv)
pmdlXgafv
= lens _pmdlXgafv (\ s a -> s{_pmdlXgafv = a})
pmdlUploadProtocol :: Lens' ProjectsMetricDescriptorsList (Maybe Text)
pmdlUploadProtocol
= lens _pmdlUploadProtocol
(\ s a -> s{_pmdlUploadProtocol = a})
pmdlAccessToken :: Lens' ProjectsMetricDescriptorsList (Maybe Text)
pmdlAccessToken
= lens _pmdlAccessToken
(\ s a -> s{_pmdlAccessToken = a})
pmdlUploadType :: Lens' ProjectsMetricDescriptorsList (Maybe Text)
pmdlUploadType
= lens _pmdlUploadType
(\ s a -> s{_pmdlUploadType = a})
pmdlName :: Lens' ProjectsMetricDescriptorsList Text
pmdlName = lens _pmdlName (\ s a -> s{_pmdlName = a})
pmdlFilter :: Lens' ProjectsMetricDescriptorsList (Maybe Text)
pmdlFilter
= lens _pmdlFilter (\ s a -> s{_pmdlFilter = a})
pmdlPageToken :: Lens' ProjectsMetricDescriptorsList (Maybe Text)
pmdlPageToken
= lens _pmdlPageToken
(\ s a -> s{_pmdlPageToken = a})
pmdlPageSize :: Lens' ProjectsMetricDescriptorsList (Maybe Int32)
pmdlPageSize
= lens _pmdlPageSize (\ s a -> s{_pmdlPageSize = a})
. mapping _Coerce
pmdlCallback :: Lens' ProjectsMetricDescriptorsList (Maybe Text)
pmdlCallback
= lens _pmdlCallback (\ s a -> s{_pmdlCallback = a})
instance GoogleRequest ProjectsMetricDescriptorsList
where
type Rs ProjectsMetricDescriptorsList =
ListMetricDescriptorsResponse
type Scopes ProjectsMetricDescriptorsList =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/monitoring",
"https://www.googleapis.com/auth/monitoring.read",
"https://www.googleapis.com/auth/monitoring.write"]
requestClient ProjectsMetricDescriptorsList'{..}
= go _pmdlName _pmdlXgafv _pmdlUploadProtocol
_pmdlAccessToken
_pmdlUploadType
_pmdlFilter
_pmdlPageToken
_pmdlPageSize
_pmdlCallback
(Just AltJSON)
monitoringService
where go
= buildClient
(Proxy ::
Proxy ProjectsMetricDescriptorsListResource)
mempty