google-api-client 0.28.1 → 0.28.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.
- checksums.yaml +4 -4
- data/.kokoro/build.sh +1 -1
- data/CHANGELOG.md +28 -0
- data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
- data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +1 -1
- data/generated/google/apis/admin_reports_v1.rb +1 -1
- data/generated/google/apis/androidenterprise_v1.rb +1 -1
- data/generated/google/apis/androidenterprise_v1/classes.rb +9 -8
- data/generated/google/apis/androidenterprise_v1/service.rb +1 -1
- data/generated/google/apis/cloudasset_v1beta1.rb +1 -1
- data/generated/google/apis/cloudasset_v1beta1/service.rb +81 -6
- data/generated/google/apis/cloudbuild_v1alpha1.rb +1 -1
- data/generated/google/apis/cloudbuild_v1alpha1/classes.rb +3 -3
- data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1/service.rb +3 -1
- data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +3 -1
- data/generated/google/apis/cloudtasks_v2beta3.rb +1 -1
- data/generated/google/apis/cloudtasks_v2beta3/classes.rb +30 -0
- data/generated/google/apis/cloudtasks_v2beta3/representations.rb +1 -0
- data/generated/google/apis/dlp_v2.rb +1 -1
- data/generated/google/apis/dlp_v2/classes.rb +28 -0
- data/generated/google/apis/dlp_v2/representations.rb +15 -0
- data/generated/google/apis/dlp_v2/service.rb +23 -1
- data/generated/google/apis/docs_v1.rb +46 -0
- data/generated/google/apis/docs_v1/classes.rb +5383 -0
- data/generated/google/apis/docs_v1/representations.rb +2209 -0
- data/generated/google/apis/docs_v1/service.rb +176 -0
- data/generated/google/apis/file_v1.rb +1 -1
- data/generated/google/apis/file_v1/classes.rb +0 -193
- data/generated/google/apis/file_v1/representations.rb +0 -70
- data/generated/google/apis/file_v1/service.rb +0 -190
- data/generated/google/apis/iam_v1.rb +1 -1
- data/generated/google/apis/iam_v1/service.rb +8 -0
- data/generated/google/apis/jobs_v3/classes.rb +130 -3
- data/generated/google/apis/jobs_v3/representations.rb +47 -0
- data/generated/google/apis/jobs_v3/service.rb +40 -0
- data/generated/google/apis/ml_v1.rb +1 -1
- data/generated/google/apis/ml_v1/classes.rb +44 -0
- data/generated/google/apis/ml_v1/representations.rb +21 -0
- data/generated/google/apis/redis_v1.rb +1 -1
- data/generated/google/apis/redis_v1beta1.rb +1 -1
- data/generated/google/apis/redis_v1beta1/classes.rb +5 -4
- data/generated/google/apis/remotebuildexecution_v1.rb +1 -1
- data/generated/google/apis/remotebuildexecution_v1/classes.rb +3 -2
- data/generated/google/apis/remotebuildexecution_v1alpha.rb +1 -1
- data/generated/google/apis/remotebuildexecution_v1alpha/classes.rb +3 -2
- data/generated/google/apis/remotebuildexecution_v2.rb +1 -1
- data/generated/google/apis/remotebuildexecution_v2/classes.rb +3 -2
- data/generated/google/apis/storagetransfer_v1.rb +1 -1
- data/generated/google/apis/storagetransfer_v1/classes.rb +2 -0
- data/generated/google/apis/testing_v1.rb +1 -1
- data/generated/google/apis/videointelligence_v1p2beta1.rb +35 -0
- data/generated/google/apis/videointelligence_v1p2beta1/classes.rb +2872 -0
- data/generated/google/apis/videointelligence_v1p2beta1/representations.rb +1221 -0
- data/generated/google/apis/videointelligence_v1p2beta1/service.rb +93 -0
- data/generated/google/apis/vision_v1.rb +1 -1
- data/generated/google/apis/vision_v1/classes.rb +1 -1
- data/generated/google/apis/vision_v1p1beta1.rb +1 -1
- data/generated/google/apis/vision_v1p1beta1/classes.rb +1 -1
- data/generated/google/apis/vision_v1p2beta1.rb +1 -1
- data/generated/google/apis/vision_v1p2beta1/classes.rb +1 -1
- data/generated/google/apis/youtube_v3.rb +1 -1
- data/generated/google/apis/youtube_v3/classes.rb +100 -13
- data/generated/google/apis/youtube_v3/representations.rb +38 -1
- data/lib/google/apis/core/http_command.rb +9 -1
- data/lib/google/apis/version.rb +1 -1
- metadata +10 -3
- data/.travis.yml +0 -26
@@ -139,6 +139,46 @@ module Google
|
|
139
139
|
execute_or_queue_command(command, &block)
|
140
140
|
end
|
141
141
|
|
142
|
+
# Report events issued when end user interacts with customer's application
|
143
|
+
# that uses Cloud Talent Solution. You may inspect the created events in
|
144
|
+
# [self service
|
145
|
+
# tools](https://console.cloud.google.com/talent-solution/overview).
|
146
|
+
# [Learn
|
147
|
+
# more](https://cloud.google.com/talent-solution/job-search/docs/management-
|
148
|
+
# tools)
|
149
|
+
# about self service tools.
|
150
|
+
# @param [String] parent
|
151
|
+
# Parent project name.
|
152
|
+
# @param [Google::Apis::JobsV3::CreateClientEventRequest] create_client_event_request_object
|
153
|
+
# @param [String] fields
|
154
|
+
# Selector specifying which fields to include in a partial response.
|
155
|
+
# @param [String] quota_user
|
156
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
157
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
158
|
+
# @param [Google::Apis::RequestOptions] options
|
159
|
+
# Request-specific options
|
160
|
+
#
|
161
|
+
# @yield [result, err] Result & error if block supplied
|
162
|
+
# @yieldparam result [Google::Apis::JobsV3::ClientEvent] parsed result object
|
163
|
+
# @yieldparam err [StandardError] error object if request failed
|
164
|
+
#
|
165
|
+
# @return [Google::Apis::JobsV3::ClientEvent]
|
166
|
+
#
|
167
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
168
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
169
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
170
|
+
def create_client_event(parent, create_client_event_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
171
|
+
command = make_simple_command(:post, 'v3/{+parent}/clientEvents', options)
|
172
|
+
command.request_representation = Google::Apis::JobsV3::CreateClientEventRequest::Representation
|
173
|
+
command.request_object = create_client_event_request_object
|
174
|
+
command.response_representation = Google::Apis::JobsV3::ClientEvent::Representation
|
175
|
+
command.response_class = Google::Apis::JobsV3::ClientEvent
|
176
|
+
command.params['parent'] = parent unless parent.nil?
|
177
|
+
command.query['fields'] = fields unless fields.nil?
|
178
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
179
|
+
execute_or_queue_command(command, &block)
|
180
|
+
end
|
181
|
+
|
142
182
|
# Creates a new company entity.
|
143
183
|
# @param [String] parent
|
144
184
|
# Required.
|
@@ -25,7 +25,7 @@ module Google
|
|
25
25
|
# @see https://cloud.google.com/ml/
|
26
26
|
module MlV1
|
27
27
|
VERSION = 'V1'
|
28
|
-
REVISION = '
|
28
|
+
REVISION = '20190126'
|
29
29
|
|
30
30
|
# View and manage your data across Google Cloud Platform services
|
31
31
|
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
@@ -1079,6 +1079,32 @@ module Google
|
|
1079
1079
|
end
|
1080
1080
|
end
|
1081
1081
|
|
1082
|
+
# Represents the configration for a replica in a cluster.
|
1083
|
+
class GoogleCloudMlV1ReplicaConfig
|
1084
|
+
include Google::Apis::Core::Hashable
|
1085
|
+
|
1086
|
+
# Represents a hardware accelerator request config.
|
1087
|
+
# Corresponds to the JSON property `acceleratorConfig`
|
1088
|
+
# @return [Google::Apis::MlV1::GoogleCloudMlV1AcceleratorConfig]
|
1089
|
+
attr_accessor :accelerator_config
|
1090
|
+
|
1091
|
+
# The docker image to run on worker.
|
1092
|
+
# This image must be in Google Container Registry.
|
1093
|
+
# Corresponds to the JSON property `imageUri`
|
1094
|
+
# @return [String]
|
1095
|
+
attr_accessor :image_uri
|
1096
|
+
|
1097
|
+
def initialize(**args)
|
1098
|
+
update!(**args)
|
1099
|
+
end
|
1100
|
+
|
1101
|
+
# Update properties of this object
|
1102
|
+
def update!(**args)
|
1103
|
+
@accelerator_config = args[:accelerator_config] if args.key?(:accelerator_config)
|
1104
|
+
@image_uri = args[:image_uri] if args.key?(:image_uri)
|
1105
|
+
end
|
1106
|
+
end
|
1107
|
+
|
1082
1108
|
# Request message for the SetDefaultVersion request.
|
1083
1109
|
class GoogleCloudMlV1SetDefaultVersionRequest
|
1084
1110
|
include Google::Apis::Core::Hashable
|
@@ -1120,6 +1146,11 @@ module Google
|
|
1120
1146
|
# @return [String]
|
1121
1147
|
attr_accessor :job_dir
|
1122
1148
|
|
1149
|
+
# Represents the configration for a replica in a cluster.
|
1150
|
+
# Corresponds to the JSON property `masterConfig`
|
1151
|
+
# @return [Google::Apis::MlV1::GoogleCloudMlV1ReplicaConfig]
|
1152
|
+
attr_accessor :master_config
|
1153
|
+
|
1123
1154
|
# Optional. Specifies the type of virtual machine to use for your training
|
1124
1155
|
# job's master worker.
|
1125
1156
|
# The following types are supported:
|
@@ -1217,6 +1248,11 @@ module Google
|
|
1217
1248
|
# @return [Array<String>]
|
1218
1249
|
attr_accessor :package_uris
|
1219
1250
|
|
1251
|
+
# Represents the configration for a replica in a cluster.
|
1252
|
+
# Corresponds to the JSON property `parameterServerConfig`
|
1253
|
+
# @return [Google::Apis::MlV1::GoogleCloudMlV1ReplicaConfig]
|
1254
|
+
attr_accessor :parameter_server_config
|
1255
|
+
|
1220
1256
|
# Optional. The number of parameter server replicas to use for the training
|
1221
1257
|
# job. Each replica in the cluster will be of the type specified in
|
1222
1258
|
# `parameter_server_type`.
|
@@ -1273,6 +1309,11 @@ module Google
|
|
1273
1309
|
# @return [String]
|
1274
1310
|
attr_accessor :scale_tier
|
1275
1311
|
|
1312
|
+
# Represents the configration for a replica in a cluster.
|
1313
|
+
# Corresponds to the JSON property `workerConfig`
|
1314
|
+
# @return [Google::Apis::MlV1::GoogleCloudMlV1ReplicaConfig]
|
1315
|
+
attr_accessor :worker_config
|
1316
|
+
|
1276
1317
|
# Optional. The number of worker replicas to use for the training job. Each
|
1277
1318
|
# replica in the cluster will be of the type specified in `worker_type`.
|
1278
1319
|
# This value can only be used when `scale_tier` is set to `CUSTOM`. If you
|
@@ -1301,8 +1342,10 @@ module Google
|
|
1301
1342
|
@args = args[:args] if args.key?(:args)
|
1302
1343
|
@hyperparameters = args[:hyperparameters] if args.key?(:hyperparameters)
|
1303
1344
|
@job_dir = args[:job_dir] if args.key?(:job_dir)
|
1345
|
+
@master_config = args[:master_config] if args.key?(:master_config)
|
1304
1346
|
@master_type = args[:master_type] if args.key?(:master_type)
|
1305
1347
|
@package_uris = args[:package_uris] if args.key?(:package_uris)
|
1348
|
+
@parameter_server_config = args[:parameter_server_config] if args.key?(:parameter_server_config)
|
1306
1349
|
@parameter_server_count = args[:parameter_server_count] if args.key?(:parameter_server_count)
|
1307
1350
|
@parameter_server_type = args[:parameter_server_type] if args.key?(:parameter_server_type)
|
1308
1351
|
@python_module = args[:python_module] if args.key?(:python_module)
|
@@ -1310,6 +1353,7 @@ module Google
|
|
1310
1353
|
@region = args[:region] if args.key?(:region)
|
1311
1354
|
@runtime_version = args[:runtime_version] if args.key?(:runtime_version)
|
1312
1355
|
@scale_tier = args[:scale_tier] if args.key?(:scale_tier)
|
1356
|
+
@worker_config = args[:worker_config] if args.key?(:worker_config)
|
1313
1357
|
@worker_count = args[:worker_count] if args.key?(:worker_count)
|
1314
1358
|
@worker_type = args[:worker_type] if args.key?(:worker_type)
|
1315
1359
|
end
|
@@ -160,6 +160,12 @@ module Google
|
|
160
160
|
include Google::Apis::Core::JsonObjectSupport
|
161
161
|
end
|
162
162
|
|
163
|
+
class GoogleCloudMlV1ReplicaConfig
|
164
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
165
|
+
|
166
|
+
include Google::Apis::Core::JsonObjectSupport
|
167
|
+
end
|
168
|
+
|
163
169
|
class GoogleCloudMlV1SetDefaultVersionRequest
|
164
170
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
165
171
|
|
@@ -502,6 +508,15 @@ module Google
|
|
502
508
|
end
|
503
509
|
end
|
504
510
|
|
511
|
+
class GoogleCloudMlV1ReplicaConfig
|
512
|
+
# @private
|
513
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
514
|
+
property :accelerator_config, as: 'acceleratorConfig', class: Google::Apis::MlV1::GoogleCloudMlV1AcceleratorConfig, decorator: Google::Apis::MlV1::GoogleCloudMlV1AcceleratorConfig::Representation
|
515
|
+
|
516
|
+
property :image_uri, as: 'imageUri'
|
517
|
+
end
|
518
|
+
end
|
519
|
+
|
505
520
|
class GoogleCloudMlV1SetDefaultVersionRequest
|
506
521
|
# @private
|
507
522
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -515,8 +530,12 @@ module Google
|
|
515
530
|
property :hyperparameters, as: 'hyperparameters', class: Google::Apis::MlV1::GoogleCloudMlV1HyperparameterSpec, decorator: Google::Apis::MlV1::GoogleCloudMlV1HyperparameterSpec::Representation
|
516
531
|
|
517
532
|
property :job_dir, as: 'jobDir'
|
533
|
+
property :master_config, as: 'masterConfig', class: Google::Apis::MlV1::GoogleCloudMlV1ReplicaConfig, decorator: Google::Apis::MlV1::GoogleCloudMlV1ReplicaConfig::Representation
|
534
|
+
|
518
535
|
property :master_type, as: 'masterType'
|
519
536
|
collection :package_uris, as: 'packageUris'
|
537
|
+
property :parameter_server_config, as: 'parameterServerConfig', class: Google::Apis::MlV1::GoogleCloudMlV1ReplicaConfig, decorator: Google::Apis::MlV1::GoogleCloudMlV1ReplicaConfig::Representation
|
538
|
+
|
520
539
|
property :parameter_server_count, :numeric_string => true, as: 'parameterServerCount'
|
521
540
|
property :parameter_server_type, as: 'parameterServerType'
|
522
541
|
property :python_module, as: 'pythonModule'
|
@@ -524,6 +543,8 @@ module Google
|
|
524
543
|
property :region, as: 'region'
|
525
544
|
property :runtime_version, as: 'runtimeVersion'
|
526
545
|
property :scale_tier, as: 'scaleTier'
|
546
|
+
property :worker_config, as: 'workerConfig', class: Google::Apis::MlV1::GoogleCloudMlV1ReplicaConfig, decorator: Google::Apis::MlV1::GoogleCloudMlV1ReplicaConfig::Representation
|
547
|
+
|
527
548
|
property :worker_count, :numeric_string => true, as: 'workerCount'
|
528
549
|
property :worker_type, as: 'workerType'
|
529
550
|
end
|
@@ -25,7 +25,7 @@ module Google
|
|
25
25
|
# @see https://cloud.google.com/memorystore/docs/redis/
|
26
26
|
module RedisV1
|
27
27
|
VERSION = 'V1'
|
28
|
-
REVISION = '
|
28
|
+
REVISION = '20190128'
|
29
29
|
|
30
30
|
# View and manage your data across Google Cloud Platform services
|
31
31
|
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
@@ -25,7 +25,7 @@ module Google
|
|
25
25
|
# @see https://cloud.google.com/memorystore/docs/redis/
|
26
26
|
module RedisV1beta1
|
27
27
|
VERSION = 'V1beta1'
|
28
|
-
REVISION = '
|
28
|
+
REVISION = '20190128'
|
29
29
|
|
30
30
|
# View and manage your data across Google Cloud Platform services
|
31
31
|
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
@@ -214,10 +214,11 @@ module Google
|
|
214
214
|
# @return [String]
|
215
215
|
attr_accessor :name
|
216
216
|
|
217
|
-
# Output only. IAM identity used by import / export operations to
|
218
|
-
# data to/from
|
219
|
-
# value may change over time
|
220
|
-
# each import/export
|
217
|
+
# Output only. Cloud IAM identity used by import / export operations to
|
218
|
+
# transfer data to/from Cloud Storage. Format is
|
219
|
+
# "serviceAccount:<service_account_email>". The value may change over time
|
220
|
+
# for a given instance so should be checked before each import/export
|
221
|
+
# operation.
|
221
222
|
# Corresponds to the JSON property `persistenceIamIdentity`
|
222
223
|
# @return [String]
|
223
224
|
attr_accessor :persistence_iam_identity
|
@@ -25,7 +25,7 @@ module Google
|
|
25
25
|
# @see https://cloud.google.com/remote-build-execution/docs/
|
26
26
|
module RemotebuildexecutionV1
|
27
27
|
VERSION = 'V1'
|
28
|
-
REVISION = '
|
28
|
+
REVISION = '20190122'
|
29
29
|
|
30
30
|
# View and manage your data across Google Cloud Platform services
|
31
31
|
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
@@ -1894,9 +1894,10 @@ module Google
|
|
1894
1894
|
# @return [String]
|
1895
1895
|
attr_accessor :disk_type
|
1896
1896
|
|
1897
|
-
# Required. Machine type of the worker, such as n1-standard-2
|
1897
|
+
# Required. Machine type of the worker, such as `n1-standard-2`.
|
1898
1898
|
# See https://cloud.google.com/compute/docs/machine-types for a list of
|
1899
|
-
# supported machine types.
|
1899
|
+
# supported machine types. Note that `f1-micro` and `g1-small` are not yet
|
1900
|
+
# supported.
|
1900
1901
|
# Corresponds to the JSON property `machineType`
|
1901
1902
|
# @return [String]
|
1902
1903
|
attr_accessor :machine_type
|
@@ -25,7 +25,7 @@ module Google
|
|
25
25
|
# @see https://cloud.google.com/remote-build-execution/docs/
|
26
26
|
module RemotebuildexecutionV1alpha
|
27
27
|
VERSION = 'V1alpha'
|
28
|
-
REVISION = '
|
28
|
+
REVISION = '20190122'
|
29
29
|
|
30
30
|
# View and manage your data across Google Cloud Platform services
|
31
31
|
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
@@ -1875,9 +1875,10 @@ module Google
|
|
1875
1875
|
# @return [String]
|
1876
1876
|
attr_accessor :disk_type
|
1877
1877
|
|
1878
|
-
# Required. Machine type of the worker, such as n1-standard-2
|
1878
|
+
# Required. Machine type of the worker, such as `n1-standard-2`.
|
1879
1879
|
# See https://cloud.google.com/compute/docs/machine-types for a list of
|
1880
|
-
# supported machine types.
|
1880
|
+
# supported machine types. Note that `f1-micro` and `g1-small` are not yet
|
1881
|
+
# supported.
|
1881
1882
|
# Corresponds to the JSON property `machineType`
|
1882
1883
|
# @return [String]
|
1883
1884
|
attr_accessor :machine_type
|
@@ -25,7 +25,7 @@ module Google
|
|
25
25
|
# @see https://cloud.google.com/remote-build-execution/docs/
|
26
26
|
module RemotebuildexecutionV2
|
27
27
|
VERSION = 'V2'
|
28
|
-
REVISION = '
|
28
|
+
REVISION = '20190122'
|
29
29
|
|
30
30
|
# View and manage your data across Google Cloud Platform services
|
31
31
|
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
@@ -2628,9 +2628,10 @@ module Google
|
|
2628
2628
|
# @return [String]
|
2629
2629
|
attr_accessor :disk_type
|
2630
2630
|
|
2631
|
-
# Required. Machine type of the worker, such as n1-standard-2
|
2631
|
+
# Required. Machine type of the worker, such as `n1-standard-2`.
|
2632
2632
|
# See https://cloud.google.com/compute/docs/machine-types for a list of
|
2633
|
-
# supported machine types.
|
2633
|
+
# supported machine types. Note that `f1-micro` and `g1-small` are not yet
|
2634
|
+
# supported.
|
2634
2635
|
# Corresponds to the JSON property `machineType`
|
2635
2636
|
# @return [String]
|
2636
2637
|
attr_accessor :machine_type
|
@@ -26,7 +26,7 @@ module Google
|
|
26
26
|
# @see https://cloud.google.com/storage/transfer
|
27
27
|
module StoragetransferV1
|
28
28
|
VERSION = 'V1'
|
29
|
-
REVISION = '
|
29
|
+
REVISION = '20190128'
|
30
30
|
|
31
31
|
# View and manage your data across Google Cloud Platform services
|
32
32
|
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
@@ -187,6 +187,8 @@ module Google
|
|
187
187
|
attr_accessor :error_count
|
188
188
|
|
189
189
|
# Error samples.
|
190
|
+
# No more than 100 error log entries may be recorded for a given
|
191
|
+
# error code for a single task.
|
190
192
|
# Corresponds to the JSON property `errorLogEntries`
|
191
193
|
# @return [Array<Google::Apis::StoragetransferV1::ErrorLogEntry>]
|
192
194
|
attr_accessor :error_log_entries
|
@@ -26,7 +26,7 @@ module Google
|
|
26
26
|
# @see https://developers.google.com/cloud-test-lab/
|
27
27
|
module TestingV1
|
28
28
|
VERSION = 'V1'
|
29
|
-
REVISION = '
|
29
|
+
REVISION = '20190129'
|
30
30
|
|
31
31
|
# View and manage your data across Google Cloud Platform services
|
32
32
|
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# Copyright 2015 Google Inc.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'google/apis/videointelligence_v1p2beta1/service.rb'
|
16
|
+
require 'google/apis/videointelligence_v1p2beta1/classes.rb'
|
17
|
+
require 'google/apis/videointelligence_v1p2beta1/representations.rb'
|
18
|
+
|
19
|
+
module Google
|
20
|
+
module Apis
|
21
|
+
# Cloud Video Intelligence API
|
22
|
+
#
|
23
|
+
# Detects objects, explicit content, and scene changes in videos. It also
|
24
|
+
# specifies the region for annotation and transcribes speech to text.
|
25
|
+
#
|
26
|
+
# @see https://cloud.google.com/video-intelligence/docs/
|
27
|
+
module VideointelligenceV1p2beta1
|
28
|
+
VERSION = 'V1p2beta1'
|
29
|
+
REVISION = '20190122'
|
30
|
+
|
31
|
+
# View and manage your data across Google Cloud Platform services
|
32
|
+
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,2872 @@
|
|
1
|
+
# Copyright 2015 Google Inc.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module VideointelligenceV1p2beta1
|
24
|
+
|
25
|
+
# Video annotation progress. Included in the `metadata`
|
26
|
+
# field of the `Operation` returned by the `GetOperation`
|
27
|
+
# call of the `google::longrunning::Operations` service.
|
28
|
+
class GoogleCloudVideointelligenceV1AnnotateVideoProgress
|
29
|
+
include Google::Apis::Core::Hashable
|
30
|
+
|
31
|
+
# Progress metadata for all videos specified in `AnnotateVideoRequest`.
|
32
|
+
# Corresponds to the JSON property `annotationProgress`
|
33
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1VideoAnnotationProgress>]
|
34
|
+
attr_accessor :annotation_progress
|
35
|
+
|
36
|
+
def initialize(**args)
|
37
|
+
update!(**args)
|
38
|
+
end
|
39
|
+
|
40
|
+
# Update properties of this object
|
41
|
+
def update!(**args)
|
42
|
+
@annotation_progress = args[:annotation_progress] if args.key?(:annotation_progress)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# Video annotation response. Included in the `response`
|
47
|
+
# field of the `Operation` returned by the `GetOperation`
|
48
|
+
# call of the `google::longrunning::Operations` service.
|
49
|
+
class GoogleCloudVideointelligenceV1AnnotateVideoResponse
|
50
|
+
include Google::Apis::Core::Hashable
|
51
|
+
|
52
|
+
# Annotation results for all videos specified in `AnnotateVideoRequest`.
|
53
|
+
# Corresponds to the JSON property `annotationResults`
|
54
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1VideoAnnotationResults>]
|
55
|
+
attr_accessor :annotation_results
|
56
|
+
|
57
|
+
def initialize(**args)
|
58
|
+
update!(**args)
|
59
|
+
end
|
60
|
+
|
61
|
+
# Update properties of this object
|
62
|
+
def update!(**args)
|
63
|
+
@annotation_results = args[:annotation_results] if args.key?(:annotation_results)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
# Detected entity from video analysis.
|
68
|
+
class GoogleCloudVideointelligenceV1Entity
|
69
|
+
include Google::Apis::Core::Hashable
|
70
|
+
|
71
|
+
# Textual description, e.g. `Fixed-gear bicycle`.
|
72
|
+
# Corresponds to the JSON property `description`
|
73
|
+
# @return [String]
|
74
|
+
attr_accessor :description
|
75
|
+
|
76
|
+
# Opaque entity ID. Some IDs may be available in
|
77
|
+
# [Google Knowledge Graph Search
|
78
|
+
# API](https://developers.google.com/knowledge-graph/).
|
79
|
+
# Corresponds to the JSON property `entityId`
|
80
|
+
# @return [String]
|
81
|
+
attr_accessor :entity_id
|
82
|
+
|
83
|
+
# Language code for `description` in BCP-47 format.
|
84
|
+
# Corresponds to the JSON property `languageCode`
|
85
|
+
# @return [String]
|
86
|
+
attr_accessor :language_code
|
87
|
+
|
88
|
+
def initialize(**args)
|
89
|
+
update!(**args)
|
90
|
+
end
|
91
|
+
|
92
|
+
# Update properties of this object
|
93
|
+
def update!(**args)
|
94
|
+
@description = args[:description] if args.key?(:description)
|
95
|
+
@entity_id = args[:entity_id] if args.key?(:entity_id)
|
96
|
+
@language_code = args[:language_code] if args.key?(:language_code)
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
# Explicit content annotation (based on per-frame visual signals only).
|
101
|
+
# If no explicit content has been detected in a frame, no annotations are
|
102
|
+
# present for that frame.
|
103
|
+
class GoogleCloudVideointelligenceV1ExplicitContentAnnotation
|
104
|
+
include Google::Apis::Core::Hashable
|
105
|
+
|
106
|
+
# All video frames where explicit content was detected.
|
107
|
+
# Corresponds to the JSON property `frames`
|
108
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1ExplicitContentFrame>]
|
109
|
+
attr_accessor :frames
|
110
|
+
|
111
|
+
def initialize(**args)
|
112
|
+
update!(**args)
|
113
|
+
end
|
114
|
+
|
115
|
+
# Update properties of this object
|
116
|
+
def update!(**args)
|
117
|
+
@frames = args[:frames] if args.key?(:frames)
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
# Video frame level annotation results for explicit content.
|
122
|
+
class GoogleCloudVideointelligenceV1ExplicitContentFrame
|
123
|
+
include Google::Apis::Core::Hashable
|
124
|
+
|
125
|
+
# Likelihood of the pornography content..
|
126
|
+
# Corresponds to the JSON property `pornographyLikelihood`
|
127
|
+
# @return [String]
|
128
|
+
attr_accessor :pornography_likelihood
|
129
|
+
|
130
|
+
# Time-offset, relative to the beginning of the video, corresponding to the
|
131
|
+
# video frame for this location.
|
132
|
+
# Corresponds to the JSON property `timeOffset`
|
133
|
+
# @return [String]
|
134
|
+
attr_accessor :time_offset
|
135
|
+
|
136
|
+
def initialize(**args)
|
137
|
+
update!(**args)
|
138
|
+
end
|
139
|
+
|
140
|
+
# Update properties of this object
|
141
|
+
def update!(**args)
|
142
|
+
@pornography_likelihood = args[:pornography_likelihood] if args.key?(:pornography_likelihood)
|
143
|
+
@time_offset = args[:time_offset] if args.key?(:time_offset)
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
# Label annotation.
|
148
|
+
class GoogleCloudVideointelligenceV1LabelAnnotation
|
149
|
+
include Google::Apis::Core::Hashable
|
150
|
+
|
151
|
+
# Common categories for the detected entity.
|
152
|
+
# E.g. when the label is `Terrier` the category is likely `dog`. And in some
|
153
|
+
# cases there might be more than one categories e.g. `Terrier` could also be
|
154
|
+
# a `pet`.
|
155
|
+
# Corresponds to the JSON property `categoryEntities`
|
156
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1Entity>]
|
157
|
+
attr_accessor :category_entities
|
158
|
+
|
159
|
+
# Detected entity from video analysis.
|
160
|
+
# Corresponds to the JSON property `entity`
|
161
|
+
# @return [Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1Entity]
|
162
|
+
attr_accessor :entity
|
163
|
+
|
164
|
+
# All video frames where a label was detected.
|
165
|
+
# Corresponds to the JSON property `frames`
|
166
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1LabelFrame>]
|
167
|
+
attr_accessor :frames
|
168
|
+
|
169
|
+
# All video segments where a label was detected.
|
170
|
+
# Corresponds to the JSON property `segments`
|
171
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1LabelSegment>]
|
172
|
+
attr_accessor :segments
|
173
|
+
|
174
|
+
def initialize(**args)
|
175
|
+
update!(**args)
|
176
|
+
end
|
177
|
+
|
178
|
+
# Update properties of this object
|
179
|
+
def update!(**args)
|
180
|
+
@category_entities = args[:category_entities] if args.key?(:category_entities)
|
181
|
+
@entity = args[:entity] if args.key?(:entity)
|
182
|
+
@frames = args[:frames] if args.key?(:frames)
|
183
|
+
@segments = args[:segments] if args.key?(:segments)
|
184
|
+
end
|
185
|
+
end
|
186
|
+
|
187
|
+
# Video frame level annotation results for label detection.
|
188
|
+
class GoogleCloudVideointelligenceV1LabelFrame
|
189
|
+
include Google::Apis::Core::Hashable
|
190
|
+
|
191
|
+
# Confidence that the label is accurate. Range: [0, 1].
|
192
|
+
# Corresponds to the JSON property `confidence`
|
193
|
+
# @return [Float]
|
194
|
+
attr_accessor :confidence
|
195
|
+
|
196
|
+
# Time-offset, relative to the beginning of the video, corresponding to the
|
197
|
+
# video frame for this location.
|
198
|
+
# Corresponds to the JSON property `timeOffset`
|
199
|
+
# @return [String]
|
200
|
+
attr_accessor :time_offset
|
201
|
+
|
202
|
+
def initialize(**args)
|
203
|
+
update!(**args)
|
204
|
+
end
|
205
|
+
|
206
|
+
# Update properties of this object
|
207
|
+
def update!(**args)
|
208
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
209
|
+
@time_offset = args[:time_offset] if args.key?(:time_offset)
|
210
|
+
end
|
211
|
+
end
|
212
|
+
|
213
|
+
# Video segment level annotation results for label detection.
|
214
|
+
class GoogleCloudVideointelligenceV1LabelSegment
|
215
|
+
include Google::Apis::Core::Hashable
|
216
|
+
|
217
|
+
# Confidence that the label is accurate. Range: [0, 1].
|
218
|
+
# Corresponds to the JSON property `confidence`
|
219
|
+
# @return [Float]
|
220
|
+
attr_accessor :confidence
|
221
|
+
|
222
|
+
# Video segment.
|
223
|
+
# Corresponds to the JSON property `segment`
|
224
|
+
# @return [Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1VideoSegment]
|
225
|
+
attr_accessor :segment
|
226
|
+
|
227
|
+
def initialize(**args)
|
228
|
+
update!(**args)
|
229
|
+
end
|
230
|
+
|
231
|
+
# Update properties of this object
|
232
|
+
def update!(**args)
|
233
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
234
|
+
@segment = args[:segment] if args.key?(:segment)
|
235
|
+
end
|
236
|
+
end
|
237
|
+
|
238
|
+
# Alternative hypotheses (a.k.a. n-best list).
|
239
|
+
class GoogleCloudVideointelligenceV1SpeechRecognitionAlternative
|
240
|
+
include Google::Apis::Core::Hashable
|
241
|
+
|
242
|
+
# The confidence estimate between 0.0 and 1.0. A higher number
|
243
|
+
# indicates an estimated greater likelihood that the recognized words are
|
244
|
+
# correct. This field is typically provided only for the top hypothesis, and
|
245
|
+
# only for `is_final=true` results. Clients should not rely on the
|
246
|
+
# `confidence` field as it is not guaranteed to be accurate or consistent.
|
247
|
+
# The default of 0.0 is a sentinel value indicating `confidence` was not set.
|
248
|
+
# Corresponds to the JSON property `confidence`
|
249
|
+
# @return [Float]
|
250
|
+
attr_accessor :confidence
|
251
|
+
|
252
|
+
# Transcript text representing the words that the user spoke.
|
253
|
+
# Corresponds to the JSON property `transcript`
|
254
|
+
# @return [String]
|
255
|
+
attr_accessor :transcript
|
256
|
+
|
257
|
+
# A list of word-specific information for each recognized word.
|
258
|
+
# Corresponds to the JSON property `words`
|
259
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1WordInfo>]
|
260
|
+
attr_accessor :words
|
261
|
+
|
262
|
+
def initialize(**args)
|
263
|
+
update!(**args)
|
264
|
+
end
|
265
|
+
|
266
|
+
# Update properties of this object
|
267
|
+
def update!(**args)
|
268
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
269
|
+
@transcript = args[:transcript] if args.key?(:transcript)
|
270
|
+
@words = args[:words] if args.key?(:words)
|
271
|
+
end
|
272
|
+
end
|
273
|
+
|
274
|
+
# A speech recognition result corresponding to a portion of the audio.
|
275
|
+
class GoogleCloudVideointelligenceV1SpeechTranscription
|
276
|
+
include Google::Apis::Core::Hashable
|
277
|
+
|
278
|
+
# May contain one or more recognition hypotheses (up to the maximum specified
|
279
|
+
# in `max_alternatives`). These alternatives are ordered in terms of
|
280
|
+
# accuracy, with the top (first) alternative being the most probable, as
|
281
|
+
# ranked by the recognizer.
|
282
|
+
# Corresponds to the JSON property `alternatives`
|
283
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1SpeechRecognitionAlternative>]
|
284
|
+
attr_accessor :alternatives
|
285
|
+
|
286
|
+
# Output only. The
|
287
|
+
# [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the
|
288
|
+
# language in this result. This language code was detected to have the most
|
289
|
+
# likelihood of being spoken in the audio.
|
290
|
+
# Corresponds to the JSON property `languageCode`
|
291
|
+
# @return [String]
|
292
|
+
attr_accessor :language_code
|
293
|
+
|
294
|
+
def initialize(**args)
|
295
|
+
update!(**args)
|
296
|
+
end
|
297
|
+
|
298
|
+
# Update properties of this object
|
299
|
+
def update!(**args)
|
300
|
+
@alternatives = args[:alternatives] if args.key?(:alternatives)
|
301
|
+
@language_code = args[:language_code] if args.key?(:language_code)
|
302
|
+
end
|
303
|
+
end
|
304
|
+
|
305
|
+
# Annotation progress for a single video.
|
306
|
+
class GoogleCloudVideointelligenceV1VideoAnnotationProgress
|
307
|
+
include Google::Apis::Core::Hashable
|
308
|
+
|
309
|
+
# Video file location in
|
310
|
+
# [Google Cloud Storage](https://cloud.google.com/storage/).
|
311
|
+
# Corresponds to the JSON property `inputUri`
|
312
|
+
# @return [String]
|
313
|
+
attr_accessor :input_uri
|
314
|
+
|
315
|
+
# Approximate percentage processed thus far. Guaranteed to be
|
316
|
+
# 100 when fully processed.
|
317
|
+
# Corresponds to the JSON property `progressPercent`
|
318
|
+
# @return [Fixnum]
|
319
|
+
attr_accessor :progress_percent
|
320
|
+
|
321
|
+
# Time when the request was received.
|
322
|
+
# Corresponds to the JSON property `startTime`
|
323
|
+
# @return [String]
|
324
|
+
attr_accessor :start_time
|
325
|
+
|
326
|
+
# Time of the most recent update.
|
327
|
+
# Corresponds to the JSON property `updateTime`
|
328
|
+
# @return [String]
|
329
|
+
attr_accessor :update_time
|
330
|
+
|
331
|
+
def initialize(**args)
|
332
|
+
update!(**args)
|
333
|
+
end
|
334
|
+
|
335
|
+
# Update properties of this object
|
336
|
+
def update!(**args)
|
337
|
+
@input_uri = args[:input_uri] if args.key?(:input_uri)
|
338
|
+
@progress_percent = args[:progress_percent] if args.key?(:progress_percent)
|
339
|
+
@start_time = args[:start_time] if args.key?(:start_time)
|
340
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
341
|
+
end
|
342
|
+
end
|
343
|
+
|
344
|
+
# Annotation results for a single video.
|
345
|
+
class GoogleCloudVideointelligenceV1VideoAnnotationResults
|
346
|
+
include Google::Apis::Core::Hashable
|
347
|
+
|
348
|
+
# The `Status` type defines a logical error model that is suitable for different
|
349
|
+
# programming environments, including REST APIs and RPC APIs. It is used by
|
350
|
+
# [gRPC](https://github.com/grpc). The error model is designed to be:
|
351
|
+
# - Simple to use and understand for most users
|
352
|
+
# - Flexible enough to meet unexpected needs
|
353
|
+
# # Overview
|
354
|
+
# The `Status` message contains three pieces of data: error code, error message,
|
355
|
+
# and error details. The error code should be an enum value of
|
356
|
+
# google.rpc.Code, but it may accept additional error codes if needed. The
|
357
|
+
# error message should be a developer-facing English message that helps
|
358
|
+
# developers *understand* and *resolve* the error. If a localized user-facing
|
359
|
+
# error message is needed, put the localized message in the error details or
|
360
|
+
# localize it in the client. The optional error details may contain arbitrary
|
361
|
+
# information about the error. There is a predefined set of error detail types
|
362
|
+
# in the package `google.rpc` that can be used for common error conditions.
|
363
|
+
# # Language mapping
|
364
|
+
# The `Status` message is the logical representation of the error model, but it
|
365
|
+
# is not necessarily the actual wire format. When the `Status` message is
|
366
|
+
# exposed in different client libraries and different wire protocols, it can be
|
367
|
+
# mapped differently. For example, it will likely be mapped to some exceptions
|
368
|
+
# in Java, but more likely mapped to some error codes in C.
|
369
|
+
# # Other uses
|
370
|
+
# The error model and the `Status` message can be used in a variety of
|
371
|
+
# environments, either with or without APIs, to provide a
|
372
|
+
# consistent developer experience across different environments.
|
373
|
+
# Example uses of this error model include:
|
374
|
+
# - Partial errors. If a service needs to return partial errors to the client,
|
375
|
+
# it may embed the `Status` in the normal response to indicate the partial
|
376
|
+
# errors.
|
377
|
+
# - Workflow errors. A typical workflow has multiple steps. Each step may
|
378
|
+
# have a `Status` message for error reporting.
|
379
|
+
# - Batch operations. If a client uses batch request and batch response, the
|
380
|
+
# `Status` message should be used directly inside batch response, one for
|
381
|
+
# each error sub-response.
|
382
|
+
# - Asynchronous operations. If an API call embeds asynchronous operation
|
383
|
+
# results in its response, the status of those operations should be
|
384
|
+
# represented directly using the `Status` message.
|
385
|
+
# - Logging. If some API errors are stored in logs, the message `Status` could
|
386
|
+
# be used directly after any stripping needed for security/privacy reasons.
|
387
|
+
# Corresponds to the JSON property `error`
|
388
|
+
# @return [Google::Apis::VideointelligenceV1p2beta1::GoogleRpcStatus]
|
389
|
+
attr_accessor :error
|
390
|
+
|
391
|
+
# Explicit content annotation (based on per-frame visual signals only).
|
392
|
+
# If no explicit content has been detected in a frame, no annotations are
|
393
|
+
# present for that frame.
|
394
|
+
# Corresponds to the JSON property `explicitAnnotation`
|
395
|
+
# @return [Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1ExplicitContentAnnotation]
|
396
|
+
attr_accessor :explicit_annotation
|
397
|
+
|
398
|
+
# Label annotations on frame level.
|
399
|
+
# There is exactly one element for each unique label.
|
400
|
+
# Corresponds to the JSON property `frameLabelAnnotations`
|
401
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1LabelAnnotation>]
|
402
|
+
attr_accessor :frame_label_annotations
|
403
|
+
|
404
|
+
# Video file location in
|
405
|
+
# [Google Cloud Storage](https://cloud.google.com/storage/).
|
406
|
+
# Corresponds to the JSON property `inputUri`
|
407
|
+
# @return [String]
|
408
|
+
attr_accessor :input_uri
|
409
|
+
|
410
|
+
# Label annotations on video level or user specified segment level.
|
411
|
+
# There is exactly one element for each unique label.
|
412
|
+
# Corresponds to the JSON property `segmentLabelAnnotations`
|
413
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1LabelAnnotation>]
|
414
|
+
attr_accessor :segment_label_annotations
|
415
|
+
|
416
|
+
# Shot annotations. Each shot is represented as a video segment.
|
417
|
+
# Corresponds to the JSON property `shotAnnotations`
|
418
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1VideoSegment>]
|
419
|
+
attr_accessor :shot_annotations
|
420
|
+
|
421
|
+
# Label annotations on shot level.
|
422
|
+
# There is exactly one element for each unique label.
|
423
|
+
# Corresponds to the JSON property `shotLabelAnnotations`
|
424
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1LabelAnnotation>]
|
425
|
+
attr_accessor :shot_label_annotations
|
426
|
+
|
427
|
+
# Speech transcription.
|
428
|
+
# Corresponds to the JSON property `speechTranscriptions`
|
429
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1SpeechTranscription>]
|
430
|
+
attr_accessor :speech_transcriptions
|
431
|
+
|
432
|
+
def initialize(**args)
|
433
|
+
update!(**args)
|
434
|
+
end
|
435
|
+
|
436
|
+
# Update properties of this object
|
437
|
+
def update!(**args)
|
438
|
+
@error = args[:error] if args.key?(:error)
|
439
|
+
@explicit_annotation = args[:explicit_annotation] if args.key?(:explicit_annotation)
|
440
|
+
@frame_label_annotations = args[:frame_label_annotations] if args.key?(:frame_label_annotations)
|
441
|
+
@input_uri = args[:input_uri] if args.key?(:input_uri)
|
442
|
+
@segment_label_annotations = args[:segment_label_annotations] if args.key?(:segment_label_annotations)
|
443
|
+
@shot_annotations = args[:shot_annotations] if args.key?(:shot_annotations)
|
444
|
+
@shot_label_annotations = args[:shot_label_annotations] if args.key?(:shot_label_annotations)
|
445
|
+
@speech_transcriptions = args[:speech_transcriptions] if args.key?(:speech_transcriptions)
|
446
|
+
end
|
447
|
+
end
|
448
|
+
|
449
|
+
# Video segment.
|
450
|
+
class GoogleCloudVideointelligenceV1VideoSegment
|
451
|
+
include Google::Apis::Core::Hashable
|
452
|
+
|
453
|
+
# Time-offset, relative to the beginning of the video,
|
454
|
+
# corresponding to the end of the segment (inclusive).
|
455
|
+
# Corresponds to the JSON property `endTimeOffset`
|
456
|
+
# @return [String]
|
457
|
+
attr_accessor :end_time_offset
|
458
|
+
|
459
|
+
# Time-offset, relative to the beginning of the video,
|
460
|
+
# corresponding to the start of the segment (inclusive).
|
461
|
+
# Corresponds to the JSON property `startTimeOffset`
|
462
|
+
# @return [String]
|
463
|
+
attr_accessor :start_time_offset
|
464
|
+
|
465
|
+
def initialize(**args)
|
466
|
+
update!(**args)
|
467
|
+
end
|
468
|
+
|
469
|
+
# Update properties of this object
|
470
|
+
def update!(**args)
|
471
|
+
@end_time_offset = args[:end_time_offset] if args.key?(:end_time_offset)
|
472
|
+
@start_time_offset = args[:start_time_offset] if args.key?(:start_time_offset)
|
473
|
+
end
|
474
|
+
end
|
475
|
+
|
476
|
+
# Word-specific information for recognized words. Word information is only
|
477
|
+
# included in the response when certain request parameters are set, such
|
478
|
+
# as `enable_word_time_offsets`.
|
479
|
+
class GoogleCloudVideointelligenceV1WordInfo
|
480
|
+
include Google::Apis::Core::Hashable
|
481
|
+
|
482
|
+
# Output only. The confidence estimate between 0.0 and 1.0. A higher number
|
483
|
+
# indicates an estimated greater likelihood that the recognized words are
|
484
|
+
# correct. This field is set only for the top alternative.
|
485
|
+
# This field is not guaranteed to be accurate and users should not rely on it
|
486
|
+
# to be always provided.
|
487
|
+
# The default of 0.0 is a sentinel value indicating `confidence` was not set.
|
488
|
+
# Corresponds to the JSON property `confidence`
|
489
|
+
# @return [Float]
|
490
|
+
attr_accessor :confidence
|
491
|
+
|
492
|
+
# Time offset relative to the beginning of the audio, and
|
493
|
+
# corresponding to the end of the spoken word. This field is only set if
|
494
|
+
# `enable_word_time_offsets=true` and only in the top hypothesis. This is an
|
495
|
+
# experimental feature and the accuracy of the time offset can vary.
|
496
|
+
# Corresponds to the JSON property `endTime`
|
497
|
+
# @return [String]
|
498
|
+
attr_accessor :end_time
|
499
|
+
|
500
|
+
# Output only. A distinct integer value is assigned for every speaker within
|
501
|
+
# the audio. This field specifies which one of those speakers was detected to
|
502
|
+
# have spoken this word. Value ranges from 1 up to diarization_speaker_count,
|
503
|
+
# and is only set if speaker diarization is enabled.
|
504
|
+
# Corresponds to the JSON property `speakerTag`
|
505
|
+
# @return [Fixnum]
|
506
|
+
attr_accessor :speaker_tag
|
507
|
+
|
508
|
+
# Time offset relative to the beginning of the audio, and
|
509
|
+
# corresponding to the start of the spoken word. This field is only set if
|
510
|
+
# `enable_word_time_offsets=true` and only in the top hypothesis. This is an
|
511
|
+
# experimental feature and the accuracy of the time offset can vary.
|
512
|
+
# Corresponds to the JSON property `startTime`
|
513
|
+
# @return [String]
|
514
|
+
attr_accessor :start_time
|
515
|
+
|
516
|
+
# The word corresponding to this set of information.
|
517
|
+
# Corresponds to the JSON property `word`
|
518
|
+
# @return [String]
|
519
|
+
attr_accessor :word
|
520
|
+
|
521
|
+
def initialize(**args)
|
522
|
+
update!(**args)
|
523
|
+
end
|
524
|
+
|
525
|
+
# Update properties of this object
|
526
|
+
def update!(**args)
|
527
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
528
|
+
@end_time = args[:end_time] if args.key?(:end_time)
|
529
|
+
@speaker_tag = args[:speaker_tag] if args.key?(:speaker_tag)
|
530
|
+
@start_time = args[:start_time] if args.key?(:start_time)
|
531
|
+
@word = args[:word] if args.key?(:word)
|
532
|
+
end
|
533
|
+
end
|
534
|
+
|
535
|
+
# Video annotation progress. Included in the `metadata`
|
536
|
+
# field of the `Operation` returned by the `GetOperation`
|
537
|
+
# call of the `google::longrunning::Operations` service.
|
538
|
+
class GoogleCloudVideointelligenceV1beta2AnnotateVideoProgress
|
539
|
+
include Google::Apis::Core::Hashable
|
540
|
+
|
541
|
+
# Progress metadata for all videos specified in `AnnotateVideoRequest`.
|
542
|
+
# Corresponds to the JSON property `annotationProgress`
|
543
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress>]
|
544
|
+
attr_accessor :annotation_progress
|
545
|
+
|
546
|
+
def initialize(**args)
|
547
|
+
update!(**args)
|
548
|
+
end
|
549
|
+
|
550
|
+
# Update properties of this object
|
551
|
+
def update!(**args)
|
552
|
+
@annotation_progress = args[:annotation_progress] if args.key?(:annotation_progress)
|
553
|
+
end
|
554
|
+
end
|
555
|
+
|
556
|
+
# Video annotation response. Included in the `response`
|
557
|
+
# field of the `Operation` returned by the `GetOperation`
|
558
|
+
# call of the `google::longrunning::Operations` service.
|
559
|
+
class GoogleCloudVideointelligenceV1beta2AnnotateVideoResponse
|
560
|
+
include Google::Apis::Core::Hashable
|
561
|
+
|
562
|
+
# Annotation results for all videos specified in `AnnotateVideoRequest`.
|
563
|
+
# Corresponds to the JSON property `annotationResults`
|
564
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1beta2VideoAnnotationResults>]
|
565
|
+
attr_accessor :annotation_results
|
566
|
+
|
567
|
+
def initialize(**args)
|
568
|
+
update!(**args)
|
569
|
+
end
|
570
|
+
|
571
|
+
# Update properties of this object
|
572
|
+
def update!(**args)
|
573
|
+
@annotation_results = args[:annotation_results] if args.key?(:annotation_results)
|
574
|
+
end
|
575
|
+
end
|
576
|
+
|
577
|
+
# Detected entity from video analysis.
|
578
|
+
class GoogleCloudVideointelligenceV1beta2Entity
|
579
|
+
include Google::Apis::Core::Hashable
|
580
|
+
|
581
|
+
# Textual description, e.g. `Fixed-gear bicycle`.
|
582
|
+
# Corresponds to the JSON property `description`
|
583
|
+
# @return [String]
|
584
|
+
attr_accessor :description
|
585
|
+
|
586
|
+
# Opaque entity ID. Some IDs may be available in
|
587
|
+
# [Google Knowledge Graph Search
|
588
|
+
# API](https://developers.google.com/knowledge-graph/).
|
589
|
+
# Corresponds to the JSON property `entityId`
|
590
|
+
# @return [String]
|
591
|
+
attr_accessor :entity_id
|
592
|
+
|
593
|
+
# Language code for `description` in BCP-47 format.
|
594
|
+
# Corresponds to the JSON property `languageCode`
|
595
|
+
# @return [String]
|
596
|
+
attr_accessor :language_code
|
597
|
+
|
598
|
+
def initialize(**args)
|
599
|
+
update!(**args)
|
600
|
+
end
|
601
|
+
|
602
|
+
# Update properties of this object
|
603
|
+
def update!(**args)
|
604
|
+
@description = args[:description] if args.key?(:description)
|
605
|
+
@entity_id = args[:entity_id] if args.key?(:entity_id)
|
606
|
+
@language_code = args[:language_code] if args.key?(:language_code)
|
607
|
+
end
|
608
|
+
end
|
609
|
+
|
610
|
+
# Explicit content annotation (based on per-frame visual signals only).
|
611
|
+
# If no explicit content has been detected in a frame, no annotations are
|
612
|
+
# present for that frame.
|
613
|
+
class GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation
|
614
|
+
include Google::Apis::Core::Hashable
|
615
|
+
|
616
|
+
# All video frames where explicit content was detected.
|
617
|
+
# Corresponds to the JSON property `frames`
|
618
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1beta2ExplicitContentFrame>]
|
619
|
+
attr_accessor :frames
|
620
|
+
|
621
|
+
def initialize(**args)
|
622
|
+
update!(**args)
|
623
|
+
end
|
624
|
+
|
625
|
+
# Update properties of this object
|
626
|
+
def update!(**args)
|
627
|
+
@frames = args[:frames] if args.key?(:frames)
|
628
|
+
end
|
629
|
+
end
|
630
|
+
|
631
|
+
# Video frame level annotation results for explicit content.
|
632
|
+
class GoogleCloudVideointelligenceV1beta2ExplicitContentFrame
|
633
|
+
include Google::Apis::Core::Hashable
|
634
|
+
|
635
|
+
# Likelihood of the pornography content..
|
636
|
+
# Corresponds to the JSON property `pornographyLikelihood`
|
637
|
+
# @return [String]
|
638
|
+
attr_accessor :pornography_likelihood
|
639
|
+
|
640
|
+
# Time-offset, relative to the beginning of the video, corresponding to the
|
641
|
+
# video frame for this location.
|
642
|
+
# Corresponds to the JSON property `timeOffset`
|
643
|
+
# @return [String]
|
644
|
+
attr_accessor :time_offset
|
645
|
+
|
646
|
+
def initialize(**args)
|
647
|
+
update!(**args)
|
648
|
+
end
|
649
|
+
|
650
|
+
# Update properties of this object
|
651
|
+
def update!(**args)
|
652
|
+
@pornography_likelihood = args[:pornography_likelihood] if args.key?(:pornography_likelihood)
|
653
|
+
@time_offset = args[:time_offset] if args.key?(:time_offset)
|
654
|
+
end
|
655
|
+
end
|
656
|
+
|
657
|
+
# Label annotation.
|
658
|
+
class GoogleCloudVideointelligenceV1beta2LabelAnnotation
|
659
|
+
include Google::Apis::Core::Hashable
|
660
|
+
|
661
|
+
# Common categories for the detected entity.
|
662
|
+
# E.g. when the label is `Terrier` the category is likely `dog`. And in some
|
663
|
+
# cases there might be more than one categories e.g. `Terrier` could also be
|
664
|
+
# a `pet`.
|
665
|
+
# Corresponds to the JSON property `categoryEntities`
|
666
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1beta2Entity>]
|
667
|
+
attr_accessor :category_entities
|
668
|
+
|
669
|
+
# Detected entity from video analysis.
|
670
|
+
# Corresponds to the JSON property `entity`
|
671
|
+
# @return [Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1beta2Entity]
|
672
|
+
attr_accessor :entity
|
673
|
+
|
674
|
+
# All video frames where a label was detected.
|
675
|
+
# Corresponds to the JSON property `frames`
|
676
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1beta2LabelFrame>]
|
677
|
+
attr_accessor :frames
|
678
|
+
|
679
|
+
# All video segments where a label was detected.
|
680
|
+
# Corresponds to the JSON property `segments`
|
681
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1beta2LabelSegment>]
|
682
|
+
attr_accessor :segments
|
683
|
+
|
684
|
+
def initialize(**args)
|
685
|
+
update!(**args)
|
686
|
+
end
|
687
|
+
|
688
|
+
# Update properties of this object
|
689
|
+
def update!(**args)
|
690
|
+
@category_entities = args[:category_entities] if args.key?(:category_entities)
|
691
|
+
@entity = args[:entity] if args.key?(:entity)
|
692
|
+
@frames = args[:frames] if args.key?(:frames)
|
693
|
+
@segments = args[:segments] if args.key?(:segments)
|
694
|
+
end
|
695
|
+
end
|
696
|
+
|
697
|
+
# Video frame level annotation results for label detection.
|
698
|
+
class GoogleCloudVideointelligenceV1beta2LabelFrame
|
699
|
+
include Google::Apis::Core::Hashable
|
700
|
+
|
701
|
+
# Confidence that the label is accurate. Range: [0, 1].
|
702
|
+
# Corresponds to the JSON property `confidence`
|
703
|
+
# @return [Float]
|
704
|
+
attr_accessor :confidence
|
705
|
+
|
706
|
+
# Time-offset, relative to the beginning of the video, corresponding to the
|
707
|
+
# video frame for this location.
|
708
|
+
# Corresponds to the JSON property `timeOffset`
|
709
|
+
# @return [String]
|
710
|
+
attr_accessor :time_offset
|
711
|
+
|
712
|
+
def initialize(**args)
|
713
|
+
update!(**args)
|
714
|
+
end
|
715
|
+
|
716
|
+
# Update properties of this object
|
717
|
+
def update!(**args)
|
718
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
719
|
+
@time_offset = args[:time_offset] if args.key?(:time_offset)
|
720
|
+
end
|
721
|
+
end
|
722
|
+
|
723
|
+
# Video segment level annotation results for label detection.
|
724
|
+
class GoogleCloudVideointelligenceV1beta2LabelSegment
|
725
|
+
include Google::Apis::Core::Hashable
|
726
|
+
|
727
|
+
# Confidence that the label is accurate. Range: [0, 1].
|
728
|
+
# Corresponds to the JSON property `confidence`
|
729
|
+
# @return [Float]
|
730
|
+
attr_accessor :confidence
|
731
|
+
|
732
|
+
# Video segment.
|
733
|
+
# Corresponds to the JSON property `segment`
|
734
|
+
# @return [Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1beta2VideoSegment]
|
735
|
+
attr_accessor :segment
|
736
|
+
|
737
|
+
def initialize(**args)
|
738
|
+
update!(**args)
|
739
|
+
end
|
740
|
+
|
741
|
+
# Update properties of this object
|
742
|
+
def update!(**args)
|
743
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
744
|
+
@segment = args[:segment] if args.key?(:segment)
|
745
|
+
end
|
746
|
+
end
|
747
|
+
|
748
|
+
# Alternative hypotheses (a.k.a. n-best list).
|
749
|
+
class GoogleCloudVideointelligenceV1beta2SpeechRecognitionAlternative
|
750
|
+
include Google::Apis::Core::Hashable
|
751
|
+
|
752
|
+
# The confidence estimate between 0.0 and 1.0. A higher number
|
753
|
+
# indicates an estimated greater likelihood that the recognized words are
|
754
|
+
# correct. This field is typically provided only for the top hypothesis, and
|
755
|
+
# only for `is_final=true` results. Clients should not rely on the
|
756
|
+
# `confidence` field as it is not guaranteed to be accurate or consistent.
|
757
|
+
# The default of 0.0 is a sentinel value indicating `confidence` was not set.
|
758
|
+
# Corresponds to the JSON property `confidence`
|
759
|
+
# @return [Float]
|
760
|
+
attr_accessor :confidence
|
761
|
+
|
762
|
+
# Transcript text representing the words that the user spoke.
|
763
|
+
# Corresponds to the JSON property `transcript`
|
764
|
+
# @return [String]
|
765
|
+
attr_accessor :transcript
|
766
|
+
|
767
|
+
# A list of word-specific information for each recognized word.
|
768
|
+
# Corresponds to the JSON property `words`
|
769
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1beta2WordInfo>]
|
770
|
+
attr_accessor :words
|
771
|
+
|
772
|
+
def initialize(**args)
|
773
|
+
update!(**args)
|
774
|
+
end
|
775
|
+
|
776
|
+
# Update properties of this object
|
777
|
+
def update!(**args)
|
778
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
779
|
+
@transcript = args[:transcript] if args.key?(:transcript)
|
780
|
+
@words = args[:words] if args.key?(:words)
|
781
|
+
end
|
782
|
+
end
|
783
|
+
|
784
|
+
# A speech recognition result corresponding to a portion of the audio.
|
785
|
+
class GoogleCloudVideointelligenceV1beta2SpeechTranscription
|
786
|
+
include Google::Apis::Core::Hashable
|
787
|
+
|
788
|
+
# May contain one or more recognition hypotheses (up to the maximum specified
|
789
|
+
# in `max_alternatives`). These alternatives are ordered in terms of
|
790
|
+
# accuracy, with the top (first) alternative being the most probable, as
|
791
|
+
# ranked by the recognizer.
|
792
|
+
# Corresponds to the JSON property `alternatives`
|
793
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1beta2SpeechRecognitionAlternative>]
|
794
|
+
attr_accessor :alternatives
|
795
|
+
|
796
|
+
# Output only. The
|
797
|
+
# [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the
|
798
|
+
# language in this result. This language code was detected to have the most
|
799
|
+
# likelihood of being spoken in the audio.
|
800
|
+
# Corresponds to the JSON property `languageCode`
|
801
|
+
# @return [String]
|
802
|
+
attr_accessor :language_code
|
803
|
+
|
804
|
+
def initialize(**args)
|
805
|
+
update!(**args)
|
806
|
+
end
|
807
|
+
|
808
|
+
# Update properties of this object
|
809
|
+
def update!(**args)
|
810
|
+
@alternatives = args[:alternatives] if args.key?(:alternatives)
|
811
|
+
@language_code = args[:language_code] if args.key?(:language_code)
|
812
|
+
end
|
813
|
+
end
|
814
|
+
|
815
|
+
# Annotation progress for a single video.
|
816
|
+
class GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress
|
817
|
+
include Google::Apis::Core::Hashable
|
818
|
+
|
819
|
+
# Video file location in
|
820
|
+
# [Google Cloud Storage](https://cloud.google.com/storage/).
|
821
|
+
# Corresponds to the JSON property `inputUri`
|
822
|
+
# @return [String]
|
823
|
+
attr_accessor :input_uri
|
824
|
+
|
825
|
+
# Approximate percentage processed thus far. Guaranteed to be
|
826
|
+
# 100 when fully processed.
|
827
|
+
# Corresponds to the JSON property `progressPercent`
|
828
|
+
# @return [Fixnum]
|
829
|
+
attr_accessor :progress_percent
|
830
|
+
|
831
|
+
# Time when the request was received.
|
832
|
+
# Corresponds to the JSON property `startTime`
|
833
|
+
# @return [String]
|
834
|
+
attr_accessor :start_time
|
835
|
+
|
836
|
+
# Time of the most recent update.
|
837
|
+
# Corresponds to the JSON property `updateTime`
|
838
|
+
# @return [String]
|
839
|
+
attr_accessor :update_time
|
840
|
+
|
841
|
+
def initialize(**args)
|
842
|
+
update!(**args)
|
843
|
+
end
|
844
|
+
|
845
|
+
# Update properties of this object
|
846
|
+
def update!(**args)
|
847
|
+
@input_uri = args[:input_uri] if args.key?(:input_uri)
|
848
|
+
@progress_percent = args[:progress_percent] if args.key?(:progress_percent)
|
849
|
+
@start_time = args[:start_time] if args.key?(:start_time)
|
850
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
851
|
+
end
|
852
|
+
end
|
853
|
+
|
854
|
+
# Annotation results for a single video.
|
855
|
+
class GoogleCloudVideointelligenceV1beta2VideoAnnotationResults
|
856
|
+
include Google::Apis::Core::Hashable
|
857
|
+
|
858
|
+
# The `Status` type defines a logical error model that is suitable for different
|
859
|
+
# programming environments, including REST APIs and RPC APIs. It is used by
|
860
|
+
# [gRPC](https://github.com/grpc). The error model is designed to be:
|
861
|
+
# - Simple to use and understand for most users
|
862
|
+
# - Flexible enough to meet unexpected needs
|
863
|
+
# # Overview
|
864
|
+
# The `Status` message contains three pieces of data: error code, error message,
|
865
|
+
# and error details. The error code should be an enum value of
|
866
|
+
# google.rpc.Code, but it may accept additional error codes if needed. The
|
867
|
+
# error message should be a developer-facing English message that helps
|
868
|
+
# developers *understand* and *resolve* the error. If a localized user-facing
|
869
|
+
# error message is needed, put the localized message in the error details or
|
870
|
+
# localize it in the client. The optional error details may contain arbitrary
|
871
|
+
# information about the error. There is a predefined set of error detail types
|
872
|
+
# in the package `google.rpc` that can be used for common error conditions.
|
873
|
+
# # Language mapping
|
874
|
+
# The `Status` message is the logical representation of the error model, but it
|
875
|
+
# is not necessarily the actual wire format. When the `Status` message is
|
876
|
+
# exposed in different client libraries and different wire protocols, it can be
|
877
|
+
# mapped differently. For example, it will likely be mapped to some exceptions
|
878
|
+
# in Java, but more likely mapped to some error codes in C.
|
879
|
+
# # Other uses
|
880
|
+
# The error model and the `Status` message can be used in a variety of
|
881
|
+
# environments, either with or without APIs, to provide a
|
882
|
+
# consistent developer experience across different environments.
|
883
|
+
# Example uses of this error model include:
|
884
|
+
# - Partial errors. If a service needs to return partial errors to the client,
|
885
|
+
# it may embed the `Status` in the normal response to indicate the partial
|
886
|
+
# errors.
|
887
|
+
# - Workflow errors. A typical workflow has multiple steps. Each step may
|
888
|
+
# have a `Status` message for error reporting.
|
889
|
+
# - Batch operations. If a client uses batch request and batch response, the
|
890
|
+
# `Status` message should be used directly inside batch response, one for
|
891
|
+
# each error sub-response.
|
892
|
+
# - Asynchronous operations. If an API call embeds asynchronous operation
|
893
|
+
# results in its response, the status of those operations should be
|
894
|
+
# represented directly using the `Status` message.
|
895
|
+
# - Logging. If some API errors are stored in logs, the message `Status` could
|
896
|
+
# be used directly after any stripping needed for security/privacy reasons.
|
897
|
+
# Corresponds to the JSON property `error`
|
898
|
+
# @return [Google::Apis::VideointelligenceV1p2beta1::GoogleRpcStatus]
|
899
|
+
attr_accessor :error
|
900
|
+
|
901
|
+
# Explicit content annotation (based on per-frame visual signals only).
|
902
|
+
# If no explicit content has been detected in a frame, no annotations are
|
903
|
+
# present for that frame.
|
904
|
+
# Corresponds to the JSON property `explicitAnnotation`
|
905
|
+
# @return [Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation]
|
906
|
+
attr_accessor :explicit_annotation
|
907
|
+
|
908
|
+
# Label annotations on frame level.
|
909
|
+
# There is exactly one element for each unique label.
|
910
|
+
# Corresponds to the JSON property `frameLabelAnnotations`
|
911
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1beta2LabelAnnotation>]
|
912
|
+
attr_accessor :frame_label_annotations
|
913
|
+
|
914
|
+
# Video file location in
|
915
|
+
# [Google Cloud Storage](https://cloud.google.com/storage/).
|
916
|
+
# Corresponds to the JSON property `inputUri`
|
917
|
+
# @return [String]
|
918
|
+
attr_accessor :input_uri
|
919
|
+
|
920
|
+
# Label annotations on video level or user specified segment level.
|
921
|
+
# There is exactly one element for each unique label.
|
922
|
+
# Corresponds to the JSON property `segmentLabelAnnotations`
|
923
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1beta2LabelAnnotation>]
|
924
|
+
attr_accessor :segment_label_annotations
|
925
|
+
|
926
|
+
# Shot annotations. Each shot is represented as a video segment.
|
927
|
+
# Corresponds to the JSON property `shotAnnotations`
|
928
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1beta2VideoSegment>]
|
929
|
+
attr_accessor :shot_annotations
|
930
|
+
|
931
|
+
# Label annotations on shot level.
|
932
|
+
# There is exactly one element for each unique label.
|
933
|
+
# Corresponds to the JSON property `shotLabelAnnotations`
|
934
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1beta2LabelAnnotation>]
|
935
|
+
attr_accessor :shot_label_annotations
|
936
|
+
|
937
|
+
# Speech transcription.
|
938
|
+
# Corresponds to the JSON property `speechTranscriptions`
|
939
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1beta2SpeechTranscription>]
|
940
|
+
attr_accessor :speech_transcriptions
|
941
|
+
|
942
|
+
def initialize(**args)
|
943
|
+
update!(**args)
|
944
|
+
end
|
945
|
+
|
946
|
+
# Update properties of this object
|
947
|
+
def update!(**args)
|
948
|
+
@error = args[:error] if args.key?(:error)
|
949
|
+
@explicit_annotation = args[:explicit_annotation] if args.key?(:explicit_annotation)
|
950
|
+
@frame_label_annotations = args[:frame_label_annotations] if args.key?(:frame_label_annotations)
|
951
|
+
@input_uri = args[:input_uri] if args.key?(:input_uri)
|
952
|
+
@segment_label_annotations = args[:segment_label_annotations] if args.key?(:segment_label_annotations)
|
953
|
+
@shot_annotations = args[:shot_annotations] if args.key?(:shot_annotations)
|
954
|
+
@shot_label_annotations = args[:shot_label_annotations] if args.key?(:shot_label_annotations)
|
955
|
+
@speech_transcriptions = args[:speech_transcriptions] if args.key?(:speech_transcriptions)
|
956
|
+
end
|
957
|
+
end
|
958
|
+
|
959
|
+
# Video segment.
|
960
|
+
class GoogleCloudVideointelligenceV1beta2VideoSegment
|
961
|
+
include Google::Apis::Core::Hashable
|
962
|
+
|
963
|
+
# Time-offset, relative to the beginning of the video,
|
964
|
+
# corresponding to the end of the segment (inclusive).
|
965
|
+
# Corresponds to the JSON property `endTimeOffset`
|
966
|
+
# @return [String]
|
967
|
+
attr_accessor :end_time_offset
|
968
|
+
|
969
|
+
# Time-offset, relative to the beginning of the video,
|
970
|
+
# corresponding to the start of the segment (inclusive).
|
971
|
+
# Corresponds to the JSON property `startTimeOffset`
|
972
|
+
# @return [String]
|
973
|
+
attr_accessor :start_time_offset
|
974
|
+
|
975
|
+
def initialize(**args)
|
976
|
+
update!(**args)
|
977
|
+
end
|
978
|
+
|
979
|
+
# Update properties of this object
|
980
|
+
def update!(**args)
|
981
|
+
@end_time_offset = args[:end_time_offset] if args.key?(:end_time_offset)
|
982
|
+
@start_time_offset = args[:start_time_offset] if args.key?(:start_time_offset)
|
983
|
+
end
|
984
|
+
end
|
985
|
+
|
986
|
+
# Word-specific information for recognized words. Word information is only
|
987
|
+
# included in the response when certain request parameters are set, such
|
988
|
+
# as `enable_word_time_offsets`.
|
989
|
+
class GoogleCloudVideointelligenceV1beta2WordInfo
|
990
|
+
include Google::Apis::Core::Hashable
|
991
|
+
|
992
|
+
# Output only. The confidence estimate between 0.0 and 1.0. A higher number
|
993
|
+
# indicates an estimated greater likelihood that the recognized words are
|
994
|
+
# correct. This field is set only for the top alternative.
|
995
|
+
# This field is not guaranteed to be accurate and users should not rely on it
|
996
|
+
# to be always provided.
|
997
|
+
# The default of 0.0 is a sentinel value indicating `confidence` was not set.
|
998
|
+
# Corresponds to the JSON property `confidence`
|
999
|
+
# @return [Float]
|
1000
|
+
attr_accessor :confidence
|
1001
|
+
|
1002
|
+
# Time offset relative to the beginning of the audio, and
|
1003
|
+
# corresponding to the end of the spoken word. This field is only set if
|
1004
|
+
# `enable_word_time_offsets=true` and only in the top hypothesis. This is an
|
1005
|
+
# experimental feature and the accuracy of the time offset can vary.
|
1006
|
+
# Corresponds to the JSON property `endTime`
|
1007
|
+
# @return [String]
|
1008
|
+
attr_accessor :end_time
|
1009
|
+
|
1010
|
+
# Output only. A distinct integer value is assigned for every speaker within
|
1011
|
+
# the audio. This field specifies which one of those speakers was detected to
|
1012
|
+
# have spoken this word. Value ranges from 1 up to diarization_speaker_count,
|
1013
|
+
# and is only set if speaker diarization is enabled.
|
1014
|
+
# Corresponds to the JSON property `speakerTag`
|
1015
|
+
# @return [Fixnum]
|
1016
|
+
attr_accessor :speaker_tag
|
1017
|
+
|
1018
|
+
# Time offset relative to the beginning of the audio, and
|
1019
|
+
# corresponding to the start of the spoken word. This field is only set if
|
1020
|
+
# `enable_word_time_offsets=true` and only in the top hypothesis. This is an
|
1021
|
+
# experimental feature and the accuracy of the time offset can vary.
|
1022
|
+
# Corresponds to the JSON property `startTime`
|
1023
|
+
# @return [String]
|
1024
|
+
attr_accessor :start_time
|
1025
|
+
|
1026
|
+
# The word corresponding to this set of information.
|
1027
|
+
# Corresponds to the JSON property `word`
|
1028
|
+
# @return [String]
|
1029
|
+
attr_accessor :word
|
1030
|
+
|
1031
|
+
def initialize(**args)
|
1032
|
+
update!(**args)
|
1033
|
+
end
|
1034
|
+
|
1035
|
+
# Update properties of this object
|
1036
|
+
def update!(**args)
|
1037
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
1038
|
+
@end_time = args[:end_time] if args.key?(:end_time)
|
1039
|
+
@speaker_tag = args[:speaker_tag] if args.key?(:speaker_tag)
|
1040
|
+
@start_time = args[:start_time] if args.key?(:start_time)
|
1041
|
+
@word = args[:word] if args.key?(:word)
|
1042
|
+
end
|
1043
|
+
end
|
1044
|
+
|
1045
|
+
# Video annotation progress. Included in the `metadata`
|
1046
|
+
# field of the `Operation` returned by the `GetOperation`
|
1047
|
+
# call of the `google::longrunning::Operations` service.
|
1048
|
+
class GoogleCloudVideointelligenceV1p1beta1AnnotateVideoProgress
|
1049
|
+
include Google::Apis::Core::Hashable
|
1050
|
+
|
1051
|
+
# Progress metadata for all videos specified in `AnnotateVideoRequest`.
|
1052
|
+
# Corresponds to the JSON property `annotationProgress`
|
1053
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p1beta1VideoAnnotationProgress>]
|
1054
|
+
attr_accessor :annotation_progress
|
1055
|
+
|
1056
|
+
def initialize(**args)
|
1057
|
+
update!(**args)
|
1058
|
+
end
|
1059
|
+
|
1060
|
+
# Update properties of this object
|
1061
|
+
def update!(**args)
|
1062
|
+
@annotation_progress = args[:annotation_progress] if args.key?(:annotation_progress)
|
1063
|
+
end
|
1064
|
+
end
|
1065
|
+
|
1066
|
+
# Video annotation response. Included in the `response`
|
1067
|
+
# field of the `Operation` returned by the `GetOperation`
|
1068
|
+
# call of the `google::longrunning::Operations` service.
|
1069
|
+
class GoogleCloudVideointelligenceV1p1beta1AnnotateVideoResponse
|
1070
|
+
include Google::Apis::Core::Hashable
|
1071
|
+
|
1072
|
+
# Annotation results for all videos specified in `AnnotateVideoRequest`.
|
1073
|
+
# Corresponds to the JSON property `annotationResults`
|
1074
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults>]
|
1075
|
+
attr_accessor :annotation_results
|
1076
|
+
|
1077
|
+
def initialize(**args)
|
1078
|
+
update!(**args)
|
1079
|
+
end
|
1080
|
+
|
1081
|
+
# Update properties of this object
|
1082
|
+
def update!(**args)
|
1083
|
+
@annotation_results = args[:annotation_results] if args.key?(:annotation_results)
|
1084
|
+
end
|
1085
|
+
end
|
1086
|
+
|
1087
|
+
# Detected entity from video analysis.
|
1088
|
+
class GoogleCloudVideointelligenceV1p1beta1Entity
|
1089
|
+
include Google::Apis::Core::Hashable
|
1090
|
+
|
1091
|
+
# Textual description, e.g. `Fixed-gear bicycle`.
|
1092
|
+
# Corresponds to the JSON property `description`
|
1093
|
+
# @return [String]
|
1094
|
+
attr_accessor :description
|
1095
|
+
|
1096
|
+
# Opaque entity ID. Some IDs may be available in
|
1097
|
+
# [Google Knowledge Graph Search
|
1098
|
+
# API](https://developers.google.com/knowledge-graph/).
|
1099
|
+
# Corresponds to the JSON property `entityId`
|
1100
|
+
# @return [String]
|
1101
|
+
attr_accessor :entity_id
|
1102
|
+
|
1103
|
+
# Language code for `description` in BCP-47 format.
|
1104
|
+
# Corresponds to the JSON property `languageCode`
|
1105
|
+
# @return [String]
|
1106
|
+
attr_accessor :language_code
|
1107
|
+
|
1108
|
+
def initialize(**args)
|
1109
|
+
update!(**args)
|
1110
|
+
end
|
1111
|
+
|
1112
|
+
# Update properties of this object
|
1113
|
+
def update!(**args)
|
1114
|
+
@description = args[:description] if args.key?(:description)
|
1115
|
+
@entity_id = args[:entity_id] if args.key?(:entity_id)
|
1116
|
+
@language_code = args[:language_code] if args.key?(:language_code)
|
1117
|
+
end
|
1118
|
+
end
|
1119
|
+
|
1120
|
+
# Explicit content annotation (based on per-frame visual signals only).
|
1121
|
+
# If no explicit content has been detected in a frame, no annotations are
|
1122
|
+
# present for that frame.
|
1123
|
+
class GoogleCloudVideointelligenceV1p1beta1ExplicitContentAnnotation
|
1124
|
+
include Google::Apis::Core::Hashable
|
1125
|
+
|
1126
|
+
# All video frames where explicit content was detected.
|
1127
|
+
# Corresponds to the JSON property `frames`
|
1128
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p1beta1ExplicitContentFrame>]
|
1129
|
+
attr_accessor :frames
|
1130
|
+
|
1131
|
+
def initialize(**args)
|
1132
|
+
update!(**args)
|
1133
|
+
end
|
1134
|
+
|
1135
|
+
# Update properties of this object
|
1136
|
+
def update!(**args)
|
1137
|
+
@frames = args[:frames] if args.key?(:frames)
|
1138
|
+
end
|
1139
|
+
end
|
1140
|
+
|
1141
|
+
# Video frame level annotation results for explicit content.
|
1142
|
+
class GoogleCloudVideointelligenceV1p1beta1ExplicitContentFrame
|
1143
|
+
include Google::Apis::Core::Hashable
|
1144
|
+
|
1145
|
+
# Likelihood of the pornography content..
|
1146
|
+
# Corresponds to the JSON property `pornographyLikelihood`
|
1147
|
+
# @return [String]
|
1148
|
+
attr_accessor :pornography_likelihood
|
1149
|
+
|
1150
|
+
# Time-offset, relative to the beginning of the video, corresponding to the
|
1151
|
+
# video frame for this location.
|
1152
|
+
# Corresponds to the JSON property `timeOffset`
|
1153
|
+
# @return [String]
|
1154
|
+
attr_accessor :time_offset
|
1155
|
+
|
1156
|
+
def initialize(**args)
|
1157
|
+
update!(**args)
|
1158
|
+
end
|
1159
|
+
|
1160
|
+
# Update properties of this object
|
1161
|
+
def update!(**args)
|
1162
|
+
@pornography_likelihood = args[:pornography_likelihood] if args.key?(:pornography_likelihood)
|
1163
|
+
@time_offset = args[:time_offset] if args.key?(:time_offset)
|
1164
|
+
end
|
1165
|
+
end
|
1166
|
+
|
1167
|
+
# Label annotation.
|
1168
|
+
class GoogleCloudVideointelligenceV1p1beta1LabelAnnotation
|
1169
|
+
include Google::Apis::Core::Hashable
|
1170
|
+
|
1171
|
+
# Common categories for the detected entity.
|
1172
|
+
# E.g. when the label is `Terrier` the category is likely `dog`. And in some
|
1173
|
+
# cases there might be more than one categories e.g. `Terrier` could also be
|
1174
|
+
# a `pet`.
|
1175
|
+
# Corresponds to the JSON property `categoryEntities`
|
1176
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p1beta1Entity>]
|
1177
|
+
attr_accessor :category_entities
|
1178
|
+
|
1179
|
+
# Detected entity from video analysis.
|
1180
|
+
# Corresponds to the JSON property `entity`
|
1181
|
+
# @return [Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p1beta1Entity]
|
1182
|
+
attr_accessor :entity
|
1183
|
+
|
1184
|
+
# All video frames where a label was detected.
|
1185
|
+
# Corresponds to the JSON property `frames`
|
1186
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p1beta1LabelFrame>]
|
1187
|
+
attr_accessor :frames
|
1188
|
+
|
1189
|
+
# All video segments where a label was detected.
|
1190
|
+
# Corresponds to the JSON property `segments`
|
1191
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p1beta1LabelSegment>]
|
1192
|
+
attr_accessor :segments
|
1193
|
+
|
1194
|
+
def initialize(**args)
|
1195
|
+
update!(**args)
|
1196
|
+
end
|
1197
|
+
|
1198
|
+
# Update properties of this object
|
1199
|
+
def update!(**args)
|
1200
|
+
@category_entities = args[:category_entities] if args.key?(:category_entities)
|
1201
|
+
@entity = args[:entity] if args.key?(:entity)
|
1202
|
+
@frames = args[:frames] if args.key?(:frames)
|
1203
|
+
@segments = args[:segments] if args.key?(:segments)
|
1204
|
+
end
|
1205
|
+
end
|
1206
|
+
|
1207
|
+
# Video frame level annotation results for label detection.
|
1208
|
+
class GoogleCloudVideointelligenceV1p1beta1LabelFrame
|
1209
|
+
include Google::Apis::Core::Hashable
|
1210
|
+
|
1211
|
+
# Confidence that the label is accurate. Range: [0, 1].
|
1212
|
+
# Corresponds to the JSON property `confidence`
|
1213
|
+
# @return [Float]
|
1214
|
+
attr_accessor :confidence
|
1215
|
+
|
1216
|
+
# Time-offset, relative to the beginning of the video, corresponding to the
|
1217
|
+
# video frame for this location.
|
1218
|
+
# Corresponds to the JSON property `timeOffset`
|
1219
|
+
# @return [String]
|
1220
|
+
attr_accessor :time_offset
|
1221
|
+
|
1222
|
+
def initialize(**args)
|
1223
|
+
update!(**args)
|
1224
|
+
end
|
1225
|
+
|
1226
|
+
# Update properties of this object
|
1227
|
+
def update!(**args)
|
1228
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
1229
|
+
@time_offset = args[:time_offset] if args.key?(:time_offset)
|
1230
|
+
end
|
1231
|
+
end
|
1232
|
+
|
1233
|
+
# Video segment level annotation results for label detection.
|
1234
|
+
class GoogleCloudVideointelligenceV1p1beta1LabelSegment
|
1235
|
+
include Google::Apis::Core::Hashable
|
1236
|
+
|
1237
|
+
# Confidence that the label is accurate. Range: [0, 1].
|
1238
|
+
# Corresponds to the JSON property `confidence`
|
1239
|
+
# @return [Float]
|
1240
|
+
attr_accessor :confidence
|
1241
|
+
|
1242
|
+
# Video segment.
|
1243
|
+
# Corresponds to the JSON property `segment`
|
1244
|
+
# @return [Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p1beta1VideoSegment]
|
1245
|
+
attr_accessor :segment
|
1246
|
+
|
1247
|
+
def initialize(**args)
|
1248
|
+
update!(**args)
|
1249
|
+
end
|
1250
|
+
|
1251
|
+
# Update properties of this object
|
1252
|
+
def update!(**args)
|
1253
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
1254
|
+
@segment = args[:segment] if args.key?(:segment)
|
1255
|
+
end
|
1256
|
+
end
|
1257
|
+
|
1258
|
+
# Alternative hypotheses (a.k.a. n-best list).
|
1259
|
+
class GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative
|
1260
|
+
include Google::Apis::Core::Hashable
|
1261
|
+
|
1262
|
+
# The confidence estimate between 0.0 and 1.0. A higher number
|
1263
|
+
# indicates an estimated greater likelihood that the recognized words are
|
1264
|
+
# correct. This field is typically provided only for the top hypothesis, and
|
1265
|
+
# only for `is_final=true` results. Clients should not rely on the
|
1266
|
+
# `confidence` field as it is not guaranteed to be accurate or consistent.
|
1267
|
+
# The default of 0.0 is a sentinel value indicating `confidence` was not set.
|
1268
|
+
# Corresponds to the JSON property `confidence`
|
1269
|
+
# @return [Float]
|
1270
|
+
attr_accessor :confidence
|
1271
|
+
|
1272
|
+
# Transcript text representing the words that the user spoke.
|
1273
|
+
# Corresponds to the JSON property `transcript`
|
1274
|
+
# @return [String]
|
1275
|
+
attr_accessor :transcript
|
1276
|
+
|
1277
|
+
# A list of word-specific information for each recognized word.
|
1278
|
+
# Corresponds to the JSON property `words`
|
1279
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p1beta1WordInfo>]
|
1280
|
+
attr_accessor :words
|
1281
|
+
|
1282
|
+
def initialize(**args)
|
1283
|
+
update!(**args)
|
1284
|
+
end
|
1285
|
+
|
1286
|
+
# Update properties of this object
|
1287
|
+
def update!(**args)
|
1288
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
1289
|
+
@transcript = args[:transcript] if args.key?(:transcript)
|
1290
|
+
@words = args[:words] if args.key?(:words)
|
1291
|
+
end
|
1292
|
+
end
|
1293
|
+
|
1294
|
+
# A speech recognition result corresponding to a portion of the audio.
|
1295
|
+
class GoogleCloudVideointelligenceV1p1beta1SpeechTranscription
|
1296
|
+
include Google::Apis::Core::Hashable
|
1297
|
+
|
1298
|
+
# May contain one or more recognition hypotheses (up to the maximum specified
|
1299
|
+
# in `max_alternatives`). These alternatives are ordered in terms of
|
1300
|
+
# accuracy, with the top (first) alternative being the most probable, as
|
1301
|
+
# ranked by the recognizer.
|
1302
|
+
# Corresponds to the JSON property `alternatives`
|
1303
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative>]
|
1304
|
+
attr_accessor :alternatives
|
1305
|
+
|
1306
|
+
# Output only. The
|
1307
|
+
# [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the
|
1308
|
+
# language in this result. This language code was detected to have the most
|
1309
|
+
# likelihood of being spoken in the audio.
|
1310
|
+
# Corresponds to the JSON property `languageCode`
|
1311
|
+
# @return [String]
|
1312
|
+
attr_accessor :language_code
|
1313
|
+
|
1314
|
+
def initialize(**args)
|
1315
|
+
update!(**args)
|
1316
|
+
end
|
1317
|
+
|
1318
|
+
# Update properties of this object
|
1319
|
+
def update!(**args)
|
1320
|
+
@alternatives = args[:alternatives] if args.key?(:alternatives)
|
1321
|
+
@language_code = args[:language_code] if args.key?(:language_code)
|
1322
|
+
end
|
1323
|
+
end
|
1324
|
+
|
1325
|
+
# Annotation progress for a single video.
|
1326
|
+
class GoogleCloudVideointelligenceV1p1beta1VideoAnnotationProgress
|
1327
|
+
include Google::Apis::Core::Hashable
|
1328
|
+
|
1329
|
+
# Video file location in
|
1330
|
+
# [Google Cloud Storage](https://cloud.google.com/storage/).
|
1331
|
+
# Corresponds to the JSON property `inputUri`
|
1332
|
+
# @return [String]
|
1333
|
+
attr_accessor :input_uri
|
1334
|
+
|
1335
|
+
# Approximate percentage processed thus far. Guaranteed to be
|
1336
|
+
# 100 when fully processed.
|
1337
|
+
# Corresponds to the JSON property `progressPercent`
|
1338
|
+
# @return [Fixnum]
|
1339
|
+
attr_accessor :progress_percent
|
1340
|
+
|
1341
|
+
# Time when the request was received.
|
1342
|
+
# Corresponds to the JSON property `startTime`
|
1343
|
+
# @return [String]
|
1344
|
+
attr_accessor :start_time
|
1345
|
+
|
1346
|
+
# Time of the most recent update.
|
1347
|
+
# Corresponds to the JSON property `updateTime`
|
1348
|
+
# @return [String]
|
1349
|
+
attr_accessor :update_time
|
1350
|
+
|
1351
|
+
def initialize(**args)
|
1352
|
+
update!(**args)
|
1353
|
+
end
|
1354
|
+
|
1355
|
+
# Update properties of this object
|
1356
|
+
def update!(**args)
|
1357
|
+
@input_uri = args[:input_uri] if args.key?(:input_uri)
|
1358
|
+
@progress_percent = args[:progress_percent] if args.key?(:progress_percent)
|
1359
|
+
@start_time = args[:start_time] if args.key?(:start_time)
|
1360
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
1361
|
+
end
|
1362
|
+
end
|
1363
|
+
|
1364
|
+
# Annotation results for a single video.
|
1365
|
+
class GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults
|
1366
|
+
include Google::Apis::Core::Hashable
|
1367
|
+
|
1368
|
+
# The `Status` type defines a logical error model that is suitable for different
|
1369
|
+
# programming environments, including REST APIs and RPC APIs. It is used by
|
1370
|
+
# [gRPC](https://github.com/grpc). The error model is designed to be:
|
1371
|
+
# - Simple to use and understand for most users
|
1372
|
+
# - Flexible enough to meet unexpected needs
|
1373
|
+
# # Overview
|
1374
|
+
# The `Status` message contains three pieces of data: error code, error message,
|
1375
|
+
# and error details. The error code should be an enum value of
|
1376
|
+
# google.rpc.Code, but it may accept additional error codes if needed. The
|
1377
|
+
# error message should be a developer-facing English message that helps
|
1378
|
+
# developers *understand* and *resolve* the error. If a localized user-facing
|
1379
|
+
# error message is needed, put the localized message in the error details or
|
1380
|
+
# localize it in the client. The optional error details may contain arbitrary
|
1381
|
+
# information about the error. There is a predefined set of error detail types
|
1382
|
+
# in the package `google.rpc` that can be used for common error conditions.
|
1383
|
+
# # Language mapping
|
1384
|
+
# The `Status` message is the logical representation of the error model, but it
|
1385
|
+
# is not necessarily the actual wire format. When the `Status` message is
|
1386
|
+
# exposed in different client libraries and different wire protocols, it can be
|
1387
|
+
# mapped differently. For example, it will likely be mapped to some exceptions
|
1388
|
+
# in Java, but more likely mapped to some error codes in C.
|
1389
|
+
# # Other uses
|
1390
|
+
# The error model and the `Status` message can be used in a variety of
|
1391
|
+
# environments, either with or without APIs, to provide a
|
1392
|
+
# consistent developer experience across different environments.
|
1393
|
+
# Example uses of this error model include:
|
1394
|
+
# - Partial errors. If a service needs to return partial errors to the client,
|
1395
|
+
# it may embed the `Status` in the normal response to indicate the partial
|
1396
|
+
# errors.
|
1397
|
+
# - Workflow errors. A typical workflow has multiple steps. Each step may
|
1398
|
+
# have a `Status` message for error reporting.
|
1399
|
+
# - Batch operations. If a client uses batch request and batch response, the
|
1400
|
+
# `Status` message should be used directly inside batch response, one for
|
1401
|
+
# each error sub-response.
|
1402
|
+
# - Asynchronous operations. If an API call embeds asynchronous operation
|
1403
|
+
# results in its response, the status of those operations should be
|
1404
|
+
# represented directly using the `Status` message.
|
1405
|
+
# - Logging. If some API errors are stored in logs, the message `Status` could
|
1406
|
+
# be used directly after any stripping needed for security/privacy reasons.
|
1407
|
+
# Corresponds to the JSON property `error`
|
1408
|
+
# @return [Google::Apis::VideointelligenceV1p2beta1::GoogleRpcStatus]
|
1409
|
+
attr_accessor :error
|
1410
|
+
|
1411
|
+
# Explicit content annotation (based on per-frame visual signals only).
|
1412
|
+
# If no explicit content has been detected in a frame, no annotations are
|
1413
|
+
# present for that frame.
|
1414
|
+
# Corresponds to the JSON property `explicitAnnotation`
|
1415
|
+
# @return [Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p1beta1ExplicitContentAnnotation]
|
1416
|
+
attr_accessor :explicit_annotation
|
1417
|
+
|
1418
|
+
# Label annotations on frame level.
|
1419
|
+
# There is exactly one element for each unique label.
|
1420
|
+
# Corresponds to the JSON property `frameLabelAnnotations`
|
1421
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p1beta1LabelAnnotation>]
|
1422
|
+
attr_accessor :frame_label_annotations
|
1423
|
+
|
1424
|
+
# Video file location in
|
1425
|
+
# [Google Cloud Storage](https://cloud.google.com/storage/).
|
1426
|
+
# Corresponds to the JSON property `inputUri`
|
1427
|
+
# @return [String]
|
1428
|
+
attr_accessor :input_uri
|
1429
|
+
|
1430
|
+
# Label annotations on video level or user specified segment level.
|
1431
|
+
# There is exactly one element for each unique label.
|
1432
|
+
# Corresponds to the JSON property `segmentLabelAnnotations`
|
1433
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p1beta1LabelAnnotation>]
|
1434
|
+
attr_accessor :segment_label_annotations
|
1435
|
+
|
1436
|
+
# Shot annotations. Each shot is represented as a video segment.
|
1437
|
+
# Corresponds to the JSON property `shotAnnotations`
|
1438
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p1beta1VideoSegment>]
|
1439
|
+
attr_accessor :shot_annotations
|
1440
|
+
|
1441
|
+
# Label annotations on shot level.
|
1442
|
+
# There is exactly one element for each unique label.
|
1443
|
+
# Corresponds to the JSON property `shotLabelAnnotations`
|
1444
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p1beta1LabelAnnotation>]
|
1445
|
+
attr_accessor :shot_label_annotations
|
1446
|
+
|
1447
|
+
# Speech transcription.
|
1448
|
+
# Corresponds to the JSON property `speechTranscriptions`
|
1449
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p1beta1SpeechTranscription>]
|
1450
|
+
attr_accessor :speech_transcriptions
|
1451
|
+
|
1452
|
+
def initialize(**args)
|
1453
|
+
update!(**args)
|
1454
|
+
end
|
1455
|
+
|
1456
|
+
# Update properties of this object
|
1457
|
+
def update!(**args)
|
1458
|
+
@error = args[:error] if args.key?(:error)
|
1459
|
+
@explicit_annotation = args[:explicit_annotation] if args.key?(:explicit_annotation)
|
1460
|
+
@frame_label_annotations = args[:frame_label_annotations] if args.key?(:frame_label_annotations)
|
1461
|
+
@input_uri = args[:input_uri] if args.key?(:input_uri)
|
1462
|
+
@segment_label_annotations = args[:segment_label_annotations] if args.key?(:segment_label_annotations)
|
1463
|
+
@shot_annotations = args[:shot_annotations] if args.key?(:shot_annotations)
|
1464
|
+
@shot_label_annotations = args[:shot_label_annotations] if args.key?(:shot_label_annotations)
|
1465
|
+
@speech_transcriptions = args[:speech_transcriptions] if args.key?(:speech_transcriptions)
|
1466
|
+
end
|
1467
|
+
end
|
1468
|
+
|
1469
|
+
# Video segment.
|
1470
|
+
class GoogleCloudVideointelligenceV1p1beta1VideoSegment
|
1471
|
+
include Google::Apis::Core::Hashable
|
1472
|
+
|
1473
|
+
# Time-offset, relative to the beginning of the video,
|
1474
|
+
# corresponding to the end of the segment (inclusive).
|
1475
|
+
# Corresponds to the JSON property `endTimeOffset`
|
1476
|
+
# @return [String]
|
1477
|
+
attr_accessor :end_time_offset
|
1478
|
+
|
1479
|
+
# Time-offset, relative to the beginning of the video,
|
1480
|
+
# corresponding to the start of the segment (inclusive).
|
1481
|
+
# Corresponds to the JSON property `startTimeOffset`
|
1482
|
+
# @return [String]
|
1483
|
+
attr_accessor :start_time_offset
|
1484
|
+
|
1485
|
+
def initialize(**args)
|
1486
|
+
update!(**args)
|
1487
|
+
end
|
1488
|
+
|
1489
|
+
# Update properties of this object
|
1490
|
+
def update!(**args)
|
1491
|
+
@end_time_offset = args[:end_time_offset] if args.key?(:end_time_offset)
|
1492
|
+
@start_time_offset = args[:start_time_offset] if args.key?(:start_time_offset)
|
1493
|
+
end
|
1494
|
+
end
|
1495
|
+
|
1496
|
+
# Word-specific information for recognized words. Word information is only
|
1497
|
+
# included in the response when certain request parameters are set, such
|
1498
|
+
# as `enable_word_time_offsets`.
|
1499
|
+
class GoogleCloudVideointelligenceV1p1beta1WordInfo
|
1500
|
+
include Google::Apis::Core::Hashable
|
1501
|
+
|
1502
|
+
# Output only. The confidence estimate between 0.0 and 1.0. A higher number
|
1503
|
+
# indicates an estimated greater likelihood that the recognized words are
|
1504
|
+
# correct. This field is set only for the top alternative.
|
1505
|
+
# This field is not guaranteed to be accurate and users should not rely on it
|
1506
|
+
# to be always provided.
|
1507
|
+
# The default of 0.0 is a sentinel value indicating `confidence` was not set.
|
1508
|
+
# Corresponds to the JSON property `confidence`
|
1509
|
+
# @return [Float]
|
1510
|
+
attr_accessor :confidence
|
1511
|
+
|
1512
|
+
# Time offset relative to the beginning of the audio, and
|
1513
|
+
# corresponding to the end of the spoken word. This field is only set if
|
1514
|
+
# `enable_word_time_offsets=true` and only in the top hypothesis. This is an
|
1515
|
+
# experimental feature and the accuracy of the time offset can vary.
|
1516
|
+
# Corresponds to the JSON property `endTime`
|
1517
|
+
# @return [String]
|
1518
|
+
attr_accessor :end_time
|
1519
|
+
|
1520
|
+
# Output only. A distinct integer value is assigned for every speaker within
|
1521
|
+
# the audio. This field specifies which one of those speakers was detected to
|
1522
|
+
# have spoken this word. Value ranges from 1 up to diarization_speaker_count,
|
1523
|
+
# and is only set if speaker diarization is enabled.
|
1524
|
+
# Corresponds to the JSON property `speakerTag`
|
1525
|
+
# @return [Fixnum]
|
1526
|
+
attr_accessor :speaker_tag
|
1527
|
+
|
1528
|
+
# Time offset relative to the beginning of the audio, and
|
1529
|
+
# corresponding to the start of the spoken word. This field is only set if
|
1530
|
+
# `enable_word_time_offsets=true` and only in the top hypothesis. This is an
|
1531
|
+
# experimental feature and the accuracy of the time offset can vary.
|
1532
|
+
# Corresponds to the JSON property `startTime`
|
1533
|
+
# @return [String]
|
1534
|
+
attr_accessor :start_time
|
1535
|
+
|
1536
|
+
# The word corresponding to this set of information.
|
1537
|
+
# Corresponds to the JSON property `word`
|
1538
|
+
# @return [String]
|
1539
|
+
attr_accessor :word
|
1540
|
+
|
1541
|
+
def initialize(**args)
|
1542
|
+
update!(**args)
|
1543
|
+
end
|
1544
|
+
|
1545
|
+
# Update properties of this object
|
1546
|
+
def update!(**args)
|
1547
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
1548
|
+
@end_time = args[:end_time] if args.key?(:end_time)
|
1549
|
+
@speaker_tag = args[:speaker_tag] if args.key?(:speaker_tag)
|
1550
|
+
@start_time = args[:start_time] if args.key?(:start_time)
|
1551
|
+
@word = args[:word] if args.key?(:word)
|
1552
|
+
end
|
1553
|
+
end
|
1554
|
+
|
1555
|
+
# Video annotation progress. Included in the `metadata`
|
1556
|
+
# field of the `Operation` returned by the `GetOperation`
|
1557
|
+
# call of the `google::longrunning::Operations` service.
|
1558
|
+
class GoogleCloudVideointelligenceV1p2beta1AnnotateVideoProgress
|
1559
|
+
include Google::Apis::Core::Hashable
|
1560
|
+
|
1561
|
+
# Progress metadata for all videos specified in `AnnotateVideoRequest`.
|
1562
|
+
# Corresponds to the JSON property `annotationProgress`
|
1563
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1VideoAnnotationProgress>]
|
1564
|
+
attr_accessor :annotation_progress
|
1565
|
+
|
1566
|
+
def initialize(**args)
|
1567
|
+
update!(**args)
|
1568
|
+
end
|
1569
|
+
|
1570
|
+
# Update properties of this object
|
1571
|
+
def update!(**args)
|
1572
|
+
@annotation_progress = args[:annotation_progress] if args.key?(:annotation_progress)
|
1573
|
+
end
|
1574
|
+
end
|
1575
|
+
|
1576
|
+
# Video annotation request.
|
1577
|
+
class GoogleCloudVideointelligenceV1p2beta1AnnotateVideoRequest
|
1578
|
+
include Google::Apis::Core::Hashable
|
1579
|
+
|
1580
|
+
# Requested video annotation features.
|
1581
|
+
# Corresponds to the JSON property `features`
|
1582
|
+
# @return [Array<String>]
|
1583
|
+
attr_accessor :features
|
1584
|
+
|
1585
|
+
# The video data bytes.
|
1586
|
+
# If unset, the input video(s) should be specified via `input_uri`.
|
1587
|
+
# If set, `input_uri` should be unset.
|
1588
|
+
# Corresponds to the JSON property `inputContent`
|
1589
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
1590
|
+
# @return [String]
|
1591
|
+
attr_accessor :input_content
|
1592
|
+
|
1593
|
+
# Input video location. Currently, only
|
1594
|
+
# [Google Cloud Storage](https://cloud.google.com/storage/) URIs are
|
1595
|
+
# supported, which must be specified in the following format:
|
1596
|
+
# `gs://bucket-id/object-id` (other URI formats return
|
1597
|
+
# google.rpc.Code.INVALID_ARGUMENT). For more information, see
|
1598
|
+
# [Request URIs](/storage/docs/reference-uris).
|
1599
|
+
# A video URI may include wildcards in `object-id`, and thus identify
|
1600
|
+
# multiple videos. Supported wildcards: '*' to match 0 or more characters;
|
1601
|
+
# '?' to match 1 character. If unset, the input video should be embedded
|
1602
|
+
# in the request as `input_content`. If set, `input_content` should be unset.
|
1603
|
+
# Corresponds to the JSON property `inputUri`
|
1604
|
+
# @return [String]
|
1605
|
+
attr_accessor :input_uri
|
1606
|
+
|
1607
|
+
# Optional cloud region where annotation should take place. Supported cloud
|
1608
|
+
# regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region
|
1609
|
+
# is specified, a region will be determined based on video file location.
|
1610
|
+
# Corresponds to the JSON property `locationId`
|
1611
|
+
# @return [String]
|
1612
|
+
attr_accessor :location_id
|
1613
|
+
|
1614
|
+
# Optional location where the output (in JSON format) should be stored.
|
1615
|
+
# Currently, only [Google Cloud Storage](https://cloud.google.com/storage/)
|
1616
|
+
# URIs are supported, which must be specified in the following format:
|
1617
|
+
# `gs://bucket-id/object-id` (other URI formats return
|
1618
|
+
# google.rpc.Code.INVALID_ARGUMENT). For more information, see
|
1619
|
+
# [Request URIs](/storage/docs/reference-uris).
|
1620
|
+
# Corresponds to the JSON property `outputUri`
|
1621
|
+
# @return [String]
|
1622
|
+
attr_accessor :output_uri
|
1623
|
+
|
1624
|
+
# Video context and/or feature-specific parameters.
|
1625
|
+
# Corresponds to the JSON property `videoContext`
|
1626
|
+
# @return [Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1VideoContext]
|
1627
|
+
attr_accessor :video_context
|
1628
|
+
|
1629
|
+
def initialize(**args)
|
1630
|
+
update!(**args)
|
1631
|
+
end
|
1632
|
+
|
1633
|
+
# Update properties of this object
|
1634
|
+
def update!(**args)
|
1635
|
+
@features = args[:features] if args.key?(:features)
|
1636
|
+
@input_content = args[:input_content] if args.key?(:input_content)
|
1637
|
+
@input_uri = args[:input_uri] if args.key?(:input_uri)
|
1638
|
+
@location_id = args[:location_id] if args.key?(:location_id)
|
1639
|
+
@output_uri = args[:output_uri] if args.key?(:output_uri)
|
1640
|
+
@video_context = args[:video_context] if args.key?(:video_context)
|
1641
|
+
end
|
1642
|
+
end
|
1643
|
+
|
1644
|
+
# Video annotation response. Included in the `response`
|
1645
|
+
# field of the `Operation` returned by the `GetOperation`
|
1646
|
+
# call of the `google::longrunning::Operations` service.
|
1647
|
+
class GoogleCloudVideointelligenceV1p2beta1AnnotateVideoResponse
|
1648
|
+
include Google::Apis::Core::Hashable
|
1649
|
+
|
1650
|
+
# Annotation results for all videos specified in `AnnotateVideoRequest`.
|
1651
|
+
# Corresponds to the JSON property `annotationResults`
|
1652
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1VideoAnnotationResults>]
|
1653
|
+
attr_accessor :annotation_results
|
1654
|
+
|
1655
|
+
def initialize(**args)
|
1656
|
+
update!(**args)
|
1657
|
+
end
|
1658
|
+
|
1659
|
+
# Update properties of this object
|
1660
|
+
def update!(**args)
|
1661
|
+
@annotation_results = args[:annotation_results] if args.key?(:annotation_results)
|
1662
|
+
end
|
1663
|
+
end
|
1664
|
+
|
1665
|
+
# Detected entity from video analysis.
|
1666
|
+
class GoogleCloudVideointelligenceV1p2beta1Entity
|
1667
|
+
include Google::Apis::Core::Hashable
|
1668
|
+
|
1669
|
+
# Textual description, e.g. `Fixed-gear bicycle`.
|
1670
|
+
# Corresponds to the JSON property `description`
|
1671
|
+
# @return [String]
|
1672
|
+
attr_accessor :description
|
1673
|
+
|
1674
|
+
# Opaque entity ID. Some IDs may be available in
|
1675
|
+
# [Google Knowledge Graph Search
|
1676
|
+
# API](https://developers.google.com/knowledge-graph/).
|
1677
|
+
# Corresponds to the JSON property `entityId`
|
1678
|
+
# @return [String]
|
1679
|
+
attr_accessor :entity_id
|
1680
|
+
|
1681
|
+
# Language code for `description` in BCP-47 format.
|
1682
|
+
# Corresponds to the JSON property `languageCode`
|
1683
|
+
# @return [String]
|
1684
|
+
attr_accessor :language_code
|
1685
|
+
|
1686
|
+
def initialize(**args)
|
1687
|
+
update!(**args)
|
1688
|
+
end
|
1689
|
+
|
1690
|
+
# Update properties of this object
|
1691
|
+
def update!(**args)
|
1692
|
+
@description = args[:description] if args.key?(:description)
|
1693
|
+
@entity_id = args[:entity_id] if args.key?(:entity_id)
|
1694
|
+
@language_code = args[:language_code] if args.key?(:language_code)
|
1695
|
+
end
|
1696
|
+
end
|
1697
|
+
|
1698
|
+
# Explicit content annotation (based on per-frame visual signals only).
|
1699
|
+
# If no explicit content has been detected in a frame, no annotations are
|
1700
|
+
# present for that frame.
|
1701
|
+
class GoogleCloudVideointelligenceV1p2beta1ExplicitContentAnnotation
|
1702
|
+
include Google::Apis::Core::Hashable
|
1703
|
+
|
1704
|
+
# All video frames where explicit content was detected.
|
1705
|
+
# Corresponds to the JSON property `frames`
|
1706
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1ExplicitContentFrame>]
|
1707
|
+
attr_accessor :frames
|
1708
|
+
|
1709
|
+
def initialize(**args)
|
1710
|
+
update!(**args)
|
1711
|
+
end
|
1712
|
+
|
1713
|
+
# Update properties of this object
|
1714
|
+
def update!(**args)
|
1715
|
+
@frames = args[:frames] if args.key?(:frames)
|
1716
|
+
end
|
1717
|
+
end
|
1718
|
+
|
1719
|
+
# Config for EXPLICIT_CONTENT_DETECTION.
|
1720
|
+
class GoogleCloudVideointelligenceV1p2beta1ExplicitContentDetectionConfig
|
1721
|
+
include Google::Apis::Core::Hashable
|
1722
|
+
|
1723
|
+
# Model to use for explicit content detection.
|
1724
|
+
# Supported values: "builtin/stable" (the default if unset) and
|
1725
|
+
# "builtin/latest".
|
1726
|
+
# Corresponds to the JSON property `model`
|
1727
|
+
# @return [String]
|
1728
|
+
attr_accessor :model
|
1729
|
+
|
1730
|
+
def initialize(**args)
|
1731
|
+
update!(**args)
|
1732
|
+
end
|
1733
|
+
|
1734
|
+
# Update properties of this object
|
1735
|
+
def update!(**args)
|
1736
|
+
@model = args[:model] if args.key?(:model)
|
1737
|
+
end
|
1738
|
+
end
|
1739
|
+
|
1740
|
+
# Video frame level annotation results for explicit content.
|
1741
|
+
class GoogleCloudVideointelligenceV1p2beta1ExplicitContentFrame
|
1742
|
+
include Google::Apis::Core::Hashable
|
1743
|
+
|
1744
|
+
# Likelihood of the pornography content..
|
1745
|
+
# Corresponds to the JSON property `pornographyLikelihood`
|
1746
|
+
# @return [String]
|
1747
|
+
attr_accessor :pornography_likelihood
|
1748
|
+
|
1749
|
+
# Time-offset, relative to the beginning of the video, corresponding to the
|
1750
|
+
# video frame for this location.
|
1751
|
+
# Corresponds to the JSON property `timeOffset`
|
1752
|
+
# @return [String]
|
1753
|
+
attr_accessor :time_offset
|
1754
|
+
|
1755
|
+
def initialize(**args)
|
1756
|
+
update!(**args)
|
1757
|
+
end
|
1758
|
+
|
1759
|
+
# Update properties of this object
|
1760
|
+
def update!(**args)
|
1761
|
+
@pornography_likelihood = args[:pornography_likelihood] if args.key?(:pornography_likelihood)
|
1762
|
+
@time_offset = args[:time_offset] if args.key?(:time_offset)
|
1763
|
+
end
|
1764
|
+
end
|
1765
|
+
|
1766
|
+
# Label annotation.
|
1767
|
+
class GoogleCloudVideointelligenceV1p2beta1LabelAnnotation
|
1768
|
+
include Google::Apis::Core::Hashable
|
1769
|
+
|
1770
|
+
# Common categories for the detected entity.
|
1771
|
+
# E.g. when the label is `Terrier` the category is likely `dog`. And in some
|
1772
|
+
# cases there might be more than one categories e.g. `Terrier` could also be
|
1773
|
+
# a `pet`.
|
1774
|
+
# Corresponds to the JSON property `categoryEntities`
|
1775
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1Entity>]
|
1776
|
+
attr_accessor :category_entities
|
1777
|
+
|
1778
|
+
# Detected entity from video analysis.
|
1779
|
+
# Corresponds to the JSON property `entity`
|
1780
|
+
# @return [Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1Entity]
|
1781
|
+
attr_accessor :entity
|
1782
|
+
|
1783
|
+
# All video frames where a label was detected.
|
1784
|
+
# Corresponds to the JSON property `frames`
|
1785
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1LabelFrame>]
|
1786
|
+
attr_accessor :frames
|
1787
|
+
|
1788
|
+
# All video segments where a label was detected.
|
1789
|
+
# Corresponds to the JSON property `segments`
|
1790
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1LabelSegment>]
|
1791
|
+
attr_accessor :segments
|
1792
|
+
|
1793
|
+
def initialize(**args)
|
1794
|
+
update!(**args)
|
1795
|
+
end
|
1796
|
+
|
1797
|
+
# Update properties of this object
|
1798
|
+
def update!(**args)
|
1799
|
+
@category_entities = args[:category_entities] if args.key?(:category_entities)
|
1800
|
+
@entity = args[:entity] if args.key?(:entity)
|
1801
|
+
@frames = args[:frames] if args.key?(:frames)
|
1802
|
+
@segments = args[:segments] if args.key?(:segments)
|
1803
|
+
end
|
1804
|
+
end
|
1805
|
+
|
1806
|
+
# Config for LABEL_DETECTION.
|
1807
|
+
class GoogleCloudVideointelligenceV1p2beta1LabelDetectionConfig
|
1808
|
+
include Google::Apis::Core::Hashable
|
1809
|
+
|
1810
|
+
# What labels should be detected with LABEL_DETECTION, in addition to
|
1811
|
+
# video-level labels or segment-level labels.
|
1812
|
+
# If unspecified, defaults to `SHOT_MODE`.
|
1813
|
+
# Corresponds to the JSON property `labelDetectionMode`
|
1814
|
+
# @return [String]
|
1815
|
+
attr_accessor :label_detection_mode
|
1816
|
+
|
1817
|
+
# Model to use for label detection.
|
1818
|
+
# Supported values: "builtin/stable" (the default if unset) and
|
1819
|
+
# "builtin/latest".
|
1820
|
+
# Corresponds to the JSON property `model`
|
1821
|
+
# @return [String]
|
1822
|
+
attr_accessor :model
|
1823
|
+
|
1824
|
+
# Whether the video has been shot from a stationary (i.e. non-moving) camera.
|
1825
|
+
# When set to true, might improve detection accuracy for moving objects.
|
1826
|
+
# Should be used with `SHOT_AND_FRAME_MODE` enabled.
|
1827
|
+
# Corresponds to the JSON property `stationaryCamera`
|
1828
|
+
# @return [Boolean]
|
1829
|
+
attr_accessor :stationary_camera
|
1830
|
+
alias_method :stationary_camera?, :stationary_camera
|
1831
|
+
|
1832
|
+
def initialize(**args)
|
1833
|
+
update!(**args)
|
1834
|
+
end
|
1835
|
+
|
1836
|
+
# Update properties of this object
|
1837
|
+
def update!(**args)
|
1838
|
+
@label_detection_mode = args[:label_detection_mode] if args.key?(:label_detection_mode)
|
1839
|
+
@model = args[:model] if args.key?(:model)
|
1840
|
+
@stationary_camera = args[:stationary_camera] if args.key?(:stationary_camera)
|
1841
|
+
end
|
1842
|
+
end
|
1843
|
+
|
1844
|
+
# Video frame level annotation results for label detection.
|
1845
|
+
class GoogleCloudVideointelligenceV1p2beta1LabelFrame
|
1846
|
+
include Google::Apis::Core::Hashable
|
1847
|
+
|
1848
|
+
# Confidence that the label is accurate. Range: [0, 1].
|
1849
|
+
# Corresponds to the JSON property `confidence`
|
1850
|
+
# @return [Float]
|
1851
|
+
attr_accessor :confidence
|
1852
|
+
|
1853
|
+
# Time-offset, relative to the beginning of the video, corresponding to the
|
1854
|
+
# video frame for this location.
|
1855
|
+
# Corresponds to the JSON property `timeOffset`
|
1856
|
+
# @return [String]
|
1857
|
+
attr_accessor :time_offset
|
1858
|
+
|
1859
|
+
def initialize(**args)
|
1860
|
+
update!(**args)
|
1861
|
+
end
|
1862
|
+
|
1863
|
+
# Update properties of this object
|
1864
|
+
def update!(**args)
|
1865
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
1866
|
+
@time_offset = args[:time_offset] if args.key?(:time_offset)
|
1867
|
+
end
|
1868
|
+
end
|
1869
|
+
|
1870
|
+
# Video segment level annotation results for label detection.
|
1871
|
+
class GoogleCloudVideointelligenceV1p2beta1LabelSegment
|
1872
|
+
include Google::Apis::Core::Hashable
|
1873
|
+
|
1874
|
+
# Confidence that the label is accurate. Range: [0, 1].
|
1875
|
+
# Corresponds to the JSON property `confidence`
|
1876
|
+
# @return [Float]
|
1877
|
+
attr_accessor :confidence
|
1878
|
+
|
1879
|
+
# Video segment.
|
1880
|
+
# Corresponds to the JSON property `segment`
|
1881
|
+
# @return [Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1VideoSegment]
|
1882
|
+
attr_accessor :segment
|
1883
|
+
|
1884
|
+
def initialize(**args)
|
1885
|
+
update!(**args)
|
1886
|
+
end
|
1887
|
+
|
1888
|
+
# Update properties of this object
|
1889
|
+
def update!(**args)
|
1890
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
1891
|
+
@segment = args[:segment] if args.key?(:segment)
|
1892
|
+
end
|
1893
|
+
end
|
1894
|
+
|
1895
|
+
# Normalized bounding box.
|
1896
|
+
# The normalized vertex coordinates are relative to the original image.
|
1897
|
+
# Range: [0, 1].
|
1898
|
+
class GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingBox
|
1899
|
+
include Google::Apis::Core::Hashable
|
1900
|
+
|
1901
|
+
# Bottom Y coordinate.
|
1902
|
+
# Corresponds to the JSON property `bottom`
|
1903
|
+
# @return [Float]
|
1904
|
+
attr_accessor :bottom
|
1905
|
+
|
1906
|
+
# Left X coordinate.
|
1907
|
+
# Corresponds to the JSON property `left`
|
1908
|
+
# @return [Float]
|
1909
|
+
attr_accessor :left
|
1910
|
+
|
1911
|
+
# Right X coordinate.
|
1912
|
+
# Corresponds to the JSON property `right`
|
1913
|
+
# @return [Float]
|
1914
|
+
attr_accessor :right
|
1915
|
+
|
1916
|
+
# Top Y coordinate.
|
1917
|
+
# Corresponds to the JSON property `top`
|
1918
|
+
# @return [Float]
|
1919
|
+
attr_accessor :top
|
1920
|
+
|
1921
|
+
def initialize(**args)
|
1922
|
+
update!(**args)
|
1923
|
+
end
|
1924
|
+
|
1925
|
+
# Update properties of this object
|
1926
|
+
def update!(**args)
|
1927
|
+
@bottom = args[:bottom] if args.key?(:bottom)
|
1928
|
+
@left = args[:left] if args.key?(:left)
|
1929
|
+
@right = args[:right] if args.key?(:right)
|
1930
|
+
@top = args[:top] if args.key?(:top)
|
1931
|
+
end
|
1932
|
+
end
|
1933
|
+
|
1934
|
+
# Normalized bounding polygon for text (that might not be aligned with axis).
|
1935
|
+
# Contains list of the corner points in clockwise order starting from
|
1936
|
+
# top-left corner. For example, for a rectangular bounding box:
|
1937
|
+
# When the text is horizontal it might look like:
|
1938
|
+
# 0----1
|
1939
|
+
# | |
|
1940
|
+
# 3----2
|
1941
|
+
# When it's clockwise rotated 180 degrees around the top-left corner it
|
1942
|
+
# becomes:
|
1943
|
+
# 2----3
|
1944
|
+
# | |
|
1945
|
+
# 1----0
|
1946
|
+
# and the vertex order will still be (0, 1, 2, 3). Note that values can be less
|
1947
|
+
# than 0, or greater than 1 due to trignometric calculations for location of
|
1948
|
+
# the box.
|
1949
|
+
class GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingPoly
|
1950
|
+
include Google::Apis::Core::Hashable
|
1951
|
+
|
1952
|
+
# Normalized vertices of the bounding polygon.
|
1953
|
+
# Corresponds to the JSON property `vertices`
|
1954
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1NormalizedVertex>]
|
1955
|
+
attr_accessor :vertices
|
1956
|
+
|
1957
|
+
def initialize(**args)
|
1958
|
+
update!(**args)
|
1959
|
+
end
|
1960
|
+
|
1961
|
+
# Update properties of this object
|
1962
|
+
def update!(**args)
|
1963
|
+
@vertices = args[:vertices] if args.key?(:vertices)
|
1964
|
+
end
|
1965
|
+
end
|
1966
|
+
|
1967
|
+
# A vertex represents a 2D point in the image.
|
1968
|
+
# NOTE: the normalized vertex coordinates are relative to the original image
|
1969
|
+
# and range from 0 to 1.
|
1970
|
+
class GoogleCloudVideointelligenceV1p2beta1NormalizedVertex
|
1971
|
+
include Google::Apis::Core::Hashable
|
1972
|
+
|
1973
|
+
# X coordinate.
|
1974
|
+
# Corresponds to the JSON property `x`
|
1975
|
+
# @return [Float]
|
1976
|
+
attr_accessor :x
|
1977
|
+
|
1978
|
+
# Y coordinate.
|
1979
|
+
# Corresponds to the JSON property `y`
|
1980
|
+
# @return [Float]
|
1981
|
+
attr_accessor :y
|
1982
|
+
|
1983
|
+
def initialize(**args)
|
1984
|
+
update!(**args)
|
1985
|
+
end
|
1986
|
+
|
1987
|
+
# Update properties of this object
|
1988
|
+
def update!(**args)
|
1989
|
+
@x = args[:x] if args.key?(:x)
|
1990
|
+
@y = args[:y] if args.key?(:y)
|
1991
|
+
end
|
1992
|
+
end
|
1993
|
+
|
1994
|
+
# Annotations corresponding to one tracked object.
|
1995
|
+
class GoogleCloudVideointelligenceV1p2beta1ObjectTrackingAnnotation
|
1996
|
+
include Google::Apis::Core::Hashable
|
1997
|
+
|
1998
|
+
# Object category's labeling confidence of this track.
|
1999
|
+
# Corresponds to the JSON property `confidence`
|
2000
|
+
# @return [Float]
|
2001
|
+
attr_accessor :confidence
|
2002
|
+
|
2003
|
+
# Detected entity from video analysis.
|
2004
|
+
# Corresponds to the JSON property `entity`
|
2005
|
+
# @return [Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1Entity]
|
2006
|
+
attr_accessor :entity
|
2007
|
+
|
2008
|
+
# Information corresponding to all frames where this object track appears.
|
2009
|
+
# Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame
|
2010
|
+
# messages in frames.
|
2011
|
+
# Streaming mode: it can only be one ObjectTrackingFrame message in frames.
|
2012
|
+
# Corresponds to the JSON property `frames`
|
2013
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1ObjectTrackingFrame>]
|
2014
|
+
attr_accessor :frames
|
2015
|
+
|
2016
|
+
# Video segment.
|
2017
|
+
# Corresponds to the JSON property `segment`
|
2018
|
+
# @return [Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1VideoSegment]
|
2019
|
+
attr_accessor :segment
|
2020
|
+
|
2021
|
+
# Streaming mode ONLY.
|
2022
|
+
# In streaming mode, we do not know the end time of a tracked object
|
2023
|
+
# before it is completed. Hence, there is no VideoSegment info returned.
|
2024
|
+
# Instead, we provide a unique identifiable integer track_id so that
|
2025
|
+
# the customers can correlate the results of the ongoing
|
2026
|
+
# ObjectTrackAnnotation of the same track_id over time.
|
2027
|
+
# Corresponds to the JSON property `trackId`
|
2028
|
+
# @return [Fixnum]
|
2029
|
+
attr_accessor :track_id
|
2030
|
+
|
2031
|
+
def initialize(**args)
|
2032
|
+
update!(**args)
|
2033
|
+
end
|
2034
|
+
|
2035
|
+
# Update properties of this object
|
2036
|
+
def update!(**args)
|
2037
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
2038
|
+
@entity = args[:entity] if args.key?(:entity)
|
2039
|
+
@frames = args[:frames] if args.key?(:frames)
|
2040
|
+
@segment = args[:segment] if args.key?(:segment)
|
2041
|
+
@track_id = args[:track_id] if args.key?(:track_id)
|
2042
|
+
end
|
2043
|
+
end
|
2044
|
+
|
2045
|
+
# Video frame level annotations for object detection and tracking. This field
|
2046
|
+
# stores per frame location, time offset, and confidence.
|
2047
|
+
class GoogleCloudVideointelligenceV1p2beta1ObjectTrackingFrame
|
2048
|
+
include Google::Apis::Core::Hashable
|
2049
|
+
|
2050
|
+
# Normalized bounding box.
|
2051
|
+
# The normalized vertex coordinates are relative to the original image.
|
2052
|
+
# Range: [0, 1].
|
2053
|
+
# Corresponds to the JSON property `normalizedBoundingBox`
|
2054
|
+
# @return [Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingBox]
|
2055
|
+
attr_accessor :normalized_bounding_box
|
2056
|
+
|
2057
|
+
# The timestamp of the frame in microseconds.
|
2058
|
+
# Corresponds to the JSON property `timeOffset`
|
2059
|
+
# @return [String]
|
2060
|
+
attr_accessor :time_offset
|
2061
|
+
|
2062
|
+
def initialize(**args)
|
2063
|
+
update!(**args)
|
2064
|
+
end
|
2065
|
+
|
2066
|
+
# Update properties of this object
|
2067
|
+
def update!(**args)
|
2068
|
+
@normalized_bounding_box = args[:normalized_bounding_box] if args.key?(:normalized_bounding_box)
|
2069
|
+
@time_offset = args[:time_offset] if args.key?(:time_offset)
|
2070
|
+
end
|
2071
|
+
end
|
2072
|
+
|
2073
|
+
# Config for SHOT_CHANGE_DETECTION.
|
2074
|
+
class GoogleCloudVideointelligenceV1p2beta1ShotChangeDetectionConfig
|
2075
|
+
include Google::Apis::Core::Hashable
|
2076
|
+
|
2077
|
+
# Model to use for shot change detection.
|
2078
|
+
# Supported values: "builtin/stable" (the default if unset) and
|
2079
|
+
# "builtin/latest".
|
2080
|
+
# Corresponds to the JSON property `model`
|
2081
|
+
# @return [String]
|
2082
|
+
attr_accessor :model
|
2083
|
+
|
2084
|
+
def initialize(**args)
|
2085
|
+
update!(**args)
|
2086
|
+
end
|
2087
|
+
|
2088
|
+
# Update properties of this object
|
2089
|
+
def update!(**args)
|
2090
|
+
@model = args[:model] if args.key?(:model)
|
2091
|
+
end
|
2092
|
+
end
|
2093
|
+
|
2094
|
+
# Provides "hints" to the speech recognizer to favor specific words and phrases
|
2095
|
+
# in the results.
|
2096
|
+
class GoogleCloudVideointelligenceV1p2beta1SpeechContext
|
2097
|
+
include Google::Apis::Core::Hashable
|
2098
|
+
|
2099
|
+
# *Optional* A list of strings containing words and phrases "hints" so that
|
2100
|
+
# the speech recognition is more likely to recognize them. This can be used
|
2101
|
+
# to improve the accuracy for specific words and phrases, for example, if
|
2102
|
+
# specific commands are typically spoken by the user. This can also be used
|
2103
|
+
# to add additional words to the vocabulary of the recognizer. See
|
2104
|
+
# [usage limits](https://cloud.google.com/speech/limits#content).
|
2105
|
+
# Corresponds to the JSON property `phrases`
|
2106
|
+
# @return [Array<String>]
|
2107
|
+
attr_accessor :phrases
|
2108
|
+
|
2109
|
+
def initialize(**args)
|
2110
|
+
update!(**args)
|
2111
|
+
end
|
2112
|
+
|
2113
|
+
# Update properties of this object
|
2114
|
+
def update!(**args)
|
2115
|
+
@phrases = args[:phrases] if args.key?(:phrases)
|
2116
|
+
end
|
2117
|
+
end
|
2118
|
+
|
2119
|
+
# Alternative hypotheses (a.k.a. n-best list).
|
2120
|
+
class GoogleCloudVideointelligenceV1p2beta1SpeechRecognitionAlternative
|
2121
|
+
include Google::Apis::Core::Hashable
|
2122
|
+
|
2123
|
+
# The confidence estimate between 0.0 and 1.0. A higher number
|
2124
|
+
# indicates an estimated greater likelihood that the recognized words are
|
2125
|
+
# correct. This field is typically provided only for the top hypothesis, and
|
2126
|
+
# only for `is_final=true` results. Clients should not rely on the
|
2127
|
+
# `confidence` field as it is not guaranteed to be accurate or consistent.
|
2128
|
+
# The default of 0.0 is a sentinel value indicating `confidence` was not set.
|
2129
|
+
# Corresponds to the JSON property `confidence`
|
2130
|
+
# @return [Float]
|
2131
|
+
attr_accessor :confidence
|
2132
|
+
|
2133
|
+
# Transcript text representing the words that the user spoke.
|
2134
|
+
# Corresponds to the JSON property `transcript`
|
2135
|
+
# @return [String]
|
2136
|
+
attr_accessor :transcript
|
2137
|
+
|
2138
|
+
# A list of word-specific information for each recognized word.
|
2139
|
+
# Corresponds to the JSON property `words`
|
2140
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1WordInfo>]
|
2141
|
+
attr_accessor :words
|
2142
|
+
|
2143
|
+
def initialize(**args)
|
2144
|
+
update!(**args)
|
2145
|
+
end
|
2146
|
+
|
2147
|
+
# Update properties of this object
|
2148
|
+
def update!(**args)
|
2149
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
2150
|
+
@transcript = args[:transcript] if args.key?(:transcript)
|
2151
|
+
@words = args[:words] if args.key?(:words)
|
2152
|
+
end
|
2153
|
+
end
|
2154
|
+
|
2155
|
+
# A speech recognition result corresponding to a portion of the audio.
|
2156
|
+
class GoogleCloudVideointelligenceV1p2beta1SpeechTranscription
|
2157
|
+
include Google::Apis::Core::Hashable
|
2158
|
+
|
2159
|
+
# May contain one or more recognition hypotheses (up to the maximum specified
|
2160
|
+
# in `max_alternatives`). These alternatives are ordered in terms of
|
2161
|
+
# accuracy, with the top (first) alternative being the most probable, as
|
2162
|
+
# ranked by the recognizer.
|
2163
|
+
# Corresponds to the JSON property `alternatives`
|
2164
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1SpeechRecognitionAlternative>]
|
2165
|
+
attr_accessor :alternatives
|
2166
|
+
|
2167
|
+
# Output only. The
|
2168
|
+
# [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the
|
2169
|
+
# language in this result. This language code was detected to have the most
|
2170
|
+
# likelihood of being spoken in the audio.
|
2171
|
+
# Corresponds to the JSON property `languageCode`
|
2172
|
+
# @return [String]
|
2173
|
+
attr_accessor :language_code
|
2174
|
+
|
2175
|
+
def initialize(**args)
|
2176
|
+
update!(**args)
|
2177
|
+
end
|
2178
|
+
|
2179
|
+
# Update properties of this object
|
2180
|
+
def update!(**args)
|
2181
|
+
@alternatives = args[:alternatives] if args.key?(:alternatives)
|
2182
|
+
@language_code = args[:language_code] if args.key?(:language_code)
|
2183
|
+
end
|
2184
|
+
end
|
2185
|
+
|
2186
|
+
# Config for SPEECH_TRANSCRIPTION.
|
2187
|
+
class GoogleCloudVideointelligenceV1p2beta1SpeechTranscriptionConfig
|
2188
|
+
include Google::Apis::Core::Hashable
|
2189
|
+
|
2190
|
+
# *Optional* For file formats, such as MXF or MKV, supporting multiple audio
|
2191
|
+
# tracks, specify up to two tracks. Default: track 0.
|
2192
|
+
# Corresponds to the JSON property `audioTracks`
|
2193
|
+
# @return [Array<Fixnum>]
|
2194
|
+
attr_accessor :audio_tracks
|
2195
|
+
|
2196
|
+
# *Optional*
|
2197
|
+
# If set, specifies the estimated number of speakers in the conversation.
|
2198
|
+
# If not set, defaults to '2'.
|
2199
|
+
# Ignored unless enable_speaker_diarization is set to true.
|
2200
|
+
# Corresponds to the JSON property `diarizationSpeakerCount`
|
2201
|
+
# @return [Fixnum]
|
2202
|
+
attr_accessor :diarization_speaker_count
|
2203
|
+
|
2204
|
+
# *Optional* If 'true', adds punctuation to recognition result hypotheses.
|
2205
|
+
# This feature is only available in select languages. Setting this for
|
2206
|
+
# requests in other languages has no effect at all. The default 'false' value
|
2207
|
+
# does not add punctuation to result hypotheses. NOTE: "This is currently
|
2208
|
+
# offered as an experimental service, complimentary to all users. In the
|
2209
|
+
# future this may be exclusively available as a premium feature."
|
2210
|
+
# Corresponds to the JSON property `enableAutomaticPunctuation`
|
2211
|
+
# @return [Boolean]
|
2212
|
+
attr_accessor :enable_automatic_punctuation
|
2213
|
+
alias_method :enable_automatic_punctuation?, :enable_automatic_punctuation
|
2214
|
+
|
2215
|
+
# *Optional* If 'true', enables speaker detection for each recognized word in
|
2216
|
+
# the top alternative of the recognition result using a speaker_tag provided
|
2217
|
+
# in the WordInfo.
|
2218
|
+
# Note: When this is true, we send all the words from the beginning of the
|
2219
|
+
# audio for the top alternative in every consecutive responses.
|
2220
|
+
# This is done in order to improve our speaker tags as our models learn to
|
2221
|
+
# identify the speakers in the conversation over time.
|
2222
|
+
# Corresponds to the JSON property `enableSpeakerDiarization`
|
2223
|
+
# @return [Boolean]
|
2224
|
+
attr_accessor :enable_speaker_diarization
|
2225
|
+
alias_method :enable_speaker_diarization?, :enable_speaker_diarization
|
2226
|
+
|
2227
|
+
# *Optional* If `true`, the top result includes a list of words and the
|
2228
|
+
# confidence for those words. If `false`, no word-level confidence
|
2229
|
+
# information is returned. The default is `false`.
|
2230
|
+
# Corresponds to the JSON property `enableWordConfidence`
|
2231
|
+
# @return [Boolean]
|
2232
|
+
attr_accessor :enable_word_confidence
|
2233
|
+
alias_method :enable_word_confidence?, :enable_word_confidence
|
2234
|
+
|
2235
|
+
# *Optional* If set to `true`, the server will attempt to filter out
|
2236
|
+
# profanities, replacing all but the initial character in each filtered word
|
2237
|
+
# with asterisks, e.g. "f***". If set to `false` or omitted, profanities
|
2238
|
+
# won't be filtered out.
|
2239
|
+
# Corresponds to the JSON property `filterProfanity`
|
2240
|
+
# @return [Boolean]
|
2241
|
+
attr_accessor :filter_profanity
|
2242
|
+
alias_method :filter_profanity?, :filter_profanity
|
2243
|
+
|
2244
|
+
# *Required* The language of the supplied audio as a
|
2245
|
+
# [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
|
2246
|
+
# Example: "en-US".
|
2247
|
+
# See [Language Support](https://cloud.google.com/speech/docs/languages)
|
2248
|
+
# for a list of the currently supported language codes.
|
2249
|
+
# Corresponds to the JSON property `languageCode`
|
2250
|
+
# @return [String]
|
2251
|
+
attr_accessor :language_code
|
2252
|
+
|
2253
|
+
# *Optional* Maximum number of recognition hypotheses to be returned.
|
2254
|
+
# Specifically, the maximum number of `SpeechRecognitionAlternative` messages
|
2255
|
+
# within each `SpeechTranscription`. The server may return fewer than
|
2256
|
+
# `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will
|
2257
|
+
# return a maximum of one. If omitted, will return a maximum of one.
|
2258
|
+
# Corresponds to the JSON property `maxAlternatives`
|
2259
|
+
# @return [Fixnum]
|
2260
|
+
attr_accessor :max_alternatives
|
2261
|
+
|
2262
|
+
# *Optional* A means to provide context to assist the speech recognition.
|
2263
|
+
# Corresponds to the JSON property `speechContexts`
|
2264
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1SpeechContext>]
|
2265
|
+
attr_accessor :speech_contexts
|
2266
|
+
|
2267
|
+
def initialize(**args)
|
2268
|
+
update!(**args)
|
2269
|
+
end
|
2270
|
+
|
2271
|
+
# Update properties of this object
|
2272
|
+
def update!(**args)
|
2273
|
+
@audio_tracks = args[:audio_tracks] if args.key?(:audio_tracks)
|
2274
|
+
@diarization_speaker_count = args[:diarization_speaker_count] if args.key?(:diarization_speaker_count)
|
2275
|
+
@enable_automatic_punctuation = args[:enable_automatic_punctuation] if args.key?(:enable_automatic_punctuation)
|
2276
|
+
@enable_speaker_diarization = args[:enable_speaker_diarization] if args.key?(:enable_speaker_diarization)
|
2277
|
+
@enable_word_confidence = args[:enable_word_confidence] if args.key?(:enable_word_confidence)
|
2278
|
+
@filter_profanity = args[:filter_profanity] if args.key?(:filter_profanity)
|
2279
|
+
@language_code = args[:language_code] if args.key?(:language_code)
|
2280
|
+
@max_alternatives = args[:max_alternatives] if args.key?(:max_alternatives)
|
2281
|
+
@speech_contexts = args[:speech_contexts] if args.key?(:speech_contexts)
|
2282
|
+
end
|
2283
|
+
end
|
2284
|
+
|
2285
|
+
# Annotations related to one detected OCR text snippet. This will contain the
|
2286
|
+
# corresponding text, confidence value, and frame level information for each
|
2287
|
+
# detection.
|
2288
|
+
class GoogleCloudVideointelligenceV1p2beta1TextAnnotation
|
2289
|
+
include Google::Apis::Core::Hashable
|
2290
|
+
|
2291
|
+
# All video segments where OCR detected text appears.
|
2292
|
+
# Corresponds to the JSON property `segments`
|
2293
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1TextSegment>]
|
2294
|
+
attr_accessor :segments
|
2295
|
+
|
2296
|
+
# The detected text.
|
2297
|
+
# Corresponds to the JSON property `text`
|
2298
|
+
# @return [String]
|
2299
|
+
attr_accessor :text
|
2300
|
+
|
2301
|
+
def initialize(**args)
|
2302
|
+
update!(**args)
|
2303
|
+
end
|
2304
|
+
|
2305
|
+
# Update properties of this object
|
2306
|
+
def update!(**args)
|
2307
|
+
@segments = args[:segments] if args.key?(:segments)
|
2308
|
+
@text = args[:text] if args.key?(:text)
|
2309
|
+
end
|
2310
|
+
end
|
2311
|
+
|
2312
|
+
# Config for TEXT_DETECTION.
|
2313
|
+
class GoogleCloudVideointelligenceV1p2beta1TextDetectionConfig
|
2314
|
+
include Google::Apis::Core::Hashable
|
2315
|
+
|
2316
|
+
# Language hint can be specified if the language to be detected is known a
|
2317
|
+
# priori. It can increase the accuracy of the detection. Language hint must
|
2318
|
+
# be language code in BCP-47 format.
|
2319
|
+
# Automatic language detection is performed if no hint is provided.
|
2320
|
+
# Corresponds to the JSON property `languageHints`
|
2321
|
+
# @return [Array<String>]
|
2322
|
+
attr_accessor :language_hints
|
2323
|
+
|
2324
|
+
def initialize(**args)
|
2325
|
+
update!(**args)
|
2326
|
+
end
|
2327
|
+
|
2328
|
+
# Update properties of this object
|
2329
|
+
def update!(**args)
|
2330
|
+
@language_hints = args[:language_hints] if args.key?(:language_hints)
|
2331
|
+
end
|
2332
|
+
end
|
2333
|
+
|
2334
|
+
# Video frame level annotation results for text annotation (OCR).
|
2335
|
+
# Contains information regarding timestamp and bounding box locations for the
|
2336
|
+
# frames containing detected OCR text snippets.
|
2337
|
+
class GoogleCloudVideointelligenceV1p2beta1TextFrame
|
2338
|
+
include Google::Apis::Core::Hashable
|
2339
|
+
|
2340
|
+
# Normalized bounding polygon for text (that might not be aligned with axis).
|
2341
|
+
# Contains list of the corner points in clockwise order starting from
|
2342
|
+
# top-left corner. For example, for a rectangular bounding box:
|
2343
|
+
# When the text is horizontal it might look like:
|
2344
|
+
# 0----1
|
2345
|
+
# | |
|
2346
|
+
# 3----2
|
2347
|
+
# When it's clockwise rotated 180 degrees around the top-left corner it
|
2348
|
+
# becomes:
|
2349
|
+
# 2----3
|
2350
|
+
# | |
|
2351
|
+
# 1----0
|
2352
|
+
# and the vertex order will still be (0, 1, 2, 3). Note that values can be less
|
2353
|
+
# than 0, or greater than 1 due to trignometric calculations for location of
|
2354
|
+
# the box.
|
2355
|
+
# Corresponds to the JSON property `rotatedBoundingBox`
|
2356
|
+
# @return [Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingPoly]
|
2357
|
+
attr_accessor :rotated_bounding_box
|
2358
|
+
|
2359
|
+
# Timestamp of this frame.
|
2360
|
+
# Corresponds to the JSON property `timeOffset`
|
2361
|
+
# @return [String]
|
2362
|
+
attr_accessor :time_offset
|
2363
|
+
|
2364
|
+
def initialize(**args)
|
2365
|
+
update!(**args)
|
2366
|
+
end
|
2367
|
+
|
2368
|
+
# Update properties of this object
|
2369
|
+
def update!(**args)
|
2370
|
+
@rotated_bounding_box = args[:rotated_bounding_box] if args.key?(:rotated_bounding_box)
|
2371
|
+
@time_offset = args[:time_offset] if args.key?(:time_offset)
|
2372
|
+
end
|
2373
|
+
end
|
2374
|
+
|
2375
|
+
# Video segment level annotation results for text detection.
|
2376
|
+
class GoogleCloudVideointelligenceV1p2beta1TextSegment
|
2377
|
+
include Google::Apis::Core::Hashable
|
2378
|
+
|
2379
|
+
# Confidence for the track of detected text. It is calculated as the highest
|
2380
|
+
# over all frames where OCR detected text appears.
|
2381
|
+
# Corresponds to the JSON property `confidence`
|
2382
|
+
# @return [Float]
|
2383
|
+
attr_accessor :confidence
|
2384
|
+
|
2385
|
+
# Information related to the frames where OCR detected text appears.
|
2386
|
+
# Corresponds to the JSON property `frames`
|
2387
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1TextFrame>]
|
2388
|
+
attr_accessor :frames
|
2389
|
+
|
2390
|
+
# Video segment.
|
2391
|
+
# Corresponds to the JSON property `segment`
|
2392
|
+
# @return [Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1VideoSegment]
|
2393
|
+
attr_accessor :segment
|
2394
|
+
|
2395
|
+
def initialize(**args)
|
2396
|
+
update!(**args)
|
2397
|
+
end
|
2398
|
+
|
2399
|
+
# Update properties of this object
|
2400
|
+
def update!(**args)
|
2401
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
2402
|
+
@frames = args[:frames] if args.key?(:frames)
|
2403
|
+
@segment = args[:segment] if args.key?(:segment)
|
2404
|
+
end
|
2405
|
+
end
|
2406
|
+
|
2407
|
+
# Annotation progress for a single video.
|
2408
|
+
class GoogleCloudVideointelligenceV1p2beta1VideoAnnotationProgress
|
2409
|
+
include Google::Apis::Core::Hashable
|
2410
|
+
|
2411
|
+
# Video file location in
|
2412
|
+
# [Google Cloud Storage](https://cloud.google.com/storage/).
|
2413
|
+
# Corresponds to the JSON property `inputUri`
|
2414
|
+
# @return [String]
|
2415
|
+
attr_accessor :input_uri
|
2416
|
+
|
2417
|
+
# Approximate percentage processed thus far. Guaranteed to be
|
2418
|
+
# 100 when fully processed.
|
2419
|
+
# Corresponds to the JSON property `progressPercent`
|
2420
|
+
# @return [Fixnum]
|
2421
|
+
attr_accessor :progress_percent
|
2422
|
+
|
2423
|
+
# Time when the request was received.
|
2424
|
+
# Corresponds to the JSON property `startTime`
|
2425
|
+
# @return [String]
|
2426
|
+
attr_accessor :start_time
|
2427
|
+
|
2428
|
+
# Time of the most recent update.
|
2429
|
+
# Corresponds to the JSON property `updateTime`
|
2430
|
+
# @return [String]
|
2431
|
+
attr_accessor :update_time
|
2432
|
+
|
2433
|
+
def initialize(**args)
|
2434
|
+
update!(**args)
|
2435
|
+
end
|
2436
|
+
|
2437
|
+
# Update properties of this object
|
2438
|
+
def update!(**args)
|
2439
|
+
@input_uri = args[:input_uri] if args.key?(:input_uri)
|
2440
|
+
@progress_percent = args[:progress_percent] if args.key?(:progress_percent)
|
2441
|
+
@start_time = args[:start_time] if args.key?(:start_time)
|
2442
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
2443
|
+
end
|
2444
|
+
end
|
2445
|
+
|
2446
|
+
# Annotation results for a single video.
|
2447
|
+
class GoogleCloudVideointelligenceV1p2beta1VideoAnnotationResults
|
2448
|
+
include Google::Apis::Core::Hashable
|
2449
|
+
|
2450
|
+
# The `Status` type defines a logical error model that is suitable for different
|
2451
|
+
# programming environments, including REST APIs and RPC APIs. It is used by
|
2452
|
+
# [gRPC](https://github.com/grpc). The error model is designed to be:
|
2453
|
+
# - Simple to use and understand for most users
|
2454
|
+
# - Flexible enough to meet unexpected needs
|
2455
|
+
# # Overview
|
2456
|
+
# The `Status` message contains three pieces of data: error code, error message,
|
2457
|
+
# and error details. The error code should be an enum value of
|
2458
|
+
# google.rpc.Code, but it may accept additional error codes if needed. The
|
2459
|
+
# error message should be a developer-facing English message that helps
|
2460
|
+
# developers *understand* and *resolve* the error. If a localized user-facing
|
2461
|
+
# error message is needed, put the localized message in the error details or
|
2462
|
+
# localize it in the client. The optional error details may contain arbitrary
|
2463
|
+
# information about the error. There is a predefined set of error detail types
|
2464
|
+
# in the package `google.rpc` that can be used for common error conditions.
|
2465
|
+
# # Language mapping
|
2466
|
+
# The `Status` message is the logical representation of the error model, but it
|
2467
|
+
# is not necessarily the actual wire format. When the `Status` message is
|
2468
|
+
# exposed in different client libraries and different wire protocols, it can be
|
2469
|
+
# mapped differently. For example, it will likely be mapped to some exceptions
|
2470
|
+
# in Java, but more likely mapped to some error codes in C.
|
2471
|
+
# # Other uses
|
2472
|
+
# The error model and the `Status` message can be used in a variety of
|
2473
|
+
# environments, either with or without APIs, to provide a
|
2474
|
+
# consistent developer experience across different environments.
|
2475
|
+
# Example uses of this error model include:
|
2476
|
+
# - Partial errors. If a service needs to return partial errors to the client,
|
2477
|
+
# it may embed the `Status` in the normal response to indicate the partial
|
2478
|
+
# errors.
|
2479
|
+
# - Workflow errors. A typical workflow has multiple steps. Each step may
|
2480
|
+
# have a `Status` message for error reporting.
|
2481
|
+
# - Batch operations. If a client uses batch request and batch response, the
|
2482
|
+
# `Status` message should be used directly inside batch response, one for
|
2483
|
+
# each error sub-response.
|
2484
|
+
# - Asynchronous operations. If an API call embeds asynchronous operation
|
2485
|
+
# results in its response, the status of those operations should be
|
2486
|
+
# represented directly using the `Status` message.
|
2487
|
+
# - Logging. If some API errors are stored in logs, the message `Status` could
|
2488
|
+
# be used directly after any stripping needed for security/privacy reasons.
|
2489
|
+
# Corresponds to the JSON property `error`
|
2490
|
+
# @return [Google::Apis::VideointelligenceV1p2beta1::GoogleRpcStatus]
|
2491
|
+
attr_accessor :error
|
2492
|
+
|
2493
|
+
# Explicit content annotation (based on per-frame visual signals only).
|
2494
|
+
# If no explicit content has been detected in a frame, no annotations are
|
2495
|
+
# present for that frame.
|
2496
|
+
# Corresponds to the JSON property `explicitAnnotation`
|
2497
|
+
# @return [Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1ExplicitContentAnnotation]
|
2498
|
+
attr_accessor :explicit_annotation
|
2499
|
+
|
2500
|
+
# Label annotations on frame level.
|
2501
|
+
# There is exactly one element for each unique label.
|
2502
|
+
# Corresponds to the JSON property `frameLabelAnnotations`
|
2503
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1LabelAnnotation>]
|
2504
|
+
attr_accessor :frame_label_annotations
|
2505
|
+
|
2506
|
+
# Video file location in
|
2507
|
+
# [Google Cloud Storage](https://cloud.google.com/storage/).
|
2508
|
+
# Corresponds to the JSON property `inputUri`
|
2509
|
+
# @return [String]
|
2510
|
+
attr_accessor :input_uri
|
2511
|
+
|
2512
|
+
# Annotations for list of objects detected and tracked in video.
|
2513
|
+
# Corresponds to the JSON property `objectAnnotations`
|
2514
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1ObjectTrackingAnnotation>]
|
2515
|
+
attr_accessor :object_annotations
|
2516
|
+
|
2517
|
+
# Label annotations on video level or user specified segment level.
|
2518
|
+
# There is exactly one element for each unique label.
|
2519
|
+
# Corresponds to the JSON property `segmentLabelAnnotations`
|
2520
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1LabelAnnotation>]
|
2521
|
+
attr_accessor :segment_label_annotations
|
2522
|
+
|
2523
|
+
# Shot annotations. Each shot is represented as a video segment.
|
2524
|
+
# Corresponds to the JSON property `shotAnnotations`
|
2525
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1VideoSegment>]
|
2526
|
+
attr_accessor :shot_annotations
|
2527
|
+
|
2528
|
+
# Label annotations on shot level.
|
2529
|
+
# There is exactly one element for each unique label.
|
2530
|
+
# Corresponds to the JSON property `shotLabelAnnotations`
|
2531
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1LabelAnnotation>]
|
2532
|
+
attr_accessor :shot_label_annotations
|
2533
|
+
|
2534
|
+
# Speech transcription.
|
2535
|
+
# Corresponds to the JSON property `speechTranscriptions`
|
2536
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1SpeechTranscription>]
|
2537
|
+
attr_accessor :speech_transcriptions
|
2538
|
+
|
2539
|
+
# OCR text detection and tracking.
|
2540
|
+
# Annotations for list of detected text snippets. Each will have list of
|
2541
|
+
# frame information associated with it.
|
2542
|
+
# Corresponds to the JSON property `textAnnotations`
|
2543
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1TextAnnotation>]
|
2544
|
+
attr_accessor :text_annotations
|
2545
|
+
|
2546
|
+
def initialize(**args)
|
2547
|
+
update!(**args)
|
2548
|
+
end
|
2549
|
+
|
2550
|
+
# Update properties of this object
|
2551
|
+
def update!(**args)
|
2552
|
+
@error = args[:error] if args.key?(:error)
|
2553
|
+
@explicit_annotation = args[:explicit_annotation] if args.key?(:explicit_annotation)
|
2554
|
+
@frame_label_annotations = args[:frame_label_annotations] if args.key?(:frame_label_annotations)
|
2555
|
+
@input_uri = args[:input_uri] if args.key?(:input_uri)
|
2556
|
+
@object_annotations = args[:object_annotations] if args.key?(:object_annotations)
|
2557
|
+
@segment_label_annotations = args[:segment_label_annotations] if args.key?(:segment_label_annotations)
|
2558
|
+
@shot_annotations = args[:shot_annotations] if args.key?(:shot_annotations)
|
2559
|
+
@shot_label_annotations = args[:shot_label_annotations] if args.key?(:shot_label_annotations)
|
2560
|
+
@speech_transcriptions = args[:speech_transcriptions] if args.key?(:speech_transcriptions)
|
2561
|
+
@text_annotations = args[:text_annotations] if args.key?(:text_annotations)
|
2562
|
+
end
|
2563
|
+
end
|
2564
|
+
|
2565
|
+
# Video context and/or feature-specific parameters.
|
2566
|
+
class GoogleCloudVideointelligenceV1p2beta1VideoContext
|
2567
|
+
include Google::Apis::Core::Hashable
|
2568
|
+
|
2569
|
+
# Config for EXPLICIT_CONTENT_DETECTION.
|
2570
|
+
# Corresponds to the JSON property `explicitContentDetectionConfig`
|
2571
|
+
# @return [Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1ExplicitContentDetectionConfig]
|
2572
|
+
attr_accessor :explicit_content_detection_config
|
2573
|
+
|
2574
|
+
# Config for LABEL_DETECTION.
|
2575
|
+
# Corresponds to the JSON property `labelDetectionConfig`
|
2576
|
+
# @return [Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1LabelDetectionConfig]
|
2577
|
+
attr_accessor :label_detection_config
|
2578
|
+
|
2579
|
+
# Video segments to annotate. The segments may overlap and are not required
|
2580
|
+
# to be contiguous or span the whole video. If unspecified, each video is
|
2581
|
+
# treated as a single segment.
|
2582
|
+
# Corresponds to the JSON property `segments`
|
2583
|
+
# @return [Array<Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1VideoSegment>]
|
2584
|
+
attr_accessor :segments
|
2585
|
+
|
2586
|
+
# Config for SHOT_CHANGE_DETECTION.
|
2587
|
+
# Corresponds to the JSON property `shotChangeDetectionConfig`
|
2588
|
+
# @return [Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1ShotChangeDetectionConfig]
|
2589
|
+
attr_accessor :shot_change_detection_config
|
2590
|
+
|
2591
|
+
# Config for SPEECH_TRANSCRIPTION.
|
2592
|
+
# Corresponds to the JSON property `speechTranscriptionConfig`
|
2593
|
+
# @return [Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1SpeechTranscriptionConfig]
|
2594
|
+
attr_accessor :speech_transcription_config
|
2595
|
+
|
2596
|
+
# Config for TEXT_DETECTION.
|
2597
|
+
# Corresponds to the JSON property `textDetectionConfig`
|
2598
|
+
# @return [Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1TextDetectionConfig]
|
2599
|
+
attr_accessor :text_detection_config
|
2600
|
+
|
2601
|
+
def initialize(**args)
|
2602
|
+
update!(**args)
|
2603
|
+
end
|
2604
|
+
|
2605
|
+
# Update properties of this object
|
2606
|
+
def update!(**args)
|
2607
|
+
@explicit_content_detection_config = args[:explicit_content_detection_config] if args.key?(:explicit_content_detection_config)
|
2608
|
+
@label_detection_config = args[:label_detection_config] if args.key?(:label_detection_config)
|
2609
|
+
@segments = args[:segments] if args.key?(:segments)
|
2610
|
+
@shot_change_detection_config = args[:shot_change_detection_config] if args.key?(:shot_change_detection_config)
|
2611
|
+
@speech_transcription_config = args[:speech_transcription_config] if args.key?(:speech_transcription_config)
|
2612
|
+
@text_detection_config = args[:text_detection_config] if args.key?(:text_detection_config)
|
2613
|
+
end
|
2614
|
+
end
|
2615
|
+
|
2616
|
+
# Video segment.
|
2617
|
+
class GoogleCloudVideointelligenceV1p2beta1VideoSegment
|
2618
|
+
include Google::Apis::Core::Hashable
|
2619
|
+
|
2620
|
+
# Time-offset, relative to the beginning of the video,
|
2621
|
+
# corresponding to the end of the segment (inclusive).
|
2622
|
+
# Corresponds to the JSON property `endTimeOffset`
|
2623
|
+
# @return [String]
|
2624
|
+
attr_accessor :end_time_offset
|
2625
|
+
|
2626
|
+
# Time-offset, relative to the beginning of the video,
|
2627
|
+
# corresponding to the start of the segment (inclusive).
|
2628
|
+
# Corresponds to the JSON property `startTimeOffset`
|
2629
|
+
# @return [String]
|
2630
|
+
attr_accessor :start_time_offset
|
2631
|
+
|
2632
|
+
def initialize(**args)
|
2633
|
+
update!(**args)
|
2634
|
+
end
|
2635
|
+
|
2636
|
+
# Update properties of this object
|
2637
|
+
def update!(**args)
|
2638
|
+
@end_time_offset = args[:end_time_offset] if args.key?(:end_time_offset)
|
2639
|
+
@start_time_offset = args[:start_time_offset] if args.key?(:start_time_offset)
|
2640
|
+
end
|
2641
|
+
end
|
2642
|
+
|
2643
|
+
# Word-specific information for recognized words. Word information is only
|
2644
|
+
# included in the response when certain request parameters are set, such
|
2645
|
+
# as `enable_word_time_offsets`.
|
2646
|
+
class GoogleCloudVideointelligenceV1p2beta1WordInfo
|
2647
|
+
include Google::Apis::Core::Hashable
|
2648
|
+
|
2649
|
+
# Output only. The confidence estimate between 0.0 and 1.0. A higher number
|
2650
|
+
# indicates an estimated greater likelihood that the recognized words are
|
2651
|
+
# correct. This field is set only for the top alternative.
|
2652
|
+
# This field is not guaranteed to be accurate and users should not rely on it
|
2653
|
+
# to be always provided.
|
2654
|
+
# The default of 0.0 is a sentinel value indicating `confidence` was not set.
|
2655
|
+
# Corresponds to the JSON property `confidence`
|
2656
|
+
# @return [Float]
|
2657
|
+
attr_accessor :confidence
|
2658
|
+
|
2659
|
+
# Time offset relative to the beginning of the audio, and
|
2660
|
+
# corresponding to the end of the spoken word. This field is only set if
|
2661
|
+
# `enable_word_time_offsets=true` and only in the top hypothesis. This is an
|
2662
|
+
# experimental feature and the accuracy of the time offset can vary.
|
2663
|
+
# Corresponds to the JSON property `endTime`
|
2664
|
+
# @return [String]
|
2665
|
+
attr_accessor :end_time
|
2666
|
+
|
2667
|
+
# Output only. A distinct integer value is assigned for every speaker within
|
2668
|
+
# the audio. This field specifies which one of those speakers was detected to
|
2669
|
+
# have spoken this word. Value ranges from 1 up to diarization_speaker_count,
|
2670
|
+
# and is only set if speaker diarization is enabled.
|
2671
|
+
# Corresponds to the JSON property `speakerTag`
|
2672
|
+
# @return [Fixnum]
|
2673
|
+
attr_accessor :speaker_tag
|
2674
|
+
|
2675
|
+
# Time offset relative to the beginning of the audio, and
|
2676
|
+
# corresponding to the start of the spoken word. This field is only set if
|
2677
|
+
# `enable_word_time_offsets=true` and only in the top hypothesis. This is an
|
2678
|
+
# experimental feature and the accuracy of the time offset can vary.
|
2679
|
+
# Corresponds to the JSON property `startTime`
|
2680
|
+
# @return [String]
|
2681
|
+
attr_accessor :start_time
|
2682
|
+
|
2683
|
+
# The word corresponding to this set of information.
|
2684
|
+
# Corresponds to the JSON property `word`
|
2685
|
+
# @return [String]
|
2686
|
+
attr_accessor :word
|
2687
|
+
|
2688
|
+
def initialize(**args)
|
2689
|
+
update!(**args)
|
2690
|
+
end
|
2691
|
+
|
2692
|
+
# Update properties of this object
|
2693
|
+
def update!(**args)
|
2694
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
2695
|
+
@end_time = args[:end_time] if args.key?(:end_time)
|
2696
|
+
@speaker_tag = args[:speaker_tag] if args.key?(:speaker_tag)
|
2697
|
+
@start_time = args[:start_time] if args.key?(:start_time)
|
2698
|
+
@word = args[:word] if args.key?(:word)
|
2699
|
+
end
|
2700
|
+
end
|
2701
|
+
|
2702
|
+
# This resource represents a long-running operation that is the result of a
|
2703
|
+
# network API call.
|
2704
|
+
class GoogleLongrunningOperation
|
2705
|
+
include Google::Apis::Core::Hashable
|
2706
|
+
|
2707
|
+
# If the value is `false`, it means the operation is still in progress.
|
2708
|
+
# If `true`, the operation is completed, and either `error` or `response` is
|
2709
|
+
# available.
|
2710
|
+
# Corresponds to the JSON property `done`
|
2711
|
+
# @return [Boolean]
|
2712
|
+
attr_accessor :done
|
2713
|
+
alias_method :done?, :done
|
2714
|
+
|
2715
|
+
# The `Status` type defines a logical error model that is suitable for different
|
2716
|
+
# programming environments, including REST APIs and RPC APIs. It is used by
|
2717
|
+
# [gRPC](https://github.com/grpc). The error model is designed to be:
|
2718
|
+
# - Simple to use and understand for most users
|
2719
|
+
# - Flexible enough to meet unexpected needs
|
2720
|
+
# # Overview
|
2721
|
+
# The `Status` message contains three pieces of data: error code, error message,
|
2722
|
+
# and error details. The error code should be an enum value of
|
2723
|
+
# google.rpc.Code, but it may accept additional error codes if needed. The
|
2724
|
+
# error message should be a developer-facing English message that helps
|
2725
|
+
# developers *understand* and *resolve* the error. If a localized user-facing
|
2726
|
+
# error message is needed, put the localized message in the error details or
|
2727
|
+
# localize it in the client. The optional error details may contain arbitrary
|
2728
|
+
# information about the error. There is a predefined set of error detail types
|
2729
|
+
# in the package `google.rpc` that can be used for common error conditions.
|
2730
|
+
# # Language mapping
|
2731
|
+
# The `Status` message is the logical representation of the error model, but it
|
2732
|
+
# is not necessarily the actual wire format. When the `Status` message is
|
2733
|
+
# exposed in different client libraries and different wire protocols, it can be
|
2734
|
+
# mapped differently. For example, it will likely be mapped to some exceptions
|
2735
|
+
# in Java, but more likely mapped to some error codes in C.
|
2736
|
+
# # Other uses
|
2737
|
+
# The error model and the `Status` message can be used in a variety of
|
2738
|
+
# environments, either with or without APIs, to provide a
|
2739
|
+
# consistent developer experience across different environments.
|
2740
|
+
# Example uses of this error model include:
|
2741
|
+
# - Partial errors. If a service needs to return partial errors to the client,
|
2742
|
+
# it may embed the `Status` in the normal response to indicate the partial
|
2743
|
+
# errors.
|
2744
|
+
# - Workflow errors. A typical workflow has multiple steps. Each step may
|
2745
|
+
# have a `Status` message for error reporting.
|
2746
|
+
# - Batch operations. If a client uses batch request and batch response, the
|
2747
|
+
# `Status` message should be used directly inside batch response, one for
|
2748
|
+
# each error sub-response.
|
2749
|
+
# - Asynchronous operations. If an API call embeds asynchronous operation
|
2750
|
+
# results in its response, the status of those operations should be
|
2751
|
+
# represented directly using the `Status` message.
|
2752
|
+
# - Logging. If some API errors are stored in logs, the message `Status` could
|
2753
|
+
# be used directly after any stripping needed for security/privacy reasons.
|
2754
|
+
# Corresponds to the JSON property `error`
|
2755
|
+
# @return [Google::Apis::VideointelligenceV1p2beta1::GoogleRpcStatus]
|
2756
|
+
attr_accessor :error
|
2757
|
+
|
2758
|
+
# Service-specific metadata associated with the operation. It typically
|
2759
|
+
# contains progress information and common metadata such as create time.
|
2760
|
+
# Some services might not provide such metadata. Any method that returns a
|
2761
|
+
# long-running operation should document the metadata type, if any.
|
2762
|
+
# Corresponds to the JSON property `metadata`
|
2763
|
+
# @return [Hash<String,Object>]
|
2764
|
+
attr_accessor :metadata
|
2765
|
+
|
2766
|
+
# The server-assigned name, which is only unique within the same service that
|
2767
|
+
# originally returns it. If you use the default HTTP mapping, the
|
2768
|
+
# `name` should have the format of `operations/some/unique/name`.
|
2769
|
+
# Corresponds to the JSON property `name`
|
2770
|
+
# @return [String]
|
2771
|
+
attr_accessor :name
|
2772
|
+
|
2773
|
+
# The normal response of the operation in case of success. If the original
|
2774
|
+
# method returns no data on success, such as `Delete`, the response is
|
2775
|
+
# `google.protobuf.Empty`. If the original method is standard
|
2776
|
+
# `Get`/`Create`/`Update`, the response should be the resource. For other
|
2777
|
+
# methods, the response should have the type `XxxResponse`, where `Xxx`
|
2778
|
+
# is the original method name. For example, if the original method name
|
2779
|
+
# is `TakeSnapshot()`, the inferred response type is
|
2780
|
+
# `TakeSnapshotResponse`.
|
2781
|
+
# Corresponds to the JSON property `response`
|
2782
|
+
# @return [Hash<String,Object>]
|
2783
|
+
attr_accessor :response
|
2784
|
+
|
2785
|
+
def initialize(**args)
|
2786
|
+
update!(**args)
|
2787
|
+
end
|
2788
|
+
|
2789
|
+
# Update properties of this object
|
2790
|
+
def update!(**args)
|
2791
|
+
@done = args[:done] if args.key?(:done)
|
2792
|
+
@error = args[:error] if args.key?(:error)
|
2793
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
2794
|
+
@name = args[:name] if args.key?(:name)
|
2795
|
+
@response = args[:response] if args.key?(:response)
|
2796
|
+
end
|
2797
|
+
end
|
2798
|
+
|
2799
|
+
# The `Status` type defines a logical error model that is suitable for different
|
2800
|
+
# programming environments, including REST APIs and RPC APIs. It is used by
|
2801
|
+
# [gRPC](https://github.com/grpc). The error model is designed to be:
|
2802
|
+
# - Simple to use and understand for most users
|
2803
|
+
# - Flexible enough to meet unexpected needs
|
2804
|
+
# # Overview
|
2805
|
+
# The `Status` message contains three pieces of data: error code, error message,
|
2806
|
+
# and error details. The error code should be an enum value of
|
2807
|
+
# google.rpc.Code, but it may accept additional error codes if needed. The
|
2808
|
+
# error message should be a developer-facing English message that helps
|
2809
|
+
# developers *understand* and *resolve* the error. If a localized user-facing
|
2810
|
+
# error message is needed, put the localized message in the error details or
|
2811
|
+
# localize it in the client. The optional error details may contain arbitrary
|
2812
|
+
# information about the error. There is a predefined set of error detail types
|
2813
|
+
# in the package `google.rpc` that can be used for common error conditions.
|
2814
|
+
# # Language mapping
|
2815
|
+
# The `Status` message is the logical representation of the error model, but it
|
2816
|
+
# is not necessarily the actual wire format. When the `Status` message is
|
2817
|
+
# exposed in different client libraries and different wire protocols, it can be
|
2818
|
+
# mapped differently. For example, it will likely be mapped to some exceptions
|
2819
|
+
# in Java, but more likely mapped to some error codes in C.
|
2820
|
+
# # Other uses
|
2821
|
+
# The error model and the `Status` message can be used in a variety of
|
2822
|
+
# environments, either with or without APIs, to provide a
|
2823
|
+
# consistent developer experience across different environments.
|
2824
|
+
# Example uses of this error model include:
|
2825
|
+
# - Partial errors. If a service needs to return partial errors to the client,
|
2826
|
+
# it may embed the `Status` in the normal response to indicate the partial
|
2827
|
+
# errors.
|
2828
|
+
# - Workflow errors. A typical workflow has multiple steps. Each step may
|
2829
|
+
# have a `Status` message for error reporting.
|
2830
|
+
# - Batch operations. If a client uses batch request and batch response, the
|
2831
|
+
# `Status` message should be used directly inside batch response, one for
|
2832
|
+
# each error sub-response.
|
2833
|
+
# - Asynchronous operations. If an API call embeds asynchronous operation
|
2834
|
+
# results in its response, the status of those operations should be
|
2835
|
+
# represented directly using the `Status` message.
|
2836
|
+
# - Logging. If some API errors are stored in logs, the message `Status` could
|
2837
|
+
# be used directly after any stripping needed for security/privacy reasons.
|
2838
|
+
class GoogleRpcStatus
|
2839
|
+
include Google::Apis::Core::Hashable
|
2840
|
+
|
2841
|
+
# The status code, which should be an enum value of google.rpc.Code.
|
2842
|
+
# Corresponds to the JSON property `code`
|
2843
|
+
# @return [Fixnum]
|
2844
|
+
attr_accessor :code
|
2845
|
+
|
2846
|
+
# A list of messages that carry the error details. There is a common set of
|
2847
|
+
# message types for APIs to use.
|
2848
|
+
# Corresponds to the JSON property `details`
|
2849
|
+
# @return [Array<Hash<String,Object>>]
|
2850
|
+
attr_accessor :details
|
2851
|
+
|
2852
|
+
# A developer-facing error message, which should be in English. Any
|
2853
|
+
# user-facing error message should be localized and sent in the
|
2854
|
+
# google.rpc.Status.details field, or localized by the client.
|
2855
|
+
# Corresponds to the JSON property `message`
|
2856
|
+
# @return [String]
|
2857
|
+
attr_accessor :message
|
2858
|
+
|
2859
|
+
def initialize(**args)
|
2860
|
+
update!(**args)
|
2861
|
+
end
|
2862
|
+
|
2863
|
+
# Update properties of this object
|
2864
|
+
def update!(**args)
|
2865
|
+
@code = args[:code] if args.key?(:code)
|
2866
|
+
@details = args[:details] if args.key?(:details)
|
2867
|
+
@message = args[:message] if args.key?(:message)
|
2868
|
+
end
|
2869
|
+
end
|
2870
|
+
end
|
2871
|
+
end
|
2872
|
+
end
|