google-cloud-network_connectivity-v1beta 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/network_connectivity/v1beta/bindings_override.rb +180 -0
  3. data/lib/google/cloud/network_connectivity/v1beta/data_transfer_service/rest/client.rb +1666 -0
  4. data/lib/google/cloud/network_connectivity/v1beta/data_transfer_service/rest/operations.rb +927 -0
  5. data/lib/google/cloud/network_connectivity/v1beta/data_transfer_service/rest/service_stub.rb +817 -0
  6. data/lib/google/cloud/network_connectivity/v1beta/data_transfer_service/rest.rb +54 -0
  7. data/lib/google/cloud/network_connectivity/v1beta/data_transfer_service.rb +6 -0
  8. data/lib/google/cloud/network_connectivity/v1beta/hub_service/rest/client.rb +3353 -0
  9. data/lib/google/cloud/network_connectivity/v1beta/hub_service/rest/operations.rb +927 -0
  10. data/lib/google/cloud/network_connectivity/v1beta/hub_service/rest/service_stub.rb +1800 -0
  11. data/lib/google/cloud/network_connectivity/v1beta/hub_service/rest.rb +56 -0
  12. data/lib/google/cloud/network_connectivity/v1beta/hub_service.rb +6 -0
  13. data/lib/google/cloud/network_connectivity/v1beta/policy_based_routing_service/rest/client.rb +817 -0
  14. data/lib/google/cloud/network_connectivity/v1beta/policy_based_routing_service/rest/operations.rb +927 -0
  15. data/lib/google/cloud/network_connectivity/v1beta/policy_based_routing_service/rest/service_stub.rb +326 -0
  16. data/lib/google/cloud/network_connectivity/v1beta/policy_based_routing_service/rest.rb +55 -0
  17. data/lib/google/cloud/network_connectivity/v1beta/policy_based_routing_service.rb +6 -0
  18. data/lib/google/cloud/network_connectivity/v1beta/rest.rb +41 -0
  19. data/lib/google/cloud/network_connectivity/v1beta/transport_manager/rest/client.rb +1287 -0
  20. data/lib/google/cloud/network_connectivity/v1beta/transport_manager/rest/operations.rb +927 -0
  21. data/lib/google/cloud/network_connectivity/v1beta/transport_manager/rest/service_stub.rb +632 -0
  22. data/lib/google/cloud/network_connectivity/v1beta/transport_manager/rest.rb +54 -0
  23. data/lib/google/cloud/network_connectivity/v1beta/transport_manager.rb +6 -0
  24. data/lib/google/cloud/network_connectivity/v1beta/version.rb +1 -1
  25. data/lib/google/cloud/network_connectivity/v1beta.rb +5 -0
  26. data/proto_docs/google/protobuf/timestamp.rb +7 -6
  27. metadata +19 -2
  28. data/proto_docs/google/type/expr.rb +0 -75
@@ -0,0 +1,1666 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 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/networkconnectivity/v1beta/data_transfer_pb"
21
+ require "google/cloud/network_connectivity/v1beta/data_transfer_service/rest/service_stub"
22
+ require "google/cloud/location/rest"
23
+ require "google/iam/v1/rest"
24
+
25
+ module Google
26
+ module Cloud
27
+ module NetworkConnectivity
28
+ module V1beta
29
+ module DataTransferService
30
+ module Rest
31
+ ##
32
+ # REST client for the DataTransferService service.
33
+ #
34
+ # DataTransferService is the service for the Data Transfer API.
35
+ #
36
+ class Client
37
+ # @private
38
+ API_VERSION = ""
39
+
40
+ # @private
41
+ DEFAULT_ENDPOINT_TEMPLATE = "networkconnectivity.$UNIVERSE_DOMAIN$"
42
+
43
+ include Paths
44
+
45
+ # @private
46
+ attr_reader :data_transfer_service_stub
47
+
48
+ ##
49
+ # Configure the DataTransferService Client class.
50
+ #
51
+ # See {::Google::Cloud::NetworkConnectivity::V1beta::DataTransferService::Rest::Client::Configuration}
52
+ # for a description of the configuration fields.
53
+ #
54
+ # @example
55
+ #
56
+ # # Modify the configuration for all DataTransferService clients
57
+ # ::Google::Cloud::NetworkConnectivity::V1beta::DataTransferService::Rest::Client.configure do |config|
58
+ # config.timeout = 10.0
59
+ # end
60
+ #
61
+ # @yield [config] Configure the Client client.
62
+ # @yieldparam config [Client::Configuration]
63
+ #
64
+ # @return [Client::Configuration]
65
+ #
66
+ def self.configure
67
+ @configure ||= begin
68
+ namespace = ["Google", "Cloud", "NetworkConnectivity", "V1beta"]
69
+ parent_config = while namespace.any?
70
+ parent_name = namespace.join "::"
71
+ parent_const = const_get parent_name
72
+ break parent_const.configure if parent_const.respond_to? :configure
73
+ namespace.pop
74
+ end
75
+ default_config = Client::Configuration.new parent_config
76
+
77
+ default_config.timeout = 60.0
78
+ default_config.retry_policy = {
79
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
80
+ }
81
+
82
+ default_config.rpcs.list_multicloud_data_transfer_configs.timeout = 60.0
83
+
84
+ default_config.rpcs.get_multicloud_data_transfer_config.timeout = 60.0
85
+
86
+ default_config.rpcs.create_multicloud_data_transfer_config.timeout = 60.0
87
+
88
+ default_config.rpcs.update_multicloud_data_transfer_config.timeout = 60.0
89
+
90
+ default_config.rpcs.delete_multicloud_data_transfer_config.timeout = 60.0
91
+
92
+ default_config.rpcs.list_destinations.timeout = 60.0
93
+
94
+ default_config.rpcs.get_destination.timeout = 60.0
95
+
96
+ default_config.rpcs.create_destination.timeout = 60.0
97
+
98
+ default_config.rpcs.update_destination.timeout = 60.0
99
+
100
+ default_config.rpcs.delete_destination.timeout = 60.0
101
+
102
+ default_config.rpcs.get_multicloud_data_transfer_supported_service.timeout = 60.0
103
+
104
+ default_config.rpcs.list_multicloud_data_transfer_supported_services.timeout = 60.0
105
+
106
+ default_config
107
+ end
108
+ yield @configure if block_given?
109
+ @configure
110
+ end
111
+
112
+ ##
113
+ # Configure the DataTransferService Client instance.
114
+ #
115
+ # The configuration is set to the derived mode, meaning that values can be changed,
116
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
117
+ # should be made on {Client.configure}.
118
+ #
119
+ # See {::Google::Cloud::NetworkConnectivity::V1beta::DataTransferService::Rest::Client::Configuration}
120
+ # for a description of the configuration fields.
121
+ #
122
+ # @yield [config] Configure the Client client.
123
+ # @yieldparam config [Client::Configuration]
124
+ #
125
+ # @return [Client::Configuration]
126
+ #
127
+ def configure
128
+ yield @config if block_given?
129
+ @config
130
+ end
131
+
132
+ ##
133
+ # The effective universe domain
134
+ #
135
+ # @return [String]
136
+ #
137
+ def universe_domain
138
+ @data_transfer_service_stub.universe_domain
139
+ end
140
+
141
+ ##
142
+ # Create a new DataTransferService REST client object.
143
+ #
144
+ # @example
145
+ #
146
+ # # Create a client using the default configuration
147
+ # client = ::Google::Cloud::NetworkConnectivity::V1beta::DataTransferService::Rest::Client.new
148
+ #
149
+ # # Create a client using a custom configuration
150
+ # client = ::Google::Cloud::NetworkConnectivity::V1beta::DataTransferService::Rest::Client.new do |config|
151
+ # config.timeout = 10.0
152
+ # end
153
+ #
154
+ # @yield [config] Configure the DataTransferService client.
155
+ # @yieldparam config [Client::Configuration]
156
+ #
157
+ def initialize
158
+ # Create the configuration object
159
+ @config = Configuration.new Client.configure
160
+
161
+ # Yield the configuration if needed
162
+ yield @config if block_given?
163
+
164
+ # Create credentials
165
+ credentials = @config.credentials
166
+ # Use self-signed JWT if the endpoint is unchanged from default,
167
+ # but only if the default endpoint does not have a region prefix.
168
+ enable_self_signed_jwt = @config.endpoint.nil? ||
169
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
170
+ !@config.endpoint.split(".").first.include?("-"))
171
+ credentials ||= Credentials.default scope: @config.scope,
172
+ enable_self_signed_jwt: enable_self_signed_jwt
173
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
174
+ credentials = Credentials.new credentials, scope: @config.scope
175
+ end
176
+
177
+ @quota_project_id = @config.quota_project
178
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
179
+
180
+ @operations_client = ::Google::Cloud::NetworkConnectivity::V1beta::DataTransferService::Rest::Operations.new do |config|
181
+ config.credentials = credentials
182
+ config.quota_project = @quota_project_id
183
+ config.endpoint = @config.endpoint
184
+ config.universe_domain = @config.universe_domain
185
+ end
186
+
187
+ @data_transfer_service_stub = ::Google::Cloud::NetworkConnectivity::V1beta::DataTransferService::Rest::ServiceStub.new(
188
+ endpoint: @config.endpoint,
189
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
190
+ universe_domain: @config.universe_domain,
191
+ credentials: credentials,
192
+ logger: @config.logger
193
+ )
194
+
195
+ @data_transfer_service_stub.logger(stub: true)&.info do |entry|
196
+ entry.set_system_name
197
+ entry.set_service
198
+ entry.message = "Created client for #{entry.service}"
199
+ entry.set_credentials_fields credentials
200
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
201
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
202
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
203
+ end
204
+
205
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
206
+ config.credentials = credentials
207
+ config.quota_project = @quota_project_id
208
+ config.endpoint = @data_transfer_service_stub.endpoint
209
+ config.universe_domain = @data_transfer_service_stub.universe_domain
210
+ config.bindings_override = @config.bindings_override
211
+ config.logger = @data_transfer_service_stub.logger if config.respond_to? :logger=
212
+ end
213
+
214
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
215
+ config.credentials = credentials
216
+ config.quota_project = @quota_project_id
217
+ config.endpoint = @data_transfer_service_stub.endpoint
218
+ config.universe_domain = @data_transfer_service_stub.universe_domain
219
+ config.bindings_override = @config.bindings_override
220
+ config.logger = @data_transfer_service_stub.logger if config.respond_to? :logger=
221
+ end
222
+ end
223
+
224
+ ##
225
+ # Get the associated client for long-running operations.
226
+ #
227
+ # @return [::Google::Cloud::NetworkConnectivity::V1beta::DataTransferService::Rest::Operations]
228
+ #
229
+ attr_reader :operations_client
230
+
231
+ ##
232
+ # Get the associated client for mix-in of the Locations.
233
+ #
234
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
235
+ #
236
+ attr_reader :location_client
237
+
238
+ ##
239
+ # Get the associated client for mix-in of the IAMPolicy.
240
+ #
241
+ # @return [Google::Iam::V1::IAMPolicy::Rest::Client]
242
+ #
243
+ attr_reader :iam_policy_client
244
+
245
+ ##
246
+ # The logger used for request/response debug logging.
247
+ #
248
+ # @return [Logger]
249
+ #
250
+ def logger
251
+ @data_transfer_service_stub.logger
252
+ end
253
+
254
+ # Service calls
255
+
256
+ ##
257
+ # Lists the `MulticloudDataTransferConfig` resources in a specified project
258
+ # and location.
259
+ #
260
+ # @overload list_multicloud_data_transfer_configs(request, options = nil)
261
+ # Pass arguments to `list_multicloud_data_transfer_configs` via a request object, either of type
262
+ # {::Google::Cloud::NetworkConnectivity::V1beta::ListMulticloudDataTransferConfigsRequest} or an equivalent Hash.
263
+ #
264
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::ListMulticloudDataTransferConfigsRequest, ::Hash]
265
+ # A request object representing the call parameters. Required. To specify no
266
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
267
+ # @param options [::Gapic::CallOptions, ::Hash]
268
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
269
+ #
270
+ # @overload list_multicloud_data_transfer_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, return_partial_success: nil)
271
+ # Pass arguments to `list_multicloud_data_transfer_configs` via keyword arguments. Note that at
272
+ # least one keyword argument is required. To specify no parameters, or to keep all
273
+ # the default parameter values, pass an empty Hash as a request object (see above).
274
+ #
275
+ # @param parent [::String]
276
+ # Required. The name of the parent resource.
277
+ # @param page_size [::Integer]
278
+ # Optional. The maximum number of results listed per page.
279
+ # @param page_token [::String]
280
+ # Optional. The page token.
281
+ # @param filter [::String]
282
+ # Optional. An expression that filters the results listed in the response.
283
+ # @param order_by [::String]
284
+ # Optional. The sort order of the results.
285
+ # @param return_partial_success [::Boolean]
286
+ # Optional. If `true`, allows partial responses for multi-regional aggregated
287
+ # list requests.
288
+ # @yield [result, operation] Access the result along with the TransportOperation object
289
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::MulticloudDataTransferConfig>]
290
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
291
+ #
292
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::MulticloudDataTransferConfig>]
293
+ #
294
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
295
+ #
296
+ # @example Basic example
297
+ # require "google/cloud/network_connectivity/v1beta"
298
+ #
299
+ # # Create a client object. The client can be reused for multiple calls.
300
+ # client = Google::Cloud::NetworkConnectivity::V1beta::DataTransferService::Rest::Client.new
301
+ #
302
+ # # Create a request. To set request fields, pass in keyword arguments.
303
+ # request = Google::Cloud::NetworkConnectivity::V1beta::ListMulticloudDataTransferConfigsRequest.new
304
+ #
305
+ # # Call the list_multicloud_data_transfer_configs method.
306
+ # result = client.list_multicloud_data_transfer_configs request
307
+ #
308
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
309
+ # # over elements, and API calls will be issued to fetch pages as needed.
310
+ # result.each do |item|
311
+ # # Each element is of type ::Google::Cloud::NetworkConnectivity::V1beta::MulticloudDataTransferConfig.
312
+ # p item
313
+ # end
314
+ #
315
+ def list_multicloud_data_transfer_configs request, options = nil
316
+ raise ::ArgumentError, "request must be provided" if request.nil?
317
+
318
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::ListMulticloudDataTransferConfigsRequest
319
+
320
+ # Converts hash and nil to an options object
321
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
322
+
323
+ # Customize the options with defaults
324
+ call_metadata = @config.rpcs.list_multicloud_data_transfer_configs.metadata.to_h
325
+
326
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
327
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
328
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
329
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
330
+ transports_version_send: [:rest]
331
+
332
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
333
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
334
+
335
+ options.apply_defaults timeout: @config.rpcs.list_multicloud_data_transfer_configs.timeout,
336
+ metadata: call_metadata,
337
+ retry_policy: @config.rpcs.list_multicloud_data_transfer_configs.retry_policy
338
+
339
+ options.apply_defaults timeout: @config.timeout,
340
+ metadata: @config.metadata,
341
+ retry_policy: @config.retry_policy
342
+
343
+ @data_transfer_service_stub.list_multicloud_data_transfer_configs request, options do |result, operation|
344
+ result = ::Gapic::Rest::PagedEnumerable.new @data_transfer_service_stub, :list_multicloud_data_transfer_configs, "multicloud_data_transfer_configs", request, result, options
345
+ yield result, operation if block_given?
346
+ throw :response, result
347
+ end
348
+ rescue ::Gapic::Rest::Error => e
349
+ raise ::Google::Cloud::Error.from_error(e)
350
+ end
351
+
352
+ ##
353
+ # Gets the details of a `MulticloudDataTransferConfig` resource.
354
+ #
355
+ # @overload get_multicloud_data_transfer_config(request, options = nil)
356
+ # Pass arguments to `get_multicloud_data_transfer_config` via a request object, either of type
357
+ # {::Google::Cloud::NetworkConnectivity::V1beta::GetMulticloudDataTransferConfigRequest} or an equivalent Hash.
358
+ #
359
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::GetMulticloudDataTransferConfigRequest, ::Hash]
360
+ # A request object representing the call parameters. Required. To specify no
361
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
362
+ # @param options [::Gapic::CallOptions, ::Hash]
363
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
364
+ #
365
+ # @overload get_multicloud_data_transfer_config(name: nil)
366
+ # Pass arguments to `get_multicloud_data_transfer_config` via keyword arguments. Note that at
367
+ # least one keyword argument is required. To specify no parameters, or to keep all
368
+ # the default parameter values, pass an empty Hash as a request object (see above).
369
+ #
370
+ # @param name [::String]
371
+ # Required. The name of the `MulticloudDataTransferConfig` resource to get.
372
+ # @yield [result, operation] Access the result along with the TransportOperation object
373
+ # @yieldparam result [::Google::Cloud::NetworkConnectivity::V1beta::MulticloudDataTransferConfig]
374
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
375
+ #
376
+ # @return [::Google::Cloud::NetworkConnectivity::V1beta::MulticloudDataTransferConfig]
377
+ #
378
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
379
+ #
380
+ # @example Basic example
381
+ # require "google/cloud/network_connectivity/v1beta"
382
+ #
383
+ # # Create a client object. The client can be reused for multiple calls.
384
+ # client = Google::Cloud::NetworkConnectivity::V1beta::DataTransferService::Rest::Client.new
385
+ #
386
+ # # Create a request. To set request fields, pass in keyword arguments.
387
+ # request = Google::Cloud::NetworkConnectivity::V1beta::GetMulticloudDataTransferConfigRequest.new
388
+ #
389
+ # # Call the get_multicloud_data_transfer_config method.
390
+ # result = client.get_multicloud_data_transfer_config request
391
+ #
392
+ # # The returned object is of type Google::Cloud::NetworkConnectivity::V1beta::MulticloudDataTransferConfig.
393
+ # p result
394
+ #
395
+ def get_multicloud_data_transfer_config request, options = nil
396
+ raise ::ArgumentError, "request must be provided" if request.nil?
397
+
398
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::GetMulticloudDataTransferConfigRequest
399
+
400
+ # Converts hash and nil to an options object
401
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
402
+
403
+ # Customize the options with defaults
404
+ call_metadata = @config.rpcs.get_multicloud_data_transfer_config.metadata.to_h
405
+
406
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
407
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
408
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
409
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
410
+ transports_version_send: [:rest]
411
+
412
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
413
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
414
+
415
+ options.apply_defaults timeout: @config.rpcs.get_multicloud_data_transfer_config.timeout,
416
+ metadata: call_metadata,
417
+ retry_policy: @config.rpcs.get_multicloud_data_transfer_config.retry_policy
418
+
419
+ options.apply_defaults timeout: @config.timeout,
420
+ metadata: @config.metadata,
421
+ retry_policy: @config.retry_policy
422
+
423
+ @data_transfer_service_stub.get_multicloud_data_transfer_config request, options do |result, operation|
424
+ yield result, operation if block_given?
425
+ end
426
+ rescue ::Gapic::Rest::Error => e
427
+ raise ::Google::Cloud::Error.from_error(e)
428
+ end
429
+
430
+ ##
431
+ # Creates a `MulticloudDataTransferConfig` resource in a specified project
432
+ # and location.
433
+ #
434
+ # @overload create_multicloud_data_transfer_config(request, options = nil)
435
+ # Pass arguments to `create_multicloud_data_transfer_config` via a request object, either of type
436
+ # {::Google::Cloud::NetworkConnectivity::V1beta::CreateMulticloudDataTransferConfigRequest} or an equivalent Hash.
437
+ #
438
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::CreateMulticloudDataTransferConfigRequest, ::Hash]
439
+ # A request object representing the call parameters. Required. To specify no
440
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
441
+ # @param options [::Gapic::CallOptions, ::Hash]
442
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
443
+ #
444
+ # @overload create_multicloud_data_transfer_config(parent: nil, multicloud_data_transfer_config_id: nil, multicloud_data_transfer_config: nil, request_id: nil)
445
+ # Pass arguments to `create_multicloud_data_transfer_config` via keyword arguments. Note that at
446
+ # least one keyword argument is required. To specify no parameters, or to keep all
447
+ # the default parameter values, pass an empty Hash as a request object (see above).
448
+ #
449
+ # @param parent [::String]
450
+ # Required. The name of the parent resource.
451
+ # @param multicloud_data_transfer_config_id [::String]
452
+ # Required. The ID to use for the `MulticloudDataTransferConfig` resource,
453
+ # which becomes the final component of the `MulticloudDataTransferConfig`
454
+ # resource name.
455
+ # @param multicloud_data_transfer_config [::Google::Cloud::NetworkConnectivity::V1beta::MulticloudDataTransferConfig, ::Hash]
456
+ # Required. The `MulticloudDataTransferConfig` resource to create.
457
+ # @param request_id [::String]
458
+ # Optional. A request ID to identify requests. Specify a unique request ID
459
+ # so that if you must retry your request, the server can ignore
460
+ # the request if it has already been completed. The server waits
461
+ # for at least 60 minutes since the first request.
462
+ #
463
+ # For example, consider a situation where you make an initial request and
464
+ # the request times out. If you make the request again with the same request
465
+ # ID, the server can check if original operation with the same request ID
466
+ # was received, and if so, can ignore the second request. This prevents
467
+ # clients from accidentally creating duplicate `MulticloudDataTransferConfig`
468
+ # resources.
469
+ #
470
+ # The request ID must be a valid UUID with the exception that zero UUID
471
+ # (00000000-0000-0000-0000-000000000000) isn't supported.
472
+ # @yield [result, operation] Access the result along with the TransportOperation object
473
+ # @yieldparam result [::Gapic::Operation]
474
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
475
+ #
476
+ # @return [::Gapic::Operation]
477
+ #
478
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
479
+ #
480
+ # @example Basic example
481
+ # require "google/cloud/network_connectivity/v1beta"
482
+ #
483
+ # # Create a client object. The client can be reused for multiple calls.
484
+ # client = Google::Cloud::NetworkConnectivity::V1beta::DataTransferService::Rest::Client.new
485
+ #
486
+ # # Create a request. To set request fields, pass in keyword arguments.
487
+ # request = Google::Cloud::NetworkConnectivity::V1beta::CreateMulticloudDataTransferConfigRequest.new
488
+ #
489
+ # # Call the create_multicloud_data_transfer_config method.
490
+ # result = client.create_multicloud_data_transfer_config request
491
+ #
492
+ # # The returned object is of type Gapic::Operation. You can use it to
493
+ # # check the status of an operation, cancel it, or wait for results.
494
+ # # Here is how to wait for a response.
495
+ # result.wait_until_done! timeout: 60
496
+ # if result.response?
497
+ # p result.response
498
+ # else
499
+ # puts "No response received."
500
+ # end
501
+ #
502
+ def create_multicloud_data_transfer_config request, options = nil
503
+ raise ::ArgumentError, "request must be provided" if request.nil?
504
+
505
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::CreateMulticloudDataTransferConfigRequest
506
+
507
+ # Converts hash and nil to an options object
508
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
509
+
510
+ # Customize the options with defaults
511
+ call_metadata = @config.rpcs.create_multicloud_data_transfer_config.metadata.to_h
512
+
513
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
514
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
515
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
516
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
517
+ transports_version_send: [:rest]
518
+
519
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
520
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
521
+
522
+ options.apply_defaults timeout: @config.rpcs.create_multicloud_data_transfer_config.timeout,
523
+ metadata: call_metadata,
524
+ retry_policy: @config.rpcs.create_multicloud_data_transfer_config.retry_policy
525
+
526
+ options.apply_defaults timeout: @config.timeout,
527
+ metadata: @config.metadata,
528
+ retry_policy: @config.retry_policy
529
+
530
+ @data_transfer_service_stub.create_multicloud_data_transfer_config request, options do |result, operation|
531
+ result = ::Gapic::Operation.new result, @operations_client, options: options
532
+ yield result, operation if block_given?
533
+ throw :response, result
534
+ end
535
+ rescue ::Gapic::Rest::Error => e
536
+ raise ::Google::Cloud::Error.from_error(e)
537
+ end
538
+
539
+ ##
540
+ # Updates a `MulticloudDataTransferConfig` resource in a specified project
541
+ # and location.
542
+ #
543
+ # @overload update_multicloud_data_transfer_config(request, options = nil)
544
+ # Pass arguments to `update_multicloud_data_transfer_config` via a request object, either of type
545
+ # {::Google::Cloud::NetworkConnectivity::V1beta::UpdateMulticloudDataTransferConfigRequest} or an equivalent Hash.
546
+ #
547
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::UpdateMulticloudDataTransferConfigRequest, ::Hash]
548
+ # A request object representing the call parameters. Required. To specify no
549
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
550
+ # @param options [::Gapic::CallOptions, ::Hash]
551
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
552
+ #
553
+ # @overload update_multicloud_data_transfer_config(update_mask: nil, multicloud_data_transfer_config: nil, request_id: nil)
554
+ # Pass arguments to `update_multicloud_data_transfer_config` via keyword arguments. Note that at
555
+ # least one keyword argument is required. To specify no parameters, or to keep all
556
+ # the default parameter values, pass an empty Hash as a request object (see above).
557
+ #
558
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
559
+ # Optional. `FieldMask` is used to specify the fields in the
560
+ # `MulticloudDataTransferConfig` resource to be overwritten by the update.
561
+ # The fields specified in `update_mask` are relative to the resource, not
562
+ # the full request. A field is overwritten if it is in the mask. If you
563
+ # don't specify a mask, all fields are overwritten.
564
+ # @param multicloud_data_transfer_config [::Google::Cloud::NetworkConnectivity::V1beta::MulticloudDataTransferConfig, ::Hash]
565
+ # Required. The `MulticloudDataTransferConfig` resource to update.
566
+ # @param request_id [::String]
567
+ # Optional. A request ID to identify requests. Specify a unique request ID
568
+ # so that if you must retry your request, the server can ignore
569
+ # the request if it has already been completed. The server waits
570
+ # for at least 60 minutes since the first request.
571
+ #
572
+ # For example, consider a situation where you make an initial request and
573
+ # the request times out. If you make the request again with the same request
574
+ # ID, the server can check if original operation with the same request ID
575
+ # was received, and if so, can ignore the second request. This prevents
576
+ # clients from accidentally creating duplicate `MulticloudDataTransferConfig`
577
+ # resources.
578
+ #
579
+ # The request ID must be a valid UUID with the exception that zero UUID
580
+ # (00000000-0000-0000-0000-000000000000) isn't supported.
581
+ # @yield [result, operation] Access the result along with the TransportOperation object
582
+ # @yieldparam result [::Gapic::Operation]
583
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
584
+ #
585
+ # @return [::Gapic::Operation]
586
+ #
587
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
588
+ #
589
+ # @example Basic example
590
+ # require "google/cloud/network_connectivity/v1beta"
591
+ #
592
+ # # Create a client object. The client can be reused for multiple calls.
593
+ # client = Google::Cloud::NetworkConnectivity::V1beta::DataTransferService::Rest::Client.new
594
+ #
595
+ # # Create a request. To set request fields, pass in keyword arguments.
596
+ # request = Google::Cloud::NetworkConnectivity::V1beta::UpdateMulticloudDataTransferConfigRequest.new
597
+ #
598
+ # # Call the update_multicloud_data_transfer_config method.
599
+ # result = client.update_multicloud_data_transfer_config request
600
+ #
601
+ # # The returned object is of type Gapic::Operation. You can use it to
602
+ # # check the status of an operation, cancel it, or wait for results.
603
+ # # Here is how to wait for a response.
604
+ # result.wait_until_done! timeout: 60
605
+ # if result.response?
606
+ # p result.response
607
+ # else
608
+ # puts "No response received."
609
+ # end
610
+ #
611
+ def update_multicloud_data_transfer_config request, options = nil
612
+ raise ::ArgumentError, "request must be provided" if request.nil?
613
+
614
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::UpdateMulticloudDataTransferConfigRequest
615
+
616
+ # Converts hash and nil to an options object
617
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
618
+
619
+ # Customize the options with defaults
620
+ call_metadata = @config.rpcs.update_multicloud_data_transfer_config.metadata.to_h
621
+
622
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
623
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
624
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
625
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
626
+ transports_version_send: [:rest]
627
+
628
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
629
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
630
+
631
+ options.apply_defaults timeout: @config.rpcs.update_multicloud_data_transfer_config.timeout,
632
+ metadata: call_metadata,
633
+ retry_policy: @config.rpcs.update_multicloud_data_transfer_config.retry_policy
634
+
635
+ options.apply_defaults timeout: @config.timeout,
636
+ metadata: @config.metadata,
637
+ retry_policy: @config.retry_policy
638
+
639
+ @data_transfer_service_stub.update_multicloud_data_transfer_config request, options do |result, operation|
640
+ result = ::Gapic::Operation.new result, @operations_client, options: options
641
+ yield result, operation if block_given?
642
+ throw :response, result
643
+ end
644
+ rescue ::Gapic::Rest::Error => e
645
+ raise ::Google::Cloud::Error.from_error(e)
646
+ end
647
+
648
+ ##
649
+ # Deletes a `MulticloudDataTransferConfig` resource.
650
+ #
651
+ # @overload delete_multicloud_data_transfer_config(request, options = nil)
652
+ # Pass arguments to `delete_multicloud_data_transfer_config` via a request object, either of type
653
+ # {::Google::Cloud::NetworkConnectivity::V1beta::DeleteMulticloudDataTransferConfigRequest} or an equivalent Hash.
654
+ #
655
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::DeleteMulticloudDataTransferConfigRequest, ::Hash]
656
+ # A request object representing the call parameters. Required. To specify no
657
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
658
+ # @param options [::Gapic::CallOptions, ::Hash]
659
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
660
+ #
661
+ # @overload delete_multicloud_data_transfer_config(name: nil, request_id: nil, etag: nil)
662
+ # Pass arguments to `delete_multicloud_data_transfer_config` via keyword arguments. Note that at
663
+ # least one keyword argument is required. To specify no parameters, or to keep all
664
+ # the default parameter values, pass an empty Hash as a request object (see above).
665
+ #
666
+ # @param name [::String]
667
+ # Required. The name of the `MulticloudDataTransferConfig` resource to
668
+ # delete.
669
+ # @param request_id [::String]
670
+ # Optional. A request ID to identify requests. Specify a unique request ID
671
+ # so that if you must retry your request, the server can ignore
672
+ # the request if it has already been completed. The server waits
673
+ # for at least 60 minutes since the first request.
674
+ #
675
+ # For example, consider a situation where you make an initial request and
676
+ # the request times out. If you make the request again with the same request
677
+ # ID, the server can check if original operation with the same request ID
678
+ # was received, and if so, can ignore the second request. This prevents
679
+ # clients from accidentally creating duplicate `MulticloudDataTransferConfig`
680
+ # resources.
681
+ #
682
+ # The request ID must be a valid UUID with the exception that zero UUID
683
+ # (00000000-0000-0000-0000-000000000000) isn't supported.
684
+ # @param etag [::String]
685
+ # Optional. The etag is computed by the server, and might be sent with update
686
+ # and delete requests so that the client has an up-to-date value before
687
+ # proceeding.
688
+ # @yield [result, operation] Access the result along with the TransportOperation object
689
+ # @yieldparam result [::Gapic::Operation]
690
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
691
+ #
692
+ # @return [::Gapic::Operation]
693
+ #
694
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
695
+ #
696
+ # @example Basic example
697
+ # require "google/cloud/network_connectivity/v1beta"
698
+ #
699
+ # # Create a client object. The client can be reused for multiple calls.
700
+ # client = Google::Cloud::NetworkConnectivity::V1beta::DataTransferService::Rest::Client.new
701
+ #
702
+ # # Create a request. To set request fields, pass in keyword arguments.
703
+ # request = Google::Cloud::NetworkConnectivity::V1beta::DeleteMulticloudDataTransferConfigRequest.new
704
+ #
705
+ # # Call the delete_multicloud_data_transfer_config method.
706
+ # result = client.delete_multicloud_data_transfer_config request
707
+ #
708
+ # # The returned object is of type Gapic::Operation. You can use it to
709
+ # # check the status of an operation, cancel it, or wait for results.
710
+ # # Here is how to wait for a response.
711
+ # result.wait_until_done! timeout: 60
712
+ # if result.response?
713
+ # p result.response
714
+ # else
715
+ # puts "No response received."
716
+ # end
717
+ #
718
+ def delete_multicloud_data_transfer_config request, options = nil
719
+ raise ::ArgumentError, "request must be provided" if request.nil?
720
+
721
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::DeleteMulticloudDataTransferConfigRequest
722
+
723
+ # Converts hash and nil to an options object
724
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
725
+
726
+ # Customize the options with defaults
727
+ call_metadata = @config.rpcs.delete_multicloud_data_transfer_config.metadata.to_h
728
+
729
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
730
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
731
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
732
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
733
+ transports_version_send: [:rest]
734
+
735
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
736
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
737
+
738
+ options.apply_defaults timeout: @config.rpcs.delete_multicloud_data_transfer_config.timeout,
739
+ metadata: call_metadata,
740
+ retry_policy: @config.rpcs.delete_multicloud_data_transfer_config.retry_policy
741
+
742
+ options.apply_defaults timeout: @config.timeout,
743
+ metadata: @config.metadata,
744
+ retry_policy: @config.retry_policy
745
+
746
+ @data_transfer_service_stub.delete_multicloud_data_transfer_config request, options do |result, operation|
747
+ result = ::Gapic::Operation.new result, @operations_client, options: options
748
+ yield result, operation if block_given?
749
+ throw :response, result
750
+ end
751
+ rescue ::Gapic::Rest::Error => e
752
+ raise ::Google::Cloud::Error.from_error(e)
753
+ end
754
+
755
+ ##
756
+ # Lists the `Destination` resources in a specified project and location.
757
+ #
758
+ # @overload list_destinations(request, options = nil)
759
+ # Pass arguments to `list_destinations` via a request object, either of type
760
+ # {::Google::Cloud::NetworkConnectivity::V1beta::ListDestinationsRequest} or an equivalent Hash.
761
+ #
762
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::ListDestinationsRequest, ::Hash]
763
+ # A request object representing the call parameters. Required. To specify no
764
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
765
+ # @param options [::Gapic::CallOptions, ::Hash]
766
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
767
+ #
768
+ # @overload list_destinations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, return_partial_success: nil)
769
+ # Pass arguments to `list_destinations` via keyword arguments. Note that at
770
+ # least one keyword argument is required. To specify no parameters, or to keep all
771
+ # the default parameter values, pass an empty Hash as a request object (see above).
772
+ #
773
+ # @param parent [::String]
774
+ # Required. The name of the parent resource.
775
+ # @param page_size [::Integer]
776
+ # Optional. The maximum number of results listed per page.
777
+ # @param page_token [::String]
778
+ # Optional. The page token.
779
+ # @param filter [::String]
780
+ # Optional. An expression that filters the results listed in the response.
781
+ # @param order_by [::String]
782
+ # Optional. The sort order of the results.
783
+ # @param return_partial_success [::Boolean]
784
+ # Optional. If `true`, allow partial responses for multi-regional aggregated
785
+ # list requests.
786
+ # @yield [result, operation] Access the result along with the TransportOperation object
787
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::Destination>]
788
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
789
+ #
790
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::Destination>]
791
+ #
792
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
793
+ #
794
+ # @example Basic example
795
+ # require "google/cloud/network_connectivity/v1beta"
796
+ #
797
+ # # Create a client object. The client can be reused for multiple calls.
798
+ # client = Google::Cloud::NetworkConnectivity::V1beta::DataTransferService::Rest::Client.new
799
+ #
800
+ # # Create a request. To set request fields, pass in keyword arguments.
801
+ # request = Google::Cloud::NetworkConnectivity::V1beta::ListDestinationsRequest.new
802
+ #
803
+ # # Call the list_destinations method.
804
+ # result = client.list_destinations request
805
+ #
806
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
807
+ # # over elements, and API calls will be issued to fetch pages as needed.
808
+ # result.each do |item|
809
+ # # Each element is of type ::Google::Cloud::NetworkConnectivity::V1beta::Destination.
810
+ # p item
811
+ # end
812
+ #
813
+ def list_destinations request, options = nil
814
+ raise ::ArgumentError, "request must be provided" if request.nil?
815
+
816
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::ListDestinationsRequest
817
+
818
+ # Converts hash and nil to an options object
819
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
820
+
821
+ # Customize the options with defaults
822
+ call_metadata = @config.rpcs.list_destinations.metadata.to_h
823
+
824
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
825
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
826
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
827
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
828
+ transports_version_send: [:rest]
829
+
830
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
831
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
832
+
833
+ options.apply_defaults timeout: @config.rpcs.list_destinations.timeout,
834
+ metadata: call_metadata,
835
+ retry_policy: @config.rpcs.list_destinations.retry_policy
836
+
837
+ options.apply_defaults timeout: @config.timeout,
838
+ metadata: @config.metadata,
839
+ retry_policy: @config.retry_policy
840
+
841
+ @data_transfer_service_stub.list_destinations request, options do |result, operation|
842
+ result = ::Gapic::Rest::PagedEnumerable.new @data_transfer_service_stub, :list_destinations, "destinations", request, result, options
843
+ yield result, operation if block_given?
844
+ throw :response, result
845
+ end
846
+ rescue ::Gapic::Rest::Error => e
847
+ raise ::Google::Cloud::Error.from_error(e)
848
+ end
849
+
850
+ ##
851
+ # Gets the details of a `Destination` resource.
852
+ #
853
+ # @overload get_destination(request, options = nil)
854
+ # Pass arguments to `get_destination` via a request object, either of type
855
+ # {::Google::Cloud::NetworkConnectivity::V1beta::GetDestinationRequest} or an equivalent Hash.
856
+ #
857
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::GetDestinationRequest, ::Hash]
858
+ # A request object representing the call parameters. Required. To specify no
859
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
860
+ # @param options [::Gapic::CallOptions, ::Hash]
861
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
862
+ #
863
+ # @overload get_destination(name: nil)
864
+ # Pass arguments to `get_destination` via keyword arguments. Note that at
865
+ # least one keyword argument is required. To specify no parameters, or to keep all
866
+ # the default parameter values, pass an empty Hash as a request object (see above).
867
+ #
868
+ # @param name [::String]
869
+ # Required. The name of the `Destination` resource to get.
870
+ # @yield [result, operation] Access the result along with the TransportOperation object
871
+ # @yieldparam result [::Google::Cloud::NetworkConnectivity::V1beta::Destination]
872
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
873
+ #
874
+ # @return [::Google::Cloud::NetworkConnectivity::V1beta::Destination]
875
+ #
876
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
877
+ #
878
+ # @example Basic example
879
+ # require "google/cloud/network_connectivity/v1beta"
880
+ #
881
+ # # Create a client object. The client can be reused for multiple calls.
882
+ # client = Google::Cloud::NetworkConnectivity::V1beta::DataTransferService::Rest::Client.new
883
+ #
884
+ # # Create a request. To set request fields, pass in keyword arguments.
885
+ # request = Google::Cloud::NetworkConnectivity::V1beta::GetDestinationRequest.new
886
+ #
887
+ # # Call the get_destination method.
888
+ # result = client.get_destination request
889
+ #
890
+ # # The returned object is of type Google::Cloud::NetworkConnectivity::V1beta::Destination.
891
+ # p result
892
+ #
893
+ def get_destination request, options = nil
894
+ raise ::ArgumentError, "request must be provided" if request.nil?
895
+
896
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::GetDestinationRequest
897
+
898
+ # Converts hash and nil to an options object
899
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
900
+
901
+ # Customize the options with defaults
902
+ call_metadata = @config.rpcs.get_destination.metadata.to_h
903
+
904
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
905
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
906
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
907
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
908
+ transports_version_send: [:rest]
909
+
910
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
911
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
912
+
913
+ options.apply_defaults timeout: @config.rpcs.get_destination.timeout,
914
+ metadata: call_metadata,
915
+ retry_policy: @config.rpcs.get_destination.retry_policy
916
+
917
+ options.apply_defaults timeout: @config.timeout,
918
+ metadata: @config.metadata,
919
+ retry_policy: @config.retry_policy
920
+
921
+ @data_transfer_service_stub.get_destination request, options do |result, operation|
922
+ yield result, operation if block_given?
923
+ end
924
+ rescue ::Gapic::Rest::Error => e
925
+ raise ::Google::Cloud::Error.from_error(e)
926
+ end
927
+
928
+ ##
929
+ # Creates a `Destination` resource in a specified project and location.
930
+ #
931
+ # @overload create_destination(request, options = nil)
932
+ # Pass arguments to `create_destination` via a request object, either of type
933
+ # {::Google::Cloud::NetworkConnectivity::V1beta::CreateDestinationRequest} or an equivalent Hash.
934
+ #
935
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::CreateDestinationRequest, ::Hash]
936
+ # A request object representing the call parameters. Required. To specify no
937
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
938
+ # @param options [::Gapic::CallOptions, ::Hash]
939
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
940
+ #
941
+ # @overload create_destination(parent: nil, destination_id: nil, destination: nil, request_id: nil)
942
+ # Pass arguments to `create_destination` via keyword arguments. Note that at
943
+ # least one keyword argument is required. To specify no parameters, or to keep all
944
+ # the default parameter values, pass an empty Hash as a request object (see above).
945
+ #
946
+ # @param parent [::String]
947
+ # Required. The name of the parent resource.
948
+ # @param destination_id [::String]
949
+ # Required. The ID to use for the `Destination` resource, which becomes the
950
+ # final component of the `Destination` resource name.
951
+ # @param destination [::Google::Cloud::NetworkConnectivity::V1beta::Destination, ::Hash]
952
+ # Required. The `Destination` resource to create.
953
+ # @param request_id [::String]
954
+ # Optional. A request ID to identify requests. Specify a unique request ID
955
+ # so that if you must retry your request, the server can ignore
956
+ # the request if it has already been completed. The server waits
957
+ # for at least 60 minutes since the first request.
958
+ #
959
+ # For example, consider a situation where you make an initial request and
960
+ # the request times out. If you make the request again with the same request
961
+ # ID, the server can check if original operation with the same request ID
962
+ # was received, and if so, can ignore the second request. This prevents
963
+ # clients from accidentally creating duplicate `Destination`
964
+ # resources.
965
+ #
966
+ # The request ID must be a valid UUID with the exception that zero UUID
967
+ # (00000000-0000-0000-0000-000000000000) isn't supported.
968
+ # @yield [result, operation] Access the result along with the TransportOperation object
969
+ # @yieldparam result [::Gapic::Operation]
970
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
971
+ #
972
+ # @return [::Gapic::Operation]
973
+ #
974
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
975
+ #
976
+ # @example Basic example
977
+ # require "google/cloud/network_connectivity/v1beta"
978
+ #
979
+ # # Create a client object. The client can be reused for multiple calls.
980
+ # client = Google::Cloud::NetworkConnectivity::V1beta::DataTransferService::Rest::Client.new
981
+ #
982
+ # # Create a request. To set request fields, pass in keyword arguments.
983
+ # request = Google::Cloud::NetworkConnectivity::V1beta::CreateDestinationRequest.new
984
+ #
985
+ # # Call the create_destination method.
986
+ # result = client.create_destination request
987
+ #
988
+ # # The returned object is of type Gapic::Operation. You can use it to
989
+ # # check the status of an operation, cancel it, or wait for results.
990
+ # # Here is how to wait for a response.
991
+ # result.wait_until_done! timeout: 60
992
+ # if result.response?
993
+ # p result.response
994
+ # else
995
+ # puts "No response received."
996
+ # end
997
+ #
998
+ def create_destination request, options = nil
999
+ raise ::ArgumentError, "request must be provided" if request.nil?
1000
+
1001
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::CreateDestinationRequest
1002
+
1003
+ # Converts hash and nil to an options object
1004
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1005
+
1006
+ # Customize the options with defaults
1007
+ call_metadata = @config.rpcs.create_destination.metadata.to_h
1008
+
1009
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1010
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1011
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1012
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
1013
+ transports_version_send: [:rest]
1014
+
1015
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1016
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1017
+
1018
+ options.apply_defaults timeout: @config.rpcs.create_destination.timeout,
1019
+ metadata: call_metadata,
1020
+ retry_policy: @config.rpcs.create_destination.retry_policy
1021
+
1022
+ options.apply_defaults timeout: @config.timeout,
1023
+ metadata: @config.metadata,
1024
+ retry_policy: @config.retry_policy
1025
+
1026
+ @data_transfer_service_stub.create_destination request, options do |result, operation|
1027
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1028
+ yield result, operation if block_given?
1029
+ throw :response, result
1030
+ end
1031
+ rescue ::Gapic::Rest::Error => e
1032
+ raise ::Google::Cloud::Error.from_error(e)
1033
+ end
1034
+
1035
+ ##
1036
+ # Updates a `Destination` resource in a specified project and location.
1037
+ #
1038
+ # @overload update_destination(request, options = nil)
1039
+ # Pass arguments to `update_destination` via a request object, either of type
1040
+ # {::Google::Cloud::NetworkConnectivity::V1beta::UpdateDestinationRequest} or an equivalent Hash.
1041
+ #
1042
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::UpdateDestinationRequest, ::Hash]
1043
+ # A request object representing the call parameters. Required. To specify no
1044
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1045
+ # @param options [::Gapic::CallOptions, ::Hash]
1046
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1047
+ #
1048
+ # @overload update_destination(update_mask: nil, destination: nil, request_id: nil)
1049
+ # Pass arguments to `update_destination` via keyword arguments. Note that at
1050
+ # least one keyword argument is required. To specify no parameters, or to keep all
1051
+ # the default parameter values, pass an empty Hash as a request object (see above).
1052
+ #
1053
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1054
+ # Optional. `FieldMask is used to specify the fields to be overwritten in the
1055
+ # `Destination` resource by the update.
1056
+ # The fields specified in `update_mask` are relative to the resource, not
1057
+ # the full request. A field is overwritten if it is in the mask. If you
1058
+ # don't specify a mask, all fields are overwritten.
1059
+ # @param destination [::Google::Cloud::NetworkConnectivity::V1beta::Destination, ::Hash]
1060
+ # Required. The `Destination` resource to update.
1061
+ # @param request_id [::String]
1062
+ # Optional. A request ID to identify requests. Specify a unique request ID
1063
+ # so that if you must retry your request, the server can ignore
1064
+ # the request if it has already been completed. The server waits
1065
+ # for at least 60 minutes since the first request.
1066
+ #
1067
+ # For example, consider a situation where you make an initial request and
1068
+ # the request times out. If you make the request again with the same request
1069
+ # ID, the server can check if original operation with the same request ID
1070
+ # was received, and if so, can ignore the second request.
1071
+ #
1072
+ # The request ID must be a valid UUID with the exception that zero UUID
1073
+ # (00000000-0000-0000-0000-000000000000) isn't supported.
1074
+ # @yield [result, operation] Access the result along with the TransportOperation object
1075
+ # @yieldparam result [::Gapic::Operation]
1076
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1077
+ #
1078
+ # @return [::Gapic::Operation]
1079
+ #
1080
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1081
+ #
1082
+ # @example Basic example
1083
+ # require "google/cloud/network_connectivity/v1beta"
1084
+ #
1085
+ # # Create a client object. The client can be reused for multiple calls.
1086
+ # client = Google::Cloud::NetworkConnectivity::V1beta::DataTransferService::Rest::Client.new
1087
+ #
1088
+ # # Create a request. To set request fields, pass in keyword arguments.
1089
+ # request = Google::Cloud::NetworkConnectivity::V1beta::UpdateDestinationRequest.new
1090
+ #
1091
+ # # Call the update_destination method.
1092
+ # result = client.update_destination request
1093
+ #
1094
+ # # The returned object is of type Gapic::Operation. You can use it to
1095
+ # # check the status of an operation, cancel it, or wait for results.
1096
+ # # Here is how to wait for a response.
1097
+ # result.wait_until_done! timeout: 60
1098
+ # if result.response?
1099
+ # p result.response
1100
+ # else
1101
+ # puts "No response received."
1102
+ # end
1103
+ #
1104
+ def update_destination request, options = nil
1105
+ raise ::ArgumentError, "request must be provided" if request.nil?
1106
+
1107
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::UpdateDestinationRequest
1108
+
1109
+ # Converts hash and nil to an options object
1110
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1111
+
1112
+ # Customize the options with defaults
1113
+ call_metadata = @config.rpcs.update_destination.metadata.to_h
1114
+
1115
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1116
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1117
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1118
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
1119
+ transports_version_send: [:rest]
1120
+
1121
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1122
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1123
+
1124
+ options.apply_defaults timeout: @config.rpcs.update_destination.timeout,
1125
+ metadata: call_metadata,
1126
+ retry_policy: @config.rpcs.update_destination.retry_policy
1127
+
1128
+ options.apply_defaults timeout: @config.timeout,
1129
+ metadata: @config.metadata,
1130
+ retry_policy: @config.retry_policy
1131
+
1132
+ @data_transfer_service_stub.update_destination request, options do |result, operation|
1133
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1134
+ yield result, operation if block_given?
1135
+ throw :response, result
1136
+ end
1137
+ rescue ::Gapic::Rest::Error => e
1138
+ raise ::Google::Cloud::Error.from_error(e)
1139
+ end
1140
+
1141
+ ##
1142
+ # Deletes a `Destination` resource.
1143
+ #
1144
+ # @overload delete_destination(request, options = nil)
1145
+ # Pass arguments to `delete_destination` via a request object, either of type
1146
+ # {::Google::Cloud::NetworkConnectivity::V1beta::DeleteDestinationRequest} or an equivalent Hash.
1147
+ #
1148
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::DeleteDestinationRequest, ::Hash]
1149
+ # A request object representing the call parameters. Required. To specify no
1150
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1151
+ # @param options [::Gapic::CallOptions, ::Hash]
1152
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1153
+ #
1154
+ # @overload delete_destination(name: nil, request_id: nil, etag: nil)
1155
+ # Pass arguments to `delete_destination` via keyword arguments. Note that at
1156
+ # least one keyword argument is required. To specify no parameters, or to keep all
1157
+ # the default parameter values, pass an empty Hash as a request object (see above).
1158
+ #
1159
+ # @param name [::String]
1160
+ # Required. The name of the `Destination` resource to delete.
1161
+ # @param request_id [::String]
1162
+ # Optional. A request ID to identify requests. Specify a unique request ID
1163
+ # so that if you must retry your request, the server can ignore
1164
+ # the request if it has already been completed. The server waits
1165
+ # for at least 60 minutes since the first request.
1166
+ #
1167
+ # For example, consider a situation where you make an initial request and
1168
+ # the request times out. If you make the request again with the same request
1169
+ # ID, the server can check if original operation with the same request ID
1170
+ # was received, and if so, can ignore the second request.
1171
+ #
1172
+ # The request ID must be a valid UUID with the exception that zero UUID
1173
+ # (00000000-0000-0000-0000-000000000000) isn't supported.
1174
+ # @param etag [::String]
1175
+ # Optional. The etag is computed by the server, and might be sent with update
1176
+ # and delete requests so that the client has an up-to-date value before
1177
+ # proceeding.
1178
+ # @yield [result, operation] Access the result along with the TransportOperation object
1179
+ # @yieldparam result [::Gapic::Operation]
1180
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1181
+ #
1182
+ # @return [::Gapic::Operation]
1183
+ #
1184
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1185
+ #
1186
+ # @example Basic example
1187
+ # require "google/cloud/network_connectivity/v1beta"
1188
+ #
1189
+ # # Create a client object. The client can be reused for multiple calls.
1190
+ # client = Google::Cloud::NetworkConnectivity::V1beta::DataTransferService::Rest::Client.new
1191
+ #
1192
+ # # Create a request. To set request fields, pass in keyword arguments.
1193
+ # request = Google::Cloud::NetworkConnectivity::V1beta::DeleteDestinationRequest.new
1194
+ #
1195
+ # # Call the delete_destination method.
1196
+ # result = client.delete_destination request
1197
+ #
1198
+ # # The returned object is of type Gapic::Operation. You can use it to
1199
+ # # check the status of an operation, cancel it, or wait for results.
1200
+ # # Here is how to wait for a response.
1201
+ # result.wait_until_done! timeout: 60
1202
+ # if result.response?
1203
+ # p result.response
1204
+ # else
1205
+ # puts "No response received."
1206
+ # end
1207
+ #
1208
+ def delete_destination request, options = nil
1209
+ raise ::ArgumentError, "request must be provided" if request.nil?
1210
+
1211
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::DeleteDestinationRequest
1212
+
1213
+ # Converts hash and nil to an options object
1214
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1215
+
1216
+ # Customize the options with defaults
1217
+ call_metadata = @config.rpcs.delete_destination.metadata.to_h
1218
+
1219
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1220
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1221
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1222
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
1223
+ transports_version_send: [:rest]
1224
+
1225
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1226
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1227
+
1228
+ options.apply_defaults timeout: @config.rpcs.delete_destination.timeout,
1229
+ metadata: call_metadata,
1230
+ retry_policy: @config.rpcs.delete_destination.retry_policy
1231
+
1232
+ options.apply_defaults timeout: @config.timeout,
1233
+ metadata: @config.metadata,
1234
+ retry_policy: @config.retry_policy
1235
+
1236
+ @data_transfer_service_stub.delete_destination request, options do |result, operation|
1237
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1238
+ yield result, operation if block_given?
1239
+ throw :response, result
1240
+ end
1241
+ rescue ::Gapic::Rest::Error => e
1242
+ raise ::Google::Cloud::Error.from_error(e)
1243
+ end
1244
+
1245
+ ##
1246
+ # Gets the details of a service that is supported for Data Transfer
1247
+ # Essentials.
1248
+ #
1249
+ # @overload get_multicloud_data_transfer_supported_service(request, options = nil)
1250
+ # Pass arguments to `get_multicloud_data_transfer_supported_service` via a request object, either of type
1251
+ # {::Google::Cloud::NetworkConnectivity::V1beta::GetMulticloudDataTransferSupportedServiceRequest} or an equivalent Hash.
1252
+ #
1253
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::GetMulticloudDataTransferSupportedServiceRequest, ::Hash]
1254
+ # A request object representing the call parameters. Required. To specify no
1255
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1256
+ # @param options [::Gapic::CallOptions, ::Hash]
1257
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1258
+ #
1259
+ # @overload get_multicloud_data_transfer_supported_service(name: nil)
1260
+ # Pass arguments to `get_multicloud_data_transfer_supported_service` via keyword arguments. Note that at
1261
+ # least one keyword argument is required. To specify no parameters, or to keep all
1262
+ # the default parameter values, pass an empty Hash as a request object (see above).
1263
+ #
1264
+ # @param name [::String]
1265
+ # Required. The name of the service.
1266
+ # @yield [result, operation] Access the result along with the TransportOperation object
1267
+ # @yieldparam result [::Google::Cloud::NetworkConnectivity::V1beta::MulticloudDataTransferSupportedService]
1268
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1269
+ #
1270
+ # @return [::Google::Cloud::NetworkConnectivity::V1beta::MulticloudDataTransferSupportedService]
1271
+ #
1272
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1273
+ #
1274
+ # @example Basic example
1275
+ # require "google/cloud/network_connectivity/v1beta"
1276
+ #
1277
+ # # Create a client object. The client can be reused for multiple calls.
1278
+ # client = Google::Cloud::NetworkConnectivity::V1beta::DataTransferService::Rest::Client.new
1279
+ #
1280
+ # # Create a request. To set request fields, pass in keyword arguments.
1281
+ # request = Google::Cloud::NetworkConnectivity::V1beta::GetMulticloudDataTransferSupportedServiceRequest.new
1282
+ #
1283
+ # # Call the get_multicloud_data_transfer_supported_service method.
1284
+ # result = client.get_multicloud_data_transfer_supported_service request
1285
+ #
1286
+ # # The returned object is of type Google::Cloud::NetworkConnectivity::V1beta::MulticloudDataTransferSupportedService.
1287
+ # p result
1288
+ #
1289
+ def get_multicloud_data_transfer_supported_service request, options = nil
1290
+ raise ::ArgumentError, "request must be provided" if request.nil?
1291
+
1292
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::GetMulticloudDataTransferSupportedServiceRequest
1293
+
1294
+ # Converts hash and nil to an options object
1295
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1296
+
1297
+ # Customize the options with defaults
1298
+ call_metadata = @config.rpcs.get_multicloud_data_transfer_supported_service.metadata.to_h
1299
+
1300
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1301
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1302
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1303
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
1304
+ transports_version_send: [:rest]
1305
+
1306
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1307
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1308
+
1309
+ options.apply_defaults timeout: @config.rpcs.get_multicloud_data_transfer_supported_service.timeout,
1310
+ metadata: call_metadata,
1311
+ retry_policy: @config.rpcs.get_multicloud_data_transfer_supported_service.retry_policy
1312
+
1313
+ options.apply_defaults timeout: @config.timeout,
1314
+ metadata: @config.metadata,
1315
+ retry_policy: @config.retry_policy
1316
+
1317
+ @data_transfer_service_stub.get_multicloud_data_transfer_supported_service request, options do |result, operation|
1318
+ yield result, operation if block_given?
1319
+ end
1320
+ rescue ::Gapic::Rest::Error => e
1321
+ raise ::Google::Cloud::Error.from_error(e)
1322
+ end
1323
+
1324
+ ##
1325
+ # Lists the services in the project for a region that are supported for
1326
+ # Data Transfer Essentials.
1327
+ #
1328
+ # @overload list_multicloud_data_transfer_supported_services(request, options = nil)
1329
+ # Pass arguments to `list_multicloud_data_transfer_supported_services` via a request object, either of type
1330
+ # {::Google::Cloud::NetworkConnectivity::V1beta::ListMulticloudDataTransferSupportedServicesRequest} or an equivalent Hash.
1331
+ #
1332
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::ListMulticloudDataTransferSupportedServicesRequest, ::Hash]
1333
+ # A request object representing the call parameters. Required. To specify no
1334
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1335
+ # @param options [::Gapic::CallOptions, ::Hash]
1336
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1337
+ #
1338
+ # @overload list_multicloud_data_transfer_supported_services(parent: nil, page_size: nil, page_token: nil)
1339
+ # Pass arguments to `list_multicloud_data_transfer_supported_services` via keyword arguments. Note that at
1340
+ # least one keyword argument is required. To specify no parameters, or to keep all
1341
+ # the default parameter values, pass an empty Hash as a request object (see above).
1342
+ #
1343
+ # @param parent [::String]
1344
+ # Required. The name of the parent resource.
1345
+ # @param page_size [::Integer]
1346
+ # Optional. The maximum number of results listed per page.
1347
+ # @param page_token [::String]
1348
+ # Optional. The page token.
1349
+ # @yield [result, operation] Access the result along with the TransportOperation object
1350
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::MulticloudDataTransferSupportedService>]
1351
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1352
+ #
1353
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::MulticloudDataTransferSupportedService>]
1354
+ #
1355
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1356
+ #
1357
+ # @example Basic example
1358
+ # require "google/cloud/network_connectivity/v1beta"
1359
+ #
1360
+ # # Create a client object. The client can be reused for multiple calls.
1361
+ # client = Google::Cloud::NetworkConnectivity::V1beta::DataTransferService::Rest::Client.new
1362
+ #
1363
+ # # Create a request. To set request fields, pass in keyword arguments.
1364
+ # request = Google::Cloud::NetworkConnectivity::V1beta::ListMulticloudDataTransferSupportedServicesRequest.new
1365
+ #
1366
+ # # Call the list_multicloud_data_transfer_supported_services method.
1367
+ # result = client.list_multicloud_data_transfer_supported_services request
1368
+ #
1369
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1370
+ # # over elements, and API calls will be issued to fetch pages as needed.
1371
+ # result.each do |item|
1372
+ # # Each element is of type ::Google::Cloud::NetworkConnectivity::V1beta::MulticloudDataTransferSupportedService.
1373
+ # p item
1374
+ # end
1375
+ #
1376
+ def list_multicloud_data_transfer_supported_services request, options = nil
1377
+ raise ::ArgumentError, "request must be provided" if request.nil?
1378
+
1379
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::ListMulticloudDataTransferSupportedServicesRequest
1380
+
1381
+ # Converts hash and nil to an options object
1382
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1383
+
1384
+ # Customize the options with defaults
1385
+ call_metadata = @config.rpcs.list_multicloud_data_transfer_supported_services.metadata.to_h
1386
+
1387
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1388
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1389
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1390
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
1391
+ transports_version_send: [:rest]
1392
+
1393
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1394
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1395
+
1396
+ options.apply_defaults timeout: @config.rpcs.list_multicloud_data_transfer_supported_services.timeout,
1397
+ metadata: call_metadata,
1398
+ retry_policy: @config.rpcs.list_multicloud_data_transfer_supported_services.retry_policy
1399
+
1400
+ options.apply_defaults timeout: @config.timeout,
1401
+ metadata: @config.metadata,
1402
+ retry_policy: @config.retry_policy
1403
+
1404
+ @data_transfer_service_stub.list_multicloud_data_transfer_supported_services request, options do |result, operation|
1405
+ result = ::Gapic::Rest::PagedEnumerable.new @data_transfer_service_stub, :list_multicloud_data_transfer_supported_services, "multicloud_data_transfer_supported_services", request, result, options
1406
+ yield result, operation if block_given?
1407
+ throw :response, result
1408
+ end
1409
+ rescue ::Gapic::Rest::Error => e
1410
+ raise ::Google::Cloud::Error.from_error(e)
1411
+ end
1412
+
1413
+ ##
1414
+ # Configuration class for the DataTransferService REST API.
1415
+ #
1416
+ # This class represents the configuration for DataTransferService REST,
1417
+ # providing control over timeouts, retry behavior, logging, transport
1418
+ # parameters, and other low-level controls. Certain parameters can also be
1419
+ # applied individually to specific RPCs. See
1420
+ # {::Google::Cloud::NetworkConnectivity::V1beta::DataTransferService::Rest::Client::Configuration::Rpcs}
1421
+ # for a list of RPCs that can be configured independently.
1422
+ #
1423
+ # Configuration can be applied globally to all clients, or to a single client
1424
+ # on construction.
1425
+ #
1426
+ # @example
1427
+ #
1428
+ # # Modify the global config, setting the timeout for
1429
+ # # list_multicloud_data_transfer_configs to 20 seconds,
1430
+ # # and all remaining timeouts to 10 seconds.
1431
+ # ::Google::Cloud::NetworkConnectivity::V1beta::DataTransferService::Rest::Client.configure do |config|
1432
+ # config.timeout = 10.0
1433
+ # config.rpcs.list_multicloud_data_transfer_configs.timeout = 20.0
1434
+ # end
1435
+ #
1436
+ # # Apply the above configuration only to a new client.
1437
+ # client = ::Google::Cloud::NetworkConnectivity::V1beta::DataTransferService::Rest::Client.new do |config|
1438
+ # config.timeout = 10.0
1439
+ # config.rpcs.list_multicloud_data_transfer_configs.timeout = 20.0
1440
+ # end
1441
+ #
1442
+ # @!attribute [rw] endpoint
1443
+ # A custom service endpoint, as a hostname or hostname:port. The default is
1444
+ # nil, indicating to use the default endpoint in the current universe domain.
1445
+ # @return [::String,nil]
1446
+ # @!attribute [rw] credentials
1447
+ # Credentials to send with calls. You may provide any of the following types:
1448
+ # * (`String`) The path to a service account key file in JSON format
1449
+ # * (`Hash`) A service account key as a Hash
1450
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1451
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1452
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1453
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1454
+ # * (`nil`) indicating no credentials
1455
+ #
1456
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
1457
+ # external source for authentication to Google Cloud, you must validate it before
1458
+ # providing it to a Google API client library. Providing an unvalidated credential
1459
+ # configuration to Google APIs can compromise the security of your systems and data.
1460
+ # For more information, refer to [Validate credential configurations from external
1461
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
1462
+ # @return [::Object]
1463
+ # @!attribute [rw] scope
1464
+ # The OAuth scopes
1465
+ # @return [::Array<::String>]
1466
+ # @!attribute [rw] lib_name
1467
+ # The library name as recorded in instrumentation and logging
1468
+ # @return [::String]
1469
+ # @!attribute [rw] lib_version
1470
+ # The library version as recorded in instrumentation and logging
1471
+ # @return [::String]
1472
+ # @!attribute [rw] timeout
1473
+ # The call timeout in seconds.
1474
+ # @return [::Numeric]
1475
+ # @!attribute [rw] metadata
1476
+ # Additional headers to be sent with the call.
1477
+ # @return [::Hash{::Symbol=>::String}]
1478
+ # @!attribute [rw] retry_policy
1479
+ # The retry policy. The value is a hash with the following keys:
1480
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1481
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1482
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1483
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
1484
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1485
+ # trigger a retry.
1486
+ # @return [::Hash]
1487
+ # @!attribute [rw] quota_project
1488
+ # A separate project against which to charge quota.
1489
+ # @return [::String]
1490
+ # @!attribute [rw] universe_domain
1491
+ # The universe domain within which to make requests. This determines the
1492
+ # default endpoint URL. The default value of nil uses the environment
1493
+ # universe (usually the default "googleapis.com" universe).
1494
+ # @return [::String,nil]
1495
+ # @!attribute [rw] logger
1496
+ # A custom logger to use for request/response debug logging, or the value
1497
+ # `:default` (the default) to construct a default logger, or `nil` to
1498
+ # explicitly disable logging.
1499
+ # @return [::Logger,:default,nil]
1500
+ #
1501
+ class Configuration
1502
+ extend ::Gapic::Config
1503
+
1504
+ # @private
1505
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1506
+ DEFAULT_ENDPOINT = "networkconnectivity.googleapis.com"
1507
+
1508
+ config_attr :endpoint, nil, ::String, nil
1509
+ config_attr :credentials, nil do |value|
1510
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
1511
+ allowed.any? { |klass| klass === value }
1512
+ end
1513
+ config_attr :scope, nil, ::String, ::Array, nil
1514
+ config_attr :lib_name, nil, ::String, nil
1515
+ config_attr :lib_version, nil, ::String, nil
1516
+ config_attr :timeout, nil, ::Numeric, nil
1517
+ config_attr :metadata, nil, ::Hash, nil
1518
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1519
+ config_attr :quota_project, nil, ::String, nil
1520
+ config_attr :universe_domain, nil, ::String, nil
1521
+
1522
+ # @private
1523
+ # Overrides for http bindings for the RPCs of this service
1524
+ # are only used when this service is used as mixin, and only
1525
+ # by the host service.
1526
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
1527
+ config_attr :bindings_override, {}, ::Hash, nil
1528
+ config_attr :logger, :default, ::Logger, nil, :default
1529
+
1530
+ # @private
1531
+ def initialize parent_config = nil
1532
+ @parent_config = parent_config unless parent_config.nil?
1533
+
1534
+ yield self if block_given?
1535
+ end
1536
+
1537
+ ##
1538
+ # Configurations for individual RPCs
1539
+ # @return [Rpcs]
1540
+ #
1541
+ def rpcs
1542
+ @rpcs ||= begin
1543
+ parent_rpcs = nil
1544
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1545
+ Rpcs.new parent_rpcs
1546
+ end
1547
+ end
1548
+
1549
+ ##
1550
+ # Configuration RPC class for the DataTransferService API.
1551
+ #
1552
+ # Includes fields providing the configuration for each RPC in this service.
1553
+ # Each configuration object is of type `Gapic::Config::Method` and includes
1554
+ # the following configuration fields:
1555
+ #
1556
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1557
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
1558
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1559
+ # include the following keys:
1560
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1561
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1562
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1563
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
1564
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1565
+ # trigger a retry.
1566
+ #
1567
+ class Rpcs
1568
+ ##
1569
+ # RPC-specific configuration for `list_multicloud_data_transfer_configs`
1570
+ # @return [::Gapic::Config::Method]
1571
+ #
1572
+ attr_reader :list_multicloud_data_transfer_configs
1573
+ ##
1574
+ # RPC-specific configuration for `get_multicloud_data_transfer_config`
1575
+ # @return [::Gapic::Config::Method]
1576
+ #
1577
+ attr_reader :get_multicloud_data_transfer_config
1578
+ ##
1579
+ # RPC-specific configuration for `create_multicloud_data_transfer_config`
1580
+ # @return [::Gapic::Config::Method]
1581
+ #
1582
+ attr_reader :create_multicloud_data_transfer_config
1583
+ ##
1584
+ # RPC-specific configuration for `update_multicloud_data_transfer_config`
1585
+ # @return [::Gapic::Config::Method]
1586
+ #
1587
+ attr_reader :update_multicloud_data_transfer_config
1588
+ ##
1589
+ # RPC-specific configuration for `delete_multicloud_data_transfer_config`
1590
+ # @return [::Gapic::Config::Method]
1591
+ #
1592
+ attr_reader :delete_multicloud_data_transfer_config
1593
+ ##
1594
+ # RPC-specific configuration for `list_destinations`
1595
+ # @return [::Gapic::Config::Method]
1596
+ #
1597
+ attr_reader :list_destinations
1598
+ ##
1599
+ # RPC-specific configuration for `get_destination`
1600
+ # @return [::Gapic::Config::Method]
1601
+ #
1602
+ attr_reader :get_destination
1603
+ ##
1604
+ # RPC-specific configuration for `create_destination`
1605
+ # @return [::Gapic::Config::Method]
1606
+ #
1607
+ attr_reader :create_destination
1608
+ ##
1609
+ # RPC-specific configuration for `update_destination`
1610
+ # @return [::Gapic::Config::Method]
1611
+ #
1612
+ attr_reader :update_destination
1613
+ ##
1614
+ # RPC-specific configuration for `delete_destination`
1615
+ # @return [::Gapic::Config::Method]
1616
+ #
1617
+ attr_reader :delete_destination
1618
+ ##
1619
+ # RPC-specific configuration for `get_multicloud_data_transfer_supported_service`
1620
+ # @return [::Gapic::Config::Method]
1621
+ #
1622
+ attr_reader :get_multicloud_data_transfer_supported_service
1623
+ ##
1624
+ # RPC-specific configuration for `list_multicloud_data_transfer_supported_services`
1625
+ # @return [::Gapic::Config::Method]
1626
+ #
1627
+ attr_reader :list_multicloud_data_transfer_supported_services
1628
+
1629
+ # @private
1630
+ def initialize parent_rpcs = nil
1631
+ list_multicloud_data_transfer_configs_config = parent_rpcs.list_multicloud_data_transfer_configs if parent_rpcs.respond_to? :list_multicloud_data_transfer_configs
1632
+ @list_multicloud_data_transfer_configs = ::Gapic::Config::Method.new list_multicloud_data_transfer_configs_config
1633
+ get_multicloud_data_transfer_config_config = parent_rpcs.get_multicloud_data_transfer_config if parent_rpcs.respond_to? :get_multicloud_data_transfer_config
1634
+ @get_multicloud_data_transfer_config = ::Gapic::Config::Method.new get_multicloud_data_transfer_config_config
1635
+ create_multicloud_data_transfer_config_config = parent_rpcs.create_multicloud_data_transfer_config if parent_rpcs.respond_to? :create_multicloud_data_transfer_config
1636
+ @create_multicloud_data_transfer_config = ::Gapic::Config::Method.new create_multicloud_data_transfer_config_config
1637
+ update_multicloud_data_transfer_config_config = parent_rpcs.update_multicloud_data_transfer_config if parent_rpcs.respond_to? :update_multicloud_data_transfer_config
1638
+ @update_multicloud_data_transfer_config = ::Gapic::Config::Method.new update_multicloud_data_transfer_config_config
1639
+ delete_multicloud_data_transfer_config_config = parent_rpcs.delete_multicloud_data_transfer_config if parent_rpcs.respond_to? :delete_multicloud_data_transfer_config
1640
+ @delete_multicloud_data_transfer_config = ::Gapic::Config::Method.new delete_multicloud_data_transfer_config_config
1641
+ list_destinations_config = parent_rpcs.list_destinations if parent_rpcs.respond_to? :list_destinations
1642
+ @list_destinations = ::Gapic::Config::Method.new list_destinations_config
1643
+ get_destination_config = parent_rpcs.get_destination if parent_rpcs.respond_to? :get_destination
1644
+ @get_destination = ::Gapic::Config::Method.new get_destination_config
1645
+ create_destination_config = parent_rpcs.create_destination if parent_rpcs.respond_to? :create_destination
1646
+ @create_destination = ::Gapic::Config::Method.new create_destination_config
1647
+ update_destination_config = parent_rpcs.update_destination if parent_rpcs.respond_to? :update_destination
1648
+ @update_destination = ::Gapic::Config::Method.new update_destination_config
1649
+ delete_destination_config = parent_rpcs.delete_destination if parent_rpcs.respond_to? :delete_destination
1650
+ @delete_destination = ::Gapic::Config::Method.new delete_destination_config
1651
+ get_multicloud_data_transfer_supported_service_config = parent_rpcs.get_multicloud_data_transfer_supported_service if parent_rpcs.respond_to? :get_multicloud_data_transfer_supported_service
1652
+ @get_multicloud_data_transfer_supported_service = ::Gapic::Config::Method.new get_multicloud_data_transfer_supported_service_config
1653
+ list_multicloud_data_transfer_supported_services_config = parent_rpcs.list_multicloud_data_transfer_supported_services if parent_rpcs.respond_to? :list_multicloud_data_transfer_supported_services
1654
+ @list_multicloud_data_transfer_supported_services = ::Gapic::Config::Method.new list_multicloud_data_transfer_supported_services_config
1655
+
1656
+ yield self if block_given?
1657
+ end
1658
+ end
1659
+ end
1660
+ end
1661
+ end
1662
+ end
1663
+ end
1664
+ end
1665
+ end
1666
+ end