google-cloud-video_intelligence 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/video_intelligence.rb +4 -0
  3. data/lib/google/cloud/video_intelligence/v1.rb +8 -0
  4. data/lib/google/cloud/video_intelligence/v1/doc/google/cloud/videointelligence/v1/video_intelligence.rb +46 -46
  5. data/lib/google/cloud/video_intelligence/v1/video_intelligence_service_client.rb +19 -10
  6. data/lib/google/cloud/video_intelligence/v1beta1.rb +8 -0
  7. data/lib/google/cloud/video_intelligence/v1beta1/doc/google/cloud/videointelligence/v1beta1/video_intelligence.rb +22 -22
  8. data/lib/google/cloud/video_intelligence/v1beta1/video_intelligence_service_client.rb +19 -10
  9. data/lib/google/cloud/video_intelligence/v1beta2.rb +8 -0
  10. data/lib/google/cloud/video_intelligence/v1beta2/doc/google/cloud/videointelligence/v1beta2/video_intelligence.rb +28 -28
  11. data/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service_client.rb +19 -10
  12. data/lib/google/cloud/video_intelligence/v1p1beta1.rb +8 -0
  13. data/lib/google/cloud/video_intelligence/v1p1beta1/doc/google/cloud/videointelligence/v1p1beta1/video_intelligence.rb +27 -27
  14. data/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service_client.rb +19 -10
  15. data/lib/google/cloud/video_intelligence/v1p2beta1.rb +8 -0
  16. data/lib/google/cloud/video_intelligence/v1p2beta1/doc/google/cloud/videointelligence/v1p2beta1/video_intelligence.rb +34 -34
  17. data/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service_client.rb +19 -10
  18. data/lib/google/cloud/video_intelligence/version.rb +1 -1
  19. data/lib/google/cloud/videointelligence/v1/video_intelligence_pb.rb +42 -41
  20. data/lib/google/cloud/videointelligence/v1/video_intelligence_services_pb.rb +21 -20
  21. data/lib/google/cloud/videointelligence/v1beta1/video_intelligence_pb.rb +21 -20
  22. data/lib/google/cloud/videointelligence/v1beta1/video_intelligence_services_pb.rb +21 -20
  23. data/lib/google/cloud/videointelligence/v1beta2/video_intelligence_pb.rb +28 -27
  24. data/lib/google/cloud/videointelligence/v1beta2/video_intelligence_services_pb.rb +21 -20
  25. data/lib/google/cloud/videointelligence/v1p1beta1/video_intelligence_pb.rb +28 -27
  26. data/lib/google/cloud/videointelligence/v1p1beta1/video_intelligence_services_pb.rb +21 -20
  27. data/lib/google/cloud/videointelligence/v1p2beta1/video_intelligence_pb.rb +32 -31
  28. data/lib/google/cloud/videointelligence/v1p2beta1/video_intelligence_services_pb.rb +21 -20
  29. metadata +4 -4
@@ -15,7 +15,7 @@
15
15
 
16
16
  module Google
17
17
  module Cloud
18
- module Videointelligence
18
+ module VideoIntelligence
19
19
  module V1beta1
20
20
  # Video annotation request.
21
21
  # @!attribute [rw] input_uri
@@ -35,10 +35,10 @@ module Google
35
35
  # The video data bytes. Encoding: base64. If unset, the input video(s)
36
36
  # should be specified via `input_uri`. If set, `input_uri` should be unset.
37
37
  # @!attribute [rw] features
38
- # @return [Array<Google::Cloud::Videointelligence::V1beta1::Feature>]
38
+ # @return [Array<Google::Cloud::VideoIntelligence::V1beta1::Feature>]
39
39
  # Requested video annotation features.
40
40
  # @!attribute [rw] video_context
41
- # @return [Google::Cloud::Videointelligence::V1beta1::VideoContext]
41
+ # @return [Google::Cloud::VideoIntelligence::V1beta1::VideoContext]
42
42
  # Additional video context and/or feature-specific parameters.
43
43
  # @!attribute [rw] output_uri
44
44
  # @return [String]
@@ -57,12 +57,12 @@ module Google
57
57
 
58
58
  # Video context and/or feature-specific parameters.
59
59
  # @!attribute [rw] segments
60
- # @return [Array<Google::Cloud::Videointelligence::V1beta1::VideoSegment>]
60
+ # @return [Array<Google::Cloud::VideoIntelligence::V1beta1::VideoSegment>]
61
61
  # Video segments to annotate. The segments may overlap and are not required
62
62
  # to be contiguous or span the whole video. If unspecified, each video
63
63
  # is treated as a single segment.
64
64
  # @!attribute [rw] label_detection_mode
65
- # @return [Google::Cloud::Videointelligence::V1beta1::LabelDetectionMode]
65
+ # @return [Google::Cloud::VideoIntelligence::V1beta1::LabelDetectionMode]
66
66
  # If label detection has been requested, what labels should be detected
67
67
  # in addition to video-level labels or segment-level labels. If unspecified,
68
68
  # defaults to `SHOT_MODE`.
@@ -99,7 +99,7 @@ module Google
99
99
 
100
100
  # Label location.
101
101
  # @!attribute [rw] segment
102
- # @return [Google::Cloud::Videointelligence::V1beta1::VideoSegment]
102
+ # @return [Google::Cloud::VideoIntelligence::V1beta1::VideoSegment]
103
103
  # Video segment. Set to [-1, -1] for video-level labels.
104
104
  # Set to [timestamp, timestamp] for frame-level labels.
105
105
  # Otherwise, corresponds to one of `AnnotateSpec.segments`
@@ -108,7 +108,7 @@ module Google
108
108
  # @return [Float]
109
109
  # Confidence that the label is accurate. Range: [0, 1].
110
110
  # @!attribute [rw] level
111
- # @return [Google::Cloud::Videointelligence::V1beta1::LabelLevel]
111
+ # @return [Google::Cloud::VideoIntelligence::V1beta1::LabelLevel]
112
112
  # Label level.
113
113
  class LabelLocation; end
114
114
 
@@ -120,7 +120,7 @@ module Google
120
120
  # @return [String]
121
121
  # Language code for `description` in BCP-47 format.
122
122
  # @!attribute [rw] locations
123
- # @return [Array<Google::Cloud::Videointelligence::V1beta1::LabelLocation>]
123
+ # @return [Array<Google::Cloud::VideoIntelligence::V1beta1::LabelLocation>]
124
124
  # Where the label was detected and with what confidence.
125
125
  class LabelAnnotation; end
126
126
 
@@ -130,20 +130,20 @@ module Google
130
130
  # have been detected in a frame, the likelihood is set to `UNKNOWN`
131
131
  # for all other types of unsafe content.
132
132
  # @!attribute [rw] adult
133
- # @return [Google::Cloud::Videointelligence::V1beta1::Likelihood]
133
+ # @return [Google::Cloud::VideoIntelligence::V1beta1::Likelihood]
134
134
  # Likelihood of adult content.
135
135
  # @!attribute [rw] spoof
136
- # @return [Google::Cloud::Videointelligence::V1beta1::Likelihood]
136
+ # @return [Google::Cloud::VideoIntelligence::V1beta1::Likelihood]
137
137
  # Likelihood that an obvious modification was made to the original
138
138
  # version to make it appear funny or offensive.
139
139
  # @!attribute [rw] medical
140
- # @return [Google::Cloud::Videointelligence::V1beta1::Likelihood]
140
+ # @return [Google::Cloud::VideoIntelligence::V1beta1::Likelihood]
141
141
  # Likelihood of medical content.
142
142
  # @!attribute [rw] violent
143
- # @return [Google::Cloud::Videointelligence::V1beta1::Likelihood]
143
+ # @return [Google::Cloud::VideoIntelligence::V1beta1::Likelihood]
144
144
  # Likelihood of violent content.
145
145
  # @!attribute [rw] racy
146
- # @return [Google::Cloud::Videointelligence::V1beta1::Likelihood]
146
+ # @return [Google::Cloud::VideoIntelligence::V1beta1::Likelihood]
147
147
  # Likelihood of racy content.
148
148
  # @!attribute [rw] time_offset
149
149
  # @return [Integer]
@@ -167,7 +167,7 @@ module Google
167
167
 
168
168
  # Face location.
169
169
  # @!attribute [rw] bounding_box
170
- # @return [Google::Cloud::Videointelligence::V1beta1::BoundingBox]
170
+ # @return [Google::Cloud::VideoIntelligence::V1beta1::BoundingBox]
171
171
  # Bounding box in a frame.
172
172
  # @!attribute [rw] time_offset
173
173
  # @return [Integer]
@@ -179,12 +179,12 @@ module Google
179
179
  # @return [String]
180
180
  # Thumbnail of a representative face view (in JPEG format). Encoding: base64.
181
181
  # @!attribute [rw] segments
182
- # @return [Array<Google::Cloud::Videointelligence::V1beta1::VideoSegment>]
182
+ # @return [Array<Google::Cloud::VideoIntelligence::V1beta1::VideoSegment>]
183
183
  # All locations where a face was detected.
184
184
  # Faces are detected and tracked on a per-video basis
185
185
  # (as opposed to across multiple videos).
186
186
  # @!attribute [rw] locations
187
- # @return [Array<Google::Cloud::Videointelligence::V1beta1::FaceLocation>]
187
+ # @return [Array<Google::Cloud::VideoIntelligence::V1beta1::FaceLocation>]
188
188
  # Face locations at one frame per second.
189
189
  class FaceAnnotation; end
190
190
 
@@ -194,16 +194,16 @@ module Google
194
194
  # Video file location in
195
195
  # [Google Cloud Storage](https://cloud.google.com/storage/).
196
196
  # @!attribute [rw] label_annotations
197
- # @return [Array<Google::Cloud::Videointelligence::V1beta1::LabelAnnotation>]
197
+ # @return [Array<Google::Cloud::VideoIntelligence::V1beta1::LabelAnnotation>]
198
198
  # Label annotations. There is exactly one element for each unique label.
199
199
  # @!attribute [rw] face_annotations
200
- # @return [Array<Google::Cloud::Videointelligence::V1beta1::FaceAnnotation>]
200
+ # @return [Array<Google::Cloud::VideoIntelligence::V1beta1::FaceAnnotation>]
201
201
  # Face annotations. There is exactly one element for each unique face.
202
202
  # @!attribute [rw] shot_annotations
203
- # @return [Array<Google::Cloud::Videointelligence::V1beta1::VideoSegment>]
203
+ # @return [Array<Google::Cloud::VideoIntelligence::V1beta1::VideoSegment>]
204
204
  # Shot annotations. Each shot is represented as a video segment.
205
205
  # @!attribute [rw] safe_search_annotations
206
- # @return [Array<Google::Cloud::Videointelligence::V1beta1::SafeSearchAnnotation>]
206
+ # @return [Array<Google::Cloud::VideoIntelligence::V1beta1::SafeSearchAnnotation>]
207
207
  # Safe search annotations.
208
208
  # @!attribute [rw] error
209
209
  # @return [Google::Rpc::Status]
@@ -215,7 +215,7 @@ module Google
215
215
  # field of the `Operation` returned by the `GetOperation`
216
216
  # call of the `google::longrunning::Operations` service.
217
217
  # @!attribute [rw] annotation_results
218
- # @return [Array<Google::Cloud::Videointelligence::V1beta1::VideoAnnotationResults>]
218
+ # @return [Array<Google::Cloud::VideoIntelligence::V1beta1::VideoAnnotationResults>]
219
219
  # Annotation results for all videos specified in `AnnotateVideoRequest`.
220
220
  class AnnotateVideoResponse; end
221
221
 
@@ -240,7 +240,7 @@ module Google
240
240
  # field of the `Operation` returned by the `GetOperation`
241
241
  # call of the `google::longrunning::Operations` service.
242
242
  # @!attribute [rw] annotation_progress
243
- # @return [Array<Google::Cloud::Videointelligence::V1beta1::VideoAnnotationProgress>]
243
+ # @return [Array<Google::Cloud::VideoIntelligence::V1beta1::VideoAnnotationProgress>]
244
244
  # Progress metadata for all videos specified in `AnnotateVideoRequest`.
245
245
  class AnnotateVideoProgress; end
246
246
 
@@ -38,7 +38,7 @@ module Google
38
38
  # Service that implements Google Cloud Video Intelligence API.
39
39
  #
40
40
  # @!attribute [r] video_intelligence_service_stub
41
- # @return [Google::Cloud::Videointelligence::V1beta1::VideoIntelligenceService::Stub]
41
+ # @return [Google::Cloud::VideoIntelligence::V1beta1::VideoIntelligenceService::Stub]
42
42
  class VideoIntelligenceServiceClient
43
43
  # @private
44
44
  attr_reader :video_intelligence_service_stub
@@ -92,6 +92,10 @@ module Google
92
92
  # The default timeout, in seconds, for calls made through this client.
93
93
  # @param metadata [Hash]
94
94
  # Default metadata to be sent with each request. This can be overridden on a per call basis.
95
+ # @param service_address [String]
96
+ # Override for the service hostname, or `nil` to leave as the default.
97
+ # @param service_port [Integer]
98
+ # Override for the service port, or `nil` to leave as the default.
95
99
  # @param exception_transformer [Proc]
96
100
  # An optional proc that intercepts any exceptions raised during an API call to inject
97
101
  # custom error handling.
@@ -101,6 +105,8 @@ module Google
101
105
  client_config: {},
102
106
  timeout: DEFAULT_TIMEOUT,
103
107
  metadata: nil,
108
+ service_address: nil,
109
+ service_port: nil,
104
110
  exception_transformer: nil,
105
111
  lib_name: nil,
106
112
  lib_version: ""
@@ -118,7 +124,10 @@ module Google
118
124
  client_config: client_config,
119
125
  timeout: timeout,
120
126
  lib_name: lib_name,
127
+ service_address: service_address,
128
+ service_port: service_port,
121
129
  lib_version: lib_version,
130
+ metadata: metadata,
122
131
  )
123
132
 
124
133
  if credentials.is_a?(String) || credentials.is_a?(Hash)
@@ -163,8 +172,8 @@ module Google
163
172
  end
164
173
 
165
174
  # Allow overriding the service path/port in subclasses.
166
- service_path = self.class::SERVICE_ADDRESS
167
- port = self.class::DEFAULT_SERVICE_PORT
175
+ service_path = service_address || self.class::SERVICE_ADDRESS
176
+ port = service_port || self.class::DEFAULT_SERVICE_PORT
168
177
  interceptors = self.class::GRPC_INTERCEPTORS
169
178
  @video_intelligence_service_stub = Google::Gax::Grpc.create_stub(
170
179
  service_path,
@@ -174,7 +183,7 @@ module Google
174
183
  updater_proc: updater_proc,
175
184
  scopes: scopes,
176
185
  interceptors: interceptors,
177
- &Google::Cloud::Videointelligence::V1beta1::VideoIntelligenceService::Stub.method(:new)
186
+ &Google::Cloud::VideoIntelligence::V1beta1::VideoIntelligenceService::Stub.method(:new)
178
187
  )
179
188
 
180
189
  @annotate_video = Google::Gax.create_api_call(
@@ -202,14 +211,14 @@ module Google
202
211
  # videos. Supported wildcards: '*' to match 0 or more characters;
203
212
  # '?' to match 1 character. If unset, the input video should be embedded
204
213
  # in the request as `input_content`. If set, `input_content` should be unset.
205
- # @param features [Array<Google::Cloud::Videointelligence::V1beta1::Feature>]
214
+ # @param features [Array<Google::Cloud::VideoIntelligence::V1beta1::Feature>]
206
215
  # Requested video annotation features.
207
216
  # @param input_content [String]
208
217
  # The video data bytes. Encoding: base64. If unset, the input video(s)
209
218
  # should be specified via `input_uri`. If set, `input_uri` should be unset.
210
- # @param video_context [Google::Cloud::Videointelligence::V1beta1::VideoContext | Hash]
219
+ # @param video_context [Google::Cloud::VideoIntelligence::V1beta1::VideoContext | Hash]
211
220
  # Additional video context and/or feature-specific parameters.
212
- # A hash of the same form as `Google::Cloud::Videointelligence::V1beta1::VideoContext`
221
+ # A hash of the same form as `Google::Cloud::VideoIntelligence::V1beta1::VideoContext`
213
222
  # can also be provided.
214
223
  # @param output_uri [String]
215
224
  # Optional location where the output (in JSON format) should be stored.
@@ -278,12 +287,12 @@ module Google
278
287
  output_uri: output_uri,
279
288
  location_id: location_id
280
289
  }.delete_if { |_, v| v.nil? }
281
- req = Google::Gax::to_proto(req, Google::Cloud::Videointelligence::V1beta1::AnnotateVideoRequest)
290
+ req = Google::Gax::to_proto(req, Google::Cloud::VideoIntelligence::V1beta1::AnnotateVideoRequest)
282
291
  operation = Google::Gax::Operation.new(
283
292
  @annotate_video.call(req, options),
284
293
  @operations_client,
285
- Google::Cloud::Videointelligence::V1beta1::AnnotateVideoResponse,
286
- Google::Cloud::Videointelligence::V1beta1::AnnotateVideoProgress,
294
+ Google::Cloud::VideoIntelligence::V1beta1::AnnotateVideoResponse,
295
+ Google::Cloud::VideoIntelligence::V1beta1::AnnotateVideoProgress,
287
296
  call_options: options
288
297
  )
289
298
  operation.on_done { |operation| yield(operation) } if block_given?
@@ -109,6 +109,10 @@ module Google
109
109
  # The default timeout, in seconds, for calls made through this client.
110
110
  # @param metadata [Hash]
111
111
  # Default metadata to be sent with each request. This can be overridden on a per call basis.
112
+ # @param service_address [String]
113
+ # Override for the service hostname, or `nil` to leave as the default.
114
+ # @param service_port [Integer]
115
+ # Override for the service port, or `nil` to leave as the default.
112
116
  # @param exception_transformer [Proc]
113
117
  # An optional proc that intercepts any exceptions raised during an API call to inject
114
118
  # custom error handling.
@@ -118,6 +122,8 @@ module Google
118
122
  client_config: nil,
119
123
  timeout: nil,
120
124
  metadata: nil,
125
+ service_address: nil,
126
+ service_port: nil,
121
127
  exception_transformer: nil,
122
128
  lib_name: nil,
123
129
  lib_version: nil
@@ -129,6 +135,8 @@ module Google
129
135
  metadata: metadata,
130
136
  exception_transformer: exception_transformer,
131
137
  lib_name: lib_name,
138
+ service_address: service_address,
139
+ service_port: service_port,
132
140
  lib_version: lib_version
133
141
  }.select { |_, v| v != nil }
134
142
  Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceServiceClient.new(**kwargs)
@@ -15,7 +15,7 @@
15
15
 
16
16
  module Google
17
17
  module Cloud
18
- module Videointelligence
18
+ module VideoIntelligence
19
19
  module V1beta2
20
20
  # Video annotation request.
21
21
  # @!attribute [rw] input_uri
@@ -36,10 +36,10 @@ module Google
36
36
  # If unset, the input video(s) should be specified via `input_uri`.
37
37
  # If set, `input_uri` should be unset.
38
38
  # @!attribute [rw] features
39
- # @return [Array<Google::Cloud::Videointelligence::V1beta2::Feature>]
39
+ # @return [Array<Google::Cloud::VideoIntelligence::V1beta2::Feature>]
40
40
  # Requested video annotation features.
41
41
  # @!attribute [rw] video_context
42
- # @return [Google::Cloud::Videointelligence::V1beta2::VideoContext]
42
+ # @return [Google::Cloud::VideoIntelligence::V1beta2::VideoContext]
43
43
  # Additional video context and/or feature-specific parameters.
44
44
  # @!attribute [rw] output_uri
45
45
  # @return [String]
@@ -58,27 +58,27 @@ module Google
58
58
 
59
59
  # Video context and/or feature-specific parameters.
60
60
  # @!attribute [rw] segments
61
- # @return [Array<Google::Cloud::Videointelligence::V1beta2::VideoSegment>]
61
+ # @return [Array<Google::Cloud::VideoIntelligence::V1beta2::VideoSegment>]
62
62
  # Video segments to annotate. The segments may overlap and are not required
63
63
  # to be contiguous or span the whole video. If unspecified, each video
64
64
  # is treated as a single segment.
65
65
  # @!attribute [rw] label_detection_config
66
- # @return [Google::Cloud::Videointelligence::V1beta2::LabelDetectionConfig]
66
+ # @return [Google::Cloud::VideoIntelligence::V1beta2::LabelDetectionConfig]
67
67
  # Config for LABEL_DETECTION.
68
68
  # @!attribute [rw] shot_change_detection_config
69
- # @return [Google::Cloud::Videointelligence::V1beta2::ShotChangeDetectionConfig]
69
+ # @return [Google::Cloud::VideoIntelligence::V1beta2::ShotChangeDetectionConfig]
70
70
  # Config for SHOT_CHANGE_DETECTION.
71
71
  # @!attribute [rw] explicit_content_detection_config
72
- # @return [Google::Cloud::Videointelligence::V1beta2::ExplicitContentDetectionConfig]
72
+ # @return [Google::Cloud::VideoIntelligence::V1beta2::ExplicitContentDetectionConfig]
73
73
  # Config for EXPLICIT_CONTENT_DETECTION.
74
74
  # @!attribute [rw] face_detection_config
75
- # @return [Google::Cloud::Videointelligence::V1beta2::FaceDetectionConfig]
75
+ # @return [Google::Cloud::VideoIntelligence::V1beta2::FaceDetectionConfig]
76
76
  # Config for FACE_DETECTION.
77
77
  class VideoContext; end
78
78
 
79
79
  # Config for LABEL_DETECTION.
80
80
  # @!attribute [rw] label_detection_mode
81
- # @return [Google::Cloud::Videointelligence::V1beta2::LabelDetectionMode]
81
+ # @return [Google::Cloud::VideoIntelligence::V1beta2::LabelDetectionMode]
82
82
  # What labels should be detected with LABEL_DETECTION, in addition to
83
83
  # video-level labels or segment-level labels.
84
84
  # If unspecified, defaults to `SHOT_MODE`.
@@ -134,7 +134,7 @@ module Google
134
134
 
135
135
  # Video segment level annotation results for label detection.
136
136
  # @!attribute [rw] segment
137
- # @return [Google::Cloud::Videointelligence::V1beta2::VideoSegment]
137
+ # @return [Google::Cloud::VideoIntelligence::V1beta2::VideoSegment]
138
138
  # Video segment where a label was detected.
139
139
  # @!attribute [rw] confidence
140
140
  # @return [Float]
@@ -167,19 +167,19 @@ module Google
167
167
 
168
168
  # Label annotation.
169
169
  # @!attribute [rw] entity
170
- # @return [Google::Cloud::Videointelligence::V1beta2::Entity]
170
+ # @return [Google::Cloud::VideoIntelligence::V1beta2::Entity]
171
171
  # Detected entity.
172
172
  # @!attribute [rw] category_entities
173
- # @return [Array<Google::Cloud::Videointelligence::V1beta2::Entity>]
173
+ # @return [Array<Google::Cloud::VideoIntelligence::V1beta2::Entity>]
174
174
  # Common categories for the detected entity.
175
175
  # E.g. when the label is `Terrier` the category is likely `dog`. And in some
176
176
  # cases there might be more than one categories e.g. `Terrier` could also be
177
177
  # a `pet`.
178
178
  # @!attribute [rw] segments
179
- # @return [Array<Google::Cloud::Videointelligence::V1beta2::LabelSegment>]
179
+ # @return [Array<Google::Cloud::VideoIntelligence::V1beta2::LabelSegment>]
180
180
  # All video segments where a label was detected.
181
181
  # @!attribute [rw] frames
182
- # @return [Array<Google::Cloud::Videointelligence::V1beta2::LabelFrame>]
182
+ # @return [Array<Google::Cloud::VideoIntelligence::V1beta2::LabelFrame>]
183
183
  # All video frames where a label was detected.
184
184
  class LabelAnnotation; end
185
185
 
@@ -189,7 +189,7 @@ module Google
189
189
  # Time-offset, relative to the beginning of the video, corresponding to the
190
190
  # video frame for this location.
191
191
  # @!attribute [rw] pornography_likelihood
192
- # @return [Google::Cloud::Videointelligence::V1beta2::Likelihood]
192
+ # @return [Google::Cloud::VideoIntelligence::V1beta2::Likelihood]
193
193
  # Likelihood of the pornography content..
194
194
  class ExplicitContentFrame; end
195
195
 
@@ -197,7 +197,7 @@ module Google
197
197
  # If no explicit content has been detected in a frame, no annotations are
198
198
  # present for that frame.
199
199
  # @!attribute [rw] frames
200
- # @return [Array<Google::Cloud::Videointelligence::V1beta2::ExplicitContentFrame>]
200
+ # @return [Array<Google::Cloud::VideoIntelligence::V1beta2::ExplicitContentFrame>]
201
201
  # All video frames where explicit content was detected.
202
202
  class ExplicitContentAnnotation; end
203
203
 
@@ -220,13 +220,13 @@ module Google
220
220
 
221
221
  # Video segment level annotation results for face detection.
222
222
  # @!attribute [rw] segment
223
- # @return [Google::Cloud::Videointelligence::V1beta2::VideoSegment]
223
+ # @return [Google::Cloud::VideoIntelligence::V1beta2::VideoSegment]
224
224
  # Video segment where a face was detected.
225
225
  class FaceSegment; end
226
226
 
227
227
  # Video frame level annotation results for face detection.
228
228
  # @!attribute [rw] normalized_bounding_boxes
229
- # @return [Array<Google::Cloud::Videointelligence::V1beta2::NormalizedBoundingBox>]
229
+ # @return [Array<Google::Cloud::VideoIntelligence::V1beta2::NormalizedBoundingBox>]
230
230
  # Normalized Bounding boxes in a frame.
231
231
  # There can be more than one boxes if the same face is detected in multiple
232
232
  # locations within the current frame.
@@ -241,10 +241,10 @@ module Google
241
241
  # @return [String]
242
242
  # Thumbnail of a representative face view (in JPEG format).
243
243
  # @!attribute [rw] segments
244
- # @return [Array<Google::Cloud::Videointelligence::V1beta2::FaceSegment>]
244
+ # @return [Array<Google::Cloud::VideoIntelligence::V1beta2::FaceSegment>]
245
245
  # All video segments where a face was detected.
246
246
  # @!attribute [rw] frames
247
- # @return [Array<Google::Cloud::Videointelligence::V1beta2::FaceFrame>]
247
+ # @return [Array<Google::Cloud::VideoIntelligence::V1beta2::FaceFrame>]
248
248
  # All video frames where a face was detected.
249
249
  class FaceAnnotation; end
250
250
 
@@ -254,25 +254,25 @@ module Google
254
254
  # Video file location in
255
255
  # [Google Cloud Storage](https://cloud.google.com/storage/).
256
256
  # @!attribute [rw] segment_label_annotations
257
- # @return [Array<Google::Cloud::Videointelligence::V1beta2::LabelAnnotation>]
257
+ # @return [Array<Google::Cloud::VideoIntelligence::V1beta2::LabelAnnotation>]
258
258
  # Label annotations on video level or user specified segment level.
259
259
  # There is exactly one element for each unique label.
260
260
  # @!attribute [rw] shot_label_annotations
261
- # @return [Array<Google::Cloud::Videointelligence::V1beta2::LabelAnnotation>]
261
+ # @return [Array<Google::Cloud::VideoIntelligence::V1beta2::LabelAnnotation>]
262
262
  # Label annotations on shot level.
263
263
  # There is exactly one element for each unique label.
264
264
  # @!attribute [rw] frame_label_annotations
265
- # @return [Array<Google::Cloud::Videointelligence::V1beta2::LabelAnnotation>]
265
+ # @return [Array<Google::Cloud::VideoIntelligence::V1beta2::LabelAnnotation>]
266
266
  # Label annotations on frame level.
267
267
  # There is exactly one element for each unique label.
268
268
  # @!attribute [rw] face_annotations
269
- # @return [Array<Google::Cloud::Videointelligence::V1beta2::FaceAnnotation>]
269
+ # @return [Array<Google::Cloud::VideoIntelligence::V1beta2::FaceAnnotation>]
270
270
  # Face annotations. There is exactly one element for each unique face.
271
271
  # @!attribute [rw] shot_annotations
272
- # @return [Array<Google::Cloud::Videointelligence::V1beta2::VideoSegment>]
272
+ # @return [Array<Google::Cloud::VideoIntelligence::V1beta2::VideoSegment>]
273
273
  # Shot annotations. Each shot is represented as a video segment.
274
274
  # @!attribute [rw] explicit_annotation
275
- # @return [Google::Cloud::Videointelligence::V1beta2::ExplicitContentAnnotation]
275
+ # @return [Google::Cloud::VideoIntelligence::V1beta2::ExplicitContentAnnotation]
276
276
  # Explicit content annotation.
277
277
  # @!attribute [rw] error
278
278
  # @return [Google::Rpc::Status]
@@ -284,7 +284,7 @@ module Google
284
284
  # field of the `Operation` returned by the `GetOperation`
285
285
  # call of the `google::longrunning::Operations` service.
286
286
  # @!attribute [rw] annotation_results
287
- # @return [Array<Google::Cloud::Videointelligence::V1beta2::VideoAnnotationResults>]
287
+ # @return [Array<Google::Cloud::VideoIntelligence::V1beta2::VideoAnnotationResults>]
288
288
  # Annotation results for all videos specified in `AnnotateVideoRequest`.
289
289
  class AnnotateVideoResponse; end
290
290
 
@@ -309,7 +309,7 @@ module Google
309
309
  # field of the `Operation` returned by the `GetOperation`
310
310
  # call of the `google::longrunning::Operations` service.
311
311
  # @!attribute [rw] annotation_progress
312
- # @return [Array<Google::Cloud::Videointelligence::V1beta2::VideoAnnotationProgress>]
312
+ # @return [Array<Google::Cloud::VideoIntelligence::V1beta2::VideoAnnotationProgress>]
313
313
  # Progress metadata for all videos specified in `AnnotateVideoRequest`.
314
314
  class AnnotateVideoProgress; end
315
315
 
@@ -38,7 +38,7 @@ module Google
38
38
  # Service that implements Google Cloud Video Intelligence API.
39
39
  #
40
40
  # @!attribute [r] video_intelligence_service_stub
41
- # @return [Google::Cloud::Videointelligence::V1beta2::VideoIntelligenceService::Stub]
41
+ # @return [Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Stub]
42
42
  class VideoIntelligenceServiceClient
43
43
  # @private
44
44
  attr_reader :video_intelligence_service_stub
@@ -92,6 +92,10 @@ module Google
92
92
  # The default timeout, in seconds, for calls made through this client.
93
93
  # @param metadata [Hash]
94
94
  # Default metadata to be sent with each request. This can be overridden on a per call basis.
95
+ # @param service_address [String]
96
+ # Override for the service hostname, or `nil` to leave as the default.
97
+ # @param service_port [Integer]
98
+ # Override for the service port, or `nil` to leave as the default.
95
99
  # @param exception_transformer [Proc]
96
100
  # An optional proc that intercepts any exceptions raised during an API call to inject
97
101
  # custom error handling.
@@ -101,6 +105,8 @@ module Google
101
105
  client_config: {},
102
106
  timeout: DEFAULT_TIMEOUT,
103
107
  metadata: nil,
108
+ service_address: nil,
109
+ service_port: nil,
104
110
  exception_transformer: nil,
105
111
  lib_name: nil,
106
112
  lib_version: ""
@@ -118,7 +124,10 @@ module Google
118
124
  client_config: client_config,
119
125
  timeout: timeout,
120
126
  lib_name: lib_name,
127
+ service_address: service_address,
128
+ service_port: service_port,
121
129
  lib_version: lib_version,
130
+ metadata: metadata,
122
131
  )
123
132
 
124
133
  if credentials.is_a?(String) || credentials.is_a?(Hash)
@@ -163,8 +172,8 @@ module Google
163
172
  end
164
173
 
165
174
  # Allow overriding the service path/port in subclasses.
166
- service_path = self.class::SERVICE_ADDRESS
167
- port = self.class::DEFAULT_SERVICE_PORT
175
+ service_path = service_address || self.class::SERVICE_ADDRESS
176
+ port = service_port || self.class::DEFAULT_SERVICE_PORT
168
177
  interceptors = self.class::GRPC_INTERCEPTORS
169
178
  @video_intelligence_service_stub = Google::Gax::Grpc.create_stub(
170
179
  service_path,
@@ -174,7 +183,7 @@ module Google
174
183
  updater_proc: updater_proc,
175
184
  scopes: scopes,
176
185
  interceptors: interceptors,
177
- &Google::Cloud::Videointelligence::V1beta2::VideoIntelligenceService::Stub.method(:new)
186
+ &Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Stub.method(:new)
178
187
  )
179
188
 
180
189
  @annotate_video = Google::Gax.create_api_call(
@@ -206,11 +215,11 @@ module Google
206
215
  # The video data bytes.
207
216
  # If unset, the input video(s) should be specified via `input_uri`.
208
217
  # If set, `input_uri` should be unset.
209
- # @param features [Array<Google::Cloud::Videointelligence::V1beta2::Feature>]
218
+ # @param features [Array<Google::Cloud::VideoIntelligence::V1beta2::Feature>]
210
219
  # Requested video annotation features.
211
- # @param video_context [Google::Cloud::Videointelligence::V1beta2::VideoContext | Hash]
220
+ # @param video_context [Google::Cloud::VideoIntelligence::V1beta2::VideoContext | Hash]
212
221
  # Additional video context and/or feature-specific parameters.
213
- # A hash of the same form as `Google::Cloud::Videointelligence::V1beta2::VideoContext`
222
+ # A hash of the same form as `Google::Cloud::VideoIntelligence::V1beta2::VideoContext`
214
223
  # can also be provided.
215
224
  # @param output_uri [String]
216
225
  # Optional location where the output (in JSON format) should be stored.
@@ -279,12 +288,12 @@ module Google
279
288
  output_uri: output_uri,
280
289
  location_id: location_id
281
290
  }.delete_if { |_, v| v.nil? }
282
- req = Google::Gax::to_proto(req, Google::Cloud::Videointelligence::V1beta2::AnnotateVideoRequest)
291
+ req = Google::Gax::to_proto(req, Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest)
283
292
  operation = Google::Gax::Operation.new(
284
293
  @annotate_video.call(req, options),
285
294
  @operations_client,
286
- Google::Cloud::Videointelligence::V1beta2::AnnotateVideoResponse,
287
- Google::Cloud::Videointelligence::V1beta2::AnnotateVideoProgress,
295
+ Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoResponse,
296
+ Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoProgress,
288
297
  call_options: options
289
298
  )
290
299
  operation.on_done { |operation| yield(operation) } if block_given?