{-# 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.Dataflow.Projects.Locations.Jobs.Create
(
ProjectsLocationsJobsCreateResource
, projectsLocationsJobsCreate
, ProjectsLocationsJobsCreate
, pljcXgafv
, pljcUploadProtocol
, pljcLocation
, pljcAccessToken
, pljcUploadType
, pljcPayload
, pljcView
, pljcProjectId
, pljcReplaceJobId
, pljcCallback
) where
import Network.Google.Dataflow.Types
import Network.Google.Prelude
type ProjectsLocationsJobsCreateResource =
"v1b3" :>
"projects" :>
Capture "projectId" Text :>
"locations" :>
Capture "location" Text :>
"jobs" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "view" Text :>
QueryParam "replaceJobId" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Job :> Post '[JSON] Job
data ProjectsLocationsJobsCreate = ProjectsLocationsJobsCreate'
{ _pljcXgafv :: !(Maybe Xgafv)
, _pljcUploadProtocol :: !(Maybe Text)
, _pljcLocation :: !Text
, _pljcAccessToken :: !(Maybe Text)
, _pljcUploadType :: !(Maybe Text)
, _pljcPayload :: !Job
, _pljcView :: !(Maybe Text)
, _pljcProjectId :: !Text
, _pljcReplaceJobId :: !(Maybe Text)
, _pljcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsLocationsJobsCreate
:: Text
-> Job
-> Text
-> ProjectsLocationsJobsCreate
projectsLocationsJobsCreate pPljcLocation_ pPljcPayload_ pPljcProjectId_ =
ProjectsLocationsJobsCreate'
{ _pljcXgafv = Nothing
, _pljcUploadProtocol = Nothing
, _pljcLocation = pPljcLocation_
, _pljcAccessToken = Nothing
, _pljcUploadType = Nothing
, _pljcPayload = pPljcPayload_
, _pljcView = Nothing
, _pljcProjectId = pPljcProjectId_
, _pljcReplaceJobId = Nothing
, _pljcCallback = Nothing
}
pljcXgafv :: Lens' ProjectsLocationsJobsCreate (Maybe Xgafv)
pljcXgafv
= lens _pljcXgafv (\ s a -> s{_pljcXgafv = a})
pljcUploadProtocol :: Lens' ProjectsLocationsJobsCreate (Maybe Text)
pljcUploadProtocol
= lens _pljcUploadProtocol
(\ s a -> s{_pljcUploadProtocol = a})
pljcLocation :: Lens' ProjectsLocationsJobsCreate Text
pljcLocation
= lens _pljcLocation (\ s a -> s{_pljcLocation = a})
pljcAccessToken :: Lens' ProjectsLocationsJobsCreate (Maybe Text)
pljcAccessToken
= lens _pljcAccessToken
(\ s a -> s{_pljcAccessToken = a})
pljcUploadType :: Lens' ProjectsLocationsJobsCreate (Maybe Text)
pljcUploadType
= lens _pljcUploadType
(\ s a -> s{_pljcUploadType = a})
pljcPayload :: Lens' ProjectsLocationsJobsCreate Job
pljcPayload
= lens _pljcPayload (\ s a -> s{_pljcPayload = a})
pljcView :: Lens' ProjectsLocationsJobsCreate (Maybe Text)
pljcView = lens _pljcView (\ s a -> s{_pljcView = a})
pljcProjectId :: Lens' ProjectsLocationsJobsCreate Text
pljcProjectId
= lens _pljcProjectId
(\ s a -> s{_pljcProjectId = a})
pljcReplaceJobId :: Lens' ProjectsLocationsJobsCreate (Maybe Text)
pljcReplaceJobId
= lens _pljcReplaceJobId
(\ s a -> s{_pljcReplaceJobId = a})
pljcCallback :: Lens' ProjectsLocationsJobsCreate (Maybe Text)
pljcCallback
= lens _pljcCallback (\ s a -> s{_pljcCallback = a})
instance GoogleRequest ProjectsLocationsJobsCreate
where
type Rs ProjectsLocationsJobsCreate = Job
type Scopes ProjectsLocationsJobsCreate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly",
"https://www.googleapis.com/auth/userinfo.email"]
requestClient ProjectsLocationsJobsCreate'{..}
= go _pljcProjectId _pljcLocation _pljcXgafv
_pljcUploadProtocol
_pljcAccessToken
_pljcUploadType
_pljcView
_pljcReplaceJobId
_pljcCallback
(Just AltJSON)
_pljcPayload
dataflowService
where go
= buildClient
(Proxy :: Proxy ProjectsLocationsJobsCreateResource)
mempty