google-cloud-gke_hub-v1beta1 0.5.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,1056 @@
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/gkehub/v1beta1/membership_pb"
21
+ require "google/cloud/gke_hub/v1beta1/gke_hub_membership_service/rest/service_stub"
22
+ require "google/cloud/location/rest"
23
+ require "google/iam/v1/rest"
24
+
25
+ module Google
26
+ module Cloud
27
+ module GkeHub
28
+ module V1beta1
29
+ module GkeHubMembershipService
30
+ module Rest
31
+ ##
32
+ # REST client for the GkeHubMembershipService service.
33
+ #
34
+ # The GKE Hub MembershipService handles the registration of many Kubernetes
35
+ # clusters to Google Cloud, represented with the
36
+ # {::Google::Cloud::GkeHub::V1beta1::Membership Membership} resource.
37
+ #
38
+ # GKE Hub is currently available in the global region and all regions in
39
+ # https://cloud.google.com/compute/docs/regions-zones.
40
+ #
41
+ # **Membership management may be non-trivial:** it is recommended to use one
42
+ # of the Google-provided client libraries or tools where possible when working
43
+ # with Membership resources.
44
+ #
45
+ class Client
46
+ include Paths
47
+
48
+ # @private
49
+ attr_reader :gke_hub_membership_service_stub
50
+
51
+ ##
52
+ # Configure the GkeHubMembershipService Client class.
53
+ #
54
+ # See {::Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Rest::Client::Configuration}
55
+ # for a description of the configuration fields.
56
+ #
57
+ # @example
58
+ #
59
+ # # Modify the configuration for all GkeHubMembershipService clients
60
+ # ::Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Rest::Client.configure do |config|
61
+ # config.timeout = 10.0
62
+ # end
63
+ #
64
+ # @yield [config] Configure the Client client.
65
+ # @yieldparam config [Client::Configuration]
66
+ #
67
+ # @return [Client::Configuration]
68
+ #
69
+ def self.configure
70
+ @configure ||= begin
71
+ namespace = ["Google", "Cloud", "GkeHub", "V1beta1"]
72
+ parent_config = while namespace.any?
73
+ parent_name = namespace.join "::"
74
+ parent_const = const_get parent_name
75
+ break parent_const.configure if parent_const.respond_to? :configure
76
+ namespace.pop
77
+ end
78
+ default_config = Client::Configuration.new parent_config
79
+
80
+ default_config.timeout = 60.0
81
+ default_config.retry_policy = {
82
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
83
+ }
84
+
85
+ default_config
86
+ end
87
+ yield @configure if block_given?
88
+ @configure
89
+ end
90
+
91
+ ##
92
+ # Configure the GkeHubMembershipService Client instance.
93
+ #
94
+ # The configuration is set to the derived mode, meaning that values can be changed,
95
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
96
+ # should be made on {Client.configure}.
97
+ #
98
+ # See {::Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Rest::Client::Configuration}
99
+ # for a description of the configuration fields.
100
+ #
101
+ # @yield [config] Configure the Client client.
102
+ # @yieldparam config [Client::Configuration]
103
+ #
104
+ # @return [Client::Configuration]
105
+ #
106
+ def configure
107
+ yield @config if block_given?
108
+ @config
109
+ end
110
+
111
+ ##
112
+ # Create a new GkeHubMembershipService REST client object.
113
+ #
114
+ # @example
115
+ #
116
+ # # Create a client using the default configuration
117
+ # client = ::Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Rest::Client.new
118
+ #
119
+ # # Create a client using a custom configuration
120
+ # client = ::Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Rest::Client.new do |config|
121
+ # config.timeout = 10.0
122
+ # end
123
+ #
124
+ # @yield [config] Configure the GkeHubMembershipService client.
125
+ # @yieldparam config [Client::Configuration]
126
+ #
127
+ def initialize
128
+ # Create the configuration object
129
+ @config = Configuration.new Client.configure
130
+
131
+ # Yield the configuration if needed
132
+ yield @config if block_given?
133
+
134
+ # Create credentials
135
+ credentials = @config.credentials
136
+ # Use self-signed JWT if the endpoint is unchanged from default,
137
+ # but only if the default endpoint does not have a region prefix.
138
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
139
+ !@config.endpoint.split(".").first.include?("-")
140
+ credentials ||= Credentials.default scope: @config.scope,
141
+ enable_self_signed_jwt: enable_self_signed_jwt
142
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
143
+ credentials = Credentials.new credentials, scope: @config.scope
144
+ end
145
+
146
+ @quota_project_id = @config.quota_project
147
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
148
+
149
+ @operations_client = ::Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Rest::Operations.new do |config|
150
+ config.credentials = credentials
151
+ config.quota_project = @quota_project_id
152
+ config.endpoint = @config.endpoint
153
+ end
154
+
155
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
156
+ config.credentials = credentials
157
+ config.quota_project = @quota_project_id
158
+ config.endpoint = @config.endpoint
159
+ config.bindings_override = @config.bindings_override
160
+ end
161
+
162
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
163
+ config.credentials = credentials
164
+ config.quota_project = @quota_project_id
165
+ config.endpoint = @config.endpoint
166
+ config.bindings_override = @config.bindings_override
167
+ end
168
+
169
+ @gke_hub_membership_service_stub = ::Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
170
+ end
171
+
172
+ ##
173
+ # Get the associated client for long-running operations.
174
+ #
175
+ # @return [::Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Rest::Operations]
176
+ #
177
+ attr_reader :operations_client
178
+
179
+ ##
180
+ # Get the associated client for mix-in of the Locations.
181
+ #
182
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
183
+ #
184
+ attr_reader :location_client
185
+
186
+ ##
187
+ # Get the associated client for mix-in of the IAMPolicy.
188
+ #
189
+ # @return [Google::Iam::V1::IAMPolicy::Rest::Client]
190
+ #
191
+ attr_reader :iam_policy_client
192
+
193
+ # Service calls
194
+
195
+ ##
196
+ # Lists Memberships in a given project and location.
197
+ #
198
+ # @overload list_memberships(request, options = nil)
199
+ # Pass arguments to `list_memberships` via a request object, either of type
200
+ # {::Google::Cloud::GkeHub::V1beta1::ListMembershipsRequest} or an equivalent Hash.
201
+ #
202
+ # @param request [::Google::Cloud::GkeHub::V1beta1::ListMembershipsRequest, ::Hash]
203
+ # A request object representing the call parameters. Required. To specify no
204
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
205
+ # @param options [::Gapic::CallOptions, ::Hash]
206
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
207
+ #
208
+ # @overload list_memberships(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
209
+ # Pass arguments to `list_memberships` via keyword arguments. Note that at
210
+ # least one keyword argument is required. To specify no parameters, or to keep all
211
+ # the default parameter values, pass an empty Hash as a request object (see above).
212
+ #
213
+ # @param parent [::String]
214
+ # Required. The parent (project and location) where the Memberships will be
215
+ # listed. Specified in the format `projects/*/locations/*`.
216
+ # `projects/*/locations/-` list memberships in all the regions.
217
+ # @param page_size [::Integer]
218
+ # Optional. When requesting a 'page' of resources, `page_size` specifies
219
+ # number of resources to return. If unspecified or set to 0, all resources
220
+ # will be returned.
221
+ # @param page_token [::String]
222
+ # Optional. Token returned by previous call to `ListMemberships` which
223
+ # specifies the position in the list from where to continue listing the
224
+ # resources.
225
+ # @param filter [::String]
226
+ # Optional. Lists Memberships that match the filter expression, following the
227
+ # syntax outlined in https://google.aip.dev/160.
228
+ #
229
+ # Examples:
230
+ #
231
+ # - Name is `bar` in project `foo-proj` and location `global`:
232
+ #
233
+ # name = "projects/foo-proj/locations/global/membership/bar"
234
+ #
235
+ # - Memberships that have a label called `foo`:
236
+ #
237
+ # labels.foo:*
238
+ #
239
+ # - Memberships that have a label called `foo` whose value is `bar`:
240
+ #
241
+ # labels.foo = bar
242
+ #
243
+ # - Memberships in the CREATING state:
244
+ #
245
+ # state = CREATING
246
+ # @param order_by [::String]
247
+ # Optional. One or more fields to compare and use to sort the output.
248
+ # See https://google.aip.dev/132#ordering.
249
+ # @yield [result, operation] Access the result along with the TransportOperation object
250
+ # @yieldparam result [::Google::Cloud::GkeHub::V1beta1::ListMembershipsResponse]
251
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
252
+ #
253
+ # @return [::Google::Cloud::GkeHub::V1beta1::ListMembershipsResponse]
254
+ #
255
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
256
+ def list_memberships request, options = nil
257
+ raise ::ArgumentError, "request must be provided" if request.nil?
258
+
259
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1beta1::ListMembershipsRequest
260
+
261
+ # Converts hash and nil to an options object
262
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
263
+
264
+ # Customize the options with defaults
265
+ call_metadata = @config.rpcs.list_memberships.metadata.to_h
266
+
267
+ # Set x-goog-api-client and x-goog-user-project headers
268
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
269
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
270
+ gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION,
271
+ transports_version_send: [:rest]
272
+
273
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
274
+
275
+ options.apply_defaults timeout: @config.rpcs.list_memberships.timeout,
276
+ metadata: call_metadata,
277
+ retry_policy: @config.rpcs.list_memberships.retry_policy
278
+
279
+ options.apply_defaults timeout: @config.timeout,
280
+ metadata: @config.metadata,
281
+ retry_policy: @config.retry_policy
282
+
283
+ @gke_hub_membership_service_stub.list_memberships request, options do |result, operation|
284
+ yield result, operation if block_given?
285
+ return result
286
+ end
287
+ rescue ::Gapic::Rest::Error => e
288
+ raise ::Google::Cloud::Error.from_error(e)
289
+ end
290
+
291
+ ##
292
+ # Gets the details of a Membership.
293
+ #
294
+ # @overload get_membership(request, options = nil)
295
+ # Pass arguments to `get_membership` via a request object, either of type
296
+ # {::Google::Cloud::GkeHub::V1beta1::GetMembershipRequest} or an equivalent Hash.
297
+ #
298
+ # @param request [::Google::Cloud::GkeHub::V1beta1::GetMembershipRequest, ::Hash]
299
+ # A request object representing the call parameters. Required. To specify no
300
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
301
+ # @param options [::Gapic::CallOptions, ::Hash]
302
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
303
+ #
304
+ # @overload get_membership(name: nil)
305
+ # Pass arguments to `get_membership` via keyword arguments. Note that at
306
+ # least one keyword argument is required. To specify no parameters, or to keep all
307
+ # the default parameter values, pass an empty Hash as a request object (see above).
308
+ #
309
+ # @param name [::String]
310
+ # Required. The Membership resource name in the format
311
+ # `projects/*/locations/*/memberships/*`.
312
+ # @yield [result, operation] Access the result along with the TransportOperation object
313
+ # @yieldparam result [::Google::Cloud::GkeHub::V1beta1::Membership]
314
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
315
+ #
316
+ # @return [::Google::Cloud::GkeHub::V1beta1::Membership]
317
+ #
318
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
319
+ def get_membership request, options = nil
320
+ raise ::ArgumentError, "request must be provided" if request.nil?
321
+
322
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1beta1::GetMembershipRequest
323
+
324
+ # Converts hash and nil to an options object
325
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
326
+
327
+ # Customize the options with defaults
328
+ call_metadata = @config.rpcs.get_membership.metadata.to_h
329
+
330
+ # Set x-goog-api-client and x-goog-user-project headers
331
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
332
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
333
+ gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION,
334
+ transports_version_send: [:rest]
335
+
336
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
337
+
338
+ options.apply_defaults timeout: @config.rpcs.get_membership.timeout,
339
+ metadata: call_metadata,
340
+ retry_policy: @config.rpcs.get_membership.retry_policy
341
+
342
+ options.apply_defaults timeout: @config.timeout,
343
+ metadata: @config.metadata,
344
+ retry_policy: @config.retry_policy
345
+
346
+ @gke_hub_membership_service_stub.get_membership request, options do |result, operation|
347
+ yield result, operation if block_given?
348
+ return result
349
+ end
350
+ rescue ::Gapic::Rest::Error => e
351
+ raise ::Google::Cloud::Error.from_error(e)
352
+ end
353
+
354
+ ##
355
+ # Creates a new Membership.
356
+ #
357
+ # **This is currently only supported for GKE clusters on Google Cloud**.
358
+ # To register other clusters, follow the instructions at
359
+ # https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.
360
+ #
361
+ # @overload create_membership(request, options = nil)
362
+ # Pass arguments to `create_membership` via a request object, either of type
363
+ # {::Google::Cloud::GkeHub::V1beta1::CreateMembershipRequest} or an equivalent Hash.
364
+ #
365
+ # @param request [::Google::Cloud::GkeHub::V1beta1::CreateMembershipRequest, ::Hash]
366
+ # A request object representing the call parameters. Required. To specify no
367
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
368
+ # @param options [::Gapic::CallOptions, ::Hash]
369
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
370
+ #
371
+ # @overload create_membership(parent: nil, membership_id: nil, resource: nil, request_id: nil)
372
+ # Pass arguments to `create_membership` via keyword arguments. Note that at
373
+ # least one keyword argument is required. To specify no parameters, or to keep all
374
+ # the default parameter values, pass an empty Hash as a request object (see above).
375
+ #
376
+ # @param parent [::String]
377
+ # Required. The parent (project and location) where the Memberships will be
378
+ # created. Specified in the format `projects/*/locations/*`.
379
+ # @param membership_id [::String]
380
+ # Required. Client chosen ID for the membership. `membership_id` must be a
381
+ # valid RFC 1123 compliant DNS label:
382
+ #
383
+ # 1. At most 63 characters in length
384
+ # 2. It must consist of lower case alphanumeric characters or `-`
385
+ # 3. It must start and end with an alphanumeric character
386
+ #
387
+ # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`,
388
+ # with a maximum length of 63 characters.
389
+ # @param resource [::Google::Cloud::GkeHub::V1beta1::Membership, ::Hash]
390
+ # Required. The membership to create.
391
+ # @param request_id [::String]
392
+ # Optional. A request ID to identify requests. Specify a unique request ID
393
+ # so that if you must retry your request, the server will know to ignore
394
+ # the request if it has already been completed. The server will guarantee
395
+ # that for at least 60 minutes after the first request.
396
+ #
397
+ # For example, consider a situation where you make an initial request and
398
+ # the request times out. If you make the request again with the same request
399
+ # ID, the server can check if original operation with the same request ID
400
+ # was received, and if so, will ignore the second request. This prevents
401
+ # clients from accidentally creating duplicate commitments.
402
+ #
403
+ # The request ID must be a valid UUID with the exception that zero UUID is
404
+ # not supported (00000000-0000-0000-0000-000000000000).
405
+ # @yield [result, operation] Access the result along with the TransportOperation object
406
+ # @yieldparam result [::Gapic::Operation]
407
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
408
+ #
409
+ # @return [::Gapic::Operation]
410
+ #
411
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
412
+ def create_membership request, options = nil
413
+ raise ::ArgumentError, "request must be provided" if request.nil?
414
+
415
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1beta1::CreateMembershipRequest
416
+
417
+ # Converts hash and nil to an options object
418
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
419
+
420
+ # Customize the options with defaults
421
+ call_metadata = @config.rpcs.create_membership.metadata.to_h
422
+
423
+ # Set x-goog-api-client and x-goog-user-project headers
424
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
425
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
426
+ gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION,
427
+ transports_version_send: [:rest]
428
+
429
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
430
+
431
+ options.apply_defaults timeout: @config.rpcs.create_membership.timeout,
432
+ metadata: call_metadata,
433
+ retry_policy: @config.rpcs.create_membership.retry_policy
434
+
435
+ options.apply_defaults timeout: @config.timeout,
436
+ metadata: @config.metadata,
437
+ retry_policy: @config.retry_policy
438
+
439
+ @gke_hub_membership_service_stub.create_membership request, options do |result, operation|
440
+ result = ::Gapic::Operation.new result, @operations_client, options: options
441
+ yield result, operation if block_given?
442
+ return result
443
+ end
444
+ rescue ::Gapic::Rest::Error => e
445
+ raise ::Google::Cloud::Error.from_error(e)
446
+ end
447
+
448
+ ##
449
+ # Removes a Membership.
450
+ #
451
+ # **This is currently only supported for GKE clusters on Google Cloud**.
452
+ # To unregister other clusters, follow the instructions at
453
+ # https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.
454
+ #
455
+ # @overload delete_membership(request, options = nil)
456
+ # Pass arguments to `delete_membership` via a request object, either of type
457
+ # {::Google::Cloud::GkeHub::V1beta1::DeleteMembershipRequest} or an equivalent Hash.
458
+ #
459
+ # @param request [::Google::Cloud::GkeHub::V1beta1::DeleteMembershipRequest, ::Hash]
460
+ # A request object representing the call parameters. Required. To specify no
461
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
462
+ # @param options [::Gapic::CallOptions, ::Hash]
463
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
464
+ #
465
+ # @overload delete_membership(name: nil, request_id: nil, force: nil)
466
+ # Pass arguments to `delete_membership` via keyword arguments. Note that at
467
+ # least one keyword argument is required. To specify no parameters, or to keep all
468
+ # the default parameter values, pass an empty Hash as a request object (see above).
469
+ #
470
+ # @param name [::String]
471
+ # Required. The Membership resource name in the format
472
+ # `projects/*/locations/*/memberships/*`.
473
+ # @param request_id [::String]
474
+ # Optional. A request ID to identify requests. Specify a unique request ID
475
+ # so that if you must retry your request, the server will know to ignore
476
+ # the request if it has already been completed. The server will guarantee
477
+ # that for at least 60 minutes after the first request.
478
+ #
479
+ # For example, consider a situation where you make an initial request and
480
+ # the request times out. If you make the request again with the same request
481
+ # ID, the server can check if original operation with the same request ID
482
+ # was received, and if so, will ignore the second request. This prevents
483
+ # clients from accidentally creating duplicate commitments.
484
+ #
485
+ # The request ID must be a valid UUID with the exception that zero UUID is
486
+ # not supported (00000000-0000-0000-0000-000000000000).
487
+ # @param force [::Boolean]
488
+ # Optional. If set to true, any subresource from this Membership will also be
489
+ # deleted. Otherwise, the request will only work if the Membership has no
490
+ # subresource.
491
+ # @yield [result, operation] Access the result along with the TransportOperation object
492
+ # @yieldparam result [::Gapic::Operation]
493
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
494
+ #
495
+ # @return [::Gapic::Operation]
496
+ #
497
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
498
+ def delete_membership request, options = nil
499
+ raise ::ArgumentError, "request must be provided" if request.nil?
500
+
501
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1beta1::DeleteMembershipRequest
502
+
503
+ # Converts hash and nil to an options object
504
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
505
+
506
+ # Customize the options with defaults
507
+ call_metadata = @config.rpcs.delete_membership.metadata.to_h
508
+
509
+ # Set x-goog-api-client and x-goog-user-project headers
510
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
511
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
512
+ gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION,
513
+ transports_version_send: [:rest]
514
+
515
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
516
+
517
+ options.apply_defaults timeout: @config.rpcs.delete_membership.timeout,
518
+ metadata: call_metadata,
519
+ retry_policy: @config.rpcs.delete_membership.retry_policy
520
+
521
+ options.apply_defaults timeout: @config.timeout,
522
+ metadata: @config.metadata,
523
+ retry_policy: @config.retry_policy
524
+
525
+ @gke_hub_membership_service_stub.delete_membership request, options do |result, operation|
526
+ result = ::Gapic::Operation.new result, @operations_client, options: options
527
+ yield result, operation if block_given?
528
+ return result
529
+ end
530
+ rescue ::Gapic::Rest::Error => e
531
+ raise ::Google::Cloud::Error.from_error(e)
532
+ end
533
+
534
+ ##
535
+ # Updates an existing Membership.
536
+ #
537
+ # @overload update_membership(request, options = nil)
538
+ # Pass arguments to `update_membership` via a request object, either of type
539
+ # {::Google::Cloud::GkeHub::V1beta1::UpdateMembershipRequest} or an equivalent Hash.
540
+ #
541
+ # @param request [::Google::Cloud::GkeHub::V1beta1::UpdateMembershipRequest, ::Hash]
542
+ # A request object representing the call parameters. Required. To specify no
543
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
544
+ # @param options [::Gapic::CallOptions, ::Hash]
545
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
546
+ #
547
+ # @overload update_membership(name: nil, update_mask: nil, resource: nil, request_id: nil)
548
+ # Pass arguments to `update_membership` via keyword arguments. Note that at
549
+ # least one keyword argument is required. To specify no parameters, or to keep all
550
+ # the default parameter values, pass an empty Hash as a request object (see above).
551
+ #
552
+ # @param name [::String]
553
+ # Required. The membership resource name in the format:
554
+ # `projects/[project_id]/locations/global/memberships/[membership_id]`
555
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
556
+ # Required. Mask of fields to update. At least one field path must be
557
+ # specified in this mask.
558
+ # @param resource [::Google::Cloud::GkeHub::V1beta1::Membership, ::Hash]
559
+ # Required. Only fields specified in update_mask are updated.
560
+ # If you specify a field in the update_mask but don't specify its value here
561
+ # that field will be deleted.
562
+ # If you are updating a map field, set the value of a key to null or empty
563
+ # string to delete the key from the map. It's not possible to update a key's
564
+ # value to the empty string.
565
+ # If you specify the update_mask to be a special path "*", fully replaces all
566
+ # user-modifiable fields to match `resource`.
567
+ # @param request_id [::String]
568
+ # Optional. A request ID to identify requests. Specify a unique request ID
569
+ # so that if you must retry your request, the server will know to ignore
570
+ # the request if it has already been completed. The server will guarantee
571
+ # that for at least 60 minutes after the first request.
572
+ #
573
+ # For example, consider a situation where you make an initial request and
574
+ # the request times out. If you make the request again with the same request
575
+ # ID, the server can check if original operation with the same request ID
576
+ # was received, and if so, will ignore the second request. This prevents
577
+ # clients from accidentally creating duplicate commitments.
578
+ #
579
+ # The request ID must be a valid UUID with the exception that zero UUID is
580
+ # not supported (00000000-0000-0000-0000-000000000000).
581
+ # @yield [result, operation] Access the result along with the TransportOperation object
582
+ # @yieldparam result [::Gapic::Operation]
583
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
584
+ #
585
+ # @return [::Gapic::Operation]
586
+ #
587
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
588
+ def update_membership request, options = nil
589
+ raise ::ArgumentError, "request must be provided" if request.nil?
590
+
591
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1beta1::UpdateMembershipRequest
592
+
593
+ # Converts hash and nil to an options object
594
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
595
+
596
+ # Customize the options with defaults
597
+ call_metadata = @config.rpcs.update_membership.metadata.to_h
598
+
599
+ # Set x-goog-api-client and x-goog-user-project headers
600
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
601
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
602
+ gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION,
603
+ transports_version_send: [:rest]
604
+
605
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
606
+
607
+ options.apply_defaults timeout: @config.rpcs.update_membership.timeout,
608
+ metadata: call_metadata,
609
+ retry_policy: @config.rpcs.update_membership.retry_policy
610
+
611
+ options.apply_defaults timeout: @config.timeout,
612
+ metadata: @config.metadata,
613
+ retry_policy: @config.retry_policy
614
+
615
+ @gke_hub_membership_service_stub.update_membership request, options do |result, operation|
616
+ result = ::Gapic::Operation.new result, @operations_client, options: options
617
+ yield result, operation if block_given?
618
+ return result
619
+ end
620
+ rescue ::Gapic::Rest::Error => e
621
+ raise ::Google::Cloud::Error.from_error(e)
622
+ end
623
+
624
+ ##
625
+ # Generates the manifest for deployment of the GKE connect agent.
626
+ #
627
+ # **This method is used internally by Google-provided libraries.**
628
+ # Most clients should not need to call this method directly.
629
+ #
630
+ # @overload generate_connect_manifest(request, options = nil)
631
+ # Pass arguments to `generate_connect_manifest` via a request object, either of type
632
+ # {::Google::Cloud::GkeHub::V1beta1::GenerateConnectManifestRequest} or an equivalent Hash.
633
+ #
634
+ # @param request [::Google::Cloud::GkeHub::V1beta1::GenerateConnectManifestRequest, ::Hash]
635
+ # A request object representing the call parameters. Required. To specify no
636
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
637
+ # @param options [::Gapic::CallOptions, ::Hash]
638
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
639
+ #
640
+ # @overload generate_connect_manifest(name: nil, connect_agent: nil, version: nil, is_upgrade: nil, registry: nil, image_pull_secret_content: nil)
641
+ # Pass arguments to `generate_connect_manifest` via keyword arguments. Note that at
642
+ # least one keyword argument is required. To specify no parameters, or to keep all
643
+ # the default parameter values, pass an empty Hash as a request object (see above).
644
+ #
645
+ # @param name [::String]
646
+ # Required. The Membership resource name the Agent will associate with, in
647
+ # the format `projects/*/locations/*/memberships/*`.
648
+ # @param connect_agent [::Google::Cloud::GkeHub::V1beta1::ConnectAgent, ::Hash]
649
+ # Optional. The connect agent to generate manifest for.
650
+ # @param version [::String]
651
+ # Optional. The Connect agent version to use. Defaults to the most current
652
+ # version.
653
+ # @param is_upgrade [::Boolean]
654
+ # Optional. If true, generate the resources for upgrade only. Some resources
655
+ # generated only for installation (e.g. secrets) will be excluded.
656
+ # @param registry [::String]
657
+ # Optional. The registry to fetch the connect agent image from. Defaults to
658
+ # gcr.io/gkeconnect.
659
+ # @param image_pull_secret_content [::String]
660
+ # Optional. The image pull secret content for the registry, if not public.
661
+ # @yield [result, operation] Access the result along with the TransportOperation object
662
+ # @yieldparam result [::Google::Cloud::GkeHub::V1beta1::GenerateConnectManifestResponse]
663
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
664
+ #
665
+ # @return [::Google::Cloud::GkeHub::V1beta1::GenerateConnectManifestResponse]
666
+ #
667
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
668
+ def generate_connect_manifest request, options = nil
669
+ raise ::ArgumentError, "request must be provided" if request.nil?
670
+
671
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1beta1::GenerateConnectManifestRequest
672
+
673
+ # Converts hash and nil to an options object
674
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
675
+
676
+ # Customize the options with defaults
677
+ call_metadata = @config.rpcs.generate_connect_manifest.metadata.to_h
678
+
679
+ # Set x-goog-api-client and x-goog-user-project headers
680
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
681
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
682
+ gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION,
683
+ transports_version_send: [:rest]
684
+
685
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
686
+
687
+ options.apply_defaults timeout: @config.rpcs.generate_connect_manifest.timeout,
688
+ metadata: call_metadata,
689
+ retry_policy: @config.rpcs.generate_connect_manifest.retry_policy
690
+
691
+ options.apply_defaults timeout: @config.timeout,
692
+ metadata: @config.metadata,
693
+ retry_policy: @config.retry_policy
694
+
695
+ @gke_hub_membership_service_stub.generate_connect_manifest request, options do |result, operation|
696
+ yield result, operation if block_given?
697
+ return result
698
+ end
699
+ rescue ::Gapic::Rest::Error => e
700
+ raise ::Google::Cloud::Error.from_error(e)
701
+ end
702
+
703
+ ##
704
+ # ValidateExclusivity validates the state of exclusivity in the cluster.
705
+ # The validation does not depend on an existing Hub membership resource.
706
+ #
707
+ # @overload validate_exclusivity(request, options = nil)
708
+ # Pass arguments to `validate_exclusivity` via a request object, either of type
709
+ # {::Google::Cloud::GkeHub::V1beta1::ValidateExclusivityRequest} or an equivalent Hash.
710
+ #
711
+ # @param request [::Google::Cloud::GkeHub::V1beta1::ValidateExclusivityRequest, ::Hash]
712
+ # A request object representing the call parameters. Required. To specify no
713
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
714
+ # @param options [::Gapic::CallOptions, ::Hash]
715
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
716
+ #
717
+ # @overload validate_exclusivity(parent: nil, cr_manifest: nil, intended_membership: nil)
718
+ # Pass arguments to `validate_exclusivity` via keyword arguments. Note that at
719
+ # least one keyword argument is required. To specify no parameters, or to keep all
720
+ # the default parameter values, pass an empty Hash as a request object (see above).
721
+ #
722
+ # @param parent [::String]
723
+ # Required. The parent (project and location) where the Memberships will be
724
+ # created. Specified in the format `projects/*/locations/*`.
725
+ # @param cr_manifest [::String]
726
+ # Optional. The YAML of the membership CR in the cluster. Empty if the
727
+ # membership CR does not exist.
728
+ # @param intended_membership [::String]
729
+ # Required. The intended membership name under the `parent`. This method only
730
+ # does validation in anticipation of a CreateMembership call with the same
731
+ # name.
732
+ # @yield [result, operation] Access the result along with the TransportOperation object
733
+ # @yieldparam result [::Google::Cloud::GkeHub::V1beta1::ValidateExclusivityResponse]
734
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
735
+ #
736
+ # @return [::Google::Cloud::GkeHub::V1beta1::ValidateExclusivityResponse]
737
+ #
738
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
739
+ def validate_exclusivity request, options = nil
740
+ raise ::ArgumentError, "request must be provided" if request.nil?
741
+
742
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1beta1::ValidateExclusivityRequest
743
+
744
+ # Converts hash and nil to an options object
745
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
746
+
747
+ # Customize the options with defaults
748
+ call_metadata = @config.rpcs.validate_exclusivity.metadata.to_h
749
+
750
+ # Set x-goog-api-client and x-goog-user-project headers
751
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
752
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
753
+ gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION,
754
+ transports_version_send: [:rest]
755
+
756
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
757
+
758
+ options.apply_defaults timeout: @config.rpcs.validate_exclusivity.timeout,
759
+ metadata: call_metadata,
760
+ retry_policy: @config.rpcs.validate_exclusivity.retry_policy
761
+
762
+ options.apply_defaults timeout: @config.timeout,
763
+ metadata: @config.metadata,
764
+ retry_policy: @config.retry_policy
765
+
766
+ @gke_hub_membership_service_stub.validate_exclusivity request, options do |result, operation|
767
+ yield result, operation if block_given?
768
+ return result
769
+ end
770
+ rescue ::Gapic::Rest::Error => e
771
+ raise ::Google::Cloud::Error.from_error(e)
772
+ end
773
+
774
+ ##
775
+ # GenerateExclusivityManifest generates the manifests to update the
776
+ # exclusivity artifacts in the cluster if needed.
777
+ #
778
+ # Exclusivity artifacts include the Membership custom resource definition
779
+ # (CRD) and the singleton Membership custom resource (CR). Combined with
780
+ # ValidateExclusivity, exclusivity artifacts guarantee that a Kubernetes
781
+ # cluster is only registered to a single GKE Hub.
782
+ #
783
+ # The Membership CRD is versioned, and may require conversion when the GKE
784
+ # Hub API server begins serving a newer version of the CRD and
785
+ # corresponding CR. The response will be the converted CRD and CR if there
786
+ # are any differences between the versions.
787
+ #
788
+ # @overload generate_exclusivity_manifest(request, options = nil)
789
+ # Pass arguments to `generate_exclusivity_manifest` via a request object, either of type
790
+ # {::Google::Cloud::GkeHub::V1beta1::GenerateExclusivityManifestRequest} or an equivalent Hash.
791
+ #
792
+ # @param request [::Google::Cloud::GkeHub::V1beta1::GenerateExclusivityManifestRequest, ::Hash]
793
+ # A request object representing the call parameters. Required. To specify no
794
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
795
+ # @param options [::Gapic::CallOptions, ::Hash]
796
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
797
+ #
798
+ # @overload generate_exclusivity_manifest(name: nil, crd_manifest: nil, cr_manifest: nil)
799
+ # Pass arguments to `generate_exclusivity_manifest` via keyword arguments. Note that at
800
+ # least one keyword argument is required. To specify no parameters, or to keep all
801
+ # the default parameter values, pass an empty Hash as a request object (see above).
802
+ #
803
+ # @param name [::String]
804
+ # Required. The Membership resource name in the format
805
+ # `projects/*/locations/*/memberships/*`.
806
+ # @param crd_manifest [::String]
807
+ # Optional. The YAML manifest of the membership CRD retrieved by
808
+ # `kubectl get customresourcedefinitions membership`.
809
+ # Leave empty if the resource does not exist.
810
+ # @param cr_manifest [::String]
811
+ # Optional. The YAML manifest of the membership CR retrieved by
812
+ # `kubectl get memberships membership`.
813
+ # Leave empty if the resource does not exist.
814
+ # @yield [result, operation] Access the result along with the TransportOperation object
815
+ # @yieldparam result [::Google::Cloud::GkeHub::V1beta1::GenerateExclusivityManifestResponse]
816
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
817
+ #
818
+ # @return [::Google::Cloud::GkeHub::V1beta1::GenerateExclusivityManifestResponse]
819
+ #
820
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
821
+ def generate_exclusivity_manifest request, options = nil
822
+ raise ::ArgumentError, "request must be provided" if request.nil?
823
+
824
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1beta1::GenerateExclusivityManifestRequest
825
+
826
+ # Converts hash and nil to an options object
827
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
828
+
829
+ # Customize the options with defaults
830
+ call_metadata = @config.rpcs.generate_exclusivity_manifest.metadata.to_h
831
+
832
+ # Set x-goog-api-client and x-goog-user-project headers
833
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
834
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
835
+ gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION,
836
+ transports_version_send: [:rest]
837
+
838
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
839
+
840
+ options.apply_defaults timeout: @config.rpcs.generate_exclusivity_manifest.timeout,
841
+ metadata: call_metadata,
842
+ retry_policy: @config.rpcs.generate_exclusivity_manifest.retry_policy
843
+
844
+ options.apply_defaults timeout: @config.timeout,
845
+ metadata: @config.metadata,
846
+ retry_policy: @config.retry_policy
847
+
848
+ @gke_hub_membership_service_stub.generate_exclusivity_manifest request, options do |result, operation|
849
+ yield result, operation if block_given?
850
+ return result
851
+ end
852
+ rescue ::Gapic::Rest::Error => e
853
+ raise ::Google::Cloud::Error.from_error(e)
854
+ end
855
+
856
+ ##
857
+ # Configuration class for the GkeHubMembershipService REST API.
858
+ #
859
+ # This class represents the configuration for GkeHubMembershipService REST,
860
+ # providing control over timeouts, retry behavior, logging, transport
861
+ # parameters, and other low-level controls. Certain parameters can also be
862
+ # applied individually to specific RPCs. See
863
+ # {::Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Rest::Client::Configuration::Rpcs}
864
+ # for a list of RPCs that can be configured independently.
865
+ #
866
+ # Configuration can be applied globally to all clients, or to a single client
867
+ # on construction.
868
+ #
869
+ # @example
870
+ #
871
+ # # Modify the global config, setting the timeout for
872
+ # # list_memberships to 20 seconds,
873
+ # # and all remaining timeouts to 10 seconds.
874
+ # ::Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Rest::Client.configure do |config|
875
+ # config.timeout = 10.0
876
+ # config.rpcs.list_memberships.timeout = 20.0
877
+ # end
878
+ #
879
+ # # Apply the above configuration only to a new client.
880
+ # client = ::Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Rest::Client.new do |config|
881
+ # config.timeout = 10.0
882
+ # config.rpcs.list_memberships.timeout = 20.0
883
+ # end
884
+ #
885
+ # @!attribute [rw] endpoint
886
+ # The hostname or hostname:port of the service endpoint.
887
+ # Defaults to `"gkehub.googleapis.com"`.
888
+ # @return [::String]
889
+ # @!attribute [rw] credentials
890
+ # Credentials to send with calls. You may provide any of the following types:
891
+ # * (`String`) The path to a service account key file in JSON format
892
+ # * (`Hash`) A service account key as a Hash
893
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
894
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
895
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
896
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
897
+ # * (`nil`) indicating no credentials
898
+ # @return [::Object]
899
+ # @!attribute [rw] scope
900
+ # The OAuth scopes
901
+ # @return [::Array<::String>]
902
+ # @!attribute [rw] lib_name
903
+ # The library name as recorded in instrumentation and logging
904
+ # @return [::String]
905
+ # @!attribute [rw] lib_version
906
+ # The library version as recorded in instrumentation and logging
907
+ # @return [::String]
908
+ # @!attribute [rw] timeout
909
+ # The call timeout in seconds.
910
+ # @return [::Numeric]
911
+ # @!attribute [rw] metadata
912
+ # Additional headers to be sent with the call.
913
+ # @return [::Hash{::Symbol=>::String}]
914
+ # @!attribute [rw] retry_policy
915
+ # The retry policy. The value is a hash with the following keys:
916
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
917
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
918
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
919
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
920
+ # trigger a retry.
921
+ # @return [::Hash]
922
+ # @!attribute [rw] quota_project
923
+ # A separate project against which to charge quota.
924
+ # @return [::String]
925
+ #
926
+ class Configuration
927
+ extend ::Gapic::Config
928
+
929
+ config_attr :endpoint, "gkehub.googleapis.com", ::String
930
+ config_attr :credentials, nil do |value|
931
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
932
+ allowed.any? { |klass| klass === value }
933
+ end
934
+ config_attr :scope, nil, ::String, ::Array, nil
935
+ config_attr :lib_name, nil, ::String, nil
936
+ config_attr :lib_version, nil, ::String, nil
937
+ config_attr :timeout, nil, ::Numeric, nil
938
+ config_attr :metadata, nil, ::Hash, nil
939
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
940
+ config_attr :quota_project, nil, ::String, nil
941
+
942
+ # @private
943
+ # Overrides for http bindings for the RPCs of this service
944
+ # are only used when this service is used as mixin, and only
945
+ # by the host service.
946
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
947
+ config_attr :bindings_override, {}, ::Hash, nil
948
+
949
+ # @private
950
+ def initialize parent_config = nil
951
+ @parent_config = parent_config unless parent_config.nil?
952
+
953
+ yield self if block_given?
954
+ end
955
+
956
+ ##
957
+ # Configurations for individual RPCs
958
+ # @return [Rpcs]
959
+ #
960
+ def rpcs
961
+ @rpcs ||= begin
962
+ parent_rpcs = nil
963
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
964
+ Rpcs.new parent_rpcs
965
+ end
966
+ end
967
+
968
+ ##
969
+ # Configuration RPC class for the GkeHubMembershipService API.
970
+ #
971
+ # Includes fields providing the configuration for each RPC in this service.
972
+ # Each configuration object is of type `Gapic::Config::Method` and includes
973
+ # the following configuration fields:
974
+ #
975
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
976
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
977
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
978
+ # include the following keys:
979
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
980
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
981
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
982
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
983
+ # trigger a retry.
984
+ #
985
+ class Rpcs
986
+ ##
987
+ # RPC-specific configuration for `list_memberships`
988
+ # @return [::Gapic::Config::Method]
989
+ #
990
+ attr_reader :list_memberships
991
+ ##
992
+ # RPC-specific configuration for `get_membership`
993
+ # @return [::Gapic::Config::Method]
994
+ #
995
+ attr_reader :get_membership
996
+ ##
997
+ # RPC-specific configuration for `create_membership`
998
+ # @return [::Gapic::Config::Method]
999
+ #
1000
+ attr_reader :create_membership
1001
+ ##
1002
+ # RPC-specific configuration for `delete_membership`
1003
+ # @return [::Gapic::Config::Method]
1004
+ #
1005
+ attr_reader :delete_membership
1006
+ ##
1007
+ # RPC-specific configuration for `update_membership`
1008
+ # @return [::Gapic::Config::Method]
1009
+ #
1010
+ attr_reader :update_membership
1011
+ ##
1012
+ # RPC-specific configuration for `generate_connect_manifest`
1013
+ # @return [::Gapic::Config::Method]
1014
+ #
1015
+ attr_reader :generate_connect_manifest
1016
+ ##
1017
+ # RPC-specific configuration for `validate_exclusivity`
1018
+ # @return [::Gapic::Config::Method]
1019
+ #
1020
+ attr_reader :validate_exclusivity
1021
+ ##
1022
+ # RPC-specific configuration for `generate_exclusivity_manifest`
1023
+ # @return [::Gapic::Config::Method]
1024
+ #
1025
+ attr_reader :generate_exclusivity_manifest
1026
+
1027
+ # @private
1028
+ def initialize parent_rpcs = nil
1029
+ list_memberships_config = parent_rpcs.list_memberships if parent_rpcs.respond_to? :list_memberships
1030
+ @list_memberships = ::Gapic::Config::Method.new list_memberships_config
1031
+ get_membership_config = parent_rpcs.get_membership if parent_rpcs.respond_to? :get_membership
1032
+ @get_membership = ::Gapic::Config::Method.new get_membership_config
1033
+ create_membership_config = parent_rpcs.create_membership if parent_rpcs.respond_to? :create_membership
1034
+ @create_membership = ::Gapic::Config::Method.new create_membership_config
1035
+ delete_membership_config = parent_rpcs.delete_membership if parent_rpcs.respond_to? :delete_membership
1036
+ @delete_membership = ::Gapic::Config::Method.new delete_membership_config
1037
+ update_membership_config = parent_rpcs.update_membership if parent_rpcs.respond_to? :update_membership
1038
+ @update_membership = ::Gapic::Config::Method.new update_membership_config
1039
+ generate_connect_manifest_config = parent_rpcs.generate_connect_manifest if parent_rpcs.respond_to? :generate_connect_manifest
1040
+ @generate_connect_manifest = ::Gapic::Config::Method.new generate_connect_manifest_config
1041
+ validate_exclusivity_config = parent_rpcs.validate_exclusivity if parent_rpcs.respond_to? :validate_exclusivity
1042
+ @validate_exclusivity = ::Gapic::Config::Method.new validate_exclusivity_config
1043
+ generate_exclusivity_manifest_config = parent_rpcs.generate_exclusivity_manifest if parent_rpcs.respond_to? :generate_exclusivity_manifest
1044
+ @generate_exclusivity_manifest = ::Gapic::Config::Method.new generate_exclusivity_manifest_config
1045
+
1046
+ yield self if block_given?
1047
+ end
1048
+ end
1049
+ end
1050
+ end
1051
+ end
1052
+ end
1053
+ end
1054
+ end
1055
+ end
1056
+ end