google-cloud-network_services-v1beta1 0.a → 0.1.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 (50) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +154 -8
  5. data/lib/google/cloud/network_services/v1beta1/bindings_override.rb +108 -0
  6. data/lib/google/cloud/network_services/v1beta1/dep_service/client.rb +2076 -0
  7. data/lib/google/cloud/network_services/v1beta1/dep_service/credentials.rb +47 -0
  8. data/lib/google/cloud/network_services/v1beta1/dep_service/operations.rb +843 -0
  9. data/lib/google/cloud/network_services/v1beta1/dep_service/paths.rb +107 -0
  10. data/lib/google/cloud/network_services/v1beta1/dep_service/rest/client.rb +1937 -0
  11. data/lib/google/cloud/network_services/v1beta1/dep_service/rest/operations.rb +927 -0
  12. data/lib/google/cloud/network_services/v1beta1/dep_service/rest/service_stub.rb +1002 -0
  13. data/lib/google/cloud/network_services/v1beta1/dep_service/rest.rb +54 -0
  14. data/lib/google/cloud/network_services/v1beta1/dep_service.rb +56 -0
  15. data/lib/google/cloud/network_services/v1beta1/network_services/client.rb +947 -0
  16. data/lib/google/cloud/network_services/v1beta1/network_services/credentials.rb +47 -0
  17. data/lib/google/cloud/network_services/v1beta1/network_services/operations.rb +843 -0
  18. data/lib/google/cloud/network_services/v1beta1/network_services/paths.rb +126 -0
  19. data/lib/google/cloud/network_services/v1beta1/network_services/rest/client.rb +878 -0
  20. data/lib/google/cloud/network_services/v1beta1/network_services/rest/operations.rb +927 -0
  21. data/lib/google/cloud/network_services/v1beta1/network_services/rest/service_stub.rb +388 -0
  22. data/lib/google/cloud/network_services/v1beta1/network_services/rest.rb +54 -0
  23. data/lib/google/cloud/network_services/v1beta1/network_services.rb +56 -0
  24. data/lib/google/cloud/network_services/v1beta1/rest.rb +39 -0
  25. data/lib/google/cloud/network_services/v1beta1/version.rb +7 -2
  26. data/lib/google/cloud/network_services/v1beta1.rb +46 -0
  27. data/lib/google/cloud/networkservices/v1beta1/common_pb.rb +29 -0
  28. data/lib/google/cloud/networkservices/v1beta1/dep_pb.rb +67 -0
  29. data/lib/google/cloud/networkservices/v1beta1/dep_services_pb.rb +74 -0
  30. data/lib/google/cloud/networkservices/v1beta1/endpoint_policy_pb.rb +34 -0
  31. data/lib/google/cloud/networkservices/v1beta1/network_services_pb.rb +25 -0
  32. data/lib/google/cloud/networkservices/v1beta1/network_services_services_pb.rb +53 -0
  33. data/lib/google-cloud-network_services-v1beta1.rb +21 -0
  34. data/proto_docs/README.md +4 -0
  35. data/proto_docs/google/api/client.rb +593 -0
  36. data/proto_docs/google/api/field_behavior.rb +85 -0
  37. data/proto_docs/google/api/field_info.rb +88 -0
  38. data/proto_docs/google/api/launch_stage.rb +71 -0
  39. data/proto_docs/google/api/resource.rb +227 -0
  40. data/proto_docs/google/cloud/networkservices/v1beta1/common.rb +147 -0
  41. data/proto_docs/google/cloud/networkservices/v1beta1/dep.rb +928 -0
  42. data/proto_docs/google/cloud/networkservices/v1beta1/endpoint_policy.rb +196 -0
  43. data/proto_docs/google/longrunning/operations.rb +191 -0
  44. data/proto_docs/google/protobuf/any.rb +145 -0
  45. data/proto_docs/google/protobuf/duration.rb +98 -0
  46. data/proto_docs/google/protobuf/empty.rb +34 -0
  47. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  48. data/proto_docs/google/protobuf/timestamp.rb +128 -0
  49. data/proto_docs/google/rpc/status.rb +48 -0
  50. metadata +111 -9
@@ -0,0 +1,1937 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/networkservices/v1beta1/dep_pb"
21
+ require "google/cloud/network_services/v1beta1/dep_service/rest/service_stub"
22
+ require "google/cloud/location/rest"
23
+ require "google/iam/v1/rest"
24
+
25
+ module Google
26
+ module Cloud
27
+ module NetworkServices
28
+ module V1beta1
29
+ module DepService
30
+ module Rest
31
+ ##
32
+ # REST client for the DepService service.
33
+ #
34
+ # Service describing handlers for resources.
35
+ #
36
+ class Client
37
+ # @private
38
+ API_VERSION = ""
39
+
40
+ # @private
41
+ DEFAULT_ENDPOINT_TEMPLATE = "networkservices.$UNIVERSE_DOMAIN$"
42
+
43
+ include Paths
44
+
45
+ # @private
46
+ attr_reader :dep_service_stub
47
+
48
+ ##
49
+ # Configure the DepService Client class.
50
+ #
51
+ # See {::Google::Cloud::NetworkServices::V1beta1::DepService::Rest::Client::Configuration}
52
+ # for a description of the configuration fields.
53
+ #
54
+ # @example
55
+ #
56
+ # # Modify the configuration for all DepService clients
57
+ # ::Google::Cloud::NetworkServices::V1beta1::DepService::Rest::Client.configure do |config|
58
+ # config.timeout = 10.0
59
+ # end
60
+ #
61
+ # @yield [config] Configure the Client client.
62
+ # @yieldparam config [Client::Configuration]
63
+ #
64
+ # @return [Client::Configuration]
65
+ #
66
+ def self.configure
67
+ @configure ||= begin
68
+ namespace = ["Google", "Cloud", "NetworkServices", "V1beta1"]
69
+ parent_config = while namespace.any?
70
+ parent_name = namespace.join "::"
71
+ parent_const = const_get parent_name
72
+ break parent_const.configure if parent_const.respond_to? :configure
73
+ namespace.pop
74
+ end
75
+ default_config = Client::Configuration.new parent_config
76
+
77
+ default_config.timeout = 60.0
78
+
79
+ default_config
80
+ end
81
+ yield @configure if block_given?
82
+ @configure
83
+ end
84
+
85
+ ##
86
+ # Configure the DepService Client instance.
87
+ #
88
+ # The configuration is set to the derived mode, meaning that values can be changed,
89
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
90
+ # should be made on {Client.configure}.
91
+ #
92
+ # See {::Google::Cloud::NetworkServices::V1beta1::DepService::Rest::Client::Configuration}
93
+ # for a description of the configuration fields.
94
+ #
95
+ # @yield [config] Configure the Client client.
96
+ # @yieldparam config [Client::Configuration]
97
+ #
98
+ # @return [Client::Configuration]
99
+ #
100
+ def configure
101
+ yield @config if block_given?
102
+ @config
103
+ end
104
+
105
+ ##
106
+ # The effective universe domain
107
+ #
108
+ # @return [String]
109
+ #
110
+ def universe_domain
111
+ @dep_service_stub.universe_domain
112
+ end
113
+
114
+ ##
115
+ # Create a new DepService REST client object.
116
+ #
117
+ # @example
118
+ #
119
+ # # Create a client using the default configuration
120
+ # client = ::Google::Cloud::NetworkServices::V1beta1::DepService::Rest::Client.new
121
+ #
122
+ # # Create a client using a custom configuration
123
+ # client = ::Google::Cloud::NetworkServices::V1beta1::DepService::Rest::Client.new do |config|
124
+ # config.timeout = 10.0
125
+ # end
126
+ #
127
+ # @yield [config] Configure the DepService client.
128
+ # @yieldparam config [Client::Configuration]
129
+ #
130
+ def initialize
131
+ # Create the configuration object
132
+ @config = Configuration.new Client.configure
133
+
134
+ # Yield the configuration if needed
135
+ yield @config if block_given?
136
+
137
+ # Create credentials
138
+ credentials = @config.credentials
139
+ # Use self-signed JWT if the endpoint is unchanged from default,
140
+ # but only if the default endpoint does not have a region prefix.
141
+ enable_self_signed_jwt = @config.endpoint.nil? ||
142
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
143
+ !@config.endpoint.split(".").first.include?("-"))
144
+ credentials ||= Credentials.default scope: @config.scope,
145
+ enable_self_signed_jwt: enable_self_signed_jwt
146
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
147
+ credentials = Credentials.new credentials, scope: @config.scope
148
+ end
149
+
150
+ @quota_project_id = @config.quota_project
151
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
152
+
153
+ @operations_client = ::Google::Cloud::NetworkServices::V1beta1::DepService::Rest::Operations.new do |config|
154
+ config.credentials = credentials
155
+ config.quota_project = @quota_project_id
156
+ config.endpoint = @config.endpoint
157
+ config.universe_domain = @config.universe_domain
158
+ end
159
+
160
+ @dep_service_stub = ::Google::Cloud::NetworkServices::V1beta1::DepService::Rest::ServiceStub.new(
161
+ endpoint: @config.endpoint,
162
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
163
+ universe_domain: @config.universe_domain,
164
+ credentials: credentials,
165
+ logger: @config.logger
166
+ )
167
+
168
+ @dep_service_stub.logger(stub: true)&.info do |entry|
169
+ entry.set_system_name
170
+ entry.set_service
171
+ entry.message = "Created client for #{entry.service}"
172
+ entry.set_credentials_fields credentials
173
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
174
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
175
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
176
+ end
177
+
178
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
179
+ config.credentials = credentials
180
+ config.quota_project = @quota_project_id
181
+ config.endpoint = @dep_service_stub.endpoint
182
+ config.universe_domain = @dep_service_stub.universe_domain
183
+ config.bindings_override = @config.bindings_override
184
+ config.logger = @dep_service_stub.logger if config.respond_to? :logger=
185
+ end
186
+
187
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
188
+ config.credentials = credentials
189
+ config.quota_project = @quota_project_id
190
+ config.endpoint = @dep_service_stub.endpoint
191
+ config.universe_domain = @dep_service_stub.universe_domain
192
+ config.bindings_override = @config.bindings_override
193
+ config.logger = @dep_service_stub.logger if config.respond_to? :logger=
194
+ end
195
+ end
196
+
197
+ ##
198
+ # Get the associated client for long-running operations.
199
+ #
200
+ # @return [::Google::Cloud::NetworkServices::V1beta1::DepService::Rest::Operations]
201
+ #
202
+ attr_reader :operations_client
203
+
204
+ ##
205
+ # Get the associated client for mix-in of the Locations.
206
+ #
207
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
208
+ #
209
+ attr_reader :location_client
210
+
211
+ ##
212
+ # Get the associated client for mix-in of the IAMPolicy.
213
+ #
214
+ # @return [Google::Iam::V1::IAMPolicy::Rest::Client]
215
+ #
216
+ attr_reader :iam_policy_client
217
+
218
+ ##
219
+ # The logger used for request/response debug logging.
220
+ #
221
+ # @return [Logger]
222
+ #
223
+ def logger
224
+ @dep_service_stub.logger
225
+ end
226
+
227
+ # Service calls
228
+
229
+ ##
230
+ # Lists `LbTrafficExtension` resources in a given project and location.
231
+ #
232
+ # @overload list_lb_traffic_extensions(request, options = nil)
233
+ # Pass arguments to `list_lb_traffic_extensions` via a request object, either of type
234
+ # {::Google::Cloud::NetworkServices::V1beta1::ListLbTrafficExtensionsRequest} or an equivalent Hash.
235
+ #
236
+ # @param request [::Google::Cloud::NetworkServices::V1beta1::ListLbTrafficExtensionsRequest, ::Hash]
237
+ # A request object representing the call parameters. Required. To specify no
238
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
239
+ # @param options [::Gapic::CallOptions, ::Hash]
240
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
241
+ #
242
+ # @overload list_lb_traffic_extensions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
243
+ # Pass arguments to `list_lb_traffic_extensions` via keyword arguments. Note that at
244
+ # least one keyword argument is required. To specify no parameters, or to keep all
245
+ # the default parameter values, pass an empty Hash as a request object (see above).
246
+ #
247
+ # @param parent [::String]
248
+ # Required. The project and location from which the `LbTrafficExtension`
249
+ # resources are listed, specified in the following format:
250
+ # `projects/{project}/locations/{location}`.
251
+ # @param page_size [::Integer]
252
+ # Optional. Requested page size. The server might return fewer items than
253
+ # requested. If unspecified, the server picks an appropriate default.
254
+ # @param page_token [::String]
255
+ # Optional. A token identifying a page of results that the server returns.
256
+ # @param filter [::String]
257
+ # Optional. Filtering results.
258
+ # @param order_by [::String]
259
+ # Optional. Hint for how to order the results.
260
+ # @yield [result, operation] Access the result along with the TransportOperation object
261
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1beta1::LbTrafficExtension>]
262
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
263
+ #
264
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1beta1::LbTrafficExtension>]
265
+ #
266
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
267
+ #
268
+ # @example Basic example
269
+ # require "google/cloud/network_services/v1beta1"
270
+ #
271
+ # # Create a client object. The client can be reused for multiple calls.
272
+ # client = Google::Cloud::NetworkServices::V1beta1::DepService::Rest::Client.new
273
+ #
274
+ # # Create a request. To set request fields, pass in keyword arguments.
275
+ # request = Google::Cloud::NetworkServices::V1beta1::ListLbTrafficExtensionsRequest.new
276
+ #
277
+ # # Call the list_lb_traffic_extensions method.
278
+ # result = client.list_lb_traffic_extensions request
279
+ #
280
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
281
+ # # over elements, and API calls will be issued to fetch pages as needed.
282
+ # result.each do |item|
283
+ # # Each element is of type ::Google::Cloud::NetworkServices::V1beta1::LbTrafficExtension.
284
+ # p item
285
+ # end
286
+ #
287
+ def list_lb_traffic_extensions request, options = nil
288
+ raise ::ArgumentError, "request must be provided" if request.nil?
289
+
290
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1beta1::ListLbTrafficExtensionsRequest
291
+
292
+ # Converts hash and nil to an options object
293
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
294
+
295
+ # Customize the options with defaults
296
+ call_metadata = @config.rpcs.list_lb_traffic_extensions.metadata.to_h
297
+
298
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
299
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
300
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
301
+ gapic_version: ::Google::Cloud::NetworkServices::V1beta1::VERSION,
302
+ transports_version_send: [:rest]
303
+
304
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
305
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
306
+
307
+ options.apply_defaults timeout: @config.rpcs.list_lb_traffic_extensions.timeout,
308
+ metadata: call_metadata,
309
+ retry_policy: @config.rpcs.list_lb_traffic_extensions.retry_policy
310
+
311
+ options.apply_defaults timeout: @config.timeout,
312
+ metadata: @config.metadata,
313
+ retry_policy: @config.retry_policy
314
+
315
+ @dep_service_stub.list_lb_traffic_extensions request, options do |result, operation|
316
+ result = ::Gapic::Rest::PagedEnumerable.new @dep_service_stub, :list_lb_traffic_extensions, "lb_traffic_extensions", request, result, options
317
+ yield result, operation if block_given?
318
+ throw :response, result
319
+ end
320
+ rescue ::Gapic::Rest::Error => e
321
+ raise ::Google::Cloud::Error.from_error(e)
322
+ end
323
+
324
+ ##
325
+ # Gets details of the specified `LbTrafficExtension` resource.
326
+ #
327
+ # @overload get_lb_traffic_extension(request, options = nil)
328
+ # Pass arguments to `get_lb_traffic_extension` via a request object, either of type
329
+ # {::Google::Cloud::NetworkServices::V1beta1::GetLbTrafficExtensionRequest} or an equivalent Hash.
330
+ #
331
+ # @param request [::Google::Cloud::NetworkServices::V1beta1::GetLbTrafficExtensionRequest, ::Hash]
332
+ # A request object representing the call parameters. Required. To specify no
333
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
334
+ # @param options [::Gapic::CallOptions, ::Hash]
335
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
336
+ #
337
+ # @overload get_lb_traffic_extension(name: nil)
338
+ # Pass arguments to `get_lb_traffic_extension` via keyword arguments. Note that at
339
+ # least one keyword argument is required. To specify no parameters, or to keep all
340
+ # the default parameter values, pass an empty Hash as a request object (see above).
341
+ #
342
+ # @param name [::String]
343
+ # Required. A name of the `LbTrafficExtension` resource to get. Must be in
344
+ # the format
345
+ # `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.
346
+ # @yield [result, operation] Access the result along with the TransportOperation object
347
+ # @yieldparam result [::Google::Cloud::NetworkServices::V1beta1::LbTrafficExtension]
348
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
349
+ #
350
+ # @return [::Google::Cloud::NetworkServices::V1beta1::LbTrafficExtension]
351
+ #
352
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
353
+ #
354
+ # @example Basic example
355
+ # require "google/cloud/network_services/v1beta1"
356
+ #
357
+ # # Create a client object. The client can be reused for multiple calls.
358
+ # client = Google::Cloud::NetworkServices::V1beta1::DepService::Rest::Client.new
359
+ #
360
+ # # Create a request. To set request fields, pass in keyword arguments.
361
+ # request = Google::Cloud::NetworkServices::V1beta1::GetLbTrafficExtensionRequest.new
362
+ #
363
+ # # Call the get_lb_traffic_extension method.
364
+ # result = client.get_lb_traffic_extension request
365
+ #
366
+ # # The returned object is of type Google::Cloud::NetworkServices::V1beta1::LbTrafficExtension.
367
+ # p result
368
+ #
369
+ def get_lb_traffic_extension request, options = nil
370
+ raise ::ArgumentError, "request must be provided" if request.nil?
371
+
372
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1beta1::GetLbTrafficExtensionRequest
373
+
374
+ # Converts hash and nil to an options object
375
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
376
+
377
+ # Customize the options with defaults
378
+ call_metadata = @config.rpcs.get_lb_traffic_extension.metadata.to_h
379
+
380
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
381
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
382
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
383
+ gapic_version: ::Google::Cloud::NetworkServices::V1beta1::VERSION,
384
+ transports_version_send: [:rest]
385
+
386
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
387
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
388
+
389
+ options.apply_defaults timeout: @config.rpcs.get_lb_traffic_extension.timeout,
390
+ metadata: call_metadata,
391
+ retry_policy: @config.rpcs.get_lb_traffic_extension.retry_policy
392
+
393
+ options.apply_defaults timeout: @config.timeout,
394
+ metadata: @config.metadata,
395
+ retry_policy: @config.retry_policy
396
+
397
+ @dep_service_stub.get_lb_traffic_extension request, options do |result, operation|
398
+ yield result, operation if block_given?
399
+ end
400
+ rescue ::Gapic::Rest::Error => e
401
+ raise ::Google::Cloud::Error.from_error(e)
402
+ end
403
+
404
+ ##
405
+ # Creates a new `LbTrafficExtension` resource in a given project and
406
+ # location.
407
+ #
408
+ # @overload create_lb_traffic_extension(request, options = nil)
409
+ # Pass arguments to `create_lb_traffic_extension` via a request object, either of type
410
+ # {::Google::Cloud::NetworkServices::V1beta1::CreateLbTrafficExtensionRequest} or an equivalent Hash.
411
+ #
412
+ # @param request [::Google::Cloud::NetworkServices::V1beta1::CreateLbTrafficExtensionRequest, ::Hash]
413
+ # A request object representing the call parameters. Required. To specify no
414
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
415
+ # @param options [::Gapic::CallOptions, ::Hash]
416
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
417
+ #
418
+ # @overload create_lb_traffic_extension(parent: nil, lb_traffic_extension_id: nil, lb_traffic_extension: nil, request_id: nil)
419
+ # Pass arguments to `create_lb_traffic_extension` via keyword arguments. Note that at
420
+ # least one keyword argument is required. To specify no parameters, or to keep all
421
+ # the default parameter values, pass an empty Hash as a request object (see above).
422
+ #
423
+ # @param parent [::String]
424
+ # Required. The parent resource of the `LbTrafficExtension` resource. Must be
425
+ # in the format `projects/{project}/locations/{location}`.
426
+ # @param lb_traffic_extension_id [::String]
427
+ # Required. User-provided ID of the `LbTrafficExtension` resource to be
428
+ # created.
429
+ # @param lb_traffic_extension [::Google::Cloud::NetworkServices::V1beta1::LbTrafficExtension, ::Hash]
430
+ # Required. `LbTrafficExtension` resource to be created.
431
+ # @param request_id [::String]
432
+ # Optional. An optional request ID to identify requests. Specify a unique
433
+ # request ID so that if you must retry your request, the server can ignore
434
+ # the request if it has already been completed. The server guarantees
435
+ # that for at least 60 minutes since the first request.
436
+ #
437
+ # For example, consider a situation where you make an initial request and the
438
+ # request times out. If you make the request again with the same request
439
+ # ID, the server can check if original operation with the same request ID
440
+ # was received, and if so, ignores the second request. This prevents
441
+ # clients from accidentally creating duplicate commitments.
442
+ #
443
+ # The request ID must be a valid UUID with the exception that zero UUID is
444
+ # not supported (00000000-0000-0000-0000-000000000000).
445
+ # @yield [result, operation] Access the result along with the TransportOperation object
446
+ # @yieldparam result [::Gapic::Operation]
447
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
448
+ #
449
+ # @return [::Gapic::Operation]
450
+ #
451
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
452
+ #
453
+ # @example Basic example
454
+ # require "google/cloud/network_services/v1beta1"
455
+ #
456
+ # # Create a client object. The client can be reused for multiple calls.
457
+ # client = Google::Cloud::NetworkServices::V1beta1::DepService::Rest::Client.new
458
+ #
459
+ # # Create a request. To set request fields, pass in keyword arguments.
460
+ # request = Google::Cloud::NetworkServices::V1beta1::CreateLbTrafficExtensionRequest.new
461
+ #
462
+ # # Call the create_lb_traffic_extension method.
463
+ # result = client.create_lb_traffic_extension request
464
+ #
465
+ # # The returned object is of type Gapic::Operation. You can use it to
466
+ # # check the status of an operation, cancel it, or wait for results.
467
+ # # Here is how to wait for a response.
468
+ # result.wait_until_done! timeout: 60
469
+ # if result.response?
470
+ # p result.response
471
+ # else
472
+ # puts "No response received."
473
+ # end
474
+ #
475
+ def create_lb_traffic_extension request, options = nil
476
+ raise ::ArgumentError, "request must be provided" if request.nil?
477
+
478
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1beta1::CreateLbTrafficExtensionRequest
479
+
480
+ # Converts hash and nil to an options object
481
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
482
+
483
+ # Customize the options with defaults
484
+ call_metadata = @config.rpcs.create_lb_traffic_extension.metadata.to_h
485
+
486
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
487
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
488
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
489
+ gapic_version: ::Google::Cloud::NetworkServices::V1beta1::VERSION,
490
+ transports_version_send: [:rest]
491
+
492
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
493
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
494
+
495
+ options.apply_defaults timeout: @config.rpcs.create_lb_traffic_extension.timeout,
496
+ metadata: call_metadata,
497
+ retry_policy: @config.rpcs.create_lb_traffic_extension.retry_policy
498
+
499
+ options.apply_defaults timeout: @config.timeout,
500
+ metadata: @config.metadata,
501
+ retry_policy: @config.retry_policy
502
+
503
+ @dep_service_stub.create_lb_traffic_extension request, options do |result, operation|
504
+ result = ::Gapic::Operation.new result, @operations_client, options: options
505
+ yield result, operation if block_given?
506
+ throw :response, result
507
+ end
508
+ rescue ::Gapic::Rest::Error => e
509
+ raise ::Google::Cloud::Error.from_error(e)
510
+ end
511
+
512
+ ##
513
+ # Updates the parameters of the specified `LbTrafficExtension` resource.
514
+ #
515
+ # @overload update_lb_traffic_extension(request, options = nil)
516
+ # Pass arguments to `update_lb_traffic_extension` via a request object, either of type
517
+ # {::Google::Cloud::NetworkServices::V1beta1::UpdateLbTrafficExtensionRequest} or an equivalent Hash.
518
+ #
519
+ # @param request [::Google::Cloud::NetworkServices::V1beta1::UpdateLbTrafficExtensionRequest, ::Hash]
520
+ # A request object representing the call parameters. Required. To specify no
521
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
522
+ # @param options [::Gapic::CallOptions, ::Hash]
523
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
524
+ #
525
+ # @overload update_lb_traffic_extension(update_mask: nil, lb_traffic_extension: nil, request_id: nil)
526
+ # Pass arguments to `update_lb_traffic_extension` via keyword arguments. Note that at
527
+ # least one keyword argument is required. To specify no parameters, or to keep all
528
+ # the default parameter values, pass an empty Hash as a request object (see above).
529
+ #
530
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
531
+ # Required. Used to specify the fields to be overwritten in the
532
+ # `LbTrafficExtension` resource by the update.
533
+ # The fields specified in the update_mask are relative to the resource, not
534
+ # the full request. A field is overwritten if it is in the mask. If the
535
+ # user does not specify a mask, then all fields are overwritten.
536
+ # @param lb_traffic_extension [::Google::Cloud::NetworkServices::V1beta1::LbTrafficExtension, ::Hash]
537
+ # Required. `LbTrafficExtension` resource being updated.
538
+ # @param request_id [::String]
539
+ # Optional. An optional request ID to identify requests. Specify a unique
540
+ # request ID so that if you must retry your request, the server can ignore
541
+ # the request if it has already been completed. The server guarantees
542
+ # that for at least 60 minutes since the first request.
543
+ #
544
+ # For example, consider a situation where you make an initial request and the
545
+ # request times out. If you make the request again with the same request
546
+ # ID, the server can check if original operation with the same request ID
547
+ # was received, and if so, ignores the second request. This prevents
548
+ # clients from accidentally creating duplicate commitments.
549
+ #
550
+ # The request ID must be a valid UUID with the exception that zero UUID is
551
+ # not supported (00000000-0000-0000-0000-000000000000).
552
+ # @yield [result, operation] Access the result along with the TransportOperation object
553
+ # @yieldparam result [::Gapic::Operation]
554
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
555
+ #
556
+ # @return [::Gapic::Operation]
557
+ #
558
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
559
+ #
560
+ # @example Basic example
561
+ # require "google/cloud/network_services/v1beta1"
562
+ #
563
+ # # Create a client object. The client can be reused for multiple calls.
564
+ # client = Google::Cloud::NetworkServices::V1beta1::DepService::Rest::Client.new
565
+ #
566
+ # # Create a request. To set request fields, pass in keyword arguments.
567
+ # request = Google::Cloud::NetworkServices::V1beta1::UpdateLbTrafficExtensionRequest.new
568
+ #
569
+ # # Call the update_lb_traffic_extension method.
570
+ # result = client.update_lb_traffic_extension request
571
+ #
572
+ # # The returned object is of type Gapic::Operation. You can use it to
573
+ # # check the status of an operation, cancel it, or wait for results.
574
+ # # Here is how to wait for a response.
575
+ # result.wait_until_done! timeout: 60
576
+ # if result.response?
577
+ # p result.response
578
+ # else
579
+ # puts "No response received."
580
+ # end
581
+ #
582
+ def update_lb_traffic_extension request, options = nil
583
+ raise ::ArgumentError, "request must be provided" if request.nil?
584
+
585
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1beta1::UpdateLbTrafficExtensionRequest
586
+
587
+ # Converts hash and nil to an options object
588
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
589
+
590
+ # Customize the options with defaults
591
+ call_metadata = @config.rpcs.update_lb_traffic_extension.metadata.to_h
592
+
593
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
594
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
595
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
596
+ gapic_version: ::Google::Cloud::NetworkServices::V1beta1::VERSION,
597
+ transports_version_send: [:rest]
598
+
599
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
600
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
601
+
602
+ options.apply_defaults timeout: @config.rpcs.update_lb_traffic_extension.timeout,
603
+ metadata: call_metadata,
604
+ retry_policy: @config.rpcs.update_lb_traffic_extension.retry_policy
605
+
606
+ options.apply_defaults timeout: @config.timeout,
607
+ metadata: @config.metadata,
608
+ retry_policy: @config.retry_policy
609
+
610
+ @dep_service_stub.update_lb_traffic_extension request, options do |result, operation|
611
+ result = ::Gapic::Operation.new result, @operations_client, options: options
612
+ yield result, operation if block_given?
613
+ throw :response, result
614
+ end
615
+ rescue ::Gapic::Rest::Error => e
616
+ raise ::Google::Cloud::Error.from_error(e)
617
+ end
618
+
619
+ ##
620
+ # Deletes the specified `LbTrafficExtension` resource.
621
+ #
622
+ # @overload delete_lb_traffic_extension(request, options = nil)
623
+ # Pass arguments to `delete_lb_traffic_extension` via a request object, either of type
624
+ # {::Google::Cloud::NetworkServices::V1beta1::DeleteLbTrafficExtensionRequest} or an equivalent Hash.
625
+ #
626
+ # @param request [::Google::Cloud::NetworkServices::V1beta1::DeleteLbTrafficExtensionRequest, ::Hash]
627
+ # A request object representing the call parameters. Required. To specify no
628
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
629
+ # @param options [::Gapic::CallOptions, ::Hash]
630
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
631
+ #
632
+ # @overload delete_lb_traffic_extension(name: nil, request_id: nil)
633
+ # Pass arguments to `delete_lb_traffic_extension` via keyword arguments. Note that at
634
+ # least one keyword argument is required. To specify no parameters, or to keep all
635
+ # the default parameter values, pass an empty Hash as a request object (see above).
636
+ #
637
+ # @param name [::String]
638
+ # Required. The name of the `LbTrafficExtension` resource to delete. Must be
639
+ # in the format
640
+ # `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.
641
+ # @param request_id [::String]
642
+ # Optional. An optional request ID to identify requests. Specify a unique
643
+ # request ID so that if you must retry your request, the server can ignore
644
+ # the request if it has already been completed. The server guarantees
645
+ # that for at least 60 minutes after the first request.
646
+ #
647
+ # For example, consider a situation where you make an initial request and the
648
+ # request times out. If you make the request again with the same request
649
+ # ID, the server can check if original operation with the same request ID
650
+ # was received, and if so, ignores the second request. This prevents
651
+ # clients from accidentally creating duplicate commitments.
652
+ #
653
+ # The request ID must be a valid UUID with the exception that zero UUID is
654
+ # not supported (00000000-0000-0000-0000-000000000000).
655
+ # @yield [result, operation] Access the result along with the TransportOperation object
656
+ # @yieldparam result [::Gapic::Operation]
657
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
658
+ #
659
+ # @return [::Gapic::Operation]
660
+ #
661
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
662
+ #
663
+ # @example Basic example
664
+ # require "google/cloud/network_services/v1beta1"
665
+ #
666
+ # # Create a client object. The client can be reused for multiple calls.
667
+ # client = Google::Cloud::NetworkServices::V1beta1::DepService::Rest::Client.new
668
+ #
669
+ # # Create a request. To set request fields, pass in keyword arguments.
670
+ # request = Google::Cloud::NetworkServices::V1beta1::DeleteLbTrafficExtensionRequest.new
671
+ #
672
+ # # Call the delete_lb_traffic_extension method.
673
+ # result = client.delete_lb_traffic_extension request
674
+ #
675
+ # # The returned object is of type Gapic::Operation. You can use it to
676
+ # # check the status of an operation, cancel it, or wait for results.
677
+ # # Here is how to wait for a response.
678
+ # result.wait_until_done! timeout: 60
679
+ # if result.response?
680
+ # p result.response
681
+ # else
682
+ # puts "No response received."
683
+ # end
684
+ #
685
+ def delete_lb_traffic_extension request, options = nil
686
+ raise ::ArgumentError, "request must be provided" if request.nil?
687
+
688
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1beta1::DeleteLbTrafficExtensionRequest
689
+
690
+ # Converts hash and nil to an options object
691
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
692
+
693
+ # Customize the options with defaults
694
+ call_metadata = @config.rpcs.delete_lb_traffic_extension.metadata.to_h
695
+
696
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
697
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
698
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
699
+ gapic_version: ::Google::Cloud::NetworkServices::V1beta1::VERSION,
700
+ transports_version_send: [:rest]
701
+
702
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
703
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
704
+
705
+ options.apply_defaults timeout: @config.rpcs.delete_lb_traffic_extension.timeout,
706
+ metadata: call_metadata,
707
+ retry_policy: @config.rpcs.delete_lb_traffic_extension.retry_policy
708
+
709
+ options.apply_defaults timeout: @config.timeout,
710
+ metadata: @config.metadata,
711
+ retry_policy: @config.retry_policy
712
+
713
+ @dep_service_stub.delete_lb_traffic_extension request, options do |result, operation|
714
+ result = ::Gapic::Operation.new result, @operations_client, options: options
715
+ yield result, operation if block_given?
716
+ throw :response, result
717
+ end
718
+ rescue ::Gapic::Rest::Error => e
719
+ raise ::Google::Cloud::Error.from_error(e)
720
+ end
721
+
722
+ ##
723
+ # Lists `LbRouteExtension` resources in a given project and location.
724
+ #
725
+ # @overload list_lb_route_extensions(request, options = nil)
726
+ # Pass arguments to `list_lb_route_extensions` via a request object, either of type
727
+ # {::Google::Cloud::NetworkServices::V1beta1::ListLbRouteExtensionsRequest} or an equivalent Hash.
728
+ #
729
+ # @param request [::Google::Cloud::NetworkServices::V1beta1::ListLbRouteExtensionsRequest, ::Hash]
730
+ # A request object representing the call parameters. Required. To specify no
731
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
732
+ # @param options [::Gapic::CallOptions, ::Hash]
733
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
734
+ #
735
+ # @overload list_lb_route_extensions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
736
+ # Pass arguments to `list_lb_route_extensions` via keyword arguments. Note that at
737
+ # least one keyword argument is required. To specify no parameters, or to keep all
738
+ # the default parameter values, pass an empty Hash as a request object (see above).
739
+ #
740
+ # @param parent [::String]
741
+ # Required. The project and location from which the `LbRouteExtension`
742
+ # resources are listed, specified in the following format:
743
+ # `projects/{project}/locations/{location}`.
744
+ # @param page_size [::Integer]
745
+ # Optional. Requested page size. The server might return fewer items than
746
+ # requested. If unspecified, the server picks an appropriate default.
747
+ # @param page_token [::String]
748
+ # Optional. A token identifying a page of results that the server returns.
749
+ # @param filter [::String]
750
+ # Optional. Filtering results.
751
+ # @param order_by [::String]
752
+ # Optional. Hint for how to order the results.
753
+ # @yield [result, operation] Access the result along with the TransportOperation object
754
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1beta1::LbRouteExtension>]
755
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
756
+ #
757
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1beta1::LbRouteExtension>]
758
+ #
759
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
760
+ #
761
+ # @example Basic example
762
+ # require "google/cloud/network_services/v1beta1"
763
+ #
764
+ # # Create a client object. The client can be reused for multiple calls.
765
+ # client = Google::Cloud::NetworkServices::V1beta1::DepService::Rest::Client.new
766
+ #
767
+ # # Create a request. To set request fields, pass in keyword arguments.
768
+ # request = Google::Cloud::NetworkServices::V1beta1::ListLbRouteExtensionsRequest.new
769
+ #
770
+ # # Call the list_lb_route_extensions method.
771
+ # result = client.list_lb_route_extensions request
772
+ #
773
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
774
+ # # over elements, and API calls will be issued to fetch pages as needed.
775
+ # result.each do |item|
776
+ # # Each element is of type ::Google::Cloud::NetworkServices::V1beta1::LbRouteExtension.
777
+ # p item
778
+ # end
779
+ #
780
+ def list_lb_route_extensions request, options = nil
781
+ raise ::ArgumentError, "request must be provided" if request.nil?
782
+
783
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1beta1::ListLbRouteExtensionsRequest
784
+
785
+ # Converts hash and nil to an options object
786
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
787
+
788
+ # Customize the options with defaults
789
+ call_metadata = @config.rpcs.list_lb_route_extensions.metadata.to_h
790
+
791
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
792
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
793
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
794
+ gapic_version: ::Google::Cloud::NetworkServices::V1beta1::VERSION,
795
+ transports_version_send: [:rest]
796
+
797
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
798
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
799
+
800
+ options.apply_defaults timeout: @config.rpcs.list_lb_route_extensions.timeout,
801
+ metadata: call_metadata,
802
+ retry_policy: @config.rpcs.list_lb_route_extensions.retry_policy
803
+
804
+ options.apply_defaults timeout: @config.timeout,
805
+ metadata: @config.metadata,
806
+ retry_policy: @config.retry_policy
807
+
808
+ @dep_service_stub.list_lb_route_extensions request, options do |result, operation|
809
+ result = ::Gapic::Rest::PagedEnumerable.new @dep_service_stub, :list_lb_route_extensions, "lb_route_extensions", request, result, options
810
+ yield result, operation if block_given?
811
+ throw :response, result
812
+ end
813
+ rescue ::Gapic::Rest::Error => e
814
+ raise ::Google::Cloud::Error.from_error(e)
815
+ end
816
+
817
+ ##
818
+ # Gets details of the specified `LbRouteExtension` resource.
819
+ #
820
+ # @overload get_lb_route_extension(request, options = nil)
821
+ # Pass arguments to `get_lb_route_extension` via a request object, either of type
822
+ # {::Google::Cloud::NetworkServices::V1beta1::GetLbRouteExtensionRequest} or an equivalent Hash.
823
+ #
824
+ # @param request [::Google::Cloud::NetworkServices::V1beta1::GetLbRouteExtensionRequest, ::Hash]
825
+ # A request object representing the call parameters. Required. To specify no
826
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
827
+ # @param options [::Gapic::CallOptions, ::Hash]
828
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
829
+ #
830
+ # @overload get_lb_route_extension(name: nil)
831
+ # Pass arguments to `get_lb_route_extension` via keyword arguments. Note that at
832
+ # least one keyword argument is required. To specify no parameters, or to keep all
833
+ # the default parameter values, pass an empty Hash as a request object (see above).
834
+ #
835
+ # @param name [::String]
836
+ # Required. A name of the `LbRouteExtension` resource to get. Must be in the
837
+ # format
838
+ # `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.
839
+ # @yield [result, operation] Access the result along with the TransportOperation object
840
+ # @yieldparam result [::Google::Cloud::NetworkServices::V1beta1::LbRouteExtension]
841
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
842
+ #
843
+ # @return [::Google::Cloud::NetworkServices::V1beta1::LbRouteExtension]
844
+ #
845
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
846
+ #
847
+ # @example Basic example
848
+ # require "google/cloud/network_services/v1beta1"
849
+ #
850
+ # # Create a client object. The client can be reused for multiple calls.
851
+ # client = Google::Cloud::NetworkServices::V1beta1::DepService::Rest::Client.new
852
+ #
853
+ # # Create a request. To set request fields, pass in keyword arguments.
854
+ # request = Google::Cloud::NetworkServices::V1beta1::GetLbRouteExtensionRequest.new
855
+ #
856
+ # # Call the get_lb_route_extension method.
857
+ # result = client.get_lb_route_extension request
858
+ #
859
+ # # The returned object is of type Google::Cloud::NetworkServices::V1beta1::LbRouteExtension.
860
+ # p result
861
+ #
862
+ def get_lb_route_extension request, options = nil
863
+ raise ::ArgumentError, "request must be provided" if request.nil?
864
+
865
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1beta1::GetLbRouteExtensionRequest
866
+
867
+ # Converts hash and nil to an options object
868
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
869
+
870
+ # Customize the options with defaults
871
+ call_metadata = @config.rpcs.get_lb_route_extension.metadata.to_h
872
+
873
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
874
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
875
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
876
+ gapic_version: ::Google::Cloud::NetworkServices::V1beta1::VERSION,
877
+ transports_version_send: [:rest]
878
+
879
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
880
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
881
+
882
+ options.apply_defaults timeout: @config.rpcs.get_lb_route_extension.timeout,
883
+ metadata: call_metadata,
884
+ retry_policy: @config.rpcs.get_lb_route_extension.retry_policy
885
+
886
+ options.apply_defaults timeout: @config.timeout,
887
+ metadata: @config.metadata,
888
+ retry_policy: @config.retry_policy
889
+
890
+ @dep_service_stub.get_lb_route_extension request, options do |result, operation|
891
+ yield result, operation if block_given?
892
+ end
893
+ rescue ::Gapic::Rest::Error => e
894
+ raise ::Google::Cloud::Error.from_error(e)
895
+ end
896
+
897
+ ##
898
+ # Creates a new `LbRouteExtension` resource in a given project and location.
899
+ #
900
+ # @overload create_lb_route_extension(request, options = nil)
901
+ # Pass arguments to `create_lb_route_extension` via a request object, either of type
902
+ # {::Google::Cloud::NetworkServices::V1beta1::CreateLbRouteExtensionRequest} or an equivalent Hash.
903
+ #
904
+ # @param request [::Google::Cloud::NetworkServices::V1beta1::CreateLbRouteExtensionRequest, ::Hash]
905
+ # A request object representing the call parameters. Required. To specify no
906
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
907
+ # @param options [::Gapic::CallOptions, ::Hash]
908
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
909
+ #
910
+ # @overload create_lb_route_extension(parent: nil, lb_route_extension_id: nil, lb_route_extension: nil, request_id: nil)
911
+ # Pass arguments to `create_lb_route_extension` via keyword arguments. Note that at
912
+ # least one keyword argument is required. To specify no parameters, or to keep all
913
+ # the default parameter values, pass an empty Hash as a request object (see above).
914
+ #
915
+ # @param parent [::String]
916
+ # Required. The parent resource of the `LbRouteExtension` resource. Must be
917
+ # in the format `projects/{project}/locations/{location}`.
918
+ # @param lb_route_extension_id [::String]
919
+ # Required. User-provided ID of the `LbRouteExtension` resource to be
920
+ # created.
921
+ # @param lb_route_extension [::Google::Cloud::NetworkServices::V1beta1::LbRouteExtension, ::Hash]
922
+ # Required. `LbRouteExtension` resource to be created.
923
+ # @param request_id [::String]
924
+ # Optional. An optional request ID to identify requests. Specify a unique
925
+ # request ID so that if you must retry your request, the server can ignore
926
+ # the request if it has already been completed. The server guarantees
927
+ # that for at least 60 minutes since the first request.
928
+ #
929
+ # For example, consider a situation where you make an initial request and the
930
+ # request times out. If you make the request again with the same request
931
+ # ID, the server can check if original operation with the same request ID
932
+ # was received, and if so, ignores the second request. This prevents
933
+ # clients from accidentally creating duplicate commitments.
934
+ #
935
+ # The request ID must be a valid UUID with the exception that zero UUID is
936
+ # not supported (00000000-0000-0000-0000-000000000000).
937
+ # @yield [result, operation] Access the result along with the TransportOperation object
938
+ # @yieldparam result [::Gapic::Operation]
939
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
940
+ #
941
+ # @return [::Gapic::Operation]
942
+ #
943
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
944
+ #
945
+ # @example Basic example
946
+ # require "google/cloud/network_services/v1beta1"
947
+ #
948
+ # # Create a client object. The client can be reused for multiple calls.
949
+ # client = Google::Cloud::NetworkServices::V1beta1::DepService::Rest::Client.new
950
+ #
951
+ # # Create a request. To set request fields, pass in keyword arguments.
952
+ # request = Google::Cloud::NetworkServices::V1beta1::CreateLbRouteExtensionRequest.new
953
+ #
954
+ # # Call the create_lb_route_extension method.
955
+ # result = client.create_lb_route_extension request
956
+ #
957
+ # # The returned object is of type Gapic::Operation. You can use it to
958
+ # # check the status of an operation, cancel it, or wait for results.
959
+ # # Here is how to wait for a response.
960
+ # result.wait_until_done! timeout: 60
961
+ # if result.response?
962
+ # p result.response
963
+ # else
964
+ # puts "No response received."
965
+ # end
966
+ #
967
+ def create_lb_route_extension request, options = nil
968
+ raise ::ArgumentError, "request must be provided" if request.nil?
969
+
970
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1beta1::CreateLbRouteExtensionRequest
971
+
972
+ # Converts hash and nil to an options object
973
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
974
+
975
+ # Customize the options with defaults
976
+ call_metadata = @config.rpcs.create_lb_route_extension.metadata.to_h
977
+
978
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
979
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
980
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
981
+ gapic_version: ::Google::Cloud::NetworkServices::V1beta1::VERSION,
982
+ transports_version_send: [:rest]
983
+
984
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
985
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
986
+
987
+ options.apply_defaults timeout: @config.rpcs.create_lb_route_extension.timeout,
988
+ metadata: call_metadata,
989
+ retry_policy: @config.rpcs.create_lb_route_extension.retry_policy
990
+
991
+ options.apply_defaults timeout: @config.timeout,
992
+ metadata: @config.metadata,
993
+ retry_policy: @config.retry_policy
994
+
995
+ @dep_service_stub.create_lb_route_extension request, options do |result, operation|
996
+ result = ::Gapic::Operation.new result, @operations_client, options: options
997
+ yield result, operation if block_given?
998
+ throw :response, result
999
+ end
1000
+ rescue ::Gapic::Rest::Error => e
1001
+ raise ::Google::Cloud::Error.from_error(e)
1002
+ end
1003
+
1004
+ ##
1005
+ # Updates the parameters of the specified `LbRouteExtension` resource.
1006
+ #
1007
+ # @overload update_lb_route_extension(request, options = nil)
1008
+ # Pass arguments to `update_lb_route_extension` via a request object, either of type
1009
+ # {::Google::Cloud::NetworkServices::V1beta1::UpdateLbRouteExtensionRequest} or an equivalent Hash.
1010
+ #
1011
+ # @param request [::Google::Cloud::NetworkServices::V1beta1::UpdateLbRouteExtensionRequest, ::Hash]
1012
+ # A request object representing the call parameters. Required. To specify no
1013
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1014
+ # @param options [::Gapic::CallOptions, ::Hash]
1015
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1016
+ #
1017
+ # @overload update_lb_route_extension(update_mask: nil, lb_route_extension: nil, request_id: nil)
1018
+ # Pass arguments to `update_lb_route_extension` via keyword arguments. Note that at
1019
+ # least one keyword argument is required. To specify no parameters, or to keep all
1020
+ # the default parameter values, pass an empty Hash as a request object (see above).
1021
+ #
1022
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1023
+ # Required. Used to specify the fields to be overwritten in the
1024
+ # `LbRouteExtension` resource by the update.
1025
+ # The fields specified in the update_mask are relative to the resource, not
1026
+ # the full request. A field is overwritten if it is in the mask. If the
1027
+ # user does not specify a mask, then all fields are overwritten.
1028
+ # @param lb_route_extension [::Google::Cloud::NetworkServices::V1beta1::LbRouteExtension, ::Hash]
1029
+ # Required. `LbRouteExtension` resource being updated.
1030
+ # @param request_id [::String]
1031
+ # Optional. An optional request ID to identify requests. Specify a unique
1032
+ # request ID so that if you must retry your request, the server can ignore
1033
+ # the request if it has already been completed. The server guarantees
1034
+ # that for at least 60 minutes since the first request.
1035
+ #
1036
+ # For example, consider a situation where you make an initial request and the
1037
+ # request times out. If you make the request again with the same request
1038
+ # ID, the server can check if original operation with the same request ID
1039
+ # was received, and if so, ignores the second request. This prevents
1040
+ # clients from accidentally creating duplicate commitments.
1041
+ #
1042
+ # The request ID must be a valid UUID with the exception that zero UUID is
1043
+ # not supported (00000000-0000-0000-0000-000000000000).
1044
+ # @yield [result, operation] Access the result along with the TransportOperation object
1045
+ # @yieldparam result [::Gapic::Operation]
1046
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1047
+ #
1048
+ # @return [::Gapic::Operation]
1049
+ #
1050
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1051
+ #
1052
+ # @example Basic example
1053
+ # require "google/cloud/network_services/v1beta1"
1054
+ #
1055
+ # # Create a client object. The client can be reused for multiple calls.
1056
+ # client = Google::Cloud::NetworkServices::V1beta1::DepService::Rest::Client.new
1057
+ #
1058
+ # # Create a request. To set request fields, pass in keyword arguments.
1059
+ # request = Google::Cloud::NetworkServices::V1beta1::UpdateLbRouteExtensionRequest.new
1060
+ #
1061
+ # # Call the update_lb_route_extension method.
1062
+ # result = client.update_lb_route_extension request
1063
+ #
1064
+ # # The returned object is of type Gapic::Operation. You can use it to
1065
+ # # check the status of an operation, cancel it, or wait for results.
1066
+ # # Here is how to wait for a response.
1067
+ # result.wait_until_done! timeout: 60
1068
+ # if result.response?
1069
+ # p result.response
1070
+ # else
1071
+ # puts "No response received."
1072
+ # end
1073
+ #
1074
+ def update_lb_route_extension request, options = nil
1075
+ raise ::ArgumentError, "request must be provided" if request.nil?
1076
+
1077
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1beta1::UpdateLbRouteExtensionRequest
1078
+
1079
+ # Converts hash and nil to an options object
1080
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1081
+
1082
+ # Customize the options with defaults
1083
+ call_metadata = @config.rpcs.update_lb_route_extension.metadata.to_h
1084
+
1085
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1086
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1087
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1088
+ gapic_version: ::Google::Cloud::NetworkServices::V1beta1::VERSION,
1089
+ transports_version_send: [:rest]
1090
+
1091
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1092
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1093
+
1094
+ options.apply_defaults timeout: @config.rpcs.update_lb_route_extension.timeout,
1095
+ metadata: call_metadata,
1096
+ retry_policy: @config.rpcs.update_lb_route_extension.retry_policy
1097
+
1098
+ options.apply_defaults timeout: @config.timeout,
1099
+ metadata: @config.metadata,
1100
+ retry_policy: @config.retry_policy
1101
+
1102
+ @dep_service_stub.update_lb_route_extension request, options do |result, operation|
1103
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1104
+ yield result, operation if block_given?
1105
+ throw :response, result
1106
+ end
1107
+ rescue ::Gapic::Rest::Error => e
1108
+ raise ::Google::Cloud::Error.from_error(e)
1109
+ end
1110
+
1111
+ ##
1112
+ # Deletes the specified `LbRouteExtension` resource.
1113
+ #
1114
+ # @overload delete_lb_route_extension(request, options = nil)
1115
+ # Pass arguments to `delete_lb_route_extension` via a request object, either of type
1116
+ # {::Google::Cloud::NetworkServices::V1beta1::DeleteLbRouteExtensionRequest} or an equivalent Hash.
1117
+ #
1118
+ # @param request [::Google::Cloud::NetworkServices::V1beta1::DeleteLbRouteExtensionRequest, ::Hash]
1119
+ # A request object representing the call parameters. Required. To specify no
1120
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1121
+ # @param options [::Gapic::CallOptions, ::Hash]
1122
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1123
+ #
1124
+ # @overload delete_lb_route_extension(name: nil, request_id: nil)
1125
+ # Pass arguments to `delete_lb_route_extension` via keyword arguments. Note that at
1126
+ # least one keyword argument is required. To specify no parameters, or to keep all
1127
+ # the default parameter values, pass an empty Hash as a request object (see above).
1128
+ #
1129
+ # @param name [::String]
1130
+ # Required. The name of the `LbRouteExtension` resource to delete. Must be in
1131
+ # the format
1132
+ # `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.
1133
+ # @param request_id [::String]
1134
+ # Optional. An optional request ID to identify requests. Specify a unique
1135
+ # request ID so that if you must retry your request, the server can ignore
1136
+ # the request if it has already been completed. The server guarantees
1137
+ # that for at least 60 minutes after the first request.
1138
+ #
1139
+ # For example, consider a situation where you make an initial request and the
1140
+ # request times out. If you make the request again with the same request
1141
+ # ID, the server can check if original operation with the same request ID
1142
+ # was received, and if so, ignores the second request. This prevents
1143
+ # clients from accidentally creating duplicate commitments.
1144
+ #
1145
+ # The request ID must be a valid UUID with the exception that zero UUID is
1146
+ # not supported (00000000-0000-0000-0000-000000000000).
1147
+ # @yield [result, operation] Access the result along with the TransportOperation object
1148
+ # @yieldparam result [::Gapic::Operation]
1149
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1150
+ #
1151
+ # @return [::Gapic::Operation]
1152
+ #
1153
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1154
+ #
1155
+ # @example Basic example
1156
+ # require "google/cloud/network_services/v1beta1"
1157
+ #
1158
+ # # Create a client object. The client can be reused for multiple calls.
1159
+ # client = Google::Cloud::NetworkServices::V1beta1::DepService::Rest::Client.new
1160
+ #
1161
+ # # Create a request. To set request fields, pass in keyword arguments.
1162
+ # request = Google::Cloud::NetworkServices::V1beta1::DeleteLbRouteExtensionRequest.new
1163
+ #
1164
+ # # Call the delete_lb_route_extension method.
1165
+ # result = client.delete_lb_route_extension request
1166
+ #
1167
+ # # The returned object is of type Gapic::Operation. You can use it to
1168
+ # # check the status of an operation, cancel it, or wait for results.
1169
+ # # Here is how to wait for a response.
1170
+ # result.wait_until_done! timeout: 60
1171
+ # if result.response?
1172
+ # p result.response
1173
+ # else
1174
+ # puts "No response received."
1175
+ # end
1176
+ #
1177
+ def delete_lb_route_extension request, options = nil
1178
+ raise ::ArgumentError, "request must be provided" if request.nil?
1179
+
1180
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1beta1::DeleteLbRouteExtensionRequest
1181
+
1182
+ # Converts hash and nil to an options object
1183
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1184
+
1185
+ # Customize the options with defaults
1186
+ call_metadata = @config.rpcs.delete_lb_route_extension.metadata.to_h
1187
+
1188
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1189
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1190
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1191
+ gapic_version: ::Google::Cloud::NetworkServices::V1beta1::VERSION,
1192
+ transports_version_send: [:rest]
1193
+
1194
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1195
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1196
+
1197
+ options.apply_defaults timeout: @config.rpcs.delete_lb_route_extension.timeout,
1198
+ metadata: call_metadata,
1199
+ retry_policy: @config.rpcs.delete_lb_route_extension.retry_policy
1200
+
1201
+ options.apply_defaults timeout: @config.timeout,
1202
+ metadata: @config.metadata,
1203
+ retry_policy: @config.retry_policy
1204
+
1205
+ @dep_service_stub.delete_lb_route_extension request, options do |result, operation|
1206
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1207
+ yield result, operation if block_given?
1208
+ throw :response, result
1209
+ end
1210
+ rescue ::Gapic::Rest::Error => e
1211
+ raise ::Google::Cloud::Error.from_error(e)
1212
+ end
1213
+
1214
+ ##
1215
+ # Lists `ExtensionBinding` resources in a given project and location.
1216
+ #
1217
+ # @overload list_extension_bindings(request, options = nil)
1218
+ # Pass arguments to `list_extension_bindings` via a request object, either of type
1219
+ # {::Google::Cloud::NetworkServices::V1beta1::ListExtensionBindingsRequest} or an equivalent Hash.
1220
+ #
1221
+ # @param request [::Google::Cloud::NetworkServices::V1beta1::ListExtensionBindingsRequest, ::Hash]
1222
+ # A request object representing the call parameters. Required. To specify no
1223
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1224
+ # @param options [::Gapic::CallOptions, ::Hash]
1225
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1226
+ #
1227
+ # @overload list_extension_bindings(parent: nil, page_size: nil, page_token: nil)
1228
+ # Pass arguments to `list_extension_bindings` via keyword arguments. Note that at
1229
+ # least one keyword argument is required. To specify no parameters, or to keep all
1230
+ # the default parameter values, pass an empty Hash as a request object (see above).
1231
+ #
1232
+ # @param parent [::String]
1233
+ # Required. The project and location from which the `ExtensionBinding`
1234
+ # resources should be listed, specified in the format
1235
+ # `projects/{project}/locations/{location}`.
1236
+ # @param page_size [::Integer]
1237
+ # Optional. Maximum number of `ExtensionBinding` resources to return per
1238
+ # call.
1239
+ # @param page_token [::String]
1240
+ # Optional. The value returned by the last `ListExtensionBindingsResponse`
1241
+ # Indicates that this is a continuation of a prior `ListExtensionBindings`
1242
+ # call, and that the system should return the next page of data.
1243
+ # @yield [result, operation] Access the result along with the TransportOperation object
1244
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1beta1::ExtensionBinding>]
1245
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1246
+ #
1247
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1beta1::ExtensionBinding>]
1248
+ #
1249
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1250
+ #
1251
+ # @example Basic example
1252
+ # require "google/cloud/network_services/v1beta1"
1253
+ #
1254
+ # # Create a client object. The client can be reused for multiple calls.
1255
+ # client = Google::Cloud::NetworkServices::V1beta1::DepService::Rest::Client.new
1256
+ #
1257
+ # # Create a request. To set request fields, pass in keyword arguments.
1258
+ # request = Google::Cloud::NetworkServices::V1beta1::ListExtensionBindingsRequest.new
1259
+ #
1260
+ # # Call the list_extension_bindings method.
1261
+ # result = client.list_extension_bindings request
1262
+ #
1263
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1264
+ # # over elements, and API calls will be issued to fetch pages as needed.
1265
+ # result.each do |item|
1266
+ # # Each element is of type ::Google::Cloud::NetworkServices::V1beta1::ExtensionBinding.
1267
+ # p item
1268
+ # end
1269
+ #
1270
+ def list_extension_bindings request, options = nil
1271
+ raise ::ArgumentError, "request must be provided" if request.nil?
1272
+
1273
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1beta1::ListExtensionBindingsRequest
1274
+
1275
+ # Converts hash and nil to an options object
1276
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1277
+
1278
+ # Customize the options with defaults
1279
+ call_metadata = @config.rpcs.list_extension_bindings.metadata.to_h
1280
+
1281
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1282
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1283
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1284
+ gapic_version: ::Google::Cloud::NetworkServices::V1beta1::VERSION,
1285
+ transports_version_send: [:rest]
1286
+
1287
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1288
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1289
+
1290
+ options.apply_defaults timeout: @config.rpcs.list_extension_bindings.timeout,
1291
+ metadata: call_metadata,
1292
+ retry_policy: @config.rpcs.list_extension_bindings.retry_policy
1293
+
1294
+ options.apply_defaults timeout: @config.timeout,
1295
+ metadata: @config.metadata,
1296
+ retry_policy: @config.retry_policy
1297
+
1298
+ @dep_service_stub.list_extension_bindings request, options do |result, operation|
1299
+ result = ::Gapic::Rest::PagedEnumerable.new @dep_service_stub, :list_extension_bindings, "extension_bindings", request, result, options
1300
+ yield result, operation if block_given?
1301
+ throw :response, result
1302
+ end
1303
+ rescue ::Gapic::Rest::Error => e
1304
+ raise ::Google::Cloud::Error.from_error(e)
1305
+ end
1306
+
1307
+ ##
1308
+ # Gets details of the specified `ExtensionBinding` resource.
1309
+ #
1310
+ # @overload get_extension_binding(request, options = nil)
1311
+ # Pass arguments to `get_extension_binding` via a request object, either of type
1312
+ # {::Google::Cloud::NetworkServices::V1beta1::GetExtensionBindingRequest} or an equivalent Hash.
1313
+ #
1314
+ # @param request [::Google::Cloud::NetworkServices::V1beta1::GetExtensionBindingRequest, ::Hash]
1315
+ # A request object representing the call parameters. Required. To specify no
1316
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1317
+ # @param options [::Gapic::CallOptions, ::Hash]
1318
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1319
+ #
1320
+ # @overload get_extension_binding(name: nil)
1321
+ # Pass arguments to `get_extension_binding` via keyword arguments. Note that at
1322
+ # least one keyword argument is required. To specify no parameters, or to keep all
1323
+ # the default parameter values, pass an empty Hash as a request object (see above).
1324
+ #
1325
+ # @param name [::String]
1326
+ # Required. A name of the `ExtensionBinding` resource to get. Must be in the
1327
+ # format
1328
+ # `projects/{project}/locations/{location}/extensionBindings/{extension_binding}`.
1329
+ # @yield [result, operation] Access the result along with the TransportOperation object
1330
+ # @yieldparam result [::Google::Cloud::NetworkServices::V1beta1::ExtensionBinding]
1331
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1332
+ #
1333
+ # @return [::Google::Cloud::NetworkServices::V1beta1::ExtensionBinding]
1334
+ #
1335
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1336
+ #
1337
+ # @example Basic example
1338
+ # require "google/cloud/network_services/v1beta1"
1339
+ #
1340
+ # # Create a client object. The client can be reused for multiple calls.
1341
+ # client = Google::Cloud::NetworkServices::V1beta1::DepService::Rest::Client.new
1342
+ #
1343
+ # # Create a request. To set request fields, pass in keyword arguments.
1344
+ # request = Google::Cloud::NetworkServices::V1beta1::GetExtensionBindingRequest.new
1345
+ #
1346
+ # # Call the get_extension_binding method.
1347
+ # result = client.get_extension_binding request
1348
+ #
1349
+ # # The returned object is of type Google::Cloud::NetworkServices::V1beta1::ExtensionBinding.
1350
+ # p result
1351
+ #
1352
+ def get_extension_binding request, options = nil
1353
+ raise ::ArgumentError, "request must be provided" if request.nil?
1354
+
1355
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1beta1::GetExtensionBindingRequest
1356
+
1357
+ # Converts hash and nil to an options object
1358
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1359
+
1360
+ # Customize the options with defaults
1361
+ call_metadata = @config.rpcs.get_extension_binding.metadata.to_h
1362
+
1363
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1364
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1365
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1366
+ gapic_version: ::Google::Cloud::NetworkServices::V1beta1::VERSION,
1367
+ transports_version_send: [:rest]
1368
+
1369
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1370
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1371
+
1372
+ options.apply_defaults timeout: @config.rpcs.get_extension_binding.timeout,
1373
+ metadata: call_metadata,
1374
+ retry_policy: @config.rpcs.get_extension_binding.retry_policy
1375
+
1376
+ options.apply_defaults timeout: @config.timeout,
1377
+ metadata: @config.metadata,
1378
+ retry_policy: @config.retry_policy
1379
+
1380
+ @dep_service_stub.get_extension_binding request, options do |result, operation|
1381
+ yield result, operation if block_given?
1382
+ end
1383
+ rescue ::Gapic::Rest::Error => e
1384
+ raise ::Google::Cloud::Error.from_error(e)
1385
+ end
1386
+
1387
+ ##
1388
+ # Creates a new `ExtensionBinding` resource in a given project and location.
1389
+ #
1390
+ # @overload create_extension_binding(request, options = nil)
1391
+ # Pass arguments to `create_extension_binding` via a request object, either of type
1392
+ # {::Google::Cloud::NetworkServices::V1beta1::CreateExtensionBindingRequest} or an equivalent Hash.
1393
+ #
1394
+ # @param request [::Google::Cloud::NetworkServices::V1beta1::CreateExtensionBindingRequest, ::Hash]
1395
+ # A request object representing the call parameters. Required. To specify no
1396
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1397
+ # @param options [::Gapic::CallOptions, ::Hash]
1398
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1399
+ #
1400
+ # @overload create_extension_binding(parent: nil, extension_binding_id: nil, extension_binding: nil)
1401
+ # Pass arguments to `create_extension_binding` via keyword arguments. Note that at
1402
+ # least one keyword argument is required. To specify no parameters, or to keep all
1403
+ # the default parameter values, pass an empty Hash as a request object (see above).
1404
+ #
1405
+ # @param parent [::String]
1406
+ # Required. The parent resource of the `ExtensionBinding` resource. Must be
1407
+ # in the format `projects/{project}/locations/{location}`.
1408
+ # @param extension_binding_id [::String]
1409
+ # Required. Short name of the `ExtensionBinding` resource to be created.
1410
+ # @param extension_binding [::Google::Cloud::NetworkServices::V1beta1::ExtensionBinding, ::Hash]
1411
+ # Required. `ExtensionBinding` resource to be created.
1412
+ # @yield [result, operation] Access the result along with the TransportOperation object
1413
+ # @yieldparam result [::Gapic::Operation]
1414
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1415
+ #
1416
+ # @return [::Gapic::Operation]
1417
+ #
1418
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1419
+ #
1420
+ # @example Basic example
1421
+ # require "google/cloud/network_services/v1beta1"
1422
+ #
1423
+ # # Create a client object. The client can be reused for multiple calls.
1424
+ # client = Google::Cloud::NetworkServices::V1beta1::DepService::Rest::Client.new
1425
+ #
1426
+ # # Create a request. To set request fields, pass in keyword arguments.
1427
+ # request = Google::Cloud::NetworkServices::V1beta1::CreateExtensionBindingRequest.new
1428
+ #
1429
+ # # Call the create_extension_binding method.
1430
+ # result = client.create_extension_binding request
1431
+ #
1432
+ # # The returned object is of type Gapic::Operation. You can use it to
1433
+ # # check the status of an operation, cancel it, or wait for results.
1434
+ # # Here is how to wait for a response.
1435
+ # result.wait_until_done! timeout: 60
1436
+ # if result.response?
1437
+ # p result.response
1438
+ # else
1439
+ # puts "No response received."
1440
+ # end
1441
+ #
1442
+ def create_extension_binding request, options = nil
1443
+ raise ::ArgumentError, "request must be provided" if request.nil?
1444
+
1445
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1beta1::CreateExtensionBindingRequest
1446
+
1447
+ # Converts hash and nil to an options object
1448
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1449
+
1450
+ # Customize the options with defaults
1451
+ call_metadata = @config.rpcs.create_extension_binding.metadata.to_h
1452
+
1453
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1454
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1455
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1456
+ gapic_version: ::Google::Cloud::NetworkServices::V1beta1::VERSION,
1457
+ transports_version_send: [:rest]
1458
+
1459
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1460
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1461
+
1462
+ options.apply_defaults timeout: @config.rpcs.create_extension_binding.timeout,
1463
+ metadata: call_metadata,
1464
+ retry_policy: @config.rpcs.create_extension_binding.retry_policy
1465
+
1466
+ options.apply_defaults timeout: @config.timeout,
1467
+ metadata: @config.metadata,
1468
+ retry_policy: @config.retry_policy
1469
+
1470
+ @dep_service_stub.create_extension_binding request, options do |result, operation|
1471
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1472
+ yield result, operation if block_given?
1473
+ throw :response, result
1474
+ end
1475
+ rescue ::Gapic::Rest::Error => e
1476
+ raise ::Google::Cloud::Error.from_error(e)
1477
+ end
1478
+
1479
+ ##
1480
+ # Updates the parameters of the specified `ExtensionBinding` resource.
1481
+ #
1482
+ # @overload update_extension_binding(request, options = nil)
1483
+ # Pass arguments to `update_extension_binding` via a request object, either of type
1484
+ # {::Google::Cloud::NetworkServices::V1beta1::UpdateExtensionBindingRequest} or an equivalent Hash.
1485
+ #
1486
+ # @param request [::Google::Cloud::NetworkServices::V1beta1::UpdateExtensionBindingRequest, ::Hash]
1487
+ # A request object representing the call parameters. Required. To specify no
1488
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1489
+ # @param options [::Gapic::CallOptions, ::Hash]
1490
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1491
+ #
1492
+ # @overload update_extension_binding(update_mask: nil, extension_binding: nil)
1493
+ # Pass arguments to `update_extension_binding` via keyword arguments. Note that at
1494
+ # least one keyword argument is required. To specify no parameters, or to keep all
1495
+ # the default parameter values, pass an empty Hash as a request object (see above).
1496
+ #
1497
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1498
+ # Optional. Field mask is used to specify the fields to be overwritten in the
1499
+ # `ExtensionBinding` resource by the update.
1500
+ # The fields specified in the update_mask are relative to the resource, not
1501
+ # the full request. A field will be overwritten if it is in the mask. If the
1502
+ # user does not provide a mask then all fields will be overwritten.
1503
+ # @param extension_binding [::Google::Cloud::NetworkServices::V1beta1::ExtensionBinding, ::Hash]
1504
+ # Required. Updated `ExtensionBinding` resource.
1505
+ # @yield [result, operation] Access the result along with the TransportOperation object
1506
+ # @yieldparam result [::Gapic::Operation]
1507
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1508
+ #
1509
+ # @return [::Gapic::Operation]
1510
+ #
1511
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1512
+ #
1513
+ # @example Basic example
1514
+ # require "google/cloud/network_services/v1beta1"
1515
+ #
1516
+ # # Create a client object. The client can be reused for multiple calls.
1517
+ # client = Google::Cloud::NetworkServices::V1beta1::DepService::Rest::Client.new
1518
+ #
1519
+ # # Create a request. To set request fields, pass in keyword arguments.
1520
+ # request = Google::Cloud::NetworkServices::V1beta1::UpdateExtensionBindingRequest.new
1521
+ #
1522
+ # # Call the update_extension_binding method.
1523
+ # result = client.update_extension_binding request
1524
+ #
1525
+ # # The returned object is of type Gapic::Operation. You can use it to
1526
+ # # check the status of an operation, cancel it, or wait for results.
1527
+ # # Here is how to wait for a response.
1528
+ # result.wait_until_done! timeout: 60
1529
+ # if result.response?
1530
+ # p result.response
1531
+ # else
1532
+ # puts "No response received."
1533
+ # end
1534
+ #
1535
+ def update_extension_binding request, options = nil
1536
+ raise ::ArgumentError, "request must be provided" if request.nil?
1537
+
1538
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1beta1::UpdateExtensionBindingRequest
1539
+
1540
+ # Converts hash and nil to an options object
1541
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1542
+
1543
+ # Customize the options with defaults
1544
+ call_metadata = @config.rpcs.update_extension_binding.metadata.to_h
1545
+
1546
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1547
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1548
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1549
+ gapic_version: ::Google::Cloud::NetworkServices::V1beta1::VERSION,
1550
+ transports_version_send: [:rest]
1551
+
1552
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1553
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1554
+
1555
+ options.apply_defaults timeout: @config.rpcs.update_extension_binding.timeout,
1556
+ metadata: call_metadata,
1557
+ retry_policy: @config.rpcs.update_extension_binding.retry_policy
1558
+
1559
+ options.apply_defaults timeout: @config.timeout,
1560
+ metadata: @config.metadata,
1561
+ retry_policy: @config.retry_policy
1562
+
1563
+ @dep_service_stub.update_extension_binding request, options do |result, operation|
1564
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1565
+ yield result, operation if block_given?
1566
+ throw :response, result
1567
+ end
1568
+ rescue ::Gapic::Rest::Error => e
1569
+ raise ::Google::Cloud::Error.from_error(e)
1570
+ end
1571
+
1572
+ ##
1573
+ # Deletes the specified `ExtensionBinding` resource.
1574
+ #
1575
+ # @overload delete_extension_binding(request, options = nil)
1576
+ # Pass arguments to `delete_extension_binding` via a request object, either of type
1577
+ # {::Google::Cloud::NetworkServices::V1beta1::DeleteExtensionBindingRequest} or an equivalent Hash.
1578
+ #
1579
+ # @param request [::Google::Cloud::NetworkServices::V1beta1::DeleteExtensionBindingRequest, ::Hash]
1580
+ # A request object representing the call parameters. Required. To specify no
1581
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1582
+ # @param options [::Gapic::CallOptions, ::Hash]
1583
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1584
+ #
1585
+ # @overload delete_extension_binding(name: nil, etag: nil)
1586
+ # Pass arguments to `delete_extension_binding` via keyword arguments. Note that at
1587
+ # least one keyword argument is required. To specify no parameters, or to keep all
1588
+ # the default parameter values, pass an empty Hash as a request object (see above).
1589
+ #
1590
+ # @param name [::String]
1591
+ # Required. A name of the `ExtensionBinding` resource to delete. Must be in
1592
+ # the format
1593
+ # `projects/{project}/locations/{location}/extensionBindings/{extension_binding}`.
1594
+ # @param etag [::String]
1595
+ # Optional. The etag of the ExtensionBinding to delete.
1596
+ # @yield [result, operation] Access the result along with the TransportOperation object
1597
+ # @yieldparam result [::Gapic::Operation]
1598
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1599
+ #
1600
+ # @return [::Gapic::Operation]
1601
+ #
1602
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1603
+ #
1604
+ # @example Basic example
1605
+ # require "google/cloud/network_services/v1beta1"
1606
+ #
1607
+ # # Create a client object. The client can be reused for multiple calls.
1608
+ # client = Google::Cloud::NetworkServices::V1beta1::DepService::Rest::Client.new
1609
+ #
1610
+ # # Create a request. To set request fields, pass in keyword arguments.
1611
+ # request = Google::Cloud::NetworkServices::V1beta1::DeleteExtensionBindingRequest.new
1612
+ #
1613
+ # # Call the delete_extension_binding method.
1614
+ # result = client.delete_extension_binding request
1615
+ #
1616
+ # # The returned object is of type Gapic::Operation. You can use it to
1617
+ # # check the status of an operation, cancel it, or wait for results.
1618
+ # # Here is how to wait for a response.
1619
+ # result.wait_until_done! timeout: 60
1620
+ # if result.response?
1621
+ # p result.response
1622
+ # else
1623
+ # puts "No response received."
1624
+ # end
1625
+ #
1626
+ def delete_extension_binding request, options = nil
1627
+ raise ::ArgumentError, "request must be provided" if request.nil?
1628
+
1629
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1beta1::DeleteExtensionBindingRequest
1630
+
1631
+ # Converts hash and nil to an options object
1632
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1633
+
1634
+ # Customize the options with defaults
1635
+ call_metadata = @config.rpcs.delete_extension_binding.metadata.to_h
1636
+
1637
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1638
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1639
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1640
+ gapic_version: ::Google::Cloud::NetworkServices::V1beta1::VERSION,
1641
+ transports_version_send: [:rest]
1642
+
1643
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1644
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1645
+
1646
+ options.apply_defaults timeout: @config.rpcs.delete_extension_binding.timeout,
1647
+ metadata: call_metadata,
1648
+ retry_policy: @config.rpcs.delete_extension_binding.retry_policy
1649
+
1650
+ options.apply_defaults timeout: @config.timeout,
1651
+ metadata: @config.metadata,
1652
+ retry_policy: @config.retry_policy
1653
+
1654
+ @dep_service_stub.delete_extension_binding request, options do |result, operation|
1655
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1656
+ yield result, operation if block_given?
1657
+ throw :response, result
1658
+ end
1659
+ rescue ::Gapic::Rest::Error => e
1660
+ raise ::Google::Cloud::Error.from_error(e)
1661
+ end
1662
+
1663
+ ##
1664
+ # Configuration class for the DepService REST API.
1665
+ #
1666
+ # This class represents the configuration for DepService REST,
1667
+ # providing control over timeouts, retry behavior, logging, transport
1668
+ # parameters, and other low-level controls. Certain parameters can also be
1669
+ # applied individually to specific RPCs. See
1670
+ # {::Google::Cloud::NetworkServices::V1beta1::DepService::Rest::Client::Configuration::Rpcs}
1671
+ # for a list of RPCs that can be configured independently.
1672
+ #
1673
+ # Configuration can be applied globally to all clients, or to a single client
1674
+ # on construction.
1675
+ #
1676
+ # @example
1677
+ #
1678
+ # # Modify the global config, setting the timeout for
1679
+ # # list_lb_traffic_extensions to 20 seconds,
1680
+ # # and all remaining timeouts to 10 seconds.
1681
+ # ::Google::Cloud::NetworkServices::V1beta1::DepService::Rest::Client.configure do |config|
1682
+ # config.timeout = 10.0
1683
+ # config.rpcs.list_lb_traffic_extensions.timeout = 20.0
1684
+ # end
1685
+ #
1686
+ # # Apply the above configuration only to a new client.
1687
+ # client = ::Google::Cloud::NetworkServices::V1beta1::DepService::Rest::Client.new do |config|
1688
+ # config.timeout = 10.0
1689
+ # config.rpcs.list_lb_traffic_extensions.timeout = 20.0
1690
+ # end
1691
+ #
1692
+ # @!attribute [rw] endpoint
1693
+ # A custom service endpoint, as a hostname or hostname:port. The default is
1694
+ # nil, indicating to use the default endpoint in the current universe domain.
1695
+ # @return [::String,nil]
1696
+ # @!attribute [rw] credentials
1697
+ # Credentials to send with calls. You may provide any of the following types:
1698
+ # * (`String`) The path to a service account key file in JSON format
1699
+ # * (`Hash`) A service account key as a Hash
1700
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1701
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1702
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1703
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1704
+ # * (`nil`) indicating no credentials
1705
+ #
1706
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
1707
+ # external source for authentication to Google Cloud, you must validate it before
1708
+ # providing it to a Google API client library. Providing an unvalidated credential
1709
+ # configuration to Google APIs can compromise the security of your systems and data.
1710
+ # For more information, refer to [Validate credential configurations from external
1711
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
1712
+ # @return [::Object]
1713
+ # @!attribute [rw] scope
1714
+ # The OAuth scopes
1715
+ # @return [::Array<::String>]
1716
+ # @!attribute [rw] lib_name
1717
+ # The library name as recorded in instrumentation and logging
1718
+ # @return [::String]
1719
+ # @!attribute [rw] lib_version
1720
+ # The library version as recorded in instrumentation and logging
1721
+ # @return [::String]
1722
+ # @!attribute [rw] timeout
1723
+ # The call timeout in seconds.
1724
+ # @return [::Numeric]
1725
+ # @!attribute [rw] metadata
1726
+ # Additional headers to be sent with the call.
1727
+ # @return [::Hash{::Symbol=>::String}]
1728
+ # @!attribute [rw] retry_policy
1729
+ # The retry policy. The value is a hash with the following keys:
1730
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1731
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1732
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1733
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
1734
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1735
+ # trigger a retry.
1736
+ # @return [::Hash]
1737
+ # @!attribute [rw] quota_project
1738
+ # A separate project against which to charge quota.
1739
+ # @return [::String]
1740
+ # @!attribute [rw] universe_domain
1741
+ # The universe domain within which to make requests. This determines the
1742
+ # default endpoint URL. The default value of nil uses the environment
1743
+ # universe (usually the default "googleapis.com" universe).
1744
+ # @return [::String,nil]
1745
+ # @!attribute [rw] logger
1746
+ # A custom logger to use for request/response debug logging, or the value
1747
+ # `:default` (the default) to construct a default logger, or `nil` to
1748
+ # explicitly disable logging.
1749
+ # @return [::Logger,:default,nil]
1750
+ #
1751
+ class Configuration
1752
+ extend ::Gapic::Config
1753
+
1754
+ # @private
1755
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1756
+ DEFAULT_ENDPOINT = "networkservices.googleapis.com"
1757
+
1758
+ config_attr :endpoint, nil, ::String, nil
1759
+ config_attr :credentials, nil do |value|
1760
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
1761
+ allowed.any? { |klass| klass === value }
1762
+ end
1763
+ config_attr :scope, nil, ::String, ::Array, nil
1764
+ config_attr :lib_name, nil, ::String, nil
1765
+ config_attr :lib_version, nil, ::String, nil
1766
+ config_attr :timeout, nil, ::Numeric, nil
1767
+ config_attr :metadata, nil, ::Hash, nil
1768
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1769
+ config_attr :quota_project, nil, ::String, nil
1770
+ config_attr :universe_domain, nil, ::String, nil
1771
+
1772
+ # @private
1773
+ # Overrides for http bindings for the RPCs of this service
1774
+ # are only used when this service is used as mixin, and only
1775
+ # by the host service.
1776
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
1777
+ config_attr :bindings_override, {}, ::Hash, nil
1778
+ config_attr :logger, :default, ::Logger, nil, :default
1779
+
1780
+ # @private
1781
+ def initialize parent_config = nil
1782
+ @parent_config = parent_config unless parent_config.nil?
1783
+
1784
+ yield self if block_given?
1785
+ end
1786
+
1787
+ ##
1788
+ # Configurations for individual RPCs
1789
+ # @return [Rpcs]
1790
+ #
1791
+ def rpcs
1792
+ @rpcs ||= begin
1793
+ parent_rpcs = nil
1794
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1795
+ Rpcs.new parent_rpcs
1796
+ end
1797
+ end
1798
+
1799
+ ##
1800
+ # Configuration RPC class for the DepService API.
1801
+ #
1802
+ # Includes fields providing the configuration for each RPC in this service.
1803
+ # Each configuration object is of type `Gapic::Config::Method` and includes
1804
+ # the following configuration fields:
1805
+ #
1806
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1807
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
1808
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1809
+ # include the following keys:
1810
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1811
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1812
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1813
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
1814
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1815
+ # trigger a retry.
1816
+ #
1817
+ class Rpcs
1818
+ ##
1819
+ # RPC-specific configuration for `list_lb_traffic_extensions`
1820
+ # @return [::Gapic::Config::Method]
1821
+ #
1822
+ attr_reader :list_lb_traffic_extensions
1823
+ ##
1824
+ # RPC-specific configuration for `get_lb_traffic_extension`
1825
+ # @return [::Gapic::Config::Method]
1826
+ #
1827
+ attr_reader :get_lb_traffic_extension
1828
+ ##
1829
+ # RPC-specific configuration for `create_lb_traffic_extension`
1830
+ # @return [::Gapic::Config::Method]
1831
+ #
1832
+ attr_reader :create_lb_traffic_extension
1833
+ ##
1834
+ # RPC-specific configuration for `update_lb_traffic_extension`
1835
+ # @return [::Gapic::Config::Method]
1836
+ #
1837
+ attr_reader :update_lb_traffic_extension
1838
+ ##
1839
+ # RPC-specific configuration for `delete_lb_traffic_extension`
1840
+ # @return [::Gapic::Config::Method]
1841
+ #
1842
+ attr_reader :delete_lb_traffic_extension
1843
+ ##
1844
+ # RPC-specific configuration for `list_lb_route_extensions`
1845
+ # @return [::Gapic::Config::Method]
1846
+ #
1847
+ attr_reader :list_lb_route_extensions
1848
+ ##
1849
+ # RPC-specific configuration for `get_lb_route_extension`
1850
+ # @return [::Gapic::Config::Method]
1851
+ #
1852
+ attr_reader :get_lb_route_extension
1853
+ ##
1854
+ # RPC-specific configuration for `create_lb_route_extension`
1855
+ # @return [::Gapic::Config::Method]
1856
+ #
1857
+ attr_reader :create_lb_route_extension
1858
+ ##
1859
+ # RPC-specific configuration for `update_lb_route_extension`
1860
+ # @return [::Gapic::Config::Method]
1861
+ #
1862
+ attr_reader :update_lb_route_extension
1863
+ ##
1864
+ # RPC-specific configuration for `delete_lb_route_extension`
1865
+ # @return [::Gapic::Config::Method]
1866
+ #
1867
+ attr_reader :delete_lb_route_extension
1868
+ ##
1869
+ # RPC-specific configuration for `list_extension_bindings`
1870
+ # @return [::Gapic::Config::Method]
1871
+ #
1872
+ attr_reader :list_extension_bindings
1873
+ ##
1874
+ # RPC-specific configuration for `get_extension_binding`
1875
+ # @return [::Gapic::Config::Method]
1876
+ #
1877
+ attr_reader :get_extension_binding
1878
+ ##
1879
+ # RPC-specific configuration for `create_extension_binding`
1880
+ # @return [::Gapic::Config::Method]
1881
+ #
1882
+ attr_reader :create_extension_binding
1883
+ ##
1884
+ # RPC-specific configuration for `update_extension_binding`
1885
+ # @return [::Gapic::Config::Method]
1886
+ #
1887
+ attr_reader :update_extension_binding
1888
+ ##
1889
+ # RPC-specific configuration for `delete_extension_binding`
1890
+ # @return [::Gapic::Config::Method]
1891
+ #
1892
+ attr_reader :delete_extension_binding
1893
+
1894
+ # @private
1895
+ def initialize parent_rpcs = nil
1896
+ list_lb_traffic_extensions_config = parent_rpcs.list_lb_traffic_extensions if parent_rpcs.respond_to? :list_lb_traffic_extensions
1897
+ @list_lb_traffic_extensions = ::Gapic::Config::Method.new list_lb_traffic_extensions_config
1898
+ get_lb_traffic_extension_config = parent_rpcs.get_lb_traffic_extension if parent_rpcs.respond_to? :get_lb_traffic_extension
1899
+ @get_lb_traffic_extension = ::Gapic::Config::Method.new get_lb_traffic_extension_config
1900
+ create_lb_traffic_extension_config = parent_rpcs.create_lb_traffic_extension if parent_rpcs.respond_to? :create_lb_traffic_extension
1901
+ @create_lb_traffic_extension = ::Gapic::Config::Method.new create_lb_traffic_extension_config
1902
+ update_lb_traffic_extension_config = parent_rpcs.update_lb_traffic_extension if parent_rpcs.respond_to? :update_lb_traffic_extension
1903
+ @update_lb_traffic_extension = ::Gapic::Config::Method.new update_lb_traffic_extension_config
1904
+ delete_lb_traffic_extension_config = parent_rpcs.delete_lb_traffic_extension if parent_rpcs.respond_to? :delete_lb_traffic_extension
1905
+ @delete_lb_traffic_extension = ::Gapic::Config::Method.new delete_lb_traffic_extension_config
1906
+ list_lb_route_extensions_config = parent_rpcs.list_lb_route_extensions if parent_rpcs.respond_to? :list_lb_route_extensions
1907
+ @list_lb_route_extensions = ::Gapic::Config::Method.new list_lb_route_extensions_config
1908
+ get_lb_route_extension_config = parent_rpcs.get_lb_route_extension if parent_rpcs.respond_to? :get_lb_route_extension
1909
+ @get_lb_route_extension = ::Gapic::Config::Method.new get_lb_route_extension_config
1910
+ create_lb_route_extension_config = parent_rpcs.create_lb_route_extension if parent_rpcs.respond_to? :create_lb_route_extension
1911
+ @create_lb_route_extension = ::Gapic::Config::Method.new create_lb_route_extension_config
1912
+ update_lb_route_extension_config = parent_rpcs.update_lb_route_extension if parent_rpcs.respond_to? :update_lb_route_extension
1913
+ @update_lb_route_extension = ::Gapic::Config::Method.new update_lb_route_extension_config
1914
+ delete_lb_route_extension_config = parent_rpcs.delete_lb_route_extension if parent_rpcs.respond_to? :delete_lb_route_extension
1915
+ @delete_lb_route_extension = ::Gapic::Config::Method.new delete_lb_route_extension_config
1916
+ list_extension_bindings_config = parent_rpcs.list_extension_bindings if parent_rpcs.respond_to? :list_extension_bindings
1917
+ @list_extension_bindings = ::Gapic::Config::Method.new list_extension_bindings_config
1918
+ get_extension_binding_config = parent_rpcs.get_extension_binding if parent_rpcs.respond_to? :get_extension_binding
1919
+ @get_extension_binding = ::Gapic::Config::Method.new get_extension_binding_config
1920
+ create_extension_binding_config = parent_rpcs.create_extension_binding if parent_rpcs.respond_to? :create_extension_binding
1921
+ @create_extension_binding = ::Gapic::Config::Method.new create_extension_binding_config
1922
+ update_extension_binding_config = parent_rpcs.update_extension_binding if parent_rpcs.respond_to? :update_extension_binding
1923
+ @update_extension_binding = ::Gapic::Config::Method.new update_extension_binding_config
1924
+ delete_extension_binding_config = parent_rpcs.delete_extension_binding if parent_rpcs.respond_to? :delete_extension_binding
1925
+ @delete_extension_binding = ::Gapic::Config::Method.new delete_extension_binding_config
1926
+
1927
+ yield self if block_given?
1928
+ end
1929
+ end
1930
+ end
1931
+ end
1932
+ end
1933
+ end
1934
+ end
1935
+ end
1936
+ end
1937
+ end