@@ -0,0 +1,2154 @@
1+{-# LANGUAGE DeriveDataTypeable #-}
2+{-# LANGUAGE DeriveGeneric #-}
3+{-# LANGUAGE NoImplicitPrelude #-}
4+{-# LANGUAGE OverloadedStrings #-}
5+{-# LANGUAGE RecordWildCards #-}
6+
7+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
8+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
9+
10+-- |
11+-- Module : Network.Google.MachineLearning.Types.Product
12+-- Copyright : (c) 2015-2016 Brendan Hay
13+-- License : Mozilla Public License, v. 2.0.
14+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
15+-- Stability : auto-generated
16+-- Portability : non-portable (GHC extensions)
17+--
18+module Network.Google.MachineLearning.Types.Product where
19+
20+import Network.Google.MachineLearning.Types.Sum
21+import Network.Google.Prelude
22+
23+-- | Request message for the SetDefaultVersion request.
24+--
25+-- /See:/ 'googleCloudMlV1beta1__SetDefaultVersionRequest' smart constructor.
26+data GoogleCloudMlV1beta1__SetDefaultVersionRequest =
27+ GoogleCloudMlV1beta1__SetDefaultVersionRequest'
28+ deriving (Eq,Show,Data,Typeable,Generic)
29+
30+-- | Creates a value of 'GoogleCloudMlV1beta1__SetDefaultVersionRequest' with the minimum fields required to make a request.
31+--
32+googleCloudMlV1beta1__SetDefaultVersionRequest
33+ :: GoogleCloudMlV1beta1__SetDefaultVersionRequest
34+googleCloudMlV1beta1__SetDefaultVersionRequest =
35+ GoogleCloudMlV1beta1__SetDefaultVersionRequest'
36+
37+instance FromJSON
38+ GoogleCloudMlV1beta1__SetDefaultVersionRequest where
39+ parseJSON
40+ = withObject
41+ "GoogleCloudMlV1beta1SetDefaultVersionRequest"
42+ (\ o ->
43+ pure GoogleCloudMlV1beta1__SetDefaultVersionRequest')
44+
45+instance ToJSON
46+ GoogleCloudMlV1beta1__SetDefaultVersionRequest where
47+ toJSON = const emptyObject
48+
49+-- | Represents a version of the model. Each version is a trained model
50+-- deployed in the cloud, ready to handle prediction requests. A model can
51+-- have multiple versions. You can get information about all of the
52+-- versions of a given model by calling
53+-- [projects.models.versions.list](\/ml\/reference\/rest\/v1beta1\/projects.models.versions\/list).
54+--
55+-- /See:/ 'googleCloudMlV1beta1__Version' smart constructor.
56+data GoogleCloudMlV1beta1__Version = GoogleCloudMlV1beta1__Version'
57+ { _gcmvvLastUseTime :: !(Maybe DateTime')
58+ , _gcmvvName :: !(Maybe Text)
59+ , _gcmvvDeploymentURI :: !(Maybe Text)
60+ , _gcmvvDescription :: !(Maybe Text)
61+ , _gcmvvCreateTime :: !(Maybe DateTime')
62+ , _gcmvvIsDefault :: !(Maybe Bool)
63+ } deriving (Eq,Show,Data,Typeable,Generic)
64+
65+-- | Creates a value of 'GoogleCloudMlV1beta1__Version' with the minimum fields required to make a request.
66+--
67+-- Use one of the following lenses to modify other fields as desired:
68+--
69+-- * 'gcmvvLastUseTime'
70+--
71+-- * 'gcmvvName'
72+--
73+-- * 'gcmvvDeploymentURI'
74+--
75+-- * 'gcmvvDescription'
76+--
77+-- * 'gcmvvCreateTime'
78+--
79+-- * 'gcmvvIsDefault'
80+googleCloudMlV1beta1__Version
81+ :: GoogleCloudMlV1beta1__Version
82+googleCloudMlV1beta1__Version =
83+ GoogleCloudMlV1beta1__Version'
84+ { _gcmvvLastUseTime = Nothing
85+ , _gcmvvName = Nothing
86+ , _gcmvvDeploymentURI = Nothing
87+ , _gcmvvDescription = Nothing
88+ , _gcmvvCreateTime = Nothing
89+ , _gcmvvIsDefault = Nothing
90+ }
91+
92+-- | Output only. The time the version was last used for prediction.
93+gcmvvLastUseTime :: Lens' GoogleCloudMlV1beta1__Version (Maybe UTCTime)
94+gcmvvLastUseTime
95+ = lens _gcmvvLastUseTime
96+ (\ s a -> s{_gcmvvLastUseTime = a})
97+ . mapping _DateTime
98+
99+-- | Required.The name specified for the version when it was created. The
100+-- version name must be unique within the model it is created in.
101+gcmvvName :: Lens' GoogleCloudMlV1beta1__Version (Maybe Text)
102+gcmvvName
103+ = lens _gcmvvName (\ s a -> s{_gcmvvName = a})
104+
105+-- | Required. The Google Cloud Storage location of the trained model used to
106+-- create the version. See the [overview of model
107+-- deployment](\/ml\/docs\/concepts\/deployment-overview) for more
108+-- informaiton. When passing Version to
109+-- [projects.models.versions.create](\/ml\/reference\/rest\/v1beta1\/projects.models.versions\/create)
110+-- the model service uses the specified location as the source of the
111+-- model. Once deployed, the model version is hosted by the prediction
112+-- service, so this location is useful only as a historical record.
113+gcmvvDeploymentURI :: Lens' GoogleCloudMlV1beta1__Version (Maybe Text)
114+gcmvvDeploymentURI
115+ = lens _gcmvvDeploymentURI
116+ (\ s a -> s{_gcmvvDeploymentURI = a})
117+
118+-- | Optional. The description specified for the version when it was created.
119+gcmvvDescription :: Lens' GoogleCloudMlV1beta1__Version (Maybe Text)
120+gcmvvDescription
121+ = lens _gcmvvDescription
122+ (\ s a -> s{_gcmvvDescription = a})
123+
124+-- | Output only. The time the version was created.
125+gcmvvCreateTime :: Lens' GoogleCloudMlV1beta1__Version (Maybe UTCTime)
126+gcmvvCreateTime
127+ = lens _gcmvvCreateTime
128+ (\ s a -> s{_gcmvvCreateTime = a})
129+ . mapping _DateTime
130+
131+-- | Output only. If true, this version will be used to handle prediction
132+-- requests that do not specify a version. You can change the default
133+-- version by calling
134+-- [projects.methods.versions.setDefault](\/ml\/reference\/rest\/v1beta1\/projects.models.versions\/setDefault).
135+gcmvvIsDefault :: Lens' GoogleCloudMlV1beta1__Version (Maybe Bool)
136+gcmvvIsDefault
137+ = lens _gcmvvIsDefault
138+ (\ s a -> s{_gcmvvIsDefault = a})
139+
140+instance FromJSON GoogleCloudMlV1beta1__Version where
141+ parseJSON
142+ = withObject "GoogleCloudMlV1beta1Version"
143+ (\ o ->
144+ GoogleCloudMlV1beta1__Version' <$>
145+ (o .:? "lastUseTime") <*> (o .:? "name") <*>
146+ (o .:? "deploymentUri")
147+ <*> (o .:? "description")
148+ <*> (o .:? "createTime")
149+ <*> (o .:? "isDefault"))
150+
151+instance ToJSON GoogleCloudMlV1beta1__Version where
152+ toJSON GoogleCloudMlV1beta1__Version'{..}
153+ = object
154+ (catMaybes
155+ [("lastUseTime" .=) <$> _gcmvvLastUseTime,
156+ ("name" .=) <$> _gcmvvName,
157+ ("deploymentUri" .=) <$> _gcmvvDeploymentURI,
158+ ("description" .=) <$> _gcmvvDescription,
159+ ("createTime" .=) <$> _gcmvvCreateTime,
160+ ("isDefault" .=) <$> _gcmvvIsDefault])
161+
162+-- | Represents a set of hyperparameters to optimize.
163+--
164+-- /See:/ 'googleCloudMlV1beta1__HyperparameterSpec' smart constructor.
165+data GoogleCloudMlV1beta1__HyperparameterSpec = GoogleCloudMlV1beta1__HyperparameterSpec'
166+ { _gcmvhsParams :: !(Maybe [GoogleCloudMlV1beta1__ParameterSpec])
167+ , _gcmvhsGoal :: !(Maybe GoogleCloudMlV1beta1__HyperparameterSpecGoal)
168+ , _gcmvhsMaxTrials :: !(Maybe (Textual Int32))
169+ , _gcmvhsMaxParallelTrials :: !(Maybe (Textual Int32))
170+ } deriving (Eq,Show,Data,Typeable,Generic)
171+
172+-- | Creates a value of 'GoogleCloudMlV1beta1__HyperparameterSpec' with the minimum fields required to make a request.
173+--
174+-- Use one of the following lenses to modify other fields as desired:
175+--
176+-- * 'gcmvhsParams'
177+--
178+-- * 'gcmvhsGoal'
179+--
180+-- * 'gcmvhsMaxTrials'
181+--
182+-- * 'gcmvhsMaxParallelTrials'
183+googleCloudMlV1beta1__HyperparameterSpec
184+ :: GoogleCloudMlV1beta1__HyperparameterSpec
185+googleCloudMlV1beta1__HyperparameterSpec =
186+ GoogleCloudMlV1beta1__HyperparameterSpec'
187+ { _gcmvhsParams = Nothing
188+ , _gcmvhsGoal = Nothing
189+ , _gcmvhsMaxTrials = Nothing
190+ , _gcmvhsMaxParallelTrials = Nothing
191+ }
192+
193+-- | Required. The set of parameters to tune.
194+gcmvhsParams :: Lens' GoogleCloudMlV1beta1__HyperparameterSpec [GoogleCloudMlV1beta1__ParameterSpec]
195+gcmvhsParams
196+ = lens _gcmvhsParams (\ s a -> s{_gcmvhsParams = a})
197+ . _Default
198+ . _Coerce
199+
200+-- | Required. The type of goal to use for tuning. Available types are
201+-- \`MAXIMIZE\` and \`MINIMIZE\`. Defaults to \`MAXIMIZE\`.
202+gcmvhsGoal :: Lens' GoogleCloudMlV1beta1__HyperparameterSpec (Maybe GoogleCloudMlV1beta1__HyperparameterSpecGoal)
203+gcmvhsGoal
204+ = lens _gcmvhsGoal (\ s a -> s{_gcmvhsGoal = a})
205+
206+-- | Optional. How many training trials should be attempted to optimize the
207+-- specified hyperparameters. Defaults to one.
208+gcmvhsMaxTrials :: Lens' GoogleCloudMlV1beta1__HyperparameterSpec (Maybe Int32)
209+gcmvhsMaxTrials
210+ = lens _gcmvhsMaxTrials
211+ (\ s a -> s{_gcmvhsMaxTrials = a})
212+ . mapping _Coerce
213+
214+-- | Optional. The number of training trials to run concurrently. You can
215+-- reduce the time it takes to perform hyperparameter tuning by adding
216+-- trials in parallel. However, each trail only benefits from the
217+-- information gained in completed trials. That means that a trial does not
218+-- get access to the results of trials running at the same time, which
219+-- could reduce the quality of the overall optimization. Each trial will
220+-- use the same scale tier and machine types. Defaults to one.
221+gcmvhsMaxParallelTrials :: Lens' GoogleCloudMlV1beta1__HyperparameterSpec (Maybe Int32)
222+gcmvhsMaxParallelTrials
223+ = lens _gcmvhsMaxParallelTrials
224+ (\ s a -> s{_gcmvhsMaxParallelTrials = a})
225+ . mapping _Coerce
226+
227+instance FromJSON
228+ GoogleCloudMlV1beta1__HyperparameterSpec where
229+ parseJSON
230+ = withObject "GoogleCloudMlV1beta1HyperparameterSpec"
231+ (\ o ->
232+ GoogleCloudMlV1beta1__HyperparameterSpec' <$>
233+ (o .:? "params" .!= mempty) <*> (o .:? "goal") <*>
234+ (o .:? "maxTrials")
235+ <*> (o .:? "maxParallelTrials"))
236+
237+instance ToJSON
238+ GoogleCloudMlV1beta1__HyperparameterSpec where
239+ toJSON GoogleCloudMlV1beta1__HyperparameterSpec'{..}
240+ = object
241+ (catMaybes
242+ [("params" .=) <$> _gcmvhsParams,
243+ ("goal" .=) <$> _gcmvhsGoal,
244+ ("maxTrials" .=) <$> _gcmvhsMaxTrials,
245+ ("maxParallelTrials" .=) <$>
246+ _gcmvhsMaxParallelTrials])
247+
248+-- | Returns service account information associated with a project.
249+--
250+-- /See:/ 'googleCloudMlV1beta1__GetConfigResponse' smart constructor.
251+data GoogleCloudMlV1beta1__GetConfigResponse = GoogleCloudMlV1beta1__GetConfigResponse'
252+ { _gcmvgcrServiceAccount :: !(Maybe Text)
253+ , _gcmvgcrServiceAccountProject :: !(Maybe (Textual Int64))
254+ } deriving (Eq,Show,Data,Typeable,Generic)
255+
256+-- | Creates a value of 'GoogleCloudMlV1beta1__GetConfigResponse' with the minimum fields required to make a request.
257+--
258+-- Use one of the following lenses to modify other fields as desired:
259+--
260+-- * 'gcmvgcrServiceAccount'
261+--
262+-- * 'gcmvgcrServiceAccountProject'
263+googleCloudMlV1beta1__GetConfigResponse
264+ :: GoogleCloudMlV1beta1__GetConfigResponse
265+googleCloudMlV1beta1__GetConfigResponse =
266+ GoogleCloudMlV1beta1__GetConfigResponse'
267+ { _gcmvgcrServiceAccount = Nothing
268+ , _gcmvgcrServiceAccountProject = Nothing
269+ }
270+
271+-- | The service account Cloud ML uses to access resources in the project.
272+gcmvgcrServiceAccount :: Lens' GoogleCloudMlV1beta1__GetConfigResponse (Maybe Text)
273+gcmvgcrServiceAccount
274+ = lens _gcmvgcrServiceAccount
275+ (\ s a -> s{_gcmvgcrServiceAccount = a})
276+
277+-- | The project number for \`service_account\`.
278+gcmvgcrServiceAccountProject :: Lens' GoogleCloudMlV1beta1__GetConfigResponse (Maybe Int64)
279+gcmvgcrServiceAccountProject
280+ = lens _gcmvgcrServiceAccountProject
281+ (\ s a -> s{_gcmvgcrServiceAccountProject = a})
282+ . mapping _Coerce
283+
284+instance FromJSON
285+ GoogleCloudMlV1beta1__GetConfigResponse where
286+ parseJSON
287+ = withObject "GoogleCloudMlV1beta1GetConfigResponse"
288+ (\ o ->
289+ GoogleCloudMlV1beta1__GetConfigResponse' <$>
290+ (o .:? "serviceAccount") <*>
291+ (o .:? "serviceAccountProject"))
292+
293+instance ToJSON
294+ GoogleCloudMlV1beta1__GetConfigResponse where
295+ toJSON GoogleCloudMlV1beta1__GetConfigResponse'{..}
296+ = object
297+ (catMaybes
298+ [("serviceAccount" .=) <$> _gcmvgcrServiceAccount,
299+ ("serviceAccountProject" .=) <$>
300+ _gcmvgcrServiceAccountProject])
301+
302+-- | Represents a training or prediction job.
303+--
304+-- /See:/ 'googleCloudMlV1beta1__Job' smart constructor.
305+data GoogleCloudMlV1beta1__Job = GoogleCloudMlV1beta1__Job'
306+ { _gcmvjState :: !(Maybe GoogleCloudMlV1beta1__JobState)
307+ , _gcmvjTrainingOutput :: !(Maybe GoogleCloudMlV1beta1__TrainingOutput)
308+ , _gcmvjJobId :: !(Maybe Text)
309+ , _gcmvjStartTime :: !(Maybe DateTime')
310+ , _gcmvjPredictionInput :: !(Maybe GoogleCloudMlV1beta1__PredictionInput)
311+ , _gcmvjEndTime :: !(Maybe DateTime')
312+ , _gcmvjPredictionOutput :: !(Maybe GoogleCloudMlV1beta1__PredictionOutput)
313+ , _gcmvjErrorMessage :: !(Maybe Text)
314+ , _gcmvjTrainingInput :: !(Maybe GoogleCloudMlV1beta1__TrainingInput)
315+ , _gcmvjCreateTime :: !(Maybe DateTime')
316+ } deriving (Eq,Show,Data,Typeable,Generic)
317+
318+-- | Creates a value of 'GoogleCloudMlV1beta1__Job' with the minimum fields required to make a request.
319+--
320+-- Use one of the following lenses to modify other fields as desired:
321+--
322+-- * 'gcmvjState'
323+--
324+-- * 'gcmvjTrainingOutput'
325+--
326+-- * 'gcmvjJobId'
327+--
328+-- * 'gcmvjStartTime'
329+--
330+-- * 'gcmvjPredictionInput'
331+--
332+-- * 'gcmvjEndTime'
333+--
334+-- * 'gcmvjPredictionOutput'
335+--
336+-- * 'gcmvjErrorMessage'
337+--
338+-- * 'gcmvjTrainingInput'
339+--
340+-- * 'gcmvjCreateTime'
341+googleCloudMlV1beta1__Job
342+ :: GoogleCloudMlV1beta1__Job
343+googleCloudMlV1beta1__Job =
344+ GoogleCloudMlV1beta1__Job'
345+ { _gcmvjState = Nothing
346+ , _gcmvjTrainingOutput = Nothing
347+ , _gcmvjJobId = Nothing
348+ , _gcmvjStartTime = Nothing
349+ , _gcmvjPredictionInput = Nothing
350+ , _gcmvjEndTime = Nothing
351+ , _gcmvjPredictionOutput = Nothing
352+ , _gcmvjErrorMessage = Nothing
353+ , _gcmvjTrainingInput = Nothing
354+ , _gcmvjCreateTime = Nothing
355+ }
356+
357+-- | Output only. The detailed state of a job.
358+gcmvjState :: Lens' GoogleCloudMlV1beta1__Job (Maybe GoogleCloudMlV1beta1__JobState)
359+gcmvjState
360+ = lens _gcmvjState (\ s a -> s{_gcmvjState = a})
361+
362+-- | The current training job result.
363+gcmvjTrainingOutput :: Lens' GoogleCloudMlV1beta1__Job (Maybe GoogleCloudMlV1beta1__TrainingOutput)
364+gcmvjTrainingOutput
365+ = lens _gcmvjTrainingOutput
366+ (\ s a -> s{_gcmvjTrainingOutput = a})
367+
368+-- | Required. The user-specified id of the job.
369+gcmvjJobId :: Lens' GoogleCloudMlV1beta1__Job (Maybe Text)
370+gcmvjJobId
371+ = lens _gcmvjJobId (\ s a -> s{_gcmvjJobId = a})
372+
373+-- | Output only. When the job processing was started.
374+gcmvjStartTime :: Lens' GoogleCloudMlV1beta1__Job (Maybe UTCTime)
375+gcmvjStartTime
376+ = lens _gcmvjStartTime
377+ (\ s a -> s{_gcmvjStartTime = a})
378+ . mapping _DateTime
379+
380+-- | Input parameters to create a prediction job.
381+gcmvjPredictionInput :: Lens' GoogleCloudMlV1beta1__Job (Maybe GoogleCloudMlV1beta1__PredictionInput)
382+gcmvjPredictionInput
383+ = lens _gcmvjPredictionInput
384+ (\ s a -> s{_gcmvjPredictionInput = a})
385+
386+-- | Output only. When the job processing was completed.
387+gcmvjEndTime :: Lens' GoogleCloudMlV1beta1__Job (Maybe UTCTime)
388+gcmvjEndTime
389+ = lens _gcmvjEndTime (\ s a -> s{_gcmvjEndTime = a})
390+ . mapping _DateTime
391+
392+-- | The current prediction job result.
393+gcmvjPredictionOutput :: Lens' GoogleCloudMlV1beta1__Job (Maybe GoogleCloudMlV1beta1__PredictionOutput)
394+gcmvjPredictionOutput
395+ = lens _gcmvjPredictionOutput
396+ (\ s a -> s{_gcmvjPredictionOutput = a})
397+
398+-- | Output only. The details of a failure or a cancellation.
399+gcmvjErrorMessage :: Lens' GoogleCloudMlV1beta1__Job (Maybe Text)
400+gcmvjErrorMessage
401+ = lens _gcmvjErrorMessage
402+ (\ s a -> s{_gcmvjErrorMessage = a})
403+
404+-- | Input parameters to create a training job.
405+gcmvjTrainingInput :: Lens' GoogleCloudMlV1beta1__Job (Maybe GoogleCloudMlV1beta1__TrainingInput)
406+gcmvjTrainingInput
407+ = lens _gcmvjTrainingInput
408+ (\ s a -> s{_gcmvjTrainingInput = a})
409+
410+-- | Output only. When the job was created.
411+gcmvjCreateTime :: Lens' GoogleCloudMlV1beta1__Job (Maybe UTCTime)
412+gcmvjCreateTime
413+ = lens _gcmvjCreateTime
414+ (\ s a -> s{_gcmvjCreateTime = a})
415+ . mapping _DateTime
416+
417+instance FromJSON GoogleCloudMlV1beta1__Job where
418+ parseJSON
419+ = withObject "GoogleCloudMlV1beta1Job"
420+ (\ o ->
421+ GoogleCloudMlV1beta1__Job' <$>
422+ (o .:? "state") <*> (o .:? "trainingOutput") <*>
423+ (o .:? "jobId")
424+ <*> (o .:? "startTime")
425+ <*> (o .:? "predictionInput")
426+ <*> (o .:? "endTime")
427+ <*> (o .:? "predictionOutput")
428+ <*> (o .:? "errorMessage")
429+ <*> (o .:? "trainingInput")
430+ <*> (o .:? "createTime"))
431+
432+instance ToJSON GoogleCloudMlV1beta1__Job where
433+ toJSON GoogleCloudMlV1beta1__Job'{..}
434+ = object
435+ (catMaybes
436+ [("state" .=) <$> _gcmvjState,
437+ ("trainingOutput" .=) <$> _gcmvjTrainingOutput,
438+ ("jobId" .=) <$> _gcmvjJobId,
439+ ("startTime" .=) <$> _gcmvjStartTime,
440+ ("predictionInput" .=) <$> _gcmvjPredictionInput,
441+ ("endTime" .=) <$> _gcmvjEndTime,
442+ ("predictionOutput" .=) <$> _gcmvjPredictionOutput,
443+ ("errorMessage" .=) <$> _gcmvjErrorMessage,
444+ ("trainingInput" .=) <$> _gcmvjTrainingInput,
445+ ("createTime" .=) <$> _gcmvjCreateTime])
446+
447+-- | Represents results of a training job.
448+--
449+-- /See:/ 'googleCloudMlV1beta1__TrainingOutput' smart constructor.
450+data GoogleCloudMlV1beta1__TrainingOutput = GoogleCloudMlV1beta1__TrainingOutput'
451+ { _gcmvtoCompletedTrialCount :: !(Maybe (Textual Int64))
452+ , _gcmvtoTrials :: !(Maybe [GoogleCloudMlV1beta1__HyperparameterOutput])
453+ } deriving (Eq,Show,Data,Typeable,Generic)
454+
455+-- | Creates a value of 'GoogleCloudMlV1beta1__TrainingOutput' with the minimum fields required to make a request.
456+--
457+-- Use one of the following lenses to modify other fields as desired:
458+--
459+-- * 'gcmvtoCompletedTrialCount'
460+--
461+-- * 'gcmvtoTrials'
462+googleCloudMlV1beta1__TrainingOutput
463+ :: GoogleCloudMlV1beta1__TrainingOutput
464+googleCloudMlV1beta1__TrainingOutput =
465+ GoogleCloudMlV1beta1__TrainingOutput'
466+ { _gcmvtoCompletedTrialCount = Nothing
467+ , _gcmvtoTrials = Nothing
468+ }
469+
470+-- | The number of hyperparameter tuning trials that completed successfully.
471+gcmvtoCompletedTrialCount :: Lens' GoogleCloudMlV1beta1__TrainingOutput (Maybe Int64)
472+gcmvtoCompletedTrialCount
473+ = lens _gcmvtoCompletedTrialCount
474+ (\ s a -> s{_gcmvtoCompletedTrialCount = a})
475+ . mapping _Coerce
476+
477+-- | Results for individual Hyperparameter trials.
478+gcmvtoTrials :: Lens' GoogleCloudMlV1beta1__TrainingOutput [GoogleCloudMlV1beta1__HyperparameterOutput]
479+gcmvtoTrials
480+ = lens _gcmvtoTrials (\ s a -> s{_gcmvtoTrials = a})
481+ . _Default
482+ . _Coerce
483+
484+instance FromJSON
485+ GoogleCloudMlV1beta1__TrainingOutput where
486+ parseJSON
487+ = withObject "GoogleCloudMlV1beta1TrainingOutput"
488+ (\ o ->
489+ GoogleCloudMlV1beta1__TrainingOutput' <$>
490+ (o .:? "completedTrialCount") <*>
491+ (o .:? "trials" .!= mempty))
492+
493+instance ToJSON GoogleCloudMlV1beta1__TrainingOutput
494+ where
495+ toJSON GoogleCloudMlV1beta1__TrainingOutput'{..}
496+ = object
497+ (catMaybes
498+ [("completedTrialCount" .=) <$>
499+ _gcmvtoCompletedTrialCount,
500+ ("trials" .=) <$> _gcmvtoTrials])
501+
502+-- | Represents a machine learning solution. A model can have multiple
503+-- versions, each of which is a deployed, trained model ready to receive
504+-- prediction requests. The model itself is just a container.
505+--
506+-- /See:/ 'googleCloudMlV1beta1__Model' smart constructor.
507+data GoogleCloudMlV1beta1__Model = GoogleCloudMlV1beta1__Model'
508+ { _gcmvmDefaultVersion :: !(Maybe GoogleCloudMlV1beta1__Version)
509+ , _gcmvmName :: !(Maybe Text)
510+ , _gcmvmDescription :: !(Maybe Text)
511+ } deriving (Eq,Show,Data,Typeable,Generic)
512+
513+-- | Creates a value of 'GoogleCloudMlV1beta1__Model' with the minimum fields required to make a request.
514+--
515+-- Use one of the following lenses to modify other fields as desired:
516+--
517+-- * 'gcmvmDefaultVersion'
518+--
519+-- * 'gcmvmName'
520+--
521+-- * 'gcmvmDescription'
522+googleCloudMlV1beta1__Model
523+ :: GoogleCloudMlV1beta1__Model
524+googleCloudMlV1beta1__Model =
525+ GoogleCloudMlV1beta1__Model'
526+ { _gcmvmDefaultVersion = Nothing
527+ , _gcmvmName = Nothing
528+ , _gcmvmDescription = Nothing
529+ }
530+
531+-- | Output only. The default version of the model. This version will be used
532+-- to handle prediction requests that do not specify a version. You can
533+-- change the default version by calling
534+-- [projects.methods.versions.setDefault](\/ml\/reference\/rest\/v1beta1\/projects.models.versions\/setDefault).
535+gcmvmDefaultVersion :: Lens' GoogleCloudMlV1beta1__Model (Maybe GoogleCloudMlV1beta1__Version)
536+gcmvmDefaultVersion
537+ = lens _gcmvmDefaultVersion
538+ (\ s a -> s{_gcmvmDefaultVersion = a})
539+
540+-- | Required. The name specified for the model when it was created. The
541+-- model name must be unique within the project it is created in.
542+gcmvmName :: Lens' GoogleCloudMlV1beta1__Model (Maybe Text)
543+gcmvmName
544+ = lens _gcmvmName (\ s a -> s{_gcmvmName = a})
545+
546+-- | Optional. The description specified for the model when it was created.
547+gcmvmDescription :: Lens' GoogleCloudMlV1beta1__Model (Maybe Text)
548+gcmvmDescription
549+ = lens _gcmvmDescription
550+ (\ s a -> s{_gcmvmDescription = a})
551+
552+instance FromJSON GoogleCloudMlV1beta1__Model where
553+ parseJSON
554+ = withObject "GoogleCloudMlV1beta1Model"
555+ (\ o ->
556+ GoogleCloudMlV1beta1__Model' <$>
557+ (o .:? "defaultVersion") <*> (o .:? "name") <*>
558+ (o .:? "description"))
559+
560+instance ToJSON GoogleCloudMlV1beta1__Model where
561+ toJSON GoogleCloudMlV1beta1__Model'{..}
562+ = object
563+ (catMaybes
564+ [("defaultVersion" .=) <$> _gcmvmDefaultVersion,
565+ ("name" .=) <$> _gcmvmName,
566+ ("description" .=) <$> _gcmvmDescription])
567+
568+-- | The normal response of the operation in case of success. If the original
569+-- method returns no data on success, such as \`Delete\`, the response is
570+-- \`google.protobuf.Empty\`. If the original method is standard
571+-- \`Get\`\/\`Create\`\/\`Update\`, the response should be the resource.
572+-- For other methods, the response should have the type \`XxxResponse\`,
573+-- where \`Xxx\` is the original method name. For example, if the original
574+-- method name is \`TakeSnapshot()\`, the inferred response type is
575+-- \`TakeSnapshotResponse\`.
576+--
577+-- /See:/ 'googleLongrunning__OperationResponse' smart constructor.
578+newtype GoogleLongrunning__OperationResponse = GoogleLongrunning__OperationResponse'
579+ { _glorAddtional :: HashMap Text JSONValue
580+ } deriving (Eq,Show,Data,Typeable,Generic)
581+
582+-- | Creates a value of 'GoogleLongrunning__OperationResponse' with the minimum fields required to make a request.
583+--
584+-- Use one of the following lenses to modify other fields as desired:
585+--
586+-- * 'glorAddtional'
587+googleLongrunning__OperationResponse
588+ :: HashMap Text JSONValue -- ^ 'glorAddtional'
589+ -> GoogleLongrunning__OperationResponse
590+googleLongrunning__OperationResponse pGlorAddtional_ =
591+ GoogleLongrunning__OperationResponse'
592+ { _glorAddtional = _Coerce # pGlorAddtional_
593+ }
594+
595+-- | Properties of the object. Contains field \'type with type URL.
596+glorAddtional :: Lens' GoogleLongrunning__OperationResponse (HashMap Text JSONValue)
597+glorAddtional
598+ = lens _glorAddtional
599+ (\ s a -> s{_glorAddtional = a})
600+ . _Coerce
601+
602+instance FromJSON
603+ GoogleLongrunning__OperationResponse where
604+ parseJSON
605+ = withObject "GoogleLongrunningOperationResponse"
606+ (\ o ->
607+ GoogleLongrunning__OperationResponse' <$>
608+ (parseJSONObject o))
609+
610+instance ToJSON GoogleLongrunning__OperationResponse
611+ where
612+ toJSON = toJSON . _glorAddtional
613+
614+-- | Represents the metadata of the long-running operation.
615+--
616+-- /See:/ 'googleCloudMlV1beta1__OperationMetadata' smart constructor.
617+data GoogleCloudMlV1beta1__OperationMetadata = GoogleCloudMlV1beta1__OperationMetadata'
618+ { _gcmvomStartTime :: !(Maybe DateTime')
619+ , _gcmvomModelName :: !(Maybe Text)
620+ , _gcmvomVersion :: !(Maybe GoogleCloudMlV1beta1__Version)
621+ , _gcmvomEndTime :: !(Maybe DateTime')
622+ , _gcmvomIsCancellationRequested :: !(Maybe Bool)
623+ , _gcmvomOperationType :: !(Maybe GoogleCloudMlV1beta1__OperationMetadataOperationType)
624+ , _gcmvomCreateTime :: !(Maybe DateTime')
625+ } deriving (Eq,Show,Data,Typeable,Generic)
626+
627+-- | Creates a value of 'GoogleCloudMlV1beta1__OperationMetadata' with the minimum fields required to make a request.
628+--
629+-- Use one of the following lenses to modify other fields as desired:
630+--
631+-- * 'gcmvomStartTime'
632+--
633+-- * 'gcmvomModelName'
634+--
635+-- * 'gcmvomVersion'
636+--
637+-- * 'gcmvomEndTime'
638+--
639+-- * 'gcmvomIsCancellationRequested'
640+--
641+-- * 'gcmvomOperationType'
642+--
643+-- * 'gcmvomCreateTime'
644+googleCloudMlV1beta1__OperationMetadata
645+ :: GoogleCloudMlV1beta1__OperationMetadata
646+googleCloudMlV1beta1__OperationMetadata =
647+ GoogleCloudMlV1beta1__OperationMetadata'
648+ { _gcmvomStartTime = Nothing
649+ , _gcmvomModelName = Nothing
650+ , _gcmvomVersion = Nothing
651+ , _gcmvomEndTime = Nothing
652+ , _gcmvomIsCancellationRequested = Nothing
653+ , _gcmvomOperationType = Nothing
654+ , _gcmvomCreateTime = Nothing
655+ }
656+
657+-- | The time operation processing started.
658+gcmvomStartTime :: Lens' GoogleCloudMlV1beta1__OperationMetadata (Maybe UTCTime)
659+gcmvomStartTime
660+ = lens _gcmvomStartTime
661+ (\ s a -> s{_gcmvomStartTime = a})
662+ . mapping _DateTime
663+
664+-- | Contains the name of the model associated with the operation.
665+gcmvomModelName :: Lens' GoogleCloudMlV1beta1__OperationMetadata (Maybe Text)
666+gcmvomModelName
667+ = lens _gcmvomModelName
668+ (\ s a -> s{_gcmvomModelName = a})
669+
670+-- | Contains the version associated with the operation.
671+gcmvomVersion :: Lens' GoogleCloudMlV1beta1__OperationMetadata (Maybe GoogleCloudMlV1beta1__Version)
672+gcmvomVersion
673+ = lens _gcmvomVersion
674+ (\ s a -> s{_gcmvomVersion = a})
675+
676+-- | The time operation processing completed.
677+gcmvomEndTime :: Lens' GoogleCloudMlV1beta1__OperationMetadata (Maybe UTCTime)
678+gcmvomEndTime
679+ = lens _gcmvomEndTime
680+ (\ s a -> s{_gcmvomEndTime = a})
681+ . mapping _DateTime
682+
683+-- | Indicates whether a request to cancel this operation has been made.
684+gcmvomIsCancellationRequested :: Lens' GoogleCloudMlV1beta1__OperationMetadata (Maybe Bool)
685+gcmvomIsCancellationRequested
686+ = lens _gcmvomIsCancellationRequested
687+ (\ s a -> s{_gcmvomIsCancellationRequested = a})
688+
689+-- | The operation type.
690+gcmvomOperationType :: Lens' GoogleCloudMlV1beta1__OperationMetadata (Maybe GoogleCloudMlV1beta1__OperationMetadataOperationType)
691+gcmvomOperationType
692+ = lens _gcmvomOperationType
693+ (\ s a -> s{_gcmvomOperationType = a})
694+
695+-- | The time the operation was submitted.
696+gcmvomCreateTime :: Lens' GoogleCloudMlV1beta1__OperationMetadata (Maybe UTCTime)
697+gcmvomCreateTime
698+ = lens _gcmvomCreateTime
699+ (\ s a -> s{_gcmvomCreateTime = a})
700+ . mapping _DateTime
701+
702+instance FromJSON
703+ GoogleCloudMlV1beta1__OperationMetadata where
704+ parseJSON
705+ = withObject "GoogleCloudMlV1beta1OperationMetadata"
706+ (\ o ->
707+ GoogleCloudMlV1beta1__OperationMetadata' <$>
708+ (o .:? "startTime") <*> (o .:? "modelName") <*>
709+ (o .:? "version")
710+ <*> (o .:? "endTime")
711+ <*> (o .:? "isCancellationRequested")
712+ <*> (o .:? "operationType")
713+ <*> (o .:? "createTime"))
714+
715+instance ToJSON
716+ GoogleCloudMlV1beta1__OperationMetadata where
717+ toJSON GoogleCloudMlV1beta1__OperationMetadata'{..}
718+ = object
719+ (catMaybes
720+ [("startTime" .=) <$> _gcmvomStartTime,
721+ ("modelName" .=) <$> _gcmvomModelName,
722+ ("version" .=) <$> _gcmvomVersion,
723+ ("endTime" .=) <$> _gcmvomEndTime,
724+ ("isCancellationRequested" .=) <$>
725+ _gcmvomIsCancellationRequested,
726+ ("operationType" .=) <$> _gcmvomOperationType,
727+ ("createTime" .=) <$> _gcmvomCreateTime])
728+
729+-- | Represents the result of a single hyperparameter tuning trial from a
730+-- training job. The TrainingOutput object that is returned on successful
731+-- completion of a training job with hyperparameter tuning includes a list
732+-- of HyperparameterOutput objects, one for each successful trial.
733+--
734+-- /See:/ 'googleCloudMlV1beta1__HyperparameterOutput' smart constructor.
735+data GoogleCloudMlV1beta1__HyperparameterOutput = GoogleCloudMlV1beta1__HyperparameterOutput'
736+ { _gcmvhoAllMetrics :: !(Maybe [GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric])
737+ , _gcmvhoHyperparameters :: !(Maybe GoogleCloudMlV1beta1__HyperparameterOutputHyperparameters)
738+ , _gcmvhoTrialId :: !(Maybe Text)
739+ , _gcmvhoFinalMetric :: !(Maybe GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric)
740+ } deriving (Eq,Show,Data,Typeable,Generic)
741+
742+-- | Creates a value of 'GoogleCloudMlV1beta1__HyperparameterOutput' with the minimum fields required to make a request.
743+--
744+-- Use one of the following lenses to modify other fields as desired:
745+--
746+-- * 'gcmvhoAllMetrics'
747+--
748+-- * 'gcmvhoHyperparameters'
749+--
750+-- * 'gcmvhoTrialId'
751+--
752+-- * 'gcmvhoFinalMetric'
753+googleCloudMlV1beta1__HyperparameterOutput
754+ :: GoogleCloudMlV1beta1__HyperparameterOutput
755+googleCloudMlV1beta1__HyperparameterOutput =
756+ GoogleCloudMlV1beta1__HyperparameterOutput'
757+ { _gcmvhoAllMetrics = Nothing
758+ , _gcmvhoHyperparameters = Nothing
759+ , _gcmvhoTrialId = Nothing
760+ , _gcmvhoFinalMetric = Nothing
761+ }
762+
763+-- | All recorded object metrics for this trial.
764+gcmvhoAllMetrics :: Lens' GoogleCloudMlV1beta1__HyperparameterOutput [GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric]
765+gcmvhoAllMetrics
766+ = lens _gcmvhoAllMetrics
767+ (\ s a -> s{_gcmvhoAllMetrics = a})
768+ . _Default
769+ . _Coerce
770+
771+-- | The hyperparameters given to this trial.
772+gcmvhoHyperparameters :: Lens' GoogleCloudMlV1beta1__HyperparameterOutput (Maybe GoogleCloudMlV1beta1__HyperparameterOutputHyperparameters)
773+gcmvhoHyperparameters
774+ = lens _gcmvhoHyperparameters
775+ (\ s a -> s{_gcmvhoHyperparameters = a})
776+
777+-- | The trial id for these results.
778+gcmvhoTrialId :: Lens' GoogleCloudMlV1beta1__HyperparameterOutput (Maybe Text)
779+gcmvhoTrialId
780+ = lens _gcmvhoTrialId
781+ (\ s a -> s{_gcmvhoTrialId = a})
782+
783+-- | The final objective metric seen for this trial.
784+gcmvhoFinalMetric :: Lens' GoogleCloudMlV1beta1__HyperparameterOutput (Maybe GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric)
785+gcmvhoFinalMetric
786+ = lens _gcmvhoFinalMetric
787+ (\ s a -> s{_gcmvhoFinalMetric = a})
788+
789+instance FromJSON
790+ GoogleCloudMlV1beta1__HyperparameterOutput where
791+ parseJSON
792+ = withObject
793+ "GoogleCloudMlV1beta1HyperparameterOutput"
794+ (\ o ->
795+ GoogleCloudMlV1beta1__HyperparameterOutput' <$>
796+ (o .:? "allMetrics" .!= mempty) <*>
797+ (o .:? "hyperparameters")
798+ <*> (o .:? "trialId")
799+ <*> (o .:? "finalMetric"))
800+
801+instance ToJSON
802+ GoogleCloudMlV1beta1__HyperparameterOutput where
803+ toJSON
804+ GoogleCloudMlV1beta1__HyperparameterOutput'{..}
805+ = object
806+ (catMaybes
807+ [("allMetrics" .=) <$> _gcmvhoAllMetrics,
808+ ("hyperparameters" .=) <$> _gcmvhoHyperparameters,
809+ ("trialId" .=) <$> _gcmvhoTrialId,
810+ ("finalMetric" .=) <$> _gcmvhoFinalMetric])
811+
812+-- | Response message for the ListVersions method.
813+--
814+-- /See:/ 'googleCloudMlV1beta1__ListVersionsResponse' smart constructor.
815+data GoogleCloudMlV1beta1__ListVersionsResponse = GoogleCloudMlV1beta1__ListVersionsResponse'
816+ { _gcmvlvrNextPageToken :: !(Maybe Text)
817+ , _gcmvlvrVersions :: !(Maybe [GoogleCloudMlV1beta1__Version])
818+ } deriving (Eq,Show,Data,Typeable,Generic)
819+
820+-- | Creates a value of 'GoogleCloudMlV1beta1__ListVersionsResponse' with the minimum fields required to make a request.
821+--
822+-- Use one of the following lenses to modify other fields as desired:
823+--
824+-- * 'gcmvlvrNextPageToken'
825+--
826+-- * 'gcmvlvrVersions'
827+googleCloudMlV1beta1__ListVersionsResponse
828+ :: GoogleCloudMlV1beta1__ListVersionsResponse
829+googleCloudMlV1beta1__ListVersionsResponse =
830+ GoogleCloudMlV1beta1__ListVersionsResponse'
831+ { _gcmvlvrNextPageToken = Nothing
832+ , _gcmvlvrVersions = Nothing
833+ }
834+
835+-- | Optional. Pass this token as the \`page_token\` field of the request for
836+-- a subsequent call.
837+gcmvlvrNextPageToken :: Lens' GoogleCloudMlV1beta1__ListVersionsResponse (Maybe Text)
838+gcmvlvrNextPageToken
839+ = lens _gcmvlvrNextPageToken
840+ (\ s a -> s{_gcmvlvrNextPageToken = a})
841+
842+-- | The list of versions.
843+gcmvlvrVersions :: Lens' GoogleCloudMlV1beta1__ListVersionsResponse [GoogleCloudMlV1beta1__Version]
844+gcmvlvrVersions
845+ = lens _gcmvlvrVersions
846+ (\ s a -> s{_gcmvlvrVersions = a})
847+ . _Default
848+ . _Coerce
849+
850+instance FromJSON
851+ GoogleCloudMlV1beta1__ListVersionsResponse where
852+ parseJSON
853+ = withObject
854+ "GoogleCloudMlV1beta1ListVersionsResponse"
855+ (\ o ->
856+ GoogleCloudMlV1beta1__ListVersionsResponse' <$>
857+ (o .:? "nextPageToken") <*>
858+ (o .:? "versions" .!= mempty))
859+
860+instance ToJSON
861+ GoogleCloudMlV1beta1__ListVersionsResponse where
862+ toJSON
863+ GoogleCloudMlV1beta1__ListVersionsResponse'{..}
864+ = object
865+ (catMaybes
866+ [("nextPageToken" .=) <$> _gcmvlvrNextPageToken,
867+ ("versions" .=) <$> _gcmvlvrVersions])
868+
869+-- | The response message for Operations.ListOperations.
870+--
871+-- /See:/ 'googleLongrunning__ListOperationsResponse' smart constructor.
872+data GoogleLongrunning__ListOperationsResponse = GoogleLongrunning__ListOperationsResponse'
873+ { _gllorNextPageToken :: !(Maybe Text)
874+ , _gllorOperations :: !(Maybe [GoogleLongrunning__Operation])
875+ } deriving (Eq,Show,Data,Typeable,Generic)
876+
877+-- | Creates a value of 'GoogleLongrunning__ListOperationsResponse' with the minimum fields required to make a request.
878+--
879+-- Use one of the following lenses to modify other fields as desired:
880+--
881+-- * 'gllorNextPageToken'
882+--
883+-- * 'gllorOperations'
884+googleLongrunning__ListOperationsResponse
885+ :: GoogleLongrunning__ListOperationsResponse
886+googleLongrunning__ListOperationsResponse =
887+ GoogleLongrunning__ListOperationsResponse'
888+ { _gllorNextPageToken = Nothing
889+ , _gllorOperations = Nothing
890+ }
891+
892+-- | The standard List next-page token.
893+gllorNextPageToken :: Lens' GoogleLongrunning__ListOperationsResponse (Maybe Text)
894+gllorNextPageToken
895+ = lens _gllorNextPageToken
896+ (\ s a -> s{_gllorNextPageToken = a})
897+
898+-- | A list of operations that matches the specified filter in the request.
899+gllorOperations :: Lens' GoogleLongrunning__ListOperationsResponse [GoogleLongrunning__Operation]
900+gllorOperations
901+ = lens _gllorOperations
902+ (\ s a -> s{_gllorOperations = a})
903+ . _Default
904+ . _Coerce
905+
906+instance FromJSON
907+ GoogleLongrunning__ListOperationsResponse where
908+ parseJSON
909+ = withObject
910+ "GoogleLongrunningListOperationsResponse"
911+ (\ o ->
912+ GoogleLongrunning__ListOperationsResponse' <$>
913+ (o .:? "nextPageToken") <*>
914+ (o .:? "operations" .!= mempty))
915+
916+instance ToJSON
917+ GoogleLongrunning__ListOperationsResponse where
918+ toJSON GoogleLongrunning__ListOperationsResponse'{..}
919+ = object
920+ (catMaybes
921+ [("nextPageToken" .=) <$> _gllorNextPageToken,
922+ ("operations" .=) <$> _gllorOperations])
923+
924+-- | Represents input parameters for a prediction job.
925+--
926+-- /See:/ 'googleCloudMlV1beta1__PredictionInput' smart constructor.
927+data GoogleCloudMlV1beta1__PredictionInput = GoogleCloudMlV1beta1__PredictionInput'
928+ { _gcmvpiVersionName :: !(Maybe Text)
929+ , _gcmvpiModelName :: !(Maybe Text)
930+ , _gcmvpiDataFormat :: !(Maybe GoogleCloudMlV1beta1__PredictionInputDataFormat)
931+ , _gcmvpiMaxWorkerCount :: !(Maybe (Textual Int64))
932+ , _gcmvpiOutputPath :: !(Maybe Text)
933+ , _gcmvpiRegion :: !(Maybe Text)
934+ , _gcmvpiInputPaths :: !(Maybe [Text])
935+ } deriving (Eq,Show,Data,Typeable,Generic)
936+
937+-- | Creates a value of 'GoogleCloudMlV1beta1__PredictionInput' with the minimum fields required to make a request.
938+--
939+-- Use one of the following lenses to modify other fields as desired:
940+--
941+-- * 'gcmvpiVersionName'
942+--
943+-- * 'gcmvpiModelName'
944+--
945+-- * 'gcmvpiDataFormat'
946+--
947+-- * 'gcmvpiMaxWorkerCount'
948+--
949+-- * 'gcmvpiOutputPath'
950+--
951+-- * 'gcmvpiRegion'
952+--
953+-- * 'gcmvpiInputPaths'
954+googleCloudMlV1beta1__PredictionInput
955+ :: GoogleCloudMlV1beta1__PredictionInput
956+googleCloudMlV1beta1__PredictionInput =
957+ GoogleCloudMlV1beta1__PredictionInput'
958+ { _gcmvpiVersionName = Nothing
959+ , _gcmvpiModelName = Nothing
960+ , _gcmvpiDataFormat = Nothing
961+ , _gcmvpiMaxWorkerCount = Nothing
962+ , _gcmvpiOutputPath = Nothing
963+ , _gcmvpiRegion = Nothing
964+ , _gcmvpiInputPaths = Nothing
965+ }
966+
967+-- | Use this field if you want to specify a version of the model to use. The
968+-- string is formatted the same way as \`model_version\`, with the addition
969+-- of the version information:
970+-- \`\"projects\/[YOUR_PROJECT]\/models\/YOUR_MODEL\/versions\/[YOUR_VERSION]\"\`
971+gcmvpiVersionName :: Lens' GoogleCloudMlV1beta1__PredictionInput (Maybe Text)
972+gcmvpiVersionName
973+ = lens _gcmvpiVersionName
974+ (\ s a -> s{_gcmvpiVersionName = a})
975+
976+-- | Use this field if you want to use the default version for the specified
977+-- model. The string must use the following format:
978+-- \`\"projects\/[YOUR_PROJECT]\/models\/[YOUR_MODEL]\"\`
979+gcmvpiModelName :: Lens' GoogleCloudMlV1beta1__PredictionInput (Maybe Text)
980+gcmvpiModelName
981+ = lens _gcmvpiModelName
982+ (\ s a -> s{_gcmvpiModelName = a})
983+
984+-- | Required. The format of the input data files.
985+gcmvpiDataFormat :: Lens' GoogleCloudMlV1beta1__PredictionInput (Maybe GoogleCloudMlV1beta1__PredictionInputDataFormat)
986+gcmvpiDataFormat
987+ = lens _gcmvpiDataFormat
988+ (\ s a -> s{_gcmvpiDataFormat = a})
989+
990+-- | Optional. The maximum number of workers to be used for parallel
991+-- processing. Defaults to 10 if not specified.
992+gcmvpiMaxWorkerCount :: Lens' GoogleCloudMlV1beta1__PredictionInput (Maybe Int64)
993+gcmvpiMaxWorkerCount
994+ = lens _gcmvpiMaxWorkerCount
995+ (\ s a -> s{_gcmvpiMaxWorkerCount = a})
996+ . mapping _Coerce
997+
998+-- | Required. The output Google Cloud Storage location.
999+gcmvpiOutputPath :: Lens' GoogleCloudMlV1beta1__PredictionInput (Maybe Text)
1000+gcmvpiOutputPath
1001+ = lens _gcmvpiOutputPath
1002+ (\ s a -> s{_gcmvpiOutputPath = a})
1003+
1004+-- | Required. The Google Compute Engine region to run the prediction job in.
1005+gcmvpiRegion :: Lens' GoogleCloudMlV1beta1__PredictionInput (Maybe Text)
1006+gcmvpiRegion
1007+ = lens _gcmvpiRegion (\ s a -> s{_gcmvpiRegion = a})
1008+
1009+-- | Required. The Google Cloud Storage location of the input data files. May
1010+-- contain wildcards.
1011+gcmvpiInputPaths :: Lens' GoogleCloudMlV1beta1__PredictionInput [Text]
1012+gcmvpiInputPaths
1013+ = lens _gcmvpiInputPaths
1014+ (\ s a -> s{_gcmvpiInputPaths = a})
1015+ . _Default
1016+ . _Coerce
1017+
1018+instance FromJSON
1019+ GoogleCloudMlV1beta1__PredictionInput where
1020+ parseJSON
1021+ = withObject "GoogleCloudMlV1beta1PredictionInput"
1022+ (\ o ->
1023+ GoogleCloudMlV1beta1__PredictionInput' <$>
1024+ (o .:? "versionName") <*> (o .:? "modelName") <*>
1025+ (o .:? "dataFormat")
1026+ <*> (o .:? "maxWorkerCount")
1027+ <*> (o .:? "outputPath")
1028+ <*> (o .:? "region")
1029+ <*> (o .:? "inputPaths" .!= mempty))
1030+
1031+instance ToJSON GoogleCloudMlV1beta1__PredictionInput
1032+ where
1033+ toJSON GoogleCloudMlV1beta1__PredictionInput'{..}
1034+ = object
1035+ (catMaybes
1036+ [("versionName" .=) <$> _gcmvpiVersionName,
1037+ ("modelName" .=) <$> _gcmvpiModelName,
1038+ ("dataFormat" .=) <$> _gcmvpiDataFormat,
1039+ ("maxWorkerCount" .=) <$> _gcmvpiMaxWorkerCount,
1040+ ("outputPath" .=) <$> _gcmvpiOutputPath,
1041+ ("region" .=) <$> _gcmvpiRegion,
1042+ ("inputPaths" .=) <$> _gcmvpiInputPaths])
1043+
1044+-- | This resource represents a long-running operation that is the result of
1045+-- a network API call.
1046+--
1047+-- /See:/ 'googleLongrunning__Operation' smart constructor.
1048+data GoogleLongrunning__Operation = GoogleLongrunning__Operation'
1049+ { _gloDone :: !(Maybe Bool)
1050+ , _gloError :: !(Maybe GoogleRpc__Status)
1051+ , _gloResponse :: !(Maybe GoogleLongrunning__OperationResponse)
1052+ , _gloName :: !(Maybe Text)
1053+ , _gloMetadata :: !(Maybe GoogleLongrunning__OperationMetadata)
1054+ } deriving (Eq,Show,Data,Typeable,Generic)
1055+
1056+-- | Creates a value of 'GoogleLongrunning__Operation' with the minimum fields required to make a request.
1057+--
1058+-- Use one of the following lenses to modify other fields as desired:
1059+--
1060+-- * 'gloDone'
1061+--
1062+-- * 'gloError'
1063+--
1064+-- * 'gloResponse'
1065+--
1066+-- * 'gloName'
1067+--
1068+-- * 'gloMetadata'
1069+googleLongrunning__Operation
1070+ :: GoogleLongrunning__Operation
1071+googleLongrunning__Operation =
1072+ GoogleLongrunning__Operation'
1073+ { _gloDone = Nothing
1074+ , _gloError = Nothing
1075+ , _gloResponse = Nothing
1076+ , _gloName = Nothing
1077+ , _gloMetadata = Nothing
1078+ }
1079+
1080+-- | If the value is \`false\`, it means the operation is still in progress.
1081+-- If true, the operation is completed, and either \`error\` or
1082+-- \`response\` is available.
1083+gloDone :: Lens' GoogleLongrunning__Operation (Maybe Bool)
1084+gloDone = lens _gloDone (\ s a -> s{_gloDone = a})
1085+
1086+-- | The error result of the operation in case of failure or cancellation.
1087+gloError :: Lens' GoogleLongrunning__Operation (Maybe GoogleRpc__Status)
1088+gloError = lens _gloError (\ s a -> s{_gloError = a})
1089+
1090+-- | The normal response of the operation in case of success. If the original
1091+-- method returns no data on success, such as \`Delete\`, the response is
1092+-- \`google.protobuf.Empty\`. If the original method is standard
1093+-- \`Get\`\/\`Create\`\/\`Update\`, the response should be the resource.
1094+-- For other methods, the response should have the type \`XxxResponse\`,
1095+-- where \`Xxx\` is the original method name. For example, if the original
1096+-- method name is \`TakeSnapshot()\`, the inferred response type is
1097+-- \`TakeSnapshotResponse\`.
1098+gloResponse :: Lens' GoogleLongrunning__Operation (Maybe GoogleLongrunning__OperationResponse)
1099+gloResponse
1100+ = lens _gloResponse (\ s a -> s{_gloResponse = a})
1101+
1102+-- | The server-assigned name, which is only unique within the same service
1103+-- that originally returns it. If you use the default HTTP mapping, the
1104+-- \`name\` should have the format of \`operations\/some\/unique\/name\`.
1105+gloName :: Lens' GoogleLongrunning__Operation (Maybe Text)
1106+gloName = lens _gloName (\ s a -> s{_gloName = a})
1107+
1108+-- | Service-specific metadata associated with the operation. It typically
1109+-- contains progress information and common metadata such as create time.
1110+-- Some services might not provide such metadata. Any method that returns a
1111+-- long-running operation should document the metadata type, if any.
1112+gloMetadata :: Lens' GoogleLongrunning__Operation (Maybe GoogleLongrunning__OperationMetadata)
1113+gloMetadata
1114+ = lens _gloMetadata (\ s a -> s{_gloMetadata = a})
1115+
1116+instance FromJSON GoogleLongrunning__Operation where
1117+ parseJSON
1118+ = withObject "GoogleLongrunningOperation"
1119+ (\ o ->
1120+ GoogleLongrunning__Operation' <$>
1121+ (o .:? "done") <*> (o .:? "error") <*>
1122+ (o .:? "response")
1123+ <*> (o .:? "name")
1124+ <*> (o .:? "metadata"))
1125+
1126+instance ToJSON GoogleLongrunning__Operation where
1127+ toJSON GoogleLongrunning__Operation'{..}
1128+ = object
1129+ (catMaybes
1130+ [("done" .=) <$> _gloDone,
1131+ ("error" .=) <$> _gloError,
1132+ ("response" .=) <$> _gloResponse,
1133+ ("name" .=) <$> _gloName,
1134+ ("metadata" .=) <$> _gloMetadata])
1135+
1136+-- | The hyperparameters given to this trial.
1137+--
1138+-- /See:/ 'googleCloudMlV1beta1__HyperparameterOutputHyperparameters' smart constructor.
1139+newtype GoogleCloudMlV1beta1__HyperparameterOutputHyperparameters = GoogleCloudMlV1beta1__HyperparameterOutputHyperparameters'
1140+ { _gcmvhohAddtional :: HashMap Text Text
1141+ } deriving (Eq,Show,Data,Typeable,Generic)
1142+
1143+-- | Creates a value of 'GoogleCloudMlV1beta1__HyperparameterOutputHyperparameters' with the minimum fields required to make a request.
1144+--
1145+-- Use one of the following lenses to modify other fields as desired:
1146+--
1147+-- * 'gcmvhohAddtional'
1148+googleCloudMlV1beta1__HyperparameterOutputHyperparameters
1149+ :: HashMap Text Text -- ^ 'gcmvhohAddtional'
1150+ -> GoogleCloudMlV1beta1__HyperparameterOutputHyperparameters
1151+googleCloudMlV1beta1__HyperparameterOutputHyperparameters pGcmvhohAddtional_ =
1152+ GoogleCloudMlV1beta1__HyperparameterOutputHyperparameters'
1153+ { _gcmvhohAddtional = _Coerce # pGcmvhohAddtional_
1154+ }
1155+
1156+gcmvhohAddtional :: Lens' GoogleCloudMlV1beta1__HyperparameterOutputHyperparameters (HashMap Text Text)
1157+gcmvhohAddtional
1158+ = lens _gcmvhohAddtional
1159+ (\ s a -> s{_gcmvhohAddtional = a})
1160+ . _Coerce
1161+
1162+instance FromJSON
1163+ GoogleCloudMlV1beta1__HyperparameterOutputHyperparameters
1164+ where
1165+ parseJSON
1166+ = withObject
1167+ "GoogleCloudMlV1beta1HyperparameterOutputHyperparameters"
1168+ (\ o ->
1169+ GoogleCloudMlV1beta1__HyperparameterOutputHyperparameters'
1170+ <$> (parseJSONObject o))
1171+
1172+instance ToJSON
1173+ GoogleCloudMlV1beta1__HyperparameterOutputHyperparameters
1174+ where
1175+ toJSON = toJSON . _gcmvhohAddtional
1176+
1177+-- | The \`Status\` type defines a logical error model that is suitable for
1178+-- different programming environments, including REST APIs and RPC APIs. It
1179+-- is used by [gRPC](https:\/\/github.com\/grpc). The error model is
1180+-- designed to be: - Simple to use and understand for most users - Flexible
1181+-- enough to meet unexpected needs # Overview The \`Status\` message
1182+-- contains three pieces of data: error code, error message, and error
1183+-- details. The error code should be an enum value of google.rpc.Code, but
1184+-- it may accept additional error codes if needed. The error message should
1185+-- be a developer-facing English message that helps developers *understand*
1186+-- and *resolve* the error. If a localized user-facing error message is
1187+-- needed, put the localized message in the error details or localize it in
1188+-- the client. The optional error details may contain arbitrary information
1189+-- about the error. There is a predefined set of error detail types in the
1190+-- package \`google.rpc\` which can be used for common error conditions. #
1191+-- Language mapping The \`Status\` message is the logical representation of
1192+-- the error model, but it is not necessarily the actual wire format. When
1193+-- the \`Status\` message is exposed in different client libraries and
1194+-- different wire protocols, it can be mapped differently. For example, it
1195+-- will likely be mapped to some exceptions in Java, but more likely mapped
1196+-- to some error codes in C. # Other uses The error model and the
1197+-- \`Status\` message can be used in a variety of environments, either with
1198+-- or without APIs, to provide a consistent developer experience across
1199+-- different environments. Example uses of this error model include: -
1200+-- Partial errors. If a service needs to return partial errors to the
1201+-- client, it may embed the \`Status\` in the normal response to indicate
1202+-- the partial errors. - Workflow errors. A typical workflow has multiple
1203+-- steps. Each step may have a \`Status\` message for error reporting
1204+-- purpose. - Batch operations. If a client uses batch request and batch
1205+-- response, the \`Status\` message should be used directly inside batch
1206+-- response, one for each error sub-response. - Asynchronous operations. If
1207+-- an API call embeds asynchronous operation results in its response, the
1208+-- status of those operations should be represented directly using the
1209+-- \`Status\` message. - Logging. If some API errors are stored in logs,
1210+-- the message \`Status\` could be used directly after any stripping needed
1211+-- for security\/privacy reasons.
1212+--
1213+-- /See:/ 'googleRpc__Status' smart constructor.
1214+data GoogleRpc__Status = GoogleRpc__Status'
1215+ { _grsDetails :: !(Maybe [GoogleRpc__StatusDetailsItem])
1216+ , _grsCode :: !(Maybe (Textual Int32))
1217+ , _grsMessage :: !(Maybe Text)
1218+ } deriving (Eq,Show,Data,Typeable,Generic)
1219+
1220+-- | Creates a value of 'GoogleRpc__Status' with the minimum fields required to make a request.
1221+--
1222+-- Use one of the following lenses to modify other fields as desired:
1223+--
1224+-- * 'grsDetails'
1225+--
1226+-- * 'grsCode'
1227+--
1228+-- * 'grsMessage'
1229+googleRpc__Status
1230+ :: GoogleRpc__Status
1231+googleRpc__Status =
1232+ GoogleRpc__Status'
1233+ { _grsDetails = Nothing
1234+ , _grsCode = Nothing
1235+ , _grsMessage = Nothing
1236+ }
1237+
1238+-- | A list of messages that carry the error details. There will be a common
1239+-- set of message types for APIs to use.
1240+grsDetails :: Lens' GoogleRpc__Status [GoogleRpc__StatusDetailsItem]
1241+grsDetails
1242+ = lens _grsDetails (\ s a -> s{_grsDetails = a}) .
1243+ _Default
1244+ . _Coerce
1245+
1246+-- | The status code, which should be an enum value of google.rpc.Code.
1247+grsCode :: Lens' GoogleRpc__Status (Maybe Int32)
1248+grsCode
1249+ = lens _grsCode (\ s a -> s{_grsCode = a}) .
1250+ mapping _Coerce
1251+
1252+-- | A developer-facing error message, which should be in English. Any
1253+-- user-facing error message should be localized and sent in the
1254+-- google.rpc.Status.details field, or localized by the client.
1255+grsMessage :: Lens' GoogleRpc__Status (Maybe Text)
1256+grsMessage
1257+ = lens _grsMessage (\ s a -> s{_grsMessage = a})
1258+
1259+instance FromJSON GoogleRpc__Status where
1260+ parseJSON
1261+ = withObject "GoogleRpcStatus"
1262+ (\ o ->
1263+ GoogleRpc__Status' <$>
1264+ (o .:? "details" .!= mempty) <*> (o .:? "code") <*>
1265+ (o .:? "message"))
1266+
1267+instance ToJSON GoogleRpc__Status where
1268+ toJSON GoogleRpc__Status'{..}
1269+ = object
1270+ (catMaybes
1271+ [("details" .=) <$> _grsDetails,
1272+ ("code" .=) <$> _grsCode,
1273+ ("message" .=) <$> _grsMessage])
1274+
1275+-- | Service-specific metadata associated with the operation. It typically
1276+-- contains progress information and common metadata such as create time.
1277+-- Some services might not provide such metadata. Any method that returns a
1278+-- long-running operation should document the metadata type, if any.
1279+--
1280+-- /See:/ 'googleLongrunning__OperationMetadata' smart constructor.
1281+newtype GoogleLongrunning__OperationMetadata = GoogleLongrunning__OperationMetadata'
1282+ { _glomAddtional :: HashMap Text JSONValue
1283+ } deriving (Eq,Show,Data,Typeable,Generic)
1284+
1285+-- | Creates a value of 'GoogleLongrunning__OperationMetadata' with the minimum fields required to make a request.
1286+--
1287+-- Use one of the following lenses to modify other fields as desired:
1288+--
1289+-- * 'glomAddtional'
1290+googleLongrunning__OperationMetadata
1291+ :: HashMap Text JSONValue -- ^ 'glomAddtional'
1292+ -> GoogleLongrunning__OperationMetadata
1293+googleLongrunning__OperationMetadata pGlomAddtional_ =
1294+ GoogleLongrunning__OperationMetadata'
1295+ { _glomAddtional = _Coerce # pGlomAddtional_
1296+ }
1297+
1298+-- | Properties of the object. Contains field \'type with type URL.
1299+glomAddtional :: Lens' GoogleLongrunning__OperationMetadata (HashMap Text JSONValue)
1300+glomAddtional
1301+ = lens _glomAddtional
1302+ (\ s a -> s{_glomAddtional = a})
1303+ . _Coerce
1304+
1305+instance FromJSON
1306+ GoogleLongrunning__OperationMetadata where
1307+ parseJSON
1308+ = withObject "GoogleLongrunningOperationMetadata"
1309+ (\ o ->
1310+ GoogleLongrunning__OperationMetadata' <$>
1311+ (parseJSONObject o))
1312+
1313+instance ToJSON GoogleLongrunning__OperationMetadata
1314+ where
1315+ toJSON = toJSON . _glomAddtional
1316+
1317+-- | Represents results of a prediction job.
1318+--
1319+-- /See:/ 'googleCloudMlV1beta1__PredictionOutput' smart constructor.
1320+data GoogleCloudMlV1beta1__PredictionOutput = GoogleCloudMlV1beta1__PredictionOutput'
1321+ { _gcmvpoErrorCount :: !(Maybe (Textual Int64))
1322+ , _gcmvpoPredictionCount :: !(Maybe (Textual Int64))
1323+ , _gcmvpoOutputPath :: !(Maybe Text)
1324+ } deriving (Eq,Show,Data,Typeable,Generic)
1325+
1326+-- | Creates a value of 'GoogleCloudMlV1beta1__PredictionOutput' with the minimum fields required to make a request.
1327+--
1328+-- Use one of the following lenses to modify other fields as desired:
1329+--
1330+-- * 'gcmvpoErrorCount'
1331+--
1332+-- * 'gcmvpoPredictionCount'
1333+--
1334+-- * 'gcmvpoOutputPath'
1335+googleCloudMlV1beta1__PredictionOutput
1336+ :: GoogleCloudMlV1beta1__PredictionOutput
1337+googleCloudMlV1beta1__PredictionOutput =
1338+ GoogleCloudMlV1beta1__PredictionOutput'
1339+ { _gcmvpoErrorCount = Nothing
1340+ , _gcmvpoPredictionCount = Nothing
1341+ , _gcmvpoOutputPath = Nothing
1342+ }
1343+
1344+-- | The number of data instances which resulted in errors.
1345+gcmvpoErrorCount :: Lens' GoogleCloudMlV1beta1__PredictionOutput (Maybe Int64)
1346+gcmvpoErrorCount
1347+ = lens _gcmvpoErrorCount
1348+ (\ s a -> s{_gcmvpoErrorCount = a})
1349+ . mapping _Coerce
1350+
1351+-- | The number of generated predictions.
1352+gcmvpoPredictionCount :: Lens' GoogleCloudMlV1beta1__PredictionOutput (Maybe Int64)
1353+gcmvpoPredictionCount
1354+ = lens _gcmvpoPredictionCount
1355+ (\ s a -> s{_gcmvpoPredictionCount = a})
1356+ . mapping _Coerce
1357+
1358+-- | The output Google Cloud Storage location provided at the job creation
1359+-- time.
1360+gcmvpoOutputPath :: Lens' GoogleCloudMlV1beta1__PredictionOutput (Maybe Text)
1361+gcmvpoOutputPath
1362+ = lens _gcmvpoOutputPath
1363+ (\ s a -> s{_gcmvpoOutputPath = a})
1364+
1365+instance FromJSON
1366+ GoogleCloudMlV1beta1__PredictionOutput where
1367+ parseJSON
1368+ = withObject "GoogleCloudMlV1beta1PredictionOutput"
1369+ (\ o ->
1370+ GoogleCloudMlV1beta1__PredictionOutput' <$>
1371+ (o .:? "errorCount") <*> (o .:? "predictionCount")
1372+ <*> (o .:? "outputPath"))
1373+
1374+instance ToJSON
1375+ GoogleCloudMlV1beta1__PredictionOutput where
1376+ toJSON GoogleCloudMlV1beta1__PredictionOutput'{..}
1377+ = object
1378+ (catMaybes
1379+ [("errorCount" .=) <$> _gcmvpoErrorCount,
1380+ ("predictionCount" .=) <$> _gcmvpoPredictionCount,
1381+ ("outputPath" .=) <$> _gcmvpoOutputPath])
1382+
1383+-- | Request message for the CancelJob method.
1384+--
1385+-- /See:/ 'googleCloudMlV1beta1__CancelJobRequest' smart constructor.
1386+data GoogleCloudMlV1beta1__CancelJobRequest =
1387+ GoogleCloudMlV1beta1__CancelJobRequest'
1388+ deriving (Eq,Show,Data,Typeable,Generic)
1389+
1390+-- | Creates a value of 'GoogleCloudMlV1beta1__CancelJobRequest' with the minimum fields required to make a request.
1391+--
1392+googleCloudMlV1beta1__CancelJobRequest
1393+ :: GoogleCloudMlV1beta1__CancelJobRequest
1394+googleCloudMlV1beta1__CancelJobRequest =
1395+ GoogleCloudMlV1beta1__CancelJobRequest'
1396+
1397+instance FromJSON
1398+ GoogleCloudMlV1beta1__CancelJobRequest where
1399+ parseJSON
1400+ = withObject "GoogleCloudMlV1beta1CancelJobRequest"
1401+ (\ o -> pure GoogleCloudMlV1beta1__CancelJobRequest')
1402+
1403+instance ToJSON
1404+ GoogleCloudMlV1beta1__CancelJobRequest where
1405+ toJSON = const emptyObject
1406+
1407+-- | Response message for the ListModels method.
1408+--
1409+-- /See:/ 'googleCloudMlV1beta1__ListModelsResponse' smart constructor.
1410+data GoogleCloudMlV1beta1__ListModelsResponse = GoogleCloudMlV1beta1__ListModelsResponse'
1411+ { _gcmvlmrNextPageToken :: !(Maybe Text)
1412+ , _gcmvlmrModels :: !(Maybe [GoogleCloudMlV1beta1__Model])
1413+ } deriving (Eq,Show,Data,Typeable,Generic)
1414+
1415+-- | Creates a value of 'GoogleCloudMlV1beta1__ListModelsResponse' with the minimum fields required to make a request.
1416+--
1417+-- Use one of the following lenses to modify other fields as desired:
1418+--
1419+-- * 'gcmvlmrNextPageToken'
1420+--
1421+-- * 'gcmvlmrModels'
1422+googleCloudMlV1beta1__ListModelsResponse
1423+ :: GoogleCloudMlV1beta1__ListModelsResponse
1424+googleCloudMlV1beta1__ListModelsResponse =
1425+ GoogleCloudMlV1beta1__ListModelsResponse'
1426+ { _gcmvlmrNextPageToken = Nothing
1427+ , _gcmvlmrModels = Nothing
1428+ }
1429+
1430+-- | Optional. Pass this token as the \`page_token\` field of the request for
1431+-- a subsequent call.
1432+gcmvlmrNextPageToken :: Lens' GoogleCloudMlV1beta1__ListModelsResponse (Maybe Text)
1433+gcmvlmrNextPageToken
1434+ = lens _gcmvlmrNextPageToken
1435+ (\ s a -> s{_gcmvlmrNextPageToken = a})
1436+
1437+-- | The list of models.
1438+gcmvlmrModels :: Lens' GoogleCloudMlV1beta1__ListModelsResponse [GoogleCloudMlV1beta1__Model]
1439+gcmvlmrModels
1440+ = lens _gcmvlmrModels
1441+ (\ s a -> s{_gcmvlmrModels = a})
1442+ . _Default
1443+ . _Coerce
1444+
1445+instance FromJSON
1446+ GoogleCloudMlV1beta1__ListModelsResponse where
1447+ parseJSON
1448+ = withObject "GoogleCloudMlV1beta1ListModelsResponse"
1449+ (\ o ->
1450+ GoogleCloudMlV1beta1__ListModelsResponse' <$>
1451+ (o .:? "nextPageToken") <*>
1452+ (o .:? "models" .!= mempty))
1453+
1454+instance ToJSON
1455+ GoogleCloudMlV1beta1__ListModelsResponse where
1456+ toJSON GoogleCloudMlV1beta1__ListModelsResponse'{..}
1457+ = object
1458+ (catMaybes
1459+ [("nextPageToken" .=) <$> _gcmvlmrNextPageToken,
1460+ ("models" .=) <$> _gcmvlmrModels])
1461+
1462+-- | Response message for the ListJobs method.
1463+--
1464+-- /See:/ 'googleCloudMlV1beta1__ListJobsResponse' smart constructor.
1465+data GoogleCloudMlV1beta1__ListJobsResponse = GoogleCloudMlV1beta1__ListJobsResponse'
1466+ { _gcmvljrNextPageToken :: !(Maybe Text)
1467+ , _gcmvljrJobs :: !(Maybe [GoogleCloudMlV1beta1__Job])
1468+ } deriving (Eq,Show,Data,Typeable,Generic)
1469+
1470+-- | Creates a value of 'GoogleCloudMlV1beta1__ListJobsResponse' with the minimum fields required to make a request.
1471+--
1472+-- Use one of the following lenses to modify other fields as desired:
1473+--
1474+-- * 'gcmvljrNextPageToken'
1475+--
1476+-- * 'gcmvljrJobs'
1477+googleCloudMlV1beta1__ListJobsResponse
1478+ :: GoogleCloudMlV1beta1__ListJobsResponse
1479+googleCloudMlV1beta1__ListJobsResponse =
1480+ GoogleCloudMlV1beta1__ListJobsResponse'
1481+ { _gcmvljrNextPageToken = Nothing
1482+ , _gcmvljrJobs = Nothing
1483+ }
1484+
1485+-- | Optional. Pass this token as the \`page_token\` field of the request for
1486+-- a subsequent call.
1487+gcmvljrNextPageToken :: Lens' GoogleCloudMlV1beta1__ListJobsResponse (Maybe Text)
1488+gcmvljrNextPageToken
1489+ = lens _gcmvljrNextPageToken
1490+ (\ s a -> s{_gcmvljrNextPageToken = a})
1491+
1492+-- | The list of jobs.
1493+gcmvljrJobs :: Lens' GoogleCloudMlV1beta1__ListJobsResponse [GoogleCloudMlV1beta1__Job]
1494+gcmvljrJobs
1495+ = lens _gcmvljrJobs (\ s a -> s{_gcmvljrJobs = a}) .
1496+ _Default
1497+ . _Coerce
1498+
1499+instance FromJSON
1500+ GoogleCloudMlV1beta1__ListJobsResponse where
1501+ parseJSON
1502+ = withObject "GoogleCloudMlV1beta1ListJobsResponse"
1503+ (\ o ->
1504+ GoogleCloudMlV1beta1__ListJobsResponse' <$>
1505+ (o .:? "nextPageToken") <*>
1506+ (o .:? "jobs" .!= mempty))
1507+
1508+instance ToJSON
1509+ GoogleCloudMlV1beta1__ListJobsResponse where
1510+ toJSON GoogleCloudMlV1beta1__ListJobsResponse'{..}
1511+ = object
1512+ (catMaybes
1513+ [("nextPageToken" .=) <$> _gcmvljrNextPageToken,
1514+ ("jobs" .=) <$> _gcmvljrJobs])
1515+
1516+-- | Represents input parameters for a training job.
1517+--
1518+-- /See:/ 'googleCloudMlV1beta1__TrainingInput' smart constructor.
1519+data GoogleCloudMlV1beta1__TrainingInput = GoogleCloudMlV1beta1__TrainingInput'
1520+ { _gcmvtiMasterType :: !(Maybe Text)
1521+ , _gcmvtiParameterServerCount :: !(Maybe (Textual Int64))
1522+ , _gcmvtiArgs :: !(Maybe [Text])
1523+ , _gcmvtiWorkerCount :: !(Maybe (Textual Int64))
1524+ , _gcmvtiWorkerType :: !(Maybe Text)
1525+ , _gcmvtiPythonModule :: !(Maybe Text)
1526+ , _gcmvtiParameterServerType :: !(Maybe Text)
1527+ , _gcmvtiHyperparameters :: !(Maybe GoogleCloudMlV1beta1__HyperparameterSpec)
1528+ , _gcmvtiPackageURIs :: !(Maybe [Text])
1529+ , _gcmvtiScaleTier :: !(Maybe GoogleCloudMlV1beta1__TrainingInputScaleTier)
1530+ , _gcmvtiRegion :: !(Maybe Text)
1531+ } deriving (Eq,Show,Data,Typeable,Generic)
1532+
1533+-- | Creates a value of 'GoogleCloudMlV1beta1__TrainingInput' with the minimum fields required to make a request.
1534+--
1535+-- Use one of the following lenses to modify other fields as desired:
1536+--
1537+-- * 'gcmvtiMasterType'
1538+--
1539+-- * 'gcmvtiParameterServerCount'
1540+--
1541+-- * 'gcmvtiArgs'
1542+--
1543+-- * 'gcmvtiWorkerCount'
1544+--
1545+-- * 'gcmvtiWorkerType'
1546+--
1547+-- * 'gcmvtiPythonModule'
1548+--
1549+-- * 'gcmvtiParameterServerType'
1550+--
1551+-- * 'gcmvtiHyperparameters'
1552+--
1553+-- * 'gcmvtiPackageURIs'
1554+--
1555+-- * 'gcmvtiScaleTier'
1556+--
1557+-- * 'gcmvtiRegion'
1558+googleCloudMlV1beta1__TrainingInput
1559+ :: GoogleCloudMlV1beta1__TrainingInput
1560+googleCloudMlV1beta1__TrainingInput =
1561+ GoogleCloudMlV1beta1__TrainingInput'
1562+ { _gcmvtiMasterType = Nothing
1563+ , _gcmvtiParameterServerCount = Nothing
1564+ , _gcmvtiArgs = Nothing
1565+ , _gcmvtiWorkerCount = Nothing
1566+ , _gcmvtiWorkerType = Nothing
1567+ , _gcmvtiPythonModule = Nothing
1568+ , _gcmvtiParameterServerType = Nothing
1569+ , _gcmvtiHyperparameters = Nothing
1570+ , _gcmvtiPackageURIs = Nothing
1571+ , _gcmvtiScaleTier = Nothing
1572+ , _gcmvtiRegion = Nothing
1573+ }
1574+
1575+-- | Optional. Specifies the type of virtual machine to use for your training
1576+-- job\'s master worker. The following types are supported:
1577+--
1578+-- [standard]
1579+-- A basic machine configuration suitable for training simple models
1580+-- with small to moderate datasets.
1581+-- [large_model]
1582+-- A machine with a lot of memory, specially suited for parameter
1583+-- servers when your model is large (having many hidden layers or
1584+-- layers with very large numbers of nodes).
1585+-- [complex_model_s]
1586+-- A machine suitable for the master and workers of the cluster when
1587+-- your model requires more computation than the standard machine can
1588+-- handle satisfactorily.
1589+-- [complex_model_m]
1590+-- A machine with roughly twice the number of cores and roughly double
1591+-- the memory of 'complex_model_s'.
1592+-- [complex_model_l]
1593+-- A machine with roughly twice the number of cores and roughly double
1594+-- the memory of 'complex_model_m'.
1595+--
1596+-- You must set this value when \`scaleTier\` is set to \`CUSTOM\`.
1597+gcmvtiMasterType :: Lens' GoogleCloudMlV1beta1__TrainingInput (Maybe Text)
1598+gcmvtiMasterType
1599+ = lens _gcmvtiMasterType
1600+ (\ s a -> s{_gcmvtiMasterType = a})
1601+
1602+-- | Optional. The number of parameter server replicas to use for the
1603+-- training job. Each replica in the cluster will be of the type specified
1604+-- in \`parameter_server_type\`. This value can only be used when
1605+-- \`scale_tier\` is set to \`CUSTOM\`.If you set this value, you must also
1606+-- set \`parameter_server_type\`.
1607+gcmvtiParameterServerCount :: Lens' GoogleCloudMlV1beta1__TrainingInput (Maybe Int64)
1608+gcmvtiParameterServerCount
1609+ = lens _gcmvtiParameterServerCount
1610+ (\ s a -> s{_gcmvtiParameterServerCount = a})
1611+ . mapping _Coerce
1612+
1613+-- | Optional. Command line arguments to pass to the program.
1614+gcmvtiArgs :: Lens' GoogleCloudMlV1beta1__TrainingInput [Text]
1615+gcmvtiArgs
1616+ = lens _gcmvtiArgs (\ s a -> s{_gcmvtiArgs = a}) .
1617+ _Default
1618+ . _Coerce
1619+
1620+-- | Optional. The number of worker replicas to use for the training job.
1621+-- Each replica in the cluster will be of the type specified in
1622+-- \`worker_type\`. This value can only be used when \`scale_tier\` is set
1623+-- to \`CUSTOM\`. If you set this value, you must also set \`worker_type\`.
1624+gcmvtiWorkerCount :: Lens' GoogleCloudMlV1beta1__TrainingInput (Maybe Int64)
1625+gcmvtiWorkerCount
1626+ = lens _gcmvtiWorkerCount
1627+ (\ s a -> s{_gcmvtiWorkerCount = a})
1628+ . mapping _Coerce
1629+
1630+-- | Optional. Specifies the type of virtual machine to use for your training
1631+-- job\'s worker nodes. The supported values are the same as those
1632+-- described in the entry for \`masterType\`. This value must be present
1633+-- when \`scaleTier\` is set to \`CUSTOM\` and \`workerCount\` is greater
1634+-- than zero.
1635+gcmvtiWorkerType :: Lens' GoogleCloudMlV1beta1__TrainingInput (Maybe Text)
1636+gcmvtiWorkerType
1637+ = lens _gcmvtiWorkerType
1638+ (\ s a -> s{_gcmvtiWorkerType = a})
1639+
1640+-- | Required. The Python module name to run after installing the packages.
1641+gcmvtiPythonModule :: Lens' GoogleCloudMlV1beta1__TrainingInput (Maybe Text)
1642+gcmvtiPythonModule
1643+ = lens _gcmvtiPythonModule
1644+ (\ s a -> s{_gcmvtiPythonModule = a})
1645+
1646+-- | Optional. Specifies the type of virtual machine to use for your training
1647+-- job\'s parameter server. The supported values are the same as those
1648+-- described in the entry for \`master_type\`. This value must be present
1649+-- when \`scaleTier\` is set to \`CUSTOM\` and \`parameter_server_count\`
1650+-- is greater than zero.
1651+gcmvtiParameterServerType :: Lens' GoogleCloudMlV1beta1__TrainingInput (Maybe Text)
1652+gcmvtiParameterServerType
1653+ = lens _gcmvtiParameterServerType
1654+ (\ s a -> s{_gcmvtiParameterServerType = a})
1655+
1656+-- | Optional. The set of Hyperparameters to tune.
1657+gcmvtiHyperparameters :: Lens' GoogleCloudMlV1beta1__TrainingInput (Maybe GoogleCloudMlV1beta1__HyperparameterSpec)
1658+gcmvtiHyperparameters
1659+ = lens _gcmvtiHyperparameters
1660+ (\ s a -> s{_gcmvtiHyperparameters = a})
1661+
1662+-- | Required. The Google Cloud Storage location of the packages with the
1663+-- training program and any additional dependencies.
1664+gcmvtiPackageURIs :: Lens' GoogleCloudMlV1beta1__TrainingInput [Text]
1665+gcmvtiPackageURIs
1666+ = lens _gcmvtiPackageURIs
1667+ (\ s a -> s{_gcmvtiPackageURIs = a})
1668+ . _Default
1669+ . _Coerce
1670+
1671+-- | Required. Specifies the machine types, the number of replicas for
1672+-- workers and parameter servers.
1673+gcmvtiScaleTier :: Lens' GoogleCloudMlV1beta1__TrainingInput (Maybe GoogleCloudMlV1beta1__TrainingInputScaleTier)
1674+gcmvtiScaleTier
1675+ = lens _gcmvtiScaleTier
1676+ (\ s a -> s{_gcmvtiScaleTier = a})
1677+
1678+-- | Required. The Google Compute Engine region to run the training job in.
1679+gcmvtiRegion :: Lens' GoogleCloudMlV1beta1__TrainingInput (Maybe Text)
1680+gcmvtiRegion
1681+ = lens _gcmvtiRegion (\ s a -> s{_gcmvtiRegion = a})
1682+
1683+instance FromJSON GoogleCloudMlV1beta1__TrainingInput
1684+ where
1685+ parseJSON
1686+ = withObject "GoogleCloudMlV1beta1TrainingInput"
1687+ (\ o ->
1688+ GoogleCloudMlV1beta1__TrainingInput' <$>
1689+ (o .:? "masterType") <*>
1690+ (o .:? "parameterServerCount")
1691+ <*> (o .:? "args" .!= mempty)
1692+ <*> (o .:? "workerCount")
1693+ <*> (o .:? "workerType")
1694+ <*> (o .:? "pythonModule")
1695+ <*> (o .:? "parameterServerType")
1696+ <*> (o .:? "hyperparameters")
1697+ <*> (o .:? "packageUris" .!= mempty)
1698+ <*> (o .:? "scaleTier")
1699+ <*> (o .:? "region"))
1700+
1701+instance ToJSON GoogleCloudMlV1beta1__TrainingInput
1702+ where
1703+ toJSON GoogleCloudMlV1beta1__TrainingInput'{..}
1704+ = object
1705+ (catMaybes
1706+ [("masterType" .=) <$> _gcmvtiMasterType,
1707+ ("parameterServerCount" .=) <$>
1708+ _gcmvtiParameterServerCount,
1709+ ("args" .=) <$> _gcmvtiArgs,
1710+ ("workerCount" .=) <$> _gcmvtiWorkerCount,
1711+ ("workerType" .=) <$> _gcmvtiWorkerType,
1712+ ("pythonModule" .=) <$> _gcmvtiPythonModule,
1713+ ("parameterServerType" .=) <$>
1714+ _gcmvtiParameterServerType,
1715+ ("hyperparameters" .=) <$> _gcmvtiHyperparameters,
1716+ ("packageUris" .=) <$> _gcmvtiPackageURIs,
1717+ ("scaleTier" .=) <$> _gcmvtiScaleTier,
1718+ ("region" .=) <$> _gcmvtiRegion])
1719+
1720+--
1721+-- /See:/ 'googleRpc__StatusDetailsItem' smart constructor.
1722+newtype GoogleRpc__StatusDetailsItem = GoogleRpc__StatusDetailsItem'
1723+ { _grsdiAddtional :: HashMap Text JSONValue
1724+ } deriving (Eq,Show,Data,Typeable,Generic)
1725+
1726+-- | Creates a value of 'GoogleRpc__StatusDetailsItem' with the minimum fields required to make a request.
1727+--
1728+-- Use one of the following lenses to modify other fields as desired:
1729+--
1730+-- * 'grsdiAddtional'
1731+googleRpc__StatusDetailsItem
1732+ :: HashMap Text JSONValue -- ^ 'grsdiAddtional'
1733+ -> GoogleRpc__StatusDetailsItem
1734+googleRpc__StatusDetailsItem pGrsdiAddtional_ =
1735+ GoogleRpc__StatusDetailsItem'
1736+ { _grsdiAddtional = _Coerce # pGrsdiAddtional_
1737+ }
1738+
1739+-- | Properties of the object. Contains field \'type with type URL.
1740+grsdiAddtional :: Lens' GoogleRpc__StatusDetailsItem (HashMap Text JSONValue)
1741+grsdiAddtional
1742+ = lens _grsdiAddtional
1743+ (\ s a -> s{_grsdiAddtional = a})
1744+ . _Coerce
1745+
1746+instance FromJSON GoogleRpc__StatusDetailsItem where
1747+ parseJSON
1748+ = withObject "GoogleRpcStatusDetailsItem"
1749+ (\ o ->
1750+ GoogleRpc__StatusDetailsItem' <$>
1751+ (parseJSONObject o))
1752+
1753+instance ToJSON GoogleRpc__StatusDetailsItem where
1754+ toJSON = toJSON . _grsdiAddtional
1755+
1756+-- | A generic empty message that you can re-use to avoid defining duplicated
1757+-- empty messages in your APIs. A typical example is to use it as the
1758+-- request or the response type of an API method. For instance: service Foo
1759+-- { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The
1760+-- JSON representation for \`Empty\` is empty JSON object \`{}\`.
1761+--
1762+-- /See:/ 'googleProtobuf__Empty' smart constructor.
1763+data GoogleProtobuf__Empty =
1764+ GoogleProtobuf__Empty'
1765+ deriving (Eq,Show,Data,Typeable,Generic)
1766+
1767+-- | Creates a value of 'GoogleProtobuf__Empty' with the minimum fields required to make a request.
1768+--
1769+googleProtobuf__Empty
1770+ :: GoogleProtobuf__Empty
1771+googleProtobuf__Empty = GoogleProtobuf__Empty'
1772+
1773+instance FromJSON GoogleProtobuf__Empty where
1774+ parseJSON
1775+ = withObject "GoogleProtobufEmpty"
1776+ (\ o -> pure GoogleProtobuf__Empty')
1777+
1778+instance ToJSON GoogleProtobuf__Empty where
1779+ toJSON = const emptyObject
1780+
1781+-- | An observed value of a metric.
1782+--
1783+-- /See:/ 'googleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric' smart constructor.
1784+data GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric = GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric'
1785+ { _gcmvhohmTrainingStep :: !(Maybe (Textual Int64))
1786+ , _gcmvhohmObjectiveValue :: !(Maybe (Textual Double))
1787+ } deriving (Eq,Show,Data,Typeable,Generic)
1788+
1789+-- | Creates a value of 'GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric' with the minimum fields required to make a request.
1790+--
1791+-- Use one of the following lenses to modify other fields as desired:
1792+--
1793+-- * 'gcmvhohmTrainingStep'
1794+--
1795+-- * 'gcmvhohmObjectiveValue'
1796+googleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric
1797+ :: GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric
1798+googleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric =
1799+ GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric'
1800+ { _gcmvhohmTrainingStep = Nothing
1801+ , _gcmvhohmObjectiveValue = Nothing
1802+ }
1803+
1804+-- | The global training step for this metric.
1805+gcmvhohmTrainingStep :: Lens' GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric (Maybe Int64)
1806+gcmvhohmTrainingStep
1807+ = lens _gcmvhohmTrainingStep
1808+ (\ s a -> s{_gcmvhohmTrainingStep = a})
1809+ . mapping _Coerce
1810+
1811+-- | The objective value at this training step.
1812+gcmvhohmObjectiveValue :: Lens' GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric (Maybe Double)
1813+gcmvhohmObjectiveValue
1814+ = lens _gcmvhohmObjectiveValue
1815+ (\ s a -> s{_gcmvhohmObjectiveValue = a})
1816+ . mapping _Coerce
1817+
1818+instance FromJSON
1819+ GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric
1820+ where
1821+ parseJSON
1822+ = withObject
1823+ "GoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetric"
1824+ (\ o ->
1825+ GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric'
1826+ <$>
1827+ (o .:? "trainingStep") <*> (o .:? "objectiveValue"))
1828+
1829+instance ToJSON
1830+ GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric
1831+ where
1832+ toJSON
1833+ GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric'{..}
1834+ = object
1835+ (catMaybes
1836+ [("trainingStep" .=) <$> _gcmvhohmTrainingStep,
1837+ ("objectiveValue" .=) <$> _gcmvhohmObjectiveValue])
1838+
1839+-- | Message that represents an arbitrary HTTP body. It should only be used
1840+-- for payload formats that can\'t be represented as JSON, such as raw
1841+-- binary or an HTML page. This message can be used both in streaming and
1842+-- non-streaming API methods in the request as well as the response. It can
1843+-- be used as a top-level request field, which is convenient if one wants
1844+-- to extract parameters from either the URL or HTTP template into the
1845+-- request fields and also want access to the raw HTTP body. Example:
1846+-- message GetResourceRequest { \/\/ A unique request id. string request_id
1847+-- = 1; \/\/ The raw HTTP body is bound to this field. google.api.HttpBody
1848+-- http_body = 2; } service ResourceService { rpc
1849+-- GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc
1850+-- UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); }
1851+-- Example with streaming methods: service CaldavService { rpc
1852+-- GetCalendar(stream google.api.HttpBody) returns (stream
1853+-- google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody)
1854+-- returns (stream google.api.HttpBody); } Use of this type only changes
1855+-- how the request and response bodies are handled, all other features will
1856+-- continue to work unchanged.
1857+--
1858+-- /See:/ 'googleAPI__HTTPBody' smart constructor.
1859+data GoogleAPI__HTTPBody = GoogleAPI__HTTPBody'
1860+ { _gahttpbData :: !(Maybe Base64)
1861+ , _gahttpbContentType :: !(Maybe Text)
1862+ } deriving (Eq,Show,Data,Typeable,Generic)
1863+
1864+-- | Creates a value of 'GoogleAPI__HTTPBody' with the minimum fields required to make a request.
1865+--
1866+-- Use one of the following lenses to modify other fields as desired:
1867+--
1868+-- * 'gahttpbData'
1869+--
1870+-- * 'gahttpbContentType'
1871+googleAPI__HTTPBody
1872+ :: GoogleAPI__HTTPBody
1873+googleAPI__HTTPBody =
1874+ GoogleAPI__HTTPBody'
1875+ { _gahttpbData = Nothing
1876+ , _gahttpbContentType = Nothing
1877+ }
1878+
1879+-- | HTTP body binary data.
1880+gahttpbData :: Lens' GoogleAPI__HTTPBody (Maybe ByteString)
1881+gahttpbData
1882+ = lens _gahttpbData (\ s a -> s{_gahttpbData = a}) .
1883+ mapping _Base64
1884+
1885+-- | The HTTP Content-Type string representing the content type of the body.
1886+gahttpbContentType :: Lens' GoogleAPI__HTTPBody (Maybe Text)
1887+gahttpbContentType
1888+ = lens _gahttpbContentType
1889+ (\ s a -> s{_gahttpbContentType = a})
1890+
1891+instance FromJSON GoogleAPI__HTTPBody where
1892+ parseJSON
1893+ = withObject "GoogleAPIHTTPBody"
1894+ (\ o ->
1895+ GoogleAPI__HTTPBody' <$>
1896+ (o .:? "data") <*> (o .:? "contentType"))
1897+
1898+instance ToJSON GoogleAPI__HTTPBody where
1899+ toJSON GoogleAPI__HTTPBody'{..}
1900+ = object
1901+ (catMaybes
1902+ [("data" .=) <$> _gahttpbData,
1903+ ("contentType" .=) <$> _gahttpbContentType])
1904+
1905+-- | Request for predictions to be issued against a trained model. The body
1906+-- of the request is a single JSON object with a single top-level field:
1907+--
1908+-- [instances]
1909+-- A JSON array containing values representing the instances to use for
1910+-- prediction.
1911+--
1912+-- The structure of each element of the instances list is determined by
1913+-- your model\'s input definition. Instances can include named inputs or
1914+-- can contain only unlabeled values. Most data does not include named
1915+-- inputs. Some instances will be simple JSON values (boolean, number, or
1916+-- string). However, instances are often lists of simple values, or complex
1917+-- nested lists. Here are some examples of request bodies: CSV data with
1918+-- each row encoded as a string value:
1919+--
1920+-- > {"instances": ["1.0,true,\\"x\\"", "-2.0,false,\\"y\\""]}
1921+--
1922+-- Plain text:
1923+--
1924+-- > {"instances": ["the quick brown fox", "la bruja le dio"]}
1925+--
1926+-- Sentences encoded as lists of words (vectors of strings):
1927+--
1928+-- > {"instances": [["the","quick","brown"], ["la","bruja","le"]]}
1929+--
1930+-- Floating point scalar values:
1931+--
1932+-- > {"instances": [0.0, 1.1, 2.2]}
1933+--
1934+-- Vectors of integers:
1935+--
1936+-- > {"instances": [[0, 1, 2], [3, 4, 5],...]}
1937+--
1938+-- Tensors (in this case, two-dimensional tensors):
1939+--
1940+-- > {"instances": [[[0, 1, 2], [3, 4, 5]], ...]}
1941+--
1942+-- Images represented as a three-dimensional list. In this encoding scheme
1943+-- the first two dimensions represent the rows and columns of the image,
1944+-- and the third contains the R, G, and B values for each pixel.
1945+--
1946+-- > {"instances": [[[[138, 30, 66], [130, 20, 56], ...]]]]}
1947+--
1948+-- Data must be encoded as UTF-8. If your data uses another character
1949+-- encoding, you must base64 encode the data and mark it as binary. To mark
1950+-- a JSON string as binary, replace it with an object with a single
1951+-- attribute named \`b\`:
1952+--
1953+-- > {"b": "..."}
1954+--
1955+-- For example: Two Serialized tf.Examples (fake data, for illustrative
1956+-- purposes only):
1957+--
1958+-- > {"instances": [{"b64": "X5ad6u"}, {"b64": "IA9j4nx"}]}
1959+--
1960+-- Two JPEG image byte strings (fake data, for illustrative purposes only):
1961+--
1962+-- > {"instances": [{"b64": "ASa8asdf"}, {"b64": "JLK7ljk3"}]}
1963+--
1964+-- If your data includes named references, format each instance as a JSON
1965+-- object with the named references as the keys: JSON input data to be
1966+-- preprocessed:
1967+--
1968+-- > {"instances": [{"a": 1.0, "b": true, "c": "x"},
1969+-- > {"a": -2.0, "b": false, "c": "y"}]}
1970+--
1971+-- Some models have an underlying TensorFlow graph that accepts multiple
1972+-- input tensors. In this case, you should use the names of JSON
1973+-- name\/value pairs to identify the input tensors, as shown in the
1974+-- following exmaples: For a graph with input tensor aliases \"tag\"
1975+-- (string) and \"image\" (base64-encoded string):
1976+--
1977+-- > {"instances": [{"tag": "beach", "image": {"b64": "ASa8asdf"}},
1978+-- > {"tag": "car", "image": {"b64": "JLK7ljk3"}}]}
1979+--
1980+-- For a graph with input tensor aliases \"tag\" (string) and \"image\"
1981+-- (3-dimensional array of 8-bit ints):
1982+--
1983+-- > {"instances": [{"tag": "beach", "image": [[[263, 1, 10], [262, 2, 11], ...]]},
1984+-- > {"tag": "car", "image": [[[10, 11, 24], [23, 10, 15], ...]]}]}
1985+--
1986+-- If the call is successful, the response body will contain one prediction
1987+-- entry per instance in the request body. If prediction fails for any
1988+-- instance, the response body will contain no predictions and will contian
1989+-- a single error entry instead.
1990+--
1991+-- /See:/ 'googleCloudMlV1beta1__PredictRequest' smart constructor.
1992+newtype GoogleCloudMlV1beta1__PredictRequest = GoogleCloudMlV1beta1__PredictRequest'
1993+ { _gcmvprHTTPBody :: Maybe GoogleAPI__HTTPBody
1994+ } deriving (Eq,Show,Data,Typeable,Generic)
1995+
1996+-- | Creates a value of 'GoogleCloudMlV1beta1__PredictRequest' with the minimum fields required to make a request.
1997+--
1998+-- Use one of the following lenses to modify other fields as desired:
1999+--
2000+-- * 'gcmvprHTTPBody'
2001+googleCloudMlV1beta1__PredictRequest
2002+ :: GoogleCloudMlV1beta1__PredictRequest
2003+googleCloudMlV1beta1__PredictRequest =
2004+ GoogleCloudMlV1beta1__PredictRequest'
2005+ { _gcmvprHTTPBody = Nothing
2006+ }
2007+
2008+-- | Required. The prediction request body.
2009+gcmvprHTTPBody :: Lens' GoogleCloudMlV1beta1__PredictRequest (Maybe GoogleAPI__HTTPBody)
2010+gcmvprHTTPBody
2011+ = lens _gcmvprHTTPBody
2012+ (\ s a -> s{_gcmvprHTTPBody = a})
2013+
2014+instance FromJSON
2015+ GoogleCloudMlV1beta1__PredictRequest where
2016+ parseJSON
2017+ = withObject "GoogleCloudMlV1beta1PredictRequest"
2018+ (\ o ->
2019+ GoogleCloudMlV1beta1__PredictRequest' <$>
2020+ (o .:? "httpBody"))
2021+
2022+instance ToJSON GoogleCloudMlV1beta1__PredictRequest
2023+ where
2024+ toJSON GoogleCloudMlV1beta1__PredictRequest'{..}
2025+ = object
2026+ (catMaybes [("httpBody" .=) <$> _gcmvprHTTPBody])
2027+
2028+-- | Represents a single hyperparameter to optimize.
2029+--
2030+-- /See:/ 'googleCloudMlV1beta1__ParameterSpec' smart constructor.
2031+data GoogleCloudMlV1beta1__ParameterSpec = GoogleCloudMlV1beta1__ParameterSpec'
2032+ { _gcmvpsMaxValue :: !(Maybe (Textual Double))
2033+ , _gcmvpsScaleType :: !(Maybe GoogleCloudMlV1beta1__ParameterSpecScaleType)
2034+ , _gcmvpsType :: !(Maybe GoogleCloudMlV1beta1__ParameterSpecType)
2035+ , _gcmvpsDiscreteValues :: !(Maybe [Textual Double])
2036+ , _gcmvpsParameterName :: !(Maybe Text)
2037+ , _gcmvpsCategoricalValues :: !(Maybe [Text])
2038+ , _gcmvpsMinValue :: !(Maybe (Textual Double))
2039+ } deriving (Eq,Show,Data,Typeable,Generic)
2040+
2041+-- | Creates a value of 'GoogleCloudMlV1beta1__ParameterSpec' with the minimum fields required to make a request.
2042+--
2043+-- Use one of the following lenses to modify other fields as desired:
2044+--
2045+-- * 'gcmvpsMaxValue'
2046+--
2047+-- * 'gcmvpsScaleType'
2048+--
2049+-- * 'gcmvpsType'
2050+--
2051+-- * 'gcmvpsDiscreteValues'
2052+--
2053+-- * 'gcmvpsParameterName'
2054+--
2055+-- * 'gcmvpsCategoricalValues'
2056+--
2057+-- * 'gcmvpsMinValue'
2058+googleCloudMlV1beta1__ParameterSpec
2059+ :: GoogleCloudMlV1beta1__ParameterSpec
2060+googleCloudMlV1beta1__ParameterSpec =
2061+ GoogleCloudMlV1beta1__ParameterSpec'
2062+ { _gcmvpsMaxValue = Nothing
2063+ , _gcmvpsScaleType = Nothing
2064+ , _gcmvpsType = Nothing
2065+ , _gcmvpsDiscreteValues = Nothing
2066+ , _gcmvpsParameterName = Nothing
2067+ , _gcmvpsCategoricalValues = Nothing
2068+ , _gcmvpsMinValue = Nothing
2069+ }
2070+
2071+-- | Required if typeis \`DOUBLE\` or \`INTEGER\`. This field should be unset
2072+-- if type is \`CATEGORICAL\`. This value should be integers if type is
2073+-- \`INTEGER\`.
2074+gcmvpsMaxValue :: Lens' GoogleCloudMlV1beta1__ParameterSpec (Maybe Double)
2075+gcmvpsMaxValue
2076+ = lens _gcmvpsMaxValue
2077+ (\ s a -> s{_gcmvpsMaxValue = a})
2078+ . mapping _Coerce
2079+
2080+-- | Optional. How the parameter should be scaled to the hypercube. Leave
2081+-- unset for categorical parameters. Some kind of scaling is strongly
2082+-- recommended for real or integral parameters (e.g.,
2083+-- \`UNIT_LINEAR_SCALE\`).
2084+gcmvpsScaleType :: Lens' GoogleCloudMlV1beta1__ParameterSpec (Maybe GoogleCloudMlV1beta1__ParameterSpecScaleType)
2085+gcmvpsScaleType
2086+ = lens _gcmvpsScaleType
2087+ (\ s a -> s{_gcmvpsScaleType = a})
2088+
2089+-- | Required. The type of the parameter.
2090+gcmvpsType :: Lens' GoogleCloudMlV1beta1__ParameterSpec (Maybe GoogleCloudMlV1beta1__ParameterSpecType)
2091+gcmvpsType
2092+ = lens _gcmvpsType (\ s a -> s{_gcmvpsType = a})
2093+
2094+-- | Required if type is \`DISCRETE\`. A list of feasible points. The list
2095+-- should be in strictly increasing order. For instance, this parameter
2096+-- might have possible settings of 1.5, 2.5, and 4.0. This list should not
2097+-- contain more than 1,000 values.
2098+gcmvpsDiscreteValues :: Lens' GoogleCloudMlV1beta1__ParameterSpec [Double]
2099+gcmvpsDiscreteValues
2100+ = lens _gcmvpsDiscreteValues
2101+ (\ s a -> s{_gcmvpsDiscreteValues = a})
2102+ . _Default
2103+ . _Coerce
2104+
2105+-- | Required. The parameter name must be unique amongst all ParameterConfigs
2106+-- in a HyperparameterSpec message. E.g., \"learning_rate\".
2107+gcmvpsParameterName :: Lens' GoogleCloudMlV1beta1__ParameterSpec (Maybe Text)
2108+gcmvpsParameterName
2109+ = lens _gcmvpsParameterName
2110+ (\ s a -> s{_gcmvpsParameterName = a})
2111+
2112+-- | Required if type is \`CATEGORICAL\`. The list of possible categories.
2113+gcmvpsCategoricalValues :: Lens' GoogleCloudMlV1beta1__ParameterSpec [Text]
2114+gcmvpsCategoricalValues
2115+ = lens _gcmvpsCategoricalValues
2116+ (\ s a -> s{_gcmvpsCategoricalValues = a})
2117+ . _Default
2118+ . _Coerce
2119+
2120+-- | Required if type is \`DOUBLE\` or \`INTEGER\`. This field should be
2121+-- unset if type is \`CATEGORICAL\`. This value should be integers if type
2122+-- is INTEGER.
2123+gcmvpsMinValue :: Lens' GoogleCloudMlV1beta1__ParameterSpec (Maybe Double)
2124+gcmvpsMinValue
2125+ = lens _gcmvpsMinValue
2126+ (\ s a -> s{_gcmvpsMinValue = a})
2127+ . mapping _Coerce
2128+
2129+instance FromJSON GoogleCloudMlV1beta1__ParameterSpec
2130+ where
2131+ parseJSON
2132+ = withObject "GoogleCloudMlV1beta1ParameterSpec"
2133+ (\ o ->
2134+ GoogleCloudMlV1beta1__ParameterSpec' <$>
2135+ (o .:? "maxValue") <*> (o .:? "scaleType") <*>
2136+ (o .:? "type")
2137+ <*> (o .:? "discreteValues" .!= mempty)
2138+ <*> (o .:? "parameterName")
2139+ <*> (o .:? "categoricalValues" .!= mempty)
2140+ <*> (o .:? "minValue"))
2141+
2142+instance ToJSON GoogleCloudMlV1beta1__ParameterSpec
2143+ where
2144+ toJSON GoogleCloudMlV1beta1__ParameterSpec'{..}
2145+ = object
2146+ (catMaybes
2147+ [("maxValue" .=) <$> _gcmvpsMaxValue,
2148+ ("scaleType" .=) <$> _gcmvpsScaleType,
2149+ ("type" .=) <$> _gcmvpsType,
2150+ ("discreteValues" .=) <$> _gcmvpsDiscreteValues,
2151+ ("parameterName" .=) <$> _gcmvpsParameterName,
2152+ ("categoricalValues" .=) <$>
2153+ _gcmvpsCategoricalValues,
2154+ ("minValue" .=) <$> _gcmvpsMinValue])