{-# 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.Submit
(
ProjectsRegionsJobsSubmitResource
, projectsRegionsJobsSubmit
, ProjectsRegionsJobsSubmit
, prjsXgafv
, prjsUploadProtocol
, prjsAccessToken
, prjsUploadType
, prjsPayload
, prjsRegion
, prjsProjectId
, prjsCallback
) where
import Network.Google.Dataproc.Types
import Network.Google.Prelude
type ProjectsRegionsJobsSubmitResource =
"v1" :>
"projects" :>
Capture "projectId" Text :>
"regions" :>
Capture "region" Text :>
"jobs:submit" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] SubmitJobRequest :>
Post '[JSON] Job
data ProjectsRegionsJobsSubmit = ProjectsRegionsJobsSubmit'
{ _prjsXgafv :: !(Maybe Xgafv)
, _prjsUploadProtocol :: !(Maybe Text)
, _prjsAccessToken :: !(Maybe Text)
, _prjsUploadType :: !(Maybe Text)
, _prjsPayload :: !SubmitJobRequest
, _prjsRegion :: !Text
, _prjsProjectId :: !Text
, _prjsCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsRegionsJobsSubmit
:: SubmitJobRequest
-> Text
-> Text
-> ProjectsRegionsJobsSubmit
projectsRegionsJobsSubmit pPrjsPayload_ pPrjsRegion_ pPrjsProjectId_ =
ProjectsRegionsJobsSubmit'
{ _prjsXgafv = Nothing
, _prjsUploadProtocol = Nothing
, _prjsAccessToken = Nothing
, _prjsUploadType = Nothing
, _prjsPayload = pPrjsPayload_
, _prjsRegion = pPrjsRegion_
, _prjsProjectId = pPrjsProjectId_
, _prjsCallback = Nothing
}
prjsXgafv :: Lens' ProjectsRegionsJobsSubmit (Maybe Xgafv)
prjsXgafv
= lens _prjsXgafv (\ s a -> s{_prjsXgafv = a})
prjsUploadProtocol :: Lens' ProjectsRegionsJobsSubmit (Maybe Text)
prjsUploadProtocol
= lens _prjsUploadProtocol
(\ s a -> s{_prjsUploadProtocol = a})
prjsAccessToken :: Lens' ProjectsRegionsJobsSubmit (Maybe Text)
prjsAccessToken
= lens _prjsAccessToken
(\ s a -> s{_prjsAccessToken = a})
prjsUploadType :: Lens' ProjectsRegionsJobsSubmit (Maybe Text)
prjsUploadType
= lens _prjsUploadType
(\ s a -> s{_prjsUploadType = a})
prjsPayload :: Lens' ProjectsRegionsJobsSubmit SubmitJobRequest
prjsPayload
= lens _prjsPayload (\ s a -> s{_prjsPayload = a})
prjsRegion :: Lens' ProjectsRegionsJobsSubmit Text
prjsRegion
= lens _prjsRegion (\ s a -> s{_prjsRegion = a})
prjsProjectId :: Lens' ProjectsRegionsJobsSubmit Text
prjsProjectId
= lens _prjsProjectId
(\ s a -> s{_prjsProjectId = a})
prjsCallback :: Lens' ProjectsRegionsJobsSubmit (Maybe Text)
prjsCallback
= lens _prjsCallback (\ s a -> s{_prjsCallback = a})
instance GoogleRequest ProjectsRegionsJobsSubmit
where
type Rs ProjectsRegionsJobsSubmit = Job
type Scopes ProjectsRegionsJobsSubmit =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsRegionsJobsSubmit'{..}
= go _prjsProjectId _prjsRegion _prjsXgafv
_prjsUploadProtocol
_prjsAccessToken
_prjsUploadType
_prjsCallback
(Just AltJSON)
_prjsPayload
dataprocService
where go
= buildClient
(Proxy :: Proxy ProjectsRegionsJobsSubmitResource)
mempty