google-cloud-kms-v1 1.9.1 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1380 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 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/kms/v1/hsm_management_pb"
21
+ require "google/cloud/kms/v1/hsm_management/rest/service_stub"
22
+ require "google/cloud/location/rest"
23
+ require "google/iam/v1/rest"
24
+
25
+ module Google
26
+ module Cloud
27
+ module Kms
28
+ module V1
29
+ module HsmManagement
30
+ module Rest
31
+ ##
32
+ # REST client for the HsmManagement service.
33
+ #
34
+ # Google Cloud HSM Management Service
35
+ #
36
+ # Provides interfaces for managing HSM instances.
37
+ #
38
+ # Implements a REST model with the following objects:
39
+ # * {::Google::Cloud::Kms::V1::SingleTenantHsmInstance SingleTenantHsmInstance}
40
+ # * {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal SingleTenantHsmInstanceProposal}
41
+ #
42
+ class Client
43
+ # @private
44
+ API_VERSION = ""
45
+
46
+ # @private
47
+ DEFAULT_ENDPOINT_TEMPLATE = "cloudkms.$UNIVERSE_DOMAIN$"
48
+
49
+ include Paths
50
+
51
+ # @private
52
+ attr_reader :hsm_management_stub
53
+
54
+ ##
55
+ # Configure the HsmManagement Client class.
56
+ #
57
+ # See {::Google::Cloud::Kms::V1::HsmManagement::Rest::Client::Configuration}
58
+ # for a description of the configuration fields.
59
+ #
60
+ # @example
61
+ #
62
+ # # Modify the configuration for all HsmManagement clients
63
+ # ::Google::Cloud::Kms::V1::HsmManagement::Rest::Client.configure do |config|
64
+ # config.timeout = 10.0
65
+ # end
66
+ #
67
+ # @yield [config] Configure the Client client.
68
+ # @yieldparam config [Client::Configuration]
69
+ #
70
+ # @return [Client::Configuration]
71
+ #
72
+ def self.configure
73
+ @configure ||= begin
74
+ namespace = ["Google", "Cloud", "Kms", "V1"]
75
+ parent_config = while namespace.any?
76
+ parent_name = namespace.join "::"
77
+ parent_const = const_get parent_name
78
+ break parent_const.configure if parent_const.respond_to? :configure
79
+ namespace.pop
80
+ end
81
+ default_config = Client::Configuration.new parent_config
82
+
83
+ default_config.rpcs.list_single_tenant_hsm_instances.timeout = 60.0
84
+ default_config.rpcs.list_single_tenant_hsm_instances.retry_policy = {
85
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
86
+ }
87
+
88
+ default_config.rpcs.get_single_tenant_hsm_instance.timeout = 60.0
89
+ default_config.rpcs.get_single_tenant_hsm_instance.retry_policy = {
90
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
91
+ }
92
+
93
+ default_config.rpcs.create_single_tenant_hsm_instance.timeout = 60.0
94
+ default_config.rpcs.create_single_tenant_hsm_instance.retry_policy = {
95
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
96
+ }
97
+
98
+ default_config.rpcs.create_single_tenant_hsm_instance_proposal.timeout = 60.0
99
+ default_config.rpcs.create_single_tenant_hsm_instance_proposal.retry_policy = {
100
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
101
+ }
102
+
103
+ default_config.rpcs.approve_single_tenant_hsm_instance_proposal.timeout = 60.0
104
+ default_config.rpcs.approve_single_tenant_hsm_instance_proposal.retry_policy = {
105
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
106
+ }
107
+
108
+ default_config.rpcs.execute_single_tenant_hsm_instance_proposal.timeout = 60.0
109
+ default_config.rpcs.execute_single_tenant_hsm_instance_proposal.retry_policy = {
110
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
111
+ }
112
+
113
+ default_config.rpcs.get_single_tenant_hsm_instance_proposal.timeout = 60.0
114
+ default_config.rpcs.get_single_tenant_hsm_instance_proposal.retry_policy = {
115
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
116
+ }
117
+
118
+ default_config.rpcs.list_single_tenant_hsm_instance_proposals.timeout = 60.0
119
+ default_config.rpcs.list_single_tenant_hsm_instance_proposals.retry_policy = {
120
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
121
+ }
122
+
123
+ default_config.rpcs.delete_single_tenant_hsm_instance_proposal.timeout = 60.0
124
+ default_config.rpcs.delete_single_tenant_hsm_instance_proposal.retry_policy = {
125
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
126
+ }
127
+
128
+ default_config
129
+ end
130
+ yield @configure if block_given?
131
+ @configure
132
+ end
133
+
134
+ ##
135
+ # Configure the HsmManagement Client instance.
136
+ #
137
+ # The configuration is set to the derived mode, meaning that values can be changed,
138
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
139
+ # should be made on {Client.configure}.
140
+ #
141
+ # See {::Google::Cloud::Kms::V1::HsmManagement::Rest::Client::Configuration}
142
+ # for a description of the configuration fields.
143
+ #
144
+ # @yield [config] Configure the Client client.
145
+ # @yieldparam config [Client::Configuration]
146
+ #
147
+ # @return [Client::Configuration]
148
+ #
149
+ def configure
150
+ yield @config if block_given?
151
+ @config
152
+ end
153
+
154
+ ##
155
+ # The effective universe domain
156
+ #
157
+ # @return [String]
158
+ #
159
+ def universe_domain
160
+ @hsm_management_stub.universe_domain
161
+ end
162
+
163
+ ##
164
+ # Create a new HsmManagement REST client object.
165
+ #
166
+ # @example
167
+ #
168
+ # # Create a client using the default configuration
169
+ # client = ::Google::Cloud::Kms::V1::HsmManagement::Rest::Client.new
170
+ #
171
+ # # Create a client using a custom configuration
172
+ # client = ::Google::Cloud::Kms::V1::HsmManagement::Rest::Client.new do |config|
173
+ # config.timeout = 10.0
174
+ # end
175
+ #
176
+ # @yield [config] Configure the HsmManagement client.
177
+ # @yieldparam config [Client::Configuration]
178
+ #
179
+ def initialize
180
+ # Create the configuration object
181
+ @config = Configuration.new Client.configure
182
+
183
+ # Yield the configuration if needed
184
+ yield @config if block_given?
185
+
186
+ # Create credentials
187
+ credentials = @config.credentials
188
+ # Use self-signed JWT if the endpoint is unchanged from default,
189
+ # but only if the default endpoint does not have a region prefix.
190
+ enable_self_signed_jwt = @config.endpoint.nil? ||
191
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
192
+ !@config.endpoint.split(".").first.include?("-"))
193
+ credentials ||= Credentials.default scope: @config.scope,
194
+ enable_self_signed_jwt: enable_self_signed_jwt
195
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
196
+ credentials = Credentials.new credentials, scope: @config.scope
197
+ end
198
+
199
+ @quota_project_id = @config.quota_project
200
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
201
+
202
+ @operations_client = ::Google::Cloud::Kms::V1::HsmManagement::Rest::Operations.new do |config|
203
+ config.credentials = credentials
204
+ config.quota_project = @quota_project_id
205
+ config.endpoint = @config.endpoint
206
+ config.universe_domain = @config.universe_domain
207
+ end
208
+
209
+ @hsm_management_stub = ::Google::Cloud::Kms::V1::HsmManagement::Rest::ServiceStub.new(
210
+ endpoint: @config.endpoint,
211
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
212
+ universe_domain: @config.universe_domain,
213
+ credentials: credentials,
214
+ logger: @config.logger
215
+ )
216
+
217
+ @hsm_management_stub.logger(stub: true)&.info do |entry|
218
+ entry.set_system_name
219
+ entry.set_service
220
+ entry.message = "Created client for #{entry.service}"
221
+ entry.set_credentials_fields credentials
222
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
223
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
224
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
225
+ end
226
+
227
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
228
+ config.credentials = credentials
229
+ config.quota_project = @quota_project_id
230
+ config.endpoint = @hsm_management_stub.endpoint
231
+ config.universe_domain = @hsm_management_stub.universe_domain
232
+ config.bindings_override = @config.bindings_override
233
+ config.logger = @hsm_management_stub.logger if config.respond_to? :logger=
234
+ end
235
+
236
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
237
+ config.credentials = credentials
238
+ config.quota_project = @quota_project_id
239
+ config.endpoint = @hsm_management_stub.endpoint
240
+ config.universe_domain = @hsm_management_stub.universe_domain
241
+ config.bindings_override = @config.bindings_override
242
+ config.logger = @hsm_management_stub.logger if config.respond_to? :logger=
243
+ end
244
+ end
245
+
246
+ ##
247
+ # Get the associated client for long-running operations.
248
+ #
249
+ # @return [::Google::Cloud::Kms::V1::HsmManagement::Rest::Operations]
250
+ #
251
+ attr_reader :operations_client
252
+
253
+ ##
254
+ # Get the associated client for mix-in of the Locations.
255
+ #
256
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
257
+ #
258
+ attr_reader :location_client
259
+
260
+ ##
261
+ # Get the associated client for mix-in of the IAMPolicy.
262
+ #
263
+ # @return [Google::Iam::V1::IAMPolicy::Rest::Client]
264
+ #
265
+ attr_reader :iam_policy_client
266
+
267
+ ##
268
+ # The logger used for request/response debug logging.
269
+ #
270
+ # @return [Logger]
271
+ #
272
+ def logger
273
+ @hsm_management_stub.logger
274
+ end
275
+
276
+ # Service calls
277
+
278
+ ##
279
+ # Lists
280
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstance SingleTenantHsmInstances}.
281
+ #
282
+ # @overload list_single_tenant_hsm_instances(request, options = nil)
283
+ # Pass arguments to `list_single_tenant_hsm_instances` via a request object, either of type
284
+ # {::Google::Cloud::Kms::V1::ListSingleTenantHsmInstancesRequest} or an equivalent Hash.
285
+ #
286
+ # @param request [::Google::Cloud::Kms::V1::ListSingleTenantHsmInstancesRequest, ::Hash]
287
+ # A request object representing the call parameters. Required. To specify no
288
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
289
+ # @param options [::Gapic::CallOptions, ::Hash]
290
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
291
+ #
292
+ # @overload list_single_tenant_hsm_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, show_deleted: nil)
293
+ # Pass arguments to `list_single_tenant_hsm_instances` via keyword arguments. Note that at
294
+ # least one keyword argument is required. To specify no parameters, or to keep all
295
+ # the default parameter values, pass an empty Hash as a request object (see above).
296
+ #
297
+ # @param parent [::String]
298
+ # Required. The resource name of the location associated with the
299
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstance SingleTenantHsmInstances} to
300
+ # list, in the format `projects/*/locations/*`.
301
+ # @param page_size [::Integer]
302
+ # Optional. Optional limit on the number of
303
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstance SingleTenantHsmInstances} to
304
+ # include in the response. Further
305
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstance SingleTenantHsmInstances} can
306
+ # subsequently be
307
+ # obtained by including the
308
+ # {::Google::Cloud::Kms::V1::ListSingleTenantHsmInstancesResponse#next_page_token ListSingleTenantHsmInstancesResponse.next_page_token}
309
+ # in a subsequent request. If unspecified, the server will pick an
310
+ # appropriate default.
311
+ # @param page_token [::String]
312
+ # Optional. Optional pagination token, returned earlier via
313
+ # {::Google::Cloud::Kms::V1::ListSingleTenantHsmInstancesResponse#next_page_token ListSingleTenantHsmInstancesResponse.next_page_token}.
314
+ # @param filter [::String]
315
+ # Optional. Only include resources that match the filter in the response. For
316
+ # more information, see
317
+ # [Sorting and filtering list
318
+ # results](https://cloud.google.com/kms/docs/sorting-and-filtering).
319
+ # @param order_by [::String]
320
+ # Optional. Specify how the results should be sorted. If not specified, the
321
+ # results will be sorted in the default order. For more information, see
322
+ # [Sorting and filtering list
323
+ # results](https://cloud.google.com/kms/docs/sorting-and-filtering).
324
+ # @param show_deleted [::Boolean]
325
+ # Optional. If set to true,
326
+ # {::Google::Cloud::Kms::V1::HsmManagement::Rest::Client#list_single_tenant_hsm_instances HsmManagement.ListSingleTenantHsmInstances}
327
+ # will also return
328
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstance SingleTenantHsmInstances} in
329
+ # DELETED state.
330
+ # @yield [result, operation] Access the result along with the TransportOperation object
331
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Kms::V1::SingleTenantHsmInstance>]
332
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
333
+ #
334
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Kms::V1::SingleTenantHsmInstance>]
335
+ #
336
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
337
+ #
338
+ # @example Basic example
339
+ # require "google/cloud/kms/v1"
340
+ #
341
+ # # Create a client object. The client can be reused for multiple calls.
342
+ # client = Google::Cloud::Kms::V1::HsmManagement::Rest::Client.new
343
+ #
344
+ # # Create a request. To set request fields, pass in keyword arguments.
345
+ # request = Google::Cloud::Kms::V1::ListSingleTenantHsmInstancesRequest.new
346
+ #
347
+ # # Call the list_single_tenant_hsm_instances method.
348
+ # result = client.list_single_tenant_hsm_instances request
349
+ #
350
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
351
+ # # over elements, and API calls will be issued to fetch pages as needed.
352
+ # result.each do |item|
353
+ # # Each element is of type ::Google::Cloud::Kms::V1::SingleTenantHsmInstance.
354
+ # p item
355
+ # end
356
+ #
357
+ def list_single_tenant_hsm_instances request, options = nil
358
+ raise ::ArgumentError, "request must be provided" if request.nil?
359
+
360
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Kms::V1::ListSingleTenantHsmInstancesRequest
361
+
362
+ # Converts hash and nil to an options object
363
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
364
+
365
+ # Customize the options with defaults
366
+ call_metadata = @config.rpcs.list_single_tenant_hsm_instances.metadata.to_h
367
+
368
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
369
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
370
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
371
+ gapic_version: ::Google::Cloud::Kms::V1::VERSION,
372
+ transports_version_send: [:rest]
373
+
374
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
375
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
376
+
377
+ options.apply_defaults timeout: @config.rpcs.list_single_tenant_hsm_instances.timeout,
378
+ metadata: call_metadata,
379
+ retry_policy: @config.rpcs.list_single_tenant_hsm_instances.retry_policy
380
+
381
+ options.apply_defaults timeout: @config.timeout,
382
+ metadata: @config.metadata,
383
+ retry_policy: @config.retry_policy
384
+
385
+ @hsm_management_stub.list_single_tenant_hsm_instances request, options do |result, operation|
386
+ result = ::Gapic::Rest::PagedEnumerable.new @hsm_management_stub, :list_single_tenant_hsm_instances, "single_tenant_hsm_instances", request, result, options
387
+ yield result, operation if block_given?
388
+ throw :response, result
389
+ end
390
+ rescue ::Gapic::Rest::Error => e
391
+ raise ::Google::Cloud::Error.from_error(e)
392
+ end
393
+
394
+ ##
395
+ # Returns metadata for a given
396
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstance SingleTenantHsmInstance}.
397
+ #
398
+ # @overload get_single_tenant_hsm_instance(request, options = nil)
399
+ # Pass arguments to `get_single_tenant_hsm_instance` via a request object, either of type
400
+ # {::Google::Cloud::Kms::V1::GetSingleTenantHsmInstanceRequest} or an equivalent Hash.
401
+ #
402
+ # @param request [::Google::Cloud::Kms::V1::GetSingleTenantHsmInstanceRequest, ::Hash]
403
+ # A request object representing the call parameters. Required. To specify no
404
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
405
+ # @param options [::Gapic::CallOptions, ::Hash]
406
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
407
+ #
408
+ # @overload get_single_tenant_hsm_instance(name: nil)
409
+ # Pass arguments to `get_single_tenant_hsm_instance` via keyword arguments. Note that at
410
+ # least one keyword argument is required. To specify no parameters, or to keep all
411
+ # the default parameter values, pass an empty Hash as a request object (see above).
412
+ #
413
+ # @param name [::String]
414
+ # Required. The {::Google::Cloud::Kms::V1::SingleTenantHsmInstance#name name} of
415
+ # the {::Google::Cloud::Kms::V1::SingleTenantHsmInstance SingleTenantHsmInstance}
416
+ # to get.
417
+ # @yield [result, operation] Access the result along with the TransportOperation object
418
+ # @yieldparam result [::Google::Cloud::Kms::V1::SingleTenantHsmInstance]
419
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
420
+ #
421
+ # @return [::Google::Cloud::Kms::V1::SingleTenantHsmInstance]
422
+ #
423
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
424
+ #
425
+ # @example Basic example
426
+ # require "google/cloud/kms/v1"
427
+ #
428
+ # # Create a client object. The client can be reused for multiple calls.
429
+ # client = Google::Cloud::Kms::V1::HsmManagement::Rest::Client.new
430
+ #
431
+ # # Create a request. To set request fields, pass in keyword arguments.
432
+ # request = Google::Cloud::Kms::V1::GetSingleTenantHsmInstanceRequest.new
433
+ #
434
+ # # Call the get_single_tenant_hsm_instance method.
435
+ # result = client.get_single_tenant_hsm_instance request
436
+ #
437
+ # # The returned object is of type Google::Cloud::Kms::V1::SingleTenantHsmInstance.
438
+ # p result
439
+ #
440
+ def get_single_tenant_hsm_instance request, options = nil
441
+ raise ::ArgumentError, "request must be provided" if request.nil?
442
+
443
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Kms::V1::GetSingleTenantHsmInstanceRequest
444
+
445
+ # Converts hash and nil to an options object
446
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
447
+
448
+ # Customize the options with defaults
449
+ call_metadata = @config.rpcs.get_single_tenant_hsm_instance.metadata.to_h
450
+
451
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
452
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
453
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
454
+ gapic_version: ::Google::Cloud::Kms::V1::VERSION,
455
+ transports_version_send: [:rest]
456
+
457
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
458
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
459
+
460
+ options.apply_defaults timeout: @config.rpcs.get_single_tenant_hsm_instance.timeout,
461
+ metadata: call_metadata,
462
+ retry_policy: @config.rpcs.get_single_tenant_hsm_instance.retry_policy
463
+
464
+ options.apply_defaults timeout: @config.timeout,
465
+ metadata: @config.metadata,
466
+ retry_policy: @config.retry_policy
467
+
468
+ @hsm_management_stub.get_single_tenant_hsm_instance request, options do |result, operation|
469
+ yield result, operation if block_given?
470
+ end
471
+ rescue ::Gapic::Rest::Error => e
472
+ raise ::Google::Cloud::Error.from_error(e)
473
+ end
474
+
475
+ ##
476
+ # Creates a new
477
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstance SingleTenantHsmInstance} in a
478
+ # given Project and Location. User must create a RegisterTwoFactorAuthKeys
479
+ # proposal with this single-tenant HSM instance to finish setup of the
480
+ # instance.
481
+ #
482
+ # @overload create_single_tenant_hsm_instance(request, options = nil)
483
+ # Pass arguments to `create_single_tenant_hsm_instance` via a request object, either of type
484
+ # {::Google::Cloud::Kms::V1::CreateSingleTenantHsmInstanceRequest} or an equivalent Hash.
485
+ #
486
+ # @param request [::Google::Cloud::Kms::V1::CreateSingleTenantHsmInstanceRequest, ::Hash]
487
+ # A request object representing the call parameters. Required. To specify no
488
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
489
+ # @param options [::Gapic::CallOptions, ::Hash]
490
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
491
+ #
492
+ # @overload create_single_tenant_hsm_instance(parent: nil, single_tenant_hsm_instance_id: nil, single_tenant_hsm_instance: nil)
493
+ # Pass arguments to `create_single_tenant_hsm_instance` via keyword arguments. Note that at
494
+ # least one keyword argument is required. To specify no parameters, or to keep all
495
+ # the default parameter values, pass an empty Hash as a request object (see above).
496
+ #
497
+ # @param parent [::String]
498
+ # Required. The resource name of the location associated with the
499
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstance SingleTenantHsmInstance}, in
500
+ # the format `projects/*/locations/*`.
501
+ # @param single_tenant_hsm_instance_id [::String]
502
+ # Optional. It must be unique within a location and match the regular
503
+ # expression `[a-zA-Z0-9_-]{1,63}`.
504
+ # @param single_tenant_hsm_instance [::Google::Cloud::Kms::V1::SingleTenantHsmInstance, ::Hash]
505
+ # Required. An
506
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstance SingleTenantHsmInstance} with
507
+ # initial field values.
508
+ # @yield [result, operation] Access the result along with the TransportOperation object
509
+ # @yieldparam result [::Gapic::Operation]
510
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
511
+ #
512
+ # @return [::Gapic::Operation]
513
+ #
514
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
515
+ #
516
+ # @example Basic example
517
+ # require "google/cloud/kms/v1"
518
+ #
519
+ # # Create a client object. The client can be reused for multiple calls.
520
+ # client = Google::Cloud::Kms::V1::HsmManagement::Rest::Client.new
521
+ #
522
+ # # Create a request. To set request fields, pass in keyword arguments.
523
+ # request = Google::Cloud::Kms::V1::CreateSingleTenantHsmInstanceRequest.new
524
+ #
525
+ # # Call the create_single_tenant_hsm_instance method.
526
+ # result = client.create_single_tenant_hsm_instance request
527
+ #
528
+ # # The returned object is of type Gapic::Operation. You can use it to
529
+ # # check the status of an operation, cancel it, or wait for results.
530
+ # # Here is how to wait for a response.
531
+ # result.wait_until_done! timeout: 60
532
+ # if result.response?
533
+ # p result.response
534
+ # else
535
+ # puts "No response received."
536
+ # end
537
+ #
538
+ def create_single_tenant_hsm_instance request, options = nil
539
+ raise ::ArgumentError, "request must be provided" if request.nil?
540
+
541
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Kms::V1::CreateSingleTenantHsmInstanceRequest
542
+
543
+ # Converts hash and nil to an options object
544
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
545
+
546
+ # Customize the options with defaults
547
+ call_metadata = @config.rpcs.create_single_tenant_hsm_instance.metadata.to_h
548
+
549
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
550
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
551
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
552
+ gapic_version: ::Google::Cloud::Kms::V1::VERSION,
553
+ transports_version_send: [:rest]
554
+
555
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
556
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
557
+
558
+ options.apply_defaults timeout: @config.rpcs.create_single_tenant_hsm_instance.timeout,
559
+ metadata: call_metadata,
560
+ retry_policy: @config.rpcs.create_single_tenant_hsm_instance.retry_policy
561
+
562
+ options.apply_defaults timeout: @config.timeout,
563
+ metadata: @config.metadata,
564
+ retry_policy: @config.retry_policy
565
+
566
+ @hsm_management_stub.create_single_tenant_hsm_instance request, options do |result, operation|
567
+ result = ::Gapic::Operation.new result, @operations_client, options: options
568
+ yield result, operation if block_given?
569
+ throw :response, result
570
+ end
571
+ rescue ::Gapic::Rest::Error => e
572
+ raise ::Google::Cloud::Error.from_error(e)
573
+ end
574
+
575
+ ##
576
+ # Creates a new
577
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal SingleTenantHsmInstanceProposal}
578
+ # for a given
579
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstance SingleTenantHsmInstance}.
580
+ #
581
+ # @overload create_single_tenant_hsm_instance_proposal(request, options = nil)
582
+ # Pass arguments to `create_single_tenant_hsm_instance_proposal` via a request object, either of type
583
+ # {::Google::Cloud::Kms::V1::CreateSingleTenantHsmInstanceProposalRequest} or an equivalent Hash.
584
+ #
585
+ # @param request [::Google::Cloud::Kms::V1::CreateSingleTenantHsmInstanceProposalRequest, ::Hash]
586
+ # A request object representing the call parameters. Required. To specify no
587
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
588
+ # @param options [::Gapic::CallOptions, ::Hash]
589
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
590
+ #
591
+ # @overload create_single_tenant_hsm_instance_proposal(parent: nil, single_tenant_hsm_instance_proposal_id: nil, single_tenant_hsm_instance_proposal: nil)
592
+ # Pass arguments to `create_single_tenant_hsm_instance_proposal` via keyword arguments. Note that at
593
+ # least one keyword argument is required. To specify no parameters, or to keep all
594
+ # the default parameter values, pass an empty Hash as a request object (see above).
595
+ #
596
+ # @param parent [::String]
597
+ # Required. The {::Google::Cloud::Kms::V1::SingleTenantHsmInstance#name name} of
598
+ # the {::Google::Cloud::Kms::V1::SingleTenantHsmInstance SingleTenantHsmInstance}
599
+ # associated with the
600
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal SingleTenantHsmInstanceProposals}.
601
+ # @param single_tenant_hsm_instance_proposal_id [::String]
602
+ # Optional. It must be unique within a location and match the regular
603
+ # expression `[a-zA-Z0-9_-]{1,63}`.
604
+ # @param single_tenant_hsm_instance_proposal [::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal, ::Hash]
605
+ # Required. The
606
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal SingleTenantHsmInstanceProposal}
607
+ # to create.
608
+ # @yield [result, operation] Access the result along with the TransportOperation object
609
+ # @yieldparam result [::Gapic::Operation]
610
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
611
+ #
612
+ # @return [::Gapic::Operation]
613
+ #
614
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
615
+ #
616
+ # @example Basic example
617
+ # require "google/cloud/kms/v1"
618
+ #
619
+ # # Create a client object. The client can be reused for multiple calls.
620
+ # client = Google::Cloud::Kms::V1::HsmManagement::Rest::Client.new
621
+ #
622
+ # # Create a request. To set request fields, pass in keyword arguments.
623
+ # request = Google::Cloud::Kms::V1::CreateSingleTenantHsmInstanceProposalRequest.new
624
+ #
625
+ # # Call the create_single_tenant_hsm_instance_proposal method.
626
+ # result = client.create_single_tenant_hsm_instance_proposal request
627
+ #
628
+ # # The returned object is of type Gapic::Operation. You can use it to
629
+ # # check the status of an operation, cancel it, or wait for results.
630
+ # # Here is how to wait for a response.
631
+ # result.wait_until_done! timeout: 60
632
+ # if result.response?
633
+ # p result.response
634
+ # else
635
+ # puts "No response received."
636
+ # end
637
+ #
638
+ def create_single_tenant_hsm_instance_proposal request, options = nil
639
+ raise ::ArgumentError, "request must be provided" if request.nil?
640
+
641
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Kms::V1::CreateSingleTenantHsmInstanceProposalRequest
642
+
643
+ # Converts hash and nil to an options object
644
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
645
+
646
+ # Customize the options with defaults
647
+ call_metadata = @config.rpcs.create_single_tenant_hsm_instance_proposal.metadata.to_h
648
+
649
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
650
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
651
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
652
+ gapic_version: ::Google::Cloud::Kms::V1::VERSION,
653
+ transports_version_send: [:rest]
654
+
655
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
656
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
657
+
658
+ options.apply_defaults timeout: @config.rpcs.create_single_tenant_hsm_instance_proposal.timeout,
659
+ metadata: call_metadata,
660
+ retry_policy: @config.rpcs.create_single_tenant_hsm_instance_proposal.retry_policy
661
+
662
+ options.apply_defaults timeout: @config.timeout,
663
+ metadata: @config.metadata,
664
+ retry_policy: @config.retry_policy
665
+
666
+ @hsm_management_stub.create_single_tenant_hsm_instance_proposal request, options do |result, operation|
667
+ result = ::Gapic::Operation.new result, @operations_client, options: options
668
+ yield result, operation if block_given?
669
+ throw :response, result
670
+ end
671
+ rescue ::Gapic::Rest::Error => e
672
+ raise ::Google::Cloud::Error.from_error(e)
673
+ end
674
+
675
+ ##
676
+ # Approves a
677
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal SingleTenantHsmInstanceProposal}
678
+ # for a given
679
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstance SingleTenantHsmInstance}. The
680
+ # proposal must be in the
681
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal::State::PENDING PENDING}
682
+ # state.
683
+ #
684
+ # @overload approve_single_tenant_hsm_instance_proposal(request, options = nil)
685
+ # Pass arguments to `approve_single_tenant_hsm_instance_proposal` via a request object, either of type
686
+ # {::Google::Cloud::Kms::V1::ApproveSingleTenantHsmInstanceProposalRequest} or an equivalent Hash.
687
+ #
688
+ # @param request [::Google::Cloud::Kms::V1::ApproveSingleTenantHsmInstanceProposalRequest, ::Hash]
689
+ # A request object representing the call parameters. Required. To specify no
690
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
691
+ # @param options [::Gapic::CallOptions, ::Hash]
692
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
693
+ #
694
+ # @overload approve_single_tenant_hsm_instance_proposal(name: nil, quorum_reply: nil, required_action_quorum_reply: nil)
695
+ # Pass arguments to `approve_single_tenant_hsm_instance_proposal` via keyword arguments. Note that at
696
+ # least one keyword argument is required. To specify no parameters, or to keep all
697
+ # the default parameter values, pass an empty Hash as a request object (see above).
698
+ #
699
+ # @param name [::String]
700
+ # Required. The
701
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal#name name} of the
702
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal SingleTenantHsmInstanceProposal}
703
+ # to approve.
704
+ # @param quorum_reply [::Google::Cloud::Kms::V1::ApproveSingleTenantHsmInstanceProposalRequest::QuorumReply, ::Hash]
705
+ # Required. The reply to
706
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal::QuorumParameters QuorumParameters}
707
+ # for approving the proposal.
708
+ #
709
+ # Note: The following parameters are mutually exclusive: `quorum_reply`, `required_action_quorum_reply`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.
710
+ # @param required_action_quorum_reply [::Google::Cloud::Kms::V1::ApproveSingleTenantHsmInstanceProposalRequest::RequiredActionQuorumReply, ::Hash]
711
+ # Required. The reply to
712
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal::RequiredActionQuorumParameters RequiredActionQuorumParameters}
713
+ # for approving the proposal.
714
+ #
715
+ # Note: The following parameters are mutually exclusive: `required_action_quorum_reply`, `quorum_reply`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.
716
+ # @yield [result, operation] Access the result along with the TransportOperation object
717
+ # @yieldparam result [::Google::Cloud::Kms::V1::ApproveSingleTenantHsmInstanceProposalResponse]
718
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
719
+ #
720
+ # @return [::Google::Cloud::Kms::V1::ApproveSingleTenantHsmInstanceProposalResponse]
721
+ #
722
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
723
+ #
724
+ # @example Basic example
725
+ # require "google/cloud/kms/v1"
726
+ #
727
+ # # Create a client object. The client can be reused for multiple calls.
728
+ # client = Google::Cloud::Kms::V1::HsmManagement::Rest::Client.new
729
+ #
730
+ # # Create a request. To set request fields, pass in keyword arguments.
731
+ # request = Google::Cloud::Kms::V1::ApproveSingleTenantHsmInstanceProposalRequest.new
732
+ #
733
+ # # Call the approve_single_tenant_hsm_instance_proposal method.
734
+ # result = client.approve_single_tenant_hsm_instance_proposal request
735
+ #
736
+ # # The returned object is of type Google::Cloud::Kms::V1::ApproveSingleTenantHsmInstanceProposalResponse.
737
+ # p result
738
+ #
739
+ def approve_single_tenant_hsm_instance_proposal request, options = nil
740
+ raise ::ArgumentError, "request must be provided" if request.nil?
741
+
742
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Kms::V1::ApproveSingleTenantHsmInstanceProposalRequest
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.approve_single_tenant_hsm_instance_proposal.metadata.to_h
749
+
750
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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::Kms::V1::VERSION,
754
+ transports_version_send: [:rest]
755
+
756
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
757
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
758
+
759
+ options.apply_defaults timeout: @config.rpcs.approve_single_tenant_hsm_instance_proposal.timeout,
760
+ metadata: call_metadata,
761
+ retry_policy: @config.rpcs.approve_single_tenant_hsm_instance_proposal.retry_policy
762
+
763
+ options.apply_defaults timeout: @config.timeout,
764
+ metadata: @config.metadata,
765
+ retry_policy: @config.retry_policy
766
+
767
+ @hsm_management_stub.approve_single_tenant_hsm_instance_proposal request, options do |result, operation|
768
+ yield result, operation if block_given?
769
+ end
770
+ rescue ::Gapic::Rest::Error => e
771
+ raise ::Google::Cloud::Error.from_error(e)
772
+ end
773
+
774
+ ##
775
+ # Executes a
776
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal SingleTenantHsmInstanceProposal}
777
+ # for a given
778
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstance SingleTenantHsmInstance}. The
779
+ # proposal must be in the
780
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal::State::APPROVED APPROVED}
781
+ # state.
782
+ #
783
+ # @overload execute_single_tenant_hsm_instance_proposal(request, options = nil)
784
+ # Pass arguments to `execute_single_tenant_hsm_instance_proposal` via a request object, either of type
785
+ # {::Google::Cloud::Kms::V1::ExecuteSingleTenantHsmInstanceProposalRequest} or an equivalent Hash.
786
+ #
787
+ # @param request [::Google::Cloud::Kms::V1::ExecuteSingleTenantHsmInstanceProposalRequest, ::Hash]
788
+ # A request object representing the call parameters. Required. To specify no
789
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
790
+ # @param options [::Gapic::CallOptions, ::Hash]
791
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
792
+ #
793
+ # @overload execute_single_tenant_hsm_instance_proposal(name: nil)
794
+ # Pass arguments to `execute_single_tenant_hsm_instance_proposal` via keyword arguments. Note that at
795
+ # least one keyword argument is required. To specify no parameters, or to keep all
796
+ # the default parameter values, pass an empty Hash as a request object (see above).
797
+ #
798
+ # @param name [::String]
799
+ # Required. The
800
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal#name name} of the
801
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal SingleTenantHsmInstanceProposal}
802
+ # to execute.
803
+ # @yield [result, operation] Access the result along with the TransportOperation object
804
+ # @yieldparam result [::Gapic::Operation]
805
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
806
+ #
807
+ # @return [::Gapic::Operation]
808
+ #
809
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
810
+ #
811
+ # @example Basic example
812
+ # require "google/cloud/kms/v1"
813
+ #
814
+ # # Create a client object. The client can be reused for multiple calls.
815
+ # client = Google::Cloud::Kms::V1::HsmManagement::Rest::Client.new
816
+ #
817
+ # # Create a request. To set request fields, pass in keyword arguments.
818
+ # request = Google::Cloud::Kms::V1::ExecuteSingleTenantHsmInstanceProposalRequest.new
819
+ #
820
+ # # Call the execute_single_tenant_hsm_instance_proposal method.
821
+ # result = client.execute_single_tenant_hsm_instance_proposal request
822
+ #
823
+ # # The returned object is of type Gapic::Operation. You can use it to
824
+ # # check the status of an operation, cancel it, or wait for results.
825
+ # # Here is how to wait for a response.
826
+ # result.wait_until_done! timeout: 60
827
+ # if result.response?
828
+ # p result.response
829
+ # else
830
+ # puts "No response received."
831
+ # end
832
+ #
833
+ def execute_single_tenant_hsm_instance_proposal request, options = nil
834
+ raise ::ArgumentError, "request must be provided" if request.nil?
835
+
836
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Kms::V1::ExecuteSingleTenantHsmInstanceProposalRequest
837
+
838
+ # Converts hash and nil to an options object
839
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
840
+
841
+ # Customize the options with defaults
842
+ call_metadata = @config.rpcs.execute_single_tenant_hsm_instance_proposal.metadata.to_h
843
+
844
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
845
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
846
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
847
+ gapic_version: ::Google::Cloud::Kms::V1::VERSION,
848
+ transports_version_send: [:rest]
849
+
850
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
851
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
852
+
853
+ options.apply_defaults timeout: @config.rpcs.execute_single_tenant_hsm_instance_proposal.timeout,
854
+ metadata: call_metadata,
855
+ retry_policy: @config.rpcs.execute_single_tenant_hsm_instance_proposal.retry_policy
856
+
857
+ options.apply_defaults timeout: @config.timeout,
858
+ metadata: @config.metadata,
859
+ retry_policy: @config.retry_policy
860
+
861
+ @hsm_management_stub.execute_single_tenant_hsm_instance_proposal request, options do |result, operation|
862
+ result = ::Gapic::Operation.new result, @operations_client, options: options
863
+ yield result, operation if block_given?
864
+ throw :response, result
865
+ end
866
+ rescue ::Gapic::Rest::Error => e
867
+ raise ::Google::Cloud::Error.from_error(e)
868
+ end
869
+
870
+ ##
871
+ # Returns metadata for a given
872
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal SingleTenantHsmInstanceProposal}.
873
+ #
874
+ # @overload get_single_tenant_hsm_instance_proposal(request, options = nil)
875
+ # Pass arguments to `get_single_tenant_hsm_instance_proposal` via a request object, either of type
876
+ # {::Google::Cloud::Kms::V1::GetSingleTenantHsmInstanceProposalRequest} or an equivalent Hash.
877
+ #
878
+ # @param request [::Google::Cloud::Kms::V1::GetSingleTenantHsmInstanceProposalRequest, ::Hash]
879
+ # A request object representing the call parameters. Required. To specify no
880
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
881
+ # @param options [::Gapic::CallOptions, ::Hash]
882
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
883
+ #
884
+ # @overload get_single_tenant_hsm_instance_proposal(name: nil)
885
+ # Pass arguments to `get_single_tenant_hsm_instance_proposal` via keyword arguments. Note that at
886
+ # least one keyword argument is required. To specify no parameters, or to keep all
887
+ # the default parameter values, pass an empty Hash as a request object (see above).
888
+ #
889
+ # @param name [::String]
890
+ # Required. The
891
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal#name name} of the
892
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal SingleTenantHsmInstanceProposal}
893
+ # to get.
894
+ # @yield [result, operation] Access the result along with the TransportOperation object
895
+ # @yieldparam result [::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal]
896
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
897
+ #
898
+ # @return [::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal]
899
+ #
900
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
901
+ #
902
+ # @example Basic example
903
+ # require "google/cloud/kms/v1"
904
+ #
905
+ # # Create a client object. The client can be reused for multiple calls.
906
+ # client = Google::Cloud::Kms::V1::HsmManagement::Rest::Client.new
907
+ #
908
+ # # Create a request. To set request fields, pass in keyword arguments.
909
+ # request = Google::Cloud::Kms::V1::GetSingleTenantHsmInstanceProposalRequest.new
910
+ #
911
+ # # Call the get_single_tenant_hsm_instance_proposal method.
912
+ # result = client.get_single_tenant_hsm_instance_proposal request
913
+ #
914
+ # # The returned object is of type Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal.
915
+ # p result
916
+ #
917
+ def get_single_tenant_hsm_instance_proposal request, options = nil
918
+ raise ::ArgumentError, "request must be provided" if request.nil?
919
+
920
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Kms::V1::GetSingleTenantHsmInstanceProposalRequest
921
+
922
+ # Converts hash and nil to an options object
923
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
924
+
925
+ # Customize the options with defaults
926
+ call_metadata = @config.rpcs.get_single_tenant_hsm_instance_proposal.metadata.to_h
927
+
928
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
929
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
930
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
931
+ gapic_version: ::Google::Cloud::Kms::V1::VERSION,
932
+ transports_version_send: [:rest]
933
+
934
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
935
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
936
+
937
+ options.apply_defaults timeout: @config.rpcs.get_single_tenant_hsm_instance_proposal.timeout,
938
+ metadata: call_metadata,
939
+ retry_policy: @config.rpcs.get_single_tenant_hsm_instance_proposal.retry_policy
940
+
941
+ options.apply_defaults timeout: @config.timeout,
942
+ metadata: @config.metadata,
943
+ retry_policy: @config.retry_policy
944
+
945
+ @hsm_management_stub.get_single_tenant_hsm_instance_proposal request, options do |result, operation|
946
+ yield result, operation if block_given?
947
+ end
948
+ rescue ::Gapic::Rest::Error => e
949
+ raise ::Google::Cloud::Error.from_error(e)
950
+ end
951
+
952
+ ##
953
+ # Lists
954
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal SingleTenantHsmInstanceProposals}.
955
+ #
956
+ # @overload list_single_tenant_hsm_instance_proposals(request, options = nil)
957
+ # Pass arguments to `list_single_tenant_hsm_instance_proposals` via a request object, either of type
958
+ # {::Google::Cloud::Kms::V1::ListSingleTenantHsmInstanceProposalsRequest} or an equivalent Hash.
959
+ #
960
+ # @param request [::Google::Cloud::Kms::V1::ListSingleTenantHsmInstanceProposalsRequest, ::Hash]
961
+ # A request object representing the call parameters. Required. To specify no
962
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
963
+ # @param options [::Gapic::CallOptions, ::Hash]
964
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
965
+ #
966
+ # @overload list_single_tenant_hsm_instance_proposals(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, show_deleted: nil)
967
+ # Pass arguments to `list_single_tenant_hsm_instance_proposals` via keyword arguments. Note that at
968
+ # least one keyword argument is required. To specify no parameters, or to keep all
969
+ # the default parameter values, pass an empty Hash as a request object (see above).
970
+ #
971
+ # @param parent [::String]
972
+ # Required. The resource name of the single tenant HSM instance associated
973
+ # with the
974
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal SingleTenantHsmInstanceProposals}
975
+ # to list, in the format `projects/*/locations/*/singleTenantHsmInstances/*`.
976
+ # @param page_size [::Integer]
977
+ # Optional. Optional limit on the number of
978
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal SingleTenantHsmInstanceProposals}
979
+ # to include in the response. Further
980
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal SingleTenantHsmInstanceProposals}
981
+ # can subsequently be obtained by including the
982
+ # {::Google::Cloud::Kms::V1::ListSingleTenantHsmInstanceProposalsResponse#next_page_token ListSingleTenantHsmInstanceProposalsResponse.next_page_token}
983
+ # in a subsequent request. If unspecified, the server will pick an
984
+ # appropriate default.
985
+ # @param page_token [::String]
986
+ # Optional. Optional pagination token, returned earlier via
987
+ # {::Google::Cloud::Kms::V1::ListSingleTenantHsmInstanceProposalsResponse#next_page_token ListSingleTenantHsmInstanceProposalsResponse.next_page_token}.
988
+ # @param filter [::String]
989
+ # Optional. Only include resources that match the filter in the response. For
990
+ # more information, see
991
+ # [Sorting and filtering list
992
+ # results](https://cloud.google.com/kms/docs/sorting-and-filtering).
993
+ # @param order_by [::String]
994
+ # Optional. Specify how the results should be sorted. If not specified, the
995
+ # results will be sorted in the default order. For more information, see
996
+ # [Sorting and filtering list
997
+ # results](https://cloud.google.com/kms/docs/sorting-and-filtering).
998
+ # @param show_deleted [::Boolean]
999
+ # Optional. If set to true,
1000
+ # {::Google::Cloud::Kms::V1::HsmManagement::Rest::Client#list_single_tenant_hsm_instance_proposals HsmManagement.ListSingleTenantHsmInstanceProposals}
1001
+ # will also return
1002
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal SingleTenantHsmInstanceProposals}
1003
+ # in DELETED state.
1004
+ # @yield [result, operation] Access the result along with the TransportOperation object
1005
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal>]
1006
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1007
+ #
1008
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal>]
1009
+ #
1010
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1011
+ #
1012
+ # @example Basic example
1013
+ # require "google/cloud/kms/v1"
1014
+ #
1015
+ # # Create a client object. The client can be reused for multiple calls.
1016
+ # client = Google::Cloud::Kms::V1::HsmManagement::Rest::Client.new
1017
+ #
1018
+ # # Create a request. To set request fields, pass in keyword arguments.
1019
+ # request = Google::Cloud::Kms::V1::ListSingleTenantHsmInstanceProposalsRequest.new
1020
+ #
1021
+ # # Call the list_single_tenant_hsm_instance_proposals method.
1022
+ # result = client.list_single_tenant_hsm_instance_proposals request
1023
+ #
1024
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1025
+ # # over elements, and API calls will be issued to fetch pages as needed.
1026
+ # result.each do |item|
1027
+ # # Each element is of type ::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal.
1028
+ # p item
1029
+ # end
1030
+ #
1031
+ def list_single_tenant_hsm_instance_proposals request, options = nil
1032
+ raise ::ArgumentError, "request must be provided" if request.nil?
1033
+
1034
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Kms::V1::ListSingleTenantHsmInstanceProposalsRequest
1035
+
1036
+ # Converts hash and nil to an options object
1037
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1038
+
1039
+ # Customize the options with defaults
1040
+ call_metadata = @config.rpcs.list_single_tenant_hsm_instance_proposals.metadata.to_h
1041
+
1042
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1043
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1044
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1045
+ gapic_version: ::Google::Cloud::Kms::V1::VERSION,
1046
+ transports_version_send: [:rest]
1047
+
1048
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1049
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1050
+
1051
+ options.apply_defaults timeout: @config.rpcs.list_single_tenant_hsm_instance_proposals.timeout,
1052
+ metadata: call_metadata,
1053
+ retry_policy: @config.rpcs.list_single_tenant_hsm_instance_proposals.retry_policy
1054
+
1055
+ options.apply_defaults timeout: @config.timeout,
1056
+ metadata: @config.metadata,
1057
+ retry_policy: @config.retry_policy
1058
+
1059
+ @hsm_management_stub.list_single_tenant_hsm_instance_proposals request, options do |result, operation|
1060
+ result = ::Gapic::Rest::PagedEnumerable.new @hsm_management_stub, :list_single_tenant_hsm_instance_proposals, "single_tenant_hsm_instance_proposals", request, result, options
1061
+ yield result, operation if block_given?
1062
+ throw :response, result
1063
+ end
1064
+ rescue ::Gapic::Rest::Error => e
1065
+ raise ::Google::Cloud::Error.from_error(e)
1066
+ end
1067
+
1068
+ ##
1069
+ # Deletes a
1070
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal SingleTenantHsmInstanceProposal}.
1071
+ #
1072
+ # @overload delete_single_tenant_hsm_instance_proposal(request, options = nil)
1073
+ # Pass arguments to `delete_single_tenant_hsm_instance_proposal` via a request object, either of type
1074
+ # {::Google::Cloud::Kms::V1::DeleteSingleTenantHsmInstanceProposalRequest} or an equivalent Hash.
1075
+ #
1076
+ # @param request [::Google::Cloud::Kms::V1::DeleteSingleTenantHsmInstanceProposalRequest, ::Hash]
1077
+ # A request object representing the call parameters. Required. To specify no
1078
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1079
+ # @param options [::Gapic::CallOptions, ::Hash]
1080
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1081
+ #
1082
+ # @overload delete_single_tenant_hsm_instance_proposal(name: nil)
1083
+ # Pass arguments to `delete_single_tenant_hsm_instance_proposal` via keyword arguments. Note that at
1084
+ # least one keyword argument is required. To specify no parameters, or to keep all
1085
+ # the default parameter values, pass an empty Hash as a request object (see above).
1086
+ #
1087
+ # @param name [::String]
1088
+ # Required. The
1089
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal#name name} of the
1090
+ # {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal SingleTenantHsmInstanceProposal}
1091
+ # to delete.
1092
+ # @yield [result, operation] Access the result along with the TransportOperation object
1093
+ # @yieldparam result [::Google::Protobuf::Empty]
1094
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1095
+ #
1096
+ # @return [::Google::Protobuf::Empty]
1097
+ #
1098
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1099
+ #
1100
+ # @example Basic example
1101
+ # require "google/cloud/kms/v1"
1102
+ #
1103
+ # # Create a client object. The client can be reused for multiple calls.
1104
+ # client = Google::Cloud::Kms::V1::HsmManagement::Rest::Client.new
1105
+ #
1106
+ # # Create a request. To set request fields, pass in keyword arguments.
1107
+ # request = Google::Cloud::Kms::V1::DeleteSingleTenantHsmInstanceProposalRequest.new
1108
+ #
1109
+ # # Call the delete_single_tenant_hsm_instance_proposal method.
1110
+ # result = client.delete_single_tenant_hsm_instance_proposal request
1111
+ #
1112
+ # # The returned object is of type Google::Protobuf::Empty.
1113
+ # p result
1114
+ #
1115
+ def delete_single_tenant_hsm_instance_proposal request, options = nil
1116
+ raise ::ArgumentError, "request must be provided" if request.nil?
1117
+
1118
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Kms::V1::DeleteSingleTenantHsmInstanceProposalRequest
1119
+
1120
+ # Converts hash and nil to an options object
1121
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1122
+
1123
+ # Customize the options with defaults
1124
+ call_metadata = @config.rpcs.delete_single_tenant_hsm_instance_proposal.metadata.to_h
1125
+
1126
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1127
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1128
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1129
+ gapic_version: ::Google::Cloud::Kms::V1::VERSION,
1130
+ transports_version_send: [:rest]
1131
+
1132
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1133
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1134
+
1135
+ options.apply_defaults timeout: @config.rpcs.delete_single_tenant_hsm_instance_proposal.timeout,
1136
+ metadata: call_metadata,
1137
+ retry_policy: @config.rpcs.delete_single_tenant_hsm_instance_proposal.retry_policy
1138
+
1139
+ options.apply_defaults timeout: @config.timeout,
1140
+ metadata: @config.metadata,
1141
+ retry_policy: @config.retry_policy
1142
+
1143
+ @hsm_management_stub.delete_single_tenant_hsm_instance_proposal request, options do |result, operation|
1144
+ yield result, operation if block_given?
1145
+ end
1146
+ rescue ::Gapic::Rest::Error => e
1147
+ raise ::Google::Cloud::Error.from_error(e)
1148
+ end
1149
+
1150
+ ##
1151
+ # Configuration class for the HsmManagement REST API.
1152
+ #
1153
+ # This class represents the configuration for HsmManagement REST,
1154
+ # providing control over timeouts, retry behavior, logging, transport
1155
+ # parameters, and other low-level controls. Certain parameters can also be
1156
+ # applied individually to specific RPCs. See
1157
+ # {::Google::Cloud::Kms::V1::HsmManagement::Rest::Client::Configuration::Rpcs}
1158
+ # for a list of RPCs that can be configured independently.
1159
+ #
1160
+ # Configuration can be applied globally to all clients, or to a single client
1161
+ # on construction.
1162
+ #
1163
+ # @example
1164
+ #
1165
+ # # Modify the global config, setting the timeout for
1166
+ # # list_single_tenant_hsm_instances to 20 seconds,
1167
+ # # and all remaining timeouts to 10 seconds.
1168
+ # ::Google::Cloud::Kms::V1::HsmManagement::Rest::Client.configure do |config|
1169
+ # config.timeout = 10.0
1170
+ # config.rpcs.list_single_tenant_hsm_instances.timeout = 20.0
1171
+ # end
1172
+ #
1173
+ # # Apply the above configuration only to a new client.
1174
+ # client = ::Google::Cloud::Kms::V1::HsmManagement::Rest::Client.new do |config|
1175
+ # config.timeout = 10.0
1176
+ # config.rpcs.list_single_tenant_hsm_instances.timeout = 20.0
1177
+ # end
1178
+ #
1179
+ # @!attribute [rw] endpoint
1180
+ # A custom service endpoint, as a hostname or hostname:port. The default is
1181
+ # nil, indicating to use the default endpoint in the current universe domain.
1182
+ # @return [::String,nil]
1183
+ # @!attribute [rw] credentials
1184
+ # Credentials to send with calls. You may provide any of the following types:
1185
+ # * (`String`) The path to a service account key file in JSON format
1186
+ # * (`Hash`) A service account key as a Hash
1187
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1188
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1189
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1190
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1191
+ # * (`nil`) indicating no credentials
1192
+ #
1193
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
1194
+ # external source for authentication to Google Cloud, you must validate it before
1195
+ # providing it to a Google API client library. Providing an unvalidated credential
1196
+ # configuration to Google APIs can compromise the security of your systems and data.
1197
+ # For more information, refer to [Validate credential configurations from external
1198
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
1199
+ # @return [::Object]
1200
+ # @!attribute [rw] scope
1201
+ # The OAuth scopes
1202
+ # @return [::Array<::String>]
1203
+ # @!attribute [rw] lib_name
1204
+ # The library name as recorded in instrumentation and logging
1205
+ # @return [::String]
1206
+ # @!attribute [rw] lib_version
1207
+ # The library version as recorded in instrumentation and logging
1208
+ # @return [::String]
1209
+ # @!attribute [rw] timeout
1210
+ # The call timeout in seconds.
1211
+ # @return [::Numeric]
1212
+ # @!attribute [rw] metadata
1213
+ # Additional headers to be sent with the call.
1214
+ # @return [::Hash{::Symbol=>::String}]
1215
+ # @!attribute [rw] retry_policy
1216
+ # The retry policy. The value is a hash with the following keys:
1217
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1218
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1219
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1220
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1221
+ # trigger a retry.
1222
+ # @return [::Hash]
1223
+ # @!attribute [rw] quota_project
1224
+ # A separate project against which to charge quota.
1225
+ # @return [::String]
1226
+ # @!attribute [rw] universe_domain
1227
+ # The universe domain within which to make requests. This determines the
1228
+ # default endpoint URL. The default value of nil uses the environment
1229
+ # universe (usually the default "googleapis.com" universe).
1230
+ # @return [::String,nil]
1231
+ # @!attribute [rw] logger
1232
+ # A custom logger to use for request/response debug logging, or the value
1233
+ # `:default` (the default) to construct a default logger, or `nil` to
1234
+ # explicitly disable logging.
1235
+ # @return [::Logger,:default,nil]
1236
+ #
1237
+ class Configuration
1238
+ extend ::Gapic::Config
1239
+
1240
+ # @private
1241
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1242
+ DEFAULT_ENDPOINT = "cloudkms.googleapis.com"
1243
+
1244
+ config_attr :endpoint, nil, ::String, nil
1245
+ config_attr :credentials, nil do |value|
1246
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
1247
+ allowed.any? { |klass| klass === value }
1248
+ end
1249
+ config_attr :scope, nil, ::String, ::Array, nil
1250
+ config_attr :lib_name, nil, ::String, nil
1251
+ config_attr :lib_version, nil, ::String, nil
1252
+ config_attr :timeout, nil, ::Numeric, nil
1253
+ config_attr :metadata, nil, ::Hash, nil
1254
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1255
+ config_attr :quota_project, nil, ::String, nil
1256
+ config_attr :universe_domain, nil, ::String, nil
1257
+
1258
+ # @private
1259
+ # Overrides for http bindings for the RPCs of this service
1260
+ # are only used when this service is used as mixin, and only
1261
+ # by the host service.
1262
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
1263
+ config_attr :bindings_override, {}, ::Hash, nil
1264
+ config_attr :logger, :default, ::Logger, nil, :default
1265
+
1266
+ # @private
1267
+ def initialize parent_config = nil
1268
+ @parent_config = parent_config unless parent_config.nil?
1269
+
1270
+ yield self if block_given?
1271
+ end
1272
+
1273
+ ##
1274
+ # Configurations for individual RPCs
1275
+ # @return [Rpcs]
1276
+ #
1277
+ def rpcs
1278
+ @rpcs ||= begin
1279
+ parent_rpcs = nil
1280
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1281
+ Rpcs.new parent_rpcs
1282
+ end
1283
+ end
1284
+
1285
+ ##
1286
+ # Configuration RPC class for the HsmManagement API.
1287
+ #
1288
+ # Includes fields providing the configuration for each RPC in this service.
1289
+ # Each configuration object is of type `Gapic::Config::Method` and includes
1290
+ # the following configuration fields:
1291
+ #
1292
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1293
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
1294
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1295
+ # include the following keys:
1296
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1297
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1298
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1299
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1300
+ # trigger a retry.
1301
+ #
1302
+ class Rpcs
1303
+ ##
1304
+ # RPC-specific configuration for `list_single_tenant_hsm_instances`
1305
+ # @return [::Gapic::Config::Method]
1306
+ #
1307
+ attr_reader :list_single_tenant_hsm_instances
1308
+ ##
1309
+ # RPC-specific configuration for `get_single_tenant_hsm_instance`
1310
+ # @return [::Gapic::Config::Method]
1311
+ #
1312
+ attr_reader :get_single_tenant_hsm_instance
1313
+ ##
1314
+ # RPC-specific configuration for `create_single_tenant_hsm_instance`
1315
+ # @return [::Gapic::Config::Method]
1316
+ #
1317
+ attr_reader :create_single_tenant_hsm_instance
1318
+ ##
1319
+ # RPC-specific configuration for `create_single_tenant_hsm_instance_proposal`
1320
+ # @return [::Gapic::Config::Method]
1321
+ #
1322
+ attr_reader :create_single_tenant_hsm_instance_proposal
1323
+ ##
1324
+ # RPC-specific configuration for `approve_single_tenant_hsm_instance_proposal`
1325
+ # @return [::Gapic::Config::Method]
1326
+ #
1327
+ attr_reader :approve_single_tenant_hsm_instance_proposal
1328
+ ##
1329
+ # RPC-specific configuration for `execute_single_tenant_hsm_instance_proposal`
1330
+ # @return [::Gapic::Config::Method]
1331
+ #
1332
+ attr_reader :execute_single_tenant_hsm_instance_proposal
1333
+ ##
1334
+ # RPC-specific configuration for `get_single_tenant_hsm_instance_proposal`
1335
+ # @return [::Gapic::Config::Method]
1336
+ #
1337
+ attr_reader :get_single_tenant_hsm_instance_proposal
1338
+ ##
1339
+ # RPC-specific configuration for `list_single_tenant_hsm_instance_proposals`
1340
+ # @return [::Gapic::Config::Method]
1341
+ #
1342
+ attr_reader :list_single_tenant_hsm_instance_proposals
1343
+ ##
1344
+ # RPC-specific configuration for `delete_single_tenant_hsm_instance_proposal`
1345
+ # @return [::Gapic::Config::Method]
1346
+ #
1347
+ attr_reader :delete_single_tenant_hsm_instance_proposal
1348
+
1349
+ # @private
1350
+ def initialize parent_rpcs = nil
1351
+ list_single_tenant_hsm_instances_config = parent_rpcs.list_single_tenant_hsm_instances if parent_rpcs.respond_to? :list_single_tenant_hsm_instances
1352
+ @list_single_tenant_hsm_instances = ::Gapic::Config::Method.new list_single_tenant_hsm_instances_config
1353
+ get_single_tenant_hsm_instance_config = parent_rpcs.get_single_tenant_hsm_instance if parent_rpcs.respond_to? :get_single_tenant_hsm_instance
1354
+ @get_single_tenant_hsm_instance = ::Gapic::Config::Method.new get_single_tenant_hsm_instance_config
1355
+ create_single_tenant_hsm_instance_config = parent_rpcs.create_single_tenant_hsm_instance if parent_rpcs.respond_to? :create_single_tenant_hsm_instance
1356
+ @create_single_tenant_hsm_instance = ::Gapic::Config::Method.new create_single_tenant_hsm_instance_config
1357
+ create_single_tenant_hsm_instance_proposal_config = parent_rpcs.create_single_tenant_hsm_instance_proposal if parent_rpcs.respond_to? :create_single_tenant_hsm_instance_proposal
1358
+ @create_single_tenant_hsm_instance_proposal = ::Gapic::Config::Method.new create_single_tenant_hsm_instance_proposal_config
1359
+ approve_single_tenant_hsm_instance_proposal_config = parent_rpcs.approve_single_tenant_hsm_instance_proposal if parent_rpcs.respond_to? :approve_single_tenant_hsm_instance_proposal
1360
+ @approve_single_tenant_hsm_instance_proposal = ::Gapic::Config::Method.new approve_single_tenant_hsm_instance_proposal_config
1361
+ execute_single_tenant_hsm_instance_proposal_config = parent_rpcs.execute_single_tenant_hsm_instance_proposal if parent_rpcs.respond_to? :execute_single_tenant_hsm_instance_proposal
1362
+ @execute_single_tenant_hsm_instance_proposal = ::Gapic::Config::Method.new execute_single_tenant_hsm_instance_proposal_config
1363
+ get_single_tenant_hsm_instance_proposal_config = parent_rpcs.get_single_tenant_hsm_instance_proposal if parent_rpcs.respond_to? :get_single_tenant_hsm_instance_proposal
1364
+ @get_single_tenant_hsm_instance_proposal = ::Gapic::Config::Method.new get_single_tenant_hsm_instance_proposal_config
1365
+ list_single_tenant_hsm_instance_proposals_config = parent_rpcs.list_single_tenant_hsm_instance_proposals if parent_rpcs.respond_to? :list_single_tenant_hsm_instance_proposals
1366
+ @list_single_tenant_hsm_instance_proposals = ::Gapic::Config::Method.new list_single_tenant_hsm_instance_proposals_config
1367
+ delete_single_tenant_hsm_instance_proposal_config = parent_rpcs.delete_single_tenant_hsm_instance_proposal if parent_rpcs.respond_to? :delete_single_tenant_hsm_instance_proposal
1368
+ @delete_single_tenant_hsm_instance_proposal = ::Gapic::Config::Method.new delete_single_tenant_hsm_instance_proposal_config
1369
+
1370
+ yield self if block_given?
1371
+ end
1372
+ end
1373
+ end
1374
+ end
1375
+ end
1376
+ end
1377
+ end
1378
+ end
1379
+ end
1380
+ end