google-cloud-security-private_ca-v1 0.1.0 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -83,7 +83,7 @@ module Google
83
83
  # Create credentials
84
84
  credentials = @config.credentials
85
85
  credentials ||= Credentials.default scope: @config.scope
86
- if credentials.is_a?(String) || credentials.is_a?(Hash)
86
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
87
87
  credentials = Credentials.new credentials, scope: @config.scope
88
88
  end
89
89
  @quota_project_id = @config.quota_project
@@ -144,6 +144,27 @@ module Google
144
144
  #
145
145
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
146
146
  #
147
+ # @example Basic example
148
+ # require "google/longrunning"
149
+ #
150
+ # # Create a client object. The client can be reused for multiple calls.
151
+ # client = Google::Longrunning::Operations::Client.new
152
+ #
153
+ # # Create a request. To set request fields, pass in keyword arguments.
154
+ # request = Google::Longrunning::ListOperationsRequest.new
155
+ #
156
+ # # Call the list_operations method.
157
+ # result = client.list_operations request
158
+ #
159
+ # # The returned object is of type Gapic::PagedEnumerable. You can
160
+ # # iterate over all elements by calling #each, and the enumerable
161
+ # # will lazily make API calls to fetch subsequent pages. Other
162
+ # # methods are also available for managing paging directly.
163
+ # result.each do |response|
164
+ # # Each element is of type ::Google::Longrunning::Operation.
165
+ # p response
166
+ # end
167
+ #
147
168
  def list_operations request, options = nil
148
169
  raise ::ArgumentError, "request must be provided" if request.nil?
149
170
 
@@ -161,16 +182,20 @@ module Google
161
182
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
162
183
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
163
184
 
164
- header_params = {
165
- "name" => request.name
166
- }
185
+ header_params = {}
186
+ if request.name
187
+ header_params["name"] = request.name
188
+ end
189
+
167
190
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
168
191
  metadata[:"x-goog-request-params"] ||= request_params_header
169
192
 
170
193
  options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
171
194
  metadata: metadata,
172
195
  retry_policy: @config.rpcs.list_operations.retry_policy
173
- options.apply_defaults metadata: @config.metadata,
196
+
197
+ options.apply_defaults timeout: @config.timeout,
198
+ metadata: @config.metadata,
174
199
  retry_policy: @config.retry_policy
175
200
 
176
201
  @operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
@@ -214,6 +239,28 @@ module Google
214
239
  #
215
240
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
216
241
  #
242
+ # @example Basic example
243
+ # require "google/longrunning"
244
+ #
245
+ # # Create a client object. The client can be reused for multiple calls.
246
+ # client = Google::Longrunning::Operations::Client.new
247
+ #
248
+ # # Create a request. To set request fields, pass in keyword arguments.
249
+ # request = Google::Longrunning::GetOperationRequest.new
250
+ #
251
+ # # Call the get_operation method.
252
+ # result = client.get_operation request
253
+ #
254
+ # # The returned object is of type Gapic::Operation. You can use this
255
+ # # object to check the status of an operation, cancel it, or wait
256
+ # # for results. Here is how to block until completion:
257
+ # result.wait_until_done! timeout: 60
258
+ # if result.response?
259
+ # p result.response
260
+ # else
261
+ # puts "Error!"
262
+ # end
263
+ #
217
264
  def get_operation request, options = nil
218
265
  raise ::ArgumentError, "request must be provided" if request.nil?
219
266
 
@@ -231,16 +278,20 @@ module Google
231
278
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
232
279
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
233
280
 
234
- header_params = {
235
- "name" => request.name
236
- }
281
+ header_params = {}
282
+ if request.name
283
+ header_params["name"] = request.name
284
+ end
285
+
237
286
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
238
287
  metadata[:"x-goog-request-params"] ||= request_params_header
239
288
 
240
289
  options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
241
290
  metadata: metadata,
242
291
  retry_policy: @config.rpcs.get_operation.retry_policy
243
- options.apply_defaults metadata: @config.metadata,
292
+
293
+ options.apply_defaults timeout: @config.timeout,
294
+ metadata: @config.metadata,
244
295
  retry_policy: @config.retry_policy
245
296
 
246
297
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
@@ -284,6 +335,21 @@ module Google
284
335
  #
285
336
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
286
337
  #
338
+ # @example Basic example
339
+ # require "google/longrunning"
340
+ #
341
+ # # Create a client object. The client can be reused for multiple calls.
342
+ # client = Google::Longrunning::Operations::Client.new
343
+ #
344
+ # # Create a request. To set request fields, pass in keyword arguments.
345
+ # request = Google::Longrunning::DeleteOperationRequest.new
346
+ #
347
+ # # Call the delete_operation method.
348
+ # result = client.delete_operation request
349
+ #
350
+ # # The returned object is of type Google::Protobuf::Empty.
351
+ # p result
352
+ #
287
353
  def delete_operation request, options = nil
288
354
  raise ::ArgumentError, "request must be provided" if request.nil?
289
355
 
@@ -301,16 +367,20 @@ module Google
301
367
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
302
368
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
303
369
 
304
- header_params = {
305
- "name" => request.name
306
- }
370
+ header_params = {}
371
+ if request.name
372
+ header_params["name"] = request.name
373
+ end
374
+
307
375
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
308
376
  metadata[:"x-goog-request-params"] ||= request_params_header
309
377
 
310
378
  options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
311
379
  metadata: metadata,
312
380
  retry_policy: @config.rpcs.delete_operation.retry_policy
313
- options.apply_defaults metadata: @config.metadata,
381
+
382
+ options.apply_defaults timeout: @config.timeout,
383
+ metadata: @config.metadata,
314
384
  retry_policy: @config.retry_policy
315
385
 
316
386
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
@@ -359,6 +429,21 @@ module Google
359
429
  #
360
430
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
361
431
  #
432
+ # @example Basic example
433
+ # require "google/longrunning"
434
+ #
435
+ # # Create a client object. The client can be reused for multiple calls.
436
+ # client = Google::Longrunning::Operations::Client.new
437
+ #
438
+ # # Create a request. To set request fields, pass in keyword arguments.
439
+ # request = Google::Longrunning::CancelOperationRequest.new
440
+ #
441
+ # # Call the cancel_operation method.
442
+ # result = client.cancel_operation request
443
+ #
444
+ # # The returned object is of type Google::Protobuf::Empty.
445
+ # p result
446
+ #
362
447
  def cancel_operation request, options = nil
363
448
  raise ::ArgumentError, "request must be provided" if request.nil?
364
449
 
@@ -376,16 +461,20 @@ module Google
376
461
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
377
462
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
378
463
 
379
- header_params = {
380
- "name" => request.name
381
- }
464
+ header_params = {}
465
+ if request.name
466
+ header_params["name"] = request.name
467
+ end
468
+
382
469
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
383
470
  metadata[:"x-goog-request-params"] ||= request_params_header
384
471
 
385
472
  options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
386
473
  metadata: metadata,
387
474
  retry_policy: @config.rpcs.cancel_operation.retry_policy
388
- options.apply_defaults metadata: @config.metadata,
475
+
476
+ options.apply_defaults timeout: @config.timeout,
477
+ metadata: @config.metadata,
389
478
  retry_policy: @config.retry_policy
390
479
 
391
480
  @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
@@ -437,6 +526,28 @@ module Google
437
526
  #
438
527
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
439
528
  #
529
+ # @example Basic example
530
+ # require "google/longrunning"
531
+ #
532
+ # # Create a client object. The client can be reused for multiple calls.
533
+ # client = Google::Longrunning::Operations::Client.new
534
+ #
535
+ # # Create a request. To set request fields, pass in keyword arguments.
536
+ # request = Google::Longrunning::WaitOperationRequest.new
537
+ #
538
+ # # Call the wait_operation method.
539
+ # result = client.wait_operation request
540
+ #
541
+ # # The returned object is of type Gapic::Operation. You can use this
542
+ # # object to check the status of an operation, cancel it, or wait
543
+ # # for results. Here is how to block until completion:
544
+ # result.wait_until_done! timeout: 60
545
+ # if result.response?
546
+ # p result.response
547
+ # else
548
+ # puts "Error!"
549
+ # end
550
+ #
440
551
  def wait_operation request, options = nil
441
552
  raise ::ArgumentError, "request must be provided" if request.nil?
442
553
 
@@ -457,7 +568,9 @@ module Google
457
568
  options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
458
569
  metadata: metadata,
459
570
  retry_policy: @config.rpcs.wait_operation.retry_policy
460
- options.apply_defaults metadata: @config.metadata,
571
+
572
+ options.apply_defaults timeout: @config.timeout,
573
+ metadata: @config.metadata,
461
574
  retry_policy: @config.retry_policy
462
575
 
463
576
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
@@ -482,22 +595,21 @@ module Google
482
595
  # Configuration can be applied globally to all clients, or to a single client
483
596
  # on construction.
484
597
  #
485
- # # Examples
486
- #
487
- # To modify the global config, setting the timeout for list_operations
488
- # to 20 seconds, and all remaining timeouts to 10 seconds:
489
- #
490
- # ::Google::Longrunning::Operations::Client.configure do |config|
491
- # config.timeout = 10.0
492
- # config.rpcs.list_operations.timeout = 20.0
493
- # end
494
- #
495
- # To apply the above configuration only to a new client:
496
- #
497
- # client = ::Google::Longrunning::Operations::Client.new do |config|
498
- # config.timeout = 10.0
499
- # config.rpcs.list_operations.timeout = 20.0
500
- # end
598
+ # @example
599
+ #
600
+ # # Modify the global config, setting the timeout for
601
+ # # list_operations to 20 seconds,
602
+ # # and all remaining timeouts to 10 seconds.
603
+ # ::Google::Longrunning::Operations::Client.configure do |config|
604
+ # config.timeout = 10.0
605
+ # config.rpcs.list_operations.timeout = 20.0
606
+ # end
607
+ #
608
+ # # Apply the above configuration only to a new client.
609
+ # client = ::Google::Longrunning::Operations::Client.new do |config|
610
+ # config.timeout = 10.0
611
+ # config.rpcs.list_operations.timeout = 20.0
612
+ # end
501
613
  #
502
614
  # @!attribute [rw] endpoint
503
615
  # The hostname or hostname:port of the service endpoint.
@@ -22,7 +22,7 @@ module Google
22
22
  module Security
23
23
  module PrivateCA
24
24
  module V1
25
- VERSION = "0.1.0"
25
+ VERSION = "0.1.4"
26
26
  end
27
27
  end
28
28
  end
@@ -1,14 +1,14 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/security/privateca/v1/resources.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/field_behavior_pb'
7
5
  require 'google/api/resource_pb'
8
6
  require 'google/protobuf/duration_pb'
9
7
  require 'google/protobuf/timestamp_pb'
10
8
  require 'google/type/expr_pb'
11
9
  require 'google/api/annotations_pb'
10
+ require 'google/protobuf'
11
+
12
12
  Google::Protobuf::DescriptorPool.generated_pool.build do
13
13
  add_file("google/cloud/security/privateca/v1/resources.proto", :syntax => :proto3) do
14
14
  add_message "google.cloud.security.privateca.v1.CertificateAuthority" do
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/security/privateca/v1/service.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/client_pb'
8
6
  require 'google/api/field_behavior_pb'
@@ -12,6 +10,8 @@ require 'google/longrunning/operations_pb'
12
10
  require 'google/protobuf/duration_pb'
13
11
  require 'google/protobuf/field_mask_pb'
14
12
  require 'google/protobuf/timestamp_pb'
13
+ require 'google/protobuf'
14
+
15
15
  Google::Protobuf::DescriptorPool.generated_pool.build do
16
16
  add_file("google/cloud/security/privateca/v1/service.proto", :syntax => :proto3) do
17
17
  add_message "google.cloud.security.privateca.v1.CreateCertificateRequest" do
@@ -29,7 +29,7 @@ module Google
29
29
  # certificate authorities and issued certificates.
30
30
  class Service
31
31
 
32
- include GRPC::GenericService
32
+ include ::GRPC::GenericService
33
33
 
34
34
  self.marshal_class_method = :encode
35
35
  self.unmarshal_class_method = :decode
@@ -60,6 +60,12 @@ module Google
60
60
  # in any arbitrary order, rather than the order the user originally
61
61
  # provided. Additionally, the list's order may or may not be stable.
62
62
  UNORDERED_LIST = 6
63
+
64
+ # Denotes that this field returns a non-empty default value if not set.
65
+ # This indicates that if the user provides the empty value in a request,
66
+ # a non-empty value will be returned. The user will not be aware of what
67
+ # non-empty value to expect.
68
+ NON_EMPTY_DEFAULT = 7
63
69
  end
64
70
  end
65
71
  end
@@ -261,14 +261,14 @@ module Google
261
261
  # issued by any {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} in the {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}.
262
262
  # @!attribute [rw] publish_ca_cert
263
263
  # @return [::Boolean]
264
- # Required. When true, publishes each {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}'s CA certificate and
264
+ # Optional. When true, publishes each {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}'s CA certificate and
265
265
  # includes its URL in the "Authority Information Access" X.509 extension
266
266
  # in all issued {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}. If this is false, the CA
267
267
  # certificate will not be published and the corresponding X.509 extension
268
268
  # will not be written in issued certificates.
269
269
  # @!attribute [rw] publish_crl
270
270
  # @return [::Boolean]
271
- # Required. When true, publishes each {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}'s CRL and includes its
271
+ # Optional. When true, publishes each {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}'s CRL and includes its
272
272
  # URL in the "CRL Distribution Points" X.509 extension in all issued
273
273
  # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}. If this is false, CRLs will not be published
274
274
  # and the corresponding X.509 extension will not be written in issued
@@ -395,11 +395,11 @@ module Google
395
395
  # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}.
396
396
  # @!attribute [rw] allow_csr_based_issuance
397
397
  # @return [::Boolean]
398
- # Required. When true, allows callers to create {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} by
398
+ # Optional. When true, allows callers to create {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} by
399
399
  # specifying a CSR.
400
400
  # @!attribute [rw] allow_config_based_issuance
401
401
  # @return [::Boolean]
402
- # Required. When true, allows callers to create {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} by
402
+ # Optional. When true, allows callers to create {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} by
403
403
  # specifying a {::Google::Cloud::Security::PrivateCA::V1::CertificateConfig CertificateConfig}.
404
404
  class IssuanceModes
405
405
  include ::Google::Protobuf::MessageExts
@@ -845,13 +845,15 @@ module Google
845
845
  # @!attribute [rw] lifetime
846
846
  # @return [::Google::Protobuf::Duration]
847
847
  # For convenience, the actual lifetime of an issued certificate.
848
- # Corresponds to 'not_after_time' - 'not_before_time'.
849
848
  # @!attribute [rw] not_before_time
850
849
  # @return [::Google::Protobuf::Timestamp]
851
850
  # The time at which the certificate becomes valid.
852
851
  # @!attribute [rw] not_after_time
853
852
  # @return [::Google::Protobuf::Timestamp]
854
- # The time at which the certificate expires.
853
+ # The time after which the certificate is expired.
854
+ # Per RFC 5280, the validity period for a certificate is the period of time
855
+ # from not_before_time through not_after_time, inclusive.
856
+ # Corresponds to 'not_before_time' + 'lifetime' - 1 second.
855
857
  class SubjectDescription
856
858
  include ::Google::Protobuf::MessageExts
857
859
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -896,7 +898,7 @@ module Google
896
898
  # Required. The OID for this X.509 extension.
897
899
  # @!attribute [rw] critical
898
900
  # @return [::Boolean]
899
- # Required. Indicates whether or not this extension is critical (i.e., if the client
901
+ # Optional. Indicates whether or not this extension is critical (i.e., if the client
900
902
  # does not know how to handle this extension, the client should consider this
901
903
  # to be an error).
902
904
  # @!attribute [rw] value
@@ -1051,18 +1053,17 @@ module Google
1051
1053
  # Optional. A CEL expression that may be used to validate the resolved X.509 Subject
1052
1054
  # and/or Subject Alternative Name before a certificate is signed.
1053
1055
  # To see the full allowed syntax and some examples, see
1054
- # https://cloud.google.com/certificate-authority-service/docs/cel-guide
1056
+ # https://cloud.google.com/certificate-authority-service/docs/using-cel
1055
1057
  # @!attribute [rw] allow_subject_passthrough
1056
1058
  # @return [::Boolean]
1057
1059
  # Required. If this is true, the {::Google::Cloud::Security::PrivateCA::V1::Subject Subject} field may be copied from a certificate
1058
1060
  # request into the signed certificate. Otherwise, the requested {::Google::Cloud::Security::PrivateCA::V1::Subject Subject}
1059
- # will be discarded. The bool is optional to indicate an unset field, which suggests a forgotten value that needs to be set by the caller.
1061
+ # will be discarded.
1060
1062
  # @!attribute [rw] allow_subject_alt_names_passthrough
1061
1063
  # @return [::Boolean]
1062
1064
  # Required. If this is true, the {::Google::Cloud::Security::PrivateCA::V1::SubjectAltNames SubjectAltNames} extension may be copied from a
1063
1065
  # certificate request into the signed certificate. Otherwise, the requested
1064
1066
  # {::Google::Cloud::Security::PrivateCA::V1::SubjectAltNames SubjectAltNames} will be discarded.
1065
- # The bool is optional to indicate an unset field, which suggests a forgotten value that needs to be set by the caller.
1066
1067
  class CertificateIdentityConstraints
1067
1068
  include ::Google::Protobuf::MessageExts
1068
1069
  extend ::Google::Protobuf::MessageExts::ClassMethods
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-security-private_ca-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-21 00:00:00.000000000 Z
11
+ date: 2021-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.5'
19
+ version: '0.7'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.5'
29
+ version: '0.7'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a