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