{-# 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.Ml.Projects.Jobs.Create
(
ProjectsJobsCreateResource
, projectsJobsCreate
, ProjectsJobsCreate
, pParent
, pXgafv
, pUploadProtocol
, pAccessToken
, pUploadType
, pPayload
, pCallback
) where
import Network.Google.MachineLearning.Types
import Network.Google.Prelude
type ProjectsJobsCreateResource =
"v1" :>
Capture "parent" Text :>
"jobs" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] GoogleCloudMlV1__Job :>
Post '[JSON] GoogleCloudMlV1__Job
data ProjectsJobsCreate = ProjectsJobsCreate'
{ _pParent :: !Text
, _pXgafv :: !(Maybe Xgafv)
, _pUploadProtocol :: !(Maybe Text)
, _pAccessToken :: !(Maybe Text)
, _pUploadType :: !(Maybe Text)
, _pPayload :: !GoogleCloudMlV1__Job
, _pCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsJobsCreate
:: Text
-> GoogleCloudMlV1__Job
-> ProjectsJobsCreate
projectsJobsCreate pPParent_ pPPayload_ =
ProjectsJobsCreate'
{ _pParent = pPParent_
, _pXgafv = Nothing
, _pUploadProtocol = Nothing
, _pAccessToken = Nothing
, _pUploadType = Nothing
, _pPayload = pPPayload_
, _pCallback = Nothing
}
pParent :: Lens' ProjectsJobsCreate Text
pParent = lens _pParent (\ s a -> s{_pParent = a})
pXgafv :: Lens' ProjectsJobsCreate (Maybe Xgafv)
pXgafv = lens _pXgafv (\ s a -> s{_pXgafv = a})
pUploadProtocol :: Lens' ProjectsJobsCreate (Maybe Text)
pUploadProtocol
= lens _pUploadProtocol
(\ s a -> s{_pUploadProtocol = a})
pAccessToken :: Lens' ProjectsJobsCreate (Maybe Text)
pAccessToken
= lens _pAccessToken (\ s a -> s{_pAccessToken = a})
pUploadType :: Lens' ProjectsJobsCreate (Maybe Text)
pUploadType
= lens _pUploadType (\ s a -> s{_pUploadType = a})
pPayload :: Lens' ProjectsJobsCreate GoogleCloudMlV1__Job
pPayload = lens _pPayload (\ s a -> s{_pPayload = a})
pCallback :: Lens' ProjectsJobsCreate (Maybe Text)
pCallback
= lens _pCallback (\ s a -> s{_pCallback = a})
instance GoogleRequest ProjectsJobsCreate where
type Rs ProjectsJobsCreate = GoogleCloudMlV1__Job
type Scopes ProjectsJobsCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsJobsCreate'{..}
= go _pParent _pXgafv _pUploadProtocol _pAccessToken
_pUploadType
_pCallback
(Just AltJSON)
_pPayload
machineLearningService
where go
= buildClient
(Proxy :: Proxy ProjectsJobsCreateResource)
mempty