google-cloud-video_intelligence-v1 0.1.0 → 0.1.1
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/AUTHENTICATION.md +6 -6
- data/README.md +1 -1
- data/lib/google/cloud/video_intelligence/v1.rb +1 -1
- data/lib/google/cloud/video_intelligence/v1/version.rb +1 -1
- data/lib/google/cloud/video_intelligence/v1/video_intelligence_service.rb +1 -1
- data/lib/google/cloud/video_intelligence/v1/video_intelligence_service/client.rb +59 -59
- data/lib/google/cloud/video_intelligence/v1/video_intelligence_service/credentials.rb +1 -1
- data/lib/google/cloud/video_intelligence/v1/video_intelligence_service/operations.rb +100 -100
- data/proto_docs/google/api/resource.rb +12 -12
- data/proto_docs/google/cloud/videointelligence/v1/video_intelligence.rb +209 -209
- data/proto_docs/google/longrunning/operations.rb +30 -30
- data/proto_docs/google/protobuf/any.rb +4 -4
- data/proto_docs/google/protobuf/duration.rb +4 -4
- data/proto_docs/google/protobuf/empty.rb +2 -2
- data/proto_docs/google/protobuf/timestamp.rb +4 -4
- data/proto_docs/google/rpc/status.rb +6 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb794509fdc8fe13624853834ad98abe62094378eeb4a1f8ae18ef81f7187e56
|
4
|
+
data.tar.gz: 1a0848eadeb79c85273037ee2c35e6bd3992aeabb4408dd6d8347d7eb8ac89c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62ad732e6329579c9fe4957a88565fc3113fcb40c84a2cd1187e6bf8742589531255f8018cea686ee8497f712f7a80264cab4feda72504b00432659a610584ad
|
7
|
+
data.tar.gz: c06fcf53bf88afba63c18257bf6c29dc71a57bde53b902b91a76f1ea0f64123cf0d2eccfcd3e200ce5db7dd583561f32ee345bc21fa366a52fd590fbb0292f37
|
data/AUTHENTICATION.md
CHANGED
@@ -27,7 +27,7 @@ export VIDEO_INTELLIGENCE_CREDENTIALS=path/to/keyfile.json
|
|
27
27
|
```ruby
|
28
28
|
require "google/cloud/video_intelligence/v1"
|
29
29
|
|
30
|
-
client = Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new
|
30
|
+
client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new
|
31
31
|
```
|
32
32
|
|
33
33
|
## Credential Lookup
|
@@ -64,7 +64,7 @@ containers where writing files is difficult or not encouraged.
|
|
64
64
|
|
65
65
|
The environment variables that google-cloud-video_intelligence-v1
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
|
-
{Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Credentials}):
|
67
|
+
{::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Credentials}):
|
68
68
|
|
69
69
|
1. `VIDEO_INTELLIGENCE_CREDENTIALS` - Path to JSON file, or JSON contents
|
70
70
|
2. `VIDEO_INTELLIGENCE_KEYFILE` - Path to JSON file, or JSON contents
|
@@ -77,7 +77,7 @@ require "google/cloud/video_intelligence/v1"
|
|
77
77
|
|
78
78
|
ENV["VIDEO_INTELLIGENCE_CREDENTIALS"] = "path/to/keyfile.json"
|
79
79
|
|
80
|
-
client = Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new
|
80
|
+
client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new
|
81
81
|
```
|
82
82
|
|
83
83
|
### Configuration
|
@@ -88,7 +88,7 @@ environment variables. Either on an individual client initialization:
|
|
88
88
|
```ruby
|
89
89
|
require "google/cloud/video_intelligence/v1"
|
90
90
|
|
91
|
-
client = Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new do |config|
|
91
|
+
client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new do |config|
|
92
92
|
config.credentials = "path/to/keyfile.json"
|
93
93
|
end
|
94
94
|
```
|
@@ -98,11 +98,11 @@ Or configured globally for all clients:
|
|
98
98
|
```ruby
|
99
99
|
require "google/cloud/video_intelligence/v1"
|
100
100
|
|
101
|
-
Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.configure do |config|
|
101
|
+
::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.configure do |config|
|
102
102
|
config.credentials = "path/to/keyfile.json"
|
103
103
|
end
|
104
104
|
|
105
|
-
client = Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new
|
105
|
+
client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new
|
106
106
|
```
|
107
107
|
|
108
108
|
### Cloud SDK
|
data/README.md
CHANGED
@@ -25,7 +25,7 @@ In order to use this library, you first need to go through the following steps:
|
|
25
25
|
```ruby
|
26
26
|
require "google/cloud/video_intelligence/v1"
|
27
27
|
|
28
|
-
client = Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new
|
28
|
+
client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new
|
29
29
|
request = my_create_request
|
30
30
|
response = client.annotate_video request
|
31
31
|
```
|
@@ -26,7 +26,7 @@ module Google
|
|
26
26
|
# To load this package, including all its services, and instantiate a client:
|
27
27
|
#
|
28
28
|
# require "google/cloud/video_intelligence/v1"
|
29
|
-
# client = Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new
|
29
|
+
# client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new
|
30
30
|
#
|
31
31
|
module V1
|
32
32
|
end
|
@@ -36,7 +36,7 @@ module Google
|
|
36
36
|
# To load this service and instantiate a client:
|
37
37
|
#
|
38
38
|
# require "google/cloud/video_intelligence/v1/video_intelligence_service"
|
39
|
-
# client = Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new
|
39
|
+
# client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new
|
40
40
|
#
|
41
41
|
module VideoIntelligenceService
|
42
42
|
end
|
@@ -36,15 +36,15 @@ module Google
|
|
36
36
|
##
|
37
37
|
# Configure the VideoIntelligenceService Client class.
|
38
38
|
#
|
39
|
-
# See {Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client::Configuration}
|
39
|
+
# See {::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client::Configuration}
|
40
40
|
# for a description of the configuration fields.
|
41
41
|
#
|
42
42
|
# ## Example
|
43
43
|
#
|
44
44
|
# To modify the configuration for all VideoIntelligenceService clients:
|
45
45
|
#
|
46
|
-
# Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.configure do |config|
|
47
|
-
# config.timeout =
|
46
|
+
# ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.configure do |config|
|
47
|
+
# config.timeout = 10.0
|
48
48
|
# end
|
49
49
|
#
|
50
50
|
# @yield [config] Configure the Client client.
|
@@ -84,7 +84,7 @@ module Google
|
|
84
84
|
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
85
85
|
# should be made on {Client.configure}.
|
86
86
|
#
|
87
|
-
# See {Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client::Configuration}
|
87
|
+
# See {::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client::Configuration}
|
88
88
|
# for a description of the configuration fields.
|
89
89
|
#
|
90
90
|
# @yield [config] Configure the Client client.
|
@@ -105,13 +105,13 @@ module Google
|
|
105
105
|
# To create a new VideoIntelligenceService client with the default
|
106
106
|
# configuration:
|
107
107
|
#
|
108
|
-
# client = Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new
|
108
|
+
# client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new
|
109
109
|
#
|
110
110
|
# To create a new VideoIntelligenceService client with a custom
|
111
111
|
# configuration:
|
112
112
|
#
|
113
|
-
# client = Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new do |config|
|
114
|
-
# config.timeout =
|
113
|
+
# client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new do |config|
|
114
|
+
# config.timeout = 10.0
|
115
115
|
# end
|
116
116
|
#
|
117
117
|
# @yield [config] Configure the VideoIntelligenceService client.
|
@@ -143,8 +143,8 @@ module Google
|
|
143
143
|
config.endpoint = @config.endpoint
|
144
144
|
end
|
145
145
|
|
146
|
-
@video_intelligence_service_stub = Gapic::ServiceStub.new(
|
147
|
-
Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Stub,
|
146
|
+
@video_intelligence_service_stub = ::Gapic::ServiceStub.new(
|
147
|
+
::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Stub,
|
148
148
|
credentials: credentials,
|
149
149
|
endpoint: @config.endpoint,
|
150
150
|
channel_args: @config.channel_args,
|
@@ -155,7 +155,7 @@ module Google
|
|
155
155
|
##
|
156
156
|
# Get the associated client for long-running operations.
|
157
157
|
#
|
158
|
-
# @return [Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Operations]
|
158
|
+
# @return [::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Operations]
|
159
159
|
#
|
160
160
|
attr_reader :operations_client
|
161
161
|
|
@@ -169,12 +169,12 @@ module Google
|
|
169
169
|
#
|
170
170
|
# @overload annotate_video(request, options = nil)
|
171
171
|
# Pass arguments to `annotate_video` via a request object, either of type
|
172
|
-
# {Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest} or an equivalent Hash.
|
172
|
+
# {::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest} or an equivalent Hash.
|
173
173
|
#
|
174
|
-
# @param request [Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest, Hash]
|
174
|
+
# @param request [::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest, ::Hash]
|
175
175
|
# A request object representing the call parameters. Required. To specify no
|
176
176
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
177
|
-
# @param options [Gapic::CallOptions, Hash]
|
177
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
178
178
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
179
179
|
#
|
180
180
|
# @overload annotate_video(input_uri: nil, input_content: nil, features: nil, video_context: nil, output_uri: nil, location_id: nil)
|
@@ -182,7 +182,7 @@ module Google
|
|
182
182
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
183
183
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
184
184
|
#
|
185
|
-
# @param input_uri [String]
|
185
|
+
# @param input_uri [::String]
|
186
186
|
# Input video location. Currently, only
|
187
187
|
# [Google Cloud Storage](https://cloud.google.com/storage/) URIs are
|
188
188
|
# supported, which must be specified in the following format:
|
@@ -193,47 +193,47 @@ module Google
|
|
193
193
|
# multiple videos. Supported wildcards: '*' to match 0 or more characters;
|
194
194
|
# '?' to match 1 character. If unset, the input video should be embedded
|
195
195
|
# in the request as `input_content`. If set, `input_content` should be unset.
|
196
|
-
# @param input_content [String]
|
196
|
+
# @param input_content [::String]
|
197
197
|
# The video data bytes.
|
198
198
|
# If unset, the input video(s) should be specified via `input_uri`.
|
199
199
|
# If set, `input_uri` should be unset.
|
200
|
-
# @param features [Array
|
200
|
+
# @param features [::Array<::Google::Cloud::VideoIntelligence::V1::Feature>]
|
201
201
|
# Required. Requested video annotation features.
|
202
|
-
# @param video_context [Google::Cloud::VideoIntelligence::V1::VideoContext, Hash]
|
202
|
+
# @param video_context [::Google::Cloud::VideoIntelligence::V1::VideoContext, ::Hash]
|
203
203
|
# Additional video context and/or feature-specific parameters.
|
204
|
-
# @param output_uri [String]
|
204
|
+
# @param output_uri [::String]
|
205
205
|
# Optional. Location where the output (in JSON format) should be stored.
|
206
206
|
# Currently, only [Google Cloud Storage](https://cloud.google.com/storage/)
|
207
207
|
# URIs are supported, which must be specified in the following format:
|
208
208
|
# `gs://bucket-id/object-id` (other URI formats return
|
209
209
|
# [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
|
210
210
|
# [Request URIs](https://cloud.google.com/storage/docs/request-endpoints).
|
211
|
-
# @param location_id [String]
|
211
|
+
# @param location_id [::String]
|
212
212
|
# Optional. Cloud region where annotation should take place. Supported cloud
|
213
213
|
# regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region
|
214
214
|
# is specified, a region will be determined based on video file location.
|
215
215
|
#
|
216
216
|
# @yield [response, operation] Access the result along with the RPC operation
|
217
|
-
# @yieldparam response [Gapic::Operation]
|
218
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
217
|
+
# @yieldparam response [::Gapic::Operation]
|
218
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
219
219
|
#
|
220
|
-
# @return [Gapic::Operation]
|
220
|
+
# @return [::Gapic::Operation]
|
221
221
|
#
|
222
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
222
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
223
223
|
#
|
224
224
|
def annotate_video request, options = nil
|
225
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
225
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
226
226
|
|
227
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest
|
227
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest
|
228
228
|
|
229
229
|
# Converts hash and nil to an options object
|
230
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
230
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
231
231
|
|
232
232
|
# Customize the options with defaults
|
233
233
|
metadata = @config.rpcs.annotate_video.metadata.to_h
|
234
234
|
|
235
235
|
# Set x-goog-api-client and x-goog-user-project headers
|
236
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
236
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
237
237
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
238
238
|
gapic_version: ::Google::Cloud::VideoIntelligence::V1::VERSION
|
239
239
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -245,12 +245,12 @@ module Google
|
|
245
245
|
retry_policy: @config.retry_policy
|
246
246
|
|
247
247
|
@video_intelligence_service_stub.call_rpc :annotate_video, request, options: options do |response, operation|
|
248
|
-
response = Gapic::Operation.new response, @operations_client, options: options
|
248
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
249
249
|
yield response, operation if block_given?
|
250
250
|
return response
|
251
251
|
end
|
252
|
-
rescue GRPC::BadStatus => e
|
253
|
-
raise Google::Cloud::Error.from_error(e)
|
252
|
+
rescue ::GRPC::BadStatus => e
|
253
|
+
raise ::Google::Cloud::Error.from_error(e)
|
254
254
|
end
|
255
255
|
|
256
256
|
##
|
@@ -260,7 +260,7 @@ module Google
|
|
260
260
|
# providing control over timeouts, retry behavior, logging, transport
|
261
261
|
# parameters, and other low-level controls. Certain parameters can also be
|
262
262
|
# applied individually to specific RPCs. See
|
263
|
-
# {Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client::Configuration::Rpcs}
|
263
|
+
# {::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client::Configuration::Rpcs}
|
264
264
|
# for a list of RPCs that can be configured independently.
|
265
265
|
#
|
266
266
|
# Configuration can be applied globally to all clients, or to a single client
|
@@ -271,22 +271,22 @@ module Google
|
|
271
271
|
# To modify the global config, setting the timeout for annotate_video
|
272
272
|
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
273
273
|
#
|
274
|
-
# Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.configure do |config|
|
275
|
-
# config.timeout =
|
276
|
-
# config.rpcs.annotate_video.timeout =
|
274
|
+
# ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.configure do |config|
|
275
|
+
# config.timeout = 10.0
|
276
|
+
# config.rpcs.annotate_video.timeout = 20.0
|
277
277
|
# end
|
278
278
|
#
|
279
279
|
# To apply the above configuration only to a new client:
|
280
280
|
#
|
281
|
-
# client = Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new do |config|
|
282
|
-
# config.timeout =
|
283
|
-
# config.rpcs.annotate_video.timeout =
|
281
|
+
# client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new do |config|
|
282
|
+
# config.timeout = 10.0
|
283
|
+
# config.rpcs.annotate_video.timeout = 20.0
|
284
284
|
# end
|
285
285
|
#
|
286
286
|
# @!attribute [rw] endpoint
|
287
287
|
# The hostname or hostname:port of the service endpoint.
|
288
288
|
# Defaults to `"videointelligence.googleapis.com"`.
|
289
|
-
# @return [String]
|
289
|
+
# @return [::String]
|
290
290
|
# @!attribute [rw] credentials
|
291
291
|
# Credentials to send with calls. You may provide any of the following types:
|
292
292
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -298,29 +298,29 @@ module Google
|
|
298
298
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
299
299
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
300
300
|
# * (`nil`) indicating no credentials
|
301
|
-
# @return [Object]
|
301
|
+
# @return [::Object]
|
302
302
|
# @!attribute [rw] scope
|
303
303
|
# The OAuth scopes
|
304
|
-
# @return [Array
|
304
|
+
# @return [::Array<::String>]
|
305
305
|
# @!attribute [rw] lib_name
|
306
306
|
# The library name as recorded in instrumentation and logging
|
307
|
-
# @return [String]
|
307
|
+
# @return [::String]
|
308
308
|
# @!attribute [rw] lib_version
|
309
309
|
# The library version as recorded in instrumentation and logging
|
310
|
-
# @return [String]
|
310
|
+
# @return [::String]
|
311
311
|
# @!attribute [rw] channel_args
|
312
312
|
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
313
313
|
# `GRPC::Core::Channel` object is provided as the credential.
|
314
|
-
# @return [Hash]
|
314
|
+
# @return [::Hash]
|
315
315
|
# @!attribute [rw] interceptors
|
316
316
|
# An array of interceptors that are run before calls are executed.
|
317
|
-
# @return [Array
|
317
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
318
318
|
# @!attribute [rw] timeout
|
319
|
-
# The call timeout in
|
320
|
-
# @return [Numeric]
|
319
|
+
# The call timeout in seconds.
|
320
|
+
# @return [::Numeric]
|
321
321
|
# @!attribute [rw] metadata
|
322
322
|
# Additional gRPC headers to be sent with the call.
|
323
|
-
# @return [Hash{Symbol
|
323
|
+
# @return [::Hash{::Symbol=>::String}]
|
324
324
|
# @!attribute [rw] retry_policy
|
325
325
|
# The retry policy. The value is a hash with the following keys:
|
326
326
|
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
@@ -328,10 +328,10 @@ module Google
|
|
328
328
|
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
329
329
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
330
330
|
# trigger a retry.
|
331
|
-
# @return [Hash]
|
331
|
+
# @return [::Hash]
|
332
332
|
#
|
333
333
|
class Configuration
|
334
|
-
extend Gapic::Config
|
334
|
+
extend ::Gapic::Config
|
335
335
|
|
336
336
|
config_attr :endpoint, "videointelligence.googleapis.com", String
|
337
337
|
config_attr :credentials, nil do |value|
|
@@ -339,14 +339,14 @@ module Google
|
|
339
339
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
340
340
|
allowed.any? { |klass| klass === value }
|
341
341
|
end
|
342
|
-
config_attr :scope, nil, String, Array, nil
|
343
|
-
config_attr :lib_name, nil, String, nil
|
344
|
-
config_attr :lib_version, nil, String, nil
|
345
|
-
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, Hash, nil)
|
346
|
-
config_attr :interceptors, nil, Array, nil
|
347
|
-
config_attr :timeout, nil, Numeric, nil
|
348
|
-
config_attr :metadata, nil, Hash, nil
|
349
|
-
config_attr :retry_policy, nil, Hash, Proc, nil
|
342
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
343
|
+
config_attr :lib_name, nil, ::String, nil
|
344
|
+
config_attr :lib_version, nil, ::String, nil
|
345
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
346
|
+
config_attr :interceptors, nil, ::Array, nil
|
347
|
+
config_attr :timeout, nil, ::Numeric, nil
|
348
|
+
config_attr :metadata, nil, ::Hash, nil
|
349
|
+
config_attr :retry_policy, nil, ::Hash, Proc, nil
|
350
350
|
|
351
351
|
# @private
|
352
352
|
def initialize parent_config = nil
|
@@ -387,14 +387,14 @@ module Google
|
|
387
387
|
class Rpcs
|
388
388
|
##
|
389
389
|
# RPC-specific configuration for `annotate_video`
|
390
|
-
# @return [Gapic::Config::Method]
|
390
|
+
# @return [::Gapic::Config::Method]
|
391
391
|
#
|
392
392
|
attr_reader :annotate_video
|
393
393
|
|
394
394
|
# @private
|
395
395
|
def initialize parent_rpcs = nil
|
396
396
|
annotate_video_config = parent_rpcs&.annotate_video if parent_rpcs&.respond_to? :annotate_video
|
397
|
-
@annotate_video = Gapic::Config::Method.new annotate_video_config
|
397
|
+
@annotate_video = ::Gapic::Config::Method.new annotate_video_config
|
398
398
|
|
399
399
|
yield self if block_given?
|
400
400
|
end
|
@@ -24,7 +24,7 @@ module Google
|
|
24
24
|
module V1
|
25
25
|
module VideoIntelligenceService
|
26
26
|
# Credentials for the VideoIntelligenceService API.
|
27
|
-
class Credentials < Google::Auth::Credentials
|
27
|
+
class Credentials < ::Google::Auth::Credentials
|
28
28
|
self.scope = [
|
29
29
|
"https://www.googleapis.com/auth/cloud-platform"
|
30
30
|
]
|
@@ -86,8 +86,8 @@ module Google
|
|
86
86
|
credentials = Credentials.new credentials, scope: @config.scope
|
87
87
|
end
|
88
88
|
|
89
|
-
@operations_stub = Gapic::ServiceStub.new(
|
90
|
-
Google::Longrunning::Operations::Stub,
|
89
|
+
@operations_stub = ::Gapic::ServiceStub.new(
|
90
|
+
::Google::Longrunning::Operations::Stub,
|
91
91
|
credentials: credentials,
|
92
92
|
endpoint: @config.endpoint,
|
93
93
|
channel_args: @config.channel_args,
|
@@ -106,12 +106,12 @@ module Google
|
|
106
106
|
#
|
107
107
|
# @overload list_operations(request, options = nil)
|
108
108
|
# Pass arguments to `list_operations` via a request object, either of type
|
109
|
-
# {Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
|
109
|
+
# {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
|
110
110
|
#
|
111
|
-
# @param request [Google::Longrunning::ListOperationsRequest, Hash]
|
111
|
+
# @param request [::Google::Longrunning::ListOperationsRequest, ::Hash]
|
112
112
|
# A request object representing the call parameters. Required. To specify no
|
113
113
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
114
|
-
# @param options [Gapic::CallOptions, Hash]
|
114
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
115
115
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
116
116
|
#
|
117
117
|
# @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil)
|
@@ -119,36 +119,36 @@ module Google
|
|
119
119
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
120
120
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
121
121
|
#
|
122
|
-
# @param name [String]
|
122
|
+
# @param name [::String]
|
123
123
|
# The name of the operation collection.
|
124
|
-
# @param filter [String]
|
124
|
+
# @param filter [::String]
|
125
125
|
# The standard list filter.
|
126
|
-
# @param page_size [Integer]
|
126
|
+
# @param page_size [::Integer]
|
127
127
|
# The standard list page size.
|
128
|
-
# @param page_token [String]
|
128
|
+
# @param page_token [::String]
|
129
129
|
# The standard list page token.
|
130
130
|
#
|
131
131
|
# @yield [response, operation] Access the result along with the RPC operation
|
132
|
-
# @yieldparam response [Gapic::PagedEnumerable
|
133
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
132
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>]
|
133
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
134
134
|
#
|
135
|
-
# @return [Gapic::PagedEnumerable
|
135
|
+
# @return [::Gapic::PagedEnumerable<::Gapic::Operation>]
|
136
136
|
#
|
137
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
137
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
138
138
|
#
|
139
139
|
def list_operations request, options = nil
|
140
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
140
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
141
141
|
|
142
|
-
request = Gapic::Protobuf.coerce request, to: Google::Longrunning::ListOperationsRequest
|
142
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest
|
143
143
|
|
144
144
|
# Converts hash and nil to an options object
|
145
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
145
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
146
146
|
|
147
147
|
# Customize the options with defaults
|
148
148
|
metadata = @config.rpcs.list_operations.metadata.to_h
|
149
149
|
|
150
150
|
# Set x-goog-api-client and x-goog-user-project headers
|
151
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
151
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
152
152
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
153
153
|
gapic_version: ::Google::Cloud::VideoIntelligence::V1::VERSION
|
154
154
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -166,13 +166,13 @@ module Google
|
|
166
166
|
retry_policy: @config.retry_policy
|
167
167
|
|
168
168
|
@operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
|
169
|
-
wrap_lro_operation = ->(op_response) { Gapic::Operation.new op_response, @operations_client }
|
170
|
-
response = Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
|
169
|
+
wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
|
170
|
+
response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
|
171
171
|
yield response, operation if block_given?
|
172
172
|
return response
|
173
173
|
end
|
174
|
-
rescue GRPC::BadStatus => e
|
175
|
-
raise Google::Cloud::Error.from_error(e)
|
174
|
+
rescue ::GRPC::BadStatus => e
|
175
|
+
raise ::Google::Cloud::Error.from_error(e)
|
176
176
|
end
|
177
177
|
|
178
178
|
##
|
@@ -182,12 +182,12 @@ module Google
|
|
182
182
|
#
|
183
183
|
# @overload get_operation(request, options = nil)
|
184
184
|
# Pass arguments to `get_operation` via a request object, either of type
|
185
|
-
# {Google::Longrunning::GetOperationRequest} or an equivalent Hash.
|
185
|
+
# {::Google::Longrunning::GetOperationRequest} or an equivalent Hash.
|
186
186
|
#
|
187
|
-
# @param request [Google::Longrunning::GetOperationRequest, Hash]
|
187
|
+
# @param request [::Google::Longrunning::GetOperationRequest, ::Hash]
|
188
188
|
# A request object representing the call parameters. Required. To specify no
|
189
189
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
190
|
-
# @param options [Gapic::CallOptions, Hash]
|
190
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
191
191
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
192
192
|
#
|
193
193
|
# @overload get_operation(name: nil)
|
@@ -195,30 +195,30 @@ module Google
|
|
195
195
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
196
196
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
197
197
|
#
|
198
|
-
# @param name [String]
|
198
|
+
# @param name [::String]
|
199
199
|
# The name of the operation resource.
|
200
200
|
#
|
201
201
|
# @yield [response, operation] Access the result along with the RPC operation
|
202
|
-
# @yieldparam response [Gapic::Operation]
|
203
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
202
|
+
# @yieldparam response [::Gapic::Operation]
|
203
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
204
204
|
#
|
205
|
-
# @return [Gapic::Operation]
|
205
|
+
# @return [::Gapic::Operation]
|
206
206
|
#
|
207
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
207
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
208
208
|
#
|
209
209
|
def get_operation request, options = nil
|
210
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
210
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
211
211
|
|
212
|
-
request = Gapic::Protobuf.coerce request, to: Google::Longrunning::GetOperationRequest
|
212
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest
|
213
213
|
|
214
214
|
# Converts hash and nil to an options object
|
215
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
215
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
216
216
|
|
217
217
|
# Customize the options with defaults
|
218
218
|
metadata = @config.rpcs.get_operation.metadata.to_h
|
219
219
|
|
220
220
|
# Set x-goog-api-client and x-goog-user-project headers
|
221
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
221
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
222
222
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
223
223
|
gapic_version: ::Google::Cloud::VideoIntelligence::V1::VERSION
|
224
224
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -236,12 +236,12 @@ module Google
|
|
236
236
|
retry_policy: @config.retry_policy
|
237
237
|
|
238
238
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
239
|
-
response = Gapic::Operation.new response, @operations_client, options: options
|
239
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
240
240
|
yield response, operation if block_given?
|
241
241
|
return response
|
242
242
|
end
|
243
|
-
rescue GRPC::BadStatus => e
|
244
|
-
raise Google::Cloud::Error.from_error(e)
|
243
|
+
rescue ::GRPC::BadStatus => e
|
244
|
+
raise ::Google::Cloud::Error.from_error(e)
|
245
245
|
end
|
246
246
|
|
247
247
|
##
|
@@ -252,12 +252,12 @@ module Google
|
|
252
252
|
#
|
253
253
|
# @overload delete_operation(request, options = nil)
|
254
254
|
# Pass arguments to `delete_operation` via a request object, either of type
|
255
|
-
# {Google::Longrunning::DeleteOperationRequest} or an equivalent Hash.
|
255
|
+
# {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash.
|
256
256
|
#
|
257
|
-
# @param request [Google::Longrunning::DeleteOperationRequest, Hash]
|
257
|
+
# @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash]
|
258
258
|
# A request object representing the call parameters. Required. To specify no
|
259
259
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
260
|
-
# @param options [Gapic::CallOptions, Hash]
|
260
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
261
261
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
262
262
|
#
|
263
263
|
# @overload delete_operation(name: nil)
|
@@ -265,30 +265,30 @@ module Google
|
|
265
265
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
266
266
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
267
267
|
#
|
268
|
-
# @param name [String]
|
268
|
+
# @param name [::String]
|
269
269
|
# The name of the operation resource to be deleted.
|
270
270
|
#
|
271
271
|
# @yield [response, operation] Access the result along with the RPC operation
|
272
|
-
# @yieldparam response [Google::Protobuf::Empty]
|
273
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
272
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
273
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
274
274
|
#
|
275
|
-
# @return [Google::Protobuf::Empty]
|
275
|
+
# @return [::Google::Protobuf::Empty]
|
276
276
|
#
|
277
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
277
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
278
278
|
#
|
279
279
|
def delete_operation request, options = nil
|
280
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
280
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
281
281
|
|
282
|
-
request = Gapic::Protobuf.coerce request, to: Google::Longrunning::DeleteOperationRequest
|
282
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest
|
283
283
|
|
284
284
|
# Converts hash and nil to an options object
|
285
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
285
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
286
286
|
|
287
287
|
# Customize the options with defaults
|
288
288
|
metadata = @config.rpcs.delete_operation.metadata.to_h
|
289
289
|
|
290
290
|
# Set x-goog-api-client and x-goog-user-project headers
|
291
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
291
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
292
292
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
293
293
|
gapic_version: ::Google::Cloud::VideoIntelligence::V1::VERSION
|
294
294
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -309,8 +309,8 @@ module Google
|
|
309
309
|
yield response, operation if block_given?
|
310
310
|
return response
|
311
311
|
end
|
312
|
-
rescue GRPC::BadStatus => e
|
313
|
-
raise Google::Cloud::Error.from_error(e)
|
312
|
+
rescue ::GRPC::BadStatus => e
|
313
|
+
raise ::Google::Cloud::Error.from_error(e)
|
314
314
|
end
|
315
315
|
|
316
316
|
##
|
@@ -322,17 +322,17 @@ module Google
|
|
322
322
|
# other methods to check whether the cancellation succeeded or whether the
|
323
323
|
# operation completed despite cancellation. On successful cancellation,
|
324
324
|
# the operation is not deleted; instead, it becomes an operation with
|
325
|
-
# an {Google::Longrunning::Operation#error Operation.error} value with a {Google::Rpc::Status#code google.rpc.Status.code} of 1,
|
325
|
+
# an {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
|
326
326
|
# corresponding to `Code.CANCELLED`.
|
327
327
|
#
|
328
328
|
# @overload cancel_operation(request, options = nil)
|
329
329
|
# Pass arguments to `cancel_operation` via a request object, either of type
|
330
|
-
# {Google::Longrunning::CancelOperationRequest} or an equivalent Hash.
|
330
|
+
# {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash.
|
331
331
|
#
|
332
|
-
# @param request [Google::Longrunning::CancelOperationRequest, Hash]
|
332
|
+
# @param request [::Google::Longrunning::CancelOperationRequest, ::Hash]
|
333
333
|
# A request object representing the call parameters. Required. To specify no
|
334
334
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
335
|
-
# @param options [Gapic::CallOptions, Hash]
|
335
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
336
336
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
337
337
|
#
|
338
338
|
# @overload cancel_operation(name: nil)
|
@@ -340,30 +340,30 @@ module Google
|
|
340
340
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
341
341
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
342
342
|
#
|
343
|
-
# @param name [String]
|
343
|
+
# @param name [::String]
|
344
344
|
# The name of the operation resource to be cancelled.
|
345
345
|
#
|
346
346
|
# @yield [response, operation] Access the result along with the RPC operation
|
347
|
-
# @yieldparam response [Google::Protobuf::Empty]
|
348
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
347
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
348
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
349
349
|
#
|
350
|
-
# @return [Google::Protobuf::Empty]
|
350
|
+
# @return [::Google::Protobuf::Empty]
|
351
351
|
#
|
352
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
352
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
353
353
|
#
|
354
354
|
def cancel_operation request, options = nil
|
355
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
355
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
356
356
|
|
357
|
-
request = Gapic::Protobuf.coerce request, to: Google::Longrunning::CancelOperationRequest
|
357
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest
|
358
358
|
|
359
359
|
# Converts hash and nil to an options object
|
360
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
360
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
361
361
|
|
362
362
|
# Customize the options with defaults
|
363
363
|
metadata = @config.rpcs.cancel_operation.metadata.to_h
|
364
364
|
|
365
365
|
# Set x-goog-api-client and x-goog-user-project headers
|
366
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
366
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
367
367
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
368
368
|
gapic_version: ::Google::Cloud::VideoIntelligence::V1::VERSION
|
369
369
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -384,8 +384,8 @@ module Google
|
|
384
384
|
yield response, operation if block_given?
|
385
385
|
return response
|
386
386
|
end
|
387
|
-
rescue GRPC::BadStatus => e
|
388
|
-
raise Google::Cloud::Error.from_error(e)
|
387
|
+
rescue ::GRPC::BadStatus => e
|
388
|
+
raise ::Google::Cloud::Error.from_error(e)
|
389
389
|
end
|
390
390
|
|
391
391
|
##
|
@@ -395,7 +395,7 @@ module Google
|
|
395
395
|
# providing control over timeouts, retry behavior, logging, transport
|
396
396
|
# parameters, and other low-level controls. Certain parameters can also be
|
397
397
|
# applied individually to specific RPCs. See
|
398
|
-
# {Google::Longrunning::Operations::Client::Configuration::Rpcs}
|
398
|
+
# {::Google::Longrunning::Operations::Client::Configuration::Rpcs}
|
399
399
|
# for a list of RPCs that can be configured independently.
|
400
400
|
#
|
401
401
|
# Configuration can be applied globally to all clients, or to a single client
|
@@ -406,22 +406,22 @@ module Google
|
|
406
406
|
# To modify the global config, setting the timeout for list_operations
|
407
407
|
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
408
408
|
#
|
409
|
-
# Google::Longrunning::Operations::Client.configure do |config|
|
410
|
-
# config.timeout =
|
411
|
-
# config.rpcs.list_operations.timeout =
|
409
|
+
# ::Google::Longrunning::Operations::Client.configure do |config|
|
410
|
+
# config.timeout = 10.0
|
411
|
+
# config.rpcs.list_operations.timeout = 20.0
|
412
412
|
# end
|
413
413
|
#
|
414
414
|
# To apply the above configuration only to a new client:
|
415
415
|
#
|
416
|
-
# client = Google::Longrunning::Operations::Client.new do |config|
|
417
|
-
# config.timeout =
|
418
|
-
# config.rpcs.list_operations.timeout =
|
416
|
+
# client = ::Google::Longrunning::Operations::Client.new do |config|
|
417
|
+
# config.timeout = 10.0
|
418
|
+
# config.rpcs.list_operations.timeout = 20.0
|
419
419
|
# end
|
420
420
|
#
|
421
421
|
# @!attribute [rw] endpoint
|
422
422
|
# The hostname or hostname:port of the service endpoint.
|
423
423
|
# Defaults to `"videointelligence.googleapis.com"`.
|
424
|
-
# @return [String]
|
424
|
+
# @return [::String]
|
425
425
|
# @!attribute [rw] credentials
|
426
426
|
# Credentials to send with calls. You may provide any of the following types:
|
427
427
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -433,29 +433,29 @@ module Google
|
|
433
433
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
434
434
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
435
435
|
# * (`nil`) indicating no credentials
|
436
|
-
# @return [Object]
|
436
|
+
# @return [::Object]
|
437
437
|
# @!attribute [rw] scope
|
438
438
|
# The OAuth scopes
|
439
|
-
# @return [Array
|
439
|
+
# @return [::Array<::String>]
|
440
440
|
# @!attribute [rw] lib_name
|
441
441
|
# The library name as recorded in instrumentation and logging
|
442
|
-
# @return [String]
|
442
|
+
# @return [::String]
|
443
443
|
# @!attribute [rw] lib_version
|
444
444
|
# The library version as recorded in instrumentation and logging
|
445
|
-
# @return [String]
|
445
|
+
# @return [::String]
|
446
446
|
# @!attribute [rw] channel_args
|
447
447
|
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
448
448
|
# `GRPC::Core::Channel` object is provided as the credential.
|
449
|
-
# @return [Hash]
|
449
|
+
# @return [::Hash]
|
450
450
|
# @!attribute [rw] interceptors
|
451
451
|
# An array of interceptors that are run before calls are executed.
|
452
|
-
# @return [Array
|
452
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
453
453
|
# @!attribute [rw] timeout
|
454
|
-
# The call timeout in
|
455
|
-
# @return [Numeric]
|
454
|
+
# The call timeout in seconds.
|
455
|
+
# @return [::Numeric]
|
456
456
|
# @!attribute [rw] metadata
|
457
457
|
# Additional gRPC headers to be sent with the call.
|
458
|
-
# @return [Hash{Symbol
|
458
|
+
# @return [::Hash{::Symbol=>::String}]
|
459
459
|
# @!attribute [rw] retry_policy
|
460
460
|
# The retry policy. The value is a hash with the following keys:
|
461
461
|
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
@@ -463,10 +463,10 @@ module Google
|
|
463
463
|
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
464
464
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
465
465
|
# trigger a retry.
|
466
|
-
# @return [Hash]
|
466
|
+
# @return [::Hash]
|
467
467
|
#
|
468
468
|
class Configuration
|
469
|
-
extend Gapic::Config
|
469
|
+
extend ::Gapic::Config
|
470
470
|
|
471
471
|
config_attr :endpoint, "videointelligence.googleapis.com", String
|
472
472
|
config_attr :credentials, nil do |value|
|
@@ -474,14 +474,14 @@ module Google
|
|
474
474
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
475
475
|
allowed.any? { |klass| klass === value }
|
476
476
|
end
|
477
|
-
config_attr :scope, nil, String, Array, nil
|
478
|
-
config_attr :lib_name, nil, String, nil
|
479
|
-
config_attr :lib_version, nil, String, nil
|
480
|
-
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, Hash, nil)
|
481
|
-
config_attr :interceptors, nil, Array, nil
|
482
|
-
config_attr :timeout, nil, Numeric, nil
|
483
|
-
config_attr :metadata, nil, Hash, nil
|
484
|
-
config_attr :retry_policy, nil, Hash, Proc, nil
|
477
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
478
|
+
config_attr :lib_name, nil, ::String, nil
|
479
|
+
config_attr :lib_version, nil, ::String, nil
|
480
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
481
|
+
config_attr :interceptors, nil, ::Array, nil
|
482
|
+
config_attr :timeout, nil, ::Numeric, nil
|
483
|
+
config_attr :metadata, nil, ::Hash, nil
|
484
|
+
config_attr :retry_policy, nil, ::Hash, Proc, nil
|
485
485
|
|
486
486
|
# @private
|
487
487
|
def initialize parent_config = nil
|
@@ -522,35 +522,35 @@ module Google
|
|
522
522
|
class Rpcs
|
523
523
|
##
|
524
524
|
# RPC-specific configuration for `list_operations`
|
525
|
-
# @return [Gapic::Config::Method]
|
525
|
+
# @return [::Gapic::Config::Method]
|
526
526
|
#
|
527
527
|
attr_reader :list_operations
|
528
528
|
##
|
529
529
|
# RPC-specific configuration for `get_operation`
|
530
|
-
# @return [Gapic::Config::Method]
|
530
|
+
# @return [::Gapic::Config::Method]
|
531
531
|
#
|
532
532
|
attr_reader :get_operation
|
533
533
|
##
|
534
534
|
# RPC-specific configuration for `delete_operation`
|
535
|
-
# @return [Gapic::Config::Method]
|
535
|
+
# @return [::Gapic::Config::Method]
|
536
536
|
#
|
537
537
|
attr_reader :delete_operation
|
538
538
|
##
|
539
539
|
# RPC-specific configuration for `cancel_operation`
|
540
|
-
# @return [Gapic::Config::Method]
|
540
|
+
# @return [::Gapic::Config::Method]
|
541
541
|
#
|
542
542
|
attr_reader :cancel_operation
|
543
543
|
|
544
544
|
# @private
|
545
545
|
def initialize parent_rpcs = nil
|
546
546
|
list_operations_config = parent_rpcs&.list_operations if parent_rpcs&.respond_to? :list_operations
|
547
|
-
@list_operations = Gapic::Config::Method.new list_operations_config
|
547
|
+
@list_operations = ::Gapic::Config::Method.new list_operations_config
|
548
548
|
get_operation_config = parent_rpcs&.get_operation if parent_rpcs&.respond_to? :get_operation
|
549
|
-
@get_operation = Gapic::Config::Method.new get_operation_config
|
549
|
+
@get_operation = ::Gapic::Config::Method.new get_operation_config
|
550
550
|
delete_operation_config = parent_rpcs&.delete_operation if parent_rpcs&.respond_to? :delete_operation
|
551
|
-
@delete_operation = Gapic::Config::Method.new delete_operation_config
|
551
|
+
@delete_operation = ::Gapic::Config::Method.new delete_operation_config
|
552
552
|
cancel_operation_config = parent_rpcs&.cancel_operation if parent_rpcs&.respond_to? :cancel_operation
|
553
|
-
@cancel_operation = Gapic::Config::Method.new cancel_operation_config
|
553
|
+
@cancel_operation = ::Gapic::Config::Method.new cancel_operation_config
|
554
554
|
|
555
555
|
yield self if block_given?
|
556
556
|
end
|