google-cloud-vision_ai-v1 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +31 -21
- data/lib/google/cloud/vision_ai/v1/app_platform/client.rb +57 -27
- data/lib/google/cloud/vision_ai/v1/app_platform/operations.rb +19 -15
- data/lib/google/cloud/vision_ai/v1/app_platform/rest/client.rb +53 -27
- data/lib/google/cloud/vision_ai/v1/app_platform/rest/operations.rb +50 -38
- data/lib/google/cloud/vision_ai/v1/app_platform/rest/service_stub.rb +222 -158
- data/lib/google/cloud/vision_ai/v1/health_check_service/client.rb +36 -2
- data/lib/google/cloud/vision_ai/v1/health_check_service/rest/client.rb +36 -2
- data/lib/google/cloud/vision_ai/v1/health_check_service/rest/service_stub.rb +22 -8
- data/lib/google/cloud/vision_ai/v1/live_video_analytics/client.rb +50 -19
- data/lib/google/cloud/vision_ai/v1/live_video_analytics/operations.rb +19 -15
- data/lib/google/cloud/vision_ai/v1/live_video_analytics/rest/client.rb +47 -19
- data/lib/google/cloud/vision_ai/v1/live_video_analytics/rest/operations.rb +50 -38
- data/lib/google/cloud/vision_ai/v1/live_video_analytics/rest/service_stub.rb +158 -110
- data/lib/google/cloud/vision_ai/v1/streaming_service/client.rb +36 -7
- data/lib/google/cloud/vision_ai/v1/streaming_service/rest/client.rb +36 -4
- data/lib/google/cloud/vision_ai/v1/streaming_service/rest/service_stub.rb +38 -20
- data/lib/google/cloud/vision_ai/v1/streams_service/client.rb +54 -24
- data/lib/google/cloud/vision_ai/v1/streams_service/operations.rb +19 -15
- data/lib/google/cloud/vision_ai/v1/streams_service/rest/client.rb +50 -24
- data/lib/google/cloud/vision_ai/v1/streams_service/rest/operations.rb +50 -38
- data/lib/google/cloud/vision_ai/v1/streams_service/rest/service_stub.rb +198 -140
- data/lib/google/cloud/vision_ai/v1/version.rb +1 -1
- data/lib/google/cloud/vision_ai/v1/warehouse/client.rb +71 -64
- data/lib/google/cloud/vision_ai/v1/warehouse/operations.rb +19 -15
- data/lib/google/cloud/vision_ai/v1/warehouse/rest/client.rb +70 -63
- data/lib/google/cloud/vision_ai/v1/warehouse/rest/operations.rb +50 -38
- data/lib/google/cloud/vision_ai/v1/warehouse/rest/service_stub.rb +510 -374
- data/proto_docs/google/api/client.rb +39 -0
- data/proto_docs/google/cloud/visionai/v1/annotations.rb +4 -0
- data/proto_docs/google/cloud/visionai/v1/lva.rb +8 -0
- data/proto_docs/google/cloud/visionai/v1/platform.rb +44 -0
- data/proto_docs/google/cloud/visionai/v1/streaming_resources.rb +4 -0
- data/proto_docs/google/cloud/visionai/v1/streaming_service.rb +32 -0
- data/proto_docs/google/cloud/visionai/v1/warehouse.rb +64 -0
- data/proto_docs/google/longrunning/operations.rb +23 -14
- data/proto_docs/google/protobuf/struct.rb +12 -0
- data/proto_docs/google/type/datetime.rb +4 -0
- metadata +6 -9
@@ -160,14 +160,26 @@ module Google
|
|
160
160
|
universe_domain: @config.universe_domain,
|
161
161
|
channel_args: @config.channel_args,
|
162
162
|
interceptors: @config.interceptors,
|
163
|
-
channel_pool_config: @config.channel_pool
|
163
|
+
channel_pool_config: @config.channel_pool,
|
164
|
+
logger: @config.logger
|
164
165
|
)
|
165
166
|
|
167
|
+
@health_check_service_stub.stub_logger&.info do |entry|
|
168
|
+
entry.set_system_name
|
169
|
+
entry.set_service
|
170
|
+
entry.message = "Created client for #{entry.service}"
|
171
|
+
entry.set_credentials_fields credentials
|
172
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
173
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
174
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
175
|
+
end
|
176
|
+
|
166
177
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
167
178
|
config.credentials = credentials
|
168
179
|
config.quota_project = @quota_project_id
|
169
180
|
config.endpoint = @health_check_service_stub.endpoint
|
170
181
|
config.universe_domain = @health_check_service_stub.universe_domain
|
182
|
+
config.logger = @health_check_service_stub.logger if config.respond_to? :logger=
|
171
183
|
end
|
172
184
|
|
173
185
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
@@ -175,6 +187,7 @@ module Google
|
|
175
187
|
config.quota_project = @quota_project_id
|
176
188
|
config.endpoint = @health_check_service_stub.endpoint
|
177
189
|
config.universe_domain = @health_check_service_stub.universe_domain
|
190
|
+
config.logger = @health_check_service_stub.logger if config.respond_to? :logger=
|
178
191
|
end
|
179
192
|
end
|
180
193
|
|
@@ -192,6 +205,15 @@ module Google
|
|
192
205
|
#
|
193
206
|
attr_reader :iam_policy_client
|
194
207
|
|
208
|
+
##
|
209
|
+
# The logger used for request/response debug logging.
|
210
|
+
#
|
211
|
+
# @return [Logger]
|
212
|
+
#
|
213
|
+
def logger
|
214
|
+
@health_check_service_stub.logger
|
215
|
+
end
|
216
|
+
|
195
217
|
# Service calls
|
196
218
|
|
197
219
|
##
|
@@ -274,7 +296,6 @@ module Google
|
|
274
296
|
|
275
297
|
@health_check_service_stub.call_rpc :health_check, request, options: options do |response, operation|
|
276
298
|
yield response, operation if block_given?
|
277
|
-
return response
|
278
299
|
end
|
279
300
|
rescue ::GRPC::BadStatus => e
|
280
301
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -324,6 +345,13 @@ module Google
|
|
324
345
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
325
346
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
326
347
|
# * (`nil`) indicating no credentials
|
348
|
+
#
|
349
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
350
|
+
# external source for authentication to Google Cloud, you must validate it before
|
351
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
352
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
353
|
+
# For more information, refer to [Validate credential configurations from external
|
354
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
327
355
|
# @return [::Object]
|
328
356
|
# @!attribute [rw] scope
|
329
357
|
# The OAuth scopes
|
@@ -363,6 +391,11 @@ module Google
|
|
363
391
|
# default endpoint URL. The default value of nil uses the environment
|
364
392
|
# universe (usually the default "googleapis.com" universe).
|
365
393
|
# @return [::String,nil]
|
394
|
+
# @!attribute [rw] logger
|
395
|
+
# A custom logger to use for request/response debug logging, or the value
|
396
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
397
|
+
# explicitly disable logging.
|
398
|
+
# @return [::Logger,:default,nil]
|
366
399
|
#
|
367
400
|
class Configuration
|
368
401
|
extend ::Gapic::Config
|
@@ -387,6 +420,7 @@ module Google
|
|
387
420
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
388
421
|
config_attr :quota_project, nil, ::String, nil
|
389
422
|
config_attr :universe_domain, nil, ::String, nil
|
423
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
390
424
|
|
391
425
|
# @private
|
392
426
|
def initialize parent_config = nil
|
@@ -153,14 +153,26 @@ module Google
|
|
153
153
|
endpoint: @config.endpoint,
|
154
154
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
155
155
|
universe_domain: @config.universe_domain,
|
156
|
-
credentials: credentials
|
156
|
+
credentials: credentials,
|
157
|
+
logger: @config.logger
|
157
158
|
)
|
158
159
|
|
160
|
+
@health_check_service_stub.logger(stub: true)&.info do |entry|
|
161
|
+
entry.set_system_name
|
162
|
+
entry.set_service
|
163
|
+
entry.message = "Created client for #{entry.service}"
|
164
|
+
entry.set_credentials_fields credentials
|
165
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
166
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
167
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
168
|
+
end
|
169
|
+
|
159
170
|
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
160
171
|
config.credentials = credentials
|
161
172
|
config.quota_project = @quota_project_id
|
162
173
|
config.endpoint = @health_check_service_stub.endpoint
|
163
174
|
config.universe_domain = @health_check_service_stub.universe_domain
|
175
|
+
config.logger = @health_check_service_stub.logger if config.respond_to? :logger=
|
164
176
|
end
|
165
177
|
|
166
178
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
|
@@ -168,6 +180,7 @@ module Google
|
|
168
180
|
config.quota_project = @quota_project_id
|
169
181
|
config.endpoint = @health_check_service_stub.endpoint
|
170
182
|
config.universe_domain = @health_check_service_stub.universe_domain
|
183
|
+
config.logger = @health_check_service_stub.logger if config.respond_to? :logger=
|
171
184
|
end
|
172
185
|
end
|
173
186
|
|
@@ -185,6 +198,15 @@ module Google
|
|
185
198
|
#
|
186
199
|
attr_reader :iam_policy_client
|
187
200
|
|
201
|
+
##
|
202
|
+
# The logger used for request/response debug logging.
|
203
|
+
#
|
204
|
+
# @return [Logger]
|
205
|
+
#
|
206
|
+
def logger
|
207
|
+
@health_check_service_stub.logger
|
208
|
+
end
|
209
|
+
|
188
210
|
# Service calls
|
189
211
|
|
190
212
|
##
|
@@ -260,7 +282,6 @@ module Google
|
|
260
282
|
|
261
283
|
@health_check_service_stub.health_check request, options do |result, operation|
|
262
284
|
yield result, operation if block_given?
|
263
|
-
return result
|
264
285
|
end
|
265
286
|
rescue ::Gapic::Rest::Error => e
|
266
287
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -308,6 +329,13 @@ module Google
|
|
308
329
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
309
330
|
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
310
331
|
# * (`nil`) indicating no credentials
|
332
|
+
#
|
333
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
334
|
+
# external source for authentication to Google Cloud, you must validate it before
|
335
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
336
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
337
|
+
# For more information, refer to [Validate credential configurations from external
|
338
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
311
339
|
# @return [::Object]
|
312
340
|
# @!attribute [rw] scope
|
313
341
|
# The OAuth scopes
|
@@ -340,6 +368,11 @@ module Google
|
|
340
368
|
# default endpoint URL. The default value of nil uses the environment
|
341
369
|
# universe (usually the default "googleapis.com" universe).
|
342
370
|
# @return [::String,nil]
|
371
|
+
# @!attribute [rw] logger
|
372
|
+
# A custom logger to use for request/response debug logging, or the value
|
373
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
374
|
+
# explicitly disable logging.
|
375
|
+
# @return [::Logger,:default,nil]
|
343
376
|
#
|
344
377
|
class Configuration
|
345
378
|
extend ::Gapic::Config
|
@@ -361,6 +394,7 @@ module Google
|
|
361
394
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
362
395
|
config_attr :quota_project, nil, ::String, nil
|
363
396
|
config_attr :universe_domain, nil, ::String, nil
|
397
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
364
398
|
|
365
399
|
# @private
|
366
400
|
def initialize parent_config = nil
|
@@ -30,7 +30,8 @@ module Google
|
|
30
30
|
# including transcoding, making the REST call, and deserialing the response.
|
31
31
|
#
|
32
32
|
class ServiceStub
|
33
|
-
|
33
|
+
# @private
|
34
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
34
35
|
# These require statements are intentionally placed here to initialize
|
35
36
|
# the REST modules only when it's required.
|
36
37
|
require "gapic/rest"
|
@@ -40,7 +41,9 @@ module Google
|
|
40
41
|
universe_domain: universe_domain,
|
41
42
|
credentials: credentials,
|
42
43
|
numeric_enums: true,
|
43
|
-
|
44
|
+
service_name: self.class,
|
45
|
+
raise_faraday_errors: false,
|
46
|
+
logger: logger
|
44
47
|
end
|
45
48
|
|
46
49
|
##
|
@@ -61,6 +64,15 @@ module Google
|
|
61
64
|
@client_stub.endpoint
|
62
65
|
end
|
63
66
|
|
67
|
+
##
|
68
|
+
# The logger used for request/response debug logging.
|
69
|
+
#
|
70
|
+
# @return [Logger]
|
71
|
+
#
|
72
|
+
def logger stub: false
|
73
|
+
stub ? @client_stub.stub_logger : @client_stub.logger
|
74
|
+
end
|
75
|
+
|
64
76
|
##
|
65
77
|
# Baseline implementation for the health_check REST call
|
66
78
|
#
|
@@ -87,16 +99,18 @@ module Google
|
|
87
99
|
|
88
100
|
response = @client_stub.make_http_request(
|
89
101
|
verb,
|
90
|
-
uri:
|
91
|
-
body:
|
92
|
-
params:
|
102
|
+
uri: uri,
|
103
|
+
body: body || "",
|
104
|
+
params: query_string_params,
|
105
|
+
method_name: "health_check",
|
93
106
|
options: options
|
94
107
|
)
|
95
108
|
operation = ::Gapic::Rest::TransportOperation.new response
|
96
109
|
result = ::Google::Cloud::VisionAI::V1::HealthCheckResponse.decode_json response.body, ignore_unknown_fields: true
|
97
|
-
|
98
|
-
|
99
|
-
|
110
|
+
catch :response do
|
111
|
+
yield result, operation if block_given?
|
112
|
+
result
|
113
|
+
end
|
100
114
|
end
|
101
115
|
|
102
116
|
##
|
@@ -192,14 +192,26 @@ module Google
|
|
192
192
|
universe_domain: @config.universe_domain,
|
193
193
|
channel_args: @config.channel_args,
|
194
194
|
interceptors: @config.interceptors,
|
195
|
-
channel_pool_config: @config.channel_pool
|
195
|
+
channel_pool_config: @config.channel_pool,
|
196
|
+
logger: @config.logger
|
196
197
|
)
|
197
198
|
|
199
|
+
@live_video_analytics_stub.stub_logger&.info do |entry|
|
200
|
+
entry.set_system_name
|
201
|
+
entry.set_service
|
202
|
+
entry.message = "Created client for #{entry.service}"
|
203
|
+
entry.set_credentials_fields credentials
|
204
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
205
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
206
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
207
|
+
end
|
208
|
+
|
198
209
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
199
210
|
config.credentials = credentials
|
200
211
|
config.quota_project = @quota_project_id
|
201
212
|
config.endpoint = @live_video_analytics_stub.endpoint
|
202
213
|
config.universe_domain = @live_video_analytics_stub.universe_domain
|
214
|
+
config.logger = @live_video_analytics_stub.logger if config.respond_to? :logger=
|
203
215
|
end
|
204
216
|
|
205
217
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
@@ -207,6 +219,7 @@ module Google
|
|
207
219
|
config.quota_project = @quota_project_id
|
208
220
|
config.endpoint = @live_video_analytics_stub.endpoint
|
209
221
|
config.universe_domain = @live_video_analytics_stub.universe_domain
|
222
|
+
config.logger = @live_video_analytics_stub.logger if config.respond_to? :logger=
|
210
223
|
end
|
211
224
|
end
|
212
225
|
|
@@ -231,6 +244,15 @@ module Google
|
|
231
244
|
#
|
232
245
|
attr_reader :iam_policy_client
|
233
246
|
|
247
|
+
##
|
248
|
+
# The logger used for request/response debug logging.
|
249
|
+
#
|
250
|
+
# @return [Logger]
|
251
|
+
#
|
252
|
+
def logger
|
253
|
+
@live_video_analytics_stub.logger
|
254
|
+
end
|
255
|
+
|
234
256
|
# Service calls
|
235
257
|
|
236
258
|
##
|
@@ -327,7 +349,7 @@ module Google
|
|
327
349
|
@live_video_analytics_stub.call_rpc :list_public_operators, request, options: options do |response, operation|
|
328
350
|
response = ::Gapic::PagedEnumerable.new @live_video_analytics_stub, :list_public_operators, request, response, operation, options
|
329
351
|
yield response, operation if block_given?
|
330
|
-
|
352
|
+
throw :response, response
|
331
353
|
end
|
332
354
|
rescue ::GRPC::BadStatus => e
|
333
355
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -415,7 +437,6 @@ module Google
|
|
415
437
|
|
416
438
|
@live_video_analytics_stub.call_rpc :resolve_operator_info, request, options: options do |response, operation|
|
417
439
|
yield response, operation if block_given?
|
418
|
-
return response
|
419
440
|
end
|
420
441
|
rescue ::GRPC::BadStatus => e
|
421
442
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -515,7 +536,7 @@ module Google
|
|
515
536
|
@live_video_analytics_stub.call_rpc :list_operators, request, options: options do |response, operation|
|
516
537
|
response = ::Gapic::PagedEnumerable.new @live_video_analytics_stub, :list_operators, request, response, operation, options
|
517
538
|
yield response, operation if block_given?
|
518
|
-
|
539
|
+
throw :response, response
|
519
540
|
end
|
520
541
|
rescue ::GRPC::BadStatus => e
|
521
542
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -601,7 +622,6 @@ module Google
|
|
601
622
|
|
602
623
|
@live_video_analytics_stub.call_rpc :get_operator, request, options: options do |response, operation|
|
603
624
|
yield response, operation if block_given?
|
604
|
-
return response
|
605
625
|
end
|
606
626
|
rescue ::GRPC::BadStatus => e
|
607
627
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -713,7 +733,7 @@ module Google
|
|
713
733
|
@live_video_analytics_stub.call_rpc :create_operator, request, options: options do |response, operation|
|
714
734
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
715
735
|
yield response, operation if block_given?
|
716
|
-
|
736
|
+
throw :response, response
|
717
737
|
end
|
718
738
|
rescue ::GRPC::BadStatus => e
|
719
739
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -827,7 +847,7 @@ module Google
|
|
827
847
|
@live_video_analytics_stub.call_rpc :update_operator, request, options: options do |response, operation|
|
828
848
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
829
849
|
yield response, operation if block_given?
|
830
|
-
|
850
|
+
throw :response, response
|
831
851
|
end
|
832
852
|
rescue ::GRPC::BadStatus => e
|
833
853
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -935,7 +955,7 @@ module Google
|
|
935
955
|
@live_video_analytics_stub.call_rpc :delete_operator, request, options: options do |response, operation|
|
936
956
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
937
957
|
yield response, operation if block_given?
|
938
|
-
|
958
|
+
throw :response, response
|
939
959
|
end
|
940
960
|
rescue ::GRPC::BadStatus => e
|
941
961
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1035,7 +1055,7 @@ module Google
|
|
1035
1055
|
@live_video_analytics_stub.call_rpc :list_analyses, request, options: options do |response, operation|
|
1036
1056
|
response = ::Gapic::PagedEnumerable.new @live_video_analytics_stub, :list_analyses, request, response, operation, options
|
1037
1057
|
yield response, operation if block_given?
|
1038
|
-
|
1058
|
+
throw :response, response
|
1039
1059
|
end
|
1040
1060
|
rescue ::GRPC::BadStatus => e
|
1041
1061
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1121,7 +1141,6 @@ module Google
|
|
1121
1141
|
|
1122
1142
|
@live_video_analytics_stub.call_rpc :get_analysis, request, options: options do |response, operation|
|
1123
1143
|
yield response, operation if block_given?
|
1124
|
-
return response
|
1125
1144
|
end
|
1126
1145
|
rescue ::GRPC::BadStatus => e
|
1127
1146
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1233,7 +1252,7 @@ module Google
|
|
1233
1252
|
@live_video_analytics_stub.call_rpc :create_analysis, request, options: options do |response, operation|
|
1234
1253
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1235
1254
|
yield response, operation if block_given?
|
1236
|
-
|
1255
|
+
throw :response, response
|
1237
1256
|
end
|
1238
1257
|
rescue ::GRPC::BadStatus => e
|
1239
1258
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1347,7 +1366,7 @@ module Google
|
|
1347
1366
|
@live_video_analytics_stub.call_rpc :update_analysis, request, options: options do |response, operation|
|
1348
1367
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1349
1368
|
yield response, operation if block_given?
|
1350
|
-
|
1369
|
+
throw :response, response
|
1351
1370
|
end
|
1352
1371
|
rescue ::GRPC::BadStatus => e
|
1353
1372
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1455,7 +1474,7 @@ module Google
|
|
1455
1474
|
@live_video_analytics_stub.call_rpc :delete_analysis, request, options: options do |response, operation|
|
1456
1475
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1457
1476
|
yield response, operation if block_given?
|
1458
|
-
|
1477
|
+
throw :response, response
|
1459
1478
|
end
|
1460
1479
|
rescue ::GRPC::BadStatus => e
|
1461
1480
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1555,7 +1574,7 @@ module Google
|
|
1555
1574
|
@live_video_analytics_stub.call_rpc :list_processes, request, options: options do |response, operation|
|
1556
1575
|
response = ::Gapic::PagedEnumerable.new @live_video_analytics_stub, :list_processes, request, response, operation, options
|
1557
1576
|
yield response, operation if block_given?
|
1558
|
-
|
1577
|
+
throw :response, response
|
1559
1578
|
end
|
1560
1579
|
rescue ::GRPC::BadStatus => e
|
1561
1580
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1641,7 +1660,6 @@ module Google
|
|
1641
1660
|
|
1642
1661
|
@live_video_analytics_stub.call_rpc :get_process, request, options: options do |response, operation|
|
1643
1662
|
yield response, operation if block_given?
|
1644
|
-
return response
|
1645
1663
|
end
|
1646
1664
|
rescue ::GRPC::BadStatus => e
|
1647
1665
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1753,7 +1771,7 @@ module Google
|
|
1753
1771
|
@live_video_analytics_stub.call_rpc :create_process, request, options: options do |response, operation|
|
1754
1772
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1755
1773
|
yield response, operation if block_given?
|
1756
|
-
|
1774
|
+
throw :response, response
|
1757
1775
|
end
|
1758
1776
|
rescue ::GRPC::BadStatus => e
|
1759
1777
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1867,7 +1885,7 @@ module Google
|
|
1867
1885
|
@live_video_analytics_stub.call_rpc :update_process, request, options: options do |response, operation|
|
1868
1886
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1869
1887
|
yield response, operation if block_given?
|
1870
|
-
|
1888
|
+
throw :response, response
|
1871
1889
|
end
|
1872
1890
|
rescue ::GRPC::BadStatus => e
|
1873
1891
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1975,7 +1993,7 @@ module Google
|
|
1975
1993
|
@live_video_analytics_stub.call_rpc :delete_process, request, options: options do |response, operation|
|
1976
1994
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1977
1995
|
yield response, operation if block_given?
|
1978
|
-
|
1996
|
+
throw :response, response
|
1979
1997
|
end
|
1980
1998
|
rescue ::GRPC::BadStatus => e
|
1981
1999
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2074,7 +2092,7 @@ module Google
|
|
2074
2092
|
@live_video_analytics_stub.call_rpc :batch_run_process, request, options: options do |response, operation|
|
2075
2093
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2076
2094
|
yield response, operation if block_given?
|
2077
|
-
|
2095
|
+
throw :response, response
|
2078
2096
|
end
|
2079
2097
|
rescue ::GRPC::BadStatus => e
|
2080
2098
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2124,6 +2142,13 @@ module Google
|
|
2124
2142
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
2125
2143
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
2126
2144
|
# * (`nil`) indicating no credentials
|
2145
|
+
#
|
2146
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
2147
|
+
# external source for authentication to Google Cloud, you must validate it before
|
2148
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
2149
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
2150
|
+
# For more information, refer to [Validate credential configurations from external
|
2151
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
2127
2152
|
# @return [::Object]
|
2128
2153
|
# @!attribute [rw] scope
|
2129
2154
|
# The OAuth scopes
|
@@ -2163,6 +2188,11 @@ module Google
|
|
2163
2188
|
# default endpoint URL. The default value of nil uses the environment
|
2164
2189
|
# universe (usually the default "googleapis.com" universe).
|
2165
2190
|
# @return [::String,nil]
|
2191
|
+
# @!attribute [rw] logger
|
2192
|
+
# A custom logger to use for request/response debug logging, or the value
|
2193
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
2194
|
+
# explicitly disable logging.
|
2195
|
+
# @return [::Logger,:default,nil]
|
2166
2196
|
#
|
2167
2197
|
class Configuration
|
2168
2198
|
extend ::Gapic::Config
|
@@ -2187,6 +2217,7 @@ module Google
|
|
2187
2217
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
2188
2218
|
config_attr :quota_project, nil, ::String, nil
|
2189
2219
|
config_attr :universe_domain, nil, ::String, nil
|
2220
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
2190
2221
|
|
2191
2222
|
# @private
|
2192
2223
|
def initialize parent_config = nil
|
@@ -124,14 +124,6 @@ module Google
|
|
124
124
|
# Lists operations that match the specified filter in the request. If the
|
125
125
|
# server doesn't support this method, it returns `UNIMPLEMENTED`.
|
126
126
|
#
|
127
|
-
# NOTE: the `name` binding allows API services to override the binding
|
128
|
-
# to use different resource name schemes, such as `users/*/operations`. To
|
129
|
-
# override the binding, API services can add a binding such as
|
130
|
-
# `"/v1/{name=users/*}/operations"` to their service configuration.
|
131
|
-
# For backwards compatibility, the default name includes the operations
|
132
|
-
# collection id, however overriding users must ensure the name binding
|
133
|
-
# is the parent resource, without the operations collection id.
|
134
|
-
#
|
135
127
|
# @overload list_operations(request, options = nil)
|
136
128
|
# Pass arguments to `list_operations` via a request object, either of type
|
137
129
|
# {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
|
@@ -221,7 +213,7 @@ module Google
|
|
221
213
|
wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
|
222
214
|
response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
|
223
215
|
yield response, operation if block_given?
|
224
|
-
|
216
|
+
throw :response, response
|
225
217
|
end
|
226
218
|
rescue ::GRPC::BadStatus => e
|
227
219
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -317,7 +309,7 @@ module Google
|
|
317
309
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
318
310
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
319
311
|
yield response, operation if block_given?
|
320
|
-
|
312
|
+
throw :response, response
|
321
313
|
end
|
322
314
|
rescue ::GRPC::BadStatus => e
|
323
315
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -406,7 +398,6 @@ module Google
|
|
406
398
|
|
407
399
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
408
400
|
yield response, operation if block_given?
|
409
|
-
return response
|
410
401
|
end
|
411
402
|
rescue ::GRPC::BadStatus => e
|
412
403
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -421,8 +412,9 @@ module Google
|
|
421
412
|
# other methods to check whether the cancellation succeeded or whether the
|
422
413
|
# operation completed despite cancellation. On successful cancellation,
|
423
414
|
# the operation is not deleted; instead, it becomes an operation with
|
424
|
-
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
425
|
-
# corresponding to
|
415
|
+
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
416
|
+
# {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
|
417
|
+
# `Code.CANCELLED`.
|
426
418
|
#
|
427
419
|
# @overload cancel_operation(request, options = nil)
|
428
420
|
# Pass arguments to `cancel_operation` via a request object, either of type
|
@@ -501,7 +493,6 @@ module Google
|
|
501
493
|
|
502
494
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
503
495
|
yield response, operation if block_given?
|
504
|
-
return response
|
505
496
|
end
|
506
497
|
rescue ::GRPC::BadStatus => e
|
507
498
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -599,7 +590,7 @@ module Google
|
|
599
590
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
600
591
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
601
592
|
yield response, operation if block_given?
|
602
|
-
|
593
|
+
throw :response, response
|
603
594
|
end
|
604
595
|
rescue ::GRPC::BadStatus => e
|
605
596
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -649,6 +640,13 @@ module Google
|
|
649
640
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
650
641
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
651
642
|
# * (`nil`) indicating no credentials
|
643
|
+
#
|
644
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
645
|
+
# external source for authentication to Google Cloud, you must validate it before
|
646
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
647
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
648
|
+
# For more information, refer to [Validate credential configurations from external
|
649
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
652
650
|
# @return [::Object]
|
653
651
|
# @!attribute [rw] scope
|
654
652
|
# The OAuth scopes
|
@@ -688,6 +686,11 @@ module Google
|
|
688
686
|
# default endpoint URL. The default value of nil uses the environment
|
689
687
|
# universe (usually the default "googleapis.com" universe).
|
690
688
|
# @return [::String,nil]
|
689
|
+
# @!attribute [rw] logger
|
690
|
+
# A custom logger to use for request/response debug logging, or the value
|
691
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
692
|
+
# explicitly disable logging.
|
693
|
+
# @return [::Logger,:default,nil]
|
691
694
|
#
|
692
695
|
class Configuration
|
693
696
|
extend ::Gapic::Config
|
@@ -712,6 +715,7 @@ module Google
|
|
712
715
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
713
716
|
config_attr :quota_project, nil, ::String, nil
|
714
717
|
config_attr :universe_domain, nil, ::String, nil
|
718
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
715
719
|
|
716
720
|
# @private
|
717
721
|
def initialize parent_config = nil
|