google-cloud-vision_ai-v1 0.1.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +30 -20
- data/lib/google/cloud/vision_ai/v1/app_platform/client.rb +50 -27
- data/lib/google/cloud/vision_ai/v1/app_platform/operations.rb +12 -15
- data/lib/google/cloud/vision_ai/v1/app_platform/rest/client.rb +46 -27
- data/lib/google/cloud/vision_ai/v1/app_platform/rest/operations.rb +43 -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 +29 -2
- data/lib/google/cloud/vision_ai/v1/health_check_service/rest/client.rb +29 -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 +43 -19
- data/lib/google/cloud/vision_ai/v1/live_video_analytics/operations.rb +12 -15
- data/lib/google/cloud/vision_ai/v1/live_video_analytics/rest/client.rb +40 -19
- data/lib/google/cloud/vision_ai/v1/live_video_analytics/rest/operations.rb +43 -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 +29 -7
- data/lib/google/cloud/vision_ai/v1/streaming_service/rest/client.rb +29 -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 +47 -24
- data/lib/google/cloud/vision_ai/v1/streams_service/operations.rb +12 -15
- data/lib/google/cloud/vision_ai/v1/streams_service/rest/client.rb +43 -24
- data/lib/google/cloud/vision_ai/v1/streams_service/rest/operations.rb +43 -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 +61 -64
- data/lib/google/cloud/vision_ai/v1/warehouse/operations.rb +12 -15
- data/lib/google/cloud/vision_ai/v1/warehouse/rest/client.rb +60 -63
- data/lib/google/cloud/vision_ai/v1/warehouse/rest/operations.rb +43 -38
- data/lib/google/cloud/vision_ai/v1/warehouse/rest/service_stub.rb +510 -374
- data/lib/google/cloud/visionai/v1/warehouse_pb.rb +2 -1
- data/lib/google/cloud/visionai/v1/warehouse_services_pb.rb +1 -0
- data/proto_docs/google/api/client.rb +56 -0
- data/proto_docs/google/cloud/visionai/v1/warehouse.rb +60 -7
- data/proto_docs/google/longrunning/operations.rb +19 -14
- metadata +5 -5
@@ -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)
|
@@ -363,6 +384,11 @@ module Google
|
|
363
384
|
# default endpoint URL. The default value of nil uses the environment
|
364
385
|
# universe (usually the default "googleapis.com" universe).
|
365
386
|
# @return [::String,nil]
|
387
|
+
# @!attribute [rw] logger
|
388
|
+
# A custom logger to use for request/response debug logging, or the value
|
389
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
390
|
+
# explicitly disable logging.
|
391
|
+
# @return [::Logger,:default,nil]
|
366
392
|
#
|
367
393
|
class Configuration
|
368
394
|
extend ::Gapic::Config
|
@@ -387,6 +413,7 @@ module Google
|
|
387
413
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
388
414
|
config_attr :quota_project, nil, ::String, nil
|
389
415
|
config_attr :universe_domain, nil, ::String, nil
|
416
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
390
417
|
|
391
418
|
# @private
|
392
419
|
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)
|
@@ -340,6 +361,11 @@ module Google
|
|
340
361
|
# default endpoint URL. The default value of nil uses the environment
|
341
362
|
# universe (usually the default "googleapis.com" universe).
|
342
363
|
# @return [::String,nil]
|
364
|
+
# @!attribute [rw] logger
|
365
|
+
# A custom logger to use for request/response debug logging, or the value
|
366
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
367
|
+
# explicitly disable logging.
|
368
|
+
# @return [::Logger,:default,nil]
|
343
369
|
#
|
344
370
|
class Configuration
|
345
371
|
extend ::Gapic::Config
|
@@ -361,6 +387,7 @@ module Google
|
|
361
387
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
362
388
|
config_attr :quota_project, nil, ::String, nil
|
363
389
|
config_attr :universe_domain, nil, ::String, nil
|
390
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
364
391
|
|
365
392
|
# @private
|
366
393
|
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)
|
@@ -2163,6 +2181,11 @@ module Google
|
|
2163
2181
|
# default endpoint URL. The default value of nil uses the environment
|
2164
2182
|
# universe (usually the default "googleapis.com" universe).
|
2165
2183
|
# @return [::String,nil]
|
2184
|
+
# @!attribute [rw] logger
|
2185
|
+
# A custom logger to use for request/response debug logging, or the value
|
2186
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
2187
|
+
# explicitly disable logging.
|
2188
|
+
# @return [::Logger,:default,nil]
|
2166
2189
|
#
|
2167
2190
|
class Configuration
|
2168
2191
|
extend ::Gapic::Config
|
@@ -2187,6 +2210,7 @@ module Google
|
|
2187
2210
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
2188
2211
|
config_attr :quota_project, nil, ::String, nil
|
2189
2212
|
config_attr :universe_domain, nil, ::String, nil
|
2213
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
2190
2214
|
|
2191
2215
|
# @private
|
2192
2216
|
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)
|
@@ -688,6 +679,11 @@ module Google
|
|
688
679
|
# default endpoint URL. The default value of nil uses the environment
|
689
680
|
# universe (usually the default "googleapis.com" universe).
|
690
681
|
# @return [::String,nil]
|
682
|
+
# @!attribute [rw] logger
|
683
|
+
# A custom logger to use for request/response debug logging, or the value
|
684
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
685
|
+
# explicitly disable logging.
|
686
|
+
# @return [::Logger,:default,nil]
|
691
687
|
#
|
692
688
|
class Configuration
|
693
689
|
extend ::Gapic::Config
|
@@ -712,6 +708,7 @@ module Google
|
|
712
708
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
713
709
|
config_attr :quota_project, nil, ::String, nil
|
714
710
|
config_attr :universe_domain, nil, ::String, nil
|
711
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
715
712
|
|
716
713
|
# @private
|
717
714
|
def initialize parent_config = nil
|