{-# 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.Seek
(
ProjectsSubscriptionsSeekResource
, projectsSubscriptionsSeek
, ProjectsSubscriptionsSeek
, pssXgafv
, pssUploadProtocol
, pssAccessToken
, pssUploadType
, pssPayload
, pssSubscription
, pssCallback
) where
import Network.Google.Prelude
import Network.Google.PubSub.Types
type ProjectsSubscriptionsSeekResource =
"v1" :>
CaptureMode "subscription" "seek" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] SeekRequest :>
Post '[JSON] SeekResponse
data ProjectsSubscriptionsSeek = ProjectsSubscriptionsSeek'
{ _pssXgafv :: !(Maybe Xgafv)
, _pssUploadProtocol :: !(Maybe Text)
, _pssAccessToken :: !(Maybe Text)
, _pssUploadType :: !(Maybe Text)
, _pssPayload :: !SeekRequest
, _pssSubscription :: !Text
, _pssCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsSubscriptionsSeek
:: SeekRequest
-> Text
-> ProjectsSubscriptionsSeek
projectsSubscriptionsSeek pPssPayload_ pPssSubscription_ =
ProjectsSubscriptionsSeek'
{ _pssXgafv = Nothing
, _pssUploadProtocol = Nothing
, _pssAccessToken = Nothing
, _pssUploadType = Nothing
, _pssPayload = pPssPayload_
, _pssSubscription = pPssSubscription_
, _pssCallback = Nothing
}
pssXgafv :: Lens' ProjectsSubscriptionsSeek (Maybe Xgafv)
pssXgafv = lens _pssXgafv (\ s a -> s{_pssXgafv = a})
pssUploadProtocol :: Lens' ProjectsSubscriptionsSeek (Maybe Text)
pssUploadProtocol
= lens _pssUploadProtocol
(\ s a -> s{_pssUploadProtocol = a})
pssAccessToken :: Lens' ProjectsSubscriptionsSeek (Maybe Text)
pssAccessToken
= lens _pssAccessToken
(\ s a -> s{_pssAccessToken = a})
pssUploadType :: Lens' ProjectsSubscriptionsSeek (Maybe Text)
pssUploadType
= lens _pssUploadType
(\ s a -> s{_pssUploadType = a})
pssPayload :: Lens' ProjectsSubscriptionsSeek SeekRequest
pssPayload
= lens _pssPayload (\ s a -> s{_pssPayload = a})
pssSubscription :: Lens' ProjectsSubscriptionsSeek Text
pssSubscription
= lens _pssSubscription
(\ s a -> s{_pssSubscription = a})
pssCallback :: Lens' ProjectsSubscriptionsSeek (Maybe Text)
pssCallback
= lens _pssCallback (\ s a -> s{_pssCallback = a})
instance GoogleRequest ProjectsSubscriptionsSeek
where
type Rs ProjectsSubscriptionsSeek = SeekResponse
type Scopes ProjectsSubscriptionsSeek =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/pubsub"]
requestClient ProjectsSubscriptionsSeek'{..}
= go _pssSubscription _pssXgafv _pssUploadProtocol
_pssAccessToken
_pssUploadType
_pssCallback
(Just AltJSON)
_pssPayload
pubSubService
where go
= buildClient
(Proxy :: Proxy ProjectsSubscriptionsSeekResource)
mempty