google-cloud-edge_container-v1 0.a → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +144 -8
  5. data/lib/google/cloud/edge_container/v1/bindings_override.rb +102 -0
  6. data/lib/google/cloud/edge_container/v1/edge_container/client.rb +2486 -0
  7. data/lib/google/cloud/edge_container/v1/edge_container/credentials.rb +47 -0
  8. data/lib/google/cloud/edge_container/v1/edge_container/operations.rb +809 -0
  9. data/lib/google/cloud/edge_container/v1/edge_container/paths.rb +172 -0
  10. data/lib/google/cloud/edge_container/v1/edge_container/rest/client.rb +2324 -0
  11. data/lib/google/cloud/edge_container/v1/edge_container/rest/operations.rb +902 -0
  12. data/lib/google/cloud/edge_container/v1/edge_container/rest/service_stub.rb +1255 -0
  13. data/lib/google/cloud/edge_container/v1/edge_container/rest.rb +55 -0
  14. data/lib/google/cloud/edge_container/v1/edge_container.rb +57 -0
  15. data/lib/google/cloud/edge_container/v1/rest.rb +38 -0
  16. data/lib/google/cloud/edge_container/v1/version.rb +7 -2
  17. data/lib/google/cloud/edge_container/v1.rb +45 -0
  18. data/lib/google/cloud/edgecontainer/v1/resources_pb.rb +92 -0
  19. data/lib/google/cloud/edgecontainer/v1/service_pb.rb +81 -0
  20. data/lib/google/cloud/edgecontainer/v1/service_services_pb.rb +84 -0
  21. data/lib/google-cloud-edge_container-v1.rb +21 -0
  22. data/proto_docs/README.md +4 -0
  23. data/proto_docs/google/api/client.rb +420 -0
  24. data/proto_docs/google/api/field_behavior.rb +85 -0
  25. data/proto_docs/google/api/launch_stage.rb +71 -0
  26. data/proto_docs/google/api/resource.rb +227 -0
  27. data/proto_docs/google/cloud/edgecontainer/v1/resources.rb +881 -0
  28. data/proto_docs/google/cloud/edgecontainer/v1/service.rb +475 -0
  29. data/proto_docs/google/longrunning/operations.rb +164 -0
  30. data/proto_docs/google/protobuf/any.rb +145 -0
  31. data/proto_docs/google/protobuf/duration.rb +98 -0
  32. data/proto_docs/google/protobuf/empty.rb +34 -0
  33. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  34. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  35. data/proto_docs/google/rpc/status.rb +48 -0
  36. metadata +96 -10
@@ -0,0 +1,2486 @@
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/edgecontainer/v1/service_pb"
21
+ require "google/cloud/location"
22
+
23
+ module Google
24
+ module Cloud
25
+ module EdgeContainer
26
+ module V1
27
+ module EdgeContainer
28
+ ##
29
+ # Client for the EdgeContainer service.
30
+ #
31
+ # EdgeContainer API provides management of Kubernetes Clusters on Google Edge
32
+ # Cloud deployments.
33
+ #
34
+ class Client
35
+ # @private
36
+ API_VERSION = ""
37
+
38
+ # @private
39
+ DEFAULT_ENDPOINT_TEMPLATE = "edgecontainer.$UNIVERSE_DOMAIN$"
40
+
41
+ include Paths
42
+
43
+ # @private
44
+ attr_reader :edge_container_stub
45
+
46
+ ##
47
+ # Configure the EdgeContainer Client class.
48
+ #
49
+ # See {::Google::Cloud::EdgeContainer::V1::EdgeContainer::Client::Configuration}
50
+ # for a description of the configuration fields.
51
+ #
52
+ # @example
53
+ #
54
+ # # Modify the configuration for all EdgeContainer clients
55
+ # ::Google::Cloud::EdgeContainer::V1::EdgeContainer::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", "EdgeContainer", "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.rpcs.list_clusters.timeout = 60.0
76
+ default_config.rpcs.list_clusters.retry_policy = {
77
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
78
+ }
79
+
80
+ default_config.rpcs.get_cluster.timeout = 60.0
81
+ default_config.rpcs.get_cluster.retry_policy = {
82
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
83
+ }
84
+
85
+ default_config.rpcs.create_cluster.timeout = 60.0
86
+
87
+ default_config.rpcs.update_cluster.timeout = 60.0
88
+
89
+ default_config.rpcs.upgrade_cluster.timeout = 60.0
90
+
91
+ default_config.rpcs.delete_cluster.timeout = 60.0
92
+
93
+ default_config.rpcs.generate_access_token.timeout = 60.0
94
+ default_config.rpcs.generate_access_token.retry_policy = {
95
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
96
+ }
97
+
98
+ default_config.rpcs.generate_offline_credential.timeout = 60.0
99
+ default_config.rpcs.generate_offline_credential.retry_policy = {
100
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
101
+ }
102
+
103
+ default_config.rpcs.list_node_pools.timeout = 60.0
104
+ default_config.rpcs.list_node_pools.retry_policy = {
105
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
106
+ }
107
+
108
+ default_config.rpcs.get_node_pool.timeout = 60.0
109
+ default_config.rpcs.get_node_pool.retry_policy = {
110
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
111
+ }
112
+
113
+ default_config.rpcs.create_node_pool.timeout = 60.0
114
+
115
+ default_config.rpcs.update_node_pool.timeout = 60.0
116
+
117
+ default_config.rpcs.delete_node_pool.timeout = 60.0
118
+
119
+ default_config.rpcs.list_machines.timeout = 60.0
120
+ default_config.rpcs.list_machines.retry_policy = {
121
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
122
+ }
123
+
124
+ default_config.rpcs.get_machine.timeout = 60.0
125
+ default_config.rpcs.get_machine.retry_policy = {
126
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
127
+ }
128
+
129
+ default_config.rpcs.list_vpn_connections.timeout = 60.0
130
+ default_config.rpcs.list_vpn_connections.retry_policy = {
131
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
132
+ }
133
+
134
+ default_config.rpcs.get_vpn_connection.timeout = 60.0
135
+ default_config.rpcs.get_vpn_connection.retry_policy = {
136
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
137
+ }
138
+
139
+ default_config.rpcs.create_vpn_connection.timeout = 60.0
140
+
141
+ default_config.rpcs.delete_vpn_connection.timeout = 60.0
142
+
143
+ default_config.rpcs.get_server_config.timeout = 60.0
144
+ default_config.rpcs.get_server_config.retry_policy = {
145
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
146
+ }
147
+
148
+ default_config
149
+ end
150
+ yield @configure if block_given?
151
+ @configure
152
+ end
153
+
154
+ ##
155
+ # Configure the EdgeContainer Client instance.
156
+ #
157
+ # The configuration is set to the derived mode, meaning that values can be changed,
158
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
159
+ # should be made on {Client.configure}.
160
+ #
161
+ # See {::Google::Cloud::EdgeContainer::V1::EdgeContainer::Client::Configuration}
162
+ # for a description of the configuration fields.
163
+ #
164
+ # @yield [config] Configure the Client client.
165
+ # @yieldparam config [Client::Configuration]
166
+ #
167
+ # @return [Client::Configuration]
168
+ #
169
+ def configure
170
+ yield @config if block_given?
171
+ @config
172
+ end
173
+
174
+ ##
175
+ # The effective universe domain
176
+ #
177
+ # @return [String]
178
+ #
179
+ def universe_domain
180
+ @edge_container_stub.universe_domain
181
+ end
182
+
183
+ ##
184
+ # Create a new EdgeContainer client object.
185
+ #
186
+ # @example
187
+ #
188
+ # # Create a client using the default configuration
189
+ # client = ::Google::Cloud::EdgeContainer::V1::EdgeContainer::Client.new
190
+ #
191
+ # # Create a client using a custom configuration
192
+ # client = ::Google::Cloud::EdgeContainer::V1::EdgeContainer::Client.new do |config|
193
+ # config.timeout = 10.0
194
+ # end
195
+ #
196
+ # @yield [config] Configure the EdgeContainer client.
197
+ # @yieldparam config [Client::Configuration]
198
+ #
199
+ def initialize
200
+ # These require statements are intentionally placed here to initialize
201
+ # the gRPC module only when it's required.
202
+ # See https://github.com/googleapis/toolkit/issues/446
203
+ require "gapic/grpc"
204
+ require "google/cloud/edgecontainer/v1/service_services_pb"
205
+
206
+ # Create the configuration object
207
+ @config = Configuration.new Client.configure
208
+
209
+ # Yield the configuration if needed
210
+ yield @config if block_given?
211
+
212
+ # Create credentials
213
+ credentials = @config.credentials
214
+ # Use self-signed JWT if the endpoint is unchanged from default,
215
+ # but only if the default endpoint does not have a region prefix.
216
+ enable_self_signed_jwt = @config.endpoint.nil? ||
217
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
218
+ !@config.endpoint.split(".").first.include?("-"))
219
+ credentials ||= Credentials.default scope: @config.scope,
220
+ enable_self_signed_jwt: enable_self_signed_jwt
221
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
222
+ credentials = Credentials.new credentials, scope: @config.scope
223
+ end
224
+ @quota_project_id = @config.quota_project
225
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
226
+
227
+ @operations_client = Operations.new do |config|
228
+ config.credentials = credentials
229
+ config.quota_project = @quota_project_id
230
+ config.endpoint = @config.endpoint
231
+ config.universe_domain = @config.universe_domain
232
+ end
233
+
234
+ @edge_container_stub = ::Gapic::ServiceStub.new(
235
+ ::Google::Cloud::EdgeContainer::V1::EdgeContainer::Stub,
236
+ credentials: credentials,
237
+ endpoint: @config.endpoint,
238
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
239
+ universe_domain: @config.universe_domain,
240
+ channel_args: @config.channel_args,
241
+ interceptors: @config.interceptors,
242
+ channel_pool_config: @config.channel_pool
243
+ )
244
+
245
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
246
+ config.credentials = credentials
247
+ config.quota_project = @quota_project_id
248
+ config.endpoint = @edge_container_stub.endpoint
249
+ config.universe_domain = @edge_container_stub.universe_domain
250
+ end
251
+ end
252
+
253
+ ##
254
+ # Get the associated client for long-running operations.
255
+ #
256
+ # @return [::Google::Cloud::EdgeContainer::V1::EdgeContainer::Operations]
257
+ #
258
+ attr_reader :operations_client
259
+
260
+ ##
261
+ # Get the associated client for mix-in of the Locations.
262
+ #
263
+ # @return [Google::Cloud::Location::Locations::Client]
264
+ #
265
+ attr_reader :location_client
266
+
267
+ # Service calls
268
+
269
+ ##
270
+ # Lists Clusters in a given project and location.
271
+ #
272
+ # @overload list_clusters(request, options = nil)
273
+ # Pass arguments to `list_clusters` via a request object, either of type
274
+ # {::Google::Cloud::EdgeContainer::V1::ListClustersRequest} or an equivalent Hash.
275
+ #
276
+ # @param request [::Google::Cloud::EdgeContainer::V1::ListClustersRequest, ::Hash]
277
+ # A request object representing the call parameters. Required. To specify no
278
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
279
+ # @param options [::Gapic::CallOptions, ::Hash]
280
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
281
+ #
282
+ # @overload list_clusters(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
283
+ # Pass arguments to `list_clusters` via keyword arguments. Note that at
284
+ # least one keyword argument is required. To specify no parameters, or to keep all
285
+ # the default parameter values, pass an empty Hash as a request object (see above).
286
+ #
287
+ # @param parent [::String]
288
+ # Required. The parent location, which owns this collection of clusters.
289
+ # @param page_size [::Integer]
290
+ # The maximum number of resources to list.
291
+ # @param page_token [::String]
292
+ # A page token received from previous list request.
293
+ # A page token received from previous list request.
294
+ # @param filter [::String]
295
+ # Only resources matching this filter will be listed.
296
+ # @param order_by [::String]
297
+ # Specifies the order in which resources will be listed.
298
+ #
299
+ # @yield [response, operation] Access the result along with the RPC operation
300
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::EdgeContainer::V1::Cluster>]
301
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
302
+ #
303
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::EdgeContainer::V1::Cluster>]
304
+ #
305
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
306
+ #
307
+ # @example Basic example
308
+ # require "google/cloud/edge_container/v1"
309
+ #
310
+ # # Create a client object. The client can be reused for multiple calls.
311
+ # client = Google::Cloud::EdgeContainer::V1::EdgeContainer::Client.new
312
+ #
313
+ # # Create a request. To set request fields, pass in keyword arguments.
314
+ # request = Google::Cloud::EdgeContainer::V1::ListClustersRequest.new
315
+ #
316
+ # # Call the list_clusters method.
317
+ # result = client.list_clusters request
318
+ #
319
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
320
+ # # over elements, and API calls will be issued to fetch pages as needed.
321
+ # result.each do |item|
322
+ # # Each element is of type ::Google::Cloud::EdgeContainer::V1::Cluster.
323
+ # p item
324
+ # end
325
+ #
326
+ def list_clusters request, options = nil
327
+ raise ::ArgumentError, "request must be provided" if request.nil?
328
+
329
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::ListClustersRequest
330
+
331
+ # Converts hash and nil to an options object
332
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
333
+
334
+ # Customize the options with defaults
335
+ metadata = @config.rpcs.list_clusters.metadata.to_h
336
+
337
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
338
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
339
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
340
+ gapic_version: ::Google::Cloud::EdgeContainer::V1::VERSION
341
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
342
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
343
+
344
+ header_params = {}
345
+ if request.parent
346
+ header_params["parent"] = request.parent
347
+ end
348
+
349
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
350
+ metadata[:"x-goog-request-params"] ||= request_params_header
351
+
352
+ options.apply_defaults timeout: @config.rpcs.list_clusters.timeout,
353
+ metadata: metadata,
354
+ retry_policy: @config.rpcs.list_clusters.retry_policy
355
+
356
+ options.apply_defaults timeout: @config.timeout,
357
+ metadata: @config.metadata,
358
+ retry_policy: @config.retry_policy
359
+
360
+ @edge_container_stub.call_rpc :list_clusters, request, options: options do |response, operation|
361
+ response = ::Gapic::PagedEnumerable.new @edge_container_stub, :list_clusters, request, response, operation, options
362
+ yield response, operation if block_given?
363
+ return response
364
+ end
365
+ rescue ::GRPC::BadStatus => e
366
+ raise ::Google::Cloud::Error.from_error(e)
367
+ end
368
+
369
+ ##
370
+ # Gets details of a single Cluster.
371
+ #
372
+ # @overload get_cluster(request, options = nil)
373
+ # Pass arguments to `get_cluster` via a request object, either of type
374
+ # {::Google::Cloud::EdgeContainer::V1::GetClusterRequest} or an equivalent Hash.
375
+ #
376
+ # @param request [::Google::Cloud::EdgeContainer::V1::GetClusterRequest, ::Hash]
377
+ # A request object representing the call parameters. Required. To specify no
378
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
379
+ # @param options [::Gapic::CallOptions, ::Hash]
380
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
381
+ #
382
+ # @overload get_cluster(name: nil)
383
+ # Pass arguments to `get_cluster` via keyword arguments. Note that at
384
+ # least one keyword argument is required. To specify no parameters, or to keep all
385
+ # the default parameter values, pass an empty Hash as a request object (see above).
386
+ #
387
+ # @param name [::String]
388
+ # Required. The resource name of the cluster.
389
+ #
390
+ # @yield [response, operation] Access the result along with the RPC operation
391
+ # @yieldparam response [::Google::Cloud::EdgeContainer::V1::Cluster]
392
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
393
+ #
394
+ # @return [::Google::Cloud::EdgeContainer::V1::Cluster]
395
+ #
396
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
397
+ #
398
+ # @example Basic example
399
+ # require "google/cloud/edge_container/v1"
400
+ #
401
+ # # Create a client object. The client can be reused for multiple calls.
402
+ # client = Google::Cloud::EdgeContainer::V1::EdgeContainer::Client.new
403
+ #
404
+ # # Create a request. To set request fields, pass in keyword arguments.
405
+ # request = Google::Cloud::EdgeContainer::V1::GetClusterRequest.new
406
+ #
407
+ # # Call the get_cluster method.
408
+ # result = client.get_cluster request
409
+ #
410
+ # # The returned object is of type Google::Cloud::EdgeContainer::V1::Cluster.
411
+ # p result
412
+ #
413
+ def get_cluster request, options = nil
414
+ raise ::ArgumentError, "request must be provided" if request.nil?
415
+
416
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::GetClusterRequest
417
+
418
+ # Converts hash and nil to an options object
419
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
420
+
421
+ # Customize the options with defaults
422
+ metadata = @config.rpcs.get_cluster.metadata.to_h
423
+
424
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
425
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
426
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
427
+ gapic_version: ::Google::Cloud::EdgeContainer::V1::VERSION
428
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
429
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
430
+
431
+ header_params = {}
432
+ if request.name
433
+ header_params["name"] = request.name
434
+ end
435
+
436
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
437
+ metadata[:"x-goog-request-params"] ||= request_params_header
438
+
439
+ options.apply_defaults timeout: @config.rpcs.get_cluster.timeout,
440
+ metadata: metadata,
441
+ retry_policy: @config.rpcs.get_cluster.retry_policy
442
+
443
+ options.apply_defaults timeout: @config.timeout,
444
+ metadata: @config.metadata,
445
+ retry_policy: @config.retry_policy
446
+
447
+ @edge_container_stub.call_rpc :get_cluster, request, options: options do |response, operation|
448
+ yield response, operation if block_given?
449
+ return response
450
+ end
451
+ rescue ::GRPC::BadStatus => e
452
+ raise ::Google::Cloud::Error.from_error(e)
453
+ end
454
+
455
+ ##
456
+ # Creates a new Cluster in a given project and location.
457
+ #
458
+ # @overload create_cluster(request, options = nil)
459
+ # Pass arguments to `create_cluster` via a request object, either of type
460
+ # {::Google::Cloud::EdgeContainer::V1::CreateClusterRequest} or an equivalent Hash.
461
+ #
462
+ # @param request [::Google::Cloud::EdgeContainer::V1::CreateClusterRequest, ::Hash]
463
+ # A request object representing the call parameters. Required. To specify no
464
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
465
+ # @param options [::Gapic::CallOptions, ::Hash]
466
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
467
+ #
468
+ # @overload create_cluster(parent: nil, cluster_id: nil, cluster: nil, request_id: nil)
469
+ # Pass arguments to `create_cluster` via keyword arguments. Note that at
470
+ # least one keyword argument is required. To specify no parameters, or to keep all
471
+ # the default parameter values, pass an empty Hash as a request object (see above).
472
+ #
473
+ # @param parent [::String]
474
+ # Required. The parent location where this cluster will be created.
475
+ # @param cluster_id [::String]
476
+ # Required. A client-specified unique identifier for the cluster.
477
+ # @param cluster [::Google::Cloud::EdgeContainer::V1::Cluster, ::Hash]
478
+ # Required. The cluster to create.
479
+ # @param request_id [::String]
480
+ # A unique identifier for this request. Restricted to 36 ASCII characters. A
481
+ # random UUID is recommended. This request is only idempotent if
482
+ # `request_id` is provided.
483
+ #
484
+ # @yield [response, operation] Access the result along with the RPC operation
485
+ # @yieldparam response [::Gapic::Operation]
486
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
487
+ #
488
+ # @return [::Gapic::Operation]
489
+ #
490
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
491
+ #
492
+ # @example Basic example
493
+ # require "google/cloud/edge_container/v1"
494
+ #
495
+ # # Create a client object. The client can be reused for multiple calls.
496
+ # client = Google::Cloud::EdgeContainer::V1::EdgeContainer::Client.new
497
+ #
498
+ # # Create a request. To set request fields, pass in keyword arguments.
499
+ # request = Google::Cloud::EdgeContainer::V1::CreateClusterRequest.new
500
+ #
501
+ # # Call the create_cluster method.
502
+ # result = client.create_cluster request
503
+ #
504
+ # # The returned object is of type Gapic::Operation. You can use it to
505
+ # # check the status of an operation, cancel it, or wait for results.
506
+ # # Here is how to wait for a response.
507
+ # result.wait_until_done! timeout: 60
508
+ # if result.response?
509
+ # p result.response
510
+ # else
511
+ # puts "No response received."
512
+ # end
513
+ #
514
+ def create_cluster request, options = nil
515
+ raise ::ArgumentError, "request must be provided" if request.nil?
516
+
517
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::CreateClusterRequest
518
+
519
+ # Converts hash and nil to an options object
520
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
521
+
522
+ # Customize the options with defaults
523
+ metadata = @config.rpcs.create_cluster.metadata.to_h
524
+
525
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
526
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
527
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
528
+ gapic_version: ::Google::Cloud::EdgeContainer::V1::VERSION
529
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
530
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
531
+
532
+ header_params = {}
533
+ if request.parent
534
+ header_params["parent"] = request.parent
535
+ end
536
+
537
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
538
+ metadata[:"x-goog-request-params"] ||= request_params_header
539
+
540
+ options.apply_defaults timeout: @config.rpcs.create_cluster.timeout,
541
+ metadata: metadata,
542
+ retry_policy: @config.rpcs.create_cluster.retry_policy
543
+
544
+ options.apply_defaults timeout: @config.timeout,
545
+ metadata: @config.metadata,
546
+ retry_policy: @config.retry_policy
547
+
548
+ @edge_container_stub.call_rpc :create_cluster, request, options: options do |response, operation|
549
+ response = ::Gapic::Operation.new response, @operations_client, options: options
550
+ yield response, operation if block_given?
551
+ return response
552
+ end
553
+ rescue ::GRPC::BadStatus => e
554
+ raise ::Google::Cloud::Error.from_error(e)
555
+ end
556
+
557
+ ##
558
+ # Updates the parameters of a single Cluster.
559
+ #
560
+ # @overload update_cluster(request, options = nil)
561
+ # Pass arguments to `update_cluster` via a request object, either of type
562
+ # {::Google::Cloud::EdgeContainer::V1::UpdateClusterRequest} or an equivalent Hash.
563
+ #
564
+ # @param request [::Google::Cloud::EdgeContainer::V1::UpdateClusterRequest, ::Hash]
565
+ # A request object representing the call parameters. Required. To specify no
566
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
567
+ # @param options [::Gapic::CallOptions, ::Hash]
568
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
569
+ #
570
+ # @overload update_cluster(update_mask: nil, cluster: nil, request_id: nil)
571
+ # Pass arguments to `update_cluster` via keyword arguments. Note that at
572
+ # least one keyword argument is required. To specify no parameters, or to keep all
573
+ # the default parameter values, pass an empty Hash as a request object (see above).
574
+ #
575
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
576
+ # Field mask is used to specify the fields to be overwritten in the
577
+ # Cluster resource by the update.
578
+ # The fields specified in the update_mask are relative to the resource, not
579
+ # the full request. A field will be overwritten if it is in the mask. If the
580
+ # user does not provide a mask then all fields will be overwritten.
581
+ # @param cluster [::Google::Cloud::EdgeContainer::V1::Cluster, ::Hash]
582
+ # The updated cluster.
583
+ # @param request_id [::String]
584
+ # A unique identifier for this request. Restricted to 36 ASCII characters.
585
+ # A random UUID is recommended.
586
+ # This request is only idempotent if `request_id` is provided.
587
+ #
588
+ # @yield [response, operation] Access the result along with the RPC operation
589
+ # @yieldparam response [::Gapic::Operation]
590
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
591
+ #
592
+ # @return [::Gapic::Operation]
593
+ #
594
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
595
+ #
596
+ # @example Basic example
597
+ # require "google/cloud/edge_container/v1"
598
+ #
599
+ # # Create a client object. The client can be reused for multiple calls.
600
+ # client = Google::Cloud::EdgeContainer::V1::EdgeContainer::Client.new
601
+ #
602
+ # # Create a request. To set request fields, pass in keyword arguments.
603
+ # request = Google::Cloud::EdgeContainer::V1::UpdateClusterRequest.new
604
+ #
605
+ # # Call the update_cluster method.
606
+ # result = client.update_cluster request
607
+ #
608
+ # # The returned object is of type Gapic::Operation. You can use it to
609
+ # # check the status of an operation, cancel it, or wait for results.
610
+ # # Here is how to wait for a response.
611
+ # result.wait_until_done! timeout: 60
612
+ # if result.response?
613
+ # p result.response
614
+ # else
615
+ # puts "No response received."
616
+ # end
617
+ #
618
+ def update_cluster request, options = nil
619
+ raise ::ArgumentError, "request must be provided" if request.nil?
620
+
621
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::UpdateClusterRequest
622
+
623
+ # Converts hash and nil to an options object
624
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
625
+
626
+ # Customize the options with defaults
627
+ metadata = @config.rpcs.update_cluster.metadata.to_h
628
+
629
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
630
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
631
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
632
+ gapic_version: ::Google::Cloud::EdgeContainer::V1::VERSION
633
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
634
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
635
+
636
+ header_params = {}
637
+ if request.cluster&.name
638
+ header_params["cluster.name"] = request.cluster.name
639
+ end
640
+
641
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
642
+ metadata[:"x-goog-request-params"] ||= request_params_header
643
+
644
+ options.apply_defaults timeout: @config.rpcs.update_cluster.timeout,
645
+ metadata: metadata,
646
+ retry_policy: @config.rpcs.update_cluster.retry_policy
647
+
648
+ options.apply_defaults timeout: @config.timeout,
649
+ metadata: @config.metadata,
650
+ retry_policy: @config.retry_policy
651
+
652
+ @edge_container_stub.call_rpc :update_cluster, request, options: options do |response, operation|
653
+ response = ::Gapic::Operation.new response, @operations_client, options: options
654
+ yield response, operation if block_given?
655
+ return response
656
+ end
657
+ rescue ::GRPC::BadStatus => e
658
+ raise ::Google::Cloud::Error.from_error(e)
659
+ end
660
+
661
+ ##
662
+ # Upgrades a single cluster.
663
+ #
664
+ # @overload upgrade_cluster(request, options = nil)
665
+ # Pass arguments to `upgrade_cluster` via a request object, either of type
666
+ # {::Google::Cloud::EdgeContainer::V1::UpgradeClusterRequest} or an equivalent Hash.
667
+ #
668
+ # @param request [::Google::Cloud::EdgeContainer::V1::UpgradeClusterRequest, ::Hash]
669
+ # A request object representing the call parameters. Required. To specify no
670
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
671
+ # @param options [::Gapic::CallOptions, ::Hash]
672
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
673
+ #
674
+ # @overload upgrade_cluster(name: nil, target_version: nil, schedule: nil, request_id: nil)
675
+ # Pass arguments to `upgrade_cluster` via keyword arguments. Note that at
676
+ # least one keyword argument is required. To specify no parameters, or to keep all
677
+ # the default parameter values, pass an empty Hash as a request object (see above).
678
+ #
679
+ # @param name [::String]
680
+ # Required. The resource name of the cluster.
681
+ # @param target_version [::String]
682
+ # Required. The version the cluster is going to be upgraded to.
683
+ # @param schedule [::Google::Cloud::EdgeContainer::V1::UpgradeClusterRequest::Schedule]
684
+ # The schedule for the upgrade.
685
+ # @param request_id [::String]
686
+ # A unique identifier for this request. Restricted to 36 ASCII characters. A
687
+ # random UUID is recommended. This request is only idempotent if
688
+ # `request_id` is provided.
689
+ #
690
+ # @yield [response, operation] Access the result along with the RPC operation
691
+ # @yieldparam response [::Gapic::Operation]
692
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
693
+ #
694
+ # @return [::Gapic::Operation]
695
+ #
696
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
697
+ #
698
+ # @example Basic example
699
+ # require "google/cloud/edge_container/v1"
700
+ #
701
+ # # Create a client object. The client can be reused for multiple calls.
702
+ # client = Google::Cloud::EdgeContainer::V1::EdgeContainer::Client.new
703
+ #
704
+ # # Create a request. To set request fields, pass in keyword arguments.
705
+ # request = Google::Cloud::EdgeContainer::V1::UpgradeClusterRequest.new
706
+ #
707
+ # # Call the upgrade_cluster method.
708
+ # result = client.upgrade_cluster request
709
+ #
710
+ # # The returned object is of type Gapic::Operation. You can use it to
711
+ # # check the status of an operation, cancel it, or wait for results.
712
+ # # Here is how to wait for a response.
713
+ # result.wait_until_done! timeout: 60
714
+ # if result.response?
715
+ # p result.response
716
+ # else
717
+ # puts "No response received."
718
+ # end
719
+ #
720
+ def upgrade_cluster request, options = nil
721
+ raise ::ArgumentError, "request must be provided" if request.nil?
722
+
723
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::UpgradeClusterRequest
724
+
725
+ # Converts hash and nil to an options object
726
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
727
+
728
+ # Customize the options with defaults
729
+ metadata = @config.rpcs.upgrade_cluster.metadata.to_h
730
+
731
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
732
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
733
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
734
+ gapic_version: ::Google::Cloud::EdgeContainer::V1::VERSION
735
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
736
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
737
+
738
+ header_params = {}
739
+ if request.name
740
+ header_params["name"] = request.name
741
+ end
742
+
743
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
744
+ metadata[:"x-goog-request-params"] ||= request_params_header
745
+
746
+ options.apply_defaults timeout: @config.rpcs.upgrade_cluster.timeout,
747
+ metadata: metadata,
748
+ retry_policy: @config.rpcs.upgrade_cluster.retry_policy
749
+
750
+ options.apply_defaults timeout: @config.timeout,
751
+ metadata: @config.metadata,
752
+ retry_policy: @config.retry_policy
753
+
754
+ @edge_container_stub.call_rpc :upgrade_cluster, request, options: options do |response, operation|
755
+ response = ::Gapic::Operation.new response, @operations_client, options: options
756
+ yield response, operation if block_given?
757
+ return response
758
+ end
759
+ rescue ::GRPC::BadStatus => e
760
+ raise ::Google::Cloud::Error.from_error(e)
761
+ end
762
+
763
+ ##
764
+ # Deletes a single Cluster.
765
+ #
766
+ # @overload delete_cluster(request, options = nil)
767
+ # Pass arguments to `delete_cluster` via a request object, either of type
768
+ # {::Google::Cloud::EdgeContainer::V1::DeleteClusterRequest} or an equivalent Hash.
769
+ #
770
+ # @param request [::Google::Cloud::EdgeContainer::V1::DeleteClusterRequest, ::Hash]
771
+ # A request object representing the call parameters. Required. To specify no
772
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
773
+ # @param options [::Gapic::CallOptions, ::Hash]
774
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
775
+ #
776
+ # @overload delete_cluster(name: nil, request_id: nil)
777
+ # Pass arguments to `delete_cluster` via keyword arguments. Note that at
778
+ # least one keyword argument is required. To specify no parameters, or to keep all
779
+ # the default parameter values, pass an empty Hash as a request object (see above).
780
+ #
781
+ # @param name [::String]
782
+ # Required. The resource name of the cluster.
783
+ # @param request_id [::String]
784
+ # A unique identifier for this request. Restricted to 36 ASCII characters. A
785
+ # random UUID is recommended. This request is only idempotent if
786
+ # `request_id` is provided.
787
+ #
788
+ # @yield [response, operation] Access the result along with the RPC operation
789
+ # @yieldparam response [::Gapic::Operation]
790
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
791
+ #
792
+ # @return [::Gapic::Operation]
793
+ #
794
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
795
+ #
796
+ # @example Basic example
797
+ # require "google/cloud/edge_container/v1"
798
+ #
799
+ # # Create a client object. The client can be reused for multiple calls.
800
+ # client = Google::Cloud::EdgeContainer::V1::EdgeContainer::Client.new
801
+ #
802
+ # # Create a request. To set request fields, pass in keyword arguments.
803
+ # request = Google::Cloud::EdgeContainer::V1::DeleteClusterRequest.new
804
+ #
805
+ # # Call the delete_cluster method.
806
+ # result = client.delete_cluster request
807
+ #
808
+ # # The returned object is of type Gapic::Operation. You can use it to
809
+ # # check the status of an operation, cancel it, or wait for results.
810
+ # # Here is how to wait for a response.
811
+ # result.wait_until_done! timeout: 60
812
+ # if result.response?
813
+ # p result.response
814
+ # else
815
+ # puts "No response received."
816
+ # end
817
+ #
818
+ def delete_cluster request, options = nil
819
+ raise ::ArgumentError, "request must be provided" if request.nil?
820
+
821
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::DeleteClusterRequest
822
+
823
+ # Converts hash and nil to an options object
824
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
825
+
826
+ # Customize the options with defaults
827
+ metadata = @config.rpcs.delete_cluster.metadata.to_h
828
+
829
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
830
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
831
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
832
+ gapic_version: ::Google::Cloud::EdgeContainer::V1::VERSION
833
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
834
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
835
+
836
+ header_params = {}
837
+ if request.name
838
+ header_params["name"] = request.name
839
+ end
840
+
841
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
842
+ metadata[:"x-goog-request-params"] ||= request_params_header
843
+
844
+ options.apply_defaults timeout: @config.rpcs.delete_cluster.timeout,
845
+ metadata: metadata,
846
+ retry_policy: @config.rpcs.delete_cluster.retry_policy
847
+
848
+ options.apply_defaults timeout: @config.timeout,
849
+ metadata: @config.metadata,
850
+ retry_policy: @config.retry_policy
851
+
852
+ @edge_container_stub.call_rpc :delete_cluster, request, options: options do |response, operation|
853
+ response = ::Gapic::Operation.new response, @operations_client, options: options
854
+ yield response, operation if block_given?
855
+ return response
856
+ end
857
+ rescue ::GRPC::BadStatus => e
858
+ raise ::Google::Cloud::Error.from_error(e)
859
+ end
860
+
861
+ ##
862
+ # Generates an access token for a Cluster.
863
+ #
864
+ # @overload generate_access_token(request, options = nil)
865
+ # Pass arguments to `generate_access_token` via a request object, either of type
866
+ # {::Google::Cloud::EdgeContainer::V1::GenerateAccessTokenRequest} or an equivalent Hash.
867
+ #
868
+ # @param request [::Google::Cloud::EdgeContainer::V1::GenerateAccessTokenRequest, ::Hash]
869
+ # A request object representing the call parameters. Required. To specify no
870
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
871
+ # @param options [::Gapic::CallOptions, ::Hash]
872
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
873
+ #
874
+ # @overload generate_access_token(cluster: nil)
875
+ # Pass arguments to `generate_access_token` via keyword arguments. Note that at
876
+ # least one keyword argument is required. To specify no parameters, or to keep all
877
+ # the default parameter values, pass an empty Hash as a request object (see above).
878
+ #
879
+ # @param cluster [::String]
880
+ # Required. The resource name of the cluster.
881
+ #
882
+ # @yield [response, operation] Access the result along with the RPC operation
883
+ # @yieldparam response [::Google::Cloud::EdgeContainer::V1::GenerateAccessTokenResponse]
884
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
885
+ #
886
+ # @return [::Google::Cloud::EdgeContainer::V1::GenerateAccessTokenResponse]
887
+ #
888
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
889
+ #
890
+ # @example Basic example
891
+ # require "google/cloud/edge_container/v1"
892
+ #
893
+ # # Create a client object. The client can be reused for multiple calls.
894
+ # client = Google::Cloud::EdgeContainer::V1::EdgeContainer::Client.new
895
+ #
896
+ # # Create a request. To set request fields, pass in keyword arguments.
897
+ # request = Google::Cloud::EdgeContainer::V1::GenerateAccessTokenRequest.new
898
+ #
899
+ # # Call the generate_access_token method.
900
+ # result = client.generate_access_token request
901
+ #
902
+ # # The returned object is of type Google::Cloud::EdgeContainer::V1::GenerateAccessTokenResponse.
903
+ # p result
904
+ #
905
+ def generate_access_token request, options = nil
906
+ raise ::ArgumentError, "request must be provided" if request.nil?
907
+
908
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::GenerateAccessTokenRequest
909
+
910
+ # Converts hash and nil to an options object
911
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
912
+
913
+ # Customize the options with defaults
914
+ metadata = @config.rpcs.generate_access_token.metadata.to_h
915
+
916
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
917
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
918
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
919
+ gapic_version: ::Google::Cloud::EdgeContainer::V1::VERSION
920
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
921
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
922
+
923
+ header_params = {}
924
+ if request.cluster
925
+ header_params["cluster"] = request.cluster
926
+ end
927
+
928
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
929
+ metadata[:"x-goog-request-params"] ||= request_params_header
930
+
931
+ options.apply_defaults timeout: @config.rpcs.generate_access_token.timeout,
932
+ metadata: metadata,
933
+ retry_policy: @config.rpcs.generate_access_token.retry_policy
934
+
935
+ options.apply_defaults timeout: @config.timeout,
936
+ metadata: @config.metadata,
937
+ retry_policy: @config.retry_policy
938
+
939
+ @edge_container_stub.call_rpc :generate_access_token, request, options: options do |response, operation|
940
+ yield response, operation if block_given?
941
+ return response
942
+ end
943
+ rescue ::GRPC::BadStatus => e
944
+ raise ::Google::Cloud::Error.from_error(e)
945
+ end
946
+
947
+ ##
948
+ # Generates an offline credential for a Cluster.
949
+ #
950
+ # @overload generate_offline_credential(request, options = nil)
951
+ # Pass arguments to `generate_offline_credential` via a request object, either of type
952
+ # {::Google::Cloud::EdgeContainer::V1::GenerateOfflineCredentialRequest} or an equivalent Hash.
953
+ #
954
+ # @param request [::Google::Cloud::EdgeContainer::V1::GenerateOfflineCredentialRequest, ::Hash]
955
+ # A request object representing the call parameters. Required. To specify no
956
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
957
+ # @param options [::Gapic::CallOptions, ::Hash]
958
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
959
+ #
960
+ # @overload generate_offline_credential(cluster: nil)
961
+ # Pass arguments to `generate_offline_credential` via keyword arguments. Note that at
962
+ # least one keyword argument is required. To specify no parameters, or to keep all
963
+ # the default parameter values, pass an empty Hash as a request object (see above).
964
+ #
965
+ # @param cluster [::String]
966
+ # Required. The resource name of the cluster.
967
+ #
968
+ # @yield [response, operation] Access the result along with the RPC operation
969
+ # @yieldparam response [::Google::Cloud::EdgeContainer::V1::GenerateOfflineCredentialResponse]
970
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
971
+ #
972
+ # @return [::Google::Cloud::EdgeContainer::V1::GenerateOfflineCredentialResponse]
973
+ #
974
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
975
+ #
976
+ # @example Basic example
977
+ # require "google/cloud/edge_container/v1"
978
+ #
979
+ # # Create a client object. The client can be reused for multiple calls.
980
+ # client = Google::Cloud::EdgeContainer::V1::EdgeContainer::Client.new
981
+ #
982
+ # # Create a request. To set request fields, pass in keyword arguments.
983
+ # request = Google::Cloud::EdgeContainer::V1::GenerateOfflineCredentialRequest.new
984
+ #
985
+ # # Call the generate_offline_credential method.
986
+ # result = client.generate_offline_credential request
987
+ #
988
+ # # The returned object is of type Google::Cloud::EdgeContainer::V1::GenerateOfflineCredentialResponse.
989
+ # p result
990
+ #
991
+ def generate_offline_credential request, options = nil
992
+ raise ::ArgumentError, "request must be provided" if request.nil?
993
+
994
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::GenerateOfflineCredentialRequest
995
+
996
+ # Converts hash and nil to an options object
997
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
998
+
999
+ # Customize the options with defaults
1000
+ metadata = @config.rpcs.generate_offline_credential.metadata.to_h
1001
+
1002
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1003
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1004
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1005
+ gapic_version: ::Google::Cloud::EdgeContainer::V1::VERSION
1006
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1007
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1008
+
1009
+ header_params = {}
1010
+ if request.cluster
1011
+ header_params["cluster"] = request.cluster
1012
+ end
1013
+
1014
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1015
+ metadata[:"x-goog-request-params"] ||= request_params_header
1016
+
1017
+ options.apply_defaults timeout: @config.rpcs.generate_offline_credential.timeout,
1018
+ metadata: metadata,
1019
+ retry_policy: @config.rpcs.generate_offline_credential.retry_policy
1020
+
1021
+ options.apply_defaults timeout: @config.timeout,
1022
+ metadata: @config.metadata,
1023
+ retry_policy: @config.retry_policy
1024
+
1025
+ @edge_container_stub.call_rpc :generate_offline_credential, request, options: options do |response, operation|
1026
+ yield response, operation if block_given?
1027
+ return response
1028
+ end
1029
+ rescue ::GRPC::BadStatus => e
1030
+ raise ::Google::Cloud::Error.from_error(e)
1031
+ end
1032
+
1033
+ ##
1034
+ # Lists NodePools in a given project and location.
1035
+ #
1036
+ # @overload list_node_pools(request, options = nil)
1037
+ # Pass arguments to `list_node_pools` via a request object, either of type
1038
+ # {::Google::Cloud::EdgeContainer::V1::ListNodePoolsRequest} or an equivalent Hash.
1039
+ #
1040
+ # @param request [::Google::Cloud::EdgeContainer::V1::ListNodePoolsRequest, ::Hash]
1041
+ # A request object representing the call parameters. Required. To specify no
1042
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1043
+ # @param options [::Gapic::CallOptions, ::Hash]
1044
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1045
+ #
1046
+ # @overload list_node_pools(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1047
+ # Pass arguments to `list_node_pools` via keyword arguments. Note that at
1048
+ # least one keyword argument is required. To specify no parameters, or to keep all
1049
+ # the default parameter values, pass an empty Hash as a request object (see above).
1050
+ #
1051
+ # @param parent [::String]
1052
+ # Required. The parent cluster, which owns this collection of node pools.
1053
+ # @param page_size [::Integer]
1054
+ # The maximum number of resources to list.
1055
+ # @param page_token [::String]
1056
+ # A page token received from previous list request.
1057
+ # @param filter [::String]
1058
+ # Only resources matching this filter will be listed.
1059
+ # @param order_by [::String]
1060
+ # Specifies the order in which resources will be listed.
1061
+ #
1062
+ # @yield [response, operation] Access the result along with the RPC operation
1063
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::EdgeContainer::V1::NodePool>]
1064
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1065
+ #
1066
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::EdgeContainer::V1::NodePool>]
1067
+ #
1068
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1069
+ #
1070
+ # @example Basic example
1071
+ # require "google/cloud/edge_container/v1"
1072
+ #
1073
+ # # Create a client object. The client can be reused for multiple calls.
1074
+ # client = Google::Cloud::EdgeContainer::V1::EdgeContainer::Client.new
1075
+ #
1076
+ # # Create a request. To set request fields, pass in keyword arguments.
1077
+ # request = Google::Cloud::EdgeContainer::V1::ListNodePoolsRequest.new
1078
+ #
1079
+ # # Call the list_node_pools method.
1080
+ # result = client.list_node_pools request
1081
+ #
1082
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1083
+ # # over elements, and API calls will be issued to fetch pages as needed.
1084
+ # result.each do |item|
1085
+ # # Each element is of type ::Google::Cloud::EdgeContainer::V1::NodePool.
1086
+ # p item
1087
+ # end
1088
+ #
1089
+ def list_node_pools request, options = nil
1090
+ raise ::ArgumentError, "request must be provided" if request.nil?
1091
+
1092
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::ListNodePoolsRequest
1093
+
1094
+ # Converts hash and nil to an options object
1095
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1096
+
1097
+ # Customize the options with defaults
1098
+ metadata = @config.rpcs.list_node_pools.metadata.to_h
1099
+
1100
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1101
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1102
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1103
+ gapic_version: ::Google::Cloud::EdgeContainer::V1::VERSION
1104
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1105
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1106
+
1107
+ header_params = {}
1108
+ if request.parent
1109
+ header_params["parent"] = request.parent
1110
+ end
1111
+
1112
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1113
+ metadata[:"x-goog-request-params"] ||= request_params_header
1114
+
1115
+ options.apply_defaults timeout: @config.rpcs.list_node_pools.timeout,
1116
+ metadata: metadata,
1117
+ retry_policy: @config.rpcs.list_node_pools.retry_policy
1118
+
1119
+ options.apply_defaults timeout: @config.timeout,
1120
+ metadata: @config.metadata,
1121
+ retry_policy: @config.retry_policy
1122
+
1123
+ @edge_container_stub.call_rpc :list_node_pools, request, options: options do |response, operation|
1124
+ response = ::Gapic::PagedEnumerable.new @edge_container_stub, :list_node_pools, request, response, operation, options
1125
+ yield response, operation if block_given?
1126
+ return response
1127
+ end
1128
+ rescue ::GRPC::BadStatus => e
1129
+ raise ::Google::Cloud::Error.from_error(e)
1130
+ end
1131
+
1132
+ ##
1133
+ # Gets details of a single NodePool.
1134
+ #
1135
+ # @overload get_node_pool(request, options = nil)
1136
+ # Pass arguments to `get_node_pool` via a request object, either of type
1137
+ # {::Google::Cloud::EdgeContainer::V1::GetNodePoolRequest} or an equivalent Hash.
1138
+ #
1139
+ # @param request [::Google::Cloud::EdgeContainer::V1::GetNodePoolRequest, ::Hash]
1140
+ # A request object representing the call parameters. Required. To specify no
1141
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1142
+ # @param options [::Gapic::CallOptions, ::Hash]
1143
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1144
+ #
1145
+ # @overload get_node_pool(name: nil)
1146
+ # Pass arguments to `get_node_pool` via keyword arguments. Note that at
1147
+ # least one keyword argument is required. To specify no parameters, or to keep all
1148
+ # the default parameter values, pass an empty Hash as a request object (see above).
1149
+ #
1150
+ # @param name [::String]
1151
+ # Required. The resource name of the node pool.
1152
+ #
1153
+ # @yield [response, operation] Access the result along with the RPC operation
1154
+ # @yieldparam response [::Google::Cloud::EdgeContainer::V1::NodePool]
1155
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1156
+ #
1157
+ # @return [::Google::Cloud::EdgeContainer::V1::NodePool]
1158
+ #
1159
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1160
+ #
1161
+ # @example Basic example
1162
+ # require "google/cloud/edge_container/v1"
1163
+ #
1164
+ # # Create a client object. The client can be reused for multiple calls.
1165
+ # client = Google::Cloud::EdgeContainer::V1::EdgeContainer::Client.new
1166
+ #
1167
+ # # Create a request. To set request fields, pass in keyword arguments.
1168
+ # request = Google::Cloud::EdgeContainer::V1::GetNodePoolRequest.new
1169
+ #
1170
+ # # Call the get_node_pool method.
1171
+ # result = client.get_node_pool request
1172
+ #
1173
+ # # The returned object is of type Google::Cloud::EdgeContainer::V1::NodePool.
1174
+ # p result
1175
+ #
1176
+ def get_node_pool request, options = nil
1177
+ raise ::ArgumentError, "request must be provided" if request.nil?
1178
+
1179
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::GetNodePoolRequest
1180
+
1181
+ # Converts hash and nil to an options object
1182
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1183
+
1184
+ # Customize the options with defaults
1185
+ metadata = @config.rpcs.get_node_pool.metadata.to_h
1186
+
1187
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1188
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1189
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1190
+ gapic_version: ::Google::Cloud::EdgeContainer::V1::VERSION
1191
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1192
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1193
+
1194
+ header_params = {}
1195
+ if request.name
1196
+ header_params["name"] = request.name
1197
+ end
1198
+
1199
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1200
+ metadata[:"x-goog-request-params"] ||= request_params_header
1201
+
1202
+ options.apply_defaults timeout: @config.rpcs.get_node_pool.timeout,
1203
+ metadata: metadata,
1204
+ retry_policy: @config.rpcs.get_node_pool.retry_policy
1205
+
1206
+ options.apply_defaults timeout: @config.timeout,
1207
+ metadata: @config.metadata,
1208
+ retry_policy: @config.retry_policy
1209
+
1210
+ @edge_container_stub.call_rpc :get_node_pool, request, options: options do |response, operation|
1211
+ yield response, operation if block_given?
1212
+ return response
1213
+ end
1214
+ rescue ::GRPC::BadStatus => e
1215
+ raise ::Google::Cloud::Error.from_error(e)
1216
+ end
1217
+
1218
+ ##
1219
+ # Creates a new NodePool in a given project and location.
1220
+ #
1221
+ # @overload create_node_pool(request, options = nil)
1222
+ # Pass arguments to `create_node_pool` via a request object, either of type
1223
+ # {::Google::Cloud::EdgeContainer::V1::CreateNodePoolRequest} or an equivalent Hash.
1224
+ #
1225
+ # @param request [::Google::Cloud::EdgeContainer::V1::CreateNodePoolRequest, ::Hash]
1226
+ # A request object representing the call parameters. Required. To specify no
1227
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1228
+ # @param options [::Gapic::CallOptions, ::Hash]
1229
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1230
+ #
1231
+ # @overload create_node_pool(parent: nil, node_pool_id: nil, node_pool: nil, request_id: nil)
1232
+ # Pass arguments to `create_node_pool` via keyword arguments. Note that at
1233
+ # least one keyword argument is required. To specify no parameters, or to keep all
1234
+ # the default parameter values, pass an empty Hash as a request object (see above).
1235
+ #
1236
+ # @param parent [::String]
1237
+ # Required. The parent cluster where this node pool will be created.
1238
+ # @param node_pool_id [::String]
1239
+ # Required. A client-specified unique identifier for the node pool.
1240
+ # @param node_pool [::Google::Cloud::EdgeContainer::V1::NodePool, ::Hash]
1241
+ # Required. The node pool to create.
1242
+ # @param request_id [::String]
1243
+ # A unique identifier for this request. Restricted to 36 ASCII characters. A
1244
+ # random UUID is recommended. This request is only idempotent if
1245
+ # `request_id` is provided.
1246
+ #
1247
+ # @yield [response, operation] Access the result along with the RPC operation
1248
+ # @yieldparam response [::Gapic::Operation]
1249
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1250
+ #
1251
+ # @return [::Gapic::Operation]
1252
+ #
1253
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1254
+ #
1255
+ # @example Basic example
1256
+ # require "google/cloud/edge_container/v1"
1257
+ #
1258
+ # # Create a client object. The client can be reused for multiple calls.
1259
+ # client = Google::Cloud::EdgeContainer::V1::EdgeContainer::Client.new
1260
+ #
1261
+ # # Create a request. To set request fields, pass in keyword arguments.
1262
+ # request = Google::Cloud::EdgeContainer::V1::CreateNodePoolRequest.new
1263
+ #
1264
+ # # Call the create_node_pool method.
1265
+ # result = client.create_node_pool request
1266
+ #
1267
+ # # The returned object is of type Gapic::Operation. You can use it to
1268
+ # # check the status of an operation, cancel it, or wait for results.
1269
+ # # Here is how to wait for a response.
1270
+ # result.wait_until_done! timeout: 60
1271
+ # if result.response?
1272
+ # p result.response
1273
+ # else
1274
+ # puts "No response received."
1275
+ # end
1276
+ #
1277
+ def create_node_pool request, options = nil
1278
+ raise ::ArgumentError, "request must be provided" if request.nil?
1279
+
1280
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::CreateNodePoolRequest
1281
+
1282
+ # Converts hash and nil to an options object
1283
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1284
+
1285
+ # Customize the options with defaults
1286
+ metadata = @config.rpcs.create_node_pool.metadata.to_h
1287
+
1288
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1289
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1290
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1291
+ gapic_version: ::Google::Cloud::EdgeContainer::V1::VERSION
1292
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1293
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1294
+
1295
+ header_params = {}
1296
+ if request.parent
1297
+ header_params["parent"] = request.parent
1298
+ end
1299
+
1300
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1301
+ metadata[:"x-goog-request-params"] ||= request_params_header
1302
+
1303
+ options.apply_defaults timeout: @config.rpcs.create_node_pool.timeout,
1304
+ metadata: metadata,
1305
+ retry_policy: @config.rpcs.create_node_pool.retry_policy
1306
+
1307
+ options.apply_defaults timeout: @config.timeout,
1308
+ metadata: @config.metadata,
1309
+ retry_policy: @config.retry_policy
1310
+
1311
+ @edge_container_stub.call_rpc :create_node_pool, request, options: options do |response, operation|
1312
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1313
+ yield response, operation if block_given?
1314
+ return response
1315
+ end
1316
+ rescue ::GRPC::BadStatus => e
1317
+ raise ::Google::Cloud::Error.from_error(e)
1318
+ end
1319
+
1320
+ ##
1321
+ # Updates the parameters of a single NodePool.
1322
+ #
1323
+ # @overload update_node_pool(request, options = nil)
1324
+ # Pass arguments to `update_node_pool` via a request object, either of type
1325
+ # {::Google::Cloud::EdgeContainer::V1::UpdateNodePoolRequest} or an equivalent Hash.
1326
+ #
1327
+ # @param request [::Google::Cloud::EdgeContainer::V1::UpdateNodePoolRequest, ::Hash]
1328
+ # A request object representing the call parameters. Required. To specify no
1329
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1330
+ # @param options [::Gapic::CallOptions, ::Hash]
1331
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1332
+ #
1333
+ # @overload update_node_pool(update_mask: nil, node_pool: nil, request_id: nil)
1334
+ # Pass arguments to `update_node_pool` via keyword arguments. Note that at
1335
+ # least one keyword argument is required. To specify no parameters, or to keep all
1336
+ # the default parameter values, pass an empty Hash as a request object (see above).
1337
+ #
1338
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1339
+ # Field mask is used to specify the fields to be overwritten in the
1340
+ # NodePool resource by the update.
1341
+ # The fields specified in the update_mask are relative to the resource, not
1342
+ # the full request. A field will be overwritten if it is in the mask. If the
1343
+ # user does not provide a mask then all fields will be overwritten.
1344
+ # @param node_pool [::Google::Cloud::EdgeContainer::V1::NodePool, ::Hash]
1345
+ # The updated node pool.
1346
+ # @param request_id [::String]
1347
+ # A unique identifier for this request. Restricted to 36 ASCII characters. A
1348
+ # random UUID is recommended. This request is only idempotent if
1349
+ # `request_id` is provided.
1350
+ #
1351
+ # @yield [response, operation] Access the result along with the RPC operation
1352
+ # @yieldparam response [::Gapic::Operation]
1353
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1354
+ #
1355
+ # @return [::Gapic::Operation]
1356
+ #
1357
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1358
+ #
1359
+ # @example Basic example
1360
+ # require "google/cloud/edge_container/v1"
1361
+ #
1362
+ # # Create a client object. The client can be reused for multiple calls.
1363
+ # client = Google::Cloud::EdgeContainer::V1::EdgeContainer::Client.new
1364
+ #
1365
+ # # Create a request. To set request fields, pass in keyword arguments.
1366
+ # request = Google::Cloud::EdgeContainer::V1::UpdateNodePoolRequest.new
1367
+ #
1368
+ # # Call the update_node_pool method.
1369
+ # result = client.update_node_pool request
1370
+ #
1371
+ # # The returned object is of type Gapic::Operation. You can use it to
1372
+ # # check the status of an operation, cancel it, or wait for results.
1373
+ # # Here is how to wait for a response.
1374
+ # result.wait_until_done! timeout: 60
1375
+ # if result.response?
1376
+ # p result.response
1377
+ # else
1378
+ # puts "No response received."
1379
+ # end
1380
+ #
1381
+ def update_node_pool request, options = nil
1382
+ raise ::ArgumentError, "request must be provided" if request.nil?
1383
+
1384
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::UpdateNodePoolRequest
1385
+
1386
+ # Converts hash and nil to an options object
1387
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1388
+
1389
+ # Customize the options with defaults
1390
+ metadata = @config.rpcs.update_node_pool.metadata.to_h
1391
+
1392
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1393
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1394
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1395
+ gapic_version: ::Google::Cloud::EdgeContainer::V1::VERSION
1396
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1397
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1398
+
1399
+ header_params = {}
1400
+ if request.node_pool&.name
1401
+ header_params["node_pool.name"] = request.node_pool.name
1402
+ end
1403
+
1404
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1405
+ metadata[:"x-goog-request-params"] ||= request_params_header
1406
+
1407
+ options.apply_defaults timeout: @config.rpcs.update_node_pool.timeout,
1408
+ metadata: metadata,
1409
+ retry_policy: @config.rpcs.update_node_pool.retry_policy
1410
+
1411
+ options.apply_defaults timeout: @config.timeout,
1412
+ metadata: @config.metadata,
1413
+ retry_policy: @config.retry_policy
1414
+
1415
+ @edge_container_stub.call_rpc :update_node_pool, request, options: options do |response, operation|
1416
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1417
+ yield response, operation if block_given?
1418
+ return response
1419
+ end
1420
+ rescue ::GRPC::BadStatus => e
1421
+ raise ::Google::Cloud::Error.from_error(e)
1422
+ end
1423
+
1424
+ ##
1425
+ # Deletes a single NodePool.
1426
+ #
1427
+ # @overload delete_node_pool(request, options = nil)
1428
+ # Pass arguments to `delete_node_pool` via a request object, either of type
1429
+ # {::Google::Cloud::EdgeContainer::V1::DeleteNodePoolRequest} or an equivalent Hash.
1430
+ #
1431
+ # @param request [::Google::Cloud::EdgeContainer::V1::DeleteNodePoolRequest, ::Hash]
1432
+ # A request object representing the call parameters. Required. To specify no
1433
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1434
+ # @param options [::Gapic::CallOptions, ::Hash]
1435
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1436
+ #
1437
+ # @overload delete_node_pool(name: nil, request_id: nil)
1438
+ # Pass arguments to `delete_node_pool` via keyword arguments. Note that at
1439
+ # least one keyword argument is required. To specify no parameters, or to keep all
1440
+ # the default parameter values, pass an empty Hash as a request object (see above).
1441
+ #
1442
+ # @param name [::String]
1443
+ # Required. The resource name of the node pool.
1444
+ # @param request_id [::String]
1445
+ # A unique identifier for this request. Restricted to 36 ASCII characters. A
1446
+ # random UUID is recommended. This request is only idempotent if
1447
+ # `request_id` is provided.
1448
+ #
1449
+ # @yield [response, operation] Access the result along with the RPC operation
1450
+ # @yieldparam response [::Gapic::Operation]
1451
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1452
+ #
1453
+ # @return [::Gapic::Operation]
1454
+ #
1455
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1456
+ #
1457
+ # @example Basic example
1458
+ # require "google/cloud/edge_container/v1"
1459
+ #
1460
+ # # Create a client object. The client can be reused for multiple calls.
1461
+ # client = Google::Cloud::EdgeContainer::V1::EdgeContainer::Client.new
1462
+ #
1463
+ # # Create a request. To set request fields, pass in keyword arguments.
1464
+ # request = Google::Cloud::EdgeContainer::V1::DeleteNodePoolRequest.new
1465
+ #
1466
+ # # Call the delete_node_pool method.
1467
+ # result = client.delete_node_pool request
1468
+ #
1469
+ # # The returned object is of type Gapic::Operation. You can use it to
1470
+ # # check the status of an operation, cancel it, or wait for results.
1471
+ # # Here is how to wait for a response.
1472
+ # result.wait_until_done! timeout: 60
1473
+ # if result.response?
1474
+ # p result.response
1475
+ # else
1476
+ # puts "No response received."
1477
+ # end
1478
+ #
1479
+ def delete_node_pool request, options = nil
1480
+ raise ::ArgumentError, "request must be provided" if request.nil?
1481
+
1482
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::DeleteNodePoolRequest
1483
+
1484
+ # Converts hash and nil to an options object
1485
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1486
+
1487
+ # Customize the options with defaults
1488
+ metadata = @config.rpcs.delete_node_pool.metadata.to_h
1489
+
1490
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1491
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1492
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1493
+ gapic_version: ::Google::Cloud::EdgeContainer::V1::VERSION
1494
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1495
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1496
+
1497
+ header_params = {}
1498
+ if request.name
1499
+ header_params["name"] = request.name
1500
+ end
1501
+
1502
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1503
+ metadata[:"x-goog-request-params"] ||= request_params_header
1504
+
1505
+ options.apply_defaults timeout: @config.rpcs.delete_node_pool.timeout,
1506
+ metadata: metadata,
1507
+ retry_policy: @config.rpcs.delete_node_pool.retry_policy
1508
+
1509
+ options.apply_defaults timeout: @config.timeout,
1510
+ metadata: @config.metadata,
1511
+ retry_policy: @config.retry_policy
1512
+
1513
+ @edge_container_stub.call_rpc :delete_node_pool, request, options: options do |response, operation|
1514
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1515
+ yield response, operation if block_given?
1516
+ return response
1517
+ end
1518
+ rescue ::GRPC::BadStatus => e
1519
+ raise ::Google::Cloud::Error.from_error(e)
1520
+ end
1521
+
1522
+ ##
1523
+ # Lists Machines in a given project and location.
1524
+ #
1525
+ # @overload list_machines(request, options = nil)
1526
+ # Pass arguments to `list_machines` via a request object, either of type
1527
+ # {::Google::Cloud::EdgeContainer::V1::ListMachinesRequest} or an equivalent Hash.
1528
+ #
1529
+ # @param request [::Google::Cloud::EdgeContainer::V1::ListMachinesRequest, ::Hash]
1530
+ # A request object representing the call parameters. Required. To specify no
1531
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1532
+ # @param options [::Gapic::CallOptions, ::Hash]
1533
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1534
+ #
1535
+ # @overload list_machines(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1536
+ # Pass arguments to `list_machines` via keyword arguments. Note that at
1537
+ # least one keyword argument is required. To specify no parameters, or to keep all
1538
+ # the default parameter values, pass an empty Hash as a request object (see above).
1539
+ #
1540
+ # @param parent [::String]
1541
+ # Required. The parent site, which owns this collection of machines.
1542
+ # @param page_size [::Integer]
1543
+ # The maximum number of resources to list.
1544
+ # @param page_token [::String]
1545
+ # A page token received from previous list request.
1546
+ # @param filter [::String]
1547
+ # Only resources matching this filter will be listed.
1548
+ # @param order_by [::String]
1549
+ # Specifies the order in which resources will be listed.
1550
+ #
1551
+ # @yield [response, operation] Access the result along with the RPC operation
1552
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::EdgeContainer::V1::Machine>]
1553
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1554
+ #
1555
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::EdgeContainer::V1::Machine>]
1556
+ #
1557
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1558
+ #
1559
+ # @example Basic example
1560
+ # require "google/cloud/edge_container/v1"
1561
+ #
1562
+ # # Create a client object. The client can be reused for multiple calls.
1563
+ # client = Google::Cloud::EdgeContainer::V1::EdgeContainer::Client.new
1564
+ #
1565
+ # # Create a request. To set request fields, pass in keyword arguments.
1566
+ # request = Google::Cloud::EdgeContainer::V1::ListMachinesRequest.new
1567
+ #
1568
+ # # Call the list_machines method.
1569
+ # result = client.list_machines request
1570
+ #
1571
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1572
+ # # over elements, and API calls will be issued to fetch pages as needed.
1573
+ # result.each do |item|
1574
+ # # Each element is of type ::Google::Cloud::EdgeContainer::V1::Machine.
1575
+ # p item
1576
+ # end
1577
+ #
1578
+ def list_machines request, options = nil
1579
+ raise ::ArgumentError, "request must be provided" if request.nil?
1580
+
1581
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::ListMachinesRequest
1582
+
1583
+ # Converts hash and nil to an options object
1584
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1585
+
1586
+ # Customize the options with defaults
1587
+ metadata = @config.rpcs.list_machines.metadata.to_h
1588
+
1589
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1590
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1591
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1592
+ gapic_version: ::Google::Cloud::EdgeContainer::V1::VERSION
1593
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1594
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1595
+
1596
+ header_params = {}
1597
+ if request.parent
1598
+ header_params["parent"] = request.parent
1599
+ end
1600
+
1601
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1602
+ metadata[:"x-goog-request-params"] ||= request_params_header
1603
+
1604
+ options.apply_defaults timeout: @config.rpcs.list_machines.timeout,
1605
+ metadata: metadata,
1606
+ retry_policy: @config.rpcs.list_machines.retry_policy
1607
+
1608
+ options.apply_defaults timeout: @config.timeout,
1609
+ metadata: @config.metadata,
1610
+ retry_policy: @config.retry_policy
1611
+
1612
+ @edge_container_stub.call_rpc :list_machines, request, options: options do |response, operation|
1613
+ response = ::Gapic::PagedEnumerable.new @edge_container_stub, :list_machines, request, response, operation, options
1614
+ yield response, operation if block_given?
1615
+ return response
1616
+ end
1617
+ rescue ::GRPC::BadStatus => e
1618
+ raise ::Google::Cloud::Error.from_error(e)
1619
+ end
1620
+
1621
+ ##
1622
+ # Gets details of a single Machine.
1623
+ #
1624
+ # @overload get_machine(request, options = nil)
1625
+ # Pass arguments to `get_machine` via a request object, either of type
1626
+ # {::Google::Cloud::EdgeContainer::V1::GetMachineRequest} or an equivalent Hash.
1627
+ #
1628
+ # @param request [::Google::Cloud::EdgeContainer::V1::GetMachineRequest, ::Hash]
1629
+ # A request object representing the call parameters. Required. To specify no
1630
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1631
+ # @param options [::Gapic::CallOptions, ::Hash]
1632
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1633
+ #
1634
+ # @overload get_machine(name: nil)
1635
+ # Pass arguments to `get_machine` via keyword arguments. Note that at
1636
+ # least one keyword argument is required. To specify no parameters, or to keep all
1637
+ # the default parameter values, pass an empty Hash as a request object (see above).
1638
+ #
1639
+ # @param name [::String]
1640
+ # Required. The resource name of the machine.
1641
+ #
1642
+ # @yield [response, operation] Access the result along with the RPC operation
1643
+ # @yieldparam response [::Google::Cloud::EdgeContainer::V1::Machine]
1644
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1645
+ #
1646
+ # @return [::Google::Cloud::EdgeContainer::V1::Machine]
1647
+ #
1648
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1649
+ #
1650
+ # @example Basic example
1651
+ # require "google/cloud/edge_container/v1"
1652
+ #
1653
+ # # Create a client object. The client can be reused for multiple calls.
1654
+ # client = Google::Cloud::EdgeContainer::V1::EdgeContainer::Client.new
1655
+ #
1656
+ # # Create a request. To set request fields, pass in keyword arguments.
1657
+ # request = Google::Cloud::EdgeContainer::V1::GetMachineRequest.new
1658
+ #
1659
+ # # Call the get_machine method.
1660
+ # result = client.get_machine request
1661
+ #
1662
+ # # The returned object is of type Google::Cloud::EdgeContainer::V1::Machine.
1663
+ # p result
1664
+ #
1665
+ def get_machine request, options = nil
1666
+ raise ::ArgumentError, "request must be provided" if request.nil?
1667
+
1668
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::GetMachineRequest
1669
+
1670
+ # Converts hash and nil to an options object
1671
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1672
+
1673
+ # Customize the options with defaults
1674
+ metadata = @config.rpcs.get_machine.metadata.to_h
1675
+
1676
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1677
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1678
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1679
+ gapic_version: ::Google::Cloud::EdgeContainer::V1::VERSION
1680
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1681
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1682
+
1683
+ header_params = {}
1684
+ if request.name
1685
+ header_params["name"] = request.name
1686
+ end
1687
+
1688
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1689
+ metadata[:"x-goog-request-params"] ||= request_params_header
1690
+
1691
+ options.apply_defaults timeout: @config.rpcs.get_machine.timeout,
1692
+ metadata: metadata,
1693
+ retry_policy: @config.rpcs.get_machine.retry_policy
1694
+
1695
+ options.apply_defaults timeout: @config.timeout,
1696
+ metadata: @config.metadata,
1697
+ retry_policy: @config.retry_policy
1698
+
1699
+ @edge_container_stub.call_rpc :get_machine, request, options: options do |response, operation|
1700
+ yield response, operation if block_given?
1701
+ return response
1702
+ end
1703
+ rescue ::GRPC::BadStatus => e
1704
+ raise ::Google::Cloud::Error.from_error(e)
1705
+ end
1706
+
1707
+ ##
1708
+ # Lists VPN connections in a given project and location.
1709
+ #
1710
+ # @overload list_vpn_connections(request, options = nil)
1711
+ # Pass arguments to `list_vpn_connections` via a request object, either of type
1712
+ # {::Google::Cloud::EdgeContainer::V1::ListVpnConnectionsRequest} or an equivalent Hash.
1713
+ #
1714
+ # @param request [::Google::Cloud::EdgeContainer::V1::ListVpnConnectionsRequest, ::Hash]
1715
+ # A request object representing the call parameters. Required. To specify no
1716
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1717
+ # @param options [::Gapic::CallOptions, ::Hash]
1718
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1719
+ #
1720
+ # @overload list_vpn_connections(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1721
+ # Pass arguments to `list_vpn_connections` via keyword arguments. Note that at
1722
+ # least one keyword argument is required. To specify no parameters, or to keep all
1723
+ # the default parameter values, pass an empty Hash as a request object (see above).
1724
+ #
1725
+ # @param parent [::String]
1726
+ # Required. The parent location, which owns this collection of VPN
1727
+ # connections.
1728
+ # @param page_size [::Integer]
1729
+ # The maximum number of resources to list.
1730
+ # @param page_token [::String]
1731
+ # A page token received from previous list request.
1732
+ # @param filter [::String]
1733
+ # Only resources matching this filter will be listed.
1734
+ # @param order_by [::String]
1735
+ # Specifies the order in which resources will be listed.
1736
+ #
1737
+ # @yield [response, operation] Access the result along with the RPC operation
1738
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::EdgeContainer::V1::VpnConnection>]
1739
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1740
+ #
1741
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::EdgeContainer::V1::VpnConnection>]
1742
+ #
1743
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1744
+ #
1745
+ # @example Basic example
1746
+ # require "google/cloud/edge_container/v1"
1747
+ #
1748
+ # # Create a client object. The client can be reused for multiple calls.
1749
+ # client = Google::Cloud::EdgeContainer::V1::EdgeContainer::Client.new
1750
+ #
1751
+ # # Create a request. To set request fields, pass in keyword arguments.
1752
+ # request = Google::Cloud::EdgeContainer::V1::ListVpnConnectionsRequest.new
1753
+ #
1754
+ # # Call the list_vpn_connections method.
1755
+ # result = client.list_vpn_connections request
1756
+ #
1757
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1758
+ # # over elements, and API calls will be issued to fetch pages as needed.
1759
+ # result.each do |item|
1760
+ # # Each element is of type ::Google::Cloud::EdgeContainer::V1::VpnConnection.
1761
+ # p item
1762
+ # end
1763
+ #
1764
+ def list_vpn_connections request, options = nil
1765
+ raise ::ArgumentError, "request must be provided" if request.nil?
1766
+
1767
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::ListVpnConnectionsRequest
1768
+
1769
+ # Converts hash and nil to an options object
1770
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1771
+
1772
+ # Customize the options with defaults
1773
+ metadata = @config.rpcs.list_vpn_connections.metadata.to_h
1774
+
1775
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1776
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1777
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1778
+ gapic_version: ::Google::Cloud::EdgeContainer::V1::VERSION
1779
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1780
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1781
+
1782
+ header_params = {}
1783
+ if request.parent
1784
+ header_params["parent"] = request.parent
1785
+ end
1786
+
1787
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1788
+ metadata[:"x-goog-request-params"] ||= request_params_header
1789
+
1790
+ options.apply_defaults timeout: @config.rpcs.list_vpn_connections.timeout,
1791
+ metadata: metadata,
1792
+ retry_policy: @config.rpcs.list_vpn_connections.retry_policy
1793
+
1794
+ options.apply_defaults timeout: @config.timeout,
1795
+ metadata: @config.metadata,
1796
+ retry_policy: @config.retry_policy
1797
+
1798
+ @edge_container_stub.call_rpc :list_vpn_connections, request, options: options do |response, operation|
1799
+ response = ::Gapic::PagedEnumerable.new @edge_container_stub, :list_vpn_connections, request, response, operation, options
1800
+ yield response, operation if block_given?
1801
+ return response
1802
+ end
1803
+ rescue ::GRPC::BadStatus => e
1804
+ raise ::Google::Cloud::Error.from_error(e)
1805
+ end
1806
+
1807
+ ##
1808
+ # Gets details of a single VPN connection.
1809
+ #
1810
+ # @overload get_vpn_connection(request, options = nil)
1811
+ # Pass arguments to `get_vpn_connection` via a request object, either of type
1812
+ # {::Google::Cloud::EdgeContainer::V1::GetVpnConnectionRequest} or an equivalent Hash.
1813
+ #
1814
+ # @param request [::Google::Cloud::EdgeContainer::V1::GetVpnConnectionRequest, ::Hash]
1815
+ # A request object representing the call parameters. Required. To specify no
1816
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1817
+ # @param options [::Gapic::CallOptions, ::Hash]
1818
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1819
+ #
1820
+ # @overload get_vpn_connection(name: nil)
1821
+ # Pass arguments to `get_vpn_connection` via keyword arguments. Note that at
1822
+ # least one keyword argument is required. To specify no parameters, or to keep all
1823
+ # the default parameter values, pass an empty Hash as a request object (see above).
1824
+ #
1825
+ # @param name [::String]
1826
+ # Required. The resource name of the vpn connection.
1827
+ #
1828
+ # @yield [response, operation] Access the result along with the RPC operation
1829
+ # @yieldparam response [::Google::Cloud::EdgeContainer::V1::VpnConnection]
1830
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1831
+ #
1832
+ # @return [::Google::Cloud::EdgeContainer::V1::VpnConnection]
1833
+ #
1834
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1835
+ #
1836
+ # @example Basic example
1837
+ # require "google/cloud/edge_container/v1"
1838
+ #
1839
+ # # Create a client object. The client can be reused for multiple calls.
1840
+ # client = Google::Cloud::EdgeContainer::V1::EdgeContainer::Client.new
1841
+ #
1842
+ # # Create a request. To set request fields, pass in keyword arguments.
1843
+ # request = Google::Cloud::EdgeContainer::V1::GetVpnConnectionRequest.new
1844
+ #
1845
+ # # Call the get_vpn_connection method.
1846
+ # result = client.get_vpn_connection request
1847
+ #
1848
+ # # The returned object is of type Google::Cloud::EdgeContainer::V1::VpnConnection.
1849
+ # p result
1850
+ #
1851
+ def get_vpn_connection request, options = nil
1852
+ raise ::ArgumentError, "request must be provided" if request.nil?
1853
+
1854
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::GetVpnConnectionRequest
1855
+
1856
+ # Converts hash and nil to an options object
1857
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1858
+
1859
+ # Customize the options with defaults
1860
+ metadata = @config.rpcs.get_vpn_connection.metadata.to_h
1861
+
1862
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1863
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1864
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1865
+ gapic_version: ::Google::Cloud::EdgeContainer::V1::VERSION
1866
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1867
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1868
+
1869
+ header_params = {}
1870
+ if request.name
1871
+ header_params["name"] = request.name
1872
+ end
1873
+
1874
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1875
+ metadata[:"x-goog-request-params"] ||= request_params_header
1876
+
1877
+ options.apply_defaults timeout: @config.rpcs.get_vpn_connection.timeout,
1878
+ metadata: metadata,
1879
+ retry_policy: @config.rpcs.get_vpn_connection.retry_policy
1880
+
1881
+ options.apply_defaults timeout: @config.timeout,
1882
+ metadata: @config.metadata,
1883
+ retry_policy: @config.retry_policy
1884
+
1885
+ @edge_container_stub.call_rpc :get_vpn_connection, request, options: options do |response, operation|
1886
+ yield response, operation if block_given?
1887
+ return response
1888
+ end
1889
+ rescue ::GRPC::BadStatus => e
1890
+ raise ::Google::Cloud::Error.from_error(e)
1891
+ end
1892
+
1893
+ ##
1894
+ # Creates a new VPN connection in a given project and location.
1895
+ #
1896
+ # @overload create_vpn_connection(request, options = nil)
1897
+ # Pass arguments to `create_vpn_connection` via a request object, either of type
1898
+ # {::Google::Cloud::EdgeContainer::V1::CreateVpnConnectionRequest} or an equivalent Hash.
1899
+ #
1900
+ # @param request [::Google::Cloud::EdgeContainer::V1::CreateVpnConnectionRequest, ::Hash]
1901
+ # A request object representing the call parameters. Required. To specify no
1902
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1903
+ # @param options [::Gapic::CallOptions, ::Hash]
1904
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1905
+ #
1906
+ # @overload create_vpn_connection(parent: nil, vpn_connection_id: nil, vpn_connection: nil, request_id: nil)
1907
+ # Pass arguments to `create_vpn_connection` via keyword arguments. Note that at
1908
+ # least one keyword argument is required. To specify no parameters, or to keep all
1909
+ # the default parameter values, pass an empty Hash as a request object (see above).
1910
+ #
1911
+ # @param parent [::String]
1912
+ # Required. The parent location where this vpn connection will be created.
1913
+ # @param vpn_connection_id [::String]
1914
+ # Required. The VPN connection identifier.
1915
+ # @param vpn_connection [::Google::Cloud::EdgeContainer::V1::VpnConnection, ::Hash]
1916
+ # Required. The VPN connection to create.
1917
+ # @param request_id [::String]
1918
+ # A unique identifier for this request. Restricted to 36 ASCII characters. A
1919
+ # random UUID is recommended. This request is only idempotent if
1920
+ # `request_id` is provided.
1921
+ #
1922
+ # @yield [response, operation] Access the result along with the RPC operation
1923
+ # @yieldparam response [::Gapic::Operation]
1924
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1925
+ #
1926
+ # @return [::Gapic::Operation]
1927
+ #
1928
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1929
+ #
1930
+ # @example Basic example
1931
+ # require "google/cloud/edge_container/v1"
1932
+ #
1933
+ # # Create a client object. The client can be reused for multiple calls.
1934
+ # client = Google::Cloud::EdgeContainer::V1::EdgeContainer::Client.new
1935
+ #
1936
+ # # Create a request. To set request fields, pass in keyword arguments.
1937
+ # request = Google::Cloud::EdgeContainer::V1::CreateVpnConnectionRequest.new
1938
+ #
1939
+ # # Call the create_vpn_connection method.
1940
+ # result = client.create_vpn_connection request
1941
+ #
1942
+ # # The returned object is of type Gapic::Operation. You can use it to
1943
+ # # check the status of an operation, cancel it, or wait for results.
1944
+ # # Here is how to wait for a response.
1945
+ # result.wait_until_done! timeout: 60
1946
+ # if result.response?
1947
+ # p result.response
1948
+ # else
1949
+ # puts "No response received."
1950
+ # end
1951
+ #
1952
+ def create_vpn_connection request, options = nil
1953
+ raise ::ArgumentError, "request must be provided" if request.nil?
1954
+
1955
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::CreateVpnConnectionRequest
1956
+
1957
+ # Converts hash and nil to an options object
1958
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1959
+
1960
+ # Customize the options with defaults
1961
+ metadata = @config.rpcs.create_vpn_connection.metadata.to_h
1962
+
1963
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1964
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1965
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1966
+ gapic_version: ::Google::Cloud::EdgeContainer::V1::VERSION
1967
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1968
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1969
+
1970
+ header_params = {}
1971
+ if request.parent
1972
+ header_params["parent"] = request.parent
1973
+ end
1974
+
1975
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1976
+ metadata[:"x-goog-request-params"] ||= request_params_header
1977
+
1978
+ options.apply_defaults timeout: @config.rpcs.create_vpn_connection.timeout,
1979
+ metadata: metadata,
1980
+ retry_policy: @config.rpcs.create_vpn_connection.retry_policy
1981
+
1982
+ options.apply_defaults timeout: @config.timeout,
1983
+ metadata: @config.metadata,
1984
+ retry_policy: @config.retry_policy
1985
+
1986
+ @edge_container_stub.call_rpc :create_vpn_connection, request, options: options do |response, operation|
1987
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1988
+ yield response, operation if block_given?
1989
+ return response
1990
+ end
1991
+ rescue ::GRPC::BadStatus => e
1992
+ raise ::Google::Cloud::Error.from_error(e)
1993
+ end
1994
+
1995
+ ##
1996
+ # Deletes a single VPN connection.
1997
+ #
1998
+ # @overload delete_vpn_connection(request, options = nil)
1999
+ # Pass arguments to `delete_vpn_connection` via a request object, either of type
2000
+ # {::Google::Cloud::EdgeContainer::V1::DeleteVpnConnectionRequest} or an equivalent Hash.
2001
+ #
2002
+ # @param request [::Google::Cloud::EdgeContainer::V1::DeleteVpnConnectionRequest, ::Hash]
2003
+ # A request object representing the call parameters. Required. To specify no
2004
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2005
+ # @param options [::Gapic::CallOptions, ::Hash]
2006
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2007
+ #
2008
+ # @overload delete_vpn_connection(name: nil, request_id: nil)
2009
+ # Pass arguments to `delete_vpn_connection` via keyword arguments. Note that at
2010
+ # least one keyword argument is required. To specify no parameters, or to keep all
2011
+ # the default parameter values, pass an empty Hash as a request object (see above).
2012
+ #
2013
+ # @param name [::String]
2014
+ # Required. The resource name of the vpn connection.
2015
+ # @param request_id [::String]
2016
+ # A unique identifier for this request. Restricted to 36 ASCII characters. A
2017
+ # random UUID is recommended. This request is only idempotent if
2018
+ # `request_id` is provided.
2019
+ #
2020
+ # @yield [response, operation] Access the result along with the RPC operation
2021
+ # @yieldparam response [::Gapic::Operation]
2022
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2023
+ #
2024
+ # @return [::Gapic::Operation]
2025
+ #
2026
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2027
+ #
2028
+ # @example Basic example
2029
+ # require "google/cloud/edge_container/v1"
2030
+ #
2031
+ # # Create a client object. The client can be reused for multiple calls.
2032
+ # client = Google::Cloud::EdgeContainer::V1::EdgeContainer::Client.new
2033
+ #
2034
+ # # Create a request. To set request fields, pass in keyword arguments.
2035
+ # request = Google::Cloud::EdgeContainer::V1::DeleteVpnConnectionRequest.new
2036
+ #
2037
+ # # Call the delete_vpn_connection method.
2038
+ # result = client.delete_vpn_connection request
2039
+ #
2040
+ # # The returned object is of type Gapic::Operation. You can use it to
2041
+ # # check the status of an operation, cancel it, or wait for results.
2042
+ # # Here is how to wait for a response.
2043
+ # result.wait_until_done! timeout: 60
2044
+ # if result.response?
2045
+ # p result.response
2046
+ # else
2047
+ # puts "No response received."
2048
+ # end
2049
+ #
2050
+ def delete_vpn_connection request, options = nil
2051
+ raise ::ArgumentError, "request must be provided" if request.nil?
2052
+
2053
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::DeleteVpnConnectionRequest
2054
+
2055
+ # Converts hash and nil to an options object
2056
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2057
+
2058
+ # Customize the options with defaults
2059
+ metadata = @config.rpcs.delete_vpn_connection.metadata.to_h
2060
+
2061
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2062
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2063
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2064
+ gapic_version: ::Google::Cloud::EdgeContainer::V1::VERSION
2065
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2066
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2067
+
2068
+ header_params = {}
2069
+ if request.name
2070
+ header_params["name"] = request.name
2071
+ end
2072
+
2073
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2074
+ metadata[:"x-goog-request-params"] ||= request_params_header
2075
+
2076
+ options.apply_defaults timeout: @config.rpcs.delete_vpn_connection.timeout,
2077
+ metadata: metadata,
2078
+ retry_policy: @config.rpcs.delete_vpn_connection.retry_policy
2079
+
2080
+ options.apply_defaults timeout: @config.timeout,
2081
+ metadata: @config.metadata,
2082
+ retry_policy: @config.retry_policy
2083
+
2084
+ @edge_container_stub.call_rpc :delete_vpn_connection, request, options: options do |response, operation|
2085
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2086
+ yield response, operation if block_given?
2087
+ return response
2088
+ end
2089
+ rescue ::GRPC::BadStatus => e
2090
+ raise ::Google::Cloud::Error.from_error(e)
2091
+ end
2092
+
2093
+ ##
2094
+ # Gets the server config.
2095
+ #
2096
+ # @overload get_server_config(request, options = nil)
2097
+ # Pass arguments to `get_server_config` via a request object, either of type
2098
+ # {::Google::Cloud::EdgeContainer::V1::GetServerConfigRequest} or an equivalent Hash.
2099
+ #
2100
+ # @param request [::Google::Cloud::EdgeContainer::V1::GetServerConfigRequest, ::Hash]
2101
+ # A request object representing the call parameters. Required. To specify no
2102
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2103
+ # @param options [::Gapic::CallOptions, ::Hash]
2104
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2105
+ #
2106
+ # @overload get_server_config(name: nil)
2107
+ # Pass arguments to `get_server_config` via keyword arguments. Note that at
2108
+ # least one keyword argument is required. To specify no parameters, or to keep all
2109
+ # the default parameter values, pass an empty Hash as a request object (see above).
2110
+ #
2111
+ # @param name [::String]
2112
+ # Required. The name (project and location) of the server config to get,
2113
+ # specified in the format `projects/*/locations/*`.
2114
+ #
2115
+ # @yield [response, operation] Access the result along with the RPC operation
2116
+ # @yieldparam response [::Google::Cloud::EdgeContainer::V1::ServerConfig]
2117
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2118
+ #
2119
+ # @return [::Google::Cloud::EdgeContainer::V1::ServerConfig]
2120
+ #
2121
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2122
+ #
2123
+ # @example Basic example
2124
+ # require "google/cloud/edge_container/v1"
2125
+ #
2126
+ # # Create a client object. The client can be reused for multiple calls.
2127
+ # client = Google::Cloud::EdgeContainer::V1::EdgeContainer::Client.new
2128
+ #
2129
+ # # Create a request. To set request fields, pass in keyword arguments.
2130
+ # request = Google::Cloud::EdgeContainer::V1::GetServerConfigRequest.new
2131
+ #
2132
+ # # Call the get_server_config method.
2133
+ # result = client.get_server_config request
2134
+ #
2135
+ # # The returned object is of type Google::Cloud::EdgeContainer::V1::ServerConfig.
2136
+ # p result
2137
+ #
2138
+ def get_server_config request, options = nil
2139
+ raise ::ArgumentError, "request must be provided" if request.nil?
2140
+
2141
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::GetServerConfigRequest
2142
+
2143
+ # Converts hash and nil to an options object
2144
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2145
+
2146
+ # Customize the options with defaults
2147
+ metadata = @config.rpcs.get_server_config.metadata.to_h
2148
+
2149
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2150
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2151
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2152
+ gapic_version: ::Google::Cloud::EdgeContainer::V1::VERSION
2153
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2154
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2155
+
2156
+ header_params = {}
2157
+ if request.name
2158
+ header_params["name"] = request.name
2159
+ end
2160
+
2161
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2162
+ metadata[:"x-goog-request-params"] ||= request_params_header
2163
+
2164
+ options.apply_defaults timeout: @config.rpcs.get_server_config.timeout,
2165
+ metadata: metadata,
2166
+ retry_policy: @config.rpcs.get_server_config.retry_policy
2167
+
2168
+ options.apply_defaults timeout: @config.timeout,
2169
+ metadata: @config.metadata,
2170
+ retry_policy: @config.retry_policy
2171
+
2172
+ @edge_container_stub.call_rpc :get_server_config, request, options: options do |response, operation|
2173
+ yield response, operation if block_given?
2174
+ return response
2175
+ end
2176
+ rescue ::GRPC::BadStatus => e
2177
+ raise ::Google::Cloud::Error.from_error(e)
2178
+ end
2179
+
2180
+ ##
2181
+ # Configuration class for the EdgeContainer API.
2182
+ #
2183
+ # This class represents the configuration for EdgeContainer,
2184
+ # providing control over timeouts, retry behavior, logging, transport
2185
+ # parameters, and other low-level controls. Certain parameters can also be
2186
+ # applied individually to specific RPCs. See
2187
+ # {::Google::Cloud::EdgeContainer::V1::EdgeContainer::Client::Configuration::Rpcs}
2188
+ # for a list of RPCs that can be configured independently.
2189
+ #
2190
+ # Configuration can be applied globally to all clients, or to a single client
2191
+ # on construction.
2192
+ #
2193
+ # @example
2194
+ #
2195
+ # # Modify the global config, setting the timeout for
2196
+ # # list_clusters to 20 seconds,
2197
+ # # and all remaining timeouts to 10 seconds.
2198
+ # ::Google::Cloud::EdgeContainer::V1::EdgeContainer::Client.configure do |config|
2199
+ # config.timeout = 10.0
2200
+ # config.rpcs.list_clusters.timeout = 20.0
2201
+ # end
2202
+ #
2203
+ # # Apply the above configuration only to a new client.
2204
+ # client = ::Google::Cloud::EdgeContainer::V1::EdgeContainer::Client.new do |config|
2205
+ # config.timeout = 10.0
2206
+ # config.rpcs.list_clusters.timeout = 20.0
2207
+ # end
2208
+ #
2209
+ # @!attribute [rw] endpoint
2210
+ # A custom service endpoint, as a hostname or hostname:port. The default is
2211
+ # nil, indicating to use the default endpoint in the current universe domain.
2212
+ # @return [::String,nil]
2213
+ # @!attribute [rw] credentials
2214
+ # Credentials to send with calls. You may provide any of the following types:
2215
+ # * (`String`) The path to a service account key file in JSON format
2216
+ # * (`Hash`) A service account key as a Hash
2217
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
2218
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
2219
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
2220
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
2221
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
2222
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
2223
+ # * (`nil`) indicating no credentials
2224
+ # @return [::Object]
2225
+ # @!attribute [rw] scope
2226
+ # The OAuth scopes
2227
+ # @return [::Array<::String>]
2228
+ # @!attribute [rw] lib_name
2229
+ # The library name as recorded in instrumentation and logging
2230
+ # @return [::String]
2231
+ # @!attribute [rw] lib_version
2232
+ # The library version as recorded in instrumentation and logging
2233
+ # @return [::String]
2234
+ # @!attribute [rw] channel_args
2235
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
2236
+ # `GRPC::Core::Channel` object is provided as the credential.
2237
+ # @return [::Hash]
2238
+ # @!attribute [rw] interceptors
2239
+ # An array of interceptors that are run before calls are executed.
2240
+ # @return [::Array<::GRPC::ClientInterceptor>]
2241
+ # @!attribute [rw] timeout
2242
+ # The call timeout in seconds.
2243
+ # @return [::Numeric]
2244
+ # @!attribute [rw] metadata
2245
+ # Additional gRPC headers to be sent with the call.
2246
+ # @return [::Hash{::Symbol=>::String}]
2247
+ # @!attribute [rw] retry_policy
2248
+ # The retry policy. The value is a hash with the following keys:
2249
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2250
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2251
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2252
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2253
+ # trigger a retry.
2254
+ # @return [::Hash]
2255
+ # @!attribute [rw] quota_project
2256
+ # A separate project against which to charge quota.
2257
+ # @return [::String]
2258
+ # @!attribute [rw] universe_domain
2259
+ # The universe domain within which to make requests. This determines the
2260
+ # default endpoint URL. The default value of nil uses the environment
2261
+ # universe (usually the default "googleapis.com" universe).
2262
+ # @return [::String,nil]
2263
+ #
2264
+ class Configuration
2265
+ extend ::Gapic::Config
2266
+
2267
+ # @private
2268
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
2269
+ DEFAULT_ENDPOINT = "edgecontainer.googleapis.com"
2270
+
2271
+ config_attr :endpoint, nil, ::String, nil
2272
+ config_attr :credentials, nil do |value|
2273
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
2274
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
2275
+ allowed.any? { |klass| klass === value }
2276
+ end
2277
+ config_attr :scope, nil, ::String, ::Array, nil
2278
+ config_attr :lib_name, nil, ::String, nil
2279
+ config_attr :lib_version, nil, ::String, nil
2280
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
2281
+ config_attr :interceptors, nil, ::Array, nil
2282
+ config_attr :timeout, nil, ::Numeric, nil
2283
+ config_attr :metadata, nil, ::Hash, nil
2284
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2285
+ config_attr :quota_project, nil, ::String, nil
2286
+ config_attr :universe_domain, nil, ::String, nil
2287
+
2288
+ # @private
2289
+ def initialize parent_config = nil
2290
+ @parent_config = parent_config unless parent_config.nil?
2291
+
2292
+ yield self if block_given?
2293
+ end
2294
+
2295
+ ##
2296
+ # Configurations for individual RPCs
2297
+ # @return [Rpcs]
2298
+ #
2299
+ def rpcs
2300
+ @rpcs ||= begin
2301
+ parent_rpcs = nil
2302
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
2303
+ Rpcs.new parent_rpcs
2304
+ end
2305
+ end
2306
+
2307
+ ##
2308
+ # Configuration for the channel pool
2309
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
2310
+ #
2311
+ def channel_pool
2312
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
2313
+ end
2314
+
2315
+ ##
2316
+ # Configuration RPC class for the EdgeContainer API.
2317
+ #
2318
+ # Includes fields providing the configuration for each RPC in this service.
2319
+ # Each configuration object is of type `Gapic::Config::Method` and includes
2320
+ # the following configuration fields:
2321
+ #
2322
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
2323
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
2324
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
2325
+ # include the following keys:
2326
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2327
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2328
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2329
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2330
+ # trigger a retry.
2331
+ #
2332
+ class Rpcs
2333
+ ##
2334
+ # RPC-specific configuration for `list_clusters`
2335
+ # @return [::Gapic::Config::Method]
2336
+ #
2337
+ attr_reader :list_clusters
2338
+ ##
2339
+ # RPC-specific configuration for `get_cluster`
2340
+ # @return [::Gapic::Config::Method]
2341
+ #
2342
+ attr_reader :get_cluster
2343
+ ##
2344
+ # RPC-specific configuration for `create_cluster`
2345
+ # @return [::Gapic::Config::Method]
2346
+ #
2347
+ attr_reader :create_cluster
2348
+ ##
2349
+ # RPC-specific configuration for `update_cluster`
2350
+ # @return [::Gapic::Config::Method]
2351
+ #
2352
+ attr_reader :update_cluster
2353
+ ##
2354
+ # RPC-specific configuration for `upgrade_cluster`
2355
+ # @return [::Gapic::Config::Method]
2356
+ #
2357
+ attr_reader :upgrade_cluster
2358
+ ##
2359
+ # RPC-specific configuration for `delete_cluster`
2360
+ # @return [::Gapic::Config::Method]
2361
+ #
2362
+ attr_reader :delete_cluster
2363
+ ##
2364
+ # RPC-specific configuration for `generate_access_token`
2365
+ # @return [::Gapic::Config::Method]
2366
+ #
2367
+ attr_reader :generate_access_token
2368
+ ##
2369
+ # RPC-specific configuration for `generate_offline_credential`
2370
+ # @return [::Gapic::Config::Method]
2371
+ #
2372
+ attr_reader :generate_offline_credential
2373
+ ##
2374
+ # RPC-specific configuration for `list_node_pools`
2375
+ # @return [::Gapic::Config::Method]
2376
+ #
2377
+ attr_reader :list_node_pools
2378
+ ##
2379
+ # RPC-specific configuration for `get_node_pool`
2380
+ # @return [::Gapic::Config::Method]
2381
+ #
2382
+ attr_reader :get_node_pool
2383
+ ##
2384
+ # RPC-specific configuration for `create_node_pool`
2385
+ # @return [::Gapic::Config::Method]
2386
+ #
2387
+ attr_reader :create_node_pool
2388
+ ##
2389
+ # RPC-specific configuration for `update_node_pool`
2390
+ # @return [::Gapic::Config::Method]
2391
+ #
2392
+ attr_reader :update_node_pool
2393
+ ##
2394
+ # RPC-specific configuration for `delete_node_pool`
2395
+ # @return [::Gapic::Config::Method]
2396
+ #
2397
+ attr_reader :delete_node_pool
2398
+ ##
2399
+ # RPC-specific configuration for `list_machines`
2400
+ # @return [::Gapic::Config::Method]
2401
+ #
2402
+ attr_reader :list_machines
2403
+ ##
2404
+ # RPC-specific configuration for `get_machine`
2405
+ # @return [::Gapic::Config::Method]
2406
+ #
2407
+ attr_reader :get_machine
2408
+ ##
2409
+ # RPC-specific configuration for `list_vpn_connections`
2410
+ # @return [::Gapic::Config::Method]
2411
+ #
2412
+ attr_reader :list_vpn_connections
2413
+ ##
2414
+ # RPC-specific configuration for `get_vpn_connection`
2415
+ # @return [::Gapic::Config::Method]
2416
+ #
2417
+ attr_reader :get_vpn_connection
2418
+ ##
2419
+ # RPC-specific configuration for `create_vpn_connection`
2420
+ # @return [::Gapic::Config::Method]
2421
+ #
2422
+ attr_reader :create_vpn_connection
2423
+ ##
2424
+ # RPC-specific configuration for `delete_vpn_connection`
2425
+ # @return [::Gapic::Config::Method]
2426
+ #
2427
+ attr_reader :delete_vpn_connection
2428
+ ##
2429
+ # RPC-specific configuration for `get_server_config`
2430
+ # @return [::Gapic::Config::Method]
2431
+ #
2432
+ attr_reader :get_server_config
2433
+
2434
+ # @private
2435
+ def initialize parent_rpcs = nil
2436
+ list_clusters_config = parent_rpcs.list_clusters if parent_rpcs.respond_to? :list_clusters
2437
+ @list_clusters = ::Gapic::Config::Method.new list_clusters_config
2438
+ get_cluster_config = parent_rpcs.get_cluster if parent_rpcs.respond_to? :get_cluster
2439
+ @get_cluster = ::Gapic::Config::Method.new get_cluster_config
2440
+ create_cluster_config = parent_rpcs.create_cluster if parent_rpcs.respond_to? :create_cluster
2441
+ @create_cluster = ::Gapic::Config::Method.new create_cluster_config
2442
+ update_cluster_config = parent_rpcs.update_cluster if parent_rpcs.respond_to? :update_cluster
2443
+ @update_cluster = ::Gapic::Config::Method.new update_cluster_config
2444
+ upgrade_cluster_config = parent_rpcs.upgrade_cluster if parent_rpcs.respond_to? :upgrade_cluster
2445
+ @upgrade_cluster = ::Gapic::Config::Method.new upgrade_cluster_config
2446
+ delete_cluster_config = parent_rpcs.delete_cluster if parent_rpcs.respond_to? :delete_cluster
2447
+ @delete_cluster = ::Gapic::Config::Method.new delete_cluster_config
2448
+ generate_access_token_config = parent_rpcs.generate_access_token if parent_rpcs.respond_to? :generate_access_token
2449
+ @generate_access_token = ::Gapic::Config::Method.new generate_access_token_config
2450
+ generate_offline_credential_config = parent_rpcs.generate_offline_credential if parent_rpcs.respond_to? :generate_offline_credential
2451
+ @generate_offline_credential = ::Gapic::Config::Method.new generate_offline_credential_config
2452
+ list_node_pools_config = parent_rpcs.list_node_pools if parent_rpcs.respond_to? :list_node_pools
2453
+ @list_node_pools = ::Gapic::Config::Method.new list_node_pools_config
2454
+ get_node_pool_config = parent_rpcs.get_node_pool if parent_rpcs.respond_to? :get_node_pool
2455
+ @get_node_pool = ::Gapic::Config::Method.new get_node_pool_config
2456
+ create_node_pool_config = parent_rpcs.create_node_pool if parent_rpcs.respond_to? :create_node_pool
2457
+ @create_node_pool = ::Gapic::Config::Method.new create_node_pool_config
2458
+ update_node_pool_config = parent_rpcs.update_node_pool if parent_rpcs.respond_to? :update_node_pool
2459
+ @update_node_pool = ::Gapic::Config::Method.new update_node_pool_config
2460
+ delete_node_pool_config = parent_rpcs.delete_node_pool if parent_rpcs.respond_to? :delete_node_pool
2461
+ @delete_node_pool = ::Gapic::Config::Method.new delete_node_pool_config
2462
+ list_machines_config = parent_rpcs.list_machines if parent_rpcs.respond_to? :list_machines
2463
+ @list_machines = ::Gapic::Config::Method.new list_machines_config
2464
+ get_machine_config = parent_rpcs.get_machine if parent_rpcs.respond_to? :get_machine
2465
+ @get_machine = ::Gapic::Config::Method.new get_machine_config
2466
+ list_vpn_connections_config = parent_rpcs.list_vpn_connections if parent_rpcs.respond_to? :list_vpn_connections
2467
+ @list_vpn_connections = ::Gapic::Config::Method.new list_vpn_connections_config
2468
+ get_vpn_connection_config = parent_rpcs.get_vpn_connection if parent_rpcs.respond_to? :get_vpn_connection
2469
+ @get_vpn_connection = ::Gapic::Config::Method.new get_vpn_connection_config
2470
+ create_vpn_connection_config = parent_rpcs.create_vpn_connection if parent_rpcs.respond_to? :create_vpn_connection
2471
+ @create_vpn_connection = ::Gapic::Config::Method.new create_vpn_connection_config
2472
+ delete_vpn_connection_config = parent_rpcs.delete_vpn_connection if parent_rpcs.respond_to? :delete_vpn_connection
2473
+ @delete_vpn_connection = ::Gapic::Config::Method.new delete_vpn_connection_config
2474
+ get_server_config_config = parent_rpcs.get_server_config if parent_rpcs.respond_to? :get_server_config
2475
+ @get_server_config = ::Gapic::Config::Method.new get_server_config_config
2476
+
2477
+ yield self if block_given?
2478
+ end
2479
+ end
2480
+ end
2481
+ end
2482
+ end
2483
+ end
2484
+ end
2485
+ end
2486
+ end