From 13e54bf5ad66f85f1e2165b2cf67604af50ccd0c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 16 Jul 2021 11:12:23 +0000 Subject: [PATCH] fix: make allow_config_based_issuance bool optional (#80) PiperOrigin-RevId: 385011540 Source-Link: https://github.com/googleapis/googleapis/commit/077f0c624bb91709aea45b6f42bb4a2e84645cc3 Source-Link: https://github.com/googleapis/googleapis-gen/commit/5427a56f87b7f1f69c4e0952de64836225920517 fix: make publish_ca_cert bool optional fix: make publish_crl bool optional fix: make allow_csr_based_issuance bool optional fix: correct response type of DeleteCaPool --- .../async_client.py | 24 ++++++++------- .../certificate_authority_service/client.py | 24 ++++++++------- .../security/privateca_v1/types/resources.py | 30 +++++++++---------- 3 files changed, 42 insertions(+), 36 deletions(-) diff --git a/google/cloud/security/privateca_v1/services/certificate_authority_service/async_client.py b/google/cloud/security/privateca_v1/services/certificate_authority_service/async_client.py index 792a60b..d2f4b0c 100644 --- a/google/cloud/security/privateca_v1/services/certificate_authority_service/async_client.py +++ b/google/cloud/security/privateca_v1/services/certificate_authority_service/async_client.py @@ -1933,15 +1933,19 @@ async def delete_ca_pool( google.api_core.operation_async.AsyncOperation: An object representing a long-running operation. - The result type for the operation will be :class:`google.cloud.security.privateca_v1.types.CaPool` A [CaPool][google.cloud.security.privateca.v1.CaPool] represents a group of - [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority] - that form a trust anchor. A - [CaPool][google.cloud.security.privateca.v1.CaPool] - can be used to manage issuance policies for one or - more - [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] - resources and to rotate CA certificates in and out of - the trust anchor. + The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated + empty messages in your APIs. A typical example is to + use it as the request or the response type of an API + method. For instance: + + service Foo { + rpc Bar(google.protobuf.Empty) returns + (google.protobuf.Empty); + + } + + The JSON representation for Empty is empty JSON + object {}. """ # Create or coerce a protobuf request object. @@ -1982,7 +1986,7 @@ async def delete_ca_pool( response = operation_async.from_gapic( response, self._client._transport.operations_client, - resources.CaPool, + empty_pb2.Empty, metadata_type=service.OperationMetadata, ) diff --git a/google/cloud/security/privateca_v1/services/certificate_authority_service/client.py b/google/cloud/security/privateca_v1/services/certificate_authority_service/client.py index ac7e7d5..bdb9599 100644 --- a/google/cloud/security/privateca_v1/services/certificate_authority_service/client.py +++ b/google/cloud/security/privateca_v1/services/certificate_authority_service/client.py @@ -2201,15 +2201,19 @@ def delete_ca_pool( google.api_core.operation.Operation: An object representing a long-running operation. - The result type for the operation will be :class:`google.cloud.security.privateca_v1.types.CaPool` A [CaPool][google.cloud.security.privateca.v1.CaPool] represents a group of - [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority] - that form a trust anchor. A - [CaPool][google.cloud.security.privateca.v1.CaPool] - can be used to manage issuance policies for one or - more - [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] - resources and to rotate CA certificates in and out of - the trust anchor. + The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated + empty messages in your APIs. A typical example is to + use it as the request or the response type of an API + method. For instance: + + service Foo { + rpc Bar(google.protobuf.Empty) returns + (google.protobuf.Empty); + + } + + The JSON representation for Empty is empty JSON + object {}. """ # Create or coerce a protobuf request object. @@ -2250,7 +2254,7 @@ def delete_ca_pool( response = operation.from_gapic( response, self._transport.operations_client, - resources.CaPool, + empty_pb2.Empty, metadata_type=service.OperationMetadata, ) diff --git a/google/cloud/security/privateca_v1/types/resources.py b/google/cloud/security/privateca_v1/types/resources.py index 677600a..4b9f6ad 100644 --- a/google/cloud/security/privateca_v1/types/resources.py +++ b/google/cloud/security/privateca_v1/types/resources.py @@ -363,7 +363,7 @@ class PublishingOptions(proto.Message): Attributes: publish_ca_cert (bool): - Required. When true, publishes each + Optional. When true, publishes each [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s CA certificate and includes its URL in the "Authority Information Access" X.509 extension in all issued @@ -372,7 +372,7 @@ class PublishingOptions(proto.Message): and the corresponding X.509 extension will not be written in issued certificates. publish_crl (bool): - Required. When true, publishes each + Optional. When true, publishes each [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s CRL and includes its URL in the "CRL Distribution Points" X.509 extension in all issued @@ -544,11 +544,11 @@ class IssuanceModes(proto.Message): Attributes: allow_csr_based_issuance (bool): - Required. When true, allows callers to create + Optional. When true, allows callers to create [Certificates][google.cloud.security.privateca.v1.Certificate] by specifying a CSR. allow_config_based_issuance (bool): - Required. When true, allows callers to create + Optional. When true, allows callers to create [Certificates][google.cloud.security.privateca.v1.Certificate] by specifying a [CertificateConfig][google.cloud.security.privateca.v1.CertificateConfig]. @@ -1101,14 +1101,16 @@ class SubjectDescription(proto.Message): The serial number encoded in lowercase hexadecimal. lifetime (google.protobuf.duration_pb2.Duration): - For convenience, the actual lifetime of an issued - certificate. Corresponds to 'not_after_time' - - 'not_before_time'. + For convenience, the actual lifetime of an + issued certificate. not_before_time (google.protobuf.timestamp_pb2.Timestamp): The time at which the certificate becomes valid. not_after_time (google.protobuf.timestamp_pb2.Timestamp): - The time at which the certificate expires. + The time after which the certificate is expired. Per RFC + 5280, the validity period for a certificate is the period of + time from not_before_time through not_after_time, inclusive. + Corresponds to 'not_before_time' + 'lifetime' - 1 second. """ subject = proto.Field(proto.MESSAGE, number=1, message="Subject",) @@ -1184,7 +1186,7 @@ class X509Extension(proto.Message): object_id (google.cloud.security.privateca_v1.types.ObjectId): Required. The OID for this X.509 extension. critical (bool): - Required. Indicates whether or not this + Optional. Indicates whether or not this extension is critical (i.e., if the client does not know how to handle this extension, the client should consider this to be an error). @@ -1383,25 +1385,21 @@ class CertificateIdentityConstraints(proto.Message): signed. To see the full allowed syntax and some examples, see https://cloud.google.com/certificate-authority- - service/docs/cel-guide + service/docs/using-cel allow_subject_passthrough (bool): Required. If this is true, the [Subject][google.cloud.security.privateca.v1.Subject] field may be copied from a certificate request into the signed certificate. Otherwise, the requested [Subject][google.cloud.security.privateca.v1.Subject] 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. + be discarded. allow_subject_alt_names_passthrough (bool): Required. If this is true, the [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] extension may be copied from a certificate request into the signed certificate. Otherwise, the requested [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] - 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. + will be discarded. """ cel_expression = proto.Field(proto.MESSAGE, number=1, message=expr_pb2.Expr,)