google-cloud-redis-cluster-v1beta1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/LICENSE.md +201 -0
  5. data/README.md +144 -0
  6. data/lib/google/cloud/redis/cluster/v1beta1/bindings_override.rb +104 -0
  7. data/lib/google/cloud/redis/cluster/v1beta1/cloud_redis_cluster/client.rb +1048 -0
  8. data/lib/google/cloud/redis/cluster/v1beta1/cloud_redis_cluster/credentials.rb +49 -0
  9. data/lib/google/cloud/redis/cluster/v1beta1/cloud_redis_cluster/operations.rb +811 -0
  10. data/lib/google/cloud/redis/cluster/v1beta1/cloud_redis_cluster/paths.rb +90 -0
  11. data/lib/google/cloud/redis/cluster/v1beta1/cloud_redis_cluster/rest/client.rb +987 -0
  12. data/lib/google/cloud/redis/cluster/v1beta1/cloud_redis_cluster/rest/operations.rb +903 -0
  13. data/lib/google/cloud/redis/cluster/v1beta1/cloud_redis_cluster/rest/service_stub.rb +427 -0
  14. data/lib/google/cloud/redis/cluster/v1beta1/cloud_redis_cluster/rest.rb +76 -0
  15. data/lib/google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.rb +78 -0
  16. data/lib/google/cloud/redis/cluster/v1beta1/cloud_redis_cluster_pb.rb +84 -0
  17. data/lib/google/cloud/redis/cluster/v1beta1/cloud_redis_cluster_services_pb.rb +97 -0
  18. data/lib/google/cloud/redis/cluster/v1beta1/rest.rb +40 -0
  19. data/lib/google/cloud/redis/cluster/v1beta1/version.rb +30 -0
  20. data/lib/google/cloud/redis/cluster/v1beta1.rb +47 -0
  21. data/lib/google-cloud-redis-cluster-v1beta1.rb +21 -0
  22. data/proto_docs/README.md +4 -0
  23. data/proto_docs/google/api/client.rb +399 -0
  24. data/proto_docs/google/api/field_behavior.rb +85 -0
  25. data/proto_docs/google/api/launch_stage.rb +71 -0
  26. data/proto_docs/google/api/resource.rb +222 -0
  27. data/proto_docs/google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.rb +564 -0
  28. data/proto_docs/google/longrunning/operations.rb +164 -0
  29. data/proto_docs/google/protobuf/any.rb +145 -0
  30. data/proto_docs/google/protobuf/duration.rb +98 -0
  31. data/proto_docs/google/protobuf/empty.rb +34 -0
  32. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  33. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  34. data/proto_docs/google/rpc/status.rb +48 -0
  35. metadata +132 -0
@@ -0,0 +1,987 @@
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/redis/cluster/v1beta1/cloud_redis_cluster_pb"
21
+ require "google/cloud/redis/cluster/v1beta1/cloud_redis_cluster/rest/service_stub"
22
+ require "google/cloud/location/rest"
23
+
24
+ module Google
25
+ module Cloud
26
+ module Redis
27
+ module Cluster
28
+ module V1beta1
29
+ module CloudRedisCluster
30
+ module Rest
31
+ ##
32
+ # REST client for the CloudRedisCluster service.
33
+ #
34
+ # Configures and manages Cloud Memorystore for Redis clusters
35
+ #
36
+ # Google Cloud Memorystore for Redis Cluster
37
+ #
38
+ # The `redis.googleapis.com` service implements the Google Cloud Memorystore
39
+ # for Redis API and defines the following resource model for managing Redis
40
+ # clusters:
41
+ # * The service works with a collection of cloud projects, named: `/projects/*`
42
+ # * Each project has a collection of available locations, named: `/locations/*`
43
+ # * Each location has a collection of Redis clusters, named: `/clusters/*`
44
+ # * As such, Redis clusters are resources of the form:
45
+ # `/projects/{project_id}/locations/{location_id}/clusters/{instance_id}`
46
+ #
47
+ # Note that location_id must be a GCP `region`; for example:
48
+ # * `projects/redpepper-1290/locations/us-central1/clusters/my-redis`
49
+ #
50
+ # We use API version selector for Flex APIs
51
+ # * The versioning strategy is release-based versioning
52
+ # * Our backend CLH only deals with the superset version (called v1main)
53
+ # * Existing backend for Redis Gen1 and MRR is not touched.
54
+ # * More details in go/redis-flex-api-versioning
55
+ #
56
+ class Client
57
+ # @private
58
+ API_VERSION = ""
59
+
60
+ # @private
61
+ DEFAULT_ENDPOINT_TEMPLATE = "redis.$UNIVERSE_DOMAIN$"
62
+
63
+ include Paths
64
+
65
+ # @private
66
+ attr_reader :cloud_redis_cluster_stub
67
+
68
+ ##
69
+ # Configure the CloudRedisCluster Client class.
70
+ #
71
+ # See {::Google::Cloud::Redis::Cluster::V1beta1::CloudRedisCluster::Rest::Client::Configuration}
72
+ # for a description of the configuration fields.
73
+ #
74
+ # @example
75
+ #
76
+ # # Modify the configuration for all CloudRedisCluster clients
77
+ # ::Google::Cloud::Redis::Cluster::V1beta1::CloudRedisCluster::Rest::Client.configure do |config|
78
+ # config.timeout = 10.0
79
+ # end
80
+ #
81
+ # @yield [config] Configure the Client client.
82
+ # @yieldparam config [Client::Configuration]
83
+ #
84
+ # @return [Client::Configuration]
85
+ #
86
+ def self.configure
87
+ @configure ||= begin
88
+ namespace = ["Google", "Cloud", "Redis", "Cluster", "V1beta1"]
89
+ parent_config = while namespace.any?
90
+ parent_name = namespace.join "::"
91
+ parent_const = const_get parent_name
92
+ break parent_const.configure if parent_const.respond_to? :configure
93
+ namespace.pop
94
+ end
95
+ default_config = Client::Configuration.new parent_config
96
+
97
+ default_config.rpcs.list_clusters.timeout = 600.0
98
+
99
+ default_config.rpcs.get_cluster.timeout = 600.0
100
+
101
+ default_config.rpcs.update_cluster.timeout = 600.0
102
+
103
+ default_config.rpcs.delete_cluster.timeout = 600.0
104
+
105
+ default_config.rpcs.create_cluster.timeout = 600.0
106
+
107
+ default_config.rpcs.get_cluster_certificate_authority.timeout = 600.0
108
+
109
+ default_config
110
+ end
111
+ yield @configure if block_given?
112
+ @configure
113
+ end
114
+
115
+ ##
116
+ # Configure the CloudRedisCluster Client instance.
117
+ #
118
+ # The configuration is set to the derived mode, meaning that values can be changed,
119
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
120
+ # should be made on {Client.configure}.
121
+ #
122
+ # See {::Google::Cloud::Redis::Cluster::V1beta1::CloudRedisCluster::Rest::Client::Configuration}
123
+ # for a description of the configuration fields.
124
+ #
125
+ # @yield [config] Configure the Client client.
126
+ # @yieldparam config [Client::Configuration]
127
+ #
128
+ # @return [Client::Configuration]
129
+ #
130
+ def configure
131
+ yield @config if block_given?
132
+ @config
133
+ end
134
+
135
+ ##
136
+ # The effective universe domain
137
+ #
138
+ # @return [String]
139
+ #
140
+ def universe_domain
141
+ @cloud_redis_cluster_stub.universe_domain
142
+ end
143
+
144
+ ##
145
+ # Create a new CloudRedisCluster REST client object.
146
+ #
147
+ # @example
148
+ #
149
+ # # Create a client using the default configuration
150
+ # client = ::Google::Cloud::Redis::Cluster::V1beta1::CloudRedisCluster::Rest::Client.new
151
+ #
152
+ # # Create a client using a custom configuration
153
+ # client = ::Google::Cloud::Redis::Cluster::V1beta1::CloudRedisCluster::Rest::Client.new do |config|
154
+ # config.timeout = 10.0
155
+ # end
156
+ #
157
+ # @yield [config] Configure the CloudRedisCluster client.
158
+ # @yieldparam config [Client::Configuration]
159
+ #
160
+ def initialize
161
+ # Create the configuration object
162
+ @config = Configuration.new Client.configure
163
+
164
+ # Yield the configuration if needed
165
+ yield @config if block_given?
166
+
167
+ # Create credentials
168
+ credentials = @config.credentials
169
+ # Use self-signed JWT if the endpoint is unchanged from default,
170
+ # but only if the default endpoint does not have a region prefix.
171
+ enable_self_signed_jwt = @config.endpoint.nil? ||
172
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
173
+ !@config.endpoint.split(".").first.include?("-"))
174
+ credentials ||= Credentials.default scope: @config.scope,
175
+ enable_self_signed_jwt: enable_self_signed_jwt
176
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
177
+ credentials = Credentials.new credentials, scope: @config.scope
178
+ end
179
+
180
+ @quota_project_id = @config.quota_project
181
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
182
+
183
+ @operations_client = ::Google::Cloud::Redis::Cluster::V1beta1::CloudRedisCluster::Rest::Operations.new do |config|
184
+ config.credentials = credentials
185
+ config.quota_project = @quota_project_id
186
+ config.endpoint = @config.endpoint
187
+ config.universe_domain = @config.universe_domain
188
+ end
189
+
190
+ @cloud_redis_cluster_stub = ::Google::Cloud::Redis::Cluster::V1beta1::CloudRedisCluster::Rest::ServiceStub.new(
191
+ endpoint: @config.endpoint,
192
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
193
+ universe_domain: @config.universe_domain,
194
+ credentials: credentials
195
+ )
196
+
197
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
198
+ config.credentials = credentials
199
+ config.quota_project = @quota_project_id
200
+ config.endpoint = @cloud_redis_cluster_stub.endpoint
201
+ config.universe_domain = @cloud_redis_cluster_stub.universe_domain
202
+ config.bindings_override = @config.bindings_override
203
+ end
204
+ end
205
+
206
+ ##
207
+ # Get the associated client for long-running operations.
208
+ #
209
+ # @return [::Google::Cloud::Redis::Cluster::V1beta1::CloudRedisCluster::Rest::Operations]
210
+ #
211
+ attr_reader :operations_client
212
+
213
+ ##
214
+ # Get the associated client for mix-in of the Locations.
215
+ #
216
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
217
+ #
218
+ attr_reader :location_client
219
+
220
+ # Service calls
221
+
222
+ ##
223
+ # Lists all Redis clusters owned by a project in either the specified
224
+ # location (region) or all locations.
225
+ #
226
+ # The location should have the following format:
227
+ #
228
+ # * `projects/{project_id}/locations/{location_id}`
229
+ #
230
+ # If `location_id` is specified as `-` (wildcard), then all regions
231
+ # available to the project are queried, and the results are aggregated.
232
+ #
233
+ # @overload list_clusters(request, options = nil)
234
+ # Pass arguments to `list_clusters` via a request object, either of type
235
+ # {::Google::Cloud::Redis::Cluster::V1beta1::ListClustersRequest} or an equivalent Hash.
236
+ #
237
+ # @param request [::Google::Cloud::Redis::Cluster::V1beta1::ListClustersRequest, ::Hash]
238
+ # A request object representing the call parameters. Required. To specify no
239
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
240
+ # @param options [::Gapic::CallOptions, ::Hash]
241
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
242
+ #
243
+ # @overload list_clusters(parent: nil, page_size: nil, page_token: nil)
244
+ # Pass arguments to `list_clusters` via keyword arguments. Note that at
245
+ # least one keyword argument is required. To specify no parameters, or to keep all
246
+ # the default parameter values, pass an empty Hash as a request object (see above).
247
+ #
248
+ # @param parent [::String]
249
+ # Required. The resource name of the cluster location using the form:
250
+ # `projects/{project_id}/locations/{location_id}`
251
+ # where `location_id` refers to a GCP region.
252
+ # @param page_size [::Integer]
253
+ # The maximum number of items to return.
254
+ #
255
+ # If not specified, a default value of 1000 will be used by the service.
256
+ # Regardless of the page_size value, the response may include a partial list
257
+ # and a caller should only rely on response's
258
+ # {::Google::Cloud::Redis::Cluster::V1beta1::ListClustersResponse#next_page_token `next_page_token`}
259
+ # to determine if there are more clusters left to be queried.
260
+ # @param page_token [::String]
261
+ # The `next_page_token` value returned from a previous
262
+ # [ListClusters][CloudRedis.ListClusters] request, if any.
263
+ # @yield [result, operation] Access the result along with the TransportOperation object
264
+ # @yieldparam result [::Google::Cloud::Redis::Cluster::V1beta1::ListClustersResponse]
265
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
266
+ #
267
+ # @return [::Google::Cloud::Redis::Cluster::V1beta1::ListClustersResponse]
268
+ #
269
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
270
+ #
271
+ # @example Basic example
272
+ # require "google/cloud/redis/cluster/v1beta1"
273
+ #
274
+ # # Create a client object. The client can be reused for multiple calls.
275
+ # client = Google::Cloud::Redis::Cluster::V1beta1::CloudRedisCluster::Rest::Client.new
276
+ #
277
+ # # Create a request. To set request fields, pass in keyword arguments.
278
+ # request = Google::Cloud::Redis::Cluster::V1beta1::ListClustersRequest.new
279
+ #
280
+ # # Call the list_clusters method.
281
+ # result = client.list_clusters request
282
+ #
283
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
284
+ # # over elements, and API calls will be issued to fetch pages as needed.
285
+ # result.each do |item|
286
+ # # Each element is of type ::Google::Cloud::Redis::Cluster::V1beta1::Cluster.
287
+ # p item
288
+ # end
289
+ #
290
+ def list_clusters request, options = nil
291
+ raise ::ArgumentError, "request must be provided" if request.nil?
292
+
293
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1beta1::ListClustersRequest
294
+
295
+ # Converts hash and nil to an options object
296
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
297
+
298
+ # Customize the options with defaults
299
+ call_metadata = @config.rpcs.list_clusters.metadata.to_h
300
+
301
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
302
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
303
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
304
+ gapic_version: ::Google::Cloud::Redis::Cluster::V1beta1::VERSION,
305
+ transports_version_send: [:rest]
306
+
307
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
308
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
309
+
310
+ options.apply_defaults timeout: @config.rpcs.list_clusters.timeout,
311
+ metadata: call_metadata,
312
+ retry_policy: @config.rpcs.list_clusters.retry_policy
313
+
314
+ options.apply_defaults timeout: @config.timeout,
315
+ metadata: @config.metadata,
316
+ retry_policy: @config.retry_policy
317
+
318
+ @cloud_redis_cluster_stub.list_clusters request, options do |result, operation|
319
+ yield result, operation if block_given?
320
+ return result
321
+ end
322
+ rescue ::Gapic::Rest::Error => e
323
+ raise ::Google::Cloud::Error.from_error(e)
324
+ end
325
+
326
+ ##
327
+ # Gets the details of a specific Redis cluster.
328
+ #
329
+ # @overload get_cluster(request, options = nil)
330
+ # Pass arguments to `get_cluster` via a request object, either of type
331
+ # {::Google::Cloud::Redis::Cluster::V1beta1::GetClusterRequest} or an equivalent Hash.
332
+ #
333
+ # @param request [::Google::Cloud::Redis::Cluster::V1beta1::GetClusterRequest, ::Hash]
334
+ # A request object representing the call parameters. Required. To specify no
335
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
336
+ # @param options [::Gapic::CallOptions, ::Hash]
337
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
338
+ #
339
+ # @overload get_cluster(name: nil)
340
+ # Pass arguments to `get_cluster` via keyword arguments. Note that at
341
+ # least one keyword argument is required. To specify no parameters, or to keep all
342
+ # the default parameter values, pass an empty Hash as a request object (see above).
343
+ #
344
+ # @param name [::String]
345
+ # Required. Redis cluster resource name using the form:
346
+ # `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
347
+ # where `location_id` refers to a GCP region.
348
+ # @yield [result, operation] Access the result along with the TransportOperation object
349
+ # @yieldparam result [::Google::Cloud::Redis::Cluster::V1beta1::Cluster]
350
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
351
+ #
352
+ # @return [::Google::Cloud::Redis::Cluster::V1beta1::Cluster]
353
+ #
354
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
355
+ #
356
+ # @example Basic example
357
+ # require "google/cloud/redis/cluster/v1beta1"
358
+ #
359
+ # # Create a client object. The client can be reused for multiple calls.
360
+ # client = Google::Cloud::Redis::Cluster::V1beta1::CloudRedisCluster::Rest::Client.new
361
+ #
362
+ # # Create a request. To set request fields, pass in keyword arguments.
363
+ # request = Google::Cloud::Redis::Cluster::V1beta1::GetClusterRequest.new
364
+ #
365
+ # # Call the get_cluster method.
366
+ # result = client.get_cluster request
367
+ #
368
+ # # The returned object is of type Google::Cloud::Redis::Cluster::V1beta1::Cluster.
369
+ # p result
370
+ #
371
+ def get_cluster request, options = nil
372
+ raise ::ArgumentError, "request must be provided" if request.nil?
373
+
374
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1beta1::GetClusterRequest
375
+
376
+ # Converts hash and nil to an options object
377
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
378
+
379
+ # Customize the options with defaults
380
+ call_metadata = @config.rpcs.get_cluster.metadata.to_h
381
+
382
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
383
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
384
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
385
+ gapic_version: ::Google::Cloud::Redis::Cluster::V1beta1::VERSION,
386
+ transports_version_send: [:rest]
387
+
388
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
389
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
390
+
391
+ options.apply_defaults timeout: @config.rpcs.get_cluster.timeout,
392
+ metadata: call_metadata,
393
+ retry_policy: @config.rpcs.get_cluster.retry_policy
394
+
395
+ options.apply_defaults timeout: @config.timeout,
396
+ metadata: @config.metadata,
397
+ retry_policy: @config.retry_policy
398
+
399
+ @cloud_redis_cluster_stub.get_cluster request, options do |result, operation|
400
+ yield result, operation if block_given?
401
+ return result
402
+ end
403
+ rescue ::Gapic::Rest::Error => e
404
+ raise ::Google::Cloud::Error.from_error(e)
405
+ end
406
+
407
+ ##
408
+ # Updates the metadata and configuration of a specific Redis cluster.
409
+ #
410
+ # Completed longrunning.Operation will contain the new cluster object
411
+ # in the response field. The returned operation is automatically deleted
412
+ # after a few hours, so there is no need to call DeleteOperation.
413
+ #
414
+ # @overload update_cluster(request, options = nil)
415
+ # Pass arguments to `update_cluster` via a request object, either of type
416
+ # {::Google::Cloud::Redis::Cluster::V1beta1::UpdateClusterRequest} or an equivalent Hash.
417
+ #
418
+ # @param request [::Google::Cloud::Redis::Cluster::V1beta1::UpdateClusterRequest, ::Hash]
419
+ # A request object representing the call parameters. Required. To specify no
420
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
421
+ # @param options [::Gapic::CallOptions, ::Hash]
422
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
423
+ #
424
+ # @overload update_cluster(update_mask: nil, cluster: nil, request_id: nil)
425
+ # Pass arguments to `update_cluster` via keyword arguments. Note that at
426
+ # least one keyword argument is required. To specify no parameters, or to keep all
427
+ # the default parameter values, pass an empty Hash as a request object (see above).
428
+ #
429
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
430
+ # Required. Mask of fields to update. At least one path must be supplied in
431
+ # this field. The elements of the repeated paths field may only include these
432
+ # fields from {::Google::Cloud::Redis::Cluster::V1beta1::Cluster Cluster}:
433
+ #
434
+ # * `size_gb`
435
+ # * `replica_count`
436
+ # @param cluster [::Google::Cloud::Redis::Cluster::V1beta1::Cluster, ::Hash]
437
+ # Required. Update description.
438
+ # Only fields specified in update_mask are updated.
439
+ # @param request_id [::String]
440
+ # Idempotent request UUID.
441
+ # @yield [result, operation] Access the result along with the TransportOperation object
442
+ # @yieldparam result [::Gapic::Operation]
443
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
444
+ #
445
+ # @return [::Gapic::Operation]
446
+ #
447
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
448
+ #
449
+ # @example Basic example
450
+ # require "google/cloud/redis/cluster/v1beta1"
451
+ #
452
+ # # Create a client object. The client can be reused for multiple calls.
453
+ # client = Google::Cloud::Redis::Cluster::V1beta1::CloudRedisCluster::Rest::Client.new
454
+ #
455
+ # # Create a request. To set request fields, pass in keyword arguments.
456
+ # request = Google::Cloud::Redis::Cluster::V1beta1::UpdateClusterRequest.new
457
+ #
458
+ # # Call the update_cluster method.
459
+ # result = client.update_cluster request
460
+ #
461
+ # # The returned object is of type Gapic::Operation. You can use it to
462
+ # # check the status of an operation, cancel it, or wait for results.
463
+ # # Here is how to wait for a response.
464
+ # result.wait_until_done! timeout: 60
465
+ # if result.response?
466
+ # p result.response
467
+ # else
468
+ # puts "No response received."
469
+ # end
470
+ #
471
+ def update_cluster request, options = nil
472
+ raise ::ArgumentError, "request must be provided" if request.nil?
473
+
474
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1beta1::UpdateClusterRequest
475
+
476
+ # Converts hash and nil to an options object
477
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
478
+
479
+ # Customize the options with defaults
480
+ call_metadata = @config.rpcs.update_cluster.metadata.to_h
481
+
482
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
483
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
484
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
485
+ gapic_version: ::Google::Cloud::Redis::Cluster::V1beta1::VERSION,
486
+ transports_version_send: [:rest]
487
+
488
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
489
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
490
+
491
+ options.apply_defaults timeout: @config.rpcs.update_cluster.timeout,
492
+ metadata: call_metadata,
493
+ retry_policy: @config.rpcs.update_cluster.retry_policy
494
+
495
+ options.apply_defaults timeout: @config.timeout,
496
+ metadata: @config.metadata,
497
+ retry_policy: @config.retry_policy
498
+
499
+ @cloud_redis_cluster_stub.update_cluster request, options do |result, operation|
500
+ result = ::Gapic::Operation.new result, @operations_client, options: options
501
+ yield result, operation if block_given?
502
+ return result
503
+ end
504
+ rescue ::Gapic::Rest::Error => e
505
+ raise ::Google::Cloud::Error.from_error(e)
506
+ end
507
+
508
+ ##
509
+ # Deletes a specific Redis cluster. Cluster stops serving and data is
510
+ # deleted.
511
+ #
512
+ # @overload delete_cluster(request, options = nil)
513
+ # Pass arguments to `delete_cluster` via a request object, either of type
514
+ # {::Google::Cloud::Redis::Cluster::V1beta1::DeleteClusterRequest} or an equivalent Hash.
515
+ #
516
+ # @param request [::Google::Cloud::Redis::Cluster::V1beta1::DeleteClusterRequest, ::Hash]
517
+ # A request object representing the call parameters. Required. To specify no
518
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
519
+ # @param options [::Gapic::CallOptions, ::Hash]
520
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
521
+ #
522
+ # @overload delete_cluster(name: nil, request_id: nil)
523
+ # Pass arguments to `delete_cluster` via keyword arguments. Note that at
524
+ # least one keyword argument is required. To specify no parameters, or to keep all
525
+ # the default parameter values, pass an empty Hash as a request object (see above).
526
+ #
527
+ # @param name [::String]
528
+ # Required. Redis cluster resource name using the form:
529
+ # `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
530
+ # where `location_id` refers to a GCP region.
531
+ # @param request_id [::String]
532
+ # Idempotent request UUID.
533
+ # @yield [result, operation] Access the result along with the TransportOperation object
534
+ # @yieldparam result [::Gapic::Operation]
535
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
536
+ #
537
+ # @return [::Gapic::Operation]
538
+ #
539
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
540
+ #
541
+ # @example Basic example
542
+ # require "google/cloud/redis/cluster/v1beta1"
543
+ #
544
+ # # Create a client object. The client can be reused for multiple calls.
545
+ # client = Google::Cloud::Redis::Cluster::V1beta1::CloudRedisCluster::Rest::Client.new
546
+ #
547
+ # # Create a request. To set request fields, pass in keyword arguments.
548
+ # request = Google::Cloud::Redis::Cluster::V1beta1::DeleteClusterRequest.new
549
+ #
550
+ # # Call the delete_cluster method.
551
+ # result = client.delete_cluster request
552
+ #
553
+ # # The returned object is of type Gapic::Operation. You can use it to
554
+ # # check the status of an operation, cancel it, or wait for results.
555
+ # # Here is how to wait for a response.
556
+ # result.wait_until_done! timeout: 60
557
+ # if result.response?
558
+ # p result.response
559
+ # else
560
+ # puts "No response received."
561
+ # end
562
+ #
563
+ def delete_cluster request, options = nil
564
+ raise ::ArgumentError, "request must be provided" if request.nil?
565
+
566
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1beta1::DeleteClusterRequest
567
+
568
+ # Converts hash and nil to an options object
569
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
570
+
571
+ # Customize the options with defaults
572
+ call_metadata = @config.rpcs.delete_cluster.metadata.to_h
573
+
574
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
575
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
576
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
577
+ gapic_version: ::Google::Cloud::Redis::Cluster::V1beta1::VERSION,
578
+ transports_version_send: [:rest]
579
+
580
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
581
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
582
+
583
+ options.apply_defaults timeout: @config.rpcs.delete_cluster.timeout,
584
+ metadata: call_metadata,
585
+ retry_policy: @config.rpcs.delete_cluster.retry_policy
586
+
587
+ options.apply_defaults timeout: @config.timeout,
588
+ metadata: @config.metadata,
589
+ retry_policy: @config.retry_policy
590
+
591
+ @cloud_redis_cluster_stub.delete_cluster request, options do |result, operation|
592
+ result = ::Gapic::Operation.new result, @operations_client, options: options
593
+ yield result, operation if block_given?
594
+ return result
595
+ end
596
+ rescue ::Gapic::Rest::Error => e
597
+ raise ::Google::Cloud::Error.from_error(e)
598
+ end
599
+
600
+ ##
601
+ # Creates a Redis cluster based on the specified properties.
602
+ # The creation is executed asynchronously and callers may check the returned
603
+ # operation to track its progress. Once the operation is completed the Redis
604
+ # cluster will be fully functional. The completed longrunning.Operation will
605
+ # contain the new cluster object in the response field.
606
+ #
607
+ # The returned operation is automatically deleted after a few hours, so there
608
+ # is no need to call DeleteOperation.
609
+ #
610
+ # @overload create_cluster(request, options = nil)
611
+ # Pass arguments to `create_cluster` via a request object, either of type
612
+ # {::Google::Cloud::Redis::Cluster::V1beta1::CreateClusterRequest} or an equivalent Hash.
613
+ #
614
+ # @param request [::Google::Cloud::Redis::Cluster::V1beta1::CreateClusterRequest, ::Hash]
615
+ # A request object representing the call parameters. Required. To specify no
616
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
617
+ # @param options [::Gapic::CallOptions, ::Hash]
618
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
619
+ #
620
+ # @overload create_cluster(parent: nil, cluster_id: nil, cluster: nil, request_id: nil)
621
+ # Pass arguments to `create_cluster` via keyword arguments. Note that at
622
+ # least one keyword argument is required. To specify no parameters, or to keep all
623
+ # the default parameter values, pass an empty Hash as a request object (see above).
624
+ #
625
+ # @param parent [::String]
626
+ # Required. The resource name of the cluster location using the form:
627
+ # `projects/{project_id}/locations/{location_id}`
628
+ # where `location_id` refers to a GCP region.
629
+ # @param cluster_id [::String]
630
+ # Required. The logical name of the Redis cluster in the customer project
631
+ # with the following restrictions:
632
+ #
633
+ # * Must contain only lowercase letters, numbers, and hyphens.
634
+ # * Must start with a letter.
635
+ # * Must be between 1-63 characters.
636
+ # * Must end with a number or a letter.
637
+ # * Must be unique within the customer project / location
638
+ # @param cluster [::Google::Cloud::Redis::Cluster::V1beta1::Cluster, ::Hash]
639
+ # Required. The cluster that is to be created.
640
+ # @param request_id [::String]
641
+ # Idempotent request UUID.
642
+ # @yield [result, operation] Access the result along with the TransportOperation object
643
+ # @yieldparam result [::Gapic::Operation]
644
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
645
+ #
646
+ # @return [::Gapic::Operation]
647
+ #
648
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
649
+ #
650
+ # @example Basic example
651
+ # require "google/cloud/redis/cluster/v1beta1"
652
+ #
653
+ # # Create a client object. The client can be reused for multiple calls.
654
+ # client = Google::Cloud::Redis::Cluster::V1beta1::CloudRedisCluster::Rest::Client.new
655
+ #
656
+ # # Create a request. To set request fields, pass in keyword arguments.
657
+ # request = Google::Cloud::Redis::Cluster::V1beta1::CreateClusterRequest.new
658
+ #
659
+ # # Call the create_cluster method.
660
+ # result = client.create_cluster request
661
+ #
662
+ # # The returned object is of type Gapic::Operation. You can use it to
663
+ # # check the status of an operation, cancel it, or wait for results.
664
+ # # Here is how to wait for a response.
665
+ # result.wait_until_done! timeout: 60
666
+ # if result.response?
667
+ # p result.response
668
+ # else
669
+ # puts "No response received."
670
+ # end
671
+ #
672
+ def create_cluster request, options = nil
673
+ raise ::ArgumentError, "request must be provided" if request.nil?
674
+
675
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1beta1::CreateClusterRequest
676
+
677
+ # Converts hash and nil to an options object
678
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
679
+
680
+ # Customize the options with defaults
681
+ call_metadata = @config.rpcs.create_cluster.metadata.to_h
682
+
683
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
684
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
685
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
686
+ gapic_version: ::Google::Cloud::Redis::Cluster::V1beta1::VERSION,
687
+ transports_version_send: [:rest]
688
+
689
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
690
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
691
+
692
+ options.apply_defaults timeout: @config.rpcs.create_cluster.timeout,
693
+ metadata: call_metadata,
694
+ retry_policy: @config.rpcs.create_cluster.retry_policy
695
+
696
+ options.apply_defaults timeout: @config.timeout,
697
+ metadata: @config.metadata,
698
+ retry_policy: @config.retry_policy
699
+
700
+ @cloud_redis_cluster_stub.create_cluster request, options do |result, operation|
701
+ result = ::Gapic::Operation.new result, @operations_client, options: options
702
+ yield result, operation if block_given?
703
+ return result
704
+ end
705
+ rescue ::Gapic::Rest::Error => e
706
+ raise ::Google::Cloud::Error.from_error(e)
707
+ end
708
+
709
+ ##
710
+ # Gets the details of certificate authority information for Redis cluster.
711
+ #
712
+ # @overload get_cluster_certificate_authority(request, options = nil)
713
+ # Pass arguments to `get_cluster_certificate_authority` via a request object, either of type
714
+ # {::Google::Cloud::Redis::Cluster::V1beta1::GetClusterCertificateAuthorityRequest} or an equivalent Hash.
715
+ #
716
+ # @param request [::Google::Cloud::Redis::Cluster::V1beta1::GetClusterCertificateAuthorityRequest, ::Hash]
717
+ # A request object representing the call parameters. Required. To specify no
718
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
719
+ # @param options [::Gapic::CallOptions, ::Hash]
720
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
721
+ #
722
+ # @overload get_cluster_certificate_authority(name: nil)
723
+ # Pass arguments to `get_cluster_certificate_authority` via keyword arguments. Note that at
724
+ # least one keyword argument is required. To specify no parameters, or to keep all
725
+ # the default parameter values, pass an empty Hash as a request object (see above).
726
+ #
727
+ # @param name [::String]
728
+ # Required. Redis cluster certificate authority resource name using the form:
729
+ # `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority`
730
+ # where `location_id` refers to a GCP region.
731
+ # @yield [result, operation] Access the result along with the TransportOperation object
732
+ # @yieldparam result [::Google::Cloud::Redis::Cluster::V1beta1::CertificateAuthority]
733
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
734
+ #
735
+ # @return [::Google::Cloud::Redis::Cluster::V1beta1::CertificateAuthority]
736
+ #
737
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
738
+ #
739
+ # @example Basic example
740
+ # require "google/cloud/redis/cluster/v1beta1"
741
+ #
742
+ # # Create a client object. The client can be reused for multiple calls.
743
+ # client = Google::Cloud::Redis::Cluster::V1beta1::CloudRedisCluster::Rest::Client.new
744
+ #
745
+ # # Create a request. To set request fields, pass in keyword arguments.
746
+ # request = Google::Cloud::Redis::Cluster::V1beta1::GetClusterCertificateAuthorityRequest.new
747
+ #
748
+ # # Call the get_cluster_certificate_authority method.
749
+ # result = client.get_cluster_certificate_authority request
750
+ #
751
+ # # The returned object is of type Google::Cloud::Redis::Cluster::V1beta1::CertificateAuthority.
752
+ # p result
753
+ #
754
+ def get_cluster_certificate_authority request, options = nil
755
+ raise ::ArgumentError, "request must be provided" if request.nil?
756
+
757
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1beta1::GetClusterCertificateAuthorityRequest
758
+
759
+ # Converts hash and nil to an options object
760
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
761
+
762
+ # Customize the options with defaults
763
+ call_metadata = @config.rpcs.get_cluster_certificate_authority.metadata.to_h
764
+
765
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
766
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
767
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
768
+ gapic_version: ::Google::Cloud::Redis::Cluster::V1beta1::VERSION,
769
+ transports_version_send: [:rest]
770
+
771
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
772
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
773
+
774
+ options.apply_defaults timeout: @config.rpcs.get_cluster_certificate_authority.timeout,
775
+ metadata: call_metadata,
776
+ retry_policy: @config.rpcs.get_cluster_certificate_authority.retry_policy
777
+
778
+ options.apply_defaults timeout: @config.timeout,
779
+ metadata: @config.metadata,
780
+ retry_policy: @config.retry_policy
781
+
782
+ @cloud_redis_cluster_stub.get_cluster_certificate_authority request, options do |result, operation|
783
+ yield result, operation if block_given?
784
+ return result
785
+ end
786
+ rescue ::Gapic::Rest::Error => e
787
+ raise ::Google::Cloud::Error.from_error(e)
788
+ end
789
+
790
+ ##
791
+ # Configuration class for the CloudRedisCluster REST API.
792
+ #
793
+ # This class represents the configuration for CloudRedisCluster REST,
794
+ # providing control over timeouts, retry behavior, logging, transport
795
+ # parameters, and other low-level controls. Certain parameters can also be
796
+ # applied individually to specific RPCs. See
797
+ # {::Google::Cloud::Redis::Cluster::V1beta1::CloudRedisCluster::Rest::Client::Configuration::Rpcs}
798
+ # for a list of RPCs that can be configured independently.
799
+ #
800
+ # Configuration can be applied globally to all clients, or to a single client
801
+ # on construction.
802
+ #
803
+ # @example
804
+ #
805
+ # # Modify the global config, setting the timeout for
806
+ # # list_clusters to 20 seconds,
807
+ # # and all remaining timeouts to 10 seconds.
808
+ # ::Google::Cloud::Redis::Cluster::V1beta1::CloudRedisCluster::Rest::Client.configure do |config|
809
+ # config.timeout = 10.0
810
+ # config.rpcs.list_clusters.timeout = 20.0
811
+ # end
812
+ #
813
+ # # Apply the above configuration only to a new client.
814
+ # client = ::Google::Cloud::Redis::Cluster::V1beta1::CloudRedisCluster::Rest::Client.new do |config|
815
+ # config.timeout = 10.0
816
+ # config.rpcs.list_clusters.timeout = 20.0
817
+ # end
818
+ #
819
+ # @!attribute [rw] endpoint
820
+ # A custom service endpoint, as a hostname or hostname:port. The default is
821
+ # nil, indicating to use the default endpoint in the current universe domain.
822
+ # @return [::String,nil]
823
+ # @!attribute [rw] credentials
824
+ # Credentials to send with calls. You may provide any of the following types:
825
+ # * (`String`) The path to a service account key file in JSON format
826
+ # * (`Hash`) A service account key as a Hash
827
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
828
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
829
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
830
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
831
+ # * (`nil`) indicating no credentials
832
+ # @return [::Object]
833
+ # @!attribute [rw] scope
834
+ # The OAuth scopes
835
+ # @return [::Array<::String>]
836
+ # @!attribute [rw] lib_name
837
+ # The library name as recorded in instrumentation and logging
838
+ # @return [::String]
839
+ # @!attribute [rw] lib_version
840
+ # The library version as recorded in instrumentation and logging
841
+ # @return [::String]
842
+ # @!attribute [rw] timeout
843
+ # The call timeout in seconds.
844
+ # @return [::Numeric]
845
+ # @!attribute [rw] metadata
846
+ # Additional headers to be sent with the call.
847
+ # @return [::Hash{::Symbol=>::String}]
848
+ # @!attribute [rw] retry_policy
849
+ # The retry policy. The value is a hash with the following keys:
850
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
851
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
852
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
853
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
854
+ # trigger a retry.
855
+ # @return [::Hash]
856
+ # @!attribute [rw] quota_project
857
+ # A separate project against which to charge quota.
858
+ # @return [::String]
859
+ # @!attribute [rw] universe_domain
860
+ # The universe domain within which to make requests. This determines the
861
+ # default endpoint URL. The default value of nil uses the environment
862
+ # universe (usually the default "googleapis.com" universe).
863
+ # @return [::String,nil]
864
+ #
865
+ class Configuration
866
+ extend ::Gapic::Config
867
+
868
+ # @private
869
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
870
+ DEFAULT_ENDPOINT = "redis.googleapis.com"
871
+
872
+ config_attr :endpoint, nil, ::String, nil
873
+ config_attr :credentials, nil do |value|
874
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
875
+ allowed.any? { |klass| klass === value }
876
+ end
877
+ config_attr :scope, nil, ::String, ::Array, nil
878
+ config_attr :lib_name, nil, ::String, nil
879
+ config_attr :lib_version, nil, ::String, nil
880
+ config_attr :timeout, nil, ::Numeric, nil
881
+ config_attr :metadata, nil, ::Hash, nil
882
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
883
+ config_attr :quota_project, nil, ::String, nil
884
+ config_attr :universe_domain, nil, ::String, nil
885
+
886
+ # @private
887
+ # Overrides for http bindings for the RPCs of this service
888
+ # are only used when this service is used as mixin, and only
889
+ # by the host service.
890
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
891
+ config_attr :bindings_override, {}, ::Hash, nil
892
+
893
+ # @private
894
+ def initialize parent_config = nil
895
+ @parent_config = parent_config unless parent_config.nil?
896
+
897
+ yield self if block_given?
898
+ end
899
+
900
+ ##
901
+ # Configurations for individual RPCs
902
+ # @return [Rpcs]
903
+ #
904
+ def rpcs
905
+ @rpcs ||= begin
906
+ parent_rpcs = nil
907
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
908
+ Rpcs.new parent_rpcs
909
+ end
910
+ end
911
+
912
+ ##
913
+ # Configuration RPC class for the CloudRedisCluster API.
914
+ #
915
+ # Includes fields providing the configuration for each RPC in this service.
916
+ # Each configuration object is of type `Gapic::Config::Method` and includes
917
+ # the following configuration fields:
918
+ #
919
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
920
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
921
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
922
+ # include the following keys:
923
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
924
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
925
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
926
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
927
+ # trigger a retry.
928
+ #
929
+ class Rpcs
930
+ ##
931
+ # RPC-specific configuration for `list_clusters`
932
+ # @return [::Gapic::Config::Method]
933
+ #
934
+ attr_reader :list_clusters
935
+ ##
936
+ # RPC-specific configuration for `get_cluster`
937
+ # @return [::Gapic::Config::Method]
938
+ #
939
+ attr_reader :get_cluster
940
+ ##
941
+ # RPC-specific configuration for `update_cluster`
942
+ # @return [::Gapic::Config::Method]
943
+ #
944
+ attr_reader :update_cluster
945
+ ##
946
+ # RPC-specific configuration for `delete_cluster`
947
+ # @return [::Gapic::Config::Method]
948
+ #
949
+ attr_reader :delete_cluster
950
+ ##
951
+ # RPC-specific configuration for `create_cluster`
952
+ # @return [::Gapic::Config::Method]
953
+ #
954
+ attr_reader :create_cluster
955
+ ##
956
+ # RPC-specific configuration for `get_cluster_certificate_authority`
957
+ # @return [::Gapic::Config::Method]
958
+ #
959
+ attr_reader :get_cluster_certificate_authority
960
+
961
+ # @private
962
+ def initialize parent_rpcs = nil
963
+ list_clusters_config = parent_rpcs.list_clusters if parent_rpcs.respond_to? :list_clusters
964
+ @list_clusters = ::Gapic::Config::Method.new list_clusters_config
965
+ get_cluster_config = parent_rpcs.get_cluster if parent_rpcs.respond_to? :get_cluster
966
+ @get_cluster = ::Gapic::Config::Method.new get_cluster_config
967
+ update_cluster_config = parent_rpcs.update_cluster if parent_rpcs.respond_to? :update_cluster
968
+ @update_cluster = ::Gapic::Config::Method.new update_cluster_config
969
+ delete_cluster_config = parent_rpcs.delete_cluster if parent_rpcs.respond_to? :delete_cluster
970
+ @delete_cluster = ::Gapic::Config::Method.new delete_cluster_config
971
+ create_cluster_config = parent_rpcs.create_cluster if parent_rpcs.respond_to? :create_cluster
972
+ @create_cluster = ::Gapic::Config::Method.new create_cluster_config
973
+ get_cluster_certificate_authority_config = parent_rpcs.get_cluster_certificate_authority if parent_rpcs.respond_to? :get_cluster_certificate_authority
974
+ @get_cluster_certificate_authority = ::Gapic::Config::Method.new get_cluster_certificate_authority_config
975
+
976
+ yield self if block_given?
977
+ end
978
+ end
979
+ end
980
+ end
981
+ end
982
+ end
983
+ end
984
+ end
985
+ end
986
+ end
987
+ end