{-# 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.PubSub.Projects.Subscriptions.Acknowledge
(
ProjectsSubscriptionsAcknowledgeResource
, projectsSubscriptionsAcknowledge
, ProjectsSubscriptionsAcknowledge
, psaXgafv
, psaUploadProtocol
, psaAccessToken
, psaUploadType
, psaPayload
, psaSubscription
, psaCallback
) where
import Network.Google.Prelude
import Network.Google.PubSub.Types
type ProjectsSubscriptionsAcknowledgeResource =
"v1" :>
CaptureMode "subscription" "acknowledge" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AcknowledgeRequest :>
Post '[JSON] Empty
data ProjectsSubscriptionsAcknowledge = ProjectsSubscriptionsAcknowledge'
{ _psaXgafv :: !(Maybe Xgafv)
, _psaUploadProtocol :: !(Maybe Text)
, _psaAccessToken :: !(Maybe Text)
, _psaUploadType :: !(Maybe Text)
, _psaPayload :: !AcknowledgeRequest
, _psaSubscription :: !Text
, _psaCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsSubscriptionsAcknowledge
:: AcknowledgeRequest
-> Text
-> ProjectsSubscriptionsAcknowledge
projectsSubscriptionsAcknowledge pPsaPayload_ pPsaSubscription_ =
ProjectsSubscriptionsAcknowledge'
{ _psaXgafv = Nothing
, _psaUploadProtocol = Nothing
, _psaAccessToken = Nothing
, _psaUploadType = Nothing
, _psaPayload = pPsaPayload_
, _psaSubscription = pPsaSubscription_
, _psaCallback = Nothing
}
psaXgafv :: Lens' ProjectsSubscriptionsAcknowledge (Maybe Xgafv)
psaXgafv = lens _psaXgafv (\ s a -> s{_psaXgafv = a})
psaUploadProtocol :: Lens' ProjectsSubscriptionsAcknowledge (Maybe Text)
psaUploadProtocol
= lens _psaUploadProtocol
(\ s a -> s{_psaUploadProtocol = a})
psaAccessToken :: Lens' ProjectsSubscriptionsAcknowledge (Maybe Text)
psaAccessToken
= lens _psaAccessToken
(\ s a -> s{_psaAccessToken = a})
psaUploadType :: Lens' ProjectsSubscriptionsAcknowledge (Maybe Text)
psaUploadType
= lens _psaUploadType
(\ s a -> s{_psaUploadType = a})
psaPayload :: Lens' ProjectsSubscriptionsAcknowledge AcknowledgeRequest
psaPayload
= lens _psaPayload (\ s a -> s{_psaPayload = a})
psaSubscription :: Lens' ProjectsSubscriptionsAcknowledge Text
psaSubscription
= lens _psaSubscription
(\ s a -> s{_psaSubscription = a})
psaCallback :: Lens' ProjectsSubscriptionsAcknowledge (Maybe Text)
psaCallback
= lens _psaCallback (\ s a -> s{_psaCallback = a})
instance GoogleRequest
ProjectsSubscriptionsAcknowledge where
type Rs ProjectsSubscriptionsAcknowledge = Empty
type Scopes ProjectsSubscriptionsAcknowledge =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/pubsub"]
requestClient ProjectsSubscriptionsAcknowledge'{..}
= go _psaSubscription _psaXgafv _psaUploadProtocol
_psaAccessToken
_psaUploadType
_psaCallback
(Just AltJSON)
_psaPayload
pubSubService
where go
= buildClient
(Proxy ::
Proxy ProjectsSubscriptionsAcknowledgeResource)
mempty