{-# 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.Create
(
ProjectsModelsCreateResource
, projectsModelsCreate
, ProjectsModelsCreate
, pmcParent
, pmcXgafv
, pmcUploadProtocol
, pmcAccessToken
, pmcUploadType
, pmcPayload
, pmcCallback
) where
import Network.Google.MachineLearning.Types
import Network.Google.Prelude
type ProjectsModelsCreateResource =
"v1" :>
Capture "parent" Text :>
"models" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] GoogleCloudMlV1__Model :>
Post '[JSON] GoogleCloudMlV1__Model
data ProjectsModelsCreate = ProjectsModelsCreate'
{ _pmcParent :: !Text
, _pmcXgafv :: !(Maybe Xgafv)
, _pmcUploadProtocol :: !(Maybe Text)
, _pmcAccessToken :: !(Maybe Text)
, _pmcUploadType :: !(Maybe Text)
, _pmcPayload :: !GoogleCloudMlV1__Model
, _pmcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsModelsCreate
:: Text
-> GoogleCloudMlV1__Model
-> ProjectsModelsCreate
projectsModelsCreate pPmcParent_ pPmcPayload_ =
ProjectsModelsCreate'
{ _pmcParent = pPmcParent_
, _pmcXgafv = Nothing
, _pmcUploadProtocol = Nothing
, _pmcAccessToken = Nothing
, _pmcUploadType = Nothing
, _pmcPayload = pPmcPayload_
, _pmcCallback = Nothing
}
pmcParent :: Lens' ProjectsModelsCreate Text
pmcParent
= lens _pmcParent (\ s a -> s{_pmcParent = a})
pmcXgafv :: Lens' ProjectsModelsCreate (Maybe Xgafv)
pmcXgafv = lens _pmcXgafv (\ s a -> s{_pmcXgafv = a})
pmcUploadProtocol :: Lens' ProjectsModelsCreate (Maybe Text)
pmcUploadProtocol
= lens _pmcUploadProtocol
(\ s a -> s{_pmcUploadProtocol = a})
pmcAccessToken :: Lens' ProjectsModelsCreate (Maybe Text)
pmcAccessToken
= lens _pmcAccessToken
(\ s a -> s{_pmcAccessToken = a})
pmcUploadType :: Lens' ProjectsModelsCreate (Maybe Text)
pmcUploadType
= lens _pmcUploadType
(\ s a -> s{_pmcUploadType = a})
pmcPayload :: Lens' ProjectsModelsCreate GoogleCloudMlV1__Model
pmcPayload
= lens _pmcPayload (\ s a -> s{_pmcPayload = a})
pmcCallback :: Lens' ProjectsModelsCreate (Maybe Text)
pmcCallback
= lens _pmcCallback (\ s a -> s{_pmcCallback = a})
instance GoogleRequest ProjectsModelsCreate where
type Rs ProjectsModelsCreate = GoogleCloudMlV1__Model
type Scopes ProjectsModelsCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsModelsCreate'{..}
= go _pmcParent _pmcXgafv _pmcUploadProtocol
_pmcAccessToken
_pmcUploadType
_pmcCallback
(Just AltJSON)
_pmcPayload
machineLearningService
where go
= buildClient
(Proxy :: Proxy ProjectsModelsCreateResource)
mempty