{-# 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.Models.Versions.Create
(
ProjectsModelsVersionsCreateResource
, projectsModelsVersionsCreate
, ProjectsModelsVersionsCreate
, pmvcParent
, pmvcXgafv
, pmvcUploadProtocol
, pmvcAccessToken
, pmvcUploadType
, pmvcPayload
, pmvcCallback
) where
import Network.Google.MachineLearning.Types
import Network.Google.Prelude
type ProjectsModelsVersionsCreateResource =
"v1" :>
Capture "parent" Text :>
"versions" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] GoogleCloudMlV1__Version :>
Post '[JSON] GoogleLongrunning__Operation
data ProjectsModelsVersionsCreate = ProjectsModelsVersionsCreate'
{ _pmvcParent :: !Text
, _pmvcXgafv :: !(Maybe Xgafv)
, _pmvcUploadProtocol :: !(Maybe Text)
, _pmvcAccessToken :: !(Maybe Text)
, _pmvcUploadType :: !(Maybe Text)
, _pmvcPayload :: !GoogleCloudMlV1__Version
, _pmvcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsModelsVersionsCreate
:: Text
-> GoogleCloudMlV1__Version
-> ProjectsModelsVersionsCreate
projectsModelsVersionsCreate pPmvcParent_ pPmvcPayload_ =
ProjectsModelsVersionsCreate'
{ _pmvcParent = pPmvcParent_
, _pmvcXgafv = Nothing
, _pmvcUploadProtocol = Nothing
, _pmvcAccessToken = Nothing
, _pmvcUploadType = Nothing
, _pmvcPayload = pPmvcPayload_
, _pmvcCallback = Nothing
}
pmvcParent :: Lens' ProjectsModelsVersionsCreate Text
pmvcParent
= lens _pmvcParent (\ s a -> s{_pmvcParent = a})
pmvcXgafv :: Lens' ProjectsModelsVersionsCreate (Maybe Xgafv)
pmvcXgafv
= lens _pmvcXgafv (\ s a -> s{_pmvcXgafv = a})
pmvcUploadProtocol :: Lens' ProjectsModelsVersionsCreate (Maybe Text)
pmvcUploadProtocol
= lens _pmvcUploadProtocol
(\ s a -> s{_pmvcUploadProtocol = a})
pmvcAccessToken :: Lens' ProjectsModelsVersionsCreate (Maybe Text)
pmvcAccessToken
= lens _pmvcAccessToken
(\ s a -> s{_pmvcAccessToken = a})
pmvcUploadType :: Lens' ProjectsModelsVersionsCreate (Maybe Text)
pmvcUploadType
= lens _pmvcUploadType
(\ s a -> s{_pmvcUploadType = a})
pmvcPayload :: Lens' ProjectsModelsVersionsCreate GoogleCloudMlV1__Version
pmvcPayload
= lens _pmvcPayload (\ s a -> s{_pmvcPayload = a})
pmvcCallback :: Lens' ProjectsModelsVersionsCreate (Maybe Text)
pmvcCallback
= lens _pmvcCallback (\ s a -> s{_pmvcCallback = a})
instance GoogleRequest ProjectsModelsVersionsCreate
where
type Rs ProjectsModelsVersionsCreate =
GoogleLongrunning__Operation
type Scopes ProjectsModelsVersionsCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsModelsVersionsCreate'{..}
= go _pmvcParent _pmvcXgafv _pmvcUploadProtocol
_pmvcAccessToken
_pmvcUploadType
_pmvcCallback
(Just AltJSON)
_pmvcPayload
machineLearningService
where go
= buildClient
(Proxy :: Proxy ProjectsModelsVersionsCreateResource)
mempty