{-# 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.Feedback.Create
(
AlertsFeedbackCreateResource
, alertsFeedbackCreate
, AlertsFeedbackCreate
, afcXgafv
, afcUploadProtocol
, afcAccessToken
, afcAlertId
, afcUploadType
, afcPayload
, afcCustomerId
, afcCallback
) where
import Network.Google.AlertCenter.Types
import Network.Google.Prelude
type AlertsFeedbackCreateResource =
"v1beta1" :>
"alerts" :>
Capture "alertId" Text :>
"feedback" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "customerId" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AlertFeedback :>
Post '[JSON] AlertFeedback
data AlertsFeedbackCreate = AlertsFeedbackCreate'
{ _afcXgafv :: !(Maybe Xgafv)
, _afcUploadProtocol :: !(Maybe Text)
, _afcAccessToken :: !(Maybe Text)
, _afcAlertId :: !Text
, _afcUploadType :: !(Maybe Text)
, _afcPayload :: !AlertFeedback
, _afcCustomerId :: !(Maybe Text)
, _afcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
alertsFeedbackCreate
:: Text
-> AlertFeedback
-> AlertsFeedbackCreate
alertsFeedbackCreate pAfcAlertId_ pAfcPayload_ =
AlertsFeedbackCreate'
{ _afcXgafv = Nothing
, _afcUploadProtocol = Nothing
, _afcAccessToken = Nothing
, _afcAlertId = pAfcAlertId_
, _afcUploadType = Nothing
, _afcPayload = pAfcPayload_
, _afcCustomerId = Nothing
, _afcCallback = Nothing
}
afcXgafv :: Lens' AlertsFeedbackCreate (Maybe Xgafv)
afcXgafv = lens _afcXgafv (\ s a -> s{_afcXgafv = a})
afcUploadProtocol :: Lens' AlertsFeedbackCreate (Maybe Text)
afcUploadProtocol
= lens _afcUploadProtocol
(\ s a -> s{_afcUploadProtocol = a})
afcAccessToken :: Lens' AlertsFeedbackCreate (Maybe Text)
afcAccessToken
= lens _afcAccessToken
(\ s a -> s{_afcAccessToken = a})
afcAlertId :: Lens' AlertsFeedbackCreate Text
afcAlertId
= lens _afcAlertId (\ s a -> s{_afcAlertId = a})
afcUploadType :: Lens' AlertsFeedbackCreate (Maybe Text)
afcUploadType
= lens _afcUploadType
(\ s a -> s{_afcUploadType = a})
afcPayload :: Lens' AlertsFeedbackCreate AlertFeedback
afcPayload
= lens _afcPayload (\ s a -> s{_afcPayload = a})
afcCustomerId :: Lens' AlertsFeedbackCreate (Maybe Text)
afcCustomerId
= lens _afcCustomerId
(\ s a -> s{_afcCustomerId = a})
afcCallback :: Lens' AlertsFeedbackCreate (Maybe Text)
afcCallback
= lens _afcCallback (\ s a -> s{_afcCallback = a})
instance GoogleRequest AlertsFeedbackCreate where
type Rs AlertsFeedbackCreate = AlertFeedback
type Scopes AlertsFeedbackCreate =
'["https://www.googleapis.com/auth/apps.alerts"]
requestClient AlertsFeedbackCreate'{..}
= go _afcAlertId _afcXgafv _afcUploadProtocol
_afcAccessToken
_afcUploadType
_afcCustomerId
_afcCallback
(Just AltJSON)
_afcPayload
alertCenterService
where go
= buildClient
(Proxy :: Proxy AlertsFeedbackCreateResource)
mempty