google-cloud-video_intelligence-v1 0.2.4 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7baec20e67f25a529ca8d44ca865a673f579e1cd0a780c7a698c39dfbfa672e1
4
- data.tar.gz: 0bd6f3bb7056ff4a03a953d6f916396a84b739a8b2cd893e81efd05dc66e37da
3
+ metadata.gz: 794ea562013784154c24fe9d9d47380b2da61ae5f78eb30831e206ae650a9e41
4
+ data.tar.gz: db1c1e87a0ee9c873ca4752678b8f4751d8e917588c316a9b765bc2fa235fcb6
5
5
  SHA512:
6
- metadata.gz: b198a664b58146d287a053eab790de1d3eea1d5373c80d7774862d3638ad8c3c1536c5eb3b1b8992653d8777a256ba7027bc114b84d771d7569e7069648544b3
7
- data.tar.gz: 882ecef0cfe8e86bbb61ee46503925dc049cc856770478739b8c9ffcaec9221aa22a33b8e3b3671cec20a44d2a2ce629875df47cb1de50227045d7f1453af29f
6
+ metadata.gz: e0f7fd09455493b8f4f4f87f303755ab5c62cb5da0fce0812ca894687869f78baa41c7ba4001a05ae337121fb2fe2b10d455836ccdc5933cf7787d9819cac26a
7
+ data.tar.gz: e856c79f30d4461e77852d009ef611d464e1b90141d6b2e9aa1977d1ca1edc6ba8a35c79655092ed88935214fa0d40498048a8c8163bbde4e57f82abd832401f
data/README.md CHANGED
@@ -6,6 +6,12 @@ Detects objects, explicit content, and scene changes in videos. It also specifie
6
6
 
7
7
  https://github.com/googleapis/google-cloud-ruby
8
8
 
9
+ This gem is a _versioned_ client. It provides basic client classes for a
10
+ specific version of the Cloud Video Intelligence V1 API. Most users should consider using
11
+ the main client gem,
12
+ [google-cloud-video_intelligence](https://rubygems.org/gems/google-cloud-video_intelligence).
13
+ See the section below titled *Which client should I use?* for more information.
14
+
9
15
  ## Installation
10
16
 
11
17
  ```
@@ -73,3 +79,61 @@ in security maintenance, and not end of life. Currently, this means Ruby 2.4
73
79
  and later. Older versions of Ruby _may_ still work, but are unsupported and not
74
80
  recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
75
81
  about the Ruby support schedule.
82
+
83
+ ## Which client should I use?
84
+
85
+ Most modern Ruby client libraries for Google APIs come in two flavors: the main
86
+ client library with a name such as `google-cloud-video_intelligence`,
87
+ and lower-level _versioned_ client libraries with names such as
88
+ `google-cloud-video_intelligence-v1`.
89
+ _In most cases, you should install the main client._
90
+
91
+ ### What's the difference between the main client and a versioned client?
92
+
93
+ A _versioned client_ provides a basic set of data types and client classes for
94
+ a _single version_ of a specific service. (That is, for a service with multiple
95
+ versions, there might be a separate versioned client for each service version.)
96
+ Most versioned clients are written and maintained by a code generator.
97
+
98
+ The _main client_ is designed to provide you with the _recommended_ client
99
+ interfaces for the service. There will be only one main client for any given
100
+ service, even a service with multiple versions. The main client includes
101
+ factory methods for constructing the client objects we recommend for most
102
+ users. In some cases, those will be classes provided by an underlying versioned
103
+ client; in other cases, they will be handwritten higher-level client objects
104
+ with additional capabilities, convenience methods, or best practices built in.
105
+ Generally, the main client will default to a recommended service version,
106
+ although in some cases you can override this if you need to talk to a specific
107
+ service version.
108
+
109
+ ### Why would I want to use the main client?
110
+
111
+ We recommend that most users install the main client gem for a service. You can
112
+ identify this gem as the one _without_ a version in its name, e.g.
113
+ `google-cloud-video_intelligence`.
114
+ The main client is recommended because it will embody the best practices for
115
+ accessing the service, and may also provide more convenient interfaces or
116
+ tighter integration into frameworks and third-party libraries. In addition, the
117
+ documentation and samples published by Google will generally demonstrate use of
118
+ the main client.
119
+
120
+ ### Why would I want to use a versioned client?
121
+
122
+ You can use a versioned client if you are content with a possibly lower-level
123
+ class interface, you explicitly want to avoid features provided by the main
124
+ client, or you want to access a specific service version not be covered by the
125
+ main client. You can identify versioned client gems because the service version
126
+ is part of the name, e.g. `google-cloud-video_intelligence-v1`.
127
+
128
+ ### What about the google-apis-<name> clients?
129
+
130
+ Client library gems with names that begin with `google-apis-` are based on an
131
+ older code generation technology. They talk to a REST/JSON backend (whereas
132
+ most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may
133
+ not offer the same performance, features, and ease of use provided by more
134
+ modern clients.
135
+
136
+ The `google-apis-` clients have wide coverage across Google services, so you
137
+ might need to use one if there is no modern client available for the service.
138
+ However, if a modern client is available, we generally recommend it over the
139
+ older `google-apis-` clients.
@@ -33,3 +33,6 @@ module Google
33
33
  end
34
34
  end
35
35
  end
36
+
37
+ helper_path = ::File.join __dir__, "v1", "_helpers.rb"
38
+ require "google/cloud/video_intelligence/v1/_helpers" if ::File.file? helper_path
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module VideoIntelligence
23
23
  module V1
24
- VERSION = "0.2.4"
24
+ VERSION = "0.5.0"
25
25
  end
26
26
  end
27
27
  end
@@ -31,7 +31,7 @@ module Google
31
31
  module VideoIntelligence
32
32
  module V1
33
33
  ##
34
- # Service that implements Google Cloud Video Intelligence API.
34
+ # Service that implements the Video Intelligence API.
35
35
  #
36
36
  # To load this service and instantiate a client:
37
37
  #
@@ -27,7 +27,7 @@ module Google
27
27
  ##
28
28
  # Client for the VideoIntelligenceService service.
29
29
  #
30
- # Service that implements Google Cloud Video Intelligence API.
30
+ # Service that implements the Video Intelligence API.
31
31
  #
32
32
  class Client
33
33
  # @private
@@ -132,7 +132,13 @@ module Google
132
132
 
133
133
  # Create credentials
134
134
  credentials = @config.credentials
135
- credentials ||= Credentials.default scope: @config.scope
135
+ # Use self-signed JWT if the scope and endpoint are unchanged from default,
136
+ # but only if the default endpoint does not have a region prefix.
137
+ enable_self_signed_jwt = @config.scope == Client.configure.scope &&
138
+ @config.endpoint == Client.configure.endpoint &&
139
+ !@config.endpoint.split(".").first.include?("-")
140
+ credentials ||= Credentials.default scope: @config.scope,
141
+ enable_self_signed_jwt: enable_self_signed_jwt
136
142
  if credentials.is_a?(String) || credentials.is_a?(Hash)
137
143
  credentials = Credentials.new credentials, scope: @config.scope
138
144
  end
@@ -185,34 +191,37 @@ module Google
185
191
  #
186
192
  # @param input_uri [::String]
187
193
  # Input video location. Currently, only
188
- # [Google Cloud Storage](https://cloud.google.com/storage/) URIs are
189
- # supported, which must be specified in the following format:
194
+ # [Cloud Storage](https://cloud.google.com/storage/) URIs are
195
+ # supported. URIs must be specified in the following format:
190
196
  # `gs://bucket-id/object-id` (other URI formats return
191
- # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
192
- # [Request URIs](https://cloud.google.com/storage/docs/request-endpoints).
193
- # A video URI may include wildcards in `object-id`, and thus identify
194
- # multiple videos. Supported wildcards: '*' to match 0 or more characters;
197
+ # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
198
+ # more information, see [Request
199
+ # URIs](https://cloud.google.com/storage/docs/request-endpoints). To identify
200
+ # multiple videos, a video URI may include wildcards in the `object-id`.
201
+ # Supported wildcards: '*' to match 0 or more characters;
195
202
  # '?' to match 1 character. If unset, the input video should be embedded
196
- # in the request as `input_content`. If set, `input_content` should be unset.
203
+ # in the request as `input_content`. If set, `input_content` must be unset.
197
204
  # @param input_content [::String]
198
205
  # The video data bytes.
199
- # If unset, the input video(s) should be specified via `input_uri`.
200
- # If set, `input_uri` should be unset.
206
+ # If unset, the input video(s) should be specified via the `input_uri`.
207
+ # If set, `input_uri` must be unset.
201
208
  # @param features [::Array<::Google::Cloud::VideoIntelligence::V1::Feature>]
202
209
  # Required. Requested video annotation features.
203
210
  # @param video_context [::Google::Cloud::VideoIntelligence::V1::VideoContext, ::Hash]
204
211
  # Additional video context and/or feature-specific parameters.
205
212
  # @param output_uri [::String]
206
213
  # Optional. Location where the output (in JSON format) should be stored.
207
- # Currently, only [Google Cloud Storage](https://cloud.google.com/storage/)
208
- # URIs are supported, which must be specified in the following format:
214
+ # Currently, only [Cloud Storage](https://cloud.google.com/storage/)
215
+ # URIs are supported. These must be specified in the following format:
209
216
  # `gs://bucket-id/object-id` (other URI formats return
210
- # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
211
- # [Request URIs](https://cloud.google.com/storage/docs/request-endpoints).
217
+ # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
218
+ # more information, see [Request
219
+ # URIs](https://cloud.google.com/storage/docs/request-endpoints).
212
220
  # @param location_id [::String]
213
221
  # Optional. Cloud region where annotation should take place. Supported cloud
214
- # regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region
215
- # is specified, a region will be determined based on video file location.
222
+ # regions are: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no
223
+ # region is specified, the region will be determined based on video file
224
+ # location.
216
225
  #
217
226
  # @yield [response, operation] Access the result along with the RPC operation
218
227
  # @yieldparam response [::Gapic::Operation]
@@ -339,7 +348,7 @@ module Google
339
348
 
340
349
  config_attr :endpoint, "videointelligence.googleapis.com", ::String
341
350
  config_attr :credentials, nil do |value|
342
- allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
351
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
343
352
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
344
353
  allowed.any? { |klass| klass === value }
345
354
  end
@@ -379,7 +388,7 @@ module Google
379
388
  # Each configuration object is of type `Gapic::Config::Method` and includes
380
389
  # the following configuration fields:
381
390
  #
382
- # * `timeout` (*type:* `Numeric`) - The call timeout in milliseconds
391
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
383
392
  # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
384
393
  # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
385
394
  # include the following keys:
@@ -103,8 +103,13 @@ module Google
103
103
  # Lists operations that match the specified filter in the request. If the
104
104
  # server doesn't support this method, it returns `UNIMPLEMENTED`.
105
105
  #
106
- # NOTE: the `name` binding below allows API services to override the binding
107
- # to use different resource name schemes, such as `users/*/operations`.
106
+ # NOTE: the `name` binding allows API services to override the binding
107
+ # to use different resource name schemes, such as `users/*/operations`. To
108
+ # override the binding, API services can add a binding such as
109
+ # `"/v1/{name=users/*}/operations"` to their service configuration.
110
+ # For backwards compatibility, the default name includes the operations
111
+ # collection id, however overriding users must ensure the name binding
112
+ # is the parent resource, without the operations collection id.
108
113
  #
109
114
  # @overload list_operations(request, options = nil)
110
115
  # Pass arguments to `list_operations` via a request object, either of type
@@ -122,7 +127,7 @@ module Google
122
127
  # the default parameter values, pass an empty Hash as a request object (see above).
123
128
  #
124
129
  # @param name [::String]
125
- # The name of the operation collection.
130
+ # The name of the operation's parent resource.
126
131
  # @param filter [::String]
127
132
  # The standard list filter.
128
133
  # @param page_size [::Integer]
@@ -390,6 +395,79 @@ module Google
390
395
  raise ::Google::Cloud::Error.from_error(e)
391
396
  end
392
397
 
398
+ ##
399
+ # Waits for the specified long-running operation until it is done or reaches
400
+ # at most a specified timeout, returning the latest state. If the operation
401
+ # is already done, the latest state is immediately returned. If the timeout
402
+ # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
403
+ # timeout is used. If the server does not support this method, it returns
404
+ # `google.rpc.Code.UNIMPLEMENTED`.
405
+ # Note that this method is on a best-effort basis. It may return the latest
406
+ # state before the specified timeout (including immediately), meaning even an
407
+ # immediate response is no guarantee that the operation is done.
408
+ #
409
+ # @overload wait_operation(request, options = nil)
410
+ # Pass arguments to `wait_operation` via a request object, either of type
411
+ # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash.
412
+ #
413
+ # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash]
414
+ # A request object representing the call parameters. Required. To specify no
415
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
416
+ # @param options [::Gapic::CallOptions, ::Hash]
417
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
418
+ #
419
+ # @overload wait_operation(name: nil, timeout: nil)
420
+ # Pass arguments to `wait_operation` via keyword arguments. Note that at
421
+ # least one keyword argument is required. To specify no parameters, or to keep all
422
+ # the default parameter values, pass an empty Hash as a request object (see above).
423
+ #
424
+ # @param name [::String]
425
+ # The name of the operation resource to wait on.
426
+ # @param timeout [::Google::Protobuf::Duration, ::Hash]
427
+ # The maximum duration to wait before timing out. If left blank, the wait
428
+ # will be at most the time permitted by the underlying HTTP/RPC protocol.
429
+ # If RPC context deadline is also specified, the shorter one will be used.
430
+ #
431
+ # @yield [response, operation] Access the result along with the RPC operation
432
+ # @yieldparam response [::Gapic::Operation]
433
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
434
+ #
435
+ # @return [::Gapic::Operation]
436
+ #
437
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
438
+ #
439
+ def wait_operation request, options = nil
440
+ raise ::ArgumentError, "request must be provided" if request.nil?
441
+
442
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest
443
+
444
+ # Converts hash and nil to an options object
445
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
446
+
447
+ # Customize the options with defaults
448
+ metadata = @config.rpcs.wait_operation.metadata.to_h
449
+
450
+ # Set x-goog-api-client and x-goog-user-project headers
451
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
452
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
453
+ gapic_version: ::Google::Cloud::VideoIntelligence::V1::VERSION
454
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
455
+
456
+ options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
457
+ metadata: metadata,
458
+ retry_policy: @config.rpcs.wait_operation.retry_policy
459
+ options.apply_defaults metadata: @config.metadata,
460
+ retry_policy: @config.retry_policy
461
+
462
+ @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
463
+ response = ::Gapic::Operation.new response, @operations_client, options: options
464
+ yield response, operation if block_given?
465
+ return response
466
+ end
467
+ rescue ::GRPC::BadStatus => e
468
+ raise ::Google::Cloud::Error.from_error(e)
469
+ end
470
+
393
471
  ##
394
472
  # Configuration class for the Operations API.
395
473
  #
@@ -475,7 +553,7 @@ module Google
475
553
 
476
554
  config_attr :endpoint, "videointelligence.googleapis.com", ::String
477
555
  config_attr :credentials, nil do |value|
478
- allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
556
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
479
557
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
480
558
  allowed.any? { |klass| klass === value }
481
559
  end
@@ -515,7 +593,7 @@ module Google
515
593
  # Each configuration object is of type `Gapic::Config::Method` and includes
516
594
  # the following configuration fields:
517
595
  #
518
- # * `timeout` (*type:* `Numeric`) - The call timeout in milliseconds
596
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
519
597
  # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
520
598
  # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
521
599
  # include the following keys:
@@ -546,6 +624,11 @@ module Google
546
624
  # @return [::Gapic::Config::Method]
547
625
  #
548
626
  attr_reader :cancel_operation
627
+ ##
628
+ # RPC-specific configuration for `wait_operation`
629
+ # @return [::Gapic::Config::Method]
630
+ #
631
+ attr_reader :wait_operation
549
632
 
550
633
  # @private
551
634
  def initialize parent_rpcs = nil
@@ -557,6 +640,8 @@ module Google
557
640
  @delete_operation = ::Gapic::Config::Method.new delete_operation_config
558
641
  cancel_operation_config = parent_rpcs&.cancel_operation if parent_rpcs&.respond_to? :cancel_operation
559
642
  @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config
643
+ wait_operation_config = parent_rpcs&.wait_operation if parent_rpcs&.respond_to? :wait_operation
644
+ @wait_operation = ::Gapic::Config::Method.new wait_operation_config
560
645
 
561
646
  yield self if block_given?
562
647
  end
@@ -28,6 +28,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
28
28
  optional :face_detection_config, :message, 5, "google.cloud.videointelligence.v1.FaceDetectionConfig"
29
29
  optional :speech_transcription_config, :message, 6, "google.cloud.videointelligence.v1.SpeechTranscriptionConfig"
30
30
  optional :text_detection_config, :message, 8, "google.cloud.videointelligence.v1.TextDetectionConfig"
31
+ optional :person_detection_config, :message, 11, "google.cloud.videointelligence.v1.PersonDetectionConfig"
31
32
  optional :object_tracking_config, :message, 13, "google.cloud.videointelligence.v1.ObjectTrackingConfig"
32
33
  end
33
34
  add_message "google.cloud.videointelligence.v1.LabelDetectionConfig" do
@@ -46,6 +47,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
46
47
  add_message "google.cloud.videointelligence.v1.FaceDetectionConfig" do
47
48
  optional :model, :string, 1
48
49
  optional :include_bounding_boxes, :bool, 2
50
+ optional :include_attributes, :bool, 5
51
+ end
52
+ add_message "google.cloud.videointelligence.v1.PersonDetectionConfig" do
53
+ optional :include_bounding_boxes, :bool, 1
54
+ optional :include_pose_landmarks, :bool, 2
55
+ optional :include_attributes, :bool, 3
49
56
  end
50
57
  add_message "google.cloud.videointelligence.v1.ExplicitContentDetectionConfig" do
51
58
  optional :model, :string, 1
@@ -76,6 +83,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
76
83
  repeated :category_entities, :message, 2, "google.cloud.videointelligence.v1.Entity"
77
84
  repeated :segments, :message, 3, "google.cloud.videointelligence.v1.LabelSegment"
78
85
  repeated :frames, :message, 4, "google.cloud.videointelligence.v1.LabelFrame"
86
+ optional :version, :string, 5
79
87
  end
80
88
  add_message "google.cloud.videointelligence.v1.ExplicitContentFrame" do
81
89
  optional :time_offset, :message, 1, "google.protobuf.Duration"
@@ -83,6 +91,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
83
91
  end
84
92
  add_message "google.cloud.videointelligence.v1.ExplicitContentAnnotation" do
85
93
  repeated :frames, :message, 1, "google.cloud.videointelligence.v1.ExplicitContentFrame"
94
+ optional :version, :string, 2
86
95
  end
87
96
  add_message "google.cloud.videointelligence.v1.NormalizedBoundingBox" do
88
97
  optional :left, :float, 1
@@ -90,6 +99,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
90
99
  optional :right, :float, 3
91
100
  optional :bottom, :float, 4
92
101
  end
102
+ add_message "google.cloud.videointelligence.v1.FaceDetectionAnnotation" do
103
+ repeated :tracks, :message, 3, "google.cloud.videointelligence.v1.Track"
104
+ optional :thumbnail, :bytes, 4
105
+ optional :version, :string, 5
106
+ end
107
+ add_message "google.cloud.videointelligence.v1.PersonDetectionAnnotation" do
108
+ repeated :tracks, :message, 1, "google.cloud.videointelligence.v1.Track"
109
+ optional :version, :string, 2
110
+ end
93
111
  add_message "google.cloud.videointelligence.v1.FaceSegment" do
94
112
  optional :segment, :message, 1, "google.cloud.videointelligence.v1.VideoSegment"
95
113
  end
@@ -133,12 +151,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
133
151
  repeated :shot_presence_label_annotations, :message, 24, "google.cloud.videointelligence.v1.LabelAnnotation"
134
152
  repeated :frame_label_annotations, :message, 4, "google.cloud.videointelligence.v1.LabelAnnotation"
135
153
  repeated :face_annotations, :message, 5, "google.cloud.videointelligence.v1.FaceAnnotation"
154
+ repeated :face_detection_annotations, :message, 13, "google.cloud.videointelligence.v1.FaceDetectionAnnotation"
136
155
  repeated :shot_annotations, :message, 6, "google.cloud.videointelligence.v1.VideoSegment"
137
156
  optional :explicit_annotation, :message, 7, "google.cloud.videointelligence.v1.ExplicitContentAnnotation"
138
157
  repeated :speech_transcriptions, :message, 11, "google.cloud.videointelligence.v1.SpeechTranscription"
139
158
  repeated :text_annotations, :message, 12, "google.cloud.videointelligence.v1.TextAnnotation"
140
159
  repeated :object_annotations, :message, 14, "google.cloud.videointelligence.v1.ObjectTrackingAnnotation"
141
160
  repeated :logo_recognition_annotations, :message, 19, "google.cloud.videointelligence.v1.LogoRecognitionAnnotation"
161
+ repeated :person_detection_annotations, :message, 20, "google.cloud.videointelligence.v1.PersonDetectionAnnotation"
142
162
  optional :error, :message, 9, "google.rpc.Status"
143
163
  end
144
164
  add_message "google.cloud.videointelligence.v1.AnnotateVideoResponse" do
@@ -204,6 +224,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
204
224
  add_message "google.cloud.videointelligence.v1.TextAnnotation" do
205
225
  optional :text, :string, 1
206
226
  repeated :segments, :message, 2, "google.cloud.videointelligence.v1.TextSegment"
227
+ optional :version, :string, 3
207
228
  end
208
229
  add_message "google.cloud.videointelligence.v1.ObjectTrackingFrame" do
209
230
  optional :normalized_bounding_box, :message, 1, "google.cloud.videointelligence.v1.NormalizedBoundingBox"
@@ -213,6 +234,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
213
234
  optional :entity, :message, 1, "google.cloud.videointelligence.v1.Entity"
214
235
  optional :confidence, :float, 4
215
236
  repeated :frames, :message, 2, "google.cloud.videointelligence.v1.ObjectTrackingFrame"
237
+ optional :version, :string, 6
216
238
  oneof :track_info do
217
239
  optional :segment, :message, 3, "google.cloud.videointelligence.v1.VideoSegment"
218
240
  optional :track_id, :int64, 5
@@ -233,6 +255,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
233
255
  value :TEXT_DETECTION, 7
234
256
  value :OBJECT_TRACKING, 9
235
257
  value :LOGO_RECOGNITION, 12
258
+ value :PERSON_DETECTION, 14
236
259
  end
237
260
  add_enum "google.cloud.videointelligence.v1.LabelDetectionMode" do
238
261
  value :LABEL_DETECTION_MODE_UNSPECIFIED, 0
@@ -261,6 +284,7 @@ module Google
261
284
  ShotChangeDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.ShotChangeDetectionConfig").msgclass
262
285
  ObjectTrackingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.ObjectTrackingConfig").msgclass
263
286
  FaceDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.FaceDetectionConfig").msgclass
287
+ PersonDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.PersonDetectionConfig").msgclass
264
288
  ExplicitContentDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.ExplicitContentDetectionConfig").msgclass
265
289
  TextDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.TextDetectionConfig").msgclass
266
290
  VideoSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.VideoSegment").msgclass
@@ -271,6 +295,8 @@ module Google
271
295
  ExplicitContentFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.ExplicitContentFrame").msgclass
272
296
  ExplicitContentAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.ExplicitContentAnnotation").msgclass
273
297
  NormalizedBoundingBox = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.NormalizedBoundingBox").msgclass
298
+ FaceDetectionAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.FaceDetectionAnnotation").msgclass
299
+ PersonDetectionAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.PersonDetectionAnnotation").msgclass
274
300
  FaceSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.FaceSegment").msgclass
275
301
  FaceFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.FaceFrame").msgclass
276
302
  FaceAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.FaceAnnotation").msgclass
@@ -24,7 +24,7 @@ module Google
24
24
  module VideoIntelligence
25
25
  module V1
26
26
  module VideoIntelligenceService
27
- # Service that implements Google Cloud Video Intelligence API.
27
+ # Service that implements the Video Intelligence API.
28
28
  class Service
29
29
 
30
30
  include GRPC::GenericService
@@ -37,7 +37,7 @@ module Google
37
37
  # retrieved through the `google.longrunning.Operations` interface.
38
38
  # `Operation.metadata` contains `AnnotateVideoProgress` (progress).
39
39
  # `Operation.response` contains `AnnotateVideoResponse` (results).
40
- rpc :AnnotateVideo, Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest, Google::Longrunning::Operation
40
+ rpc :AnnotateVideo, ::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest, ::Google::Longrunning::Operation
41
41
  end
42
42
 
43
43
  Stub = Service.rpc_stub_class
@@ -54,6 +54,12 @@ module Google
54
54
  # This indicates that the field may be set once in a request to create a
55
55
  # resource, but may not be changed thereafter.
56
56
  IMMUTABLE = 5
57
+
58
+ # Denotes that a (repeated) field is an unordered list.
59
+ # This indicates that the service may provide the elements of the list
60
+ # in any arbitrary order, rather than the order the user originally
61
+ # provided. Additionally, the list's order may or may not be stable.
62
+ UNORDERED_LIST = 6
57
63
  end
58
64
  end
59
65
  end
@@ -43,12 +43,12 @@ module Google
43
43
  #
44
44
  # The ResourceDescriptor Yaml config will look like:
45
45
  #
46
- # resources:
47
- # - type: "pubsub.googleapis.com/Topic"
48
- # name_descriptor:
49
- # - pattern: "projects/\\{project}/topics/\\{topic}"
50
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
- # parent_name_extractor: "projects/\\{project}"
46
+ # resources:
47
+ # - type: "pubsub.googleapis.com/Topic"
48
+ # name_descriptor:
49
+ # - pattern: "projects/{project}/topics/{topic}"
50
+ # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
+ # parent_name_extractor: "projects/{project}"
52
52
  #
53
53
  # Sometimes, resources have multiple patterns, typically because they can
54
54
  # live under multiple parents.
@@ -183,15 +183,24 @@ module Google
183
183
  # }
184
184
  # @!attribute [rw] plural
185
185
  # @return [::String]
186
- # The plural name used in the resource name, such as 'projects' for
187
- # the name of 'projects/\\{project}'. It is the same concept of the `plural`
188
- # field in k8s CRD spec
186
+ # The plural name used in the resource name and permission names, such as
187
+ # 'projects' for the resource name of 'projects/\\{project}' and the permission
188
+ # name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
189
+ # concept of the `plural` field in k8s CRD spec
189
190
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
191
+ #
192
+ # Note: The plural form is required even for singleton resources. See
193
+ # https://aip.dev/156
190
194
  # @!attribute [rw] singular
191
195
  # @return [::String]
192
196
  # The same concept of the `singular` field in k8s CRD spec
193
197
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
194
198
  # Such as "project" for the `resourcemanager.googleapis.com/Project` type.
199
+ # @!attribute [rw] style
200
+ # @return [::Array<::Google::Api::ResourceDescriptor::Style>]
201
+ # Style flag(s) for this resource.
202
+ # These indicate that a resource is expected to conform to a given
203
+ # style. See the specific style flags for additional information.
195
204
  class ResourceDescriptor
196
205
  include ::Google::Protobuf::MessageExts
197
206
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -211,6 +220,22 @@ module Google
211
220
  # that from being necessary once there are multiple patterns.)
212
221
  FUTURE_MULTI_PATTERN = 2
213
222
  end
223
+
224
+ # A flag representing a specific style that a resource claims to conform to.
225
+ module Style
226
+ # The unspecified value. Do not use.
227
+ STYLE_UNSPECIFIED = 0
228
+
229
+ # This resource is intended to be "declarative-friendly".
230
+ #
231
+ # Declarative-friendly resources must be more strictly consistent, and
232
+ # setting this to true communicates to tools that this resource should
233
+ # adhere to declarative-friendly expectations.
234
+ #
235
+ # Note: This is used by the API linter (linter.aip.dev) to enable
236
+ # additional checks.
237
+ DECLARATIVE_FRIENDLY = 1
238
+ end
214
239
  end
215
240
 
216
241
  # Defines a proto annotation that describes a string field that refers to
@@ -226,6 +251,17 @@ module Google
226
251
  # type: "pubsub.googleapis.com/Topic"
227
252
  # }];
228
253
  # }
254
+ #
255
+ # Occasionally, a field may reference an arbitrary resource. In this case,
256
+ # APIs use the special value * in their resource reference.
257
+ #
258
+ # Example:
259
+ #
260
+ # message GetIamPolicyRequest {
261
+ # string resource = 2 [(google.api.resource_reference) = {
262
+ # type: "*"
263
+ # }];
264
+ # }
229
265
  # @!attribute [rw] child_type
230
266
  # @return [::String]
231
267
  # The resource type of a child collection that the annotated field
@@ -234,11 +270,11 @@ module Google
234
270
  #
235
271
  # Example:
236
272
  #
237
- # message ListLogEntriesRequest {
238
- # string parent = 1 [(google.api.resource_reference) = {
239
- # child_type: "logging.googleapis.com/LogEntry"
240
- # };
241
- # }
273
+ # message ListLogEntriesRequest {
274
+ # string parent = 1 [(google.api.resource_reference) = {
275
+ # child_type: "logging.googleapis.com/LogEntry"
276
+ # };
277
+ # }
242
278
  class ResourceReference
243
279
  include ::Google::Protobuf::MessageExts
244
280
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -25,20 +25,21 @@ module Google
25
25
  # @!attribute [rw] input_uri
26
26
  # @return [::String]
27
27
  # Input video location. Currently, only
28
- # [Google Cloud Storage](https://cloud.google.com/storage/) URIs are
29
- # supported, which must be specified in the following format:
28
+ # [Cloud Storage](https://cloud.google.com/storage/) URIs are
29
+ # supported. URIs must be specified in the following format:
30
30
  # `gs://bucket-id/object-id` (other URI formats return
31
- # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
32
- # [Request URIs](https://cloud.google.com/storage/docs/request-endpoints).
33
- # A video URI may include wildcards in `object-id`, and thus identify
34
- # multiple videos. Supported wildcards: '*' to match 0 or more characters;
31
+ # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
32
+ # more information, see [Request
33
+ # URIs](https://cloud.google.com/storage/docs/request-endpoints). To identify
34
+ # multiple videos, a video URI may include wildcards in the `object-id`.
35
+ # Supported wildcards: '*' to match 0 or more characters;
35
36
  # '?' to match 1 character. If unset, the input video should be embedded
36
- # in the request as `input_content`. If set, `input_content` should be unset.
37
+ # in the request as `input_content`. If set, `input_content` must be unset.
37
38
  # @!attribute [rw] input_content
38
39
  # @return [::String]
39
40
  # The video data bytes.
40
- # If unset, the input video(s) should be specified via `input_uri`.
41
- # If set, `input_uri` should be unset.
41
+ # If unset, the input video(s) should be specified via the `input_uri`.
42
+ # If set, `input_uri` must be unset.
42
43
  # @!attribute [rw] features
43
44
  # @return [::Array<::Google::Cloud::VideoIntelligence::V1::Feature>]
44
45
  # Required. Requested video annotation features.
@@ -48,16 +49,18 @@ module Google
48
49
  # @!attribute [rw] output_uri
49
50
  # @return [::String]
50
51
  # Optional. Location where the output (in JSON format) should be stored.
51
- # Currently, only [Google Cloud Storage](https://cloud.google.com/storage/)
52
- # URIs are supported, which must be specified in the following format:
52
+ # Currently, only [Cloud Storage](https://cloud.google.com/storage/)
53
+ # URIs are supported. These must be specified in the following format:
53
54
  # `gs://bucket-id/object-id` (other URI formats return
54
- # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
55
- # [Request URIs](https://cloud.google.com/storage/docs/request-endpoints).
55
+ # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
56
+ # more information, see [Request
57
+ # URIs](https://cloud.google.com/storage/docs/request-endpoints).
56
58
  # @!attribute [rw] location_id
57
59
  # @return [::String]
58
60
  # Optional. Cloud region where annotation should take place. Supported cloud
59
- # regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region
60
- # is specified, a region will be determined based on video file location.
61
+ # regions are: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no
62
+ # region is specified, the region will be determined based on video file
63
+ # location.
61
64
  class AnnotateVideoRequest
62
65
  include ::Google::Protobuf::MessageExts
63
66
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -87,6 +90,9 @@ module Google
87
90
  # @!attribute [rw] text_detection_config
88
91
  # @return [::Google::Cloud::VideoIntelligence::V1::TextDetectionConfig]
89
92
  # Config for TEXT_DETECTION.
93
+ # @!attribute [rw] person_detection_config
94
+ # @return [::Google::Cloud::VideoIntelligence::V1::PersonDetectionConfig]
95
+ # Config for PERSON_DETECTION.
90
96
  # @!attribute [rw] object_tracking_config
91
97
  # @return [::Google::Cloud::VideoIntelligence::V1::ObjectTrackingConfig]
92
98
  # Config for OBJECT_TRACKING.
@@ -103,9 +109,9 @@ module Google
103
109
  # If unspecified, defaults to `SHOT_MODE`.
104
110
  # @!attribute [rw] stationary_camera
105
111
  # @return [::Boolean]
106
- # Whether the video has been shot from a stationary (i.e. non-moving) camera.
107
- # When set to true, might improve detection accuracy for moving objects.
108
- # Should be used with `SHOT_AND_FRAME_MODE` enabled.
112
+ # Whether the video has been shot from a stationary (i.e., non-moving)
113
+ # camera. When set to true, might improve detection accuracy for moving
114
+ # objects. Should be used with `SHOT_AND_FRAME_MODE` enabled.
109
115
  # @!attribute [rw] model
110
116
  # @return [::String]
111
117
  # Model to use for label detection.
@@ -117,15 +123,15 @@ module Google
117
123
  # frame-level detection. If not set, it is set to 0.4 by default. The valid
118
124
  # range for this threshold is [0.1, 0.9]. Any value set outside of this
119
125
  # range will be clipped.
120
- # Note: for best results please follow the default threshold. We will update
126
+ # Note: For best results, follow the default threshold. We will update
121
127
  # the default threshold everytime when we release a new model.
122
128
  # @!attribute [rw] video_confidence_threshold
123
129
  # @return [::Float]
124
130
  # The confidence threshold we perform filtering on the labels from
125
- # video-level and shot-level detections. If not set, it is set to 0.3 by
131
+ # video-level and shot-level detections. If not set, it's set to 0.3 by
126
132
  # default. The valid range for this threshold is [0.1, 0.9]. Any value set
127
133
  # outside of this range will be clipped.
128
- # Note: for best results please follow the default threshold. We will update
134
+ # Note: For best results, follow the default threshold. We will update
129
135
  # the default threshold everytime when we release a new model.
130
136
  class LabelDetectionConfig
131
137
  include ::Google::Protobuf::MessageExts
@@ -162,12 +168,36 @@ module Google
162
168
  # "builtin/latest".
163
169
  # @!attribute [rw] include_bounding_boxes
164
170
  # @return [::Boolean]
165
- # Whether bounding boxes be included in the face annotation output.
171
+ # Whether bounding boxes are included in the face annotation output.
172
+ # @!attribute [rw] include_attributes
173
+ # @return [::Boolean]
174
+ # Whether to enable face attributes detection, such as glasses, dark_glasses,
175
+ # mouth_open etc. Ignored if 'include_bounding_boxes' is set to false.
166
176
  class FaceDetectionConfig
167
177
  include ::Google::Protobuf::MessageExts
168
178
  extend ::Google::Protobuf::MessageExts::ClassMethods
169
179
  end
170
180
 
181
+ # Config for PERSON_DETECTION.
182
+ # @!attribute [rw] include_bounding_boxes
183
+ # @return [::Boolean]
184
+ # Whether bounding boxes are included in the person detection annotation
185
+ # output.
186
+ # @!attribute [rw] include_pose_landmarks
187
+ # @return [::Boolean]
188
+ # Whether to enable pose landmarks detection. Ignored if
189
+ # 'include_bounding_boxes' is set to false.
190
+ # @!attribute [rw] include_attributes
191
+ # @return [::Boolean]
192
+ # Whether to enable person attributes detection, such as cloth color (black,
193
+ # blue, etc), type (coat, dress, etc), pattern (plain, floral, etc), hair,
194
+ # etc.
195
+ # Ignored if 'include_bounding_boxes' is set to false.
196
+ class PersonDetectionConfig
197
+ include ::Google::Protobuf::MessageExts
198
+ extend ::Google::Protobuf::MessageExts::ClassMethods
199
+ end
200
+
171
201
  # Config for EXPLICIT_CONTENT_DETECTION.
172
202
  # @!attribute [rw] model
173
203
  # @return [::String]
@@ -244,7 +274,7 @@ module Google
244
274
  # API](https://developers.google.com/knowledge-graph/).
245
275
  # @!attribute [rw] description
246
276
  # @return [::String]
247
- # Textual description, e.g. `Fixed-gear bicycle`.
277
+ # Textual description, e.g., `Fixed-gear bicycle`.
248
278
  # @!attribute [rw] language_code
249
279
  # @return [::String]
250
280
  # Language code for `description` in BCP-47 format.
@@ -260,15 +290,18 @@ module Google
260
290
  # @!attribute [rw] category_entities
261
291
  # @return [::Array<::Google::Cloud::VideoIntelligence::V1::Entity>]
262
292
  # Common categories for the detected entity.
263
- # E.g. when the label is `Terrier` the category is likely `dog`. And in some
264
- # cases there might be more than one categories e.g. `Terrier` could also be
265
- # a `pet`.
293
+ # For example, when the label is `Terrier`, the category is likely `dog`. And
294
+ # in some cases there might be more than one categories e.g., `Terrier` could
295
+ # also be a `pet`.
266
296
  # @!attribute [rw] segments
267
297
  # @return [::Array<::Google::Cloud::VideoIntelligence::V1::LabelSegment>]
268
298
  # All video segments where a label was detected.
269
299
  # @!attribute [rw] frames
270
300
  # @return [::Array<::Google::Cloud::VideoIntelligence::V1::LabelFrame>]
271
301
  # All video frames where a label was detected.
302
+ # @!attribute [rw] version
303
+ # @return [::String]
304
+ # Feature version.
272
305
  class LabelAnnotation
273
306
  include ::Google::Protobuf::MessageExts
274
307
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -293,6 +326,9 @@ module Google
293
326
  # @!attribute [rw] frames
294
327
  # @return [::Array<::Google::Cloud::VideoIntelligence::V1::ExplicitContentFrame>]
295
328
  # All video frames where explicit content was detected.
329
+ # @!attribute [rw] version
330
+ # @return [::String]
331
+ # Feature version.
296
332
  class ExplicitContentAnnotation
297
333
  include ::Google::Protobuf::MessageExts
298
334
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -318,6 +354,33 @@ module Google
318
354
  extend ::Google::Protobuf::MessageExts::ClassMethods
319
355
  end
320
356
 
357
+ # Face detection annotation.
358
+ # @!attribute [rw] tracks
359
+ # @return [::Array<::Google::Cloud::VideoIntelligence::V1::Track>]
360
+ # The face tracks with attributes.
361
+ # @!attribute [rw] thumbnail
362
+ # @return [::String]
363
+ # The thumbnail of a person's face.
364
+ # @!attribute [rw] version
365
+ # @return [::String]
366
+ # Feature version.
367
+ class FaceDetectionAnnotation
368
+ include ::Google::Protobuf::MessageExts
369
+ extend ::Google::Protobuf::MessageExts::ClassMethods
370
+ end
371
+
372
+ # Person detection annotation per video.
373
+ # @!attribute [rw] tracks
374
+ # @return [::Array<::Google::Cloud::VideoIntelligence::V1::Track>]
375
+ # The detected tracks of a person.
376
+ # @!attribute [rw] version
377
+ # @return [::String]
378
+ # Feature version.
379
+ class PersonDetectionAnnotation
380
+ include ::Google::Protobuf::MessageExts
381
+ extend ::Google::Protobuf::MessageExts::ClassMethods
382
+ end
383
+
321
384
  # Video segment level annotation results for face detection.
322
385
  # @!attribute [rw] segment
323
386
  # @return [::Google::Cloud::VideoIntelligence::V1::VideoSegment]
@@ -327,7 +390,7 @@ module Google
327
390
  extend ::Google::Protobuf::MessageExts::ClassMethods
328
391
  end
329
392
 
330
- # Video frame level annotation results for face detection.
393
+ # Deprecated. No effect.
331
394
  # @!attribute [rw] normalized_bounding_boxes
332
395
  # @return [::Array<::Google::Cloud::VideoIntelligence::V1::NormalizedBoundingBox>]
333
396
  # Normalized Bounding boxes in a frame.
@@ -342,7 +405,7 @@ module Google
342
405
  extend ::Google::Protobuf::MessageExts::ClassMethods
343
406
  end
344
407
 
345
- # Face annotation.
408
+ # Deprecated. No effect.
346
409
  # @!attribute [rw] thumbnail
347
410
  # @return [::String]
348
411
  # Thumbnail of a representative face view (in JPEG format).
@@ -399,7 +462,7 @@ module Google
399
462
  # A generic detected attribute represented by name in string format.
400
463
  # @!attribute [rw] name
401
464
  # @return [::String]
402
- # The name of the attribute, i.e. glasses, dark_glasses, mouth_open etc.
465
+ # The name of the attribute, for example, glasses, dark_glasses, mouth_open.
403
466
  # A full list of supported type names will be provided in the document.
404
467
  # @!attribute [rw] confidence
405
468
  # @return [::Float]
@@ -417,7 +480,7 @@ module Google
417
480
  # location.
418
481
  # @!attribute [rw] name
419
482
  # @return [::String]
420
- # The name of this landmark, i.e. left_hand, right_shoulder.
483
+ # The name of this landmark, for example, left_hand, right_shoulder.
421
484
  # @!attribute [rw] point
422
485
  # @return [::Google::Cloud::VideoIntelligence::V1::NormalizedVertex]
423
486
  # The 2D point of the detected landmark using the normalized image
@@ -434,17 +497,17 @@ module Google
434
497
  # @!attribute [rw] input_uri
435
498
  # @return [::String]
436
499
  # Video file location in
437
- # [Google Cloud Storage](https://cloud.google.com/storage/).
500
+ # [Cloud Storage](https://cloud.google.com/storage/).
438
501
  # @!attribute [rw] segment
439
502
  # @return [::Google::Cloud::VideoIntelligence::V1::VideoSegment]
440
503
  # Video segment on which the annotation is run.
441
504
  # @!attribute [rw] segment_label_annotations
442
505
  # @return [::Array<::Google::Cloud::VideoIntelligence::V1::LabelAnnotation>]
443
- # Topical label annotations on video level or user specified segment level.
506
+ # Topical label annotations on video level or user-specified segment level.
444
507
  # There is exactly one element for each unique label.
445
508
  # @!attribute [rw] segment_presence_label_annotations
446
509
  # @return [::Array<::Google::Cloud::VideoIntelligence::V1::LabelAnnotation>]
447
- # Presence label annotations on video level or user specified segment level.
510
+ # Presence label annotations on video level or user-specified segment level.
448
511
  # There is exactly one element for each unique label. Compared to the
449
512
  # existing topical `segment_label_annotations`, this field presents more
450
513
  # fine-grained, segment-level labels detected in video content and is made
@@ -467,7 +530,10 @@ module Google
467
530
  # There is exactly one element for each unique label.
468
531
  # @!attribute [rw] face_annotations
469
532
  # @return [::Array<::Google::Cloud::VideoIntelligence::V1::FaceAnnotation>]
470
- # Face annotations. There is exactly one element for each unique face.
533
+ # Deprecated. Please use `face_detection_annotations` instead.
534
+ # @!attribute [rw] face_detection_annotations
535
+ # @return [::Array<::Google::Cloud::VideoIntelligence::V1::FaceDetectionAnnotation>]
536
+ # Face detection annotations.
471
537
  # @!attribute [rw] shot_annotations
472
538
  # @return [::Array<::Google::Cloud::VideoIntelligence::V1::VideoSegment>]
473
539
  # Shot annotations. Each shot is represented as a video segment.
@@ -488,6 +554,9 @@ module Google
488
554
  # @!attribute [rw] logo_recognition_annotations
489
555
  # @return [::Array<::Google::Cloud::VideoIntelligence::V1::LogoRecognitionAnnotation>]
490
556
  # Annotations for list of logos detected, tracked and recognized in video.
557
+ # @!attribute [rw] person_detection_annotations
558
+ # @return [::Array<::Google::Cloud::VideoIntelligence::V1::PersonDetectionAnnotation>]
559
+ # Person detection annotations.
491
560
  # @!attribute [rw] error
492
561
  # @return [::Google::Rpc::Status]
493
562
  # If set, indicates an error. Note that for a single `AnnotateVideoRequest`
@@ -512,7 +581,7 @@ module Google
512
581
  # @!attribute [rw] input_uri
513
582
  # @return [::String]
514
583
  # Video file location in
515
- # [Google Cloud Storage](https://cloud.google.com/storage/).
584
+ # [Cloud Storage](https://cloud.google.com/storage/).
516
585
  # @!attribute [rw] progress_percent
517
586
  # @return [::Integer]
518
587
  # Approximate percentage processed thus far. Guaranteed to be
@@ -526,11 +595,11 @@ module Google
526
595
  # @!attribute [rw] feature
527
596
  # @return [::Google::Cloud::VideoIntelligence::V1::Feature]
528
597
  # Specifies which feature is being tracked if the request contains more than
529
- # one features.
598
+ # one feature.
530
599
  # @!attribute [rw] segment
531
600
  # @return [::Google::Cloud::VideoIntelligence::V1::VideoSegment]
532
601
  # Specifies which segment is being tracked if the request contains more than
533
- # one segments.
602
+ # one segment.
534
603
  class VideoAnnotationProgress
535
604
  include ::Google::Protobuf::MessageExts
536
605
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -589,14 +658,14 @@ module Google
589
658
  # the top alternative of the recognition result using a speaker_tag provided
590
659
  # in the WordInfo.
591
660
  # Note: When this is true, we send all the words from the beginning of the
592
- # audio for the top alternative in every consecutive responses.
661
+ # audio for the top alternative in every consecutive response.
593
662
  # This is done in order to improve our speaker tags as our models learn to
594
663
  # identify the speakers in the conversation over time.
595
664
  # @!attribute [rw] diarization_speaker_count
596
665
  # @return [::Integer]
597
- # Optional. If set, specifies the estimated number of speakers in the conversation.
598
- # If not set, defaults to '2'.
599
- # Ignored unless enable_speaker_diarization is set to true.
666
+ # Optional. If set, specifies the estimated number of speakers in the
667
+ # conversation. If not set, defaults to '2'. Ignored unless
668
+ # enable_speaker_diarization is set to true.
600
669
  # @!attribute [rw] enable_word_confidence
601
670
  # @return [::Boolean]
602
671
  # Optional. If `true`, the top result includes a list of words and the
@@ -631,9 +700,9 @@ module Google
631
700
  # ranked by the recognizer.
632
701
  # @!attribute [r] language_code
633
702
  # @return [::String]
634
- # Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of
635
- # the language in this result. This language code was detected to have the
636
- # most likelihood of being spoken in the audio.
703
+ # Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
704
+ # language tag of the language in this result. This language code was
705
+ # detected to have the most likelihood of being spoken in the audio.
637
706
  class SpeechTranscription
638
707
  include ::Google::Protobuf::MessageExts
639
708
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -654,8 +723,8 @@ module Google
654
723
  # @!attribute [r] words
655
724
  # @return [::Array<::Google::Cloud::VideoIntelligence::V1::WordInfo>]
656
725
  # Output only. A list of word-specific information for each recognized word.
657
- # Note: When `enable_speaker_diarization` is true, you will see all the words
658
- # from the beginning of the audio.
726
+ # Note: When `enable_speaker_diarization` is set to true, you will see all
727
+ # the words from the beginning of the audio.
659
728
  class SpeechRecognitionAlternative
660
729
  include ::Google::Protobuf::MessageExts
661
730
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -776,6 +845,9 @@ module Google
776
845
  # @!attribute [rw] segments
777
846
  # @return [::Array<::Google::Cloud::VideoIntelligence::V1::TextSegment>]
778
847
  # All video segments where OCR detected text appears.
848
+ # @!attribute [rw] version
849
+ # @return [::String]
850
+ # Feature version.
779
851
  class TextAnnotation
780
852
  include ::Google::Protobuf::MessageExts
781
853
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -819,6 +891,9 @@ module Google
819
891
  # Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame
820
892
  # messages in frames.
821
893
  # Streaming mode: it can only be one ObjectTrackingFrame message in frames.
894
+ # @!attribute [rw] version
895
+ # @return [::String]
896
+ # Feature version.
822
897
  class ObjectTrackingAnnotation
823
898
  include ::Google::Protobuf::MessageExts
824
899
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -856,7 +931,7 @@ module Google
856
931
  # Explicit content detection.
857
932
  EXPLICIT_CONTENT_DETECTION = 3
858
933
 
859
- # Human face detection and tracking.
934
+ # Human face detection.
860
935
  FACE_DETECTION = 4
861
936
 
862
937
  # Speech transcription.
@@ -870,6 +945,9 @@ module Google
870
945
 
871
946
  # Logo detection, tracking, and recognition.
872
947
  LOGO_RECOGNITION = 12
948
+
949
+ # Person detection.
950
+ PERSON_DETECTION = 14
873
951
  end
874
952
 
875
953
  # Label detection mode.
@@ -25,7 +25,7 @@ module Google
25
25
  # @return [::String]
26
26
  # The server-assigned name, which is only unique within the same service that
27
27
  # originally returns it. If you use the default HTTP mapping, the
28
- # `name` should have the format of `operations/some/unique/name`.
28
+ # `name` should be a resource name ending with `operations/{unique_id}`.
29
29
  # @!attribute [rw] metadata
30
30
  # @return [::Google::Protobuf::Any]
31
31
  # Service-specific metadata associated with the operation. It typically
@@ -35,7 +35,7 @@ module Google
35
35
  # @!attribute [rw] done
36
36
  # @return [::Boolean]
37
37
  # If the value is `false`, it means the operation is still in progress.
38
- # If true, the operation is completed, and either `error` or `response` is
38
+ # If `true`, the operation is completed, and either `error` or `response` is
39
39
  # available.
40
40
  # @!attribute [rw] error
41
41
  # @return [::Google::Rpc::Status]
@@ -67,7 +67,7 @@ module Google
67
67
  # The request message for Operations.ListOperations.
68
68
  # @!attribute [rw] name
69
69
  # @return [::String]
70
- # The name of the operation collection.
70
+ # The name of the operation's parent resource.
71
71
  # @!attribute [rw] filter
72
72
  # @return [::String]
73
73
  # The standard list filter.
@@ -112,6 +112,20 @@ module Google
112
112
  extend ::Google::Protobuf::MessageExts::ClassMethods
113
113
  end
114
114
 
115
+ # The request message for Operations.WaitOperation.
116
+ # @!attribute [rw] name
117
+ # @return [::String]
118
+ # The name of the operation resource to wait on.
119
+ # @!attribute [rw] timeout
120
+ # @return [::Google::Protobuf::Duration]
121
+ # The maximum duration to wait before timing out. If left blank, the wait
122
+ # will be at most the time permitted by the underlying HTTP/RPC protocol.
123
+ # If RPC context deadline is also specified, the shorter one will be used.
124
+ class WaitOperationRequest
125
+ include ::Google::Protobuf::MessageExts
126
+ extend ::Google::Protobuf::MessageExts::ClassMethods
127
+ end
128
+
115
129
  # A message representing the message types used by a long-running operation.
116
130
  #
117
131
  # Example:
@@ -57,10 +57,13 @@ module Google
57
57
  # Example 4: Pack and unpack a message in Go
58
58
  #
59
59
  # foo := &pb.Foo{...}
60
- # any, err := ptypes.MarshalAny(foo)
60
+ # any, err := anypb.New(foo)
61
+ # if err != nil {
62
+ # ...
63
+ # }
61
64
  # ...
62
65
  # foo := &pb.Foo{}
63
- # if err := ptypes.UnmarshalAny(any, foo); err != nil {
66
+ # if err := any.UnmarshalTo(foo); err != nil {
64
67
  # ...
65
68
  # }
66
69
  #
@@ -70,7 +70,16 @@ module Google
70
70
  # .setNanos((int) ((millis % 1000) * 1000000)).build();
71
71
  #
72
72
  #
73
- # Example 5: Compute Timestamp from current time in Python.
73
+ # Example 5: Compute Timestamp from Java `Instant.now()`.
74
+ #
75
+ # Instant now = Instant.now();
76
+ #
77
+ # Timestamp timestamp =
78
+ # Timestamp.newBuilder().setSeconds(now.getEpochSecond())
79
+ # .setNanos(now.getNano()).build();
80
+ #
81
+ #
82
+ # Example 6: Compute Timestamp from current time in Python.
74
83
  #
75
84
  # timestamp = Timestamp()
76
85
  # timestamp.GetCurrentTime()
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-video_intelligence-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-07 00:00:00.000000000 Z
11
+ date: 2021-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -152,7 +152,10 @@ dependencies:
152
152
  version: '0.9'
153
153
  description: Detects objects, explicit content, and scene changes in videos. It also
154
154
  specifies the region for annotation and transcribes speech to text. Supports both
155
- asynchronous API and streaming API.
155
+ asynchronous API and streaming API. Note that google-cloud-video_intelligence-v1
156
+ is a version-specific client library. For most uses, we recommend installing the
157
+ main client library google-cloud-video_intelligence instead. See the readme for
158
+ more details.
156
159
  email: googleapis-packages@google.com
157
160
  executables: []
158
161
  extensions: []
@@ -200,7 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
200
203
  - !ruby/object:Gem::Version
201
204
  version: '0'
202
205
  requirements: []
203
- rubygems_version: 3.1.3
206
+ rubygems_version: 3.2.6
204
207
  signing_key:
205
208
  specification_version: 4
206
209
  summary: API Client library for the Cloud Video Intelligence V1 API