From 707fbec34b6f04e918d14b8066cc32afe605a4ed Mon Sep 17 00:00:00 2001 From: Gert Drapers Date: Mon, 24 Jun 2024 08:38:10 -0700 Subject: [PATCH] upd 0.31.2 (#25) * update CI GH actions * update sonatype creds using new token * update to buf v1.30.0 * update examples to use Directory v3 interfaces instead of v2 --- .github/workflows/ci.yaml | 25 +- .gitignore | 9 +- Depfile | 2 +- buf.gen.yaml | 6 +- examples/pom.xml | 9 +- .../main/java/com/aserto/DirectoryClient.java | 20 +- .../src/main/java/com/aserto/Example.java | 29 +- magefiles/magefile.go | 12 +- pom.xml | 13 +- .../directory/assertion/v3/AssertionGrpc.java | 2 +- .../directory/exporter/v2/ExporterGrpc.java | 2 +- .../directory/exporter/v3/ExporterGrpc.java | 2 +- .../directory/importer/v2/ImporterGrpc.java | 2 +- .../directory/importer/v3/ImporterGrpc.java | 2 +- .../directory/importer/v3/ImporterProto.java | 25 +- .../aserto/directory/importer/v3/Opcode.java | 9 + .../aserto/directory/model/v3/ModelGrpc.java | 2 +- .../directory/reader/v2/ReaderGrpc.java | 2 +- .../directory/reader/v3/ReaderGrpc.java | 2 +- .../directory/writer/v2/WriterGrpc.java | 2 +- .../directory/writer/v3/WriterGrpc.java | 2 +- .../com/buf/validate/FieldConstraints.java | 8 +- .../java/com/buf/validate/StringRules.java | 166 ++++- .../buf/validate/StringRulesOrBuilder.java | 39 ++ .../java/com/buf/validate/ValidateProto.java | 661 +++++++++--------- .../options/HeaderParameter.java | 2 +- 26 files changed, 644 insertions(+), 411 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index dd97a96..5ca6340 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -18,6 +18,7 @@ on: env: VAULT_ADDR: https://vault.eng.aserto.com/ + GO_VERSION: "1.22" jobs: build: @@ -27,12 +28,12 @@ jobs: run: echo "Using proto ${{ github.event.inputs.proto_ref }} with sha ${{ github.event.inputs.proto_sha }}" - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: ${{ env.GO_VERSION }} @@ -54,31 +55,33 @@ jobs: name: Release to maven central steps: - name: Read Configuration - uses: hashicorp/vault-action@v2.5.0 + uses: hashicorp/vault-action@v3 id: vault with: url: ${{ env.VAULT_ADDR }} token: ${{ secrets.VAULT_TOKEN }} secrets: | kv/data/MavenCentral "USERNAME" | MAVEN_USERNAME; - kv/data/MavenCentral "PASSWORD" | MAVEN_PASSWORD; + kv/data/MavenCentral "PASSWORD" | MAVEN_CENTRAL_TOKEN; kv/data/MavenCentral "GPG_PASSPHRASE" | MAVEN_GPG_PASSPHRASE; - kv/data/MavenCentral "PRIVATE_GPG_KEY" | GPG_PRIVATE_KEY; + kv/data/MavenCentral "PRIVATE_GPG_KEY" | MAVEN_GPG_PRIVATE_KEY; + kv/data/MavenCentral "TOKEN_USERNAME" | TOKEN_USERNAME; + kv/data/MavenCentral "TOKEN_PASSWORD" | TOKEN_PASSWORD; - - name: Setup Go - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Java for publishing to Maven Central Repository - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: 8 distribution: temurin server-id: ossrh - server-username: MAVEN_USERNAME - server-password: MAVEN_PASSWORD - gpg-private-key: ${{ env.GPG_PRIVATE_KEY }} + server-username: TOKEN_USERNAME + server-password: TOKEN_PASSWORD + gpg-private-key: ${{ env.MAVEN_GPG_PRIVATE_KEY }} gpg-passphrase: MAVEN_GPG_PASSPHRASE - name: build artifact diff --git a/.gitignore b/.gitignore index 91329d4..0e81d6c 100644 --- a/.gitignore +++ b/.gitignore @@ -25,14 +25,11 @@ hs_err_pid* target/ +.env # IDE specific .idea .vscode -*.iml -# demo assets -/examples/.env - -# external dependencies -/.ext +# External dependencies +.ext diff --git a/Depfile b/Depfile index 0a91403..82ecd93 100644 --- a/Depfile +++ b/Depfile @@ -2,7 +2,7 @@ go: buf: importPath: "github.com/bufbuild/buf/cmd/buf" - version: "v1.28.0" + version: "v1.30.0" sver: importPath: "github.com/aserto-dev/sver/cmd/sver" version: "v1.3.13" diff --git a/buf.gen.yaml b/buf.gen.yaml index f3aeab1..4ef245c 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -9,8 +9,8 @@ managed: optimize_for: CODE_SIZE plugins: - - plugin: buf.build/grpc/java + - plugin: buf.build/grpc/java:v1.64.0 out: src/main/java -# # dependencies - - plugin: buf.build/protocolbuffers/java + + - plugin: buf.build/protocolbuffers/java:v25.3 out: src/main/java diff --git a/examples/pom.xml b/examples/pom.xml index 1696771..02915f6 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -8,9 +8,10 @@ examples 1.0.0-SNAPSHOT - - 19 - 19 + + 8 + 8 + 8 UTF-8 @@ -18,7 +19,7 @@ com.aserto java-directory - 0.30.2 + 0.31.2 diff --git a/examples/src/main/java/com/aserto/DirectoryClient.java b/examples/src/main/java/com/aserto/DirectoryClient.java index e39d2c2..e8bd65c 100644 --- a/examples/src/main/java/com/aserto/DirectoryClient.java +++ b/examples/src/main/java/com/aserto/DirectoryClient.java @@ -1,10 +1,11 @@ package com.aserto; -import com.aserto.directory.reader.v2.*; -import com.aserto.directory.writer.v2.*; -import com.aserto.directory.importer.v2.*; -import com.aserto.directory.exporter.v2.*; -import com.aserto.directory.common.v2.*; +import com.aserto.directory.model.v3.*; +import com.aserto.directory.reader.v3.*; +import com.aserto.directory.writer.v3.*; +import com.aserto.directory.importer.v3.*; +import com.aserto.directory.exporter.v3.*; +import com.aserto.directory.common.v3.*; import io.grpc.ManagedChannel; import io.grpc.Metadata; @@ -16,7 +17,11 @@ import javax.net.ssl.SSLException; +import com.google.protobuf.*; + + public class DirectoryClient { + private ModelGrpc.ModelBlockingStub modelClient; private ReaderGrpc.ReaderBlockingStub readerClient; private WriterGrpc.WriterBlockingStub writerClient; private ImporterGrpc.ImporterBlockingStub importerClient; @@ -41,12 +46,17 @@ public DirectoryClient(Config config) throws SSLException { .sslContext(GrpcSslContexts.forClient().trustManager(InsecureTrustManagerFactory.INSTANCE).build()) .build(); + this.modelClient = ModelGrpc.newBlockingStub(channel); this.readerClient = ReaderGrpc.newBlockingStub(channel); this.writerClient = WriterGrpc.newBlockingStub(channel); this.importerClient = ImporterGrpc.newBlockingStub(channel); this.exporterClient = ExporterGrpc.newBlockingStub(channel); } + public ModelGrpc.ModelBlockingStub Model() { + return modelClient; + } + public ReaderGrpc.ReaderBlockingStub Reader() { return readerClient; } diff --git a/examples/src/main/java/com/aserto/Example.java b/examples/src/main/java/com/aserto/Example.java index 5adcbf3..2ed364e 100644 --- a/examples/src/main/java/com/aserto/Example.java +++ b/examples/src/main/java/com/aserto/Example.java @@ -1,14 +1,17 @@ package com.aserto; -import com.aserto.directory.reader.v2.*; -import com.aserto.directory.writer.v2.*; -import com.aserto.directory.importer.v2.*; -import com.aserto.directory.exporter.v2.*; -import com.aserto.directory.common.v2.*; +import com.aserto.directory.model.v3.*; +import com.aserto.directory.reader.v3.*; +import com.aserto.directory.writer.v3.*; +import com.aserto.directory.importer.v3.*; +import com.aserto.directory.exporter.v3.*; +import com.aserto.directory.common.v3.*; import io.github.cdimascio.dotenv.DotenvException; import javax.net.ssl.SSLException; +import com.google.protobuf.*; + public class Example { public static void main(String[] args) { try { @@ -18,7 +21,7 @@ public static void main(String[] args) { DirectoryClient directoryClient = new DirectoryClient(config); - listObjectTypes(directoryClient); + listObjects(directoryClient); } catch (DotenvException | SSLException ex) { System.out.printf("error: %s\n", ex.getMessage()); @@ -26,15 +29,15 @@ public static void main(String[] args) { } } - public static void listObjectTypes(DirectoryClient directoryClient) { - System.out.println("<--------------- list object types call --------------->"); + public static void listObjects(DirectoryClient directoryClient) { + System.out.println("<--------------- list objects call --------------->"); - GetObjectTypesRequest.Builder builder = GetObjectTypesRequest.newBuilder(); - GetObjectTypesRequest request = builder.build(); - GetObjectTypesResponse response = directoryClient.Reader().getObjectTypes(request); + GetObjectsRequest.Builder builder = GetObjectsRequest.newBuilder(); + GetObjectsRequest request = builder.build(); + GetObjectsResponse response = directoryClient.Reader().getObjects(request); - response.getResultsList().forEach(objectType -> { - System.out.println(objectType); + response.getResultsList().forEach(object -> { + System.out.println(object); }); } } diff --git a/magefiles/magefile.go b/magefiles/magefile.go index 3fe9753..993948e 100644 --- a/magefiles/magefile.go +++ b/magefiles/magefile.go @@ -16,12 +16,10 @@ import ( "github.com/magefile/mage/sh" ) -var ( - ui = clui.NewUI() -) +var ui = clui.NewUI() func init() { - os.Setenv("GO_VERSION", "1.19") + os.Setenv("GO_VERSION", "1.22") os.Setenv("GOPRIVATE", "github.com/aserto-dev") } @@ -44,9 +42,11 @@ func Deps() { } func Generate() error { - bufImages := []string{"buf.build/aserto-dev/directory", + bufImages := []string{ + "buf.build/aserto-dev/directory", "buf.build/grpc-ecosystem/grpc-gateway", - "buf.build/bufbuild/protovalidate"} + "buf.build/bufbuild/protovalidate", + } for _, bufImage := range bufImages { buffImgWithTag, err := addLatestTag(bufImage) diff --git a/pom.xml b/pom.xml index 13c9e58..3acc9f6 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 0.31.2 ${project.groupId}:${project.artifactId} - A low level client generated from the GRPC bindings. For a better development experience we encourage you to use aserto-java or aserto-spring if you are using Spring in your project + Generated Java gRPC bindings for the Topaz and Aserto Directory Service; these are low-level bindings. For a more idiomatic development experience, we advise using the aserto-java and/or aserto-spring packages. https://github.com/aserto-dev/java-directory @@ -34,13 +34,15 @@ + 8 8 8 UTF-8 - 1.60.0 - 3.25.1 + 1.64.0 + 3.25.3 6.0.53 + 0.2.1 @@ -70,6 +72,11 @@ protobuf-java ${protobuf.version} + + build.buf + protovalidate + ${protovalidate.version} + org.apache.tomcat annotations-api diff --git a/src/main/java/com/aserto/directory/assertion/v3/AssertionGrpc.java b/src/main/java/com/aserto/directory/assertion/v3/AssertionGrpc.java index 5d117f4..9087424 100644 --- a/src/main/java/com/aserto/directory/assertion/v3/AssertionGrpc.java +++ b/src/main/java/com/aserto/directory/assertion/v3/AssertionGrpc.java @@ -5,7 +5,7 @@ /** */ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.62.2)", + value = "by gRPC proto compiler (version 1.64.0)", comments = "Source: aserto/directory/assertion/v3/assertion.proto") @io.grpc.stub.annotations.GrpcGenerated public final class AssertionGrpc { diff --git a/src/main/java/com/aserto/directory/exporter/v2/ExporterGrpc.java b/src/main/java/com/aserto/directory/exporter/v2/ExporterGrpc.java index d207f79..26fd618 100644 --- a/src/main/java/com/aserto/directory/exporter/v2/ExporterGrpc.java +++ b/src/main/java/com/aserto/directory/exporter/v2/ExporterGrpc.java @@ -5,7 +5,7 @@ /** */ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.62.2)", + value = "by gRPC proto compiler (version 1.64.0)", comments = "Source: aserto/directory/exporter/v2/exporter.proto") @io.grpc.stub.annotations.GrpcGenerated public final class ExporterGrpc { diff --git a/src/main/java/com/aserto/directory/exporter/v3/ExporterGrpc.java b/src/main/java/com/aserto/directory/exporter/v3/ExporterGrpc.java index c358973..6992d3b 100644 --- a/src/main/java/com/aserto/directory/exporter/v3/ExporterGrpc.java +++ b/src/main/java/com/aserto/directory/exporter/v3/ExporterGrpc.java @@ -5,7 +5,7 @@ /** */ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.62.2)", + value = "by gRPC proto compiler (version 1.64.0)", comments = "Source: aserto/directory/exporter/v3/exporter.proto") @io.grpc.stub.annotations.GrpcGenerated public final class ExporterGrpc { diff --git a/src/main/java/com/aserto/directory/importer/v2/ImporterGrpc.java b/src/main/java/com/aserto/directory/importer/v2/ImporterGrpc.java index 22e9dd4..d731e6e 100644 --- a/src/main/java/com/aserto/directory/importer/v2/ImporterGrpc.java +++ b/src/main/java/com/aserto/directory/importer/v2/ImporterGrpc.java @@ -5,7 +5,7 @@ /** */ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.62.2)", + value = "by gRPC proto compiler (version 1.64.0)", comments = "Source: aserto/directory/importer/v2/importer.proto") @io.grpc.stub.annotations.GrpcGenerated public final class ImporterGrpc { diff --git a/src/main/java/com/aserto/directory/importer/v3/ImporterGrpc.java b/src/main/java/com/aserto/directory/importer/v3/ImporterGrpc.java index 2fc69c6..8ddaaad 100644 --- a/src/main/java/com/aserto/directory/importer/v3/ImporterGrpc.java +++ b/src/main/java/com/aserto/directory/importer/v3/ImporterGrpc.java @@ -5,7 +5,7 @@ /** */ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.62.2)", + value = "by gRPC proto compiler (version 1.64.0)", comments = "Source: aserto/directory/importer/v3/importer.proto") @io.grpc.stub.annotations.GrpcGenerated public final class ImporterGrpc { diff --git a/src/main/java/com/aserto/directory/importer/v3/ImporterProto.java b/src/main/java/com/aserto/directory/importer/v3/ImporterProto.java index b1d7de7..a821596 100644 --- a/src/main/java/com/aserto/directory/importer/v3/ImporterProto.java +++ b/src/main/java/com/aserto/directory/importer/v3/ImporterProto.java @@ -53,19 +53,20 @@ public static void registerAllExtensions( "2+.aserto.directory.importer.v3.ImportCo" + "unterR\010relation\"c\n\rImportCounter\022\022\n\004recv" + "\030\001 \001(\004R\004recv\022\020\n\003set\030\002 \001(\004R\003set\022\026\n\006delete" + - "\030\003 \001(\004R\006delete\022\024\n\005error\030\004 \001(\004R\005error*?\n\006" + + "\030\003 \001(\004R\006delete\022\024\n\005error\030\004 \001(\004R\005error*a\n\006" + "Opcode\022\022\n\016OPCODE_UNKNOWN\020\000\022\016\n\nOPCODE_SET" + - "\020\001\022\021\n\rOPCODE_DELETE\020\0022u\n\010Importer\022i\n\006Imp" + - "ort\022+.aserto.directory.importer.v3.Impor" + - "tRequest\032,.aserto.directory.importer.v3." + - "ImportResponse\"\000(\0010\001B\225\002\n com.aserto.dire" + - "ctory.importer.v3B\rImporterProtoH\002P\001ZHgi" + - "thub.com/aserto-dev/go-directory/aserto/" + - "directory/importer/v3;importer\370\001\000\242\002\003ADI\252" + - "\002\034Aserto.Directory.Importer.V3\312\002\035Aserto\\" + - "Directory_\\Importer\\V3\342\002)Aserto\\Director" + - "y_\\Importer\\V3\\GPBMetadata\352\002\037Aserto::Dir" + - "ectory::Importer::V3b\006proto3" + "\020\001\022\021\n\rOPCODE_DELETE\020\002\022 \n\034OPCODE_DELETE_W" + + "ITH_RELATIONS\020\0032u\n\010Importer\022i\n\006Import\022+." + + "aserto.directory.importer.v3.ImportReque" + + "st\032,.aserto.directory.importer.v3.Import" + + "Response\"\000(\0010\001B\225\002\n com.aserto.directory." + + "importer.v3B\rImporterProtoH\002P\001ZHgithub.c" + + "om/aserto-dev/go-directory/aserto/direct" + + "ory/importer/v3;importer\370\001\000\242\002\003ADI\252\002\034Aser" + + "to.Directory.Importer.V3\312\002\035Aserto\\Direct" + + "ory_\\Importer\\V3\342\002)Aserto\\Directory_\\Imp" + + "orter\\V3\\GPBMetadata\352\002\037Aserto::Directory" + + "::Importer::V3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, diff --git a/src/main/java/com/aserto/directory/importer/v3/Opcode.java b/src/main/java/com/aserto/directory/importer/v3/Opcode.java index ab90069..44a4a0a 100644 --- a/src/main/java/com/aserto/directory/importer/v3/Opcode.java +++ b/src/main/java/com/aserto/directory/importer/v3/Opcode.java @@ -21,6 +21,10 @@ public enum Opcode * OPCODE_DELETE = 2; */ OPCODE_DELETE(2), + /** + * OPCODE_DELETE_WITH_RELATIONS = 3; + */ + OPCODE_DELETE_WITH_RELATIONS(3), UNRECOGNIZED(-1), ; @@ -36,6 +40,10 @@ public enum Opcode * OPCODE_DELETE = 2; */ public static final int OPCODE_DELETE_VALUE = 2; + /** + * OPCODE_DELETE_WITH_RELATIONS = 3; + */ + public static final int OPCODE_DELETE_WITH_RELATIONS_VALUE = 3; public final int getNumber() { @@ -65,6 +73,7 @@ public static Opcode forNumber(int value) { case 0: return OPCODE_UNKNOWN; case 1: return OPCODE_SET; case 2: return OPCODE_DELETE; + case 3: return OPCODE_DELETE_WITH_RELATIONS; default: return null; } } diff --git a/src/main/java/com/aserto/directory/model/v3/ModelGrpc.java b/src/main/java/com/aserto/directory/model/v3/ModelGrpc.java index bb05a2d..10752bb 100644 --- a/src/main/java/com/aserto/directory/model/v3/ModelGrpc.java +++ b/src/main/java/com/aserto/directory/model/v3/ModelGrpc.java @@ -5,7 +5,7 @@ /** */ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.62.2)", + value = "by gRPC proto compiler (version 1.64.0)", comments = "Source: aserto/directory/model/v3/model.proto") @io.grpc.stub.annotations.GrpcGenerated public final class ModelGrpc { diff --git a/src/main/java/com/aserto/directory/reader/v2/ReaderGrpc.java b/src/main/java/com/aserto/directory/reader/v2/ReaderGrpc.java index 0d92e2d..815fe07 100644 --- a/src/main/java/com/aserto/directory/reader/v2/ReaderGrpc.java +++ b/src/main/java/com/aserto/directory/reader/v2/ReaderGrpc.java @@ -5,7 +5,7 @@ /** */ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.62.2)", + value = "by gRPC proto compiler (version 1.64.0)", comments = "Source: aserto/directory/reader/v2/reader.proto") @io.grpc.stub.annotations.GrpcGenerated public final class ReaderGrpc { diff --git a/src/main/java/com/aserto/directory/reader/v3/ReaderGrpc.java b/src/main/java/com/aserto/directory/reader/v3/ReaderGrpc.java index cbde980..96fc6f6 100644 --- a/src/main/java/com/aserto/directory/reader/v3/ReaderGrpc.java +++ b/src/main/java/com/aserto/directory/reader/v3/ReaderGrpc.java @@ -5,7 +5,7 @@ /** */ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.62.2)", + value = "by gRPC proto compiler (version 1.64.0)", comments = "Source: aserto/directory/reader/v3/reader.proto") @io.grpc.stub.annotations.GrpcGenerated public final class ReaderGrpc { diff --git a/src/main/java/com/aserto/directory/writer/v2/WriterGrpc.java b/src/main/java/com/aserto/directory/writer/v2/WriterGrpc.java index c63c705..753012c 100644 --- a/src/main/java/com/aserto/directory/writer/v2/WriterGrpc.java +++ b/src/main/java/com/aserto/directory/writer/v2/WriterGrpc.java @@ -5,7 +5,7 @@ /** */ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.62.2)", + value = "by gRPC proto compiler (version 1.64.0)", comments = "Source: aserto/directory/writer/v2/writer.proto") @io.grpc.stub.annotations.GrpcGenerated public final class WriterGrpc { diff --git a/src/main/java/com/aserto/directory/writer/v3/WriterGrpc.java b/src/main/java/com/aserto/directory/writer/v3/WriterGrpc.java index b6ddd70..23bd811 100644 --- a/src/main/java/com/aserto/directory/writer/v3/WriterGrpc.java +++ b/src/main/java/com/aserto/directory/writer/v3/WriterGrpc.java @@ -5,7 +5,7 @@ /** */ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.62.2)", + value = "by gRPC proto compiler (version 1.64.0)", comments = "Source: aserto/directory/writer/v3/writer.proto") @io.grpc.stub.annotations.GrpcGenerated public final class WriterGrpc { diff --git a/src/main/java/com/buf/validate/FieldConstraints.java b/src/main/java/com/buf/validate/FieldConstraints.java index c3ae982..1270288 100644 --- a/src/main/java/com/buf/validate/FieldConstraints.java +++ b/src/main/java/com/buf/validate/FieldConstraints.java @@ -6,8 +6,8 @@ /** *
- * FieldRules encapsulates the rules for each type of field. Depending on the
- * field, the correct set should be used to ensure proper validations.
+ * FieldConstraints encapsulates the rules for each type of field. Depending on
+ * the field, the correct set should be used to ensure proper validations.
  * 
* * Protobuf type {@code buf.validate.FieldConstraints} @@ -1148,8 +1148,8 @@ protected Builder newBuilderForType( } /** *
-   * FieldRules encapsulates the rules for each type of field. Depending on the
-   * field, the correct set should be used to ensure proper validations.
+   * FieldConstraints encapsulates the rules for each type of field. Depending on
+   * the field, the correct set should be used to ensure proper validations.
    * 
* * Protobuf type {@code buf.validate.FieldConstraints} diff --git a/src/main/java/com/buf/validate/StringRules.java b/src/main/java/com/buf/validate/StringRules.java index 23aa1a9..a9289cd 100644 --- a/src/main/java/com/buf/validate/StringRules.java +++ b/src/main/java/com/buf/validate/StringRules.java @@ -70,6 +70,7 @@ public enum WellKnownCase URI_REF(18), ADDRESS(21), UUID(22), + TUUID(33), IP_WITH_PREFIXLEN(26), IPV4_WITH_PREFIXLEN(27), IPV6_WITH_PREFIXLEN(28), @@ -104,6 +105,7 @@ public static WellKnownCase forNumber(int value) { case 18: return URI_REF; case 21: return ADDRESS; case 22: return UUID; + case 33: return TUUID; case 26: return IP_WITH_PREFIXLEN; case 27: return IPV4_WITH_PREFIXLEN; case 28: return IPV6_WITH_PREFIXLEN; @@ -1529,6 +1531,55 @@ public boolean getUuid() { return false; } + public static final int TUUID_FIELD_NUMBER = 33; + /** + *
+   * `tuuid` (trimmed UUID) specifies that the field value must be a valid UUID as
+   * defined by [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2) with all dashes
+   * omitted. If the field value isn't a valid UUID without dashes, an error message
+   * will be generated.
+   *
+   * ```proto
+   * message MyString {
+   *   // value must be a valid trimmed UUID
+   *   string value = 1 [(buf.validate.field).string.tuuid = true];
+   * }
+   * ```
+   * 
+ * + * bool tuuid = 33 [json_name = "tuuid", (.buf.validate.priv.field) = { ... } + * @return Whether the tuuid field is set. + */ + @java.lang.Override + public boolean hasTuuid() { + return wellKnownCase_ == 33; + } + /** + *
+   * `tuuid` (trimmed UUID) specifies that the field value must be a valid UUID as
+   * defined by [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2) with all dashes
+   * omitted. If the field value isn't a valid UUID without dashes, an error message
+   * will be generated.
+   *
+   * ```proto
+   * message MyString {
+   *   // value must be a valid trimmed UUID
+   *   string value = 1 [(buf.validate.field).string.tuuid = true];
+   * }
+   * ```
+   * 
+ * + * bool tuuid = 33 [json_name = "tuuid", (.buf.validate.priv.field) = { ... } + * @return The tuuid. + */ + @java.lang.Override + public boolean getTuuid() { + if (wellKnownCase_ == 33) { + return (java.lang.Boolean) wellKnown_; + } + return false; + } + public static final int IP_WITH_PREFIXLEN_FIELD_NUMBER = 26; /** *
@@ -2138,6 +2189,7 @@ private Builder(
     public Builder clear() {
       super.clear();
       bitField0_ = 0;
+      bitField1_ = 0;
       const_ = "";
       len_ = 0L;
       minLen_ = 0L;
@@ -2184,6 +2236,7 @@ public com.buf.validate.StringRules build() {
     public com.buf.validate.StringRules buildPartial() {
       com.buf.validate.StringRules result = new com.buf.validate.StringRules(this);
       if (bitField0_ != 0) { buildPartial0(result); }
+      if (bitField1_ != 0) { buildPartial1(result); }
       buildPartialOneofs(result);
       onBuilt();
       return result;
@@ -2248,7 +2301,13 @@ private void buildPartial0(com.buf.validate.StringRules result) {
         notIn_.makeImmutable();
         result.notIn_ = notIn_;
       }
-      if (((from_bitField0_ & 0x80000000) != 0)) {
+      result.bitField0_ |= to_bitField0_;
+    }
+
+    private void buildPartial1(com.buf.validate.StringRules result) {
+      int from_bitField1_ = bitField1_;
+      int to_bitField0_ = 0;
+      if (((from_bitField1_ & 0x00000001) != 0)) {
         result.strict_ = strict_;
         to_bitField0_ |= 0x00001000;
       }
@@ -2308,6 +2367,7 @@ public Builder clearWellKnown() {
     }
 
     private int bitField0_;
+    private int bitField1_;
 
     private java.lang.Object const_ = "";
     /**
@@ -5134,6 +5194,104 @@ public Builder clearUuid() {
       return this;
     }
 
+    /**
+     * 
+     * `tuuid` (trimmed UUID) specifies that the field value must be a valid UUID as
+     * defined by [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2) with all dashes
+     * omitted. If the field value isn't a valid UUID without dashes, an error message
+     * will be generated.
+     *
+     * ```proto
+     * message MyString {
+     *   // value must be a valid trimmed UUID
+     *   string value = 1 [(buf.validate.field).string.tuuid = true];
+     * }
+     * ```
+     * 
+ * + * bool tuuid = 33 [json_name = "tuuid", (.buf.validate.priv.field) = { ... } + * @return Whether the tuuid field is set. + */ + public boolean hasTuuid() { + return wellKnownCase_ == 33; + } + /** + *
+     * `tuuid` (trimmed UUID) specifies that the field value must be a valid UUID as
+     * defined by [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2) with all dashes
+     * omitted. If the field value isn't a valid UUID without dashes, an error message
+     * will be generated.
+     *
+     * ```proto
+     * message MyString {
+     *   // value must be a valid trimmed UUID
+     *   string value = 1 [(buf.validate.field).string.tuuid = true];
+     * }
+     * ```
+     * 
+ * + * bool tuuid = 33 [json_name = "tuuid", (.buf.validate.priv.field) = { ... } + * @return The tuuid. + */ + public boolean getTuuid() { + if (wellKnownCase_ == 33) { + return (java.lang.Boolean) wellKnown_; + } + return false; + } + /** + *
+     * `tuuid` (trimmed UUID) specifies that the field value must be a valid UUID as
+     * defined by [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2) with all dashes
+     * omitted. If the field value isn't a valid UUID without dashes, an error message
+     * will be generated.
+     *
+     * ```proto
+     * message MyString {
+     *   // value must be a valid trimmed UUID
+     *   string value = 1 [(buf.validate.field).string.tuuid = true];
+     * }
+     * ```
+     * 
+ * + * bool tuuid = 33 [json_name = "tuuid", (.buf.validate.priv.field) = { ... } + * @param value The tuuid to set. + * @return This builder for chaining. + */ + public Builder setTuuid(boolean value) { + + wellKnownCase_ = 33; + wellKnown_ = value; + onChanged(); + return this; + } + /** + *
+     * `tuuid` (trimmed UUID) specifies that the field value must be a valid UUID as
+     * defined by [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2) with all dashes
+     * omitted. If the field value isn't a valid UUID without dashes, an error message
+     * will be generated.
+     *
+     * ```proto
+     * message MyString {
+     *   // value must be a valid trimmed UUID
+     *   string value = 1 [(buf.validate.field).string.tuuid = true];
+     * }
+     * ```
+     * 
+ * + * bool tuuid = 33 [json_name = "tuuid", (.buf.validate.priv.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearTuuid() { + if (wellKnownCase_ == 33) { + wellKnownCase_ = 0; + wellKnown_ = null; + onChanged(); + } + return this; + } + /** *
      * `ip_with_prefixlen` specifies that the field value must be a valid IP (v4 or v6)
@@ -6022,7 +6180,7 @@ public Builder clearWellKnownRegex() {
      */
     @java.lang.Override
     public boolean hasStrict() {
-      return ((bitField0_ & 0x80000000) != 0);
+      return ((bitField1_ & 0x00000001) != 0);
     }
     /**
      * 
@@ -6070,7 +6228,7 @@ public boolean getStrict() {
     public Builder setStrict(boolean value) {
 
       strict_ = value;
-      bitField0_ |= 0x80000000;
+      bitField1_ |= 0x00000001;
       onChanged();
       return this;
     }
@@ -6094,7 +6252,7 @@ public Builder setStrict(boolean value) {
      * @return This builder for chaining.
      */
     public Builder clearStrict() {
-      bitField0_ = (bitField0_ & ~0x80000000);
+      bitField1_ = (bitField1_ & ~0x00000001);
       strict_ = false;
       onChanged();
       return this;
diff --git a/src/main/java/com/buf/validate/StringRulesOrBuilder.java b/src/main/java/com/buf/validate/StringRulesOrBuilder.java
index ea6b571..8754883 100644
--- a/src/main/java/com/buf/validate/StringRulesOrBuilder.java
+++ b/src/main/java/com/buf/validate/StringRulesOrBuilder.java
@@ -1068,6 +1068,45 @@ public interface StringRulesOrBuilder extends
    */
   boolean getUuid();
 
+  /**
+   * 
+   * `tuuid` (trimmed UUID) specifies that the field value must be a valid UUID as
+   * defined by [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2) with all dashes
+   * omitted. If the field value isn't a valid UUID without dashes, an error message
+   * will be generated.
+   *
+   * ```proto
+   * message MyString {
+   *   // value must be a valid trimmed UUID
+   *   string value = 1 [(buf.validate.field).string.tuuid = true];
+   * }
+   * ```
+   * 
+ * + * bool tuuid = 33 [json_name = "tuuid", (.buf.validate.priv.field) = { ... } + * @return Whether the tuuid field is set. + */ + boolean hasTuuid(); + /** + *
+   * `tuuid` (trimmed UUID) specifies that the field value must be a valid UUID as
+   * defined by [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2) with all dashes
+   * omitted. If the field value isn't a valid UUID without dashes, an error message
+   * will be generated.
+   *
+   * ```proto
+   * message MyString {
+   *   // value must be a valid trimmed UUID
+   *   string value = 1 [(buf.validate.field).string.tuuid = true];
+   * }
+   * ```
+   * 
+ * + * bool tuuid = 33 [json_name = "tuuid", (.buf.validate.priv.field) = { ... } + * @return The tuuid. + */ + boolean getTuuid(); + /** *
    * `ip_with_prefixlen` specifies that the field value must be a valid IP (v4 or v6)
diff --git a/src/main/java/com/buf/validate/ValidateProto.java b/src/main/java/com/buf/validate/ValidateProto.java
index 9d441cf..fa64875 100644
--- a/src/main/java/com/buf/validate/ValidateProto.java
+++ b/src/main/java/com/buf/validate/ValidateProto.java
@@ -1061,7 +1061,7 @@ public static void registerAllExtensions(
       "const\"\213\001\n\tBoolRules\022t\n\005const\030\001 \001(\010BY\302HV\n" +
       "T\n\nbool.const\032Fthis != rules.const ? \'va" +
       "lue must equal %s\'.format([rules.const])" +
-      " : \'\'H\000R\005const\210\001\001B\010\n\006_const\"\3243\n\013StringRu" +
+      " : \'\'H\000R\005const\210\001\001B\010\n\006_const\"\2565\n\013StringRu" +
       "les\022x\n\005const\030\001 \001(\tB]\302HZ\nX\n\014string.const\032" +
       "Hthis != rules.const ? \'value must equal" +
       " `%s`\'.format([rules.const]) : \'\'H\001R\005con" +
@@ -1159,336 +1159,341 @@ public static void registerAllExtensions(
       "-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-" +
       "[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\')\nJ\n\021str" +
       "ing.uuid_empty\022)value is empty, which is" +
-      " not a valid UUID\032\nthis != \'\'H\000R\004uuid\022\357\001" +
-      "\n\021ip_with_prefixlen\030\032 \001(\010B\300\001\302H\274\001\n\\\n\030stri" +
-      "ng.ip_with_prefixlen\022\037value must be a va" +
-      "lid IP prefix\032\037this == \'\' || this.isIpPr" +
-      "efix()\n\\\n\036string.ip_with_prefixlen_empty" +
-      "\022.value is empty, which is not a valid I" +
-      "P prefix\032\nthis != \'\'H\000R\017ipWithPrefixlen\022" +
-      "\244\002\n\023ipv4_with_prefixlen\030\033 \001(\010B\361\001\302H\355\001\nu\n\032" +
-      "string.ipv4_with_prefixlen\0225value must b" +
-      "e a valid IPv4 address with prefix lengt" +
-      "h\032 this == \'\' || this.isIpPrefix(4)\nt\n s" +
-      "tring.ipv4_with_prefixlen_empty\022Dvalue i" +
-      "s empty, which is not a valid IPv4 addre" +
-      "ss with prefix length\032\nthis != \'\'H\000R\021ipv" +
-      "4WithPrefixlen\022\244\002\n\023ipv6_with_prefixlen\030\034" +
-      " \001(\010B\361\001\302H\355\001\nu\n\032string.ipv6_with_prefixle" +
-      "n\0225value must be a valid IPv6 address wi" +
-      "th prefix length\032 this == \'\' || this.isI" +
-      "pPrefix(6)\nt\n string.ipv6_with_prefixlen" +
-      "_empty\022Dvalue is empty, which is not a v" +
-      "alid IPv6 address with prefix length\032\nth" +
-      "is != \'\'H\000R\021ipv6WithPrefixlen\022\324\001\n\tip_pre" +
-      "fix\030\035 \001(\010B\264\001\302H\260\001\nX\n\020string.ip_prefix\022\037va" +
-      "lue must be a valid IP prefix\032#this == \'" +
-      "\' || this.isIpPrefix(true)\nT\n\026string.ip_" +
-      "prefix_empty\022.value is empty, which is n" +
-      "ot a valid IP prefix\032\nthis != \'\'H\000R\010ipPr" +
-      "efix\022\343\001\n\013ipv4_prefix\030\036 \001(\010B\277\001\302H\273\001\n_\n\022str" +
-      "ing.ipv4_prefix\022!value must be a valid I" +
-      "Pv4 prefix\032&this == \'\' || this.isIpPrefi" +
-      "x(4, true)\nX\n\030string.ipv4_prefix_empty\0220" +
-      "value is empty, which is not a valid IPv" +
-      "4 prefix\032\nthis != \'\'H\000R\nipv4Prefix\022\343\001\n\013i" +
-      "pv6_prefix\030\037 \001(\010B\277\001\302H\273\001\n_\n\022string.ipv6_p" +
-      "refix\022!value must be a valid IPv6 prefix" +
-      "\032&this == \'\' || this.isIpPrefix(6, true)" +
-      "\nX\n\030string.ipv6_prefix_empty\0220value is e" +
-      "mpty, which is not a valid IPv6 prefix\032\n" +
-      "this != \'\'H\000R\nipv6Prefix\022\222\002\n\rhost_and_po" +
-      "rt\030  \001(\010B\353\001\302H\347\001\n\201\001\n\024string.host_and_port" +
-      "\022Avalue must be a valid host (hostname o" +
-      "r IP address) and port pair\032&this == \'\' " +
-      "|| this.isHostAndPort(true)\na\n\032string.ho" +
-      "st_and_port_empty\0227value is empty, which" +
-      " is not a valid host and port pair\032\nthis" +
-      " != \'\'H\000R\013hostAndPort\022\270\005\n\020well_known_reg" +
-      "ex\030\030 \001(\0162\030.buf.validate.KnownRegexB\361\004\302H\355" +
-      "\004\n\360\001\n#string.well_known_regex.header_nam" +
-      "e\022&value must be a valid HTTP header nam" +
-      "e\032\240\001rules.well_known_regex != 1 || this " +
-      "== \'\' || this.matches(!has(rules.strict)" +
-      " || rules.strict ?\'^:?[0-9a-zA-Z!#$%&\\\'*" +
-      "+-.^_|~\\x60]+$\' :\'^[^\\u0000\\u000A\\u000D]" +
-      "+$\')\n\215\001\n)string.well_known_regex.header_" +
-      "name_empty\0225value is empty, which is not" +
-      " a valid HTTP header name\032)rules.well_kn" +
-      "own_regex != 1 || this != \'\'\n\347\001\n$string." +
-      "well_known_regex.header_value\022\'value mus" +
-      "t be a valid HTTP header value\032\225\001rules.w" +
-      "ell_known_regex != 2 || this.matches(!ha" +
-      "s(rules.strict) || rules.strict ?\'^[^\\u0" +
-      "000-\\u0008\\u000A-\\u001F\\u007F]*$\' :\'^[^\\" +
-      "u0000\\u000A\\u000D]*$\')H\000R\016wellKnownRegex" +
-      "\022\033\n\006strict\030\031 \001(\010H\rR\006strict\210\001\001B\014\n\nwell_kn" +
-      "ownB\010\n\006_constB\006\n\004_lenB\n\n\010_min_lenB\n\n\010_ma" +
-      "x_lenB\014\n\n_len_bytesB\014\n\n_min_bytesB\014\n\n_ma" +
-      "x_bytesB\n\n\010_patternB\t\n\007_prefixB\t\n\007_suffi" +
-      "xB\013\n\t_containsB\017\n\r_not_containsB\t\n\007_stri" +
-      "ct\"\216\021\n\nBytesRules\022r\n\005const\030\001 \001(\014BW\302HT\nR\n" +
-      "\013bytes.const\032Cthis != rules.const ? \'val" +
-      "ue must be %x\'.format([rules.const]) : \'" +
-      "\'H\001R\005const\210\001\001\022\202\001\n\003len\030\r \001(\004Bk\302Hh\nf\n\tbyte" +
-      "s.len\032Yuint(this.size()) != rules.len ? " +
-      "\'value length must be %s bytes\'.format([" +
-      "rules.len]) : \'\'H\002R\003len\210\001\001\022\235\001\n\007min_len\030\002" +
-      " \001(\004B\177\302H|\nz\n\rbytes.min_len\032iuint(this.si" +
-      "ze()) < rules.min_len ? \'value length mu" +
-      "st be at least %s bytes\'.format([rules.m" +
-      "in_len]) : \'\'H\003R\006minLen\210\001\001\022\225\001\n\007max_len\030\003" +
-      " \001(\004Bw\302Ht\nr\n\rbytes.max_len\032auint(this.si" +
-      "ze()) > rules.max_len ? \'value must be a" +
-      "t most %s bytes\'.format([rules.max_len])" +
-      " : \'\'H\004R\006maxLen\210\001\001\022\236\001\n\007pattern\030\004 \001(\tB\177\302H" +
-      "|\nz\n\rbytes.pattern\032i!string(this).matche" +
-      "s(rules.pattern) ? \'value must match reg" +
-      "ex pattern `%s`\'.format([rules.pattern])" +
-      " : \'\'H\005R\007pattern\210\001\001\022\216\001\n\006prefix\030\005 \001(\014Bq\302H" +
-      "n\nl\n\014bytes.prefix\032\\!this.startsWith(rule" +
-      "s.prefix) ? \'value does not have prefix " +
-      "%x\'.format([rules.prefix]) : \'\'H\006R\006prefi" +
-      "x\210\001\001\022\214\001\n\006suffix\030\006 \001(\014Bo\302Hl\nj\n\014bytes.suff" +
-      "ix\032Z!this.endsWith(rules.suffix) ? \'valu" +
-      "e does not have suffix %x\'.format([rules" +
-      ".suffix]) : \'\'H\007R\006suffix\210\001\001\022\222\001\n\010contains" +
-      "\030\007 \001(\014Bq\302Hn\nl\n\016bytes.contains\032Z!this.con" +
-      "tains(rules.contains) ? \'value does not " +
-      "contain %x\'.format([rules.contains]) : \'" +
-      "\'H\010R\010contains\210\001\001\022\233\001\n\002in\030\010 \003(\014B\212\001\302H\206\001\n\203\001\n" +
-      "\010bytes.in\032wdyn(rules)[\'in\'].size() > 0 &" +
-      "& !(this in dyn(rules)[\'in\']) ? \'value m" +
-      "ust be in list %s\'.format([dyn(rules)[\'i" +
-      "n\']]) : \'\'R\002in\022}\n\006not_in\030\t \003(\014Bf\302Hc\na\n\014b" +
-      "ytes.not_in\032Qthis in rules.not_in ? \'val" +
-      "ue must not be in list %s\'.format([rules" +
-      ".not_in]) : \'\'R\005notIn\022\325\001\n\002ip\030\n \001(\010B\302\001\302H\276" +
-      "\001\ng\n\010bytes.ip\022 value must be a valid IP " +
-      "address\0329this.size() == 0 || this.size()" +
-      " == 4 || this.size() == 16\nS\n\016bytes.ip_e" +
-      "mpty\022/value is empty, which is not a val" +
-      "id IP address\032\020this.size() != 0H\000R\002ip\022\314\001" +
-      "\n\004ipv4\030\013 \001(\010B\265\001\302H\261\001\nV\n\nbytes.ipv4\022\"value" +
-      " must be a valid IPv4 address\032$this.size" +
-      "() == 0 || this.size() == 4\nW\n\020bytes.ipv" +
-      "4_empty\0221value is empty, which is not a " +
-      "valid IPv4 address\032\020this.size() != 0H\000R\004" +
-      "ipv4\022\315\001\n\004ipv6\030\014 \001(\010B\266\001\302H\262\001\nW\n\nbytes.ipv6" +
-      "\022\"value must be a valid IPv6 address\032%th" +
-      "is.size() == 0 || this.size() == 16\nW\n\020b" +
-      "ytes.ipv6_empty\0221value is empty, which i" +
-      "s not a valid IPv6 address\032\020this.size() " +
-      "!= 0H\000R\004ipv6B\014\n\nwell_knownB\010\n\006_constB\006\n\004" +
-      "_lenB\n\n\010_min_lenB\n\n\010_max_lenB\n\n\010_pattern" +
-      "B\t\n\007_prefixB\t\n\007_suffixB\013\n\t_contains\"\274\003\n\t" +
-      "EnumRules\022t\n\005const\030\001 \001(\005BY\302HV\nT\n\nenum.co" +
-      "nst\032Fthis != rules.const ? \'value must e" +
-      "qual %s\'.format([rules.const]) : \'\'H\000R\005c" +
-      "onst\210\001\001\022&\n\014defined_only\030\002 \001(\010H\001R\013defined" +
-      "Only\210\001\001\022x\n\002in\030\003 \003(\005Bh\302He\nc\n\007enum.in\032X!(t" +
-      "his in dyn(rules)[\'in\']) ? \'value must b" +
-      "e in list %s\'.format([dyn(rules)[\'in\']])" +
-      " : \'\'R\002in\022|\n\006not_in\030\004 \003(\005Be\302Hb\n`\n\013enum.n" +
-      "ot_in\032Qthis in rules.not_in ? \'value mus" +
-      "t not be in list %s\'.format([rules.not_i" +
-      "n]) : \'\'R\005notInB\010\n\006_constB\017\n\r_defined_on" +
-      "ly\"\315\004\n\rRepeatedRules\022\255\001\n\tmin_items\030\001 \001(\004" +
-      "B\212\001\302H\206\001\n\203\001\n\022repeated.min_items\032muint(thi" +
-      "s.size()) < rules.min_items ? \'value mus" +
-      "t contain at least %d item(s)\'.format([r" +
-      "ules.min_items]) : \'\'H\000R\010minItems\210\001\001\022\261\001\n" +
-      "\tmax_items\030\002 \001(\004B\216\001\302H\212\001\n\207\001\n\022repeated.max" +
-      "_items\032quint(this.size()) > rules.max_it" +
-      "ems ? \'value must contain no more than %" +
-      "s item(s)\'.format([rules.max_items]) : \'" +
-      "\'H\001R\010maxItems\210\001\001\022l\n\006unique\030\003 \001(\010BO\302HL\nJ\n" +
-      "\017repeated.unique\022(repeated value must co" +
-      "ntain unique items\032\rthis.unique()H\002R\006uni" +
-      "que\210\001\001\0229\n\005items\030\004 \001(\0132\036.buf.validate.Fie" +
-      "ldConstraintsH\003R\005items\210\001\001B\014\n\n_min_itemsB" +
-      "\014\n\n_max_itemsB\t\n\007_uniqueB\010\n\006_items\"\361\003\n\010M" +
-      "apRules\022\236\001\n\tmin_pairs\030\001 \001(\004B|\302Hy\nw\n\rmap." +
-      "min_pairs\032fuint(this.size()) < rules.min" +
-      "_pairs ? \'map must be at least %d entrie" +
-      "s\'.format([rules.min_pairs]) : \'\'H\000R\010min" +
-      "Pairs\210\001\001\022\235\001\n\tmax_pairs\030\002 \001(\004B{\302Hx\nv\n\rmap" +
-      ".max_pairs\032euint(this.size()) > rules.ma" +
-      "x_pairs ? \'map must be at most %d entrie" +
-      "s\'.format([rules.max_pairs]) : \'\'H\001R\010max" +
-      "Pairs\210\001\001\0227\n\004keys\030\004 \001(\0132\036.buf.validate.Fi" +
-      "eldConstraintsH\002R\004keys\210\001\001\022;\n\006values\030\005 \001(" +
-      "\0132\036.buf.validate.FieldConstraintsH\003R\006val" +
-      "ues\210\001\001B\014\n\n_min_pairsB\014\n\n_max_pairsB\007\n\005_k" +
-      "eysB\t\n\007_values\"1\n\010AnyRules\022\016\n\002in\030\002 \003(\tR\002" +
-      "in\022\025\n\006not_in\030\003 \003(\tR\005notIn\"\322\026\n\rDurationRu" +
-      "les\022\223\001\n\005const\030\002 \001(\0132\031.google.protobuf.Du" +
-      "rationB]\302HZ\nX\n\016duration.const\032Fthis != r" +
-      "ules.const ? \'value must equal %s\'.forma" +
-      "t([rules.const]) : \'\'H\002R\005const\210\001\001\022\254\001\n\002lt" +
-      "\030\003 \001(\0132\031.google.protobuf.DurationB\177\302H|\nz" +
-      "\n\013duration.lt\032k!has(rules.gte) && !has(r" +
-      "ules.gt) && this >= rules.lt? \'value mus" +
-      "t be less than %s\'.format([rules.lt]) : " +
-      "\'\'H\000R\002lt\022\277\001\n\003lte\030\004 \001(\0132\031.google.protobuf" +
-      ".DurationB\217\001\302H\213\001\n\210\001\n\014duration.lte\032x!has(" +
-      "rules.gte) && !has(rules.gt) && this > r" +
-      "ules.lte? \'value must be less than or eq" +
-      "ual to %s\'.format([rules.lte]) : \'\'H\000R\003l" +
-      "te\022\305\007\n\002gt\030\005 \001(\0132\031.google.protobuf.Durati" +
-      "onB\227\007\302H\223\007\n}\n\013duration.gt\032n!has(rules.lt)" +
-      " && !has(rules.lte) && this <= rules.gt?" +
-      " \'value must be greater than %s\'.format(" +
-      "[rules.gt]) : \'\'\n\266\001\n\016duration.gt_lt\032\243\001ha" +
-      "s(rules.lt) && rules.lt >= rules.gt && (" +
-      "this >= rules.lt || this <= rules.gt)? \'" +
-      "value must be greater than %s and less t" +
-      "han %s\'.format([rules.gt, rules.lt]) : \'" +
-      "\'\n\276\001\n\030duration.gt_lt_exclusive\032\241\001has(rul" +
-      "es.lt) && rules.lt < rules.gt && (rules." +
-      "lt <= this && this <= rules.gt)? \'value " +
-      "must be greater than %s or less than %s\'" +
-      ".format([rules.gt, rules.lt]) : \'\'\n\306\001\n\017d" +
-      "uration.gt_lte\032\262\001has(rules.lte) && rules" +
-      ".lte >= rules.gt && (this > rules.lte ||" +
-      " this <= rules.gt)? \'value must be great" +
-      "er than %s and less than or equal to %s\'" +
-      ".format([rules.gt, rules.lte]) : \'\'\n\316\001\n\031" +
-      "duration.gt_lte_exclusive\032\260\001has(rules.lt" +
-      "e) && rules.lte < rules.gt && (rules.lte" +
-      " < this && this <= rules.gt)? \'value mus" +
-      "t be greater than %s or less than or equ" +
-      "al to %s\'.format([rules.gt, rules.lte]) " +
-      ": \'\'H\001R\002gt\022\222\010\n\003gte\030\006 \001(\0132\031.google.protob" +
-      "uf.DurationB\342\007\302H\336\007\n\213\001\n\014duration.gte\032{!ha" +
-      "s(rules.lt) && !has(rules.lte) && this <" +
-      " rules.gte? \'value must be greater than " +
-      "or equal to %s\'.format([rules.gte]) : \'\'" +
-      "\n\305\001\n\017duration.gte_lt\032\261\001has(rules.lt) && " +
-      "rules.lt >= rules.gte && (this >= rules." +
-      "lt || this < rules.gte)? \'value must be " +
-      "greater than or equal to %s and less tha" +
-      "n %s\'.format([rules.gte, rules.lt]) : \'\'" +
-      "\n\315\001\n\031duration.gte_lt_exclusive\032\257\001has(rul" +
-      "es.lt) && rules.lt < rules.gte && (rules" +
-      ".lt <= this && this < rules.gte)? \'value" +
-      " must be greater than or equal to %s or " +
-      "less than %s\'.format([rules.gte, rules.l" +
-      "t]) : \'\'\n\325\001\n\020duration.gte_lte\032\300\001has(rule" +
-      "s.lte) && rules.lte >= rules.gte && (thi" +
-      "s > rules.lte || this < rules.gte)? \'val" +
-      "ue must be greater than or equal to %s a" +
-      "nd less than or equal to %s\'.format([rul" +
-      "es.gte, rules.lte]) : \'\'\n\335\001\n\032duration.gt" +
-      "e_lte_exclusive\032\276\001has(rules.lte) && rule" +
-      "s.lte < rules.gte && (rules.lte < this &" +
-      "& this < rules.gte)? \'value must be grea" +
-      "ter than or equal to %s or less than or " +
-      "equal to %s\'.format([rules.gte, rules.lt" +
-      "e]) : \'\'H\001R\003gte\022\227\001\n\002in\030\007 \003(\0132\031.google.pr" +
-      "otobuf.DurationBl\302Hi\ng\n\013duration.in\032X!(t" +
-      "his in dyn(rules)[\'in\']) ? \'value must b" +
-      "e in list %s\'.format([dyn(rules)[\'in\']])" +
-      " : \'\'R\002in\022\233\001\n\006not_in\030\010 \003(\0132\031.google.prot" +
-      "obuf.DurationBi\302Hf\nd\n\017duration.not_in\032Qt" +
-      "his in rules.not_in ? \'value must not be" +
-      " in list %s\'.format([rules.not_in]) : \'\'" +
-      "R\005notInB\013\n\tless_thanB\016\n\014greater_thanB\010\n\006" +
-      "_const\"\312\027\n\016TimestampRules\022\225\001\n\005const\030\002 \001(",
-      "\0132\032.google.protobuf.TimestampB^\302H[\nY\n\017ti" +
-      "mestamp.const\032Fthis != rules.const ? \'va" +
-      "lue must equal %s\'.format([rules.const])" +
-      " : \'\'H\002R\005const\210\001\001\022\257\001\n\002lt\030\003 \001(\0132\032.google." +
-      "protobuf.TimestampB\200\001\302H}\n{\n\014timestamp.lt" +
-      "\032k!has(rules.gte) && !has(rules.gt) && t" +
-      "his >= rules.lt? \'value must be less tha" +
-      "n %s\'.format([rules.lt]) : \'\'H\000R\002lt\022\301\001\n\003" +
-      "lte\030\004 \001(\0132\032.google.protobuf.TimestampB\220\001" +
-      "\302H\214\001\n\211\001\n\rtimestamp.lte\032x!has(rules.gte) " +
-      "&& !has(rules.gt) && this > rules.lte? \'" +
-      "value must be less than or equal to %s\'." +
-      "format([rules.lte]) : \'\'H\000R\003lte\022a\n\006lt_no" +
-      "w\030\007 \001(\010BH\302HE\nC\n\020timestamp.lt_now\032/this >" +
-      " now ? \'value must be less than now\' : \'" +
-      "\'H\000R\005ltNow\022\313\007\n\002gt\030\005 \001(\0132\032.google.protobu" +
-      "f.TimestampB\234\007\302H\230\007\n~\n\014timestamp.gt\032n!has" +
-      "(rules.lt) && !has(rules.lte) && this <=" +
-      " rules.gt? \'value must be greater than %" +
-      "s\'.format([rules.gt]) : \'\'\n\267\001\n\017timestamp" +
-      ".gt_lt\032\243\001has(rules.lt) && rules.lt >= ru" +
-      "les.gt && (this >= rules.lt || this <= r" +
-      "ules.gt)? \'value must be greater than %s" +
-      " and less than %s\'.format([rules.gt, rul" +
-      "es.lt]) : \'\'\n\277\001\n\031timestamp.gt_lt_exclusi" +
-      "ve\032\241\001has(rules.lt) && rules.lt < rules.g" +
-      "t && (rules.lt <= this && this <= rules." +
-      "gt)? \'value must be greater than %s or l" +
-      "ess than %s\'.format([rules.gt, rules.lt]" +
-      ") : \'\'\n\307\001\n\020timestamp.gt_lte\032\262\001has(rules." +
-      "lte) && rules.lte >= rules.gt && (this >" +
-      " rules.lte || this <= rules.gt)? \'value " +
-      "must be greater than %s and less than or" +
-      " equal to %s\'.format([rules.gt, rules.lt" +
-      "e]) : \'\'\n\317\001\n\032timestamp.gt_lte_exclusive\032" +
-      "\260\001has(rules.lte) && rules.lte < rules.gt" +
-      " && (rules.lte < this && this <= rules.g" +
-      "t)? \'value must be greater than %s or le" +
-      "ss than or equal to %s\'.format([rules.gt" +
-      ", rules.lte]) : \'\'H\001R\002gt\022\230\010\n\003gte\030\006 \001(\0132\032" +
-      ".google.protobuf.TimestampB\347\007\302H\343\007\n\214\001\n\rti" +
-      "mestamp.gte\032{!has(rules.lt) && !has(rule" +
-      "s.lte) && this < rules.gte? \'value must " +
-      "be greater than or equal to %s\'.format([" +
-      "rules.gte]) : \'\'\n\306\001\n\020timestamp.gte_lt\032\261\001" +
-      "has(rules.lt) && rules.lt >= rules.gte &" +
-      "& (this >= rules.lt || this < rules.gte)" +
-      "? \'value must be greater than or equal t" +
-      "o %s and less than %s\'.format([rules.gte" +
-      ", rules.lt]) : \'\'\n\316\001\n\032timestamp.gte_lt_e" +
+      " not a valid UUID\032\nthis != \'\'H\000R\004uuid\022\327\001" +
+      "\n\005tuuid\030! \001(\010B\276\001\302H\272\001\nc\n\014string.tuuid\022\"va" +
+      "lue must be a valid trimmed UUID\032/this =" +
+      "= \'\' || this.matches(\'^[0-9a-fA-F]{32}$\'" +
+      ")\nS\n\022string.tuuid_empty\0221value is empty," +
+      " which is not a valid trimmed UUID\032\nthis" +
+      " != \'\'H\000R\005tuuid\022\357\001\n\021ip_with_prefixlen\030\032 " +
+      "\001(\010B\300\001\302H\274\001\n\\\n\030string.ip_with_prefixlen\022\037" +
+      "value must be a valid IP prefix\032\037this ==" +
+      " \'\' || this.isIpPrefix()\n\\\n\036string.ip_wi" +
+      "th_prefixlen_empty\022.value is empty, whic" +
+      "h is not a valid IP prefix\032\nthis != \'\'H\000" +
+      "R\017ipWithPrefixlen\022\244\002\n\023ipv4_with_prefixle" +
+      "n\030\033 \001(\010B\361\001\302H\355\001\nu\n\032string.ipv4_with_prefi" +
+      "xlen\0225value must be a valid IPv4 address" +
+      " with prefix length\032 this == \'\' || this." +
+      "isIpPrefix(4)\nt\n string.ipv4_with_prefix" +
+      "len_empty\022Dvalue is empty, which is not " +
+      "a valid IPv4 address with prefix length\032" +
+      "\nthis != \'\'H\000R\021ipv4WithPrefixlen\022\244\002\n\023ipv" +
+      "6_with_prefixlen\030\034 \001(\010B\361\001\302H\355\001\nu\n\032string." +
+      "ipv6_with_prefixlen\0225value must be a val" +
+      "id IPv6 address with prefix length\032 this" +
+      " == \'\' || this.isIpPrefix(6)\nt\n string.i" +
+      "pv6_with_prefixlen_empty\022Dvalue is empty" +
+      ", which is not a valid IPv6 address with" +
+      " prefix length\032\nthis != \'\'H\000R\021ipv6WithPr" +
+      "efixlen\022\324\001\n\tip_prefix\030\035 \001(\010B\264\001\302H\260\001\nX\n\020st" +
+      "ring.ip_prefix\022\037value must be a valid IP" +
+      " prefix\032#this == \'\' || this.isIpPrefix(t" +
+      "rue)\nT\n\026string.ip_prefix_empty\022.value is" +
+      " empty, which is not a valid IP prefix\032\n" +
+      "this != \'\'H\000R\010ipPrefix\022\343\001\n\013ipv4_prefix\030\036" +
+      " \001(\010B\277\001\302H\273\001\n_\n\022string.ipv4_prefix\022!value" +
+      " must be a valid IPv4 prefix\032&this == \'\'" +
+      " || this.isIpPrefix(4, true)\nX\n\030string.i" +
+      "pv4_prefix_empty\0220value is empty, which " +
+      "is not a valid IPv4 prefix\032\nthis != \'\'H\000" +
+      "R\nipv4Prefix\022\343\001\n\013ipv6_prefix\030\037 \001(\010B\277\001\302H\273" +
+      "\001\n_\n\022string.ipv6_prefix\022!value must be a" +
+      " valid IPv6 prefix\032&this == \'\' || this.i" +
+      "sIpPrefix(6, true)\nX\n\030string.ipv6_prefix" +
+      "_empty\0220value is empty, which is not a v" +
+      "alid IPv6 prefix\032\nthis != \'\'H\000R\nipv6Pref" +
+      "ix\022\222\002\n\rhost_and_port\030  \001(\010B\353\001\302H\347\001\n\201\001\n\024st" +
+      "ring.host_and_port\022Avalue must be a vali" +
+      "d host (hostname or IP address) and port" +
+      " pair\032&this == \'\' || this.isHostAndPort(" +
+      "true)\na\n\032string.host_and_port_empty\0227val" +
+      "ue is empty, which is not a valid host a" +
+      "nd port pair\032\nthis != \'\'H\000R\013hostAndPort\022" +
+      "\270\005\n\020well_known_regex\030\030 \001(\0162\030.buf.validat" +
+      "e.KnownRegexB\361\004\302H\355\004\n\360\001\n#string.well_know" +
+      "n_regex.header_name\022&value must be a val" +
+      "id HTTP header name\032\240\001rules.well_known_r" +
+      "egex != 1 || this == \'\' || this.matches(" +
+      "!has(rules.strict) || rules.strict ?\'^:?" +
+      "[0-9a-zA-Z!#$%&\\\'*+-.^_|~\\x60]+$\' :\'^[^\\" +
+      "u0000\\u000A\\u000D]+$\')\n\215\001\n)string.well_k" +
+      "nown_regex.header_name_empty\0225value is e" +
+      "mpty, which is not a valid HTTP header n" +
+      "ame\032)rules.well_known_regex != 1 || this" +
+      " != \'\'\n\347\001\n$string.well_known_regex.heade" +
+      "r_value\022\'value must be a valid HTTP head" +
+      "er value\032\225\001rules.well_known_regex != 2 |" +
+      "| this.matches(!has(rules.strict) || rul" +
+      "es.strict ?\'^[^\\u0000-\\u0008\\u000A-\\u001" +
+      "F\\u007F]*$\' :\'^[^\\u0000\\u000A\\u000D]*$\')" +
+      "H\000R\016wellKnownRegex\022\033\n\006strict\030\031 \001(\010H\rR\006st" +
+      "rict\210\001\001B\014\n\nwell_knownB\010\n\006_constB\006\n\004_lenB" +
+      "\n\n\010_min_lenB\n\n\010_max_lenB\014\n\n_len_bytesB\014\n" +
+      "\n_min_bytesB\014\n\n_max_bytesB\n\n\010_patternB\t\n" +
+      "\007_prefixB\t\n\007_suffixB\013\n\t_containsB\017\n\r_not" +
+      "_containsB\t\n\007_strict\"\216\021\n\nBytesRules\022r\n\005c" +
+      "onst\030\001 \001(\014BW\302HT\nR\n\013bytes.const\032Cthis != " +
+      "rules.const ? \'value must be %x\'.format(" +
+      "[rules.const]) : \'\'H\001R\005const\210\001\001\022\202\001\n\003len\030" +
+      "\r \001(\004Bk\302Hh\nf\n\tbytes.len\032Yuint(this.size(" +
+      ")) != rules.len ? \'value length must be " +
+      "%s bytes\'.format([rules.len]) : \'\'H\002R\003le" +
+      "n\210\001\001\022\235\001\n\007min_len\030\002 \001(\004B\177\302H|\nz\n\rbytes.min" +
+      "_len\032iuint(this.size()) < rules.min_len " +
+      "? \'value length must be at least %s byte" +
+      "s\'.format([rules.min_len]) : \'\'H\003R\006minLe" +
+      "n\210\001\001\022\225\001\n\007max_len\030\003 \001(\004Bw\302Ht\nr\n\rbytes.max" +
+      "_len\032auint(this.size()) > rules.max_len " +
+      "? \'value must be at most %s bytes\'.forma" +
+      "t([rules.max_len]) : \'\'H\004R\006maxLen\210\001\001\022\236\001\n" +
+      "\007pattern\030\004 \001(\tB\177\302H|\nz\n\rbytes.pattern\032i!s" +
+      "tring(this).matches(rules.pattern) ? \'va" +
+      "lue must match regex pattern `%s`\'.forma" +
+      "t([rules.pattern]) : \'\'H\005R\007pattern\210\001\001\022\216\001" +
+      "\n\006prefix\030\005 \001(\014Bq\302Hn\nl\n\014bytes.prefix\032\\!th" +
+      "is.startsWith(rules.prefix) ? \'value doe" +
+      "s not have prefix %x\'.format([rules.pref" +
+      "ix]) : \'\'H\006R\006prefix\210\001\001\022\214\001\n\006suffix\030\006 \001(\014B" +
+      "o\302Hl\nj\n\014bytes.suffix\032Z!this.endsWith(rul" +
+      "es.suffix) ? \'value does not have suffix" +
+      " %x\'.format([rules.suffix]) : \'\'H\007R\006suff" +
+      "ix\210\001\001\022\222\001\n\010contains\030\007 \001(\014Bq\302Hn\nl\n\016bytes.c" +
+      "ontains\032Z!this.contains(rules.contains) " +
+      "? \'value does not contain %x\'.format([ru" +
+      "les.contains]) : \'\'H\010R\010contains\210\001\001\022\233\001\n\002i" +
+      "n\030\010 \003(\014B\212\001\302H\206\001\n\203\001\n\010bytes.in\032wdyn(rules)[" +
+      "\'in\'].size() > 0 && !(this in dyn(rules)" +
+      "[\'in\']) ? \'value must be in list %s\'.for" +
+      "mat([dyn(rules)[\'in\']]) : \'\'R\002in\022}\n\006not_" +
+      "in\030\t \003(\014Bf\302Hc\na\n\014bytes.not_in\032Qthis in r" +
+      "ules.not_in ? \'value must not be in list" +
+      " %s\'.format([rules.not_in]) : \'\'R\005notIn\022" +
+      "\325\001\n\002ip\030\n \001(\010B\302\001\302H\276\001\ng\n\010bytes.ip\022 value m" +
+      "ust be a valid IP address\0329this.size() =" +
+      "= 0 || this.size() == 4 || this.size() =" +
+      "= 16\nS\n\016bytes.ip_empty\022/value is empty, " +
+      "which is not a valid IP address\032\020this.si" +
+      "ze() != 0H\000R\002ip\022\314\001\n\004ipv4\030\013 \001(\010B\265\001\302H\261\001\nV\n" +
+      "\nbytes.ipv4\022\"value must be a valid IPv4 " +
+      "address\032$this.size() == 0 || this.size()" +
+      " == 4\nW\n\020bytes.ipv4_empty\0221value is empt" +
+      "y, which is not a valid IPv4 address\032\020th" +
+      "is.size() != 0H\000R\004ipv4\022\315\001\n\004ipv6\030\014 \001(\010B\266\001" +
+      "\302H\262\001\nW\n\nbytes.ipv6\022\"value must be a vali" +
+      "d IPv6 address\032%this.size() == 0 || this" +
+      ".size() == 16\nW\n\020bytes.ipv6_empty\0221value" +
+      " is empty, which is not a valid IPv6 add" +
+      "ress\032\020this.size() != 0H\000R\004ipv6B\014\n\nwell_k" +
+      "nownB\010\n\006_constB\006\n\004_lenB\n\n\010_min_lenB\n\n\010_m" +
+      "ax_lenB\n\n\010_patternB\t\n\007_prefixB\t\n\007_suffix" +
+      "B\013\n\t_contains\"\274\003\n\tEnumRules\022t\n\005const\030\001 \001" +
+      "(\005BY\302HV\nT\n\nenum.const\032Fthis != rules.con" +
+      "st ? \'value must equal %s\'.format([rules" +
+      ".const]) : \'\'H\000R\005const\210\001\001\022&\n\014defined_onl" +
+      "y\030\002 \001(\010H\001R\013definedOnly\210\001\001\022x\n\002in\030\003 \003(\005Bh\302" +
+      "He\nc\n\007enum.in\032X!(this in dyn(rules)[\'in\'" +
+      "]) ? \'value must be in list %s\'.format([" +
+      "dyn(rules)[\'in\']]) : \'\'R\002in\022|\n\006not_in\030\004 " +
+      "\003(\005Be\302Hb\n`\n\013enum.not_in\032Qthis in rules.n" +
+      "ot_in ? \'value must not be in list %s\'.f" +
+      "ormat([rules.not_in]) : \'\'R\005notInB\010\n\006_co" +
+      "nstB\017\n\r_defined_only\"\315\004\n\rRepeatedRules\022\255" +
+      "\001\n\tmin_items\030\001 \001(\004B\212\001\302H\206\001\n\203\001\n\022repeated.m" +
+      "in_items\032muint(this.size()) < rules.min_" +
+      "items ? \'value must contain at least %d " +
+      "item(s)\'.format([rules.min_items]) : \'\'H" +
+      "\000R\010minItems\210\001\001\022\261\001\n\tmax_items\030\002 \001(\004B\216\001\302H\212" +
+      "\001\n\207\001\n\022repeated.max_items\032quint(this.size" +
+      "()) > rules.max_items ? \'value must cont" +
+      "ain no more than %s item(s)\'.format([rul" +
+      "es.max_items]) : \'\'H\001R\010maxItems\210\001\001\022l\n\006un" +
+      "ique\030\003 \001(\010BO\302HL\nJ\n\017repeated.unique\022(repe" +
+      "ated value must contain unique items\032\rth" +
+      "is.unique()H\002R\006unique\210\001\001\0229\n\005items\030\004 \001(\0132" +
+      "\036.buf.validate.FieldConstraintsH\003R\005items" +
+      "\210\001\001B\014\n\n_min_itemsB\014\n\n_max_itemsB\t\n\007_uniq" +
+      "ueB\010\n\006_items\"\361\003\n\010MapRules\022\236\001\n\tmin_pairs\030" +
+      "\001 \001(\004B|\302Hy\nw\n\rmap.min_pairs\032fuint(this.s" +
+      "ize()) < rules.min_pairs ? \'map must be " +
+      "at least %d entries\'.format([rules.min_p" +
+      "airs]) : \'\'H\000R\010minPairs\210\001\001\022\235\001\n\tmax_pairs" +
+      "\030\002 \001(\004B{\302Hx\nv\n\rmap.max_pairs\032euint(this." +
+      "size()) > rules.max_pairs ? \'map must be" +
+      " at most %d entries\'.format([rules.max_p" +
+      "airs]) : \'\'H\001R\010maxPairs\210\001\001\0227\n\004keys\030\004 \001(\013" +
+      "2\036.buf.validate.FieldConstraintsH\002R\004keys" +
+      "\210\001\001\022;\n\006values\030\005 \001(\0132\036.buf.validate.Field" +
+      "ConstraintsH\003R\006values\210\001\001B\014\n\n_min_pairsB\014" +
+      "\n\n_max_pairsB\007\n\005_keysB\t\n\007_values\"1\n\010AnyR" +
+      "ules\022\016\n\002in\030\002 \003(\tR\002in\022\025\n\006not_in\030\003 \003(\tR\005no" +
+      "tIn\"\322\026\n\rDurationRules\022\223\001\n\005const\030\002 \001(\0132\031." +
+      "google.protobuf.DurationB]\302HZ\nX\n\016duratio" +
+      "n.const\032Fthis != rules.const ? \'value mu" +
+      "st equal %s\'.format([rules.const]) : \'\'H" +
+      "\002R\005const\210\001\001\022\254\001\n\002lt\030\003 \001(\0132\031.google.protob" +
+      "uf.DurationB\177\302H|\nz\n\013duration.lt\032k!has(ru" +
+      "les.gte) && !has(rules.gt) && this >= ru" +
+      "les.lt? \'value must be less than %s\'.for" +
+      "mat([rules.lt]) : \'\'H\000R\002lt\022\277\001\n\003lte\030\004 \001(\013" +
+      "2\031.google.protobuf.DurationB\217\001\302H\213\001\n\210\001\n\014d" +
+      "uration.lte\032x!has(rules.gte) && !has(rul" +
+      "es.gt) && this > rules.lte? \'value must " +
+      "be less than or equal to %s\'.format([rul" +
+      "es.lte]) : \'\'H\000R\003lte\022\305\007\n\002gt\030\005 \001(\0132\031.goog" +
+      "le.protobuf.DurationB\227\007\302H\223\007\n}\n\013duration." +
+      "gt\032n!has(rules.lt) && !has(rules.lte) &&" +
+      " this <= rules.gt? \'value must be greate" +
+      "r than %s\'.format([rules.gt]) : \'\'\n\266\001\n\016d" +
+      "uration.gt_lt\032\243\001has(rules.lt) && rules.l" +
+      "t >= rules.gt && (this >= rules.lt || th" +
+      "is <= rules.gt)? \'value must be greater " +
+      "than %s and less than %s\'.format([rules." +
+      "gt, rules.lt]) : \'\'\n\276\001\n\030duration.gt_lt_e" +
+      "xclusive\032\241\001has(rules.lt) && rules.lt < r" +
+      "ules.gt && (rules.lt <= this && this <= " +
+      "rules.gt)? \'value must be greater than %" +
+      "s or less than %s\'.format([rules.gt, rul" +
+      "es.lt]) : \'\'\n\306\001\n\017duration.gt_lte\032\262\001has(r" +
+      "ules.lte) && rules.lte >= rules.gt && (t" +
+      "his > rules.lte || this <= rules.gt)? \'v" +
+      "alue must be greater than %s and less th" +
+      "an or equal to %s\'.format([rules.gt, rul" +
+      "es.lte]) : \'\'\n\316\001\n\031duration.gt_lte_exclus" +
+      "ive\032\260\001has(rules.lte) && rules.lte < rule" +
+      "s.gt && (rules.lte < this && this <= rul" +
+      "es.gt)? \'value must be greater than %s o" +
+      "r less than or equal to %s\'.format([rule" +
+      "s.gt, rules.lte]) : \'\'H\001R\002gt\022\222\010\n\003gte\030\006 \001" +
+      "(\0132\031.google.protobuf.DurationB\342\007\302H\336\007\n\213\001\n" +
+      "\014duration.gte\032{!has(rules.lt) && !has(ru" +
+      "les.lte) && this < rules.gte? \'value mus" +
+      "t be greater than or equal to %s\'.format" +
+      "([rules.gte]) : \'\'\n\305\001\n\017duration.gte_lt\032\261" +
+      "\001has(rules.lt) && rules.lt >= rules.gte " +
+      "&& (this >= rules.lt || this < rules.gte" +
+      ")? \'value must be greater than or equal " +
+      "to %s and less than %s\'.format([rules.gt" +
+      "e, rules.lt]) : \'\'\n\315\001\n\031duration.gte_lt_e" +
       "xclusive\032\257\001has(rules.lt) && rules.lt < r" +
       "ules.gte && (rules.lt <= this && this < " +
       "rules.gte)? \'value must be greater than " +
       "or equal to %s or less than %s\'.format([" +
-      "rules.gte, rules.lt]) : \'\'\n\326\001\n\021timestamp" +
-      ".gte_lte\032\300\001has(rules.lte) && rules.lte >" +
-      "= rules.gte && (this > rules.lte || this" +
-      " < rules.gte)? \'value must be greater th" +
-      "an or equal to %s and less than or equal" +
-      " to %s\'.format([rules.gte, rules.lte]) :" +
-      " \'\'\n\336\001\n\033timestamp.gte_lte_exclusive\032\276\001ha" +
-      "s(rules.lte) && rules.lte < rules.gte &&" +
-      " (rules.lte < this && this < rules.gte)?" +
-      " \'value must be greater than or equal to" +
-      " %s or less than or equal to %s\'.format(" +
-      "[rules.gte, rules.lte]) : \'\'H\001R\003gte\022d\n\006g" +
-      "t_now\030\010 \001(\010BK\302HH\nF\n\020timestamp.gt_now\0322th" +
-      "is < now ? \'value must be greater than n" +
-      "ow\' : \'\'H\001R\005gtNow\022\305\001\n\006within\030\t \001(\0132\031.goo" +
-      "gle.protobuf.DurationB\214\001\302H\210\001\n\205\001\n\020timesta" +
-      "mp.within\032qthis < now-rules.within || th" +
-      "is > now+rules.within ? \'value must be w" +
-      "ithin %s of now\'.format([rules.within]) " +
-      ": \'\'H\003R\006within\210\001\001B\013\n\tless_thanB\016\n\014greate" +
-      "r_thanB\010\n\006_constB\t\n\007_within*\235\001\n\006Ignore\022\026" +
-      "\n\022IGNORE_UNSPECIFIED\020\000\022\031\n\025IGNORE_IF_UNPO" +
-      "PULATED\020\001\022\033\n\027IGNORE_IF_DEFAULT_VALUE\020\002\022\021" +
-      "\n\rIGNORE_ALWAYS\020\003\022\024\n\014IGNORE_EMPTY\020\001\032\002\010\001\022" +
-      "\026\n\016IGNORE_DEFAULT\020\002\032\002\010\001\032\002\020\001*n\n\nKnownRege" +
-      "x\022\033\n\027KNOWN_REGEX_UNSPECIFIED\020\000\022 \n\034KNOWN_" +
-      "REGEX_HTTP_HEADER_NAME\020\001\022!\n\035KNOWN_REGEX_" +
-      "HTTP_HEADER_VALUE\020\002:_\n\007message\022\037.google." +
-      "protobuf.MessageOptions\030\207\t \001(\0132 .buf.val" +
-      "idate.MessageConstraintsR\007message\210\001\001:W\n\005" +
-      "oneof\022\035.google.protobuf.OneofOptions\030\207\t " +
-      "\001(\0132\036.buf.validate.OneofConstraintsR\005one" +
-      "of\210\001\001:W\n\005field\022\035.google.protobuf.FieldOp" +
-      "tions\030\207\t \001(\0132\036.buf.validate.FieldConstra" +
-      "intsR\005field\210\001\001B\300\001\n\020com.buf.validateB\rVal" +
-      "idateProtoH\002P\001ZGbuf.build/gen/go/bufbuil" +
-      "d/protovalidate/protocolbuffers/go/buf/v" +
-      "alidate\370\001\000\242\002\003BVX\252\002\014Buf.Validate\312\002\014Buf\\Va" +
-      "lidate\342\002\030Buf\\Validate\\GPBMetadata\352\002\rBuf:" +
-      ":Validateb\006proto3"
+      "rules.gte, rules.lt]) : \'\'\n\325\001\n\020duration." +
+      "gte_lte\032\300\001has(rules.lte) && rules.lte >=" +
+      " rules.gte && (this > rules.lte || this " +
+      "< rules.gte)? \'value must be greater tha" +
+      "n or equal to %s and less than or equal " +
+      "to %s\'.format([rules.gte, rules.lte]) : " +
+      "\'\'\n\335\001\n\032duration.gte_lte_exclusive\032\276\001has(" +
+      "rules.lte) && rules.lte < rules.gte && (" +
+      "rules.lte < this && this < rules.gte)? \'" +
+      "value must be greater than or equal to %" +
+      "s or less than or equal to %s\'.format([r" +
+      "ules.gte, rules.lte]) : \'\'H\001R\003gte\022\227\001\n\002in" +
+      "\030\007 \003(\0132\031.google.protobuf.DurationBl\302Hi\ng" +
+      "\n\013duration.in\032X!(this in dyn(rules)[\'in\'" +
+      "]) ? \'value must be in list %s\'.format([" +
+      "dyn(rules)[\'in\']]) : \'\'R\002in\022\233\001\n\006not_in\030\010",
+      " \003(\0132\031.google.protobuf.DurationBi\302Hf\nd\n\017" +
+      "duration.not_in\032Qthis in rules.not_in ? " +
+      "\'value must not be in list %s\'.format([r" +
+      "ules.not_in]) : \'\'R\005notInB\013\n\tless_thanB\016" +
+      "\n\014greater_thanB\010\n\006_const\"\312\027\n\016TimestampRu" +
+      "les\022\225\001\n\005const\030\002 \001(\0132\032.google.protobuf.Ti" +
+      "mestampB^\302H[\nY\n\017timestamp.const\032Fthis !=" +
+      " rules.const ? \'value must equal %s\'.for" +
+      "mat([rules.const]) : \'\'H\002R\005const\210\001\001\022\257\001\n\002" +
+      "lt\030\003 \001(\0132\032.google.protobuf.TimestampB\200\001\302" +
+      "H}\n{\n\014timestamp.lt\032k!has(rules.gte) && !" +
+      "has(rules.gt) && this >= rules.lt? \'valu" +
+      "e must be less than %s\'.format([rules.lt" +
+      "]) : \'\'H\000R\002lt\022\301\001\n\003lte\030\004 \001(\0132\032.google.pro" +
+      "tobuf.TimestampB\220\001\302H\214\001\n\211\001\n\rtimestamp.lte" +
+      "\032x!has(rules.gte) && !has(rules.gt) && t" +
+      "his > rules.lte? \'value must be less tha" +
+      "n or equal to %s\'.format([rules.lte]) : " +
+      "\'\'H\000R\003lte\022a\n\006lt_now\030\007 \001(\010BH\302HE\nC\n\020timest" +
+      "amp.lt_now\032/this > now ? \'value must be " +
+      "less than now\' : \'\'H\000R\005ltNow\022\313\007\n\002gt\030\005 \001(" +
+      "\0132\032.google.protobuf.TimestampB\234\007\302H\230\007\n~\n\014" +
+      "timestamp.gt\032n!has(rules.lt) && !has(rul" +
+      "es.lte) && this <= rules.gt? \'value must" +
+      " be greater than %s\'.format([rules.gt]) " +
+      ": \'\'\n\267\001\n\017timestamp.gt_lt\032\243\001has(rules.lt)" +
+      " && rules.lt >= rules.gt && (this >= rul" +
+      "es.lt || this <= rules.gt)? \'value must " +
+      "be greater than %s and less than %s\'.for" +
+      "mat([rules.gt, rules.lt]) : \'\'\n\277\001\n\031times" +
+      "tamp.gt_lt_exclusive\032\241\001has(rules.lt) && " +
+      "rules.lt < rules.gt && (rules.lt <= this" +
+      " && this <= rules.gt)? \'value must be gr" +
+      "eater than %s or less than %s\'.format([r" +
+      "ules.gt, rules.lt]) : \'\'\n\307\001\n\020timestamp.g" +
+      "t_lte\032\262\001has(rules.lte) && rules.lte >= r" +
+      "ules.gt && (this > rules.lte || this <= " +
+      "rules.gt)? \'value must be greater than %" +
+      "s and less than or equal to %s\'.format([" +
+      "rules.gt, rules.lte]) : \'\'\n\317\001\n\032timestamp" +
+      ".gt_lte_exclusive\032\260\001has(rules.lte) && ru" +
+      "les.lte < rules.gt && (rules.lte < this " +
+      "&& this <= rules.gt)? \'value must be gre" +
+      "ater than %s or less than or equal to %s" +
+      "\'.format([rules.gt, rules.lte]) : \'\'H\001R\002" +
+      "gt\022\230\010\n\003gte\030\006 \001(\0132\032.google.protobuf.Times" +
+      "tampB\347\007\302H\343\007\n\214\001\n\rtimestamp.gte\032{!has(rule" +
+      "s.lt) && !has(rules.lte) && this < rules" +
+      ".gte? \'value must be greater than or equ" +
+      "al to %s\'.format([rules.gte]) : \'\'\n\306\001\n\020t" +
+      "imestamp.gte_lt\032\261\001has(rules.lt) && rules" +
+      ".lt >= rules.gte && (this >= rules.lt ||" +
+      " this < rules.gte)? \'value must be great" +
+      "er than or equal to %s and less than %s\'" +
+      ".format([rules.gte, rules.lt]) : \'\'\n\316\001\n\032" +
+      "timestamp.gte_lt_exclusive\032\257\001has(rules.l" +
+      "t) && rules.lt < rules.gte && (rules.lt " +
+      "<= this && this < rules.gte)? \'value mus" +
+      "t be greater than or equal to %s or less" +
+      " than %s\'.format([rules.gte, rules.lt]) " +
+      ": \'\'\n\326\001\n\021timestamp.gte_lte\032\300\001has(rules.l" +
+      "te) && rules.lte >= rules.gte && (this >" +
+      " rules.lte || this < rules.gte)? \'value " +
+      "must be greater than or equal to %s and " +
+      "less than or equal to %s\'.format([rules." +
+      "gte, rules.lte]) : \'\'\n\336\001\n\033timestamp.gte_" +
+      "lte_exclusive\032\276\001has(rules.lte) && rules." +
+      "lte < rules.gte && (rules.lte < this && " +
+      "this < rules.gte)? \'value must be greate" +
+      "r than or equal to %s or less than or eq" +
+      "ual to %s\'.format([rules.gte, rules.lte]" +
+      ") : \'\'H\001R\003gte\022d\n\006gt_now\030\010 \001(\010BK\302HH\nF\n\020ti" +
+      "mestamp.gt_now\0322this < now ? \'value must" +
+      " be greater than now\' : \'\'H\001R\005gtNow\022\305\001\n\006" +
+      "within\030\t \001(\0132\031.google.protobuf.DurationB" +
+      "\214\001\302H\210\001\n\205\001\n\020timestamp.within\032qthis < now-" +
+      "rules.within || this > now+rules.within " +
+      "? \'value must be within %s of now\'.forma" +
+      "t([rules.within]) : \'\'H\003R\006within\210\001\001B\013\n\tl" +
+      "ess_thanB\016\n\014greater_thanB\010\n\006_constB\t\n\007_w" +
+      "ithin*\235\001\n\006Ignore\022\026\n\022IGNORE_UNSPECIFIED\020\000" +
+      "\022\031\n\025IGNORE_IF_UNPOPULATED\020\001\022\033\n\027IGNORE_IF" +
+      "_DEFAULT_VALUE\020\002\022\021\n\rIGNORE_ALWAYS\020\003\022\024\n\014I" +
+      "GNORE_EMPTY\020\001\032\002\010\001\022\026\n\016IGNORE_DEFAULT\020\002\032\002\010" +
+      "\001\032\002\020\001*n\n\nKnownRegex\022\033\n\027KNOWN_REGEX_UNSPE" +
+      "CIFIED\020\000\022 \n\034KNOWN_REGEX_HTTP_HEADER_NAME" +
+      "\020\001\022!\n\035KNOWN_REGEX_HTTP_HEADER_VALUE\020\002:_\n" +
+      "\007message\022\037.google.protobuf.MessageOption" +
+      "s\030\207\t \001(\0132 .buf.validate.MessageConstrain" +
+      "tsR\007message\210\001\001:W\n\005oneof\022\035.google.protobu" +
+      "f.OneofOptions\030\207\t \001(\0132\036.buf.validate.One" +
+      "ofConstraintsR\005oneof\210\001\001:W\n\005field\022\035.googl" +
+      "e.protobuf.FieldOptions\030\207\t \001(\0132\036.buf.val" +
+      "idate.FieldConstraintsR\005field\210\001\001B\300\001\n\020com" +
+      ".buf.validateB\rValidateProtoH\002P\001ZGbuf.bu" +
+      "ild/gen/go/bufbuild/protovalidate/protoc" +
+      "olbuffers/go/buf/validate\370\001\000\242\002\003BVX\252\002\014Buf" +
+      ".Validate\312\002\014Buf\\Validate\342\002\030Buf\\Validate\\" +
+      "GPBMetadata\352\002\rBuf::Validateb\006proto3"
     };
     descriptor = com.google.protobuf.Descriptors.FileDescriptor
       .internalBuildGeneratedFileFrom(descriptorData,
@@ -1600,7 +1605,7 @@ public static void registerAllExtensions(
     internal_static_buf_validate_StringRules_fieldAccessorTable = new
       com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
         internal_static_buf_validate_StringRules_descriptor,
-        new java.lang.String[] { "Const", "Len", "MinLen", "MaxLen", "LenBytes", "MinBytes", "MaxBytes", "Pattern", "Prefix", "Suffix", "Contains", "NotContains", "In", "NotIn", "Email", "Hostname", "Ip", "Ipv4", "Ipv6", "Uri", "UriRef", "Address", "Uuid", "IpWithPrefixlen", "Ipv4WithPrefixlen", "Ipv6WithPrefixlen", "IpPrefix", "Ipv4Prefix", "Ipv6Prefix", "HostAndPort", "WellKnownRegex", "Strict", "WellKnown", });
+        new java.lang.String[] { "Const", "Len", "MinLen", "MaxLen", "LenBytes", "MinBytes", "MaxBytes", "Pattern", "Prefix", "Suffix", "Contains", "NotContains", "In", "NotIn", "Email", "Hostname", "Ip", "Ipv4", "Ipv6", "Uri", "UriRef", "Address", "Uuid", "Tuuid", "IpWithPrefixlen", "Ipv4WithPrefixlen", "Ipv6WithPrefixlen", "IpPrefix", "Ipv4Prefix", "Ipv6Prefix", "HostAndPort", "WellKnownRegex", "Strict", "WellKnown", });
     internal_static_buf_validate_BytesRules_descriptor =
       getDescriptor().getMessageTypes().get(17);
     internal_static_buf_validate_BytesRules_fieldAccessorTable = new
diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/HeaderParameter.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/HeaderParameter.java
index ece57e5..40ee969 100644
--- a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/HeaderParameter.java
+++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/HeaderParameter.java
@@ -50,7 +50,7 @@ protected java.lang.Object newInstance(
 
   /**
    * 
-   * `Type` is a a supported HTTP header type.
+   * `Type` is a supported HTTP header type.
    * See https://swagger.io/specification/v2/#parameterType.
    * 
*