google-cloud-datastream-v1 0.4.0 → 0.5.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.
@@ -0,0 +1,2379 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/datastream/v1/datastream_pb"
21
+ require "google/cloud/datastream/v1/datastream/rest/service_stub"
22
+ require "google/cloud/location/rest"
23
+ require "google/iam/v1/rest"
24
+
25
+ module Google
26
+ module Cloud
27
+ module Datastream
28
+ module V1
29
+ module Datastream
30
+ module Rest
31
+ ##
32
+ # REST client for the Datastream service.
33
+ #
34
+ # Datastream service
35
+ #
36
+ class Client
37
+ include Paths
38
+
39
+ # @private
40
+ attr_reader :datastream_stub
41
+
42
+ ##
43
+ # Configure the Datastream Client class.
44
+ #
45
+ # See {::Google::Cloud::Datastream::V1::Datastream::Rest::Client::Configuration}
46
+ # for a description of the configuration fields.
47
+ #
48
+ # @example
49
+ #
50
+ # # Modify the configuration for all Datastream clients
51
+ # ::Google::Cloud::Datastream::V1::Datastream::Rest::Client.configure do |config|
52
+ # config.timeout = 10.0
53
+ # end
54
+ #
55
+ # @yield [config] Configure the Client client.
56
+ # @yieldparam config [Client::Configuration]
57
+ #
58
+ # @return [Client::Configuration]
59
+ #
60
+ def self.configure
61
+ @configure ||= begin
62
+ namespace = ["Google", "Cloud", "Datastream", "V1"]
63
+ parent_config = while namespace.any?
64
+ parent_name = namespace.join "::"
65
+ parent_const = const_get parent_name
66
+ break parent_const.configure if parent_const.respond_to? :configure
67
+ namespace.pop
68
+ end
69
+ default_config = Client::Configuration.new parent_config
70
+
71
+ default_config.timeout = 60.0
72
+ default_config.retry_policy = {
73
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
74
+ }
75
+
76
+ default_config.rpcs.create_connection_profile.timeout = 60.0
77
+
78
+ default_config.rpcs.update_connection_profile.timeout = 60.0
79
+
80
+ default_config.rpcs.delete_connection_profile.timeout = 60.0
81
+
82
+ default_config.rpcs.create_stream.timeout = 60.0
83
+
84
+ default_config.rpcs.update_stream.timeout = 60.0
85
+
86
+ default_config.rpcs.delete_stream.timeout = 60.0
87
+
88
+ default_config.rpcs.create_private_connection.timeout = 60.0
89
+
90
+ default_config.rpcs.delete_private_connection.timeout = 60.0
91
+
92
+ default_config.rpcs.create_route.timeout = 60.0
93
+
94
+ default_config.rpcs.delete_route.timeout = 60.0
95
+
96
+ default_config
97
+ end
98
+ yield @configure if block_given?
99
+ @configure
100
+ end
101
+
102
+ ##
103
+ # Configure the Datastream Client instance.
104
+ #
105
+ # The configuration is set to the derived mode, meaning that values can be changed,
106
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
107
+ # should be made on {Client.configure}.
108
+ #
109
+ # See {::Google::Cloud::Datastream::V1::Datastream::Rest::Client::Configuration}
110
+ # for a description of the configuration fields.
111
+ #
112
+ # @yield [config] Configure the Client client.
113
+ # @yieldparam config [Client::Configuration]
114
+ #
115
+ # @return [Client::Configuration]
116
+ #
117
+ def configure
118
+ yield @config if block_given?
119
+ @config
120
+ end
121
+
122
+ ##
123
+ # Create a new Datastream REST client object.
124
+ #
125
+ # @example
126
+ #
127
+ # # Create a client using the default configuration
128
+ # client = ::Google::Cloud::Datastream::V1::Datastream::Rest::Client.new
129
+ #
130
+ # # Create a client using a custom configuration
131
+ # client = ::Google::Cloud::Datastream::V1::Datastream::Rest::Client.new do |config|
132
+ # config.timeout = 10.0
133
+ # end
134
+ #
135
+ # @yield [config] Configure the Datastream client.
136
+ # @yieldparam config [Client::Configuration]
137
+ #
138
+ def initialize
139
+ # Create the configuration object
140
+ @config = Configuration.new Client.configure
141
+
142
+ # Yield the configuration if needed
143
+ yield @config if block_given?
144
+
145
+ # Create credentials
146
+ credentials = @config.credentials
147
+ # Use self-signed JWT if the endpoint is unchanged from default,
148
+ # but only if the default endpoint does not have a region prefix.
149
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
150
+ !@config.endpoint.split(".").first.include?("-")
151
+ credentials ||= Credentials.default scope: @config.scope,
152
+ enable_self_signed_jwt: enable_self_signed_jwt
153
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
154
+ credentials = Credentials.new credentials, scope: @config.scope
155
+ end
156
+
157
+ @quota_project_id = @config.quota_project
158
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
159
+
160
+ @operations_client = ::Google::Cloud::Datastream::V1::Datastream::Rest::Operations.new do |config|
161
+ config.credentials = credentials
162
+ config.quota_project = @quota_project_id
163
+ config.endpoint = @config.endpoint
164
+ end
165
+
166
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
167
+ config.credentials = credentials
168
+ config.quota_project = @quota_project_id
169
+ config.endpoint = @config.endpoint
170
+ config.bindings_override = @config.bindings_override
171
+ end
172
+
173
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
174
+ config.credentials = credentials
175
+ config.quota_project = @quota_project_id
176
+ config.endpoint = @config.endpoint
177
+ end
178
+
179
+ @datastream_stub = ::Google::Cloud::Datastream::V1::Datastream::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
180
+ end
181
+
182
+ ##
183
+ # Get the associated client for long-running operations.
184
+ #
185
+ # @return [::Google::Cloud::Datastream::V1::Datastream::Rest::Operations]
186
+ #
187
+ attr_reader :operations_client
188
+
189
+ ##
190
+ # Get the associated client for mix-in of the Locations.
191
+ #
192
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
193
+ #
194
+ attr_reader :location_client
195
+
196
+ ##
197
+ # Get the associated client for mix-in of the IAMPolicy.
198
+ #
199
+ # @return [Google::Iam::V1::IAMPolicy::Rest::Client]
200
+ #
201
+ attr_reader :iam_policy_client
202
+
203
+ # Service calls
204
+
205
+ ##
206
+ # Use this method to list connection profiles created in a project and
207
+ # location.
208
+ #
209
+ # @overload list_connection_profiles(request, options = nil)
210
+ # Pass arguments to `list_connection_profiles` via a request object, either of type
211
+ # {::Google::Cloud::Datastream::V1::ListConnectionProfilesRequest} or an equivalent Hash.
212
+ #
213
+ # @param request [::Google::Cloud::Datastream::V1::ListConnectionProfilesRequest, ::Hash]
214
+ # A request object representing the call parameters. Required. To specify no
215
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
216
+ # @param options [::Gapic::CallOptions, ::Hash]
217
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
218
+ #
219
+ # @overload list_connection_profiles(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
220
+ # Pass arguments to `list_connection_profiles` via keyword arguments. Note that at
221
+ # least one keyword argument is required. To specify no parameters, or to keep all
222
+ # the default parameter values, pass an empty Hash as a request object (see above).
223
+ #
224
+ # @param parent [::String]
225
+ # Required. The parent that owns the collection of connection profiles.
226
+ # @param page_size [::Integer]
227
+ # Maximum number of connection profiles to return.
228
+ # If unspecified, at most 50 connection profiles will be returned.
229
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
230
+ # @param page_token [::String]
231
+ # Page token received from a previous `ListConnectionProfiles` call.
232
+ # Provide this to retrieve the subsequent page.
233
+ #
234
+ # When paginating, all other parameters provided to `ListConnectionProfiles`
235
+ # must match the call that provided the page token.
236
+ # @param filter [::String]
237
+ # Filter request.
238
+ # @param order_by [::String]
239
+ # Order by fields for the result.
240
+ # @yield [result, operation] Access the result along with the TransportOperation object
241
+ # @yieldparam result [::Google::Cloud::Datastream::V1::ListConnectionProfilesResponse]
242
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
243
+ #
244
+ # @return [::Google::Cloud::Datastream::V1::ListConnectionProfilesResponse]
245
+ #
246
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
247
+ def list_connection_profiles request, options = nil
248
+ raise ::ArgumentError, "request must be provided" if request.nil?
249
+
250
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::ListConnectionProfilesRequest
251
+
252
+ # Converts hash and nil to an options object
253
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
254
+
255
+ # Customize the options with defaults
256
+ call_metadata = @config.rpcs.list_connection_profiles.metadata.to_h
257
+
258
+ # Set x-goog-api-client and x-goog-user-project headers
259
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
260
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
261
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
262
+ transports_version_send: [:rest]
263
+
264
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
265
+
266
+ options.apply_defaults timeout: @config.rpcs.list_connection_profiles.timeout,
267
+ metadata: call_metadata,
268
+ retry_policy: @config.rpcs.list_connection_profiles.retry_policy
269
+
270
+ options.apply_defaults timeout: @config.timeout,
271
+ metadata: @config.metadata,
272
+ retry_policy: @config.retry_policy
273
+
274
+ @datastream_stub.list_connection_profiles request, options do |result, operation|
275
+ yield result, operation if block_given?
276
+ return result
277
+ end
278
+ rescue ::Gapic::Rest::Error => e
279
+ raise ::Google::Cloud::Error.from_error(e)
280
+ end
281
+
282
+ ##
283
+ # Use this method to get details about a connection profile.
284
+ #
285
+ # @overload get_connection_profile(request, options = nil)
286
+ # Pass arguments to `get_connection_profile` via a request object, either of type
287
+ # {::Google::Cloud::Datastream::V1::GetConnectionProfileRequest} or an equivalent Hash.
288
+ #
289
+ # @param request [::Google::Cloud::Datastream::V1::GetConnectionProfileRequest, ::Hash]
290
+ # A request object representing the call parameters. Required. To specify no
291
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
292
+ # @param options [::Gapic::CallOptions, ::Hash]
293
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
294
+ #
295
+ # @overload get_connection_profile(name: nil)
296
+ # Pass arguments to `get_connection_profile` via keyword arguments. Note that at
297
+ # least one keyword argument is required. To specify no parameters, or to keep all
298
+ # the default parameter values, pass an empty Hash as a request object (see above).
299
+ #
300
+ # @param name [::String]
301
+ # Required. The name of the connection profile resource to get.
302
+ # @yield [result, operation] Access the result along with the TransportOperation object
303
+ # @yieldparam result [::Google::Cloud::Datastream::V1::ConnectionProfile]
304
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
305
+ #
306
+ # @return [::Google::Cloud::Datastream::V1::ConnectionProfile]
307
+ #
308
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
309
+ def get_connection_profile request, options = nil
310
+ raise ::ArgumentError, "request must be provided" if request.nil?
311
+
312
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::GetConnectionProfileRequest
313
+
314
+ # Converts hash and nil to an options object
315
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
316
+
317
+ # Customize the options with defaults
318
+ call_metadata = @config.rpcs.get_connection_profile.metadata.to_h
319
+
320
+ # Set x-goog-api-client and x-goog-user-project headers
321
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
322
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
323
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
324
+ transports_version_send: [:rest]
325
+
326
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
327
+
328
+ options.apply_defaults timeout: @config.rpcs.get_connection_profile.timeout,
329
+ metadata: call_metadata,
330
+ retry_policy: @config.rpcs.get_connection_profile.retry_policy
331
+
332
+ options.apply_defaults timeout: @config.timeout,
333
+ metadata: @config.metadata,
334
+ retry_policy: @config.retry_policy
335
+
336
+ @datastream_stub.get_connection_profile request, options do |result, operation|
337
+ yield result, operation if block_given?
338
+ return result
339
+ end
340
+ rescue ::Gapic::Rest::Error => e
341
+ raise ::Google::Cloud::Error.from_error(e)
342
+ end
343
+
344
+ ##
345
+ # Use this method to create a connection profile in a project and location.
346
+ #
347
+ # @overload create_connection_profile(request, options = nil)
348
+ # Pass arguments to `create_connection_profile` via a request object, either of type
349
+ # {::Google::Cloud::Datastream::V1::CreateConnectionProfileRequest} or an equivalent Hash.
350
+ #
351
+ # @param request [::Google::Cloud::Datastream::V1::CreateConnectionProfileRequest, ::Hash]
352
+ # A request object representing the call parameters. Required. To specify no
353
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
354
+ # @param options [::Gapic::CallOptions, ::Hash]
355
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
356
+ #
357
+ # @overload create_connection_profile(parent: nil, connection_profile_id: nil, connection_profile: nil, request_id: nil, validate_only: nil, force: nil)
358
+ # Pass arguments to `create_connection_profile` via keyword arguments. Note that at
359
+ # least one keyword argument is required. To specify no parameters, or to keep all
360
+ # the default parameter values, pass an empty Hash as a request object (see above).
361
+ #
362
+ # @param parent [::String]
363
+ # Required. The parent that owns the collection of ConnectionProfiles.
364
+ # @param connection_profile_id [::String]
365
+ # Required. The connection profile identifier.
366
+ # @param connection_profile [::Google::Cloud::Datastream::V1::ConnectionProfile, ::Hash]
367
+ # Required. The connection profile resource to create.
368
+ # @param request_id [::String]
369
+ # Optional. A request ID to identify requests. Specify a unique request ID
370
+ # so that if you must retry your request, the server will know to ignore
371
+ # the request if it has already been completed. The server will guarantee
372
+ # that for at least 60 minutes since the first request.
373
+ #
374
+ # For example, consider a situation where you make an initial request and the
375
+ # request times out. If you make the request again with the same request ID,
376
+ # the server can check if original operation with the same request ID was
377
+ # received, and if so, will ignore the second request. This prevents clients
378
+ # from accidentally creating duplicate commitments.
379
+ #
380
+ # The request ID must be a valid UUID with the exception that zero UUID is
381
+ # not supported (00000000-0000-0000-0000-000000000000).
382
+ # @param validate_only [::Boolean]
383
+ # Optional. Only validate the connection profile, but don't create any resources.
384
+ # The default is false.
385
+ # @param force [::Boolean]
386
+ # Optional. Create the connection profile without validating it.
387
+ # @yield [result, operation] Access the result along with the TransportOperation object
388
+ # @yieldparam result [::Gapic::Operation]
389
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
390
+ #
391
+ # @return [::Gapic::Operation]
392
+ #
393
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
394
+ def create_connection_profile request, options = nil
395
+ raise ::ArgumentError, "request must be provided" if request.nil?
396
+
397
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::CreateConnectionProfileRequest
398
+
399
+ # Converts hash and nil to an options object
400
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
401
+
402
+ # Customize the options with defaults
403
+ call_metadata = @config.rpcs.create_connection_profile.metadata.to_h
404
+
405
+ # Set x-goog-api-client and x-goog-user-project headers
406
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
407
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
408
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
409
+ transports_version_send: [:rest]
410
+
411
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
412
+
413
+ options.apply_defaults timeout: @config.rpcs.create_connection_profile.timeout,
414
+ metadata: call_metadata,
415
+ retry_policy: @config.rpcs.create_connection_profile.retry_policy
416
+
417
+ options.apply_defaults timeout: @config.timeout,
418
+ metadata: @config.metadata,
419
+ retry_policy: @config.retry_policy
420
+
421
+ @datastream_stub.create_connection_profile request, options do |result, operation|
422
+ result = ::Gapic::Operation.new result, @operations_client, options: options
423
+ yield result, operation if block_given?
424
+ return result
425
+ end
426
+ rescue ::Gapic::Rest::Error => e
427
+ raise ::Google::Cloud::Error.from_error(e)
428
+ end
429
+
430
+ ##
431
+ # Use this method to update the parameters of a connection profile.
432
+ #
433
+ # @overload update_connection_profile(request, options = nil)
434
+ # Pass arguments to `update_connection_profile` via a request object, either of type
435
+ # {::Google::Cloud::Datastream::V1::UpdateConnectionProfileRequest} or an equivalent Hash.
436
+ #
437
+ # @param request [::Google::Cloud::Datastream::V1::UpdateConnectionProfileRequest, ::Hash]
438
+ # A request object representing the call parameters. Required. To specify no
439
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
440
+ # @param options [::Gapic::CallOptions, ::Hash]
441
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
442
+ #
443
+ # @overload update_connection_profile(update_mask: nil, connection_profile: nil, request_id: nil, validate_only: nil, force: nil)
444
+ # Pass arguments to `update_connection_profile` via keyword arguments. Note that at
445
+ # least one keyword argument is required. To specify no parameters, or to keep all
446
+ # the default parameter values, pass an empty Hash as a request object (see above).
447
+ #
448
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
449
+ # Optional. Field mask is used to specify the fields to be overwritten in the
450
+ # ConnectionProfile resource by the update.
451
+ # The fields specified in the update_mask are relative to the resource, not
452
+ # the full request. A field will be overwritten if it is in the mask. If the
453
+ # user does not provide a mask then all fields will be overwritten.
454
+ # @param connection_profile [::Google::Cloud::Datastream::V1::ConnectionProfile, ::Hash]
455
+ # Required. The connection profile to update.
456
+ # @param request_id [::String]
457
+ # Optional. A request ID to identify requests. Specify a unique request ID
458
+ # so that if you must retry your request, the server will know to ignore
459
+ # the request if it has already been completed. The server will guarantee
460
+ # that for at least 60 minutes since the first request.
461
+ #
462
+ # For example, consider a situation where you make an initial request and the
463
+ # request times out. If you make the request again with the same request ID,
464
+ # the server can check if original operation with the same request ID was
465
+ # received, and if so, will ignore the second request. This prevents clients
466
+ # from accidentally creating duplicate commitments.
467
+ #
468
+ # The request ID must be a valid UUID with the exception that zero UUID is
469
+ # not supported (00000000-0000-0000-0000-000000000000).
470
+ # @param validate_only [::Boolean]
471
+ # Optional. Only validate the connection profile, but don't update any resources.
472
+ # The default is false.
473
+ # @param force [::Boolean]
474
+ # Optional. Update the connection profile without validating it.
475
+ # @yield [result, operation] Access the result along with the TransportOperation object
476
+ # @yieldparam result [::Gapic::Operation]
477
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
478
+ #
479
+ # @return [::Gapic::Operation]
480
+ #
481
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
482
+ def update_connection_profile request, options = nil
483
+ raise ::ArgumentError, "request must be provided" if request.nil?
484
+
485
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::UpdateConnectionProfileRequest
486
+
487
+ # Converts hash and nil to an options object
488
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
489
+
490
+ # Customize the options with defaults
491
+ call_metadata = @config.rpcs.update_connection_profile.metadata.to_h
492
+
493
+ # Set x-goog-api-client and x-goog-user-project headers
494
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
495
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
496
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
497
+ transports_version_send: [:rest]
498
+
499
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
500
+
501
+ options.apply_defaults timeout: @config.rpcs.update_connection_profile.timeout,
502
+ metadata: call_metadata,
503
+ retry_policy: @config.rpcs.update_connection_profile.retry_policy
504
+
505
+ options.apply_defaults timeout: @config.timeout,
506
+ metadata: @config.metadata,
507
+ retry_policy: @config.retry_policy
508
+
509
+ @datastream_stub.update_connection_profile request, options do |result, operation|
510
+ result = ::Gapic::Operation.new result, @operations_client, options: options
511
+ yield result, operation if block_given?
512
+ return result
513
+ end
514
+ rescue ::Gapic::Rest::Error => e
515
+ raise ::Google::Cloud::Error.from_error(e)
516
+ end
517
+
518
+ ##
519
+ # Use this method to delete a connection profile.
520
+ #
521
+ # @overload delete_connection_profile(request, options = nil)
522
+ # Pass arguments to `delete_connection_profile` via a request object, either of type
523
+ # {::Google::Cloud::Datastream::V1::DeleteConnectionProfileRequest} or an equivalent Hash.
524
+ #
525
+ # @param request [::Google::Cloud::Datastream::V1::DeleteConnectionProfileRequest, ::Hash]
526
+ # A request object representing the call parameters. Required. To specify no
527
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
528
+ # @param options [::Gapic::CallOptions, ::Hash]
529
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
530
+ #
531
+ # @overload delete_connection_profile(name: nil, request_id: nil)
532
+ # Pass arguments to `delete_connection_profile` via keyword arguments. Note that at
533
+ # least one keyword argument is required. To specify no parameters, or to keep all
534
+ # the default parameter values, pass an empty Hash as a request object (see above).
535
+ #
536
+ # @param name [::String]
537
+ # Required. The name of the connection profile resource to delete.
538
+ # @param request_id [::String]
539
+ # Optional. A request ID to identify requests. Specify a unique request ID
540
+ # so that if you must retry your request, the server will know to ignore
541
+ # the request if it has already been completed. The server will guarantee
542
+ # that for at least 60 minutes after the first request.
543
+ #
544
+ # For example, consider a situation where you make an initial request and the
545
+ # request times out. If you make the request again with the same request ID,
546
+ # the server can check if original operation with the same request ID was
547
+ # received, and if so, will ignore the second request. This prevents clients
548
+ # from accidentally creating duplicate commitments.
549
+ #
550
+ # The request ID must be a valid UUID with the exception that zero UUID is
551
+ # not supported (00000000-0000-0000-0000-000000000000).
552
+ # @yield [result, operation] Access the result along with the TransportOperation object
553
+ # @yieldparam result [::Gapic::Operation]
554
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
555
+ #
556
+ # @return [::Gapic::Operation]
557
+ #
558
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
559
+ def delete_connection_profile request, options = nil
560
+ raise ::ArgumentError, "request must be provided" if request.nil?
561
+
562
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::DeleteConnectionProfileRequest
563
+
564
+ # Converts hash and nil to an options object
565
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
566
+
567
+ # Customize the options with defaults
568
+ call_metadata = @config.rpcs.delete_connection_profile.metadata.to_h
569
+
570
+ # Set x-goog-api-client and x-goog-user-project headers
571
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
572
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
573
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
574
+ transports_version_send: [:rest]
575
+
576
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
577
+
578
+ options.apply_defaults timeout: @config.rpcs.delete_connection_profile.timeout,
579
+ metadata: call_metadata,
580
+ retry_policy: @config.rpcs.delete_connection_profile.retry_policy
581
+
582
+ options.apply_defaults timeout: @config.timeout,
583
+ metadata: @config.metadata,
584
+ retry_policy: @config.retry_policy
585
+
586
+ @datastream_stub.delete_connection_profile request, options do |result, operation|
587
+ result = ::Gapic::Operation.new result, @operations_client, options: options
588
+ yield result, operation if block_given?
589
+ return result
590
+ end
591
+ rescue ::Gapic::Rest::Error => e
592
+ raise ::Google::Cloud::Error.from_error(e)
593
+ end
594
+
595
+ ##
596
+ # Use this method to discover a connection profile.
597
+ # The discover API call exposes the data objects and metadata belonging to
598
+ # the profile. Typically, a request returns children data objects of a
599
+ # parent data object that's optionally supplied in the request.
600
+ #
601
+ # @overload discover_connection_profile(request, options = nil)
602
+ # Pass arguments to `discover_connection_profile` via a request object, either of type
603
+ # {::Google::Cloud::Datastream::V1::DiscoverConnectionProfileRequest} or an equivalent Hash.
604
+ #
605
+ # @param request [::Google::Cloud::Datastream::V1::DiscoverConnectionProfileRequest, ::Hash]
606
+ # A request object representing the call parameters. Required. To specify no
607
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
608
+ # @param options [::Gapic::CallOptions, ::Hash]
609
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
610
+ #
611
+ # @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)
612
+ # Pass arguments to `discover_connection_profile` via keyword arguments. Note that at
613
+ # least one keyword argument is required. To specify no parameters, or to keep all
614
+ # the default parameter values, pass an empty Hash as a request object (see above).
615
+ #
616
+ # @param parent [::String]
617
+ # Required. The parent resource of the connection profile type. Must be in the
618
+ # format `projects/*/locations/*`.
619
+ # @param connection_profile [::Google::Cloud::Datastream::V1::ConnectionProfile, ::Hash]
620
+ # An ad-hoc connection profile configuration.
621
+ # @param connection_profile_name [::String]
622
+ # A reference to an existing connection profile.
623
+ # @param full_hierarchy [::Boolean]
624
+ # Whether to retrieve the full hierarchy of data objects (TRUE) or only the
625
+ # current level (FALSE).
626
+ # @param hierarchy_depth [::Integer]
627
+ # The number of hierarchy levels below the current level to be retrieved.
628
+ # @param oracle_rdbms [::Google::Cloud::Datastream::V1::OracleRdbms, ::Hash]
629
+ # Oracle RDBMS to enrich with child data objects and metadata.
630
+ # @param mysql_rdbms [::Google::Cloud::Datastream::V1::MysqlRdbms, ::Hash]
631
+ # MySQL RDBMS to enrich with child data objects and metadata.
632
+ # @param postgresql_rdbms [::Google::Cloud::Datastream::V1::PostgresqlRdbms, ::Hash]
633
+ # PostgreSQL RDBMS to enrich with child data objects and metadata.
634
+ # @yield [result, operation] Access the result along with the TransportOperation object
635
+ # @yieldparam result [::Google::Cloud::Datastream::V1::DiscoverConnectionProfileResponse]
636
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
637
+ #
638
+ # @return [::Google::Cloud::Datastream::V1::DiscoverConnectionProfileResponse]
639
+ #
640
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
641
+ def discover_connection_profile request, options = nil
642
+ raise ::ArgumentError, "request must be provided" if request.nil?
643
+
644
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::DiscoverConnectionProfileRequest
645
+
646
+ # Converts hash and nil to an options object
647
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
648
+
649
+ # Customize the options with defaults
650
+ call_metadata = @config.rpcs.discover_connection_profile.metadata.to_h
651
+
652
+ # Set x-goog-api-client and x-goog-user-project headers
653
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
654
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
655
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
656
+ transports_version_send: [:rest]
657
+
658
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
659
+
660
+ options.apply_defaults timeout: @config.rpcs.discover_connection_profile.timeout,
661
+ metadata: call_metadata,
662
+ retry_policy: @config.rpcs.discover_connection_profile.retry_policy
663
+
664
+ options.apply_defaults timeout: @config.timeout,
665
+ metadata: @config.metadata,
666
+ retry_policy: @config.retry_policy
667
+
668
+ @datastream_stub.discover_connection_profile request, options do |result, operation|
669
+ yield result, operation if block_given?
670
+ return result
671
+ end
672
+ rescue ::Gapic::Rest::Error => e
673
+ raise ::Google::Cloud::Error.from_error(e)
674
+ end
675
+
676
+ ##
677
+ # Use this method to list streams in a project and location.
678
+ #
679
+ # @overload list_streams(request, options = nil)
680
+ # Pass arguments to `list_streams` via a request object, either of type
681
+ # {::Google::Cloud::Datastream::V1::ListStreamsRequest} or an equivalent Hash.
682
+ #
683
+ # @param request [::Google::Cloud::Datastream::V1::ListStreamsRequest, ::Hash]
684
+ # A request object representing the call parameters. Required. To specify no
685
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
686
+ # @param options [::Gapic::CallOptions, ::Hash]
687
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
688
+ #
689
+ # @overload list_streams(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
690
+ # Pass arguments to `list_streams` via keyword arguments. Note that at
691
+ # least one keyword argument is required. To specify no parameters, or to keep all
692
+ # the default parameter values, pass an empty Hash as a request object (see above).
693
+ #
694
+ # @param parent [::String]
695
+ # Required. The parent that owns the collection of streams.
696
+ # @param page_size [::Integer]
697
+ # Maximum number of streams to return.
698
+ # If unspecified, at most 50 streams will be returned. The maximum
699
+ # value is 1000; values above 1000 will be coerced to 1000.
700
+ # @param page_token [::String]
701
+ # Page token received from a previous `ListStreams` call.
702
+ # Provide this to retrieve the subsequent page.
703
+ #
704
+ # When paginating, all other parameters provided to `ListStreams`
705
+ # must match the call that provided the page token.
706
+ # @param filter [::String]
707
+ # Filter request.
708
+ # @param order_by [::String]
709
+ # Order by fields for the result.
710
+ # @yield [result, operation] Access the result along with the TransportOperation object
711
+ # @yieldparam result [::Google::Cloud::Datastream::V1::ListStreamsResponse]
712
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
713
+ #
714
+ # @return [::Google::Cloud::Datastream::V1::ListStreamsResponse]
715
+ #
716
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
717
+ def list_streams request, options = nil
718
+ raise ::ArgumentError, "request must be provided" if request.nil?
719
+
720
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::ListStreamsRequest
721
+
722
+ # Converts hash and nil to an options object
723
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
724
+
725
+ # Customize the options with defaults
726
+ call_metadata = @config.rpcs.list_streams.metadata.to_h
727
+
728
+ # Set x-goog-api-client and x-goog-user-project headers
729
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
730
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
731
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
732
+ transports_version_send: [:rest]
733
+
734
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
735
+
736
+ options.apply_defaults timeout: @config.rpcs.list_streams.timeout,
737
+ metadata: call_metadata,
738
+ retry_policy: @config.rpcs.list_streams.retry_policy
739
+
740
+ options.apply_defaults timeout: @config.timeout,
741
+ metadata: @config.metadata,
742
+ retry_policy: @config.retry_policy
743
+
744
+ @datastream_stub.list_streams request, options do |result, operation|
745
+ yield result, operation if block_given?
746
+ return result
747
+ end
748
+ rescue ::Gapic::Rest::Error => e
749
+ raise ::Google::Cloud::Error.from_error(e)
750
+ end
751
+
752
+ ##
753
+ # Use this method to get details about a stream.
754
+ #
755
+ # @overload get_stream(request, options = nil)
756
+ # Pass arguments to `get_stream` via a request object, either of type
757
+ # {::Google::Cloud::Datastream::V1::GetStreamRequest} or an equivalent Hash.
758
+ #
759
+ # @param request [::Google::Cloud::Datastream::V1::GetStreamRequest, ::Hash]
760
+ # A request object representing the call parameters. Required. To specify no
761
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
762
+ # @param options [::Gapic::CallOptions, ::Hash]
763
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
764
+ #
765
+ # @overload get_stream(name: nil)
766
+ # Pass arguments to `get_stream` via keyword arguments. Note that at
767
+ # least one keyword argument is required. To specify no parameters, or to keep all
768
+ # the default parameter values, pass an empty Hash as a request object (see above).
769
+ #
770
+ # @param name [::String]
771
+ # Required. The name of the stream resource to get.
772
+ # @yield [result, operation] Access the result along with the TransportOperation object
773
+ # @yieldparam result [::Google::Cloud::Datastream::V1::Stream]
774
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
775
+ #
776
+ # @return [::Google::Cloud::Datastream::V1::Stream]
777
+ #
778
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
779
+ def get_stream request, options = nil
780
+ raise ::ArgumentError, "request must be provided" if request.nil?
781
+
782
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::GetStreamRequest
783
+
784
+ # Converts hash and nil to an options object
785
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
786
+
787
+ # Customize the options with defaults
788
+ call_metadata = @config.rpcs.get_stream.metadata.to_h
789
+
790
+ # Set x-goog-api-client and x-goog-user-project headers
791
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
792
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
793
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
794
+ transports_version_send: [:rest]
795
+
796
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
797
+
798
+ options.apply_defaults timeout: @config.rpcs.get_stream.timeout,
799
+ metadata: call_metadata,
800
+ retry_policy: @config.rpcs.get_stream.retry_policy
801
+
802
+ options.apply_defaults timeout: @config.timeout,
803
+ metadata: @config.metadata,
804
+ retry_policy: @config.retry_policy
805
+
806
+ @datastream_stub.get_stream request, options do |result, operation|
807
+ yield result, operation if block_given?
808
+ return result
809
+ end
810
+ rescue ::Gapic::Rest::Error => e
811
+ raise ::Google::Cloud::Error.from_error(e)
812
+ end
813
+
814
+ ##
815
+ # Use this method to create a stream.
816
+ #
817
+ # @overload create_stream(request, options = nil)
818
+ # Pass arguments to `create_stream` via a request object, either of type
819
+ # {::Google::Cloud::Datastream::V1::CreateStreamRequest} or an equivalent Hash.
820
+ #
821
+ # @param request [::Google::Cloud::Datastream::V1::CreateStreamRequest, ::Hash]
822
+ # A request object representing the call parameters. Required. To specify no
823
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
824
+ # @param options [::Gapic::CallOptions, ::Hash]
825
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
826
+ #
827
+ # @overload create_stream(parent: nil, stream_id: nil, stream: nil, request_id: nil, validate_only: nil, force: nil)
828
+ # Pass arguments to `create_stream` via keyword arguments. Note that at
829
+ # least one keyword argument is required. To specify no parameters, or to keep all
830
+ # the default parameter values, pass an empty Hash as a request object (see above).
831
+ #
832
+ # @param parent [::String]
833
+ # Required. The parent that owns the collection of streams.
834
+ # @param stream_id [::String]
835
+ # Required. The stream identifier.
836
+ # @param stream [::Google::Cloud::Datastream::V1::Stream, ::Hash]
837
+ # Required. The stream resource to create.
838
+ # @param request_id [::String]
839
+ # Optional. A request ID to identify requests. Specify a unique request ID
840
+ # so that if you must retry your request, the server will know to ignore
841
+ # the request if it has already been completed. The server will guarantee
842
+ # that for at least 60 minutes since the first request.
843
+ #
844
+ # For example, consider a situation where you make an initial request and the
845
+ # request times out. If you make the request again with the same request ID,
846
+ # the server can check if original operation with the same request ID was
847
+ # received, and if so, will ignore the second request. This prevents clients
848
+ # from accidentally creating duplicate commitments.
849
+ #
850
+ # The request ID must be a valid UUID with the exception that zero UUID is
851
+ # not supported (00000000-0000-0000-0000-000000000000).
852
+ # @param validate_only [::Boolean]
853
+ # Optional. Only validate the stream, but don't create any resources.
854
+ # The default is false.
855
+ # @param force [::Boolean]
856
+ # Optional. Create the stream without validating it.
857
+ # @yield [result, operation] Access the result along with the TransportOperation object
858
+ # @yieldparam result [::Gapic::Operation]
859
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
860
+ #
861
+ # @return [::Gapic::Operation]
862
+ #
863
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
864
+ def create_stream request, options = nil
865
+ raise ::ArgumentError, "request must be provided" if request.nil?
866
+
867
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::CreateStreamRequest
868
+
869
+ # Converts hash and nil to an options object
870
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
871
+
872
+ # Customize the options with defaults
873
+ call_metadata = @config.rpcs.create_stream.metadata.to_h
874
+
875
+ # Set x-goog-api-client and x-goog-user-project headers
876
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
877
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
878
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
879
+ transports_version_send: [:rest]
880
+
881
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
882
+
883
+ options.apply_defaults timeout: @config.rpcs.create_stream.timeout,
884
+ metadata: call_metadata,
885
+ retry_policy: @config.rpcs.create_stream.retry_policy
886
+
887
+ options.apply_defaults timeout: @config.timeout,
888
+ metadata: @config.metadata,
889
+ retry_policy: @config.retry_policy
890
+
891
+ @datastream_stub.create_stream request, options do |result, operation|
892
+ result = ::Gapic::Operation.new result, @operations_client, options: options
893
+ yield result, operation if block_given?
894
+ return result
895
+ end
896
+ rescue ::Gapic::Rest::Error => e
897
+ raise ::Google::Cloud::Error.from_error(e)
898
+ end
899
+
900
+ ##
901
+ # Use this method to update the configuration of a stream.
902
+ #
903
+ # @overload update_stream(request, options = nil)
904
+ # Pass arguments to `update_stream` via a request object, either of type
905
+ # {::Google::Cloud::Datastream::V1::UpdateStreamRequest} or an equivalent Hash.
906
+ #
907
+ # @param request [::Google::Cloud::Datastream::V1::UpdateStreamRequest, ::Hash]
908
+ # A request object representing the call parameters. Required. To specify no
909
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
910
+ # @param options [::Gapic::CallOptions, ::Hash]
911
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
912
+ #
913
+ # @overload update_stream(update_mask: nil, stream: nil, request_id: nil, validate_only: nil, force: nil)
914
+ # Pass arguments to `update_stream` via keyword arguments. Note that at
915
+ # least one keyword argument is required. To specify no parameters, or to keep all
916
+ # the default parameter values, pass an empty Hash as a request object (see above).
917
+ #
918
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
919
+ # Optional. Field mask is used to specify the fields to be overwritten in the
920
+ # stream resource by the update.
921
+ # The fields specified in the update_mask are relative to the resource, not
922
+ # the full request. A field will be overwritten if it is in the mask. If the
923
+ # user does not provide a mask then all fields will be overwritten.
924
+ # @param stream [::Google::Cloud::Datastream::V1::Stream, ::Hash]
925
+ # Required. The stream resource to update.
926
+ # @param request_id [::String]
927
+ # Optional. A request ID to identify requests. Specify a unique request ID
928
+ # so that if you must retry your request, the server will know to ignore
929
+ # the request if it has already been completed. The server will guarantee
930
+ # that for at least 60 minutes since the first request.
931
+ #
932
+ # For example, consider a situation where you make an initial request and the
933
+ # request times out. If you make the request again with the same request ID,
934
+ # the server can check if original operation with the same request ID was
935
+ # received, and if so, will ignore the second request. This prevents clients
936
+ # from accidentally creating duplicate commitments.
937
+ #
938
+ # The request ID must be a valid UUID with the exception that zero UUID is
939
+ # not supported (00000000-0000-0000-0000-000000000000).
940
+ # @param validate_only [::Boolean]
941
+ # Optional. Only validate the stream with the changes, without actually updating it.
942
+ # The default is false.
943
+ # @param force [::Boolean]
944
+ # Optional. Update the stream without validating it.
945
+ # @yield [result, operation] Access the result along with the TransportOperation object
946
+ # @yieldparam result [::Gapic::Operation]
947
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
948
+ #
949
+ # @return [::Gapic::Operation]
950
+ #
951
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
952
+ def update_stream request, options = nil
953
+ raise ::ArgumentError, "request must be provided" if request.nil?
954
+
955
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::UpdateStreamRequest
956
+
957
+ # Converts hash and nil to an options object
958
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
959
+
960
+ # Customize the options with defaults
961
+ call_metadata = @config.rpcs.update_stream.metadata.to_h
962
+
963
+ # Set x-goog-api-client and x-goog-user-project headers
964
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
965
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
966
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
967
+ transports_version_send: [:rest]
968
+
969
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
970
+
971
+ options.apply_defaults timeout: @config.rpcs.update_stream.timeout,
972
+ metadata: call_metadata,
973
+ retry_policy: @config.rpcs.update_stream.retry_policy
974
+
975
+ options.apply_defaults timeout: @config.timeout,
976
+ metadata: @config.metadata,
977
+ retry_policy: @config.retry_policy
978
+
979
+ @datastream_stub.update_stream request, options do |result, operation|
980
+ result = ::Gapic::Operation.new result, @operations_client, options: options
981
+ yield result, operation if block_given?
982
+ return result
983
+ end
984
+ rescue ::Gapic::Rest::Error => e
985
+ raise ::Google::Cloud::Error.from_error(e)
986
+ end
987
+
988
+ ##
989
+ # Use this method to delete a stream.
990
+ #
991
+ # @overload delete_stream(request, options = nil)
992
+ # Pass arguments to `delete_stream` via a request object, either of type
993
+ # {::Google::Cloud::Datastream::V1::DeleteStreamRequest} or an equivalent Hash.
994
+ #
995
+ # @param request [::Google::Cloud::Datastream::V1::DeleteStreamRequest, ::Hash]
996
+ # A request object representing the call parameters. Required. To specify no
997
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
998
+ # @param options [::Gapic::CallOptions, ::Hash]
999
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1000
+ #
1001
+ # @overload delete_stream(name: nil, request_id: nil)
1002
+ # Pass arguments to `delete_stream` via keyword arguments. Note that at
1003
+ # least one keyword argument is required. To specify no parameters, or to keep all
1004
+ # the default parameter values, pass an empty Hash as a request object (see above).
1005
+ #
1006
+ # @param name [::String]
1007
+ # Required. The name of the stream resource to delete.
1008
+ # @param request_id [::String]
1009
+ # Optional. A request ID to identify requests. Specify a unique request ID
1010
+ # so that if you must retry your request, the server will know to ignore
1011
+ # the request if it has already been completed. The server will guarantee
1012
+ # that for at least 60 minutes after the first request.
1013
+ #
1014
+ # For example, consider a situation where you make an initial request and the
1015
+ # request times out. If you make the request again with the same request ID,
1016
+ # the server can check if original operation with the same request ID was
1017
+ # received, and if so, will ignore the second request. This prevents clients
1018
+ # from accidentally creating duplicate commitments.
1019
+ #
1020
+ # The request ID must be a valid UUID with the exception that zero UUID is
1021
+ # not supported (00000000-0000-0000-0000-000000000000).
1022
+ # @yield [result, operation] Access the result along with the TransportOperation object
1023
+ # @yieldparam result [::Gapic::Operation]
1024
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1025
+ #
1026
+ # @return [::Gapic::Operation]
1027
+ #
1028
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1029
+ def delete_stream request, options = nil
1030
+ raise ::ArgumentError, "request must be provided" if request.nil?
1031
+
1032
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::DeleteStreamRequest
1033
+
1034
+ # Converts hash and nil to an options object
1035
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1036
+
1037
+ # Customize the options with defaults
1038
+ call_metadata = @config.rpcs.delete_stream.metadata.to_h
1039
+
1040
+ # Set x-goog-api-client and x-goog-user-project headers
1041
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1042
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1043
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
1044
+ transports_version_send: [:rest]
1045
+
1046
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1047
+
1048
+ options.apply_defaults timeout: @config.rpcs.delete_stream.timeout,
1049
+ metadata: call_metadata,
1050
+ retry_policy: @config.rpcs.delete_stream.retry_policy
1051
+
1052
+ options.apply_defaults timeout: @config.timeout,
1053
+ metadata: @config.metadata,
1054
+ retry_policy: @config.retry_policy
1055
+
1056
+ @datastream_stub.delete_stream request, options do |result, operation|
1057
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1058
+ yield result, operation if block_given?
1059
+ return result
1060
+ end
1061
+ rescue ::Gapic::Rest::Error => e
1062
+ raise ::Google::Cloud::Error.from_error(e)
1063
+ end
1064
+
1065
+ ##
1066
+ # Use this method to get details about a stream object.
1067
+ #
1068
+ # @overload get_stream_object(request, options = nil)
1069
+ # Pass arguments to `get_stream_object` via a request object, either of type
1070
+ # {::Google::Cloud::Datastream::V1::GetStreamObjectRequest} or an equivalent Hash.
1071
+ #
1072
+ # @param request [::Google::Cloud::Datastream::V1::GetStreamObjectRequest, ::Hash]
1073
+ # A request object representing the call parameters. Required. To specify no
1074
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1075
+ # @param options [::Gapic::CallOptions, ::Hash]
1076
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1077
+ #
1078
+ # @overload get_stream_object(name: nil)
1079
+ # Pass arguments to `get_stream_object` via keyword arguments. Note that at
1080
+ # least one keyword argument is required. To specify no parameters, or to keep all
1081
+ # the default parameter values, pass an empty Hash as a request object (see above).
1082
+ #
1083
+ # @param name [::String]
1084
+ # Required. The name of the stream object resource to get.
1085
+ # @yield [result, operation] Access the result along with the TransportOperation object
1086
+ # @yieldparam result [::Google::Cloud::Datastream::V1::StreamObject]
1087
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1088
+ #
1089
+ # @return [::Google::Cloud::Datastream::V1::StreamObject]
1090
+ #
1091
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1092
+ def get_stream_object request, options = nil
1093
+ raise ::ArgumentError, "request must be provided" if request.nil?
1094
+
1095
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::GetStreamObjectRequest
1096
+
1097
+ # Converts hash and nil to an options object
1098
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1099
+
1100
+ # Customize the options with defaults
1101
+ call_metadata = @config.rpcs.get_stream_object.metadata.to_h
1102
+
1103
+ # Set x-goog-api-client and x-goog-user-project headers
1104
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1105
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1106
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
1107
+ transports_version_send: [:rest]
1108
+
1109
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1110
+
1111
+ options.apply_defaults timeout: @config.rpcs.get_stream_object.timeout,
1112
+ metadata: call_metadata,
1113
+ retry_policy: @config.rpcs.get_stream_object.retry_policy
1114
+
1115
+ options.apply_defaults timeout: @config.timeout,
1116
+ metadata: @config.metadata,
1117
+ retry_policy: @config.retry_policy
1118
+
1119
+ @datastream_stub.get_stream_object request, options do |result, operation|
1120
+ yield result, operation if block_given?
1121
+ return result
1122
+ end
1123
+ rescue ::Gapic::Rest::Error => e
1124
+ raise ::Google::Cloud::Error.from_error(e)
1125
+ end
1126
+
1127
+ ##
1128
+ # Use this method to look up a stream object by its source object identifier.
1129
+ #
1130
+ # @overload lookup_stream_object(request, options = nil)
1131
+ # Pass arguments to `lookup_stream_object` via a request object, either of type
1132
+ # {::Google::Cloud::Datastream::V1::LookupStreamObjectRequest} or an equivalent Hash.
1133
+ #
1134
+ # @param request [::Google::Cloud::Datastream::V1::LookupStreamObjectRequest, ::Hash]
1135
+ # A request object representing the call parameters. Required. To specify no
1136
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1137
+ # @param options [::Gapic::CallOptions, ::Hash]
1138
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1139
+ #
1140
+ # @overload lookup_stream_object(parent: nil, source_object_identifier: nil)
1141
+ # Pass arguments to `lookup_stream_object` via keyword arguments. Note that at
1142
+ # least one keyword argument is required. To specify no parameters, or to keep all
1143
+ # the default parameter values, pass an empty Hash as a request object (see above).
1144
+ #
1145
+ # @param parent [::String]
1146
+ # Required. The parent stream that owns the collection of objects.
1147
+ # @param source_object_identifier [::Google::Cloud::Datastream::V1::SourceObjectIdentifier, ::Hash]
1148
+ # Required. The source object identifier which maps to the stream object.
1149
+ # @yield [result, operation] Access the result along with the TransportOperation object
1150
+ # @yieldparam result [::Google::Cloud::Datastream::V1::StreamObject]
1151
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1152
+ #
1153
+ # @return [::Google::Cloud::Datastream::V1::StreamObject]
1154
+ #
1155
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1156
+ def lookup_stream_object request, options = nil
1157
+ raise ::ArgumentError, "request must be provided" if request.nil?
1158
+
1159
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::LookupStreamObjectRequest
1160
+
1161
+ # Converts hash and nil to an options object
1162
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1163
+
1164
+ # Customize the options with defaults
1165
+ call_metadata = @config.rpcs.lookup_stream_object.metadata.to_h
1166
+
1167
+ # Set x-goog-api-client and x-goog-user-project headers
1168
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1169
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1170
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
1171
+ transports_version_send: [:rest]
1172
+
1173
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1174
+
1175
+ options.apply_defaults timeout: @config.rpcs.lookup_stream_object.timeout,
1176
+ metadata: call_metadata,
1177
+ retry_policy: @config.rpcs.lookup_stream_object.retry_policy
1178
+
1179
+ options.apply_defaults timeout: @config.timeout,
1180
+ metadata: @config.metadata,
1181
+ retry_policy: @config.retry_policy
1182
+
1183
+ @datastream_stub.lookup_stream_object request, options do |result, operation|
1184
+ yield result, operation if block_given?
1185
+ return result
1186
+ end
1187
+ rescue ::Gapic::Rest::Error => e
1188
+ raise ::Google::Cloud::Error.from_error(e)
1189
+ end
1190
+
1191
+ ##
1192
+ # Use this method to list the objects of a specific stream.
1193
+ #
1194
+ # @overload list_stream_objects(request, options = nil)
1195
+ # Pass arguments to `list_stream_objects` via a request object, either of type
1196
+ # {::Google::Cloud::Datastream::V1::ListStreamObjectsRequest} or an equivalent Hash.
1197
+ #
1198
+ # @param request [::Google::Cloud::Datastream::V1::ListStreamObjectsRequest, ::Hash]
1199
+ # A request object representing the call parameters. Required. To specify no
1200
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1201
+ # @param options [::Gapic::CallOptions, ::Hash]
1202
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1203
+ #
1204
+ # @overload list_stream_objects(parent: nil, page_size: nil, page_token: nil)
1205
+ # Pass arguments to `list_stream_objects` via keyword arguments. Note that at
1206
+ # least one keyword argument is required. To specify no parameters, or to keep all
1207
+ # the default parameter values, pass an empty Hash as a request object (see above).
1208
+ #
1209
+ # @param parent [::String]
1210
+ # Required. The parent stream that owns the collection of objects.
1211
+ # @param page_size [::Integer]
1212
+ # Maximum number of objects to return. Default is 50.
1213
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
1214
+ # @param page_token [::String]
1215
+ # Page token received from a previous `ListStreamObjectsRequest` call.
1216
+ # Provide this to retrieve the subsequent page.
1217
+ #
1218
+ # When paginating, all other parameters provided to
1219
+ # `ListStreamObjectsRequest` must match the call that provided the page
1220
+ # token.
1221
+ # @yield [result, operation] Access the result along with the TransportOperation object
1222
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Datastream::V1::StreamObject>]
1223
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1224
+ #
1225
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Datastream::V1::StreamObject>]
1226
+ #
1227
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1228
+ def list_stream_objects request, options = nil
1229
+ raise ::ArgumentError, "request must be provided" if request.nil?
1230
+
1231
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::ListStreamObjectsRequest
1232
+
1233
+ # Converts hash and nil to an options object
1234
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1235
+
1236
+ # Customize the options with defaults
1237
+ call_metadata = @config.rpcs.list_stream_objects.metadata.to_h
1238
+
1239
+ # Set x-goog-api-client and x-goog-user-project headers
1240
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1241
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1242
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
1243
+ transports_version_send: [:rest]
1244
+
1245
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1246
+
1247
+ options.apply_defaults timeout: @config.rpcs.list_stream_objects.timeout,
1248
+ metadata: call_metadata,
1249
+ retry_policy: @config.rpcs.list_stream_objects.retry_policy
1250
+
1251
+ options.apply_defaults timeout: @config.timeout,
1252
+ metadata: @config.metadata,
1253
+ retry_policy: @config.retry_policy
1254
+
1255
+ @datastream_stub.list_stream_objects request, options do |result, operation|
1256
+ result = ::Gapic::Rest::PagedEnumerable.new @datastream_stub, :list_stream_objects, "stream_objects", request, result, options
1257
+ yield result, operation if block_given?
1258
+ return result
1259
+ end
1260
+ rescue ::Gapic::Rest::Error => e
1261
+ raise ::Google::Cloud::Error.from_error(e)
1262
+ end
1263
+
1264
+ ##
1265
+ # Use this method to start a backfill job for the specified stream object.
1266
+ #
1267
+ # @overload start_backfill_job(request, options = nil)
1268
+ # Pass arguments to `start_backfill_job` via a request object, either of type
1269
+ # {::Google::Cloud::Datastream::V1::StartBackfillJobRequest} or an equivalent Hash.
1270
+ #
1271
+ # @param request [::Google::Cloud::Datastream::V1::StartBackfillJobRequest, ::Hash]
1272
+ # A request object representing the call parameters. Required. To specify no
1273
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1274
+ # @param options [::Gapic::CallOptions, ::Hash]
1275
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1276
+ #
1277
+ # @overload start_backfill_job(object: nil)
1278
+ # Pass arguments to `start_backfill_job` via keyword arguments. Note that at
1279
+ # least one keyword argument is required. To specify no parameters, or to keep all
1280
+ # the default parameter values, pass an empty Hash as a request object (see above).
1281
+ #
1282
+ # @param object [::String]
1283
+ # Required. The name of the stream object resource to start a backfill job for.
1284
+ # @yield [result, operation] Access the result along with the TransportOperation object
1285
+ # @yieldparam result [::Google::Cloud::Datastream::V1::StartBackfillJobResponse]
1286
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1287
+ #
1288
+ # @return [::Google::Cloud::Datastream::V1::StartBackfillJobResponse]
1289
+ #
1290
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1291
+ def start_backfill_job request, options = nil
1292
+ raise ::ArgumentError, "request must be provided" if request.nil?
1293
+
1294
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::StartBackfillJobRequest
1295
+
1296
+ # Converts hash and nil to an options object
1297
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1298
+
1299
+ # Customize the options with defaults
1300
+ call_metadata = @config.rpcs.start_backfill_job.metadata.to_h
1301
+
1302
+ # Set x-goog-api-client and x-goog-user-project headers
1303
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1304
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1305
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
1306
+ transports_version_send: [:rest]
1307
+
1308
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1309
+
1310
+ options.apply_defaults timeout: @config.rpcs.start_backfill_job.timeout,
1311
+ metadata: call_metadata,
1312
+ retry_policy: @config.rpcs.start_backfill_job.retry_policy
1313
+
1314
+ options.apply_defaults timeout: @config.timeout,
1315
+ metadata: @config.metadata,
1316
+ retry_policy: @config.retry_policy
1317
+
1318
+ @datastream_stub.start_backfill_job request, options do |result, operation|
1319
+ yield result, operation if block_given?
1320
+ return result
1321
+ end
1322
+ rescue ::Gapic::Rest::Error => e
1323
+ raise ::Google::Cloud::Error.from_error(e)
1324
+ end
1325
+
1326
+ ##
1327
+ # Use this method to stop a backfill job for the specified stream object.
1328
+ #
1329
+ # @overload stop_backfill_job(request, options = nil)
1330
+ # Pass arguments to `stop_backfill_job` via a request object, either of type
1331
+ # {::Google::Cloud::Datastream::V1::StopBackfillJobRequest} or an equivalent Hash.
1332
+ #
1333
+ # @param request [::Google::Cloud::Datastream::V1::StopBackfillJobRequest, ::Hash]
1334
+ # A request object representing the call parameters. Required. To specify no
1335
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1336
+ # @param options [::Gapic::CallOptions, ::Hash]
1337
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1338
+ #
1339
+ # @overload stop_backfill_job(object: nil)
1340
+ # Pass arguments to `stop_backfill_job` via keyword arguments. Note that at
1341
+ # least one keyword argument is required. To specify no parameters, or to keep all
1342
+ # the default parameter values, pass an empty Hash as a request object (see above).
1343
+ #
1344
+ # @param object [::String]
1345
+ # Required. The name of the stream object resource to stop the backfill job for.
1346
+ # @yield [result, operation] Access the result along with the TransportOperation object
1347
+ # @yieldparam result [::Google::Cloud::Datastream::V1::StopBackfillJobResponse]
1348
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1349
+ #
1350
+ # @return [::Google::Cloud::Datastream::V1::StopBackfillJobResponse]
1351
+ #
1352
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1353
+ def stop_backfill_job request, options = nil
1354
+ raise ::ArgumentError, "request must be provided" if request.nil?
1355
+
1356
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::StopBackfillJobRequest
1357
+
1358
+ # Converts hash and nil to an options object
1359
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1360
+
1361
+ # Customize the options with defaults
1362
+ call_metadata = @config.rpcs.stop_backfill_job.metadata.to_h
1363
+
1364
+ # Set x-goog-api-client and x-goog-user-project headers
1365
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1366
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1367
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
1368
+ transports_version_send: [:rest]
1369
+
1370
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1371
+
1372
+ options.apply_defaults timeout: @config.rpcs.stop_backfill_job.timeout,
1373
+ metadata: call_metadata,
1374
+ retry_policy: @config.rpcs.stop_backfill_job.retry_policy
1375
+
1376
+ options.apply_defaults timeout: @config.timeout,
1377
+ metadata: @config.metadata,
1378
+ retry_policy: @config.retry_policy
1379
+
1380
+ @datastream_stub.stop_backfill_job request, options do |result, operation|
1381
+ yield result, operation if block_given?
1382
+ return result
1383
+ end
1384
+ rescue ::Gapic::Rest::Error => e
1385
+ raise ::Google::Cloud::Error.from_error(e)
1386
+ end
1387
+
1388
+ ##
1389
+ # The FetchStaticIps API call exposes the static IP addresses used by
1390
+ # Datastream.
1391
+ #
1392
+ # @overload fetch_static_ips(request, options = nil)
1393
+ # Pass arguments to `fetch_static_ips` via a request object, either of type
1394
+ # {::Google::Cloud::Datastream::V1::FetchStaticIpsRequest} or an equivalent Hash.
1395
+ #
1396
+ # @param request [::Google::Cloud::Datastream::V1::FetchStaticIpsRequest, ::Hash]
1397
+ # A request object representing the call parameters. Required. To specify no
1398
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1399
+ # @param options [::Gapic::CallOptions, ::Hash]
1400
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1401
+ #
1402
+ # @overload fetch_static_ips(name: nil, page_size: nil, page_token: nil)
1403
+ # Pass arguments to `fetch_static_ips` via keyword arguments. Note that at
1404
+ # least one keyword argument is required. To specify no parameters, or to keep all
1405
+ # the default parameter values, pass an empty Hash as a request object (see above).
1406
+ #
1407
+ # @param name [::String]
1408
+ # Required. The resource name for the location for which static IPs should be returned.
1409
+ # Must be in the format `projects/*/locations/*`.
1410
+ # @param page_size [::Integer]
1411
+ # Maximum number of Ips to return, will likely not be specified.
1412
+ # @param page_token [::String]
1413
+ # A page token, received from a previous `ListStaticIps` call.
1414
+ # will likely not be specified.
1415
+ # @yield [result, operation] Access the result along with the TransportOperation object
1416
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::String>]
1417
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1418
+ #
1419
+ # @return [::Gapic::Rest::PagedEnumerable<::String>]
1420
+ #
1421
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1422
+ def fetch_static_ips request, options = nil
1423
+ raise ::ArgumentError, "request must be provided" if request.nil?
1424
+
1425
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::FetchStaticIpsRequest
1426
+
1427
+ # Converts hash and nil to an options object
1428
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1429
+
1430
+ # Customize the options with defaults
1431
+ call_metadata = @config.rpcs.fetch_static_ips.metadata.to_h
1432
+
1433
+ # Set x-goog-api-client and x-goog-user-project headers
1434
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1435
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1436
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
1437
+ transports_version_send: [:rest]
1438
+
1439
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1440
+
1441
+ options.apply_defaults timeout: @config.rpcs.fetch_static_ips.timeout,
1442
+ metadata: call_metadata,
1443
+ retry_policy: @config.rpcs.fetch_static_ips.retry_policy
1444
+
1445
+ options.apply_defaults timeout: @config.timeout,
1446
+ metadata: @config.metadata,
1447
+ retry_policy: @config.retry_policy
1448
+
1449
+ @datastream_stub.fetch_static_ips request, options do |result, operation|
1450
+ result = ::Gapic::Rest::PagedEnumerable.new @datastream_stub, :fetch_static_ips, "static_ips", request, result, options
1451
+ yield result, operation if block_given?
1452
+ return result
1453
+ end
1454
+ rescue ::Gapic::Rest::Error => e
1455
+ raise ::Google::Cloud::Error.from_error(e)
1456
+ end
1457
+
1458
+ ##
1459
+ # Use this method to create a private connectivity configuration.
1460
+ #
1461
+ # @overload create_private_connection(request, options = nil)
1462
+ # Pass arguments to `create_private_connection` via a request object, either of type
1463
+ # {::Google::Cloud::Datastream::V1::CreatePrivateConnectionRequest} or an equivalent Hash.
1464
+ #
1465
+ # @param request [::Google::Cloud::Datastream::V1::CreatePrivateConnectionRequest, ::Hash]
1466
+ # A request object representing the call parameters. Required. To specify no
1467
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1468
+ # @param options [::Gapic::CallOptions, ::Hash]
1469
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1470
+ #
1471
+ # @overload create_private_connection(parent: nil, private_connection_id: nil, private_connection: nil, request_id: nil)
1472
+ # Pass arguments to `create_private_connection` via keyword arguments. Note that at
1473
+ # least one keyword argument is required. To specify no parameters, or to keep all
1474
+ # the default parameter values, pass an empty Hash as a request object (see above).
1475
+ #
1476
+ # @param parent [::String]
1477
+ # Required. The parent that owns the collection of PrivateConnections.
1478
+ # @param private_connection_id [::String]
1479
+ # Required. The private connectivity identifier.
1480
+ # @param private_connection [::Google::Cloud::Datastream::V1::PrivateConnection, ::Hash]
1481
+ # Required. The Private Connectivity resource to create.
1482
+ # @param request_id [::String]
1483
+ # Optional. A request ID to identify requests. Specify a unique request ID
1484
+ # so that if you must retry your request, the server will know to ignore
1485
+ # the request if it has already been completed. The server will guarantee
1486
+ # that for at least 60 minutes since the first request.
1487
+ #
1488
+ # For example, consider a situation where you make an initial request and the
1489
+ # request times out. If you make the request again with the same request ID,
1490
+ # the server can check if original operation with the same request ID was
1491
+ # received, and if so, will ignore the second request. This prevents clients
1492
+ # from accidentally creating duplicate commitments.
1493
+ #
1494
+ # The request ID must be a valid UUID with the exception that zero UUID is
1495
+ # not supported (00000000-0000-0000-0000-000000000000).
1496
+ # @yield [result, operation] Access the result along with the TransportOperation object
1497
+ # @yieldparam result [::Gapic::Operation]
1498
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1499
+ #
1500
+ # @return [::Gapic::Operation]
1501
+ #
1502
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1503
+ def create_private_connection request, options = nil
1504
+ raise ::ArgumentError, "request must be provided" if request.nil?
1505
+
1506
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::CreatePrivateConnectionRequest
1507
+
1508
+ # Converts hash and nil to an options object
1509
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1510
+
1511
+ # Customize the options with defaults
1512
+ call_metadata = @config.rpcs.create_private_connection.metadata.to_h
1513
+
1514
+ # Set x-goog-api-client and x-goog-user-project headers
1515
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1516
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1517
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
1518
+ transports_version_send: [:rest]
1519
+
1520
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1521
+
1522
+ options.apply_defaults timeout: @config.rpcs.create_private_connection.timeout,
1523
+ metadata: call_metadata,
1524
+ retry_policy: @config.rpcs.create_private_connection.retry_policy
1525
+
1526
+ options.apply_defaults timeout: @config.timeout,
1527
+ metadata: @config.metadata,
1528
+ retry_policy: @config.retry_policy
1529
+
1530
+ @datastream_stub.create_private_connection request, options do |result, operation|
1531
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1532
+ yield result, operation if block_given?
1533
+ return result
1534
+ end
1535
+ rescue ::Gapic::Rest::Error => e
1536
+ raise ::Google::Cloud::Error.from_error(e)
1537
+ end
1538
+
1539
+ ##
1540
+ # Use this method to get details about a private connectivity configuration.
1541
+ #
1542
+ # @overload get_private_connection(request, options = nil)
1543
+ # Pass arguments to `get_private_connection` via a request object, either of type
1544
+ # {::Google::Cloud::Datastream::V1::GetPrivateConnectionRequest} or an equivalent Hash.
1545
+ #
1546
+ # @param request [::Google::Cloud::Datastream::V1::GetPrivateConnectionRequest, ::Hash]
1547
+ # A request object representing the call parameters. Required. To specify no
1548
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1549
+ # @param options [::Gapic::CallOptions, ::Hash]
1550
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1551
+ #
1552
+ # @overload get_private_connection(name: nil)
1553
+ # Pass arguments to `get_private_connection` via keyword arguments. Note that at
1554
+ # least one keyword argument is required. To specify no parameters, or to keep all
1555
+ # the default parameter values, pass an empty Hash as a request object (see above).
1556
+ #
1557
+ # @param name [::String]
1558
+ # Required. The name of the private connectivity configuration to get.
1559
+ # @yield [result, operation] Access the result along with the TransportOperation object
1560
+ # @yieldparam result [::Google::Cloud::Datastream::V1::PrivateConnection]
1561
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1562
+ #
1563
+ # @return [::Google::Cloud::Datastream::V1::PrivateConnection]
1564
+ #
1565
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1566
+ def get_private_connection request, options = nil
1567
+ raise ::ArgumentError, "request must be provided" if request.nil?
1568
+
1569
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::GetPrivateConnectionRequest
1570
+
1571
+ # Converts hash and nil to an options object
1572
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1573
+
1574
+ # Customize the options with defaults
1575
+ call_metadata = @config.rpcs.get_private_connection.metadata.to_h
1576
+
1577
+ # Set x-goog-api-client and x-goog-user-project headers
1578
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1579
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1580
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
1581
+ transports_version_send: [:rest]
1582
+
1583
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1584
+
1585
+ options.apply_defaults timeout: @config.rpcs.get_private_connection.timeout,
1586
+ metadata: call_metadata,
1587
+ retry_policy: @config.rpcs.get_private_connection.retry_policy
1588
+
1589
+ options.apply_defaults timeout: @config.timeout,
1590
+ metadata: @config.metadata,
1591
+ retry_policy: @config.retry_policy
1592
+
1593
+ @datastream_stub.get_private_connection request, options do |result, operation|
1594
+ yield result, operation if block_given?
1595
+ return result
1596
+ end
1597
+ rescue ::Gapic::Rest::Error => e
1598
+ raise ::Google::Cloud::Error.from_error(e)
1599
+ end
1600
+
1601
+ ##
1602
+ # Use this method to list private connectivity configurations in a project
1603
+ # and location.
1604
+ #
1605
+ # @overload list_private_connections(request, options = nil)
1606
+ # Pass arguments to `list_private_connections` via a request object, either of type
1607
+ # {::Google::Cloud::Datastream::V1::ListPrivateConnectionsRequest} or an equivalent Hash.
1608
+ #
1609
+ # @param request [::Google::Cloud::Datastream::V1::ListPrivateConnectionsRequest, ::Hash]
1610
+ # A request object representing the call parameters. Required. To specify no
1611
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1612
+ # @param options [::Gapic::CallOptions, ::Hash]
1613
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1614
+ #
1615
+ # @overload list_private_connections(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1616
+ # Pass arguments to `list_private_connections` via keyword arguments. Note that at
1617
+ # least one keyword argument is required. To specify no parameters, or to keep all
1618
+ # the default parameter values, pass an empty Hash as a request object (see above).
1619
+ #
1620
+ # @param parent [::String]
1621
+ # Required. The parent that owns the collection of private connectivity configurations.
1622
+ # @param page_size [::Integer]
1623
+ # Maximum number of private connectivity configurations to return.
1624
+ # If unspecified, at most 50 private connectivity configurations that will be
1625
+ # returned. The maximum value is 1000; values above 1000 will be coerced to
1626
+ # 1000.
1627
+ # @param page_token [::String]
1628
+ # Page token received from a previous `ListPrivateConnections` call.
1629
+ # Provide this to retrieve the subsequent page.
1630
+ #
1631
+ # When paginating, all other parameters provided to
1632
+ # `ListPrivateConnections` must match the call that provided the page
1633
+ # token.
1634
+ # @param filter [::String]
1635
+ # Filter request.
1636
+ # @param order_by [::String]
1637
+ # Order by fields for the result.
1638
+ # @yield [result, operation] Access the result along with the TransportOperation object
1639
+ # @yieldparam result [::Google::Cloud::Datastream::V1::ListPrivateConnectionsResponse]
1640
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1641
+ #
1642
+ # @return [::Google::Cloud::Datastream::V1::ListPrivateConnectionsResponse]
1643
+ #
1644
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1645
+ def list_private_connections request, options = nil
1646
+ raise ::ArgumentError, "request must be provided" if request.nil?
1647
+
1648
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::ListPrivateConnectionsRequest
1649
+
1650
+ # Converts hash and nil to an options object
1651
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1652
+
1653
+ # Customize the options with defaults
1654
+ call_metadata = @config.rpcs.list_private_connections.metadata.to_h
1655
+
1656
+ # Set x-goog-api-client and x-goog-user-project headers
1657
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1658
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1659
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
1660
+ transports_version_send: [:rest]
1661
+
1662
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1663
+
1664
+ options.apply_defaults timeout: @config.rpcs.list_private_connections.timeout,
1665
+ metadata: call_metadata,
1666
+ retry_policy: @config.rpcs.list_private_connections.retry_policy
1667
+
1668
+ options.apply_defaults timeout: @config.timeout,
1669
+ metadata: @config.metadata,
1670
+ retry_policy: @config.retry_policy
1671
+
1672
+ @datastream_stub.list_private_connections request, options do |result, operation|
1673
+ yield result, operation if block_given?
1674
+ return result
1675
+ end
1676
+ rescue ::Gapic::Rest::Error => e
1677
+ raise ::Google::Cloud::Error.from_error(e)
1678
+ end
1679
+
1680
+ ##
1681
+ # Use this method to delete a private connectivity configuration.
1682
+ #
1683
+ # @overload delete_private_connection(request, options = nil)
1684
+ # Pass arguments to `delete_private_connection` via a request object, either of type
1685
+ # {::Google::Cloud::Datastream::V1::DeletePrivateConnectionRequest} or an equivalent Hash.
1686
+ #
1687
+ # @param request [::Google::Cloud::Datastream::V1::DeletePrivateConnectionRequest, ::Hash]
1688
+ # A request object representing the call parameters. Required. To specify no
1689
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1690
+ # @param options [::Gapic::CallOptions, ::Hash]
1691
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1692
+ #
1693
+ # @overload delete_private_connection(name: nil, request_id: nil, force: nil)
1694
+ # Pass arguments to `delete_private_connection` via keyword arguments. Note that at
1695
+ # least one keyword argument is required. To specify no parameters, or to keep all
1696
+ # the default parameter values, pass an empty Hash as a request object (see above).
1697
+ #
1698
+ # @param name [::String]
1699
+ # Required. The name of the private connectivity configuration to delete.
1700
+ # @param request_id [::String]
1701
+ # Optional. A request ID to identify requests. Specify a unique request ID
1702
+ # so that if you must retry your request, the server will know to ignore
1703
+ # the request if it has already been completed. The server will guarantee
1704
+ # that for at least 60 minutes after the first request.
1705
+ #
1706
+ # For example, consider a situation where you make an initial request and the
1707
+ # request times out. If you make the request again with the same request ID,
1708
+ # the server can check if original operation with the same request ID was
1709
+ # received, and if so, will ignore the second request. This prevents clients
1710
+ # from accidentally creating duplicate commitments.
1711
+ #
1712
+ # The request ID must be a valid UUID with the exception that zero UUID is
1713
+ # not supported (00000000-0000-0000-0000-000000000000).
1714
+ # @param force [::Boolean]
1715
+ # Optional. If set to true, any child routes that belong to this PrivateConnection will
1716
+ # also be deleted.
1717
+ # @yield [result, operation] Access the result along with the TransportOperation object
1718
+ # @yieldparam result [::Gapic::Operation]
1719
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1720
+ #
1721
+ # @return [::Gapic::Operation]
1722
+ #
1723
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1724
+ def delete_private_connection request, options = nil
1725
+ raise ::ArgumentError, "request must be provided" if request.nil?
1726
+
1727
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::DeletePrivateConnectionRequest
1728
+
1729
+ # Converts hash and nil to an options object
1730
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1731
+
1732
+ # Customize the options with defaults
1733
+ call_metadata = @config.rpcs.delete_private_connection.metadata.to_h
1734
+
1735
+ # Set x-goog-api-client and x-goog-user-project headers
1736
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1737
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1738
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
1739
+ transports_version_send: [:rest]
1740
+
1741
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1742
+
1743
+ options.apply_defaults timeout: @config.rpcs.delete_private_connection.timeout,
1744
+ metadata: call_metadata,
1745
+ retry_policy: @config.rpcs.delete_private_connection.retry_policy
1746
+
1747
+ options.apply_defaults timeout: @config.timeout,
1748
+ metadata: @config.metadata,
1749
+ retry_policy: @config.retry_policy
1750
+
1751
+ @datastream_stub.delete_private_connection request, options do |result, operation|
1752
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1753
+ yield result, operation if block_given?
1754
+ return result
1755
+ end
1756
+ rescue ::Gapic::Rest::Error => e
1757
+ raise ::Google::Cloud::Error.from_error(e)
1758
+ end
1759
+
1760
+ ##
1761
+ # Use this method to create a route for a private connectivity configuration
1762
+ # in a project and location.
1763
+ #
1764
+ # @overload create_route(request, options = nil)
1765
+ # Pass arguments to `create_route` via a request object, either of type
1766
+ # {::Google::Cloud::Datastream::V1::CreateRouteRequest} or an equivalent Hash.
1767
+ #
1768
+ # @param request [::Google::Cloud::Datastream::V1::CreateRouteRequest, ::Hash]
1769
+ # A request object representing the call parameters. Required. To specify no
1770
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1771
+ # @param options [::Gapic::CallOptions, ::Hash]
1772
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1773
+ #
1774
+ # @overload create_route(parent: nil, route_id: nil, route: nil, request_id: nil)
1775
+ # Pass arguments to `create_route` via keyword arguments. Note that at
1776
+ # least one keyword argument is required. To specify no parameters, or to keep all
1777
+ # the default parameter values, pass an empty Hash as a request object (see above).
1778
+ #
1779
+ # @param parent [::String]
1780
+ # Required. The parent that owns the collection of Routes.
1781
+ # @param route_id [::String]
1782
+ # Required. The Route identifier.
1783
+ # @param route [::Google::Cloud::Datastream::V1::Route, ::Hash]
1784
+ # Required. The Route resource to create.
1785
+ # @param request_id [::String]
1786
+ # Optional. A request ID to identify requests. Specify a unique request ID
1787
+ # so that if you must retry your request, the server will know to ignore
1788
+ # the request if it has already been completed. The server will guarantee
1789
+ # that for at least 60 minutes since the first request.
1790
+ #
1791
+ # For example, consider a situation where you make an initial request and the
1792
+ # request times out. If you make the request again with the same request ID,
1793
+ # the server can check if original operation with the same request ID was
1794
+ # received, and if so, will ignore the second request. This prevents clients
1795
+ # from accidentally creating duplicate commitments.
1796
+ #
1797
+ # The request ID must be a valid UUID with the exception that zero UUID is
1798
+ # not supported (00000000-0000-0000-0000-000000000000).
1799
+ # @yield [result, operation] Access the result along with the TransportOperation object
1800
+ # @yieldparam result [::Gapic::Operation]
1801
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1802
+ #
1803
+ # @return [::Gapic::Operation]
1804
+ #
1805
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1806
+ def create_route request, options = nil
1807
+ raise ::ArgumentError, "request must be provided" if request.nil?
1808
+
1809
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::CreateRouteRequest
1810
+
1811
+ # Converts hash and nil to an options object
1812
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1813
+
1814
+ # Customize the options with defaults
1815
+ call_metadata = @config.rpcs.create_route.metadata.to_h
1816
+
1817
+ # Set x-goog-api-client and x-goog-user-project headers
1818
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1819
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1820
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
1821
+ transports_version_send: [:rest]
1822
+
1823
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1824
+
1825
+ options.apply_defaults timeout: @config.rpcs.create_route.timeout,
1826
+ metadata: call_metadata,
1827
+ retry_policy: @config.rpcs.create_route.retry_policy
1828
+
1829
+ options.apply_defaults timeout: @config.timeout,
1830
+ metadata: @config.metadata,
1831
+ retry_policy: @config.retry_policy
1832
+
1833
+ @datastream_stub.create_route request, options do |result, operation|
1834
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1835
+ yield result, operation if block_given?
1836
+ return result
1837
+ end
1838
+ rescue ::Gapic::Rest::Error => e
1839
+ raise ::Google::Cloud::Error.from_error(e)
1840
+ end
1841
+
1842
+ ##
1843
+ # Use this method to get details about a route.
1844
+ #
1845
+ # @overload get_route(request, options = nil)
1846
+ # Pass arguments to `get_route` via a request object, either of type
1847
+ # {::Google::Cloud::Datastream::V1::GetRouteRequest} or an equivalent Hash.
1848
+ #
1849
+ # @param request [::Google::Cloud::Datastream::V1::GetRouteRequest, ::Hash]
1850
+ # A request object representing the call parameters. Required. To specify no
1851
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1852
+ # @param options [::Gapic::CallOptions, ::Hash]
1853
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1854
+ #
1855
+ # @overload get_route(name: nil)
1856
+ # Pass arguments to `get_route` via keyword arguments. Note that at
1857
+ # least one keyword argument is required. To specify no parameters, or to keep all
1858
+ # the default parameter values, pass an empty Hash as a request object (see above).
1859
+ #
1860
+ # @param name [::String]
1861
+ # Required. The name of the Route resource to get.
1862
+ # @yield [result, operation] Access the result along with the TransportOperation object
1863
+ # @yieldparam result [::Google::Cloud::Datastream::V1::Route]
1864
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1865
+ #
1866
+ # @return [::Google::Cloud::Datastream::V1::Route]
1867
+ #
1868
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1869
+ def get_route request, options = nil
1870
+ raise ::ArgumentError, "request must be provided" if request.nil?
1871
+
1872
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::GetRouteRequest
1873
+
1874
+ # Converts hash and nil to an options object
1875
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1876
+
1877
+ # Customize the options with defaults
1878
+ call_metadata = @config.rpcs.get_route.metadata.to_h
1879
+
1880
+ # Set x-goog-api-client and x-goog-user-project headers
1881
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1882
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1883
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
1884
+ transports_version_send: [:rest]
1885
+
1886
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1887
+
1888
+ options.apply_defaults timeout: @config.rpcs.get_route.timeout,
1889
+ metadata: call_metadata,
1890
+ retry_policy: @config.rpcs.get_route.retry_policy
1891
+
1892
+ options.apply_defaults timeout: @config.timeout,
1893
+ metadata: @config.metadata,
1894
+ retry_policy: @config.retry_policy
1895
+
1896
+ @datastream_stub.get_route request, options do |result, operation|
1897
+ yield result, operation if block_given?
1898
+ return result
1899
+ end
1900
+ rescue ::Gapic::Rest::Error => e
1901
+ raise ::Google::Cloud::Error.from_error(e)
1902
+ end
1903
+
1904
+ ##
1905
+ # Use this method to list routes created for a private connectivity
1906
+ # configuration in a project and location.
1907
+ #
1908
+ # @overload list_routes(request, options = nil)
1909
+ # Pass arguments to `list_routes` via a request object, either of type
1910
+ # {::Google::Cloud::Datastream::V1::ListRoutesRequest} or an equivalent Hash.
1911
+ #
1912
+ # @param request [::Google::Cloud::Datastream::V1::ListRoutesRequest, ::Hash]
1913
+ # A request object representing the call parameters. Required. To specify no
1914
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1915
+ # @param options [::Gapic::CallOptions, ::Hash]
1916
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1917
+ #
1918
+ # @overload list_routes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1919
+ # Pass arguments to `list_routes` via keyword arguments. Note that at
1920
+ # least one keyword argument is required. To specify no parameters, or to keep all
1921
+ # the default parameter values, pass an empty Hash as a request object (see above).
1922
+ #
1923
+ # @param parent [::String]
1924
+ # Required. The parent that owns the collection of Routess.
1925
+ # @param page_size [::Integer]
1926
+ # Maximum number of Routes to return. The service may return
1927
+ # fewer than this value. If unspecified, at most 50 Routes
1928
+ # will be returned. The maximum value is 1000; values above 1000 will be
1929
+ # coerced to 1000.
1930
+ # @param page_token [::String]
1931
+ # Page token received from a previous `ListRoutes` call.
1932
+ # Provide this to retrieve the subsequent page.
1933
+ #
1934
+ # When paginating, all other parameters provided to
1935
+ # `ListRoutes` must match the call that provided the page
1936
+ # token.
1937
+ # @param filter [::String]
1938
+ # Filter request.
1939
+ # @param order_by [::String]
1940
+ # Order by fields for the result.
1941
+ # @yield [result, operation] Access the result along with the TransportOperation object
1942
+ # @yieldparam result [::Google::Cloud::Datastream::V1::ListRoutesResponse]
1943
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1944
+ #
1945
+ # @return [::Google::Cloud::Datastream::V1::ListRoutesResponse]
1946
+ #
1947
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1948
+ def list_routes request, options = nil
1949
+ raise ::ArgumentError, "request must be provided" if request.nil?
1950
+
1951
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::ListRoutesRequest
1952
+
1953
+ # Converts hash and nil to an options object
1954
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1955
+
1956
+ # Customize the options with defaults
1957
+ call_metadata = @config.rpcs.list_routes.metadata.to_h
1958
+
1959
+ # Set x-goog-api-client and x-goog-user-project headers
1960
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1961
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1962
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
1963
+ transports_version_send: [:rest]
1964
+
1965
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1966
+
1967
+ options.apply_defaults timeout: @config.rpcs.list_routes.timeout,
1968
+ metadata: call_metadata,
1969
+ retry_policy: @config.rpcs.list_routes.retry_policy
1970
+
1971
+ options.apply_defaults timeout: @config.timeout,
1972
+ metadata: @config.metadata,
1973
+ retry_policy: @config.retry_policy
1974
+
1975
+ @datastream_stub.list_routes request, options do |result, operation|
1976
+ yield result, operation if block_given?
1977
+ return result
1978
+ end
1979
+ rescue ::Gapic::Rest::Error => e
1980
+ raise ::Google::Cloud::Error.from_error(e)
1981
+ end
1982
+
1983
+ ##
1984
+ # Use this method to delete a route.
1985
+ #
1986
+ # @overload delete_route(request, options = nil)
1987
+ # Pass arguments to `delete_route` via a request object, either of type
1988
+ # {::Google::Cloud::Datastream::V1::DeleteRouteRequest} or an equivalent Hash.
1989
+ #
1990
+ # @param request [::Google::Cloud::Datastream::V1::DeleteRouteRequest, ::Hash]
1991
+ # A request object representing the call parameters. Required. To specify no
1992
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1993
+ # @param options [::Gapic::CallOptions, ::Hash]
1994
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1995
+ #
1996
+ # @overload delete_route(name: nil, request_id: nil)
1997
+ # Pass arguments to `delete_route` via keyword arguments. Note that at
1998
+ # least one keyword argument is required. To specify no parameters, or to keep all
1999
+ # the default parameter values, pass an empty Hash as a request object (see above).
2000
+ #
2001
+ # @param name [::String]
2002
+ # Required. The name of the Route resource to delete.
2003
+ # @param request_id [::String]
2004
+ # Optional. A request ID to identify requests. Specify a unique request ID
2005
+ # so that if you must retry your request, the server will know to ignore
2006
+ # the request if it has already been completed. The server will guarantee
2007
+ # that for at least 60 minutes after the first request.
2008
+ #
2009
+ # For example, consider a situation where you make an initial request and the
2010
+ # request times out. If you make the request again with the same request ID,
2011
+ # the server can check if original operation with the same request ID was
2012
+ # received, and if so, will ignore the second request. This prevents clients
2013
+ # from accidentally creating duplicate commitments.
2014
+ #
2015
+ # The request ID must be a valid UUID with the exception that zero UUID is
2016
+ # not supported (00000000-0000-0000-0000-000000000000).
2017
+ # @yield [result, operation] Access the result along with the TransportOperation object
2018
+ # @yieldparam result [::Gapic::Operation]
2019
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2020
+ #
2021
+ # @return [::Gapic::Operation]
2022
+ #
2023
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2024
+ def delete_route request, options = nil
2025
+ raise ::ArgumentError, "request must be provided" if request.nil?
2026
+
2027
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::DeleteRouteRequest
2028
+
2029
+ # Converts hash and nil to an options object
2030
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2031
+
2032
+ # Customize the options with defaults
2033
+ call_metadata = @config.rpcs.delete_route.metadata.to_h
2034
+
2035
+ # Set x-goog-api-client and x-goog-user-project headers
2036
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2037
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2038
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
2039
+ transports_version_send: [:rest]
2040
+
2041
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2042
+
2043
+ options.apply_defaults timeout: @config.rpcs.delete_route.timeout,
2044
+ metadata: call_metadata,
2045
+ retry_policy: @config.rpcs.delete_route.retry_policy
2046
+
2047
+ options.apply_defaults timeout: @config.timeout,
2048
+ metadata: @config.metadata,
2049
+ retry_policy: @config.retry_policy
2050
+
2051
+ @datastream_stub.delete_route request, options do |result, operation|
2052
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2053
+ yield result, operation if block_given?
2054
+ return result
2055
+ end
2056
+ rescue ::Gapic::Rest::Error => e
2057
+ raise ::Google::Cloud::Error.from_error(e)
2058
+ end
2059
+
2060
+ ##
2061
+ # Configuration class for the Datastream REST API.
2062
+ #
2063
+ # This class represents the configuration for Datastream REST,
2064
+ # providing control over timeouts, retry behavior, logging, transport
2065
+ # parameters, and other low-level controls. Certain parameters can also be
2066
+ # applied individually to specific RPCs. See
2067
+ # {::Google::Cloud::Datastream::V1::Datastream::Rest::Client::Configuration::Rpcs}
2068
+ # for a list of RPCs that can be configured independently.
2069
+ #
2070
+ # Configuration can be applied globally to all clients, or to a single client
2071
+ # on construction.
2072
+ #
2073
+ # @example
2074
+ #
2075
+ # # Modify the global config, setting the timeout for
2076
+ # # list_connection_profiles to 20 seconds,
2077
+ # # and all remaining timeouts to 10 seconds.
2078
+ # ::Google::Cloud::Datastream::V1::Datastream::Rest::Client.configure do |config|
2079
+ # config.timeout = 10.0
2080
+ # config.rpcs.list_connection_profiles.timeout = 20.0
2081
+ # end
2082
+ #
2083
+ # # Apply the above configuration only to a new client.
2084
+ # client = ::Google::Cloud::Datastream::V1::Datastream::Rest::Client.new do |config|
2085
+ # config.timeout = 10.0
2086
+ # config.rpcs.list_connection_profiles.timeout = 20.0
2087
+ # end
2088
+ #
2089
+ # @!attribute [rw] endpoint
2090
+ # The hostname or hostname:port of the service endpoint.
2091
+ # Defaults to `"datastream.googleapis.com"`.
2092
+ # @return [::String]
2093
+ # @!attribute [rw] credentials
2094
+ # Credentials to send with calls. You may provide any of the following types:
2095
+ # * (`String`) The path to a service account key file in JSON format
2096
+ # * (`Hash`) A service account key as a Hash
2097
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
2098
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
2099
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
2100
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
2101
+ # * (`nil`) indicating no credentials
2102
+ # @return [::Object]
2103
+ # @!attribute [rw] scope
2104
+ # The OAuth scopes
2105
+ # @return [::Array<::String>]
2106
+ # @!attribute [rw] lib_name
2107
+ # The library name as recorded in instrumentation and logging
2108
+ # @return [::String]
2109
+ # @!attribute [rw] lib_version
2110
+ # The library version as recorded in instrumentation and logging
2111
+ # @return [::String]
2112
+ # @!attribute [rw] timeout
2113
+ # The call timeout in seconds.
2114
+ # @return [::Numeric]
2115
+ # @!attribute [rw] metadata
2116
+ # Additional headers to be sent with the call.
2117
+ # @return [::Hash{::Symbol=>::String}]
2118
+ # @!attribute [rw] retry_policy
2119
+ # The retry policy. The value is a hash with the following keys:
2120
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2121
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2122
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2123
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2124
+ # trigger a retry.
2125
+ # @return [::Hash]
2126
+ # @!attribute [rw] quota_project
2127
+ # A separate project against which to charge quota.
2128
+ # @return [::String]
2129
+ #
2130
+ class Configuration
2131
+ extend ::Gapic::Config
2132
+
2133
+ config_attr :endpoint, "datastream.googleapis.com", ::String
2134
+ config_attr :credentials, nil do |value|
2135
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
2136
+ allowed.any? { |klass| klass === value }
2137
+ end
2138
+ config_attr :scope, nil, ::String, ::Array, nil
2139
+ config_attr :lib_name, nil, ::String, nil
2140
+ config_attr :lib_version, nil, ::String, nil
2141
+ config_attr :timeout, nil, ::Numeric, nil
2142
+ config_attr :metadata, nil, ::Hash, nil
2143
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2144
+ config_attr :quota_project, nil, ::String, nil
2145
+
2146
+ # @private
2147
+ # Overrides for http bindings for the RPCs of this service
2148
+ # are only used when this service is used as mixin, and only
2149
+ # by the host service.
2150
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
2151
+ config_attr :bindings_override, {}, ::Hash, nil
2152
+
2153
+ # @private
2154
+ def initialize parent_config = nil
2155
+ @parent_config = parent_config unless parent_config.nil?
2156
+
2157
+ yield self if block_given?
2158
+ end
2159
+
2160
+ ##
2161
+ # Configurations for individual RPCs
2162
+ # @return [Rpcs]
2163
+ #
2164
+ def rpcs
2165
+ @rpcs ||= begin
2166
+ parent_rpcs = nil
2167
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
2168
+ Rpcs.new parent_rpcs
2169
+ end
2170
+ end
2171
+
2172
+ ##
2173
+ # Configuration RPC class for the Datastream API.
2174
+ #
2175
+ # Includes fields providing the configuration for each RPC in this service.
2176
+ # Each configuration object is of type `Gapic::Config::Method` and includes
2177
+ # the following configuration fields:
2178
+ #
2179
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
2180
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
2181
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
2182
+ # include the following keys:
2183
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2184
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2185
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2186
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2187
+ # trigger a retry.
2188
+ #
2189
+ class Rpcs
2190
+ ##
2191
+ # RPC-specific configuration for `list_connection_profiles`
2192
+ # @return [::Gapic::Config::Method]
2193
+ #
2194
+ attr_reader :list_connection_profiles
2195
+ ##
2196
+ # RPC-specific configuration for `get_connection_profile`
2197
+ # @return [::Gapic::Config::Method]
2198
+ #
2199
+ attr_reader :get_connection_profile
2200
+ ##
2201
+ # RPC-specific configuration for `create_connection_profile`
2202
+ # @return [::Gapic::Config::Method]
2203
+ #
2204
+ attr_reader :create_connection_profile
2205
+ ##
2206
+ # RPC-specific configuration for `update_connection_profile`
2207
+ # @return [::Gapic::Config::Method]
2208
+ #
2209
+ attr_reader :update_connection_profile
2210
+ ##
2211
+ # RPC-specific configuration for `delete_connection_profile`
2212
+ # @return [::Gapic::Config::Method]
2213
+ #
2214
+ attr_reader :delete_connection_profile
2215
+ ##
2216
+ # RPC-specific configuration for `discover_connection_profile`
2217
+ # @return [::Gapic::Config::Method]
2218
+ #
2219
+ attr_reader :discover_connection_profile
2220
+ ##
2221
+ # RPC-specific configuration for `list_streams`
2222
+ # @return [::Gapic::Config::Method]
2223
+ #
2224
+ attr_reader :list_streams
2225
+ ##
2226
+ # RPC-specific configuration for `get_stream`
2227
+ # @return [::Gapic::Config::Method]
2228
+ #
2229
+ attr_reader :get_stream
2230
+ ##
2231
+ # RPC-specific configuration for `create_stream`
2232
+ # @return [::Gapic::Config::Method]
2233
+ #
2234
+ attr_reader :create_stream
2235
+ ##
2236
+ # RPC-specific configuration for `update_stream`
2237
+ # @return [::Gapic::Config::Method]
2238
+ #
2239
+ attr_reader :update_stream
2240
+ ##
2241
+ # RPC-specific configuration for `delete_stream`
2242
+ # @return [::Gapic::Config::Method]
2243
+ #
2244
+ attr_reader :delete_stream
2245
+ ##
2246
+ # RPC-specific configuration for `get_stream_object`
2247
+ # @return [::Gapic::Config::Method]
2248
+ #
2249
+ attr_reader :get_stream_object
2250
+ ##
2251
+ # RPC-specific configuration for `lookup_stream_object`
2252
+ # @return [::Gapic::Config::Method]
2253
+ #
2254
+ attr_reader :lookup_stream_object
2255
+ ##
2256
+ # RPC-specific configuration for `list_stream_objects`
2257
+ # @return [::Gapic::Config::Method]
2258
+ #
2259
+ attr_reader :list_stream_objects
2260
+ ##
2261
+ # RPC-specific configuration for `start_backfill_job`
2262
+ # @return [::Gapic::Config::Method]
2263
+ #
2264
+ attr_reader :start_backfill_job
2265
+ ##
2266
+ # RPC-specific configuration for `stop_backfill_job`
2267
+ # @return [::Gapic::Config::Method]
2268
+ #
2269
+ attr_reader :stop_backfill_job
2270
+ ##
2271
+ # RPC-specific configuration for `fetch_static_ips`
2272
+ # @return [::Gapic::Config::Method]
2273
+ #
2274
+ attr_reader :fetch_static_ips
2275
+ ##
2276
+ # RPC-specific configuration for `create_private_connection`
2277
+ # @return [::Gapic::Config::Method]
2278
+ #
2279
+ attr_reader :create_private_connection
2280
+ ##
2281
+ # RPC-specific configuration for `get_private_connection`
2282
+ # @return [::Gapic::Config::Method]
2283
+ #
2284
+ attr_reader :get_private_connection
2285
+ ##
2286
+ # RPC-specific configuration for `list_private_connections`
2287
+ # @return [::Gapic::Config::Method]
2288
+ #
2289
+ attr_reader :list_private_connections
2290
+ ##
2291
+ # RPC-specific configuration for `delete_private_connection`
2292
+ # @return [::Gapic::Config::Method]
2293
+ #
2294
+ attr_reader :delete_private_connection
2295
+ ##
2296
+ # RPC-specific configuration for `create_route`
2297
+ # @return [::Gapic::Config::Method]
2298
+ #
2299
+ attr_reader :create_route
2300
+ ##
2301
+ # RPC-specific configuration for `get_route`
2302
+ # @return [::Gapic::Config::Method]
2303
+ #
2304
+ attr_reader :get_route
2305
+ ##
2306
+ # RPC-specific configuration for `list_routes`
2307
+ # @return [::Gapic::Config::Method]
2308
+ #
2309
+ attr_reader :list_routes
2310
+ ##
2311
+ # RPC-specific configuration for `delete_route`
2312
+ # @return [::Gapic::Config::Method]
2313
+ #
2314
+ attr_reader :delete_route
2315
+
2316
+ # @private
2317
+ def initialize parent_rpcs = nil
2318
+ list_connection_profiles_config = parent_rpcs.list_connection_profiles if parent_rpcs.respond_to? :list_connection_profiles
2319
+ @list_connection_profiles = ::Gapic::Config::Method.new list_connection_profiles_config
2320
+ get_connection_profile_config = parent_rpcs.get_connection_profile if parent_rpcs.respond_to? :get_connection_profile
2321
+ @get_connection_profile = ::Gapic::Config::Method.new get_connection_profile_config
2322
+ create_connection_profile_config = parent_rpcs.create_connection_profile if parent_rpcs.respond_to? :create_connection_profile
2323
+ @create_connection_profile = ::Gapic::Config::Method.new create_connection_profile_config
2324
+ update_connection_profile_config = parent_rpcs.update_connection_profile if parent_rpcs.respond_to? :update_connection_profile
2325
+ @update_connection_profile = ::Gapic::Config::Method.new update_connection_profile_config
2326
+ delete_connection_profile_config = parent_rpcs.delete_connection_profile if parent_rpcs.respond_to? :delete_connection_profile
2327
+ @delete_connection_profile = ::Gapic::Config::Method.new delete_connection_profile_config
2328
+ discover_connection_profile_config = parent_rpcs.discover_connection_profile if parent_rpcs.respond_to? :discover_connection_profile
2329
+ @discover_connection_profile = ::Gapic::Config::Method.new discover_connection_profile_config
2330
+ list_streams_config = parent_rpcs.list_streams if parent_rpcs.respond_to? :list_streams
2331
+ @list_streams = ::Gapic::Config::Method.new list_streams_config
2332
+ get_stream_config = parent_rpcs.get_stream if parent_rpcs.respond_to? :get_stream
2333
+ @get_stream = ::Gapic::Config::Method.new get_stream_config
2334
+ create_stream_config = parent_rpcs.create_stream if parent_rpcs.respond_to? :create_stream
2335
+ @create_stream = ::Gapic::Config::Method.new create_stream_config
2336
+ update_stream_config = parent_rpcs.update_stream if parent_rpcs.respond_to? :update_stream
2337
+ @update_stream = ::Gapic::Config::Method.new update_stream_config
2338
+ delete_stream_config = parent_rpcs.delete_stream if parent_rpcs.respond_to? :delete_stream
2339
+ @delete_stream = ::Gapic::Config::Method.new delete_stream_config
2340
+ get_stream_object_config = parent_rpcs.get_stream_object if parent_rpcs.respond_to? :get_stream_object
2341
+ @get_stream_object = ::Gapic::Config::Method.new get_stream_object_config
2342
+ lookup_stream_object_config = parent_rpcs.lookup_stream_object if parent_rpcs.respond_to? :lookup_stream_object
2343
+ @lookup_stream_object = ::Gapic::Config::Method.new lookup_stream_object_config
2344
+ list_stream_objects_config = parent_rpcs.list_stream_objects if parent_rpcs.respond_to? :list_stream_objects
2345
+ @list_stream_objects = ::Gapic::Config::Method.new list_stream_objects_config
2346
+ start_backfill_job_config = parent_rpcs.start_backfill_job if parent_rpcs.respond_to? :start_backfill_job
2347
+ @start_backfill_job = ::Gapic::Config::Method.new start_backfill_job_config
2348
+ stop_backfill_job_config = parent_rpcs.stop_backfill_job if parent_rpcs.respond_to? :stop_backfill_job
2349
+ @stop_backfill_job = ::Gapic::Config::Method.new stop_backfill_job_config
2350
+ fetch_static_ips_config = parent_rpcs.fetch_static_ips if parent_rpcs.respond_to? :fetch_static_ips
2351
+ @fetch_static_ips = ::Gapic::Config::Method.new fetch_static_ips_config
2352
+ create_private_connection_config = parent_rpcs.create_private_connection if parent_rpcs.respond_to? :create_private_connection
2353
+ @create_private_connection = ::Gapic::Config::Method.new create_private_connection_config
2354
+ get_private_connection_config = parent_rpcs.get_private_connection if parent_rpcs.respond_to? :get_private_connection
2355
+ @get_private_connection = ::Gapic::Config::Method.new get_private_connection_config
2356
+ list_private_connections_config = parent_rpcs.list_private_connections if parent_rpcs.respond_to? :list_private_connections
2357
+ @list_private_connections = ::Gapic::Config::Method.new list_private_connections_config
2358
+ delete_private_connection_config = parent_rpcs.delete_private_connection if parent_rpcs.respond_to? :delete_private_connection
2359
+ @delete_private_connection = ::Gapic::Config::Method.new delete_private_connection_config
2360
+ create_route_config = parent_rpcs.create_route if parent_rpcs.respond_to? :create_route
2361
+ @create_route = ::Gapic::Config::Method.new create_route_config
2362
+ get_route_config = parent_rpcs.get_route if parent_rpcs.respond_to? :get_route
2363
+ @get_route = ::Gapic::Config::Method.new get_route_config
2364
+ list_routes_config = parent_rpcs.list_routes if parent_rpcs.respond_to? :list_routes
2365
+ @list_routes = ::Gapic::Config::Method.new list_routes_config
2366
+ delete_route_config = parent_rpcs.delete_route if parent_rpcs.respond_to? :delete_route
2367
+ @delete_route = ::Gapic::Config::Method.new delete_route_config
2368
+
2369
+ yield self if block_given?
2370
+ end
2371
+ end
2372
+ end
2373
+ end
2374
+ end
2375
+ end
2376
+ end
2377
+ end
2378
+ end
2379
+ end