{-# 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.CloudTasks.Projects.Locations.Queues.Pause
(
ProjectsLocationsQueuesPauseResource
, projectsLocationsQueuesPause
, ProjectsLocationsQueuesPause
, proXgafv
, proUploadProtocol
, proAccessToken
, proUploadType
, proPayload
, proName
, proCallback
) where
import Network.Google.CloudTasks.Types
import Network.Google.Prelude
type ProjectsLocationsQueuesPauseResource =
"v2beta3" :>
CaptureMode "name" "pause" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] PauseQueueRequest :>
Post '[JSON] Queue
data ProjectsLocationsQueuesPause = ProjectsLocationsQueuesPause'
{ _proXgafv :: !(Maybe Xgafv)
, _proUploadProtocol :: !(Maybe Text)
, _proAccessToken :: !(Maybe Text)
, _proUploadType :: !(Maybe Text)
, _proPayload :: !PauseQueueRequest
, _proName :: !Text
, _proCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsLocationsQueuesPause
:: PauseQueueRequest
-> Text
-> ProjectsLocationsQueuesPause
projectsLocationsQueuesPause pProPayload_ pProName_ =
ProjectsLocationsQueuesPause'
{ _proXgafv = Nothing
, _proUploadProtocol = Nothing
, _proAccessToken = Nothing
, _proUploadType = Nothing
, _proPayload = pProPayload_
, _proName = pProName_
, _proCallback = Nothing
}
proXgafv :: Lens' ProjectsLocationsQueuesPause (Maybe Xgafv)
proXgafv = lens _proXgafv (\ s a -> s{_proXgafv = a})
proUploadProtocol :: Lens' ProjectsLocationsQueuesPause (Maybe Text)
proUploadProtocol
= lens _proUploadProtocol
(\ s a -> s{_proUploadProtocol = a})
proAccessToken :: Lens' ProjectsLocationsQueuesPause (Maybe Text)
proAccessToken
= lens _proAccessToken
(\ s a -> s{_proAccessToken = a})
proUploadType :: Lens' ProjectsLocationsQueuesPause (Maybe Text)
proUploadType
= lens _proUploadType
(\ s a -> s{_proUploadType = a})
proPayload :: Lens' ProjectsLocationsQueuesPause PauseQueueRequest
proPayload
= lens _proPayload (\ s a -> s{_proPayload = a})
proName :: Lens' ProjectsLocationsQueuesPause Text
proName = lens _proName (\ s a -> s{_proName = a})
proCallback :: Lens' ProjectsLocationsQueuesPause (Maybe Text)
proCallback
= lens _proCallback (\ s a -> s{_proCallback = a})
instance GoogleRequest ProjectsLocationsQueuesPause
where
type Rs ProjectsLocationsQueuesPause = Queue
type Scopes ProjectsLocationsQueuesPause =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsLocationsQueuesPause'{..}
= go _proName _proXgafv _proUploadProtocol
_proAccessToken
_proUploadType
_proCallback
(Just AltJSON)
_proPayload
cloudTasksService
where go
= buildClient
(Proxy :: Proxy ProjectsLocationsQueuesPauseResource)
mempty