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

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