google-cloud-datastream-v1 0.4.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2386 @@
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 == Configuration::DEFAULT_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
384
+ # resources. 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
472
+ # resources. 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
618
+ # the 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
942
+ # updating it. 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
1284
+ # for.
1285
+ # @yield [result, operation] Access the result along with the TransportOperation object
1286
+ # @yieldparam result [::Google::Cloud::Datastream::V1::StartBackfillJobResponse]
1287
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1288
+ #
1289
+ # @return [::Google::Cloud::Datastream::V1::StartBackfillJobResponse]
1290
+ #
1291
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1292
+ def start_backfill_job request, options = nil
1293
+ raise ::ArgumentError, "request must be provided" if request.nil?
1294
+
1295
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::StartBackfillJobRequest
1296
+
1297
+ # Converts hash and nil to an options object
1298
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1299
+
1300
+ # Customize the options with defaults
1301
+ call_metadata = @config.rpcs.start_backfill_job.metadata.to_h
1302
+
1303
+ # Set x-goog-api-client and x-goog-user-project headers
1304
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1305
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1306
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
1307
+ transports_version_send: [:rest]
1308
+
1309
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1310
+
1311
+ options.apply_defaults timeout: @config.rpcs.start_backfill_job.timeout,
1312
+ metadata: call_metadata,
1313
+ retry_policy: @config.rpcs.start_backfill_job.retry_policy
1314
+
1315
+ options.apply_defaults timeout: @config.timeout,
1316
+ metadata: @config.metadata,
1317
+ retry_policy: @config.retry_policy
1318
+
1319
+ @datastream_stub.start_backfill_job request, options do |result, operation|
1320
+ yield result, operation if block_given?
1321
+ return result
1322
+ end
1323
+ rescue ::Gapic::Rest::Error => e
1324
+ raise ::Google::Cloud::Error.from_error(e)
1325
+ end
1326
+
1327
+ ##
1328
+ # Use this method to stop a backfill job for the specified stream object.
1329
+ #
1330
+ # @overload stop_backfill_job(request, options = nil)
1331
+ # Pass arguments to `stop_backfill_job` via a request object, either of type
1332
+ # {::Google::Cloud::Datastream::V1::StopBackfillJobRequest} or an equivalent Hash.
1333
+ #
1334
+ # @param request [::Google::Cloud::Datastream::V1::StopBackfillJobRequest, ::Hash]
1335
+ # A request object representing the call parameters. Required. To specify no
1336
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1337
+ # @param options [::Gapic::CallOptions, ::Hash]
1338
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1339
+ #
1340
+ # @overload stop_backfill_job(object: nil)
1341
+ # Pass arguments to `stop_backfill_job` via keyword arguments. Note that at
1342
+ # least one keyword argument is required. To specify no parameters, or to keep all
1343
+ # the default parameter values, pass an empty Hash as a request object (see above).
1344
+ #
1345
+ # @param object [::String]
1346
+ # Required. The name of the stream object resource to stop the backfill job
1347
+ # for.
1348
+ # @yield [result, operation] Access the result along with the TransportOperation object
1349
+ # @yieldparam result [::Google::Cloud::Datastream::V1::StopBackfillJobResponse]
1350
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1351
+ #
1352
+ # @return [::Google::Cloud::Datastream::V1::StopBackfillJobResponse]
1353
+ #
1354
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1355
+ def stop_backfill_job request, options = nil
1356
+ raise ::ArgumentError, "request must be provided" if request.nil?
1357
+
1358
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::StopBackfillJobRequest
1359
+
1360
+ # Converts hash and nil to an options object
1361
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1362
+
1363
+ # Customize the options with defaults
1364
+ call_metadata = @config.rpcs.stop_backfill_job.metadata.to_h
1365
+
1366
+ # Set x-goog-api-client and x-goog-user-project headers
1367
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1368
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1369
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
1370
+ transports_version_send: [:rest]
1371
+
1372
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1373
+
1374
+ options.apply_defaults timeout: @config.rpcs.stop_backfill_job.timeout,
1375
+ metadata: call_metadata,
1376
+ retry_policy: @config.rpcs.stop_backfill_job.retry_policy
1377
+
1378
+ options.apply_defaults timeout: @config.timeout,
1379
+ metadata: @config.metadata,
1380
+ retry_policy: @config.retry_policy
1381
+
1382
+ @datastream_stub.stop_backfill_job request, options do |result, operation|
1383
+ yield result, operation if block_given?
1384
+ return result
1385
+ end
1386
+ rescue ::Gapic::Rest::Error => e
1387
+ raise ::Google::Cloud::Error.from_error(e)
1388
+ end
1389
+
1390
+ ##
1391
+ # The FetchStaticIps API call exposes the static IP addresses used by
1392
+ # Datastream.
1393
+ #
1394
+ # @overload fetch_static_ips(request, options = nil)
1395
+ # Pass arguments to `fetch_static_ips` via a request object, either of type
1396
+ # {::Google::Cloud::Datastream::V1::FetchStaticIpsRequest} or an equivalent Hash.
1397
+ #
1398
+ # @param request [::Google::Cloud::Datastream::V1::FetchStaticIpsRequest, ::Hash]
1399
+ # A request object representing the call parameters. Required. To specify no
1400
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1401
+ # @param options [::Gapic::CallOptions, ::Hash]
1402
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1403
+ #
1404
+ # @overload fetch_static_ips(name: nil, page_size: nil, page_token: nil)
1405
+ # Pass arguments to `fetch_static_ips` via keyword arguments. Note that at
1406
+ # least one keyword argument is required. To specify no parameters, or to keep all
1407
+ # the default parameter values, pass an empty Hash as a request object (see above).
1408
+ #
1409
+ # @param name [::String]
1410
+ # Required. The resource name for the location for which static IPs should be
1411
+ # returned. Must be in the format `projects/*/locations/*`.
1412
+ # @param page_size [::Integer]
1413
+ # Maximum number of Ips to return, will likely not be specified.
1414
+ # @param page_token [::String]
1415
+ # A page token, received from a previous `ListStaticIps` call.
1416
+ # will likely not be specified.
1417
+ # @yield [result, operation] Access the result along with the TransportOperation object
1418
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::String>]
1419
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1420
+ #
1421
+ # @return [::Gapic::Rest::PagedEnumerable<::String>]
1422
+ #
1423
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1424
+ def fetch_static_ips request, options = nil
1425
+ raise ::ArgumentError, "request must be provided" if request.nil?
1426
+
1427
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::FetchStaticIpsRequest
1428
+
1429
+ # Converts hash and nil to an options object
1430
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1431
+
1432
+ # Customize the options with defaults
1433
+ call_metadata = @config.rpcs.fetch_static_ips.metadata.to_h
1434
+
1435
+ # Set x-goog-api-client and x-goog-user-project headers
1436
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1437
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1438
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
1439
+ transports_version_send: [:rest]
1440
+
1441
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1442
+
1443
+ options.apply_defaults timeout: @config.rpcs.fetch_static_ips.timeout,
1444
+ metadata: call_metadata,
1445
+ retry_policy: @config.rpcs.fetch_static_ips.retry_policy
1446
+
1447
+ options.apply_defaults timeout: @config.timeout,
1448
+ metadata: @config.metadata,
1449
+ retry_policy: @config.retry_policy
1450
+
1451
+ @datastream_stub.fetch_static_ips request, options do |result, operation|
1452
+ result = ::Gapic::Rest::PagedEnumerable.new @datastream_stub, :fetch_static_ips, "static_ips", request, result, options
1453
+ yield result, operation if block_given?
1454
+ return result
1455
+ end
1456
+ rescue ::Gapic::Rest::Error => e
1457
+ raise ::Google::Cloud::Error.from_error(e)
1458
+ end
1459
+
1460
+ ##
1461
+ # Use this method to create a private connectivity configuration.
1462
+ #
1463
+ # @overload create_private_connection(request, options = nil)
1464
+ # Pass arguments to `create_private_connection` via a request object, either of type
1465
+ # {::Google::Cloud::Datastream::V1::CreatePrivateConnectionRequest} or an equivalent Hash.
1466
+ #
1467
+ # @param request [::Google::Cloud::Datastream::V1::CreatePrivateConnectionRequest, ::Hash]
1468
+ # A request object representing the call parameters. Required. To specify no
1469
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1470
+ # @param options [::Gapic::CallOptions, ::Hash]
1471
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1472
+ #
1473
+ # @overload create_private_connection(parent: nil, private_connection_id: nil, private_connection: nil, request_id: nil, force: nil)
1474
+ # Pass arguments to `create_private_connection` via keyword arguments. Note that at
1475
+ # least one keyword argument is required. To specify no parameters, or to keep all
1476
+ # the default parameter values, pass an empty Hash as a request object (see above).
1477
+ #
1478
+ # @param parent [::String]
1479
+ # Required. The parent that owns the collection of PrivateConnections.
1480
+ # @param private_connection_id [::String]
1481
+ # Required. The private connectivity identifier.
1482
+ # @param private_connection [::Google::Cloud::Datastream::V1::PrivateConnection, ::Hash]
1483
+ # Required. The Private Connectivity resource to create.
1484
+ # @param request_id [::String]
1485
+ # Optional. A request ID to identify requests. Specify a unique request ID
1486
+ # so that if you must retry your request, the server will know to ignore
1487
+ # the request if it has already been completed. The server will guarantee
1488
+ # that for at least 60 minutes since the first request.
1489
+ #
1490
+ # For example, consider a situation where you make an initial request and the
1491
+ # request times out. If you make the request again with the same request ID,
1492
+ # the server can check if original operation with the same request ID was
1493
+ # received, and if so, will ignore the second request. This prevents clients
1494
+ # from accidentally creating duplicate commitments.
1495
+ #
1496
+ # The request ID must be a valid UUID with the exception that zero UUID is
1497
+ # not supported (00000000-0000-0000-0000-000000000000).
1498
+ # @param force [::Boolean]
1499
+ # Optional. If set to true, will skip validations.
1500
+ # @yield [result, operation] Access the result along with the TransportOperation object
1501
+ # @yieldparam result [::Gapic::Operation]
1502
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1503
+ #
1504
+ # @return [::Gapic::Operation]
1505
+ #
1506
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1507
+ def create_private_connection request, options = nil
1508
+ raise ::ArgumentError, "request must be provided" if request.nil?
1509
+
1510
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::CreatePrivateConnectionRequest
1511
+
1512
+ # Converts hash and nil to an options object
1513
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1514
+
1515
+ # Customize the options with defaults
1516
+ call_metadata = @config.rpcs.create_private_connection.metadata.to_h
1517
+
1518
+ # Set x-goog-api-client and x-goog-user-project headers
1519
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1520
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1521
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
1522
+ transports_version_send: [:rest]
1523
+
1524
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1525
+
1526
+ options.apply_defaults timeout: @config.rpcs.create_private_connection.timeout,
1527
+ metadata: call_metadata,
1528
+ retry_policy: @config.rpcs.create_private_connection.retry_policy
1529
+
1530
+ options.apply_defaults timeout: @config.timeout,
1531
+ metadata: @config.metadata,
1532
+ retry_policy: @config.retry_policy
1533
+
1534
+ @datastream_stub.create_private_connection request, options do |result, operation|
1535
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1536
+ yield result, operation if block_given?
1537
+ return result
1538
+ end
1539
+ rescue ::Gapic::Rest::Error => e
1540
+ raise ::Google::Cloud::Error.from_error(e)
1541
+ end
1542
+
1543
+ ##
1544
+ # Use this method to get details about a private connectivity configuration.
1545
+ #
1546
+ # @overload get_private_connection(request, options = nil)
1547
+ # Pass arguments to `get_private_connection` via a request object, either of type
1548
+ # {::Google::Cloud::Datastream::V1::GetPrivateConnectionRequest} or an equivalent Hash.
1549
+ #
1550
+ # @param request [::Google::Cloud::Datastream::V1::GetPrivateConnectionRequest, ::Hash]
1551
+ # A request object representing the call parameters. Required. To specify no
1552
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1553
+ # @param options [::Gapic::CallOptions, ::Hash]
1554
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1555
+ #
1556
+ # @overload get_private_connection(name: nil)
1557
+ # Pass arguments to `get_private_connection` via keyword arguments. Note that at
1558
+ # least one keyword argument is required. To specify no parameters, or to keep all
1559
+ # the default parameter values, pass an empty Hash as a request object (see above).
1560
+ #
1561
+ # @param name [::String]
1562
+ # Required. The name of the private connectivity configuration to get.
1563
+ # @yield [result, operation] Access the result along with the TransportOperation object
1564
+ # @yieldparam result [::Google::Cloud::Datastream::V1::PrivateConnection]
1565
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1566
+ #
1567
+ # @return [::Google::Cloud::Datastream::V1::PrivateConnection]
1568
+ #
1569
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1570
+ def get_private_connection request, options = nil
1571
+ raise ::ArgumentError, "request must be provided" if request.nil?
1572
+
1573
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::GetPrivateConnectionRequest
1574
+
1575
+ # Converts hash and nil to an options object
1576
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1577
+
1578
+ # Customize the options with defaults
1579
+ call_metadata = @config.rpcs.get_private_connection.metadata.to_h
1580
+
1581
+ # Set x-goog-api-client and x-goog-user-project headers
1582
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1583
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1584
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
1585
+ transports_version_send: [:rest]
1586
+
1587
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1588
+
1589
+ options.apply_defaults timeout: @config.rpcs.get_private_connection.timeout,
1590
+ metadata: call_metadata,
1591
+ retry_policy: @config.rpcs.get_private_connection.retry_policy
1592
+
1593
+ options.apply_defaults timeout: @config.timeout,
1594
+ metadata: @config.metadata,
1595
+ retry_policy: @config.retry_policy
1596
+
1597
+ @datastream_stub.get_private_connection request, options do |result, operation|
1598
+ yield result, operation if block_given?
1599
+ return result
1600
+ end
1601
+ rescue ::Gapic::Rest::Error => e
1602
+ raise ::Google::Cloud::Error.from_error(e)
1603
+ end
1604
+
1605
+ ##
1606
+ # Use this method to list private connectivity configurations in a project
1607
+ # and location.
1608
+ #
1609
+ # @overload list_private_connections(request, options = nil)
1610
+ # Pass arguments to `list_private_connections` via a request object, either of type
1611
+ # {::Google::Cloud::Datastream::V1::ListPrivateConnectionsRequest} or an equivalent Hash.
1612
+ #
1613
+ # @param request [::Google::Cloud::Datastream::V1::ListPrivateConnectionsRequest, ::Hash]
1614
+ # A request object representing the call parameters. Required. To specify no
1615
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1616
+ # @param options [::Gapic::CallOptions, ::Hash]
1617
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1618
+ #
1619
+ # @overload list_private_connections(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1620
+ # Pass arguments to `list_private_connections` via keyword arguments. Note that at
1621
+ # least one keyword argument is required. To specify no parameters, or to keep all
1622
+ # the default parameter values, pass an empty Hash as a request object (see above).
1623
+ #
1624
+ # @param parent [::String]
1625
+ # Required. The parent that owns the collection of private connectivity
1626
+ # configurations.
1627
+ # @param page_size [::Integer]
1628
+ # Maximum number of private connectivity configurations to return.
1629
+ # If unspecified, at most 50 private connectivity configurations that will be
1630
+ # returned. The maximum value is 1000; values above 1000 will be coerced to
1631
+ # 1000.
1632
+ # @param page_token [::String]
1633
+ # Page token received from a previous `ListPrivateConnections` call.
1634
+ # Provide this to retrieve the subsequent page.
1635
+ #
1636
+ # When paginating, all other parameters provided to
1637
+ # `ListPrivateConnections` must match the call that provided the page
1638
+ # token.
1639
+ # @param filter [::String]
1640
+ # Filter request.
1641
+ # @param order_by [::String]
1642
+ # Order by fields for the result.
1643
+ # @yield [result, operation] Access the result along with the TransportOperation object
1644
+ # @yieldparam result [::Google::Cloud::Datastream::V1::ListPrivateConnectionsResponse]
1645
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1646
+ #
1647
+ # @return [::Google::Cloud::Datastream::V1::ListPrivateConnectionsResponse]
1648
+ #
1649
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1650
+ def list_private_connections request, options = nil
1651
+ raise ::ArgumentError, "request must be provided" if request.nil?
1652
+
1653
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::ListPrivateConnectionsRequest
1654
+
1655
+ # Converts hash and nil to an options object
1656
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1657
+
1658
+ # Customize the options with defaults
1659
+ call_metadata = @config.rpcs.list_private_connections.metadata.to_h
1660
+
1661
+ # Set x-goog-api-client and x-goog-user-project headers
1662
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1663
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1664
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
1665
+ transports_version_send: [:rest]
1666
+
1667
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1668
+
1669
+ options.apply_defaults timeout: @config.rpcs.list_private_connections.timeout,
1670
+ metadata: call_metadata,
1671
+ retry_policy: @config.rpcs.list_private_connections.retry_policy
1672
+
1673
+ options.apply_defaults timeout: @config.timeout,
1674
+ metadata: @config.metadata,
1675
+ retry_policy: @config.retry_policy
1676
+
1677
+ @datastream_stub.list_private_connections request, options do |result, operation|
1678
+ yield result, operation if block_given?
1679
+ return result
1680
+ end
1681
+ rescue ::Gapic::Rest::Error => e
1682
+ raise ::Google::Cloud::Error.from_error(e)
1683
+ end
1684
+
1685
+ ##
1686
+ # Use this method to delete a private connectivity configuration.
1687
+ #
1688
+ # @overload delete_private_connection(request, options = nil)
1689
+ # Pass arguments to `delete_private_connection` via a request object, either of type
1690
+ # {::Google::Cloud::Datastream::V1::DeletePrivateConnectionRequest} or an equivalent Hash.
1691
+ #
1692
+ # @param request [::Google::Cloud::Datastream::V1::DeletePrivateConnectionRequest, ::Hash]
1693
+ # A request object representing the call parameters. Required. To specify no
1694
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1695
+ # @param options [::Gapic::CallOptions, ::Hash]
1696
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1697
+ #
1698
+ # @overload delete_private_connection(name: nil, request_id: nil, force: nil)
1699
+ # Pass arguments to `delete_private_connection` via keyword arguments. Note that at
1700
+ # least one keyword argument is required. To specify no parameters, or to keep all
1701
+ # the default parameter values, pass an empty Hash as a request object (see above).
1702
+ #
1703
+ # @param name [::String]
1704
+ # Required. The name of the private connectivity configuration to delete.
1705
+ # @param request_id [::String]
1706
+ # Optional. A request ID to identify requests. Specify a unique request ID
1707
+ # so that if you must retry your request, the server will know to ignore
1708
+ # the request if it has already been completed. The server will guarantee
1709
+ # that for at least 60 minutes after the first request.
1710
+ #
1711
+ # For example, consider a situation where you make an initial request and the
1712
+ # request times out. If you make the request again with the same request ID,
1713
+ # the server can check if original operation with the same request ID was
1714
+ # received, and if so, will ignore the second request. This prevents clients
1715
+ # from accidentally creating duplicate commitments.
1716
+ #
1717
+ # The request ID must be a valid UUID with the exception that zero UUID is
1718
+ # not supported (00000000-0000-0000-0000-000000000000).
1719
+ # @param force [::Boolean]
1720
+ # Optional. If set to true, any child routes that belong to this
1721
+ # PrivateConnection will also be deleted.
1722
+ # @yield [result, operation] Access the result along with the TransportOperation object
1723
+ # @yieldparam result [::Gapic::Operation]
1724
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1725
+ #
1726
+ # @return [::Gapic::Operation]
1727
+ #
1728
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1729
+ def delete_private_connection request, options = nil
1730
+ raise ::ArgumentError, "request must be provided" if request.nil?
1731
+
1732
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::DeletePrivateConnectionRequest
1733
+
1734
+ # Converts hash and nil to an options object
1735
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1736
+
1737
+ # Customize the options with defaults
1738
+ call_metadata = @config.rpcs.delete_private_connection.metadata.to_h
1739
+
1740
+ # Set x-goog-api-client and x-goog-user-project headers
1741
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1742
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1743
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
1744
+ transports_version_send: [:rest]
1745
+
1746
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1747
+
1748
+ options.apply_defaults timeout: @config.rpcs.delete_private_connection.timeout,
1749
+ metadata: call_metadata,
1750
+ retry_policy: @config.rpcs.delete_private_connection.retry_policy
1751
+
1752
+ options.apply_defaults timeout: @config.timeout,
1753
+ metadata: @config.metadata,
1754
+ retry_policy: @config.retry_policy
1755
+
1756
+ @datastream_stub.delete_private_connection request, options do |result, operation|
1757
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1758
+ yield result, operation if block_given?
1759
+ return result
1760
+ end
1761
+ rescue ::Gapic::Rest::Error => e
1762
+ raise ::Google::Cloud::Error.from_error(e)
1763
+ end
1764
+
1765
+ ##
1766
+ # Use this method to create a route for a private connectivity configuration
1767
+ # in a project and location.
1768
+ #
1769
+ # @overload create_route(request, options = nil)
1770
+ # Pass arguments to `create_route` via a request object, either of type
1771
+ # {::Google::Cloud::Datastream::V1::CreateRouteRequest} or an equivalent Hash.
1772
+ #
1773
+ # @param request [::Google::Cloud::Datastream::V1::CreateRouteRequest, ::Hash]
1774
+ # A request object representing the call parameters. Required. To specify no
1775
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1776
+ # @param options [::Gapic::CallOptions, ::Hash]
1777
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1778
+ #
1779
+ # @overload create_route(parent: nil, route_id: nil, route: nil, request_id: nil)
1780
+ # Pass arguments to `create_route` via keyword arguments. Note that at
1781
+ # least one keyword argument is required. To specify no parameters, or to keep all
1782
+ # the default parameter values, pass an empty Hash as a request object (see above).
1783
+ #
1784
+ # @param parent [::String]
1785
+ # Required. The parent that owns the collection of Routes.
1786
+ # @param route_id [::String]
1787
+ # Required. The Route identifier.
1788
+ # @param route [::Google::Cloud::Datastream::V1::Route, ::Hash]
1789
+ # Required. The Route resource to create.
1790
+ # @param request_id [::String]
1791
+ # Optional. A request ID to identify requests. Specify a unique request ID
1792
+ # so that if you must retry your request, the server will know to ignore
1793
+ # the request if it has already been completed. The server will guarantee
1794
+ # that for at least 60 minutes since the first request.
1795
+ #
1796
+ # For example, consider a situation where you make an initial request and the
1797
+ # request times out. If you make the request again with the same request ID,
1798
+ # the server can check if original operation with the same request ID was
1799
+ # received, and if so, will ignore the second request. This prevents clients
1800
+ # from accidentally creating duplicate commitments.
1801
+ #
1802
+ # The request ID must be a valid UUID with the exception that zero UUID is
1803
+ # not supported (00000000-0000-0000-0000-000000000000).
1804
+ # @yield [result, operation] Access the result along with the TransportOperation object
1805
+ # @yieldparam result [::Gapic::Operation]
1806
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1807
+ #
1808
+ # @return [::Gapic::Operation]
1809
+ #
1810
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1811
+ def create_route request, options = nil
1812
+ raise ::ArgumentError, "request must be provided" if request.nil?
1813
+
1814
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::CreateRouteRequest
1815
+
1816
+ # Converts hash and nil to an options object
1817
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1818
+
1819
+ # Customize the options with defaults
1820
+ call_metadata = @config.rpcs.create_route.metadata.to_h
1821
+
1822
+ # Set x-goog-api-client and x-goog-user-project headers
1823
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1824
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1825
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
1826
+ transports_version_send: [:rest]
1827
+
1828
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1829
+
1830
+ options.apply_defaults timeout: @config.rpcs.create_route.timeout,
1831
+ metadata: call_metadata,
1832
+ retry_policy: @config.rpcs.create_route.retry_policy
1833
+
1834
+ options.apply_defaults timeout: @config.timeout,
1835
+ metadata: @config.metadata,
1836
+ retry_policy: @config.retry_policy
1837
+
1838
+ @datastream_stub.create_route request, options do |result, operation|
1839
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1840
+ yield result, operation if block_given?
1841
+ return result
1842
+ end
1843
+ rescue ::Gapic::Rest::Error => e
1844
+ raise ::Google::Cloud::Error.from_error(e)
1845
+ end
1846
+
1847
+ ##
1848
+ # Use this method to get details about a route.
1849
+ #
1850
+ # @overload get_route(request, options = nil)
1851
+ # Pass arguments to `get_route` via a request object, either of type
1852
+ # {::Google::Cloud::Datastream::V1::GetRouteRequest} or an equivalent Hash.
1853
+ #
1854
+ # @param request [::Google::Cloud::Datastream::V1::GetRouteRequest, ::Hash]
1855
+ # A request object representing the call parameters. Required. To specify no
1856
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1857
+ # @param options [::Gapic::CallOptions, ::Hash]
1858
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1859
+ #
1860
+ # @overload get_route(name: nil)
1861
+ # Pass arguments to `get_route` via keyword arguments. Note that at
1862
+ # least one keyword argument is required. To specify no parameters, or to keep all
1863
+ # the default parameter values, pass an empty Hash as a request object (see above).
1864
+ #
1865
+ # @param name [::String]
1866
+ # Required. The name of the Route resource to get.
1867
+ # @yield [result, operation] Access the result along with the TransportOperation object
1868
+ # @yieldparam result [::Google::Cloud::Datastream::V1::Route]
1869
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1870
+ #
1871
+ # @return [::Google::Cloud::Datastream::V1::Route]
1872
+ #
1873
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1874
+ def get_route request, options = nil
1875
+ raise ::ArgumentError, "request must be provided" if request.nil?
1876
+
1877
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::GetRouteRequest
1878
+
1879
+ # Converts hash and nil to an options object
1880
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1881
+
1882
+ # Customize the options with defaults
1883
+ call_metadata = @config.rpcs.get_route.metadata.to_h
1884
+
1885
+ # Set x-goog-api-client and x-goog-user-project headers
1886
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1887
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1888
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
1889
+ transports_version_send: [:rest]
1890
+
1891
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1892
+
1893
+ options.apply_defaults timeout: @config.rpcs.get_route.timeout,
1894
+ metadata: call_metadata,
1895
+ retry_policy: @config.rpcs.get_route.retry_policy
1896
+
1897
+ options.apply_defaults timeout: @config.timeout,
1898
+ metadata: @config.metadata,
1899
+ retry_policy: @config.retry_policy
1900
+
1901
+ @datastream_stub.get_route request, options do |result, operation|
1902
+ yield result, operation if block_given?
1903
+ return result
1904
+ end
1905
+ rescue ::Gapic::Rest::Error => e
1906
+ raise ::Google::Cloud::Error.from_error(e)
1907
+ end
1908
+
1909
+ ##
1910
+ # Use this method to list routes created for a private connectivity
1911
+ # configuration in a project and location.
1912
+ #
1913
+ # @overload list_routes(request, options = nil)
1914
+ # Pass arguments to `list_routes` via a request object, either of type
1915
+ # {::Google::Cloud::Datastream::V1::ListRoutesRequest} or an equivalent Hash.
1916
+ #
1917
+ # @param request [::Google::Cloud::Datastream::V1::ListRoutesRequest, ::Hash]
1918
+ # A request object representing the call parameters. Required. To specify no
1919
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1920
+ # @param options [::Gapic::CallOptions, ::Hash]
1921
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1922
+ #
1923
+ # @overload list_routes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1924
+ # Pass arguments to `list_routes` via keyword arguments. Note that at
1925
+ # least one keyword argument is required. To specify no parameters, or to keep all
1926
+ # the default parameter values, pass an empty Hash as a request object (see above).
1927
+ #
1928
+ # @param parent [::String]
1929
+ # Required. The parent that owns the collection of Routess.
1930
+ # @param page_size [::Integer]
1931
+ # Maximum number of Routes to return. The service may return
1932
+ # fewer than this value. If unspecified, at most 50 Routes
1933
+ # will be returned. The maximum value is 1000; values above 1000 will be
1934
+ # coerced to 1000.
1935
+ # @param page_token [::String]
1936
+ # Page token received from a previous `ListRoutes` call.
1937
+ # Provide this to retrieve the subsequent page.
1938
+ #
1939
+ # When paginating, all other parameters provided to
1940
+ # `ListRoutes` must match the call that provided the page
1941
+ # token.
1942
+ # @param filter [::String]
1943
+ # Filter request.
1944
+ # @param order_by [::String]
1945
+ # Order by fields for the result.
1946
+ # @yield [result, operation] Access the result along with the TransportOperation object
1947
+ # @yieldparam result [::Google::Cloud::Datastream::V1::ListRoutesResponse]
1948
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1949
+ #
1950
+ # @return [::Google::Cloud::Datastream::V1::ListRoutesResponse]
1951
+ #
1952
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1953
+ def list_routes request, options = nil
1954
+ raise ::ArgumentError, "request must be provided" if request.nil?
1955
+
1956
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::ListRoutesRequest
1957
+
1958
+ # Converts hash and nil to an options object
1959
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1960
+
1961
+ # Customize the options with defaults
1962
+ call_metadata = @config.rpcs.list_routes.metadata.to_h
1963
+
1964
+ # Set x-goog-api-client and x-goog-user-project headers
1965
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1966
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1967
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
1968
+ transports_version_send: [:rest]
1969
+
1970
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1971
+
1972
+ options.apply_defaults timeout: @config.rpcs.list_routes.timeout,
1973
+ metadata: call_metadata,
1974
+ retry_policy: @config.rpcs.list_routes.retry_policy
1975
+
1976
+ options.apply_defaults timeout: @config.timeout,
1977
+ metadata: @config.metadata,
1978
+ retry_policy: @config.retry_policy
1979
+
1980
+ @datastream_stub.list_routes request, options do |result, operation|
1981
+ yield result, operation if block_given?
1982
+ return result
1983
+ end
1984
+ rescue ::Gapic::Rest::Error => e
1985
+ raise ::Google::Cloud::Error.from_error(e)
1986
+ end
1987
+
1988
+ ##
1989
+ # Use this method to delete a route.
1990
+ #
1991
+ # @overload delete_route(request, options = nil)
1992
+ # Pass arguments to `delete_route` via a request object, either of type
1993
+ # {::Google::Cloud::Datastream::V1::DeleteRouteRequest} or an equivalent Hash.
1994
+ #
1995
+ # @param request [::Google::Cloud::Datastream::V1::DeleteRouteRequest, ::Hash]
1996
+ # A request object representing the call parameters. Required. To specify no
1997
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1998
+ # @param options [::Gapic::CallOptions, ::Hash]
1999
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2000
+ #
2001
+ # @overload delete_route(name: nil, request_id: nil)
2002
+ # Pass arguments to `delete_route` via keyword arguments. Note that at
2003
+ # least one keyword argument is required. To specify no parameters, or to keep all
2004
+ # the default parameter values, pass an empty Hash as a request object (see above).
2005
+ #
2006
+ # @param name [::String]
2007
+ # Required. The name of the Route resource to delete.
2008
+ # @param request_id [::String]
2009
+ # Optional. A request ID to identify requests. Specify a unique request ID
2010
+ # so that if you must retry your request, the server will know to ignore
2011
+ # the request if it has already been completed. The server will guarantee
2012
+ # that for at least 60 minutes after the first request.
2013
+ #
2014
+ # For example, consider a situation where you make an initial request and the
2015
+ # request times out. If you make the request again with the same request ID,
2016
+ # the server can check if original operation with the same request ID was
2017
+ # received, and if so, will ignore the second request. This prevents clients
2018
+ # from accidentally creating duplicate commitments.
2019
+ #
2020
+ # The request ID must be a valid UUID with the exception that zero UUID is
2021
+ # not supported (00000000-0000-0000-0000-000000000000).
2022
+ # @yield [result, operation] Access the result along with the TransportOperation object
2023
+ # @yieldparam result [::Gapic::Operation]
2024
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2025
+ #
2026
+ # @return [::Gapic::Operation]
2027
+ #
2028
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2029
+ def delete_route request, options = nil
2030
+ raise ::ArgumentError, "request must be provided" if request.nil?
2031
+
2032
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::DeleteRouteRequest
2033
+
2034
+ # Converts hash and nil to an options object
2035
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2036
+
2037
+ # Customize the options with defaults
2038
+ call_metadata = @config.rpcs.delete_route.metadata.to_h
2039
+
2040
+ # Set x-goog-api-client and x-goog-user-project headers
2041
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2042
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2043
+ gapic_version: ::Google::Cloud::Datastream::V1::VERSION,
2044
+ transports_version_send: [:rest]
2045
+
2046
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2047
+
2048
+ options.apply_defaults timeout: @config.rpcs.delete_route.timeout,
2049
+ metadata: call_metadata,
2050
+ retry_policy: @config.rpcs.delete_route.retry_policy
2051
+
2052
+ options.apply_defaults timeout: @config.timeout,
2053
+ metadata: @config.metadata,
2054
+ retry_policy: @config.retry_policy
2055
+
2056
+ @datastream_stub.delete_route request, options do |result, operation|
2057
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2058
+ yield result, operation if block_given?
2059
+ return result
2060
+ end
2061
+ rescue ::Gapic::Rest::Error => e
2062
+ raise ::Google::Cloud::Error.from_error(e)
2063
+ end
2064
+
2065
+ ##
2066
+ # Configuration class for the Datastream REST API.
2067
+ #
2068
+ # This class represents the configuration for Datastream REST,
2069
+ # providing control over timeouts, retry behavior, logging, transport
2070
+ # parameters, and other low-level controls. Certain parameters can also be
2071
+ # applied individually to specific RPCs. See
2072
+ # {::Google::Cloud::Datastream::V1::Datastream::Rest::Client::Configuration::Rpcs}
2073
+ # for a list of RPCs that can be configured independently.
2074
+ #
2075
+ # Configuration can be applied globally to all clients, or to a single client
2076
+ # on construction.
2077
+ #
2078
+ # @example
2079
+ #
2080
+ # # Modify the global config, setting the timeout for
2081
+ # # list_connection_profiles to 20 seconds,
2082
+ # # and all remaining timeouts to 10 seconds.
2083
+ # ::Google::Cloud::Datastream::V1::Datastream::Rest::Client.configure do |config|
2084
+ # config.timeout = 10.0
2085
+ # config.rpcs.list_connection_profiles.timeout = 20.0
2086
+ # end
2087
+ #
2088
+ # # Apply the above configuration only to a new client.
2089
+ # client = ::Google::Cloud::Datastream::V1::Datastream::Rest::Client.new do |config|
2090
+ # config.timeout = 10.0
2091
+ # config.rpcs.list_connection_profiles.timeout = 20.0
2092
+ # end
2093
+ #
2094
+ # @!attribute [rw] endpoint
2095
+ # The hostname or hostname:port of the service endpoint.
2096
+ # Defaults to `"datastream.googleapis.com"`.
2097
+ # @return [::String]
2098
+ # @!attribute [rw] credentials
2099
+ # Credentials to send with calls. You may provide any of the following types:
2100
+ # * (`String`) The path to a service account key file in JSON format
2101
+ # * (`Hash`) A service account key as a Hash
2102
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
2103
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
2104
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
2105
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
2106
+ # * (`nil`) indicating no credentials
2107
+ # @return [::Object]
2108
+ # @!attribute [rw] scope
2109
+ # The OAuth scopes
2110
+ # @return [::Array<::String>]
2111
+ # @!attribute [rw] lib_name
2112
+ # The library name as recorded in instrumentation and logging
2113
+ # @return [::String]
2114
+ # @!attribute [rw] lib_version
2115
+ # The library version as recorded in instrumentation and logging
2116
+ # @return [::String]
2117
+ # @!attribute [rw] timeout
2118
+ # The call timeout in seconds.
2119
+ # @return [::Numeric]
2120
+ # @!attribute [rw] metadata
2121
+ # Additional headers to be sent with the call.
2122
+ # @return [::Hash{::Symbol=>::String}]
2123
+ # @!attribute [rw] retry_policy
2124
+ # The retry policy. The value is a hash with the following keys:
2125
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2126
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2127
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2128
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2129
+ # trigger a retry.
2130
+ # @return [::Hash]
2131
+ # @!attribute [rw] quota_project
2132
+ # A separate project against which to charge quota.
2133
+ # @return [::String]
2134
+ #
2135
+ class Configuration
2136
+ extend ::Gapic::Config
2137
+
2138
+ DEFAULT_ENDPOINT = "datastream.googleapis.com"
2139
+
2140
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
2141
+ config_attr :credentials, nil do |value|
2142
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
2143
+ allowed.any? { |klass| klass === value }
2144
+ end
2145
+ config_attr :scope, nil, ::String, ::Array, nil
2146
+ config_attr :lib_name, nil, ::String, nil
2147
+ config_attr :lib_version, nil, ::String, nil
2148
+ config_attr :timeout, nil, ::Numeric, nil
2149
+ config_attr :metadata, nil, ::Hash, nil
2150
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2151
+ config_attr :quota_project, nil, ::String, nil
2152
+
2153
+ # @private
2154
+ # Overrides for http bindings for the RPCs of this service
2155
+ # are only used when this service is used as mixin, and only
2156
+ # by the host service.
2157
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
2158
+ config_attr :bindings_override, {}, ::Hash, nil
2159
+
2160
+ # @private
2161
+ def initialize parent_config = nil
2162
+ @parent_config = parent_config unless parent_config.nil?
2163
+
2164
+ yield self if block_given?
2165
+ end
2166
+
2167
+ ##
2168
+ # Configurations for individual RPCs
2169
+ # @return [Rpcs]
2170
+ #
2171
+ def rpcs
2172
+ @rpcs ||= begin
2173
+ parent_rpcs = nil
2174
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
2175
+ Rpcs.new parent_rpcs
2176
+ end
2177
+ end
2178
+
2179
+ ##
2180
+ # Configuration RPC class for the Datastream API.
2181
+ #
2182
+ # Includes fields providing the configuration for each RPC in this service.
2183
+ # Each configuration object is of type `Gapic::Config::Method` and includes
2184
+ # the following configuration fields:
2185
+ #
2186
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
2187
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
2188
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
2189
+ # include the following keys:
2190
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2191
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2192
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2193
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2194
+ # trigger a retry.
2195
+ #
2196
+ class Rpcs
2197
+ ##
2198
+ # RPC-specific configuration for `list_connection_profiles`
2199
+ # @return [::Gapic::Config::Method]
2200
+ #
2201
+ attr_reader :list_connection_profiles
2202
+ ##
2203
+ # RPC-specific configuration for `get_connection_profile`
2204
+ # @return [::Gapic::Config::Method]
2205
+ #
2206
+ attr_reader :get_connection_profile
2207
+ ##
2208
+ # RPC-specific configuration for `create_connection_profile`
2209
+ # @return [::Gapic::Config::Method]
2210
+ #
2211
+ attr_reader :create_connection_profile
2212
+ ##
2213
+ # RPC-specific configuration for `update_connection_profile`
2214
+ # @return [::Gapic::Config::Method]
2215
+ #
2216
+ attr_reader :update_connection_profile
2217
+ ##
2218
+ # RPC-specific configuration for `delete_connection_profile`
2219
+ # @return [::Gapic::Config::Method]
2220
+ #
2221
+ attr_reader :delete_connection_profile
2222
+ ##
2223
+ # RPC-specific configuration for `discover_connection_profile`
2224
+ # @return [::Gapic::Config::Method]
2225
+ #
2226
+ attr_reader :discover_connection_profile
2227
+ ##
2228
+ # RPC-specific configuration for `list_streams`
2229
+ # @return [::Gapic::Config::Method]
2230
+ #
2231
+ attr_reader :list_streams
2232
+ ##
2233
+ # RPC-specific configuration for `get_stream`
2234
+ # @return [::Gapic::Config::Method]
2235
+ #
2236
+ attr_reader :get_stream
2237
+ ##
2238
+ # RPC-specific configuration for `create_stream`
2239
+ # @return [::Gapic::Config::Method]
2240
+ #
2241
+ attr_reader :create_stream
2242
+ ##
2243
+ # RPC-specific configuration for `update_stream`
2244
+ # @return [::Gapic::Config::Method]
2245
+ #
2246
+ attr_reader :update_stream
2247
+ ##
2248
+ # RPC-specific configuration for `delete_stream`
2249
+ # @return [::Gapic::Config::Method]
2250
+ #
2251
+ attr_reader :delete_stream
2252
+ ##
2253
+ # RPC-specific configuration for `get_stream_object`
2254
+ # @return [::Gapic::Config::Method]
2255
+ #
2256
+ attr_reader :get_stream_object
2257
+ ##
2258
+ # RPC-specific configuration for `lookup_stream_object`
2259
+ # @return [::Gapic::Config::Method]
2260
+ #
2261
+ attr_reader :lookup_stream_object
2262
+ ##
2263
+ # RPC-specific configuration for `list_stream_objects`
2264
+ # @return [::Gapic::Config::Method]
2265
+ #
2266
+ attr_reader :list_stream_objects
2267
+ ##
2268
+ # RPC-specific configuration for `start_backfill_job`
2269
+ # @return [::Gapic::Config::Method]
2270
+ #
2271
+ attr_reader :start_backfill_job
2272
+ ##
2273
+ # RPC-specific configuration for `stop_backfill_job`
2274
+ # @return [::Gapic::Config::Method]
2275
+ #
2276
+ attr_reader :stop_backfill_job
2277
+ ##
2278
+ # RPC-specific configuration for `fetch_static_ips`
2279
+ # @return [::Gapic::Config::Method]
2280
+ #
2281
+ attr_reader :fetch_static_ips
2282
+ ##
2283
+ # RPC-specific configuration for `create_private_connection`
2284
+ # @return [::Gapic::Config::Method]
2285
+ #
2286
+ attr_reader :create_private_connection
2287
+ ##
2288
+ # RPC-specific configuration for `get_private_connection`
2289
+ # @return [::Gapic::Config::Method]
2290
+ #
2291
+ attr_reader :get_private_connection
2292
+ ##
2293
+ # RPC-specific configuration for `list_private_connections`
2294
+ # @return [::Gapic::Config::Method]
2295
+ #
2296
+ attr_reader :list_private_connections
2297
+ ##
2298
+ # RPC-specific configuration for `delete_private_connection`
2299
+ # @return [::Gapic::Config::Method]
2300
+ #
2301
+ attr_reader :delete_private_connection
2302
+ ##
2303
+ # RPC-specific configuration for `create_route`
2304
+ # @return [::Gapic::Config::Method]
2305
+ #
2306
+ attr_reader :create_route
2307
+ ##
2308
+ # RPC-specific configuration for `get_route`
2309
+ # @return [::Gapic::Config::Method]
2310
+ #
2311
+ attr_reader :get_route
2312
+ ##
2313
+ # RPC-specific configuration for `list_routes`
2314
+ # @return [::Gapic::Config::Method]
2315
+ #
2316
+ attr_reader :list_routes
2317
+ ##
2318
+ # RPC-specific configuration for `delete_route`
2319
+ # @return [::Gapic::Config::Method]
2320
+ #
2321
+ attr_reader :delete_route
2322
+
2323
+ # @private
2324
+ def initialize parent_rpcs = nil
2325
+ list_connection_profiles_config = parent_rpcs.list_connection_profiles if parent_rpcs.respond_to? :list_connection_profiles
2326
+ @list_connection_profiles = ::Gapic::Config::Method.new list_connection_profiles_config
2327
+ get_connection_profile_config = parent_rpcs.get_connection_profile if parent_rpcs.respond_to? :get_connection_profile
2328
+ @get_connection_profile = ::Gapic::Config::Method.new get_connection_profile_config
2329
+ create_connection_profile_config = parent_rpcs.create_connection_profile if parent_rpcs.respond_to? :create_connection_profile
2330
+ @create_connection_profile = ::Gapic::Config::Method.new create_connection_profile_config
2331
+ update_connection_profile_config = parent_rpcs.update_connection_profile if parent_rpcs.respond_to? :update_connection_profile
2332
+ @update_connection_profile = ::Gapic::Config::Method.new update_connection_profile_config
2333
+ delete_connection_profile_config = parent_rpcs.delete_connection_profile if parent_rpcs.respond_to? :delete_connection_profile
2334
+ @delete_connection_profile = ::Gapic::Config::Method.new delete_connection_profile_config
2335
+ discover_connection_profile_config = parent_rpcs.discover_connection_profile if parent_rpcs.respond_to? :discover_connection_profile
2336
+ @discover_connection_profile = ::Gapic::Config::Method.new discover_connection_profile_config
2337
+ list_streams_config = parent_rpcs.list_streams if parent_rpcs.respond_to? :list_streams
2338
+ @list_streams = ::Gapic::Config::Method.new list_streams_config
2339
+ get_stream_config = parent_rpcs.get_stream if parent_rpcs.respond_to? :get_stream
2340
+ @get_stream = ::Gapic::Config::Method.new get_stream_config
2341
+ create_stream_config = parent_rpcs.create_stream if parent_rpcs.respond_to? :create_stream
2342
+ @create_stream = ::Gapic::Config::Method.new create_stream_config
2343
+ update_stream_config = parent_rpcs.update_stream if parent_rpcs.respond_to? :update_stream
2344
+ @update_stream = ::Gapic::Config::Method.new update_stream_config
2345
+ delete_stream_config = parent_rpcs.delete_stream if parent_rpcs.respond_to? :delete_stream
2346
+ @delete_stream = ::Gapic::Config::Method.new delete_stream_config
2347
+ get_stream_object_config = parent_rpcs.get_stream_object if parent_rpcs.respond_to? :get_stream_object
2348
+ @get_stream_object = ::Gapic::Config::Method.new get_stream_object_config
2349
+ lookup_stream_object_config = parent_rpcs.lookup_stream_object if parent_rpcs.respond_to? :lookup_stream_object
2350
+ @lookup_stream_object = ::Gapic::Config::Method.new lookup_stream_object_config
2351
+ list_stream_objects_config = parent_rpcs.list_stream_objects if parent_rpcs.respond_to? :list_stream_objects
2352
+ @list_stream_objects = ::Gapic::Config::Method.new list_stream_objects_config
2353
+ start_backfill_job_config = parent_rpcs.start_backfill_job if parent_rpcs.respond_to? :start_backfill_job
2354
+ @start_backfill_job = ::Gapic::Config::Method.new start_backfill_job_config
2355
+ stop_backfill_job_config = parent_rpcs.stop_backfill_job if parent_rpcs.respond_to? :stop_backfill_job
2356
+ @stop_backfill_job = ::Gapic::Config::Method.new stop_backfill_job_config
2357
+ fetch_static_ips_config = parent_rpcs.fetch_static_ips if parent_rpcs.respond_to? :fetch_static_ips
2358
+ @fetch_static_ips = ::Gapic::Config::Method.new fetch_static_ips_config
2359
+ create_private_connection_config = parent_rpcs.create_private_connection if parent_rpcs.respond_to? :create_private_connection
2360
+ @create_private_connection = ::Gapic::Config::Method.new create_private_connection_config
2361
+ get_private_connection_config = parent_rpcs.get_private_connection if parent_rpcs.respond_to? :get_private_connection
2362
+ @get_private_connection = ::Gapic::Config::Method.new get_private_connection_config
2363
+ list_private_connections_config = parent_rpcs.list_private_connections if parent_rpcs.respond_to? :list_private_connections
2364
+ @list_private_connections = ::Gapic::Config::Method.new list_private_connections_config
2365
+ delete_private_connection_config = parent_rpcs.delete_private_connection if parent_rpcs.respond_to? :delete_private_connection
2366
+ @delete_private_connection = ::Gapic::Config::Method.new delete_private_connection_config
2367
+ create_route_config = parent_rpcs.create_route if parent_rpcs.respond_to? :create_route
2368
+ @create_route = ::Gapic::Config::Method.new create_route_config
2369
+ get_route_config = parent_rpcs.get_route if parent_rpcs.respond_to? :get_route
2370
+ @get_route = ::Gapic::Config::Method.new get_route_config
2371
+ list_routes_config = parent_rpcs.list_routes if parent_rpcs.respond_to? :list_routes
2372
+ @list_routes = ::Gapic::Config::Method.new list_routes_config
2373
+ delete_route_config = parent_rpcs.delete_route if parent_rpcs.respond_to? :delete_route
2374
+ @delete_route = ::Gapic::Config::Method.new delete_route_config
2375
+
2376
+ yield self if block_given?
2377
+ end
2378
+ end
2379
+ end
2380
+ end
2381
+ end
2382
+ end
2383
+ end
2384
+ end
2385
+ end
2386
+ end