xref: /aosp_15_r20/external/googleapis/google/cloud/visionai/v1/streams_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/protobuf/duration.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 = "StreamsResourcesProto";
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 Stream object. The Stream and the Event resources are
33// many to many; i.e., each Stream resource can associate to many Event
34// resources and each Event resource can associate to many Stream resources.
35message Stream {
36  option (google.api.resource) = {
37    type: "visionai.googleapis.com/Stream"
38    pattern: "projects/{project}/locations/{location}/clusters/{cluster}/streams/{stream}"
39  };
40
41  // Name of the resource.
42  string name = 1;
43
44  // Output only. The create timestamp.
45  google.protobuf.Timestamp create_time = 2
46      [(google.api.field_behavior) = OUTPUT_ONLY];
47
48  // Output only. The update timestamp.
49  google.protobuf.Timestamp update_time = 3
50      [(google.api.field_behavior) = OUTPUT_ONLY];
51
52  // Labels as key value pairs.
53  map<string, string> labels = 4;
54
55  // Annotations to allow clients to store small amounts of arbitrary data.
56  map<string, string> annotations = 5;
57
58  // The display name for the stream resource.
59  string display_name = 6;
60
61  // Whether to enable the HLS playback service on this stream.
62  bool enable_hls_playback = 7;
63
64  // The name of the media warehouse asset for long term storage of stream data.
65  // Format: projects/${p_id}/locations/${l_id}/corpora/${c_id}/assets/${a_id}
66  // Remain empty if the media warehouse storage is not needed for the stream.
67  string media_warehouse_asset = 8;
68}
69
70// Message describing the Event object.
71message Event {
72  option (google.api.resource) = {
73    type: "visionai.googleapis.com/Event"
74    pattern: "projects/{project}/locations/{location}/clusters/{cluster}/events/{event}"
75  };
76
77  // Clock that will be used for joining streams.
78  enum Clock {
79    // Clock is not specified.
80    CLOCK_UNSPECIFIED = 0;
81
82    // Use the timestamp when the data is captured. Clients need to sync the
83    // clock.
84    CAPTURE = 1;
85
86    // Use the timestamp when the data is received.
87    INGEST = 2;
88  }
89
90  // Name of the resource.
91  string name = 1;
92
93  // Output only. The create timestamp.
94  google.protobuf.Timestamp create_time = 2
95      [(google.api.field_behavior) = OUTPUT_ONLY];
96
97  // Output only. The update timestamp.
98  google.protobuf.Timestamp update_time = 3
99      [(google.api.field_behavior) = OUTPUT_ONLY];
100
101  // Labels as key value pairs.
102  map<string, string> labels = 4;
103
104  // Annotations to allow clients to store small amounts of arbitrary data.
105  map<string, string> annotations = 5;
106
107  // The clock used for joining streams.
108  Clock alignment_clock = 6;
109
110  // Grace period for cleaning up the event. This is the time the controller
111  // waits for before deleting the event. During this period, if there is any
112  // active channel on the event. The deletion of the event after grace_period
113  // will be ignored.
114  google.protobuf.Duration grace_period = 7;
115}
116
117// Message describing the Series object.
118message Series {
119  option (google.api.resource) = {
120    type: "visionai.googleapis.com/Series"
121    pattern: "projects/{project}/locations/{location}/clusters/{cluster}/series/{series}"
122  };
123
124  // Name of the resource.
125  string name = 1;
126
127  // Output only. The create timestamp.
128  google.protobuf.Timestamp create_time = 2
129      [(google.api.field_behavior) = OUTPUT_ONLY];
130
131  // Output only. The update timestamp.
132  google.protobuf.Timestamp update_time = 3
133      [(google.api.field_behavior) = OUTPUT_ONLY];
134
135  // Labels as key value pairs.
136  map<string, string> labels = 4;
137
138  // Annotations to allow clients to store small amounts of arbitrary data.
139  map<string, string> annotations = 5;
140
141  // Required. Stream that is associated with this series.
142  string stream = 6 [
143    (google.api.field_behavior) = REQUIRED,
144    (google.api.resource_reference) = { type: "visionai.googleapis.com/Stream" }
145  ];
146
147  // Required. Event that is associated with this series.
148  string event = 7 [
149    (google.api.field_behavior) = REQUIRED,
150    (google.api.resource_reference) = { type: "visionai.googleapis.com/Event" }
151  ];
152}
153
154// Message describing the Channel object.
155message Channel {
156  option (google.api.resource) = {
157    type: "visionai.googleapis.com/Channel"
158    pattern: "projects/{project}/locations/{location}/clusters/{cluster}/channels/{channel}"
159  };
160
161  // Name of the resource.
162  string name = 1;
163
164  // Output only. The create timestamp.
165  google.protobuf.Timestamp create_time = 2
166      [(google.api.field_behavior) = OUTPUT_ONLY];
167
168  // Output only. The update timestamp.
169  google.protobuf.Timestamp update_time = 3
170      [(google.api.field_behavior) = OUTPUT_ONLY];
171
172  // Labels as key value pairs.
173  map<string, string> labels = 4;
174
175  // Annotations to allow clients to store small amounts of arbitrary data.
176  map<string, string> annotations = 5;
177
178  // Required. Stream that is associated with this series.
179  string stream = 6 [
180    (google.api.field_behavior) = REQUIRED,
181    (google.api.resource_reference) = { type: "visionai.googleapis.com/Stream" }
182  ];
183
184  // Required. Event that is associated with this series.
185  string event = 7 [
186    (google.api.field_behavior) = REQUIRED,
187    (google.api.resource_reference) = { type: "visionai.googleapis.com/Event" }
188  ];
189}
190