From c3fddecf4ab394dff81db57f5cd09ffa87d7f696 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 11 May 2021 19:44:02 +0000 Subject: [PATCH] feat!: Make CertificateTemplate bools optional to indicate unset values (#172) PiperOrigin-RevId: 372197428 Source-Link: https://github.com/googleapis/googleapis/commit/ffc7779a71a3a1ebb59de713c86dfd1dadd698d9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/ca23023d0bc0a50057cdfc0364be329448ab9aaa --- .../v1/CertificateIdentityConstraints.java | 186 ++++++++++++++---- ...rtificateIdentityConstraintsOrBuilder.java | 41 +++- .../privateca/v1/PrivateCaResourcesProto.java | 16 +- .../security/privateca/v1/resources.proto | 11 +- synth.metadata | 2 +- 5 files changed, 198 insertions(+), 58 deletions(-) diff --git a/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/CertificateIdentityConstraints.java b/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/CertificateIdentityConstraints.java index 2390b42d..425719b7 100644 --- a/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/CertificateIdentityConstraints.java +++ b/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/CertificateIdentityConstraints.java @@ -60,6 +60,7 @@ private CertificateIdentityConstraints( if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } + int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { @@ -86,11 +87,13 @@ private CertificateIdentityConstraints( } case 16: { + bitField0_ |= 0x00000001; allowSubjectPassthrough_ = input.readBool(); break; } case 24: { + bitField0_ |= 0x00000002; allowSubjectAltNamesPassthrough_ = input.readBool(); break; } @@ -128,6 +131,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.security.privateca.v1.CertificateIdentityConstraints.Builder.class); } + private int bitField0_; public static final int CEL_EXPRESSION_FIELD_NUMBER = 1; private com.google.type.Expr celExpression_; /** @@ -189,12 +193,29 @@ public com.google.type.ExprOrBuilder getCelExpressionOrBuilder() { * * *
-   * Optional. If this is set, the [Subject][google.cloud.security.privateca.v1.Subject] field may be copied from a certificate
+   * 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.
+   * 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.
    * 
* - * bool allow_subject_passthrough = 2 [(.google.api.field_behavior) = OPTIONAL]; + * bool allow_subject_passthrough = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the allowSubjectPassthrough field is set. + */ + @java.lang.Override + public boolean hasAllowSubjectPassthrough() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * 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.
+   * 
+ * + * bool allow_subject_passthrough = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The allowSubjectPassthrough. */ @@ -209,12 +230,32 @@ public boolean getAllowSubjectPassthrough() { * * *
-   * Optional. If this is set, the [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] extension may be copied from a
+   * 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.
    * 
* - * bool allow_subject_alt_names_passthrough = 3 [(.google.api.field_behavior) = OPTIONAL]; + * bool allow_subject_alt_names_passthrough = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the allowSubjectAltNamesPassthrough field is set. + */ + @java.lang.Override + public boolean hasAllowSubjectAltNamesPassthrough() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * 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.
+   * 
+ * + * bool allow_subject_alt_names_passthrough = 3 [(.google.api.field_behavior) = REQUIRED]; * * * @return The allowSubjectAltNamesPassthrough. @@ -241,10 +282,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (celExpression_ != null) { output.writeMessage(1, getCelExpression()); } - if (allowSubjectPassthrough_ != false) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeBool(2, allowSubjectPassthrough_); } - if (allowSubjectAltNamesPassthrough_ != false) { + if (((bitField0_ & 0x00000002) != 0)) { output.writeBool(3, allowSubjectAltNamesPassthrough_); } unknownFields.writeTo(output); @@ -259,10 +300,10 @@ public int getSerializedSize() { if (celExpression_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCelExpression()); } - if (allowSubjectPassthrough_ != false) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, allowSubjectPassthrough_); } - if (allowSubjectAltNamesPassthrough_ != false) { + if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize( 3, allowSubjectAltNamesPassthrough_); @@ -287,9 +328,16 @@ public boolean equals(final java.lang.Object obj) { if (hasCelExpression()) { if (!getCelExpression().equals(other.getCelExpression())) return false; } - if (getAllowSubjectPassthrough() != other.getAllowSubjectPassthrough()) return false; - if (getAllowSubjectAltNamesPassthrough() != other.getAllowSubjectAltNamesPassthrough()) + if (hasAllowSubjectPassthrough() != other.hasAllowSubjectPassthrough()) return false; + if (hasAllowSubjectPassthrough()) { + if (getAllowSubjectPassthrough() != other.getAllowSubjectPassthrough()) return false; + } + if (hasAllowSubjectAltNamesPassthrough() != other.hasAllowSubjectAltNamesPassthrough()) return false; + if (hasAllowSubjectAltNamesPassthrough()) { + if (getAllowSubjectAltNamesPassthrough() != other.getAllowSubjectAltNamesPassthrough()) + return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -305,12 +353,16 @@ public int hashCode() { hash = (37 * hash) + CEL_EXPRESSION_FIELD_NUMBER; hash = (53 * hash) + getCelExpression().hashCode(); } - hash = (37 * hash) + ALLOW_SUBJECT_PASSTHROUGH_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowSubjectPassthrough()); - hash = (37 * hash) + ALLOW_SUBJECT_ALT_NAMES_PASSTHROUGH_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashBoolean(getAllowSubjectAltNamesPassthrough()); + if (hasAllowSubjectPassthrough()) { + hash = (37 * hash) + ALLOW_SUBJECT_PASSTHROUGH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowSubjectPassthrough()); + } + if (hasAllowSubjectAltNamesPassthrough()) { + hash = (37 * hash) + ALLOW_SUBJECT_ALT_NAMES_PASSTHROUGH_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashBoolean(getAllowSubjectAltNamesPassthrough()); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -467,9 +519,9 @@ public Builder clear() { celExpressionBuilder_ = null; } allowSubjectPassthrough_ = false; - + bitField0_ = (bitField0_ & ~0x00000001); allowSubjectAltNamesPassthrough_ = false; - + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -499,13 +551,22 @@ public com.google.cloud.security.privateca.v1.CertificateIdentityConstraints bui public com.google.cloud.security.privateca.v1.CertificateIdentityConstraints buildPartial() { com.google.cloud.security.privateca.v1.CertificateIdentityConstraints result = new com.google.cloud.security.privateca.v1.CertificateIdentityConstraints(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; if (celExpressionBuilder_ == null) { result.celExpression_ = celExpression_; } else { result.celExpression_ = celExpressionBuilder_.build(); } - result.allowSubjectPassthrough_ = allowSubjectPassthrough_; - result.allowSubjectAltNamesPassthrough_ = allowSubjectAltNamesPassthrough_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.allowSubjectPassthrough_ = allowSubjectPassthrough_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.allowSubjectAltNamesPassthrough_ = allowSubjectAltNamesPassthrough_; + to_bitField0_ |= 0x00000002; + } + result.bitField0_ = to_bitField0_; onBuilt(); return result; } @@ -562,10 +623,10 @@ public Builder mergeFrom( if (other.hasCelExpression()) { mergeCelExpression(other.getCelExpression()); } - if (other.getAllowSubjectPassthrough() != false) { + if (other.hasAllowSubjectPassthrough()) { setAllowSubjectPassthrough(other.getAllowSubjectPassthrough()); } - if (other.getAllowSubjectAltNamesPassthrough() != false) { + if (other.hasAllowSubjectAltNamesPassthrough()) { setAllowSubjectAltNamesPassthrough(other.getAllowSubjectAltNamesPassthrough()); } this.mergeUnknownFields(other.unknownFields); @@ -599,6 +660,8 @@ public Builder mergeFrom( return this; } + private int bitField0_; + private com.google.type.Expr celExpression_; private com.google.protobuf.SingleFieldBuilderV3< com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder> @@ -804,12 +867,29 @@ public com.google.type.ExprOrBuilder getCelExpressionOrBuilder() { * * *
-     * Optional. If this is set, the [Subject][google.cloud.security.privateca.v1.Subject] field may be copied from a certificate
+     * 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.
+     * 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.
      * 
* - * bool allow_subject_passthrough = 2 [(.google.api.field_behavior) = OPTIONAL]; + * bool allow_subject_passthrough = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the allowSubjectPassthrough field is set. + */ + @java.lang.Override + public boolean hasAllowSubjectPassthrough() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * bool allow_subject_passthrough = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The allowSubjectPassthrough. */ @@ -821,18 +901,18 @@ public boolean getAllowSubjectPassthrough() { * * *
-     * Optional. If this is set, the [Subject][google.cloud.security.privateca.v1.Subject] field may be copied from a certificate
+     * 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.
+     * 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.
      * 
* - * bool allow_subject_passthrough = 2 [(.google.api.field_behavior) = OPTIONAL]; + * bool allow_subject_passthrough = 2 [(.google.api.field_behavior) = REQUIRED]; * * @param value The allowSubjectPassthrough to set. * @return This builder for chaining. */ public Builder setAllowSubjectPassthrough(boolean value) { - + bitField0_ |= 0x00000001; allowSubjectPassthrough_ = value; onChanged(); return this; @@ -841,17 +921,17 @@ public Builder setAllowSubjectPassthrough(boolean value) { * * *
-     * Optional. If this is set, the [Subject][google.cloud.security.privateca.v1.Subject] field may be copied from a certificate
+     * 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.
+     * 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.
      * 
* - * bool allow_subject_passthrough = 2 [(.google.api.field_behavior) = OPTIONAL]; + * bool allow_subject_passthrough = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ public Builder clearAllowSubjectPassthrough() { - + bitField0_ = (bitField0_ & ~0x00000001); allowSubjectPassthrough_ = false; onChanged(); return this; @@ -862,12 +942,32 @@ public Builder clearAllowSubjectPassthrough() { * * *
-     * Optional. If this is set, the [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] extension may be copied from a
+     * 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.
      * 
* - * bool allow_subject_alt_names_passthrough = 3 [(.google.api.field_behavior) = OPTIONAL]; + * bool allow_subject_alt_names_passthrough = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the allowSubjectAltNamesPassthrough field is set. + */ + @java.lang.Override + public boolean hasAllowSubjectAltNamesPassthrough() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * bool allow_subject_alt_names_passthrough = 3 [(.google.api.field_behavior) = REQUIRED]; * * * @return The allowSubjectAltNamesPassthrough. @@ -880,19 +980,20 @@ public boolean getAllowSubjectAltNamesPassthrough() { * * *
-     * Optional. If this is set, the [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] extension may be copied from a
+     * 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.
      * 
* - * bool allow_subject_alt_names_passthrough = 3 [(.google.api.field_behavior) = OPTIONAL]; + * bool allow_subject_alt_names_passthrough = 3 [(.google.api.field_behavior) = REQUIRED]; * * * @param value The allowSubjectAltNamesPassthrough to set. * @return This builder for chaining. */ public Builder setAllowSubjectAltNamesPassthrough(boolean value) { - + bitField0_ |= 0x00000002; allowSubjectAltNamesPassthrough_ = value; onChanged(); return this; @@ -901,18 +1002,19 @@ public Builder setAllowSubjectAltNamesPassthrough(boolean value) { * * *
-     * Optional. If this is set, the [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] extension may be copied from a
+     * 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.
      * 
* - * bool allow_subject_alt_names_passthrough = 3 [(.google.api.field_behavior) = OPTIONAL]; + * bool allow_subject_alt_names_passthrough = 3 [(.google.api.field_behavior) = REQUIRED]; * * * @return This builder for chaining. */ public Builder clearAllowSubjectAltNamesPassthrough() { - + bitField0_ = (bitField0_ & ~0x00000002); allowSubjectAltNamesPassthrough_ = false; onChanged(); return this; diff --git a/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/CertificateIdentityConstraintsOrBuilder.java b/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/CertificateIdentityConstraintsOrBuilder.java index d8263c14..702b1df6 100644 --- a/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/CertificateIdentityConstraintsOrBuilder.java +++ b/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/CertificateIdentityConstraintsOrBuilder.java @@ -71,12 +71,26 @@ public interface CertificateIdentityConstraintsOrBuilder * * *
-   * Optional. If this is set, the [Subject][google.cloud.security.privateca.v1.Subject] field may be copied from a certificate
+   * 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.
+   * 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.
    * 
* - * bool allow_subject_passthrough = 2 [(.google.api.field_behavior) = OPTIONAL]; + * bool allow_subject_passthrough = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the allowSubjectPassthrough field is set. + */ + boolean hasAllowSubjectPassthrough(); + /** + * + * + *
+   * 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.
+   * 
+ * + * bool allow_subject_passthrough = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The allowSubjectPassthrough. */ @@ -86,12 +100,29 @@ public interface CertificateIdentityConstraintsOrBuilder * * *
-   * Optional. If this is set, the [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] extension may be copied from a
+   * 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.
+   * 
+ * + * bool allow_subject_alt_names_passthrough = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the allowSubjectAltNamesPassthrough field is set. + */ + boolean hasAllowSubjectAltNamesPassthrough(); + /** + * + * + *
+   * 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.
    * 
* - * bool allow_subject_alt_names_passthrough = 3 [(.google.api.field_behavior) = OPTIONAL]; + * bool allow_subject_alt_names_passthrough = 3 [(.google.api.field_behavior) = REQUIRED]; * * * @return The allowSubjectAltNamesPassthrough. diff --git a/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/PrivateCaResourcesProto.java b/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/PrivateCaResourcesProto.java index b9afba38..c9136be5 100644 --- a/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/PrivateCaResourcesProto.java +++ b/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/PrivateCaResourcesProto.java @@ -472,11 +472,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\022\027\n\017email_addresses\030\003 \003(\t\022\024\n\014ip_addresse" + "s\030\004 \003(\t\022F\n\013custom_sans\030\005 \003(\01321.google.cl" + "oud.security.privateca.v1.X509Extension\"" - + "\252\001\n\036CertificateIdentityConstraints\022.\n\016ce" + + "\372\001\n\036CertificateIdentityConstraints\022.\n\016ce" + "l_expression\030\001 \001(\0132\021.google.type.ExprB\003\340" - + "A\001\022&\n\031allow_subject_passthrough\030\002 \001(\010B\003\340" - + "A\001\0220\n#allow_subject_alt_names_passthroug" - + "h\030\003 \001(\010B\003\340A\001\"\236\003\n\037CertificateExtensionCon" + + "A\001\022+\n\031allow_subject_passthrough\030\002 \001(\010B\003\340" + + "A\002H\000\210\001\001\0225\n#allow_subject_alt_names_passt" + + "hrough\030\003 \001(\010B\003\340A\002H\001\210\001\001B\034\n\032_allow_subject" + + "_passthroughB&\n$_allow_subject_alt_names" + + "_passthrough\"\236\003\n\037CertificateExtensionCon" + "straints\022|\n\020known_extensions\030\001 \003(\0162].goo" + "gle.cloud.security.privateca.v1.Certific" + "ateExtensionConstraints.KnownCertificate" @@ -954,7 +956,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_security_privateca_v1_CertificateIdentityConstraints_descriptor, new java.lang.String[] { - "CelExpression", "AllowSubjectPassthrough", "AllowSubjectAltNamesPassthrough", + "CelExpression", + "AllowSubjectPassthrough", + "AllowSubjectAltNamesPassthrough", + "AllowSubjectPassthrough", + "AllowSubjectAltNamesPassthrough", }); internal_static_google_cloud_security_privateca_v1_CertificateExtensionConstraints_descriptor = getDescriptor().getMessageTypes().get(16); diff --git a/proto-google-cloud-security-private-ca-v1/src/main/proto/google/cloud/security/privateca/v1/resources.proto b/proto-google-cloud-security-private-ca-v1/src/main/proto/google/cloud/security/privateca/v1/resources.proto index 4da13f43..e3358bc9 100644 --- a/proto-google-cloud-security-private-ca-v1/src/main/proto/google/cloud/security/privateca/v1/resources.proto +++ b/proto-google-cloud-security-private-ca-v1/src/main/proto/google/cloud/security/privateca/v1/resources.proto @@ -995,15 +995,16 @@ message CertificateIdentityConstraints { // https://cloud.google.com/certificate-authority-service/docs/cel-guide google.type.Expr cel_expression = 1 [(google.api.field_behavior) = OPTIONAL]; - // Optional. If this is set, the [Subject][google.cloud.security.privateca.v1.Subject] field may be copied from a certificate + // 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. - bool allow_subject_passthrough = 2 [(google.api.field_behavior) = OPTIONAL]; + // 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. + optional bool allow_subject_passthrough = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. If this is set, the [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] extension may be copied from a + // 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. - bool allow_subject_alt_names_passthrough = 3 [(google.api.field_behavior) = OPTIONAL]; + // The bool is optional to indicate an unset field, which suggests a forgotten value that needs to be set by the caller. + optional bool allow_subject_alt_names_passthrough = 3 [(google.api.field_behavior) = REQUIRED]; } // Describes a set of X.509 extensions that may be part of some certificate diff --git a/synth.metadata b/synth.metadata index b6b53b6a..a5612645 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-security-private-ca.git", - "sha": "07d2611bad70123f68b244d70dcec24a0e8dd331" + "sha": "e5e1b10aeaab8fa77269f749a6c728df5217b4c1" } } ]