google-cloud-video_intelligence-v1p1beta1 0.5.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +1 -1
- data/README.md +3 -3
- data/lib/google/cloud/video_intelligence/v1p1beta1/rest.rb +37 -0
- data/lib/google/cloud/video_intelligence/v1p1beta1/version.rb +1 -1
- data/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/client.rb +6 -6
- data/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/operations.rb +14 -16
- data/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/client.rb +394 -0
- data/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/operations.rb +814 -0
- data/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/service_stub.rb +106 -0
- data/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest.rb +52 -0
- data/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service.rb +7 -1
- data/lib/google/cloud/video_intelligence/v1p1beta1.rb +7 -2
- data/lib/google/cloud/videointelligence/v1p1beta1/video_intelligence_pb.rb +27 -124
- data/proto_docs/google/api/client.rb +381 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/protobuf/any.rb +7 -4
- data/proto_docs/google/protobuf/empty.rb +0 -2
- data/proto_docs/google/protobuf/timestamp.rb +1 -3
- data/proto_docs/google/rpc/status.rb +4 -2
- metadata +17 -8
data/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/service_stub.rb
ADDED
@@ -0,0 +1,106 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/videointelligence/v1p1beta1/video_intelligence_pb"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module VideoIntelligence
|
24
|
+
module V1p1beta1
|
25
|
+
module VideoIntelligenceService
|
26
|
+
module Rest
|
27
|
+
##
|
28
|
+
# REST service stub for the VideoIntelligenceService service.
|
29
|
+
# Service stub contains baseline method implementations
|
30
|
+
# including transcoding, making the REST call, and deserialing the response.
|
31
|
+
#
|
32
|
+
class ServiceStub
|
33
|
+
def initialize endpoint:, credentials:
|
34
|
+
# These require statements are intentionally placed here to initialize
|
35
|
+
# the REST modules only when it's required.
|
36
|
+
require "gapic/rest"
|
37
|
+
|
38
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
|
39
|
+
numeric_enums: true,
|
40
|
+
raise_faraday_errors: false
|
41
|
+
end
|
42
|
+
|
43
|
+
##
|
44
|
+
# Baseline implementation for the annotate_video REST call
|
45
|
+
#
|
46
|
+
# @param request_pb [::Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest]
|
47
|
+
# A request object representing the call parameters. Required.
|
48
|
+
# @param options [::Gapic::CallOptions]
|
49
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
50
|
+
#
|
51
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
52
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
53
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
54
|
+
#
|
55
|
+
# @return [::Google::Longrunning::Operation]
|
56
|
+
# A result object deserialized from the server's reply
|
57
|
+
def annotate_video request_pb, options = nil
|
58
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
59
|
+
|
60
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_annotate_video_request request_pb
|
61
|
+
query_string_params = if query_string_params.any?
|
62
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
63
|
+
else
|
64
|
+
{}
|
65
|
+
end
|
66
|
+
|
67
|
+
response = @client_stub.make_http_request(
|
68
|
+
verb,
|
69
|
+
uri: uri,
|
70
|
+
body: body || "",
|
71
|
+
params: query_string_params,
|
72
|
+
options: options
|
73
|
+
)
|
74
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
75
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
76
|
+
|
77
|
+
yield result, operation if block_given?
|
78
|
+
result
|
79
|
+
end
|
80
|
+
|
81
|
+
##
|
82
|
+
# @private
|
83
|
+
#
|
84
|
+
# GRPC transcoding helper method for the annotate_video REST call
|
85
|
+
#
|
86
|
+
# @param request_pb [::Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest]
|
87
|
+
# A request object representing the call parameters. Required.
|
88
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
89
|
+
# Uri, Body, Query string parameters
|
90
|
+
def self.transcode_annotate_video_request request_pb
|
91
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
92
|
+
.with_bindings(
|
93
|
+
uri_method: :post,
|
94
|
+
uri_template: "/v1p1beta1/videos:annotate",
|
95
|
+
body: "*",
|
96
|
+
matches: []
|
97
|
+
)
|
98
|
+
transcoder.transcode request_pb
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "gapic/rest"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/video_intelligence/v1p1beta1/version"
|
24
|
+
|
25
|
+
require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/credentials"
|
26
|
+
require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/operations"
|
27
|
+
require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/client"
|
28
|
+
|
29
|
+
module Google
|
30
|
+
module Cloud
|
31
|
+
module VideoIntelligence
|
32
|
+
module V1p1beta1
|
33
|
+
##
|
34
|
+
# Service that implements Google Cloud Video Intelligence API.
|
35
|
+
#
|
36
|
+
# To load this service and instantiate a REST client:
|
37
|
+
#
|
38
|
+
# require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest"
|
39
|
+
# client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Rest::Client.new
|
40
|
+
#
|
41
|
+
module VideoIntelligenceService
|
42
|
+
# Client for the REST transport
|
43
|
+
module Rest
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
helper_path = ::File.join __dir__, "rest", "helpers.rb"
|
52
|
+
require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/helpers" if ::File.file? helper_path
|
@@ -25,6 +25,7 @@ require "google/cloud/video_intelligence/v1p1beta1/version"
|
|
25
25
|
require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/credentials"
|
26
26
|
require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/operations"
|
27
27
|
require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/client"
|
28
|
+
require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest"
|
28
29
|
|
29
30
|
module Google
|
30
31
|
module Cloud
|
@@ -33,11 +34,16 @@ module Google
|
|
33
34
|
##
|
34
35
|
# Service that implements Google Cloud Video Intelligence API.
|
35
36
|
#
|
36
|
-
#
|
37
|
+
# @example Load this service and instantiate a gRPC client
|
37
38
|
#
|
38
39
|
# require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service"
|
39
40
|
# client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client.new
|
40
41
|
#
|
42
|
+
# @example Load this service and instantiate a REST client
|
43
|
+
#
|
44
|
+
# require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest"
|
45
|
+
# client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Rest::Client.new
|
46
|
+
#
|
41
47
|
module VideoIntelligenceService
|
42
48
|
end
|
43
49
|
end
|
@@ -23,13 +23,18 @@ module Google
|
|
23
23
|
module Cloud
|
24
24
|
module VideoIntelligence
|
25
25
|
##
|
26
|
-
#
|
26
|
+
# API client module.
|
27
27
|
#
|
28
|
-
# @example
|
28
|
+
# @example Load this package, including all its services, and instantiate a gRPC client
|
29
29
|
#
|
30
30
|
# require "google/cloud/video_intelligence/v1p1beta1"
|
31
31
|
# client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client.new
|
32
32
|
#
|
33
|
+
# @example Load this package, including all its services, and instantiate a REST client
|
34
|
+
#
|
35
|
+
# require "google/cloud/video_intelligence/v1p1beta1"
|
36
|
+
# client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Rest::Client.new
|
37
|
+
#
|
33
38
|
module V1p1beta1
|
34
39
|
end
|
35
40
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/cloud/videointelligence/v1p1beta1/video_intelligence.proto
|
3
4
|
|
@@ -11,132 +12,34 @@ require 'google/protobuf/duration_pb'
|
|
11
12
|
require 'google/protobuf/timestamp_pb'
|
12
13
|
require 'google/rpc/status_pb'
|
13
14
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
end
|
39
|
-
add_message "google.cloud.videointelligence.v1p1beta1.ExplicitContentDetectionConfig" do
|
40
|
-
optional :model, :string, 1
|
41
|
-
end
|
42
|
-
add_message "google.cloud.videointelligence.v1p1beta1.VideoSegment" do
|
43
|
-
optional :start_time_offset, :message, 1, "google.protobuf.Duration"
|
44
|
-
optional :end_time_offset, :message, 2, "google.protobuf.Duration"
|
45
|
-
end
|
46
|
-
add_message "google.cloud.videointelligence.v1p1beta1.LabelSegment" do
|
47
|
-
optional :segment, :message, 1, "google.cloud.videointelligence.v1p1beta1.VideoSegment"
|
48
|
-
optional :confidence, :float, 2
|
49
|
-
end
|
50
|
-
add_message "google.cloud.videointelligence.v1p1beta1.LabelFrame" do
|
51
|
-
optional :time_offset, :message, 1, "google.protobuf.Duration"
|
52
|
-
optional :confidence, :float, 2
|
53
|
-
end
|
54
|
-
add_message "google.cloud.videointelligence.v1p1beta1.Entity" do
|
55
|
-
optional :entity_id, :string, 1
|
56
|
-
optional :description, :string, 2
|
57
|
-
optional :language_code, :string, 3
|
58
|
-
end
|
59
|
-
add_message "google.cloud.videointelligence.v1p1beta1.LabelAnnotation" do
|
60
|
-
optional :entity, :message, 1, "google.cloud.videointelligence.v1p1beta1.Entity"
|
61
|
-
repeated :category_entities, :message, 2, "google.cloud.videointelligence.v1p1beta1.Entity"
|
62
|
-
repeated :segments, :message, 3, "google.cloud.videointelligence.v1p1beta1.LabelSegment"
|
63
|
-
repeated :frames, :message, 4, "google.cloud.videointelligence.v1p1beta1.LabelFrame"
|
64
|
-
end
|
65
|
-
add_message "google.cloud.videointelligence.v1p1beta1.ExplicitContentFrame" do
|
66
|
-
optional :time_offset, :message, 1, "google.protobuf.Duration"
|
67
|
-
optional :pornography_likelihood, :enum, 2, "google.cloud.videointelligence.v1p1beta1.Likelihood"
|
68
|
-
end
|
69
|
-
add_message "google.cloud.videointelligence.v1p1beta1.ExplicitContentAnnotation" do
|
70
|
-
repeated :frames, :message, 1, "google.cloud.videointelligence.v1p1beta1.ExplicitContentFrame"
|
71
|
-
end
|
72
|
-
add_message "google.cloud.videointelligence.v1p1beta1.VideoAnnotationResults" do
|
73
|
-
optional :input_uri, :string, 1
|
74
|
-
repeated :segment_label_annotations, :message, 2, "google.cloud.videointelligence.v1p1beta1.LabelAnnotation"
|
75
|
-
repeated :shot_label_annotations, :message, 3, "google.cloud.videointelligence.v1p1beta1.LabelAnnotation"
|
76
|
-
repeated :frame_label_annotations, :message, 4, "google.cloud.videointelligence.v1p1beta1.LabelAnnotation"
|
77
|
-
repeated :shot_annotations, :message, 6, "google.cloud.videointelligence.v1p1beta1.VideoSegment"
|
78
|
-
optional :explicit_annotation, :message, 7, "google.cloud.videointelligence.v1p1beta1.ExplicitContentAnnotation"
|
79
|
-
repeated :speech_transcriptions, :message, 11, "google.cloud.videointelligence.v1p1beta1.SpeechTranscription"
|
80
|
-
optional :error, :message, 9, "google.rpc.Status"
|
81
|
-
end
|
82
|
-
add_message "google.cloud.videointelligence.v1p1beta1.AnnotateVideoResponse" do
|
83
|
-
repeated :annotation_results, :message, 1, "google.cloud.videointelligence.v1p1beta1.VideoAnnotationResults"
|
84
|
-
end
|
85
|
-
add_message "google.cloud.videointelligence.v1p1beta1.VideoAnnotationProgress" do
|
86
|
-
optional :input_uri, :string, 1
|
87
|
-
optional :progress_percent, :int32, 2
|
88
|
-
optional :start_time, :message, 3, "google.protobuf.Timestamp"
|
89
|
-
optional :update_time, :message, 4, "google.protobuf.Timestamp"
|
90
|
-
end
|
91
|
-
add_message "google.cloud.videointelligence.v1p1beta1.AnnotateVideoProgress" do
|
92
|
-
repeated :annotation_progress, :message, 1, "google.cloud.videointelligence.v1p1beta1.VideoAnnotationProgress"
|
93
|
-
end
|
94
|
-
add_message "google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig" do
|
95
|
-
optional :language_code, :string, 1
|
96
|
-
optional :max_alternatives, :int32, 2
|
97
|
-
optional :filter_profanity, :bool, 3
|
98
|
-
repeated :speech_contexts, :message, 4, "google.cloud.videointelligence.v1p1beta1.SpeechContext"
|
99
|
-
optional :enable_automatic_punctuation, :bool, 5
|
100
|
-
repeated :audio_tracks, :int32, 6
|
101
|
-
end
|
102
|
-
add_message "google.cloud.videointelligence.v1p1beta1.SpeechContext" do
|
103
|
-
repeated :phrases, :string, 1
|
104
|
-
end
|
105
|
-
add_message "google.cloud.videointelligence.v1p1beta1.SpeechTranscription" do
|
106
|
-
repeated :alternatives, :message, 1, "google.cloud.videointelligence.v1p1beta1.SpeechRecognitionAlternative"
|
107
|
-
end
|
108
|
-
add_message "google.cloud.videointelligence.v1p1beta1.SpeechRecognitionAlternative" do
|
109
|
-
optional :transcript, :string, 1
|
110
|
-
optional :confidence, :float, 2
|
111
|
-
repeated :words, :message, 3, "google.cloud.videointelligence.v1p1beta1.WordInfo"
|
112
|
-
end
|
113
|
-
add_message "google.cloud.videointelligence.v1p1beta1.WordInfo" do
|
114
|
-
optional :start_time, :message, 1, "google.protobuf.Duration"
|
115
|
-
optional :end_time, :message, 2, "google.protobuf.Duration"
|
116
|
-
optional :word, :string, 3
|
117
|
-
end
|
118
|
-
add_enum "google.cloud.videointelligence.v1p1beta1.Feature" do
|
119
|
-
value :FEATURE_UNSPECIFIED, 0
|
120
|
-
value :LABEL_DETECTION, 1
|
121
|
-
value :SHOT_CHANGE_DETECTION, 2
|
122
|
-
value :EXPLICIT_CONTENT_DETECTION, 3
|
123
|
-
value :SPEECH_TRANSCRIPTION, 6
|
124
|
-
end
|
125
|
-
add_enum "google.cloud.videointelligence.v1p1beta1.LabelDetectionMode" do
|
126
|
-
value :LABEL_DETECTION_MODE_UNSPECIFIED, 0
|
127
|
-
value :SHOT_MODE, 1
|
128
|
-
value :FRAME_MODE, 2
|
129
|
-
value :SHOT_AND_FRAME_MODE, 3
|
130
|
-
end
|
131
|
-
add_enum "google.cloud.videointelligence.v1p1beta1.Likelihood" do
|
132
|
-
value :LIKELIHOOD_UNSPECIFIED, 0
|
133
|
-
value :VERY_UNLIKELY, 1
|
134
|
-
value :UNLIKELY, 2
|
135
|
-
value :POSSIBLE, 3
|
136
|
-
value :LIKELY, 4
|
137
|
-
value :VERY_LIKELY, 5
|
15
|
+
|
16
|
+
descriptor_data = "\nAgoogle/cloud/videointelligence/v1p1beta1/video_intelligence.proto\x12(google.cloud.videointelligence.v1p1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x8c\x02\n\x14\x41nnotateVideoRequest\x12\x11\n\tinput_uri\x18\x01 \x01(\t\x12\x15\n\rinput_content\x18\x06 \x01(\x0c\x12H\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0e\x32\x31.google.cloud.videointelligence.v1p1beta1.FeatureB\x03\xe0\x41\x02\x12M\n\rvideo_context\x18\x03 \x01(\x0b\x32\x36.google.cloud.videointelligence.v1p1beta1.VideoContext\x12\x17\n\noutput_uri\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0blocation_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x82\x04\n\x0cVideoContext\x12H\n\x08segments\x18\x01 \x03(\x0b\x32\x36.google.cloud.videointelligence.v1p1beta1.VideoSegment\x12^\n\x16label_detection_config\x18\x02 \x01(\x0b\x32>.google.cloud.videointelligence.v1p1beta1.LabelDetectionConfig\x12i\n\x1cshot_change_detection_config\x18\x03 \x01(\x0b\x32\x43.google.cloud.videointelligence.v1p1beta1.ShotChangeDetectionConfig\x12s\n!explicit_content_detection_config\x18\x04 \x01(\x0b\x32H.google.cloud.videointelligence.v1p1beta1.ExplicitContentDetectionConfig\x12h\n\x1bspeech_transcription_config\x18\x06 \x01(\x0b\x32\x43.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig\"\x9c\x01\n\x14LabelDetectionConfig\x12Z\n\x14label_detection_mode\x18\x01 \x01(\x0e\x32<.google.cloud.videointelligence.v1p1beta1.LabelDetectionMode\x12\x19\n\x11stationary_camera\x18\x02 \x01(\x08\x12\r\n\x05model\x18\x03 \x01(\t\"*\n\x19ShotChangeDetectionConfig\x12\r\n\x05model\x18\x01 \x01(\t\"/\n\x1e\x45xplicitContentDetectionConfig\x12\r\n\x05model\x18\x01 \x01(\t\"x\n\x0cVideoSegment\x12\x34\n\x11start_time_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\x0f\x65nd_time_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"k\n\x0cLabelSegment\x12G\n\x07segment\x18\x01 \x01(\x0b\x32\x36.google.cloud.videointelligence.v1p1beta1.VideoSegment\x12\x12\n\nconfidence\x18\x02 \x01(\x02\"P\n\nLabelFrame\x12.\n\x0btime_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\nconfidence\x18\x02 \x01(\x02\"G\n\x06\x45ntity\x12\x11\n\tentity_id\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x15\n\rlanguage_code\x18\x03 \x01(\t\"\xb0\x02\n\x0fLabelAnnotation\x12@\n\x06\x65ntity\x18\x01 \x01(\x0b\x32\x30.google.cloud.videointelligence.v1p1beta1.Entity\x12K\n\x11\x63\x61tegory_entities\x18\x02 \x03(\x0b\x32\x30.google.cloud.videointelligence.v1p1beta1.Entity\x12H\n\x08segments\x18\x03 \x03(\x0b\x32\x36.google.cloud.videointelligence.v1p1beta1.LabelSegment\x12\x44\n\x06\x66rames\x18\x04 \x03(\x0b\x32\x34.google.cloud.videointelligence.v1p1beta1.LabelFrame\"\x9c\x01\n\x14\x45xplicitContentFrame\x12.\n\x0btime_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12T\n\x16pornography_likelihood\x18\x02 \x01(\x0e\x32\x34.google.cloud.videointelligence.v1p1beta1.Likelihood\"k\n\x19\x45xplicitContentAnnotation\x12N\n\x06\x66rames\x18\x01 \x03(\x0b\x32>.google.cloud.videointelligence.v1p1beta1.ExplicitContentFrame\"\xf5\x04\n\x16VideoAnnotationResults\x12\x11\n\tinput_uri\x18\x01 \x01(\t\x12\\\n\x19segment_label_annotations\x18\x02 \x03(\x0b\x32\x39.google.cloud.videointelligence.v1p1beta1.LabelAnnotation\x12Y\n\x16shot_label_annotations\x18\x03 \x03(\x0b\x32\x39.google.cloud.videointelligence.v1p1beta1.LabelAnnotation\x12Z\n\x17\x66rame_label_annotations\x18\x04 \x03(\x0b\x32\x39.google.cloud.videointelligence.v1p1beta1.LabelAnnotation\x12P\n\x10shot_annotations\x18\x06 \x03(\x0b\x32\x36.google.cloud.videointelligence.v1p1beta1.VideoSegment\x12`\n\x13\x65xplicit_annotation\x18\x07 \x01(\x0b\x32\x43.google.cloud.videointelligence.v1p1beta1.ExplicitContentAnnotation\x12\\\n\x15speech_transcriptions\x18\x0b \x03(\x0b\x32=.google.cloud.videointelligence.v1p1beta1.SpeechTranscription\x12!\n\x05\x65rror\x18\t \x01(\x0b\x32\x12.google.rpc.Status\"u\n\x15\x41nnotateVideoResponse\x12\\\n\x12\x61nnotation_results\x18\x01 \x03(\x0b\x32@.google.cloud.videointelligence.v1p1beta1.VideoAnnotationResults\"\xa7\x01\n\x17VideoAnnotationProgress\x12\x11\n\tinput_uri\x18\x01 \x01(\t\x12\x18\n\x10progress_percent\x18\x02 \x01(\x05\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"w\n\x15\x41nnotateVideoProgress\x12^\n\x13\x61nnotation_progress\x18\x01 \x03(\x0b\x32\x41.google.cloud.videointelligence.v1p1beta1.VideoAnnotationProgress\"\x92\x02\n\x19SpeechTranscriptionConfig\x12\x1a\n\rlanguage_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10max_alternatives\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1d\n\x10\x66ilter_profanity\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12U\n\x0fspeech_contexts\x18\x04 \x03(\x0b\x32\x37.google.cloud.videointelligence.v1p1beta1.SpeechContextB\x03\xe0\x41\x01\x12)\n\x1c\x65nable_automatic_punctuation\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x19\n\x0c\x61udio_tracks\x18\x06 \x03(\x05\x42\x03\xe0\x41\x01\"%\n\rSpeechContext\x12\x14\n\x07phrases\x18\x01 \x03(\tB\x03\xe0\x41\x01\"s\n\x13SpeechTranscription\x12\\\n\x0c\x61lternatives\x18\x01 \x03(\x0b\x32\x46.google.cloud.videointelligence.v1p1beta1.SpeechRecognitionAlternative\"\x8e\x01\n\x1cSpeechRecognitionAlternative\x12\x12\n\ntranscript\x18\x01 \x01(\t\x12\x17\n\nconfidence\x18\x02 \x01(\x02\x42\x03\xe0\x41\x03\x12\x41\n\x05words\x18\x03 \x03(\x0b\x32\x32.google.cloud.videointelligence.v1p1beta1.WordInfo\"t\n\x08WordInfo\x12-\n\nstart_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12+\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0c\n\x04word\x18\x03 \x01(\t*\x8c\x01\n\x07\x46\x65\x61ture\x12\x17\n\x13\x46\x45\x41TURE_UNSPECIFIED\x10\x00\x12\x13\n\x0fLABEL_DETECTION\x10\x01\x12\x19\n\x15SHOT_CHANGE_DETECTION\x10\x02\x12\x1e\n\x1a\x45XPLICIT_CONTENT_DETECTION\x10\x03\x12\x18\n\x14SPEECH_TRANSCRIPTION\x10\x06*r\n\x12LabelDetectionMode\x12$\n LABEL_DETECTION_MODE_UNSPECIFIED\x10\x00\x12\r\n\tSHOT_MODE\x10\x01\x12\x0e\n\nFRAME_MODE\x10\x02\x12\x17\n\x13SHOT_AND_FRAME_MODE\x10\x03*t\n\nLikelihood\x12\x1a\n\x16LIKELIHOOD_UNSPECIFIED\x10\x00\x12\x11\n\rVERY_UNLIKELY\x10\x01\x12\x0c\n\x08UNLIKELY\x10\x02\x12\x0c\n\x08POSSIBLE\x10\x03\x12\n\n\x06LIKELY\x10\x04\x12\x0f\n\x0bVERY_LIKELY\x10\x05\x32\xce\x02\n\x18VideoIntelligenceService\x12\xdb\x01\n\rAnnotateVideo\x12>.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest\x1a\x1d.google.longrunning.Operation\"k\x82\xd3\xe4\x93\x02\x1f\"\x1a/v1p1beta1/videos:annotate:\x01*\xda\x41\x12input_uri,features\xca\x41.\n\x15\x41nnotateVideoResponse\x12\x15\x41nnotateVideoProgress\x1aT\xca\x41 videointelligence.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xaf\x02\n,com.google.cloud.videointelligence.v1p1beta1B\x1dVideoIntelligenceServiceProtoP\x01ZZcloud.google.com/go/videointelligence/apiv1p1beta1/videointelligencepb;videointelligencepb\xaa\x02(Google.Cloud.VideoIntelligence.V1P1Beta1\xca\x02(Google\\Cloud\\VideoIntelligence\\V1p1beta1\xea\x02+Google::Cloud::VideoIntelligence::V1p1beta1b\x06proto3"
|
17
|
+
|
18
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
19
|
+
|
20
|
+
begin
|
21
|
+
pool.add_serialized_file(descriptor_data)
|
22
|
+
rescue TypeError => e
|
23
|
+
# Compatibility code: will be removed in the next major version.
|
24
|
+
require 'google/protobuf/descriptor_pb'
|
25
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
26
|
+
parsed.clear_dependency
|
27
|
+
serialized = parsed.class.encode(parsed)
|
28
|
+
file = pool.add_serialized_file(serialized)
|
29
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
30
|
+
imports = [
|
31
|
+
["google.protobuf.Duration", "google/protobuf/duration.proto"],
|
32
|
+
["google.rpc.Status", "google/rpc/status.proto"],
|
33
|
+
["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
|
34
|
+
]
|
35
|
+
imports.each do |type_name, expected_filename|
|
36
|
+
import_file = pool.lookup(type_name).file_descriptor
|
37
|
+
if import_file.name != expected_filename
|
38
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
138
39
|
end
|
139
40
|
end
|
41
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
42
|
+
warn "This will become an error in the next major version."
|
140
43
|
end
|
141
44
|
|
142
45
|
module Google
|