google-cloud-datastream-v1alpha1 0.2.0 → 0.3.0

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