google-cloud-datastream-v1 0.10.1 → 0.12.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/datastream/v1/datastream/client.rb +155 -27
- data/lib/google/cloud/datastream/v1/datastream/operations.rb +12 -15
- data/lib/google/cloud/datastream/v1/datastream/rest/client.rb +145 -27
- data/lib/google/cloud/datastream/v1/datastream/rest/operations.rb +43 -38
- data/lib/google/cloud/datastream/v1/datastream/rest/service_stub.rb +275 -151
- data/lib/google/cloud/datastream/v1/datastream_pb.rb +2 -1
- data/lib/google/cloud/datastream/v1/datastream_resources_pb.rb +27 -1
- data/lib/google/cloud/datastream/v1/datastream_services_pb.rb +3 -0
- data/lib/google/cloud/datastream/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +39 -0
- data/proto_docs/google/cloud/datastream/v1/datastream.rb +27 -3
- data/proto_docs/google/cloud/datastream/v1/datastream_resources.rb +385 -8
- 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: c960b2d557d89b73c50f44dbedc890c419b3f44bb74daf3fac49d6cbf0b565f7
|
4
|
+
data.tar.gz: 78f172cfda7a70eff319a91af5d19b903375f2eb4822d87027fbe9bf549423bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9265dd470e5e0843d5239e20413f9906d9b694989fea61bb0908412d8986f75846b15df566d254520fd4d31a9160ff65538d7c4233d1c286b12423879dca278
|
7
|
+
data.tar.gz: d411760690defb9af10cbb62cb33c71bff13c557dde38b68da1021afeb6d8c9e593e83d2fc2afffde0d7502eeb2455d2e93cc9395fc4375e7ae897b857bf4c76
|
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/v1"
|
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::V1::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).
|
@@ -191,14 +191,26 @@ module Google
|
|
191
191
|
universe_domain: @config.universe_domain,
|
192
192
|
channel_args: @config.channel_args,
|
193
193
|
interceptors: @config.interceptors,
|
194
|
-
channel_pool_config: @config.channel_pool
|
194
|
+
channel_pool_config: @config.channel_pool,
|
195
|
+
logger: @config.logger
|
195
196
|
)
|
196
197
|
|
198
|
+
@datastream_stub.stub_logger&.info do |entry|
|
199
|
+
entry.set_system_name
|
200
|
+
entry.set_service
|
201
|
+
entry.message = "Created client for #{entry.service}"
|
202
|
+
entry.set_credentials_fields credentials
|
203
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
204
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
205
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
206
|
+
end
|
207
|
+
|
197
208
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
198
209
|
config.credentials = credentials
|
199
210
|
config.quota_project = @quota_project_id
|
200
211
|
config.endpoint = @datastream_stub.endpoint
|
201
212
|
config.universe_domain = @datastream_stub.universe_domain
|
213
|
+
config.logger = @datastream_stub.logger if config.respond_to? :logger=
|
202
214
|
end
|
203
215
|
|
204
216
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
@@ -206,6 +218,7 @@ module Google
|
|
206
218
|
config.quota_project = @quota_project_id
|
207
219
|
config.endpoint = @datastream_stub.endpoint
|
208
220
|
config.universe_domain = @datastream_stub.universe_domain
|
221
|
+
config.logger = @datastream_stub.logger if config.respond_to? :logger=
|
209
222
|
end
|
210
223
|
end
|
211
224
|
|
@@ -230,6 +243,15 @@ module Google
|
|
230
243
|
#
|
231
244
|
attr_reader :iam_policy_client
|
232
245
|
|
246
|
+
##
|
247
|
+
# The logger used for request/response debug logging.
|
248
|
+
#
|
249
|
+
# @return [Logger]
|
250
|
+
#
|
251
|
+
def logger
|
252
|
+
@datastream_stub.logger
|
253
|
+
end
|
254
|
+
|
233
255
|
# Service calls
|
234
256
|
|
235
257
|
##
|
@@ -332,7 +354,7 @@ module Google
|
|
332
354
|
@datastream_stub.call_rpc :list_connection_profiles, request, options: options do |response, operation|
|
333
355
|
response = ::Gapic::PagedEnumerable.new @datastream_stub, :list_connection_profiles, request, response, operation, options
|
334
356
|
yield response, operation if block_given?
|
335
|
-
|
357
|
+
throw :response, response
|
336
358
|
end
|
337
359
|
rescue ::GRPC::BadStatus => e
|
338
360
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -418,7 +440,6 @@ module Google
|
|
418
440
|
|
419
441
|
@datastream_stub.call_rpc :get_connection_profile, request, options: options do |response, operation|
|
420
442
|
yield response, operation if block_given?
|
421
|
-
return response
|
422
443
|
end
|
423
444
|
rescue ::GRPC::BadStatus => e
|
424
445
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -535,7 +556,7 @@ module Google
|
|
535
556
|
@datastream_stub.call_rpc :create_connection_profile, request, options: options do |response, operation|
|
536
557
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
537
558
|
yield response, operation if block_given?
|
538
|
-
|
559
|
+
throw :response, response
|
539
560
|
end
|
540
561
|
rescue ::GRPC::BadStatus => e
|
541
562
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -654,7 +675,7 @@ module Google
|
|
654
675
|
@datastream_stub.call_rpc :update_connection_profile, request, options: options do |response, operation|
|
655
676
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
656
677
|
yield response, operation if block_given?
|
657
|
-
|
678
|
+
throw :response, response
|
658
679
|
end
|
659
680
|
rescue ::GRPC::BadStatus => e
|
660
681
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -762,7 +783,7 @@ module Google
|
|
762
783
|
@datastream_stub.call_rpc :delete_connection_profile, request, options: options do |response, operation|
|
763
784
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
764
785
|
yield response, operation if block_given?
|
765
|
-
|
786
|
+
throw :response, response
|
766
787
|
end
|
767
788
|
rescue ::GRPC::BadStatus => e
|
768
789
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -784,7 +805,7 @@ module Google
|
|
784
805
|
# @param options [::Gapic::CallOptions, ::Hash]
|
785
806
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
786
807
|
#
|
787
|
-
# @overload discover_connection_profile(parent: nil, connection_profile: nil, connection_profile_name: nil, full_hierarchy: nil, hierarchy_depth: nil, oracle_rdbms: nil, mysql_rdbms: nil, postgresql_rdbms: nil)
|
808
|
+
# @overload discover_connection_profile(parent: nil, connection_profile: nil, connection_profile_name: nil, full_hierarchy: nil, hierarchy_depth: nil, oracle_rdbms: nil, mysql_rdbms: nil, postgresql_rdbms: nil, sql_server_rdbms: nil)
|
788
809
|
# Pass arguments to `discover_connection_profile` via keyword arguments. Note that at
|
789
810
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
790
811
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -807,6 +828,8 @@ module Google
|
|
807
828
|
# MySQL RDBMS to enrich with child data objects and metadata.
|
808
829
|
# @param postgresql_rdbms [::Google::Cloud::Datastream::V1::PostgresqlRdbms, ::Hash]
|
809
830
|
# PostgreSQL RDBMS to enrich with child data objects and metadata.
|
831
|
+
# @param sql_server_rdbms [::Google::Cloud::Datastream::V1::SqlServerRdbms, ::Hash]
|
832
|
+
# SQLServer RDBMS to enrich with child data objects and metadata.
|
810
833
|
#
|
811
834
|
# @yield [response, operation] Access the result along with the RPC operation
|
812
835
|
# @yieldparam response [::Google::Cloud::Datastream::V1::DiscoverConnectionProfileResponse]
|
@@ -867,7 +890,6 @@ module Google
|
|
867
890
|
|
868
891
|
@datastream_stub.call_rpc :discover_connection_profile, request, options: options do |response, operation|
|
869
892
|
yield response, operation if block_given?
|
870
|
-
return response
|
871
893
|
end
|
872
894
|
rescue ::GRPC::BadStatus => e
|
873
895
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -972,7 +994,7 @@ module Google
|
|
972
994
|
@datastream_stub.call_rpc :list_streams, request, options: options do |response, operation|
|
973
995
|
response = ::Gapic::PagedEnumerable.new @datastream_stub, :list_streams, request, response, operation, options
|
974
996
|
yield response, operation if block_given?
|
975
|
-
|
997
|
+
throw :response, response
|
976
998
|
end
|
977
999
|
rescue ::GRPC::BadStatus => e
|
978
1000
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1058,7 +1080,6 @@ module Google
|
|
1058
1080
|
|
1059
1081
|
@datastream_stub.call_rpc :get_stream, request, options: options do |response, operation|
|
1060
1082
|
yield response, operation if block_given?
|
1061
|
-
return response
|
1062
1083
|
end
|
1063
1084
|
rescue ::GRPC::BadStatus => e
|
1064
1085
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1175,7 +1196,7 @@ module Google
|
|
1175
1196
|
@datastream_stub.call_rpc :create_stream, request, options: options do |response, operation|
|
1176
1197
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1177
1198
|
yield response, operation if block_given?
|
1178
|
-
|
1199
|
+
throw :response, response
|
1179
1200
|
end
|
1180
1201
|
rescue ::GRPC::BadStatus => e
|
1181
1202
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1294,7 +1315,7 @@ module Google
|
|
1294
1315
|
@datastream_stub.call_rpc :update_stream, request, options: options do |response, operation|
|
1295
1316
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1296
1317
|
yield response, operation if block_given?
|
1297
|
-
|
1318
|
+
throw :response, response
|
1298
1319
|
end
|
1299
1320
|
rescue ::GRPC::BadStatus => e
|
1300
1321
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1402,7 +1423,108 @@ module Google
|
|
1402
1423
|
@datastream_stub.call_rpc :delete_stream, request, options: options do |response, operation|
|
1403
1424
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1404
1425
|
yield response, operation if block_given?
|
1405
|
-
|
1426
|
+
throw :response, response
|
1427
|
+
end
|
1428
|
+
rescue ::GRPC::BadStatus => e
|
1429
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1430
|
+
end
|
1431
|
+
|
1432
|
+
##
|
1433
|
+
# Use this method to start, resume or recover a stream with a non default CDC
|
1434
|
+
# strategy.
|
1435
|
+
#
|
1436
|
+
# @overload run_stream(request, options = nil)
|
1437
|
+
# Pass arguments to `run_stream` via a request object, either of type
|
1438
|
+
# {::Google::Cloud::Datastream::V1::RunStreamRequest} or an equivalent Hash.
|
1439
|
+
#
|
1440
|
+
# @param request [::Google::Cloud::Datastream::V1::RunStreamRequest, ::Hash]
|
1441
|
+
# A request object representing the call parameters. Required. To specify no
|
1442
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1443
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1444
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1445
|
+
#
|
1446
|
+
# @overload run_stream(name: nil, cdc_strategy: nil, force: nil)
|
1447
|
+
# Pass arguments to `run_stream` via keyword arguments. Note that at
|
1448
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1449
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1450
|
+
#
|
1451
|
+
# @param name [::String]
|
1452
|
+
# Required. Name of the stream resource to start, in the format:
|
1453
|
+
# projects/\\{project_id}/locations/\\{location}/streams/\\{stream_name}
|
1454
|
+
# @param cdc_strategy [::Google::Cloud::Datastream::V1::CdcStrategy, ::Hash]
|
1455
|
+
# Optional. The CDC strategy of the stream. If not set, the system's default
|
1456
|
+
# value will be used.
|
1457
|
+
# @param force [::Boolean]
|
1458
|
+
# Optional. Update the stream without validating it.
|
1459
|
+
#
|
1460
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1461
|
+
# @yieldparam response [::Gapic::Operation]
|
1462
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1463
|
+
#
|
1464
|
+
# @return [::Gapic::Operation]
|
1465
|
+
#
|
1466
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1467
|
+
#
|
1468
|
+
# @example Basic example
|
1469
|
+
# require "google/cloud/datastream/v1"
|
1470
|
+
#
|
1471
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1472
|
+
# client = Google::Cloud::Datastream::V1::Datastream::Client.new
|
1473
|
+
#
|
1474
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1475
|
+
# request = Google::Cloud::Datastream::V1::RunStreamRequest.new
|
1476
|
+
#
|
1477
|
+
# # Call the run_stream method.
|
1478
|
+
# result = client.run_stream request
|
1479
|
+
#
|
1480
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1481
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1482
|
+
# # Here is how to wait for a response.
|
1483
|
+
# result.wait_until_done! timeout: 60
|
1484
|
+
# if result.response?
|
1485
|
+
# p result.response
|
1486
|
+
# else
|
1487
|
+
# puts "No response received."
|
1488
|
+
# end
|
1489
|
+
#
|
1490
|
+
def run_stream request, options = nil
|
1491
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1492
|
+
|
1493
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::RunStreamRequest
|
1494
|
+
|
1495
|
+
# Converts hash and nil to an options object
|
1496
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1497
|
+
|
1498
|
+
# Customize the options with defaults
|
1499
|
+
metadata = @config.rpcs.run_stream.metadata.to_h
|
1500
|
+
|
1501
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1502
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1503
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1504
|
+
gapic_version: ::Google::Cloud::Datastream::V1::VERSION
|
1505
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1506
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1507
|
+
|
1508
|
+
header_params = {}
|
1509
|
+
if request.name
|
1510
|
+
header_params["name"] = request.name
|
1511
|
+
end
|
1512
|
+
|
1513
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1514
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1515
|
+
|
1516
|
+
options.apply_defaults timeout: @config.rpcs.run_stream.timeout,
|
1517
|
+
metadata: metadata,
|
1518
|
+
retry_policy: @config.rpcs.run_stream.retry_policy
|
1519
|
+
|
1520
|
+
options.apply_defaults timeout: @config.timeout,
|
1521
|
+
metadata: @config.metadata,
|
1522
|
+
retry_policy: @config.retry_policy
|
1523
|
+
|
1524
|
+
@datastream_stub.call_rpc :run_stream, request, options: options do |response, operation|
|
1525
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1526
|
+
yield response, operation if block_given?
|
1527
|
+
throw :response, response
|
1406
1528
|
end
|
1407
1529
|
rescue ::GRPC::BadStatus => e
|
1408
1530
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1488,7 +1610,6 @@ module Google
|
|
1488
1610
|
|
1489
1611
|
@datastream_stub.call_rpc :get_stream_object, request, options: options do |response, operation|
|
1490
1612
|
yield response, operation if block_given?
|
1491
|
-
return response
|
1492
1613
|
end
|
1493
1614
|
rescue ::GRPC::BadStatus => e
|
1494
1615
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1576,7 +1697,6 @@ module Google
|
|
1576
1697
|
|
1577
1698
|
@datastream_stub.call_rpc :lookup_stream_object, request, options: options do |response, operation|
|
1578
1699
|
yield response, operation if block_given?
|
1579
|
-
return response
|
1580
1700
|
end
|
1581
1701
|
rescue ::GRPC::BadStatus => e
|
1582
1702
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1677,7 +1797,7 @@ module Google
|
|
1677
1797
|
@datastream_stub.call_rpc :list_stream_objects, request, options: options do |response, operation|
|
1678
1798
|
response = ::Gapic::PagedEnumerable.new @datastream_stub, :list_stream_objects, request, response, operation, options
|
1679
1799
|
yield response, operation if block_given?
|
1680
|
-
|
1800
|
+
throw :response, response
|
1681
1801
|
end
|
1682
1802
|
rescue ::GRPC::BadStatus => e
|
1683
1803
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1764,7 +1884,6 @@ module Google
|
|
1764
1884
|
|
1765
1885
|
@datastream_stub.call_rpc :start_backfill_job, request, options: options do |response, operation|
|
1766
1886
|
yield response, operation if block_given?
|
1767
|
-
return response
|
1768
1887
|
end
|
1769
1888
|
rescue ::GRPC::BadStatus => e
|
1770
1889
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1851,7 +1970,6 @@ module Google
|
|
1851
1970
|
|
1852
1971
|
@datastream_stub.call_rpc :stop_backfill_job, request, options: options do |response, operation|
|
1853
1972
|
yield response, operation if block_given?
|
1854
|
-
return response
|
1855
1973
|
end
|
1856
1974
|
rescue ::GRPC::BadStatus => e
|
1857
1975
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1944,7 +2062,6 @@ module Google
|
|
1944
2062
|
|
1945
2063
|
@datastream_stub.call_rpc :fetch_static_ips, request, options: options do |response, operation|
|
1946
2064
|
yield response, operation if block_given?
|
1947
|
-
return response
|
1948
2065
|
end
|
1949
2066
|
rescue ::GRPC::BadStatus => e
|
1950
2067
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2058,7 +2175,7 @@ module Google
|
|
2058
2175
|
@datastream_stub.call_rpc :create_private_connection, request, options: options do |response, operation|
|
2059
2176
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2060
2177
|
yield response, operation if block_given?
|
2061
|
-
|
2178
|
+
throw :response, response
|
2062
2179
|
end
|
2063
2180
|
rescue ::GRPC::BadStatus => e
|
2064
2181
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2144,7 +2261,6 @@ module Google
|
|
2144
2261
|
|
2145
2262
|
@datastream_stub.call_rpc :get_private_connection, request, options: options do |response, operation|
|
2146
2263
|
yield response, operation if block_given?
|
2147
|
-
return response
|
2148
2264
|
end
|
2149
2265
|
rescue ::GRPC::BadStatus => e
|
2150
2266
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2253,7 +2369,7 @@ module Google
|
|
2253
2369
|
@datastream_stub.call_rpc :list_private_connections, request, options: options do |response, operation|
|
2254
2370
|
response = ::Gapic::PagedEnumerable.new @datastream_stub, :list_private_connections, request, response, operation, options
|
2255
2371
|
yield response, operation if block_given?
|
2256
|
-
|
2372
|
+
throw :response, response
|
2257
2373
|
end
|
2258
2374
|
rescue ::GRPC::BadStatus => e
|
2259
2375
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2364,7 +2480,7 @@ module Google
|
|
2364
2480
|
@datastream_stub.call_rpc :delete_private_connection, request, options: options do |response, operation|
|
2365
2481
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2366
2482
|
yield response, operation if block_given?
|
2367
|
-
|
2483
|
+
throw :response, response
|
2368
2484
|
end
|
2369
2485
|
rescue ::GRPC::BadStatus => e
|
2370
2486
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2477,7 +2593,7 @@ module Google
|
|
2477
2593
|
@datastream_stub.call_rpc :create_route, request, options: options do |response, operation|
|
2478
2594
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2479
2595
|
yield response, operation if block_given?
|
2480
|
-
|
2596
|
+
throw :response, response
|
2481
2597
|
end
|
2482
2598
|
rescue ::GRPC::BadStatus => e
|
2483
2599
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2563,7 +2679,6 @@ module Google
|
|
2563
2679
|
|
2564
2680
|
@datastream_stub.call_rpc :get_route, request, options: options do |response, operation|
|
2565
2681
|
yield response, operation if block_given?
|
2566
|
-
return response
|
2567
2682
|
end
|
2568
2683
|
rescue ::GRPC::BadStatus => e
|
2569
2684
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2671,7 +2786,7 @@ module Google
|
|
2671
2786
|
@datastream_stub.call_rpc :list_routes, request, options: options do |response, operation|
|
2672
2787
|
response = ::Gapic::PagedEnumerable.new @datastream_stub, :list_routes, request, response, operation, options
|
2673
2788
|
yield response, operation if block_given?
|
2674
|
-
|
2789
|
+
throw :response, response
|
2675
2790
|
end
|
2676
2791
|
rescue ::GRPC::BadStatus => e
|
2677
2792
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2779,7 +2894,7 @@ module Google
|
|
2779
2894
|
@datastream_stub.call_rpc :delete_route, request, options: options do |response, operation|
|
2780
2895
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2781
2896
|
yield response, operation if block_given?
|
2782
|
-
|
2897
|
+
throw :response, response
|
2783
2898
|
end
|
2784
2899
|
rescue ::GRPC::BadStatus => e
|
2785
2900
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2868,6 +2983,11 @@ module Google
|
|
2868
2983
|
# default endpoint URL. The default value of nil uses the environment
|
2869
2984
|
# universe (usually the default "googleapis.com" universe).
|
2870
2985
|
# @return [::String,nil]
|
2986
|
+
# @!attribute [rw] logger
|
2987
|
+
# A custom logger to use for request/response debug logging, or the value
|
2988
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
2989
|
+
# explicitly disable logging.
|
2990
|
+
# @return [::Logger,:default,nil]
|
2871
2991
|
#
|
2872
2992
|
class Configuration
|
2873
2993
|
extend ::Gapic::Config
|
@@ -2892,6 +3012,7 @@ module Google
|
|
2892
3012
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
2893
3013
|
config_attr :quota_project, nil, ::String, nil
|
2894
3014
|
config_attr :universe_domain, nil, ::String, nil
|
3015
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
2895
3016
|
|
2896
3017
|
# @private
|
2897
3018
|
def initialize parent_config = nil
|
@@ -2994,6 +3115,11 @@ module Google
|
|
2994
3115
|
#
|
2995
3116
|
attr_reader :delete_stream
|
2996
3117
|
##
|
3118
|
+
# RPC-specific configuration for `run_stream`
|
3119
|
+
# @return [::Gapic::Config::Method]
|
3120
|
+
#
|
3121
|
+
attr_reader :run_stream
|
3122
|
+
##
|
2997
3123
|
# RPC-specific configuration for `get_stream_object`
|
2998
3124
|
# @return [::Gapic::Config::Method]
|
2999
3125
|
#
|
@@ -3088,6 +3214,8 @@ module Google
|
|
3088
3214
|
@update_stream = ::Gapic::Config::Method.new update_stream_config
|
3089
3215
|
delete_stream_config = parent_rpcs.delete_stream if parent_rpcs.respond_to? :delete_stream
|
3090
3216
|
@delete_stream = ::Gapic::Config::Method.new delete_stream_config
|
3217
|
+
run_stream_config = parent_rpcs.run_stream if parent_rpcs.respond_to? :run_stream
|
3218
|
+
@run_stream = ::Gapic::Config::Method.new run_stream_config
|
3091
3219
|
get_stream_object_config = parent_rpcs.get_stream_object if parent_rpcs.respond_to? :get_stream_object
|
3092
3220
|
@get_stream_object = ::Gapic::Config::Method.new get_stream_object_config
|
3093
3221
|
lookup_stream_object_config = parent_rpcs.lookup_stream_object if parent_rpcs.respond_to? :lookup_stream_object
|
@@ -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
|