{-# 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.SetDefault
(
ProjectsModelsVersionsSetDefaultResource
, projectsModelsVersionsSetDefault
, ProjectsModelsVersionsSetDefault
, pmvsdXgafv
, pmvsdUploadProtocol
, pmvsdAccessToken
, pmvsdUploadType
, pmvsdPayload
, pmvsdName
, pmvsdCallback
) where
import Network.Google.MachineLearning.Types
import Network.Google.Prelude
type ProjectsModelsVersionsSetDefaultResource =
"v1" :>
CaptureMode "name" "setDefault" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON]
GoogleCloudMlV1__SetDefaultVersionRequest
:> Post '[JSON] GoogleCloudMlV1__Version
data ProjectsModelsVersionsSetDefault = ProjectsModelsVersionsSetDefault'
{ _pmvsdXgafv :: !(Maybe Xgafv)
, _pmvsdUploadProtocol :: !(Maybe Text)
, _pmvsdAccessToken :: !(Maybe Text)
, _pmvsdUploadType :: !(Maybe Text)
, _pmvsdPayload :: !GoogleCloudMlV1__SetDefaultVersionRequest
, _pmvsdName :: !Text
, _pmvsdCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsModelsVersionsSetDefault
:: GoogleCloudMlV1__SetDefaultVersionRequest
-> Text
-> ProjectsModelsVersionsSetDefault
projectsModelsVersionsSetDefault pPmvsdPayload_ pPmvsdName_ =
ProjectsModelsVersionsSetDefault'
{ _pmvsdXgafv = Nothing
, _pmvsdUploadProtocol = Nothing
, _pmvsdAccessToken = Nothing
, _pmvsdUploadType = Nothing
, _pmvsdPayload = pPmvsdPayload_
, _pmvsdName = pPmvsdName_
, _pmvsdCallback = Nothing
}
pmvsdXgafv :: Lens' ProjectsModelsVersionsSetDefault (Maybe Xgafv)
pmvsdXgafv
= lens _pmvsdXgafv (\ s a -> s{_pmvsdXgafv = a})
pmvsdUploadProtocol :: Lens' ProjectsModelsVersionsSetDefault (Maybe Text)
pmvsdUploadProtocol
= lens _pmvsdUploadProtocol
(\ s a -> s{_pmvsdUploadProtocol = a})
pmvsdAccessToken :: Lens' ProjectsModelsVersionsSetDefault (Maybe Text)
pmvsdAccessToken
= lens _pmvsdAccessToken
(\ s a -> s{_pmvsdAccessToken = a})
pmvsdUploadType :: Lens' ProjectsModelsVersionsSetDefault (Maybe Text)
pmvsdUploadType
= lens _pmvsdUploadType
(\ s a -> s{_pmvsdUploadType = a})
pmvsdPayload :: Lens' ProjectsModelsVersionsSetDefault GoogleCloudMlV1__SetDefaultVersionRequest
pmvsdPayload
= lens _pmvsdPayload (\ s a -> s{_pmvsdPayload = a})
pmvsdName :: Lens' ProjectsModelsVersionsSetDefault Text
pmvsdName
= lens _pmvsdName (\ s a -> s{_pmvsdName = a})
pmvsdCallback :: Lens' ProjectsModelsVersionsSetDefault (Maybe Text)
pmvsdCallback
= lens _pmvsdCallback
(\ s a -> s{_pmvsdCallback = a})
instance GoogleRequest
ProjectsModelsVersionsSetDefault where
type Rs ProjectsModelsVersionsSetDefault =
GoogleCloudMlV1__Version
type Scopes ProjectsModelsVersionsSetDefault =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsModelsVersionsSetDefault'{..}
= go _pmvsdName _pmvsdXgafv _pmvsdUploadProtocol
_pmvsdAccessToken
_pmvsdUploadType
_pmvsdCallback
(Just AltJSON)
_pmvsdPayload
machineLearningService
where go
= buildClient
(Proxy ::
Proxy ProjectsModelsVersionsSetDefaultResource)
mempty