{-# 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.CollectdTimeSeries.Create
(
ProjectsCollectdTimeSeriesCreateResource
, projectsCollectdTimeSeriesCreate
, ProjectsCollectdTimeSeriesCreate
, pctscXgafv
, pctscUploadProtocol
, pctscAccessToken
, pctscUploadType
, pctscPayload
, pctscName
, pctscCallback
) where
import Network.Google.Monitoring.Types
import Network.Google.Prelude
type ProjectsCollectdTimeSeriesCreateResource =
"v3" :>
Capture "name" Text :>
"collectdTimeSeries" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CreateCollectdTimeSeriesRequest :>
Post '[JSON] CreateCollectdTimeSeriesResponse
data ProjectsCollectdTimeSeriesCreate = ProjectsCollectdTimeSeriesCreate'
{ _pctscXgafv :: !(Maybe Xgafv)
, _pctscUploadProtocol :: !(Maybe Text)
, _pctscAccessToken :: !(Maybe Text)
, _pctscUploadType :: !(Maybe Text)
, _pctscPayload :: !CreateCollectdTimeSeriesRequest
, _pctscName :: !Text
, _pctscCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsCollectdTimeSeriesCreate
:: CreateCollectdTimeSeriesRequest
-> Text
-> ProjectsCollectdTimeSeriesCreate
projectsCollectdTimeSeriesCreate pPctscPayload_ pPctscName_ =
ProjectsCollectdTimeSeriesCreate'
{ _pctscXgafv = Nothing
, _pctscUploadProtocol = Nothing
, _pctscAccessToken = Nothing
, _pctscUploadType = Nothing
, _pctscPayload = pPctscPayload_
, _pctscName = pPctscName_
, _pctscCallback = Nothing
}
pctscXgafv :: Lens' ProjectsCollectdTimeSeriesCreate (Maybe Xgafv)
pctscXgafv
= lens _pctscXgafv (\ s a -> s{_pctscXgafv = a})
pctscUploadProtocol :: Lens' ProjectsCollectdTimeSeriesCreate (Maybe Text)
pctscUploadProtocol
= lens _pctscUploadProtocol
(\ s a -> s{_pctscUploadProtocol = a})
pctscAccessToken :: Lens' ProjectsCollectdTimeSeriesCreate (Maybe Text)
pctscAccessToken
= lens _pctscAccessToken
(\ s a -> s{_pctscAccessToken = a})
pctscUploadType :: Lens' ProjectsCollectdTimeSeriesCreate (Maybe Text)
pctscUploadType
= lens _pctscUploadType
(\ s a -> s{_pctscUploadType = a})
pctscPayload :: Lens' ProjectsCollectdTimeSeriesCreate CreateCollectdTimeSeriesRequest
pctscPayload
= lens _pctscPayload (\ s a -> s{_pctscPayload = a})
pctscName :: Lens' ProjectsCollectdTimeSeriesCreate Text
pctscName
= lens _pctscName (\ s a -> s{_pctscName = a})
pctscCallback :: Lens' ProjectsCollectdTimeSeriesCreate (Maybe Text)
pctscCallback
= lens _pctscCallback
(\ s a -> s{_pctscCallback = a})
instance GoogleRequest
ProjectsCollectdTimeSeriesCreate where
type Rs ProjectsCollectdTimeSeriesCreate =
CreateCollectdTimeSeriesResponse
type Scopes ProjectsCollectdTimeSeriesCreate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/monitoring",
"https://www.googleapis.com/auth/monitoring.write"]
requestClient ProjectsCollectdTimeSeriesCreate'{..}
= go _pctscName _pctscXgafv _pctscUploadProtocol
_pctscAccessToken
_pctscUploadType
_pctscCallback
(Just AltJSON)
_pctscPayload
monitoringService
where go
= buildClient
(Proxy ::
Proxy ProjectsCollectdTimeSeriesCreateResource)
mempty