google-cloud-memcache-v1beta2 0.4.0 → 0.6.0

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