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

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