google-cloud-certificate_manager-v1 0.4.2 → 0.5.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,2249 @@
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/certificatemanager/v1/certificate_manager_pb"
21
+ require "google/cloud/certificate_manager/v1/certificate_manager/rest/service_stub"
22
+ require "google/cloud/location/rest"
23
+
24
+ module Google
25
+ module Cloud
26
+ module CertificateManager
27
+ module V1
28
+ module CertificateManager
29
+ module Rest
30
+ ##
31
+ # REST client for the CertificateManager service.
32
+ #
33
+ # API Overview
34
+ #
35
+ # Certificates Manager API allows customers to see and manage all their TLS
36
+ # certificates.
37
+ #
38
+ # Certificates Manager API service provides methods to manage certificates,
39
+ # group them into collections, and create serving configuration that can be
40
+ # easily applied to other Cloud resources e.g. Target Proxies.
41
+ #
42
+ # Data Model
43
+ #
44
+ # The Certificates Manager service exposes the following resources:
45
+ #
46
+ # * `Certificate` that describes a single TLS certificate.
47
+ # * `CertificateMap` that describes a collection of certificates that can be
48
+ # attached to a target resource.
49
+ # * `CertificateMapEntry` that describes a single configuration entry that
50
+ # consists of a SNI and a group of certificates. It's a subresource of
51
+ # CertificateMap.
52
+ #
53
+ # Certificate, CertificateMap and CertificateMapEntry IDs
54
+ # have to fully match the regexp `[a-z0-9-]{1,63}`. In other words,
55
+ # - only lower case letters, digits, and hyphen are allowed
56
+ # - length of the resource ID has to be in [1,63] range.
57
+ #
58
+ # Provides methods to manage Cloud Certificate Manager entities.
59
+ #
60
+ class Client
61
+ include Paths
62
+
63
+ # @private
64
+ attr_reader :certificate_manager_stub
65
+
66
+ ##
67
+ # Configure the CertificateManager Client class.
68
+ #
69
+ # See {::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client::Configuration}
70
+ # for a description of the configuration fields.
71
+ #
72
+ # @example
73
+ #
74
+ # # Modify the configuration for all CertificateManager clients
75
+ # ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.configure do |config|
76
+ # config.timeout = 10.0
77
+ # end
78
+ #
79
+ # @yield [config] Configure the Client client.
80
+ # @yieldparam config [Client::Configuration]
81
+ #
82
+ # @return [Client::Configuration]
83
+ #
84
+ def self.configure
85
+ @configure ||= begin
86
+ namespace = ["Google", "Cloud", "CertificateManager", "V1"]
87
+ parent_config = while namespace.any?
88
+ parent_name = namespace.join "::"
89
+ parent_const = const_get parent_name
90
+ break parent_const.configure if parent_const.respond_to? :configure
91
+ namespace.pop
92
+ end
93
+ default_config = Client::Configuration.new parent_config
94
+
95
+ default_config.rpcs.list_certificates.timeout = 60.0
96
+ default_config.rpcs.list_certificates.retry_policy = {
97
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
98
+ }
99
+
100
+ default_config.rpcs.get_certificate.timeout = 60.0
101
+ default_config.rpcs.get_certificate.retry_policy = {
102
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
103
+ }
104
+
105
+ default_config.rpcs.create_certificate.timeout = 60.0
106
+ default_config.rpcs.create_certificate.retry_policy = {
107
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
108
+ }
109
+
110
+ default_config.rpcs.update_certificate.timeout = 60.0
111
+ default_config.rpcs.update_certificate.retry_policy = {
112
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
113
+ }
114
+
115
+ default_config.rpcs.delete_certificate.timeout = 60.0
116
+ default_config.rpcs.delete_certificate.retry_policy = {
117
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
118
+ }
119
+
120
+ default_config.rpcs.list_certificate_maps.timeout = 60.0
121
+ default_config.rpcs.list_certificate_maps.retry_policy = {
122
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
123
+ }
124
+
125
+ default_config.rpcs.get_certificate_map.timeout = 60.0
126
+ default_config.rpcs.get_certificate_map.retry_policy = {
127
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
128
+ }
129
+
130
+ default_config.rpcs.create_certificate_map.timeout = 60.0
131
+ default_config.rpcs.create_certificate_map.retry_policy = {
132
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
133
+ }
134
+
135
+ default_config.rpcs.update_certificate_map.timeout = 60.0
136
+ default_config.rpcs.update_certificate_map.retry_policy = {
137
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
138
+ }
139
+
140
+ default_config.rpcs.delete_certificate_map.timeout = 60.0
141
+ default_config.rpcs.delete_certificate_map.retry_policy = {
142
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
143
+ }
144
+
145
+ default_config.rpcs.list_certificate_map_entries.timeout = 60.0
146
+ default_config.rpcs.list_certificate_map_entries.retry_policy = {
147
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
148
+ }
149
+
150
+ default_config.rpcs.get_certificate_map_entry.timeout = 60.0
151
+ default_config.rpcs.get_certificate_map_entry.retry_policy = {
152
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
153
+ }
154
+
155
+ default_config.rpcs.create_certificate_map_entry.timeout = 60.0
156
+ default_config.rpcs.create_certificate_map_entry.retry_policy = {
157
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
158
+ }
159
+
160
+ default_config.rpcs.update_certificate_map_entry.timeout = 60.0
161
+ default_config.rpcs.update_certificate_map_entry.retry_policy = {
162
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
163
+ }
164
+
165
+ default_config.rpcs.delete_certificate_map_entry.timeout = 60.0
166
+ default_config.rpcs.delete_certificate_map_entry.retry_policy = {
167
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
168
+ }
169
+
170
+ default_config.rpcs.list_dns_authorizations.timeout = 60.0
171
+ default_config.rpcs.list_dns_authorizations.retry_policy = {
172
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
173
+ }
174
+
175
+ default_config.rpcs.get_dns_authorization.timeout = 60.0
176
+ default_config.rpcs.get_dns_authorization.retry_policy = {
177
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
178
+ }
179
+
180
+ default_config.rpcs.create_dns_authorization.timeout = 60.0
181
+ default_config.rpcs.create_dns_authorization.retry_policy = {
182
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
183
+ }
184
+
185
+ default_config.rpcs.update_dns_authorization.timeout = 60.0
186
+ default_config.rpcs.update_dns_authorization.retry_policy = {
187
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
188
+ }
189
+
190
+ default_config.rpcs.delete_dns_authorization.timeout = 60.0
191
+ default_config.rpcs.delete_dns_authorization.retry_policy = {
192
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
193
+ }
194
+
195
+ default_config.rpcs.list_certificate_issuance_configs.timeout = 60.0
196
+ default_config.rpcs.list_certificate_issuance_configs.retry_policy = {
197
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
198
+ }
199
+
200
+ default_config.rpcs.get_certificate_issuance_config.timeout = 60.0
201
+ default_config.rpcs.get_certificate_issuance_config.retry_policy = {
202
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
203
+ }
204
+
205
+ default_config.rpcs.create_certificate_issuance_config.timeout = 60.0
206
+ default_config.rpcs.create_certificate_issuance_config.retry_policy = {
207
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
208
+ }
209
+
210
+ default_config.rpcs.delete_certificate_issuance_config.timeout = 60.0
211
+ default_config.rpcs.delete_certificate_issuance_config.retry_policy = {
212
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
213
+ }
214
+
215
+ default_config
216
+ end
217
+ yield @configure if block_given?
218
+ @configure
219
+ end
220
+
221
+ ##
222
+ # Configure the CertificateManager Client instance.
223
+ #
224
+ # The configuration is set to the derived mode, meaning that values can be changed,
225
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
226
+ # should be made on {Client.configure}.
227
+ #
228
+ # See {::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client::Configuration}
229
+ # for a description of the configuration fields.
230
+ #
231
+ # @yield [config] Configure the Client client.
232
+ # @yieldparam config [Client::Configuration]
233
+ #
234
+ # @return [Client::Configuration]
235
+ #
236
+ def configure
237
+ yield @config if block_given?
238
+ @config
239
+ end
240
+
241
+ ##
242
+ # Create a new CertificateManager REST client object.
243
+ #
244
+ # @example
245
+ #
246
+ # # Create a client using the default configuration
247
+ # client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new
248
+ #
249
+ # # Create a client using a custom configuration
250
+ # client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config|
251
+ # config.timeout = 10.0
252
+ # end
253
+ #
254
+ # @yield [config] Configure the CertificateManager client.
255
+ # @yieldparam config [Client::Configuration]
256
+ #
257
+ def initialize
258
+ # Create the configuration object
259
+ @config = Configuration.new Client.configure
260
+
261
+ # Yield the configuration if needed
262
+ yield @config if block_given?
263
+
264
+ # Create credentials
265
+ credentials = @config.credentials
266
+ # Use self-signed JWT if the endpoint is unchanged from default,
267
+ # but only if the default endpoint does not have a region prefix.
268
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
269
+ !@config.endpoint.split(".").first.include?("-")
270
+ credentials ||= Credentials.default scope: @config.scope,
271
+ enable_self_signed_jwt: enable_self_signed_jwt
272
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
273
+ credentials = Credentials.new credentials, scope: @config.scope
274
+ end
275
+
276
+ @quota_project_id = @config.quota_project
277
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
278
+
279
+ @operations_client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Operations.new do |config|
280
+ config.credentials = credentials
281
+ config.quota_project = @quota_project_id
282
+ config.endpoint = @config.endpoint
283
+ end
284
+
285
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
286
+ config.credentials = credentials
287
+ config.quota_project = @quota_project_id
288
+ config.endpoint = @config.endpoint
289
+ config.bindings_override = @config.bindings_override
290
+ end
291
+
292
+ @certificate_manager_stub = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
293
+ end
294
+
295
+ ##
296
+ # Get the associated client for long-running operations.
297
+ #
298
+ # @return [::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Operations]
299
+ #
300
+ attr_reader :operations_client
301
+
302
+ ##
303
+ # Get the associated client for mix-in of the Locations.
304
+ #
305
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
306
+ #
307
+ attr_reader :location_client
308
+
309
+ # Service calls
310
+
311
+ ##
312
+ # Lists Certificates in a given project and location.
313
+ #
314
+ # @overload list_certificates(request, options = nil)
315
+ # Pass arguments to `list_certificates` via a request object, either of type
316
+ # {::Google::Cloud::CertificateManager::V1::ListCertificatesRequest} or an equivalent Hash.
317
+ #
318
+ # @param request [::Google::Cloud::CertificateManager::V1::ListCertificatesRequest, ::Hash]
319
+ # A request object representing the call parameters. Required. To specify no
320
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
321
+ # @param options [::Gapic::CallOptions, ::Hash]
322
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
323
+ #
324
+ # @overload list_certificates(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
325
+ # Pass arguments to `list_certificates` via keyword arguments. Note that at
326
+ # least one keyword argument is required. To specify no parameters, or to keep all
327
+ # the default parameter values, pass an empty Hash as a request object (see above).
328
+ #
329
+ # @param parent [::String]
330
+ # Required. The project and location from which the certificate should be
331
+ # listed, specified in the format `projects/*/locations/*`.
332
+ # @param page_size [::Integer]
333
+ # Maximum number of certificates to return per call.
334
+ # @param page_token [::String]
335
+ # The value returned by the last `ListCertificatesResponse`. Indicates that
336
+ # this is a continuation of a prior `ListCertificates` call, and that the
337
+ # system should return the next page of data.
338
+ # @param filter [::String]
339
+ # Filter expression to restrict the Certificates returned.
340
+ # @param order_by [::String]
341
+ # A list of Certificate field names used to specify the order of the returned
342
+ # results. The default sorting order is ascending. To specify descending
343
+ # order for a field, add a suffix " desc".
344
+ # @yield [result, operation] Access the result along with the TransportOperation object
345
+ # @yieldparam result [::Google::Cloud::CertificateManager::V1::ListCertificatesResponse]
346
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
347
+ #
348
+ # @return [::Google::Cloud::CertificateManager::V1::ListCertificatesResponse]
349
+ #
350
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
351
+ def list_certificates request, options = nil
352
+ raise ::ArgumentError, "request must be provided" if request.nil?
353
+
354
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::ListCertificatesRequest
355
+
356
+ # Converts hash and nil to an options object
357
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
358
+
359
+ # Customize the options with defaults
360
+ call_metadata = @config.rpcs.list_certificates.metadata.to_h
361
+
362
+ # Set x-goog-api-client and x-goog-user-project headers
363
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
364
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
365
+ gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION,
366
+ transports_version_send: [:rest]
367
+
368
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
369
+
370
+ options.apply_defaults timeout: @config.rpcs.list_certificates.timeout,
371
+ metadata: call_metadata,
372
+ retry_policy: @config.rpcs.list_certificates.retry_policy
373
+
374
+ options.apply_defaults timeout: @config.timeout,
375
+ metadata: @config.metadata,
376
+ retry_policy: @config.retry_policy
377
+
378
+ @certificate_manager_stub.list_certificates request, options do |result, operation|
379
+ yield result, operation if block_given?
380
+ return result
381
+ end
382
+ rescue ::Gapic::Rest::Error => e
383
+ raise ::Google::Cloud::Error.from_error(e)
384
+ end
385
+
386
+ ##
387
+ # Gets details of a single Certificate.
388
+ #
389
+ # @overload get_certificate(request, options = nil)
390
+ # Pass arguments to `get_certificate` via a request object, either of type
391
+ # {::Google::Cloud::CertificateManager::V1::GetCertificateRequest} or an equivalent Hash.
392
+ #
393
+ # @param request [::Google::Cloud::CertificateManager::V1::GetCertificateRequest, ::Hash]
394
+ # A request object representing the call parameters. Required. To specify no
395
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
396
+ # @param options [::Gapic::CallOptions, ::Hash]
397
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
398
+ #
399
+ # @overload get_certificate(name: nil)
400
+ # Pass arguments to `get_certificate` via keyword arguments. Note that at
401
+ # least one keyword argument is required. To specify no parameters, or to keep all
402
+ # the default parameter values, pass an empty Hash as a request object (see above).
403
+ #
404
+ # @param name [::String]
405
+ # Required. A name of the certificate to describe. Must be in the format
406
+ # `projects/*/locations/*/certificates/*`.
407
+ # @yield [result, operation] Access the result along with the TransportOperation object
408
+ # @yieldparam result [::Google::Cloud::CertificateManager::V1::Certificate]
409
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
410
+ #
411
+ # @return [::Google::Cloud::CertificateManager::V1::Certificate]
412
+ #
413
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
414
+ def get_certificate request, options = nil
415
+ raise ::ArgumentError, "request must be provided" if request.nil?
416
+
417
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::GetCertificateRequest
418
+
419
+ # Converts hash and nil to an options object
420
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
421
+
422
+ # Customize the options with defaults
423
+ call_metadata = @config.rpcs.get_certificate.metadata.to_h
424
+
425
+ # Set x-goog-api-client and x-goog-user-project headers
426
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
427
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
428
+ gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION,
429
+ transports_version_send: [:rest]
430
+
431
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
432
+
433
+ options.apply_defaults timeout: @config.rpcs.get_certificate.timeout,
434
+ metadata: call_metadata,
435
+ retry_policy: @config.rpcs.get_certificate.retry_policy
436
+
437
+ options.apply_defaults timeout: @config.timeout,
438
+ metadata: @config.metadata,
439
+ retry_policy: @config.retry_policy
440
+
441
+ @certificate_manager_stub.get_certificate request, options do |result, operation|
442
+ yield result, operation if block_given?
443
+ return result
444
+ end
445
+ rescue ::Gapic::Rest::Error => e
446
+ raise ::Google::Cloud::Error.from_error(e)
447
+ end
448
+
449
+ ##
450
+ # Creates a new Certificate in a given project and location.
451
+ #
452
+ # @overload create_certificate(request, options = nil)
453
+ # Pass arguments to `create_certificate` via a request object, either of type
454
+ # {::Google::Cloud::CertificateManager::V1::CreateCertificateRequest} or an equivalent Hash.
455
+ #
456
+ # @param request [::Google::Cloud::CertificateManager::V1::CreateCertificateRequest, ::Hash]
457
+ # A request object representing the call parameters. Required. To specify no
458
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
459
+ # @param options [::Gapic::CallOptions, ::Hash]
460
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
461
+ #
462
+ # @overload create_certificate(parent: nil, certificate_id: nil, certificate: nil)
463
+ # Pass arguments to `create_certificate` via keyword arguments. Note that at
464
+ # least one keyword argument is required. To specify no parameters, or to keep all
465
+ # the default parameter values, pass an empty Hash as a request object (see above).
466
+ #
467
+ # @param parent [::String]
468
+ # Required. The parent resource of the certificate. Must be in the format
469
+ # `projects/*/locations/*`.
470
+ # @param certificate_id [::String]
471
+ # Required. A user-provided name of the certificate.
472
+ # @param certificate [::Google::Cloud::CertificateManager::V1::Certificate, ::Hash]
473
+ # Required. A definition of the certificate to create.
474
+ # @yield [result, operation] Access the result along with the TransportOperation object
475
+ # @yieldparam result [::Gapic::Operation]
476
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
477
+ #
478
+ # @return [::Gapic::Operation]
479
+ #
480
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
481
+ def create_certificate request, options = nil
482
+ raise ::ArgumentError, "request must be provided" if request.nil?
483
+
484
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::CreateCertificateRequest
485
+
486
+ # Converts hash and nil to an options object
487
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
488
+
489
+ # Customize the options with defaults
490
+ call_metadata = @config.rpcs.create_certificate.metadata.to_h
491
+
492
+ # Set x-goog-api-client and x-goog-user-project headers
493
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
494
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
495
+ gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION,
496
+ transports_version_send: [:rest]
497
+
498
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
499
+
500
+ options.apply_defaults timeout: @config.rpcs.create_certificate.timeout,
501
+ metadata: call_metadata,
502
+ retry_policy: @config.rpcs.create_certificate.retry_policy
503
+
504
+ options.apply_defaults timeout: @config.timeout,
505
+ metadata: @config.metadata,
506
+ retry_policy: @config.retry_policy
507
+
508
+ @certificate_manager_stub.create_certificate request, options do |result, operation|
509
+ result = ::Gapic::Operation.new result, @operations_client, options: options
510
+ yield result, operation if block_given?
511
+ return result
512
+ end
513
+ rescue ::Gapic::Rest::Error => e
514
+ raise ::Google::Cloud::Error.from_error(e)
515
+ end
516
+
517
+ ##
518
+ # Updates a Certificate.
519
+ #
520
+ # @overload update_certificate(request, options = nil)
521
+ # Pass arguments to `update_certificate` via a request object, either of type
522
+ # {::Google::Cloud::CertificateManager::V1::UpdateCertificateRequest} or an equivalent Hash.
523
+ #
524
+ # @param request [::Google::Cloud::CertificateManager::V1::UpdateCertificateRequest, ::Hash]
525
+ # A request object representing the call parameters. Required. To specify no
526
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
527
+ # @param options [::Gapic::CallOptions, ::Hash]
528
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
529
+ #
530
+ # @overload update_certificate(certificate: nil, update_mask: nil)
531
+ # Pass arguments to `update_certificate` via keyword arguments. Note that at
532
+ # least one keyword argument is required. To specify no parameters, or to keep all
533
+ # the default parameter values, pass an empty Hash as a request object (see above).
534
+ #
535
+ # @param certificate [::Google::Cloud::CertificateManager::V1::Certificate, ::Hash]
536
+ # Required. A definition of the certificate to update.
537
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
538
+ # Required. The update mask applies to the resource. For the `FieldMask`
539
+ # definition, see
540
+ # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
541
+ # @yield [result, operation] Access the result along with the TransportOperation object
542
+ # @yieldparam result [::Gapic::Operation]
543
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
544
+ #
545
+ # @return [::Gapic::Operation]
546
+ #
547
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
548
+ def update_certificate request, options = nil
549
+ raise ::ArgumentError, "request must be provided" if request.nil?
550
+
551
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::UpdateCertificateRequest
552
+
553
+ # Converts hash and nil to an options object
554
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
555
+
556
+ # Customize the options with defaults
557
+ call_metadata = @config.rpcs.update_certificate.metadata.to_h
558
+
559
+ # Set x-goog-api-client and x-goog-user-project headers
560
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
561
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
562
+ gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION,
563
+ transports_version_send: [:rest]
564
+
565
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
566
+
567
+ options.apply_defaults timeout: @config.rpcs.update_certificate.timeout,
568
+ metadata: call_metadata,
569
+ retry_policy: @config.rpcs.update_certificate.retry_policy
570
+
571
+ options.apply_defaults timeout: @config.timeout,
572
+ metadata: @config.metadata,
573
+ retry_policy: @config.retry_policy
574
+
575
+ @certificate_manager_stub.update_certificate request, options do |result, operation|
576
+ result = ::Gapic::Operation.new result, @operations_client, options: options
577
+ yield result, operation if block_given?
578
+ return result
579
+ end
580
+ rescue ::Gapic::Rest::Error => e
581
+ raise ::Google::Cloud::Error.from_error(e)
582
+ end
583
+
584
+ ##
585
+ # Deletes a single Certificate.
586
+ #
587
+ # @overload delete_certificate(request, options = nil)
588
+ # Pass arguments to `delete_certificate` via a request object, either of type
589
+ # {::Google::Cloud::CertificateManager::V1::DeleteCertificateRequest} or an equivalent Hash.
590
+ #
591
+ # @param request [::Google::Cloud::CertificateManager::V1::DeleteCertificateRequest, ::Hash]
592
+ # A request object representing the call parameters. Required. To specify no
593
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
594
+ # @param options [::Gapic::CallOptions, ::Hash]
595
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
596
+ #
597
+ # @overload delete_certificate(name: nil)
598
+ # Pass arguments to `delete_certificate` via keyword arguments. Note that at
599
+ # least one keyword argument is required. To specify no parameters, or to keep all
600
+ # the default parameter values, pass an empty Hash as a request object (see above).
601
+ #
602
+ # @param name [::String]
603
+ # Required. A name of the certificate to delete. Must be in the format
604
+ # `projects/*/locations/*/certificates/*`.
605
+ # @yield [result, operation] Access the result along with the TransportOperation object
606
+ # @yieldparam result [::Gapic::Operation]
607
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
608
+ #
609
+ # @return [::Gapic::Operation]
610
+ #
611
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
612
+ def delete_certificate request, options = nil
613
+ raise ::ArgumentError, "request must be provided" if request.nil?
614
+
615
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::DeleteCertificateRequest
616
+
617
+ # Converts hash and nil to an options object
618
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
619
+
620
+ # Customize the options with defaults
621
+ call_metadata = @config.rpcs.delete_certificate.metadata.to_h
622
+
623
+ # Set x-goog-api-client and x-goog-user-project headers
624
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
625
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
626
+ gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION,
627
+ transports_version_send: [:rest]
628
+
629
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
630
+
631
+ options.apply_defaults timeout: @config.rpcs.delete_certificate.timeout,
632
+ metadata: call_metadata,
633
+ retry_policy: @config.rpcs.delete_certificate.retry_policy
634
+
635
+ options.apply_defaults timeout: @config.timeout,
636
+ metadata: @config.metadata,
637
+ retry_policy: @config.retry_policy
638
+
639
+ @certificate_manager_stub.delete_certificate request, options do |result, operation|
640
+ result = ::Gapic::Operation.new result, @operations_client, options: options
641
+ yield result, operation if block_given?
642
+ return result
643
+ end
644
+ rescue ::Gapic::Rest::Error => e
645
+ raise ::Google::Cloud::Error.from_error(e)
646
+ end
647
+
648
+ ##
649
+ # Lists CertificateMaps in a given project and location.
650
+ #
651
+ # @overload list_certificate_maps(request, options = nil)
652
+ # Pass arguments to `list_certificate_maps` via a request object, either of type
653
+ # {::Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest} or an equivalent Hash.
654
+ #
655
+ # @param request [::Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest, ::Hash]
656
+ # A request object representing the call parameters. Required. To specify no
657
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
658
+ # @param options [::Gapic::CallOptions, ::Hash]
659
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
660
+ #
661
+ # @overload list_certificate_maps(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
662
+ # Pass arguments to `list_certificate_maps` via keyword arguments. Note that at
663
+ # least one keyword argument is required. To specify no parameters, or to keep all
664
+ # the default parameter values, pass an empty Hash as a request object (see above).
665
+ #
666
+ # @param parent [::String]
667
+ # Required. The project and location from which the certificate maps should
668
+ # be listed, specified in the format `projects/*/locations/*`.
669
+ # @param page_size [::Integer]
670
+ # Maximum number of certificate maps to return per call.
671
+ # @param page_token [::String]
672
+ # The value returned by the last `ListCertificateMapsResponse`. Indicates
673
+ # that this is a continuation of a prior `ListCertificateMaps` call, and that
674
+ # the system should return the next page of data.
675
+ # @param filter [::String]
676
+ # Filter expression to restrict the Certificates Maps returned.
677
+ # @param order_by [::String]
678
+ # A list of Certificate Map field names used to specify the order of the
679
+ # returned results. The default sorting order is ascending. To specify
680
+ # descending order for a field, add a suffix " desc".
681
+ # @yield [result, operation] Access the result along with the TransportOperation object
682
+ # @yieldparam result [::Google::Cloud::CertificateManager::V1::ListCertificateMapsResponse]
683
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
684
+ #
685
+ # @return [::Google::Cloud::CertificateManager::V1::ListCertificateMapsResponse]
686
+ #
687
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
688
+ def list_certificate_maps request, options = nil
689
+ raise ::ArgumentError, "request must be provided" if request.nil?
690
+
691
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest
692
+
693
+ # Converts hash and nil to an options object
694
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
695
+
696
+ # Customize the options with defaults
697
+ call_metadata = @config.rpcs.list_certificate_maps.metadata.to_h
698
+
699
+ # Set x-goog-api-client and x-goog-user-project headers
700
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
701
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
702
+ gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION,
703
+ transports_version_send: [:rest]
704
+
705
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
706
+
707
+ options.apply_defaults timeout: @config.rpcs.list_certificate_maps.timeout,
708
+ metadata: call_metadata,
709
+ retry_policy: @config.rpcs.list_certificate_maps.retry_policy
710
+
711
+ options.apply_defaults timeout: @config.timeout,
712
+ metadata: @config.metadata,
713
+ retry_policy: @config.retry_policy
714
+
715
+ @certificate_manager_stub.list_certificate_maps request, options do |result, operation|
716
+ yield result, operation if block_given?
717
+ return result
718
+ end
719
+ rescue ::Gapic::Rest::Error => e
720
+ raise ::Google::Cloud::Error.from_error(e)
721
+ end
722
+
723
+ ##
724
+ # Gets details of a single CertificateMap.
725
+ #
726
+ # @overload get_certificate_map(request, options = nil)
727
+ # Pass arguments to `get_certificate_map` via a request object, either of type
728
+ # {::Google::Cloud::CertificateManager::V1::GetCertificateMapRequest} or an equivalent Hash.
729
+ #
730
+ # @param request [::Google::Cloud::CertificateManager::V1::GetCertificateMapRequest, ::Hash]
731
+ # A request object representing the call parameters. Required. To specify no
732
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
733
+ # @param options [::Gapic::CallOptions, ::Hash]
734
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
735
+ #
736
+ # @overload get_certificate_map(name: nil)
737
+ # Pass arguments to `get_certificate_map` via keyword arguments. Note that at
738
+ # least one keyword argument is required. To specify no parameters, or to keep all
739
+ # the default parameter values, pass an empty Hash as a request object (see above).
740
+ #
741
+ # @param name [::String]
742
+ # Required. A name of the certificate map to describe. Must be in the format
743
+ # `projects/*/locations/*/certificateMaps/*`.
744
+ # @yield [result, operation] Access the result along with the TransportOperation object
745
+ # @yieldparam result [::Google::Cloud::CertificateManager::V1::CertificateMap]
746
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
747
+ #
748
+ # @return [::Google::Cloud::CertificateManager::V1::CertificateMap]
749
+ #
750
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
751
+ def get_certificate_map request, options = nil
752
+ raise ::ArgumentError, "request must be provided" if request.nil?
753
+
754
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::GetCertificateMapRequest
755
+
756
+ # Converts hash and nil to an options object
757
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
758
+
759
+ # Customize the options with defaults
760
+ call_metadata = @config.rpcs.get_certificate_map.metadata.to_h
761
+
762
+ # Set x-goog-api-client and x-goog-user-project headers
763
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
764
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
765
+ gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION,
766
+ transports_version_send: [:rest]
767
+
768
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
769
+
770
+ options.apply_defaults timeout: @config.rpcs.get_certificate_map.timeout,
771
+ metadata: call_metadata,
772
+ retry_policy: @config.rpcs.get_certificate_map.retry_policy
773
+
774
+ options.apply_defaults timeout: @config.timeout,
775
+ metadata: @config.metadata,
776
+ retry_policy: @config.retry_policy
777
+
778
+ @certificate_manager_stub.get_certificate_map request, options do |result, operation|
779
+ yield result, operation if block_given?
780
+ return result
781
+ end
782
+ rescue ::Gapic::Rest::Error => e
783
+ raise ::Google::Cloud::Error.from_error(e)
784
+ end
785
+
786
+ ##
787
+ # Creates a new CertificateMap in a given project and location.
788
+ #
789
+ # @overload create_certificate_map(request, options = nil)
790
+ # Pass arguments to `create_certificate_map` via a request object, either of type
791
+ # {::Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest} or an equivalent Hash.
792
+ #
793
+ # @param request [::Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest, ::Hash]
794
+ # A request object representing the call parameters. Required. To specify no
795
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
796
+ # @param options [::Gapic::CallOptions, ::Hash]
797
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
798
+ #
799
+ # @overload create_certificate_map(parent: nil, certificate_map_id: nil, certificate_map: nil)
800
+ # Pass arguments to `create_certificate_map` via keyword arguments. Note that at
801
+ # least one keyword argument is required. To specify no parameters, or to keep all
802
+ # the default parameter values, pass an empty Hash as a request object (see above).
803
+ #
804
+ # @param parent [::String]
805
+ # Required. The parent resource of the certificate map. Must be in the format
806
+ # `projects/*/locations/*`.
807
+ # @param certificate_map_id [::String]
808
+ # Required. A user-provided name of the certificate map.
809
+ # @param certificate_map [::Google::Cloud::CertificateManager::V1::CertificateMap, ::Hash]
810
+ # Required. A definition of the certificate map to create.
811
+ # @yield [result, operation] Access the result along with the TransportOperation object
812
+ # @yieldparam result [::Gapic::Operation]
813
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
814
+ #
815
+ # @return [::Gapic::Operation]
816
+ #
817
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
818
+ def create_certificate_map request, options = nil
819
+ raise ::ArgumentError, "request must be provided" if request.nil?
820
+
821
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest
822
+
823
+ # Converts hash and nil to an options object
824
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
825
+
826
+ # Customize the options with defaults
827
+ call_metadata = @config.rpcs.create_certificate_map.metadata.to_h
828
+
829
+ # Set x-goog-api-client and x-goog-user-project headers
830
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
831
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
832
+ gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION,
833
+ transports_version_send: [:rest]
834
+
835
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
836
+
837
+ options.apply_defaults timeout: @config.rpcs.create_certificate_map.timeout,
838
+ metadata: call_metadata,
839
+ retry_policy: @config.rpcs.create_certificate_map.retry_policy
840
+
841
+ options.apply_defaults timeout: @config.timeout,
842
+ metadata: @config.metadata,
843
+ retry_policy: @config.retry_policy
844
+
845
+ @certificate_manager_stub.create_certificate_map request, options do |result, operation|
846
+ result = ::Gapic::Operation.new result, @operations_client, options: options
847
+ yield result, operation if block_given?
848
+ return result
849
+ end
850
+ rescue ::Gapic::Rest::Error => e
851
+ raise ::Google::Cloud::Error.from_error(e)
852
+ end
853
+
854
+ ##
855
+ # Updates a CertificateMap.
856
+ #
857
+ # @overload update_certificate_map(request, options = nil)
858
+ # Pass arguments to `update_certificate_map` via a request object, either of type
859
+ # {::Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest} or an equivalent Hash.
860
+ #
861
+ # @param request [::Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest, ::Hash]
862
+ # A request object representing the call parameters. Required. To specify no
863
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
864
+ # @param options [::Gapic::CallOptions, ::Hash]
865
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
866
+ #
867
+ # @overload update_certificate_map(certificate_map: nil, update_mask: nil)
868
+ # Pass arguments to `update_certificate_map` via keyword arguments. Note that at
869
+ # least one keyword argument is required. To specify no parameters, or to keep all
870
+ # the default parameter values, pass an empty Hash as a request object (see above).
871
+ #
872
+ # @param certificate_map [::Google::Cloud::CertificateManager::V1::CertificateMap, ::Hash]
873
+ # Required. A definition of the certificate map to update.
874
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
875
+ # Required. The update mask applies to the resource. For the `FieldMask`
876
+ # definition, see
877
+ # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
878
+ # @yield [result, operation] Access the result along with the TransportOperation object
879
+ # @yieldparam result [::Gapic::Operation]
880
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
881
+ #
882
+ # @return [::Gapic::Operation]
883
+ #
884
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
885
+ def update_certificate_map request, options = nil
886
+ raise ::ArgumentError, "request must be provided" if request.nil?
887
+
888
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest
889
+
890
+ # Converts hash and nil to an options object
891
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
892
+
893
+ # Customize the options with defaults
894
+ call_metadata = @config.rpcs.update_certificate_map.metadata.to_h
895
+
896
+ # Set x-goog-api-client and x-goog-user-project headers
897
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
898
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
899
+ gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION,
900
+ transports_version_send: [:rest]
901
+
902
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
903
+
904
+ options.apply_defaults timeout: @config.rpcs.update_certificate_map.timeout,
905
+ metadata: call_metadata,
906
+ retry_policy: @config.rpcs.update_certificate_map.retry_policy
907
+
908
+ options.apply_defaults timeout: @config.timeout,
909
+ metadata: @config.metadata,
910
+ retry_policy: @config.retry_policy
911
+
912
+ @certificate_manager_stub.update_certificate_map request, options do |result, operation|
913
+ result = ::Gapic::Operation.new result, @operations_client, options: options
914
+ yield result, operation if block_given?
915
+ return result
916
+ end
917
+ rescue ::Gapic::Rest::Error => e
918
+ raise ::Google::Cloud::Error.from_error(e)
919
+ end
920
+
921
+ ##
922
+ # Deletes a single CertificateMap. A Certificate Map can't be deleted
923
+ # if it contains Certificate Map Entries. Remove all the entries from
924
+ # the map before calling this method.
925
+ #
926
+ # @overload delete_certificate_map(request, options = nil)
927
+ # Pass arguments to `delete_certificate_map` via a request object, either of type
928
+ # {::Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest} or an equivalent Hash.
929
+ #
930
+ # @param request [::Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest, ::Hash]
931
+ # A request object representing the call parameters. Required. To specify no
932
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
933
+ # @param options [::Gapic::CallOptions, ::Hash]
934
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
935
+ #
936
+ # @overload delete_certificate_map(name: nil)
937
+ # Pass arguments to `delete_certificate_map` via keyword arguments. Note that at
938
+ # least one keyword argument is required. To specify no parameters, or to keep all
939
+ # the default parameter values, pass an empty Hash as a request object (see above).
940
+ #
941
+ # @param name [::String]
942
+ # Required. A name of the certificate map to delete. Must be in the format
943
+ # `projects/*/locations/*/certificateMaps/*`.
944
+ # @yield [result, operation] Access the result along with the TransportOperation object
945
+ # @yieldparam result [::Gapic::Operation]
946
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
947
+ #
948
+ # @return [::Gapic::Operation]
949
+ #
950
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
951
+ def delete_certificate_map request, options = nil
952
+ raise ::ArgumentError, "request must be provided" if request.nil?
953
+
954
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest
955
+
956
+ # Converts hash and nil to an options object
957
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
958
+
959
+ # Customize the options with defaults
960
+ call_metadata = @config.rpcs.delete_certificate_map.metadata.to_h
961
+
962
+ # Set x-goog-api-client and x-goog-user-project headers
963
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
964
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
965
+ gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION,
966
+ transports_version_send: [:rest]
967
+
968
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
969
+
970
+ options.apply_defaults timeout: @config.rpcs.delete_certificate_map.timeout,
971
+ metadata: call_metadata,
972
+ retry_policy: @config.rpcs.delete_certificate_map.retry_policy
973
+
974
+ options.apply_defaults timeout: @config.timeout,
975
+ metadata: @config.metadata,
976
+ retry_policy: @config.retry_policy
977
+
978
+ @certificate_manager_stub.delete_certificate_map request, options do |result, operation|
979
+ result = ::Gapic::Operation.new result, @operations_client, options: options
980
+ yield result, operation if block_given?
981
+ return result
982
+ end
983
+ rescue ::Gapic::Rest::Error => e
984
+ raise ::Google::Cloud::Error.from_error(e)
985
+ end
986
+
987
+ ##
988
+ # Lists CertificateMapEntries in a given project and location.
989
+ #
990
+ # @overload list_certificate_map_entries(request, options = nil)
991
+ # Pass arguments to `list_certificate_map_entries` via a request object, either of type
992
+ # {::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest} or an equivalent Hash.
993
+ #
994
+ # @param request [::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest, ::Hash]
995
+ # A request object representing the call parameters. Required. To specify no
996
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
997
+ # @param options [::Gapic::CallOptions, ::Hash]
998
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
999
+ #
1000
+ # @overload list_certificate_map_entries(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1001
+ # Pass arguments to `list_certificate_map_entries` via keyword arguments. Note that at
1002
+ # least one keyword argument is required. To specify no parameters, or to keep all
1003
+ # the default parameter values, pass an empty Hash as a request object (see above).
1004
+ #
1005
+ # @param parent [::String]
1006
+ # Required. The project, location and certificate map from which the
1007
+ # certificate map entries should be listed, specified in the format
1008
+ # `projects/*/locations/*/certificateMaps/*`.
1009
+ # @param page_size [::Integer]
1010
+ # Maximum number of certificate map entries to return. The service may return
1011
+ # fewer than this value.
1012
+ # If unspecified, at most 50 certificate map entries will be returned.
1013
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
1014
+ # @param page_token [::String]
1015
+ # The value returned by the last `ListCertificateMapEntriesResponse`.
1016
+ # Indicates that this is a continuation of a prior
1017
+ # `ListCertificateMapEntries` call, and that the system should return the
1018
+ # next page of data.
1019
+ # @param filter [::String]
1020
+ # Filter expression to restrict the returned Certificate Map Entries.
1021
+ # @param order_by [::String]
1022
+ # A list of Certificate Map Entry field names used to specify
1023
+ # the order of the returned results. The default sorting order is ascending.
1024
+ # To specify descending order for a field, add a suffix " desc".
1025
+ # @yield [result, operation] Access the result along with the TransportOperation object
1026
+ # @yieldparam result [::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesResponse]
1027
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1028
+ #
1029
+ # @return [::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesResponse]
1030
+ #
1031
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1032
+ def list_certificate_map_entries request, options = nil
1033
+ raise ::ArgumentError, "request must be provided" if request.nil?
1034
+
1035
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest
1036
+
1037
+ # Converts hash and nil to an options object
1038
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1039
+
1040
+ # Customize the options with defaults
1041
+ call_metadata = @config.rpcs.list_certificate_map_entries.metadata.to_h
1042
+
1043
+ # Set x-goog-api-client and x-goog-user-project headers
1044
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1045
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1046
+ gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION,
1047
+ transports_version_send: [:rest]
1048
+
1049
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1050
+
1051
+ options.apply_defaults timeout: @config.rpcs.list_certificate_map_entries.timeout,
1052
+ metadata: call_metadata,
1053
+ retry_policy: @config.rpcs.list_certificate_map_entries.retry_policy
1054
+
1055
+ options.apply_defaults timeout: @config.timeout,
1056
+ metadata: @config.metadata,
1057
+ retry_policy: @config.retry_policy
1058
+
1059
+ @certificate_manager_stub.list_certificate_map_entries request, options do |result, operation|
1060
+ yield result, operation if block_given?
1061
+ return result
1062
+ end
1063
+ rescue ::Gapic::Rest::Error => e
1064
+ raise ::Google::Cloud::Error.from_error(e)
1065
+ end
1066
+
1067
+ ##
1068
+ # Gets details of a single CertificateMapEntry.
1069
+ #
1070
+ # @overload get_certificate_map_entry(request, options = nil)
1071
+ # Pass arguments to `get_certificate_map_entry` via a request object, either of type
1072
+ # {::Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest} or an equivalent Hash.
1073
+ #
1074
+ # @param request [::Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest, ::Hash]
1075
+ # A request object representing the call parameters. Required. To specify no
1076
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1077
+ # @param options [::Gapic::CallOptions, ::Hash]
1078
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1079
+ #
1080
+ # @overload get_certificate_map_entry(name: nil)
1081
+ # Pass arguments to `get_certificate_map_entry` via keyword arguments. Note that at
1082
+ # least one keyword argument is required. To specify no parameters, or to keep all
1083
+ # the default parameter values, pass an empty Hash as a request object (see above).
1084
+ #
1085
+ # @param name [::String]
1086
+ # Required. A name of the certificate map entry to describe. Must be in the
1087
+ # format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
1088
+ # @yield [result, operation] Access the result along with the TransportOperation object
1089
+ # @yieldparam result [::Google::Cloud::CertificateManager::V1::CertificateMapEntry]
1090
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1091
+ #
1092
+ # @return [::Google::Cloud::CertificateManager::V1::CertificateMapEntry]
1093
+ #
1094
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1095
+ def get_certificate_map_entry request, options = nil
1096
+ raise ::ArgumentError, "request must be provided" if request.nil?
1097
+
1098
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest
1099
+
1100
+ # Converts hash and nil to an options object
1101
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1102
+
1103
+ # Customize the options with defaults
1104
+ call_metadata = @config.rpcs.get_certificate_map_entry.metadata.to_h
1105
+
1106
+ # Set x-goog-api-client and x-goog-user-project headers
1107
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1108
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1109
+ gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION,
1110
+ transports_version_send: [:rest]
1111
+
1112
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1113
+
1114
+ options.apply_defaults timeout: @config.rpcs.get_certificate_map_entry.timeout,
1115
+ metadata: call_metadata,
1116
+ retry_policy: @config.rpcs.get_certificate_map_entry.retry_policy
1117
+
1118
+ options.apply_defaults timeout: @config.timeout,
1119
+ metadata: @config.metadata,
1120
+ retry_policy: @config.retry_policy
1121
+
1122
+ @certificate_manager_stub.get_certificate_map_entry request, options do |result, operation|
1123
+ yield result, operation if block_given?
1124
+ return result
1125
+ end
1126
+ rescue ::Gapic::Rest::Error => e
1127
+ raise ::Google::Cloud::Error.from_error(e)
1128
+ end
1129
+
1130
+ ##
1131
+ # Creates a new CertificateMapEntry in a given project and location.
1132
+ #
1133
+ # @overload create_certificate_map_entry(request, options = nil)
1134
+ # Pass arguments to `create_certificate_map_entry` via a request object, either of type
1135
+ # {::Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest} or an equivalent Hash.
1136
+ #
1137
+ # @param request [::Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest, ::Hash]
1138
+ # A request object representing the call parameters. Required. To specify no
1139
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1140
+ # @param options [::Gapic::CallOptions, ::Hash]
1141
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1142
+ #
1143
+ # @overload create_certificate_map_entry(parent: nil, certificate_map_entry_id: nil, certificate_map_entry: nil)
1144
+ # Pass arguments to `create_certificate_map_entry` via keyword arguments. Note that at
1145
+ # least one keyword argument is required. To specify no parameters, or to keep all
1146
+ # the default parameter values, pass an empty Hash as a request object (see above).
1147
+ #
1148
+ # @param parent [::String]
1149
+ # Required. The parent resource of the certificate map entry. Must be in the
1150
+ # format `projects/*/locations/*/certificateMaps/*`.
1151
+ # @param certificate_map_entry_id [::String]
1152
+ # Required. A user-provided name of the certificate map entry.
1153
+ # @param certificate_map_entry [::Google::Cloud::CertificateManager::V1::CertificateMapEntry, ::Hash]
1154
+ # Required. A definition of the certificate map entry to create.
1155
+ # @yield [result, operation] Access the result along with the TransportOperation object
1156
+ # @yieldparam result [::Gapic::Operation]
1157
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1158
+ #
1159
+ # @return [::Gapic::Operation]
1160
+ #
1161
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1162
+ def create_certificate_map_entry request, options = nil
1163
+ raise ::ArgumentError, "request must be provided" if request.nil?
1164
+
1165
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest
1166
+
1167
+ # Converts hash and nil to an options object
1168
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1169
+
1170
+ # Customize the options with defaults
1171
+ call_metadata = @config.rpcs.create_certificate_map_entry.metadata.to_h
1172
+
1173
+ # Set x-goog-api-client and x-goog-user-project headers
1174
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1175
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1176
+ gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION,
1177
+ transports_version_send: [:rest]
1178
+
1179
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1180
+
1181
+ options.apply_defaults timeout: @config.rpcs.create_certificate_map_entry.timeout,
1182
+ metadata: call_metadata,
1183
+ retry_policy: @config.rpcs.create_certificate_map_entry.retry_policy
1184
+
1185
+ options.apply_defaults timeout: @config.timeout,
1186
+ metadata: @config.metadata,
1187
+ retry_policy: @config.retry_policy
1188
+
1189
+ @certificate_manager_stub.create_certificate_map_entry request, options do |result, operation|
1190
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1191
+ yield result, operation if block_given?
1192
+ return result
1193
+ end
1194
+ rescue ::Gapic::Rest::Error => e
1195
+ raise ::Google::Cloud::Error.from_error(e)
1196
+ end
1197
+
1198
+ ##
1199
+ # Updates a CertificateMapEntry.
1200
+ #
1201
+ # @overload update_certificate_map_entry(request, options = nil)
1202
+ # Pass arguments to `update_certificate_map_entry` via a request object, either of type
1203
+ # {::Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest} or an equivalent Hash.
1204
+ #
1205
+ # @param request [::Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest, ::Hash]
1206
+ # A request object representing the call parameters. Required. To specify no
1207
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1208
+ # @param options [::Gapic::CallOptions, ::Hash]
1209
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1210
+ #
1211
+ # @overload update_certificate_map_entry(certificate_map_entry: nil, update_mask: nil)
1212
+ # Pass arguments to `update_certificate_map_entry` via keyword arguments. Note that at
1213
+ # least one keyword argument is required. To specify no parameters, or to keep all
1214
+ # the default parameter values, pass an empty Hash as a request object (see above).
1215
+ #
1216
+ # @param certificate_map_entry [::Google::Cloud::CertificateManager::V1::CertificateMapEntry, ::Hash]
1217
+ # Required. A definition of the certificate map entry to create map entry.
1218
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1219
+ # Required. The update mask applies to the resource. For the `FieldMask`
1220
+ # definition, see
1221
+ # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
1222
+ # @yield [result, operation] Access the result along with the TransportOperation object
1223
+ # @yieldparam result [::Gapic::Operation]
1224
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1225
+ #
1226
+ # @return [::Gapic::Operation]
1227
+ #
1228
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1229
+ def update_certificate_map_entry request, options = nil
1230
+ raise ::ArgumentError, "request must be provided" if request.nil?
1231
+
1232
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest
1233
+
1234
+ # Converts hash and nil to an options object
1235
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1236
+
1237
+ # Customize the options with defaults
1238
+ call_metadata = @config.rpcs.update_certificate_map_entry.metadata.to_h
1239
+
1240
+ # Set x-goog-api-client and x-goog-user-project headers
1241
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1242
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1243
+ gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION,
1244
+ transports_version_send: [:rest]
1245
+
1246
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1247
+
1248
+ options.apply_defaults timeout: @config.rpcs.update_certificate_map_entry.timeout,
1249
+ metadata: call_metadata,
1250
+ retry_policy: @config.rpcs.update_certificate_map_entry.retry_policy
1251
+
1252
+ options.apply_defaults timeout: @config.timeout,
1253
+ metadata: @config.metadata,
1254
+ retry_policy: @config.retry_policy
1255
+
1256
+ @certificate_manager_stub.update_certificate_map_entry request, options do |result, operation|
1257
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1258
+ yield result, operation if block_given?
1259
+ return result
1260
+ end
1261
+ rescue ::Gapic::Rest::Error => e
1262
+ raise ::Google::Cloud::Error.from_error(e)
1263
+ end
1264
+
1265
+ ##
1266
+ # Deletes a single CertificateMapEntry.
1267
+ #
1268
+ # @overload delete_certificate_map_entry(request, options = nil)
1269
+ # Pass arguments to `delete_certificate_map_entry` via a request object, either of type
1270
+ # {::Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest} or an equivalent Hash.
1271
+ #
1272
+ # @param request [::Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest, ::Hash]
1273
+ # A request object representing the call parameters. Required. To specify no
1274
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1275
+ # @param options [::Gapic::CallOptions, ::Hash]
1276
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1277
+ #
1278
+ # @overload delete_certificate_map_entry(name: nil)
1279
+ # Pass arguments to `delete_certificate_map_entry` via keyword arguments. Note that at
1280
+ # least one keyword argument is required. To specify no parameters, or to keep all
1281
+ # the default parameter values, pass an empty Hash as a request object (see above).
1282
+ #
1283
+ # @param name [::String]
1284
+ # Required. A name of the certificate map entry to delete. Must be in the
1285
+ # format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
1286
+ # @yield [result, operation] Access the result along with the TransportOperation object
1287
+ # @yieldparam result [::Gapic::Operation]
1288
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1289
+ #
1290
+ # @return [::Gapic::Operation]
1291
+ #
1292
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1293
+ def delete_certificate_map_entry request, options = nil
1294
+ raise ::ArgumentError, "request must be provided" if request.nil?
1295
+
1296
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest
1297
+
1298
+ # Converts hash and nil to an options object
1299
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1300
+
1301
+ # Customize the options with defaults
1302
+ call_metadata = @config.rpcs.delete_certificate_map_entry.metadata.to_h
1303
+
1304
+ # Set x-goog-api-client and x-goog-user-project headers
1305
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1306
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1307
+ gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION,
1308
+ transports_version_send: [:rest]
1309
+
1310
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1311
+
1312
+ options.apply_defaults timeout: @config.rpcs.delete_certificate_map_entry.timeout,
1313
+ metadata: call_metadata,
1314
+ retry_policy: @config.rpcs.delete_certificate_map_entry.retry_policy
1315
+
1316
+ options.apply_defaults timeout: @config.timeout,
1317
+ metadata: @config.metadata,
1318
+ retry_policy: @config.retry_policy
1319
+
1320
+ @certificate_manager_stub.delete_certificate_map_entry request, options do |result, operation|
1321
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1322
+ yield result, operation if block_given?
1323
+ return result
1324
+ end
1325
+ rescue ::Gapic::Rest::Error => e
1326
+ raise ::Google::Cloud::Error.from_error(e)
1327
+ end
1328
+
1329
+ ##
1330
+ # Lists DnsAuthorizations in a given project and location.
1331
+ #
1332
+ # @overload list_dns_authorizations(request, options = nil)
1333
+ # Pass arguments to `list_dns_authorizations` via a request object, either of type
1334
+ # {::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest} or an equivalent Hash.
1335
+ #
1336
+ # @param request [::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest, ::Hash]
1337
+ # A request object representing the call parameters. Required. To specify no
1338
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1339
+ # @param options [::Gapic::CallOptions, ::Hash]
1340
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1341
+ #
1342
+ # @overload list_dns_authorizations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1343
+ # Pass arguments to `list_dns_authorizations` via keyword arguments. Note that at
1344
+ # least one keyword argument is required. To specify no parameters, or to keep all
1345
+ # the default parameter values, pass an empty Hash as a request object (see above).
1346
+ #
1347
+ # @param parent [::String]
1348
+ # Required. The project and location from which the dns authorizations should
1349
+ # be listed, specified in the format `projects/*/locations/*`.
1350
+ # @param page_size [::Integer]
1351
+ # Maximum number of dns authorizations to return per call.
1352
+ # @param page_token [::String]
1353
+ # The value returned by the last `ListDnsAuthorizationsResponse`. Indicates
1354
+ # that this is a continuation of a prior `ListDnsAuthorizations` call, and
1355
+ # that the system should return the next page of data.
1356
+ # @param filter [::String]
1357
+ # Filter expression to restrict the Dns Authorizations returned.
1358
+ # @param order_by [::String]
1359
+ # A list of Dns Authorization field names used to specify the order of the
1360
+ # returned results. The default sorting order is ascending. To specify
1361
+ # descending order for a field, add a suffix " desc".
1362
+ # @yield [result, operation] Access the result along with the TransportOperation object
1363
+ # @yieldparam result [::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsResponse]
1364
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1365
+ #
1366
+ # @return [::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsResponse]
1367
+ #
1368
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1369
+ def list_dns_authorizations request, options = nil
1370
+ raise ::ArgumentError, "request must be provided" if request.nil?
1371
+
1372
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest
1373
+
1374
+ # Converts hash and nil to an options object
1375
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1376
+
1377
+ # Customize the options with defaults
1378
+ call_metadata = @config.rpcs.list_dns_authorizations.metadata.to_h
1379
+
1380
+ # Set x-goog-api-client and x-goog-user-project headers
1381
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1382
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1383
+ gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION,
1384
+ transports_version_send: [:rest]
1385
+
1386
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1387
+
1388
+ options.apply_defaults timeout: @config.rpcs.list_dns_authorizations.timeout,
1389
+ metadata: call_metadata,
1390
+ retry_policy: @config.rpcs.list_dns_authorizations.retry_policy
1391
+
1392
+ options.apply_defaults timeout: @config.timeout,
1393
+ metadata: @config.metadata,
1394
+ retry_policy: @config.retry_policy
1395
+
1396
+ @certificate_manager_stub.list_dns_authorizations request, options do |result, operation|
1397
+ yield result, operation if block_given?
1398
+ return result
1399
+ end
1400
+ rescue ::Gapic::Rest::Error => e
1401
+ raise ::Google::Cloud::Error.from_error(e)
1402
+ end
1403
+
1404
+ ##
1405
+ # Gets details of a single DnsAuthorization.
1406
+ #
1407
+ # @overload get_dns_authorization(request, options = nil)
1408
+ # Pass arguments to `get_dns_authorization` via a request object, either of type
1409
+ # {::Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest} or an equivalent Hash.
1410
+ #
1411
+ # @param request [::Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest, ::Hash]
1412
+ # A request object representing the call parameters. Required. To specify no
1413
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1414
+ # @param options [::Gapic::CallOptions, ::Hash]
1415
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1416
+ #
1417
+ # @overload get_dns_authorization(name: nil)
1418
+ # Pass arguments to `get_dns_authorization` via keyword arguments. Note that at
1419
+ # least one keyword argument is required. To specify no parameters, or to keep all
1420
+ # the default parameter values, pass an empty Hash as a request object (see above).
1421
+ #
1422
+ # @param name [::String]
1423
+ # Required. A name of the dns authorization to describe. Must be in the
1424
+ # format `projects/*/locations/*/dnsAuthorizations/*`.
1425
+ # @yield [result, operation] Access the result along with the TransportOperation object
1426
+ # @yieldparam result [::Google::Cloud::CertificateManager::V1::DnsAuthorization]
1427
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1428
+ #
1429
+ # @return [::Google::Cloud::CertificateManager::V1::DnsAuthorization]
1430
+ #
1431
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1432
+ def get_dns_authorization request, options = nil
1433
+ raise ::ArgumentError, "request must be provided" if request.nil?
1434
+
1435
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest
1436
+
1437
+ # Converts hash and nil to an options object
1438
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1439
+
1440
+ # Customize the options with defaults
1441
+ call_metadata = @config.rpcs.get_dns_authorization.metadata.to_h
1442
+
1443
+ # Set x-goog-api-client and x-goog-user-project headers
1444
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1445
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1446
+ gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION,
1447
+ transports_version_send: [:rest]
1448
+
1449
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1450
+
1451
+ options.apply_defaults timeout: @config.rpcs.get_dns_authorization.timeout,
1452
+ metadata: call_metadata,
1453
+ retry_policy: @config.rpcs.get_dns_authorization.retry_policy
1454
+
1455
+ options.apply_defaults timeout: @config.timeout,
1456
+ metadata: @config.metadata,
1457
+ retry_policy: @config.retry_policy
1458
+
1459
+ @certificate_manager_stub.get_dns_authorization request, options do |result, operation|
1460
+ yield result, operation if block_given?
1461
+ return result
1462
+ end
1463
+ rescue ::Gapic::Rest::Error => e
1464
+ raise ::Google::Cloud::Error.from_error(e)
1465
+ end
1466
+
1467
+ ##
1468
+ # Creates a new DnsAuthorization in a given project and location.
1469
+ #
1470
+ # @overload create_dns_authorization(request, options = nil)
1471
+ # Pass arguments to `create_dns_authorization` via a request object, either of type
1472
+ # {::Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest} or an equivalent Hash.
1473
+ #
1474
+ # @param request [::Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest, ::Hash]
1475
+ # A request object representing the call parameters. Required. To specify no
1476
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1477
+ # @param options [::Gapic::CallOptions, ::Hash]
1478
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1479
+ #
1480
+ # @overload create_dns_authorization(parent: nil, dns_authorization_id: nil, dns_authorization: nil)
1481
+ # Pass arguments to `create_dns_authorization` via keyword arguments. Note that at
1482
+ # least one keyword argument is required. To specify no parameters, or to keep all
1483
+ # the default parameter values, pass an empty Hash as a request object (see above).
1484
+ #
1485
+ # @param parent [::String]
1486
+ # Required. The parent resource of the dns authorization. Must be in the
1487
+ # format `projects/*/locations/*`.
1488
+ # @param dns_authorization_id [::String]
1489
+ # Required. A user-provided name of the dns authorization.
1490
+ # @param dns_authorization [::Google::Cloud::CertificateManager::V1::DnsAuthorization, ::Hash]
1491
+ # Required. A definition of the dns authorization to create.
1492
+ # @yield [result, operation] Access the result along with the TransportOperation object
1493
+ # @yieldparam result [::Gapic::Operation]
1494
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1495
+ #
1496
+ # @return [::Gapic::Operation]
1497
+ #
1498
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1499
+ def create_dns_authorization request, options = nil
1500
+ raise ::ArgumentError, "request must be provided" if request.nil?
1501
+
1502
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest
1503
+
1504
+ # Converts hash and nil to an options object
1505
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1506
+
1507
+ # Customize the options with defaults
1508
+ call_metadata = @config.rpcs.create_dns_authorization.metadata.to_h
1509
+
1510
+ # Set x-goog-api-client and x-goog-user-project headers
1511
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1512
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1513
+ gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION,
1514
+ transports_version_send: [:rest]
1515
+
1516
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1517
+
1518
+ options.apply_defaults timeout: @config.rpcs.create_dns_authorization.timeout,
1519
+ metadata: call_metadata,
1520
+ retry_policy: @config.rpcs.create_dns_authorization.retry_policy
1521
+
1522
+ options.apply_defaults timeout: @config.timeout,
1523
+ metadata: @config.metadata,
1524
+ retry_policy: @config.retry_policy
1525
+
1526
+ @certificate_manager_stub.create_dns_authorization request, options do |result, operation|
1527
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1528
+ yield result, operation if block_given?
1529
+ return result
1530
+ end
1531
+ rescue ::Gapic::Rest::Error => e
1532
+ raise ::Google::Cloud::Error.from_error(e)
1533
+ end
1534
+
1535
+ ##
1536
+ # Updates a DnsAuthorization.
1537
+ #
1538
+ # @overload update_dns_authorization(request, options = nil)
1539
+ # Pass arguments to `update_dns_authorization` via a request object, either of type
1540
+ # {::Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest} or an equivalent Hash.
1541
+ #
1542
+ # @param request [::Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest, ::Hash]
1543
+ # A request object representing the call parameters. Required. To specify no
1544
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1545
+ # @param options [::Gapic::CallOptions, ::Hash]
1546
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1547
+ #
1548
+ # @overload update_dns_authorization(dns_authorization: nil, update_mask: nil)
1549
+ # Pass arguments to `update_dns_authorization` via keyword arguments. Note that at
1550
+ # least one keyword argument is required. To specify no parameters, or to keep all
1551
+ # the default parameter values, pass an empty Hash as a request object (see above).
1552
+ #
1553
+ # @param dns_authorization [::Google::Cloud::CertificateManager::V1::DnsAuthorization, ::Hash]
1554
+ # Required. A definition of the dns authorization to update.
1555
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1556
+ # Required. The update mask applies to the resource. For the `FieldMask`
1557
+ # definition, see
1558
+ # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
1559
+ # @yield [result, operation] Access the result along with the TransportOperation object
1560
+ # @yieldparam result [::Gapic::Operation]
1561
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1562
+ #
1563
+ # @return [::Gapic::Operation]
1564
+ #
1565
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1566
+ def update_dns_authorization request, options = nil
1567
+ raise ::ArgumentError, "request must be provided" if request.nil?
1568
+
1569
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest
1570
+
1571
+ # Converts hash and nil to an options object
1572
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1573
+
1574
+ # Customize the options with defaults
1575
+ call_metadata = @config.rpcs.update_dns_authorization.metadata.to_h
1576
+
1577
+ # Set x-goog-api-client and x-goog-user-project headers
1578
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1579
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1580
+ gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION,
1581
+ transports_version_send: [:rest]
1582
+
1583
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1584
+
1585
+ options.apply_defaults timeout: @config.rpcs.update_dns_authorization.timeout,
1586
+ metadata: call_metadata,
1587
+ retry_policy: @config.rpcs.update_dns_authorization.retry_policy
1588
+
1589
+ options.apply_defaults timeout: @config.timeout,
1590
+ metadata: @config.metadata,
1591
+ retry_policy: @config.retry_policy
1592
+
1593
+ @certificate_manager_stub.update_dns_authorization request, options do |result, operation|
1594
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1595
+ yield result, operation if block_given?
1596
+ return result
1597
+ end
1598
+ rescue ::Gapic::Rest::Error => e
1599
+ raise ::Google::Cloud::Error.from_error(e)
1600
+ end
1601
+
1602
+ ##
1603
+ # Deletes a single DnsAuthorization.
1604
+ #
1605
+ # @overload delete_dns_authorization(request, options = nil)
1606
+ # Pass arguments to `delete_dns_authorization` via a request object, either of type
1607
+ # {::Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest} or an equivalent Hash.
1608
+ #
1609
+ # @param request [::Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest, ::Hash]
1610
+ # A request object representing the call parameters. Required. To specify no
1611
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1612
+ # @param options [::Gapic::CallOptions, ::Hash]
1613
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1614
+ #
1615
+ # @overload delete_dns_authorization(name: nil)
1616
+ # Pass arguments to `delete_dns_authorization` via keyword arguments. Note that at
1617
+ # least one keyword argument is required. To specify no parameters, or to keep all
1618
+ # the default parameter values, pass an empty Hash as a request object (see above).
1619
+ #
1620
+ # @param name [::String]
1621
+ # Required. A name of the dns authorization to delete. Must be in the format
1622
+ # `projects/*/locations/*/dnsAuthorizations/*`.
1623
+ # @yield [result, operation] Access the result along with the TransportOperation object
1624
+ # @yieldparam result [::Gapic::Operation]
1625
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1626
+ #
1627
+ # @return [::Gapic::Operation]
1628
+ #
1629
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1630
+ def delete_dns_authorization request, options = nil
1631
+ raise ::ArgumentError, "request must be provided" if request.nil?
1632
+
1633
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest
1634
+
1635
+ # Converts hash and nil to an options object
1636
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1637
+
1638
+ # Customize the options with defaults
1639
+ call_metadata = @config.rpcs.delete_dns_authorization.metadata.to_h
1640
+
1641
+ # Set x-goog-api-client and x-goog-user-project headers
1642
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1643
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1644
+ gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION,
1645
+ transports_version_send: [:rest]
1646
+
1647
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1648
+
1649
+ options.apply_defaults timeout: @config.rpcs.delete_dns_authorization.timeout,
1650
+ metadata: call_metadata,
1651
+ retry_policy: @config.rpcs.delete_dns_authorization.retry_policy
1652
+
1653
+ options.apply_defaults timeout: @config.timeout,
1654
+ metadata: @config.metadata,
1655
+ retry_policy: @config.retry_policy
1656
+
1657
+ @certificate_manager_stub.delete_dns_authorization request, options do |result, operation|
1658
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1659
+ yield result, operation if block_given?
1660
+ return result
1661
+ end
1662
+ rescue ::Gapic::Rest::Error => e
1663
+ raise ::Google::Cloud::Error.from_error(e)
1664
+ end
1665
+
1666
+ ##
1667
+ # Lists CertificateIssuanceConfigs in a given project and location.
1668
+ #
1669
+ # @overload list_certificate_issuance_configs(request, options = nil)
1670
+ # Pass arguments to `list_certificate_issuance_configs` via a request object, either of type
1671
+ # {::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest} or an equivalent Hash.
1672
+ #
1673
+ # @param request [::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest, ::Hash]
1674
+ # A request object representing the call parameters. Required. To specify no
1675
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1676
+ # @param options [::Gapic::CallOptions, ::Hash]
1677
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1678
+ #
1679
+ # @overload list_certificate_issuance_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1680
+ # Pass arguments to `list_certificate_issuance_configs` via keyword arguments. Note that at
1681
+ # least one keyword argument is required. To specify no parameters, or to keep all
1682
+ # the default parameter values, pass an empty Hash as a request object (see above).
1683
+ #
1684
+ # @param parent [::String]
1685
+ # Required. The project and location from which the certificate should be
1686
+ # listed, specified in the format `projects/*/locations/*`.
1687
+ # @param page_size [::Integer]
1688
+ # Maximum number of certificate configs to return per call.
1689
+ # @param page_token [::String]
1690
+ # The value returned by the last `ListCertificateIssuanceConfigsResponse`.
1691
+ # Indicates that this is a continuation of a prior
1692
+ # `ListCertificateIssuanceConfigs` call, and that the system should return
1693
+ # the next page of data.
1694
+ # @param filter [::String]
1695
+ # Filter expression to restrict the Certificates Configs returned.
1696
+ # @param order_by [::String]
1697
+ # A list of Certificate Config field names used to specify the order of the
1698
+ # returned results. The default sorting order is ascending. To specify
1699
+ # descending order for a field, add a suffix " desc".
1700
+ # @yield [result, operation] Access the result along with the TransportOperation object
1701
+ # @yieldparam result [::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsResponse]
1702
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1703
+ #
1704
+ # @return [::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsResponse]
1705
+ #
1706
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1707
+ def list_certificate_issuance_configs request, options = nil
1708
+ raise ::ArgumentError, "request must be provided" if request.nil?
1709
+
1710
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest
1711
+
1712
+ # Converts hash and nil to an options object
1713
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1714
+
1715
+ # Customize the options with defaults
1716
+ call_metadata = @config.rpcs.list_certificate_issuance_configs.metadata.to_h
1717
+
1718
+ # Set x-goog-api-client and x-goog-user-project headers
1719
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1720
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1721
+ gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION,
1722
+ transports_version_send: [:rest]
1723
+
1724
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1725
+
1726
+ options.apply_defaults timeout: @config.rpcs.list_certificate_issuance_configs.timeout,
1727
+ metadata: call_metadata,
1728
+ retry_policy: @config.rpcs.list_certificate_issuance_configs.retry_policy
1729
+
1730
+ options.apply_defaults timeout: @config.timeout,
1731
+ metadata: @config.metadata,
1732
+ retry_policy: @config.retry_policy
1733
+
1734
+ @certificate_manager_stub.list_certificate_issuance_configs request, options do |result, operation|
1735
+ yield result, operation if block_given?
1736
+ return result
1737
+ end
1738
+ rescue ::Gapic::Rest::Error => e
1739
+ raise ::Google::Cloud::Error.from_error(e)
1740
+ end
1741
+
1742
+ ##
1743
+ # Gets details of a single CertificateIssuanceConfig.
1744
+ #
1745
+ # @overload get_certificate_issuance_config(request, options = nil)
1746
+ # Pass arguments to `get_certificate_issuance_config` via a request object, either of type
1747
+ # {::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest} or an equivalent Hash.
1748
+ #
1749
+ # @param request [::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest, ::Hash]
1750
+ # A request object representing the call parameters. Required. To specify no
1751
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1752
+ # @param options [::Gapic::CallOptions, ::Hash]
1753
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1754
+ #
1755
+ # @overload get_certificate_issuance_config(name: nil)
1756
+ # Pass arguments to `get_certificate_issuance_config` via keyword arguments. Note that at
1757
+ # least one keyword argument is required. To specify no parameters, or to keep all
1758
+ # the default parameter values, pass an empty Hash as a request object (see above).
1759
+ #
1760
+ # @param name [::String]
1761
+ # Required. A name of the certificate issuance config to describe. Must be in
1762
+ # the format `projects/*/locations/*/certificateIssuanceConfigs/*`.
1763
+ # @yield [result, operation] Access the result along with the TransportOperation object
1764
+ # @yieldparam result [::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig]
1765
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1766
+ #
1767
+ # @return [::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig]
1768
+ #
1769
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1770
+ def get_certificate_issuance_config request, options = nil
1771
+ raise ::ArgumentError, "request must be provided" if request.nil?
1772
+
1773
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest
1774
+
1775
+ # Converts hash and nil to an options object
1776
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1777
+
1778
+ # Customize the options with defaults
1779
+ call_metadata = @config.rpcs.get_certificate_issuance_config.metadata.to_h
1780
+
1781
+ # Set x-goog-api-client and x-goog-user-project headers
1782
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1783
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1784
+ gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION,
1785
+ transports_version_send: [:rest]
1786
+
1787
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1788
+
1789
+ options.apply_defaults timeout: @config.rpcs.get_certificate_issuance_config.timeout,
1790
+ metadata: call_metadata,
1791
+ retry_policy: @config.rpcs.get_certificate_issuance_config.retry_policy
1792
+
1793
+ options.apply_defaults timeout: @config.timeout,
1794
+ metadata: @config.metadata,
1795
+ retry_policy: @config.retry_policy
1796
+
1797
+ @certificate_manager_stub.get_certificate_issuance_config request, options do |result, operation|
1798
+ yield result, operation if block_given?
1799
+ return result
1800
+ end
1801
+ rescue ::Gapic::Rest::Error => e
1802
+ raise ::Google::Cloud::Error.from_error(e)
1803
+ end
1804
+
1805
+ ##
1806
+ # Creates a new CertificateIssuanceConfig in a given project and location.
1807
+ #
1808
+ # @overload create_certificate_issuance_config(request, options = nil)
1809
+ # Pass arguments to `create_certificate_issuance_config` via a request object, either of type
1810
+ # {::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest} or an equivalent Hash.
1811
+ #
1812
+ # @param request [::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest, ::Hash]
1813
+ # A request object representing the call parameters. Required. To specify no
1814
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1815
+ # @param options [::Gapic::CallOptions, ::Hash]
1816
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1817
+ #
1818
+ # @overload create_certificate_issuance_config(parent: nil, certificate_issuance_config_id: nil, certificate_issuance_config: nil)
1819
+ # Pass arguments to `create_certificate_issuance_config` via keyword arguments. Note that at
1820
+ # least one keyword argument is required. To specify no parameters, or to keep all
1821
+ # the default parameter values, pass an empty Hash as a request object (see above).
1822
+ #
1823
+ # @param parent [::String]
1824
+ # Required. The parent resource of the certificate issuance config. Must be
1825
+ # in the format `projects/*/locations/*`.
1826
+ # @param certificate_issuance_config_id [::String]
1827
+ # Required. A user-provided name of the certificate config.
1828
+ # @param certificate_issuance_config [::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig, ::Hash]
1829
+ # Required. A definition of the certificate issuance config to create.
1830
+ # @yield [result, operation] Access the result along with the TransportOperation object
1831
+ # @yieldparam result [::Gapic::Operation]
1832
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1833
+ #
1834
+ # @return [::Gapic::Operation]
1835
+ #
1836
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1837
+ def create_certificate_issuance_config request, options = nil
1838
+ raise ::ArgumentError, "request must be provided" if request.nil?
1839
+
1840
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest
1841
+
1842
+ # Converts hash and nil to an options object
1843
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1844
+
1845
+ # Customize the options with defaults
1846
+ call_metadata = @config.rpcs.create_certificate_issuance_config.metadata.to_h
1847
+
1848
+ # Set x-goog-api-client and x-goog-user-project headers
1849
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1850
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1851
+ gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION,
1852
+ transports_version_send: [:rest]
1853
+
1854
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1855
+
1856
+ options.apply_defaults timeout: @config.rpcs.create_certificate_issuance_config.timeout,
1857
+ metadata: call_metadata,
1858
+ retry_policy: @config.rpcs.create_certificate_issuance_config.retry_policy
1859
+
1860
+ options.apply_defaults timeout: @config.timeout,
1861
+ metadata: @config.metadata,
1862
+ retry_policy: @config.retry_policy
1863
+
1864
+ @certificate_manager_stub.create_certificate_issuance_config request, options do |result, operation|
1865
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1866
+ yield result, operation if block_given?
1867
+ return result
1868
+ end
1869
+ rescue ::Gapic::Rest::Error => e
1870
+ raise ::Google::Cloud::Error.from_error(e)
1871
+ end
1872
+
1873
+ ##
1874
+ # Deletes a single CertificateIssuanceConfig.
1875
+ #
1876
+ # @overload delete_certificate_issuance_config(request, options = nil)
1877
+ # Pass arguments to `delete_certificate_issuance_config` via a request object, either of type
1878
+ # {::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest} or an equivalent Hash.
1879
+ #
1880
+ # @param request [::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest, ::Hash]
1881
+ # A request object representing the call parameters. Required. To specify no
1882
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1883
+ # @param options [::Gapic::CallOptions, ::Hash]
1884
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1885
+ #
1886
+ # @overload delete_certificate_issuance_config(name: nil)
1887
+ # Pass arguments to `delete_certificate_issuance_config` via keyword arguments. Note that at
1888
+ # least one keyword argument is required. To specify no parameters, or to keep all
1889
+ # the default parameter values, pass an empty Hash as a request object (see above).
1890
+ #
1891
+ # @param name [::String]
1892
+ # Required. A name of the certificate issuance config to delete. Must be in
1893
+ # the format `projects/*/locations/*/certificateIssuanceConfigs/*`.
1894
+ # @yield [result, operation] Access the result along with the TransportOperation object
1895
+ # @yieldparam result [::Gapic::Operation]
1896
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1897
+ #
1898
+ # @return [::Gapic::Operation]
1899
+ #
1900
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1901
+ def delete_certificate_issuance_config request, options = nil
1902
+ raise ::ArgumentError, "request must be provided" if request.nil?
1903
+
1904
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest
1905
+
1906
+ # Converts hash and nil to an options object
1907
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1908
+
1909
+ # Customize the options with defaults
1910
+ call_metadata = @config.rpcs.delete_certificate_issuance_config.metadata.to_h
1911
+
1912
+ # Set x-goog-api-client and x-goog-user-project headers
1913
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1914
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1915
+ gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION,
1916
+ transports_version_send: [:rest]
1917
+
1918
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1919
+
1920
+ options.apply_defaults timeout: @config.rpcs.delete_certificate_issuance_config.timeout,
1921
+ metadata: call_metadata,
1922
+ retry_policy: @config.rpcs.delete_certificate_issuance_config.retry_policy
1923
+
1924
+ options.apply_defaults timeout: @config.timeout,
1925
+ metadata: @config.metadata,
1926
+ retry_policy: @config.retry_policy
1927
+
1928
+ @certificate_manager_stub.delete_certificate_issuance_config request, options do |result, operation|
1929
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1930
+ yield result, operation if block_given?
1931
+ return result
1932
+ end
1933
+ rescue ::Gapic::Rest::Error => e
1934
+ raise ::Google::Cloud::Error.from_error(e)
1935
+ end
1936
+
1937
+ ##
1938
+ # Configuration class for the CertificateManager REST API.
1939
+ #
1940
+ # This class represents the configuration for CertificateManager REST,
1941
+ # providing control over timeouts, retry behavior, logging, transport
1942
+ # parameters, and other low-level controls. Certain parameters can also be
1943
+ # applied individually to specific RPCs. See
1944
+ # {::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client::Configuration::Rpcs}
1945
+ # for a list of RPCs that can be configured independently.
1946
+ #
1947
+ # Configuration can be applied globally to all clients, or to a single client
1948
+ # on construction.
1949
+ #
1950
+ # @example
1951
+ #
1952
+ # # Modify the global config, setting the timeout for
1953
+ # # list_certificates to 20 seconds,
1954
+ # # and all remaining timeouts to 10 seconds.
1955
+ # ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.configure do |config|
1956
+ # config.timeout = 10.0
1957
+ # config.rpcs.list_certificates.timeout = 20.0
1958
+ # end
1959
+ #
1960
+ # # Apply the above configuration only to a new client.
1961
+ # client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config|
1962
+ # config.timeout = 10.0
1963
+ # config.rpcs.list_certificates.timeout = 20.0
1964
+ # end
1965
+ #
1966
+ # @!attribute [rw] endpoint
1967
+ # The hostname or hostname:port of the service endpoint.
1968
+ # Defaults to `"certificatemanager.googleapis.com"`.
1969
+ # @return [::String]
1970
+ # @!attribute [rw] credentials
1971
+ # Credentials to send with calls. You may provide any of the following types:
1972
+ # * (`String`) The path to a service account key file in JSON format
1973
+ # * (`Hash`) A service account key as a Hash
1974
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1975
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
1976
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1977
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
1978
+ # * (`nil`) indicating no credentials
1979
+ # @return [::Object]
1980
+ # @!attribute [rw] scope
1981
+ # The OAuth scopes
1982
+ # @return [::Array<::String>]
1983
+ # @!attribute [rw] lib_name
1984
+ # The library name as recorded in instrumentation and logging
1985
+ # @return [::String]
1986
+ # @!attribute [rw] lib_version
1987
+ # The library version as recorded in instrumentation and logging
1988
+ # @return [::String]
1989
+ # @!attribute [rw] timeout
1990
+ # The call timeout in seconds.
1991
+ # @return [::Numeric]
1992
+ # @!attribute [rw] metadata
1993
+ # Additional headers to be sent with the call.
1994
+ # @return [::Hash{::Symbol=>::String}]
1995
+ # @!attribute [rw] retry_policy
1996
+ # The retry policy. The value is a hash with the following keys:
1997
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1998
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1999
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2000
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2001
+ # trigger a retry.
2002
+ # @return [::Hash]
2003
+ # @!attribute [rw] quota_project
2004
+ # A separate project against which to charge quota.
2005
+ # @return [::String]
2006
+ #
2007
+ class Configuration
2008
+ extend ::Gapic::Config
2009
+
2010
+ config_attr :endpoint, "certificatemanager.googleapis.com", ::String
2011
+ config_attr :credentials, nil do |value|
2012
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
2013
+ allowed.any? { |klass| klass === value }
2014
+ end
2015
+ config_attr :scope, nil, ::String, ::Array, nil
2016
+ config_attr :lib_name, nil, ::String, nil
2017
+ config_attr :lib_version, nil, ::String, nil
2018
+ config_attr :timeout, nil, ::Numeric, nil
2019
+ config_attr :metadata, nil, ::Hash, nil
2020
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2021
+ config_attr :quota_project, nil, ::String, nil
2022
+
2023
+ # @private
2024
+ # Overrides for http bindings for the RPCs of this service
2025
+ # are only used when this service is used as mixin, and only
2026
+ # by the host service.
2027
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
2028
+ config_attr :bindings_override, {}, ::Hash, nil
2029
+
2030
+ # @private
2031
+ def initialize parent_config = nil
2032
+ @parent_config = parent_config unless parent_config.nil?
2033
+
2034
+ yield self if block_given?
2035
+ end
2036
+
2037
+ ##
2038
+ # Configurations for individual RPCs
2039
+ # @return [Rpcs]
2040
+ #
2041
+ def rpcs
2042
+ @rpcs ||= begin
2043
+ parent_rpcs = nil
2044
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
2045
+ Rpcs.new parent_rpcs
2046
+ end
2047
+ end
2048
+
2049
+ ##
2050
+ # Configuration RPC class for the CertificateManager API.
2051
+ #
2052
+ # Includes fields providing the configuration for each RPC in this service.
2053
+ # Each configuration object is of type `Gapic::Config::Method` and includes
2054
+ # the following configuration fields:
2055
+ #
2056
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
2057
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
2058
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
2059
+ # include the following keys:
2060
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2061
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2062
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2063
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2064
+ # trigger a retry.
2065
+ #
2066
+ class Rpcs
2067
+ ##
2068
+ # RPC-specific configuration for `list_certificates`
2069
+ # @return [::Gapic::Config::Method]
2070
+ #
2071
+ attr_reader :list_certificates
2072
+ ##
2073
+ # RPC-specific configuration for `get_certificate`
2074
+ # @return [::Gapic::Config::Method]
2075
+ #
2076
+ attr_reader :get_certificate
2077
+ ##
2078
+ # RPC-specific configuration for `create_certificate`
2079
+ # @return [::Gapic::Config::Method]
2080
+ #
2081
+ attr_reader :create_certificate
2082
+ ##
2083
+ # RPC-specific configuration for `update_certificate`
2084
+ # @return [::Gapic::Config::Method]
2085
+ #
2086
+ attr_reader :update_certificate
2087
+ ##
2088
+ # RPC-specific configuration for `delete_certificate`
2089
+ # @return [::Gapic::Config::Method]
2090
+ #
2091
+ attr_reader :delete_certificate
2092
+ ##
2093
+ # RPC-specific configuration for `list_certificate_maps`
2094
+ # @return [::Gapic::Config::Method]
2095
+ #
2096
+ attr_reader :list_certificate_maps
2097
+ ##
2098
+ # RPC-specific configuration for `get_certificate_map`
2099
+ # @return [::Gapic::Config::Method]
2100
+ #
2101
+ attr_reader :get_certificate_map
2102
+ ##
2103
+ # RPC-specific configuration for `create_certificate_map`
2104
+ # @return [::Gapic::Config::Method]
2105
+ #
2106
+ attr_reader :create_certificate_map
2107
+ ##
2108
+ # RPC-specific configuration for `update_certificate_map`
2109
+ # @return [::Gapic::Config::Method]
2110
+ #
2111
+ attr_reader :update_certificate_map
2112
+ ##
2113
+ # RPC-specific configuration for `delete_certificate_map`
2114
+ # @return [::Gapic::Config::Method]
2115
+ #
2116
+ attr_reader :delete_certificate_map
2117
+ ##
2118
+ # RPC-specific configuration for `list_certificate_map_entries`
2119
+ # @return [::Gapic::Config::Method]
2120
+ #
2121
+ attr_reader :list_certificate_map_entries
2122
+ ##
2123
+ # RPC-specific configuration for `get_certificate_map_entry`
2124
+ # @return [::Gapic::Config::Method]
2125
+ #
2126
+ attr_reader :get_certificate_map_entry
2127
+ ##
2128
+ # RPC-specific configuration for `create_certificate_map_entry`
2129
+ # @return [::Gapic::Config::Method]
2130
+ #
2131
+ attr_reader :create_certificate_map_entry
2132
+ ##
2133
+ # RPC-specific configuration for `update_certificate_map_entry`
2134
+ # @return [::Gapic::Config::Method]
2135
+ #
2136
+ attr_reader :update_certificate_map_entry
2137
+ ##
2138
+ # RPC-specific configuration for `delete_certificate_map_entry`
2139
+ # @return [::Gapic::Config::Method]
2140
+ #
2141
+ attr_reader :delete_certificate_map_entry
2142
+ ##
2143
+ # RPC-specific configuration for `list_dns_authorizations`
2144
+ # @return [::Gapic::Config::Method]
2145
+ #
2146
+ attr_reader :list_dns_authorizations
2147
+ ##
2148
+ # RPC-specific configuration for `get_dns_authorization`
2149
+ # @return [::Gapic::Config::Method]
2150
+ #
2151
+ attr_reader :get_dns_authorization
2152
+ ##
2153
+ # RPC-specific configuration for `create_dns_authorization`
2154
+ # @return [::Gapic::Config::Method]
2155
+ #
2156
+ attr_reader :create_dns_authorization
2157
+ ##
2158
+ # RPC-specific configuration for `update_dns_authorization`
2159
+ # @return [::Gapic::Config::Method]
2160
+ #
2161
+ attr_reader :update_dns_authorization
2162
+ ##
2163
+ # RPC-specific configuration for `delete_dns_authorization`
2164
+ # @return [::Gapic::Config::Method]
2165
+ #
2166
+ attr_reader :delete_dns_authorization
2167
+ ##
2168
+ # RPC-specific configuration for `list_certificate_issuance_configs`
2169
+ # @return [::Gapic::Config::Method]
2170
+ #
2171
+ attr_reader :list_certificate_issuance_configs
2172
+ ##
2173
+ # RPC-specific configuration for `get_certificate_issuance_config`
2174
+ # @return [::Gapic::Config::Method]
2175
+ #
2176
+ attr_reader :get_certificate_issuance_config
2177
+ ##
2178
+ # RPC-specific configuration for `create_certificate_issuance_config`
2179
+ # @return [::Gapic::Config::Method]
2180
+ #
2181
+ attr_reader :create_certificate_issuance_config
2182
+ ##
2183
+ # RPC-specific configuration for `delete_certificate_issuance_config`
2184
+ # @return [::Gapic::Config::Method]
2185
+ #
2186
+ attr_reader :delete_certificate_issuance_config
2187
+
2188
+ # @private
2189
+ def initialize parent_rpcs = nil
2190
+ list_certificates_config = parent_rpcs.list_certificates if parent_rpcs.respond_to? :list_certificates
2191
+ @list_certificates = ::Gapic::Config::Method.new list_certificates_config
2192
+ get_certificate_config = parent_rpcs.get_certificate if parent_rpcs.respond_to? :get_certificate
2193
+ @get_certificate = ::Gapic::Config::Method.new get_certificate_config
2194
+ create_certificate_config = parent_rpcs.create_certificate if parent_rpcs.respond_to? :create_certificate
2195
+ @create_certificate = ::Gapic::Config::Method.new create_certificate_config
2196
+ update_certificate_config = parent_rpcs.update_certificate if parent_rpcs.respond_to? :update_certificate
2197
+ @update_certificate = ::Gapic::Config::Method.new update_certificate_config
2198
+ delete_certificate_config = parent_rpcs.delete_certificate if parent_rpcs.respond_to? :delete_certificate
2199
+ @delete_certificate = ::Gapic::Config::Method.new delete_certificate_config
2200
+ list_certificate_maps_config = parent_rpcs.list_certificate_maps if parent_rpcs.respond_to? :list_certificate_maps
2201
+ @list_certificate_maps = ::Gapic::Config::Method.new list_certificate_maps_config
2202
+ get_certificate_map_config = parent_rpcs.get_certificate_map if parent_rpcs.respond_to? :get_certificate_map
2203
+ @get_certificate_map = ::Gapic::Config::Method.new get_certificate_map_config
2204
+ create_certificate_map_config = parent_rpcs.create_certificate_map if parent_rpcs.respond_to? :create_certificate_map
2205
+ @create_certificate_map = ::Gapic::Config::Method.new create_certificate_map_config
2206
+ update_certificate_map_config = parent_rpcs.update_certificate_map if parent_rpcs.respond_to? :update_certificate_map
2207
+ @update_certificate_map = ::Gapic::Config::Method.new update_certificate_map_config
2208
+ delete_certificate_map_config = parent_rpcs.delete_certificate_map if parent_rpcs.respond_to? :delete_certificate_map
2209
+ @delete_certificate_map = ::Gapic::Config::Method.new delete_certificate_map_config
2210
+ list_certificate_map_entries_config = parent_rpcs.list_certificate_map_entries if parent_rpcs.respond_to? :list_certificate_map_entries
2211
+ @list_certificate_map_entries = ::Gapic::Config::Method.new list_certificate_map_entries_config
2212
+ get_certificate_map_entry_config = parent_rpcs.get_certificate_map_entry if parent_rpcs.respond_to? :get_certificate_map_entry
2213
+ @get_certificate_map_entry = ::Gapic::Config::Method.new get_certificate_map_entry_config
2214
+ create_certificate_map_entry_config = parent_rpcs.create_certificate_map_entry if parent_rpcs.respond_to? :create_certificate_map_entry
2215
+ @create_certificate_map_entry = ::Gapic::Config::Method.new create_certificate_map_entry_config
2216
+ update_certificate_map_entry_config = parent_rpcs.update_certificate_map_entry if parent_rpcs.respond_to? :update_certificate_map_entry
2217
+ @update_certificate_map_entry = ::Gapic::Config::Method.new update_certificate_map_entry_config
2218
+ delete_certificate_map_entry_config = parent_rpcs.delete_certificate_map_entry if parent_rpcs.respond_to? :delete_certificate_map_entry
2219
+ @delete_certificate_map_entry = ::Gapic::Config::Method.new delete_certificate_map_entry_config
2220
+ list_dns_authorizations_config = parent_rpcs.list_dns_authorizations if parent_rpcs.respond_to? :list_dns_authorizations
2221
+ @list_dns_authorizations = ::Gapic::Config::Method.new list_dns_authorizations_config
2222
+ get_dns_authorization_config = parent_rpcs.get_dns_authorization if parent_rpcs.respond_to? :get_dns_authorization
2223
+ @get_dns_authorization = ::Gapic::Config::Method.new get_dns_authorization_config
2224
+ create_dns_authorization_config = parent_rpcs.create_dns_authorization if parent_rpcs.respond_to? :create_dns_authorization
2225
+ @create_dns_authorization = ::Gapic::Config::Method.new create_dns_authorization_config
2226
+ update_dns_authorization_config = parent_rpcs.update_dns_authorization if parent_rpcs.respond_to? :update_dns_authorization
2227
+ @update_dns_authorization = ::Gapic::Config::Method.new update_dns_authorization_config
2228
+ delete_dns_authorization_config = parent_rpcs.delete_dns_authorization if parent_rpcs.respond_to? :delete_dns_authorization
2229
+ @delete_dns_authorization = ::Gapic::Config::Method.new delete_dns_authorization_config
2230
+ list_certificate_issuance_configs_config = parent_rpcs.list_certificate_issuance_configs if parent_rpcs.respond_to? :list_certificate_issuance_configs
2231
+ @list_certificate_issuance_configs = ::Gapic::Config::Method.new list_certificate_issuance_configs_config
2232
+ get_certificate_issuance_config_config = parent_rpcs.get_certificate_issuance_config if parent_rpcs.respond_to? :get_certificate_issuance_config
2233
+ @get_certificate_issuance_config = ::Gapic::Config::Method.new get_certificate_issuance_config_config
2234
+ create_certificate_issuance_config_config = parent_rpcs.create_certificate_issuance_config if parent_rpcs.respond_to? :create_certificate_issuance_config
2235
+ @create_certificate_issuance_config = ::Gapic::Config::Method.new create_certificate_issuance_config_config
2236
+ delete_certificate_issuance_config_config = parent_rpcs.delete_certificate_issuance_config if parent_rpcs.respond_to? :delete_certificate_issuance_config
2237
+ @delete_certificate_issuance_config = ::Gapic::Config::Method.new delete_certificate_issuance_config_config
2238
+
2239
+ yield self if block_given?
2240
+ end
2241
+ end
2242
+ end
2243
+ end
2244
+ end
2245
+ end
2246
+ end
2247
+ end
2248
+ end
2249
+ end