{-# 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.Insert
(
TrainedModelsInsertResource
, trainedModelsInsert
, TrainedModelsInsert
, tmiProject
, tmiPayload
) where
import Network.Google.Prediction.Types
import Network.Google.Prelude
type TrainedModelsInsertResource =
"prediction" :>
"v1.6" :>
"projects" :>
Capture "project" Text :>
"trainedmodels" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Insert :> Post '[JSON] Insert2
data TrainedModelsInsert = TrainedModelsInsert'
{ _tmiProject :: !Text
, _tmiPayload :: !Insert
} deriving (Eq,Show,Data,Typeable,Generic)
trainedModelsInsert
:: Text
-> Insert
-> TrainedModelsInsert
trainedModelsInsert pTmiProject_ pTmiPayload_ =
TrainedModelsInsert'
{ _tmiProject = pTmiProject_
, _tmiPayload = pTmiPayload_
}
tmiProject :: Lens' TrainedModelsInsert Text
tmiProject
= lens _tmiProject (\ s a -> s{_tmiProject = a})
tmiPayload :: Lens' TrainedModelsInsert Insert
tmiPayload
= lens _tmiPayload (\ s a -> s{_tmiPayload = a})
instance GoogleRequest TrainedModelsInsert where
type Rs TrainedModelsInsert = Insert2
type Scopes TrainedModelsInsert =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/devstorage.full_control",
"https://www.googleapis.com/auth/devstorage.read_only",
"https://www.googleapis.com/auth/devstorage.read_write",
"https://www.googleapis.com/auth/prediction"]
requestClient TrainedModelsInsert'{..}
= go _tmiProject (Just AltJSON) _tmiPayload
predictionService
where go
= buildClient
(Proxy :: Proxy TrainedModelsInsertResource)
mempty