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
@@ -152,14 +152,26 @@ module Google
|
|
152
152
|
endpoint: @config.endpoint,
|
153
153
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
154
154
|
universe_domain: @config.universe_domain,
|
155
|
-
credentials: credentials
|
155
|
+
credentials: credentials,
|
156
|
+
logger: @config.logger
|
156
157
|
)
|
157
158
|
|
159
|
+
@streaming_service_stub.logger(stub: true)&.info do |entry|
|
160
|
+
entry.set_system_name
|
161
|
+
entry.set_service
|
162
|
+
entry.message = "Created client for #{entry.service}"
|
163
|
+
entry.set_credentials_fields credentials
|
164
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
165
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
166
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
167
|
+
end
|
168
|
+
|
158
169
|
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
159
170
|
config.credentials = credentials
|
160
171
|
config.quota_project = @quota_project_id
|
161
172
|
config.endpoint = @streaming_service_stub.endpoint
|
162
173
|
config.universe_domain = @streaming_service_stub.universe_domain
|
174
|
+
config.logger = @streaming_service_stub.logger if config.respond_to? :logger=
|
163
175
|
end
|
164
176
|
|
165
177
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
|
@@ -167,6 +179,7 @@ module Google
|
|
167
179
|
config.quota_project = @quota_project_id
|
168
180
|
config.endpoint = @streaming_service_stub.endpoint
|
169
181
|
config.universe_domain = @streaming_service_stub.universe_domain
|
182
|
+
config.logger = @streaming_service_stub.logger if config.respond_to? :logger=
|
170
183
|
end
|
171
184
|
end
|
172
185
|
|
@@ -184,6 +197,15 @@ module Google
|
|
184
197
|
#
|
185
198
|
attr_reader :iam_policy_client
|
186
199
|
|
200
|
+
##
|
201
|
+
# The logger used for request/response debug logging.
|
202
|
+
#
|
203
|
+
# @return [Logger]
|
204
|
+
#
|
205
|
+
def logger
|
206
|
+
@streaming_service_stub.logger
|
207
|
+
end
|
208
|
+
|
187
209
|
# Service calls
|
188
210
|
|
189
211
|
##
|
@@ -265,7 +287,6 @@ module Google
|
|
265
287
|
|
266
288
|
@streaming_service_stub.acquire_lease request, options do |result, operation|
|
267
289
|
yield result, operation if block_given?
|
268
|
-
return result
|
269
290
|
end
|
270
291
|
rescue ::Gapic::Rest::Error => e
|
271
292
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -350,7 +371,6 @@ module Google
|
|
350
371
|
|
351
372
|
@streaming_service_stub.renew_lease request, options do |result, operation|
|
352
373
|
yield result, operation if block_given?
|
353
|
-
return result
|
354
374
|
end
|
355
375
|
rescue ::Gapic::Rest::Error => e
|
356
376
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -433,7 +453,6 @@ module Google
|
|
433
453
|
|
434
454
|
@streaming_service_stub.release_lease request, options do |result, operation|
|
435
455
|
yield result, operation if block_given?
|
436
|
-
return result
|
437
456
|
end
|
438
457
|
rescue ::Gapic::Rest::Error => e
|
439
458
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -481,6 +500,13 @@ module Google
|
|
481
500
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
482
501
|
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
483
502
|
# * (`nil`) indicating no credentials
|
503
|
+
#
|
504
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
505
|
+
# external source for authentication to Google Cloud, you must validate it before
|
506
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
507
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
508
|
+
# For more information, refer to [Validate credential configurations from external
|
509
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
484
510
|
# @return [::Object]
|
485
511
|
# @!attribute [rw] scope
|
486
512
|
# The OAuth scopes
|
@@ -513,6 +539,11 @@ module Google
|
|
513
539
|
# default endpoint URL. The default value of nil uses the environment
|
514
540
|
# universe (usually the default "googleapis.com" universe).
|
515
541
|
# @return [::String,nil]
|
542
|
+
# @!attribute [rw] logger
|
543
|
+
# A custom logger to use for request/response debug logging, or the value
|
544
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
545
|
+
# explicitly disable logging.
|
546
|
+
# @return [::Logger,:default,nil]
|
516
547
|
#
|
517
548
|
class Configuration
|
518
549
|
extend ::Gapic::Config
|
@@ -534,6 +565,7 @@ module Google
|
|
534
565
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
535
566
|
config_attr :quota_project, nil, ::String, nil
|
536
567
|
config_attr :universe_domain, nil, ::String, nil
|
568
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
537
569
|
|
538
570
|
# @private
|
539
571
|
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 acquire_lease 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: "acquire_lease",
|
93
106
|
options: options
|
94
107
|
)
|
95
108
|
operation = ::Gapic::Rest::TransportOperation.new response
|
96
109
|
result = ::Google::Cloud::VisionAI::V1::Lease.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
|
##
|
@@ -125,16 +139,18 @@ module Google
|
|
125
139
|
|
126
140
|
response = @client_stub.make_http_request(
|
127
141
|
verb,
|
128
|
-
uri:
|
129
|
-
body:
|
130
|
-
params:
|
142
|
+
uri: uri,
|
143
|
+
body: body || "",
|
144
|
+
params: query_string_params,
|
145
|
+
method_name: "renew_lease",
|
131
146
|
options: options
|
132
147
|
)
|
133
148
|
operation = ::Gapic::Rest::TransportOperation.new response
|
134
149
|
result = ::Google::Cloud::VisionAI::V1::Lease.decode_json response.body, ignore_unknown_fields: true
|
135
|
-
|
136
|
-
|
137
|
-
|
150
|
+
catch :response do
|
151
|
+
yield result, operation if block_given?
|
152
|
+
result
|
153
|
+
end
|
138
154
|
end
|
139
155
|
|
140
156
|
##
|
@@ -163,16 +179,18 @@ module Google
|
|
163
179
|
|
164
180
|
response = @client_stub.make_http_request(
|
165
181
|
verb,
|
166
|
-
uri:
|
167
|
-
body:
|
168
|
-
params:
|
182
|
+
uri: uri,
|
183
|
+
body: body || "",
|
184
|
+
params: query_string_params,
|
185
|
+
method_name: "release_lease",
|
169
186
|
options: options
|
170
187
|
)
|
171
188
|
operation = ::Gapic::Rest::TransportOperation.new response
|
172
189
|
result = ::Google::Cloud::VisionAI::V1::ReleaseLeaseResponse.decode_json response.body, ignore_unknown_fields: true
|
173
|
-
|
174
|
-
|
175
|
-
|
190
|
+
catch :response do
|
191
|
+
yield result, operation if block_given?
|
192
|
+
result
|
193
|
+
end
|
176
194
|
end
|
177
195
|
|
178
196
|
##
|
@@ -169,14 +169,26 @@ module Google
|
|
169
169
|
universe_domain: @config.universe_domain,
|
170
170
|
channel_args: @config.channel_args,
|
171
171
|
interceptors: @config.interceptors,
|
172
|
-
channel_pool_config: @config.channel_pool
|
172
|
+
channel_pool_config: @config.channel_pool,
|
173
|
+
logger: @config.logger
|
173
174
|
)
|
174
175
|
|
176
|
+
@streams_service_stub.stub_logger&.info do |entry|
|
177
|
+
entry.set_system_name
|
178
|
+
entry.set_service
|
179
|
+
entry.message = "Created client for #{entry.service}"
|
180
|
+
entry.set_credentials_fields credentials
|
181
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
182
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
183
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
184
|
+
end
|
185
|
+
|
175
186
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
176
187
|
config.credentials = credentials
|
177
188
|
config.quota_project = @quota_project_id
|
178
189
|
config.endpoint = @streams_service_stub.endpoint
|
179
190
|
config.universe_domain = @streams_service_stub.universe_domain
|
191
|
+
config.logger = @streams_service_stub.logger if config.respond_to? :logger=
|
180
192
|
end
|
181
193
|
|
182
194
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
@@ -184,6 +196,7 @@ module Google
|
|
184
196
|
config.quota_project = @quota_project_id
|
185
197
|
config.endpoint = @streams_service_stub.endpoint
|
186
198
|
config.universe_domain = @streams_service_stub.universe_domain
|
199
|
+
config.logger = @streams_service_stub.logger if config.respond_to? :logger=
|
187
200
|
end
|
188
201
|
end
|
189
202
|
|
@@ -208,6 +221,15 @@ module Google
|
|
208
221
|
#
|
209
222
|
attr_reader :iam_policy_client
|
210
223
|
|
224
|
+
##
|
225
|
+
# The logger used for request/response debug logging.
|
226
|
+
#
|
227
|
+
# @return [Logger]
|
228
|
+
#
|
229
|
+
def logger
|
230
|
+
@streams_service_stub.logger
|
231
|
+
end
|
232
|
+
|
211
233
|
# Service calls
|
212
234
|
|
213
235
|
##
|
@@ -304,7 +326,7 @@ module Google
|
|
304
326
|
@streams_service_stub.call_rpc :list_clusters, request, options: options do |response, operation|
|
305
327
|
response = ::Gapic::PagedEnumerable.new @streams_service_stub, :list_clusters, request, response, operation, options
|
306
328
|
yield response, operation if block_given?
|
307
|
-
|
329
|
+
throw :response, response
|
308
330
|
end
|
309
331
|
rescue ::GRPC::BadStatus => e
|
310
332
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -390,7 +412,6 @@ module Google
|
|
390
412
|
|
391
413
|
@streams_service_stub.call_rpc :get_cluster, request, options: options do |response, operation|
|
392
414
|
yield response, operation if block_given?
|
393
|
-
return response
|
394
415
|
end
|
395
416
|
rescue ::GRPC::BadStatus => e
|
396
417
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -502,7 +523,7 @@ module Google
|
|
502
523
|
@streams_service_stub.call_rpc :create_cluster, request, options: options do |response, operation|
|
503
524
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
504
525
|
yield response, operation if block_given?
|
505
|
-
|
526
|
+
throw :response, response
|
506
527
|
end
|
507
528
|
rescue ::GRPC::BadStatus => e
|
508
529
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -616,7 +637,7 @@ module Google
|
|
616
637
|
@streams_service_stub.call_rpc :update_cluster, request, options: options do |response, operation|
|
617
638
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
618
639
|
yield response, operation if block_given?
|
619
|
-
|
640
|
+
throw :response, response
|
620
641
|
end
|
621
642
|
rescue ::GRPC::BadStatus => e
|
622
643
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -724,7 +745,7 @@ module Google
|
|
724
745
|
@streams_service_stub.call_rpc :delete_cluster, request, options: options do |response, operation|
|
725
746
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
726
747
|
yield response, operation if block_given?
|
727
|
-
|
748
|
+
throw :response, response
|
728
749
|
end
|
729
750
|
rescue ::GRPC::BadStatus => e
|
730
751
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -824,7 +845,7 @@ module Google
|
|
824
845
|
@streams_service_stub.call_rpc :list_streams, request, options: options do |response, operation|
|
825
846
|
response = ::Gapic::PagedEnumerable.new @streams_service_stub, :list_streams, request, response, operation, options
|
826
847
|
yield response, operation if block_given?
|
827
|
-
|
848
|
+
throw :response, response
|
828
849
|
end
|
829
850
|
rescue ::GRPC::BadStatus => e
|
830
851
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -910,7 +931,6 @@ module Google
|
|
910
931
|
|
911
932
|
@streams_service_stub.call_rpc :get_stream, request, options: options do |response, operation|
|
912
933
|
yield response, operation if block_given?
|
913
|
-
return response
|
914
934
|
end
|
915
935
|
rescue ::GRPC::BadStatus => e
|
916
936
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1022,7 +1042,7 @@ module Google
|
|
1022
1042
|
@streams_service_stub.call_rpc :create_stream, request, options: options do |response, operation|
|
1023
1043
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1024
1044
|
yield response, operation if block_given?
|
1025
|
-
|
1045
|
+
throw :response, response
|
1026
1046
|
end
|
1027
1047
|
rescue ::GRPC::BadStatus => e
|
1028
1048
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1136,7 +1156,7 @@ module Google
|
|
1136
1156
|
@streams_service_stub.call_rpc :update_stream, request, options: options do |response, operation|
|
1137
1157
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1138
1158
|
yield response, operation if block_given?
|
1139
|
-
|
1159
|
+
throw :response, response
|
1140
1160
|
end
|
1141
1161
|
rescue ::GRPC::BadStatus => e
|
1142
1162
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1244,7 +1264,7 @@ module Google
|
|
1244
1264
|
@streams_service_stub.call_rpc :delete_stream, request, options: options do |response, operation|
|
1245
1265
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1246
1266
|
yield response, operation if block_given?
|
1247
|
-
|
1267
|
+
throw :response, response
|
1248
1268
|
end
|
1249
1269
|
rescue ::GRPC::BadStatus => e
|
1250
1270
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1357,7 +1377,7 @@ module Google
|
|
1357
1377
|
@streams_service_stub.call_rpc :get_stream_thumbnail, request, options: options do |response, operation|
|
1358
1378
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1359
1379
|
yield response, operation if block_given?
|
1360
|
-
|
1380
|
+
throw :response, response
|
1361
1381
|
end
|
1362
1382
|
rescue ::GRPC::BadStatus => e
|
1363
1383
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1443,7 +1463,6 @@ module Google
|
|
1443
1463
|
|
1444
1464
|
@streams_service_stub.call_rpc :generate_stream_hls_token, request, options: options do |response, operation|
|
1445
1465
|
yield response, operation if block_given?
|
1446
|
-
return response
|
1447
1466
|
end
|
1448
1467
|
rescue ::GRPC::BadStatus => e
|
1449
1468
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1543,7 +1562,7 @@ module Google
|
|
1543
1562
|
@streams_service_stub.call_rpc :list_events, request, options: options do |response, operation|
|
1544
1563
|
response = ::Gapic::PagedEnumerable.new @streams_service_stub, :list_events, request, response, operation, options
|
1545
1564
|
yield response, operation if block_given?
|
1546
|
-
|
1565
|
+
throw :response, response
|
1547
1566
|
end
|
1548
1567
|
rescue ::GRPC::BadStatus => e
|
1549
1568
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1629,7 +1648,6 @@ module Google
|
|
1629
1648
|
|
1630
1649
|
@streams_service_stub.call_rpc :get_event, request, options: options do |response, operation|
|
1631
1650
|
yield response, operation if block_given?
|
1632
|
-
return response
|
1633
1651
|
end
|
1634
1652
|
rescue ::GRPC::BadStatus => e
|
1635
1653
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1741,7 +1759,7 @@ module Google
|
|
1741
1759
|
@streams_service_stub.call_rpc :create_event, request, options: options do |response, operation|
|
1742
1760
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1743
1761
|
yield response, operation if block_given?
|
1744
|
-
|
1762
|
+
throw :response, response
|
1745
1763
|
end
|
1746
1764
|
rescue ::GRPC::BadStatus => e
|
1747
1765
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1855,7 +1873,7 @@ module Google
|
|
1855
1873
|
@streams_service_stub.call_rpc :update_event, request, options: options do |response, operation|
|
1856
1874
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1857
1875
|
yield response, operation if block_given?
|
1858
|
-
|
1876
|
+
throw :response, response
|
1859
1877
|
end
|
1860
1878
|
rescue ::GRPC::BadStatus => e
|
1861
1879
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1963,7 +1981,7 @@ module Google
|
|
1963
1981
|
@streams_service_stub.call_rpc :delete_event, request, options: options do |response, operation|
|
1964
1982
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1965
1983
|
yield response, operation if block_given?
|
1966
|
-
|
1984
|
+
throw :response, response
|
1967
1985
|
end
|
1968
1986
|
rescue ::GRPC::BadStatus => e
|
1969
1987
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2063,7 +2081,7 @@ module Google
|
|
2063
2081
|
@streams_service_stub.call_rpc :list_series, request, options: options do |response, operation|
|
2064
2082
|
response = ::Gapic::PagedEnumerable.new @streams_service_stub, :list_series, request, response, operation, options
|
2065
2083
|
yield response, operation if block_given?
|
2066
|
-
|
2084
|
+
throw :response, response
|
2067
2085
|
end
|
2068
2086
|
rescue ::GRPC::BadStatus => e
|
2069
2087
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2149,7 +2167,6 @@ module Google
|
|
2149
2167
|
|
2150
2168
|
@streams_service_stub.call_rpc :get_series, request, options: options do |response, operation|
|
2151
2169
|
yield response, operation if block_given?
|
2152
|
-
return response
|
2153
2170
|
end
|
2154
2171
|
rescue ::GRPC::BadStatus => e
|
2155
2172
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2261,7 +2278,7 @@ module Google
|
|
2261
2278
|
@streams_service_stub.call_rpc :create_series, request, options: options do |response, operation|
|
2262
2279
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2263
2280
|
yield response, operation if block_given?
|
2264
|
-
|
2281
|
+
throw :response, response
|
2265
2282
|
end
|
2266
2283
|
rescue ::GRPC::BadStatus => e
|
2267
2284
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2375,7 +2392,7 @@ module Google
|
|
2375
2392
|
@streams_service_stub.call_rpc :update_series, request, options: options do |response, operation|
|
2376
2393
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2377
2394
|
yield response, operation if block_given?
|
2378
|
-
|
2395
|
+
throw :response, response
|
2379
2396
|
end
|
2380
2397
|
rescue ::GRPC::BadStatus => e
|
2381
2398
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2483,7 +2500,7 @@ module Google
|
|
2483
2500
|
@streams_service_stub.call_rpc :delete_series, request, options: options do |response, operation|
|
2484
2501
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2485
2502
|
yield response, operation if block_given?
|
2486
|
-
|
2503
|
+
throw :response, response
|
2487
2504
|
end
|
2488
2505
|
rescue ::GRPC::BadStatus => e
|
2489
2506
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2595,7 +2612,7 @@ module Google
|
|
2595
2612
|
@streams_service_stub.call_rpc :materialize_channel, request, options: options do |response, operation|
|
2596
2613
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2597
2614
|
yield response, operation if block_given?
|
2598
|
-
|
2615
|
+
throw :response, response
|
2599
2616
|
end
|
2600
2617
|
rescue ::GRPC::BadStatus => e
|
2601
2618
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2645,6 +2662,13 @@ module Google
|
|
2645
2662
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
2646
2663
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
2647
2664
|
# * (`nil`) indicating no credentials
|
2665
|
+
#
|
2666
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
2667
|
+
# external source for authentication to Google Cloud, you must validate it before
|
2668
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
2669
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
2670
|
+
# For more information, refer to [Validate credential configurations from external
|
2671
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
2648
2672
|
# @return [::Object]
|
2649
2673
|
# @!attribute [rw] scope
|
2650
2674
|
# The OAuth scopes
|
@@ -2684,6 +2708,11 @@ module Google
|
|
2684
2708
|
# default endpoint URL. The default value of nil uses the environment
|
2685
2709
|
# universe (usually the default "googleapis.com" universe).
|
2686
2710
|
# @return [::String,nil]
|
2711
|
+
# @!attribute [rw] logger
|
2712
|
+
# A custom logger to use for request/response debug logging, or the value
|
2713
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
2714
|
+
# explicitly disable logging.
|
2715
|
+
# @return [::Logger,:default,nil]
|
2687
2716
|
#
|
2688
2717
|
class Configuration
|
2689
2718
|
extend ::Gapic::Config
|
@@ -2708,6 +2737,7 @@ module Google
|
|
2708
2737
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
2709
2738
|
config_attr :quota_project, nil, ::String, nil
|
2710
2739
|
config_attr :universe_domain, nil, ::String, nil
|
2740
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
2711
2741
|
|
2712
2742
|
# @private
|
2713
2743
|
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
|