google-cloud-edge_network-v1 0.a → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +144 -8
  5. data/lib/google/cloud/edge_network/v1/bindings_override.rb +102 -0
  6. data/lib/google/cloud/edge_network/v1/edge_network/client.rb +3178 -0
  7. data/lib/google/cloud/edge_network/v1/edge_network/credentials.rb +47 -0
  8. data/lib/google/cloud/edge_network/v1/edge_network/operations.rb +801 -0
  9. data/lib/google/cloud/edge_network/v1/edge_network/paths.rb +174 -0
  10. data/lib/google/cloud/edge_network/v1/edge_network/rest/client.rb +2972 -0
  11. data/lib/google/cloud/edge_network/v1/edge_network/rest/operations.rb +895 -0
  12. data/lib/google/cloud/edge_network/v1/edge_network/rest/service_stub.rb +1601 -0
  13. data/lib/google/cloud/edge_network/v1/edge_network/rest.rb +57 -0
  14. data/lib/google/cloud/edge_network/v1/edge_network.rb +59 -0
  15. data/lib/google/cloud/edge_network/v1/rest.rb +38 -0
  16. data/lib/google/cloud/edge_network/v1/version.rb +7 -2
  17. data/lib/google/cloud/edge_network/v1.rb +45 -0
  18. data/lib/google/cloud/edgenetwork/v1/resources_pb.rb +69 -0
  19. data/lib/google/cloud/edgenetwork/v1/service_pb.rb +92 -0
  20. data/lib/google/cloud/edgenetwork/v1/service_services_pb.rb +98 -0
  21. data/lib/google-cloud-edge_network-v1.rb +21 -0
  22. data/proto_docs/README.md +4 -0
  23. data/proto_docs/google/api/client.rb +395 -0
  24. data/proto_docs/google/api/field_behavior.rb +85 -0
  25. data/proto_docs/google/api/launch_stage.rb +71 -0
  26. data/proto_docs/google/api/resource.rb +222 -0
  27. data/proto_docs/google/cloud/edgenetwork/v1/resources.rb +637 -0
  28. data/proto_docs/google/cloud/edgenetwork/v1/service.rb +709 -0
  29. data/proto_docs/google/longrunning/operations.rb +164 -0
  30. data/proto_docs/google/protobuf/any.rb +144 -0
  31. data/proto_docs/google/protobuf/duration.rb +98 -0
  32. data/proto_docs/google/protobuf/empty.rb +34 -0
  33. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  34. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  35. data/proto_docs/google/rpc/status.rb +48 -0
  36. metadata +209 -13
@@ -0,0 +1,2972 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/edgenetwork/v1/service_pb"
21
+ require "google/cloud/edge_network/v1/edge_network/rest/service_stub"
22
+ require "google/cloud/location/rest"
23
+
24
+ module Google
25
+ module Cloud
26
+ module EdgeNetwork
27
+ module V1
28
+ module EdgeNetwork
29
+ module Rest
30
+ ##
31
+ # REST client for the EdgeNetwork service.
32
+ #
33
+ # EdgeNetwork API provides managed, highly available cloud dynamic network
34
+ # configuration service to the GEC customer to enable edge application and
35
+ # network function solutions. This allows the customers to easily define and
36
+ # configure the network setup and property to meet the workload requirement.
37
+ #
38
+ class Client
39
+ # @private
40
+ DEFAULT_ENDPOINT_TEMPLATE = "edgenetwork.$UNIVERSE_DOMAIN$"
41
+
42
+ include Paths
43
+
44
+ # @private
45
+ attr_reader :edge_network_stub
46
+
47
+ ##
48
+ # Configure the EdgeNetwork Client class.
49
+ #
50
+ # See {::Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Client::Configuration}
51
+ # for a description of the configuration fields.
52
+ #
53
+ # @example
54
+ #
55
+ # # Modify the configuration for all EdgeNetwork clients
56
+ # ::Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Client.configure do |config|
57
+ # config.timeout = 10.0
58
+ # end
59
+ #
60
+ # @yield [config] Configure the Client client.
61
+ # @yieldparam config [Client::Configuration]
62
+ #
63
+ # @return [Client::Configuration]
64
+ #
65
+ def self.configure
66
+ @configure ||= begin
67
+ namespace = ["Google", "Cloud", "EdgeNetwork", "V1"]
68
+ parent_config = while namespace.any?
69
+ parent_name = namespace.join "::"
70
+ parent_const = const_get parent_name
71
+ break parent_const.configure if parent_const.respond_to? :configure
72
+ namespace.pop
73
+ end
74
+ default_config = Client::Configuration.new parent_config
75
+
76
+ default_config.rpcs.initialize_zone.timeout = 60.0
77
+
78
+ default_config.rpcs.list_networks.timeout = 60.0
79
+ default_config.rpcs.list_networks.retry_policy = {
80
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
81
+ }
82
+
83
+ default_config.rpcs.get_network.timeout = 60.0
84
+ default_config.rpcs.get_network.retry_policy = {
85
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
86
+ }
87
+
88
+ default_config.rpcs.diagnose_network.timeout = 60.0
89
+ default_config.rpcs.diagnose_network.retry_policy = {
90
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
91
+ }
92
+
93
+ default_config.rpcs.create_network.timeout = 60.0
94
+
95
+ default_config.rpcs.delete_network.timeout = 60.0
96
+
97
+ default_config.rpcs.list_subnets.timeout = 60.0
98
+ default_config.rpcs.list_subnets.retry_policy = {
99
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
100
+ }
101
+
102
+ default_config.rpcs.get_subnet.timeout = 60.0
103
+ default_config.rpcs.get_subnet.retry_policy = {
104
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
105
+ }
106
+
107
+ default_config.rpcs.create_subnet.timeout = 60.0
108
+
109
+ default_config.rpcs.delete_subnet.timeout = 60.0
110
+
111
+ default_config.rpcs.list_interconnects.timeout = 60.0
112
+ default_config.rpcs.list_interconnects.retry_policy = {
113
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
114
+ }
115
+
116
+ default_config.rpcs.get_interconnect.timeout = 60.0
117
+ default_config.rpcs.get_interconnect.retry_policy = {
118
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
119
+ }
120
+
121
+ default_config.rpcs.diagnose_interconnect.timeout = 60.0
122
+ default_config.rpcs.diagnose_interconnect.retry_policy = {
123
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
124
+ }
125
+
126
+ default_config.rpcs.list_interconnect_attachments.timeout = 60.0
127
+ default_config.rpcs.list_interconnect_attachments.retry_policy = {
128
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
129
+ }
130
+
131
+ default_config.rpcs.get_interconnect_attachment.timeout = 60.0
132
+ default_config.rpcs.get_interconnect_attachment.retry_policy = {
133
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
134
+ }
135
+
136
+ default_config.rpcs.create_interconnect_attachment.timeout = 60.0
137
+
138
+ default_config.rpcs.delete_interconnect_attachment.timeout = 60.0
139
+
140
+ default_config.rpcs.list_routers.timeout = 60.0
141
+ default_config.rpcs.list_routers.retry_policy = {
142
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
143
+ }
144
+
145
+ default_config.rpcs.get_router.timeout = 60.0
146
+ default_config.rpcs.get_router.retry_policy = {
147
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
148
+ }
149
+
150
+ default_config.rpcs.diagnose_router.timeout = 60.0
151
+ default_config.rpcs.diagnose_router.retry_policy = {
152
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
153
+ }
154
+
155
+ default_config.rpcs.create_router.timeout = 60.0
156
+
157
+ default_config.rpcs.update_router.timeout = 60.0
158
+
159
+ default_config.rpcs.delete_router.timeout = 60.0
160
+
161
+ default_config
162
+ end
163
+ yield @configure if block_given?
164
+ @configure
165
+ end
166
+
167
+ ##
168
+ # Configure the EdgeNetwork Client instance.
169
+ #
170
+ # The configuration is set to the derived mode, meaning that values can be changed,
171
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
172
+ # should be made on {Client.configure}.
173
+ #
174
+ # See {::Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Client::Configuration}
175
+ # for a description of the configuration fields.
176
+ #
177
+ # @yield [config] Configure the Client client.
178
+ # @yieldparam config [Client::Configuration]
179
+ #
180
+ # @return [Client::Configuration]
181
+ #
182
+ def configure
183
+ yield @config if block_given?
184
+ @config
185
+ end
186
+
187
+ ##
188
+ # The effective universe domain
189
+ #
190
+ # @return [String]
191
+ #
192
+ def universe_domain
193
+ @edge_network_stub.universe_domain
194
+ end
195
+
196
+ ##
197
+ # Create a new EdgeNetwork REST client object.
198
+ #
199
+ # @example
200
+ #
201
+ # # Create a client using the default configuration
202
+ # client = ::Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Client.new
203
+ #
204
+ # # Create a client using a custom configuration
205
+ # client = ::Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Client.new do |config|
206
+ # config.timeout = 10.0
207
+ # end
208
+ #
209
+ # @yield [config] Configure the EdgeNetwork client.
210
+ # @yieldparam config [Client::Configuration]
211
+ #
212
+ def initialize
213
+ # Create the configuration object
214
+ @config = Configuration.new Client.configure
215
+
216
+ # Yield the configuration if needed
217
+ yield @config if block_given?
218
+
219
+ # Create credentials
220
+ credentials = @config.credentials
221
+ # Use self-signed JWT if the endpoint is unchanged from default,
222
+ # but only if the default endpoint does not have a region prefix.
223
+ enable_self_signed_jwt = @config.endpoint.nil? ||
224
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
225
+ !@config.endpoint.split(".").first.include?("-"))
226
+ credentials ||= Credentials.default scope: @config.scope,
227
+ enable_self_signed_jwt: enable_self_signed_jwt
228
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
229
+ credentials = Credentials.new credentials, scope: @config.scope
230
+ end
231
+
232
+ @quota_project_id = @config.quota_project
233
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
234
+
235
+ @operations_client = ::Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Operations.new do |config|
236
+ config.credentials = credentials
237
+ config.quota_project = @quota_project_id
238
+ config.endpoint = @config.endpoint
239
+ config.universe_domain = @config.universe_domain
240
+ end
241
+
242
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
243
+ config.credentials = credentials
244
+ config.quota_project = @quota_project_id
245
+ config.endpoint = @config.endpoint
246
+ config.universe_domain = @config.universe_domain
247
+ config.bindings_override = @config.bindings_override
248
+ end
249
+
250
+ @edge_network_stub = ::Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::ServiceStub.new(
251
+ endpoint: @config.endpoint,
252
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
253
+ universe_domain: @config.universe_domain,
254
+ credentials: credentials
255
+ )
256
+ end
257
+
258
+ ##
259
+ # Get the associated client for long-running operations.
260
+ #
261
+ # @return [::Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Operations]
262
+ #
263
+ attr_reader :operations_client
264
+
265
+ ##
266
+ # Get the associated client for mix-in of the Locations.
267
+ #
268
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
269
+ #
270
+ attr_reader :location_client
271
+
272
+ # Service calls
273
+
274
+ ##
275
+ # InitializeZone will initialize resources for a zone in a project.
276
+ #
277
+ # @overload initialize_zone(request, options = nil)
278
+ # Pass arguments to `initialize_zone` via a request object, either of type
279
+ # {::Google::Cloud::EdgeNetwork::V1::InitializeZoneRequest} or an equivalent Hash.
280
+ #
281
+ # @param request [::Google::Cloud::EdgeNetwork::V1::InitializeZoneRequest, ::Hash]
282
+ # A request object representing the call parameters. Required. To specify no
283
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
284
+ # @param options [::Gapic::CallOptions, ::Hash]
285
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
286
+ #
287
+ # @overload initialize_zone(name: nil)
288
+ # Pass arguments to `initialize_zone` via keyword arguments. Note that at
289
+ # least one keyword argument is required. To specify no parameters, or to keep all
290
+ # the default parameter values, pass an empty Hash as a request object (see above).
291
+ #
292
+ # @param name [::String]
293
+ # Required. The name of the zone resource.
294
+ # @yield [result, operation] Access the result along with the TransportOperation object
295
+ # @yieldparam result [::Google::Cloud::EdgeNetwork::V1::InitializeZoneResponse]
296
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
297
+ #
298
+ # @return [::Google::Cloud::EdgeNetwork::V1::InitializeZoneResponse]
299
+ #
300
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
301
+ #
302
+ # @example Basic example
303
+ # require "google/cloud/edge_network/v1"
304
+ #
305
+ # # Create a client object. The client can be reused for multiple calls.
306
+ # client = Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Client.new
307
+ #
308
+ # # Create a request. To set request fields, pass in keyword arguments.
309
+ # request = Google::Cloud::EdgeNetwork::V1::InitializeZoneRequest.new
310
+ #
311
+ # # Call the initialize_zone method.
312
+ # result = client.initialize_zone request
313
+ #
314
+ # # The returned object is of type Google::Cloud::EdgeNetwork::V1::InitializeZoneResponse.
315
+ # p result
316
+ #
317
+ def initialize_zone request, options = nil
318
+ raise ::ArgumentError, "request must be provided" if request.nil?
319
+
320
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::InitializeZoneRequest
321
+
322
+ # Converts hash and nil to an options object
323
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
324
+
325
+ # Customize the options with defaults
326
+ call_metadata = @config.rpcs.initialize_zone.metadata.to_h
327
+
328
+ # Set x-goog-api-client and x-goog-user-project headers
329
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
330
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
331
+ gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION,
332
+ transports_version_send: [:rest]
333
+
334
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
335
+
336
+ options.apply_defaults timeout: @config.rpcs.initialize_zone.timeout,
337
+ metadata: call_metadata,
338
+ retry_policy: @config.rpcs.initialize_zone.retry_policy
339
+
340
+ options.apply_defaults timeout: @config.timeout,
341
+ metadata: @config.metadata,
342
+ retry_policy: @config.retry_policy
343
+
344
+ @edge_network_stub.initialize_zone request, options do |result, operation|
345
+ yield result, operation if block_given?
346
+ return result
347
+ end
348
+ rescue ::Gapic::Rest::Error => e
349
+ raise ::Google::Cloud::Error.from_error(e)
350
+ end
351
+
352
+ ##
353
+ # Lists Zones in a given project and location.
354
+ #
355
+ # @overload list_zones(request, options = nil)
356
+ # Pass arguments to `list_zones` via a request object, either of type
357
+ # {::Google::Cloud::EdgeNetwork::V1::ListZonesRequest} or an equivalent Hash.
358
+ #
359
+ # @param request [::Google::Cloud::EdgeNetwork::V1::ListZonesRequest, ::Hash]
360
+ # A request object representing the call parameters. Required. To specify no
361
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
362
+ # @param options [::Gapic::CallOptions, ::Hash]
363
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
364
+ #
365
+ # @overload list_zones(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
366
+ # Pass arguments to `list_zones` via keyword arguments. Note that at
367
+ # least one keyword argument is required. To specify no parameters, or to keep all
368
+ # the default parameter values, pass an empty Hash as a request object (see above).
369
+ #
370
+ # @param parent [::String]
371
+ # Required. Parent value for ListZonesRequest
372
+ # @param page_size [::Integer]
373
+ # Requested page size. Server may return fewer items than requested.
374
+ # If unspecified, server will pick an appropriate default.
375
+ # @param page_token [::String]
376
+ # A token identifying a page of results the server should return.
377
+ # @param filter [::String]
378
+ # Filtering results
379
+ # @param order_by [::String]
380
+ # Hint for how to order the results
381
+ # @yield [result, operation] Access the result along with the TransportOperation object
382
+ # @yieldparam result [::Google::Cloud::EdgeNetwork::V1::ListZonesResponse]
383
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
384
+ #
385
+ # @return [::Google::Cloud::EdgeNetwork::V1::ListZonesResponse]
386
+ #
387
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
388
+ #
389
+ # @example Basic example
390
+ # require "google/cloud/edge_network/v1"
391
+ #
392
+ # # Create a client object. The client can be reused for multiple calls.
393
+ # client = Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Client.new
394
+ #
395
+ # # Create a request. To set request fields, pass in keyword arguments.
396
+ # request = Google::Cloud::EdgeNetwork::V1::ListZonesRequest.new
397
+ #
398
+ # # Call the list_zones method.
399
+ # result = client.list_zones request
400
+ #
401
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
402
+ # # over elements, and API calls will be issued to fetch pages as needed.
403
+ # result.each do |item|
404
+ # # Each element is of type ::Google::Cloud::EdgeNetwork::V1::Zone.
405
+ # p item
406
+ # end
407
+ #
408
+ def list_zones request, options = nil
409
+ raise ::ArgumentError, "request must be provided" if request.nil?
410
+
411
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::ListZonesRequest
412
+
413
+ # Converts hash and nil to an options object
414
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
415
+
416
+ # Customize the options with defaults
417
+ call_metadata = @config.rpcs.list_zones.metadata.to_h
418
+
419
+ # Set x-goog-api-client and x-goog-user-project headers
420
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
421
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
422
+ gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION,
423
+ transports_version_send: [:rest]
424
+
425
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
426
+
427
+ options.apply_defaults timeout: @config.rpcs.list_zones.timeout,
428
+ metadata: call_metadata,
429
+ retry_policy: @config.rpcs.list_zones.retry_policy
430
+
431
+ options.apply_defaults timeout: @config.timeout,
432
+ metadata: @config.metadata,
433
+ retry_policy: @config.retry_policy
434
+
435
+ @edge_network_stub.list_zones request, options do |result, operation|
436
+ yield result, operation if block_given?
437
+ return result
438
+ end
439
+ rescue ::Gapic::Rest::Error => e
440
+ raise ::Google::Cloud::Error.from_error(e)
441
+ end
442
+
443
+ ##
444
+ # Gets details of a single Zone.
445
+ #
446
+ # @overload get_zone(request, options = nil)
447
+ # Pass arguments to `get_zone` via a request object, either of type
448
+ # {::Google::Cloud::EdgeNetwork::V1::GetZoneRequest} or an equivalent Hash.
449
+ #
450
+ # @param request [::Google::Cloud::EdgeNetwork::V1::GetZoneRequest, ::Hash]
451
+ # A request object representing the call parameters. Required. To specify no
452
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
453
+ # @param options [::Gapic::CallOptions, ::Hash]
454
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
455
+ #
456
+ # @overload get_zone(name: nil)
457
+ # Pass arguments to `get_zone` via keyword arguments. Note that at
458
+ # least one keyword argument is required. To specify no parameters, or to keep all
459
+ # the default parameter values, pass an empty Hash as a request object (see above).
460
+ #
461
+ # @param name [::String]
462
+ # Required. Name of the resource
463
+ # @yield [result, operation] Access the result along with the TransportOperation object
464
+ # @yieldparam result [::Google::Cloud::EdgeNetwork::V1::Zone]
465
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
466
+ #
467
+ # @return [::Google::Cloud::EdgeNetwork::V1::Zone]
468
+ #
469
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
470
+ #
471
+ # @example Basic example
472
+ # require "google/cloud/edge_network/v1"
473
+ #
474
+ # # Create a client object. The client can be reused for multiple calls.
475
+ # client = Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Client.new
476
+ #
477
+ # # Create a request. To set request fields, pass in keyword arguments.
478
+ # request = Google::Cloud::EdgeNetwork::V1::GetZoneRequest.new
479
+ #
480
+ # # Call the get_zone method.
481
+ # result = client.get_zone request
482
+ #
483
+ # # The returned object is of type Google::Cloud::EdgeNetwork::V1::Zone.
484
+ # p result
485
+ #
486
+ def get_zone request, options = nil
487
+ raise ::ArgumentError, "request must be provided" if request.nil?
488
+
489
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::GetZoneRequest
490
+
491
+ # Converts hash and nil to an options object
492
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
493
+
494
+ # Customize the options with defaults
495
+ call_metadata = @config.rpcs.get_zone.metadata.to_h
496
+
497
+ # Set x-goog-api-client and x-goog-user-project headers
498
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
499
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
500
+ gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION,
501
+ transports_version_send: [:rest]
502
+
503
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
504
+
505
+ options.apply_defaults timeout: @config.rpcs.get_zone.timeout,
506
+ metadata: call_metadata,
507
+ retry_policy: @config.rpcs.get_zone.retry_policy
508
+
509
+ options.apply_defaults timeout: @config.timeout,
510
+ metadata: @config.metadata,
511
+ retry_policy: @config.retry_policy
512
+
513
+ @edge_network_stub.get_zone request, options do |result, operation|
514
+ yield result, operation if block_given?
515
+ return result
516
+ end
517
+ rescue ::Gapic::Rest::Error => e
518
+ raise ::Google::Cloud::Error.from_error(e)
519
+ end
520
+
521
+ ##
522
+ # Lists Networks in a given project and location.
523
+ #
524
+ # @overload list_networks(request, options = nil)
525
+ # Pass arguments to `list_networks` via a request object, either of type
526
+ # {::Google::Cloud::EdgeNetwork::V1::ListNetworksRequest} or an equivalent Hash.
527
+ #
528
+ # @param request [::Google::Cloud::EdgeNetwork::V1::ListNetworksRequest, ::Hash]
529
+ # A request object representing the call parameters. Required. To specify no
530
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
531
+ # @param options [::Gapic::CallOptions, ::Hash]
532
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
533
+ #
534
+ # @overload list_networks(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
535
+ # Pass arguments to `list_networks` via keyword arguments. Note that at
536
+ # least one keyword argument is required. To specify no parameters, or to keep all
537
+ # the default parameter values, pass an empty Hash as a request object (see above).
538
+ #
539
+ # @param parent [::String]
540
+ # Required. Parent value for ListNetworksRequest
541
+ # @param page_size [::Integer]
542
+ # Requested page size. Server may return fewer items than requested.
543
+ # If unspecified, server will pick an appropriate default.
544
+ # @param page_token [::String]
545
+ # A token identifying a page of results the server should return.
546
+ # @param filter [::String]
547
+ # Filtering results
548
+ # @param order_by [::String]
549
+ # Hint for how to order the results
550
+ # @yield [result, operation] Access the result along with the TransportOperation object
551
+ # @yieldparam result [::Google::Cloud::EdgeNetwork::V1::ListNetworksResponse]
552
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
553
+ #
554
+ # @return [::Google::Cloud::EdgeNetwork::V1::ListNetworksResponse]
555
+ #
556
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
557
+ #
558
+ # @example Basic example
559
+ # require "google/cloud/edge_network/v1"
560
+ #
561
+ # # Create a client object. The client can be reused for multiple calls.
562
+ # client = Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Client.new
563
+ #
564
+ # # Create a request. To set request fields, pass in keyword arguments.
565
+ # request = Google::Cloud::EdgeNetwork::V1::ListNetworksRequest.new
566
+ #
567
+ # # Call the list_networks method.
568
+ # result = client.list_networks request
569
+ #
570
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
571
+ # # over elements, and API calls will be issued to fetch pages as needed.
572
+ # result.each do |item|
573
+ # # Each element is of type ::Google::Cloud::EdgeNetwork::V1::Network.
574
+ # p item
575
+ # end
576
+ #
577
+ def list_networks request, options = nil
578
+ raise ::ArgumentError, "request must be provided" if request.nil?
579
+
580
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::ListNetworksRequest
581
+
582
+ # Converts hash and nil to an options object
583
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
584
+
585
+ # Customize the options with defaults
586
+ call_metadata = @config.rpcs.list_networks.metadata.to_h
587
+
588
+ # Set x-goog-api-client and x-goog-user-project headers
589
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
590
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
591
+ gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION,
592
+ transports_version_send: [:rest]
593
+
594
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
595
+
596
+ options.apply_defaults timeout: @config.rpcs.list_networks.timeout,
597
+ metadata: call_metadata,
598
+ retry_policy: @config.rpcs.list_networks.retry_policy
599
+
600
+ options.apply_defaults timeout: @config.timeout,
601
+ metadata: @config.metadata,
602
+ retry_policy: @config.retry_policy
603
+
604
+ @edge_network_stub.list_networks request, options do |result, operation|
605
+ yield result, operation if block_given?
606
+ return result
607
+ end
608
+ rescue ::Gapic::Rest::Error => e
609
+ raise ::Google::Cloud::Error.from_error(e)
610
+ end
611
+
612
+ ##
613
+ # Gets details of a single Network.
614
+ #
615
+ # @overload get_network(request, options = nil)
616
+ # Pass arguments to `get_network` via a request object, either of type
617
+ # {::Google::Cloud::EdgeNetwork::V1::GetNetworkRequest} or an equivalent Hash.
618
+ #
619
+ # @param request [::Google::Cloud::EdgeNetwork::V1::GetNetworkRequest, ::Hash]
620
+ # A request object representing the call parameters. Required. To specify no
621
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
622
+ # @param options [::Gapic::CallOptions, ::Hash]
623
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
624
+ #
625
+ # @overload get_network(name: nil)
626
+ # Pass arguments to `get_network` via keyword arguments. Note that at
627
+ # least one keyword argument is required. To specify no parameters, or to keep all
628
+ # the default parameter values, pass an empty Hash as a request object (see above).
629
+ #
630
+ # @param name [::String]
631
+ # Required. Name of the resource
632
+ # @yield [result, operation] Access the result along with the TransportOperation object
633
+ # @yieldparam result [::Google::Cloud::EdgeNetwork::V1::Network]
634
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
635
+ #
636
+ # @return [::Google::Cloud::EdgeNetwork::V1::Network]
637
+ #
638
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
639
+ #
640
+ # @example Basic example
641
+ # require "google/cloud/edge_network/v1"
642
+ #
643
+ # # Create a client object. The client can be reused for multiple calls.
644
+ # client = Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Client.new
645
+ #
646
+ # # Create a request. To set request fields, pass in keyword arguments.
647
+ # request = Google::Cloud::EdgeNetwork::V1::GetNetworkRequest.new
648
+ #
649
+ # # Call the get_network method.
650
+ # result = client.get_network request
651
+ #
652
+ # # The returned object is of type Google::Cloud::EdgeNetwork::V1::Network.
653
+ # p result
654
+ #
655
+ def get_network request, options = nil
656
+ raise ::ArgumentError, "request must be provided" if request.nil?
657
+
658
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::GetNetworkRequest
659
+
660
+ # Converts hash and nil to an options object
661
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
662
+
663
+ # Customize the options with defaults
664
+ call_metadata = @config.rpcs.get_network.metadata.to_h
665
+
666
+ # Set x-goog-api-client and x-goog-user-project headers
667
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
668
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
669
+ gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION,
670
+ transports_version_send: [:rest]
671
+
672
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
673
+
674
+ options.apply_defaults timeout: @config.rpcs.get_network.timeout,
675
+ metadata: call_metadata,
676
+ retry_policy: @config.rpcs.get_network.retry_policy
677
+
678
+ options.apply_defaults timeout: @config.timeout,
679
+ metadata: @config.metadata,
680
+ retry_policy: @config.retry_policy
681
+
682
+ @edge_network_stub.get_network request, options do |result, operation|
683
+ yield result, operation if block_given?
684
+ return result
685
+ end
686
+ rescue ::Gapic::Rest::Error => e
687
+ raise ::Google::Cloud::Error.from_error(e)
688
+ end
689
+
690
+ ##
691
+ # Get the diagnostics of a single network resource.
692
+ #
693
+ # @overload diagnose_network(request, options = nil)
694
+ # Pass arguments to `diagnose_network` via a request object, either of type
695
+ # {::Google::Cloud::EdgeNetwork::V1::DiagnoseNetworkRequest} or an equivalent Hash.
696
+ #
697
+ # @param request [::Google::Cloud::EdgeNetwork::V1::DiagnoseNetworkRequest, ::Hash]
698
+ # A request object representing the call parameters. Required. To specify no
699
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
700
+ # @param options [::Gapic::CallOptions, ::Hash]
701
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
702
+ #
703
+ # @overload diagnose_network(name: nil)
704
+ # Pass arguments to `diagnose_network` via keyword arguments. Note that at
705
+ # least one keyword argument is required. To specify no parameters, or to keep all
706
+ # the default parameter values, pass an empty Hash as a request object (see above).
707
+ #
708
+ # @param name [::String]
709
+ # Required. The name of the network resource.
710
+ # @yield [result, operation] Access the result along with the TransportOperation object
711
+ # @yieldparam result [::Google::Cloud::EdgeNetwork::V1::DiagnoseNetworkResponse]
712
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
713
+ #
714
+ # @return [::Google::Cloud::EdgeNetwork::V1::DiagnoseNetworkResponse]
715
+ #
716
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
717
+ #
718
+ # @example Basic example
719
+ # require "google/cloud/edge_network/v1"
720
+ #
721
+ # # Create a client object. The client can be reused for multiple calls.
722
+ # client = Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Client.new
723
+ #
724
+ # # Create a request. To set request fields, pass in keyword arguments.
725
+ # request = Google::Cloud::EdgeNetwork::V1::DiagnoseNetworkRequest.new
726
+ #
727
+ # # Call the diagnose_network method.
728
+ # result = client.diagnose_network request
729
+ #
730
+ # # The returned object is of type Google::Cloud::EdgeNetwork::V1::DiagnoseNetworkResponse.
731
+ # p result
732
+ #
733
+ def diagnose_network request, options = nil
734
+ raise ::ArgumentError, "request must be provided" if request.nil?
735
+
736
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::DiagnoseNetworkRequest
737
+
738
+ # Converts hash and nil to an options object
739
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
740
+
741
+ # Customize the options with defaults
742
+ call_metadata = @config.rpcs.diagnose_network.metadata.to_h
743
+
744
+ # Set x-goog-api-client and x-goog-user-project headers
745
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
746
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
747
+ gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION,
748
+ transports_version_send: [:rest]
749
+
750
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
751
+
752
+ options.apply_defaults timeout: @config.rpcs.diagnose_network.timeout,
753
+ metadata: call_metadata,
754
+ retry_policy: @config.rpcs.diagnose_network.retry_policy
755
+
756
+ options.apply_defaults timeout: @config.timeout,
757
+ metadata: @config.metadata,
758
+ retry_policy: @config.retry_policy
759
+
760
+ @edge_network_stub.diagnose_network request, options do |result, operation|
761
+ yield result, operation if block_given?
762
+ return result
763
+ end
764
+ rescue ::Gapic::Rest::Error => e
765
+ raise ::Google::Cloud::Error.from_error(e)
766
+ end
767
+
768
+ ##
769
+ # Creates a new Network in a given project and location.
770
+ #
771
+ # @overload create_network(request, options = nil)
772
+ # Pass arguments to `create_network` via a request object, either of type
773
+ # {::Google::Cloud::EdgeNetwork::V1::CreateNetworkRequest} or an equivalent Hash.
774
+ #
775
+ # @param request [::Google::Cloud::EdgeNetwork::V1::CreateNetworkRequest, ::Hash]
776
+ # A request object representing the call parameters. Required. To specify no
777
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
778
+ # @param options [::Gapic::CallOptions, ::Hash]
779
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
780
+ #
781
+ # @overload create_network(parent: nil, network_id: nil, network: nil, request_id: nil)
782
+ # Pass arguments to `create_network` via keyword arguments. Note that at
783
+ # least one keyword argument is required. To specify no parameters, or to keep all
784
+ # the default parameter values, pass an empty Hash as a request object (see above).
785
+ #
786
+ # @param parent [::String]
787
+ # Required. Value for parent.
788
+ # @param network_id [::String]
789
+ # Required. Id of the requesting object
790
+ # If auto-generating Id server-side, remove this field and
791
+ # network_id from the method_signature of Create RPC
792
+ # @param network [::Google::Cloud::EdgeNetwork::V1::Network, ::Hash]
793
+ # Required. The resource being created
794
+ # @param request_id [::String]
795
+ # Optional. An optional request ID to identify requests. Specify a unique
796
+ # request ID so that if you must retry your request, the server will know to
797
+ # ignore the request if it has already been completed. The server will
798
+ # guarantee that for at least 60 minutes since the first request.
799
+ #
800
+ # For example, consider a situation where you make an initial request and
801
+ # the request times out. If you make the request again with the same request
802
+ # ID, the server can check if original operation with the same request ID
803
+ # was received, and if so, will ignore the second request. This prevents
804
+ # clients from accidentally creating duplicate commitments.
805
+ #
806
+ # The request ID must be a valid UUID with the exception that zero UUID is
807
+ # not supported (00000000-0000-0000-0000-000000000000).
808
+ # @yield [result, operation] Access the result along with the TransportOperation object
809
+ # @yieldparam result [::Gapic::Operation]
810
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
811
+ #
812
+ # @return [::Gapic::Operation]
813
+ #
814
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
815
+ #
816
+ # @example Basic example
817
+ # require "google/cloud/edge_network/v1"
818
+ #
819
+ # # Create a client object. The client can be reused for multiple calls.
820
+ # client = Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Client.new
821
+ #
822
+ # # Create a request. To set request fields, pass in keyword arguments.
823
+ # request = Google::Cloud::EdgeNetwork::V1::CreateNetworkRequest.new
824
+ #
825
+ # # Call the create_network method.
826
+ # result = client.create_network request
827
+ #
828
+ # # The returned object is of type Gapic::Operation. You can use it to
829
+ # # check the status of an operation, cancel it, or wait for results.
830
+ # # Here is how to wait for a response.
831
+ # result.wait_until_done! timeout: 60
832
+ # if result.response?
833
+ # p result.response
834
+ # else
835
+ # puts "No response received."
836
+ # end
837
+ #
838
+ def create_network request, options = nil
839
+ raise ::ArgumentError, "request must be provided" if request.nil?
840
+
841
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::CreateNetworkRequest
842
+
843
+ # Converts hash and nil to an options object
844
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
845
+
846
+ # Customize the options with defaults
847
+ call_metadata = @config.rpcs.create_network.metadata.to_h
848
+
849
+ # Set x-goog-api-client and x-goog-user-project headers
850
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
851
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
852
+ gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION,
853
+ transports_version_send: [:rest]
854
+
855
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
856
+
857
+ options.apply_defaults timeout: @config.rpcs.create_network.timeout,
858
+ metadata: call_metadata,
859
+ retry_policy: @config.rpcs.create_network.retry_policy
860
+
861
+ options.apply_defaults timeout: @config.timeout,
862
+ metadata: @config.metadata,
863
+ retry_policy: @config.retry_policy
864
+
865
+ @edge_network_stub.create_network request, options do |result, operation|
866
+ result = ::Gapic::Operation.new result, @operations_client, options: options
867
+ yield result, operation if block_given?
868
+ return result
869
+ end
870
+ rescue ::Gapic::Rest::Error => e
871
+ raise ::Google::Cloud::Error.from_error(e)
872
+ end
873
+
874
+ ##
875
+ # Deletes a single Network.
876
+ #
877
+ # @overload delete_network(request, options = nil)
878
+ # Pass arguments to `delete_network` via a request object, either of type
879
+ # {::Google::Cloud::EdgeNetwork::V1::DeleteNetworkRequest} or an equivalent Hash.
880
+ #
881
+ # @param request [::Google::Cloud::EdgeNetwork::V1::DeleteNetworkRequest, ::Hash]
882
+ # A request object representing the call parameters. Required. To specify no
883
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
884
+ # @param options [::Gapic::CallOptions, ::Hash]
885
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
886
+ #
887
+ # @overload delete_network(name: nil, request_id: nil)
888
+ # Pass arguments to `delete_network` via keyword arguments. Note that at
889
+ # least one keyword argument is required. To specify no parameters, or to keep all
890
+ # the default parameter values, pass an empty Hash as a request object (see above).
891
+ #
892
+ # @param name [::String]
893
+ # Required. Name of the resource
894
+ # @param request_id [::String]
895
+ # Optional. An optional request ID to identify requests. Specify a unique
896
+ # request ID so that if you must retry your request, the server will know to
897
+ # ignore the request if it has already been completed. The server will
898
+ # guarantee that for at least 60 minutes after the first request.
899
+ #
900
+ # For example, consider a situation where you make an initial request and
901
+ # the request times out. If you make the request again with the same request
902
+ # ID, the server can check if original operation with the same request ID
903
+ # was received, and if so, will ignore the second request. This prevents
904
+ # clients from accidentally creating duplicate commitments.
905
+ #
906
+ # The request ID must be a valid UUID with the exception that zero UUID is
907
+ # not supported (00000000-0000-0000-0000-000000000000).
908
+ # @yield [result, operation] Access the result along with the TransportOperation object
909
+ # @yieldparam result [::Gapic::Operation]
910
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
911
+ #
912
+ # @return [::Gapic::Operation]
913
+ #
914
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
915
+ #
916
+ # @example Basic example
917
+ # require "google/cloud/edge_network/v1"
918
+ #
919
+ # # Create a client object. The client can be reused for multiple calls.
920
+ # client = Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Client.new
921
+ #
922
+ # # Create a request. To set request fields, pass in keyword arguments.
923
+ # request = Google::Cloud::EdgeNetwork::V1::DeleteNetworkRequest.new
924
+ #
925
+ # # Call the delete_network method.
926
+ # result = client.delete_network request
927
+ #
928
+ # # The returned object is of type Gapic::Operation. You can use it to
929
+ # # check the status of an operation, cancel it, or wait for results.
930
+ # # Here is how to wait for a response.
931
+ # result.wait_until_done! timeout: 60
932
+ # if result.response?
933
+ # p result.response
934
+ # else
935
+ # puts "No response received."
936
+ # end
937
+ #
938
+ def delete_network request, options = nil
939
+ raise ::ArgumentError, "request must be provided" if request.nil?
940
+
941
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::DeleteNetworkRequest
942
+
943
+ # Converts hash and nil to an options object
944
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
945
+
946
+ # Customize the options with defaults
947
+ call_metadata = @config.rpcs.delete_network.metadata.to_h
948
+
949
+ # Set x-goog-api-client and x-goog-user-project headers
950
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
951
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
952
+ gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION,
953
+ transports_version_send: [:rest]
954
+
955
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
956
+
957
+ options.apply_defaults timeout: @config.rpcs.delete_network.timeout,
958
+ metadata: call_metadata,
959
+ retry_policy: @config.rpcs.delete_network.retry_policy
960
+
961
+ options.apply_defaults timeout: @config.timeout,
962
+ metadata: @config.metadata,
963
+ retry_policy: @config.retry_policy
964
+
965
+ @edge_network_stub.delete_network request, options do |result, operation|
966
+ result = ::Gapic::Operation.new result, @operations_client, options: options
967
+ yield result, operation if block_given?
968
+ return result
969
+ end
970
+ rescue ::Gapic::Rest::Error => e
971
+ raise ::Google::Cloud::Error.from_error(e)
972
+ end
973
+
974
+ ##
975
+ # Lists Subnets in a given project and location.
976
+ #
977
+ # @overload list_subnets(request, options = nil)
978
+ # Pass arguments to `list_subnets` via a request object, either of type
979
+ # {::Google::Cloud::EdgeNetwork::V1::ListSubnetsRequest} or an equivalent Hash.
980
+ #
981
+ # @param request [::Google::Cloud::EdgeNetwork::V1::ListSubnetsRequest, ::Hash]
982
+ # A request object representing the call parameters. Required. To specify no
983
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
984
+ # @param options [::Gapic::CallOptions, ::Hash]
985
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
986
+ #
987
+ # @overload list_subnets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
988
+ # Pass arguments to `list_subnets` via keyword arguments. Note that at
989
+ # least one keyword argument is required. To specify no parameters, or to keep all
990
+ # the default parameter values, pass an empty Hash as a request object (see above).
991
+ #
992
+ # @param parent [::String]
993
+ # Required. Parent value for ListSubnetsRequest
994
+ # @param page_size [::Integer]
995
+ # Requested page size. Server may return fewer items than requested.
996
+ # If unspecified, server will pick an appropriate default.
997
+ # @param page_token [::String]
998
+ # A token identifying a page of results the server should return.
999
+ # @param filter [::String]
1000
+ # Filtering results
1001
+ # @param order_by [::String]
1002
+ # Hint for how to order the results
1003
+ # @yield [result, operation] Access the result along with the TransportOperation object
1004
+ # @yieldparam result [::Google::Cloud::EdgeNetwork::V1::ListSubnetsResponse]
1005
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1006
+ #
1007
+ # @return [::Google::Cloud::EdgeNetwork::V1::ListSubnetsResponse]
1008
+ #
1009
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1010
+ #
1011
+ # @example Basic example
1012
+ # require "google/cloud/edge_network/v1"
1013
+ #
1014
+ # # Create a client object. The client can be reused for multiple calls.
1015
+ # client = Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Client.new
1016
+ #
1017
+ # # Create a request. To set request fields, pass in keyword arguments.
1018
+ # request = Google::Cloud::EdgeNetwork::V1::ListSubnetsRequest.new
1019
+ #
1020
+ # # Call the list_subnets method.
1021
+ # result = client.list_subnets request
1022
+ #
1023
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1024
+ # # over elements, and API calls will be issued to fetch pages as needed.
1025
+ # result.each do |item|
1026
+ # # Each element is of type ::Google::Cloud::EdgeNetwork::V1::Subnet.
1027
+ # p item
1028
+ # end
1029
+ #
1030
+ def list_subnets request, options = nil
1031
+ raise ::ArgumentError, "request must be provided" if request.nil?
1032
+
1033
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::ListSubnetsRequest
1034
+
1035
+ # Converts hash and nil to an options object
1036
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1037
+
1038
+ # Customize the options with defaults
1039
+ call_metadata = @config.rpcs.list_subnets.metadata.to_h
1040
+
1041
+ # Set x-goog-api-client and x-goog-user-project headers
1042
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1043
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1044
+ gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION,
1045
+ transports_version_send: [:rest]
1046
+
1047
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1048
+
1049
+ options.apply_defaults timeout: @config.rpcs.list_subnets.timeout,
1050
+ metadata: call_metadata,
1051
+ retry_policy: @config.rpcs.list_subnets.retry_policy
1052
+
1053
+ options.apply_defaults timeout: @config.timeout,
1054
+ metadata: @config.metadata,
1055
+ retry_policy: @config.retry_policy
1056
+
1057
+ @edge_network_stub.list_subnets request, options do |result, operation|
1058
+ yield result, operation if block_given?
1059
+ return result
1060
+ end
1061
+ rescue ::Gapic::Rest::Error => e
1062
+ raise ::Google::Cloud::Error.from_error(e)
1063
+ end
1064
+
1065
+ ##
1066
+ # Gets details of a single Subnet.
1067
+ #
1068
+ # @overload get_subnet(request, options = nil)
1069
+ # Pass arguments to `get_subnet` via a request object, either of type
1070
+ # {::Google::Cloud::EdgeNetwork::V1::GetSubnetRequest} or an equivalent Hash.
1071
+ #
1072
+ # @param request [::Google::Cloud::EdgeNetwork::V1::GetSubnetRequest, ::Hash]
1073
+ # A request object representing the call parameters. Required. To specify no
1074
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1075
+ # @param options [::Gapic::CallOptions, ::Hash]
1076
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1077
+ #
1078
+ # @overload get_subnet(name: nil)
1079
+ # Pass arguments to `get_subnet` via keyword arguments. Note that at
1080
+ # least one keyword argument is required. To specify no parameters, or to keep all
1081
+ # the default parameter values, pass an empty Hash as a request object (see above).
1082
+ #
1083
+ # @param name [::String]
1084
+ # Required. Name of the resource
1085
+ # @yield [result, operation] Access the result along with the TransportOperation object
1086
+ # @yieldparam result [::Google::Cloud::EdgeNetwork::V1::Subnet]
1087
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1088
+ #
1089
+ # @return [::Google::Cloud::EdgeNetwork::V1::Subnet]
1090
+ #
1091
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1092
+ #
1093
+ # @example Basic example
1094
+ # require "google/cloud/edge_network/v1"
1095
+ #
1096
+ # # Create a client object. The client can be reused for multiple calls.
1097
+ # client = Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Client.new
1098
+ #
1099
+ # # Create a request. To set request fields, pass in keyword arguments.
1100
+ # request = Google::Cloud::EdgeNetwork::V1::GetSubnetRequest.new
1101
+ #
1102
+ # # Call the get_subnet method.
1103
+ # result = client.get_subnet request
1104
+ #
1105
+ # # The returned object is of type Google::Cloud::EdgeNetwork::V1::Subnet.
1106
+ # p result
1107
+ #
1108
+ def get_subnet request, options = nil
1109
+ raise ::ArgumentError, "request must be provided" if request.nil?
1110
+
1111
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::GetSubnetRequest
1112
+
1113
+ # Converts hash and nil to an options object
1114
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1115
+
1116
+ # Customize the options with defaults
1117
+ call_metadata = @config.rpcs.get_subnet.metadata.to_h
1118
+
1119
+ # Set x-goog-api-client and x-goog-user-project headers
1120
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1121
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1122
+ gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION,
1123
+ transports_version_send: [:rest]
1124
+
1125
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1126
+
1127
+ options.apply_defaults timeout: @config.rpcs.get_subnet.timeout,
1128
+ metadata: call_metadata,
1129
+ retry_policy: @config.rpcs.get_subnet.retry_policy
1130
+
1131
+ options.apply_defaults timeout: @config.timeout,
1132
+ metadata: @config.metadata,
1133
+ retry_policy: @config.retry_policy
1134
+
1135
+ @edge_network_stub.get_subnet request, options do |result, operation|
1136
+ yield result, operation if block_given?
1137
+ return result
1138
+ end
1139
+ rescue ::Gapic::Rest::Error => e
1140
+ raise ::Google::Cloud::Error.from_error(e)
1141
+ end
1142
+
1143
+ ##
1144
+ # Creates a new Subnet in a given project and location.
1145
+ #
1146
+ # @overload create_subnet(request, options = nil)
1147
+ # Pass arguments to `create_subnet` via a request object, either of type
1148
+ # {::Google::Cloud::EdgeNetwork::V1::CreateSubnetRequest} or an equivalent Hash.
1149
+ #
1150
+ # @param request [::Google::Cloud::EdgeNetwork::V1::CreateSubnetRequest, ::Hash]
1151
+ # A request object representing the call parameters. Required. To specify no
1152
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1153
+ # @param options [::Gapic::CallOptions, ::Hash]
1154
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1155
+ #
1156
+ # @overload create_subnet(parent: nil, subnet_id: nil, subnet: nil, request_id: nil)
1157
+ # Pass arguments to `create_subnet` via keyword arguments. Note that at
1158
+ # least one keyword argument is required. To specify no parameters, or to keep all
1159
+ # the default parameter values, pass an empty Hash as a request object (see above).
1160
+ #
1161
+ # @param parent [::String]
1162
+ # Required. Value for parent.
1163
+ # @param subnet_id [::String]
1164
+ # Required. Id of the requesting object
1165
+ # If auto-generating Id server-side, remove this field and
1166
+ # subnet_id from the method_signature of Create RPC
1167
+ # @param subnet [::Google::Cloud::EdgeNetwork::V1::Subnet, ::Hash]
1168
+ # Required. The resource being created
1169
+ # @param request_id [::String]
1170
+ # Optional. An optional request ID to identify requests. Specify a unique
1171
+ # request ID so that if you must retry your request, the server will know to
1172
+ # ignore the request if it has already been completed. The server will
1173
+ # guarantee that for at least 60 minutes since the first request.
1174
+ #
1175
+ # For example, consider a situation where you make an initial request and
1176
+ # the request times out. If you make the request again with the same request
1177
+ # ID, the server can check if original operation with the same request ID
1178
+ # was received, and if so, will ignore the second request. This prevents
1179
+ # clients from accidentally creating duplicate commitments.
1180
+ #
1181
+ # The request ID must be a valid UUID with the exception that zero UUID is
1182
+ # not supported (00000000-0000-0000-0000-000000000000).
1183
+ # @yield [result, operation] Access the result along with the TransportOperation object
1184
+ # @yieldparam result [::Gapic::Operation]
1185
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1186
+ #
1187
+ # @return [::Gapic::Operation]
1188
+ #
1189
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1190
+ #
1191
+ # @example Basic example
1192
+ # require "google/cloud/edge_network/v1"
1193
+ #
1194
+ # # Create a client object. The client can be reused for multiple calls.
1195
+ # client = Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Client.new
1196
+ #
1197
+ # # Create a request. To set request fields, pass in keyword arguments.
1198
+ # request = Google::Cloud::EdgeNetwork::V1::CreateSubnetRequest.new
1199
+ #
1200
+ # # Call the create_subnet method.
1201
+ # result = client.create_subnet request
1202
+ #
1203
+ # # The returned object is of type Gapic::Operation. You can use it to
1204
+ # # check the status of an operation, cancel it, or wait for results.
1205
+ # # Here is how to wait for a response.
1206
+ # result.wait_until_done! timeout: 60
1207
+ # if result.response?
1208
+ # p result.response
1209
+ # else
1210
+ # puts "No response received."
1211
+ # end
1212
+ #
1213
+ def create_subnet request, options = nil
1214
+ raise ::ArgumentError, "request must be provided" if request.nil?
1215
+
1216
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::CreateSubnetRequest
1217
+
1218
+ # Converts hash and nil to an options object
1219
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1220
+
1221
+ # Customize the options with defaults
1222
+ call_metadata = @config.rpcs.create_subnet.metadata.to_h
1223
+
1224
+ # Set x-goog-api-client and x-goog-user-project headers
1225
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1226
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1227
+ gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION,
1228
+ transports_version_send: [:rest]
1229
+
1230
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1231
+
1232
+ options.apply_defaults timeout: @config.rpcs.create_subnet.timeout,
1233
+ metadata: call_metadata,
1234
+ retry_policy: @config.rpcs.create_subnet.retry_policy
1235
+
1236
+ options.apply_defaults timeout: @config.timeout,
1237
+ metadata: @config.metadata,
1238
+ retry_policy: @config.retry_policy
1239
+
1240
+ @edge_network_stub.create_subnet request, options do |result, operation|
1241
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1242
+ yield result, operation if block_given?
1243
+ return result
1244
+ end
1245
+ rescue ::Gapic::Rest::Error => e
1246
+ raise ::Google::Cloud::Error.from_error(e)
1247
+ end
1248
+
1249
+ ##
1250
+ # Updates the parameters of a single Subnet.
1251
+ #
1252
+ # @overload update_subnet(request, options = nil)
1253
+ # Pass arguments to `update_subnet` via a request object, either of type
1254
+ # {::Google::Cloud::EdgeNetwork::V1::UpdateSubnetRequest} or an equivalent Hash.
1255
+ #
1256
+ # @param request [::Google::Cloud::EdgeNetwork::V1::UpdateSubnetRequest, ::Hash]
1257
+ # A request object representing the call parameters. Required. To specify no
1258
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1259
+ # @param options [::Gapic::CallOptions, ::Hash]
1260
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1261
+ #
1262
+ # @overload update_subnet(update_mask: nil, subnet: nil, request_id: nil)
1263
+ # Pass arguments to `update_subnet` via keyword arguments. Note that at
1264
+ # least one keyword argument is required. To specify no parameters, or to keep all
1265
+ # the default parameter values, pass an empty Hash as a request object (see above).
1266
+ #
1267
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1268
+ # Required. Field mask is used to specify the fields to be overwritten in the
1269
+ # Subnet resource by the update.
1270
+ # The fields specified in the update_mask are relative to the resource, not
1271
+ # the full request. A field will be overwritten if it is in the mask. If the
1272
+ # user does not provide a mask then all fields will be overwritten.
1273
+ # @param subnet [::Google::Cloud::EdgeNetwork::V1::Subnet, ::Hash]
1274
+ # Required. The resource being updated
1275
+ # @param request_id [::String]
1276
+ # Optional. An optional request ID to identify requests. Specify a unique
1277
+ # request ID so that if you must retry your request, the server will know to
1278
+ # ignore the request if it has already been completed. The server will
1279
+ # guarantee that for at least 60 minutes since the first request.
1280
+ #
1281
+ # For example, consider a situation where you make an initial request and
1282
+ # the request times out. If you make the request again with the same request
1283
+ # ID, the server can check if original operation with the same request ID
1284
+ # was received, and if so, will ignore the second request. This prevents
1285
+ # clients from accidentally creating duplicate commitments.
1286
+ #
1287
+ # The request ID must be a valid UUID with the exception that zero UUID is
1288
+ # not supported (00000000-0000-0000-0000-000000000000).
1289
+ # @yield [result, operation] Access the result along with the TransportOperation object
1290
+ # @yieldparam result [::Gapic::Operation]
1291
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1292
+ #
1293
+ # @return [::Gapic::Operation]
1294
+ #
1295
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1296
+ #
1297
+ # @example Basic example
1298
+ # require "google/cloud/edge_network/v1"
1299
+ #
1300
+ # # Create a client object. The client can be reused for multiple calls.
1301
+ # client = Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Client.new
1302
+ #
1303
+ # # Create a request. To set request fields, pass in keyword arguments.
1304
+ # request = Google::Cloud::EdgeNetwork::V1::UpdateSubnetRequest.new
1305
+ #
1306
+ # # Call the update_subnet method.
1307
+ # result = client.update_subnet request
1308
+ #
1309
+ # # The returned object is of type Gapic::Operation. You can use it to
1310
+ # # check the status of an operation, cancel it, or wait for results.
1311
+ # # Here is how to wait for a response.
1312
+ # result.wait_until_done! timeout: 60
1313
+ # if result.response?
1314
+ # p result.response
1315
+ # else
1316
+ # puts "No response received."
1317
+ # end
1318
+ #
1319
+ def update_subnet request, options = nil
1320
+ raise ::ArgumentError, "request must be provided" if request.nil?
1321
+
1322
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::UpdateSubnetRequest
1323
+
1324
+ # Converts hash and nil to an options object
1325
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1326
+
1327
+ # Customize the options with defaults
1328
+ call_metadata = @config.rpcs.update_subnet.metadata.to_h
1329
+
1330
+ # Set x-goog-api-client and x-goog-user-project headers
1331
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1332
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1333
+ gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION,
1334
+ transports_version_send: [:rest]
1335
+
1336
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1337
+
1338
+ options.apply_defaults timeout: @config.rpcs.update_subnet.timeout,
1339
+ metadata: call_metadata,
1340
+ retry_policy: @config.rpcs.update_subnet.retry_policy
1341
+
1342
+ options.apply_defaults timeout: @config.timeout,
1343
+ metadata: @config.metadata,
1344
+ retry_policy: @config.retry_policy
1345
+
1346
+ @edge_network_stub.update_subnet request, options do |result, operation|
1347
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1348
+ yield result, operation if block_given?
1349
+ return result
1350
+ end
1351
+ rescue ::Gapic::Rest::Error => e
1352
+ raise ::Google::Cloud::Error.from_error(e)
1353
+ end
1354
+
1355
+ ##
1356
+ # Deletes a single Subnet.
1357
+ #
1358
+ # @overload delete_subnet(request, options = nil)
1359
+ # Pass arguments to `delete_subnet` via a request object, either of type
1360
+ # {::Google::Cloud::EdgeNetwork::V1::DeleteSubnetRequest} or an equivalent Hash.
1361
+ #
1362
+ # @param request [::Google::Cloud::EdgeNetwork::V1::DeleteSubnetRequest, ::Hash]
1363
+ # A request object representing the call parameters. Required. To specify no
1364
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1365
+ # @param options [::Gapic::CallOptions, ::Hash]
1366
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1367
+ #
1368
+ # @overload delete_subnet(name: nil, request_id: nil)
1369
+ # Pass arguments to `delete_subnet` via keyword arguments. Note that at
1370
+ # least one keyword argument is required. To specify no parameters, or to keep all
1371
+ # the default parameter values, pass an empty Hash as a request object (see above).
1372
+ #
1373
+ # @param name [::String]
1374
+ # Required. Name of the resource
1375
+ # @param request_id [::String]
1376
+ # Optional. An optional request ID to identify requests. Specify a unique
1377
+ # request ID so that if you must retry your request, the server will know to
1378
+ # ignore the request if it has already been completed. The server will
1379
+ # guarantee that for at least 60 minutes after the first request.
1380
+ #
1381
+ # For example, consider a situation where you make an initial request and
1382
+ # the request times out. If you make the request again with the same request
1383
+ # ID, the server can check if original operation with the same request ID
1384
+ # was received, and if so, will ignore the second request. This prevents
1385
+ # clients from accidentally creating duplicate commitments.
1386
+ #
1387
+ # The request ID must be a valid UUID with the exception that zero UUID is
1388
+ # not supported (00000000-0000-0000-0000-000000000000).
1389
+ # @yield [result, operation] Access the result along with the TransportOperation object
1390
+ # @yieldparam result [::Gapic::Operation]
1391
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1392
+ #
1393
+ # @return [::Gapic::Operation]
1394
+ #
1395
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1396
+ #
1397
+ # @example Basic example
1398
+ # require "google/cloud/edge_network/v1"
1399
+ #
1400
+ # # Create a client object. The client can be reused for multiple calls.
1401
+ # client = Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Client.new
1402
+ #
1403
+ # # Create a request. To set request fields, pass in keyword arguments.
1404
+ # request = Google::Cloud::EdgeNetwork::V1::DeleteSubnetRequest.new
1405
+ #
1406
+ # # Call the delete_subnet method.
1407
+ # result = client.delete_subnet request
1408
+ #
1409
+ # # The returned object is of type Gapic::Operation. You can use it to
1410
+ # # check the status of an operation, cancel it, or wait for results.
1411
+ # # Here is how to wait for a response.
1412
+ # result.wait_until_done! timeout: 60
1413
+ # if result.response?
1414
+ # p result.response
1415
+ # else
1416
+ # puts "No response received."
1417
+ # end
1418
+ #
1419
+ def delete_subnet request, options = nil
1420
+ raise ::ArgumentError, "request must be provided" if request.nil?
1421
+
1422
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::DeleteSubnetRequest
1423
+
1424
+ # Converts hash and nil to an options object
1425
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1426
+
1427
+ # Customize the options with defaults
1428
+ call_metadata = @config.rpcs.delete_subnet.metadata.to_h
1429
+
1430
+ # Set x-goog-api-client and x-goog-user-project headers
1431
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1432
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1433
+ gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION,
1434
+ transports_version_send: [:rest]
1435
+
1436
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1437
+
1438
+ options.apply_defaults timeout: @config.rpcs.delete_subnet.timeout,
1439
+ metadata: call_metadata,
1440
+ retry_policy: @config.rpcs.delete_subnet.retry_policy
1441
+
1442
+ options.apply_defaults timeout: @config.timeout,
1443
+ metadata: @config.metadata,
1444
+ retry_policy: @config.retry_policy
1445
+
1446
+ @edge_network_stub.delete_subnet request, options do |result, operation|
1447
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1448
+ yield result, operation if block_given?
1449
+ return result
1450
+ end
1451
+ rescue ::Gapic::Rest::Error => e
1452
+ raise ::Google::Cloud::Error.from_error(e)
1453
+ end
1454
+
1455
+ ##
1456
+ # Lists Interconnects in a given project and location.
1457
+ #
1458
+ # @overload list_interconnects(request, options = nil)
1459
+ # Pass arguments to `list_interconnects` via a request object, either of type
1460
+ # {::Google::Cloud::EdgeNetwork::V1::ListInterconnectsRequest} or an equivalent Hash.
1461
+ #
1462
+ # @param request [::Google::Cloud::EdgeNetwork::V1::ListInterconnectsRequest, ::Hash]
1463
+ # A request object representing the call parameters. Required. To specify no
1464
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1465
+ # @param options [::Gapic::CallOptions, ::Hash]
1466
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1467
+ #
1468
+ # @overload list_interconnects(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1469
+ # Pass arguments to `list_interconnects` via keyword arguments. Note that at
1470
+ # least one keyword argument is required. To specify no parameters, or to keep all
1471
+ # the default parameter values, pass an empty Hash as a request object (see above).
1472
+ #
1473
+ # @param parent [::String]
1474
+ # Required. Parent value for ListInterconnectsRequest
1475
+ # @param page_size [::Integer]
1476
+ # Requested page size. Server may return fewer items than requested.
1477
+ # If unspecified, server will pick an appropriate default.
1478
+ # @param page_token [::String]
1479
+ # A token identifying a page of results the server should return.
1480
+ # @param filter [::String]
1481
+ # Filtering results
1482
+ # @param order_by [::String]
1483
+ # Hint for how to order the results
1484
+ # @yield [result, operation] Access the result along with the TransportOperation object
1485
+ # @yieldparam result [::Google::Cloud::EdgeNetwork::V1::ListInterconnectsResponse]
1486
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1487
+ #
1488
+ # @return [::Google::Cloud::EdgeNetwork::V1::ListInterconnectsResponse]
1489
+ #
1490
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1491
+ #
1492
+ # @example Basic example
1493
+ # require "google/cloud/edge_network/v1"
1494
+ #
1495
+ # # Create a client object. The client can be reused for multiple calls.
1496
+ # client = Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Client.new
1497
+ #
1498
+ # # Create a request. To set request fields, pass in keyword arguments.
1499
+ # request = Google::Cloud::EdgeNetwork::V1::ListInterconnectsRequest.new
1500
+ #
1501
+ # # Call the list_interconnects method.
1502
+ # result = client.list_interconnects request
1503
+ #
1504
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1505
+ # # over elements, and API calls will be issued to fetch pages as needed.
1506
+ # result.each do |item|
1507
+ # # Each element is of type ::Google::Cloud::EdgeNetwork::V1::Interconnect.
1508
+ # p item
1509
+ # end
1510
+ #
1511
+ def list_interconnects request, options = nil
1512
+ raise ::ArgumentError, "request must be provided" if request.nil?
1513
+
1514
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::ListInterconnectsRequest
1515
+
1516
+ # Converts hash and nil to an options object
1517
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1518
+
1519
+ # Customize the options with defaults
1520
+ call_metadata = @config.rpcs.list_interconnects.metadata.to_h
1521
+
1522
+ # Set x-goog-api-client and x-goog-user-project headers
1523
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1524
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1525
+ gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION,
1526
+ transports_version_send: [:rest]
1527
+
1528
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1529
+
1530
+ options.apply_defaults timeout: @config.rpcs.list_interconnects.timeout,
1531
+ metadata: call_metadata,
1532
+ retry_policy: @config.rpcs.list_interconnects.retry_policy
1533
+
1534
+ options.apply_defaults timeout: @config.timeout,
1535
+ metadata: @config.metadata,
1536
+ retry_policy: @config.retry_policy
1537
+
1538
+ @edge_network_stub.list_interconnects request, options do |result, operation|
1539
+ yield result, operation if block_given?
1540
+ return result
1541
+ end
1542
+ rescue ::Gapic::Rest::Error => e
1543
+ raise ::Google::Cloud::Error.from_error(e)
1544
+ end
1545
+
1546
+ ##
1547
+ # Gets details of a single Interconnect.
1548
+ #
1549
+ # @overload get_interconnect(request, options = nil)
1550
+ # Pass arguments to `get_interconnect` via a request object, either of type
1551
+ # {::Google::Cloud::EdgeNetwork::V1::GetInterconnectRequest} or an equivalent Hash.
1552
+ #
1553
+ # @param request [::Google::Cloud::EdgeNetwork::V1::GetInterconnectRequest, ::Hash]
1554
+ # A request object representing the call parameters. Required. To specify no
1555
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1556
+ # @param options [::Gapic::CallOptions, ::Hash]
1557
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1558
+ #
1559
+ # @overload get_interconnect(name: nil)
1560
+ # Pass arguments to `get_interconnect` via keyword arguments. Note that at
1561
+ # least one keyword argument is required. To specify no parameters, or to keep all
1562
+ # the default parameter values, pass an empty Hash as a request object (see above).
1563
+ #
1564
+ # @param name [::String]
1565
+ # Required. Name of the resource
1566
+ # @yield [result, operation] Access the result along with the TransportOperation object
1567
+ # @yieldparam result [::Google::Cloud::EdgeNetwork::V1::Interconnect]
1568
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1569
+ #
1570
+ # @return [::Google::Cloud::EdgeNetwork::V1::Interconnect]
1571
+ #
1572
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1573
+ #
1574
+ # @example Basic example
1575
+ # require "google/cloud/edge_network/v1"
1576
+ #
1577
+ # # Create a client object. The client can be reused for multiple calls.
1578
+ # client = Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Client.new
1579
+ #
1580
+ # # Create a request. To set request fields, pass in keyword arguments.
1581
+ # request = Google::Cloud::EdgeNetwork::V1::GetInterconnectRequest.new
1582
+ #
1583
+ # # Call the get_interconnect method.
1584
+ # result = client.get_interconnect request
1585
+ #
1586
+ # # The returned object is of type Google::Cloud::EdgeNetwork::V1::Interconnect.
1587
+ # p result
1588
+ #
1589
+ def get_interconnect request, options = nil
1590
+ raise ::ArgumentError, "request must be provided" if request.nil?
1591
+
1592
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::GetInterconnectRequest
1593
+
1594
+ # Converts hash and nil to an options object
1595
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1596
+
1597
+ # Customize the options with defaults
1598
+ call_metadata = @config.rpcs.get_interconnect.metadata.to_h
1599
+
1600
+ # Set x-goog-api-client and x-goog-user-project headers
1601
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1602
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1603
+ gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION,
1604
+ transports_version_send: [:rest]
1605
+
1606
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1607
+
1608
+ options.apply_defaults timeout: @config.rpcs.get_interconnect.timeout,
1609
+ metadata: call_metadata,
1610
+ retry_policy: @config.rpcs.get_interconnect.retry_policy
1611
+
1612
+ options.apply_defaults timeout: @config.timeout,
1613
+ metadata: @config.metadata,
1614
+ retry_policy: @config.retry_policy
1615
+
1616
+ @edge_network_stub.get_interconnect request, options do |result, operation|
1617
+ yield result, operation if block_given?
1618
+ return result
1619
+ end
1620
+ rescue ::Gapic::Rest::Error => e
1621
+ raise ::Google::Cloud::Error.from_error(e)
1622
+ end
1623
+
1624
+ ##
1625
+ # Get the diagnostics of a single interconnect resource.
1626
+ #
1627
+ # @overload diagnose_interconnect(request, options = nil)
1628
+ # Pass arguments to `diagnose_interconnect` via a request object, either of type
1629
+ # {::Google::Cloud::EdgeNetwork::V1::DiagnoseInterconnectRequest} or an equivalent Hash.
1630
+ #
1631
+ # @param request [::Google::Cloud::EdgeNetwork::V1::DiagnoseInterconnectRequest, ::Hash]
1632
+ # A request object representing the call parameters. Required. To specify no
1633
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1634
+ # @param options [::Gapic::CallOptions, ::Hash]
1635
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1636
+ #
1637
+ # @overload diagnose_interconnect(name: nil)
1638
+ # Pass arguments to `diagnose_interconnect` via keyword arguments. Note that at
1639
+ # least one keyword argument is required. To specify no parameters, or to keep all
1640
+ # the default parameter values, pass an empty Hash as a request object (see above).
1641
+ #
1642
+ # @param name [::String]
1643
+ # Required. The name of the interconnect resource.
1644
+ # @yield [result, operation] Access the result along with the TransportOperation object
1645
+ # @yieldparam result [::Google::Cloud::EdgeNetwork::V1::DiagnoseInterconnectResponse]
1646
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1647
+ #
1648
+ # @return [::Google::Cloud::EdgeNetwork::V1::DiagnoseInterconnectResponse]
1649
+ #
1650
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1651
+ #
1652
+ # @example Basic example
1653
+ # require "google/cloud/edge_network/v1"
1654
+ #
1655
+ # # Create a client object. The client can be reused for multiple calls.
1656
+ # client = Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Client.new
1657
+ #
1658
+ # # Create a request. To set request fields, pass in keyword arguments.
1659
+ # request = Google::Cloud::EdgeNetwork::V1::DiagnoseInterconnectRequest.new
1660
+ #
1661
+ # # Call the diagnose_interconnect method.
1662
+ # result = client.diagnose_interconnect request
1663
+ #
1664
+ # # The returned object is of type Google::Cloud::EdgeNetwork::V1::DiagnoseInterconnectResponse.
1665
+ # p result
1666
+ #
1667
+ def diagnose_interconnect request, options = nil
1668
+ raise ::ArgumentError, "request must be provided" if request.nil?
1669
+
1670
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::DiagnoseInterconnectRequest
1671
+
1672
+ # Converts hash and nil to an options object
1673
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1674
+
1675
+ # Customize the options with defaults
1676
+ call_metadata = @config.rpcs.diagnose_interconnect.metadata.to_h
1677
+
1678
+ # Set x-goog-api-client and x-goog-user-project headers
1679
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1680
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1681
+ gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION,
1682
+ transports_version_send: [:rest]
1683
+
1684
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1685
+
1686
+ options.apply_defaults timeout: @config.rpcs.diagnose_interconnect.timeout,
1687
+ metadata: call_metadata,
1688
+ retry_policy: @config.rpcs.diagnose_interconnect.retry_policy
1689
+
1690
+ options.apply_defaults timeout: @config.timeout,
1691
+ metadata: @config.metadata,
1692
+ retry_policy: @config.retry_policy
1693
+
1694
+ @edge_network_stub.diagnose_interconnect request, options do |result, operation|
1695
+ yield result, operation if block_given?
1696
+ return result
1697
+ end
1698
+ rescue ::Gapic::Rest::Error => e
1699
+ raise ::Google::Cloud::Error.from_error(e)
1700
+ end
1701
+
1702
+ ##
1703
+ # Lists InterconnectAttachments in a given project and location.
1704
+ #
1705
+ # @overload list_interconnect_attachments(request, options = nil)
1706
+ # Pass arguments to `list_interconnect_attachments` via a request object, either of type
1707
+ # {::Google::Cloud::EdgeNetwork::V1::ListInterconnectAttachmentsRequest} or an equivalent Hash.
1708
+ #
1709
+ # @param request [::Google::Cloud::EdgeNetwork::V1::ListInterconnectAttachmentsRequest, ::Hash]
1710
+ # A request object representing the call parameters. Required. To specify no
1711
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1712
+ # @param options [::Gapic::CallOptions, ::Hash]
1713
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1714
+ #
1715
+ # @overload list_interconnect_attachments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1716
+ # Pass arguments to `list_interconnect_attachments` via keyword arguments. Note that at
1717
+ # least one keyword argument is required. To specify no parameters, or to keep all
1718
+ # the default parameter values, pass an empty Hash as a request object (see above).
1719
+ #
1720
+ # @param parent [::String]
1721
+ # Required. Parent value for ListInterconnectAttachmentsRequest
1722
+ # @param page_size [::Integer]
1723
+ # Requested page size. Server may return fewer items than requested.
1724
+ # If unspecified, server will pick an appropriate default.
1725
+ # @param page_token [::String]
1726
+ # A token identifying a page of results the server should return.
1727
+ # @param filter [::String]
1728
+ # Filtering results
1729
+ # @param order_by [::String]
1730
+ # Hint for how to order the results
1731
+ # @yield [result, operation] Access the result along with the TransportOperation object
1732
+ # @yieldparam result [::Google::Cloud::EdgeNetwork::V1::ListInterconnectAttachmentsResponse]
1733
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1734
+ #
1735
+ # @return [::Google::Cloud::EdgeNetwork::V1::ListInterconnectAttachmentsResponse]
1736
+ #
1737
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1738
+ #
1739
+ # @example Basic example
1740
+ # require "google/cloud/edge_network/v1"
1741
+ #
1742
+ # # Create a client object. The client can be reused for multiple calls.
1743
+ # client = Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Client.new
1744
+ #
1745
+ # # Create a request. To set request fields, pass in keyword arguments.
1746
+ # request = Google::Cloud::EdgeNetwork::V1::ListInterconnectAttachmentsRequest.new
1747
+ #
1748
+ # # Call the list_interconnect_attachments method.
1749
+ # result = client.list_interconnect_attachments request
1750
+ #
1751
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1752
+ # # over elements, and API calls will be issued to fetch pages as needed.
1753
+ # result.each do |item|
1754
+ # # Each element is of type ::Google::Cloud::EdgeNetwork::V1::InterconnectAttachment.
1755
+ # p item
1756
+ # end
1757
+ #
1758
+ def list_interconnect_attachments request, options = nil
1759
+ raise ::ArgumentError, "request must be provided" if request.nil?
1760
+
1761
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::ListInterconnectAttachmentsRequest
1762
+
1763
+ # Converts hash and nil to an options object
1764
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1765
+
1766
+ # Customize the options with defaults
1767
+ call_metadata = @config.rpcs.list_interconnect_attachments.metadata.to_h
1768
+
1769
+ # Set x-goog-api-client and x-goog-user-project headers
1770
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1771
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1772
+ gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION,
1773
+ transports_version_send: [:rest]
1774
+
1775
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1776
+
1777
+ options.apply_defaults timeout: @config.rpcs.list_interconnect_attachments.timeout,
1778
+ metadata: call_metadata,
1779
+ retry_policy: @config.rpcs.list_interconnect_attachments.retry_policy
1780
+
1781
+ options.apply_defaults timeout: @config.timeout,
1782
+ metadata: @config.metadata,
1783
+ retry_policy: @config.retry_policy
1784
+
1785
+ @edge_network_stub.list_interconnect_attachments request, options do |result, operation|
1786
+ yield result, operation if block_given?
1787
+ return result
1788
+ end
1789
+ rescue ::Gapic::Rest::Error => e
1790
+ raise ::Google::Cloud::Error.from_error(e)
1791
+ end
1792
+
1793
+ ##
1794
+ # Gets details of a single InterconnectAttachment.
1795
+ #
1796
+ # @overload get_interconnect_attachment(request, options = nil)
1797
+ # Pass arguments to `get_interconnect_attachment` via a request object, either of type
1798
+ # {::Google::Cloud::EdgeNetwork::V1::GetInterconnectAttachmentRequest} or an equivalent Hash.
1799
+ #
1800
+ # @param request [::Google::Cloud::EdgeNetwork::V1::GetInterconnectAttachmentRequest, ::Hash]
1801
+ # A request object representing the call parameters. Required. To specify no
1802
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1803
+ # @param options [::Gapic::CallOptions, ::Hash]
1804
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1805
+ #
1806
+ # @overload get_interconnect_attachment(name: nil)
1807
+ # Pass arguments to `get_interconnect_attachment` via keyword arguments. Note that at
1808
+ # least one keyword argument is required. To specify no parameters, or to keep all
1809
+ # the default parameter values, pass an empty Hash as a request object (see above).
1810
+ #
1811
+ # @param name [::String]
1812
+ # Required. Name of the resource
1813
+ # @yield [result, operation] Access the result along with the TransportOperation object
1814
+ # @yieldparam result [::Google::Cloud::EdgeNetwork::V1::InterconnectAttachment]
1815
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1816
+ #
1817
+ # @return [::Google::Cloud::EdgeNetwork::V1::InterconnectAttachment]
1818
+ #
1819
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1820
+ #
1821
+ # @example Basic example
1822
+ # require "google/cloud/edge_network/v1"
1823
+ #
1824
+ # # Create a client object. The client can be reused for multiple calls.
1825
+ # client = Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Client.new
1826
+ #
1827
+ # # Create a request. To set request fields, pass in keyword arguments.
1828
+ # request = Google::Cloud::EdgeNetwork::V1::GetInterconnectAttachmentRequest.new
1829
+ #
1830
+ # # Call the get_interconnect_attachment method.
1831
+ # result = client.get_interconnect_attachment request
1832
+ #
1833
+ # # The returned object is of type Google::Cloud::EdgeNetwork::V1::InterconnectAttachment.
1834
+ # p result
1835
+ #
1836
+ def get_interconnect_attachment request, options = nil
1837
+ raise ::ArgumentError, "request must be provided" if request.nil?
1838
+
1839
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::GetInterconnectAttachmentRequest
1840
+
1841
+ # Converts hash and nil to an options object
1842
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1843
+
1844
+ # Customize the options with defaults
1845
+ call_metadata = @config.rpcs.get_interconnect_attachment.metadata.to_h
1846
+
1847
+ # Set x-goog-api-client and x-goog-user-project headers
1848
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1849
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1850
+ gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION,
1851
+ transports_version_send: [:rest]
1852
+
1853
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1854
+
1855
+ options.apply_defaults timeout: @config.rpcs.get_interconnect_attachment.timeout,
1856
+ metadata: call_metadata,
1857
+ retry_policy: @config.rpcs.get_interconnect_attachment.retry_policy
1858
+
1859
+ options.apply_defaults timeout: @config.timeout,
1860
+ metadata: @config.metadata,
1861
+ retry_policy: @config.retry_policy
1862
+
1863
+ @edge_network_stub.get_interconnect_attachment request, options do |result, operation|
1864
+ yield result, operation if block_given?
1865
+ return result
1866
+ end
1867
+ rescue ::Gapic::Rest::Error => e
1868
+ raise ::Google::Cloud::Error.from_error(e)
1869
+ end
1870
+
1871
+ ##
1872
+ # Creates a new InterconnectAttachment in a given project and location.
1873
+ #
1874
+ # @overload create_interconnect_attachment(request, options = nil)
1875
+ # Pass arguments to `create_interconnect_attachment` via a request object, either of type
1876
+ # {::Google::Cloud::EdgeNetwork::V1::CreateInterconnectAttachmentRequest} or an equivalent Hash.
1877
+ #
1878
+ # @param request [::Google::Cloud::EdgeNetwork::V1::CreateInterconnectAttachmentRequest, ::Hash]
1879
+ # A request object representing the call parameters. Required. To specify no
1880
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1881
+ # @param options [::Gapic::CallOptions, ::Hash]
1882
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1883
+ #
1884
+ # @overload create_interconnect_attachment(parent: nil, interconnect_attachment_id: nil, interconnect_attachment: nil, request_id: nil)
1885
+ # Pass arguments to `create_interconnect_attachment` via keyword arguments. Note that at
1886
+ # least one keyword argument is required. To specify no parameters, or to keep all
1887
+ # the default parameter values, pass an empty Hash as a request object (see above).
1888
+ #
1889
+ # @param parent [::String]
1890
+ # Required. Value for parent.
1891
+ # @param interconnect_attachment_id [::String]
1892
+ # Required. Id of the requesting object
1893
+ # If auto-generating Id server-side, remove this field and
1894
+ # interconnect_attachment_id from the method_signature of Create RPC
1895
+ # @param interconnect_attachment [::Google::Cloud::EdgeNetwork::V1::InterconnectAttachment, ::Hash]
1896
+ # Required. The resource being created
1897
+ # @param request_id [::String]
1898
+ # Optional. An optional request ID to identify requests. Specify a unique
1899
+ # request ID so that if you must retry your request, the server will know to
1900
+ # ignore the request if it has already been completed. The server will
1901
+ # guarantee that for at least 60 minutes since the first request.
1902
+ #
1903
+ # For example, consider a situation where you make an initial request and
1904
+ # the request times out. If you make the request again with the same request
1905
+ # ID, the server can check if original operation with the same request ID
1906
+ # was received, and if so, will ignore the second request. This prevents
1907
+ # clients from accidentally creating duplicate commitments.
1908
+ #
1909
+ # The request ID must be a valid UUID with the exception that zero UUID is
1910
+ # not supported (00000000-0000-0000-0000-000000000000).
1911
+ # @yield [result, operation] Access the result along with the TransportOperation object
1912
+ # @yieldparam result [::Gapic::Operation]
1913
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1914
+ #
1915
+ # @return [::Gapic::Operation]
1916
+ #
1917
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1918
+ #
1919
+ # @example Basic example
1920
+ # require "google/cloud/edge_network/v1"
1921
+ #
1922
+ # # Create a client object. The client can be reused for multiple calls.
1923
+ # client = Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Client.new
1924
+ #
1925
+ # # Create a request. To set request fields, pass in keyword arguments.
1926
+ # request = Google::Cloud::EdgeNetwork::V1::CreateInterconnectAttachmentRequest.new
1927
+ #
1928
+ # # Call the create_interconnect_attachment method.
1929
+ # result = client.create_interconnect_attachment request
1930
+ #
1931
+ # # The returned object is of type Gapic::Operation. You can use it to
1932
+ # # check the status of an operation, cancel it, or wait for results.
1933
+ # # Here is how to wait for a response.
1934
+ # result.wait_until_done! timeout: 60
1935
+ # if result.response?
1936
+ # p result.response
1937
+ # else
1938
+ # puts "No response received."
1939
+ # end
1940
+ #
1941
+ def create_interconnect_attachment request, options = nil
1942
+ raise ::ArgumentError, "request must be provided" if request.nil?
1943
+
1944
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::CreateInterconnectAttachmentRequest
1945
+
1946
+ # Converts hash and nil to an options object
1947
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1948
+
1949
+ # Customize the options with defaults
1950
+ call_metadata = @config.rpcs.create_interconnect_attachment.metadata.to_h
1951
+
1952
+ # Set x-goog-api-client and x-goog-user-project headers
1953
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1954
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1955
+ gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION,
1956
+ transports_version_send: [:rest]
1957
+
1958
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1959
+
1960
+ options.apply_defaults timeout: @config.rpcs.create_interconnect_attachment.timeout,
1961
+ metadata: call_metadata,
1962
+ retry_policy: @config.rpcs.create_interconnect_attachment.retry_policy
1963
+
1964
+ options.apply_defaults timeout: @config.timeout,
1965
+ metadata: @config.metadata,
1966
+ retry_policy: @config.retry_policy
1967
+
1968
+ @edge_network_stub.create_interconnect_attachment request, options do |result, operation|
1969
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1970
+ yield result, operation if block_given?
1971
+ return result
1972
+ end
1973
+ rescue ::Gapic::Rest::Error => e
1974
+ raise ::Google::Cloud::Error.from_error(e)
1975
+ end
1976
+
1977
+ ##
1978
+ # Deletes a single InterconnectAttachment.
1979
+ #
1980
+ # @overload delete_interconnect_attachment(request, options = nil)
1981
+ # Pass arguments to `delete_interconnect_attachment` via a request object, either of type
1982
+ # {::Google::Cloud::EdgeNetwork::V1::DeleteInterconnectAttachmentRequest} or an equivalent Hash.
1983
+ #
1984
+ # @param request [::Google::Cloud::EdgeNetwork::V1::DeleteInterconnectAttachmentRequest, ::Hash]
1985
+ # A request object representing the call parameters. Required. To specify no
1986
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1987
+ # @param options [::Gapic::CallOptions, ::Hash]
1988
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1989
+ #
1990
+ # @overload delete_interconnect_attachment(name: nil, request_id: nil)
1991
+ # Pass arguments to `delete_interconnect_attachment` via keyword arguments. Note that at
1992
+ # least one keyword argument is required. To specify no parameters, or to keep all
1993
+ # the default parameter values, pass an empty Hash as a request object (see above).
1994
+ #
1995
+ # @param name [::String]
1996
+ # Required. Name of the resource
1997
+ # @param request_id [::String]
1998
+ # Optional. An optional request ID to identify requests. Specify a unique
1999
+ # request ID so that if you must retry your request, the server will know to
2000
+ # ignore the request if it has already been completed. The server will
2001
+ # guarantee that for at least 60 minutes after the first request.
2002
+ #
2003
+ # For example, consider a situation where you make an initial request and
2004
+ # the request times out. If you make the request again with the same request
2005
+ # ID, the server can check if original operation with the same request ID
2006
+ # was received, and if so, will ignore the second request. This prevents
2007
+ # clients from accidentally creating duplicate commitments.
2008
+ #
2009
+ # The request ID must be a valid UUID with the exception that zero UUID is
2010
+ # not supported (00000000-0000-0000-0000-000000000000).
2011
+ # @yield [result, operation] Access the result along with the TransportOperation object
2012
+ # @yieldparam result [::Gapic::Operation]
2013
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2014
+ #
2015
+ # @return [::Gapic::Operation]
2016
+ #
2017
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2018
+ #
2019
+ # @example Basic example
2020
+ # require "google/cloud/edge_network/v1"
2021
+ #
2022
+ # # Create a client object. The client can be reused for multiple calls.
2023
+ # client = Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Client.new
2024
+ #
2025
+ # # Create a request. To set request fields, pass in keyword arguments.
2026
+ # request = Google::Cloud::EdgeNetwork::V1::DeleteInterconnectAttachmentRequest.new
2027
+ #
2028
+ # # Call the delete_interconnect_attachment method.
2029
+ # result = client.delete_interconnect_attachment request
2030
+ #
2031
+ # # The returned object is of type Gapic::Operation. You can use it to
2032
+ # # check the status of an operation, cancel it, or wait for results.
2033
+ # # Here is how to wait for a response.
2034
+ # result.wait_until_done! timeout: 60
2035
+ # if result.response?
2036
+ # p result.response
2037
+ # else
2038
+ # puts "No response received."
2039
+ # end
2040
+ #
2041
+ def delete_interconnect_attachment request, options = nil
2042
+ raise ::ArgumentError, "request must be provided" if request.nil?
2043
+
2044
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::DeleteInterconnectAttachmentRequest
2045
+
2046
+ # Converts hash and nil to an options object
2047
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2048
+
2049
+ # Customize the options with defaults
2050
+ call_metadata = @config.rpcs.delete_interconnect_attachment.metadata.to_h
2051
+
2052
+ # Set x-goog-api-client and x-goog-user-project headers
2053
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2054
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2055
+ gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION,
2056
+ transports_version_send: [:rest]
2057
+
2058
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2059
+
2060
+ options.apply_defaults timeout: @config.rpcs.delete_interconnect_attachment.timeout,
2061
+ metadata: call_metadata,
2062
+ retry_policy: @config.rpcs.delete_interconnect_attachment.retry_policy
2063
+
2064
+ options.apply_defaults timeout: @config.timeout,
2065
+ metadata: @config.metadata,
2066
+ retry_policy: @config.retry_policy
2067
+
2068
+ @edge_network_stub.delete_interconnect_attachment request, options do |result, operation|
2069
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2070
+ yield result, operation if block_given?
2071
+ return result
2072
+ end
2073
+ rescue ::Gapic::Rest::Error => e
2074
+ raise ::Google::Cloud::Error.from_error(e)
2075
+ end
2076
+
2077
+ ##
2078
+ # Lists Routers in a given project and location.
2079
+ #
2080
+ # @overload list_routers(request, options = nil)
2081
+ # Pass arguments to `list_routers` via a request object, either of type
2082
+ # {::Google::Cloud::EdgeNetwork::V1::ListRoutersRequest} or an equivalent Hash.
2083
+ #
2084
+ # @param request [::Google::Cloud::EdgeNetwork::V1::ListRoutersRequest, ::Hash]
2085
+ # A request object representing the call parameters. Required. To specify no
2086
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2087
+ # @param options [::Gapic::CallOptions, ::Hash]
2088
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2089
+ #
2090
+ # @overload list_routers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2091
+ # Pass arguments to `list_routers` via keyword arguments. Note that at
2092
+ # least one keyword argument is required. To specify no parameters, or to keep all
2093
+ # the default parameter values, pass an empty Hash as a request object (see above).
2094
+ #
2095
+ # @param parent [::String]
2096
+ # Required. Parent value for ListRoutersRequest
2097
+ # @param page_size [::Integer]
2098
+ # Requested page size. Server may return fewer items than requested.
2099
+ # If unspecified, server will pick an appropriate default.
2100
+ # @param page_token [::String]
2101
+ # A token identifying a page of results the server should return.
2102
+ # @param filter [::String]
2103
+ # Filtering results
2104
+ # @param order_by [::String]
2105
+ # Hint for how to order the results
2106
+ # @yield [result, operation] Access the result along with the TransportOperation object
2107
+ # @yieldparam result [::Google::Cloud::EdgeNetwork::V1::ListRoutersResponse]
2108
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2109
+ #
2110
+ # @return [::Google::Cloud::EdgeNetwork::V1::ListRoutersResponse]
2111
+ #
2112
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2113
+ #
2114
+ # @example Basic example
2115
+ # require "google/cloud/edge_network/v1"
2116
+ #
2117
+ # # Create a client object. The client can be reused for multiple calls.
2118
+ # client = Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Client.new
2119
+ #
2120
+ # # Create a request. To set request fields, pass in keyword arguments.
2121
+ # request = Google::Cloud::EdgeNetwork::V1::ListRoutersRequest.new
2122
+ #
2123
+ # # Call the list_routers method.
2124
+ # result = client.list_routers request
2125
+ #
2126
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2127
+ # # over elements, and API calls will be issued to fetch pages as needed.
2128
+ # result.each do |item|
2129
+ # # Each element is of type ::Google::Cloud::EdgeNetwork::V1::Router.
2130
+ # p item
2131
+ # end
2132
+ #
2133
+ def list_routers request, options = nil
2134
+ raise ::ArgumentError, "request must be provided" if request.nil?
2135
+
2136
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::ListRoutersRequest
2137
+
2138
+ # Converts hash and nil to an options object
2139
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2140
+
2141
+ # Customize the options with defaults
2142
+ call_metadata = @config.rpcs.list_routers.metadata.to_h
2143
+
2144
+ # Set x-goog-api-client and x-goog-user-project headers
2145
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2146
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2147
+ gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION,
2148
+ transports_version_send: [:rest]
2149
+
2150
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2151
+
2152
+ options.apply_defaults timeout: @config.rpcs.list_routers.timeout,
2153
+ metadata: call_metadata,
2154
+ retry_policy: @config.rpcs.list_routers.retry_policy
2155
+
2156
+ options.apply_defaults timeout: @config.timeout,
2157
+ metadata: @config.metadata,
2158
+ retry_policy: @config.retry_policy
2159
+
2160
+ @edge_network_stub.list_routers request, options do |result, operation|
2161
+ yield result, operation if block_given?
2162
+ return result
2163
+ end
2164
+ rescue ::Gapic::Rest::Error => e
2165
+ raise ::Google::Cloud::Error.from_error(e)
2166
+ end
2167
+
2168
+ ##
2169
+ # Gets details of a single Router.
2170
+ #
2171
+ # @overload get_router(request, options = nil)
2172
+ # Pass arguments to `get_router` via a request object, either of type
2173
+ # {::Google::Cloud::EdgeNetwork::V1::GetRouterRequest} or an equivalent Hash.
2174
+ #
2175
+ # @param request [::Google::Cloud::EdgeNetwork::V1::GetRouterRequest, ::Hash]
2176
+ # A request object representing the call parameters. Required. To specify no
2177
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2178
+ # @param options [::Gapic::CallOptions, ::Hash]
2179
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2180
+ #
2181
+ # @overload get_router(name: nil)
2182
+ # Pass arguments to `get_router` via keyword arguments. Note that at
2183
+ # least one keyword argument is required. To specify no parameters, or to keep all
2184
+ # the default parameter values, pass an empty Hash as a request object (see above).
2185
+ #
2186
+ # @param name [::String]
2187
+ # Required. Name of the resource
2188
+ # @yield [result, operation] Access the result along with the TransportOperation object
2189
+ # @yieldparam result [::Google::Cloud::EdgeNetwork::V1::Router]
2190
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2191
+ #
2192
+ # @return [::Google::Cloud::EdgeNetwork::V1::Router]
2193
+ #
2194
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2195
+ #
2196
+ # @example Basic example
2197
+ # require "google/cloud/edge_network/v1"
2198
+ #
2199
+ # # Create a client object. The client can be reused for multiple calls.
2200
+ # client = Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Client.new
2201
+ #
2202
+ # # Create a request. To set request fields, pass in keyword arguments.
2203
+ # request = Google::Cloud::EdgeNetwork::V1::GetRouterRequest.new
2204
+ #
2205
+ # # Call the get_router method.
2206
+ # result = client.get_router request
2207
+ #
2208
+ # # The returned object is of type Google::Cloud::EdgeNetwork::V1::Router.
2209
+ # p result
2210
+ #
2211
+ def get_router request, options = nil
2212
+ raise ::ArgumentError, "request must be provided" if request.nil?
2213
+
2214
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::GetRouterRequest
2215
+
2216
+ # Converts hash and nil to an options object
2217
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2218
+
2219
+ # Customize the options with defaults
2220
+ call_metadata = @config.rpcs.get_router.metadata.to_h
2221
+
2222
+ # Set x-goog-api-client and x-goog-user-project headers
2223
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2224
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2225
+ gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION,
2226
+ transports_version_send: [:rest]
2227
+
2228
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2229
+
2230
+ options.apply_defaults timeout: @config.rpcs.get_router.timeout,
2231
+ metadata: call_metadata,
2232
+ retry_policy: @config.rpcs.get_router.retry_policy
2233
+
2234
+ options.apply_defaults timeout: @config.timeout,
2235
+ metadata: @config.metadata,
2236
+ retry_policy: @config.retry_policy
2237
+
2238
+ @edge_network_stub.get_router request, options do |result, operation|
2239
+ yield result, operation if block_given?
2240
+ return result
2241
+ end
2242
+ rescue ::Gapic::Rest::Error => e
2243
+ raise ::Google::Cloud::Error.from_error(e)
2244
+ end
2245
+
2246
+ ##
2247
+ # Get the diagnostics of a single router resource.
2248
+ #
2249
+ # @overload diagnose_router(request, options = nil)
2250
+ # Pass arguments to `diagnose_router` via a request object, either of type
2251
+ # {::Google::Cloud::EdgeNetwork::V1::DiagnoseRouterRequest} or an equivalent Hash.
2252
+ #
2253
+ # @param request [::Google::Cloud::EdgeNetwork::V1::DiagnoseRouterRequest, ::Hash]
2254
+ # A request object representing the call parameters. Required. To specify no
2255
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2256
+ # @param options [::Gapic::CallOptions, ::Hash]
2257
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2258
+ #
2259
+ # @overload diagnose_router(name: nil)
2260
+ # Pass arguments to `diagnose_router` via keyword arguments. Note that at
2261
+ # least one keyword argument is required. To specify no parameters, or to keep all
2262
+ # the default parameter values, pass an empty Hash as a request object (see above).
2263
+ #
2264
+ # @param name [::String]
2265
+ # Required. The name of the router resource.
2266
+ # @yield [result, operation] Access the result along with the TransportOperation object
2267
+ # @yieldparam result [::Google::Cloud::EdgeNetwork::V1::DiagnoseRouterResponse]
2268
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2269
+ #
2270
+ # @return [::Google::Cloud::EdgeNetwork::V1::DiagnoseRouterResponse]
2271
+ #
2272
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2273
+ #
2274
+ # @example Basic example
2275
+ # require "google/cloud/edge_network/v1"
2276
+ #
2277
+ # # Create a client object. The client can be reused for multiple calls.
2278
+ # client = Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Client.new
2279
+ #
2280
+ # # Create a request. To set request fields, pass in keyword arguments.
2281
+ # request = Google::Cloud::EdgeNetwork::V1::DiagnoseRouterRequest.new
2282
+ #
2283
+ # # Call the diagnose_router method.
2284
+ # result = client.diagnose_router request
2285
+ #
2286
+ # # The returned object is of type Google::Cloud::EdgeNetwork::V1::DiagnoseRouterResponse.
2287
+ # p result
2288
+ #
2289
+ def diagnose_router request, options = nil
2290
+ raise ::ArgumentError, "request must be provided" if request.nil?
2291
+
2292
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::DiagnoseRouterRequest
2293
+
2294
+ # Converts hash and nil to an options object
2295
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2296
+
2297
+ # Customize the options with defaults
2298
+ call_metadata = @config.rpcs.diagnose_router.metadata.to_h
2299
+
2300
+ # Set x-goog-api-client and x-goog-user-project headers
2301
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2302
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2303
+ gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION,
2304
+ transports_version_send: [:rest]
2305
+
2306
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2307
+
2308
+ options.apply_defaults timeout: @config.rpcs.diagnose_router.timeout,
2309
+ metadata: call_metadata,
2310
+ retry_policy: @config.rpcs.diagnose_router.retry_policy
2311
+
2312
+ options.apply_defaults timeout: @config.timeout,
2313
+ metadata: @config.metadata,
2314
+ retry_policy: @config.retry_policy
2315
+
2316
+ @edge_network_stub.diagnose_router request, options do |result, operation|
2317
+ yield result, operation if block_given?
2318
+ return result
2319
+ end
2320
+ rescue ::Gapic::Rest::Error => e
2321
+ raise ::Google::Cloud::Error.from_error(e)
2322
+ end
2323
+
2324
+ ##
2325
+ # Creates a new Router in a given project and location.
2326
+ #
2327
+ # @overload create_router(request, options = nil)
2328
+ # Pass arguments to `create_router` via a request object, either of type
2329
+ # {::Google::Cloud::EdgeNetwork::V1::CreateRouterRequest} or an equivalent Hash.
2330
+ #
2331
+ # @param request [::Google::Cloud::EdgeNetwork::V1::CreateRouterRequest, ::Hash]
2332
+ # A request object representing the call parameters. Required. To specify no
2333
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2334
+ # @param options [::Gapic::CallOptions, ::Hash]
2335
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2336
+ #
2337
+ # @overload create_router(parent: nil, router_id: nil, router: nil, request_id: nil)
2338
+ # Pass arguments to `create_router` via keyword arguments. Note that at
2339
+ # least one keyword argument is required. To specify no parameters, or to keep all
2340
+ # the default parameter values, pass an empty Hash as a request object (see above).
2341
+ #
2342
+ # @param parent [::String]
2343
+ # Required. Value for parent.
2344
+ # @param router_id [::String]
2345
+ # Required. Id of the requesting object
2346
+ # If auto-generating Id server-side, remove this field and
2347
+ # router_id from the method_signature of Create RPC
2348
+ # @param router [::Google::Cloud::EdgeNetwork::V1::Router, ::Hash]
2349
+ # Required. The resource being created
2350
+ # @param request_id [::String]
2351
+ # Optional. An optional request ID to identify requests. Specify a unique
2352
+ # request ID so that if you must retry your request, the server will know to
2353
+ # ignore the request if it has already been completed. The server will
2354
+ # guarantee that for at least 60 minutes since the first request.
2355
+ #
2356
+ # For example, consider a situation where you make an initial request and
2357
+ # the request times out. If you make the request again with the same request
2358
+ # ID, the server can check if original operation with the same request ID
2359
+ # was received, and if so, will ignore the second request. This prevents
2360
+ # clients from accidentally creating duplicate commitments.
2361
+ #
2362
+ # The request ID must be a valid UUID with the exception that zero UUID is
2363
+ # not supported (00000000-0000-0000-0000-000000000000).
2364
+ # @yield [result, operation] Access the result along with the TransportOperation object
2365
+ # @yieldparam result [::Gapic::Operation]
2366
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2367
+ #
2368
+ # @return [::Gapic::Operation]
2369
+ #
2370
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2371
+ #
2372
+ # @example Basic example
2373
+ # require "google/cloud/edge_network/v1"
2374
+ #
2375
+ # # Create a client object. The client can be reused for multiple calls.
2376
+ # client = Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Client.new
2377
+ #
2378
+ # # Create a request. To set request fields, pass in keyword arguments.
2379
+ # request = Google::Cloud::EdgeNetwork::V1::CreateRouterRequest.new
2380
+ #
2381
+ # # Call the create_router method.
2382
+ # result = client.create_router request
2383
+ #
2384
+ # # The returned object is of type Gapic::Operation. You can use it to
2385
+ # # check the status of an operation, cancel it, or wait for results.
2386
+ # # Here is how to wait for a response.
2387
+ # result.wait_until_done! timeout: 60
2388
+ # if result.response?
2389
+ # p result.response
2390
+ # else
2391
+ # puts "No response received."
2392
+ # end
2393
+ #
2394
+ def create_router request, options = nil
2395
+ raise ::ArgumentError, "request must be provided" if request.nil?
2396
+
2397
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::CreateRouterRequest
2398
+
2399
+ # Converts hash and nil to an options object
2400
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2401
+
2402
+ # Customize the options with defaults
2403
+ call_metadata = @config.rpcs.create_router.metadata.to_h
2404
+
2405
+ # Set x-goog-api-client and x-goog-user-project headers
2406
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2407
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2408
+ gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION,
2409
+ transports_version_send: [:rest]
2410
+
2411
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2412
+
2413
+ options.apply_defaults timeout: @config.rpcs.create_router.timeout,
2414
+ metadata: call_metadata,
2415
+ retry_policy: @config.rpcs.create_router.retry_policy
2416
+
2417
+ options.apply_defaults timeout: @config.timeout,
2418
+ metadata: @config.metadata,
2419
+ retry_policy: @config.retry_policy
2420
+
2421
+ @edge_network_stub.create_router request, options do |result, operation|
2422
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2423
+ yield result, operation if block_given?
2424
+ return result
2425
+ end
2426
+ rescue ::Gapic::Rest::Error => e
2427
+ raise ::Google::Cloud::Error.from_error(e)
2428
+ end
2429
+
2430
+ ##
2431
+ # Updates the parameters of a single Router.
2432
+ #
2433
+ # @overload update_router(request, options = nil)
2434
+ # Pass arguments to `update_router` via a request object, either of type
2435
+ # {::Google::Cloud::EdgeNetwork::V1::UpdateRouterRequest} or an equivalent Hash.
2436
+ #
2437
+ # @param request [::Google::Cloud::EdgeNetwork::V1::UpdateRouterRequest, ::Hash]
2438
+ # A request object representing the call parameters. Required. To specify no
2439
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2440
+ # @param options [::Gapic::CallOptions, ::Hash]
2441
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2442
+ #
2443
+ # @overload update_router(update_mask: nil, router: nil, request_id: nil)
2444
+ # Pass arguments to `update_router` via keyword arguments. Note that at
2445
+ # least one keyword argument is required. To specify no parameters, or to keep all
2446
+ # the default parameter values, pass an empty Hash as a request object (see above).
2447
+ #
2448
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2449
+ # Required. Field mask is used to specify the fields to be overwritten in the
2450
+ # Router resource by the update.
2451
+ # The fields specified in the update_mask are relative to the resource, not
2452
+ # the full request. A field will be overwritten if it is in the mask. If the
2453
+ # user does not provide a mask then all fields will be overwritten.
2454
+ # @param router [::Google::Cloud::EdgeNetwork::V1::Router, ::Hash]
2455
+ # Required. The resource being updated
2456
+ # @param request_id [::String]
2457
+ # Optional. An optional request ID to identify requests. Specify a unique
2458
+ # request ID so that if you must retry your request, the server will know to
2459
+ # ignore the request if it has already been completed. The server will
2460
+ # guarantee that for at least 60 minutes since the first request.
2461
+ #
2462
+ # For example, consider a situation where you make an initial request and
2463
+ # the request times out. If you make the request again with the same request
2464
+ # ID, the server can check if original operation with the same request ID
2465
+ # was received, and if so, will ignore the second request. This prevents
2466
+ # clients from accidentally creating duplicate commitments.
2467
+ #
2468
+ # The request ID must be a valid UUID with the exception that zero UUID is
2469
+ # not supported (00000000-0000-0000-0000-000000000000).
2470
+ # @yield [result, operation] Access the result along with the TransportOperation object
2471
+ # @yieldparam result [::Gapic::Operation]
2472
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2473
+ #
2474
+ # @return [::Gapic::Operation]
2475
+ #
2476
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2477
+ #
2478
+ # @example Basic example
2479
+ # require "google/cloud/edge_network/v1"
2480
+ #
2481
+ # # Create a client object. The client can be reused for multiple calls.
2482
+ # client = Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Client.new
2483
+ #
2484
+ # # Create a request. To set request fields, pass in keyword arguments.
2485
+ # request = Google::Cloud::EdgeNetwork::V1::UpdateRouterRequest.new
2486
+ #
2487
+ # # Call the update_router method.
2488
+ # result = client.update_router request
2489
+ #
2490
+ # # The returned object is of type Gapic::Operation. You can use it to
2491
+ # # check the status of an operation, cancel it, or wait for results.
2492
+ # # Here is how to wait for a response.
2493
+ # result.wait_until_done! timeout: 60
2494
+ # if result.response?
2495
+ # p result.response
2496
+ # else
2497
+ # puts "No response received."
2498
+ # end
2499
+ #
2500
+ def update_router request, options = nil
2501
+ raise ::ArgumentError, "request must be provided" if request.nil?
2502
+
2503
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::UpdateRouterRequest
2504
+
2505
+ # Converts hash and nil to an options object
2506
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2507
+
2508
+ # Customize the options with defaults
2509
+ call_metadata = @config.rpcs.update_router.metadata.to_h
2510
+
2511
+ # Set x-goog-api-client and x-goog-user-project headers
2512
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2513
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2514
+ gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION,
2515
+ transports_version_send: [:rest]
2516
+
2517
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2518
+
2519
+ options.apply_defaults timeout: @config.rpcs.update_router.timeout,
2520
+ metadata: call_metadata,
2521
+ retry_policy: @config.rpcs.update_router.retry_policy
2522
+
2523
+ options.apply_defaults timeout: @config.timeout,
2524
+ metadata: @config.metadata,
2525
+ retry_policy: @config.retry_policy
2526
+
2527
+ @edge_network_stub.update_router request, options do |result, operation|
2528
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2529
+ yield result, operation if block_given?
2530
+ return result
2531
+ end
2532
+ rescue ::Gapic::Rest::Error => e
2533
+ raise ::Google::Cloud::Error.from_error(e)
2534
+ end
2535
+
2536
+ ##
2537
+ # Deletes a single Router.
2538
+ #
2539
+ # @overload delete_router(request, options = nil)
2540
+ # Pass arguments to `delete_router` via a request object, either of type
2541
+ # {::Google::Cloud::EdgeNetwork::V1::DeleteRouterRequest} or an equivalent Hash.
2542
+ #
2543
+ # @param request [::Google::Cloud::EdgeNetwork::V1::DeleteRouterRequest, ::Hash]
2544
+ # A request object representing the call parameters. Required. To specify no
2545
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2546
+ # @param options [::Gapic::CallOptions, ::Hash]
2547
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2548
+ #
2549
+ # @overload delete_router(name: nil, request_id: nil)
2550
+ # Pass arguments to `delete_router` via keyword arguments. Note that at
2551
+ # least one keyword argument is required. To specify no parameters, or to keep all
2552
+ # the default parameter values, pass an empty Hash as a request object (see above).
2553
+ #
2554
+ # @param name [::String]
2555
+ # Required. Name of the resource
2556
+ # @param request_id [::String]
2557
+ # Optional. An optional request ID to identify requests. Specify a unique
2558
+ # request ID so that if you must retry your request, the server will know to
2559
+ # ignore the request if it has already been completed. The server will
2560
+ # guarantee that for at least 60 minutes after the first request.
2561
+ #
2562
+ # For example, consider a situation where you make an initial request and
2563
+ # the request times out. If you make the request again with the same request
2564
+ # ID, the server can check if original operation with the same request ID
2565
+ # was received, and if so, will ignore the second request. This prevents
2566
+ # clients from accidentally creating duplicate commitments.
2567
+ #
2568
+ # The request ID must be a valid UUID with the exception that zero UUID is
2569
+ # not supported (00000000-0000-0000-0000-000000000000).
2570
+ # @yield [result, operation] Access the result along with the TransportOperation object
2571
+ # @yieldparam result [::Gapic::Operation]
2572
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2573
+ #
2574
+ # @return [::Gapic::Operation]
2575
+ #
2576
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2577
+ #
2578
+ # @example Basic example
2579
+ # require "google/cloud/edge_network/v1"
2580
+ #
2581
+ # # Create a client object. The client can be reused for multiple calls.
2582
+ # client = Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Client.new
2583
+ #
2584
+ # # Create a request. To set request fields, pass in keyword arguments.
2585
+ # request = Google::Cloud::EdgeNetwork::V1::DeleteRouterRequest.new
2586
+ #
2587
+ # # Call the delete_router method.
2588
+ # result = client.delete_router request
2589
+ #
2590
+ # # The returned object is of type Gapic::Operation. You can use it to
2591
+ # # check the status of an operation, cancel it, or wait for results.
2592
+ # # Here is how to wait for a response.
2593
+ # result.wait_until_done! timeout: 60
2594
+ # if result.response?
2595
+ # p result.response
2596
+ # else
2597
+ # puts "No response received."
2598
+ # end
2599
+ #
2600
+ def delete_router request, options = nil
2601
+ raise ::ArgumentError, "request must be provided" if request.nil?
2602
+
2603
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::DeleteRouterRequest
2604
+
2605
+ # Converts hash and nil to an options object
2606
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2607
+
2608
+ # Customize the options with defaults
2609
+ call_metadata = @config.rpcs.delete_router.metadata.to_h
2610
+
2611
+ # Set x-goog-api-client and x-goog-user-project headers
2612
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2613
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2614
+ gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION,
2615
+ transports_version_send: [:rest]
2616
+
2617
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2618
+
2619
+ options.apply_defaults timeout: @config.rpcs.delete_router.timeout,
2620
+ metadata: call_metadata,
2621
+ retry_policy: @config.rpcs.delete_router.retry_policy
2622
+
2623
+ options.apply_defaults timeout: @config.timeout,
2624
+ metadata: @config.metadata,
2625
+ retry_policy: @config.retry_policy
2626
+
2627
+ @edge_network_stub.delete_router request, options do |result, operation|
2628
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2629
+ yield result, operation if block_given?
2630
+ return result
2631
+ end
2632
+ rescue ::Gapic::Rest::Error => e
2633
+ raise ::Google::Cloud::Error.from_error(e)
2634
+ end
2635
+
2636
+ ##
2637
+ # Configuration class for the EdgeNetwork REST API.
2638
+ #
2639
+ # This class represents the configuration for EdgeNetwork REST,
2640
+ # providing control over timeouts, retry behavior, logging, transport
2641
+ # parameters, and other low-level controls. Certain parameters can also be
2642
+ # applied individually to specific RPCs. See
2643
+ # {::Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Client::Configuration::Rpcs}
2644
+ # for a list of RPCs that can be configured independently.
2645
+ #
2646
+ # Configuration can be applied globally to all clients, or to a single client
2647
+ # on construction.
2648
+ #
2649
+ # @example
2650
+ #
2651
+ # # Modify the global config, setting the timeout for
2652
+ # # initialize_zone to 20 seconds,
2653
+ # # and all remaining timeouts to 10 seconds.
2654
+ # ::Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Client.configure do |config|
2655
+ # config.timeout = 10.0
2656
+ # config.rpcs.initialize_zone.timeout = 20.0
2657
+ # end
2658
+ #
2659
+ # # Apply the above configuration only to a new client.
2660
+ # client = ::Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Rest::Client.new do |config|
2661
+ # config.timeout = 10.0
2662
+ # config.rpcs.initialize_zone.timeout = 20.0
2663
+ # end
2664
+ #
2665
+ # @!attribute [rw] endpoint
2666
+ # A custom service endpoint, as a hostname or hostname:port. The default is
2667
+ # nil, indicating to use the default endpoint in the current universe domain.
2668
+ # @return [::String,nil]
2669
+ # @!attribute [rw] credentials
2670
+ # Credentials to send with calls. You may provide any of the following types:
2671
+ # * (`String`) The path to a service account key file in JSON format
2672
+ # * (`Hash`) A service account key as a Hash
2673
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
2674
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
2675
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
2676
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
2677
+ # * (`nil`) indicating no credentials
2678
+ # @return [::Object]
2679
+ # @!attribute [rw] scope
2680
+ # The OAuth scopes
2681
+ # @return [::Array<::String>]
2682
+ # @!attribute [rw] lib_name
2683
+ # The library name as recorded in instrumentation and logging
2684
+ # @return [::String]
2685
+ # @!attribute [rw] lib_version
2686
+ # The library version as recorded in instrumentation and logging
2687
+ # @return [::String]
2688
+ # @!attribute [rw] timeout
2689
+ # The call timeout in seconds.
2690
+ # @return [::Numeric]
2691
+ # @!attribute [rw] metadata
2692
+ # Additional headers to be sent with the call.
2693
+ # @return [::Hash{::Symbol=>::String}]
2694
+ # @!attribute [rw] retry_policy
2695
+ # The retry policy. The value is a hash with the following keys:
2696
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2697
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2698
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2699
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2700
+ # trigger a retry.
2701
+ # @return [::Hash]
2702
+ # @!attribute [rw] quota_project
2703
+ # A separate project against which to charge quota.
2704
+ # @return [::String]
2705
+ # @!attribute [rw] universe_domain
2706
+ # The universe domain within which to make requests. This determines the
2707
+ # default endpoint URL. The default value of nil uses the environment
2708
+ # universe (usually the default "googleapis.com" universe).
2709
+ # @return [::String,nil]
2710
+ #
2711
+ class Configuration
2712
+ extend ::Gapic::Config
2713
+
2714
+ # @private
2715
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
2716
+ DEFAULT_ENDPOINT = "edgenetwork.googleapis.com"
2717
+
2718
+ config_attr :endpoint, nil, ::String, nil
2719
+ config_attr :credentials, nil do |value|
2720
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
2721
+ allowed.any? { |klass| klass === value }
2722
+ end
2723
+ config_attr :scope, nil, ::String, ::Array, nil
2724
+ config_attr :lib_name, nil, ::String, nil
2725
+ config_attr :lib_version, nil, ::String, nil
2726
+ config_attr :timeout, nil, ::Numeric, nil
2727
+ config_attr :metadata, nil, ::Hash, nil
2728
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2729
+ config_attr :quota_project, nil, ::String, nil
2730
+ config_attr :universe_domain, nil, ::String, nil
2731
+
2732
+ # @private
2733
+ # Overrides for http bindings for the RPCs of this service
2734
+ # are only used when this service is used as mixin, and only
2735
+ # by the host service.
2736
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
2737
+ config_attr :bindings_override, {}, ::Hash, nil
2738
+
2739
+ # @private
2740
+ def initialize parent_config = nil
2741
+ @parent_config = parent_config unless parent_config.nil?
2742
+
2743
+ yield self if block_given?
2744
+ end
2745
+
2746
+ ##
2747
+ # Configurations for individual RPCs
2748
+ # @return [Rpcs]
2749
+ #
2750
+ def rpcs
2751
+ @rpcs ||= begin
2752
+ parent_rpcs = nil
2753
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
2754
+ Rpcs.new parent_rpcs
2755
+ end
2756
+ end
2757
+
2758
+ ##
2759
+ # Configuration RPC class for the EdgeNetwork API.
2760
+ #
2761
+ # Includes fields providing the configuration for each RPC in this service.
2762
+ # Each configuration object is of type `Gapic::Config::Method` and includes
2763
+ # the following configuration fields:
2764
+ #
2765
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
2766
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
2767
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
2768
+ # include the following keys:
2769
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2770
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2771
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2772
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2773
+ # trigger a retry.
2774
+ #
2775
+ class Rpcs
2776
+ ##
2777
+ # RPC-specific configuration for `initialize_zone`
2778
+ # @return [::Gapic::Config::Method]
2779
+ #
2780
+ attr_reader :initialize_zone
2781
+ ##
2782
+ # RPC-specific configuration for `list_zones`
2783
+ # @return [::Gapic::Config::Method]
2784
+ #
2785
+ attr_reader :list_zones
2786
+ ##
2787
+ # RPC-specific configuration for `get_zone`
2788
+ # @return [::Gapic::Config::Method]
2789
+ #
2790
+ attr_reader :get_zone
2791
+ ##
2792
+ # RPC-specific configuration for `list_networks`
2793
+ # @return [::Gapic::Config::Method]
2794
+ #
2795
+ attr_reader :list_networks
2796
+ ##
2797
+ # RPC-specific configuration for `get_network`
2798
+ # @return [::Gapic::Config::Method]
2799
+ #
2800
+ attr_reader :get_network
2801
+ ##
2802
+ # RPC-specific configuration for `diagnose_network`
2803
+ # @return [::Gapic::Config::Method]
2804
+ #
2805
+ attr_reader :diagnose_network
2806
+ ##
2807
+ # RPC-specific configuration for `create_network`
2808
+ # @return [::Gapic::Config::Method]
2809
+ #
2810
+ attr_reader :create_network
2811
+ ##
2812
+ # RPC-specific configuration for `delete_network`
2813
+ # @return [::Gapic::Config::Method]
2814
+ #
2815
+ attr_reader :delete_network
2816
+ ##
2817
+ # RPC-specific configuration for `list_subnets`
2818
+ # @return [::Gapic::Config::Method]
2819
+ #
2820
+ attr_reader :list_subnets
2821
+ ##
2822
+ # RPC-specific configuration for `get_subnet`
2823
+ # @return [::Gapic::Config::Method]
2824
+ #
2825
+ attr_reader :get_subnet
2826
+ ##
2827
+ # RPC-specific configuration for `create_subnet`
2828
+ # @return [::Gapic::Config::Method]
2829
+ #
2830
+ attr_reader :create_subnet
2831
+ ##
2832
+ # RPC-specific configuration for `update_subnet`
2833
+ # @return [::Gapic::Config::Method]
2834
+ #
2835
+ attr_reader :update_subnet
2836
+ ##
2837
+ # RPC-specific configuration for `delete_subnet`
2838
+ # @return [::Gapic::Config::Method]
2839
+ #
2840
+ attr_reader :delete_subnet
2841
+ ##
2842
+ # RPC-specific configuration for `list_interconnects`
2843
+ # @return [::Gapic::Config::Method]
2844
+ #
2845
+ attr_reader :list_interconnects
2846
+ ##
2847
+ # RPC-specific configuration for `get_interconnect`
2848
+ # @return [::Gapic::Config::Method]
2849
+ #
2850
+ attr_reader :get_interconnect
2851
+ ##
2852
+ # RPC-specific configuration for `diagnose_interconnect`
2853
+ # @return [::Gapic::Config::Method]
2854
+ #
2855
+ attr_reader :diagnose_interconnect
2856
+ ##
2857
+ # RPC-specific configuration for `list_interconnect_attachments`
2858
+ # @return [::Gapic::Config::Method]
2859
+ #
2860
+ attr_reader :list_interconnect_attachments
2861
+ ##
2862
+ # RPC-specific configuration for `get_interconnect_attachment`
2863
+ # @return [::Gapic::Config::Method]
2864
+ #
2865
+ attr_reader :get_interconnect_attachment
2866
+ ##
2867
+ # RPC-specific configuration for `create_interconnect_attachment`
2868
+ # @return [::Gapic::Config::Method]
2869
+ #
2870
+ attr_reader :create_interconnect_attachment
2871
+ ##
2872
+ # RPC-specific configuration for `delete_interconnect_attachment`
2873
+ # @return [::Gapic::Config::Method]
2874
+ #
2875
+ attr_reader :delete_interconnect_attachment
2876
+ ##
2877
+ # RPC-specific configuration for `list_routers`
2878
+ # @return [::Gapic::Config::Method]
2879
+ #
2880
+ attr_reader :list_routers
2881
+ ##
2882
+ # RPC-specific configuration for `get_router`
2883
+ # @return [::Gapic::Config::Method]
2884
+ #
2885
+ attr_reader :get_router
2886
+ ##
2887
+ # RPC-specific configuration for `diagnose_router`
2888
+ # @return [::Gapic::Config::Method]
2889
+ #
2890
+ attr_reader :diagnose_router
2891
+ ##
2892
+ # RPC-specific configuration for `create_router`
2893
+ # @return [::Gapic::Config::Method]
2894
+ #
2895
+ attr_reader :create_router
2896
+ ##
2897
+ # RPC-specific configuration for `update_router`
2898
+ # @return [::Gapic::Config::Method]
2899
+ #
2900
+ attr_reader :update_router
2901
+ ##
2902
+ # RPC-specific configuration for `delete_router`
2903
+ # @return [::Gapic::Config::Method]
2904
+ #
2905
+ attr_reader :delete_router
2906
+
2907
+ # @private
2908
+ def initialize parent_rpcs = nil
2909
+ initialize_zone_config = parent_rpcs.initialize_zone if parent_rpcs.respond_to? :initialize_zone
2910
+ @initialize_zone = ::Gapic::Config::Method.new initialize_zone_config
2911
+ list_zones_config = parent_rpcs.list_zones if parent_rpcs.respond_to? :list_zones
2912
+ @list_zones = ::Gapic::Config::Method.new list_zones_config
2913
+ get_zone_config = parent_rpcs.get_zone if parent_rpcs.respond_to? :get_zone
2914
+ @get_zone = ::Gapic::Config::Method.new get_zone_config
2915
+ list_networks_config = parent_rpcs.list_networks if parent_rpcs.respond_to? :list_networks
2916
+ @list_networks = ::Gapic::Config::Method.new list_networks_config
2917
+ get_network_config = parent_rpcs.get_network if parent_rpcs.respond_to? :get_network
2918
+ @get_network = ::Gapic::Config::Method.new get_network_config
2919
+ diagnose_network_config = parent_rpcs.diagnose_network if parent_rpcs.respond_to? :diagnose_network
2920
+ @diagnose_network = ::Gapic::Config::Method.new diagnose_network_config
2921
+ create_network_config = parent_rpcs.create_network if parent_rpcs.respond_to? :create_network
2922
+ @create_network = ::Gapic::Config::Method.new create_network_config
2923
+ delete_network_config = parent_rpcs.delete_network if parent_rpcs.respond_to? :delete_network
2924
+ @delete_network = ::Gapic::Config::Method.new delete_network_config
2925
+ list_subnets_config = parent_rpcs.list_subnets if parent_rpcs.respond_to? :list_subnets
2926
+ @list_subnets = ::Gapic::Config::Method.new list_subnets_config
2927
+ get_subnet_config = parent_rpcs.get_subnet if parent_rpcs.respond_to? :get_subnet
2928
+ @get_subnet = ::Gapic::Config::Method.new get_subnet_config
2929
+ create_subnet_config = parent_rpcs.create_subnet if parent_rpcs.respond_to? :create_subnet
2930
+ @create_subnet = ::Gapic::Config::Method.new create_subnet_config
2931
+ update_subnet_config = parent_rpcs.update_subnet if parent_rpcs.respond_to? :update_subnet
2932
+ @update_subnet = ::Gapic::Config::Method.new update_subnet_config
2933
+ delete_subnet_config = parent_rpcs.delete_subnet if parent_rpcs.respond_to? :delete_subnet
2934
+ @delete_subnet = ::Gapic::Config::Method.new delete_subnet_config
2935
+ list_interconnects_config = parent_rpcs.list_interconnects if parent_rpcs.respond_to? :list_interconnects
2936
+ @list_interconnects = ::Gapic::Config::Method.new list_interconnects_config
2937
+ get_interconnect_config = parent_rpcs.get_interconnect if parent_rpcs.respond_to? :get_interconnect
2938
+ @get_interconnect = ::Gapic::Config::Method.new get_interconnect_config
2939
+ diagnose_interconnect_config = parent_rpcs.diagnose_interconnect if parent_rpcs.respond_to? :diagnose_interconnect
2940
+ @diagnose_interconnect = ::Gapic::Config::Method.new diagnose_interconnect_config
2941
+ list_interconnect_attachments_config = parent_rpcs.list_interconnect_attachments if parent_rpcs.respond_to? :list_interconnect_attachments
2942
+ @list_interconnect_attachments = ::Gapic::Config::Method.new list_interconnect_attachments_config
2943
+ get_interconnect_attachment_config = parent_rpcs.get_interconnect_attachment if parent_rpcs.respond_to? :get_interconnect_attachment
2944
+ @get_interconnect_attachment = ::Gapic::Config::Method.new get_interconnect_attachment_config
2945
+ create_interconnect_attachment_config = parent_rpcs.create_interconnect_attachment if parent_rpcs.respond_to? :create_interconnect_attachment
2946
+ @create_interconnect_attachment = ::Gapic::Config::Method.new create_interconnect_attachment_config
2947
+ delete_interconnect_attachment_config = parent_rpcs.delete_interconnect_attachment if parent_rpcs.respond_to? :delete_interconnect_attachment
2948
+ @delete_interconnect_attachment = ::Gapic::Config::Method.new delete_interconnect_attachment_config
2949
+ list_routers_config = parent_rpcs.list_routers if parent_rpcs.respond_to? :list_routers
2950
+ @list_routers = ::Gapic::Config::Method.new list_routers_config
2951
+ get_router_config = parent_rpcs.get_router if parent_rpcs.respond_to? :get_router
2952
+ @get_router = ::Gapic::Config::Method.new get_router_config
2953
+ diagnose_router_config = parent_rpcs.diagnose_router if parent_rpcs.respond_to? :diagnose_router
2954
+ @diagnose_router = ::Gapic::Config::Method.new diagnose_router_config
2955
+ create_router_config = parent_rpcs.create_router if parent_rpcs.respond_to? :create_router
2956
+ @create_router = ::Gapic::Config::Method.new create_router_config
2957
+ update_router_config = parent_rpcs.update_router if parent_rpcs.respond_to? :update_router
2958
+ @update_router = ::Gapic::Config::Method.new update_router_config
2959
+ delete_router_config = parent_rpcs.delete_router if parent_rpcs.respond_to? :delete_router
2960
+ @delete_router = ::Gapic::Config::Method.new delete_router_config
2961
+
2962
+ yield self if block_given?
2963
+ end
2964
+ end
2965
+ end
2966
+ end
2967
+ end
2968
+ end
2969
+ end
2970
+ end
2971
+ end
2972
+ end