{-# 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.Dataproc.Projects.Regions.Jobs.Cancel
(
ProjectsRegionsJobsCancelResource
, projectsRegionsJobsCancel
, ProjectsRegionsJobsCancel
, prjcXgafv
, prjcJobId
, prjcUploadProtocol
, prjcAccessToken
, prjcUploadType
, prjcPayload
, prjcRegion
, prjcProjectId
, prjcCallback
) where
import Network.Google.Dataproc.Types
import Network.Google.Prelude
type ProjectsRegionsJobsCancelResource =
"v1" :>
"projects" :>
Capture "projectId" Text :>
"regions" :>
Capture "region" Text :>
"jobs" :>
CaptureMode "jobId" "cancel" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CancelJobRequest :>
Post '[JSON] Job
data ProjectsRegionsJobsCancel = ProjectsRegionsJobsCancel'
{ _prjcXgafv :: !(Maybe Xgafv)
, _prjcJobId :: !Text
, _prjcUploadProtocol :: !(Maybe Text)
, _prjcAccessToken :: !(Maybe Text)
, _prjcUploadType :: !(Maybe Text)
, _prjcPayload :: !CancelJobRequest
, _prjcRegion :: !Text
, _prjcProjectId :: !Text
, _prjcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsRegionsJobsCancel
:: Text
-> CancelJobRequest
-> Text
-> Text
-> ProjectsRegionsJobsCancel
projectsRegionsJobsCancel pPrjcJobId_ pPrjcPayload_ pPrjcRegion_ pPrjcProjectId_ =
ProjectsRegionsJobsCancel'
{ _prjcXgafv = Nothing
, _prjcJobId = pPrjcJobId_
, _prjcUploadProtocol = Nothing
, _prjcAccessToken = Nothing
, _prjcUploadType = Nothing
, _prjcPayload = pPrjcPayload_
, _prjcRegion = pPrjcRegion_
, _prjcProjectId = pPrjcProjectId_
, _prjcCallback = Nothing
}
prjcXgafv :: Lens' ProjectsRegionsJobsCancel (Maybe Xgafv)
prjcXgafv
= lens _prjcXgafv (\ s a -> s{_prjcXgafv = a})
prjcJobId :: Lens' ProjectsRegionsJobsCancel Text
prjcJobId
= lens _prjcJobId (\ s a -> s{_prjcJobId = a})
prjcUploadProtocol :: Lens' ProjectsRegionsJobsCancel (Maybe Text)
prjcUploadProtocol
= lens _prjcUploadProtocol
(\ s a -> s{_prjcUploadProtocol = a})
prjcAccessToken :: Lens' ProjectsRegionsJobsCancel (Maybe Text)
prjcAccessToken
= lens _prjcAccessToken
(\ s a -> s{_prjcAccessToken = a})
prjcUploadType :: Lens' ProjectsRegionsJobsCancel (Maybe Text)
prjcUploadType
= lens _prjcUploadType
(\ s a -> s{_prjcUploadType = a})
prjcPayload :: Lens' ProjectsRegionsJobsCancel CancelJobRequest
prjcPayload
= lens _prjcPayload (\ s a -> s{_prjcPayload = a})
prjcRegion :: Lens' ProjectsRegionsJobsCancel Text
prjcRegion
= lens _prjcRegion (\ s a -> s{_prjcRegion = a})
prjcProjectId :: Lens' ProjectsRegionsJobsCancel Text
prjcProjectId
= lens _prjcProjectId
(\ s a -> s{_prjcProjectId = a})
prjcCallback :: Lens' ProjectsRegionsJobsCancel (Maybe Text)
prjcCallback
= lens _prjcCallback (\ s a -> s{_prjcCallback = a})
instance GoogleRequest ProjectsRegionsJobsCancel
where
type Rs ProjectsRegionsJobsCancel = Job
type Scopes ProjectsRegionsJobsCancel =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsRegionsJobsCancel'{..}
= go _prjcProjectId _prjcRegion _prjcJobId _prjcXgafv
_prjcUploadProtocol
_prjcAccessToken
_prjcUploadType
_prjcCallback
(Just AltJSON)
_prjcPayload
dataprocService
where go
= buildClient
(Proxy :: Proxy ProjectsRegionsJobsCancelResource)
mempty