{-# 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.Templates.Create
(
ProjectsLocationsTemplatesCreateResource
, projectsLocationsTemplatesCreate
, ProjectsLocationsTemplatesCreate
, pltcXgafv
, pltcUploadProtocol
, pltcLocation
, pltcAccessToken
, pltcUploadType
, pltcPayload
, pltcProjectId
, pltcCallback
) where
import Network.Google.Dataflow.Types
import Network.Google.Prelude
type ProjectsLocationsTemplatesCreateResource =
"v1b3" :>
"projects" :>
Capture "projectId" Text :>
"locations" :>
Capture "location" Text :>
"templates" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CreateJobFromTemplateRequest :>
Post '[JSON] Job
data ProjectsLocationsTemplatesCreate = ProjectsLocationsTemplatesCreate'
{ _pltcXgafv :: !(Maybe Xgafv)
, _pltcUploadProtocol :: !(Maybe Text)
, _pltcLocation :: !Text
, _pltcAccessToken :: !(Maybe Text)
, _pltcUploadType :: !(Maybe Text)
, _pltcPayload :: !CreateJobFromTemplateRequest
, _pltcProjectId :: !Text
, _pltcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsLocationsTemplatesCreate
:: Text
-> CreateJobFromTemplateRequest
-> Text
-> ProjectsLocationsTemplatesCreate
projectsLocationsTemplatesCreate pPltcLocation_ pPltcPayload_ pPltcProjectId_ =
ProjectsLocationsTemplatesCreate'
{ _pltcXgafv = Nothing
, _pltcUploadProtocol = Nothing
, _pltcLocation = pPltcLocation_
, _pltcAccessToken = Nothing
, _pltcUploadType = Nothing
, _pltcPayload = pPltcPayload_
, _pltcProjectId = pPltcProjectId_
, _pltcCallback = Nothing
}
pltcXgafv :: Lens' ProjectsLocationsTemplatesCreate (Maybe Xgafv)
pltcXgafv
= lens _pltcXgafv (\ s a -> s{_pltcXgafv = a})
pltcUploadProtocol :: Lens' ProjectsLocationsTemplatesCreate (Maybe Text)
pltcUploadProtocol
= lens _pltcUploadProtocol
(\ s a -> s{_pltcUploadProtocol = a})
pltcLocation :: Lens' ProjectsLocationsTemplatesCreate Text
pltcLocation
= lens _pltcLocation (\ s a -> s{_pltcLocation = a})
pltcAccessToken :: Lens' ProjectsLocationsTemplatesCreate (Maybe Text)
pltcAccessToken
= lens _pltcAccessToken
(\ s a -> s{_pltcAccessToken = a})
pltcUploadType :: Lens' ProjectsLocationsTemplatesCreate (Maybe Text)
pltcUploadType
= lens _pltcUploadType
(\ s a -> s{_pltcUploadType = a})
pltcPayload :: Lens' ProjectsLocationsTemplatesCreate CreateJobFromTemplateRequest
pltcPayload
= lens _pltcPayload (\ s a -> s{_pltcPayload = a})
pltcProjectId :: Lens' ProjectsLocationsTemplatesCreate Text
pltcProjectId
= lens _pltcProjectId
(\ s a -> s{_pltcProjectId = a})
pltcCallback :: Lens' ProjectsLocationsTemplatesCreate (Maybe Text)
pltcCallback
= lens _pltcCallback (\ s a -> s{_pltcCallback = a})
instance GoogleRequest
ProjectsLocationsTemplatesCreate where
type Rs ProjectsLocationsTemplatesCreate = Job
type Scopes ProjectsLocationsTemplatesCreate =
'["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 ProjectsLocationsTemplatesCreate'{..}
= go _pltcProjectId _pltcLocation _pltcXgafv
_pltcUploadProtocol
_pltcAccessToken
_pltcUploadType
_pltcCallback
(Just AltJSON)
_pltcPayload
dataflowService
where go
= buildClient
(Proxy ::
Proxy ProjectsLocationsTemplatesCreateResource)
mempty