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