{-# 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.NotificationChannels.Verify
(
ProjectsNotificationChannelsVerifyResource
, projectsNotificationChannelsVerify
, ProjectsNotificationChannelsVerify
, pncvXgafv
, pncvUploadProtocol
, pncvAccessToken
, pncvUploadType
, pncvPayload
, pncvName
, pncvCallback
) where
import Network.Google.Monitoring.Types
import Network.Google.Prelude
type ProjectsNotificationChannelsVerifyResource =
"v3" :>
CaptureMode "name" "verify" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] VerifyNotificationChannelRequest :>
Post '[JSON] NotificationChannel
data ProjectsNotificationChannelsVerify = ProjectsNotificationChannelsVerify'
{ _pncvXgafv :: !(Maybe Xgafv)
, _pncvUploadProtocol :: !(Maybe Text)
, _pncvAccessToken :: !(Maybe Text)
, _pncvUploadType :: !(Maybe Text)
, _pncvPayload :: !VerifyNotificationChannelRequest
, _pncvName :: !Text
, _pncvCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsNotificationChannelsVerify
:: VerifyNotificationChannelRequest
-> Text
-> ProjectsNotificationChannelsVerify
projectsNotificationChannelsVerify pPncvPayload_ pPncvName_ =
ProjectsNotificationChannelsVerify'
{ _pncvXgafv = Nothing
, _pncvUploadProtocol = Nothing
, _pncvAccessToken = Nothing
, _pncvUploadType = Nothing
, _pncvPayload = pPncvPayload_
, _pncvName = pPncvName_
, _pncvCallback = Nothing
}
pncvXgafv :: Lens' ProjectsNotificationChannelsVerify (Maybe Xgafv)
pncvXgafv
= lens _pncvXgafv (\ s a -> s{_pncvXgafv = a})
pncvUploadProtocol :: Lens' ProjectsNotificationChannelsVerify (Maybe Text)
pncvUploadProtocol
= lens _pncvUploadProtocol
(\ s a -> s{_pncvUploadProtocol = a})
pncvAccessToken :: Lens' ProjectsNotificationChannelsVerify (Maybe Text)
pncvAccessToken
= lens _pncvAccessToken
(\ s a -> s{_pncvAccessToken = a})
pncvUploadType :: Lens' ProjectsNotificationChannelsVerify (Maybe Text)
pncvUploadType
= lens _pncvUploadType
(\ s a -> s{_pncvUploadType = a})
pncvPayload :: Lens' ProjectsNotificationChannelsVerify VerifyNotificationChannelRequest
pncvPayload
= lens _pncvPayload (\ s a -> s{_pncvPayload = a})
pncvName :: Lens' ProjectsNotificationChannelsVerify Text
pncvName = lens _pncvName (\ s a -> s{_pncvName = a})
pncvCallback :: Lens' ProjectsNotificationChannelsVerify (Maybe Text)
pncvCallback
= lens _pncvCallback (\ s a -> s{_pncvCallback = a})
instance GoogleRequest
ProjectsNotificationChannelsVerify where
type Rs ProjectsNotificationChannelsVerify =
NotificationChannel
type Scopes ProjectsNotificationChannelsVerify =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/monitoring"]
requestClient ProjectsNotificationChannelsVerify'{..}
= go _pncvName _pncvXgafv _pncvUploadProtocol
_pncvAccessToken
_pncvUploadType
_pncvCallback
(Just AltJSON)
_pncvPayload
monitoringService
where go
= buildClient
(Proxy ::
Proxy ProjectsNotificationChannelsVerifyResource)
mempty