google-cloud-network_connectivity-v1beta 0.2.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 (35) 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/client.rb +98 -1
  20. data/lib/google/cloud/network_connectivity/v1beta/transport_manager/paths.rb +17 -0
  21. data/lib/google/cloud/network_connectivity/v1beta/transport_manager/rest/client.rb +1287 -0
  22. data/lib/google/cloud/network_connectivity/v1beta/transport_manager/rest/operations.rb +927 -0
  23. data/lib/google/cloud/network_connectivity/v1beta/transport_manager/rest/service_stub.rb +632 -0
  24. data/lib/google/cloud/network_connectivity/v1beta/transport_manager/rest.rb +54 -0
  25. data/lib/google/cloud/network_connectivity/v1beta/transport_manager.rb +6 -0
  26. data/lib/google/cloud/network_connectivity/v1beta/version.rb +1 -1
  27. data/lib/google/cloud/network_connectivity/v1beta.rb +5 -0
  28. data/lib/google/cloud/networkconnectivity/v1beta/hub_pb.rb +2 -1
  29. data/lib/google/cloud/networkconnectivity/v1beta/transport_manager_pb.rb +4 -1
  30. data/lib/google/cloud/networkconnectivity/v1beta/transport_manager_services_pb.rb +2 -0
  31. data/proto_docs/google/cloud/networkconnectivity/v1beta/hub.rb +65 -0
  32. data/proto_docs/google/cloud/networkconnectivity/v1beta/transport_manager.rb +70 -10
  33. data/proto_docs/google/protobuf/timestamp.rb +7 -6
  34. metadata +19 -2
  35. data/proto_docs/google/type/expr.rb +0 -75
@@ -0,0 +1,3353 @@
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/hub_pb"
21
+ require "google/cloud/network_connectivity/v1beta/hub_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 HubService
30
+ module Rest
31
+ ##
32
+ # REST client for the HubService service.
33
+ #
34
+ # Network Connectivity Center is a hub-and-spoke abstraction for network
35
+ # connectivity management in Google Cloud. It reduces operational complexity
36
+ # through a simple, centralized connectivity management model.
37
+ #
38
+ class Client
39
+ # @private
40
+ API_VERSION = ""
41
+
42
+ # @private
43
+ DEFAULT_ENDPOINT_TEMPLATE = "networkconnectivity.$UNIVERSE_DOMAIN$"
44
+
45
+ include Paths
46
+
47
+ # @private
48
+ attr_reader :hub_service_stub
49
+
50
+ ##
51
+ # Configure the HubService Client class.
52
+ #
53
+ # See {::Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client::Configuration}
54
+ # for a description of the configuration fields.
55
+ #
56
+ # @example
57
+ #
58
+ # # Modify the configuration for all HubService clients
59
+ # ::Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client.configure do |config|
60
+ # config.timeout = 10.0
61
+ # end
62
+ #
63
+ # @yield [config] Configure the Client client.
64
+ # @yieldparam config [Client::Configuration]
65
+ #
66
+ # @return [Client::Configuration]
67
+ #
68
+ def self.configure
69
+ @configure ||= begin
70
+ namespace = ["Google", "Cloud", "NetworkConnectivity", "V1beta"]
71
+ parent_config = while namespace.any?
72
+ parent_name = namespace.join "::"
73
+ parent_const = const_get parent_name
74
+ break parent_const.configure if parent_const.respond_to? :configure
75
+ namespace.pop
76
+ end
77
+ default_config = Client::Configuration.new parent_config
78
+
79
+ default_config.timeout = 60.0
80
+ default_config.retry_policy = {
81
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
82
+ }
83
+
84
+ default_config.rpcs.create_hub.timeout = 60.0
85
+
86
+ default_config.rpcs.update_hub.timeout = 60.0
87
+
88
+ default_config.rpcs.delete_hub.timeout = 60.0
89
+
90
+ default_config.rpcs.create_spoke.timeout = 60.0
91
+
92
+ default_config.rpcs.update_spoke.timeout = 60.0
93
+
94
+ default_config.rpcs.delete_spoke.timeout = 60.0
95
+
96
+ default_config
97
+ end
98
+ yield @configure if block_given?
99
+ @configure
100
+ end
101
+
102
+ ##
103
+ # Configure the HubService Client instance.
104
+ #
105
+ # The configuration is set to the derived mode, meaning that values can be changed,
106
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
107
+ # should be made on {Client.configure}.
108
+ #
109
+ # See {::Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client::Configuration}
110
+ # for a description of the configuration fields.
111
+ #
112
+ # @yield [config] Configure the Client client.
113
+ # @yieldparam config [Client::Configuration]
114
+ #
115
+ # @return [Client::Configuration]
116
+ #
117
+ def configure
118
+ yield @config if block_given?
119
+ @config
120
+ end
121
+
122
+ ##
123
+ # The effective universe domain
124
+ #
125
+ # @return [String]
126
+ #
127
+ def universe_domain
128
+ @hub_service_stub.universe_domain
129
+ end
130
+
131
+ ##
132
+ # Create a new HubService REST client object.
133
+ #
134
+ # @example
135
+ #
136
+ # # Create a client using the default configuration
137
+ # client = ::Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client.new
138
+ #
139
+ # # Create a client using a custom configuration
140
+ # client = ::Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client.new do |config|
141
+ # config.timeout = 10.0
142
+ # end
143
+ #
144
+ # @yield [config] Configure the HubService client.
145
+ # @yieldparam config [Client::Configuration]
146
+ #
147
+ def initialize
148
+ # Create the configuration object
149
+ @config = Configuration.new Client.configure
150
+
151
+ # Yield the configuration if needed
152
+ yield @config if block_given?
153
+
154
+ # Create credentials
155
+ credentials = @config.credentials
156
+ # Use self-signed JWT if the endpoint is unchanged from default,
157
+ # but only if the default endpoint does not have a region prefix.
158
+ enable_self_signed_jwt = @config.endpoint.nil? ||
159
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
160
+ !@config.endpoint.split(".").first.include?("-"))
161
+ credentials ||= Credentials.default scope: @config.scope,
162
+ enable_self_signed_jwt: enable_self_signed_jwt
163
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
164
+ credentials = Credentials.new credentials, scope: @config.scope
165
+ end
166
+
167
+ @quota_project_id = @config.quota_project
168
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
169
+
170
+ @operations_client = ::Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Operations.new do |config|
171
+ config.credentials = credentials
172
+ config.quota_project = @quota_project_id
173
+ config.endpoint = @config.endpoint
174
+ config.universe_domain = @config.universe_domain
175
+ end
176
+
177
+ @hub_service_stub = ::Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::ServiceStub.new(
178
+ endpoint: @config.endpoint,
179
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
180
+ universe_domain: @config.universe_domain,
181
+ credentials: credentials,
182
+ logger: @config.logger
183
+ )
184
+
185
+ @hub_service_stub.logger(stub: true)&.info do |entry|
186
+ entry.set_system_name
187
+ entry.set_service
188
+ entry.message = "Created client for #{entry.service}"
189
+ entry.set_credentials_fields credentials
190
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
191
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
192
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
193
+ end
194
+
195
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
196
+ config.credentials = credentials
197
+ config.quota_project = @quota_project_id
198
+ config.endpoint = @hub_service_stub.endpoint
199
+ config.universe_domain = @hub_service_stub.universe_domain
200
+ config.bindings_override = @config.bindings_override
201
+ config.logger = @hub_service_stub.logger if config.respond_to? :logger=
202
+ end
203
+
204
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
205
+ config.credentials = credentials
206
+ config.quota_project = @quota_project_id
207
+ config.endpoint = @hub_service_stub.endpoint
208
+ config.universe_domain = @hub_service_stub.universe_domain
209
+ config.bindings_override = @config.bindings_override
210
+ config.logger = @hub_service_stub.logger if config.respond_to? :logger=
211
+ end
212
+ end
213
+
214
+ ##
215
+ # Get the associated client for long-running operations.
216
+ #
217
+ # @return [::Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Operations]
218
+ #
219
+ attr_reader :operations_client
220
+
221
+ ##
222
+ # Get the associated client for mix-in of the Locations.
223
+ #
224
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
225
+ #
226
+ attr_reader :location_client
227
+
228
+ ##
229
+ # Get the associated client for mix-in of the IAMPolicy.
230
+ #
231
+ # @return [Google::Iam::V1::IAMPolicy::Rest::Client]
232
+ #
233
+ attr_reader :iam_policy_client
234
+
235
+ ##
236
+ # The logger used for request/response debug logging.
237
+ #
238
+ # @return [Logger]
239
+ #
240
+ def logger
241
+ @hub_service_stub.logger
242
+ end
243
+
244
+ # Service calls
245
+
246
+ ##
247
+ # Lists the Network Connectivity Center hubs associated with a given project.
248
+ #
249
+ # @overload list_hubs(request, options = nil)
250
+ # Pass arguments to `list_hubs` via a request object, either of type
251
+ # {::Google::Cloud::NetworkConnectivity::V1beta::ListHubsRequest} or an equivalent Hash.
252
+ #
253
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::ListHubsRequest, ::Hash]
254
+ # A request object representing the call parameters. Required. To specify no
255
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
256
+ # @param options [::Gapic::CallOptions, ::Hash]
257
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
258
+ #
259
+ # @overload list_hubs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
260
+ # Pass arguments to `list_hubs` via keyword arguments. Note that at
261
+ # least one keyword argument is required. To specify no parameters, or to keep all
262
+ # the default parameter values, pass an empty Hash as a request object (see above).
263
+ #
264
+ # @param parent [::String]
265
+ # Required. The parent resource's name.
266
+ # @param page_size [::Integer]
267
+ # The maximum number of results per page to return.
268
+ # @param page_token [::String]
269
+ # The page token.
270
+ # @param filter [::String]
271
+ # An expression that filters the list of results.
272
+ # @param order_by [::String]
273
+ # Sort the results by a certain order.
274
+ # @yield [result, operation] Access the result along with the TransportOperation object
275
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::Hub>]
276
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
277
+ #
278
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::Hub>]
279
+ #
280
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
281
+ #
282
+ # @example Basic example
283
+ # require "google/cloud/network_connectivity/v1beta"
284
+ #
285
+ # # Create a client object. The client can be reused for multiple calls.
286
+ # client = Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client.new
287
+ #
288
+ # # Create a request. To set request fields, pass in keyword arguments.
289
+ # request = Google::Cloud::NetworkConnectivity::V1beta::ListHubsRequest.new
290
+ #
291
+ # # Call the list_hubs method.
292
+ # result = client.list_hubs request
293
+ #
294
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
295
+ # # over elements, and API calls will be issued to fetch pages as needed.
296
+ # result.each do |item|
297
+ # # Each element is of type ::Google::Cloud::NetworkConnectivity::V1beta::Hub.
298
+ # p item
299
+ # end
300
+ #
301
+ def list_hubs request, options = nil
302
+ raise ::ArgumentError, "request must be provided" if request.nil?
303
+
304
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::ListHubsRequest
305
+
306
+ # Converts hash and nil to an options object
307
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
308
+
309
+ # Customize the options with defaults
310
+ call_metadata = @config.rpcs.list_hubs.metadata.to_h
311
+
312
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
313
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
314
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
315
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
316
+ transports_version_send: [:rest]
317
+
318
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
319
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
320
+
321
+ options.apply_defaults timeout: @config.rpcs.list_hubs.timeout,
322
+ metadata: call_metadata,
323
+ retry_policy: @config.rpcs.list_hubs.retry_policy
324
+
325
+ options.apply_defaults timeout: @config.timeout,
326
+ metadata: @config.metadata,
327
+ retry_policy: @config.retry_policy
328
+
329
+ @hub_service_stub.list_hubs request, options do |result, operation|
330
+ result = ::Gapic::Rest::PagedEnumerable.new @hub_service_stub, :list_hubs, "hubs", request, result, options
331
+ yield result, operation if block_given?
332
+ throw :response, result
333
+ end
334
+ rescue ::Gapic::Rest::Error => e
335
+ raise ::Google::Cloud::Error.from_error(e)
336
+ end
337
+
338
+ ##
339
+ # Gets details about a Network Connectivity Center hub.
340
+ #
341
+ # @overload get_hub(request, options = nil)
342
+ # Pass arguments to `get_hub` via a request object, either of type
343
+ # {::Google::Cloud::NetworkConnectivity::V1beta::GetHubRequest} or an equivalent Hash.
344
+ #
345
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::GetHubRequest, ::Hash]
346
+ # A request object representing the call parameters. Required. To specify no
347
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
348
+ # @param options [::Gapic::CallOptions, ::Hash]
349
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
350
+ #
351
+ # @overload get_hub(name: nil)
352
+ # Pass arguments to `get_hub` via keyword arguments. Note that at
353
+ # least one keyword argument is required. To specify no parameters, or to keep all
354
+ # the default parameter values, pass an empty Hash as a request object (see above).
355
+ #
356
+ # @param name [::String]
357
+ # Required. The name of the hub resource to get.
358
+ # @yield [result, operation] Access the result along with the TransportOperation object
359
+ # @yieldparam result [::Google::Cloud::NetworkConnectivity::V1beta::Hub]
360
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
361
+ #
362
+ # @return [::Google::Cloud::NetworkConnectivity::V1beta::Hub]
363
+ #
364
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
365
+ #
366
+ # @example Basic example
367
+ # require "google/cloud/network_connectivity/v1beta"
368
+ #
369
+ # # Create a client object. The client can be reused for multiple calls.
370
+ # client = Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client.new
371
+ #
372
+ # # Create a request. To set request fields, pass in keyword arguments.
373
+ # request = Google::Cloud::NetworkConnectivity::V1beta::GetHubRequest.new
374
+ #
375
+ # # Call the get_hub method.
376
+ # result = client.get_hub request
377
+ #
378
+ # # The returned object is of type Google::Cloud::NetworkConnectivity::V1beta::Hub.
379
+ # p result
380
+ #
381
+ def get_hub request, options = nil
382
+ raise ::ArgumentError, "request must be provided" if request.nil?
383
+
384
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::GetHubRequest
385
+
386
+ # Converts hash and nil to an options object
387
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
388
+
389
+ # Customize the options with defaults
390
+ call_metadata = @config.rpcs.get_hub.metadata.to_h
391
+
392
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
393
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
394
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
395
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
396
+ transports_version_send: [:rest]
397
+
398
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
399
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
400
+
401
+ options.apply_defaults timeout: @config.rpcs.get_hub.timeout,
402
+ metadata: call_metadata,
403
+ retry_policy: @config.rpcs.get_hub.retry_policy
404
+
405
+ options.apply_defaults timeout: @config.timeout,
406
+ metadata: @config.metadata,
407
+ retry_policy: @config.retry_policy
408
+
409
+ @hub_service_stub.get_hub request, options do |result, operation|
410
+ yield result, operation if block_given?
411
+ end
412
+ rescue ::Gapic::Rest::Error => e
413
+ raise ::Google::Cloud::Error.from_error(e)
414
+ end
415
+
416
+ ##
417
+ # Creates a new Network Connectivity Center hub in the specified project.
418
+ #
419
+ # @overload create_hub(request, options = nil)
420
+ # Pass arguments to `create_hub` via a request object, either of type
421
+ # {::Google::Cloud::NetworkConnectivity::V1beta::CreateHubRequest} or an equivalent Hash.
422
+ #
423
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::CreateHubRequest, ::Hash]
424
+ # A request object representing the call parameters. Required. To specify no
425
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
426
+ # @param options [::Gapic::CallOptions, ::Hash]
427
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
428
+ #
429
+ # @overload create_hub(parent: nil, hub_id: nil, hub: nil, request_id: nil)
430
+ # Pass arguments to `create_hub` via keyword arguments. Note that at
431
+ # least one keyword argument is required. To specify no parameters, or to keep all
432
+ # the default parameter values, pass an empty Hash as a request object (see above).
433
+ #
434
+ # @param parent [::String]
435
+ # Required. The parent resource.
436
+ # @param hub_id [::String]
437
+ # Required. A unique identifier for the hub.
438
+ # @param hub [::Google::Cloud::NetworkConnectivity::V1beta::Hub, ::Hash]
439
+ # Required. The initial values for a new hub.
440
+ # @param request_id [::String]
441
+ # Optional. A request ID to identify requests. Specify a unique request ID so
442
+ # that if you must retry your request, the server knows to ignore the request
443
+ # if it has already been completed. The server guarantees that a request
444
+ # doesn't result in creation of duplicate commitments for at least 60
445
+ # minutes.
446
+ #
447
+ # For example, consider a situation where you make an initial request and
448
+ # the request times out. If you make the request again with the same request
449
+ # ID, the server can check to see whether the original operation
450
+ # was received. If it was, the server ignores the second request. This
451
+ # behavior prevents clients from mistakenly creating duplicate commitments.
452
+ #
453
+ # The request ID must be a valid UUID, with the exception that zero UUID is
454
+ # not supported (00000000-0000-0000-0000-000000000000).
455
+ # @yield [result, operation] Access the result along with the TransportOperation object
456
+ # @yieldparam result [::Gapic::Operation]
457
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
458
+ #
459
+ # @return [::Gapic::Operation]
460
+ #
461
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
462
+ #
463
+ # @example Basic example
464
+ # require "google/cloud/network_connectivity/v1beta"
465
+ #
466
+ # # Create a client object. The client can be reused for multiple calls.
467
+ # client = Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client.new
468
+ #
469
+ # # Create a request. To set request fields, pass in keyword arguments.
470
+ # request = Google::Cloud::NetworkConnectivity::V1beta::CreateHubRequest.new
471
+ #
472
+ # # Call the create_hub method.
473
+ # result = client.create_hub request
474
+ #
475
+ # # The returned object is of type Gapic::Operation. You can use it to
476
+ # # check the status of an operation, cancel it, or wait for results.
477
+ # # Here is how to wait for a response.
478
+ # result.wait_until_done! timeout: 60
479
+ # if result.response?
480
+ # p result.response
481
+ # else
482
+ # puts "No response received."
483
+ # end
484
+ #
485
+ def create_hub request, options = nil
486
+ raise ::ArgumentError, "request must be provided" if request.nil?
487
+
488
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::CreateHubRequest
489
+
490
+ # Converts hash and nil to an options object
491
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
492
+
493
+ # Customize the options with defaults
494
+ call_metadata = @config.rpcs.create_hub.metadata.to_h
495
+
496
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
497
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
498
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
499
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
500
+ transports_version_send: [:rest]
501
+
502
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
503
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
504
+
505
+ options.apply_defaults timeout: @config.rpcs.create_hub.timeout,
506
+ metadata: call_metadata,
507
+ retry_policy: @config.rpcs.create_hub.retry_policy
508
+
509
+ options.apply_defaults timeout: @config.timeout,
510
+ metadata: @config.metadata,
511
+ retry_policy: @config.retry_policy
512
+
513
+ @hub_service_stub.create_hub request, options do |result, operation|
514
+ result = ::Gapic::Operation.new result, @operations_client, options: options
515
+ yield result, operation if block_given?
516
+ throw :response, result
517
+ end
518
+ rescue ::Gapic::Rest::Error => e
519
+ raise ::Google::Cloud::Error.from_error(e)
520
+ end
521
+
522
+ ##
523
+ # Updates the description and/or labels of a Network Connectivity Center
524
+ # hub.
525
+ #
526
+ # @overload update_hub(request, options = nil)
527
+ # Pass arguments to `update_hub` via a request object, either of type
528
+ # {::Google::Cloud::NetworkConnectivity::V1beta::UpdateHubRequest} or an equivalent Hash.
529
+ #
530
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::UpdateHubRequest, ::Hash]
531
+ # A request object representing the call parameters. Required. To specify no
532
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
533
+ # @param options [::Gapic::CallOptions, ::Hash]
534
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
535
+ #
536
+ # @overload update_hub(update_mask: nil, hub: nil, request_id: nil)
537
+ # Pass arguments to `update_hub` via keyword arguments. Note that at
538
+ # least one keyword argument is required. To specify no parameters, or to keep all
539
+ # the default parameter values, pass an empty Hash as a request object (see above).
540
+ #
541
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
542
+ # Optional. In the case of an update to an existing hub, field mask is used
543
+ # to specify the fields to be overwritten. The fields specified in the
544
+ # update_mask are relative to the resource, not the full request. A field is
545
+ # overwritten if it is in the mask. If the user does not provide a mask, then
546
+ # all fields are overwritten.
547
+ # @param hub [::Google::Cloud::NetworkConnectivity::V1beta::Hub, ::Hash]
548
+ # Required. The state that the hub should be in after the update.
549
+ # @param request_id [::String]
550
+ # Optional. A request ID to identify requests. Specify a unique request ID so
551
+ # that if you must retry your request, the server knows to ignore the request
552
+ # if it has already been completed. The server guarantees that a request
553
+ # doesn't result in creation of duplicate commitments for at least 60
554
+ # minutes.
555
+ #
556
+ # For example, consider a situation where you make an initial request and
557
+ # the request times out. If you make the request again with the same request
558
+ # ID, the server can check to see whether the original operation
559
+ # was received. If it was, the server ignores the second request. This
560
+ # behavior prevents clients from mistakenly creating duplicate commitments.
561
+ #
562
+ # The request ID must be a valid UUID, with the exception that zero UUID is
563
+ # not supported (00000000-0000-0000-0000-000000000000).
564
+ # @yield [result, operation] Access the result along with the TransportOperation object
565
+ # @yieldparam result [::Gapic::Operation]
566
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
567
+ #
568
+ # @return [::Gapic::Operation]
569
+ #
570
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
571
+ #
572
+ # @example Basic example
573
+ # require "google/cloud/network_connectivity/v1beta"
574
+ #
575
+ # # Create a client object. The client can be reused for multiple calls.
576
+ # client = Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client.new
577
+ #
578
+ # # Create a request. To set request fields, pass in keyword arguments.
579
+ # request = Google::Cloud::NetworkConnectivity::V1beta::UpdateHubRequest.new
580
+ #
581
+ # # Call the update_hub method.
582
+ # result = client.update_hub request
583
+ #
584
+ # # The returned object is of type Gapic::Operation. You can use it to
585
+ # # check the status of an operation, cancel it, or wait for results.
586
+ # # Here is how to wait for a response.
587
+ # result.wait_until_done! timeout: 60
588
+ # if result.response?
589
+ # p result.response
590
+ # else
591
+ # puts "No response received."
592
+ # end
593
+ #
594
+ def update_hub request, options = nil
595
+ raise ::ArgumentError, "request must be provided" if request.nil?
596
+
597
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::UpdateHubRequest
598
+
599
+ # Converts hash and nil to an options object
600
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
601
+
602
+ # Customize the options with defaults
603
+ call_metadata = @config.rpcs.update_hub.metadata.to_h
604
+
605
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
606
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
607
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
608
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
609
+ transports_version_send: [:rest]
610
+
611
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
612
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
613
+
614
+ options.apply_defaults timeout: @config.rpcs.update_hub.timeout,
615
+ metadata: call_metadata,
616
+ retry_policy: @config.rpcs.update_hub.retry_policy
617
+
618
+ options.apply_defaults timeout: @config.timeout,
619
+ metadata: @config.metadata,
620
+ retry_policy: @config.retry_policy
621
+
622
+ @hub_service_stub.update_hub request, options do |result, operation|
623
+ result = ::Gapic::Operation.new result, @operations_client, options: options
624
+ yield result, operation if block_given?
625
+ throw :response, result
626
+ end
627
+ rescue ::Gapic::Rest::Error => e
628
+ raise ::Google::Cloud::Error.from_error(e)
629
+ end
630
+
631
+ ##
632
+ # Deletes a Network Connectivity Center hub.
633
+ #
634
+ # @overload delete_hub(request, options = nil)
635
+ # Pass arguments to `delete_hub` via a request object, either of type
636
+ # {::Google::Cloud::NetworkConnectivity::V1beta::DeleteHubRequest} or an equivalent Hash.
637
+ #
638
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::DeleteHubRequest, ::Hash]
639
+ # A request object representing the call parameters. Required. To specify no
640
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
641
+ # @param options [::Gapic::CallOptions, ::Hash]
642
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
643
+ #
644
+ # @overload delete_hub(name: nil, request_id: nil)
645
+ # Pass arguments to `delete_hub` via keyword arguments. Note that at
646
+ # least one keyword argument is required. To specify no parameters, or to keep all
647
+ # the default parameter values, pass an empty Hash as a request object (see above).
648
+ #
649
+ # @param name [::String]
650
+ # Required. The name of the hub to delete.
651
+ # @param request_id [::String]
652
+ # Optional. A request ID to identify requests. Specify a unique request ID so
653
+ # that if you must retry your request, the server knows to ignore the request
654
+ # if it has already been completed. The server guarantees that a request
655
+ # doesn't result in creation of duplicate commitments for at least 60
656
+ # minutes.
657
+ #
658
+ # For example, consider a situation where you make an initial request and
659
+ # the request times out. If you make the request again with the same request
660
+ # ID, the server can check to see whether the original operation
661
+ # was received. If it was, the server ignores the second request. This
662
+ # behavior prevents clients from mistakenly creating duplicate commitments.
663
+ #
664
+ # The request ID must be a valid UUID, with the exception that zero UUID is
665
+ # not supported (00000000-0000-0000-0000-000000000000).
666
+ # @yield [result, operation] Access the result along with the TransportOperation object
667
+ # @yieldparam result [::Gapic::Operation]
668
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
669
+ #
670
+ # @return [::Gapic::Operation]
671
+ #
672
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
673
+ #
674
+ # @example Basic example
675
+ # require "google/cloud/network_connectivity/v1beta"
676
+ #
677
+ # # Create a client object. The client can be reused for multiple calls.
678
+ # client = Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client.new
679
+ #
680
+ # # Create a request. To set request fields, pass in keyword arguments.
681
+ # request = Google::Cloud::NetworkConnectivity::V1beta::DeleteHubRequest.new
682
+ #
683
+ # # Call the delete_hub method.
684
+ # result = client.delete_hub request
685
+ #
686
+ # # The returned object is of type Gapic::Operation. You can use it to
687
+ # # check the status of an operation, cancel it, or wait for results.
688
+ # # Here is how to wait for a response.
689
+ # result.wait_until_done! timeout: 60
690
+ # if result.response?
691
+ # p result.response
692
+ # else
693
+ # puts "No response received."
694
+ # end
695
+ #
696
+ def delete_hub request, options = nil
697
+ raise ::ArgumentError, "request must be provided" if request.nil?
698
+
699
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::DeleteHubRequest
700
+
701
+ # Converts hash and nil to an options object
702
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
703
+
704
+ # Customize the options with defaults
705
+ call_metadata = @config.rpcs.delete_hub.metadata.to_h
706
+
707
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
708
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
709
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
710
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
711
+ transports_version_send: [:rest]
712
+
713
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
714
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
715
+
716
+ options.apply_defaults timeout: @config.rpcs.delete_hub.timeout,
717
+ metadata: call_metadata,
718
+ retry_policy: @config.rpcs.delete_hub.retry_policy
719
+
720
+ options.apply_defaults timeout: @config.timeout,
721
+ metadata: @config.metadata,
722
+ retry_policy: @config.retry_policy
723
+
724
+ @hub_service_stub.delete_hub request, options do |result, operation|
725
+ result = ::Gapic::Operation.new result, @operations_client, options: options
726
+ yield result, operation if block_given?
727
+ throw :response, result
728
+ end
729
+ rescue ::Gapic::Rest::Error => e
730
+ raise ::Google::Cloud::Error.from_error(e)
731
+ end
732
+
733
+ ##
734
+ # Lists the Network Connectivity Center spokes associated with a
735
+ # specified hub and location. The list includes both spokes that are attached
736
+ # to the hub and spokes that have been proposed but not yet accepted.
737
+ #
738
+ # @overload list_hub_spokes(request, options = nil)
739
+ # Pass arguments to `list_hub_spokes` via a request object, either of type
740
+ # {::Google::Cloud::NetworkConnectivity::V1beta::ListHubSpokesRequest} or an equivalent Hash.
741
+ #
742
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::ListHubSpokesRequest, ::Hash]
743
+ # A request object representing the call parameters. Required. To specify no
744
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
745
+ # @param options [::Gapic::CallOptions, ::Hash]
746
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
747
+ #
748
+ # @overload list_hub_spokes(name: nil, spoke_locations: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil)
749
+ # Pass arguments to `list_hub_spokes` via keyword arguments. Note that at
750
+ # least one keyword argument is required. To specify no parameters, or to keep all
751
+ # the default parameter values, pass an empty Hash as a request object (see above).
752
+ #
753
+ # @param name [::String]
754
+ # Required. The name of the hub.
755
+ # @param spoke_locations [::Array<::String>]
756
+ # A list of locations.
757
+ # Specify one of the following: `[global]`, a single region (for
758
+ # example, `[us-central1]`), or a combination of
759
+ # values (for example, `[global, us-central1, us-west1]`).
760
+ # If the spoke_locations field is populated, the list of results
761
+ # includes only spokes in the specified location.
762
+ # If the spoke_locations field is not populated, the list of results
763
+ # includes spokes in all locations.
764
+ # @param page_size [::Integer]
765
+ # The maximum number of results to return per page.
766
+ # @param page_token [::String]
767
+ # The page token.
768
+ # @param filter [::String]
769
+ # An expression that filters the list of results.
770
+ # @param order_by [::String]
771
+ # Sort the results by name or create_time.
772
+ # @param view [::Google::Cloud::NetworkConnectivity::V1beta::ListHubSpokesRequest::SpokeView]
773
+ # The view of the spoke to return.
774
+ # The view that you use determines which spoke fields are included in the
775
+ # response.
776
+ # @yield [result, operation] Access the result along with the TransportOperation object
777
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::Spoke>]
778
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
779
+ #
780
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::Spoke>]
781
+ #
782
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
783
+ #
784
+ # @example Basic example
785
+ # require "google/cloud/network_connectivity/v1beta"
786
+ #
787
+ # # Create a client object. The client can be reused for multiple calls.
788
+ # client = Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client.new
789
+ #
790
+ # # Create a request. To set request fields, pass in keyword arguments.
791
+ # request = Google::Cloud::NetworkConnectivity::V1beta::ListHubSpokesRequest.new
792
+ #
793
+ # # Call the list_hub_spokes method.
794
+ # result = client.list_hub_spokes request
795
+ #
796
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
797
+ # # over elements, and API calls will be issued to fetch pages as needed.
798
+ # result.each do |item|
799
+ # # Each element is of type ::Google::Cloud::NetworkConnectivity::V1beta::Spoke.
800
+ # p item
801
+ # end
802
+ #
803
+ def list_hub_spokes request, options = nil
804
+ raise ::ArgumentError, "request must be provided" if request.nil?
805
+
806
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::ListHubSpokesRequest
807
+
808
+ # Converts hash and nil to an options object
809
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
810
+
811
+ # Customize the options with defaults
812
+ call_metadata = @config.rpcs.list_hub_spokes.metadata.to_h
813
+
814
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
815
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
816
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
817
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
818
+ transports_version_send: [:rest]
819
+
820
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
821
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
822
+
823
+ options.apply_defaults timeout: @config.rpcs.list_hub_spokes.timeout,
824
+ metadata: call_metadata,
825
+ retry_policy: @config.rpcs.list_hub_spokes.retry_policy
826
+
827
+ options.apply_defaults timeout: @config.timeout,
828
+ metadata: @config.metadata,
829
+ retry_policy: @config.retry_policy
830
+
831
+ @hub_service_stub.list_hub_spokes request, options do |result, operation|
832
+ result = ::Gapic::Rest::PagedEnumerable.new @hub_service_stub, :list_hub_spokes, "spokes", request, result, options
833
+ yield result, operation if block_given?
834
+ throw :response, result
835
+ end
836
+ rescue ::Gapic::Rest::Error => e
837
+ raise ::Google::Cloud::Error.from_error(e)
838
+ end
839
+
840
+ ##
841
+ # Query the Private Service Connect propagation status of a Network
842
+ # Connectivity Center hub.
843
+ #
844
+ # @overload query_hub_status(request, options = nil)
845
+ # Pass arguments to `query_hub_status` via a request object, either of type
846
+ # {::Google::Cloud::NetworkConnectivity::V1beta::QueryHubStatusRequest} or an equivalent Hash.
847
+ #
848
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::QueryHubStatusRequest, ::Hash]
849
+ # A request object representing the call parameters. Required. To specify no
850
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
851
+ # @param options [::Gapic::CallOptions, ::Hash]
852
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
853
+ #
854
+ # @overload query_hub_status(name: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, group_by: nil)
855
+ # Pass arguments to `query_hub_status` via keyword arguments. Note that at
856
+ # least one keyword argument is required. To specify no parameters, or to keep all
857
+ # the default parameter values, pass an empty Hash as a request object (see above).
858
+ #
859
+ # @param name [::String]
860
+ # Required. The name of the hub.
861
+ # @param page_size [::Integer]
862
+ # Optional. The maximum number of results to return per page.
863
+ # @param page_token [::String]
864
+ # Optional. The page token.
865
+ # @param filter [::String]
866
+ # Optional. An expression that filters the list of results.
867
+ # The filter can be used to filter the results by the following fields:
868
+ # * `psc_propagation_status.source_spoke`
869
+ # * `psc_propagation_status.source_group`
870
+ # * `psc_propagation_status.source_forwarding_rule`
871
+ # * `psc_propagation_status.target_spoke`
872
+ # * `psc_propagation_status.target_group`
873
+ # * `psc_propagation_status.code`
874
+ # * `psc_propagation_status.message`
875
+ # @param order_by [::String]
876
+ # Optional. Sort the results in ascending order by the specified fields.
877
+ # A comma-separated list of any of these fields:
878
+ # * `psc_propagation_status.source_spoke`
879
+ # * `psc_propagation_status.source_group`
880
+ # * `psc_propagation_status.source_forwarding_rule`
881
+ # * `psc_propagation_status.target_spoke`
882
+ # * `psc_propagation_status.target_group`
883
+ # * `psc_propagation_status.code`
884
+ # If `group_by` is set, the value of the `order_by` field must be the
885
+ # same as or a subset of the `group_by` field.
886
+ # @param group_by [::String]
887
+ # Optional. Aggregate the results by the specified fields.
888
+ # A comma-separated list of any of these fields:
889
+ # * `psc_propagation_status.source_spoke`
890
+ # * `psc_propagation_status.source_group`
891
+ # * `psc_propagation_status.source_forwarding_rule`
892
+ # * `psc_propagation_status.target_spoke`
893
+ # * `psc_propagation_status.target_group`
894
+ # * `psc_propagation_status.code`
895
+ # @yield [result, operation] Access the result along with the TransportOperation object
896
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::HubStatusEntry>]
897
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
898
+ #
899
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::HubStatusEntry>]
900
+ #
901
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
902
+ #
903
+ # @example Basic example
904
+ # require "google/cloud/network_connectivity/v1beta"
905
+ #
906
+ # # Create a client object. The client can be reused for multiple calls.
907
+ # client = Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client.new
908
+ #
909
+ # # Create a request. To set request fields, pass in keyword arguments.
910
+ # request = Google::Cloud::NetworkConnectivity::V1beta::QueryHubStatusRequest.new
911
+ #
912
+ # # Call the query_hub_status method.
913
+ # result = client.query_hub_status request
914
+ #
915
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
916
+ # # over elements, and API calls will be issued to fetch pages as needed.
917
+ # result.each do |item|
918
+ # # Each element is of type ::Google::Cloud::NetworkConnectivity::V1beta::HubStatusEntry.
919
+ # p item
920
+ # end
921
+ #
922
+ def query_hub_status request, options = nil
923
+ raise ::ArgumentError, "request must be provided" if request.nil?
924
+
925
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::QueryHubStatusRequest
926
+
927
+ # Converts hash and nil to an options object
928
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
929
+
930
+ # Customize the options with defaults
931
+ call_metadata = @config.rpcs.query_hub_status.metadata.to_h
932
+
933
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
934
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
935
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
936
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
937
+ transports_version_send: [:rest]
938
+
939
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
940
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
941
+
942
+ options.apply_defaults timeout: @config.rpcs.query_hub_status.timeout,
943
+ metadata: call_metadata,
944
+ retry_policy: @config.rpcs.query_hub_status.retry_policy
945
+
946
+ options.apply_defaults timeout: @config.timeout,
947
+ metadata: @config.metadata,
948
+ retry_policy: @config.retry_policy
949
+
950
+ @hub_service_stub.query_hub_status request, options do |result, operation|
951
+ result = ::Gapic::Rest::PagedEnumerable.new @hub_service_stub, :query_hub_status, "hub_status_entries", request, result, options
952
+ yield result, operation if block_given?
953
+ throw :response, result
954
+ end
955
+ rescue ::Gapic::Rest::Error => e
956
+ raise ::Google::Cloud::Error.from_error(e)
957
+ end
958
+
959
+ ##
960
+ # Lists the Network Connectivity Center spokes in a specified project and
961
+ # location.
962
+ #
963
+ # @overload list_spokes(request, options = nil)
964
+ # Pass arguments to `list_spokes` via a request object, either of type
965
+ # {::Google::Cloud::NetworkConnectivity::V1beta::ListSpokesRequest} or an equivalent Hash.
966
+ #
967
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::ListSpokesRequest, ::Hash]
968
+ # A request object representing the call parameters. Required. To specify no
969
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
970
+ # @param options [::Gapic::CallOptions, ::Hash]
971
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
972
+ #
973
+ # @overload list_spokes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
974
+ # Pass arguments to `list_spokes` via keyword arguments. Note that at
975
+ # least one keyword argument is required. To specify no parameters, or to keep all
976
+ # the default parameter values, pass an empty Hash as a request object (see above).
977
+ #
978
+ # @param parent [::String]
979
+ # Required. The parent resource.
980
+ # @param page_size [::Integer]
981
+ # The maximum number of results to return per page.
982
+ # @param page_token [::String]
983
+ # The page token.
984
+ # @param filter [::String]
985
+ # An expression that filters the list of results.
986
+ # @param order_by [::String]
987
+ # Sort the results by a certain order.
988
+ # @yield [result, operation] Access the result along with the TransportOperation object
989
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::Spoke>]
990
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
991
+ #
992
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::Spoke>]
993
+ #
994
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
995
+ #
996
+ # @example Basic example
997
+ # require "google/cloud/network_connectivity/v1beta"
998
+ #
999
+ # # Create a client object. The client can be reused for multiple calls.
1000
+ # client = Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client.new
1001
+ #
1002
+ # # Create a request. To set request fields, pass in keyword arguments.
1003
+ # request = Google::Cloud::NetworkConnectivity::V1beta::ListSpokesRequest.new
1004
+ #
1005
+ # # Call the list_spokes method.
1006
+ # result = client.list_spokes request
1007
+ #
1008
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1009
+ # # over elements, and API calls will be issued to fetch pages as needed.
1010
+ # result.each do |item|
1011
+ # # Each element is of type ::Google::Cloud::NetworkConnectivity::V1beta::Spoke.
1012
+ # p item
1013
+ # end
1014
+ #
1015
+ def list_spokes request, options = nil
1016
+ raise ::ArgumentError, "request must be provided" if request.nil?
1017
+
1018
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::ListSpokesRequest
1019
+
1020
+ # Converts hash and nil to an options object
1021
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1022
+
1023
+ # Customize the options with defaults
1024
+ call_metadata = @config.rpcs.list_spokes.metadata.to_h
1025
+
1026
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1027
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1028
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1029
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
1030
+ transports_version_send: [:rest]
1031
+
1032
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1033
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1034
+
1035
+ options.apply_defaults timeout: @config.rpcs.list_spokes.timeout,
1036
+ metadata: call_metadata,
1037
+ retry_policy: @config.rpcs.list_spokes.retry_policy
1038
+
1039
+ options.apply_defaults timeout: @config.timeout,
1040
+ metadata: @config.metadata,
1041
+ retry_policy: @config.retry_policy
1042
+
1043
+ @hub_service_stub.list_spokes request, options do |result, operation|
1044
+ result = ::Gapic::Rest::PagedEnumerable.new @hub_service_stub, :list_spokes, "spokes", request, result, options
1045
+ yield result, operation if block_given?
1046
+ throw :response, result
1047
+ end
1048
+ rescue ::Gapic::Rest::Error => e
1049
+ raise ::Google::Cloud::Error.from_error(e)
1050
+ end
1051
+
1052
+ ##
1053
+ # Gets details about a Network Connectivity Center spoke.
1054
+ #
1055
+ # @overload get_spoke(request, options = nil)
1056
+ # Pass arguments to `get_spoke` via a request object, either of type
1057
+ # {::Google::Cloud::NetworkConnectivity::V1beta::GetSpokeRequest} or an equivalent Hash.
1058
+ #
1059
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::GetSpokeRequest, ::Hash]
1060
+ # A request object representing the call parameters. Required. To specify no
1061
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1062
+ # @param options [::Gapic::CallOptions, ::Hash]
1063
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1064
+ #
1065
+ # @overload get_spoke(name: nil)
1066
+ # Pass arguments to `get_spoke` via keyword arguments. Note that at
1067
+ # least one keyword argument is required. To specify no parameters, or to keep all
1068
+ # the default parameter values, pass an empty Hash as a request object (see above).
1069
+ #
1070
+ # @param name [::String]
1071
+ # Required. The name of the spoke resource.
1072
+ # @yield [result, operation] Access the result along with the TransportOperation object
1073
+ # @yieldparam result [::Google::Cloud::NetworkConnectivity::V1beta::Spoke]
1074
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1075
+ #
1076
+ # @return [::Google::Cloud::NetworkConnectivity::V1beta::Spoke]
1077
+ #
1078
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1079
+ #
1080
+ # @example Basic example
1081
+ # require "google/cloud/network_connectivity/v1beta"
1082
+ #
1083
+ # # Create a client object. The client can be reused for multiple calls.
1084
+ # client = Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client.new
1085
+ #
1086
+ # # Create a request. To set request fields, pass in keyword arguments.
1087
+ # request = Google::Cloud::NetworkConnectivity::V1beta::GetSpokeRequest.new
1088
+ #
1089
+ # # Call the get_spoke method.
1090
+ # result = client.get_spoke request
1091
+ #
1092
+ # # The returned object is of type Google::Cloud::NetworkConnectivity::V1beta::Spoke.
1093
+ # p result
1094
+ #
1095
+ def get_spoke request, options = nil
1096
+ raise ::ArgumentError, "request must be provided" if request.nil?
1097
+
1098
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::GetSpokeRequest
1099
+
1100
+ # Converts hash and nil to an options object
1101
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1102
+
1103
+ # Customize the options with defaults
1104
+ call_metadata = @config.rpcs.get_spoke.metadata.to_h
1105
+
1106
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1107
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1108
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1109
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
1110
+ transports_version_send: [:rest]
1111
+
1112
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1113
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1114
+
1115
+ options.apply_defaults timeout: @config.rpcs.get_spoke.timeout,
1116
+ metadata: call_metadata,
1117
+ retry_policy: @config.rpcs.get_spoke.retry_policy
1118
+
1119
+ options.apply_defaults timeout: @config.timeout,
1120
+ metadata: @config.metadata,
1121
+ retry_policy: @config.retry_policy
1122
+
1123
+ @hub_service_stub.get_spoke request, options do |result, operation|
1124
+ yield result, operation if block_given?
1125
+ end
1126
+ rescue ::Gapic::Rest::Error => e
1127
+ raise ::Google::Cloud::Error.from_error(e)
1128
+ end
1129
+
1130
+ ##
1131
+ # Creates a Network Connectivity Center spoke.
1132
+ #
1133
+ # @overload create_spoke(request, options = nil)
1134
+ # Pass arguments to `create_spoke` via a request object, either of type
1135
+ # {::Google::Cloud::NetworkConnectivity::V1beta::CreateSpokeRequest} or an equivalent Hash.
1136
+ #
1137
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::CreateSpokeRequest, ::Hash]
1138
+ # A request object representing the call parameters. Required. To specify no
1139
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1140
+ # @param options [::Gapic::CallOptions, ::Hash]
1141
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1142
+ #
1143
+ # @overload create_spoke(parent: nil, spoke_id: nil, spoke: nil, request_id: nil)
1144
+ # Pass arguments to `create_spoke` via keyword arguments. Note that at
1145
+ # least one keyword argument is required. To specify no parameters, or to keep all
1146
+ # the default parameter values, pass an empty Hash as a request object (see above).
1147
+ #
1148
+ # @param parent [::String]
1149
+ # Required. The parent resource.
1150
+ # @param spoke_id [::String]
1151
+ # Required. Unique id for the spoke to create.
1152
+ # @param spoke [::Google::Cloud::NetworkConnectivity::V1beta::Spoke, ::Hash]
1153
+ # Required. The initial values for a new spoke.
1154
+ # @param request_id [::String]
1155
+ # Optional. A request ID to identify requests. Specify a unique request ID so
1156
+ # that if you must retry your request, the server knows to ignore the request
1157
+ # if it has already been completed. The server guarantees that a request
1158
+ # doesn't result in creation of duplicate commitments for at least 60
1159
+ # minutes.
1160
+ #
1161
+ # For example, consider a situation where you make an initial request and
1162
+ # the request times out. If you make the request again with the same request
1163
+ # ID, the server can check to see whether the original operation
1164
+ # was received. If it was, the server ignores the second request. This
1165
+ # behavior prevents clients from mistakenly creating duplicate commitments.
1166
+ #
1167
+ # The request ID must be a valid UUID, with the exception that zero UUID is
1168
+ # not supported (00000000-0000-0000-0000-000000000000).
1169
+ # @yield [result, operation] Access the result along with the TransportOperation object
1170
+ # @yieldparam result [::Gapic::Operation]
1171
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1172
+ #
1173
+ # @return [::Gapic::Operation]
1174
+ #
1175
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1176
+ #
1177
+ # @example Basic example
1178
+ # require "google/cloud/network_connectivity/v1beta"
1179
+ #
1180
+ # # Create a client object. The client can be reused for multiple calls.
1181
+ # client = Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client.new
1182
+ #
1183
+ # # Create a request. To set request fields, pass in keyword arguments.
1184
+ # request = Google::Cloud::NetworkConnectivity::V1beta::CreateSpokeRequest.new
1185
+ #
1186
+ # # Call the create_spoke method.
1187
+ # result = client.create_spoke request
1188
+ #
1189
+ # # The returned object is of type Gapic::Operation. You can use it to
1190
+ # # check the status of an operation, cancel it, or wait for results.
1191
+ # # Here is how to wait for a response.
1192
+ # result.wait_until_done! timeout: 60
1193
+ # if result.response?
1194
+ # p result.response
1195
+ # else
1196
+ # puts "No response received."
1197
+ # end
1198
+ #
1199
+ def create_spoke request, options = nil
1200
+ raise ::ArgumentError, "request must be provided" if request.nil?
1201
+
1202
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::CreateSpokeRequest
1203
+
1204
+ # Converts hash and nil to an options object
1205
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1206
+
1207
+ # Customize the options with defaults
1208
+ call_metadata = @config.rpcs.create_spoke.metadata.to_h
1209
+
1210
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1211
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1212
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1213
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
1214
+ transports_version_send: [:rest]
1215
+
1216
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1217
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1218
+
1219
+ options.apply_defaults timeout: @config.rpcs.create_spoke.timeout,
1220
+ metadata: call_metadata,
1221
+ retry_policy: @config.rpcs.create_spoke.retry_policy
1222
+
1223
+ options.apply_defaults timeout: @config.timeout,
1224
+ metadata: @config.metadata,
1225
+ retry_policy: @config.retry_policy
1226
+
1227
+ @hub_service_stub.create_spoke request, options do |result, operation|
1228
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1229
+ yield result, operation if block_given?
1230
+ throw :response, result
1231
+ end
1232
+ rescue ::Gapic::Rest::Error => e
1233
+ raise ::Google::Cloud::Error.from_error(e)
1234
+ end
1235
+
1236
+ ##
1237
+ # Updates the parameters of a Network Connectivity Center spoke.
1238
+ #
1239
+ # @overload update_spoke(request, options = nil)
1240
+ # Pass arguments to `update_spoke` via a request object, either of type
1241
+ # {::Google::Cloud::NetworkConnectivity::V1beta::UpdateSpokeRequest} or an equivalent Hash.
1242
+ #
1243
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::UpdateSpokeRequest, ::Hash]
1244
+ # A request object representing the call parameters. Required. To specify no
1245
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1246
+ # @param options [::Gapic::CallOptions, ::Hash]
1247
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1248
+ #
1249
+ # @overload update_spoke(update_mask: nil, spoke: nil, request_id: nil)
1250
+ # Pass arguments to `update_spoke` via keyword arguments. Note that at
1251
+ # least one keyword argument is required. To specify no parameters, or to keep all
1252
+ # the default parameter values, pass an empty Hash as a request object (see above).
1253
+ #
1254
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1255
+ # Optional. In the case of an update to an existing spoke, field mask is used
1256
+ # to specify the fields to be overwritten. The fields specified in the
1257
+ # update_mask are relative to the resource, not the full request. A field is
1258
+ # overwritten if it is in the mask. If the user does not provide a mask, then
1259
+ # all fields are overwritten.
1260
+ # @param spoke [::Google::Cloud::NetworkConnectivity::V1beta::Spoke, ::Hash]
1261
+ # Required. The state that the spoke should be in after the update.
1262
+ # @param request_id [::String]
1263
+ # Optional. A request ID to identify requests. Specify a unique request ID so
1264
+ # that if you must retry your request, the server knows to ignore the request
1265
+ # if it has already been completed. The server guarantees that a request
1266
+ # doesn't result in creation of duplicate commitments for at least 60
1267
+ # minutes.
1268
+ #
1269
+ # For example, consider a situation where you make an initial request and
1270
+ # the request times out. If you make the request again with the same request
1271
+ # ID, the server can check to see whether the original operation
1272
+ # was received. If it was, the server ignores the second request. This
1273
+ # behavior prevents clients from mistakenly creating duplicate commitments.
1274
+ #
1275
+ # The request ID must be a valid UUID, with the exception that zero UUID is
1276
+ # not supported (00000000-0000-0000-0000-000000000000).
1277
+ # @yield [result, operation] Access the result along with the TransportOperation object
1278
+ # @yieldparam result [::Gapic::Operation]
1279
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1280
+ #
1281
+ # @return [::Gapic::Operation]
1282
+ #
1283
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1284
+ #
1285
+ # @example Basic example
1286
+ # require "google/cloud/network_connectivity/v1beta"
1287
+ #
1288
+ # # Create a client object. The client can be reused for multiple calls.
1289
+ # client = Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client.new
1290
+ #
1291
+ # # Create a request. To set request fields, pass in keyword arguments.
1292
+ # request = Google::Cloud::NetworkConnectivity::V1beta::UpdateSpokeRequest.new
1293
+ #
1294
+ # # Call the update_spoke method.
1295
+ # result = client.update_spoke request
1296
+ #
1297
+ # # The returned object is of type Gapic::Operation. You can use it to
1298
+ # # check the status of an operation, cancel it, or wait for results.
1299
+ # # Here is how to wait for a response.
1300
+ # result.wait_until_done! timeout: 60
1301
+ # if result.response?
1302
+ # p result.response
1303
+ # else
1304
+ # puts "No response received."
1305
+ # end
1306
+ #
1307
+ def update_spoke request, options = nil
1308
+ raise ::ArgumentError, "request must be provided" if request.nil?
1309
+
1310
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::UpdateSpokeRequest
1311
+
1312
+ # Converts hash and nil to an options object
1313
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1314
+
1315
+ # Customize the options with defaults
1316
+ call_metadata = @config.rpcs.update_spoke.metadata.to_h
1317
+
1318
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1319
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1320
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1321
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
1322
+ transports_version_send: [:rest]
1323
+
1324
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1325
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1326
+
1327
+ options.apply_defaults timeout: @config.rpcs.update_spoke.timeout,
1328
+ metadata: call_metadata,
1329
+ retry_policy: @config.rpcs.update_spoke.retry_policy
1330
+
1331
+ options.apply_defaults timeout: @config.timeout,
1332
+ metadata: @config.metadata,
1333
+ retry_policy: @config.retry_policy
1334
+
1335
+ @hub_service_stub.update_spoke request, options do |result, operation|
1336
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1337
+ yield result, operation if block_given?
1338
+ throw :response, result
1339
+ end
1340
+ rescue ::Gapic::Rest::Error => e
1341
+ raise ::Google::Cloud::Error.from_error(e)
1342
+ end
1343
+
1344
+ ##
1345
+ # Rejects a Network Connectivity Center spoke from being attached to a hub.
1346
+ # If the spoke was previously in the `ACTIVE` state, it
1347
+ # transitions to the `INACTIVE` state and is no longer able to
1348
+ # connect to other spokes that are attached to the hub.
1349
+ #
1350
+ # @overload reject_hub_spoke(request, options = nil)
1351
+ # Pass arguments to `reject_hub_spoke` via a request object, either of type
1352
+ # {::Google::Cloud::NetworkConnectivity::V1beta::RejectHubSpokeRequest} or an equivalent Hash.
1353
+ #
1354
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::RejectHubSpokeRequest, ::Hash]
1355
+ # A request object representing the call parameters. Required. To specify no
1356
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1357
+ # @param options [::Gapic::CallOptions, ::Hash]
1358
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1359
+ #
1360
+ # @overload reject_hub_spoke(name: nil, spoke_uri: nil, request_id: nil, details: nil)
1361
+ # Pass arguments to `reject_hub_spoke` via keyword arguments. Note that at
1362
+ # least one keyword argument is required. To specify no parameters, or to keep all
1363
+ # the default parameter values, pass an empty Hash as a request object (see above).
1364
+ #
1365
+ # @param name [::String]
1366
+ # Required. The name of the hub from which to reject the spoke.
1367
+ # @param spoke_uri [::String]
1368
+ # Required. The URI of the spoke to reject from the hub.
1369
+ # @param request_id [::String]
1370
+ # Optional. A request ID to identify requests. Specify a unique request ID so
1371
+ # that if you must retry your request, the server knows to ignore the request
1372
+ # if it has already been completed. The server guarantees that a request
1373
+ # doesn't result in creation of duplicate commitments for at least 60
1374
+ # minutes.
1375
+ #
1376
+ # For example, consider a situation where you make an initial request and
1377
+ # the request times out. If you make the request again with the same request
1378
+ # ID, the server can check to see whether the original operation
1379
+ # was received. If it was, the server ignores the second request. This
1380
+ # behavior prevents clients from mistakenly creating duplicate commitments.
1381
+ #
1382
+ # The request ID must be a valid UUID, with the exception that zero UUID is
1383
+ # not supported (00000000-0000-0000-0000-000000000000).
1384
+ # @param details [::String]
1385
+ # Optional. Additional information provided by the hub administrator.
1386
+ # @yield [result, operation] Access the result along with the TransportOperation object
1387
+ # @yieldparam result [::Gapic::Operation]
1388
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1389
+ #
1390
+ # @return [::Gapic::Operation]
1391
+ #
1392
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1393
+ #
1394
+ # @example Basic example
1395
+ # require "google/cloud/network_connectivity/v1beta"
1396
+ #
1397
+ # # Create a client object. The client can be reused for multiple calls.
1398
+ # client = Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client.new
1399
+ #
1400
+ # # Create a request. To set request fields, pass in keyword arguments.
1401
+ # request = Google::Cloud::NetworkConnectivity::V1beta::RejectHubSpokeRequest.new
1402
+ #
1403
+ # # Call the reject_hub_spoke method.
1404
+ # result = client.reject_hub_spoke request
1405
+ #
1406
+ # # The returned object is of type Gapic::Operation. You can use it to
1407
+ # # check the status of an operation, cancel it, or wait for results.
1408
+ # # Here is how to wait for a response.
1409
+ # result.wait_until_done! timeout: 60
1410
+ # if result.response?
1411
+ # p result.response
1412
+ # else
1413
+ # puts "No response received."
1414
+ # end
1415
+ #
1416
+ def reject_hub_spoke request, options = nil
1417
+ raise ::ArgumentError, "request must be provided" if request.nil?
1418
+
1419
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::RejectHubSpokeRequest
1420
+
1421
+ # Converts hash and nil to an options object
1422
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1423
+
1424
+ # Customize the options with defaults
1425
+ call_metadata = @config.rpcs.reject_hub_spoke.metadata.to_h
1426
+
1427
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1428
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1429
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1430
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
1431
+ transports_version_send: [:rest]
1432
+
1433
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1434
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1435
+
1436
+ options.apply_defaults timeout: @config.rpcs.reject_hub_spoke.timeout,
1437
+ metadata: call_metadata,
1438
+ retry_policy: @config.rpcs.reject_hub_spoke.retry_policy
1439
+
1440
+ options.apply_defaults timeout: @config.timeout,
1441
+ metadata: @config.metadata,
1442
+ retry_policy: @config.retry_policy
1443
+
1444
+ @hub_service_stub.reject_hub_spoke request, options do |result, operation|
1445
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1446
+ yield result, operation if block_given?
1447
+ throw :response, result
1448
+ end
1449
+ rescue ::Gapic::Rest::Error => e
1450
+ raise ::Google::Cloud::Error.from_error(e)
1451
+ end
1452
+
1453
+ ##
1454
+ # Accepts a proposal to attach a Network Connectivity Center spoke
1455
+ # to a hub.
1456
+ #
1457
+ # @overload accept_hub_spoke(request, options = nil)
1458
+ # Pass arguments to `accept_hub_spoke` via a request object, either of type
1459
+ # {::Google::Cloud::NetworkConnectivity::V1beta::AcceptHubSpokeRequest} or an equivalent Hash.
1460
+ #
1461
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::AcceptHubSpokeRequest, ::Hash]
1462
+ # A request object representing the call parameters. Required. To specify no
1463
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1464
+ # @param options [::Gapic::CallOptions, ::Hash]
1465
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1466
+ #
1467
+ # @overload accept_hub_spoke(name: nil, spoke_uri: nil, request_id: nil)
1468
+ # Pass arguments to `accept_hub_spoke` via keyword arguments. Note that at
1469
+ # least one keyword argument is required. To specify no parameters, or to keep all
1470
+ # the default parameter values, pass an empty Hash as a request object (see above).
1471
+ #
1472
+ # @param name [::String]
1473
+ # Required. The name of the hub into which to accept the spoke.
1474
+ # @param spoke_uri [::String]
1475
+ # Required. The URI of the spoke to accept into the hub.
1476
+ # @param request_id [::String]
1477
+ # Optional. A request ID to identify requests. Specify a unique request ID so
1478
+ # that if you must retry your request, the server knows to ignore the request
1479
+ # if it has already been completed. The server guarantees that a request
1480
+ # doesn't result in creation of duplicate commitments for at least 60
1481
+ # minutes.
1482
+ #
1483
+ # For example, consider a situation where you make an initial request and
1484
+ # the request times out. If you make the request again with the same request
1485
+ # ID, the server can check to see whether the original operation
1486
+ # was received. If it was, the server ignores the second request. This
1487
+ # behavior prevents clients from mistakenly creating duplicate commitments.
1488
+ #
1489
+ # The request ID must be a valid UUID, with the exception that zero UUID is
1490
+ # not supported (00000000-0000-0000-0000-000000000000).
1491
+ # @yield [result, operation] Access the result along with the TransportOperation object
1492
+ # @yieldparam result [::Gapic::Operation]
1493
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1494
+ #
1495
+ # @return [::Gapic::Operation]
1496
+ #
1497
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1498
+ #
1499
+ # @example Basic example
1500
+ # require "google/cloud/network_connectivity/v1beta"
1501
+ #
1502
+ # # Create a client object. The client can be reused for multiple calls.
1503
+ # client = Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client.new
1504
+ #
1505
+ # # Create a request. To set request fields, pass in keyword arguments.
1506
+ # request = Google::Cloud::NetworkConnectivity::V1beta::AcceptHubSpokeRequest.new
1507
+ #
1508
+ # # Call the accept_hub_spoke method.
1509
+ # result = client.accept_hub_spoke request
1510
+ #
1511
+ # # The returned object is of type Gapic::Operation. You can use it to
1512
+ # # check the status of an operation, cancel it, or wait for results.
1513
+ # # Here is how to wait for a response.
1514
+ # result.wait_until_done! timeout: 60
1515
+ # if result.response?
1516
+ # p result.response
1517
+ # else
1518
+ # puts "No response received."
1519
+ # end
1520
+ #
1521
+ def accept_hub_spoke request, options = nil
1522
+ raise ::ArgumentError, "request must be provided" if request.nil?
1523
+
1524
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::AcceptHubSpokeRequest
1525
+
1526
+ # Converts hash and nil to an options object
1527
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1528
+
1529
+ # Customize the options with defaults
1530
+ call_metadata = @config.rpcs.accept_hub_spoke.metadata.to_h
1531
+
1532
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1533
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1534
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1535
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
1536
+ transports_version_send: [:rest]
1537
+
1538
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1539
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1540
+
1541
+ options.apply_defaults timeout: @config.rpcs.accept_hub_spoke.timeout,
1542
+ metadata: call_metadata,
1543
+ retry_policy: @config.rpcs.accept_hub_spoke.retry_policy
1544
+
1545
+ options.apply_defaults timeout: @config.timeout,
1546
+ metadata: @config.metadata,
1547
+ retry_policy: @config.retry_policy
1548
+
1549
+ @hub_service_stub.accept_hub_spoke request, options do |result, operation|
1550
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1551
+ yield result, operation if block_given?
1552
+ throw :response, result
1553
+ end
1554
+ rescue ::Gapic::Rest::Error => e
1555
+ raise ::Google::Cloud::Error.from_error(e)
1556
+ end
1557
+
1558
+ ##
1559
+ # Accepts a proposal to update a Network Connectivity Center spoke in a hub.
1560
+ #
1561
+ # @overload accept_spoke_update(request, options = nil)
1562
+ # Pass arguments to `accept_spoke_update` via a request object, either of type
1563
+ # {::Google::Cloud::NetworkConnectivity::V1beta::AcceptSpokeUpdateRequest} or an equivalent Hash.
1564
+ #
1565
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::AcceptSpokeUpdateRequest, ::Hash]
1566
+ # A request object representing the call parameters. Required. To specify no
1567
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1568
+ # @param options [::Gapic::CallOptions, ::Hash]
1569
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1570
+ #
1571
+ # @overload accept_spoke_update(name: nil, spoke_uri: nil, spoke_etag: nil, request_id: nil)
1572
+ # Pass arguments to `accept_spoke_update` via keyword arguments. Note that at
1573
+ # least one keyword argument is required. To specify no parameters, or to keep all
1574
+ # the default parameter values, pass an empty Hash as a request object (see above).
1575
+ #
1576
+ # @param name [::String]
1577
+ # Required. The name of the hub to accept spoke update.
1578
+ # @param spoke_uri [::String]
1579
+ # Required. The URI of the spoke to accept update.
1580
+ # @param spoke_etag [::String]
1581
+ # Required. The etag of the spoke to accept update.
1582
+ # @param request_id [::String]
1583
+ # Optional. A request ID to identify requests. Specify a unique request ID so
1584
+ # that if you must retry your request, the server knows to ignore the request
1585
+ # if it has already been completed. The server guarantees that a request
1586
+ # doesn't result in creation of duplicate commitments for at least 60
1587
+ # minutes.
1588
+ #
1589
+ # For example, consider a situation where you make an initial request and
1590
+ # the request times out. If you make the request again with the same request
1591
+ # ID, the server can check to see whether the original operation
1592
+ # was received. If it was, the server ignores the second request. This
1593
+ # behavior prevents clients from mistakenly creating duplicate commitments.
1594
+ #
1595
+ # The request ID must be a valid UUID, with the exception that zero UUID is
1596
+ # not supported (00000000-0000-0000-0000-000000000000).
1597
+ # @yield [result, operation] Access the result along with the TransportOperation object
1598
+ # @yieldparam result [::Gapic::Operation]
1599
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1600
+ #
1601
+ # @return [::Gapic::Operation]
1602
+ #
1603
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1604
+ #
1605
+ # @example Basic example
1606
+ # require "google/cloud/network_connectivity/v1beta"
1607
+ #
1608
+ # # Create a client object. The client can be reused for multiple calls.
1609
+ # client = Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client.new
1610
+ #
1611
+ # # Create a request. To set request fields, pass in keyword arguments.
1612
+ # request = Google::Cloud::NetworkConnectivity::V1beta::AcceptSpokeUpdateRequest.new
1613
+ #
1614
+ # # Call the accept_spoke_update method.
1615
+ # result = client.accept_spoke_update request
1616
+ #
1617
+ # # The returned object is of type Gapic::Operation. You can use it to
1618
+ # # check the status of an operation, cancel it, or wait for results.
1619
+ # # Here is how to wait for a response.
1620
+ # result.wait_until_done! timeout: 60
1621
+ # if result.response?
1622
+ # p result.response
1623
+ # else
1624
+ # puts "No response received."
1625
+ # end
1626
+ #
1627
+ def accept_spoke_update request, options = nil
1628
+ raise ::ArgumentError, "request must be provided" if request.nil?
1629
+
1630
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::AcceptSpokeUpdateRequest
1631
+
1632
+ # Converts hash and nil to an options object
1633
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1634
+
1635
+ # Customize the options with defaults
1636
+ call_metadata = @config.rpcs.accept_spoke_update.metadata.to_h
1637
+
1638
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1639
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1640
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1641
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
1642
+ transports_version_send: [:rest]
1643
+
1644
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1645
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1646
+
1647
+ options.apply_defaults timeout: @config.rpcs.accept_spoke_update.timeout,
1648
+ metadata: call_metadata,
1649
+ retry_policy: @config.rpcs.accept_spoke_update.retry_policy
1650
+
1651
+ options.apply_defaults timeout: @config.timeout,
1652
+ metadata: @config.metadata,
1653
+ retry_policy: @config.retry_policy
1654
+
1655
+ @hub_service_stub.accept_spoke_update request, options do |result, operation|
1656
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1657
+ yield result, operation if block_given?
1658
+ throw :response, result
1659
+ end
1660
+ rescue ::Gapic::Rest::Error => e
1661
+ raise ::Google::Cloud::Error.from_error(e)
1662
+ end
1663
+
1664
+ ##
1665
+ # Rejects a proposal to update a Network Connectivity Center spoke in a hub.
1666
+ #
1667
+ # @overload reject_spoke_update(request, options = nil)
1668
+ # Pass arguments to `reject_spoke_update` via a request object, either of type
1669
+ # {::Google::Cloud::NetworkConnectivity::V1beta::RejectSpokeUpdateRequest} or an equivalent Hash.
1670
+ #
1671
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::RejectSpokeUpdateRequest, ::Hash]
1672
+ # A request object representing the call parameters. Required. To specify no
1673
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1674
+ # @param options [::Gapic::CallOptions, ::Hash]
1675
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1676
+ #
1677
+ # @overload reject_spoke_update(name: nil, spoke_uri: nil, spoke_etag: nil, details: nil, request_id: nil)
1678
+ # Pass arguments to `reject_spoke_update` via keyword arguments. Note that at
1679
+ # least one keyword argument is required. To specify no parameters, or to keep all
1680
+ # the default parameter values, pass an empty Hash as a request object (see above).
1681
+ #
1682
+ # @param name [::String]
1683
+ # Required. The name of the hub to reject spoke update.
1684
+ # @param spoke_uri [::String]
1685
+ # Required. The URI of the spoke to reject update.
1686
+ # @param spoke_etag [::String]
1687
+ # Required. The etag of the spoke to reject update.
1688
+ # @param details [::String]
1689
+ # Optional. Additional information provided by the hub administrator.
1690
+ # @param request_id [::String]
1691
+ # Optional. A request ID to identify requests. Specify a unique request ID so
1692
+ # that if you must retry your request, the server knows to ignore the request
1693
+ # if it has already been completed. The server guarantees that a request
1694
+ # doesn't result in creation of duplicate commitments for at least 60
1695
+ # minutes.
1696
+ #
1697
+ # For example, consider a situation where you make an initial request and
1698
+ # the request times out. If you make the request again with the same request
1699
+ # ID, the server can check to see whether the original operation
1700
+ # was received. If it was, the server ignores the second request. This
1701
+ # behavior prevents clients from mistakenly creating duplicate commitments.
1702
+ #
1703
+ # The request ID must be a valid UUID, with the exception that zero UUID is
1704
+ # not supported (00000000-0000-0000-0000-000000000000).
1705
+ # @yield [result, operation] Access the result along with the TransportOperation object
1706
+ # @yieldparam result [::Gapic::Operation]
1707
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1708
+ #
1709
+ # @return [::Gapic::Operation]
1710
+ #
1711
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1712
+ #
1713
+ # @example Basic example
1714
+ # require "google/cloud/network_connectivity/v1beta"
1715
+ #
1716
+ # # Create a client object. The client can be reused for multiple calls.
1717
+ # client = Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client.new
1718
+ #
1719
+ # # Create a request. To set request fields, pass in keyword arguments.
1720
+ # request = Google::Cloud::NetworkConnectivity::V1beta::RejectSpokeUpdateRequest.new
1721
+ #
1722
+ # # Call the reject_spoke_update method.
1723
+ # result = client.reject_spoke_update request
1724
+ #
1725
+ # # The returned object is of type Gapic::Operation. You can use it to
1726
+ # # check the status of an operation, cancel it, or wait for results.
1727
+ # # Here is how to wait for a response.
1728
+ # result.wait_until_done! timeout: 60
1729
+ # if result.response?
1730
+ # p result.response
1731
+ # else
1732
+ # puts "No response received."
1733
+ # end
1734
+ #
1735
+ def reject_spoke_update request, options = nil
1736
+ raise ::ArgumentError, "request must be provided" if request.nil?
1737
+
1738
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::RejectSpokeUpdateRequest
1739
+
1740
+ # Converts hash and nil to an options object
1741
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1742
+
1743
+ # Customize the options with defaults
1744
+ call_metadata = @config.rpcs.reject_spoke_update.metadata.to_h
1745
+
1746
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1747
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1748
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1749
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
1750
+ transports_version_send: [:rest]
1751
+
1752
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1753
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1754
+
1755
+ options.apply_defaults timeout: @config.rpcs.reject_spoke_update.timeout,
1756
+ metadata: call_metadata,
1757
+ retry_policy: @config.rpcs.reject_spoke_update.retry_policy
1758
+
1759
+ options.apply_defaults timeout: @config.timeout,
1760
+ metadata: @config.metadata,
1761
+ retry_policy: @config.retry_policy
1762
+
1763
+ @hub_service_stub.reject_spoke_update request, options do |result, operation|
1764
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1765
+ yield result, operation if block_given?
1766
+ throw :response, result
1767
+ end
1768
+ rescue ::Gapic::Rest::Error => e
1769
+ raise ::Google::Cloud::Error.from_error(e)
1770
+ end
1771
+
1772
+ ##
1773
+ # Deletes a Network Connectivity Center spoke.
1774
+ #
1775
+ # @overload delete_spoke(request, options = nil)
1776
+ # Pass arguments to `delete_spoke` via a request object, either of type
1777
+ # {::Google::Cloud::NetworkConnectivity::V1beta::DeleteSpokeRequest} or an equivalent Hash.
1778
+ #
1779
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::DeleteSpokeRequest, ::Hash]
1780
+ # A request object representing the call parameters. Required. To specify no
1781
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1782
+ # @param options [::Gapic::CallOptions, ::Hash]
1783
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1784
+ #
1785
+ # @overload delete_spoke(name: nil, request_id: nil)
1786
+ # Pass arguments to `delete_spoke` via keyword arguments. Note that at
1787
+ # least one keyword argument is required. To specify no parameters, or to keep all
1788
+ # the default parameter values, pass an empty Hash as a request object (see above).
1789
+ #
1790
+ # @param name [::String]
1791
+ # Required. The name of the spoke to delete.
1792
+ # @param request_id [::String]
1793
+ # Optional. A request ID to identify requests. Specify a unique request ID so
1794
+ # that if you must retry your request, the server knows to ignore the request
1795
+ # if it has already been completed. The server guarantees that a request
1796
+ # doesn't result in creation of duplicate commitments for at least 60
1797
+ # minutes.
1798
+ #
1799
+ # For example, consider a situation where you make an initial request and
1800
+ # the request times out. If you make the request again with the same request
1801
+ # ID, the server can check to see whether the original operation
1802
+ # was received. If it was, the server ignores the second request. This
1803
+ # behavior prevents clients from mistakenly creating duplicate commitments.
1804
+ #
1805
+ # The request ID must be a valid UUID, with the exception that zero UUID is
1806
+ # not supported (00000000-0000-0000-0000-000000000000).
1807
+ # @yield [result, operation] Access the result along with the TransportOperation object
1808
+ # @yieldparam result [::Gapic::Operation]
1809
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1810
+ #
1811
+ # @return [::Gapic::Operation]
1812
+ #
1813
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1814
+ #
1815
+ # @example Basic example
1816
+ # require "google/cloud/network_connectivity/v1beta"
1817
+ #
1818
+ # # Create a client object. The client can be reused for multiple calls.
1819
+ # client = Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client.new
1820
+ #
1821
+ # # Create a request. To set request fields, pass in keyword arguments.
1822
+ # request = Google::Cloud::NetworkConnectivity::V1beta::DeleteSpokeRequest.new
1823
+ #
1824
+ # # Call the delete_spoke method.
1825
+ # result = client.delete_spoke request
1826
+ #
1827
+ # # The returned object is of type Gapic::Operation. You can use it to
1828
+ # # check the status of an operation, cancel it, or wait for results.
1829
+ # # Here is how to wait for a response.
1830
+ # result.wait_until_done! timeout: 60
1831
+ # if result.response?
1832
+ # p result.response
1833
+ # else
1834
+ # puts "No response received."
1835
+ # end
1836
+ #
1837
+ def delete_spoke request, options = nil
1838
+ raise ::ArgumentError, "request must be provided" if request.nil?
1839
+
1840
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::DeleteSpokeRequest
1841
+
1842
+ # Converts hash and nil to an options object
1843
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1844
+
1845
+ # Customize the options with defaults
1846
+ call_metadata = @config.rpcs.delete_spoke.metadata.to_h
1847
+
1848
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1849
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1850
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1851
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
1852
+ transports_version_send: [:rest]
1853
+
1854
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1855
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1856
+
1857
+ options.apply_defaults timeout: @config.rpcs.delete_spoke.timeout,
1858
+ metadata: call_metadata,
1859
+ retry_policy: @config.rpcs.delete_spoke.retry_policy
1860
+
1861
+ options.apply_defaults timeout: @config.timeout,
1862
+ metadata: @config.metadata,
1863
+ retry_policy: @config.retry_policy
1864
+
1865
+ @hub_service_stub.delete_spoke request, options do |result, operation|
1866
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1867
+ yield result, operation if block_given?
1868
+ throw :response, result
1869
+ end
1870
+ rescue ::Gapic::Rest::Error => e
1871
+ raise ::Google::Cloud::Error.from_error(e)
1872
+ end
1873
+
1874
+ ##
1875
+ # Gets details about a Network Connectivity Center route table.
1876
+ #
1877
+ # @overload get_route_table(request, options = nil)
1878
+ # Pass arguments to `get_route_table` via a request object, either of type
1879
+ # {::Google::Cloud::NetworkConnectivity::V1beta::GetRouteTableRequest} or an equivalent Hash.
1880
+ #
1881
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::GetRouteTableRequest, ::Hash]
1882
+ # A request object representing the call parameters. Required. To specify no
1883
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1884
+ # @param options [::Gapic::CallOptions, ::Hash]
1885
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1886
+ #
1887
+ # @overload get_route_table(name: nil)
1888
+ # Pass arguments to `get_route_table` via keyword arguments. Note that at
1889
+ # least one keyword argument is required. To specify no parameters, or to keep all
1890
+ # the default parameter values, pass an empty Hash as a request object (see above).
1891
+ #
1892
+ # @param name [::String]
1893
+ # Required. The name of the route table resource.
1894
+ # @yield [result, operation] Access the result along with the TransportOperation object
1895
+ # @yieldparam result [::Google::Cloud::NetworkConnectivity::V1beta::RouteTable]
1896
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1897
+ #
1898
+ # @return [::Google::Cloud::NetworkConnectivity::V1beta::RouteTable]
1899
+ #
1900
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1901
+ #
1902
+ # @example Basic example
1903
+ # require "google/cloud/network_connectivity/v1beta"
1904
+ #
1905
+ # # Create a client object. The client can be reused for multiple calls.
1906
+ # client = Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client.new
1907
+ #
1908
+ # # Create a request. To set request fields, pass in keyword arguments.
1909
+ # request = Google::Cloud::NetworkConnectivity::V1beta::GetRouteTableRequest.new
1910
+ #
1911
+ # # Call the get_route_table method.
1912
+ # result = client.get_route_table request
1913
+ #
1914
+ # # The returned object is of type Google::Cloud::NetworkConnectivity::V1beta::RouteTable.
1915
+ # p result
1916
+ #
1917
+ def get_route_table request, options = nil
1918
+ raise ::ArgumentError, "request must be provided" if request.nil?
1919
+
1920
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::GetRouteTableRequest
1921
+
1922
+ # Converts hash and nil to an options object
1923
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1924
+
1925
+ # Customize the options with defaults
1926
+ call_metadata = @config.rpcs.get_route_table.metadata.to_h
1927
+
1928
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1929
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1930
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1931
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
1932
+ transports_version_send: [:rest]
1933
+
1934
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1935
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1936
+
1937
+ options.apply_defaults timeout: @config.rpcs.get_route_table.timeout,
1938
+ metadata: call_metadata,
1939
+ retry_policy: @config.rpcs.get_route_table.retry_policy
1940
+
1941
+ options.apply_defaults timeout: @config.timeout,
1942
+ metadata: @config.metadata,
1943
+ retry_policy: @config.retry_policy
1944
+
1945
+ @hub_service_stub.get_route_table request, options do |result, operation|
1946
+ yield result, operation if block_given?
1947
+ end
1948
+ rescue ::Gapic::Rest::Error => e
1949
+ raise ::Google::Cloud::Error.from_error(e)
1950
+ end
1951
+
1952
+ ##
1953
+ # Gets details about the specified route.
1954
+ #
1955
+ # @overload get_route(request, options = nil)
1956
+ # Pass arguments to `get_route` via a request object, either of type
1957
+ # {::Google::Cloud::NetworkConnectivity::V1beta::GetRouteRequest} or an equivalent Hash.
1958
+ #
1959
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::GetRouteRequest, ::Hash]
1960
+ # A request object representing the call parameters. Required. To specify no
1961
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1962
+ # @param options [::Gapic::CallOptions, ::Hash]
1963
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1964
+ #
1965
+ # @overload get_route(name: nil)
1966
+ # Pass arguments to `get_route` via keyword arguments. Note that at
1967
+ # least one keyword argument is required. To specify no parameters, or to keep all
1968
+ # the default parameter values, pass an empty Hash as a request object (see above).
1969
+ #
1970
+ # @param name [::String]
1971
+ # Required. The name of the route resource.
1972
+ # @yield [result, operation] Access the result along with the TransportOperation object
1973
+ # @yieldparam result [::Google::Cloud::NetworkConnectivity::V1beta::Route]
1974
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1975
+ #
1976
+ # @return [::Google::Cloud::NetworkConnectivity::V1beta::Route]
1977
+ #
1978
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1979
+ #
1980
+ # @example Basic example
1981
+ # require "google/cloud/network_connectivity/v1beta"
1982
+ #
1983
+ # # Create a client object. The client can be reused for multiple calls.
1984
+ # client = Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client.new
1985
+ #
1986
+ # # Create a request. To set request fields, pass in keyword arguments.
1987
+ # request = Google::Cloud::NetworkConnectivity::V1beta::GetRouteRequest.new
1988
+ #
1989
+ # # Call the get_route method.
1990
+ # result = client.get_route request
1991
+ #
1992
+ # # The returned object is of type Google::Cloud::NetworkConnectivity::V1beta::Route.
1993
+ # p result
1994
+ #
1995
+ def get_route request, options = nil
1996
+ raise ::ArgumentError, "request must be provided" if request.nil?
1997
+
1998
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::GetRouteRequest
1999
+
2000
+ # Converts hash and nil to an options object
2001
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2002
+
2003
+ # Customize the options with defaults
2004
+ call_metadata = @config.rpcs.get_route.metadata.to_h
2005
+
2006
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2007
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2008
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2009
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
2010
+ transports_version_send: [:rest]
2011
+
2012
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2013
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2014
+
2015
+ options.apply_defaults timeout: @config.rpcs.get_route.timeout,
2016
+ metadata: call_metadata,
2017
+ retry_policy: @config.rpcs.get_route.retry_policy
2018
+
2019
+ options.apply_defaults timeout: @config.timeout,
2020
+ metadata: @config.metadata,
2021
+ retry_policy: @config.retry_policy
2022
+
2023
+ @hub_service_stub.get_route request, options do |result, operation|
2024
+ yield result, operation if block_given?
2025
+ end
2026
+ rescue ::Gapic::Rest::Error => e
2027
+ raise ::Google::Cloud::Error.from_error(e)
2028
+ end
2029
+
2030
+ ##
2031
+ # Lists routes in a given route table.
2032
+ #
2033
+ # @overload list_routes(request, options = nil)
2034
+ # Pass arguments to `list_routes` via a request object, either of type
2035
+ # {::Google::Cloud::NetworkConnectivity::V1beta::ListRoutesRequest} or an equivalent Hash.
2036
+ #
2037
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::ListRoutesRequest, ::Hash]
2038
+ # A request object representing the call parameters. Required. To specify no
2039
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2040
+ # @param options [::Gapic::CallOptions, ::Hash]
2041
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2042
+ #
2043
+ # @overload list_routes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2044
+ # Pass arguments to `list_routes` via keyword arguments. Note that at
2045
+ # least one keyword argument is required. To specify no parameters, or to keep all
2046
+ # the default parameter values, pass an empty Hash as a request object (see above).
2047
+ #
2048
+ # @param parent [::String]
2049
+ # Required. The parent resource's name.
2050
+ # @param page_size [::Integer]
2051
+ # The maximum number of results to return per page.
2052
+ # @param page_token [::String]
2053
+ # The page token.
2054
+ # @param filter [::String]
2055
+ # An expression that filters the list of results.
2056
+ # @param order_by [::String]
2057
+ # Sort the results by a certain order.
2058
+ # @yield [result, operation] Access the result along with the TransportOperation object
2059
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::Route>]
2060
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2061
+ #
2062
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::Route>]
2063
+ #
2064
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2065
+ #
2066
+ # @example Basic example
2067
+ # require "google/cloud/network_connectivity/v1beta"
2068
+ #
2069
+ # # Create a client object. The client can be reused for multiple calls.
2070
+ # client = Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client.new
2071
+ #
2072
+ # # Create a request. To set request fields, pass in keyword arguments.
2073
+ # request = Google::Cloud::NetworkConnectivity::V1beta::ListRoutesRequest.new
2074
+ #
2075
+ # # Call the list_routes method.
2076
+ # result = client.list_routes request
2077
+ #
2078
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2079
+ # # over elements, and API calls will be issued to fetch pages as needed.
2080
+ # result.each do |item|
2081
+ # # Each element is of type ::Google::Cloud::NetworkConnectivity::V1beta::Route.
2082
+ # p item
2083
+ # end
2084
+ #
2085
+ def list_routes request, options = nil
2086
+ raise ::ArgumentError, "request must be provided" if request.nil?
2087
+
2088
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::ListRoutesRequest
2089
+
2090
+ # Converts hash and nil to an options object
2091
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2092
+
2093
+ # Customize the options with defaults
2094
+ call_metadata = @config.rpcs.list_routes.metadata.to_h
2095
+
2096
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2097
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2098
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2099
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
2100
+ transports_version_send: [:rest]
2101
+
2102
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2103
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2104
+
2105
+ options.apply_defaults timeout: @config.rpcs.list_routes.timeout,
2106
+ metadata: call_metadata,
2107
+ retry_policy: @config.rpcs.list_routes.retry_policy
2108
+
2109
+ options.apply_defaults timeout: @config.timeout,
2110
+ metadata: @config.metadata,
2111
+ retry_policy: @config.retry_policy
2112
+
2113
+ @hub_service_stub.list_routes request, options do |result, operation|
2114
+ result = ::Gapic::Rest::PagedEnumerable.new @hub_service_stub, :list_routes, "routes", request, result, options
2115
+ yield result, operation if block_given?
2116
+ throw :response, result
2117
+ end
2118
+ rescue ::Gapic::Rest::Error => e
2119
+ raise ::Google::Cloud::Error.from_error(e)
2120
+ end
2121
+
2122
+ ##
2123
+ # Lists route tables in a given hub.
2124
+ #
2125
+ # @overload list_route_tables(request, options = nil)
2126
+ # Pass arguments to `list_route_tables` via a request object, either of type
2127
+ # {::Google::Cloud::NetworkConnectivity::V1beta::ListRouteTablesRequest} or an equivalent Hash.
2128
+ #
2129
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::ListRouteTablesRequest, ::Hash]
2130
+ # A request object representing the call parameters. Required. To specify no
2131
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2132
+ # @param options [::Gapic::CallOptions, ::Hash]
2133
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2134
+ #
2135
+ # @overload list_route_tables(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2136
+ # Pass arguments to `list_route_tables` via keyword arguments. Note that at
2137
+ # least one keyword argument is required. To specify no parameters, or to keep all
2138
+ # the default parameter values, pass an empty Hash as a request object (see above).
2139
+ #
2140
+ # @param parent [::String]
2141
+ # Required. The parent resource's name.
2142
+ # @param page_size [::Integer]
2143
+ # The maximum number of results to return per page.
2144
+ # @param page_token [::String]
2145
+ # The page token.
2146
+ # @param filter [::String]
2147
+ # An expression that filters the list of results.
2148
+ # @param order_by [::String]
2149
+ # Sort the results by a certain order.
2150
+ # @yield [result, operation] Access the result along with the TransportOperation object
2151
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::RouteTable>]
2152
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2153
+ #
2154
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::RouteTable>]
2155
+ #
2156
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2157
+ #
2158
+ # @example Basic example
2159
+ # require "google/cloud/network_connectivity/v1beta"
2160
+ #
2161
+ # # Create a client object. The client can be reused for multiple calls.
2162
+ # client = Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client.new
2163
+ #
2164
+ # # Create a request. To set request fields, pass in keyword arguments.
2165
+ # request = Google::Cloud::NetworkConnectivity::V1beta::ListRouteTablesRequest.new
2166
+ #
2167
+ # # Call the list_route_tables method.
2168
+ # result = client.list_route_tables request
2169
+ #
2170
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2171
+ # # over elements, and API calls will be issued to fetch pages as needed.
2172
+ # result.each do |item|
2173
+ # # Each element is of type ::Google::Cloud::NetworkConnectivity::V1beta::RouteTable.
2174
+ # p item
2175
+ # end
2176
+ #
2177
+ def list_route_tables request, options = nil
2178
+ raise ::ArgumentError, "request must be provided" if request.nil?
2179
+
2180
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::ListRouteTablesRequest
2181
+
2182
+ # Converts hash and nil to an options object
2183
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2184
+
2185
+ # Customize the options with defaults
2186
+ call_metadata = @config.rpcs.list_route_tables.metadata.to_h
2187
+
2188
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2189
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2190
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2191
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
2192
+ transports_version_send: [:rest]
2193
+
2194
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2195
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2196
+
2197
+ options.apply_defaults timeout: @config.rpcs.list_route_tables.timeout,
2198
+ metadata: call_metadata,
2199
+ retry_policy: @config.rpcs.list_route_tables.retry_policy
2200
+
2201
+ options.apply_defaults timeout: @config.timeout,
2202
+ metadata: @config.metadata,
2203
+ retry_policy: @config.retry_policy
2204
+
2205
+ @hub_service_stub.list_route_tables request, options do |result, operation|
2206
+ result = ::Gapic::Rest::PagedEnumerable.new @hub_service_stub, :list_route_tables, "route_tables", request, result, options
2207
+ yield result, operation if block_given?
2208
+ throw :response, result
2209
+ end
2210
+ rescue ::Gapic::Rest::Error => e
2211
+ raise ::Google::Cloud::Error.from_error(e)
2212
+ end
2213
+
2214
+ ##
2215
+ # Gets details about a Network Connectivity Center group.
2216
+ #
2217
+ # @overload get_group(request, options = nil)
2218
+ # Pass arguments to `get_group` via a request object, either of type
2219
+ # {::Google::Cloud::NetworkConnectivity::V1beta::GetGroupRequest} or an equivalent Hash.
2220
+ #
2221
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::GetGroupRequest, ::Hash]
2222
+ # A request object representing the call parameters. Required. To specify no
2223
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2224
+ # @param options [::Gapic::CallOptions, ::Hash]
2225
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2226
+ #
2227
+ # @overload get_group(name: nil)
2228
+ # Pass arguments to `get_group` via keyword arguments. Note that at
2229
+ # least one keyword argument is required. To specify no parameters, or to keep all
2230
+ # the default parameter values, pass an empty Hash as a request object (see above).
2231
+ #
2232
+ # @param name [::String]
2233
+ # Required. The name of the route table resource.
2234
+ # @yield [result, operation] Access the result along with the TransportOperation object
2235
+ # @yieldparam result [::Google::Cloud::NetworkConnectivity::V1beta::Group]
2236
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2237
+ #
2238
+ # @return [::Google::Cloud::NetworkConnectivity::V1beta::Group]
2239
+ #
2240
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2241
+ #
2242
+ # @example Basic example
2243
+ # require "google/cloud/network_connectivity/v1beta"
2244
+ #
2245
+ # # Create a client object. The client can be reused for multiple calls.
2246
+ # client = Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client.new
2247
+ #
2248
+ # # Create a request. To set request fields, pass in keyword arguments.
2249
+ # request = Google::Cloud::NetworkConnectivity::V1beta::GetGroupRequest.new
2250
+ #
2251
+ # # Call the get_group method.
2252
+ # result = client.get_group request
2253
+ #
2254
+ # # The returned object is of type Google::Cloud::NetworkConnectivity::V1beta::Group.
2255
+ # p result
2256
+ #
2257
+ def get_group request, options = nil
2258
+ raise ::ArgumentError, "request must be provided" if request.nil?
2259
+
2260
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::GetGroupRequest
2261
+
2262
+ # Converts hash and nil to an options object
2263
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2264
+
2265
+ # Customize the options with defaults
2266
+ call_metadata = @config.rpcs.get_group.metadata.to_h
2267
+
2268
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2269
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2270
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2271
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
2272
+ transports_version_send: [:rest]
2273
+
2274
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2275
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2276
+
2277
+ options.apply_defaults timeout: @config.rpcs.get_group.timeout,
2278
+ metadata: call_metadata,
2279
+ retry_policy: @config.rpcs.get_group.retry_policy
2280
+
2281
+ options.apply_defaults timeout: @config.timeout,
2282
+ metadata: @config.metadata,
2283
+ retry_policy: @config.retry_policy
2284
+
2285
+ @hub_service_stub.get_group request, options do |result, operation|
2286
+ yield result, operation if block_given?
2287
+ end
2288
+ rescue ::Gapic::Rest::Error => e
2289
+ raise ::Google::Cloud::Error.from_error(e)
2290
+ end
2291
+
2292
+ ##
2293
+ # Lists groups in a given hub.
2294
+ #
2295
+ # @overload list_groups(request, options = nil)
2296
+ # Pass arguments to `list_groups` via a request object, either of type
2297
+ # {::Google::Cloud::NetworkConnectivity::V1beta::ListGroupsRequest} or an equivalent Hash.
2298
+ #
2299
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::ListGroupsRequest, ::Hash]
2300
+ # A request object representing the call parameters. Required. To specify no
2301
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2302
+ # @param options [::Gapic::CallOptions, ::Hash]
2303
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2304
+ #
2305
+ # @overload list_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2306
+ # Pass arguments to `list_groups` via keyword arguments. Note that at
2307
+ # least one keyword argument is required. To specify no parameters, or to keep all
2308
+ # the default parameter values, pass an empty Hash as a request object (see above).
2309
+ #
2310
+ # @param parent [::String]
2311
+ # Required. The parent resource's name.
2312
+ # @param page_size [::Integer]
2313
+ # The maximum number of results to return per page.
2314
+ # @param page_token [::String]
2315
+ # The page token.
2316
+ # @param filter [::String]
2317
+ # An expression that filters the list of results.
2318
+ # @param order_by [::String]
2319
+ # Sort the results by a certain order.
2320
+ # @yield [result, operation] Access the result along with the TransportOperation object
2321
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::Group>]
2322
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2323
+ #
2324
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::Group>]
2325
+ #
2326
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2327
+ #
2328
+ # @example Basic example
2329
+ # require "google/cloud/network_connectivity/v1beta"
2330
+ #
2331
+ # # Create a client object. The client can be reused for multiple calls.
2332
+ # client = Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client.new
2333
+ #
2334
+ # # Create a request. To set request fields, pass in keyword arguments.
2335
+ # request = Google::Cloud::NetworkConnectivity::V1beta::ListGroupsRequest.new
2336
+ #
2337
+ # # Call the list_groups method.
2338
+ # result = client.list_groups request
2339
+ #
2340
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2341
+ # # over elements, and API calls will be issued to fetch pages as needed.
2342
+ # result.each do |item|
2343
+ # # Each element is of type ::Google::Cloud::NetworkConnectivity::V1beta::Group.
2344
+ # p item
2345
+ # end
2346
+ #
2347
+ def list_groups request, options = nil
2348
+ raise ::ArgumentError, "request must be provided" if request.nil?
2349
+
2350
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::ListGroupsRequest
2351
+
2352
+ # Converts hash and nil to an options object
2353
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2354
+
2355
+ # Customize the options with defaults
2356
+ call_metadata = @config.rpcs.list_groups.metadata.to_h
2357
+
2358
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2359
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2360
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2361
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
2362
+ transports_version_send: [:rest]
2363
+
2364
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2365
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2366
+
2367
+ options.apply_defaults timeout: @config.rpcs.list_groups.timeout,
2368
+ metadata: call_metadata,
2369
+ retry_policy: @config.rpcs.list_groups.retry_policy
2370
+
2371
+ options.apply_defaults timeout: @config.timeout,
2372
+ metadata: @config.metadata,
2373
+ retry_policy: @config.retry_policy
2374
+
2375
+ @hub_service_stub.list_groups request, options do |result, operation|
2376
+ result = ::Gapic::Rest::PagedEnumerable.new @hub_service_stub, :list_groups, "groups", request, result, options
2377
+ yield result, operation if block_given?
2378
+ throw :response, result
2379
+ end
2380
+ rescue ::Gapic::Rest::Error => e
2381
+ raise ::Google::Cloud::Error.from_error(e)
2382
+ end
2383
+
2384
+ ##
2385
+ # Updates the parameters of a Network Connectivity Center group.
2386
+ #
2387
+ # @overload update_group(request, options = nil)
2388
+ # Pass arguments to `update_group` via a request object, either of type
2389
+ # {::Google::Cloud::NetworkConnectivity::V1beta::UpdateGroupRequest} or an equivalent Hash.
2390
+ #
2391
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::UpdateGroupRequest, ::Hash]
2392
+ # A request object representing the call parameters. Required. To specify no
2393
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2394
+ # @param options [::Gapic::CallOptions, ::Hash]
2395
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2396
+ #
2397
+ # @overload update_group(update_mask: nil, group: nil, request_id: nil)
2398
+ # Pass arguments to `update_group` via keyword arguments. Note that at
2399
+ # least one keyword argument is required. To specify no parameters, or to keep all
2400
+ # the default parameter values, pass an empty Hash as a request object (see above).
2401
+ #
2402
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2403
+ # Optional. In the case of an update to an existing group, field mask is used
2404
+ # to specify the fields to be overwritten. The fields specified in the
2405
+ # update_mask are relative to the resource, not the full request. A field is
2406
+ # overwritten if it is in the mask. If the user does not provide a mask, then
2407
+ # all fields are overwritten.
2408
+ # @param group [::Google::Cloud::NetworkConnectivity::V1beta::Group, ::Hash]
2409
+ # Required. The state that the group should be in after the update.
2410
+ # @param request_id [::String]
2411
+ # Optional. A request ID to identify requests. Specify a unique request ID so
2412
+ # that if you must retry your request, the server knows to ignore the request
2413
+ # if it has already been completed. The server guarantees that a request
2414
+ # doesn't result in creation of duplicate commitments for at least 60
2415
+ # minutes.
2416
+ #
2417
+ # For example, consider a situation where you make an initial request and
2418
+ # the request times out. If you make the request again with the same request
2419
+ # ID, the server can check to see whether the original operation
2420
+ # was received. If it was, the server ignores the second request. This
2421
+ # behavior prevents clients from mistakenly creating duplicate commitments.
2422
+ #
2423
+ # The request ID must be a valid UUID, with the exception that zero UUID is
2424
+ # not supported (00000000-0000-0000-0000-000000000000).
2425
+ # @yield [result, operation] Access the result along with the TransportOperation object
2426
+ # @yieldparam result [::Gapic::Operation]
2427
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2428
+ #
2429
+ # @return [::Gapic::Operation]
2430
+ #
2431
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2432
+ #
2433
+ # @example Basic example
2434
+ # require "google/cloud/network_connectivity/v1beta"
2435
+ #
2436
+ # # Create a client object. The client can be reused for multiple calls.
2437
+ # client = Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client.new
2438
+ #
2439
+ # # Create a request. To set request fields, pass in keyword arguments.
2440
+ # request = Google::Cloud::NetworkConnectivity::V1beta::UpdateGroupRequest.new
2441
+ #
2442
+ # # Call the update_group method.
2443
+ # result = client.update_group request
2444
+ #
2445
+ # # The returned object is of type Gapic::Operation. You can use it to
2446
+ # # check the status of an operation, cancel it, or wait for results.
2447
+ # # Here is how to wait for a response.
2448
+ # result.wait_until_done! timeout: 60
2449
+ # if result.response?
2450
+ # p result.response
2451
+ # else
2452
+ # puts "No response received."
2453
+ # end
2454
+ #
2455
+ def update_group request, options = nil
2456
+ raise ::ArgumentError, "request must be provided" if request.nil?
2457
+
2458
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::UpdateGroupRequest
2459
+
2460
+ # Converts hash and nil to an options object
2461
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2462
+
2463
+ # Customize the options with defaults
2464
+ call_metadata = @config.rpcs.update_group.metadata.to_h
2465
+
2466
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2467
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2468
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2469
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
2470
+ transports_version_send: [:rest]
2471
+
2472
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2473
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2474
+
2475
+ options.apply_defaults timeout: @config.rpcs.update_group.timeout,
2476
+ metadata: call_metadata,
2477
+ retry_policy: @config.rpcs.update_group.retry_policy
2478
+
2479
+ options.apply_defaults timeout: @config.timeout,
2480
+ metadata: @config.metadata,
2481
+ retry_policy: @config.retry_policy
2482
+
2483
+ @hub_service_stub.update_group request, options do |result, operation|
2484
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2485
+ yield result, operation if block_given?
2486
+ throw :response, result
2487
+ end
2488
+ rescue ::Gapic::Rest::Error => e
2489
+ raise ::Google::Cloud::Error.from_error(e)
2490
+ end
2491
+
2492
+ ##
2493
+ # Create a GatewayAdvertisedRoute
2494
+ #
2495
+ # @overload create_gateway_advertised_route(request, options = nil)
2496
+ # Pass arguments to `create_gateway_advertised_route` via a request object, either of type
2497
+ # {::Google::Cloud::NetworkConnectivity::V1beta::CreateGatewayAdvertisedRouteRequest} or an equivalent Hash.
2498
+ #
2499
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::CreateGatewayAdvertisedRouteRequest, ::Hash]
2500
+ # A request object representing the call parameters. Required. To specify no
2501
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2502
+ # @param options [::Gapic::CallOptions, ::Hash]
2503
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2504
+ #
2505
+ # @overload create_gateway_advertised_route(parent: nil, gateway_advertised_route_id: nil, gateway_advertised_route: nil, request_id: nil)
2506
+ # Pass arguments to `create_gateway_advertised_route` via keyword arguments. Note that at
2507
+ # least one keyword argument is required. To specify no parameters, or to keep all
2508
+ # the default parameter values, pass an empty Hash as a request object (see above).
2509
+ #
2510
+ # @param parent [::String]
2511
+ # Required. The parent resource.
2512
+ # @param gateway_advertised_route_id [::String]
2513
+ # Required. Unique id for the route to create.
2514
+ # @param gateway_advertised_route [::Google::Cloud::NetworkConnectivity::V1beta::GatewayAdvertisedRoute, ::Hash]
2515
+ # Required. Initial values for the new gateway advertised route.
2516
+ # @param request_id [::String]
2517
+ # Optional. A request ID to identify requests. Specify a unique request ID so
2518
+ # that if you must retry your request, the server knows to ignore the request
2519
+ # if it has already been completed. The server guarantees that a request
2520
+ # doesn't result in creation of duplicate commitments for at least 60
2521
+ # minutes.
2522
+ #
2523
+ # For example, consider a situation where you make an initial request and
2524
+ # the request times out. If you make the request again with the same request
2525
+ # ID, the server can check to see whether the original operation
2526
+ # was received. If it was, the server ignores the second request. This
2527
+ # behavior prevents clients from mistakenly creating duplicate commitments.
2528
+ #
2529
+ # The request ID must be a valid UUID, with the exception that zero UUID is
2530
+ # not supported (00000000-0000-0000-0000-000000000000).
2531
+ # @yield [result, operation] Access the result along with the TransportOperation object
2532
+ # @yieldparam result [::Gapic::Operation]
2533
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2534
+ #
2535
+ # @return [::Gapic::Operation]
2536
+ #
2537
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2538
+ #
2539
+ # @example Basic example
2540
+ # require "google/cloud/network_connectivity/v1beta"
2541
+ #
2542
+ # # Create a client object. The client can be reused for multiple calls.
2543
+ # client = Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client.new
2544
+ #
2545
+ # # Create a request. To set request fields, pass in keyword arguments.
2546
+ # request = Google::Cloud::NetworkConnectivity::V1beta::CreateGatewayAdvertisedRouteRequest.new
2547
+ #
2548
+ # # Call the create_gateway_advertised_route method.
2549
+ # result = client.create_gateway_advertised_route request
2550
+ #
2551
+ # # The returned object is of type Gapic::Operation. You can use it to
2552
+ # # check the status of an operation, cancel it, or wait for results.
2553
+ # # Here is how to wait for a response.
2554
+ # result.wait_until_done! timeout: 60
2555
+ # if result.response?
2556
+ # p result.response
2557
+ # else
2558
+ # puts "No response received."
2559
+ # end
2560
+ #
2561
+ def create_gateway_advertised_route request, options = nil
2562
+ raise ::ArgumentError, "request must be provided" if request.nil?
2563
+
2564
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::CreateGatewayAdvertisedRouteRequest
2565
+
2566
+ # Converts hash and nil to an options object
2567
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2568
+
2569
+ # Customize the options with defaults
2570
+ call_metadata = @config.rpcs.create_gateway_advertised_route.metadata.to_h
2571
+
2572
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2573
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2574
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2575
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
2576
+ transports_version_send: [:rest]
2577
+
2578
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2579
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2580
+
2581
+ options.apply_defaults timeout: @config.rpcs.create_gateway_advertised_route.timeout,
2582
+ metadata: call_metadata,
2583
+ retry_policy: @config.rpcs.create_gateway_advertised_route.retry_policy
2584
+
2585
+ options.apply_defaults timeout: @config.timeout,
2586
+ metadata: @config.metadata,
2587
+ retry_policy: @config.retry_policy
2588
+
2589
+ @hub_service_stub.create_gateway_advertised_route request, options do |result, operation|
2590
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2591
+ yield result, operation if block_given?
2592
+ throw :response, result
2593
+ end
2594
+ rescue ::Gapic::Rest::Error => e
2595
+ raise ::Google::Cloud::Error.from_error(e)
2596
+ end
2597
+
2598
+ ##
2599
+ # Get a GatewayAdvertisedRoute
2600
+ #
2601
+ # @overload get_gateway_advertised_route(request, options = nil)
2602
+ # Pass arguments to `get_gateway_advertised_route` via a request object, either of type
2603
+ # {::Google::Cloud::NetworkConnectivity::V1beta::GetGatewayAdvertisedRouteRequest} or an equivalent Hash.
2604
+ #
2605
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::GetGatewayAdvertisedRouteRequest, ::Hash]
2606
+ # A request object representing the call parameters. Required. To specify no
2607
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2608
+ # @param options [::Gapic::CallOptions, ::Hash]
2609
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2610
+ #
2611
+ # @overload get_gateway_advertised_route(name: nil)
2612
+ # Pass arguments to `get_gateway_advertised_route` via keyword arguments. Note that at
2613
+ # least one keyword argument is required. To specify no parameters, or to keep all
2614
+ # the default parameter values, pass an empty Hash as a request object (see above).
2615
+ #
2616
+ # @param name [::String]
2617
+ # Required. The name of the gateway advertised route to get.
2618
+ # @yield [result, operation] Access the result along with the TransportOperation object
2619
+ # @yieldparam result [::Google::Cloud::NetworkConnectivity::V1beta::GatewayAdvertisedRoute]
2620
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2621
+ #
2622
+ # @return [::Google::Cloud::NetworkConnectivity::V1beta::GatewayAdvertisedRoute]
2623
+ #
2624
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2625
+ #
2626
+ # @example Basic example
2627
+ # require "google/cloud/network_connectivity/v1beta"
2628
+ #
2629
+ # # Create a client object. The client can be reused for multiple calls.
2630
+ # client = Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client.new
2631
+ #
2632
+ # # Create a request. To set request fields, pass in keyword arguments.
2633
+ # request = Google::Cloud::NetworkConnectivity::V1beta::GetGatewayAdvertisedRouteRequest.new
2634
+ #
2635
+ # # Call the get_gateway_advertised_route method.
2636
+ # result = client.get_gateway_advertised_route request
2637
+ #
2638
+ # # The returned object is of type Google::Cloud::NetworkConnectivity::V1beta::GatewayAdvertisedRoute.
2639
+ # p result
2640
+ #
2641
+ def get_gateway_advertised_route request, options = nil
2642
+ raise ::ArgumentError, "request must be provided" if request.nil?
2643
+
2644
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::GetGatewayAdvertisedRouteRequest
2645
+
2646
+ # Converts hash and nil to an options object
2647
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2648
+
2649
+ # Customize the options with defaults
2650
+ call_metadata = @config.rpcs.get_gateway_advertised_route.metadata.to_h
2651
+
2652
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2653
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2654
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2655
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
2656
+ transports_version_send: [:rest]
2657
+
2658
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2659
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2660
+
2661
+ options.apply_defaults timeout: @config.rpcs.get_gateway_advertised_route.timeout,
2662
+ metadata: call_metadata,
2663
+ retry_policy: @config.rpcs.get_gateway_advertised_route.retry_policy
2664
+
2665
+ options.apply_defaults timeout: @config.timeout,
2666
+ metadata: @config.metadata,
2667
+ retry_policy: @config.retry_policy
2668
+
2669
+ @hub_service_stub.get_gateway_advertised_route request, options do |result, operation|
2670
+ yield result, operation if block_given?
2671
+ end
2672
+ rescue ::Gapic::Rest::Error => e
2673
+ raise ::Google::Cloud::Error.from_error(e)
2674
+ end
2675
+
2676
+ ##
2677
+ # List GatewayAdvertisedRoutes
2678
+ #
2679
+ # @overload list_gateway_advertised_routes(request, options = nil)
2680
+ # Pass arguments to `list_gateway_advertised_routes` via a request object, either of type
2681
+ # {::Google::Cloud::NetworkConnectivity::V1beta::ListGatewayAdvertisedRoutesRequest} or an equivalent Hash.
2682
+ #
2683
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::ListGatewayAdvertisedRoutesRequest, ::Hash]
2684
+ # A request object representing the call parameters. Required. To specify no
2685
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2686
+ # @param options [::Gapic::CallOptions, ::Hash]
2687
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2688
+ #
2689
+ # @overload list_gateway_advertised_routes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2690
+ # Pass arguments to `list_gateway_advertised_routes` via keyword arguments. Note that at
2691
+ # least one keyword argument is required. To specify no parameters, or to keep all
2692
+ # the default parameter values, pass an empty Hash as a request object (see above).
2693
+ #
2694
+ # @param parent [::String]
2695
+ # Required. The parent resource's name.
2696
+ # @param page_size [::Integer]
2697
+ # Optional. The maximum number of results per page that should be returned.
2698
+ # @param page_token [::String]
2699
+ # Optional. A page token, received from a previous
2700
+ # `ListGatewayAdvertisedRoutes` call. Provide this to retrieve the subsequent
2701
+ # page.
2702
+ #
2703
+ # When paginating, all other parameters provided to
2704
+ # `ListGatewayAdvertisedRoutes` must match the call that provided the page
2705
+ # token.
2706
+ # @param filter [::String]
2707
+ # An expression that filters the list of results.
2708
+ # @param order_by [::String]
2709
+ # Sort the results by a certain order.
2710
+ # @yield [result, operation] Access the result along with the TransportOperation object
2711
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::GatewayAdvertisedRoute>]
2712
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2713
+ #
2714
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::GatewayAdvertisedRoute>]
2715
+ #
2716
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2717
+ #
2718
+ # @example Basic example
2719
+ # require "google/cloud/network_connectivity/v1beta"
2720
+ #
2721
+ # # Create a client object. The client can be reused for multiple calls.
2722
+ # client = Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client.new
2723
+ #
2724
+ # # Create a request. To set request fields, pass in keyword arguments.
2725
+ # request = Google::Cloud::NetworkConnectivity::V1beta::ListGatewayAdvertisedRoutesRequest.new
2726
+ #
2727
+ # # Call the list_gateway_advertised_routes method.
2728
+ # result = client.list_gateway_advertised_routes request
2729
+ #
2730
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2731
+ # # over elements, and API calls will be issued to fetch pages as needed.
2732
+ # result.each do |item|
2733
+ # # Each element is of type ::Google::Cloud::NetworkConnectivity::V1beta::GatewayAdvertisedRoute.
2734
+ # p item
2735
+ # end
2736
+ #
2737
+ def list_gateway_advertised_routes request, options = nil
2738
+ raise ::ArgumentError, "request must be provided" if request.nil?
2739
+
2740
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::ListGatewayAdvertisedRoutesRequest
2741
+
2742
+ # Converts hash and nil to an options object
2743
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2744
+
2745
+ # Customize the options with defaults
2746
+ call_metadata = @config.rpcs.list_gateway_advertised_routes.metadata.to_h
2747
+
2748
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2749
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2750
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2751
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
2752
+ transports_version_send: [:rest]
2753
+
2754
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2755
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2756
+
2757
+ options.apply_defaults timeout: @config.rpcs.list_gateway_advertised_routes.timeout,
2758
+ metadata: call_metadata,
2759
+ retry_policy: @config.rpcs.list_gateway_advertised_routes.retry_policy
2760
+
2761
+ options.apply_defaults timeout: @config.timeout,
2762
+ metadata: @config.metadata,
2763
+ retry_policy: @config.retry_policy
2764
+
2765
+ @hub_service_stub.list_gateway_advertised_routes request, options do |result, operation|
2766
+ result = ::Gapic::Rest::PagedEnumerable.new @hub_service_stub, :list_gateway_advertised_routes, "gateway_advertised_routes", request, result, options
2767
+ yield result, operation if block_given?
2768
+ throw :response, result
2769
+ end
2770
+ rescue ::Gapic::Rest::Error => e
2771
+ raise ::Google::Cloud::Error.from_error(e)
2772
+ end
2773
+
2774
+ ##
2775
+ # Update a GatewayAdvertisedRoute
2776
+ #
2777
+ # @overload update_gateway_advertised_route(request, options = nil)
2778
+ # Pass arguments to `update_gateway_advertised_route` via a request object, either of type
2779
+ # {::Google::Cloud::NetworkConnectivity::V1beta::UpdateGatewayAdvertisedRouteRequest} or an equivalent Hash.
2780
+ #
2781
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::UpdateGatewayAdvertisedRouteRequest, ::Hash]
2782
+ # A request object representing the call parameters. Required. To specify no
2783
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2784
+ # @param options [::Gapic::CallOptions, ::Hash]
2785
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2786
+ #
2787
+ # @overload update_gateway_advertised_route(update_mask: nil, gateway_advertised_route: nil, request_id: nil)
2788
+ # Pass arguments to `update_gateway_advertised_route` via keyword arguments. Note that at
2789
+ # least one keyword argument is required. To specify no parameters, or to keep all
2790
+ # the default parameter values, pass an empty Hash as a request object (see above).
2791
+ #
2792
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2793
+ # Optional. In the case of an update to an existing group, field mask is used
2794
+ # to specify the fields to be overwritten. The fields specified in the
2795
+ # update_mask are relative to the resource, not the full request. A field is
2796
+ # overwritten if it is in the mask. If the user does not provide a mask, then
2797
+ # all fields are overwritten.
2798
+ # @param gateway_advertised_route [::Google::Cloud::NetworkConnectivity::V1beta::GatewayAdvertisedRoute, ::Hash]
2799
+ # Required. The gateway advertised route to update.
2800
+ #
2801
+ # The gateway advertised route's `name` field is used to identify the gateway
2802
+ # advertised route to update. Format:
2803
+ # `projects/{project}/locations/{location}/spokes/{spoke}/gatewayAdvertisedRoutes/{gatewayAdvertisedRoute}`
2804
+ # @param request_id [::String]
2805
+ # Optional. A request ID to identify requests. Specify a unique request ID so
2806
+ # that if you must retry your request, the server knows to ignore the request
2807
+ # if it has already been completed. The server guarantees that a request
2808
+ # doesn't result in creation of duplicate commitments for at least 60
2809
+ # minutes.
2810
+ #
2811
+ # For example, consider a situation where you make an initial request and
2812
+ # the request times out. If you make the request again with the same request
2813
+ # ID, the server can check to see whether the original operation
2814
+ # was received. If it was, the server ignores the second request. This
2815
+ # behavior prevents clients from mistakenly creating duplicate commitments.
2816
+ #
2817
+ # The request ID must be a valid UUID, with the exception that zero UUID is
2818
+ # not supported (00000000-0000-0000-0000-000000000000).
2819
+ # @yield [result, operation] Access the result along with the TransportOperation object
2820
+ # @yieldparam result [::Gapic::Operation]
2821
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2822
+ #
2823
+ # @return [::Gapic::Operation]
2824
+ #
2825
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2826
+ #
2827
+ # @example Basic example
2828
+ # require "google/cloud/network_connectivity/v1beta"
2829
+ #
2830
+ # # Create a client object. The client can be reused for multiple calls.
2831
+ # client = Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client.new
2832
+ #
2833
+ # # Create a request. To set request fields, pass in keyword arguments.
2834
+ # request = Google::Cloud::NetworkConnectivity::V1beta::UpdateGatewayAdvertisedRouteRequest.new
2835
+ #
2836
+ # # Call the update_gateway_advertised_route method.
2837
+ # result = client.update_gateway_advertised_route request
2838
+ #
2839
+ # # The returned object is of type Gapic::Operation. You can use it to
2840
+ # # check the status of an operation, cancel it, or wait for results.
2841
+ # # Here is how to wait for a response.
2842
+ # result.wait_until_done! timeout: 60
2843
+ # if result.response?
2844
+ # p result.response
2845
+ # else
2846
+ # puts "No response received."
2847
+ # end
2848
+ #
2849
+ def update_gateway_advertised_route request, options = nil
2850
+ raise ::ArgumentError, "request must be provided" if request.nil?
2851
+
2852
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::UpdateGatewayAdvertisedRouteRequest
2853
+
2854
+ # Converts hash and nil to an options object
2855
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2856
+
2857
+ # Customize the options with defaults
2858
+ call_metadata = @config.rpcs.update_gateway_advertised_route.metadata.to_h
2859
+
2860
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2861
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2862
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2863
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
2864
+ transports_version_send: [:rest]
2865
+
2866
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2867
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2868
+
2869
+ options.apply_defaults timeout: @config.rpcs.update_gateway_advertised_route.timeout,
2870
+ metadata: call_metadata,
2871
+ retry_policy: @config.rpcs.update_gateway_advertised_route.retry_policy
2872
+
2873
+ options.apply_defaults timeout: @config.timeout,
2874
+ metadata: @config.metadata,
2875
+ retry_policy: @config.retry_policy
2876
+
2877
+ @hub_service_stub.update_gateway_advertised_route request, options do |result, operation|
2878
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2879
+ yield result, operation if block_given?
2880
+ throw :response, result
2881
+ end
2882
+ rescue ::Gapic::Rest::Error => e
2883
+ raise ::Google::Cloud::Error.from_error(e)
2884
+ end
2885
+
2886
+ ##
2887
+ # Delete a GatewayAdvertisedRoute
2888
+ #
2889
+ # @overload delete_gateway_advertised_route(request, options = nil)
2890
+ # Pass arguments to `delete_gateway_advertised_route` via a request object, either of type
2891
+ # {::Google::Cloud::NetworkConnectivity::V1beta::DeleteGatewayAdvertisedRouteRequest} or an equivalent Hash.
2892
+ #
2893
+ # @param request [::Google::Cloud::NetworkConnectivity::V1beta::DeleteGatewayAdvertisedRouteRequest, ::Hash]
2894
+ # A request object representing the call parameters. Required. To specify no
2895
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2896
+ # @param options [::Gapic::CallOptions, ::Hash]
2897
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2898
+ #
2899
+ # @overload delete_gateway_advertised_route(name: nil, request_id: nil)
2900
+ # Pass arguments to `delete_gateway_advertised_route` via keyword arguments. Note that at
2901
+ # least one keyword argument is required. To specify no parameters, or to keep all
2902
+ # the default parameter values, pass an empty Hash as a request object (see above).
2903
+ #
2904
+ # @param name [::String]
2905
+ # Required. The name of the gateway advertised route to delete.
2906
+ # @param request_id [::String]
2907
+ # Optional. A request ID to identify requests. Specify a unique request ID so
2908
+ # that if you must retry your request, the server knows to ignore the request
2909
+ # if it has already been completed. The server guarantees that a request
2910
+ # doesn't result in creation of duplicate commitments for at least 60
2911
+ # minutes.
2912
+ #
2913
+ # For example, consider a situation where you make an initial request and
2914
+ # the request times out. If you make the request again with the same request
2915
+ # ID, the server can check to see whether the original operation
2916
+ # was received. If it was, the server ignores the second request. This
2917
+ # behavior prevents clients from mistakenly creating duplicate commitments.
2918
+ #
2919
+ # The request ID must be a valid UUID, with the exception that zero UUID is
2920
+ # not supported (00000000-0000-0000-0000-000000000000).
2921
+ # @yield [result, operation] Access the result along with the TransportOperation object
2922
+ # @yieldparam result [::Gapic::Operation]
2923
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2924
+ #
2925
+ # @return [::Gapic::Operation]
2926
+ #
2927
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2928
+ #
2929
+ # @example Basic example
2930
+ # require "google/cloud/network_connectivity/v1beta"
2931
+ #
2932
+ # # Create a client object. The client can be reused for multiple calls.
2933
+ # client = Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client.new
2934
+ #
2935
+ # # Create a request. To set request fields, pass in keyword arguments.
2936
+ # request = Google::Cloud::NetworkConnectivity::V1beta::DeleteGatewayAdvertisedRouteRequest.new
2937
+ #
2938
+ # # Call the delete_gateway_advertised_route method.
2939
+ # result = client.delete_gateway_advertised_route request
2940
+ #
2941
+ # # The returned object is of type Gapic::Operation. You can use it to
2942
+ # # check the status of an operation, cancel it, or wait for results.
2943
+ # # Here is how to wait for a response.
2944
+ # result.wait_until_done! timeout: 60
2945
+ # if result.response?
2946
+ # p result.response
2947
+ # else
2948
+ # puts "No response received."
2949
+ # end
2950
+ #
2951
+ def delete_gateway_advertised_route request, options = nil
2952
+ raise ::ArgumentError, "request must be provided" if request.nil?
2953
+
2954
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::DeleteGatewayAdvertisedRouteRequest
2955
+
2956
+ # Converts hash and nil to an options object
2957
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2958
+
2959
+ # Customize the options with defaults
2960
+ call_metadata = @config.rpcs.delete_gateway_advertised_route.metadata.to_h
2961
+
2962
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2963
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2964
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2965
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION,
2966
+ transports_version_send: [:rest]
2967
+
2968
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2969
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2970
+
2971
+ options.apply_defaults timeout: @config.rpcs.delete_gateway_advertised_route.timeout,
2972
+ metadata: call_metadata,
2973
+ retry_policy: @config.rpcs.delete_gateway_advertised_route.retry_policy
2974
+
2975
+ options.apply_defaults timeout: @config.timeout,
2976
+ metadata: @config.metadata,
2977
+ retry_policy: @config.retry_policy
2978
+
2979
+ @hub_service_stub.delete_gateway_advertised_route request, options do |result, operation|
2980
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2981
+ yield result, operation if block_given?
2982
+ throw :response, result
2983
+ end
2984
+ rescue ::Gapic::Rest::Error => e
2985
+ raise ::Google::Cloud::Error.from_error(e)
2986
+ end
2987
+
2988
+ ##
2989
+ # Configuration class for the HubService REST API.
2990
+ #
2991
+ # This class represents the configuration for HubService REST,
2992
+ # providing control over timeouts, retry behavior, logging, transport
2993
+ # parameters, and other low-level controls. Certain parameters can also be
2994
+ # applied individually to specific RPCs. See
2995
+ # {::Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client::Configuration::Rpcs}
2996
+ # for a list of RPCs that can be configured independently.
2997
+ #
2998
+ # Configuration can be applied globally to all clients, or to a single client
2999
+ # on construction.
3000
+ #
3001
+ # @example
3002
+ #
3003
+ # # Modify the global config, setting the timeout for
3004
+ # # list_hubs to 20 seconds,
3005
+ # # and all remaining timeouts to 10 seconds.
3006
+ # ::Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client.configure do |config|
3007
+ # config.timeout = 10.0
3008
+ # config.rpcs.list_hubs.timeout = 20.0
3009
+ # end
3010
+ #
3011
+ # # Apply the above configuration only to a new client.
3012
+ # client = ::Google::Cloud::NetworkConnectivity::V1beta::HubService::Rest::Client.new do |config|
3013
+ # config.timeout = 10.0
3014
+ # config.rpcs.list_hubs.timeout = 20.0
3015
+ # end
3016
+ #
3017
+ # @!attribute [rw] endpoint
3018
+ # A custom service endpoint, as a hostname or hostname:port. The default is
3019
+ # nil, indicating to use the default endpoint in the current universe domain.
3020
+ # @return [::String,nil]
3021
+ # @!attribute [rw] credentials
3022
+ # Credentials to send with calls. You may provide any of the following types:
3023
+ # * (`String`) The path to a service account key file in JSON format
3024
+ # * (`Hash`) A service account key as a Hash
3025
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
3026
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
3027
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
3028
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
3029
+ # * (`nil`) indicating no credentials
3030
+ #
3031
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
3032
+ # external source for authentication to Google Cloud, you must validate it before
3033
+ # providing it to a Google API client library. Providing an unvalidated credential
3034
+ # configuration to Google APIs can compromise the security of your systems and data.
3035
+ # For more information, refer to [Validate credential configurations from external
3036
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
3037
+ # @return [::Object]
3038
+ # @!attribute [rw] scope
3039
+ # The OAuth scopes
3040
+ # @return [::Array<::String>]
3041
+ # @!attribute [rw] lib_name
3042
+ # The library name as recorded in instrumentation and logging
3043
+ # @return [::String]
3044
+ # @!attribute [rw] lib_version
3045
+ # The library version as recorded in instrumentation and logging
3046
+ # @return [::String]
3047
+ # @!attribute [rw] timeout
3048
+ # The call timeout in seconds.
3049
+ # @return [::Numeric]
3050
+ # @!attribute [rw] metadata
3051
+ # Additional headers to be sent with the call.
3052
+ # @return [::Hash{::Symbol=>::String}]
3053
+ # @!attribute [rw] retry_policy
3054
+ # The retry policy. The value is a hash with the following keys:
3055
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
3056
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
3057
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
3058
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
3059
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
3060
+ # trigger a retry.
3061
+ # @return [::Hash]
3062
+ # @!attribute [rw] quota_project
3063
+ # A separate project against which to charge quota.
3064
+ # @return [::String]
3065
+ # @!attribute [rw] universe_domain
3066
+ # The universe domain within which to make requests. This determines the
3067
+ # default endpoint URL. The default value of nil uses the environment
3068
+ # universe (usually the default "googleapis.com" universe).
3069
+ # @return [::String,nil]
3070
+ # @!attribute [rw] logger
3071
+ # A custom logger to use for request/response debug logging, or the value
3072
+ # `:default` (the default) to construct a default logger, or `nil` to
3073
+ # explicitly disable logging.
3074
+ # @return [::Logger,:default,nil]
3075
+ #
3076
+ class Configuration
3077
+ extend ::Gapic::Config
3078
+
3079
+ # @private
3080
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
3081
+ DEFAULT_ENDPOINT = "networkconnectivity.googleapis.com"
3082
+
3083
+ config_attr :endpoint, nil, ::String, nil
3084
+ config_attr :credentials, nil do |value|
3085
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
3086
+ allowed.any? { |klass| klass === value }
3087
+ end
3088
+ config_attr :scope, nil, ::String, ::Array, nil
3089
+ config_attr :lib_name, nil, ::String, nil
3090
+ config_attr :lib_version, nil, ::String, nil
3091
+ config_attr :timeout, nil, ::Numeric, nil
3092
+ config_attr :metadata, nil, ::Hash, nil
3093
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
3094
+ config_attr :quota_project, nil, ::String, nil
3095
+ config_attr :universe_domain, nil, ::String, nil
3096
+
3097
+ # @private
3098
+ # Overrides for http bindings for the RPCs of this service
3099
+ # are only used when this service is used as mixin, and only
3100
+ # by the host service.
3101
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
3102
+ config_attr :bindings_override, {}, ::Hash, nil
3103
+ config_attr :logger, :default, ::Logger, nil, :default
3104
+
3105
+ # @private
3106
+ def initialize parent_config = nil
3107
+ @parent_config = parent_config unless parent_config.nil?
3108
+
3109
+ yield self if block_given?
3110
+ end
3111
+
3112
+ ##
3113
+ # Configurations for individual RPCs
3114
+ # @return [Rpcs]
3115
+ #
3116
+ def rpcs
3117
+ @rpcs ||= begin
3118
+ parent_rpcs = nil
3119
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
3120
+ Rpcs.new parent_rpcs
3121
+ end
3122
+ end
3123
+
3124
+ ##
3125
+ # Configuration RPC class for the HubService API.
3126
+ #
3127
+ # Includes fields providing the configuration for each RPC in this service.
3128
+ # Each configuration object is of type `Gapic::Config::Method` and includes
3129
+ # the following configuration fields:
3130
+ #
3131
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
3132
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
3133
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
3134
+ # include the following keys:
3135
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
3136
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
3137
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
3138
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
3139
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
3140
+ # trigger a retry.
3141
+ #
3142
+ class Rpcs
3143
+ ##
3144
+ # RPC-specific configuration for `list_hubs`
3145
+ # @return [::Gapic::Config::Method]
3146
+ #
3147
+ attr_reader :list_hubs
3148
+ ##
3149
+ # RPC-specific configuration for `get_hub`
3150
+ # @return [::Gapic::Config::Method]
3151
+ #
3152
+ attr_reader :get_hub
3153
+ ##
3154
+ # RPC-specific configuration for `create_hub`
3155
+ # @return [::Gapic::Config::Method]
3156
+ #
3157
+ attr_reader :create_hub
3158
+ ##
3159
+ # RPC-specific configuration for `update_hub`
3160
+ # @return [::Gapic::Config::Method]
3161
+ #
3162
+ attr_reader :update_hub
3163
+ ##
3164
+ # RPC-specific configuration for `delete_hub`
3165
+ # @return [::Gapic::Config::Method]
3166
+ #
3167
+ attr_reader :delete_hub
3168
+ ##
3169
+ # RPC-specific configuration for `list_hub_spokes`
3170
+ # @return [::Gapic::Config::Method]
3171
+ #
3172
+ attr_reader :list_hub_spokes
3173
+ ##
3174
+ # RPC-specific configuration for `query_hub_status`
3175
+ # @return [::Gapic::Config::Method]
3176
+ #
3177
+ attr_reader :query_hub_status
3178
+ ##
3179
+ # RPC-specific configuration for `list_spokes`
3180
+ # @return [::Gapic::Config::Method]
3181
+ #
3182
+ attr_reader :list_spokes
3183
+ ##
3184
+ # RPC-specific configuration for `get_spoke`
3185
+ # @return [::Gapic::Config::Method]
3186
+ #
3187
+ attr_reader :get_spoke
3188
+ ##
3189
+ # RPC-specific configuration for `create_spoke`
3190
+ # @return [::Gapic::Config::Method]
3191
+ #
3192
+ attr_reader :create_spoke
3193
+ ##
3194
+ # RPC-specific configuration for `update_spoke`
3195
+ # @return [::Gapic::Config::Method]
3196
+ #
3197
+ attr_reader :update_spoke
3198
+ ##
3199
+ # RPC-specific configuration for `reject_hub_spoke`
3200
+ # @return [::Gapic::Config::Method]
3201
+ #
3202
+ attr_reader :reject_hub_spoke
3203
+ ##
3204
+ # RPC-specific configuration for `accept_hub_spoke`
3205
+ # @return [::Gapic::Config::Method]
3206
+ #
3207
+ attr_reader :accept_hub_spoke
3208
+ ##
3209
+ # RPC-specific configuration for `accept_spoke_update`
3210
+ # @return [::Gapic::Config::Method]
3211
+ #
3212
+ attr_reader :accept_spoke_update
3213
+ ##
3214
+ # RPC-specific configuration for `reject_spoke_update`
3215
+ # @return [::Gapic::Config::Method]
3216
+ #
3217
+ attr_reader :reject_spoke_update
3218
+ ##
3219
+ # RPC-specific configuration for `delete_spoke`
3220
+ # @return [::Gapic::Config::Method]
3221
+ #
3222
+ attr_reader :delete_spoke
3223
+ ##
3224
+ # RPC-specific configuration for `get_route_table`
3225
+ # @return [::Gapic::Config::Method]
3226
+ #
3227
+ attr_reader :get_route_table
3228
+ ##
3229
+ # RPC-specific configuration for `get_route`
3230
+ # @return [::Gapic::Config::Method]
3231
+ #
3232
+ attr_reader :get_route
3233
+ ##
3234
+ # RPC-specific configuration for `list_routes`
3235
+ # @return [::Gapic::Config::Method]
3236
+ #
3237
+ attr_reader :list_routes
3238
+ ##
3239
+ # RPC-specific configuration for `list_route_tables`
3240
+ # @return [::Gapic::Config::Method]
3241
+ #
3242
+ attr_reader :list_route_tables
3243
+ ##
3244
+ # RPC-specific configuration for `get_group`
3245
+ # @return [::Gapic::Config::Method]
3246
+ #
3247
+ attr_reader :get_group
3248
+ ##
3249
+ # RPC-specific configuration for `list_groups`
3250
+ # @return [::Gapic::Config::Method]
3251
+ #
3252
+ attr_reader :list_groups
3253
+ ##
3254
+ # RPC-specific configuration for `update_group`
3255
+ # @return [::Gapic::Config::Method]
3256
+ #
3257
+ attr_reader :update_group
3258
+ ##
3259
+ # RPC-specific configuration for `create_gateway_advertised_route`
3260
+ # @return [::Gapic::Config::Method]
3261
+ #
3262
+ attr_reader :create_gateway_advertised_route
3263
+ ##
3264
+ # RPC-specific configuration for `get_gateway_advertised_route`
3265
+ # @return [::Gapic::Config::Method]
3266
+ #
3267
+ attr_reader :get_gateway_advertised_route
3268
+ ##
3269
+ # RPC-specific configuration for `list_gateway_advertised_routes`
3270
+ # @return [::Gapic::Config::Method]
3271
+ #
3272
+ attr_reader :list_gateway_advertised_routes
3273
+ ##
3274
+ # RPC-specific configuration for `update_gateway_advertised_route`
3275
+ # @return [::Gapic::Config::Method]
3276
+ #
3277
+ attr_reader :update_gateway_advertised_route
3278
+ ##
3279
+ # RPC-specific configuration for `delete_gateway_advertised_route`
3280
+ # @return [::Gapic::Config::Method]
3281
+ #
3282
+ attr_reader :delete_gateway_advertised_route
3283
+
3284
+ # @private
3285
+ def initialize parent_rpcs = nil
3286
+ list_hubs_config = parent_rpcs.list_hubs if parent_rpcs.respond_to? :list_hubs
3287
+ @list_hubs = ::Gapic::Config::Method.new list_hubs_config
3288
+ get_hub_config = parent_rpcs.get_hub if parent_rpcs.respond_to? :get_hub
3289
+ @get_hub = ::Gapic::Config::Method.new get_hub_config
3290
+ create_hub_config = parent_rpcs.create_hub if parent_rpcs.respond_to? :create_hub
3291
+ @create_hub = ::Gapic::Config::Method.new create_hub_config
3292
+ update_hub_config = parent_rpcs.update_hub if parent_rpcs.respond_to? :update_hub
3293
+ @update_hub = ::Gapic::Config::Method.new update_hub_config
3294
+ delete_hub_config = parent_rpcs.delete_hub if parent_rpcs.respond_to? :delete_hub
3295
+ @delete_hub = ::Gapic::Config::Method.new delete_hub_config
3296
+ list_hub_spokes_config = parent_rpcs.list_hub_spokes if parent_rpcs.respond_to? :list_hub_spokes
3297
+ @list_hub_spokes = ::Gapic::Config::Method.new list_hub_spokes_config
3298
+ query_hub_status_config = parent_rpcs.query_hub_status if parent_rpcs.respond_to? :query_hub_status
3299
+ @query_hub_status = ::Gapic::Config::Method.new query_hub_status_config
3300
+ list_spokes_config = parent_rpcs.list_spokes if parent_rpcs.respond_to? :list_spokes
3301
+ @list_spokes = ::Gapic::Config::Method.new list_spokes_config
3302
+ get_spoke_config = parent_rpcs.get_spoke if parent_rpcs.respond_to? :get_spoke
3303
+ @get_spoke = ::Gapic::Config::Method.new get_spoke_config
3304
+ create_spoke_config = parent_rpcs.create_spoke if parent_rpcs.respond_to? :create_spoke
3305
+ @create_spoke = ::Gapic::Config::Method.new create_spoke_config
3306
+ update_spoke_config = parent_rpcs.update_spoke if parent_rpcs.respond_to? :update_spoke
3307
+ @update_spoke = ::Gapic::Config::Method.new update_spoke_config
3308
+ reject_hub_spoke_config = parent_rpcs.reject_hub_spoke if parent_rpcs.respond_to? :reject_hub_spoke
3309
+ @reject_hub_spoke = ::Gapic::Config::Method.new reject_hub_spoke_config
3310
+ accept_hub_spoke_config = parent_rpcs.accept_hub_spoke if parent_rpcs.respond_to? :accept_hub_spoke
3311
+ @accept_hub_spoke = ::Gapic::Config::Method.new accept_hub_spoke_config
3312
+ accept_spoke_update_config = parent_rpcs.accept_spoke_update if parent_rpcs.respond_to? :accept_spoke_update
3313
+ @accept_spoke_update = ::Gapic::Config::Method.new accept_spoke_update_config
3314
+ reject_spoke_update_config = parent_rpcs.reject_spoke_update if parent_rpcs.respond_to? :reject_spoke_update
3315
+ @reject_spoke_update = ::Gapic::Config::Method.new reject_spoke_update_config
3316
+ delete_spoke_config = parent_rpcs.delete_spoke if parent_rpcs.respond_to? :delete_spoke
3317
+ @delete_spoke = ::Gapic::Config::Method.new delete_spoke_config
3318
+ get_route_table_config = parent_rpcs.get_route_table if parent_rpcs.respond_to? :get_route_table
3319
+ @get_route_table = ::Gapic::Config::Method.new get_route_table_config
3320
+ get_route_config = parent_rpcs.get_route if parent_rpcs.respond_to? :get_route
3321
+ @get_route = ::Gapic::Config::Method.new get_route_config
3322
+ list_routes_config = parent_rpcs.list_routes if parent_rpcs.respond_to? :list_routes
3323
+ @list_routes = ::Gapic::Config::Method.new list_routes_config
3324
+ list_route_tables_config = parent_rpcs.list_route_tables if parent_rpcs.respond_to? :list_route_tables
3325
+ @list_route_tables = ::Gapic::Config::Method.new list_route_tables_config
3326
+ get_group_config = parent_rpcs.get_group if parent_rpcs.respond_to? :get_group
3327
+ @get_group = ::Gapic::Config::Method.new get_group_config
3328
+ list_groups_config = parent_rpcs.list_groups if parent_rpcs.respond_to? :list_groups
3329
+ @list_groups = ::Gapic::Config::Method.new list_groups_config
3330
+ update_group_config = parent_rpcs.update_group if parent_rpcs.respond_to? :update_group
3331
+ @update_group = ::Gapic::Config::Method.new update_group_config
3332
+ create_gateway_advertised_route_config = parent_rpcs.create_gateway_advertised_route if parent_rpcs.respond_to? :create_gateway_advertised_route
3333
+ @create_gateway_advertised_route = ::Gapic::Config::Method.new create_gateway_advertised_route_config
3334
+ get_gateway_advertised_route_config = parent_rpcs.get_gateway_advertised_route if parent_rpcs.respond_to? :get_gateway_advertised_route
3335
+ @get_gateway_advertised_route = ::Gapic::Config::Method.new get_gateway_advertised_route_config
3336
+ list_gateway_advertised_routes_config = parent_rpcs.list_gateway_advertised_routes if parent_rpcs.respond_to? :list_gateway_advertised_routes
3337
+ @list_gateway_advertised_routes = ::Gapic::Config::Method.new list_gateway_advertised_routes_config
3338
+ update_gateway_advertised_route_config = parent_rpcs.update_gateway_advertised_route if parent_rpcs.respond_to? :update_gateway_advertised_route
3339
+ @update_gateway_advertised_route = ::Gapic::Config::Method.new update_gateway_advertised_route_config
3340
+ delete_gateway_advertised_route_config = parent_rpcs.delete_gateway_advertised_route if parent_rpcs.respond_to? :delete_gateway_advertised_route
3341
+ @delete_gateway_advertised_route = ::Gapic::Config::Method.new delete_gateway_advertised_route_config
3342
+
3343
+ yield self if block_given?
3344
+ end
3345
+ end
3346
+ end
3347
+ end
3348
+ end
3349
+ end
3350
+ end
3351
+ end
3352
+ end
3353
+ end