lva_service.proto 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  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. syntax = "proto3";
  15. package google.cloud.visionai.v1alpha1;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/api/resource.proto";
  20. import "google/cloud/visionai/v1alpha1/lva_resources.proto";
  21. import "google/longrunning/operations.proto";
  22. import "google/protobuf/field_mask.proto";
  23. option csharp_namespace = "Google.Cloud.VisionAI.V1Alpha1";
  24. option go_package = "google.golang.org/genproto/googleapis/cloud/visionai/v1alpha1;visionai";
  25. option java_multiple_files = true;
  26. option java_outer_classname = "LvaServiceProto";
  27. option java_package = "com.google.cloud.visionai.v1alpha1";
  28. option php_namespace = "Google\\Cloud\\VisionAI\\V1alpha1";
  29. option ruby_package = "Google::Cloud::VisionAI::V1alpha1";
  30. // Service describing handlers for resources. The service enables clients to run
  31. // Live Video Analytics (LVA) on the streaming inputs.
  32. service LiveVideoAnalytics {
  33. option (google.api.default_host) = "visionai.googleapis.com";
  34. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
  35. // Lists Analyses in a given project and location.
  36. rpc ListAnalyses(ListAnalysesRequest) returns (ListAnalysesResponse) {
  37. option (google.api.http) = {
  38. get: "/v1alpha1/{parent=projects/*/locations/*/clusters/*}/analyses"
  39. };
  40. option (google.api.method_signature) = "parent";
  41. }
  42. // Gets details of a single Analysis.
  43. rpc GetAnalysis(GetAnalysisRequest) returns (Analysis) {
  44. option (google.api.http) = {
  45. get: "/v1alpha1/{name=projects/*/locations/*/clusters/*/analyses/*}"
  46. };
  47. option (google.api.method_signature) = "name";
  48. }
  49. // Creates a new Analysis in a given project and location.
  50. rpc CreateAnalysis(CreateAnalysisRequest) returns (google.longrunning.Operation) {
  51. option (google.api.http) = {
  52. post: "/v1alpha1/{parent=projects/*/locations/*/clusters/*}/analyses"
  53. body: "analysis"
  54. };
  55. option (google.api.method_signature) = "parent,analysis,analysis_id";
  56. option (google.longrunning.operation_info) = {
  57. response_type: "Analysis"
  58. metadata_type: "OperationMetadata"
  59. };
  60. }
  61. // Updates the parameters of a single Analysis.
  62. rpc UpdateAnalysis(UpdateAnalysisRequest) returns (google.longrunning.Operation) {
  63. option (google.api.http) = {
  64. patch: "/v1alpha1/{analysis.name=projects/*/locations/*/clusters/*/analyses/*}"
  65. body: "analysis"
  66. };
  67. option (google.api.method_signature) = "analysis,update_mask";
  68. option (google.longrunning.operation_info) = {
  69. response_type: "Analysis"
  70. metadata_type: "OperationMetadata"
  71. };
  72. }
  73. // Deletes a single Analysis.
  74. rpc DeleteAnalysis(DeleteAnalysisRequest) returns (google.longrunning.Operation) {
  75. option (google.api.http) = {
  76. delete: "/v1alpha1/{name=projects/*/locations/*/clusters/*/analyses/*}"
  77. };
  78. option (google.api.method_signature) = "name";
  79. option (google.longrunning.operation_info) = {
  80. response_type: "google.protobuf.Empty"
  81. metadata_type: "OperationMetadata"
  82. };
  83. }
  84. }
  85. // Message for requesting list of Analyses
  86. message ListAnalysesRequest {
  87. // Required. Parent value for ListAnalysesRequest
  88. string parent = 1 [
  89. (google.api.field_behavior) = REQUIRED,
  90. (google.api.resource_reference) = {
  91. type: "visionai.googleapis.com/Cluster"
  92. }
  93. ];
  94. // Requested page size. Server may return fewer items than requested.
  95. // If unspecified, server will pick an appropriate default.
  96. int32 page_size = 2;
  97. // A token identifying a page of results the server should return.
  98. string page_token = 3;
  99. // Filtering results
  100. string filter = 4;
  101. // Hint for how to order the results
  102. string order_by = 5;
  103. }
  104. // Message for response to listing Analyses
  105. message ListAnalysesResponse {
  106. // The list of Analysis
  107. repeated Analysis analyses = 1;
  108. // A token identifying a page of results the server should return.
  109. string next_page_token = 2;
  110. // Locations that could not be reached.
  111. repeated string unreachable = 3;
  112. }
  113. // Message for getting an Analysis.
  114. message GetAnalysisRequest {
  115. // Required. Name of the resource.
  116. string name = 1 [
  117. (google.api.field_behavior) = REQUIRED,
  118. (google.api.resource_reference) = {
  119. type: "visionai.googleapis.com/Analysis"
  120. }
  121. ];
  122. }
  123. // Message for creating an Analysis.
  124. message CreateAnalysisRequest {
  125. // Required. Value for parent.
  126. string parent = 1 [
  127. (google.api.field_behavior) = REQUIRED,
  128. (google.api.resource_reference) = {
  129. type: "visionai.googleapis.com/Cluster"
  130. }
  131. ];
  132. // Required. Id of the requesting object.
  133. string analysis_id = 2 [(google.api.field_behavior) = REQUIRED];
  134. // Required. The resource being created.
  135. Analysis analysis = 3 [(google.api.field_behavior) = REQUIRED];
  136. // Optional. An optional request ID to identify requests. Specify a unique request ID
  137. // so that if you must retry your request, the server will know to ignore
  138. // the request if it has already been completed. The server will guarantee
  139. // that for at least 60 minutes since the first request.
  140. //
  141. // For example, consider a situation where you make an initial request and the
  142. // request times out. If you make the request again with the same request ID,
  143. // the server can check if original operation with the same request ID was
  144. // received, and if so, will ignore the second request. This prevents clients
  145. // from accidentally creating duplicate commitments.
  146. //
  147. // The request ID must be a valid UUID with the exception that zero UUID is
  148. // not supported (00000000-0000-0000-0000-000000000000).
  149. string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
  150. }
  151. // Message for updating an Analysis.
  152. message UpdateAnalysisRequest {
  153. // Required. Field mask is used to specify the fields to be overwritten in the
  154. // Analysis resource by the update.
  155. // The fields specified in the update_mask are relative to the resource, not
  156. // the full request. A field will be overwritten if it is in the mask. If the
  157. // user does not provide a mask then all fields will be overwritten.
  158. google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED];
  159. // Required. The resource being updated.
  160. Analysis analysis = 2 [(google.api.field_behavior) = REQUIRED];
  161. // Optional. An optional request ID to identify requests. Specify a unique request ID
  162. // so that if you must retry your request, the server will know to ignore
  163. // the request if it has already been completed. The server will guarantee
  164. // that for at least 60 minutes since the first request.
  165. //
  166. // For example, consider a situation where you make an initial request and the
  167. // request times out. If you make the request again with the same request ID,
  168. // the server can check if original operation with the same request ID was
  169. // received, and if so, will ignore the second request. This prevents clients
  170. // from accidentally creating duplicate commitments.
  171. //
  172. // The request ID must be a valid UUID with the exception that zero UUID is
  173. // not supported (00000000-0000-0000-0000-000000000000).
  174. string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
  175. }
  176. // Message for deleting an Analysis.
  177. message DeleteAnalysisRequest {
  178. // Required. Name of the resource.
  179. string name = 1 [
  180. (google.api.field_behavior) = REQUIRED,
  181. (google.api.resource_reference) = {
  182. type: "visionai.googleapis.com/Analysis"
  183. }
  184. ];
  185. // Optional. An optional request ID to identify requests. Specify a unique request ID
  186. // so that if you must retry your request, the server will know to ignore
  187. // the request if it has already been completed. The server will guarantee
  188. // that for at least 60 minutes after the first request.
  189. //
  190. // For example, consider a situation where you make an initial request and the
  191. // request times out. If you make the request again with the same request ID,
  192. // the server can check if original operation with the same request ID was
  193. // received, and if so, will ignore the second request. This prevents clients
  194. // from accidentally creating duplicate commitments.
  195. //
  196. // The request ID must be a valid UUID with the exception that zero UUID is
  197. // not supported (00000000-0000-0000-0000-000000000000).
  198. string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
  199. }