{-# 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.ModifyPushConfig
(
ProjectsSubscriptionsModifyPushConfigResource
, projectsSubscriptionsModifyPushConfig
, ProjectsSubscriptionsModifyPushConfig
, psmpcXgafv
, psmpcUploadProtocol
, psmpcAccessToken
, psmpcUploadType
, psmpcPayload
, psmpcSubscription
, psmpcCallback
) where
import Network.Google.Prelude
import Network.Google.PubSub.Types
type ProjectsSubscriptionsModifyPushConfigResource =
"v1" :>
CaptureMode "subscription" "modifyPushConfig" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ModifyPushConfigRequest :>
Post '[JSON] Empty
data ProjectsSubscriptionsModifyPushConfig = ProjectsSubscriptionsModifyPushConfig'
{ _psmpcXgafv :: !(Maybe Xgafv)
, _psmpcUploadProtocol :: !(Maybe Text)
, _psmpcAccessToken :: !(Maybe Text)
, _psmpcUploadType :: !(Maybe Text)
, _psmpcPayload :: !ModifyPushConfigRequest
, _psmpcSubscription :: !Text
, _psmpcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsSubscriptionsModifyPushConfig
:: ModifyPushConfigRequest
-> Text
-> ProjectsSubscriptionsModifyPushConfig
projectsSubscriptionsModifyPushConfig pPsmpcPayload_ pPsmpcSubscription_ =
ProjectsSubscriptionsModifyPushConfig'
{ _psmpcXgafv = Nothing
, _psmpcUploadProtocol = Nothing
, _psmpcAccessToken = Nothing
, _psmpcUploadType = Nothing
, _psmpcPayload = pPsmpcPayload_
, _psmpcSubscription = pPsmpcSubscription_
, _psmpcCallback = Nothing
}
psmpcXgafv :: Lens' ProjectsSubscriptionsModifyPushConfig (Maybe Xgafv)
psmpcXgafv
= lens _psmpcXgafv (\ s a -> s{_psmpcXgafv = a})
psmpcUploadProtocol :: Lens' ProjectsSubscriptionsModifyPushConfig (Maybe Text)
psmpcUploadProtocol
= lens _psmpcUploadProtocol
(\ s a -> s{_psmpcUploadProtocol = a})
psmpcAccessToken :: Lens' ProjectsSubscriptionsModifyPushConfig (Maybe Text)
psmpcAccessToken
= lens _psmpcAccessToken
(\ s a -> s{_psmpcAccessToken = a})
psmpcUploadType :: Lens' ProjectsSubscriptionsModifyPushConfig (Maybe Text)
psmpcUploadType
= lens _psmpcUploadType
(\ s a -> s{_psmpcUploadType = a})
psmpcPayload :: Lens' ProjectsSubscriptionsModifyPushConfig ModifyPushConfigRequest
psmpcPayload
= lens _psmpcPayload (\ s a -> s{_psmpcPayload = a})
psmpcSubscription :: Lens' ProjectsSubscriptionsModifyPushConfig Text
psmpcSubscription
= lens _psmpcSubscription
(\ s a -> s{_psmpcSubscription = a})
psmpcCallback :: Lens' ProjectsSubscriptionsModifyPushConfig (Maybe Text)
psmpcCallback
= lens _psmpcCallback
(\ s a -> s{_psmpcCallback = a})
instance GoogleRequest
ProjectsSubscriptionsModifyPushConfig where
type Rs ProjectsSubscriptionsModifyPushConfig = Empty
type Scopes ProjectsSubscriptionsModifyPushConfig =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/pubsub"]
requestClient
ProjectsSubscriptionsModifyPushConfig'{..}
= go _psmpcSubscription _psmpcXgafv
_psmpcUploadProtocol
_psmpcAccessToken
_psmpcUploadType
_psmpcCallback
(Just AltJSON)
_psmpcPayload
pubSubService
where go
= buildClient
(Proxy ::
Proxy ProjectsSubscriptionsModifyPushConfigResource)
mempty