{-# 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.AlertCenter.Alerts.Undelete
(
AlertsUndeleteResource
, alertsUndelete
, AlertsUndelete
, auXgafv
, auUploadProtocol
, auAccessToken
, auAlertId
, auUploadType
, auPayload
, auCallback
) where
import Network.Google.AlertCenter.Types
import Network.Google.Prelude
type AlertsUndeleteResource =
"v1beta1" :>
"alerts" :>
CaptureMode "alertId" "undelete" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] UndeleteAlertRequest :>
Post '[JSON] Alert
data AlertsUndelete = AlertsUndelete'
{ _auXgafv :: !(Maybe Xgafv)
, _auUploadProtocol :: !(Maybe Text)
, _auAccessToken :: !(Maybe Text)
, _auAlertId :: !Text
, _auUploadType :: !(Maybe Text)
, _auPayload :: !UndeleteAlertRequest
, _auCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
alertsUndelete
:: Text
-> UndeleteAlertRequest
-> AlertsUndelete
alertsUndelete pAuAlertId_ pAuPayload_ =
AlertsUndelete'
{ _auXgafv = Nothing
, _auUploadProtocol = Nothing
, _auAccessToken = Nothing
, _auAlertId = pAuAlertId_
, _auUploadType = Nothing
, _auPayload = pAuPayload_
, _auCallback = Nothing
}
auXgafv :: Lens' AlertsUndelete (Maybe Xgafv)
auXgafv = lens _auXgafv (\ s a -> s{_auXgafv = a})
auUploadProtocol :: Lens' AlertsUndelete (Maybe Text)
auUploadProtocol
= lens _auUploadProtocol
(\ s a -> s{_auUploadProtocol = a})
auAccessToken :: Lens' AlertsUndelete (Maybe Text)
auAccessToken
= lens _auAccessToken
(\ s a -> s{_auAccessToken = a})
auAlertId :: Lens' AlertsUndelete Text
auAlertId
= lens _auAlertId (\ s a -> s{_auAlertId = a})
auUploadType :: Lens' AlertsUndelete (Maybe Text)
auUploadType
= lens _auUploadType (\ s a -> s{_auUploadType = a})
auPayload :: Lens' AlertsUndelete UndeleteAlertRequest
auPayload
= lens _auPayload (\ s a -> s{_auPayload = a})
auCallback :: Lens' AlertsUndelete (Maybe Text)
auCallback
= lens _auCallback (\ s a -> s{_auCallback = a})
instance GoogleRequest AlertsUndelete where
type Rs AlertsUndelete = Alert
type Scopes AlertsUndelete =
'["https://www.googleapis.com/auth/apps.alerts"]
requestClient AlertsUndelete'{..}
= go _auAlertId _auXgafv _auUploadProtocol
_auAccessToken
_auUploadType
_auCallback
(Just AltJSON)
_auPayload
alertCenterService
where go
= buildClient (Proxy :: Proxy AlertsUndeleteResource)
mempty