google-cloud-security-private_ca-v1 0.5.0 → 0.7.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,2892 @@
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/security/privateca/v1/service_pb"
21
+ require "google/cloud/security/private_ca/v1/certificate_authority_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 Security
28
+ module PrivateCA
29
+ module V1
30
+ module CertificateAuthorityService
31
+ module Rest
32
+ ##
33
+ # REST client for the CertificateAuthorityService service.
34
+ #
35
+ # [Certificate Authority
36
+ # Service][google.cloud.security.privateca.v1.CertificateAuthorityService]
37
+ # manages private certificate authorities and issued certificates.
38
+ #
39
+ class Client
40
+ include Paths
41
+
42
+ # @private
43
+ attr_reader :certificate_authority_service_stub
44
+
45
+ ##
46
+ # Configure the CertificateAuthorityService Client class.
47
+ #
48
+ # See {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client::Configuration}
49
+ # for a description of the configuration fields.
50
+ #
51
+ # @example
52
+ #
53
+ # # Modify the configuration for all CertificateAuthorityService clients
54
+ # ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.configure do |config|
55
+ # config.timeout = 10.0
56
+ # end
57
+ #
58
+ # @yield [config] Configure the Client client.
59
+ # @yieldparam config [Client::Configuration]
60
+ #
61
+ # @return [Client::Configuration]
62
+ #
63
+ def self.configure
64
+ @configure ||= begin
65
+ namespace = ["Google", "Cloud", "Security", "PrivateCA", "V1"]
66
+ parent_config = while namespace.any?
67
+ parent_name = namespace.join "::"
68
+ parent_const = const_get parent_name
69
+ break parent_const.configure if parent_const.respond_to? :configure
70
+ namespace.pop
71
+ end
72
+ default_config = Client::Configuration.new parent_config
73
+
74
+ default_config.timeout = 60.0
75
+ default_config.retry_policy = {
76
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [2, 14, 4]
77
+ }
78
+
79
+ default_config
80
+ end
81
+ yield @configure if block_given?
82
+ @configure
83
+ end
84
+
85
+ ##
86
+ # Configure the CertificateAuthorityService Client instance.
87
+ #
88
+ # The configuration is set to the derived mode, meaning that values can be changed,
89
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
90
+ # should be made on {Client.configure}.
91
+ #
92
+ # See {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client::Configuration}
93
+ # for a description of the configuration fields.
94
+ #
95
+ # @yield [config] Configure the Client client.
96
+ # @yieldparam config [Client::Configuration]
97
+ #
98
+ # @return [Client::Configuration]
99
+ #
100
+ def configure
101
+ yield @config if block_given?
102
+ @config
103
+ end
104
+
105
+ ##
106
+ # Create a new CertificateAuthorityService REST client object.
107
+ #
108
+ # @example
109
+ #
110
+ # # Create a client using the default configuration
111
+ # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new
112
+ #
113
+ # # Create a client using a custom configuration
114
+ # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config|
115
+ # config.timeout = 10.0
116
+ # end
117
+ #
118
+ # @yield [config] Configure the CertificateAuthorityService client.
119
+ # @yieldparam config [Client::Configuration]
120
+ #
121
+ def initialize
122
+ # Create the configuration object
123
+ @config = Configuration.new Client.configure
124
+
125
+ # Yield the configuration if needed
126
+ yield @config if block_given?
127
+
128
+ # Create credentials
129
+ credentials = @config.credentials
130
+ # Use self-signed JWT if the endpoint is unchanged from default,
131
+ # but only if the default endpoint does not have a region prefix.
132
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
133
+ !@config.endpoint.split(".").first.include?("-")
134
+ credentials ||= Credentials.default scope: @config.scope,
135
+ enable_self_signed_jwt: enable_self_signed_jwt
136
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
137
+ credentials = Credentials.new credentials, scope: @config.scope
138
+ end
139
+
140
+ @quota_project_id = @config.quota_project
141
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
142
+
143
+ @operations_client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Operations.new do |config|
144
+ config.credentials = credentials
145
+ config.quota_project = @quota_project_id
146
+ config.endpoint = @config.endpoint
147
+ end
148
+
149
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
150
+ config.credentials = credentials
151
+ config.quota_project = @quota_project_id
152
+ config.endpoint = @config.endpoint
153
+ config.bindings_override = @config.bindings_override
154
+ end
155
+
156
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
157
+ config.credentials = credentials
158
+ config.quota_project = @quota_project_id
159
+ config.endpoint = @config.endpoint
160
+ config.bindings_override = @config.bindings_override
161
+ end
162
+
163
+ @certificate_authority_service_stub = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
164
+ end
165
+
166
+ ##
167
+ # Get the associated client for long-running operations.
168
+ #
169
+ # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Operations]
170
+ #
171
+ attr_reader :operations_client
172
+
173
+ ##
174
+ # Get the associated client for mix-in of the Locations.
175
+ #
176
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
177
+ #
178
+ attr_reader :location_client
179
+
180
+ ##
181
+ # Get the associated client for mix-in of the IAMPolicy.
182
+ #
183
+ # @return [Google::Iam::V1::IAMPolicy::Rest::Client]
184
+ #
185
+ attr_reader :iam_policy_client
186
+
187
+ # Service calls
188
+
189
+ ##
190
+ # Create a new {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}
191
+ # in a given Project, Location from a particular
192
+ # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}.
193
+ #
194
+ # @overload create_certificate(request, options = nil)
195
+ # Pass arguments to `create_certificate` via a request object, either of type
196
+ # {::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest} or an equivalent Hash.
197
+ #
198
+ # @param request [::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest, ::Hash]
199
+ # A request object representing the call parameters. Required. To specify no
200
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
201
+ # @param options [::Gapic::CallOptions, ::Hash]
202
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
203
+ #
204
+ # @overload create_certificate(parent: nil, certificate_id: nil, certificate: nil, request_id: nil, validate_only: nil, issuing_certificate_authority_id: nil)
205
+ # Pass arguments to `create_certificate` via keyword arguments. Note that at
206
+ # least one keyword argument is required. To specify no parameters, or to keep all
207
+ # the default parameter values, pass an empty Hash as a request object (see above).
208
+ #
209
+ # @param parent [::String]
210
+ # Required. The resource name of the
211
+ # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} associated with the
212
+ # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}, in the
213
+ # format `projects/*/locations/*/caPools/*`.
214
+ # @param certificate_id [::String]
215
+ # Optional. It must be unique within a location and match the regular
216
+ # expression `[a-zA-Z0-9_-]{1,63}`. This field is required when using a
217
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
218
+ # in the Enterprise [CertificateAuthority.Tier][], but is optional and its
219
+ # value is ignored otherwise.
220
+ # @param certificate [::Google::Cloud::Security::PrivateCA::V1::Certificate, ::Hash]
221
+ # Required. A {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}
222
+ # with initial field values.
223
+ # @param request_id [::String]
224
+ # Optional. An ID to identify requests. Specify a unique request ID so that
225
+ # if you must retry your request, the server will know to ignore the request
226
+ # if it has already been completed. The server will guarantee that for at
227
+ # least 60 minutes since the first request.
228
+ #
229
+ # For example, consider a situation where you make an initial request and the
230
+ # request times out. If you make the request again with the same request ID,
231
+ # the server can check if original operation with the same request ID was
232
+ # received, and if so, will ignore the second request. This prevents clients
233
+ # from accidentally creating duplicate commitments.
234
+ #
235
+ # The request ID must be a valid UUID with the exception that zero UUID is
236
+ # not supported (00000000-0000-0000-0000-000000000000).
237
+ # @param validate_only [::Boolean]
238
+ # Optional. If this is true, no
239
+ # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} resource will
240
+ # be persisted regardless of the
241
+ # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}'s
242
+ # {::Google::Cloud::Security::PrivateCA::V1::CaPool#tier tier}, and the returned
243
+ # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} will not
244
+ # contain the
245
+ # {::Google::Cloud::Security::PrivateCA::V1::Certificate#pem_certificate pem_certificate}
246
+ # field.
247
+ # @param issuing_certificate_authority_id [::String]
248
+ # Optional. The resource ID of the
249
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
250
+ # that should issue the certificate. This optional field will ignore the
251
+ # load-balancing scheme of the Pool and directly issue the certificate from
252
+ # the CA with the specified ID, contained in the same
253
+ # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} referenced by `parent`.
254
+ # Per-CA quota rules apply. If left empty, a
255
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
256
+ # will be chosen from the {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}
257
+ # by the service. For example, to issue a
258
+ # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} from a
259
+ # Certificate Authority with resource name
260
+ # "projects/my-project/locations/us-central1/caPools/my-pool/certificateAuthorities/my-ca",
261
+ # you can set the
262
+ # {::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest#parent parent}
263
+ # to "projects/my-project/locations/us-central1/caPools/my-pool" and the
264
+ # {::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest#issuing_certificate_authority_id issuing_certificate_authority_id}
265
+ # to "my-ca".
266
+ # @yield [result, operation] Access the result along with the TransportOperation object
267
+ # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::Certificate]
268
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
269
+ #
270
+ # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate]
271
+ #
272
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
273
+ def create_certificate request, options = nil
274
+ raise ::ArgumentError, "request must be provided" if request.nil?
275
+
276
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest
277
+
278
+ # Converts hash and nil to an options object
279
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
280
+
281
+ # Customize the options with defaults
282
+ call_metadata = @config.rpcs.create_certificate.metadata.to_h
283
+
284
+ # Set x-goog-api-client and x-goog-user-project headers
285
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
286
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
287
+ gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
288
+ transports_version_send: [:rest]
289
+
290
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
291
+
292
+ options.apply_defaults timeout: @config.rpcs.create_certificate.timeout,
293
+ metadata: call_metadata,
294
+ retry_policy: @config.rpcs.create_certificate.retry_policy
295
+
296
+ options.apply_defaults timeout: @config.timeout,
297
+ metadata: @config.metadata,
298
+ retry_policy: @config.retry_policy
299
+
300
+ @certificate_authority_service_stub.create_certificate request, options do |result, operation|
301
+ yield result, operation if block_given?
302
+ return result
303
+ end
304
+ rescue ::Gapic::Rest::Error => e
305
+ raise ::Google::Cloud::Error.from_error(e)
306
+ end
307
+
308
+ ##
309
+ # Returns a {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}.
310
+ #
311
+ # @overload get_certificate(request, options = nil)
312
+ # Pass arguments to `get_certificate` via a request object, either of type
313
+ # {::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest} or an equivalent Hash.
314
+ #
315
+ # @param request [::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest, ::Hash]
316
+ # A request object representing the call parameters. Required. To specify no
317
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
318
+ # @param options [::Gapic::CallOptions, ::Hash]
319
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
320
+ #
321
+ # @overload get_certificate(name: nil)
322
+ # Pass arguments to `get_certificate` via keyword arguments. Note that at
323
+ # least one keyword argument is required. To specify no parameters, or to keep all
324
+ # the default parameter values, pass an empty Hash as a request object (see above).
325
+ #
326
+ # @param name [::String]
327
+ # Required. The {::Google::Cloud::Security::PrivateCA::V1::Certificate#name name}
328
+ # of the {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} to
329
+ # get.
330
+ # @yield [result, operation] Access the result along with the TransportOperation object
331
+ # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::Certificate]
332
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
333
+ #
334
+ # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate]
335
+ #
336
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
337
+ def get_certificate request, options = nil
338
+ raise ::ArgumentError, "request must be provided" if request.nil?
339
+
340
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest
341
+
342
+ # Converts hash and nil to an options object
343
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
344
+
345
+ # Customize the options with defaults
346
+ call_metadata = @config.rpcs.get_certificate.metadata.to_h
347
+
348
+ # Set x-goog-api-client and x-goog-user-project headers
349
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
350
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
351
+ gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
352
+ transports_version_send: [:rest]
353
+
354
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
355
+
356
+ options.apply_defaults timeout: @config.rpcs.get_certificate.timeout,
357
+ metadata: call_metadata,
358
+ retry_policy: @config.rpcs.get_certificate.retry_policy
359
+
360
+ options.apply_defaults timeout: @config.timeout,
361
+ metadata: @config.metadata,
362
+ retry_policy: @config.retry_policy
363
+
364
+ @certificate_authority_service_stub.get_certificate request, options do |result, operation|
365
+ yield result, operation if block_given?
366
+ return result
367
+ end
368
+ rescue ::Gapic::Rest::Error => e
369
+ raise ::Google::Cloud::Error.from_error(e)
370
+ end
371
+
372
+ ##
373
+ # Lists {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}.
374
+ #
375
+ # @overload list_certificates(request, options = nil)
376
+ # Pass arguments to `list_certificates` via a request object, either of type
377
+ # {::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest} or an equivalent Hash.
378
+ #
379
+ # @param request [::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest, ::Hash]
380
+ # A request object representing the call parameters. Required. To specify no
381
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
382
+ # @param options [::Gapic::CallOptions, ::Hash]
383
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
384
+ #
385
+ # @overload list_certificates(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
386
+ # Pass arguments to `list_certificates` via keyword arguments. Note that at
387
+ # least one keyword argument is required. To specify no parameters, or to keep all
388
+ # the default parameter values, pass an empty Hash as a request object (see above).
389
+ #
390
+ # @param parent [::String]
391
+ # Required. The resource name of the location associated with the
392
+ # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}, in the
393
+ # format `projects/*/locations/*/caPools/*`.
394
+ # @param page_size [::Integer]
395
+ # Optional. Limit on the number of
396
+ # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} to include
397
+ # in the response. Further
398
+ # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} can
399
+ # subsequently be obtained by including the
400
+ # {::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse#next_page_token ListCertificatesResponse.next_page_token}
401
+ # in a subsequent request. If unspecified, the server will pick an
402
+ # appropriate default.
403
+ # @param page_token [::String]
404
+ # Optional. Pagination token, returned earlier via
405
+ # {::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse#next_page_token ListCertificatesResponse.next_page_token}.
406
+ # @param filter [::String]
407
+ # Optional. Only include resources that match the filter in the response. For
408
+ # details on supported filters and syntax, see [Certificates Filtering
409
+ # documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support).
410
+ # @param order_by [::String]
411
+ # Optional. Specify how the results should be sorted. For details on
412
+ # supported fields and syntax, see [Certificates Sorting
413
+ # documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support).
414
+ # @yield [result, operation] Access the result along with the TransportOperation object
415
+ # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse]
416
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
417
+ #
418
+ # @return [::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse]
419
+ #
420
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
421
+ def list_certificates request, options = nil
422
+ raise ::ArgumentError, "request must be provided" if request.nil?
423
+
424
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest
425
+
426
+ # Converts hash and nil to an options object
427
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
428
+
429
+ # Customize the options with defaults
430
+ call_metadata = @config.rpcs.list_certificates.metadata.to_h
431
+
432
+ # Set x-goog-api-client and x-goog-user-project headers
433
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
434
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
435
+ gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
436
+ transports_version_send: [:rest]
437
+
438
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
439
+
440
+ options.apply_defaults timeout: @config.rpcs.list_certificates.timeout,
441
+ metadata: call_metadata,
442
+ retry_policy: @config.rpcs.list_certificates.retry_policy
443
+
444
+ options.apply_defaults timeout: @config.timeout,
445
+ metadata: @config.metadata,
446
+ retry_policy: @config.retry_policy
447
+
448
+ @certificate_authority_service_stub.list_certificates request, options do |result, operation|
449
+ yield result, operation if block_given?
450
+ return result
451
+ end
452
+ rescue ::Gapic::Rest::Error => e
453
+ raise ::Google::Cloud::Error.from_error(e)
454
+ end
455
+
456
+ ##
457
+ # Revoke a {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}.
458
+ #
459
+ # @overload revoke_certificate(request, options = nil)
460
+ # Pass arguments to `revoke_certificate` via a request object, either of type
461
+ # {::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest} or an equivalent Hash.
462
+ #
463
+ # @param request [::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest, ::Hash]
464
+ # A request object representing the call parameters. Required. To specify no
465
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
466
+ # @param options [::Gapic::CallOptions, ::Hash]
467
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
468
+ #
469
+ # @overload revoke_certificate(name: nil, reason: nil, request_id: nil)
470
+ # Pass arguments to `revoke_certificate` via keyword arguments. Note that at
471
+ # least one keyword argument is required. To specify no parameters, or to keep all
472
+ # the default parameter values, pass an empty Hash as a request object (see above).
473
+ #
474
+ # @param name [::String]
475
+ # Required. The resource name for this
476
+ # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} in the format
477
+ # `projects/*/locations/*/caPools/*/certificates/*`.
478
+ # @param reason [::Google::Cloud::Security::PrivateCA::V1::RevocationReason]
479
+ # Required. The
480
+ # {::Google::Cloud::Security::PrivateCA::V1::RevocationReason RevocationReason} for
481
+ # revoking this certificate.
482
+ # @param request_id [::String]
483
+ # Optional. An ID to identify requests. Specify a unique request ID so that
484
+ # if you must retry your request, the server will know to ignore the request
485
+ # if it has already been completed. The server will guarantee that for at
486
+ # least 60 minutes since the first request.
487
+ #
488
+ # For example, consider a situation where you make an initial request and
489
+ # the request times out. If you make the request again with the same request
490
+ # ID, the server can check if original operation with the same request ID
491
+ # was received, and if so, will ignore the second request. This prevents
492
+ # clients from accidentally creating duplicate commitments.
493
+ #
494
+ # The request ID must be a valid UUID with the exception that zero UUID is
495
+ # not supported (00000000-0000-0000-0000-000000000000).
496
+ # @yield [result, operation] Access the result along with the TransportOperation object
497
+ # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::Certificate]
498
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
499
+ #
500
+ # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate]
501
+ #
502
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
503
+ def revoke_certificate request, options = nil
504
+ raise ::ArgumentError, "request must be provided" if request.nil?
505
+
506
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest
507
+
508
+ # Converts hash and nil to an options object
509
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
510
+
511
+ # Customize the options with defaults
512
+ call_metadata = @config.rpcs.revoke_certificate.metadata.to_h
513
+
514
+ # Set x-goog-api-client and x-goog-user-project headers
515
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
516
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
517
+ gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
518
+ transports_version_send: [:rest]
519
+
520
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
521
+
522
+ options.apply_defaults timeout: @config.rpcs.revoke_certificate.timeout,
523
+ metadata: call_metadata,
524
+ retry_policy: @config.rpcs.revoke_certificate.retry_policy
525
+
526
+ options.apply_defaults timeout: @config.timeout,
527
+ metadata: @config.metadata,
528
+ retry_policy: @config.retry_policy
529
+
530
+ @certificate_authority_service_stub.revoke_certificate request, options do |result, operation|
531
+ yield result, operation if block_given?
532
+ return result
533
+ end
534
+ rescue ::Gapic::Rest::Error => e
535
+ raise ::Google::Cloud::Error.from_error(e)
536
+ end
537
+
538
+ ##
539
+ # Update a {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}.
540
+ # Currently, the only field you can update is the
541
+ # {::Google::Cloud::Security::PrivateCA::V1::Certificate#labels labels} field.
542
+ #
543
+ # @overload update_certificate(request, options = nil)
544
+ # Pass arguments to `update_certificate` via a request object, either of type
545
+ # {::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest} or an equivalent Hash.
546
+ #
547
+ # @param request [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest, ::Hash]
548
+ # A request object representing the call parameters. Required. To specify no
549
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
550
+ # @param options [::Gapic::CallOptions, ::Hash]
551
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
552
+ #
553
+ # @overload update_certificate(certificate: nil, update_mask: nil, request_id: nil)
554
+ # Pass arguments to `update_certificate` via keyword arguments. Note that at
555
+ # least one keyword argument is required. To specify no parameters, or to keep all
556
+ # the default parameter values, pass an empty Hash as a request object (see above).
557
+ #
558
+ # @param certificate [::Google::Cloud::Security::PrivateCA::V1::Certificate, ::Hash]
559
+ # Required. {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}
560
+ # with updated values.
561
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
562
+ # Required. A list of fields to be updated in this request.
563
+ # @param request_id [::String]
564
+ # Optional. An ID to identify requests. Specify a unique request ID so that
565
+ # if you must retry your request, the server will know to ignore the request
566
+ # if it has already been completed. The server will guarantee that for at
567
+ # least 60 minutes since the first request.
568
+ #
569
+ # For example, consider a situation where you make an initial request and
570
+ # the request times out. If you make the request again with the same request
571
+ # ID, the server can check if original operation with the same request ID
572
+ # was received, and if so, will ignore the second request. This prevents
573
+ # clients from accidentally creating duplicate commitments.
574
+ #
575
+ # The request ID must be a valid UUID with the exception that zero UUID is
576
+ # not supported (00000000-0000-0000-0000-000000000000).
577
+ # @yield [result, operation] Access the result along with the TransportOperation object
578
+ # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::Certificate]
579
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
580
+ #
581
+ # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate]
582
+ #
583
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
584
+ def update_certificate request, options = nil
585
+ raise ::ArgumentError, "request must be provided" if request.nil?
586
+
587
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest
588
+
589
+ # Converts hash and nil to an options object
590
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
591
+
592
+ # Customize the options with defaults
593
+ call_metadata = @config.rpcs.update_certificate.metadata.to_h
594
+
595
+ # Set x-goog-api-client and x-goog-user-project headers
596
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
597
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
598
+ gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
599
+ transports_version_send: [:rest]
600
+
601
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
602
+
603
+ options.apply_defaults timeout: @config.rpcs.update_certificate.timeout,
604
+ metadata: call_metadata,
605
+ retry_policy: @config.rpcs.update_certificate.retry_policy
606
+
607
+ options.apply_defaults timeout: @config.timeout,
608
+ metadata: @config.metadata,
609
+ retry_policy: @config.retry_policy
610
+
611
+ @certificate_authority_service_stub.update_certificate request, options do |result, operation|
612
+ yield result, operation if block_given?
613
+ return result
614
+ end
615
+ rescue ::Gapic::Rest::Error => e
616
+ raise ::Google::Cloud::Error.from_error(e)
617
+ end
618
+
619
+ ##
620
+ # Activate a
621
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
622
+ # that is in state
623
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::State::AWAITING_USER_ACTIVATION AWAITING_USER_ACTIVATION}
624
+ # and is of type
625
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::Type::SUBORDINATE SUBORDINATE}.
626
+ # After the parent Certificate Authority signs a certificate signing request
627
+ # from
628
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client#fetch_certificate_authority_csr FetchCertificateAuthorityCsr},
629
+ # this method can complete the activation process.
630
+ #
631
+ # @overload activate_certificate_authority(request, options = nil)
632
+ # Pass arguments to `activate_certificate_authority` via a request object, either of type
633
+ # {::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest} or an equivalent Hash.
634
+ #
635
+ # @param request [::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest, ::Hash]
636
+ # A request object representing the call parameters. Required. To specify no
637
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
638
+ # @param options [::Gapic::CallOptions, ::Hash]
639
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
640
+ #
641
+ # @overload activate_certificate_authority(name: nil, pem_ca_certificate: nil, subordinate_config: nil, request_id: nil)
642
+ # Pass arguments to `activate_certificate_authority` via keyword arguments. Note that at
643
+ # least one keyword argument is required. To specify no parameters, or to keep all
644
+ # the default parameter values, pass an empty Hash as a request object (see above).
645
+ #
646
+ # @param name [::String]
647
+ # Required. The resource name for this
648
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
649
+ # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
650
+ # @param pem_ca_certificate [::String]
651
+ # Required. The signed CA certificate issued from
652
+ # {::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse#pem_csr FetchCertificateAuthorityCsrResponse.pem_csr}.
653
+ # @param subordinate_config [::Google::Cloud::Security::PrivateCA::V1::SubordinateConfig, ::Hash]
654
+ # Required. Must include information about the issuer of
655
+ # 'pem_ca_certificate', and any further issuers until the self-signed CA.
656
+ # @param request_id [::String]
657
+ # Optional. An ID to identify requests. Specify a unique request ID so that
658
+ # if you must retry your request, the server will know to ignore the request
659
+ # if it has already been completed. The server will guarantee that for at
660
+ # least 60 minutes since the first request.
661
+ #
662
+ # For example, consider a situation where you make an initial request and
663
+ # the request times out. If you make the request again with the same request
664
+ # ID, the server can check if original operation with the same request ID
665
+ # was received, and if so, will ignore the second request. This prevents
666
+ # clients from accidentally creating duplicate commitments.
667
+ #
668
+ # The request ID must be a valid UUID with the exception that zero UUID is
669
+ # not supported (00000000-0000-0000-0000-000000000000).
670
+ # @yield [result, operation] Access the result along with the TransportOperation object
671
+ # @yieldparam result [::Gapic::Operation]
672
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
673
+ #
674
+ # @return [::Gapic::Operation]
675
+ #
676
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
677
+ def activate_certificate_authority request, options = nil
678
+ raise ::ArgumentError, "request must be provided" if request.nil?
679
+
680
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest
681
+
682
+ # Converts hash and nil to an options object
683
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
684
+
685
+ # Customize the options with defaults
686
+ call_metadata = @config.rpcs.activate_certificate_authority.metadata.to_h
687
+
688
+ # Set x-goog-api-client and x-goog-user-project headers
689
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
690
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
691
+ gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
692
+ transports_version_send: [:rest]
693
+
694
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
695
+
696
+ options.apply_defaults timeout: @config.rpcs.activate_certificate_authority.timeout,
697
+ metadata: call_metadata,
698
+ retry_policy: @config.rpcs.activate_certificate_authority.retry_policy
699
+
700
+ options.apply_defaults timeout: @config.timeout,
701
+ metadata: @config.metadata,
702
+ retry_policy: @config.retry_policy
703
+
704
+ @certificate_authority_service_stub.activate_certificate_authority request, options do |result, operation|
705
+ result = ::Gapic::Operation.new result, @operations_client, options: options
706
+ yield result, operation if block_given?
707
+ return result
708
+ end
709
+ rescue ::Gapic::Rest::Error => e
710
+ raise ::Google::Cloud::Error.from_error(e)
711
+ end
712
+
713
+ ##
714
+ # Create a new
715
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
716
+ # in a given Project and Location.
717
+ #
718
+ # @overload create_certificate_authority(request, options = nil)
719
+ # Pass arguments to `create_certificate_authority` via a request object, either of type
720
+ # {::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest} or an equivalent Hash.
721
+ #
722
+ # @param request [::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest, ::Hash]
723
+ # A request object representing the call parameters. Required. To specify no
724
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
725
+ # @param options [::Gapic::CallOptions, ::Hash]
726
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
727
+ #
728
+ # @overload create_certificate_authority(parent: nil, certificate_authority_id: nil, certificate_authority: nil, request_id: nil)
729
+ # Pass arguments to `create_certificate_authority` via keyword arguments. Note that at
730
+ # least one keyword argument is required. To specify no parameters, or to keep all
731
+ # the default parameter values, pass an empty Hash as a request object (see above).
732
+ #
733
+ # @param parent [::String]
734
+ # Required. The resource name of the
735
+ # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} associated with the
736
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities},
737
+ # in the format `projects/*/locations/*/caPools/*`.
738
+ # @param certificate_authority_id [::String]
739
+ # Required. It must be unique within a location and match the regular
740
+ # expression `[a-zA-Z0-9_-]{1,63}`
741
+ # @param certificate_authority [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority, ::Hash]
742
+ # Required. A
743
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
744
+ # with initial field values.
745
+ # @param request_id [::String]
746
+ # Optional. An ID to identify requests. Specify a unique request ID so that
747
+ # if you must retry your request, the server will know to ignore the request
748
+ # if it has already been completed. The server will guarantee that for at
749
+ # least 60 minutes since the first request.
750
+ #
751
+ # For example, consider a situation where you make an initial request and
752
+ # the request times out. If you make the request again with the same request
753
+ # ID, the server can check if original operation with the same request ID
754
+ # was received, and if so, will ignore the second request. This prevents
755
+ # clients from accidentally creating duplicate commitments.
756
+ #
757
+ # The request ID must be a valid UUID with the exception that zero UUID is
758
+ # not supported (00000000-0000-0000-0000-000000000000).
759
+ # @yield [result, operation] Access the result along with the TransportOperation object
760
+ # @yieldparam result [::Gapic::Operation]
761
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
762
+ #
763
+ # @return [::Gapic::Operation]
764
+ #
765
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
766
+ def create_certificate_authority request, options = nil
767
+ raise ::ArgumentError, "request must be provided" if request.nil?
768
+
769
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest
770
+
771
+ # Converts hash and nil to an options object
772
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
773
+
774
+ # Customize the options with defaults
775
+ call_metadata = @config.rpcs.create_certificate_authority.metadata.to_h
776
+
777
+ # Set x-goog-api-client and x-goog-user-project headers
778
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
779
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
780
+ gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
781
+ transports_version_send: [:rest]
782
+
783
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
784
+
785
+ options.apply_defaults timeout: @config.rpcs.create_certificate_authority.timeout,
786
+ metadata: call_metadata,
787
+ retry_policy: @config.rpcs.create_certificate_authority.retry_policy
788
+
789
+ options.apply_defaults timeout: @config.timeout,
790
+ metadata: @config.metadata,
791
+ retry_policy: @config.retry_policy
792
+
793
+ @certificate_authority_service_stub.create_certificate_authority request, options do |result, operation|
794
+ result = ::Gapic::Operation.new result, @operations_client, options: options
795
+ yield result, operation if block_given?
796
+ return result
797
+ end
798
+ rescue ::Gapic::Rest::Error => e
799
+ raise ::Google::Cloud::Error.from_error(e)
800
+ end
801
+
802
+ ##
803
+ # Disable a
804
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}.
805
+ #
806
+ # @overload disable_certificate_authority(request, options = nil)
807
+ # Pass arguments to `disable_certificate_authority` via a request object, either of type
808
+ # {::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest} or an equivalent Hash.
809
+ #
810
+ # @param request [::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest, ::Hash]
811
+ # A request object representing the call parameters. Required. To specify no
812
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
813
+ # @param options [::Gapic::CallOptions, ::Hash]
814
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
815
+ #
816
+ # @overload disable_certificate_authority(name: nil, request_id: nil, ignore_dependent_resources: nil)
817
+ # Pass arguments to `disable_certificate_authority` via keyword arguments. Note that at
818
+ # least one keyword argument is required. To specify no parameters, or to keep all
819
+ # the default parameter values, pass an empty Hash as a request object (see above).
820
+ #
821
+ # @param name [::String]
822
+ # Required. The resource name for this
823
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
824
+ # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
825
+ # @param request_id [::String]
826
+ # Optional. An ID to identify requests. Specify a unique request ID so that
827
+ # if you must retry your request, the server will know to ignore the request
828
+ # if it has already been completed. The server will guarantee that for at
829
+ # least 60 minutes since the first request.
830
+ #
831
+ # For example, consider a situation where you make an initial request and
832
+ # the request times out. If you make the request again with the same request
833
+ # ID, the server can check if original operation with the same request ID
834
+ # was received, and if so, will ignore the second request. This prevents
835
+ # clients from accidentally creating duplicate commitments.
836
+ #
837
+ # The request ID must be a valid UUID with the exception that zero UUID is
838
+ # not supported (00000000-0000-0000-0000-000000000000).
839
+ # @param ignore_dependent_resources [::Boolean]
840
+ # Optional. This field allows this CA to be disabled even if it's being
841
+ # depended on by another resource. However, doing so may result in unintended
842
+ # and unrecoverable effects on any dependent resource(s) since the CA will
843
+ # no longer be able to issue certificates.
844
+ # @yield [result, operation] Access the result along with the TransportOperation object
845
+ # @yieldparam result [::Gapic::Operation]
846
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
847
+ #
848
+ # @return [::Gapic::Operation]
849
+ #
850
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
851
+ def disable_certificate_authority request, options = nil
852
+ raise ::ArgumentError, "request must be provided" if request.nil?
853
+
854
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest
855
+
856
+ # Converts hash and nil to an options object
857
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
858
+
859
+ # Customize the options with defaults
860
+ call_metadata = @config.rpcs.disable_certificate_authority.metadata.to_h
861
+
862
+ # Set x-goog-api-client and x-goog-user-project headers
863
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
864
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
865
+ gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
866
+ transports_version_send: [:rest]
867
+
868
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
869
+
870
+ options.apply_defaults timeout: @config.rpcs.disable_certificate_authority.timeout,
871
+ metadata: call_metadata,
872
+ retry_policy: @config.rpcs.disable_certificate_authority.retry_policy
873
+
874
+ options.apply_defaults timeout: @config.timeout,
875
+ metadata: @config.metadata,
876
+ retry_policy: @config.retry_policy
877
+
878
+ @certificate_authority_service_stub.disable_certificate_authority request, options do |result, operation|
879
+ result = ::Gapic::Operation.new result, @operations_client, options: options
880
+ yield result, operation if block_given?
881
+ return result
882
+ end
883
+ rescue ::Gapic::Rest::Error => e
884
+ raise ::Google::Cloud::Error.from_error(e)
885
+ end
886
+
887
+ ##
888
+ # Enable a
889
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}.
890
+ #
891
+ # @overload enable_certificate_authority(request, options = nil)
892
+ # Pass arguments to `enable_certificate_authority` via a request object, either of type
893
+ # {::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest} or an equivalent Hash.
894
+ #
895
+ # @param request [::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest, ::Hash]
896
+ # A request object representing the call parameters. Required. To specify no
897
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
898
+ # @param options [::Gapic::CallOptions, ::Hash]
899
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
900
+ #
901
+ # @overload enable_certificate_authority(name: nil, request_id: nil)
902
+ # Pass arguments to `enable_certificate_authority` via keyword arguments. Note that at
903
+ # least one keyword argument is required. To specify no parameters, or to keep all
904
+ # the default parameter values, pass an empty Hash as a request object (see above).
905
+ #
906
+ # @param name [::String]
907
+ # Required. The resource name for this
908
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
909
+ # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
910
+ # @param request_id [::String]
911
+ # Optional. An ID to identify requests. Specify a unique request ID so that
912
+ # if you must retry your request, the server will know to ignore the request
913
+ # if it has already been completed. The server will guarantee that for at
914
+ # least 60 minutes since the first request.
915
+ #
916
+ # For example, consider a situation where you make an initial request and
917
+ # the request times out. If you make the request again with the same request
918
+ # ID, the server can check if original operation with the same request ID
919
+ # was received, and if so, will ignore the second request. This prevents
920
+ # clients from accidentally creating duplicate commitments.
921
+ #
922
+ # The request ID must be a valid UUID with the exception that zero UUID is
923
+ # not supported (00000000-0000-0000-0000-000000000000).
924
+ # @yield [result, operation] Access the result along with the TransportOperation object
925
+ # @yieldparam result [::Gapic::Operation]
926
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
927
+ #
928
+ # @return [::Gapic::Operation]
929
+ #
930
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
931
+ def enable_certificate_authority request, options = nil
932
+ raise ::ArgumentError, "request must be provided" if request.nil?
933
+
934
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest
935
+
936
+ # Converts hash and nil to an options object
937
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
938
+
939
+ # Customize the options with defaults
940
+ call_metadata = @config.rpcs.enable_certificate_authority.metadata.to_h
941
+
942
+ # Set x-goog-api-client and x-goog-user-project headers
943
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
944
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
945
+ gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
946
+ transports_version_send: [:rest]
947
+
948
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
949
+
950
+ options.apply_defaults timeout: @config.rpcs.enable_certificate_authority.timeout,
951
+ metadata: call_metadata,
952
+ retry_policy: @config.rpcs.enable_certificate_authority.retry_policy
953
+
954
+ options.apply_defaults timeout: @config.timeout,
955
+ metadata: @config.metadata,
956
+ retry_policy: @config.retry_policy
957
+
958
+ @certificate_authority_service_stub.enable_certificate_authority request, options do |result, operation|
959
+ result = ::Gapic::Operation.new result, @operations_client, options: options
960
+ yield result, operation if block_given?
961
+ return result
962
+ end
963
+ rescue ::Gapic::Rest::Error => e
964
+ raise ::Google::Cloud::Error.from_error(e)
965
+ end
966
+
967
+ ##
968
+ # Fetch a certificate signing request (CSR) from a
969
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
970
+ # that is in state
971
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::State::AWAITING_USER_ACTIVATION AWAITING_USER_ACTIVATION}
972
+ # and is of type
973
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::Type::SUBORDINATE SUBORDINATE}.
974
+ # The CSR must then be signed by the desired parent Certificate Authority,
975
+ # which could be another
976
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
977
+ # resource, or could be an on-prem certificate authority. See also
978
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client#activate_certificate_authority ActivateCertificateAuthority}.
979
+ #
980
+ # @overload fetch_certificate_authority_csr(request, options = nil)
981
+ # Pass arguments to `fetch_certificate_authority_csr` via a request object, either of type
982
+ # {::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest} or an equivalent Hash.
983
+ #
984
+ # @param request [::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest, ::Hash]
985
+ # A request object representing the call parameters. Required. To specify no
986
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
987
+ # @param options [::Gapic::CallOptions, ::Hash]
988
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
989
+ #
990
+ # @overload fetch_certificate_authority_csr(name: nil)
991
+ # Pass arguments to `fetch_certificate_authority_csr` via keyword arguments. Note that at
992
+ # least one keyword argument is required. To specify no parameters, or to keep all
993
+ # the default parameter values, pass an empty Hash as a request object (see above).
994
+ #
995
+ # @param name [::String]
996
+ # Required. The resource name for this
997
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
998
+ # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
999
+ # @yield [result, operation] Access the result along with the TransportOperation object
1000
+ # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse]
1001
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1002
+ #
1003
+ # @return [::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse]
1004
+ #
1005
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1006
+ def fetch_certificate_authority_csr request, options = nil
1007
+ raise ::ArgumentError, "request must be provided" if request.nil?
1008
+
1009
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest
1010
+
1011
+ # Converts hash and nil to an options object
1012
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1013
+
1014
+ # Customize the options with defaults
1015
+ call_metadata = @config.rpcs.fetch_certificate_authority_csr.metadata.to_h
1016
+
1017
+ # Set x-goog-api-client and x-goog-user-project headers
1018
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1019
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1020
+ gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
1021
+ transports_version_send: [:rest]
1022
+
1023
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1024
+
1025
+ options.apply_defaults timeout: @config.rpcs.fetch_certificate_authority_csr.timeout,
1026
+ metadata: call_metadata,
1027
+ retry_policy: @config.rpcs.fetch_certificate_authority_csr.retry_policy
1028
+
1029
+ options.apply_defaults timeout: @config.timeout,
1030
+ metadata: @config.metadata,
1031
+ retry_policy: @config.retry_policy
1032
+
1033
+ @certificate_authority_service_stub.fetch_certificate_authority_csr request, options do |result, operation|
1034
+ yield result, operation if block_given?
1035
+ return result
1036
+ end
1037
+ rescue ::Gapic::Rest::Error => e
1038
+ raise ::Google::Cloud::Error.from_error(e)
1039
+ end
1040
+
1041
+ ##
1042
+ # Returns a
1043
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}.
1044
+ #
1045
+ # @overload get_certificate_authority(request, options = nil)
1046
+ # Pass arguments to `get_certificate_authority` via a request object, either of type
1047
+ # {::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest} or an equivalent Hash.
1048
+ #
1049
+ # @param request [::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest, ::Hash]
1050
+ # A request object representing the call parameters. Required. To specify no
1051
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1052
+ # @param options [::Gapic::CallOptions, ::Hash]
1053
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1054
+ #
1055
+ # @overload get_certificate_authority(name: nil)
1056
+ # Pass arguments to `get_certificate_authority` via keyword arguments. Note that at
1057
+ # least one keyword argument is required. To specify no parameters, or to keep all
1058
+ # the default parameter values, pass an empty Hash as a request object (see above).
1059
+ #
1060
+ # @param name [::String]
1061
+ # Required. The
1062
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority#name name} of the
1063
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
1064
+ # to get.
1065
+ # @yield [result, operation] Access the result along with the TransportOperation object
1066
+ # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority]
1067
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1068
+ #
1069
+ # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority]
1070
+ #
1071
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1072
+ def get_certificate_authority request, options = nil
1073
+ raise ::ArgumentError, "request must be provided" if request.nil?
1074
+
1075
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest
1076
+
1077
+ # Converts hash and nil to an options object
1078
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1079
+
1080
+ # Customize the options with defaults
1081
+ call_metadata = @config.rpcs.get_certificate_authority.metadata.to_h
1082
+
1083
+ # Set x-goog-api-client and x-goog-user-project headers
1084
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1085
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1086
+ gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
1087
+ transports_version_send: [:rest]
1088
+
1089
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1090
+
1091
+ options.apply_defaults timeout: @config.rpcs.get_certificate_authority.timeout,
1092
+ metadata: call_metadata,
1093
+ retry_policy: @config.rpcs.get_certificate_authority.retry_policy
1094
+
1095
+ options.apply_defaults timeout: @config.timeout,
1096
+ metadata: @config.metadata,
1097
+ retry_policy: @config.retry_policy
1098
+
1099
+ @certificate_authority_service_stub.get_certificate_authority request, options do |result, operation|
1100
+ yield result, operation if block_given?
1101
+ return result
1102
+ end
1103
+ rescue ::Gapic::Rest::Error => e
1104
+ raise ::Google::Cloud::Error.from_error(e)
1105
+ end
1106
+
1107
+ ##
1108
+ # Lists
1109
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities}.
1110
+ #
1111
+ # @overload list_certificate_authorities(request, options = nil)
1112
+ # Pass arguments to `list_certificate_authorities` via a request object, either of type
1113
+ # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest} or an equivalent Hash.
1114
+ #
1115
+ # @param request [::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest, ::Hash]
1116
+ # A request object representing the call parameters. Required. To specify no
1117
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1118
+ # @param options [::Gapic::CallOptions, ::Hash]
1119
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1120
+ #
1121
+ # @overload list_certificate_authorities(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1122
+ # Pass arguments to `list_certificate_authorities` via keyword arguments. Note that at
1123
+ # least one keyword argument is required. To specify no parameters, or to keep all
1124
+ # the default parameter values, pass an empty Hash as a request object (see above).
1125
+ #
1126
+ # @param parent [::String]
1127
+ # Required. The resource name of the
1128
+ # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} associated with the
1129
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities},
1130
+ # in the format `projects/*/locations/*/caPools/*`.
1131
+ # @param page_size [::Integer]
1132
+ # Optional. Limit on the number of
1133
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities}
1134
+ # to include in the response. Further
1135
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities}
1136
+ # can subsequently be obtained by including the
1137
+ # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse#next_page_token ListCertificateAuthoritiesResponse.next_page_token}
1138
+ # in a subsequent request. If unspecified, the server will pick an
1139
+ # appropriate default.
1140
+ # @param page_token [::String]
1141
+ # Optional. Pagination token, returned earlier via
1142
+ # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse#next_page_token ListCertificateAuthoritiesResponse.next_page_token}.
1143
+ # @param filter [::String]
1144
+ # Optional. Only include resources that match the filter in the response.
1145
+ # @param order_by [::String]
1146
+ # Optional. Specify how the results should be sorted.
1147
+ # @yield [result, operation] Access the result along with the TransportOperation object
1148
+ # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse]
1149
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1150
+ #
1151
+ # @return [::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse]
1152
+ #
1153
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1154
+ def list_certificate_authorities request, options = nil
1155
+ raise ::ArgumentError, "request must be provided" if request.nil?
1156
+
1157
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest
1158
+
1159
+ # Converts hash and nil to an options object
1160
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1161
+
1162
+ # Customize the options with defaults
1163
+ call_metadata = @config.rpcs.list_certificate_authorities.metadata.to_h
1164
+
1165
+ # Set x-goog-api-client and x-goog-user-project headers
1166
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1167
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1168
+ gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
1169
+ transports_version_send: [:rest]
1170
+
1171
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1172
+
1173
+ options.apply_defaults timeout: @config.rpcs.list_certificate_authorities.timeout,
1174
+ metadata: call_metadata,
1175
+ retry_policy: @config.rpcs.list_certificate_authorities.retry_policy
1176
+
1177
+ options.apply_defaults timeout: @config.timeout,
1178
+ metadata: @config.metadata,
1179
+ retry_policy: @config.retry_policy
1180
+
1181
+ @certificate_authority_service_stub.list_certificate_authorities request, options do |result, operation|
1182
+ yield result, operation if block_given?
1183
+ return result
1184
+ end
1185
+ rescue ::Gapic::Rest::Error => e
1186
+ raise ::Google::Cloud::Error.from_error(e)
1187
+ end
1188
+
1189
+ ##
1190
+ # Undelete a
1191
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
1192
+ # that has been deleted.
1193
+ #
1194
+ # @overload undelete_certificate_authority(request, options = nil)
1195
+ # Pass arguments to `undelete_certificate_authority` via a request object, either of type
1196
+ # {::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest} or an equivalent Hash.
1197
+ #
1198
+ # @param request [::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest, ::Hash]
1199
+ # A request object representing the call parameters. Required. To specify no
1200
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1201
+ # @param options [::Gapic::CallOptions, ::Hash]
1202
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1203
+ #
1204
+ # @overload undelete_certificate_authority(name: nil, request_id: nil)
1205
+ # Pass arguments to `undelete_certificate_authority` via keyword arguments. Note that at
1206
+ # least one keyword argument is required. To specify no parameters, or to keep all
1207
+ # the default parameter values, pass an empty Hash as a request object (see above).
1208
+ #
1209
+ # @param name [::String]
1210
+ # Required. The resource name for this
1211
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
1212
+ # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
1213
+ # @param request_id [::String]
1214
+ # Optional. An ID to identify requests. Specify a unique request ID so that
1215
+ # if you must retry your request, the server will know to ignore the request
1216
+ # if it has already been completed. The server will guarantee that for at
1217
+ # least 60 minutes since the first request.
1218
+ #
1219
+ # For example, consider a situation where you make an initial request and
1220
+ # the request times out. If you make the request again with the same request
1221
+ # ID, the server can check if original operation with the same request ID
1222
+ # was received, and if so, will ignore the second request. This prevents
1223
+ # clients from accidentally creating duplicate commitments.
1224
+ #
1225
+ # The request ID must be a valid UUID with the exception that zero UUID is
1226
+ # not supported (00000000-0000-0000-0000-000000000000).
1227
+ # @yield [result, operation] Access the result along with the TransportOperation object
1228
+ # @yieldparam result [::Gapic::Operation]
1229
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1230
+ #
1231
+ # @return [::Gapic::Operation]
1232
+ #
1233
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1234
+ def undelete_certificate_authority request, options = nil
1235
+ raise ::ArgumentError, "request must be provided" if request.nil?
1236
+
1237
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest
1238
+
1239
+ # Converts hash and nil to an options object
1240
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1241
+
1242
+ # Customize the options with defaults
1243
+ call_metadata = @config.rpcs.undelete_certificate_authority.metadata.to_h
1244
+
1245
+ # Set x-goog-api-client and x-goog-user-project headers
1246
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1247
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1248
+ gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
1249
+ transports_version_send: [:rest]
1250
+
1251
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1252
+
1253
+ options.apply_defaults timeout: @config.rpcs.undelete_certificate_authority.timeout,
1254
+ metadata: call_metadata,
1255
+ retry_policy: @config.rpcs.undelete_certificate_authority.retry_policy
1256
+
1257
+ options.apply_defaults timeout: @config.timeout,
1258
+ metadata: @config.metadata,
1259
+ retry_policy: @config.retry_policy
1260
+
1261
+ @certificate_authority_service_stub.undelete_certificate_authority request, options do |result, operation|
1262
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1263
+ yield result, operation if block_given?
1264
+ return result
1265
+ end
1266
+ rescue ::Gapic::Rest::Error => e
1267
+ raise ::Google::Cloud::Error.from_error(e)
1268
+ end
1269
+
1270
+ ##
1271
+ # Delete a
1272
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}.
1273
+ #
1274
+ # @overload delete_certificate_authority(request, options = nil)
1275
+ # Pass arguments to `delete_certificate_authority` via a request object, either of type
1276
+ # {::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest} or an equivalent Hash.
1277
+ #
1278
+ # @param request [::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest, ::Hash]
1279
+ # A request object representing the call parameters. Required. To specify no
1280
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1281
+ # @param options [::Gapic::CallOptions, ::Hash]
1282
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1283
+ #
1284
+ # @overload delete_certificate_authority(name: nil, request_id: nil, ignore_active_certificates: nil, skip_grace_period: nil, ignore_dependent_resources: nil)
1285
+ # Pass arguments to `delete_certificate_authority` via keyword arguments. Note that at
1286
+ # least one keyword argument is required. To specify no parameters, or to keep all
1287
+ # the default parameter values, pass an empty Hash as a request object (see above).
1288
+ #
1289
+ # @param name [::String]
1290
+ # Required. The resource name for this
1291
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
1292
+ # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
1293
+ # @param request_id [::String]
1294
+ # Optional. An ID to identify requests. Specify a unique request ID so that
1295
+ # if you must retry your request, the server will know to ignore the request
1296
+ # if it has already been completed. The server will guarantee that for at
1297
+ # least 60 minutes since the first request.
1298
+ #
1299
+ # For example, consider a situation where you make an initial request and
1300
+ # the request times out. If you make the request again with the same request
1301
+ # ID, the server can check if original operation with the same request ID
1302
+ # was received, and if so, will ignore the second request. This prevents
1303
+ # clients from accidentally creating duplicate commitments.
1304
+ #
1305
+ # The request ID must be a valid UUID with the exception that zero UUID is
1306
+ # not supported (00000000-0000-0000-0000-000000000000).
1307
+ # @param ignore_active_certificates [::Boolean]
1308
+ # Optional. This field allows the CA to be deleted even if the CA has
1309
+ # active certs. Active certs include both unrevoked and unexpired certs.
1310
+ # @param skip_grace_period [::Boolean]
1311
+ # Optional. If this flag is set, the Certificate Authority will be deleted as
1312
+ # soon as possible without a 30-day grace period where undeletion would have
1313
+ # been allowed. If you proceed, there will be no way to recover this CA.
1314
+ # @param ignore_dependent_resources [::Boolean]
1315
+ # Optional. This field allows this ca to be deleted even if it's being
1316
+ # depended on by another resource. However, doing so may result in unintended
1317
+ # and unrecoverable effects on any dependent resource(s) since the CA will
1318
+ # no longer be able to issue certificates.
1319
+ # @yield [result, operation] Access the result along with the TransportOperation object
1320
+ # @yieldparam result [::Gapic::Operation]
1321
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1322
+ #
1323
+ # @return [::Gapic::Operation]
1324
+ #
1325
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1326
+ def delete_certificate_authority request, options = nil
1327
+ raise ::ArgumentError, "request must be provided" if request.nil?
1328
+
1329
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest
1330
+
1331
+ # Converts hash and nil to an options object
1332
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1333
+
1334
+ # Customize the options with defaults
1335
+ call_metadata = @config.rpcs.delete_certificate_authority.metadata.to_h
1336
+
1337
+ # Set x-goog-api-client and x-goog-user-project headers
1338
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1339
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1340
+ gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
1341
+ transports_version_send: [:rest]
1342
+
1343
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1344
+
1345
+ options.apply_defaults timeout: @config.rpcs.delete_certificate_authority.timeout,
1346
+ metadata: call_metadata,
1347
+ retry_policy: @config.rpcs.delete_certificate_authority.retry_policy
1348
+
1349
+ options.apply_defaults timeout: @config.timeout,
1350
+ metadata: @config.metadata,
1351
+ retry_policy: @config.retry_policy
1352
+
1353
+ @certificate_authority_service_stub.delete_certificate_authority request, options do |result, operation|
1354
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1355
+ yield result, operation if block_given?
1356
+ return result
1357
+ end
1358
+ rescue ::Gapic::Rest::Error => e
1359
+ raise ::Google::Cloud::Error.from_error(e)
1360
+ end
1361
+
1362
+ ##
1363
+ # Update a
1364
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}.
1365
+ #
1366
+ # @overload update_certificate_authority(request, options = nil)
1367
+ # Pass arguments to `update_certificate_authority` via a request object, either of type
1368
+ # {::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest} or an equivalent Hash.
1369
+ #
1370
+ # @param request [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest, ::Hash]
1371
+ # A request object representing the call parameters. Required. To specify no
1372
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1373
+ # @param options [::Gapic::CallOptions, ::Hash]
1374
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1375
+ #
1376
+ # @overload update_certificate_authority(certificate_authority: nil, update_mask: nil, request_id: nil)
1377
+ # Pass arguments to `update_certificate_authority` via keyword arguments. Note that at
1378
+ # least one keyword argument is required. To specify no parameters, or to keep all
1379
+ # the default parameter values, pass an empty Hash as a request object (see above).
1380
+ #
1381
+ # @param certificate_authority [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority, ::Hash]
1382
+ # Required.
1383
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
1384
+ # with updated values.
1385
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1386
+ # Required. A list of fields to be updated in this request.
1387
+ # @param request_id [::String]
1388
+ # Optional. An ID to identify requests. Specify a unique request ID so that
1389
+ # if you must retry your request, the server will know to ignore the request
1390
+ # if it has already been completed. The server will guarantee that for at
1391
+ # least 60 minutes since the first request.
1392
+ #
1393
+ # For example, consider a situation where you make an initial request and
1394
+ # the request times out. If you make the request again with the same request
1395
+ # ID, the server can check if original operation with the same request ID
1396
+ # was received, and if so, will ignore the second request. This prevents
1397
+ # clients from accidentally creating duplicate commitments.
1398
+ #
1399
+ # The request ID must be a valid UUID with the exception that zero UUID is
1400
+ # not supported (00000000-0000-0000-0000-000000000000).
1401
+ # @yield [result, operation] Access the result along with the TransportOperation object
1402
+ # @yieldparam result [::Gapic::Operation]
1403
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1404
+ #
1405
+ # @return [::Gapic::Operation]
1406
+ #
1407
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1408
+ def update_certificate_authority request, options = nil
1409
+ raise ::ArgumentError, "request must be provided" if request.nil?
1410
+
1411
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest
1412
+
1413
+ # Converts hash and nil to an options object
1414
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1415
+
1416
+ # Customize the options with defaults
1417
+ call_metadata = @config.rpcs.update_certificate_authority.metadata.to_h
1418
+
1419
+ # Set x-goog-api-client and x-goog-user-project headers
1420
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1421
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1422
+ gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
1423
+ transports_version_send: [:rest]
1424
+
1425
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1426
+
1427
+ options.apply_defaults timeout: @config.rpcs.update_certificate_authority.timeout,
1428
+ metadata: call_metadata,
1429
+ retry_policy: @config.rpcs.update_certificate_authority.retry_policy
1430
+
1431
+ options.apply_defaults timeout: @config.timeout,
1432
+ metadata: @config.metadata,
1433
+ retry_policy: @config.retry_policy
1434
+
1435
+ @certificate_authority_service_stub.update_certificate_authority request, options do |result, operation|
1436
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1437
+ yield result, operation if block_given?
1438
+ return result
1439
+ end
1440
+ rescue ::Gapic::Rest::Error => e
1441
+ raise ::Google::Cloud::Error.from_error(e)
1442
+ end
1443
+
1444
+ ##
1445
+ # Create a {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}.
1446
+ #
1447
+ # @overload create_ca_pool(request, options = nil)
1448
+ # Pass arguments to `create_ca_pool` via a request object, either of type
1449
+ # {::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest} or an equivalent Hash.
1450
+ #
1451
+ # @param request [::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest, ::Hash]
1452
+ # A request object representing the call parameters. Required. To specify no
1453
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1454
+ # @param options [::Gapic::CallOptions, ::Hash]
1455
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1456
+ #
1457
+ # @overload create_ca_pool(parent: nil, ca_pool_id: nil, ca_pool: nil, request_id: nil)
1458
+ # Pass arguments to `create_ca_pool` via keyword arguments. Note that at
1459
+ # least one keyword argument is required. To specify no parameters, or to keep all
1460
+ # the default parameter values, pass an empty Hash as a request object (see above).
1461
+ #
1462
+ # @param parent [::String]
1463
+ # Required. The resource name of the location associated with the
1464
+ # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}, in the format
1465
+ # `projects/*/locations/*`.
1466
+ # @param ca_pool_id [::String]
1467
+ # Required. It must be unique within a location and match the regular
1468
+ # expression `[a-zA-Z0-9_-]{1,63}`
1469
+ # @param ca_pool [::Google::Cloud::Security::PrivateCA::V1::CaPool, ::Hash]
1470
+ # Required. A {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} with
1471
+ # initial field values.
1472
+ # @param request_id [::String]
1473
+ # Optional. An ID to identify requests. Specify a unique request ID so that
1474
+ # if you must retry your request, the server will know to ignore the request
1475
+ # if it has already been completed. The server will guarantee that for at
1476
+ # least 60 minutes since the first request.
1477
+ #
1478
+ # For example, consider a situation where you make an initial request and
1479
+ # the request times out. If you make the request again with the same request
1480
+ # ID, the server can check if original operation with the same request ID
1481
+ # was received, and if so, will ignore the second request. This prevents
1482
+ # clients from accidentally creating duplicate commitments.
1483
+ #
1484
+ # The request ID must be a valid UUID with the exception that zero UUID is
1485
+ # not supported (00000000-0000-0000-0000-000000000000).
1486
+ # @yield [result, operation] Access the result along with the TransportOperation object
1487
+ # @yieldparam result [::Gapic::Operation]
1488
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1489
+ #
1490
+ # @return [::Gapic::Operation]
1491
+ #
1492
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1493
+ def create_ca_pool request, options = nil
1494
+ raise ::ArgumentError, "request must be provided" if request.nil?
1495
+
1496
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest
1497
+
1498
+ # Converts hash and nil to an options object
1499
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1500
+
1501
+ # Customize the options with defaults
1502
+ call_metadata = @config.rpcs.create_ca_pool.metadata.to_h
1503
+
1504
+ # Set x-goog-api-client and x-goog-user-project headers
1505
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1506
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1507
+ gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
1508
+ transports_version_send: [:rest]
1509
+
1510
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1511
+
1512
+ options.apply_defaults timeout: @config.rpcs.create_ca_pool.timeout,
1513
+ metadata: call_metadata,
1514
+ retry_policy: @config.rpcs.create_ca_pool.retry_policy
1515
+
1516
+ options.apply_defaults timeout: @config.timeout,
1517
+ metadata: @config.metadata,
1518
+ retry_policy: @config.retry_policy
1519
+
1520
+ @certificate_authority_service_stub.create_ca_pool request, options do |result, operation|
1521
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1522
+ yield result, operation if block_given?
1523
+ return result
1524
+ end
1525
+ rescue ::Gapic::Rest::Error => e
1526
+ raise ::Google::Cloud::Error.from_error(e)
1527
+ end
1528
+
1529
+ ##
1530
+ # Update a {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}.
1531
+ #
1532
+ # @overload update_ca_pool(request, options = nil)
1533
+ # Pass arguments to `update_ca_pool` via a request object, either of type
1534
+ # {::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest} or an equivalent Hash.
1535
+ #
1536
+ # @param request [::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest, ::Hash]
1537
+ # A request object representing the call parameters. Required. To specify no
1538
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1539
+ # @param options [::Gapic::CallOptions, ::Hash]
1540
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1541
+ #
1542
+ # @overload update_ca_pool(ca_pool: nil, update_mask: nil, request_id: nil)
1543
+ # Pass arguments to `update_ca_pool` via keyword arguments. Note that at
1544
+ # least one keyword argument is required. To specify no parameters, or to keep all
1545
+ # the default parameter values, pass an empty Hash as a request object (see above).
1546
+ #
1547
+ # @param ca_pool [::Google::Cloud::Security::PrivateCA::V1::CaPool, ::Hash]
1548
+ # Required. {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} with updated
1549
+ # values.
1550
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1551
+ # Required. A list of fields to be updated in this request.
1552
+ # @param request_id [::String]
1553
+ # Optional. An ID to identify requests. Specify a unique request ID so that
1554
+ # if you must retry your request, the server will know to ignore the request
1555
+ # if it has already been completed. The server will guarantee that for at
1556
+ # least 60 minutes since the first request.
1557
+ #
1558
+ # For example, consider a situation where you make an initial request and
1559
+ # the request times out. If you make the request again with the same request
1560
+ # ID, the server can check if original operation with the same request ID
1561
+ # was received, and if so, will ignore the second request. This prevents
1562
+ # clients from accidentally creating duplicate commitments.
1563
+ #
1564
+ # The request ID must be a valid UUID with the exception that zero UUID is
1565
+ # not supported (00000000-0000-0000-0000-000000000000).
1566
+ # @yield [result, operation] Access the result along with the TransportOperation object
1567
+ # @yieldparam result [::Gapic::Operation]
1568
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1569
+ #
1570
+ # @return [::Gapic::Operation]
1571
+ #
1572
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1573
+ def update_ca_pool request, options = nil
1574
+ raise ::ArgumentError, "request must be provided" if request.nil?
1575
+
1576
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest
1577
+
1578
+ # Converts hash and nil to an options object
1579
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1580
+
1581
+ # Customize the options with defaults
1582
+ call_metadata = @config.rpcs.update_ca_pool.metadata.to_h
1583
+
1584
+ # Set x-goog-api-client and x-goog-user-project headers
1585
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1586
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1587
+ gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
1588
+ transports_version_send: [:rest]
1589
+
1590
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1591
+
1592
+ options.apply_defaults timeout: @config.rpcs.update_ca_pool.timeout,
1593
+ metadata: call_metadata,
1594
+ retry_policy: @config.rpcs.update_ca_pool.retry_policy
1595
+
1596
+ options.apply_defaults timeout: @config.timeout,
1597
+ metadata: @config.metadata,
1598
+ retry_policy: @config.retry_policy
1599
+
1600
+ @certificate_authority_service_stub.update_ca_pool request, options do |result, operation|
1601
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1602
+ yield result, operation if block_given?
1603
+ return result
1604
+ end
1605
+ rescue ::Gapic::Rest::Error => e
1606
+ raise ::Google::Cloud::Error.from_error(e)
1607
+ end
1608
+
1609
+ ##
1610
+ # Returns a {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}.
1611
+ #
1612
+ # @overload get_ca_pool(request, options = nil)
1613
+ # Pass arguments to `get_ca_pool` via a request object, either of type
1614
+ # {::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest} or an equivalent Hash.
1615
+ #
1616
+ # @param request [::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest, ::Hash]
1617
+ # A request object representing the call parameters. Required. To specify no
1618
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1619
+ # @param options [::Gapic::CallOptions, ::Hash]
1620
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1621
+ #
1622
+ # @overload get_ca_pool(name: nil)
1623
+ # Pass arguments to `get_ca_pool` via keyword arguments. Note that at
1624
+ # least one keyword argument is required. To specify no parameters, or to keep all
1625
+ # the default parameter values, pass an empty Hash as a request object (see above).
1626
+ #
1627
+ # @param name [::String]
1628
+ # Required. The {::Google::Cloud::Security::PrivateCA::V1::CaPool#name name} of the
1629
+ # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} to get.
1630
+ # @yield [result, operation] Access the result along with the TransportOperation object
1631
+ # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::CaPool]
1632
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1633
+ #
1634
+ # @return [::Google::Cloud::Security::PrivateCA::V1::CaPool]
1635
+ #
1636
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1637
+ def get_ca_pool request, options = nil
1638
+ raise ::ArgumentError, "request must be provided" if request.nil?
1639
+
1640
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest
1641
+
1642
+ # Converts hash and nil to an options object
1643
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1644
+
1645
+ # Customize the options with defaults
1646
+ call_metadata = @config.rpcs.get_ca_pool.metadata.to_h
1647
+
1648
+ # Set x-goog-api-client and x-goog-user-project headers
1649
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1650
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1651
+ gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
1652
+ transports_version_send: [:rest]
1653
+
1654
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1655
+
1656
+ options.apply_defaults timeout: @config.rpcs.get_ca_pool.timeout,
1657
+ metadata: call_metadata,
1658
+ retry_policy: @config.rpcs.get_ca_pool.retry_policy
1659
+
1660
+ options.apply_defaults timeout: @config.timeout,
1661
+ metadata: @config.metadata,
1662
+ retry_policy: @config.retry_policy
1663
+
1664
+ @certificate_authority_service_stub.get_ca_pool request, options do |result, operation|
1665
+ yield result, operation if block_given?
1666
+ return result
1667
+ end
1668
+ rescue ::Gapic::Rest::Error => e
1669
+ raise ::Google::Cloud::Error.from_error(e)
1670
+ end
1671
+
1672
+ ##
1673
+ # Lists {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPools}.
1674
+ #
1675
+ # @overload list_ca_pools(request, options = nil)
1676
+ # Pass arguments to `list_ca_pools` via a request object, either of type
1677
+ # {::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest} or an equivalent Hash.
1678
+ #
1679
+ # @param request [::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest, ::Hash]
1680
+ # A request object representing the call parameters. Required. To specify no
1681
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1682
+ # @param options [::Gapic::CallOptions, ::Hash]
1683
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1684
+ #
1685
+ # @overload list_ca_pools(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1686
+ # Pass arguments to `list_ca_pools` via keyword arguments. Note that at
1687
+ # least one keyword argument is required. To specify no parameters, or to keep all
1688
+ # the default parameter values, pass an empty Hash as a request object (see above).
1689
+ #
1690
+ # @param parent [::String]
1691
+ # Required. The resource name of the location associated with the
1692
+ # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPools}, in the format
1693
+ # `projects/*/locations/*`.
1694
+ # @param page_size [::Integer]
1695
+ # Optional. Limit on the number of
1696
+ # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPools} to include in the
1697
+ # response. Further {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPools} can
1698
+ # subsequently be obtained by including the
1699
+ # {::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse#next_page_token ListCaPoolsResponse.next_page_token}
1700
+ # in a subsequent request. If unspecified, the server will pick an
1701
+ # appropriate default.
1702
+ # @param page_token [::String]
1703
+ # Optional. Pagination token, returned earlier via
1704
+ # {::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse#next_page_token ListCaPoolsResponse.next_page_token}.
1705
+ # @param filter [::String]
1706
+ # Optional. Only include resources that match the filter in the response.
1707
+ # @param order_by [::String]
1708
+ # Optional. Specify how the results should be sorted.
1709
+ # @yield [result, operation] Access the result along with the TransportOperation object
1710
+ # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse]
1711
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1712
+ #
1713
+ # @return [::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse]
1714
+ #
1715
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1716
+ def list_ca_pools request, options = nil
1717
+ raise ::ArgumentError, "request must be provided" if request.nil?
1718
+
1719
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest
1720
+
1721
+ # Converts hash and nil to an options object
1722
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1723
+
1724
+ # Customize the options with defaults
1725
+ call_metadata = @config.rpcs.list_ca_pools.metadata.to_h
1726
+
1727
+ # Set x-goog-api-client and x-goog-user-project headers
1728
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1729
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1730
+ gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
1731
+ transports_version_send: [:rest]
1732
+
1733
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1734
+
1735
+ options.apply_defaults timeout: @config.rpcs.list_ca_pools.timeout,
1736
+ metadata: call_metadata,
1737
+ retry_policy: @config.rpcs.list_ca_pools.retry_policy
1738
+
1739
+ options.apply_defaults timeout: @config.timeout,
1740
+ metadata: @config.metadata,
1741
+ retry_policy: @config.retry_policy
1742
+
1743
+ @certificate_authority_service_stub.list_ca_pools request, options do |result, operation|
1744
+ yield result, operation if block_given?
1745
+ return result
1746
+ end
1747
+ rescue ::Gapic::Rest::Error => e
1748
+ raise ::Google::Cloud::Error.from_error(e)
1749
+ end
1750
+
1751
+ ##
1752
+ # Delete a {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}.
1753
+ #
1754
+ # @overload delete_ca_pool(request, options = nil)
1755
+ # Pass arguments to `delete_ca_pool` via a request object, either of type
1756
+ # {::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest} or an equivalent Hash.
1757
+ #
1758
+ # @param request [::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest, ::Hash]
1759
+ # A request object representing the call parameters. Required. To specify no
1760
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1761
+ # @param options [::Gapic::CallOptions, ::Hash]
1762
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1763
+ #
1764
+ # @overload delete_ca_pool(name: nil, request_id: nil, ignore_dependent_resources: nil)
1765
+ # Pass arguments to `delete_ca_pool` via keyword arguments. Note that at
1766
+ # least one keyword argument is required. To specify no parameters, or to keep all
1767
+ # the default parameter values, pass an empty Hash as a request object (see above).
1768
+ #
1769
+ # @param name [::String]
1770
+ # Required. The resource name for this
1771
+ # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} in the format
1772
+ # `projects/*/locations/*/caPools/*`.
1773
+ # @param request_id [::String]
1774
+ # Optional. An ID to identify requests. Specify a unique request ID so that
1775
+ # if you must retry your request, the server will know to ignore the request
1776
+ # if it has already been completed. The server will guarantee that for at
1777
+ # least 60 minutes since the first request.
1778
+ #
1779
+ # For example, consider a situation where you make an initial request and
1780
+ # the request times out. If you make the request again with the same request
1781
+ # ID, the server can check if original operation with the same request ID
1782
+ # was received, and if so, will ignore the second request. This prevents
1783
+ # clients from accidentally creating duplicate commitments.
1784
+ #
1785
+ # The request ID must be a valid UUID with the exception that zero UUID is
1786
+ # not supported (00000000-0000-0000-0000-000000000000).
1787
+ # @param ignore_dependent_resources [::Boolean]
1788
+ # Optional. This field allows this pool to be deleted even if it's being
1789
+ # depended on by another resource. However, doing so may result in unintended
1790
+ # and unrecoverable effects on any dependent resource(s) since the pool will
1791
+ # no longer be able to issue certificates.
1792
+ # @yield [result, operation] Access the result along with the TransportOperation object
1793
+ # @yieldparam result [::Gapic::Operation]
1794
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1795
+ #
1796
+ # @return [::Gapic::Operation]
1797
+ #
1798
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1799
+ def delete_ca_pool request, options = nil
1800
+ raise ::ArgumentError, "request must be provided" if request.nil?
1801
+
1802
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest
1803
+
1804
+ # Converts hash and nil to an options object
1805
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1806
+
1807
+ # Customize the options with defaults
1808
+ call_metadata = @config.rpcs.delete_ca_pool.metadata.to_h
1809
+
1810
+ # Set x-goog-api-client and x-goog-user-project headers
1811
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1812
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1813
+ gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
1814
+ transports_version_send: [:rest]
1815
+
1816
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1817
+
1818
+ options.apply_defaults timeout: @config.rpcs.delete_ca_pool.timeout,
1819
+ metadata: call_metadata,
1820
+ retry_policy: @config.rpcs.delete_ca_pool.retry_policy
1821
+
1822
+ options.apply_defaults timeout: @config.timeout,
1823
+ metadata: @config.metadata,
1824
+ retry_policy: @config.retry_policy
1825
+
1826
+ @certificate_authority_service_stub.delete_ca_pool request, options do |result, operation|
1827
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1828
+ yield result, operation if block_given?
1829
+ return result
1830
+ end
1831
+ rescue ::Gapic::Rest::Error => e
1832
+ raise ::Google::Cloud::Error.from_error(e)
1833
+ end
1834
+
1835
+ ##
1836
+ # FetchCaCerts returns the current trust anchor for the
1837
+ # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. This will include CA
1838
+ # certificate chains for all ACTIVE
1839
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
1840
+ # resources in the {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}.
1841
+ #
1842
+ # @overload fetch_ca_certs(request, options = nil)
1843
+ # Pass arguments to `fetch_ca_certs` via a request object, either of type
1844
+ # {::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest} or an equivalent Hash.
1845
+ #
1846
+ # @param request [::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest, ::Hash]
1847
+ # A request object representing the call parameters. Required. To specify no
1848
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1849
+ # @param options [::Gapic::CallOptions, ::Hash]
1850
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1851
+ #
1852
+ # @overload fetch_ca_certs(ca_pool: nil, request_id: nil)
1853
+ # Pass arguments to `fetch_ca_certs` via keyword arguments. Note that at
1854
+ # least one keyword argument is required. To specify no parameters, or to keep all
1855
+ # the default parameter values, pass an empty Hash as a request object (see above).
1856
+ #
1857
+ # @param ca_pool [::String]
1858
+ # Required. The resource name for the
1859
+ # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} in the format
1860
+ # `projects/*/locations/*/caPools/*`.
1861
+ # @param request_id [::String]
1862
+ # Optional. An ID to identify requests. Specify a unique request ID so that
1863
+ # if you must retry your request, the server will know to ignore the request
1864
+ # if it has already been completed. The server will guarantee that for at
1865
+ # least 60 minutes since the first request.
1866
+ #
1867
+ # For example, consider a situation where you make an initial request and
1868
+ # the request times out. If you make the request again with the same request
1869
+ # ID, the server can check if original operation with the same request ID
1870
+ # was received, and if so, will ignore the second request. This prevents
1871
+ # clients from accidentally creating duplicate commitments.
1872
+ #
1873
+ # The request ID must be a valid UUID with the exception that zero UUID is
1874
+ # not supported (00000000-0000-0000-0000-000000000000).
1875
+ # @yield [result, operation] Access the result along with the TransportOperation object
1876
+ # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse]
1877
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1878
+ #
1879
+ # @return [::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse]
1880
+ #
1881
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1882
+ def fetch_ca_certs request, options = nil
1883
+ raise ::ArgumentError, "request must be provided" if request.nil?
1884
+
1885
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest
1886
+
1887
+ # Converts hash and nil to an options object
1888
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1889
+
1890
+ # Customize the options with defaults
1891
+ call_metadata = @config.rpcs.fetch_ca_certs.metadata.to_h
1892
+
1893
+ # Set x-goog-api-client and x-goog-user-project headers
1894
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1895
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1896
+ gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
1897
+ transports_version_send: [:rest]
1898
+
1899
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1900
+
1901
+ options.apply_defaults timeout: @config.rpcs.fetch_ca_certs.timeout,
1902
+ metadata: call_metadata,
1903
+ retry_policy: @config.rpcs.fetch_ca_certs.retry_policy
1904
+
1905
+ options.apply_defaults timeout: @config.timeout,
1906
+ metadata: @config.metadata,
1907
+ retry_policy: @config.retry_policy
1908
+
1909
+ @certificate_authority_service_stub.fetch_ca_certs request, options do |result, operation|
1910
+ yield result, operation if block_given?
1911
+ return result
1912
+ end
1913
+ rescue ::Gapic::Rest::Error => e
1914
+ raise ::Google::Cloud::Error.from_error(e)
1915
+ end
1916
+
1917
+ ##
1918
+ # Returns a
1919
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList}.
1920
+ #
1921
+ # @overload get_certificate_revocation_list(request, options = nil)
1922
+ # Pass arguments to `get_certificate_revocation_list` via a request object, either of type
1923
+ # {::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest} or an equivalent Hash.
1924
+ #
1925
+ # @param request [::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest, ::Hash]
1926
+ # A request object representing the call parameters. Required. To specify no
1927
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1928
+ # @param options [::Gapic::CallOptions, ::Hash]
1929
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1930
+ #
1931
+ # @overload get_certificate_revocation_list(name: nil)
1932
+ # Pass arguments to `get_certificate_revocation_list` via keyword arguments. Note that at
1933
+ # least one keyword argument is required. To specify no parameters, or to keep all
1934
+ # the default parameter values, pass an empty Hash as a request object (see above).
1935
+ #
1936
+ # @param name [::String]
1937
+ # Required. The
1938
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList#name name}
1939
+ # of the
1940
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList}
1941
+ # to get.
1942
+ # @yield [result, operation] Access the result along with the TransportOperation object
1943
+ # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList]
1944
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1945
+ #
1946
+ # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList]
1947
+ #
1948
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1949
+ def get_certificate_revocation_list request, options = nil
1950
+ raise ::ArgumentError, "request must be provided" if request.nil?
1951
+
1952
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest
1953
+
1954
+ # Converts hash and nil to an options object
1955
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1956
+
1957
+ # Customize the options with defaults
1958
+ call_metadata = @config.rpcs.get_certificate_revocation_list.metadata.to_h
1959
+
1960
+ # Set x-goog-api-client and x-goog-user-project headers
1961
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1962
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1963
+ gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
1964
+ transports_version_send: [:rest]
1965
+
1966
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1967
+
1968
+ options.apply_defaults timeout: @config.rpcs.get_certificate_revocation_list.timeout,
1969
+ metadata: call_metadata,
1970
+ retry_policy: @config.rpcs.get_certificate_revocation_list.retry_policy
1971
+
1972
+ options.apply_defaults timeout: @config.timeout,
1973
+ metadata: @config.metadata,
1974
+ retry_policy: @config.retry_policy
1975
+
1976
+ @certificate_authority_service_stub.get_certificate_revocation_list request, options do |result, operation|
1977
+ yield result, operation if block_given?
1978
+ return result
1979
+ end
1980
+ rescue ::Gapic::Rest::Error => e
1981
+ raise ::Google::Cloud::Error.from_error(e)
1982
+ end
1983
+
1984
+ ##
1985
+ # Lists
1986
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationLists}.
1987
+ #
1988
+ # @overload list_certificate_revocation_lists(request, options = nil)
1989
+ # Pass arguments to `list_certificate_revocation_lists` via a request object, either of type
1990
+ # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest} or an equivalent Hash.
1991
+ #
1992
+ # @param request [::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest, ::Hash]
1993
+ # A request object representing the call parameters. Required. To specify no
1994
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1995
+ # @param options [::Gapic::CallOptions, ::Hash]
1996
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1997
+ #
1998
+ # @overload list_certificate_revocation_lists(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1999
+ # Pass arguments to `list_certificate_revocation_lists` via keyword arguments. Note that at
2000
+ # least one keyword argument is required. To specify no parameters, or to keep all
2001
+ # the default parameter values, pass an empty Hash as a request object (see above).
2002
+ #
2003
+ # @param parent [::String]
2004
+ # Required. The resource name of the location associated with the
2005
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationLists},
2006
+ # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
2007
+ # @param page_size [::Integer]
2008
+ # Optional. Limit on the number of
2009
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationLists}
2010
+ # to include in the response. Further
2011
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationLists}
2012
+ # can subsequently be obtained by including the
2013
+ # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse#next_page_token ListCertificateRevocationListsResponse.next_page_token}
2014
+ # in a subsequent request. If unspecified, the server will pick an
2015
+ # appropriate default.
2016
+ # @param page_token [::String]
2017
+ # Optional. Pagination token, returned earlier via
2018
+ # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse#next_page_token ListCertificateRevocationListsResponse.next_page_token}.
2019
+ # @param filter [::String]
2020
+ # Optional. Only include resources that match the filter in the response.
2021
+ # @param order_by [::String]
2022
+ # Optional. Specify how the results should be sorted.
2023
+ # @yield [result, operation] Access the result along with the TransportOperation object
2024
+ # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse]
2025
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2026
+ #
2027
+ # @return [::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse]
2028
+ #
2029
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2030
+ def list_certificate_revocation_lists request, options = nil
2031
+ raise ::ArgumentError, "request must be provided" if request.nil?
2032
+
2033
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest
2034
+
2035
+ # Converts hash and nil to an options object
2036
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2037
+
2038
+ # Customize the options with defaults
2039
+ call_metadata = @config.rpcs.list_certificate_revocation_lists.metadata.to_h
2040
+
2041
+ # Set x-goog-api-client and x-goog-user-project headers
2042
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2043
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2044
+ gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
2045
+ transports_version_send: [:rest]
2046
+
2047
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2048
+
2049
+ options.apply_defaults timeout: @config.rpcs.list_certificate_revocation_lists.timeout,
2050
+ metadata: call_metadata,
2051
+ retry_policy: @config.rpcs.list_certificate_revocation_lists.retry_policy
2052
+
2053
+ options.apply_defaults timeout: @config.timeout,
2054
+ metadata: @config.metadata,
2055
+ retry_policy: @config.retry_policy
2056
+
2057
+ @certificate_authority_service_stub.list_certificate_revocation_lists request, options do |result, operation|
2058
+ yield result, operation if block_given?
2059
+ return result
2060
+ end
2061
+ rescue ::Gapic::Rest::Error => e
2062
+ raise ::Google::Cloud::Error.from_error(e)
2063
+ end
2064
+
2065
+ ##
2066
+ # Update a
2067
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList}.
2068
+ #
2069
+ # @overload update_certificate_revocation_list(request, options = nil)
2070
+ # Pass arguments to `update_certificate_revocation_list` via a request object, either of type
2071
+ # {::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest} or an equivalent Hash.
2072
+ #
2073
+ # @param request [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest, ::Hash]
2074
+ # A request object representing the call parameters. Required. To specify no
2075
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2076
+ # @param options [::Gapic::CallOptions, ::Hash]
2077
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2078
+ #
2079
+ # @overload update_certificate_revocation_list(certificate_revocation_list: nil, update_mask: nil, request_id: nil)
2080
+ # Pass arguments to `update_certificate_revocation_list` via keyword arguments. Note that at
2081
+ # least one keyword argument is required. To specify no parameters, or to keep all
2082
+ # the default parameter values, pass an empty Hash as a request object (see above).
2083
+ #
2084
+ # @param certificate_revocation_list [::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList, ::Hash]
2085
+ # Required.
2086
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList}
2087
+ # with updated values.
2088
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2089
+ # Required. A list of fields to be updated in this request.
2090
+ # @param request_id [::String]
2091
+ # Optional. An ID to identify requests. Specify a unique request ID so that
2092
+ # if you must retry your request, the server will know to ignore the request
2093
+ # if it has already been completed. The server will guarantee that for at
2094
+ # least 60 minutes since the first request.
2095
+ #
2096
+ # For example, consider a situation where you make an initial request and
2097
+ # the request times out. If you make the request again with the same request
2098
+ # ID, the server can check if original operation with the same request ID
2099
+ # was received, and if so, will ignore the second request. This prevents
2100
+ # clients from accidentally creating duplicate commitments.
2101
+ #
2102
+ # The request ID must be a valid UUID with the exception that zero UUID is
2103
+ # not supported (00000000-0000-0000-0000-000000000000).
2104
+ # @yield [result, operation] Access the result along with the TransportOperation object
2105
+ # @yieldparam result [::Gapic::Operation]
2106
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2107
+ #
2108
+ # @return [::Gapic::Operation]
2109
+ #
2110
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2111
+ def update_certificate_revocation_list request, options = nil
2112
+ raise ::ArgumentError, "request must be provided" if request.nil?
2113
+
2114
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest
2115
+
2116
+ # Converts hash and nil to an options object
2117
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2118
+
2119
+ # Customize the options with defaults
2120
+ call_metadata = @config.rpcs.update_certificate_revocation_list.metadata.to_h
2121
+
2122
+ # Set x-goog-api-client and x-goog-user-project headers
2123
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2124
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2125
+ gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
2126
+ transports_version_send: [:rest]
2127
+
2128
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2129
+
2130
+ options.apply_defaults timeout: @config.rpcs.update_certificate_revocation_list.timeout,
2131
+ metadata: call_metadata,
2132
+ retry_policy: @config.rpcs.update_certificate_revocation_list.retry_policy
2133
+
2134
+ options.apply_defaults timeout: @config.timeout,
2135
+ metadata: @config.metadata,
2136
+ retry_policy: @config.retry_policy
2137
+
2138
+ @certificate_authority_service_stub.update_certificate_revocation_list request, options do |result, operation|
2139
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2140
+ yield result, operation if block_given?
2141
+ return result
2142
+ end
2143
+ rescue ::Gapic::Rest::Error => e
2144
+ raise ::Google::Cloud::Error.from_error(e)
2145
+ end
2146
+
2147
+ ##
2148
+ # Create a new
2149
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}
2150
+ # in a given Project and Location.
2151
+ #
2152
+ # @overload create_certificate_template(request, options = nil)
2153
+ # Pass arguments to `create_certificate_template` via a request object, either of type
2154
+ # {::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest} or an equivalent Hash.
2155
+ #
2156
+ # @param request [::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest, ::Hash]
2157
+ # A request object representing the call parameters. Required. To specify no
2158
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2159
+ # @param options [::Gapic::CallOptions, ::Hash]
2160
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2161
+ #
2162
+ # @overload create_certificate_template(parent: nil, certificate_template_id: nil, certificate_template: nil, request_id: nil)
2163
+ # Pass arguments to `create_certificate_template` via keyword arguments. Note that at
2164
+ # least one keyword argument is required. To specify no parameters, or to keep all
2165
+ # the default parameter values, pass an empty Hash as a request object (see above).
2166
+ #
2167
+ # @param parent [::String]
2168
+ # Required. The resource name of the location associated with the
2169
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate},
2170
+ # in the format `projects/*/locations/*`.
2171
+ # @param certificate_template_id [::String]
2172
+ # Required. It must be unique within a location and match the regular
2173
+ # expression `[a-zA-Z0-9_-]{1,63}`
2174
+ # @param certificate_template [::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate, ::Hash]
2175
+ # Required. A
2176
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}
2177
+ # with initial field values.
2178
+ # @param request_id [::String]
2179
+ # Optional. An ID to identify requests. Specify a unique request ID so that
2180
+ # if you must retry your request, the server will know to ignore the request
2181
+ # if it has already been completed. The server will guarantee that for at
2182
+ # least 60 minutes since the first request.
2183
+ #
2184
+ # For example, consider a situation where you make an initial request and
2185
+ # the request times out. If you make the request again with the same request
2186
+ # ID, the server can check if original operation with the same request ID
2187
+ # was received, and if so, will ignore the second request. This prevents
2188
+ # clients from accidentally creating duplicate commitments.
2189
+ #
2190
+ # The request ID must be a valid UUID with the exception that zero UUID is
2191
+ # not supported (00000000-0000-0000-0000-000000000000).
2192
+ # @yield [result, operation] Access the result along with the TransportOperation object
2193
+ # @yieldparam result [::Gapic::Operation]
2194
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2195
+ #
2196
+ # @return [::Gapic::Operation]
2197
+ #
2198
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2199
+ def create_certificate_template request, options = nil
2200
+ raise ::ArgumentError, "request must be provided" if request.nil?
2201
+
2202
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest
2203
+
2204
+ # Converts hash and nil to an options object
2205
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2206
+
2207
+ # Customize the options with defaults
2208
+ call_metadata = @config.rpcs.create_certificate_template.metadata.to_h
2209
+
2210
+ # Set x-goog-api-client and x-goog-user-project headers
2211
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2212
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2213
+ gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
2214
+ transports_version_send: [:rest]
2215
+
2216
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2217
+
2218
+ options.apply_defaults timeout: @config.rpcs.create_certificate_template.timeout,
2219
+ metadata: call_metadata,
2220
+ retry_policy: @config.rpcs.create_certificate_template.retry_policy
2221
+
2222
+ options.apply_defaults timeout: @config.timeout,
2223
+ metadata: @config.metadata,
2224
+ retry_policy: @config.retry_policy
2225
+
2226
+ @certificate_authority_service_stub.create_certificate_template request, options do |result, operation|
2227
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2228
+ yield result, operation if block_given?
2229
+ return result
2230
+ end
2231
+ rescue ::Gapic::Rest::Error => e
2232
+ raise ::Google::Cloud::Error.from_error(e)
2233
+ end
2234
+
2235
+ ##
2236
+ # DeleteCertificateTemplate deletes a
2237
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}.
2238
+ #
2239
+ # @overload delete_certificate_template(request, options = nil)
2240
+ # Pass arguments to `delete_certificate_template` via a request object, either of type
2241
+ # {::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest} or an equivalent Hash.
2242
+ #
2243
+ # @param request [::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest, ::Hash]
2244
+ # A request object representing the call parameters. Required. To specify no
2245
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2246
+ # @param options [::Gapic::CallOptions, ::Hash]
2247
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2248
+ #
2249
+ # @overload delete_certificate_template(name: nil, request_id: nil)
2250
+ # Pass arguments to `delete_certificate_template` via keyword arguments. Note that at
2251
+ # least one keyword argument is required. To specify no parameters, or to keep all
2252
+ # the default parameter values, pass an empty Hash as a request object (see above).
2253
+ #
2254
+ # @param name [::String]
2255
+ # Required. The resource name for this
2256
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}
2257
+ # in the format `projects/*/locations/*/certificateTemplates/*`.
2258
+ # @param request_id [::String]
2259
+ # Optional. An ID to identify requests. Specify a unique request ID so that
2260
+ # if you must retry your request, the server will know to ignore the request
2261
+ # if it has already been completed. The server will guarantee that for at
2262
+ # least 60 minutes since the first request.
2263
+ #
2264
+ # For example, consider a situation where you make an initial request and
2265
+ # the request times out. If you make the request again with the same request
2266
+ # ID, the server can check if original operation with the same request ID
2267
+ # was received, and if so, will ignore the second request. This prevents
2268
+ # clients from accidentally creating duplicate commitments.
2269
+ #
2270
+ # The request ID must be a valid UUID with the exception that zero UUID is
2271
+ # not supported (00000000-0000-0000-0000-000000000000).
2272
+ # @yield [result, operation] Access the result along with the TransportOperation object
2273
+ # @yieldparam result [::Gapic::Operation]
2274
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2275
+ #
2276
+ # @return [::Gapic::Operation]
2277
+ #
2278
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2279
+ def delete_certificate_template request, options = nil
2280
+ raise ::ArgumentError, "request must be provided" if request.nil?
2281
+
2282
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest
2283
+
2284
+ # Converts hash and nil to an options object
2285
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2286
+
2287
+ # Customize the options with defaults
2288
+ call_metadata = @config.rpcs.delete_certificate_template.metadata.to_h
2289
+
2290
+ # Set x-goog-api-client and x-goog-user-project headers
2291
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2292
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2293
+ gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
2294
+ transports_version_send: [:rest]
2295
+
2296
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2297
+
2298
+ options.apply_defaults timeout: @config.rpcs.delete_certificate_template.timeout,
2299
+ metadata: call_metadata,
2300
+ retry_policy: @config.rpcs.delete_certificate_template.retry_policy
2301
+
2302
+ options.apply_defaults timeout: @config.timeout,
2303
+ metadata: @config.metadata,
2304
+ retry_policy: @config.retry_policy
2305
+
2306
+ @certificate_authority_service_stub.delete_certificate_template request, options do |result, operation|
2307
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2308
+ yield result, operation if block_given?
2309
+ return result
2310
+ end
2311
+ rescue ::Gapic::Rest::Error => e
2312
+ raise ::Google::Cloud::Error.from_error(e)
2313
+ end
2314
+
2315
+ ##
2316
+ # Returns a
2317
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}.
2318
+ #
2319
+ # @overload get_certificate_template(request, options = nil)
2320
+ # Pass arguments to `get_certificate_template` via a request object, either of type
2321
+ # {::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest} or an equivalent Hash.
2322
+ #
2323
+ # @param request [::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest, ::Hash]
2324
+ # A request object representing the call parameters. Required. To specify no
2325
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2326
+ # @param options [::Gapic::CallOptions, ::Hash]
2327
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2328
+ #
2329
+ # @overload get_certificate_template(name: nil)
2330
+ # Pass arguments to `get_certificate_template` via keyword arguments. Note that at
2331
+ # least one keyword argument is required. To specify no parameters, or to keep all
2332
+ # the default parameter values, pass an empty Hash as a request object (see above).
2333
+ #
2334
+ # @param name [::String]
2335
+ # Required. The
2336
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate#name name} of the
2337
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}
2338
+ # to get.
2339
+ # @yield [result, operation] Access the result along with the TransportOperation object
2340
+ # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate]
2341
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2342
+ #
2343
+ # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate]
2344
+ #
2345
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2346
+ def get_certificate_template request, options = nil
2347
+ raise ::ArgumentError, "request must be provided" if request.nil?
2348
+
2349
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest
2350
+
2351
+ # Converts hash and nil to an options object
2352
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2353
+
2354
+ # Customize the options with defaults
2355
+ call_metadata = @config.rpcs.get_certificate_template.metadata.to_h
2356
+
2357
+ # Set x-goog-api-client and x-goog-user-project headers
2358
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2359
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2360
+ gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
2361
+ transports_version_send: [:rest]
2362
+
2363
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2364
+
2365
+ options.apply_defaults timeout: @config.rpcs.get_certificate_template.timeout,
2366
+ metadata: call_metadata,
2367
+ retry_policy: @config.rpcs.get_certificate_template.retry_policy
2368
+
2369
+ options.apply_defaults timeout: @config.timeout,
2370
+ metadata: @config.metadata,
2371
+ retry_policy: @config.retry_policy
2372
+
2373
+ @certificate_authority_service_stub.get_certificate_template request, options do |result, operation|
2374
+ yield result, operation if block_given?
2375
+ return result
2376
+ end
2377
+ rescue ::Gapic::Rest::Error => e
2378
+ raise ::Google::Cloud::Error.from_error(e)
2379
+ end
2380
+
2381
+ ##
2382
+ # Lists
2383
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplates}.
2384
+ #
2385
+ # @overload list_certificate_templates(request, options = nil)
2386
+ # Pass arguments to `list_certificate_templates` via a request object, either of type
2387
+ # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest} or an equivalent Hash.
2388
+ #
2389
+ # @param request [::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest, ::Hash]
2390
+ # A request object representing the call parameters. Required. To specify no
2391
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2392
+ # @param options [::Gapic::CallOptions, ::Hash]
2393
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2394
+ #
2395
+ # @overload list_certificate_templates(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2396
+ # Pass arguments to `list_certificate_templates` via keyword arguments. Note that at
2397
+ # least one keyword argument is required. To specify no parameters, or to keep all
2398
+ # the default parameter values, pass an empty Hash as a request object (see above).
2399
+ #
2400
+ # @param parent [::String]
2401
+ # Required. The resource name of the location associated with the
2402
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplates},
2403
+ # in the format `projects/*/locations/*`.
2404
+ # @param page_size [::Integer]
2405
+ # Optional. Limit on the number of
2406
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplates}
2407
+ # to include in the response. Further
2408
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplates}
2409
+ # can subsequently be obtained by including the
2410
+ # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse#next_page_token ListCertificateTemplatesResponse.next_page_token}
2411
+ # in a subsequent request. If unspecified, the server will pick an
2412
+ # appropriate default.
2413
+ # @param page_token [::String]
2414
+ # Optional. Pagination token, returned earlier via
2415
+ # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse#next_page_token ListCertificateTemplatesResponse.next_page_token}.
2416
+ # @param filter [::String]
2417
+ # Optional. Only include resources that match the filter in the response.
2418
+ # @param order_by [::String]
2419
+ # Optional. Specify how the results should be sorted.
2420
+ # @yield [result, operation] Access the result along with the TransportOperation object
2421
+ # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse]
2422
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2423
+ #
2424
+ # @return [::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse]
2425
+ #
2426
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2427
+ def list_certificate_templates request, options = nil
2428
+ raise ::ArgumentError, "request must be provided" if request.nil?
2429
+
2430
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest
2431
+
2432
+ # Converts hash and nil to an options object
2433
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2434
+
2435
+ # Customize the options with defaults
2436
+ call_metadata = @config.rpcs.list_certificate_templates.metadata.to_h
2437
+
2438
+ # Set x-goog-api-client and x-goog-user-project headers
2439
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2440
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2441
+ gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
2442
+ transports_version_send: [:rest]
2443
+
2444
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2445
+
2446
+ options.apply_defaults timeout: @config.rpcs.list_certificate_templates.timeout,
2447
+ metadata: call_metadata,
2448
+ retry_policy: @config.rpcs.list_certificate_templates.retry_policy
2449
+
2450
+ options.apply_defaults timeout: @config.timeout,
2451
+ metadata: @config.metadata,
2452
+ retry_policy: @config.retry_policy
2453
+
2454
+ @certificate_authority_service_stub.list_certificate_templates request, options do |result, operation|
2455
+ yield result, operation if block_given?
2456
+ return result
2457
+ end
2458
+ rescue ::Gapic::Rest::Error => e
2459
+ raise ::Google::Cloud::Error.from_error(e)
2460
+ end
2461
+
2462
+ ##
2463
+ # Update a
2464
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}.
2465
+ #
2466
+ # @overload update_certificate_template(request, options = nil)
2467
+ # Pass arguments to `update_certificate_template` via a request object, either of type
2468
+ # {::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest} or an equivalent Hash.
2469
+ #
2470
+ # @param request [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest, ::Hash]
2471
+ # A request object representing the call parameters. Required. To specify no
2472
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2473
+ # @param options [::Gapic::CallOptions, ::Hash]
2474
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2475
+ #
2476
+ # @overload update_certificate_template(certificate_template: nil, update_mask: nil, request_id: nil)
2477
+ # Pass arguments to `update_certificate_template` via keyword arguments. Note that at
2478
+ # least one keyword argument is required. To specify no parameters, or to keep all
2479
+ # the default parameter values, pass an empty Hash as a request object (see above).
2480
+ #
2481
+ # @param certificate_template [::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate, ::Hash]
2482
+ # Required.
2483
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}
2484
+ # with updated values.
2485
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2486
+ # Required. A list of fields to be updated in this request.
2487
+ # @param request_id [::String]
2488
+ # Optional. An ID to identify requests. Specify a unique request ID so that
2489
+ # if you must retry your request, the server will know to ignore the request
2490
+ # if it has already been completed. The server will guarantee that for at
2491
+ # least 60 minutes since the first request.
2492
+ #
2493
+ # For example, consider a situation where you make an initial request and
2494
+ # the request times out. If you make the request again with the same request
2495
+ # ID, the server can check if original operation with the same request ID
2496
+ # was received, and if so, will ignore the second request. This prevents
2497
+ # clients from accidentally creating duplicate commitments.
2498
+ #
2499
+ # The request ID must be a valid UUID with the exception that zero UUID is
2500
+ # not supported (00000000-0000-0000-0000-000000000000).
2501
+ # @yield [result, operation] Access the result along with the TransportOperation object
2502
+ # @yieldparam result [::Gapic::Operation]
2503
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2504
+ #
2505
+ # @return [::Gapic::Operation]
2506
+ #
2507
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2508
+ def update_certificate_template request, options = nil
2509
+ raise ::ArgumentError, "request must be provided" if request.nil?
2510
+
2511
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest
2512
+
2513
+ # Converts hash and nil to an options object
2514
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2515
+
2516
+ # Customize the options with defaults
2517
+ call_metadata = @config.rpcs.update_certificate_template.metadata.to_h
2518
+
2519
+ # Set x-goog-api-client and x-goog-user-project headers
2520
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2521
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2522
+ gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
2523
+ transports_version_send: [:rest]
2524
+
2525
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2526
+
2527
+ options.apply_defaults timeout: @config.rpcs.update_certificate_template.timeout,
2528
+ metadata: call_metadata,
2529
+ retry_policy: @config.rpcs.update_certificate_template.retry_policy
2530
+
2531
+ options.apply_defaults timeout: @config.timeout,
2532
+ metadata: @config.metadata,
2533
+ retry_policy: @config.retry_policy
2534
+
2535
+ @certificate_authority_service_stub.update_certificate_template request, options do |result, operation|
2536
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2537
+ yield result, operation if block_given?
2538
+ return result
2539
+ end
2540
+ rescue ::Gapic::Rest::Error => e
2541
+ raise ::Google::Cloud::Error.from_error(e)
2542
+ end
2543
+
2544
+ ##
2545
+ # Configuration class for the CertificateAuthorityService REST API.
2546
+ #
2547
+ # This class represents the configuration for CertificateAuthorityService REST,
2548
+ # providing control over timeouts, retry behavior, logging, transport
2549
+ # parameters, and other low-level controls. Certain parameters can also be
2550
+ # applied individually to specific RPCs. See
2551
+ # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client::Configuration::Rpcs}
2552
+ # for a list of RPCs that can be configured independently.
2553
+ #
2554
+ # Configuration can be applied globally to all clients, or to a single client
2555
+ # on construction.
2556
+ #
2557
+ # @example
2558
+ #
2559
+ # # Modify the global config, setting the timeout for
2560
+ # # create_certificate to 20 seconds,
2561
+ # # and all remaining timeouts to 10 seconds.
2562
+ # ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.configure do |config|
2563
+ # config.timeout = 10.0
2564
+ # config.rpcs.create_certificate.timeout = 20.0
2565
+ # end
2566
+ #
2567
+ # # Apply the above configuration only to a new client.
2568
+ # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config|
2569
+ # config.timeout = 10.0
2570
+ # config.rpcs.create_certificate.timeout = 20.0
2571
+ # end
2572
+ #
2573
+ # @!attribute [rw] endpoint
2574
+ # The hostname or hostname:port of the service endpoint.
2575
+ # Defaults to `"privateca.googleapis.com"`.
2576
+ # @return [::String]
2577
+ # @!attribute [rw] credentials
2578
+ # Credentials to send with calls. You may provide any of the following types:
2579
+ # * (`String`) The path to a service account key file in JSON format
2580
+ # * (`Hash`) A service account key as a Hash
2581
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
2582
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
2583
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
2584
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
2585
+ # * (`nil`) indicating no credentials
2586
+ # @return [::Object]
2587
+ # @!attribute [rw] scope
2588
+ # The OAuth scopes
2589
+ # @return [::Array<::String>]
2590
+ # @!attribute [rw] lib_name
2591
+ # The library name as recorded in instrumentation and logging
2592
+ # @return [::String]
2593
+ # @!attribute [rw] lib_version
2594
+ # The library version as recorded in instrumentation and logging
2595
+ # @return [::String]
2596
+ # @!attribute [rw] timeout
2597
+ # The call timeout in seconds.
2598
+ # @return [::Numeric]
2599
+ # @!attribute [rw] metadata
2600
+ # Additional headers to be sent with the call.
2601
+ # @return [::Hash{::Symbol=>::String}]
2602
+ # @!attribute [rw] retry_policy
2603
+ # The retry policy. The value is a hash with the following keys:
2604
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2605
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2606
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2607
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2608
+ # trigger a retry.
2609
+ # @return [::Hash]
2610
+ # @!attribute [rw] quota_project
2611
+ # A separate project against which to charge quota.
2612
+ # @return [::String]
2613
+ #
2614
+ class Configuration
2615
+ extend ::Gapic::Config
2616
+
2617
+ config_attr :endpoint, "privateca.googleapis.com", ::String
2618
+ config_attr :credentials, nil do |value|
2619
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
2620
+ allowed.any? { |klass| klass === value }
2621
+ end
2622
+ config_attr :scope, nil, ::String, ::Array, nil
2623
+ config_attr :lib_name, nil, ::String, nil
2624
+ config_attr :lib_version, nil, ::String, nil
2625
+ config_attr :timeout, nil, ::Numeric, nil
2626
+ config_attr :metadata, nil, ::Hash, nil
2627
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2628
+ config_attr :quota_project, nil, ::String, nil
2629
+
2630
+ # @private
2631
+ # Overrides for http bindings for the RPCs of this service
2632
+ # are only used when this service is used as mixin, and only
2633
+ # by the host service.
2634
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
2635
+ config_attr :bindings_override, {}, ::Hash, nil
2636
+
2637
+ # @private
2638
+ def initialize parent_config = nil
2639
+ @parent_config = parent_config unless parent_config.nil?
2640
+
2641
+ yield self if block_given?
2642
+ end
2643
+
2644
+ ##
2645
+ # Configurations for individual RPCs
2646
+ # @return [Rpcs]
2647
+ #
2648
+ def rpcs
2649
+ @rpcs ||= begin
2650
+ parent_rpcs = nil
2651
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
2652
+ Rpcs.new parent_rpcs
2653
+ end
2654
+ end
2655
+
2656
+ ##
2657
+ # Configuration RPC class for the CertificateAuthorityService API.
2658
+ #
2659
+ # Includes fields providing the configuration for each RPC in this service.
2660
+ # Each configuration object is of type `Gapic::Config::Method` and includes
2661
+ # the following configuration fields:
2662
+ #
2663
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
2664
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
2665
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
2666
+ # include the following keys:
2667
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2668
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2669
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2670
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2671
+ # trigger a retry.
2672
+ #
2673
+ class Rpcs
2674
+ ##
2675
+ # RPC-specific configuration for `create_certificate`
2676
+ # @return [::Gapic::Config::Method]
2677
+ #
2678
+ attr_reader :create_certificate
2679
+ ##
2680
+ # RPC-specific configuration for `get_certificate`
2681
+ # @return [::Gapic::Config::Method]
2682
+ #
2683
+ attr_reader :get_certificate
2684
+ ##
2685
+ # RPC-specific configuration for `list_certificates`
2686
+ # @return [::Gapic::Config::Method]
2687
+ #
2688
+ attr_reader :list_certificates
2689
+ ##
2690
+ # RPC-specific configuration for `revoke_certificate`
2691
+ # @return [::Gapic::Config::Method]
2692
+ #
2693
+ attr_reader :revoke_certificate
2694
+ ##
2695
+ # RPC-specific configuration for `update_certificate`
2696
+ # @return [::Gapic::Config::Method]
2697
+ #
2698
+ attr_reader :update_certificate
2699
+ ##
2700
+ # RPC-specific configuration for `activate_certificate_authority`
2701
+ # @return [::Gapic::Config::Method]
2702
+ #
2703
+ attr_reader :activate_certificate_authority
2704
+ ##
2705
+ # RPC-specific configuration for `create_certificate_authority`
2706
+ # @return [::Gapic::Config::Method]
2707
+ #
2708
+ attr_reader :create_certificate_authority
2709
+ ##
2710
+ # RPC-specific configuration for `disable_certificate_authority`
2711
+ # @return [::Gapic::Config::Method]
2712
+ #
2713
+ attr_reader :disable_certificate_authority
2714
+ ##
2715
+ # RPC-specific configuration for `enable_certificate_authority`
2716
+ # @return [::Gapic::Config::Method]
2717
+ #
2718
+ attr_reader :enable_certificate_authority
2719
+ ##
2720
+ # RPC-specific configuration for `fetch_certificate_authority_csr`
2721
+ # @return [::Gapic::Config::Method]
2722
+ #
2723
+ attr_reader :fetch_certificate_authority_csr
2724
+ ##
2725
+ # RPC-specific configuration for `get_certificate_authority`
2726
+ # @return [::Gapic::Config::Method]
2727
+ #
2728
+ attr_reader :get_certificate_authority
2729
+ ##
2730
+ # RPC-specific configuration for `list_certificate_authorities`
2731
+ # @return [::Gapic::Config::Method]
2732
+ #
2733
+ attr_reader :list_certificate_authorities
2734
+ ##
2735
+ # RPC-specific configuration for `undelete_certificate_authority`
2736
+ # @return [::Gapic::Config::Method]
2737
+ #
2738
+ attr_reader :undelete_certificate_authority
2739
+ ##
2740
+ # RPC-specific configuration for `delete_certificate_authority`
2741
+ # @return [::Gapic::Config::Method]
2742
+ #
2743
+ attr_reader :delete_certificate_authority
2744
+ ##
2745
+ # RPC-specific configuration for `update_certificate_authority`
2746
+ # @return [::Gapic::Config::Method]
2747
+ #
2748
+ attr_reader :update_certificate_authority
2749
+ ##
2750
+ # RPC-specific configuration for `create_ca_pool`
2751
+ # @return [::Gapic::Config::Method]
2752
+ #
2753
+ attr_reader :create_ca_pool
2754
+ ##
2755
+ # RPC-specific configuration for `update_ca_pool`
2756
+ # @return [::Gapic::Config::Method]
2757
+ #
2758
+ attr_reader :update_ca_pool
2759
+ ##
2760
+ # RPC-specific configuration for `get_ca_pool`
2761
+ # @return [::Gapic::Config::Method]
2762
+ #
2763
+ attr_reader :get_ca_pool
2764
+ ##
2765
+ # RPC-specific configuration for `list_ca_pools`
2766
+ # @return [::Gapic::Config::Method]
2767
+ #
2768
+ attr_reader :list_ca_pools
2769
+ ##
2770
+ # RPC-specific configuration for `delete_ca_pool`
2771
+ # @return [::Gapic::Config::Method]
2772
+ #
2773
+ attr_reader :delete_ca_pool
2774
+ ##
2775
+ # RPC-specific configuration for `fetch_ca_certs`
2776
+ # @return [::Gapic::Config::Method]
2777
+ #
2778
+ attr_reader :fetch_ca_certs
2779
+ ##
2780
+ # RPC-specific configuration for `get_certificate_revocation_list`
2781
+ # @return [::Gapic::Config::Method]
2782
+ #
2783
+ attr_reader :get_certificate_revocation_list
2784
+ ##
2785
+ # RPC-specific configuration for `list_certificate_revocation_lists`
2786
+ # @return [::Gapic::Config::Method]
2787
+ #
2788
+ attr_reader :list_certificate_revocation_lists
2789
+ ##
2790
+ # RPC-specific configuration for `update_certificate_revocation_list`
2791
+ # @return [::Gapic::Config::Method]
2792
+ #
2793
+ attr_reader :update_certificate_revocation_list
2794
+ ##
2795
+ # RPC-specific configuration for `create_certificate_template`
2796
+ # @return [::Gapic::Config::Method]
2797
+ #
2798
+ attr_reader :create_certificate_template
2799
+ ##
2800
+ # RPC-specific configuration for `delete_certificate_template`
2801
+ # @return [::Gapic::Config::Method]
2802
+ #
2803
+ attr_reader :delete_certificate_template
2804
+ ##
2805
+ # RPC-specific configuration for `get_certificate_template`
2806
+ # @return [::Gapic::Config::Method]
2807
+ #
2808
+ attr_reader :get_certificate_template
2809
+ ##
2810
+ # RPC-specific configuration for `list_certificate_templates`
2811
+ # @return [::Gapic::Config::Method]
2812
+ #
2813
+ attr_reader :list_certificate_templates
2814
+ ##
2815
+ # RPC-specific configuration for `update_certificate_template`
2816
+ # @return [::Gapic::Config::Method]
2817
+ #
2818
+ attr_reader :update_certificate_template
2819
+
2820
+ # @private
2821
+ def initialize parent_rpcs = nil
2822
+ create_certificate_config = parent_rpcs.create_certificate if parent_rpcs.respond_to? :create_certificate
2823
+ @create_certificate = ::Gapic::Config::Method.new create_certificate_config
2824
+ get_certificate_config = parent_rpcs.get_certificate if parent_rpcs.respond_to? :get_certificate
2825
+ @get_certificate = ::Gapic::Config::Method.new get_certificate_config
2826
+ list_certificates_config = parent_rpcs.list_certificates if parent_rpcs.respond_to? :list_certificates
2827
+ @list_certificates = ::Gapic::Config::Method.new list_certificates_config
2828
+ revoke_certificate_config = parent_rpcs.revoke_certificate if parent_rpcs.respond_to? :revoke_certificate
2829
+ @revoke_certificate = ::Gapic::Config::Method.new revoke_certificate_config
2830
+ update_certificate_config = parent_rpcs.update_certificate if parent_rpcs.respond_to? :update_certificate
2831
+ @update_certificate = ::Gapic::Config::Method.new update_certificate_config
2832
+ activate_certificate_authority_config = parent_rpcs.activate_certificate_authority if parent_rpcs.respond_to? :activate_certificate_authority
2833
+ @activate_certificate_authority = ::Gapic::Config::Method.new activate_certificate_authority_config
2834
+ create_certificate_authority_config = parent_rpcs.create_certificate_authority if parent_rpcs.respond_to? :create_certificate_authority
2835
+ @create_certificate_authority = ::Gapic::Config::Method.new create_certificate_authority_config
2836
+ disable_certificate_authority_config = parent_rpcs.disable_certificate_authority if parent_rpcs.respond_to? :disable_certificate_authority
2837
+ @disable_certificate_authority = ::Gapic::Config::Method.new disable_certificate_authority_config
2838
+ enable_certificate_authority_config = parent_rpcs.enable_certificate_authority if parent_rpcs.respond_to? :enable_certificate_authority
2839
+ @enable_certificate_authority = ::Gapic::Config::Method.new enable_certificate_authority_config
2840
+ fetch_certificate_authority_csr_config = parent_rpcs.fetch_certificate_authority_csr if parent_rpcs.respond_to? :fetch_certificate_authority_csr
2841
+ @fetch_certificate_authority_csr = ::Gapic::Config::Method.new fetch_certificate_authority_csr_config
2842
+ get_certificate_authority_config = parent_rpcs.get_certificate_authority if parent_rpcs.respond_to? :get_certificate_authority
2843
+ @get_certificate_authority = ::Gapic::Config::Method.new get_certificate_authority_config
2844
+ list_certificate_authorities_config = parent_rpcs.list_certificate_authorities if parent_rpcs.respond_to? :list_certificate_authorities
2845
+ @list_certificate_authorities = ::Gapic::Config::Method.new list_certificate_authorities_config
2846
+ undelete_certificate_authority_config = parent_rpcs.undelete_certificate_authority if parent_rpcs.respond_to? :undelete_certificate_authority
2847
+ @undelete_certificate_authority = ::Gapic::Config::Method.new undelete_certificate_authority_config
2848
+ delete_certificate_authority_config = parent_rpcs.delete_certificate_authority if parent_rpcs.respond_to? :delete_certificate_authority
2849
+ @delete_certificate_authority = ::Gapic::Config::Method.new delete_certificate_authority_config
2850
+ update_certificate_authority_config = parent_rpcs.update_certificate_authority if parent_rpcs.respond_to? :update_certificate_authority
2851
+ @update_certificate_authority = ::Gapic::Config::Method.new update_certificate_authority_config
2852
+ create_ca_pool_config = parent_rpcs.create_ca_pool if parent_rpcs.respond_to? :create_ca_pool
2853
+ @create_ca_pool = ::Gapic::Config::Method.new create_ca_pool_config
2854
+ update_ca_pool_config = parent_rpcs.update_ca_pool if parent_rpcs.respond_to? :update_ca_pool
2855
+ @update_ca_pool = ::Gapic::Config::Method.new update_ca_pool_config
2856
+ get_ca_pool_config = parent_rpcs.get_ca_pool if parent_rpcs.respond_to? :get_ca_pool
2857
+ @get_ca_pool = ::Gapic::Config::Method.new get_ca_pool_config
2858
+ list_ca_pools_config = parent_rpcs.list_ca_pools if parent_rpcs.respond_to? :list_ca_pools
2859
+ @list_ca_pools = ::Gapic::Config::Method.new list_ca_pools_config
2860
+ delete_ca_pool_config = parent_rpcs.delete_ca_pool if parent_rpcs.respond_to? :delete_ca_pool
2861
+ @delete_ca_pool = ::Gapic::Config::Method.new delete_ca_pool_config
2862
+ fetch_ca_certs_config = parent_rpcs.fetch_ca_certs if parent_rpcs.respond_to? :fetch_ca_certs
2863
+ @fetch_ca_certs = ::Gapic::Config::Method.new fetch_ca_certs_config
2864
+ get_certificate_revocation_list_config = parent_rpcs.get_certificate_revocation_list if parent_rpcs.respond_to? :get_certificate_revocation_list
2865
+ @get_certificate_revocation_list = ::Gapic::Config::Method.new get_certificate_revocation_list_config
2866
+ list_certificate_revocation_lists_config = parent_rpcs.list_certificate_revocation_lists if parent_rpcs.respond_to? :list_certificate_revocation_lists
2867
+ @list_certificate_revocation_lists = ::Gapic::Config::Method.new list_certificate_revocation_lists_config
2868
+ update_certificate_revocation_list_config = parent_rpcs.update_certificate_revocation_list if parent_rpcs.respond_to? :update_certificate_revocation_list
2869
+ @update_certificate_revocation_list = ::Gapic::Config::Method.new update_certificate_revocation_list_config
2870
+ create_certificate_template_config = parent_rpcs.create_certificate_template if parent_rpcs.respond_to? :create_certificate_template
2871
+ @create_certificate_template = ::Gapic::Config::Method.new create_certificate_template_config
2872
+ delete_certificate_template_config = parent_rpcs.delete_certificate_template if parent_rpcs.respond_to? :delete_certificate_template
2873
+ @delete_certificate_template = ::Gapic::Config::Method.new delete_certificate_template_config
2874
+ get_certificate_template_config = parent_rpcs.get_certificate_template if parent_rpcs.respond_to? :get_certificate_template
2875
+ @get_certificate_template = ::Gapic::Config::Method.new get_certificate_template_config
2876
+ list_certificate_templates_config = parent_rpcs.list_certificate_templates if parent_rpcs.respond_to? :list_certificate_templates
2877
+ @list_certificate_templates = ::Gapic::Config::Method.new list_certificate_templates_config
2878
+ update_certificate_template_config = parent_rpcs.update_certificate_template if parent_rpcs.respond_to? :update_certificate_template
2879
+ @update_certificate_template = ::Gapic::Config::Method.new update_certificate_template_config
2880
+
2881
+ yield self if block_given?
2882
+ end
2883
+ end
2884
+ end
2885
+ end
2886
+ end
2887
+ end
2888
+ end
2889
+ end
2890
+ end
2891
+ end
2892
+ end