{-# 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.Templates.Launch
(
ProjectsTemplatesLaunchResource
, projectsTemplatesLaunch
, ProjectsTemplatesLaunch
, ptlXgafv
, ptlValidateOnly
, ptlUploadProtocol
, ptlLocation
, ptlAccessToken
, ptlUploadType
, ptlPayload
, ptlDynamicTemplateStagingLocation
, ptlGcsPath
, ptlProjectId
, ptlCallback
, ptlDynamicTemplateGcsPath
) where
import Network.Google.Dataflow.Types
import Network.Google.Prelude
type ProjectsTemplatesLaunchResource =
"v1b3" :>
"projects" :>
Capture "projectId" Text :>
"templates:launch" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "validateOnly" Bool :>
QueryParam "upload_protocol" Text :>
QueryParam "location" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "dynamicTemplate.stagingLocation" Text :>
QueryParam "gcsPath" Text :>
QueryParam "callback" Text :>
QueryParam "dynamicTemplate.gcsPath" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] LaunchTemplateParameters :>
Post '[JSON] LaunchTemplateResponse
data ProjectsTemplatesLaunch = ProjectsTemplatesLaunch'
{ _ptlXgafv :: !(Maybe Xgafv)
, _ptlValidateOnly :: !(Maybe Bool)
, _ptlUploadProtocol :: !(Maybe Text)
, _ptlLocation :: !(Maybe Text)
, _ptlAccessToken :: !(Maybe Text)
, _ptlUploadType :: !(Maybe Text)
, _ptlPayload :: !LaunchTemplateParameters
, _ptlDynamicTemplateStagingLocation :: !(Maybe Text)
, _ptlGcsPath :: !(Maybe Text)
, _ptlProjectId :: !Text
, _ptlCallback :: !(Maybe Text)
, _ptlDynamicTemplateGcsPath :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsTemplatesLaunch
:: LaunchTemplateParameters
-> Text
-> ProjectsTemplatesLaunch
projectsTemplatesLaunch pPtlPayload_ pPtlProjectId_ =
ProjectsTemplatesLaunch'
{ _ptlXgafv = Nothing
, _ptlValidateOnly = Nothing
, _ptlUploadProtocol = Nothing
, _ptlLocation = Nothing
, _ptlAccessToken = Nothing
, _ptlUploadType = Nothing
, _ptlPayload = pPtlPayload_
, _ptlDynamicTemplateStagingLocation = Nothing
, _ptlGcsPath = Nothing
, _ptlProjectId = pPtlProjectId_
, _ptlCallback = Nothing
, _ptlDynamicTemplateGcsPath = Nothing
}
ptlXgafv :: Lens' ProjectsTemplatesLaunch (Maybe Xgafv)
ptlXgafv = lens _ptlXgafv (\ s a -> s{_ptlXgafv = a})
ptlValidateOnly :: Lens' ProjectsTemplatesLaunch (Maybe Bool)
ptlValidateOnly
= lens _ptlValidateOnly
(\ s a -> s{_ptlValidateOnly = a})
ptlUploadProtocol :: Lens' ProjectsTemplatesLaunch (Maybe Text)
ptlUploadProtocol
= lens _ptlUploadProtocol
(\ s a -> s{_ptlUploadProtocol = a})
ptlLocation :: Lens' ProjectsTemplatesLaunch (Maybe Text)
ptlLocation
= lens _ptlLocation (\ s a -> s{_ptlLocation = a})
ptlAccessToken :: Lens' ProjectsTemplatesLaunch (Maybe Text)
ptlAccessToken
= lens _ptlAccessToken
(\ s a -> s{_ptlAccessToken = a})
ptlUploadType :: Lens' ProjectsTemplatesLaunch (Maybe Text)
ptlUploadType
= lens _ptlUploadType
(\ s a -> s{_ptlUploadType = a})
ptlPayload :: Lens' ProjectsTemplatesLaunch LaunchTemplateParameters
ptlPayload
= lens _ptlPayload (\ s a -> s{_ptlPayload = a})
ptlDynamicTemplateStagingLocation :: Lens' ProjectsTemplatesLaunch (Maybe Text)
ptlDynamicTemplateStagingLocation
= lens _ptlDynamicTemplateStagingLocation
(\ s a -> s{_ptlDynamicTemplateStagingLocation = a})
ptlGcsPath :: Lens' ProjectsTemplatesLaunch (Maybe Text)
ptlGcsPath
= lens _ptlGcsPath (\ s a -> s{_ptlGcsPath = a})
ptlProjectId :: Lens' ProjectsTemplatesLaunch Text
ptlProjectId
= lens _ptlProjectId (\ s a -> s{_ptlProjectId = a})
ptlCallback :: Lens' ProjectsTemplatesLaunch (Maybe Text)
ptlCallback
= lens _ptlCallback (\ s a -> s{_ptlCallback = a})
ptlDynamicTemplateGcsPath :: Lens' ProjectsTemplatesLaunch (Maybe Text)
ptlDynamicTemplateGcsPath
= lens _ptlDynamicTemplateGcsPath
(\ s a -> s{_ptlDynamicTemplateGcsPath = a})
instance GoogleRequest ProjectsTemplatesLaunch where
type Rs ProjectsTemplatesLaunch =
LaunchTemplateResponse
type Scopes ProjectsTemplatesLaunch =
'["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 ProjectsTemplatesLaunch'{..}
= go _ptlProjectId _ptlXgafv _ptlValidateOnly
_ptlUploadProtocol
_ptlLocation
_ptlAccessToken
_ptlUploadType
_ptlDynamicTemplateStagingLocation
_ptlGcsPath
_ptlCallback
_ptlDynamicTemplateGcsPath
(Just AltJSON)
_ptlPayload
dataflowService
where go
= buildClient
(Proxy :: Proxy ProjectsTemplatesLaunchResource)
mempty