Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / google-proto-files / google / cloud / automl / v1beta1 / prediction_service.proto
1 // Copyright 2018 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 syntax = "proto3";
16
17 package google.cloud.automl.v1beta1;
18
19 import "google/api/annotations.proto";
20 import "google/cloud/automl/v1beta1/annotation_payload.proto";
21 import "google/cloud/automl/v1beta1/data_items.proto";
22
23 option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
24 option java_multiple_files = true;
25 option java_outer_classname = "PredictionServiceProto";
26 option java_package = "com.google.cloud.automl.v1beta1";
27 option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
28
29 // AutoML Prediction API.
30 service PredictionService {
31   // Perform a prediction.
32   rpc Predict(PredictRequest) returns (PredictResponse) {
33     option (google.api.http) = {
34       post: "/v1beta1/{name=projects/*/locations/*/models/*}:predict"
35       body: "*"
36     };
37   }
38 }
39
40 // Request message for
41 // [PredictionService.Predict][google.cloud.automl.v1beta1.PredictionService.Predict].
42 message PredictRequest {
43   // Name of the model requested to serve the prediction.
44   string name = 1;
45
46   // Required.
47   // Payload to perform a prediction on. The payload must match the
48   // problem type that the model was trained to solve.
49   ExamplePayload payload = 2;
50
51   // Additional domain-specific parameters, any string must be up to 25000
52   // characters long.
53   //
54   // *  For Image Classification:
55   //
56   //    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
57   //     makes predictions for an
58   //     image, it will only produce results that have at least this confidence
59   //     score threshold. The default is 0.5.
60   map<string, string> params = 3;
61 }
62
63 // Response message for
64 // [PredictionService.Predict][google.cloud.automl.v1beta1.PredictionService.Predict].
65 //
66 // Currently, this is only
67 // used to return an image recognition prediction result. More prediction
68 // output metadata might be introduced in the future.
69 message PredictResponse {
70   // Prediction result.
71   repeated AnnotationPayload payload = 1;
72
73   // Additional domain-specific prediction response metadata.
74   map<string, string> metadata = 2;
75 }