google-cloud-video_intelligence 2.0.3 → 3.0.2

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 (55) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +2 -1
  3. data/AUTHENTICATION.md +51 -59
  4. data/LICENSE.md +203 -0
  5. data/MIGRATING.md +274 -0
  6. data/README.md +36 -62
  7. data/lib/{google/cloud/video_intelligence/credentials.rb → google-cloud-video_intelligence.rb} +5 -13
  8. data/lib/google/cloud/video_intelligence.rb +87 -156
  9. data/lib/google/cloud/video_intelligence/version.rb +6 -2
  10. metadata +99 -83
  11. data/LICENSE +0 -201
  12. data/lib/google/cloud/video_intelligence/v1.rb +0 -186
  13. data/lib/google/cloud/video_intelligence/v1/credentials.rb +0 -41
  14. data/lib/google/cloud/video_intelligence/v1/doc/google/cloud/videointelligence/v1/video_intelligence.rb +0 -707
  15. data/lib/google/cloud/video_intelligence/v1/doc/google/longrunning/operations.rb +0 -51
  16. data/lib/google/cloud/video_intelligence/v1/doc/google/protobuf/any.rb +0 -131
  17. data/lib/google/cloud/video_intelligence/v1/doc/google/protobuf/duration.rb +0 -91
  18. data/lib/google/cloud/video_intelligence/v1/doc/google/rpc/status.rb +0 -39
  19. data/lib/google/cloud/video_intelligence/v1/video_intelligence_service_client.rb +0 -306
  20. data/lib/google/cloud/video_intelligence/v1/video_intelligence_service_client_config.json +0 -31
  21. data/lib/google/cloud/video_intelligence/v1beta2.rb +0 -149
  22. data/lib/google/cloud/video_intelligence/v1beta2/credentials.rb +0 -41
  23. data/lib/google/cloud/video_intelligence/v1beta2/doc/google/cloud/videointelligence/v1beta2/video_intelligence.rb +0 -372
  24. data/lib/google/cloud/video_intelligence/v1beta2/doc/google/longrunning/operations.rb +0 -51
  25. data/lib/google/cloud/video_intelligence/v1beta2/doc/google/protobuf/any.rb +0 -131
  26. data/lib/google/cloud/video_intelligence/v1beta2/doc/google/protobuf/duration.rb +0 -91
  27. data/lib/google/cloud/video_intelligence/v1beta2/doc/google/rpc/status.rb +0 -39
  28. data/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service_client.rb +0 -306
  29. data/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service_client_config.json +0 -31
  30. data/lib/google/cloud/video_intelligence/v1p1beta1.rb +0 -187
  31. data/lib/google/cloud/video_intelligence/v1p1beta1/credentials.rb +0 -41
  32. data/lib/google/cloud/video_intelligence/v1p1beta1/doc/google/cloud/videointelligence/v1p1beta1/video_intelligence.rb +0 -410
  33. data/lib/google/cloud/video_intelligence/v1p1beta1/doc/google/longrunning/operations.rb +0 -51
  34. data/lib/google/cloud/video_intelligence/v1p1beta1/doc/google/protobuf/any.rb +0 -131
  35. data/lib/google/cloud/video_intelligence/v1p1beta1/doc/google/protobuf/duration.rb +0 -91
  36. data/lib/google/cloud/video_intelligence/v1p1beta1/doc/google/rpc/status.rb +0 -39
  37. data/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service_client.rb +0 -306
  38. data/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service_client_config.json +0 -31
  39. data/lib/google/cloud/video_intelligence/v1p2beta1.rb +0 -187
  40. data/lib/google/cloud/video_intelligence/v1p2beta1/credentials.rb +0 -41
  41. data/lib/google/cloud/video_intelligence/v1p2beta1/doc/google/cloud/videointelligence/v1p2beta1/video_intelligence.rb +0 -442
  42. data/lib/google/cloud/video_intelligence/v1p2beta1/doc/google/longrunning/operations.rb +0 -51
  43. data/lib/google/cloud/video_intelligence/v1p2beta1/doc/google/protobuf/any.rb +0 -131
  44. data/lib/google/cloud/video_intelligence/v1p2beta1/doc/google/protobuf/duration.rb +0 -91
  45. data/lib/google/cloud/video_intelligence/v1p2beta1/doc/google/rpc/status.rb +0 -39
  46. data/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service_client.rb +0 -306
  47. data/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service_client_config.json +0 -31
  48. data/lib/google/cloud/videointelligence/v1/video_intelligence_pb.rb +0 -270
  49. data/lib/google/cloud/videointelligence/v1/video_intelligence_services_pb.rb +0 -51
  50. data/lib/google/cloud/videointelligence/v1beta2/video_intelligence_pb.rb +0 -170
  51. data/lib/google/cloud/videointelligence/v1beta2/video_intelligence_services_pb.rb +0 -51
  52. data/lib/google/cloud/videointelligence/v1p1beta1/video_intelligence_pb.rb +0 -172
  53. data/lib/google/cloud/videointelligence/v1p1beta1/video_intelligence_services_pb.rb +0 -51
  54. data/lib/google/cloud/videointelligence/v1p2beta1/video_intelligence_pb.rb +0 -193
  55. data/lib/google/cloud/videointelligence/v1p2beta1/video_intelligence_services_pb.rb +0 -51
@@ -1,31 +0,0 @@
1
- {
2
- "interfaces": {
3
- "google.cloud.videointelligence.v1.VideoIntelligenceService": {
4
- "retry_codes": {
5
- "idempotent": [
6
- "DEADLINE_EXCEEDED",
7
- "UNAVAILABLE"
8
- ],
9
- "non_idempotent": []
10
- },
11
- "retry_params": {
12
- "default": {
13
- "initial_retry_delay_millis": 100,
14
- "retry_delay_multiplier": 1.3,
15
- "max_retry_delay_millis": 60000,
16
- "initial_rpc_timeout_millis": 20000,
17
- "rpc_timeout_multiplier": 1.0,
18
- "max_rpc_timeout_millis": 20000,
19
- "total_timeout_millis": 600000
20
- }
21
- },
22
- "methods": {
23
- "AnnotateVideo": {
24
- "timeout_millis": 60000,
25
- "retry_codes_name": "non_idempotent",
26
- "retry_params_name": "default"
27
- }
28
- }
29
- }
30
- }
31
- }
@@ -1,149 +0,0 @@
1
- # Copyright 2020 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
- # https://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
-
15
-
16
- require "google/cloud/video_intelligence/v1beta2/video_intelligence_service_client"
17
- require "google/cloud/videointelligence/v1beta2/video_intelligence_pb"
18
- require "google/rpc/status_pb"
19
-
20
- module Google
21
- module Cloud
22
- module VideoIntelligence
23
- # rubocop:disable LineLength
24
-
25
- ##
26
- # # Ruby Client for Google Cloud Video Intelligence API ([GA](https://github.com/googleapis/google-cloud-ruby#versioning))
27
- #
28
- # [Google Cloud Video Intelligence API][Product Documentation]:
29
- # Detects objects, explicit content, and scene changes in videos. It also
30
- # specifies the region for annotation and transcribes speech to text.
31
- # Supports both asynchronous API and streaming API.
32
- # - [Product Documentation][]
33
- #
34
- # ## Quick Start
35
- # In order to use this library, you first need to go through the following
36
- # steps:
37
- #
38
- # 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
39
- # 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
40
- # 3. [Enable the Google Cloud Video Intelligence API.](https://console.cloud.google.com/apis/library/videointelligence.googleapis.com)
41
- # 4. [Setup Authentication.](https://googleapis.dev/ruby/google-cloud-video_intelligence/latest/file.AUTHENTICATION.html)
42
- #
43
- # ### Installation
44
- # ```
45
- # $ gem install google-cloud-video_intelligence
46
- # ```
47
- #
48
- # ### Next Steps
49
- # - Read the [Google Cloud Video Intelligence API Product documentation][Product Documentation]
50
- # to learn more about the product and see How-to Guides.
51
- # - View this [repository's main README](https://github.com/googleapis/google-cloud-ruby/blob/master/README.md)
52
- # to see the full list of Cloud APIs that we cover.
53
- #
54
- # [Product Documentation]: https://cloud.google.com/video-intelligence
55
- #
56
- # ## Enabling Logging
57
- #
58
- # To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
59
- # The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
60
- # or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
61
- # that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
62
- # and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
63
- #
64
- # Configuring a Ruby stdlib logger:
65
- #
66
- # ```ruby
67
- # require "logger"
68
- #
69
- # module MyLogger
70
- # LOGGER = Logger.new $stderr, level: Logger::WARN
71
- # def logger
72
- # LOGGER
73
- # end
74
- # end
75
- #
76
- # # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
77
- # module GRPC
78
- # extend MyLogger
79
- # end
80
- # ```
81
- #
82
- module V1beta2
83
- # rubocop:enable LineLength
84
-
85
- ##
86
- # Service that implements Google Cloud Video Intelligence API.
87
- #
88
- # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
89
- # Provides the means for authenticating requests made by the client. This parameter can
90
- # be many types.
91
- # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
92
- # authenticating requests made by this client.
93
- # A `String` will be treated as the path to the keyfile to be used for the construction of
94
- # credentials for this client.
95
- # A `Hash` will be treated as the contents of a keyfile to be used for the construction of
96
- # credentials for this client.
97
- # A `GRPC::Core::Channel` will be used to make calls through.
98
- # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
99
- # should already be composed with a `GRPC::Core::CallCredentials` object.
100
- # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
101
- # metadata for requests, generally, to give OAuth credentials.
102
- # @param scopes [Array<String>]
103
- # The OAuth scopes for this service. This parameter is ignored if
104
- # an updater_proc is supplied.
105
- # @param client_config [Hash]
106
- # A Hash for call options for each method. See
107
- # Google::Gax#construct_settings for the structure of
108
- # this data. Falls back to the default config if not specified
109
- # or the specified config is missing data points.
110
- # @param timeout [Numeric]
111
- # The default timeout, in seconds, for calls made through this client.
112
- # @param metadata [Hash]
113
- # Default metadata to be sent with each request. This can be overridden on a per call basis.
114
- # @param service_address [String]
115
- # Override for the service hostname, or `nil` to leave as the default.
116
- # @param service_port [Integer]
117
- # Override for the service port, or `nil` to leave as the default.
118
- # @param exception_transformer [Proc]
119
- # An optional proc that intercepts any exceptions raised during an API call to inject
120
- # custom error handling.
121
- def self.new \
122
- credentials: nil,
123
- scopes: nil,
124
- client_config: nil,
125
- timeout: nil,
126
- metadata: nil,
127
- service_address: nil,
128
- service_port: nil,
129
- exception_transformer: nil,
130
- lib_name: nil,
131
- lib_version: nil
132
- kwargs = {
133
- credentials: credentials,
134
- scopes: scopes,
135
- client_config: client_config,
136
- timeout: timeout,
137
- metadata: metadata,
138
- exception_transformer: exception_transformer,
139
- lib_name: lib_name,
140
- service_address: service_address,
141
- service_port: service_port,
142
- lib_version: lib_version
143
- }.select { |_, v| v != nil }
144
- Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceServiceClient.new(**kwargs)
145
- end
146
- end
147
- end
148
- end
149
- end
@@ -1,41 +0,0 @@
1
- # Copyright 2020 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
- # https://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
-
15
-
16
- require "googleauth"
17
-
18
- module Google
19
- module Cloud
20
- module VideoIntelligence
21
- module V1beta2
22
- class Credentials < Google::Auth::Credentials
23
- SCOPE = [
24
- "https://www.googleapis.com/auth/cloud-platform"
25
- ].freeze
26
- PATH_ENV_VARS = %w(VIDEO_INTELLIGENCE_CREDENTIALS
27
- VIDEO_INTELLIGENCE_KEYFILE
28
- GOOGLE_CLOUD_CREDENTIALS
29
- GOOGLE_CLOUD_KEYFILE
30
- GCLOUD_KEYFILE)
31
- JSON_ENV_VARS = %w(VIDEO_INTELLIGENCE_CREDENTIALS_JSON
32
- VIDEO_INTELLIGENCE_KEYFILE_JSON
33
- GOOGLE_CLOUD_CREDENTIALS_JSON
34
- GOOGLE_CLOUD_KEYFILE_JSON
35
- GCLOUD_KEYFILE_JSON)
36
- DEFAULT_PATHS = ["~/.config/gcloud/application_default_credentials.json"]
37
- end
38
- end
39
- end
40
- end
41
- end
@@ -1,372 +0,0 @@
1
- # Copyright 2020 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
- # https://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
-
15
-
16
- module Google
17
- module Cloud
18
- module VideoIntelligence
19
- module V1beta2
20
- # Video annotation request.
21
- # @!attribute [rw] input_uri
22
- # @return [String]
23
- # Input video location. Currently, only
24
- # [Google Cloud Storage](https://cloud.google.com/storage/) URIs are
25
- # supported, which must be specified in the following format:
26
- # `gs://bucket-id/object-id` (other URI formats return
27
- # {Google::Rpc::Code::INVALID_ARGUMENT}). For
28
- # more information, see [Request URIs](https://cloud.google.com/storage/docs/reference-uris). A video
29
- # URI may include wildcards in `object-id`, and thus identify multiple
30
- # videos. Supported wildcards: '*' to match 0 or more characters;
31
- # '?' to match 1 character. If unset, the input video should be embedded
32
- # in the request as `input_content`. If set, `input_content` should be unset.
33
- # @!attribute [rw] input_content
34
- # @return [String]
35
- # The video data bytes.
36
- # If unset, the input video(s) should be specified via `input_uri`.
37
- # If set, `input_uri` should be unset.
38
- # @!attribute [rw] features
39
- # @return [Array<Google::Cloud::VideoIntelligence::V1beta2::Feature>]
40
- # Required. Requested video annotation features.
41
- # @!attribute [rw] video_context
42
- # @return [Google::Cloud::VideoIntelligence::V1beta2::VideoContext]
43
- # Additional video context and/or feature-specific parameters.
44
- # @!attribute [rw] output_uri
45
- # @return [String]
46
- # Optional. Location where the output (in JSON format) should be stored.
47
- # Currently, only [Google Cloud Storage](https://cloud.google.com/storage/)
48
- # URIs are supported, which must be specified in the following format:
49
- # `gs://bucket-id/object-id` (other URI formats return
50
- # {Google::Rpc::Code::INVALID_ARGUMENT}). For
51
- # more information, see [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
52
- # @!attribute [rw] location_id
53
- # @return [String]
54
- # Optional. Cloud region where annotation should take place. Supported cloud
55
- # regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region
56
- # is specified, a region will be determined based on video file location.
57
- class AnnotateVideoRequest; end
58
-
59
- # Video context and/or feature-specific parameters.
60
- # @!attribute [rw] segments
61
- # @return [Array<Google::Cloud::VideoIntelligence::V1beta2::VideoSegment>]
62
- # Video segments to annotate. The segments may overlap and are not required
63
- # to be contiguous or span the whole video. If unspecified, each video is
64
- # treated as a single segment.
65
- # @!attribute [rw] label_detection_config
66
- # @return [Google::Cloud::VideoIntelligence::V1beta2::LabelDetectionConfig]
67
- # Config for LABEL_DETECTION.
68
- # @!attribute [rw] shot_change_detection_config
69
- # @return [Google::Cloud::VideoIntelligence::V1beta2::ShotChangeDetectionConfig]
70
- # Config for SHOT_CHANGE_DETECTION.
71
- # @!attribute [rw] explicit_content_detection_config
72
- # @return [Google::Cloud::VideoIntelligence::V1beta2::ExplicitContentDetectionConfig]
73
- # Config for EXPLICIT_CONTENT_DETECTION.
74
- # @!attribute [rw] face_detection_config
75
- # @return [Google::Cloud::VideoIntelligence::V1beta2::FaceDetectionConfig]
76
- # Config for FACE_DETECTION.
77
- class VideoContext; end
78
-
79
- # Config for LABEL_DETECTION.
80
- # @!attribute [rw] label_detection_mode
81
- # @return [Google::Cloud::VideoIntelligence::V1beta2::LabelDetectionMode]
82
- # What labels should be detected with LABEL_DETECTION, in addition to
83
- # video-level labels or segment-level labels.
84
- # If unspecified, defaults to `SHOT_MODE`.
85
- # @!attribute [rw] stationary_camera
86
- # @return [true, false]
87
- # Whether the video has been shot from a stationary (i.e. non-moving) camera.
88
- # When set to true, might improve detection accuracy for moving objects.
89
- # Should be used with `SHOT_AND_FRAME_MODE` enabled.
90
- # @!attribute [rw] model
91
- # @return [String]
92
- # Model to use for label detection.
93
- # Supported values: "builtin/stable" (the default if unset) and
94
- # "builtin/latest".
95
- class LabelDetectionConfig; end
96
-
97
- # Config for SHOT_CHANGE_DETECTION.
98
- # @!attribute [rw] model
99
- # @return [String]
100
- # Model to use for shot change detection.
101
- # Supported values: "builtin/stable" (the default if unset) and
102
- # "builtin/latest".
103
- class ShotChangeDetectionConfig; end
104
-
105
- # Config for EXPLICIT_CONTENT_DETECTION.
106
- # @!attribute [rw] model
107
- # @return [String]
108
- # Model to use for explicit content detection.
109
- # Supported values: "builtin/stable" (the default if unset) and
110
- # "builtin/latest".
111
- class ExplicitContentDetectionConfig; end
112
-
113
- # Config for FACE_DETECTION.
114
- # @!attribute [rw] model
115
- # @return [String]
116
- # Model to use for face detection.
117
- # Supported values: "builtin/stable" (the default if unset) and
118
- # "builtin/latest".
119
- # @!attribute [rw] include_bounding_boxes
120
- # @return [true, false]
121
- # Whether bounding boxes be included in the face annotation output.
122
- class FaceDetectionConfig; end
123
-
124
- # Video segment.
125
- # @!attribute [rw] start_time_offset
126
- # @return [Google::Protobuf::Duration]
127
- # Time-offset, relative to the beginning of the video,
128
- # corresponding to the start of the segment (inclusive).
129
- # @!attribute [rw] end_time_offset
130
- # @return [Google::Protobuf::Duration]
131
- # Time-offset, relative to the beginning of the video,
132
- # corresponding to the end of the segment (inclusive).
133
- class VideoSegment; end
134
-
135
- # Video segment level annotation results for label detection.
136
- # @!attribute [rw] segment
137
- # @return [Google::Cloud::VideoIntelligence::V1beta2::VideoSegment]
138
- # Video segment where a label was detected.
139
- # @!attribute [rw] confidence
140
- # @return [Float]
141
- # Confidence that the label is accurate. Range: [0, 1].
142
- class LabelSegment; end
143
-
144
- # Video frame level annotation results for label detection.
145
- # @!attribute [rw] time_offset
146
- # @return [Google::Protobuf::Duration]
147
- # Time-offset, relative to the beginning of the video, corresponding to the
148
- # video frame for this location.
149
- # @!attribute [rw] confidence
150
- # @return [Float]
151
- # Confidence that the label is accurate. Range: [0, 1].
152
- class LabelFrame; end
153
-
154
- # Detected entity from video analysis.
155
- # @!attribute [rw] entity_id
156
- # @return [String]
157
- # Opaque entity ID. Some IDs may be available in
158
- # [Google Knowledge Graph Search
159
- # API](https://developers.google.com/knowledge-graph/).
160
- # @!attribute [rw] description
161
- # @return [String]
162
- # Textual description, e.g. `Fixed-gear bicycle`.
163
- # @!attribute [rw] language_code
164
- # @return [String]
165
- # Language code for `description` in BCP-47 format.
166
- class Entity; end
167
-
168
- # Label annotation.
169
- # @!attribute [rw] entity
170
- # @return [Google::Cloud::VideoIntelligence::V1beta2::Entity]
171
- # Detected entity.
172
- # @!attribute [rw] category_entities
173
- # @return [Array<Google::Cloud::VideoIntelligence::V1beta2::Entity>]
174
- # Common categories for the detected entity.
175
- # E.g. when the label is `Terrier` the category is likely `dog`. And in some
176
- # cases there might be more than one categories e.g. `Terrier` could also be
177
- # a `pet`.
178
- # @!attribute [rw] segments
179
- # @return [Array<Google::Cloud::VideoIntelligence::V1beta2::LabelSegment>]
180
- # All video segments where a label was detected.
181
- # @!attribute [rw] frames
182
- # @return [Array<Google::Cloud::VideoIntelligence::V1beta2::LabelFrame>]
183
- # All video frames where a label was detected.
184
- class LabelAnnotation; end
185
-
186
- # Video frame level annotation results for explicit content.
187
- # @!attribute [rw] time_offset
188
- # @return [Google::Protobuf::Duration]
189
- # Time-offset, relative to the beginning of the video, corresponding to the
190
- # video frame for this location.
191
- # @!attribute [rw] pornography_likelihood
192
- # @return [Google::Cloud::VideoIntelligence::V1beta2::Likelihood]
193
- # Likelihood of the pornography content..
194
- class ExplicitContentFrame; end
195
-
196
- # Explicit content annotation (based on per-frame visual signals only).
197
- # If no explicit content has been detected in a frame, no annotations are
198
- # present for that frame.
199
- # @!attribute [rw] frames
200
- # @return [Array<Google::Cloud::VideoIntelligence::V1beta2::ExplicitContentFrame>]
201
- # All video frames where explicit content was detected.
202
- class ExplicitContentAnnotation; end
203
-
204
- # Normalized bounding box.
205
- # The normalized vertex coordinates are relative to the original image.
206
- # Range: [0, 1].
207
- # @!attribute [rw] left
208
- # @return [Float]
209
- # Left X coordinate.
210
- # @!attribute [rw] top
211
- # @return [Float]
212
- # Top Y coordinate.
213
- # @!attribute [rw] right
214
- # @return [Float]
215
- # Right X coordinate.
216
- # @!attribute [rw] bottom
217
- # @return [Float]
218
- # Bottom Y coordinate.
219
- class NormalizedBoundingBox; end
220
-
221
- # Video segment level annotation results for face detection.
222
- # @!attribute [rw] segment
223
- # @return [Google::Cloud::VideoIntelligence::V1beta2::VideoSegment]
224
- # Video segment where a face was detected.
225
- class FaceSegment; end
226
-
227
- # Video frame level annotation results for face detection.
228
- # @!attribute [rw] normalized_bounding_boxes
229
- # @return [Array<Google::Cloud::VideoIntelligence::V1beta2::NormalizedBoundingBox>]
230
- # Normalized Bounding boxes in a frame.
231
- # There can be more than one boxes if the same face is detected in multiple
232
- # locations within the current frame.
233
- # @!attribute [rw] time_offset
234
- # @return [Google::Protobuf::Duration]
235
- # Time-offset, relative to the beginning of the video,
236
- # corresponding to the video frame for this location.
237
- class FaceFrame; end
238
-
239
- # Face annotation.
240
- # @!attribute [rw] thumbnail
241
- # @return [String]
242
- # Thumbnail of a representative face view (in JPEG format).
243
- # @!attribute [rw] segments
244
- # @return [Array<Google::Cloud::VideoIntelligence::V1beta2::FaceSegment>]
245
- # All video segments where a face was detected.
246
- # @!attribute [rw] frames
247
- # @return [Array<Google::Cloud::VideoIntelligence::V1beta2::FaceFrame>]
248
- # All video frames where a face was detected.
249
- class FaceAnnotation; end
250
-
251
- # Annotation results for a single video.
252
- # @!attribute [rw] input_uri
253
- # @return [String]
254
- # Video file location in
255
- # [Google Cloud Storage](https://cloud.google.com/storage/).
256
- # @!attribute [rw] segment_label_annotations
257
- # @return [Array<Google::Cloud::VideoIntelligence::V1beta2::LabelAnnotation>]
258
- # Label annotations on video level or user specified segment level.
259
- # There is exactly one element for each unique label.
260
- # @!attribute [rw] shot_label_annotations
261
- # @return [Array<Google::Cloud::VideoIntelligence::V1beta2::LabelAnnotation>]
262
- # Label annotations on shot level.
263
- # There is exactly one element for each unique label.
264
- # @!attribute [rw] frame_label_annotations
265
- # @return [Array<Google::Cloud::VideoIntelligence::V1beta2::LabelAnnotation>]
266
- # Label annotations on frame level.
267
- # There is exactly one element for each unique label.
268
- # @!attribute [rw] face_annotations
269
- # @return [Array<Google::Cloud::VideoIntelligence::V1beta2::FaceAnnotation>]
270
- # Face annotations. There is exactly one element for each unique face.
271
- # @!attribute [rw] shot_annotations
272
- # @return [Array<Google::Cloud::VideoIntelligence::V1beta2::VideoSegment>]
273
- # Shot annotations. Each shot is represented as a video segment.
274
- # @!attribute [rw] explicit_annotation
275
- # @return [Google::Cloud::VideoIntelligence::V1beta2::ExplicitContentAnnotation]
276
- # Explicit content annotation.
277
- # @!attribute [rw] error
278
- # @return [Google::Rpc::Status]
279
- # If set, indicates an error. Note that for a single `AnnotateVideoRequest`
280
- # some videos may succeed and some may fail.
281
- class VideoAnnotationResults; end
282
-
283
- # Video annotation response. Included in the `response`
284
- # field of the `Operation` returned by the `GetOperation`
285
- # call of the `google::longrunning::Operations` service.
286
- # @!attribute [rw] annotation_results
287
- # @return [Array<Google::Cloud::VideoIntelligence::V1beta2::VideoAnnotationResults>]
288
- # Annotation results for all videos specified in `AnnotateVideoRequest`.
289
- class AnnotateVideoResponse; end
290
-
291
- # Annotation progress for a single video.
292
- # @!attribute [rw] input_uri
293
- # @return [String]
294
- # Video file location in
295
- # [Google Cloud Storage](https://cloud.google.com/storage/).
296
- # @!attribute [rw] progress_percent
297
- # @return [Integer]
298
- # Approximate percentage processed thus far.
299
- # Guaranteed to be 100 when fully processed.
300
- # @!attribute [rw] start_time
301
- # @return [Google::Protobuf::Timestamp]
302
- # Time when the request was received.
303
- # @!attribute [rw] update_time
304
- # @return [Google::Protobuf::Timestamp]
305
- # Time of the most recent update.
306
- class VideoAnnotationProgress; end
307
-
308
- # Video annotation progress. Included in the `metadata`
309
- # field of the `Operation` returned by the `GetOperation`
310
- # call of the `google::longrunning::Operations` service.
311
- # @!attribute [rw] annotation_progress
312
- # @return [Array<Google::Cloud::VideoIntelligence::V1beta2::VideoAnnotationProgress>]
313
- # Progress metadata for all videos specified in `AnnotateVideoRequest`.
314
- class AnnotateVideoProgress; end
315
-
316
- # Video annotation feature.
317
- module Feature
318
- # Unspecified.
319
- FEATURE_UNSPECIFIED = 0
320
-
321
- # Label detection. Detect objects, such as dog or flower.
322
- LABEL_DETECTION = 1
323
-
324
- # Shot change detection.
325
- SHOT_CHANGE_DETECTION = 2
326
-
327
- # Explicit content detection.
328
- EXPLICIT_CONTENT_DETECTION = 3
329
-
330
- # Human face detection and tracking.
331
- FACE_DETECTION = 4
332
- end
333
-
334
- # Label detection mode.
335
- module LabelDetectionMode
336
- # Unspecified.
337
- LABEL_DETECTION_MODE_UNSPECIFIED = 0
338
-
339
- # Detect shot-level labels.
340
- SHOT_MODE = 1
341
-
342
- # Detect frame-level labels.
343
- FRAME_MODE = 2
344
-
345
- # Detect both shot-level and frame-level labels.
346
- SHOT_AND_FRAME_MODE = 3
347
- end
348
-
349
- # Bucketized representation of likelihood.
350
- module Likelihood
351
- # Unspecified likelihood.
352
- LIKELIHOOD_UNSPECIFIED = 0
353
-
354
- # Very unlikely.
355
- VERY_UNLIKELY = 1
356
-
357
- # Unlikely.
358
- UNLIKELY = 2
359
-
360
- # Possible.
361
- POSSIBLE = 3
362
-
363
- # Likely.
364
- LIKELY = 4
365
-
366
- # Very likely.
367
- VERY_LIKELY = 5
368
- end
369
- end
370
- end
371
- end
372
- end