google-cloud-datastream-v1alpha1 0.7.1 → 0.8.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 +30 -20
- data/lib/google/cloud/datastream/v1alpha1/datastream/client.rb +42 -22
- data/lib/google/cloud/datastream/v1alpha1/datastream/operations.rb +12 -15
- data/lib/google/cloud/datastream/v1alpha1/datastream/rest/client.rb +39 -22
- data/lib/google/cloud/datastream/v1alpha1/datastream/rest/operations.rb +43 -38
- data/lib/google/cloud/datastream/v1alpha1/datastream/rest/service_stub.rb +182 -128
- data/lib/google/cloud/datastream/v1alpha1/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: ecb1010b65b88f6f8b6128df4890b04185e08cb9a89e377c38c0fe76beebb02c
|
4
|
+
data.tar.gz: 5d1f546cdee1aeaaab73b67ab826cc202202f6737e368ff8531ec3757e5ee847
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b58e4842ca85d2f61e26ef9a9d9f36550201632630ec274d3fa3ffe917ac855ae53a9ff049c2eb99e45413a6db23154a2bb7a2b25d2a64a6483b4f314e141a2
|
7
|
+
data.tar.gz: 836c0e649cbc18403fbdff0ee6eeb47054486bfd843e54410f2a711f5e61ff29df1e066e30873821a29bd36819e9d154945435741bedc4ed814250cfc7f4be47
|
data/README.md
CHANGED
@@ -43,33 +43,43 @@ for class and method documentation.
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/datastream/)
|
44
44
|
for general usage information.
|
45
45
|
|
46
|
-
##
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
46
|
+
## Debug Logging
|
47
|
+
|
48
|
+
This library comes with opt-in Debug Logging that can help you troubleshoot
|
49
|
+
your application's integration with the API. When logging is activated, key
|
50
|
+
events such as requests and responses, along with data payloads and metadata
|
51
|
+
such as headers and client configuration, are logged to the standard error
|
52
|
+
stream.
|
53
|
+
|
54
|
+
**WARNING:** Client Library Debug Logging includes your data payloads in
|
55
|
+
plaintext, which could include sensitive data such as PII for yourself or your
|
56
|
+
customers, private keys, or other security data that could be compromising if
|
57
|
+
leaked. Always practice good data hygiene with your application logs, and follow
|
58
|
+
the principle of least access. Google also recommends that Client Library Debug
|
59
|
+
Logging be enabled only temporarily during active debugging, and not used
|
60
|
+
permanently in production.
|
61
|
+
|
62
|
+
To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
|
63
|
+
to the value `all`. Alternatively, you can set the value to a comma-delimited
|
64
|
+
list of client library gem names. This will select the default logging behavior,
|
65
|
+
which writes logs to the standard error stream. On a local workstation, this may
|
66
|
+
result in logs appearing on the console. When running on a Google Cloud hosting
|
67
|
+
service such as [Google Cloud Run](https://cloud.google.com/run), this generally
|
68
|
+
results in logs appearing alongside your application logs in the
|
69
|
+
[Google Cloud Logging](https://cloud.google.com/logging/) service.
|
70
|
+
|
71
|
+
You can customize logging by modifying the `logger` configuration when
|
72
|
+
constructing a client object. For example:
|
55
73
|
|
56
74
|
```ruby
|
75
|
+
require "google/cloud/datastream/v1alpha1"
|
57
76
|
require "logger"
|
58
77
|
|
59
|
-
|
60
|
-
|
61
|
-
def logger
|
62
|
-
LOGGER
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
# Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
67
|
-
module GRPC
|
68
|
-
extend MyLogger
|
78
|
+
client = ::Google::Cloud::Datastream::V1alpha1::Datastream::Client.new do |config|
|
79
|
+
config.logger = Logger.new "my-app.log"
|
69
80
|
end
|
70
81
|
```
|
71
82
|
|
72
|
-
|
73
83
|
## Google Cloud Samples
|
74
84
|
|
75
85
|
To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
|
@@ -189,8 +189,19 @@ module Google
|
|
189
189
|
universe_domain: @config.universe_domain,
|
190
190
|
channel_args: @config.channel_args,
|
191
191
|
interceptors: @config.interceptors,
|
192
|
-
channel_pool_config: @config.channel_pool
|
192
|
+
channel_pool_config: @config.channel_pool,
|
193
|
+
logger: @config.logger
|
193
194
|
)
|
195
|
+
|
196
|
+
@datastream_stub.stub_logger&.info do |entry|
|
197
|
+
entry.set_system_name
|
198
|
+
entry.set_service
|
199
|
+
entry.message = "Created client for #{entry.service}"
|
200
|
+
entry.set_credentials_fields credentials
|
201
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
202
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
203
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
204
|
+
end
|
194
205
|
end
|
195
206
|
|
196
207
|
##
|
@@ -200,6 +211,15 @@ module Google
|
|
200
211
|
#
|
201
212
|
attr_reader :operations_client
|
202
213
|
|
214
|
+
##
|
215
|
+
# The logger used for request/response debug logging.
|
216
|
+
#
|
217
|
+
# @return [Logger]
|
218
|
+
#
|
219
|
+
def logger
|
220
|
+
@datastream_stub.logger
|
221
|
+
end
|
222
|
+
|
203
223
|
# Service calls
|
204
224
|
|
205
225
|
##
|
@@ -302,7 +322,7 @@ module Google
|
|
302
322
|
@datastream_stub.call_rpc :list_connection_profiles, request, options: options do |response, operation|
|
303
323
|
response = ::Gapic::PagedEnumerable.new @datastream_stub, :list_connection_profiles, request, response, operation, options
|
304
324
|
yield response, operation if block_given?
|
305
|
-
|
325
|
+
throw :response, response
|
306
326
|
end
|
307
327
|
rescue ::GRPC::BadStatus => e
|
308
328
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -388,7 +408,6 @@ module Google
|
|
388
408
|
|
389
409
|
@datastream_stub.call_rpc :get_connection_profile, request, options: options do |response, operation|
|
390
410
|
yield response, operation if block_given?
|
391
|
-
return response
|
392
411
|
end
|
393
412
|
rescue ::GRPC::BadStatus => e
|
394
413
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -500,7 +519,7 @@ module Google
|
|
500
519
|
@datastream_stub.call_rpc :create_connection_profile, request, options: options do |response, operation|
|
501
520
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
502
521
|
yield response, operation if block_given?
|
503
|
-
|
522
|
+
throw :response, response
|
504
523
|
end
|
505
524
|
rescue ::GRPC::BadStatus => e
|
506
525
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -614,7 +633,7 @@ module Google
|
|
614
633
|
@datastream_stub.call_rpc :update_connection_profile, request, options: options do |response, operation|
|
615
634
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
616
635
|
yield response, operation if block_given?
|
617
|
-
|
636
|
+
throw :response, response
|
618
637
|
end
|
619
638
|
rescue ::GRPC::BadStatus => e
|
620
639
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -722,7 +741,7 @@ module Google
|
|
722
741
|
@datastream_stub.call_rpc :delete_connection_profile, request, options: options do |response, operation|
|
723
742
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
724
743
|
yield response, operation if block_given?
|
725
|
-
|
744
|
+
throw :response, response
|
726
745
|
end
|
727
746
|
rescue ::GRPC::BadStatus => e
|
728
747
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -825,7 +844,6 @@ module Google
|
|
825
844
|
|
826
845
|
@datastream_stub.call_rpc :discover_connection_profile, request, options: options do |response, operation|
|
827
846
|
yield response, operation if block_given?
|
828
|
-
return response
|
829
847
|
end
|
830
848
|
rescue ::GRPC::BadStatus => e
|
831
849
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -930,7 +948,7 @@ module Google
|
|
930
948
|
@datastream_stub.call_rpc :list_streams, request, options: options do |response, operation|
|
931
949
|
response = ::Gapic::PagedEnumerable.new @datastream_stub, :list_streams, request, response, operation, options
|
932
950
|
yield response, operation if block_given?
|
933
|
-
|
951
|
+
throw :response, response
|
934
952
|
end
|
935
953
|
rescue ::GRPC::BadStatus => e
|
936
954
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1016,7 +1034,6 @@ module Google
|
|
1016
1034
|
|
1017
1035
|
@datastream_stub.call_rpc :get_stream, request, options: options do |response, operation|
|
1018
1036
|
yield response, operation if block_given?
|
1019
|
-
return response
|
1020
1037
|
end
|
1021
1038
|
rescue ::GRPC::BadStatus => e
|
1022
1039
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1133,7 +1150,7 @@ module Google
|
|
1133
1150
|
@datastream_stub.call_rpc :create_stream, request, options: options do |response, operation|
|
1134
1151
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1135
1152
|
yield response, operation if block_given?
|
1136
|
-
|
1153
|
+
throw :response, response
|
1137
1154
|
end
|
1138
1155
|
rescue ::GRPC::BadStatus => e
|
1139
1156
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1252,7 +1269,7 @@ module Google
|
|
1252
1269
|
@datastream_stub.call_rpc :update_stream, request, options: options do |response, operation|
|
1253
1270
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1254
1271
|
yield response, operation if block_given?
|
1255
|
-
|
1272
|
+
throw :response, response
|
1256
1273
|
end
|
1257
1274
|
rescue ::GRPC::BadStatus => e
|
1258
1275
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1360,7 +1377,7 @@ module Google
|
|
1360
1377
|
@datastream_stub.call_rpc :delete_stream, request, options: options do |response, operation|
|
1361
1378
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1362
1379
|
yield response, operation if block_given?
|
1363
|
-
|
1380
|
+
throw :response, response
|
1364
1381
|
end
|
1365
1382
|
rescue ::GRPC::BadStatus => e
|
1366
1383
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1454,7 +1471,7 @@ module Google
|
|
1454
1471
|
@datastream_stub.call_rpc :fetch_errors, request, options: options do |response, operation|
|
1455
1472
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1456
1473
|
yield response, operation if block_given?
|
1457
|
-
|
1474
|
+
throw :response, response
|
1458
1475
|
end
|
1459
1476
|
rescue ::GRPC::BadStatus => e
|
1460
1477
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1548,7 +1565,6 @@ module Google
|
|
1548
1565
|
|
1549
1566
|
@datastream_stub.call_rpc :fetch_static_ips, request, options: options do |response, operation|
|
1550
1567
|
yield response, operation if block_given?
|
1551
|
-
return response
|
1552
1568
|
end
|
1553
1569
|
rescue ::GRPC::BadStatus => e
|
1554
1570
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1660,7 +1676,7 @@ module Google
|
|
1660
1676
|
@datastream_stub.call_rpc :create_private_connection, request, options: options do |response, operation|
|
1661
1677
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1662
1678
|
yield response, operation if block_given?
|
1663
|
-
|
1679
|
+
throw :response, response
|
1664
1680
|
end
|
1665
1681
|
rescue ::GRPC::BadStatus => e
|
1666
1682
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1746,7 +1762,6 @@ module Google
|
|
1746
1762
|
|
1747
1763
|
@datastream_stub.call_rpc :get_private_connection, request, options: options do |response, operation|
|
1748
1764
|
yield response, operation if block_given?
|
1749
|
-
return response
|
1750
1765
|
end
|
1751
1766
|
rescue ::GRPC::BadStatus => e
|
1752
1767
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1854,7 +1869,7 @@ module Google
|
|
1854
1869
|
@datastream_stub.call_rpc :list_private_connections, request, options: options do |response, operation|
|
1855
1870
|
response = ::Gapic::PagedEnumerable.new @datastream_stub, :list_private_connections, request, response, operation, options
|
1856
1871
|
yield response, operation if block_given?
|
1857
|
-
|
1872
|
+
throw :response, response
|
1858
1873
|
end
|
1859
1874
|
rescue ::GRPC::BadStatus => e
|
1860
1875
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1965,7 +1980,7 @@ module Google
|
|
1965
1980
|
@datastream_stub.call_rpc :delete_private_connection, request, options: options do |response, operation|
|
1966
1981
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1967
1982
|
yield response, operation if block_given?
|
1968
|
-
|
1983
|
+
throw :response, response
|
1969
1984
|
end
|
1970
1985
|
rescue ::GRPC::BadStatus => e
|
1971
1986
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2078,7 +2093,7 @@ module Google
|
|
2078
2093
|
@datastream_stub.call_rpc :create_route, request, options: options do |response, operation|
|
2079
2094
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2080
2095
|
yield response, operation if block_given?
|
2081
|
-
|
2096
|
+
throw :response, response
|
2082
2097
|
end
|
2083
2098
|
rescue ::GRPC::BadStatus => e
|
2084
2099
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2164,7 +2179,6 @@ module Google
|
|
2164
2179
|
|
2165
2180
|
@datastream_stub.call_rpc :get_route, request, options: options do |response, operation|
|
2166
2181
|
yield response, operation if block_given?
|
2167
|
-
return response
|
2168
2182
|
end
|
2169
2183
|
rescue ::GRPC::BadStatus => e
|
2170
2184
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2272,7 +2286,7 @@ module Google
|
|
2272
2286
|
@datastream_stub.call_rpc :list_routes, request, options: options do |response, operation|
|
2273
2287
|
response = ::Gapic::PagedEnumerable.new @datastream_stub, :list_routes, request, response, operation, options
|
2274
2288
|
yield response, operation if block_given?
|
2275
|
-
|
2289
|
+
throw :response, response
|
2276
2290
|
end
|
2277
2291
|
rescue ::GRPC::BadStatus => e
|
2278
2292
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2380,7 +2394,7 @@ module Google
|
|
2380
2394
|
@datastream_stub.call_rpc :delete_route, request, options: options do |response, operation|
|
2381
2395
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2382
2396
|
yield response, operation if block_given?
|
2383
|
-
|
2397
|
+
throw :response, response
|
2384
2398
|
end
|
2385
2399
|
rescue ::GRPC::BadStatus => e
|
2386
2400
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2469,6 +2483,11 @@ module Google
|
|
2469
2483
|
# default endpoint URL. The default value of nil uses the environment
|
2470
2484
|
# universe (usually the default "googleapis.com" universe).
|
2471
2485
|
# @return [::String,nil]
|
2486
|
+
# @!attribute [rw] logger
|
2487
|
+
# A custom logger to use for request/response debug logging, or the value
|
2488
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
2489
|
+
# explicitly disable logging.
|
2490
|
+
# @return [::Logger,:default,nil]
|
2472
2491
|
#
|
2473
2492
|
class Configuration
|
2474
2493
|
extend ::Gapic::Config
|
@@ -2493,6 +2512,7 @@ module Google
|
|
2493
2512
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
2494
2513
|
config_attr :quota_project, nil, ::String, nil
|
2495
2514
|
config_attr :universe_domain, nil, ::String, nil
|
2515
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
2496
2516
|
|
2497
2517
|
# @private
|
2498
2518
|
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
|
@@ -182,8 +182,19 @@ module Google
|
|
182
182
|
endpoint: @config.endpoint,
|
183
183
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
184
184
|
universe_domain: @config.universe_domain,
|
185
|
-
credentials: credentials
|
185
|
+
credentials: credentials,
|
186
|
+
logger: @config.logger
|
186
187
|
)
|
188
|
+
|
189
|
+
@datastream_stub.logger(stub: true)&.info do |entry|
|
190
|
+
entry.set_system_name
|
191
|
+
entry.set_service
|
192
|
+
entry.message = "Created client for #{entry.service}"
|
193
|
+
entry.set_credentials_fields credentials
|
194
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
195
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
196
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
197
|
+
end
|
187
198
|
end
|
188
199
|
|
189
200
|
##
|
@@ -193,6 +204,15 @@ module Google
|
|
193
204
|
#
|
194
205
|
attr_reader :operations_client
|
195
206
|
|
207
|
+
##
|
208
|
+
# The logger used for request/response debug logging.
|
209
|
+
#
|
210
|
+
# @return [Logger]
|
211
|
+
#
|
212
|
+
def logger
|
213
|
+
@datastream_stub.logger
|
214
|
+
end
|
215
|
+
|
196
216
|
# Service calls
|
197
217
|
|
198
218
|
##
|
@@ -287,7 +307,6 @@ module Google
|
|
287
307
|
|
288
308
|
@datastream_stub.list_connection_profiles request, options do |result, operation|
|
289
309
|
yield result, operation if block_given?
|
290
|
-
return result
|
291
310
|
end
|
292
311
|
rescue ::Gapic::Rest::Error => e
|
293
312
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -366,7 +385,6 @@ module Google
|
|
366
385
|
|
367
386
|
@datastream_stub.get_connection_profile request, options do |result, operation|
|
368
387
|
yield result, operation if block_given?
|
369
|
-
return result
|
370
388
|
end
|
371
389
|
rescue ::Gapic::Rest::Error => e
|
372
390
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -471,7 +489,7 @@ module Google
|
|
471
489
|
@datastream_stub.create_connection_profile request, options do |result, operation|
|
472
490
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
473
491
|
yield result, operation if block_given?
|
474
|
-
|
492
|
+
throw :response, result
|
475
493
|
end
|
476
494
|
rescue ::Gapic::Rest::Error => e
|
477
495
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -578,7 +596,7 @@ module Google
|
|
578
596
|
@datastream_stub.update_connection_profile request, options do |result, operation|
|
579
597
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
580
598
|
yield result, operation if block_given?
|
581
|
-
|
599
|
+
throw :response, result
|
582
600
|
end
|
583
601
|
rescue ::Gapic::Rest::Error => e
|
584
602
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -679,7 +697,7 @@ module Google
|
|
679
697
|
@datastream_stub.delete_connection_profile request, options do |result, operation|
|
680
698
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
681
699
|
yield result, operation if block_given?
|
682
|
-
|
700
|
+
throw :response, result
|
683
701
|
end
|
684
702
|
rescue ::Gapic::Rest::Error => e
|
685
703
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -775,7 +793,6 @@ module Google
|
|
775
793
|
|
776
794
|
@datastream_stub.discover_connection_profile request, options do |result, operation|
|
777
795
|
yield result, operation if block_given?
|
778
|
-
return result
|
779
796
|
end
|
780
797
|
rescue ::Gapic::Rest::Error => e
|
781
798
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -872,7 +889,6 @@ module Google
|
|
872
889
|
|
873
890
|
@datastream_stub.list_streams request, options do |result, operation|
|
874
891
|
yield result, operation if block_given?
|
875
|
-
return result
|
876
892
|
end
|
877
893
|
rescue ::Gapic::Rest::Error => e
|
878
894
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -951,7 +967,6 @@ module Google
|
|
951
967
|
|
952
968
|
@datastream_stub.get_stream request, options do |result, operation|
|
953
969
|
yield result, operation if block_given?
|
954
|
-
return result
|
955
970
|
end
|
956
971
|
rescue ::Gapic::Rest::Error => e
|
957
972
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1061,7 +1076,7 @@ module Google
|
|
1061
1076
|
@datastream_stub.create_stream request, options do |result, operation|
|
1062
1077
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1063
1078
|
yield result, operation if block_given?
|
1064
|
-
|
1079
|
+
throw :response, result
|
1065
1080
|
end
|
1066
1081
|
rescue ::Gapic::Rest::Error => e
|
1067
1082
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1173,7 +1188,7 @@ module Google
|
|
1173
1188
|
@datastream_stub.update_stream request, options do |result, operation|
|
1174
1189
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1175
1190
|
yield result, operation if block_given?
|
1176
|
-
|
1191
|
+
throw :response, result
|
1177
1192
|
end
|
1178
1193
|
rescue ::Gapic::Rest::Error => e
|
1179
1194
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1274,7 +1289,7 @@ module Google
|
|
1274
1289
|
@datastream_stub.delete_stream request, options do |result, operation|
|
1275
1290
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1276
1291
|
yield result, operation if block_given?
|
1277
|
-
|
1292
|
+
throw :response, result
|
1278
1293
|
end
|
1279
1294
|
rescue ::Gapic::Rest::Error => e
|
1280
1295
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1361,7 +1376,7 @@ module Google
|
|
1361
1376
|
@datastream_stub.fetch_errors request, options do |result, operation|
|
1362
1377
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1363
1378
|
yield result, operation if block_given?
|
1364
|
-
|
1379
|
+
throw :response, result
|
1365
1380
|
end
|
1366
1381
|
rescue ::Gapic::Rest::Error => e
|
1367
1382
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1449,7 +1464,7 @@ module Google
|
|
1449
1464
|
@datastream_stub.fetch_static_ips request, options do |result, operation|
|
1450
1465
|
result = ::Gapic::Rest::PagedEnumerable.new @datastream_stub, :fetch_static_ips, "static_ips", request, result, options
|
1451
1466
|
yield result, operation if block_given?
|
1452
|
-
|
1467
|
+
throw :response, result
|
1453
1468
|
end
|
1454
1469
|
rescue ::Gapic::Rest::Error => e
|
1455
1470
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1554,7 +1569,7 @@ module Google
|
|
1554
1569
|
@datastream_stub.create_private_connection request, options do |result, operation|
|
1555
1570
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1556
1571
|
yield result, operation if block_given?
|
1557
|
-
|
1572
|
+
throw :response, result
|
1558
1573
|
end
|
1559
1574
|
rescue ::Gapic::Rest::Error => e
|
1560
1575
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1633,7 +1648,6 @@ module Google
|
|
1633
1648
|
|
1634
1649
|
@datastream_stub.get_private_connection request, options do |result, operation|
|
1635
1650
|
yield result, operation if block_given?
|
1636
|
-
return result
|
1637
1651
|
end
|
1638
1652
|
rescue ::Gapic::Rest::Error => e
|
1639
1653
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1733,7 +1747,6 @@ module Google
|
|
1733
1747
|
|
1734
1748
|
@datastream_stub.list_private_connections request, options do |result, operation|
|
1735
1749
|
yield result, operation if block_given?
|
1736
|
-
return result
|
1737
1750
|
end
|
1738
1751
|
rescue ::Gapic::Rest::Error => e
|
1739
1752
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1837,7 +1850,7 @@ module Google
|
|
1837
1850
|
@datastream_stub.delete_private_connection request, options do |result, operation|
|
1838
1851
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1839
1852
|
yield result, operation if block_given?
|
1840
|
-
|
1853
|
+
throw :response, result
|
1841
1854
|
end
|
1842
1855
|
rescue ::Gapic::Rest::Error => e
|
1843
1856
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1943,7 +1956,7 @@ module Google
|
|
1943
1956
|
@datastream_stub.create_route request, options do |result, operation|
|
1944
1957
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1945
1958
|
yield result, operation if block_given?
|
1946
|
-
|
1959
|
+
throw :response, result
|
1947
1960
|
end
|
1948
1961
|
rescue ::Gapic::Rest::Error => e
|
1949
1962
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2022,7 +2035,6 @@ module Google
|
|
2022
2035
|
|
2023
2036
|
@datastream_stub.get_route request, options do |result, operation|
|
2024
2037
|
yield result, operation if block_given?
|
2025
|
-
return result
|
2026
2038
|
end
|
2027
2039
|
rescue ::Gapic::Rest::Error => e
|
2028
2040
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2122,7 +2134,6 @@ module Google
|
|
2122
2134
|
|
2123
2135
|
@datastream_stub.list_routes request, options do |result, operation|
|
2124
2136
|
yield result, operation if block_given?
|
2125
|
-
return result
|
2126
2137
|
end
|
2127
2138
|
rescue ::Gapic::Rest::Error => e
|
2128
2139
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2223,7 +2234,7 @@ module Google
|
|
2223
2234
|
@datastream_stub.delete_route request, options do |result, operation|
|
2224
2235
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2225
2236
|
yield result, operation if block_given?
|
2226
|
-
|
2237
|
+
throw :response, result
|
2227
2238
|
end
|
2228
2239
|
rescue ::Gapic::Rest::Error => e
|
2229
2240
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2303,6 +2314,11 @@ module Google
|
|
2303
2314
|
# default endpoint URL. The default value of nil uses the environment
|
2304
2315
|
# universe (usually the default "googleapis.com" universe).
|
2305
2316
|
# @return [::String,nil]
|
2317
|
+
# @!attribute [rw] logger
|
2318
|
+
# A custom logger to use for request/response debug logging, or the value
|
2319
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
2320
|
+
# explicitly disable logging.
|
2321
|
+
# @return [::Logger,:default,nil]
|
2306
2322
|
#
|
2307
2323
|
class Configuration
|
2308
2324
|
extend ::Gapic::Config
|
@@ -2324,6 +2340,7 @@ module Google
|
|
2324
2340
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
2325
2341
|
config_attr :quota_project, nil, ::String, nil
|
2326
2342
|
config_attr :universe_domain, nil, ::String, nil
|
2343
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
2327
2344
|
|
2328
2345
|
# @private
|
2329
2346
|
def initialize parent_config = nil
|