{-# 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.WorkflowTemplates.Create
(
ProjectsRegionsWorkflowTemplatesCreateResource
, projectsRegionsWorkflowTemplatesCreate
, ProjectsRegionsWorkflowTemplatesCreate
, prwtcParent
, prwtcXgafv
, prwtcUploadProtocol
, prwtcAccessToken
, prwtcUploadType
, prwtcPayload
, prwtcCallback
) where
import Network.Google.Dataproc.Types
import Network.Google.Prelude
type ProjectsRegionsWorkflowTemplatesCreateResource =
"v1" :>
Capture "parent" Text :>
"workflowTemplates" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] WorkflowTemplate :>
Post '[JSON] WorkflowTemplate
data ProjectsRegionsWorkflowTemplatesCreate = ProjectsRegionsWorkflowTemplatesCreate'
{ _prwtcParent :: !Text
, _prwtcXgafv :: !(Maybe Xgafv)
, _prwtcUploadProtocol :: !(Maybe Text)
, _prwtcAccessToken :: !(Maybe Text)
, _prwtcUploadType :: !(Maybe Text)
, _prwtcPayload :: !WorkflowTemplate
, _prwtcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsRegionsWorkflowTemplatesCreate
:: Text
-> WorkflowTemplate
-> ProjectsRegionsWorkflowTemplatesCreate
projectsRegionsWorkflowTemplatesCreate pPrwtcParent_ pPrwtcPayload_ =
ProjectsRegionsWorkflowTemplatesCreate'
{ _prwtcParent = pPrwtcParent_
, _prwtcXgafv = Nothing
, _prwtcUploadProtocol = Nothing
, _prwtcAccessToken = Nothing
, _prwtcUploadType = Nothing
, _prwtcPayload = pPrwtcPayload_
, _prwtcCallback = Nothing
}
prwtcParent :: Lens' ProjectsRegionsWorkflowTemplatesCreate Text
prwtcParent
= lens _prwtcParent (\ s a -> s{_prwtcParent = a})
prwtcXgafv :: Lens' ProjectsRegionsWorkflowTemplatesCreate (Maybe Xgafv)
prwtcXgafv
= lens _prwtcXgafv (\ s a -> s{_prwtcXgafv = a})
prwtcUploadProtocol :: Lens' ProjectsRegionsWorkflowTemplatesCreate (Maybe Text)
prwtcUploadProtocol
= lens _prwtcUploadProtocol
(\ s a -> s{_prwtcUploadProtocol = a})
prwtcAccessToken :: Lens' ProjectsRegionsWorkflowTemplatesCreate (Maybe Text)
prwtcAccessToken
= lens _prwtcAccessToken
(\ s a -> s{_prwtcAccessToken = a})
prwtcUploadType :: Lens' ProjectsRegionsWorkflowTemplatesCreate (Maybe Text)
prwtcUploadType
= lens _prwtcUploadType
(\ s a -> s{_prwtcUploadType = a})
prwtcPayload :: Lens' ProjectsRegionsWorkflowTemplatesCreate WorkflowTemplate
prwtcPayload
= lens _prwtcPayload (\ s a -> s{_prwtcPayload = a})
prwtcCallback :: Lens' ProjectsRegionsWorkflowTemplatesCreate (Maybe Text)
prwtcCallback
= lens _prwtcCallback
(\ s a -> s{_prwtcCallback = a})
instance GoogleRequest
ProjectsRegionsWorkflowTemplatesCreate where
type Rs ProjectsRegionsWorkflowTemplatesCreate =
WorkflowTemplate
type Scopes ProjectsRegionsWorkflowTemplatesCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient
ProjectsRegionsWorkflowTemplatesCreate'{..}
= go _prwtcParent _prwtcXgafv _prwtcUploadProtocol
_prwtcAccessToken
_prwtcUploadType
_prwtcCallback
(Just AltJSON)
_prwtcPayload
dataprocService
where go
= buildClient
(Proxy ::
Proxy ProjectsRegionsWorkflowTemplatesCreateResource)
mempty