{-# 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.Patch
(
ProjectsModelsPatchResource
, projectsModelsPatch
, ProjectsModelsPatch
, pmpXgafv
, pmpUploadProtocol
, pmpUpdateMask
, pmpAccessToken
, pmpUploadType
, pmpPayload
, pmpName
, pmpCallback
) where
import Network.Google.MachineLearning.Types
import Network.Google.Prelude
type ProjectsModelsPatchResource =
"v1" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "updateMask" GFieldMask :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] GoogleCloudMlV1__Model :>
Patch '[JSON] GoogleLongrunning__Operation
data ProjectsModelsPatch = ProjectsModelsPatch'
{ _pmpXgafv :: !(Maybe Xgafv)
, _pmpUploadProtocol :: !(Maybe Text)
, _pmpUpdateMask :: !(Maybe GFieldMask)
, _pmpAccessToken :: !(Maybe Text)
, _pmpUploadType :: !(Maybe Text)
, _pmpPayload :: !GoogleCloudMlV1__Model
, _pmpName :: !Text
, _pmpCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsModelsPatch
:: GoogleCloudMlV1__Model
-> Text
-> ProjectsModelsPatch
projectsModelsPatch pPmpPayload_ pPmpName_ =
ProjectsModelsPatch'
{ _pmpXgafv = Nothing
, _pmpUploadProtocol = Nothing
, _pmpUpdateMask = Nothing
, _pmpAccessToken = Nothing
, _pmpUploadType = Nothing
, _pmpPayload = pPmpPayload_
, _pmpName = pPmpName_
, _pmpCallback = Nothing
}
pmpXgafv :: Lens' ProjectsModelsPatch (Maybe Xgafv)
pmpXgafv = lens _pmpXgafv (\ s a -> s{_pmpXgafv = a})
pmpUploadProtocol :: Lens' ProjectsModelsPatch (Maybe Text)
pmpUploadProtocol
= lens _pmpUploadProtocol
(\ s a -> s{_pmpUploadProtocol = a})
pmpUpdateMask :: Lens' ProjectsModelsPatch (Maybe GFieldMask)
pmpUpdateMask
= lens _pmpUpdateMask
(\ s a -> s{_pmpUpdateMask = a})
pmpAccessToken :: Lens' ProjectsModelsPatch (Maybe Text)
pmpAccessToken
= lens _pmpAccessToken
(\ s a -> s{_pmpAccessToken = a})
pmpUploadType :: Lens' ProjectsModelsPatch (Maybe Text)
pmpUploadType
= lens _pmpUploadType
(\ s a -> s{_pmpUploadType = a})
pmpPayload :: Lens' ProjectsModelsPatch GoogleCloudMlV1__Model
pmpPayload
= lens _pmpPayload (\ s a -> s{_pmpPayload = a})
pmpName :: Lens' ProjectsModelsPatch Text
pmpName = lens _pmpName (\ s a -> s{_pmpName = a})
pmpCallback :: Lens' ProjectsModelsPatch (Maybe Text)
pmpCallback
= lens _pmpCallback (\ s a -> s{_pmpCallback = a})
instance GoogleRequest ProjectsModelsPatch where
type Rs ProjectsModelsPatch =
GoogleLongrunning__Operation
type Scopes ProjectsModelsPatch =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsModelsPatch'{..}
= go _pmpName _pmpXgafv _pmpUploadProtocol
_pmpUpdateMask
_pmpAccessToken
_pmpUploadType
_pmpCallback
(Just AltJSON)
_pmpPayload
machineLearningService
where go
= buildClient
(Proxy :: Proxy ProjectsModelsPatchResource)
mempty