google-cloud-connectors-v1 0.1.1 → 0.2.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/connectors/v1/connectors/client.rb +39 -18
- data/lib/google/cloud/connectors/v1/connectors/operations.rb +12 -15
- data/lib/google/cloud/connectors/v1/connectors/rest/client.rb +35 -18
- data/lib/google/cloud/connectors/v1/connectors/rest/operations.rb +43 -38
- data/lib/google/cloud/connectors/v1/connectors/rest/service_stub.rb +150 -104
- data/lib/google/cloud/connectors/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +39 -0
- data/proto_docs/google/longrunning/operations.rb +19 -14
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1126747b9491f028538d52a31af04e3112714526bf050563de574e4307d065ed
|
4
|
+
data.tar.gz: 33be5b7fc63d72af78b31a3f42d5dab248437fd4279e11dcb44e37df4198967c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fb5620b28bfb098d62aaf8b8083949472cceacf2c754ab8a87c7131a79b12a42242c24ff22fa65e2671f9bb486ce0a7a0a620dc3e5cdfa1816a706b1a249323
|
7
|
+
data.tar.gz: c42a7eedbe36e5380a5ac325fc2d875f3e8d1ab22648fa6d9c29cddf0d5b9785ae5e138e4a7e8e5fbace4edd40bf7138d5a0fd7fdb0e8092e3e0af0ddcc1ddfb
|
data/README.md
CHANGED
@@ -40,33 +40,43 @@ response = client.list_connections request
|
|
40
40
|
View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-connectors-v1/latest)
|
41
41
|
for class and method documentation.
|
42
42
|
|
43
|
-
##
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
43
|
+
## Debug Logging
|
44
|
+
|
45
|
+
This library comes with opt-in Debug Logging that can help you troubleshoot
|
46
|
+
your application's integration with the API. When logging is activated, key
|
47
|
+
events such as requests and responses, along with data payloads and metadata
|
48
|
+
such as headers and client configuration, are logged to the standard error
|
49
|
+
stream.
|
50
|
+
|
51
|
+
**WARNING:** Client Library Debug Logging includes your data payloads in
|
52
|
+
plaintext, which could include sensitive data such as PII for yourself or your
|
53
|
+
customers, private keys, or other security data that could be compromising if
|
54
|
+
leaked. Always practice good data hygiene with your application logs, and follow
|
55
|
+
the principle of least access. Google also recommends that Client Library Debug
|
56
|
+
Logging be enabled only temporarily during active debugging, and not used
|
57
|
+
permanently in production.
|
58
|
+
|
59
|
+
To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
|
60
|
+
to the value `all`. Alternatively, you can set the value to a comma-delimited
|
61
|
+
list of client library gem names. This will select the default logging behavior,
|
62
|
+
which writes logs to the standard error stream. On a local workstation, this may
|
63
|
+
result in logs appearing on the console. When running on a Google Cloud hosting
|
64
|
+
service such as [Google Cloud Run](https://cloud.google.com/run), this generally
|
65
|
+
results in logs appearing alongside your application logs in the
|
66
|
+
[Google Cloud Logging](https://cloud.google.com/logging/) service.
|
67
|
+
|
68
|
+
You can customize logging by modifying the `logger` configuration when
|
69
|
+
constructing a client object. For example:
|
52
70
|
|
53
71
|
```ruby
|
72
|
+
require "google/cloud/connectors/v1"
|
54
73
|
require "logger"
|
55
74
|
|
56
|
-
|
57
|
-
|
58
|
-
def logger
|
59
|
-
LOGGER
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
|
-
# Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
64
|
-
module GRPC
|
65
|
-
extend MyLogger
|
75
|
+
client = ::Google::Cloud::Connectors::V1::Connectors::Client.new do |config|
|
76
|
+
config.logger = Logger.new "my-app.log"
|
66
77
|
end
|
67
78
|
```
|
68
79
|
|
69
|
-
|
70
80
|
## Google Cloud Samples
|
71
81
|
|
72
82
|
To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
|
@@ -232,14 +232,26 @@ module Google
|
|
232
232
|
universe_domain: @config.universe_domain,
|
233
233
|
channel_args: @config.channel_args,
|
234
234
|
interceptors: @config.interceptors,
|
235
|
-
channel_pool_config: @config.channel_pool
|
235
|
+
channel_pool_config: @config.channel_pool,
|
236
|
+
logger: @config.logger
|
236
237
|
)
|
237
238
|
|
239
|
+
@connectors_stub.stub_logger&.info do |entry|
|
240
|
+
entry.set_system_name
|
241
|
+
entry.set_service
|
242
|
+
entry.message = "Created client for #{entry.service}"
|
243
|
+
entry.set_credentials_fields credentials
|
244
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
245
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
246
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
247
|
+
end
|
248
|
+
|
238
249
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
239
250
|
config.credentials = credentials
|
240
251
|
config.quota_project = @quota_project_id
|
241
252
|
config.endpoint = @connectors_stub.endpoint
|
242
253
|
config.universe_domain = @connectors_stub.universe_domain
|
254
|
+
config.logger = @connectors_stub.logger if config.respond_to? :logger=
|
243
255
|
end
|
244
256
|
|
245
257
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
@@ -247,6 +259,7 @@ module Google
|
|
247
259
|
config.quota_project = @quota_project_id
|
248
260
|
config.endpoint = @connectors_stub.endpoint
|
249
261
|
config.universe_domain = @connectors_stub.universe_domain
|
262
|
+
config.logger = @connectors_stub.logger if config.respond_to? :logger=
|
250
263
|
end
|
251
264
|
end
|
252
265
|
|
@@ -271,6 +284,15 @@ module Google
|
|
271
284
|
#
|
272
285
|
attr_reader :iam_policy_client
|
273
286
|
|
287
|
+
##
|
288
|
+
# The logger used for request/response debug logging.
|
289
|
+
#
|
290
|
+
# @return [Logger]
|
291
|
+
#
|
292
|
+
def logger
|
293
|
+
@connectors_stub.logger
|
294
|
+
end
|
295
|
+
|
274
296
|
# Service calls
|
275
297
|
|
276
298
|
##
|
@@ -370,7 +392,7 @@ module Google
|
|
370
392
|
@connectors_stub.call_rpc :list_connections, request, options: options do |response, operation|
|
371
393
|
response = ::Gapic::PagedEnumerable.new @connectors_stub, :list_connections, request, response, operation, options
|
372
394
|
yield response, operation if block_given?
|
373
|
-
|
395
|
+
throw :response, response
|
374
396
|
end
|
375
397
|
rescue ::GRPC::BadStatus => e
|
376
398
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -460,7 +482,6 @@ module Google
|
|
460
482
|
|
461
483
|
@connectors_stub.call_rpc :get_connection, request, options: options do |response, operation|
|
462
484
|
yield response, operation if block_given?
|
463
|
-
return response
|
464
485
|
end
|
465
486
|
rescue ::GRPC::BadStatus => e
|
466
487
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -560,7 +581,7 @@ module Google
|
|
560
581
|
@connectors_stub.call_rpc :create_connection, request, options: options do |response, operation|
|
561
582
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
562
583
|
yield response, operation if block_given?
|
563
|
-
|
584
|
+
throw :response, response
|
564
585
|
end
|
565
586
|
rescue ::GRPC::BadStatus => e
|
566
587
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -671,7 +692,7 @@ module Google
|
|
671
692
|
@connectors_stub.call_rpc :update_connection, request, options: options do |response, operation|
|
672
693
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
673
694
|
yield response, operation if block_given?
|
674
|
-
|
695
|
+
throw :response, response
|
675
696
|
end
|
676
697
|
rescue ::GRPC::BadStatus => e
|
677
698
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -766,7 +787,7 @@ module Google
|
|
766
787
|
@connectors_stub.call_rpc :delete_connection, request, options: options do |response, operation|
|
767
788
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
768
789
|
yield response, operation if block_given?
|
769
|
-
|
790
|
+
throw :response, response
|
770
791
|
end
|
771
792
|
rescue ::GRPC::BadStatus => e
|
772
793
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -863,7 +884,7 @@ module Google
|
|
863
884
|
@connectors_stub.call_rpc :list_providers, request, options: options do |response, operation|
|
864
885
|
response = ::Gapic::PagedEnumerable.new @connectors_stub, :list_providers, request, response, operation, options
|
865
886
|
yield response, operation if block_given?
|
866
|
-
|
887
|
+
throw :response, response
|
867
888
|
end
|
868
889
|
rescue ::GRPC::BadStatus => e
|
869
890
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -951,7 +972,6 @@ module Google
|
|
951
972
|
|
952
973
|
@connectors_stub.call_rpc :get_provider, request, options: options do |response, operation|
|
953
974
|
yield response, operation if block_given?
|
954
|
-
return response
|
955
975
|
end
|
956
976
|
rescue ::GRPC::BadStatus => e
|
957
977
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1048,7 +1068,7 @@ module Google
|
|
1048
1068
|
@connectors_stub.call_rpc :list_connectors, request, options: options do |response, operation|
|
1049
1069
|
response = ::Gapic::PagedEnumerable.new @connectors_stub, :list_connectors, request, response, operation, options
|
1050
1070
|
yield response, operation if block_given?
|
1051
|
-
|
1071
|
+
throw :response, response
|
1052
1072
|
end
|
1053
1073
|
rescue ::GRPC::BadStatus => e
|
1054
1074
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1136,7 +1156,6 @@ module Google
|
|
1136
1156
|
|
1137
1157
|
@connectors_stub.call_rpc :get_connector, request, options: options do |response, operation|
|
1138
1158
|
yield response, operation if block_given?
|
1139
|
-
return response
|
1140
1159
|
end
|
1141
1160
|
rescue ::GRPC::BadStatus => e
|
1142
1161
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1236,7 +1255,7 @@ module Google
|
|
1236
1255
|
@connectors_stub.call_rpc :list_connector_versions, request, options: options do |response, operation|
|
1237
1256
|
response = ::Gapic::PagedEnumerable.new @connectors_stub, :list_connector_versions, request, response, operation, options
|
1238
1257
|
yield response, operation if block_given?
|
1239
|
-
|
1258
|
+
throw :response, response
|
1240
1259
|
end
|
1241
1260
|
rescue ::GRPC::BadStatus => e
|
1242
1261
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1327,7 +1346,6 @@ module Google
|
|
1327
1346
|
|
1328
1347
|
@connectors_stub.call_rpc :get_connector_version, request, options: options do |response, operation|
|
1329
1348
|
yield response, operation if block_given?
|
1330
|
-
return response
|
1331
1349
|
end
|
1332
1350
|
rescue ::GRPC::BadStatus => e
|
1333
1351
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1416,7 +1434,6 @@ module Google
|
|
1416
1434
|
|
1417
1435
|
@connectors_stub.call_rpc :get_connection_schema_metadata, request, options: options do |response, operation|
|
1418
1436
|
yield response, operation if block_given?
|
1419
|
-
return response
|
1420
1437
|
end
|
1421
1438
|
rescue ::GRPC::BadStatus => e
|
1422
1439
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1512,7 +1529,7 @@ module Google
|
|
1512
1529
|
@connectors_stub.call_rpc :refresh_connection_schema_metadata, request, options: options do |response, operation|
|
1513
1530
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1514
1531
|
yield response, operation if block_given?
|
1515
|
-
|
1532
|
+
throw :response, response
|
1516
1533
|
end
|
1517
1534
|
rescue ::GRPC::BadStatus => e
|
1518
1535
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1616,7 +1633,7 @@ module Google
|
|
1616
1633
|
@connectors_stub.call_rpc :list_runtime_entity_schemas, request, options: options do |response, operation|
|
1617
1634
|
response = ::Gapic::PagedEnumerable.new @connectors_stub, :list_runtime_entity_schemas, request, response, operation, options
|
1618
1635
|
yield response, operation if block_given?
|
1619
|
-
|
1636
|
+
throw :response, response
|
1620
1637
|
end
|
1621
1638
|
rescue ::GRPC::BadStatus => e
|
1622
1639
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1720,7 +1737,7 @@ module Google
|
|
1720
1737
|
@connectors_stub.call_rpc :list_runtime_action_schemas, request, options: options do |response, operation|
|
1721
1738
|
response = ::Gapic::PagedEnumerable.new @connectors_stub, :list_runtime_action_schemas, request, response, operation, options
|
1722
1739
|
yield response, operation if block_given?
|
1723
|
-
|
1740
|
+
throw :response, response
|
1724
1741
|
end
|
1725
1742
|
rescue ::GRPC::BadStatus => e
|
1726
1743
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1808,7 +1825,6 @@ module Google
|
|
1808
1825
|
|
1809
1826
|
@connectors_stub.call_rpc :get_runtime_config, request, options: options do |response, operation|
|
1810
1827
|
yield response, operation if block_given?
|
1811
|
-
return response
|
1812
1828
|
end
|
1813
1829
|
rescue ::GRPC::BadStatus => e
|
1814
1830
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1895,7 +1911,6 @@ module Google
|
|
1895
1911
|
|
1896
1912
|
@connectors_stub.call_rpc :get_global_settings, request, options: options do |response, operation|
|
1897
1913
|
yield response, operation if block_given?
|
1898
|
-
return response
|
1899
1914
|
end
|
1900
1915
|
rescue ::GRPC::BadStatus => e
|
1901
1916
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1984,6 +1999,11 @@ module Google
|
|
1984
1999
|
# default endpoint URL. The default value of nil uses the environment
|
1985
2000
|
# universe (usually the default "googleapis.com" universe).
|
1986
2001
|
# @return [::String,nil]
|
2002
|
+
# @!attribute [rw] logger
|
2003
|
+
# A custom logger to use for request/response debug logging, or the value
|
2004
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
2005
|
+
# explicitly disable logging.
|
2006
|
+
# @return [::Logger,:default,nil]
|
1987
2007
|
#
|
1988
2008
|
class Configuration
|
1989
2009
|
extend ::Gapic::Config
|
@@ -2008,6 +2028,7 @@ module Google
|
|
2008
2028
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
2009
2029
|
config_attr :quota_project, nil, ::String, nil
|
2010
2030
|
config_attr :universe_domain, nil, ::String, nil
|
2031
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
2011
2032
|
|
2012
2033
|
# @private
|
2013
2034
|
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
|
@@ -225,15 +225,27 @@ module Google
|
|
225
225
|
endpoint: @config.endpoint,
|
226
226
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
227
227
|
universe_domain: @config.universe_domain,
|
228
|
-
credentials: credentials
|
228
|
+
credentials: credentials,
|
229
|
+
logger: @config.logger
|
229
230
|
)
|
230
231
|
|
232
|
+
@connectors_stub.logger(stub: true)&.info do |entry|
|
233
|
+
entry.set_system_name
|
234
|
+
entry.set_service
|
235
|
+
entry.message = "Created client for #{entry.service}"
|
236
|
+
entry.set_credentials_fields credentials
|
237
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
238
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
239
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
240
|
+
end
|
241
|
+
|
231
242
|
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
232
243
|
config.credentials = credentials
|
233
244
|
config.quota_project = @quota_project_id
|
234
245
|
config.endpoint = @connectors_stub.endpoint
|
235
246
|
config.universe_domain = @connectors_stub.universe_domain
|
236
247
|
config.bindings_override = @config.bindings_override
|
248
|
+
config.logger = @connectors_stub.logger if config.respond_to? :logger=
|
237
249
|
end
|
238
250
|
|
239
251
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
|
@@ -242,6 +254,7 @@ module Google
|
|
242
254
|
config.endpoint = @connectors_stub.endpoint
|
243
255
|
config.universe_domain = @connectors_stub.universe_domain
|
244
256
|
config.bindings_override = @config.bindings_override
|
257
|
+
config.logger = @connectors_stub.logger if config.respond_to? :logger=
|
245
258
|
end
|
246
259
|
end
|
247
260
|
|
@@ -266,6 +279,15 @@ module Google
|
|
266
279
|
#
|
267
280
|
attr_reader :iam_policy_client
|
268
281
|
|
282
|
+
##
|
283
|
+
# The logger used for request/response debug logging.
|
284
|
+
#
|
285
|
+
# @return [Logger]
|
286
|
+
#
|
287
|
+
def logger
|
288
|
+
@connectors_stub.logger
|
289
|
+
end
|
290
|
+
|
269
291
|
# Service calls
|
270
292
|
|
271
293
|
##
|
@@ -357,7 +379,6 @@ module Google
|
|
357
379
|
|
358
380
|
@connectors_stub.list_connections request, options do |result, operation|
|
359
381
|
yield result, operation if block_given?
|
360
|
-
return result
|
361
382
|
end
|
362
383
|
rescue ::Gapic::Rest::Error => e
|
363
384
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -440,7 +461,6 @@ module Google
|
|
440
461
|
|
441
462
|
@connectors_stub.get_connection request, options do |result, operation|
|
442
463
|
yield result, operation if block_given?
|
443
|
-
return result
|
444
464
|
end
|
445
465
|
rescue ::Gapic::Rest::Error => e
|
446
466
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -533,7 +553,7 @@ module Google
|
|
533
553
|
@connectors_stub.create_connection request, options do |result, operation|
|
534
554
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
535
555
|
yield result, operation if block_given?
|
536
|
-
|
556
|
+
throw :response, result
|
537
557
|
end
|
538
558
|
rescue ::Gapic::Rest::Error => e
|
539
559
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -637,7 +657,7 @@ module Google
|
|
637
657
|
@connectors_stub.update_connection request, options do |result, operation|
|
638
658
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
639
659
|
yield result, operation if block_given?
|
640
|
-
|
660
|
+
throw :response, result
|
641
661
|
end
|
642
662
|
rescue ::Gapic::Rest::Error => e
|
643
663
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -725,7 +745,7 @@ module Google
|
|
725
745
|
@connectors_stub.delete_connection request, options do |result, operation|
|
726
746
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
727
747
|
yield result, operation if block_given?
|
728
|
-
|
748
|
+
throw :response, result
|
729
749
|
end
|
730
750
|
rescue ::Gapic::Rest::Error => e
|
731
751
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -814,7 +834,6 @@ module Google
|
|
814
834
|
|
815
835
|
@connectors_stub.list_providers request, options do |result, operation|
|
816
836
|
yield result, operation if block_given?
|
817
|
-
return result
|
818
837
|
end
|
819
838
|
rescue ::Gapic::Rest::Error => e
|
820
839
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -895,7 +914,6 @@ module Google
|
|
895
914
|
|
896
915
|
@connectors_stub.get_provider request, options do |result, operation|
|
897
916
|
yield result, operation if block_given?
|
898
|
-
return result
|
899
917
|
end
|
900
918
|
rescue ::Gapic::Rest::Error => e
|
901
919
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -984,7 +1002,6 @@ module Google
|
|
984
1002
|
|
985
1003
|
@connectors_stub.list_connectors request, options do |result, operation|
|
986
1004
|
yield result, operation if block_given?
|
987
|
-
return result
|
988
1005
|
end
|
989
1006
|
rescue ::Gapic::Rest::Error => e
|
990
1007
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1065,7 +1082,6 @@ module Google
|
|
1065
1082
|
|
1066
1083
|
@connectors_stub.get_connector request, options do |result, operation|
|
1067
1084
|
yield result, operation if block_given?
|
1068
|
-
return result
|
1069
1085
|
end
|
1070
1086
|
rescue ::Gapic::Rest::Error => e
|
1071
1087
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1157,7 +1173,6 @@ module Google
|
|
1157
1173
|
|
1158
1174
|
@connectors_stub.list_connector_versions request, options do |result, operation|
|
1159
1175
|
yield result, operation if block_given?
|
1160
|
-
return result
|
1161
1176
|
end
|
1162
1177
|
rescue ::Gapic::Rest::Error => e
|
1163
1178
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1241,7 +1256,6 @@ module Google
|
|
1241
1256
|
|
1242
1257
|
@connectors_stub.get_connector_version request, options do |result, operation|
|
1243
1258
|
yield result, operation if block_given?
|
1244
|
-
return result
|
1245
1259
|
end
|
1246
1260
|
rescue ::Gapic::Rest::Error => e
|
1247
1261
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1323,7 +1337,6 @@ module Google
|
|
1323
1337
|
|
1324
1338
|
@connectors_stub.get_connection_schema_metadata request, options do |result, operation|
|
1325
1339
|
yield result, operation if block_given?
|
1326
|
-
return result
|
1327
1340
|
end
|
1328
1341
|
rescue ::Gapic::Rest::Error => e
|
1329
1342
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1412,7 +1425,7 @@ module Google
|
|
1412
1425
|
@connectors_stub.refresh_connection_schema_metadata request, options do |result, operation|
|
1413
1426
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1414
1427
|
yield result, operation if block_given?
|
1415
|
-
|
1428
|
+
throw :response, result
|
1416
1429
|
end
|
1417
1430
|
rescue ::Gapic::Rest::Error => e
|
1418
1431
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1509,7 +1522,7 @@ module Google
|
|
1509
1522
|
@connectors_stub.list_runtime_entity_schemas request, options do |result, operation|
|
1510
1523
|
result = ::Gapic::Rest::PagedEnumerable.new @connectors_stub, :list_runtime_entity_schemas, "runtime_entity_schemas", request, result, options
|
1511
1524
|
yield result, operation if block_given?
|
1512
|
-
|
1525
|
+
throw :response, result
|
1513
1526
|
end
|
1514
1527
|
rescue ::Gapic::Rest::Error => e
|
1515
1528
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1606,7 +1619,7 @@ module Google
|
|
1606
1619
|
@connectors_stub.list_runtime_action_schemas request, options do |result, operation|
|
1607
1620
|
result = ::Gapic::Rest::PagedEnumerable.new @connectors_stub, :list_runtime_action_schemas, "runtime_action_schemas", request, result, options
|
1608
1621
|
yield result, operation if block_given?
|
1609
|
-
|
1622
|
+
throw :response, result
|
1610
1623
|
end
|
1611
1624
|
rescue ::Gapic::Rest::Error => e
|
1612
1625
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1687,7 +1700,6 @@ module Google
|
|
1687
1700
|
|
1688
1701
|
@connectors_stub.get_runtime_config request, options do |result, operation|
|
1689
1702
|
yield result, operation if block_given?
|
1690
|
-
return result
|
1691
1703
|
end
|
1692
1704
|
rescue ::Gapic::Rest::Error => e
|
1693
1705
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1767,7 +1779,6 @@ module Google
|
|
1767
1779
|
|
1768
1780
|
@connectors_stub.get_global_settings request, options do |result, operation|
|
1769
1781
|
yield result, operation if block_given?
|
1770
|
-
return result
|
1771
1782
|
end
|
1772
1783
|
rescue ::Gapic::Rest::Error => e
|
1773
1784
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1847,6 +1858,11 @@ module Google
|
|
1847
1858
|
# default endpoint URL. The default value of nil uses the environment
|
1848
1859
|
# universe (usually the default "googleapis.com" universe).
|
1849
1860
|
# @return [::String,nil]
|
1861
|
+
# @!attribute [rw] logger
|
1862
|
+
# A custom logger to use for request/response debug logging, or the value
|
1863
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1864
|
+
# explicitly disable logging.
|
1865
|
+
# @return [::Logger,:default,nil]
|
1850
1866
|
#
|
1851
1867
|
class Configuration
|
1852
1868
|
extend ::Gapic::Config
|
@@ -1875,6 +1891,7 @@ module Google
|
|
1875
1891
|
# by the host service.
|
1876
1892
|
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
1877
1893
|
config_attr :bindings_override, {}, ::Hash, nil
|
1894
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1878
1895
|
|
1879
1896
|
# @private
|
1880
1897
|
def initialize parent_config = nil
|