{-# 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.CloudScheduler.Projects.Locations.Jobs.Pause
(
ProjectsLocationsJobsPauseResource
, projectsLocationsJobsPause
, ProjectsLocationsJobsPause
, proXgafv
, proUploadProtocol
, proAccessToken
, proUploadType
, proPayload
, proName
, proCallback
) where
import Network.Google.CloudScheduler.Types
import Network.Google.Prelude
type ProjectsLocationsJobsPauseResource =
"v1beta1" :>
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] PauseJobRequest :> Post '[JSON] Job
data ProjectsLocationsJobsPause = ProjectsLocationsJobsPause'
{ _proXgafv :: !(Maybe Xgafv)
, _proUploadProtocol :: !(Maybe Text)
, _proAccessToken :: !(Maybe Text)
, _proUploadType :: !(Maybe Text)
, _proPayload :: !PauseJobRequest
, _proName :: !Text
, _proCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsLocationsJobsPause
:: PauseJobRequest
-> Text
-> ProjectsLocationsJobsPause
projectsLocationsJobsPause pProPayload_ pProName_ =
ProjectsLocationsJobsPause'
{ _proXgafv = Nothing
, _proUploadProtocol = Nothing
, _proAccessToken = Nothing
, _proUploadType = Nothing
, _proPayload = pProPayload_
, _proName = pProName_
, _proCallback = Nothing
}
proXgafv :: Lens' ProjectsLocationsJobsPause (Maybe Xgafv)
proXgafv = lens _proXgafv (\ s a -> s{_proXgafv = a})
proUploadProtocol :: Lens' ProjectsLocationsJobsPause (Maybe Text)
proUploadProtocol
= lens _proUploadProtocol
(\ s a -> s{_proUploadProtocol = a})
proAccessToken :: Lens' ProjectsLocationsJobsPause (Maybe Text)
proAccessToken
= lens _proAccessToken
(\ s a -> s{_proAccessToken = a})
proUploadType :: Lens' ProjectsLocationsJobsPause (Maybe Text)
proUploadType
= lens _proUploadType
(\ s a -> s{_proUploadType = a})
proPayload :: Lens' ProjectsLocationsJobsPause PauseJobRequest
proPayload
= lens _proPayload (\ s a -> s{_proPayload = a})
proName :: Lens' ProjectsLocationsJobsPause Text
proName = lens _proName (\ s a -> s{_proName = a})
proCallback :: Lens' ProjectsLocationsJobsPause (Maybe Text)
proCallback
= lens _proCallback (\ s a -> s{_proCallback = a})
instance GoogleRequest ProjectsLocationsJobsPause
where
type Rs ProjectsLocationsJobsPause = Job
type Scopes ProjectsLocationsJobsPause =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsLocationsJobsPause'{..}
= go _proName _proXgafv _proUploadProtocol
_proAccessToken
_proUploadType
_proCallback
(Just AltJSON)
_proPayload
cloudSchedulerService
where go
= buildClient
(Proxy :: Proxy ProjectsLocationsJobsPauseResource)
mempty