xref: /aosp_15_r20/external/googleapis/google/cloud/aiplatform/v1beta1/schema/io_format.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2021 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
15syntax = "proto3";
16
17package google.cloud.aiplatform.v1beta1.schema;
18
19import "google/cloud/aiplatform/v1beta1/schema/annotation_spec_color.proto";
20import "google/cloud/aiplatform/v1beta1/schema/geometry.proto";
21import "google/cloud/aiplatform/v1beta1/schema/predict/instance/text_sentiment.proto";
22import "google/protobuf/duration.proto";
23import "google/protobuf/struct.proto";
24import "google/rpc/code.proto";
25import "google/api/annotations.proto";
26
27option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1.Schema";
28option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/schema/schemapb;schemapb";
29option java_multiple_files = true;
30option java_outer_classname = "IoFormatProto";
31option java_package = "com.google.cloud.aiplatform.v1beta1.schema";
32option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1\\Schema";
33option ruby_package = "Google::Cloud::AIPlatform::V1beta1::Schema";
34
35// Represents a line of JSONL in the batch prediction output file.
36message PredictionResult {
37  message Error {
38    // Error status. This will be serialized into the enum name e.g.
39    // "NOT_FOUND".
40    google.rpc.Code status = 1;
41
42    // Error message with additional details.
43    string message = 2;
44  }
45
46  // Some identifier from the input so that the prediction can be mapped back to
47  // the input instance.
48  oneof input {
49    // User's input instance.
50    // Struct is used here instead of Any so that JsonFormat does not append an
51    // extra "@type" field when we convert the proto to JSON.
52    google.protobuf.Struct instance = 1;
53
54    // Optional user-provided key from the input instance.
55    string key = 2;
56  }
57
58  // The prediction result.
59  // Value is used here instead of Any so that JsonFormat does not append an
60  // extra "@type" field when we convert the proto to JSON and so we can
61  // represent array of objects.
62  // Do not set error if this is set.
63  google.protobuf.Value prediction = 3;
64
65  // The error result.
66  // Do not set prediction if this is set.
67  Error error = 4;
68}
69