{-# 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.Predict
(
ProjectsPredictResource
, projectsPredict
, ProjectsPredict
, ppXgafv
, ppUploadProtocol
, ppAccessToken
, ppUploadType
, ppPayload
, ppName
, ppCallback
) where
import Network.Google.MachineLearning.Types
import Network.Google.Prelude
type ProjectsPredictResource =
"v1" :>
CaptureMode "name" "predict" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] GoogleCloudMlV1__PredictRequest :>
Post '[JSON] GoogleAPI__HTTPBody
data ProjectsPredict = ProjectsPredict'
{ _ppXgafv :: !(Maybe Xgafv)
, _ppUploadProtocol :: !(Maybe Text)
, _ppAccessToken :: !(Maybe Text)
, _ppUploadType :: !(Maybe Text)
, _ppPayload :: !GoogleCloudMlV1__PredictRequest
, _ppName :: !Text
, _ppCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsPredict
:: GoogleCloudMlV1__PredictRequest
-> Text
-> ProjectsPredict
projectsPredict pPpPayload_ pPpName_ =
ProjectsPredict'
{ _ppXgafv = Nothing
, _ppUploadProtocol = Nothing
, _ppAccessToken = Nothing
, _ppUploadType = Nothing
, _ppPayload = pPpPayload_
, _ppName = pPpName_
, _ppCallback = Nothing
}
ppXgafv :: Lens' ProjectsPredict (Maybe Xgafv)
ppXgafv = lens _ppXgafv (\ s a -> s{_ppXgafv = a})
ppUploadProtocol :: Lens' ProjectsPredict (Maybe Text)
ppUploadProtocol
= lens _ppUploadProtocol
(\ s a -> s{_ppUploadProtocol = a})
ppAccessToken :: Lens' ProjectsPredict (Maybe Text)
ppAccessToken
= lens _ppAccessToken
(\ s a -> s{_ppAccessToken = a})
ppUploadType :: Lens' ProjectsPredict (Maybe Text)
ppUploadType
= lens _ppUploadType (\ s a -> s{_ppUploadType = a})
ppPayload :: Lens' ProjectsPredict GoogleCloudMlV1__PredictRequest
ppPayload
= lens _ppPayload (\ s a -> s{_ppPayload = a})
ppName :: Lens' ProjectsPredict Text
ppName = lens _ppName (\ s a -> s{_ppName = a})
ppCallback :: Lens' ProjectsPredict (Maybe Text)
ppCallback
= lens _ppCallback (\ s a -> s{_ppCallback = a})
instance GoogleRequest ProjectsPredict where
type Rs ProjectsPredict = GoogleAPI__HTTPBody
type Scopes ProjectsPredict =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsPredict'{..}
= go _ppName _ppXgafv _ppUploadProtocol
_ppAccessToken
_ppUploadType
_ppCallback
(Just AltJSON)
_ppPayload
machineLearningService
where go
= buildClient
(Proxy :: Proxy ProjectsPredictResource)
mempty