{-# 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.Prediction.TrainedModels.Update
(
TrainedModelsUpdateResource
, trainedModelsUpdate
, TrainedModelsUpdate
, tmuProject
, tmuPayload
, tmuId
) where
import Network.Google.Prediction.Types
import Network.Google.Prelude
type TrainedModelsUpdateResource =
"prediction" :>
"v1.6" :>
"projects" :>
Capture "project" Text :>
"trainedmodels" :>
Capture "id" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Update :> Put '[JSON] Insert2
-- | Add new data to a trained model.
--
-- /See:/ 'trainedModelsUpdate' smart constructor.
data TrainedModelsUpdate = TrainedModelsUpdate'
{ _tmuProject :: !Text
, _tmuPayload :: !Update
, _tmuId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
-- | Creates a value of 'TrainedModelsUpdate' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tmuProject'
--
-- * 'tmuPayload'
--
-- * 'tmuId'
trainedModelsUpdate
:: Text -- ^ 'tmuProject'
-> Update -- ^ 'tmuPayload'
-> Text -- ^ 'tmuId'
-> TrainedModelsUpdate
trainedModelsUpdate pTmuProject_ pTmuPayload_ pTmuId_ =
TrainedModelsUpdate'
{ _tmuProject = pTmuProject_
, _tmuPayload = pTmuPayload_
, _tmuId = pTmuId_
}
-- | The project associated with the model.
tmuProject :: Lens' TrainedModelsUpdate Text
tmuProject
= lens _tmuProject (\ s a -> s{_tmuProject = a})
-- | Multipart request metadata.
tmuPayload :: Lens' TrainedModelsUpdate Update
tmuPayload
= lens _tmuPayload (\ s a -> s{_tmuPayload = a})
-- | The unique name for the predictive model.
tmuId :: Lens' TrainedModelsUpdate Text
tmuId = lens _tmuId (\ s a -> s{_tmuId = a})
instance GoogleRequest TrainedModelsUpdate where
type Rs TrainedModelsUpdate = Insert2
type Scopes TrainedModelsUpdate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/prediction"]
requestClient TrainedModelsUpdate'{..}
= go _tmuProject _tmuId (Just AltJSON) _tmuPayload
predictionService
where go
= buildClient
(Proxy :: Proxy TrainedModelsUpdateResource)
mempty