{-# 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.UptimeCheckConfigs.Create
(
ProjectsUptimeCheckConfigsCreateResource
, projectsUptimeCheckConfigsCreate
, ProjectsUptimeCheckConfigsCreate
, pucccParent
, pucccXgafv
, pucccUploadProtocol
, pucccAccessToken
, pucccUploadType
, pucccPayload
, pucccCallback
) where
import Network.Google.Monitoring.Types
import Network.Google.Prelude
type ProjectsUptimeCheckConfigsCreateResource =
"v3" :>
Capture "parent" Text :>
"uptimeCheckConfigs" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] UptimeCheckConfig :>
Post '[JSON] UptimeCheckConfig
data ProjectsUptimeCheckConfigsCreate = ProjectsUptimeCheckConfigsCreate'
{ _pucccParent :: !Text
, _pucccXgafv :: !(Maybe Xgafv)
, _pucccUploadProtocol :: !(Maybe Text)
, _pucccAccessToken :: !(Maybe Text)
, _pucccUploadType :: !(Maybe Text)
, _pucccPayload :: !UptimeCheckConfig
, _pucccCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsUptimeCheckConfigsCreate
:: Text
-> UptimeCheckConfig
-> ProjectsUptimeCheckConfigsCreate
projectsUptimeCheckConfigsCreate pPucccParent_ pPucccPayload_ =
ProjectsUptimeCheckConfigsCreate'
{ _pucccParent = pPucccParent_
, _pucccXgafv = Nothing
, _pucccUploadProtocol = Nothing
, _pucccAccessToken = Nothing
, _pucccUploadType = Nothing
, _pucccPayload = pPucccPayload_
, _pucccCallback = Nothing
}
pucccParent :: Lens' ProjectsUptimeCheckConfigsCreate Text
pucccParent
= lens _pucccParent (\ s a -> s{_pucccParent = a})
pucccXgafv :: Lens' ProjectsUptimeCheckConfigsCreate (Maybe Xgafv)
pucccXgafv
= lens _pucccXgafv (\ s a -> s{_pucccXgafv = a})
pucccUploadProtocol :: Lens' ProjectsUptimeCheckConfigsCreate (Maybe Text)
pucccUploadProtocol
= lens _pucccUploadProtocol
(\ s a -> s{_pucccUploadProtocol = a})
pucccAccessToken :: Lens' ProjectsUptimeCheckConfigsCreate (Maybe Text)
pucccAccessToken
= lens _pucccAccessToken
(\ s a -> s{_pucccAccessToken = a})
pucccUploadType :: Lens' ProjectsUptimeCheckConfigsCreate (Maybe Text)
pucccUploadType
= lens _pucccUploadType
(\ s a -> s{_pucccUploadType = a})
pucccPayload :: Lens' ProjectsUptimeCheckConfigsCreate UptimeCheckConfig
pucccPayload
= lens _pucccPayload (\ s a -> s{_pucccPayload = a})
pucccCallback :: Lens' ProjectsUptimeCheckConfigsCreate (Maybe Text)
pucccCallback
= lens _pucccCallback
(\ s a -> s{_pucccCallback = a})
instance GoogleRequest
ProjectsUptimeCheckConfigsCreate where
type Rs ProjectsUptimeCheckConfigsCreate =
UptimeCheckConfig
type Scopes ProjectsUptimeCheckConfigsCreate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/monitoring"]
requestClient ProjectsUptimeCheckConfigsCreate'{..}
= go _pucccParent _pucccXgafv _pucccUploadProtocol
_pucccAccessToken
_pucccUploadType
_pucccCallback
(Just AltJSON)
_pucccPayload
monitoringService
where go
= buildClient
(Proxy ::
Proxy ProjectsUptimeCheckConfigsCreateResource)
mempty