google-cloud-network_services-v1 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 (65) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +144 -8
  5. data/lib/google/cloud/network_services/v1/bindings_override.rb +279 -0
  6. data/lib/google/cloud/network_services/v1/dep_service/client.rb +1503 -0
  7. data/lib/google/cloud/network_services/v1/dep_service/credentials.rb +47 -0
  8. data/lib/google/cloud/network_services/v1/dep_service/operations.rb +809 -0
  9. data/lib/google/cloud/network_services/v1/dep_service/paths.rb +88 -0
  10. data/lib/google/cloud/network_services/v1/dep_service/rest/client.rb +1414 -0
  11. data/lib/google/cloud/network_services/v1/dep_service/rest/operations.rb +902 -0
  12. data/lib/google/cloud/network_services/v1/dep_service/rest/service_stub.rb +663 -0
  13. data/lib/google/cloud/network_services/v1/dep_service/rest.rb +54 -0
  14. data/lib/google/cloud/network_services/v1/dep_service.rb +56 -0
  15. data/lib/google/cloud/network_services/v1/network_services/client.rb +4383 -0
  16. data/lib/google/cloud/network_services/v1/network_services/credentials.rb +47 -0
  17. data/lib/google/cloud/network_services/v1/network_services/operations.rb +809 -0
  18. data/lib/google/cloud/network_services/v1/network_services/paths.rb +278 -0
  19. data/lib/google/cloud/network_services/v1/network_services/rest/client.rb +4093 -0
  20. data/lib/google/cloud/network_services/v1/network_services/rest/operations.rb +902 -0
  21. data/lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb +2385 -0
  22. data/lib/google/cloud/network_services/v1/network_services/rest.rb +52 -0
  23. data/lib/google/cloud/network_services/v1/network_services.rb +54 -0
  24. data/lib/google/cloud/network_services/v1/rest.rb +39 -0
  25. data/lib/google/cloud/network_services/v1/version.rb +7 -2
  26. data/lib/google/cloud/network_services/v1.rb +46 -0
  27. data/lib/google/cloud/networkservices/v1/common_pb.rb +51 -0
  28. data/lib/google/cloud/networkservices/v1/dep_pb.rb +75 -0
  29. data/lib/google/cloud/networkservices/v1/dep_services_pb.rb +64 -0
  30. data/lib/google/cloud/networkservices/v1/endpoint_policy_pb.rb +58 -0
  31. data/lib/google/cloud/networkservices/v1/gateway_pb.rb +56 -0
  32. data/lib/google/cloud/networkservices/v1/grpc_route_pb.rb +69 -0
  33. data/lib/google/cloud/networkservices/v1/http_route_pb.rb +74 -0
  34. data/lib/google/cloud/networkservices/v1/mesh_pb.rb +55 -0
  35. data/lib/google/cloud/networkservices/v1/network_services_pb.rb +53 -0
  36. data/lib/google/cloud/networkservices/v1/network_services_services_pb.rb +120 -0
  37. data/lib/google/cloud/networkservices/v1/service_binding_pb.rb +52 -0
  38. data/lib/google/cloud/networkservices/v1/tcp_route_pb.rb +59 -0
  39. data/lib/google/cloud/networkservices/v1/tls_route_pb.rb +59 -0
  40. data/lib/google-cloud-network_services-v1.rb +21 -0
  41. data/proto_docs/README.md +4 -0
  42. data/proto_docs/google/api/client.rb +399 -0
  43. data/proto_docs/google/api/field_behavior.rb +85 -0
  44. data/proto_docs/google/api/field_info.rb +65 -0
  45. data/proto_docs/google/api/launch_stage.rb +71 -0
  46. data/proto_docs/google/api/resource.rb +222 -0
  47. data/proto_docs/google/cloud/networkservices/v1/common.rb +147 -0
  48. data/proto_docs/google/cloud/networkservices/v1/dep.rb +569 -0
  49. data/proto_docs/google/cloud/networkservices/v1/endpoint_policy.rb +194 -0
  50. data/proto_docs/google/cloud/networkservices/v1/gateway.rb +187 -0
  51. data/proto_docs/google/cloud/networkservices/v1/grpc_route.rb +430 -0
  52. data/proto_docs/google/cloud/networkservices/v1/http_route.rb +670 -0
  53. data/proto_docs/google/cloud/networkservices/v1/mesh.rb +155 -0
  54. data/proto_docs/google/cloud/networkservices/v1/service_binding.rb +131 -0
  55. data/proto_docs/google/cloud/networkservices/v1/tcp_route.rb +247 -0
  56. data/proto_docs/google/cloud/networkservices/v1/tls_route.rb +219 -0
  57. data/proto_docs/google/longrunning/operations.rb +164 -0
  58. data/proto_docs/google/protobuf/any.rb +145 -0
  59. data/proto_docs/google/protobuf/duration.rb +98 -0
  60. data/proto_docs/google/protobuf/empty.rb +34 -0
  61. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  62. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  63. data/proto_docs/google/rpc/status.rb +48 -0
  64. data/proto_docs/google/type/expr.rb +75 -0
  65. metadata +144 -10
@@ -0,0 +1,1503 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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/v1/dep_pb"
21
+ require "google/cloud/location"
22
+ require "google/iam/v1"
23
+
24
+ module Google
25
+ module Cloud
26
+ module NetworkServices
27
+ module V1
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::V1::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::V1::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", "V1"]
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
76
+ end
77
+ yield @configure if block_given?
78
+ @configure
79
+ end
80
+
81
+ ##
82
+ # Configure the DepService Client instance.
83
+ #
84
+ # The configuration is set to the derived mode, meaning that values can be changed,
85
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
86
+ # should be made on {Client.configure}.
87
+ #
88
+ # See {::Google::Cloud::NetworkServices::V1::DepService::Client::Configuration}
89
+ # for a description of the configuration fields.
90
+ #
91
+ # @yield [config] Configure the Client client.
92
+ # @yieldparam config [Client::Configuration]
93
+ #
94
+ # @return [Client::Configuration]
95
+ #
96
+ def configure
97
+ yield @config if block_given?
98
+ @config
99
+ end
100
+
101
+ ##
102
+ # The effective universe domain
103
+ #
104
+ # @return [String]
105
+ #
106
+ def universe_domain
107
+ @dep_service_stub.universe_domain
108
+ end
109
+
110
+ ##
111
+ # Create a new DepService client object.
112
+ #
113
+ # @example
114
+ #
115
+ # # Create a client using the default configuration
116
+ # client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new
117
+ #
118
+ # # Create a client using a custom configuration
119
+ # client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config|
120
+ # config.timeout = 10.0
121
+ # end
122
+ #
123
+ # @yield [config] Configure the DepService client.
124
+ # @yieldparam config [Client::Configuration]
125
+ #
126
+ def initialize
127
+ # These require statements are intentionally placed here to initialize
128
+ # the gRPC module only when it's required.
129
+ # See https://github.com/googleapis/toolkit/issues/446
130
+ require "gapic/grpc"
131
+ require "google/cloud/networkservices/v1/dep_services_pb"
132
+
133
+ # Create the configuration object
134
+ @config = Configuration.new Client.configure
135
+
136
+ # Yield the configuration if needed
137
+ yield @config if block_given?
138
+
139
+ # Create credentials
140
+ credentials = @config.credentials
141
+ # Use self-signed JWT if the endpoint is unchanged from default,
142
+ # but only if the default endpoint does not have a region prefix.
143
+ enable_self_signed_jwt = @config.endpoint.nil? ||
144
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
145
+ !@config.endpoint.split(".").first.include?("-"))
146
+ credentials ||= Credentials.default scope: @config.scope,
147
+ enable_self_signed_jwt: enable_self_signed_jwt
148
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
149
+ credentials = Credentials.new credentials, scope: @config.scope
150
+ end
151
+ @quota_project_id = @config.quota_project
152
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
153
+
154
+ @operations_client = Operations.new do |config|
155
+ config.credentials = credentials
156
+ config.quota_project = @quota_project_id
157
+ config.endpoint = @config.endpoint
158
+ config.universe_domain = @config.universe_domain
159
+ end
160
+
161
+ @dep_service_stub = ::Gapic::ServiceStub.new(
162
+ ::Google::Cloud::NetworkServices::V1::DepService::Stub,
163
+ credentials: credentials,
164
+ endpoint: @config.endpoint,
165
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
166
+ universe_domain: @config.universe_domain,
167
+ channel_args: @config.channel_args,
168
+ interceptors: @config.interceptors,
169
+ channel_pool_config: @config.channel_pool
170
+ )
171
+
172
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
173
+ config.credentials = credentials
174
+ config.quota_project = @quota_project_id
175
+ config.endpoint = @dep_service_stub.endpoint
176
+ config.universe_domain = @dep_service_stub.universe_domain
177
+ end
178
+
179
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
180
+ config.credentials = credentials
181
+ config.quota_project = @quota_project_id
182
+ config.endpoint = @dep_service_stub.endpoint
183
+ config.universe_domain = @dep_service_stub.universe_domain
184
+ end
185
+ end
186
+
187
+ ##
188
+ # Get the associated client for long-running operations.
189
+ #
190
+ # @return [::Google::Cloud::NetworkServices::V1::DepService::Operations]
191
+ #
192
+ attr_reader :operations_client
193
+
194
+ ##
195
+ # Get the associated client for mix-in of the Locations.
196
+ #
197
+ # @return [Google::Cloud::Location::Locations::Client]
198
+ #
199
+ attr_reader :location_client
200
+
201
+ ##
202
+ # Get the associated client for mix-in of the IAMPolicy.
203
+ #
204
+ # @return [Google::Iam::V1::IAMPolicy::Client]
205
+ #
206
+ attr_reader :iam_policy_client
207
+
208
+ # Service calls
209
+
210
+ ##
211
+ # Lists `LbTrafficExtension` resources in a given project and location.
212
+ #
213
+ # @overload list_lb_traffic_extensions(request, options = nil)
214
+ # Pass arguments to `list_lb_traffic_extensions` via a request object, either of type
215
+ # {::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest} or an equivalent Hash.
216
+ #
217
+ # @param request [::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest, ::Hash]
218
+ # A request object representing the call parameters. Required. To specify no
219
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
220
+ # @param options [::Gapic::CallOptions, ::Hash]
221
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
222
+ #
223
+ # @overload list_lb_traffic_extensions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
224
+ # Pass arguments to `list_lb_traffic_extensions` via keyword arguments. Note that at
225
+ # least one keyword argument is required. To specify no parameters, or to keep all
226
+ # the default parameter values, pass an empty Hash as a request object (see above).
227
+ #
228
+ # @param parent [::String]
229
+ # Required. The project and location from which the `LbTrafficExtension`
230
+ # resources are listed, specified in the following format:
231
+ # `projects/{project}/locations/{location}`.
232
+ # @param page_size [::Integer]
233
+ # Optional. Requested page size. The server might return fewer items than
234
+ # requested. If unspecified, the server picks an appropriate default.
235
+ # @param page_token [::String]
236
+ # Optional. A token identifying a page of results that the server returns.
237
+ # @param filter [::String]
238
+ # Optional. Filtering results.
239
+ # @param order_by [::String]
240
+ # Optional. Hint for how to order the results.
241
+ #
242
+ # @yield [response, operation] Access the result along with the RPC operation
243
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbTrafficExtension>]
244
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
245
+ #
246
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbTrafficExtension>]
247
+ #
248
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
249
+ #
250
+ # @example Basic example
251
+ # require "google/cloud/network_services/v1"
252
+ #
253
+ # # Create a client object. The client can be reused for multiple calls.
254
+ # client = Google::Cloud::NetworkServices::V1::DepService::Client.new
255
+ #
256
+ # # Create a request. To set request fields, pass in keyword arguments.
257
+ # request = Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest.new
258
+ #
259
+ # # Call the list_lb_traffic_extensions method.
260
+ # result = client.list_lb_traffic_extensions request
261
+ #
262
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
263
+ # # over elements, and API calls will be issued to fetch pages as needed.
264
+ # result.each do |item|
265
+ # # Each element is of type ::Google::Cloud::NetworkServices::V1::LbTrafficExtension.
266
+ # p item
267
+ # end
268
+ #
269
+ def list_lb_traffic_extensions request, options = nil
270
+ raise ::ArgumentError, "request must be provided" if request.nil?
271
+
272
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest
273
+
274
+ # Converts hash and nil to an options object
275
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
276
+
277
+ # Customize the options with defaults
278
+ metadata = @config.rpcs.list_lb_traffic_extensions.metadata.to_h
279
+
280
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
281
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
282
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
283
+ gapic_version: ::Google::Cloud::NetworkServices::V1::VERSION
284
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
285
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
286
+
287
+ header_params = {}
288
+ if request.parent
289
+ header_params["parent"] = request.parent
290
+ end
291
+
292
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
293
+ metadata[:"x-goog-request-params"] ||= request_params_header
294
+
295
+ options.apply_defaults timeout: @config.rpcs.list_lb_traffic_extensions.timeout,
296
+ metadata: metadata,
297
+ retry_policy: @config.rpcs.list_lb_traffic_extensions.retry_policy
298
+
299
+ options.apply_defaults timeout: @config.timeout,
300
+ metadata: @config.metadata,
301
+ retry_policy: @config.retry_policy
302
+
303
+ @dep_service_stub.call_rpc :list_lb_traffic_extensions, request, options: options do |response, operation|
304
+ response = ::Gapic::PagedEnumerable.new @dep_service_stub, :list_lb_traffic_extensions, request, response, operation, options
305
+ yield response, operation if block_given?
306
+ return response
307
+ end
308
+ rescue ::GRPC::BadStatus => e
309
+ raise ::Google::Cloud::Error.from_error(e)
310
+ end
311
+
312
+ ##
313
+ # Gets details of the specified `LbTrafficExtension` resource.
314
+ #
315
+ # @overload get_lb_traffic_extension(request, options = nil)
316
+ # Pass arguments to `get_lb_traffic_extension` via a request object, either of type
317
+ # {::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest} or an equivalent Hash.
318
+ #
319
+ # @param request [::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest, ::Hash]
320
+ # A request object representing the call parameters. Required. To specify no
321
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
322
+ # @param options [::Gapic::CallOptions, ::Hash]
323
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
324
+ #
325
+ # @overload get_lb_traffic_extension(name: nil)
326
+ # Pass arguments to `get_lb_traffic_extension` via keyword arguments. Note that at
327
+ # least one keyword argument is required. To specify no parameters, or to keep all
328
+ # the default parameter values, pass an empty Hash as a request object (see above).
329
+ #
330
+ # @param name [::String]
331
+ # Required. A name of the `LbTrafficExtension` resource to get. Must be in
332
+ # the format
333
+ # `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.
334
+ #
335
+ # @yield [response, operation] Access the result along with the RPC operation
336
+ # @yieldparam response [::Google::Cloud::NetworkServices::V1::LbTrafficExtension]
337
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
338
+ #
339
+ # @return [::Google::Cloud::NetworkServices::V1::LbTrafficExtension]
340
+ #
341
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
342
+ #
343
+ # @example Basic example
344
+ # require "google/cloud/network_services/v1"
345
+ #
346
+ # # Create a client object. The client can be reused for multiple calls.
347
+ # client = Google::Cloud::NetworkServices::V1::DepService::Client.new
348
+ #
349
+ # # Create a request. To set request fields, pass in keyword arguments.
350
+ # request = Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest.new
351
+ #
352
+ # # Call the get_lb_traffic_extension method.
353
+ # result = client.get_lb_traffic_extension request
354
+ #
355
+ # # The returned object is of type Google::Cloud::NetworkServices::V1::LbTrafficExtension.
356
+ # p result
357
+ #
358
+ def get_lb_traffic_extension request, options = nil
359
+ raise ::ArgumentError, "request must be provided" if request.nil?
360
+
361
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest
362
+
363
+ # Converts hash and nil to an options object
364
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
365
+
366
+ # Customize the options with defaults
367
+ metadata = @config.rpcs.get_lb_traffic_extension.metadata.to_h
368
+
369
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
370
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
371
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
372
+ gapic_version: ::Google::Cloud::NetworkServices::V1::VERSION
373
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
374
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
375
+
376
+ header_params = {}
377
+ if request.name
378
+ header_params["name"] = request.name
379
+ end
380
+
381
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
382
+ metadata[:"x-goog-request-params"] ||= request_params_header
383
+
384
+ options.apply_defaults timeout: @config.rpcs.get_lb_traffic_extension.timeout,
385
+ metadata: metadata,
386
+ retry_policy: @config.rpcs.get_lb_traffic_extension.retry_policy
387
+
388
+ options.apply_defaults timeout: @config.timeout,
389
+ metadata: @config.metadata,
390
+ retry_policy: @config.retry_policy
391
+
392
+ @dep_service_stub.call_rpc :get_lb_traffic_extension, request, options: options do |response, operation|
393
+ yield response, operation if block_given?
394
+ return response
395
+ end
396
+ rescue ::GRPC::BadStatus => e
397
+ raise ::Google::Cloud::Error.from_error(e)
398
+ end
399
+
400
+ ##
401
+ # Creates a new `LbTrafficExtension` resource in a given project and
402
+ # location.
403
+ #
404
+ # @overload create_lb_traffic_extension(request, options = nil)
405
+ # Pass arguments to `create_lb_traffic_extension` via a request object, either of type
406
+ # {::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest} or an equivalent Hash.
407
+ #
408
+ # @param request [::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest, ::Hash]
409
+ # A request object representing the call parameters. Required. To specify no
410
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
411
+ # @param options [::Gapic::CallOptions, ::Hash]
412
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
413
+ #
414
+ # @overload create_lb_traffic_extension(parent: nil, lb_traffic_extension_id: nil, lb_traffic_extension: nil, request_id: nil)
415
+ # Pass arguments to `create_lb_traffic_extension` via keyword arguments. Note that at
416
+ # least one keyword argument is required. To specify no parameters, or to keep all
417
+ # the default parameter values, pass an empty Hash as a request object (see above).
418
+ #
419
+ # @param parent [::String]
420
+ # Required. The parent resource of the `LbTrafficExtension` resource. Must be
421
+ # in the format `projects/{project}/locations/{location}`.
422
+ # @param lb_traffic_extension_id [::String]
423
+ # Required. User-provided ID of the `LbTrafficExtension` resource to be
424
+ # created.
425
+ # @param lb_traffic_extension [::Google::Cloud::NetworkServices::V1::LbTrafficExtension, ::Hash]
426
+ # Required. `LbTrafficExtension` resource to be created.
427
+ # @param request_id [::String]
428
+ # Optional. An optional request ID to identify requests. Specify a unique
429
+ # request ID so that if you must retry your request, the server can ignore
430
+ # the request if it has already been completed. The server guarantees
431
+ # that for at least 60 minutes since the first request.
432
+ #
433
+ # For example, consider a situation where you make an initial request and the
434
+ # request times out. If you make the request again with the same request
435
+ # ID, the server can check if original operation with the same request ID
436
+ # was received, and if so, ignores the second request. This prevents
437
+ # clients from accidentally creating duplicate commitments.
438
+ #
439
+ # The request ID must be a valid UUID with the exception that zero UUID is
440
+ # not supported (00000000-0000-0000-0000-000000000000).
441
+ #
442
+ # @yield [response, operation] Access the result along with the RPC operation
443
+ # @yieldparam response [::Gapic::Operation]
444
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
445
+ #
446
+ # @return [::Gapic::Operation]
447
+ #
448
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
449
+ #
450
+ # @example Basic example
451
+ # require "google/cloud/network_services/v1"
452
+ #
453
+ # # Create a client object. The client can be reused for multiple calls.
454
+ # client = Google::Cloud::NetworkServices::V1::DepService::Client.new
455
+ #
456
+ # # Create a request. To set request fields, pass in keyword arguments.
457
+ # request = Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest.new
458
+ #
459
+ # # Call the create_lb_traffic_extension method.
460
+ # result = client.create_lb_traffic_extension request
461
+ #
462
+ # # The returned object is of type Gapic::Operation. You can use it to
463
+ # # check the status of an operation, cancel it, or wait for results.
464
+ # # Here is how to wait for a response.
465
+ # result.wait_until_done! timeout: 60
466
+ # if result.response?
467
+ # p result.response
468
+ # else
469
+ # puts "No response received."
470
+ # end
471
+ #
472
+ def create_lb_traffic_extension request, options = nil
473
+ raise ::ArgumentError, "request must be provided" if request.nil?
474
+
475
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest
476
+
477
+ # Converts hash and nil to an options object
478
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
479
+
480
+ # Customize the options with defaults
481
+ metadata = @config.rpcs.create_lb_traffic_extension.metadata.to_h
482
+
483
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
484
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
485
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
486
+ gapic_version: ::Google::Cloud::NetworkServices::V1::VERSION
487
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
488
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
489
+
490
+ header_params = {}
491
+ if request.parent
492
+ header_params["parent"] = request.parent
493
+ end
494
+
495
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
496
+ metadata[:"x-goog-request-params"] ||= request_params_header
497
+
498
+ options.apply_defaults timeout: @config.rpcs.create_lb_traffic_extension.timeout,
499
+ metadata: metadata,
500
+ retry_policy: @config.rpcs.create_lb_traffic_extension.retry_policy
501
+
502
+ options.apply_defaults timeout: @config.timeout,
503
+ metadata: @config.metadata,
504
+ retry_policy: @config.retry_policy
505
+
506
+ @dep_service_stub.call_rpc :create_lb_traffic_extension, request, options: options do |response, operation|
507
+ response = ::Gapic::Operation.new response, @operations_client, options: options
508
+ yield response, operation if block_given?
509
+ return response
510
+ end
511
+ rescue ::GRPC::BadStatus => e
512
+ raise ::Google::Cloud::Error.from_error(e)
513
+ end
514
+
515
+ ##
516
+ # Updates the parameters of the specified `LbTrafficExtension` resource.
517
+ #
518
+ # @overload update_lb_traffic_extension(request, options = nil)
519
+ # Pass arguments to `update_lb_traffic_extension` via a request object, either of type
520
+ # {::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest} or an equivalent Hash.
521
+ #
522
+ # @param request [::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest, ::Hash]
523
+ # A request object representing the call parameters. Required. To specify no
524
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
525
+ # @param options [::Gapic::CallOptions, ::Hash]
526
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
527
+ #
528
+ # @overload update_lb_traffic_extension(update_mask: nil, lb_traffic_extension: nil, request_id: nil)
529
+ # Pass arguments to `update_lb_traffic_extension` via keyword arguments. Note that at
530
+ # least one keyword argument is required. To specify no parameters, or to keep all
531
+ # the default parameter values, pass an empty Hash as a request object (see above).
532
+ #
533
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
534
+ # Required. Used to specify the fields to be overwritten in the
535
+ # `LbTrafficExtension` resource by the update.
536
+ # The fields specified in the update_mask are relative to the resource, not
537
+ # the full request. A field is overwritten if it is in the mask. If the
538
+ # user does not specify a mask, then all fields are overwritten.
539
+ # @param lb_traffic_extension [::Google::Cloud::NetworkServices::V1::LbTrafficExtension, ::Hash]
540
+ # Required. `LbTrafficExtension` resource being updated.
541
+ # @param request_id [::String]
542
+ # Optional. An optional request ID to identify requests. Specify a unique
543
+ # request ID so that if you must retry your request, the server can ignore
544
+ # the request if it has already been completed. The server guarantees
545
+ # that for at least 60 minutes since the first request.
546
+ #
547
+ # For example, consider a situation where you make an initial request and the
548
+ # request times out. If you make the request again with the same request
549
+ # ID, the server can check if original operation with the same request ID
550
+ # was received, and if so, ignores the second request. This prevents
551
+ # clients from accidentally creating duplicate commitments.
552
+ #
553
+ # The request ID must be a valid UUID with the exception that zero UUID is
554
+ # not supported (00000000-0000-0000-0000-000000000000).
555
+ #
556
+ # @yield [response, operation] Access the result along with the RPC operation
557
+ # @yieldparam response [::Gapic::Operation]
558
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
559
+ #
560
+ # @return [::Gapic::Operation]
561
+ #
562
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
563
+ #
564
+ # @example Basic example
565
+ # require "google/cloud/network_services/v1"
566
+ #
567
+ # # Create a client object. The client can be reused for multiple calls.
568
+ # client = Google::Cloud::NetworkServices::V1::DepService::Client.new
569
+ #
570
+ # # Create a request. To set request fields, pass in keyword arguments.
571
+ # request = Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest.new
572
+ #
573
+ # # Call the update_lb_traffic_extension method.
574
+ # result = client.update_lb_traffic_extension request
575
+ #
576
+ # # The returned object is of type Gapic::Operation. You can use it to
577
+ # # check the status of an operation, cancel it, or wait for results.
578
+ # # Here is how to wait for a response.
579
+ # result.wait_until_done! timeout: 60
580
+ # if result.response?
581
+ # p result.response
582
+ # else
583
+ # puts "No response received."
584
+ # end
585
+ #
586
+ def update_lb_traffic_extension request, options = nil
587
+ raise ::ArgumentError, "request must be provided" if request.nil?
588
+
589
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest
590
+
591
+ # Converts hash and nil to an options object
592
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
593
+
594
+ # Customize the options with defaults
595
+ metadata = @config.rpcs.update_lb_traffic_extension.metadata.to_h
596
+
597
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
598
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
599
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
600
+ gapic_version: ::Google::Cloud::NetworkServices::V1::VERSION
601
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
602
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
603
+
604
+ header_params = {}
605
+ if request.lb_traffic_extension&.name
606
+ header_params["lb_traffic_extension.name"] = request.lb_traffic_extension.name
607
+ end
608
+
609
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
610
+ metadata[:"x-goog-request-params"] ||= request_params_header
611
+
612
+ options.apply_defaults timeout: @config.rpcs.update_lb_traffic_extension.timeout,
613
+ metadata: metadata,
614
+ retry_policy: @config.rpcs.update_lb_traffic_extension.retry_policy
615
+
616
+ options.apply_defaults timeout: @config.timeout,
617
+ metadata: @config.metadata,
618
+ retry_policy: @config.retry_policy
619
+
620
+ @dep_service_stub.call_rpc :update_lb_traffic_extension, request, options: options do |response, operation|
621
+ response = ::Gapic::Operation.new response, @operations_client, options: options
622
+ yield response, operation if block_given?
623
+ return response
624
+ end
625
+ rescue ::GRPC::BadStatus => e
626
+ raise ::Google::Cloud::Error.from_error(e)
627
+ end
628
+
629
+ ##
630
+ # Deletes the specified `LbTrafficExtension` resource.
631
+ #
632
+ # @overload delete_lb_traffic_extension(request, options = nil)
633
+ # Pass arguments to `delete_lb_traffic_extension` via a request object, either of type
634
+ # {::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest} or an equivalent Hash.
635
+ #
636
+ # @param request [::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest, ::Hash]
637
+ # A request object representing the call parameters. Required. To specify no
638
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
639
+ # @param options [::Gapic::CallOptions, ::Hash]
640
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
641
+ #
642
+ # @overload delete_lb_traffic_extension(name: nil, request_id: nil)
643
+ # Pass arguments to `delete_lb_traffic_extension` via keyword arguments. Note that at
644
+ # least one keyword argument is required. To specify no parameters, or to keep all
645
+ # the default parameter values, pass an empty Hash as a request object (see above).
646
+ #
647
+ # @param name [::String]
648
+ # Required. The name of the `LbTrafficExtension` resource to delete. Must be
649
+ # in the format
650
+ # `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.
651
+ # @param request_id [::String]
652
+ # Optional. An optional request ID to identify requests. Specify a unique
653
+ # request ID so that if you must retry your request, the server can ignore
654
+ # the request if it has already been completed. The server guarantees
655
+ # that for at least 60 minutes after the first request.
656
+ #
657
+ # For example, consider a situation where you make an initial request and the
658
+ # request times out. If you make the request again with the same request
659
+ # ID, the server can check if original operation with the same request ID
660
+ # was received, and if so, ignores the second request. This prevents
661
+ # clients from accidentally creating duplicate commitments.
662
+ #
663
+ # The request ID must be a valid UUID with the exception that zero UUID is
664
+ # not supported (00000000-0000-0000-0000-000000000000).
665
+ #
666
+ # @yield [response, operation] Access the result along with the RPC operation
667
+ # @yieldparam response [::Gapic::Operation]
668
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
669
+ #
670
+ # @return [::Gapic::Operation]
671
+ #
672
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
673
+ #
674
+ # @example Basic example
675
+ # require "google/cloud/network_services/v1"
676
+ #
677
+ # # Create a client object. The client can be reused for multiple calls.
678
+ # client = Google::Cloud::NetworkServices::V1::DepService::Client.new
679
+ #
680
+ # # Create a request. To set request fields, pass in keyword arguments.
681
+ # request = Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest.new
682
+ #
683
+ # # Call the delete_lb_traffic_extension method.
684
+ # result = client.delete_lb_traffic_extension request
685
+ #
686
+ # # The returned object is of type Gapic::Operation. You can use it to
687
+ # # check the status of an operation, cancel it, or wait for results.
688
+ # # Here is how to wait for a response.
689
+ # result.wait_until_done! timeout: 60
690
+ # if result.response?
691
+ # p result.response
692
+ # else
693
+ # puts "No response received."
694
+ # end
695
+ #
696
+ def delete_lb_traffic_extension request, options = nil
697
+ raise ::ArgumentError, "request must be provided" if request.nil?
698
+
699
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest
700
+
701
+ # Converts hash and nil to an options object
702
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
703
+
704
+ # Customize the options with defaults
705
+ metadata = @config.rpcs.delete_lb_traffic_extension.metadata.to_h
706
+
707
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
708
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
709
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
710
+ gapic_version: ::Google::Cloud::NetworkServices::V1::VERSION
711
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
712
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
713
+
714
+ header_params = {}
715
+ if request.name
716
+ header_params["name"] = request.name
717
+ end
718
+
719
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
720
+ metadata[:"x-goog-request-params"] ||= request_params_header
721
+
722
+ options.apply_defaults timeout: @config.rpcs.delete_lb_traffic_extension.timeout,
723
+ metadata: metadata,
724
+ retry_policy: @config.rpcs.delete_lb_traffic_extension.retry_policy
725
+
726
+ options.apply_defaults timeout: @config.timeout,
727
+ metadata: @config.metadata,
728
+ retry_policy: @config.retry_policy
729
+
730
+ @dep_service_stub.call_rpc :delete_lb_traffic_extension, request, options: options do |response, operation|
731
+ response = ::Gapic::Operation.new response, @operations_client, options: options
732
+ yield response, operation if block_given?
733
+ return response
734
+ end
735
+ rescue ::GRPC::BadStatus => e
736
+ raise ::Google::Cloud::Error.from_error(e)
737
+ end
738
+
739
+ ##
740
+ # Lists `LbRouteExtension` resources in a given project and location.
741
+ #
742
+ # @overload list_lb_route_extensions(request, options = nil)
743
+ # Pass arguments to `list_lb_route_extensions` via a request object, either of type
744
+ # {::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest} or an equivalent Hash.
745
+ #
746
+ # @param request [::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest, ::Hash]
747
+ # A request object representing the call parameters. Required. To specify no
748
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
749
+ # @param options [::Gapic::CallOptions, ::Hash]
750
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
751
+ #
752
+ # @overload list_lb_route_extensions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
753
+ # Pass arguments to `list_lb_route_extensions` via keyword arguments. Note that at
754
+ # least one keyword argument is required. To specify no parameters, or to keep all
755
+ # the default parameter values, pass an empty Hash as a request object (see above).
756
+ #
757
+ # @param parent [::String]
758
+ # Required. The project and location from which the `LbRouteExtension`
759
+ # resources are listed, specified in the following format:
760
+ # `projects/{project}/locations/{location}`.
761
+ # @param page_size [::Integer]
762
+ # Optional. Requested page size. The server might return fewer items than
763
+ # requested. If unspecified, the server picks an appropriate default.
764
+ # @param page_token [::String]
765
+ # Optional. A token identifying a page of results that the server returns.
766
+ # @param filter [::String]
767
+ # Optional. Filtering results.
768
+ # @param order_by [::String]
769
+ # Optional. Hint for how to order the results.
770
+ #
771
+ # @yield [response, operation] Access the result along with the RPC operation
772
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbRouteExtension>]
773
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
774
+ #
775
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbRouteExtension>]
776
+ #
777
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
778
+ #
779
+ # @example Basic example
780
+ # require "google/cloud/network_services/v1"
781
+ #
782
+ # # Create a client object. The client can be reused for multiple calls.
783
+ # client = Google::Cloud::NetworkServices::V1::DepService::Client.new
784
+ #
785
+ # # Create a request. To set request fields, pass in keyword arguments.
786
+ # request = Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest.new
787
+ #
788
+ # # Call the list_lb_route_extensions method.
789
+ # result = client.list_lb_route_extensions request
790
+ #
791
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
792
+ # # over elements, and API calls will be issued to fetch pages as needed.
793
+ # result.each do |item|
794
+ # # Each element is of type ::Google::Cloud::NetworkServices::V1::LbRouteExtension.
795
+ # p item
796
+ # end
797
+ #
798
+ def list_lb_route_extensions request, options = nil
799
+ raise ::ArgumentError, "request must be provided" if request.nil?
800
+
801
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest
802
+
803
+ # Converts hash and nil to an options object
804
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
805
+
806
+ # Customize the options with defaults
807
+ metadata = @config.rpcs.list_lb_route_extensions.metadata.to_h
808
+
809
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
810
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
811
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
812
+ gapic_version: ::Google::Cloud::NetworkServices::V1::VERSION
813
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
814
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
815
+
816
+ header_params = {}
817
+ if request.parent
818
+ header_params["parent"] = request.parent
819
+ end
820
+
821
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
822
+ metadata[:"x-goog-request-params"] ||= request_params_header
823
+
824
+ options.apply_defaults timeout: @config.rpcs.list_lb_route_extensions.timeout,
825
+ metadata: metadata,
826
+ retry_policy: @config.rpcs.list_lb_route_extensions.retry_policy
827
+
828
+ options.apply_defaults timeout: @config.timeout,
829
+ metadata: @config.metadata,
830
+ retry_policy: @config.retry_policy
831
+
832
+ @dep_service_stub.call_rpc :list_lb_route_extensions, request, options: options do |response, operation|
833
+ response = ::Gapic::PagedEnumerable.new @dep_service_stub, :list_lb_route_extensions, request, response, operation, options
834
+ yield response, operation if block_given?
835
+ return response
836
+ end
837
+ rescue ::GRPC::BadStatus => e
838
+ raise ::Google::Cloud::Error.from_error(e)
839
+ end
840
+
841
+ ##
842
+ # Gets details of the specified `LbRouteExtension` resource.
843
+ #
844
+ # @overload get_lb_route_extension(request, options = nil)
845
+ # Pass arguments to `get_lb_route_extension` via a request object, either of type
846
+ # {::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest} or an equivalent Hash.
847
+ #
848
+ # @param request [::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest, ::Hash]
849
+ # A request object representing the call parameters. Required. To specify no
850
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
851
+ # @param options [::Gapic::CallOptions, ::Hash]
852
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
853
+ #
854
+ # @overload get_lb_route_extension(name: nil)
855
+ # Pass arguments to `get_lb_route_extension` via keyword arguments. Note that at
856
+ # least one keyword argument is required. To specify no parameters, or to keep all
857
+ # the default parameter values, pass an empty Hash as a request object (see above).
858
+ #
859
+ # @param name [::String]
860
+ # Required. A name of the `LbRouteExtension` resource to get. Must be in the
861
+ # format
862
+ # `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.
863
+ #
864
+ # @yield [response, operation] Access the result along with the RPC operation
865
+ # @yieldparam response [::Google::Cloud::NetworkServices::V1::LbRouteExtension]
866
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
867
+ #
868
+ # @return [::Google::Cloud::NetworkServices::V1::LbRouteExtension]
869
+ #
870
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
871
+ #
872
+ # @example Basic example
873
+ # require "google/cloud/network_services/v1"
874
+ #
875
+ # # Create a client object. The client can be reused for multiple calls.
876
+ # client = Google::Cloud::NetworkServices::V1::DepService::Client.new
877
+ #
878
+ # # Create a request. To set request fields, pass in keyword arguments.
879
+ # request = Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest.new
880
+ #
881
+ # # Call the get_lb_route_extension method.
882
+ # result = client.get_lb_route_extension request
883
+ #
884
+ # # The returned object is of type Google::Cloud::NetworkServices::V1::LbRouteExtension.
885
+ # p result
886
+ #
887
+ def get_lb_route_extension request, options = nil
888
+ raise ::ArgumentError, "request must be provided" if request.nil?
889
+
890
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest
891
+
892
+ # Converts hash and nil to an options object
893
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
894
+
895
+ # Customize the options with defaults
896
+ metadata = @config.rpcs.get_lb_route_extension.metadata.to_h
897
+
898
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
899
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
900
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
901
+ gapic_version: ::Google::Cloud::NetworkServices::V1::VERSION
902
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
903
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
904
+
905
+ header_params = {}
906
+ if request.name
907
+ header_params["name"] = request.name
908
+ end
909
+
910
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
911
+ metadata[:"x-goog-request-params"] ||= request_params_header
912
+
913
+ options.apply_defaults timeout: @config.rpcs.get_lb_route_extension.timeout,
914
+ metadata: metadata,
915
+ retry_policy: @config.rpcs.get_lb_route_extension.retry_policy
916
+
917
+ options.apply_defaults timeout: @config.timeout,
918
+ metadata: @config.metadata,
919
+ retry_policy: @config.retry_policy
920
+
921
+ @dep_service_stub.call_rpc :get_lb_route_extension, request, options: options do |response, operation|
922
+ yield response, operation if block_given?
923
+ return response
924
+ end
925
+ rescue ::GRPC::BadStatus => e
926
+ raise ::Google::Cloud::Error.from_error(e)
927
+ end
928
+
929
+ ##
930
+ # Creates a new `LbRouteExtension` resource in a given project and location.
931
+ #
932
+ # @overload create_lb_route_extension(request, options = nil)
933
+ # Pass arguments to `create_lb_route_extension` via a request object, either of type
934
+ # {::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest} or an equivalent Hash.
935
+ #
936
+ # @param request [::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest, ::Hash]
937
+ # A request object representing the call parameters. Required. To specify no
938
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
939
+ # @param options [::Gapic::CallOptions, ::Hash]
940
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
941
+ #
942
+ # @overload create_lb_route_extension(parent: nil, lb_route_extension_id: nil, lb_route_extension: nil, request_id: nil)
943
+ # Pass arguments to `create_lb_route_extension` via keyword arguments. Note that at
944
+ # least one keyword argument is required. To specify no parameters, or to keep all
945
+ # the default parameter values, pass an empty Hash as a request object (see above).
946
+ #
947
+ # @param parent [::String]
948
+ # Required. The parent resource of the `LbRouteExtension` resource. Must be
949
+ # in the format `projects/{project}/locations/{location}`.
950
+ # @param lb_route_extension_id [::String]
951
+ # Required. User-provided ID of the `LbRouteExtension` resource to be
952
+ # created.
953
+ # @param lb_route_extension [::Google::Cloud::NetworkServices::V1::LbRouteExtension, ::Hash]
954
+ # Required. `LbRouteExtension` resource to be created.
955
+ # @param request_id [::String]
956
+ # Optional. An optional request ID to identify requests. Specify a unique
957
+ # request ID so that if you must retry your request, the server can ignore
958
+ # the request if it has already been completed. The server guarantees
959
+ # that for at least 60 minutes since the first request.
960
+ #
961
+ # For example, consider a situation where you make an initial request and the
962
+ # request times out. If you make the request again with the same request
963
+ # ID, the server can check if original operation with the same request ID
964
+ # was received, and if so, ignores the second request. This prevents
965
+ # clients from accidentally creating duplicate commitments.
966
+ #
967
+ # The request ID must be a valid UUID with the exception that zero UUID is
968
+ # not supported (00000000-0000-0000-0000-000000000000).
969
+ #
970
+ # @yield [response, operation] Access the result along with the RPC operation
971
+ # @yieldparam response [::Gapic::Operation]
972
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
973
+ #
974
+ # @return [::Gapic::Operation]
975
+ #
976
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
977
+ #
978
+ # @example Basic example
979
+ # require "google/cloud/network_services/v1"
980
+ #
981
+ # # Create a client object. The client can be reused for multiple calls.
982
+ # client = Google::Cloud::NetworkServices::V1::DepService::Client.new
983
+ #
984
+ # # Create a request. To set request fields, pass in keyword arguments.
985
+ # request = Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest.new
986
+ #
987
+ # # Call the create_lb_route_extension method.
988
+ # result = client.create_lb_route_extension request
989
+ #
990
+ # # The returned object is of type Gapic::Operation. You can use it to
991
+ # # check the status of an operation, cancel it, or wait for results.
992
+ # # Here is how to wait for a response.
993
+ # result.wait_until_done! timeout: 60
994
+ # if result.response?
995
+ # p result.response
996
+ # else
997
+ # puts "No response received."
998
+ # end
999
+ #
1000
+ def create_lb_route_extension request, options = nil
1001
+ raise ::ArgumentError, "request must be provided" if request.nil?
1002
+
1003
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest
1004
+
1005
+ # Converts hash and nil to an options object
1006
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1007
+
1008
+ # Customize the options with defaults
1009
+ metadata = @config.rpcs.create_lb_route_extension.metadata.to_h
1010
+
1011
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1012
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1013
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1014
+ gapic_version: ::Google::Cloud::NetworkServices::V1::VERSION
1015
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1016
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1017
+
1018
+ header_params = {}
1019
+ if request.parent
1020
+ header_params["parent"] = request.parent
1021
+ end
1022
+
1023
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1024
+ metadata[:"x-goog-request-params"] ||= request_params_header
1025
+
1026
+ options.apply_defaults timeout: @config.rpcs.create_lb_route_extension.timeout,
1027
+ metadata: metadata,
1028
+ retry_policy: @config.rpcs.create_lb_route_extension.retry_policy
1029
+
1030
+ options.apply_defaults timeout: @config.timeout,
1031
+ metadata: @config.metadata,
1032
+ retry_policy: @config.retry_policy
1033
+
1034
+ @dep_service_stub.call_rpc :create_lb_route_extension, request, options: options do |response, operation|
1035
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1036
+ yield response, operation if block_given?
1037
+ return response
1038
+ end
1039
+ rescue ::GRPC::BadStatus => e
1040
+ raise ::Google::Cloud::Error.from_error(e)
1041
+ end
1042
+
1043
+ ##
1044
+ # Updates the parameters of the specified `LbRouteExtension` resource.
1045
+ #
1046
+ # @overload update_lb_route_extension(request, options = nil)
1047
+ # Pass arguments to `update_lb_route_extension` via a request object, either of type
1048
+ # {::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest} or an equivalent Hash.
1049
+ #
1050
+ # @param request [::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest, ::Hash]
1051
+ # A request object representing the call parameters. Required. To specify no
1052
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1053
+ # @param options [::Gapic::CallOptions, ::Hash]
1054
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1055
+ #
1056
+ # @overload update_lb_route_extension(update_mask: nil, lb_route_extension: nil, request_id: nil)
1057
+ # Pass arguments to `update_lb_route_extension` via keyword arguments. Note that at
1058
+ # least one keyword argument is required. To specify no parameters, or to keep all
1059
+ # the default parameter values, pass an empty Hash as a request object (see above).
1060
+ #
1061
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1062
+ # Required. Used to specify the fields to be overwritten in the
1063
+ # `LbRouteExtension` resource by the update.
1064
+ # The fields specified in the update_mask are relative to the resource, not
1065
+ # the full request. A field is overwritten if it is in the mask. If the
1066
+ # user does not specify a mask, then all fields are overwritten.
1067
+ # @param lb_route_extension [::Google::Cloud::NetworkServices::V1::LbRouteExtension, ::Hash]
1068
+ # Required. `LbRouteExtension` resource being updated.
1069
+ # @param request_id [::String]
1070
+ # Optional. An optional request ID to identify requests. Specify a unique
1071
+ # request ID so that if you must retry your request, the server can ignore
1072
+ # the request if it has already been completed. The server guarantees
1073
+ # that for at least 60 minutes since the first request.
1074
+ #
1075
+ # For example, consider a situation where you make an initial request and the
1076
+ # request times out. If you make the request again with the same request
1077
+ # ID, the server can check if original operation with the same request ID
1078
+ # was received, and if so, ignores the second request. This prevents
1079
+ # clients from accidentally creating duplicate commitments.
1080
+ #
1081
+ # The request ID must be a valid UUID with the exception that zero UUID is
1082
+ # not supported (00000000-0000-0000-0000-000000000000).
1083
+ #
1084
+ # @yield [response, operation] Access the result along with the RPC operation
1085
+ # @yieldparam response [::Gapic::Operation]
1086
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1087
+ #
1088
+ # @return [::Gapic::Operation]
1089
+ #
1090
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1091
+ #
1092
+ # @example Basic example
1093
+ # require "google/cloud/network_services/v1"
1094
+ #
1095
+ # # Create a client object. The client can be reused for multiple calls.
1096
+ # client = Google::Cloud::NetworkServices::V1::DepService::Client.new
1097
+ #
1098
+ # # Create a request. To set request fields, pass in keyword arguments.
1099
+ # request = Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest.new
1100
+ #
1101
+ # # Call the update_lb_route_extension method.
1102
+ # result = client.update_lb_route_extension request
1103
+ #
1104
+ # # The returned object is of type Gapic::Operation. You can use it to
1105
+ # # check the status of an operation, cancel it, or wait for results.
1106
+ # # Here is how to wait for a response.
1107
+ # result.wait_until_done! timeout: 60
1108
+ # if result.response?
1109
+ # p result.response
1110
+ # else
1111
+ # puts "No response received."
1112
+ # end
1113
+ #
1114
+ def update_lb_route_extension request, options = nil
1115
+ raise ::ArgumentError, "request must be provided" if request.nil?
1116
+
1117
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest
1118
+
1119
+ # Converts hash and nil to an options object
1120
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1121
+
1122
+ # Customize the options with defaults
1123
+ metadata = @config.rpcs.update_lb_route_extension.metadata.to_h
1124
+
1125
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1126
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1127
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1128
+ gapic_version: ::Google::Cloud::NetworkServices::V1::VERSION
1129
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1130
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1131
+
1132
+ header_params = {}
1133
+ if request.lb_route_extension&.name
1134
+ header_params["lb_route_extension.name"] = request.lb_route_extension.name
1135
+ end
1136
+
1137
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1138
+ metadata[:"x-goog-request-params"] ||= request_params_header
1139
+
1140
+ options.apply_defaults timeout: @config.rpcs.update_lb_route_extension.timeout,
1141
+ metadata: metadata,
1142
+ retry_policy: @config.rpcs.update_lb_route_extension.retry_policy
1143
+
1144
+ options.apply_defaults timeout: @config.timeout,
1145
+ metadata: @config.metadata,
1146
+ retry_policy: @config.retry_policy
1147
+
1148
+ @dep_service_stub.call_rpc :update_lb_route_extension, request, options: options do |response, operation|
1149
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1150
+ yield response, operation if block_given?
1151
+ return response
1152
+ end
1153
+ rescue ::GRPC::BadStatus => e
1154
+ raise ::Google::Cloud::Error.from_error(e)
1155
+ end
1156
+
1157
+ ##
1158
+ # Deletes the specified `LbRouteExtension` resource.
1159
+ #
1160
+ # @overload delete_lb_route_extension(request, options = nil)
1161
+ # Pass arguments to `delete_lb_route_extension` via a request object, either of type
1162
+ # {::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest} or an equivalent Hash.
1163
+ #
1164
+ # @param request [::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest, ::Hash]
1165
+ # A request object representing the call parameters. Required. To specify no
1166
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1167
+ # @param options [::Gapic::CallOptions, ::Hash]
1168
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1169
+ #
1170
+ # @overload delete_lb_route_extension(name: nil, request_id: nil)
1171
+ # Pass arguments to `delete_lb_route_extension` via keyword arguments. Note that at
1172
+ # least one keyword argument is required. To specify no parameters, or to keep all
1173
+ # the default parameter values, pass an empty Hash as a request object (see above).
1174
+ #
1175
+ # @param name [::String]
1176
+ # Required. The name of the `LbRouteExtension` resource to delete. Must be in
1177
+ # the format
1178
+ # `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.
1179
+ # @param request_id [::String]
1180
+ # Optional. An optional request ID to identify requests. Specify a unique
1181
+ # request ID so that if you must retry your request, the server can ignore
1182
+ # the request if it has already been completed. The server guarantees
1183
+ # that for at least 60 minutes after the first request.
1184
+ #
1185
+ # For example, consider a situation where you make an initial request and the
1186
+ # request times out. If you make the request again with the same request
1187
+ # ID, the server can check if original operation with the same request ID
1188
+ # was received, and if so, ignores the second request. This prevents
1189
+ # clients from accidentally creating duplicate commitments.
1190
+ #
1191
+ # The request ID must be a valid UUID with the exception that zero UUID is
1192
+ # not supported (00000000-0000-0000-0000-000000000000).
1193
+ #
1194
+ # @yield [response, operation] Access the result along with the RPC operation
1195
+ # @yieldparam response [::Gapic::Operation]
1196
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1197
+ #
1198
+ # @return [::Gapic::Operation]
1199
+ #
1200
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1201
+ #
1202
+ # @example Basic example
1203
+ # require "google/cloud/network_services/v1"
1204
+ #
1205
+ # # Create a client object. The client can be reused for multiple calls.
1206
+ # client = Google::Cloud::NetworkServices::V1::DepService::Client.new
1207
+ #
1208
+ # # Create a request. To set request fields, pass in keyword arguments.
1209
+ # request = Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest.new
1210
+ #
1211
+ # # Call the delete_lb_route_extension method.
1212
+ # result = client.delete_lb_route_extension request
1213
+ #
1214
+ # # The returned object is of type Gapic::Operation. You can use it to
1215
+ # # check the status of an operation, cancel it, or wait for results.
1216
+ # # Here is how to wait for a response.
1217
+ # result.wait_until_done! timeout: 60
1218
+ # if result.response?
1219
+ # p result.response
1220
+ # else
1221
+ # puts "No response received."
1222
+ # end
1223
+ #
1224
+ def delete_lb_route_extension request, options = nil
1225
+ raise ::ArgumentError, "request must be provided" if request.nil?
1226
+
1227
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest
1228
+
1229
+ # Converts hash and nil to an options object
1230
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1231
+
1232
+ # Customize the options with defaults
1233
+ metadata = @config.rpcs.delete_lb_route_extension.metadata.to_h
1234
+
1235
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1236
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1237
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1238
+ gapic_version: ::Google::Cloud::NetworkServices::V1::VERSION
1239
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1240
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1241
+
1242
+ header_params = {}
1243
+ if request.name
1244
+ header_params["name"] = request.name
1245
+ end
1246
+
1247
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1248
+ metadata[:"x-goog-request-params"] ||= request_params_header
1249
+
1250
+ options.apply_defaults timeout: @config.rpcs.delete_lb_route_extension.timeout,
1251
+ metadata: metadata,
1252
+ retry_policy: @config.rpcs.delete_lb_route_extension.retry_policy
1253
+
1254
+ options.apply_defaults timeout: @config.timeout,
1255
+ metadata: @config.metadata,
1256
+ retry_policy: @config.retry_policy
1257
+
1258
+ @dep_service_stub.call_rpc :delete_lb_route_extension, request, options: options do |response, operation|
1259
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1260
+ yield response, operation if block_given?
1261
+ return response
1262
+ end
1263
+ rescue ::GRPC::BadStatus => e
1264
+ raise ::Google::Cloud::Error.from_error(e)
1265
+ end
1266
+
1267
+ ##
1268
+ # Configuration class for the DepService API.
1269
+ #
1270
+ # This class represents the configuration for DepService,
1271
+ # providing control over timeouts, retry behavior, logging, transport
1272
+ # parameters, and other low-level controls. Certain parameters can also be
1273
+ # applied individually to specific RPCs. See
1274
+ # {::Google::Cloud::NetworkServices::V1::DepService::Client::Configuration::Rpcs}
1275
+ # for a list of RPCs that can be configured independently.
1276
+ #
1277
+ # Configuration can be applied globally to all clients, or to a single client
1278
+ # on construction.
1279
+ #
1280
+ # @example
1281
+ #
1282
+ # # Modify the global config, setting the timeout for
1283
+ # # list_lb_traffic_extensions to 20 seconds,
1284
+ # # and all remaining timeouts to 10 seconds.
1285
+ # ::Google::Cloud::NetworkServices::V1::DepService::Client.configure do |config|
1286
+ # config.timeout = 10.0
1287
+ # config.rpcs.list_lb_traffic_extensions.timeout = 20.0
1288
+ # end
1289
+ #
1290
+ # # Apply the above configuration only to a new client.
1291
+ # client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config|
1292
+ # config.timeout = 10.0
1293
+ # config.rpcs.list_lb_traffic_extensions.timeout = 20.0
1294
+ # end
1295
+ #
1296
+ # @!attribute [rw] endpoint
1297
+ # A custom service endpoint, as a hostname or hostname:port. The default is
1298
+ # nil, indicating to use the default endpoint in the current universe domain.
1299
+ # @return [::String,nil]
1300
+ # @!attribute [rw] credentials
1301
+ # Credentials to send with calls. You may provide any of the following types:
1302
+ # * (`String`) The path to a service account key file in JSON format
1303
+ # * (`Hash`) A service account key as a Hash
1304
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1305
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1306
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1307
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1308
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
1309
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
1310
+ # * (`nil`) indicating no credentials
1311
+ # @return [::Object]
1312
+ # @!attribute [rw] scope
1313
+ # The OAuth scopes
1314
+ # @return [::Array<::String>]
1315
+ # @!attribute [rw] lib_name
1316
+ # The library name as recorded in instrumentation and logging
1317
+ # @return [::String]
1318
+ # @!attribute [rw] lib_version
1319
+ # The library version as recorded in instrumentation and logging
1320
+ # @return [::String]
1321
+ # @!attribute [rw] channel_args
1322
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
1323
+ # `GRPC::Core::Channel` object is provided as the credential.
1324
+ # @return [::Hash]
1325
+ # @!attribute [rw] interceptors
1326
+ # An array of interceptors that are run before calls are executed.
1327
+ # @return [::Array<::GRPC::ClientInterceptor>]
1328
+ # @!attribute [rw] timeout
1329
+ # The call timeout in seconds.
1330
+ # @return [::Numeric]
1331
+ # @!attribute [rw] metadata
1332
+ # Additional gRPC headers to be sent with the call.
1333
+ # @return [::Hash{::Symbol=>::String}]
1334
+ # @!attribute [rw] retry_policy
1335
+ # The retry policy. The value is a hash with the following keys:
1336
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1337
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1338
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1339
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1340
+ # trigger a retry.
1341
+ # @return [::Hash]
1342
+ # @!attribute [rw] quota_project
1343
+ # A separate project against which to charge quota.
1344
+ # @return [::String]
1345
+ # @!attribute [rw] universe_domain
1346
+ # The universe domain within which to make requests. This determines the
1347
+ # default endpoint URL. The default value of nil uses the environment
1348
+ # universe (usually the default "googleapis.com" universe).
1349
+ # @return [::String,nil]
1350
+ #
1351
+ class Configuration
1352
+ extend ::Gapic::Config
1353
+
1354
+ # @private
1355
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1356
+ DEFAULT_ENDPOINT = "networkservices.googleapis.com"
1357
+
1358
+ config_attr :endpoint, nil, ::String, nil
1359
+ config_attr :credentials, nil do |value|
1360
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1361
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
1362
+ allowed.any? { |klass| klass === value }
1363
+ end
1364
+ config_attr :scope, nil, ::String, ::Array, nil
1365
+ config_attr :lib_name, nil, ::String, nil
1366
+ config_attr :lib_version, nil, ::String, nil
1367
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
1368
+ config_attr :interceptors, nil, ::Array, nil
1369
+ config_attr :timeout, nil, ::Numeric, nil
1370
+ config_attr :metadata, nil, ::Hash, nil
1371
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1372
+ config_attr :quota_project, nil, ::String, nil
1373
+ config_attr :universe_domain, nil, ::String, nil
1374
+
1375
+ # @private
1376
+ def initialize parent_config = nil
1377
+ @parent_config = parent_config unless parent_config.nil?
1378
+
1379
+ yield self if block_given?
1380
+ end
1381
+
1382
+ ##
1383
+ # Configurations for individual RPCs
1384
+ # @return [Rpcs]
1385
+ #
1386
+ def rpcs
1387
+ @rpcs ||= begin
1388
+ parent_rpcs = nil
1389
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1390
+ Rpcs.new parent_rpcs
1391
+ end
1392
+ end
1393
+
1394
+ ##
1395
+ # Configuration for the channel pool
1396
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
1397
+ #
1398
+ def channel_pool
1399
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
1400
+ end
1401
+
1402
+ ##
1403
+ # Configuration RPC class for the DepService API.
1404
+ #
1405
+ # Includes fields providing the configuration for each RPC in this service.
1406
+ # Each configuration object is of type `Gapic::Config::Method` and includes
1407
+ # the following configuration fields:
1408
+ #
1409
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1410
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
1411
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1412
+ # include the following keys:
1413
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1414
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1415
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1416
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1417
+ # trigger a retry.
1418
+ #
1419
+ class Rpcs
1420
+ ##
1421
+ # RPC-specific configuration for `list_lb_traffic_extensions`
1422
+ # @return [::Gapic::Config::Method]
1423
+ #
1424
+ attr_reader :list_lb_traffic_extensions
1425
+ ##
1426
+ # RPC-specific configuration for `get_lb_traffic_extension`
1427
+ # @return [::Gapic::Config::Method]
1428
+ #
1429
+ attr_reader :get_lb_traffic_extension
1430
+ ##
1431
+ # RPC-specific configuration for `create_lb_traffic_extension`
1432
+ # @return [::Gapic::Config::Method]
1433
+ #
1434
+ attr_reader :create_lb_traffic_extension
1435
+ ##
1436
+ # RPC-specific configuration for `update_lb_traffic_extension`
1437
+ # @return [::Gapic::Config::Method]
1438
+ #
1439
+ attr_reader :update_lb_traffic_extension
1440
+ ##
1441
+ # RPC-specific configuration for `delete_lb_traffic_extension`
1442
+ # @return [::Gapic::Config::Method]
1443
+ #
1444
+ attr_reader :delete_lb_traffic_extension
1445
+ ##
1446
+ # RPC-specific configuration for `list_lb_route_extensions`
1447
+ # @return [::Gapic::Config::Method]
1448
+ #
1449
+ attr_reader :list_lb_route_extensions
1450
+ ##
1451
+ # RPC-specific configuration for `get_lb_route_extension`
1452
+ # @return [::Gapic::Config::Method]
1453
+ #
1454
+ attr_reader :get_lb_route_extension
1455
+ ##
1456
+ # RPC-specific configuration for `create_lb_route_extension`
1457
+ # @return [::Gapic::Config::Method]
1458
+ #
1459
+ attr_reader :create_lb_route_extension
1460
+ ##
1461
+ # RPC-specific configuration for `update_lb_route_extension`
1462
+ # @return [::Gapic::Config::Method]
1463
+ #
1464
+ attr_reader :update_lb_route_extension
1465
+ ##
1466
+ # RPC-specific configuration for `delete_lb_route_extension`
1467
+ # @return [::Gapic::Config::Method]
1468
+ #
1469
+ attr_reader :delete_lb_route_extension
1470
+
1471
+ # @private
1472
+ def initialize parent_rpcs = nil
1473
+ list_lb_traffic_extensions_config = parent_rpcs.list_lb_traffic_extensions if parent_rpcs.respond_to? :list_lb_traffic_extensions
1474
+ @list_lb_traffic_extensions = ::Gapic::Config::Method.new list_lb_traffic_extensions_config
1475
+ get_lb_traffic_extension_config = parent_rpcs.get_lb_traffic_extension if parent_rpcs.respond_to? :get_lb_traffic_extension
1476
+ @get_lb_traffic_extension = ::Gapic::Config::Method.new get_lb_traffic_extension_config
1477
+ create_lb_traffic_extension_config = parent_rpcs.create_lb_traffic_extension if parent_rpcs.respond_to? :create_lb_traffic_extension
1478
+ @create_lb_traffic_extension = ::Gapic::Config::Method.new create_lb_traffic_extension_config
1479
+ update_lb_traffic_extension_config = parent_rpcs.update_lb_traffic_extension if parent_rpcs.respond_to? :update_lb_traffic_extension
1480
+ @update_lb_traffic_extension = ::Gapic::Config::Method.new update_lb_traffic_extension_config
1481
+ delete_lb_traffic_extension_config = parent_rpcs.delete_lb_traffic_extension if parent_rpcs.respond_to? :delete_lb_traffic_extension
1482
+ @delete_lb_traffic_extension = ::Gapic::Config::Method.new delete_lb_traffic_extension_config
1483
+ list_lb_route_extensions_config = parent_rpcs.list_lb_route_extensions if parent_rpcs.respond_to? :list_lb_route_extensions
1484
+ @list_lb_route_extensions = ::Gapic::Config::Method.new list_lb_route_extensions_config
1485
+ get_lb_route_extension_config = parent_rpcs.get_lb_route_extension if parent_rpcs.respond_to? :get_lb_route_extension
1486
+ @get_lb_route_extension = ::Gapic::Config::Method.new get_lb_route_extension_config
1487
+ create_lb_route_extension_config = parent_rpcs.create_lb_route_extension if parent_rpcs.respond_to? :create_lb_route_extension
1488
+ @create_lb_route_extension = ::Gapic::Config::Method.new create_lb_route_extension_config
1489
+ update_lb_route_extension_config = parent_rpcs.update_lb_route_extension if parent_rpcs.respond_to? :update_lb_route_extension
1490
+ @update_lb_route_extension = ::Gapic::Config::Method.new update_lb_route_extension_config
1491
+ delete_lb_route_extension_config = parent_rpcs.delete_lb_route_extension if parent_rpcs.respond_to? :delete_lb_route_extension
1492
+ @delete_lb_route_extension = ::Gapic::Config::Method.new delete_lb_route_extension_config
1493
+
1494
+ yield self if block_given?
1495
+ end
1496
+ end
1497
+ end
1498
+ end
1499
+ end
1500
+ end
1501
+ end
1502
+ end
1503
+ end