xref: /aosp_15_r20/external/googleapis/google/cloud/visionai/v1/lva_resources.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2023 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.visionai.v1;
18
19import "google/api/field_behavior.proto";
20import "google/api/resource.proto";
21import "google/cloud/visionai/v1/lva.proto";
22import "google/protobuf/timestamp.proto";
23
24option csharp_namespace = "Google.Cloud.VisionAI.V1";
25option go_package = "cloud.google.com/go/visionai/apiv1/visionaipb;visionaipb";
26option java_multiple_files = true;
27option java_outer_classname = "LvaResourcesProto";
28option java_package = "com.google.cloud.visionai.v1";
29option php_namespace = "Google\\Cloud\\VisionAI\\V1";
30option ruby_package = "Google::Cloud::VisionAI::V1";
31
32// Message describing the Operator object.
33message Operator {
34  option (google.api.resource) = {
35    type: "visionai.googleapis.com/Operator"
36    pattern: "projects/{project}/locations/{location}/operators/{operator}"
37  };
38
39  // Name of the resource.
40  string name = 1;
41
42  // Output only. The create timestamp.
43  google.protobuf.Timestamp create_time = 2
44      [(google.api.field_behavior) = OUTPUT_ONLY];
45
46  // Output only. The update timestamp.
47  google.protobuf.Timestamp update_time = 3
48      [(google.api.field_behavior) = OUTPUT_ONLY];
49
50  // Labels as key value pairs.
51  map<string, string> labels = 4;
52
53  // The definition of the operator.
54  OperatorDefinition operator_definition = 5;
55
56  // The link to the docker image of the operator.
57  string docker_image = 6;
58}
59
60// Message describing the Analysis object.
61message Analysis {
62  option (google.api.resource) = {
63    type: "visionai.googleapis.com/Analysis"
64    pattern: "projects/{project}/locations/{location}/clusters/{cluster}/analyses/{analysis}"
65  };
66
67  // The name of resource.
68  string name = 1;
69
70  // Output only. The create timestamp.
71  google.protobuf.Timestamp create_time = 2
72      [(google.api.field_behavior) = OUTPUT_ONLY];
73
74  // Output only. The update timestamp.
75  google.protobuf.Timestamp update_time = 3
76      [(google.api.field_behavior) = OUTPUT_ONLY];
77
78  // Labels as key value pairs.
79  map<string, string> labels = 4;
80
81  // The definition of the analysis.
82  AnalysisDefinition analysis_definition = 5;
83
84  // Map from the input parameter in the definition to the real stream.
85  // E.g., suppose you had a stream source operator named "input-0" and you try
86  // to receive from the real stream "stream-0". You can add the following
87  // mapping: [input-0: stream-0].
88  map<string, string> input_streams_mapping = 6;
89
90  // Map from the output parameter in the definition to the real stream.
91  // E.g., suppose you had a stream sink operator named "output-0" and you try
92  // to send to the real stream "stream-0". You can add the following
93  // mapping: [output-0: stream-0].
94  map<string, string> output_streams_mapping = 7;
95
96  // Boolean flag to indicate whether you would like to disable the ability
97  // to automatically start a Process when new event happening in the input
98  // Stream. If you would like to start a Process manually, the field needs
99  // to be set to true.
100  bool disable_event_watch = 8;
101}
102
103// Message describing the Process object.
104message Process {
105  option (google.api.resource) = {
106    type: "visionai.googleapis.com/Process"
107    pattern: "projects/{project}/locations/{location}/clusters/{cluster}/processes/{process}"
108  };
109
110  // The name of resource.
111  string name = 1;
112
113  // Output only. The create timestamp.
114  google.protobuf.Timestamp create_time = 2
115      [(google.api.field_behavior) = OUTPUT_ONLY];
116
117  // Output only. The update timestamp.
118  google.protobuf.Timestamp update_time = 3
119      [(google.api.field_behavior) = OUTPUT_ONLY];
120
121  // Required. Reference to an existing Analysis resource.
122  string analysis = 4 [
123    (google.api.field_behavior) = REQUIRED,
124    (google.api.resource_reference) = {
125      type: "visionai.googleapis.com/Analysis"
126    }
127  ];
128
129  // Optional. Attribute overrides of the Analyzers.
130  // Format for each single override item:
131  // "{analyzer_name}:{attribute_key}={value}"
132  repeated string attribute_overrides = 5
133      [(google.api.field_behavior) = OPTIONAL];
134
135  // Optional. Status of the Process.
136  RunStatus run_status = 6 [(google.api.field_behavior) = OPTIONAL];
137
138  // Optional. Run mode of the Process.
139  RunMode run_mode = 7 [(google.api.field_behavior) = OPTIONAL];
140
141  // Optional. Event ID of the input/output streams.
142  // This is useful when you have a StreamSource/StreamSink operator in the
143  // Analysis, and you want to manually specify the Event to read from/write to.
144  string event_id = 8 [(google.api.field_behavior) = OPTIONAL];
145
146  // Optional. Optional: Batch ID of the Process.
147  string batch_id = 9 [(google.api.field_behavior) = OPTIONAL];
148
149  // Optional. Optional: The number of retries for a process in submission mode
150  // the system should try before declaring failure. By default, no retry will
151  // be performed.
152  int32 retry_count = 10 [(google.api.field_behavior) = OPTIONAL];
153}
154