{-# 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.Locations.WorkflowTemplates.Create
(
ProjectsLocationsWorkflowTemplatesCreateResource
, projectsLocationsWorkflowTemplatesCreate
, ProjectsLocationsWorkflowTemplatesCreate
, plwtcParent
, plwtcXgafv
, plwtcUploadProtocol
, plwtcAccessToken
, plwtcUploadType
, plwtcPayload
, plwtcCallback
) where
import Network.Google.Dataproc.Types
import Network.Google.Prelude
type ProjectsLocationsWorkflowTemplatesCreateResource
=
"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 ProjectsLocationsWorkflowTemplatesCreate = ProjectsLocationsWorkflowTemplatesCreate'
{ _plwtcParent :: !Text
, _plwtcXgafv :: !(Maybe Xgafv)
, _plwtcUploadProtocol :: !(Maybe Text)
, _plwtcAccessToken :: !(Maybe Text)
, _plwtcUploadType :: !(Maybe Text)
, _plwtcPayload :: !WorkflowTemplate
, _plwtcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsLocationsWorkflowTemplatesCreate
:: Text
-> WorkflowTemplate
-> ProjectsLocationsWorkflowTemplatesCreate
projectsLocationsWorkflowTemplatesCreate pPlwtcParent_ pPlwtcPayload_ =
ProjectsLocationsWorkflowTemplatesCreate'
{ _plwtcParent = pPlwtcParent_
, _plwtcXgafv = Nothing
, _plwtcUploadProtocol = Nothing
, _plwtcAccessToken = Nothing
, _plwtcUploadType = Nothing
, _plwtcPayload = pPlwtcPayload_
, _plwtcCallback = Nothing
}
plwtcParent :: Lens' ProjectsLocationsWorkflowTemplatesCreate Text
plwtcParent
= lens _plwtcParent (\ s a -> s{_plwtcParent = a})
plwtcXgafv :: Lens' ProjectsLocationsWorkflowTemplatesCreate (Maybe Xgafv)
plwtcXgafv
= lens _plwtcXgafv (\ s a -> s{_plwtcXgafv = a})
plwtcUploadProtocol :: Lens' ProjectsLocationsWorkflowTemplatesCreate (Maybe Text)
plwtcUploadProtocol
= lens _plwtcUploadProtocol
(\ s a -> s{_plwtcUploadProtocol = a})
plwtcAccessToken :: Lens' ProjectsLocationsWorkflowTemplatesCreate (Maybe Text)
plwtcAccessToken
= lens _plwtcAccessToken
(\ s a -> s{_plwtcAccessToken = a})
plwtcUploadType :: Lens' ProjectsLocationsWorkflowTemplatesCreate (Maybe Text)
plwtcUploadType
= lens _plwtcUploadType
(\ s a -> s{_plwtcUploadType = a})
plwtcPayload :: Lens' ProjectsLocationsWorkflowTemplatesCreate WorkflowTemplate
plwtcPayload
= lens _plwtcPayload (\ s a -> s{_plwtcPayload = a})
plwtcCallback :: Lens' ProjectsLocationsWorkflowTemplatesCreate (Maybe Text)
plwtcCallback
= lens _plwtcCallback
(\ s a -> s{_plwtcCallback = a})
instance GoogleRequest
ProjectsLocationsWorkflowTemplatesCreate where
type Rs ProjectsLocationsWorkflowTemplatesCreate =
WorkflowTemplate
type Scopes ProjectsLocationsWorkflowTemplatesCreate
= '["https://www.googleapis.com/auth/cloud-platform"]
requestClient
ProjectsLocationsWorkflowTemplatesCreate'{..}
= go _plwtcParent _plwtcXgafv _plwtcUploadProtocol
_plwtcAccessToken
_plwtcUploadType
_plwtcCallback
(Just AltJSON)
_plwtcPayload
dataprocService
where go
= buildClient
(Proxy ::
Proxy
ProjectsLocationsWorkflowTemplatesCreateResource)
mempty