diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index d9f1e26f..05fd6aec 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -23,18 +23,14 @@ Next, install dependencies. You will need: * [uv](https://docs.astral.sh/uv/) -We use a Makefile to test and lint our code, so you'll also need a few non-Python tools: +Some tasks require additional non-Python tools: -* GNU Make (to use the Makefile): part of the `build-essential` package on - Debian-derived Linux distributions (including Ubuntu), and part of - `xcode-select --install` on Macs. * Go (for the conformance test runner): often available in your system package manager (`apt`, `dnf`, `brew`, etc.), but most reliable when [installed directly from upstream](https://go.dev/doc/install). -With Go and GNU Make installed, you can verify that your changes pass tests and -lint checks by running `make`. For a list of other useful commands, run `make -help`. +With Go installed, you can verify that your changes pass tests and +lint checks by running `uv run poe check`. For a list of other useful commands, run `uv run poe`. ### Reporting Bugs diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f2767c16..9543f4bc 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,14 +27,14 @@ jobs: - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: go-version: stable - # We use this to install `buf`, and the `buf` version is controlled by the Makefile. - cache-dependency-path: Makefile + # We use this to install certain tools defined in poe tasks + cache-dependency-path: poe_tasks.toml - uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 with: python-version: ${{ matrix.python-version }} - - run: make install - - run: make test - - run: make conformance + - run: uv sync + - run: uv run poe test + - run: uv run poe test-conformance lint: runs-on: ubuntu-latest @@ -43,15 +43,15 @@ jobs: - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: go-version: stable - # We use this to install `buf`, and the `buf` version is controlled by the Makefile. - cache-dependency-path: Makefile + # We use this to install certain tools defined in poe tasks + cache-dependency-path: poe_tasks.toml - uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 with: python-version: ${{ matrix.python-version }} - - run: make install - - run: make lint - - run: make format - # When running with matrix.resolution == lowest-direct, we expect uv.lock to change, but we don't want that file checked in. - - run: make checkgenerate + - run: uv sync --locked + - run: uv run poe lint + - run: uv run poe format + - run: uv run poe generate env: BUF_TOKEN: ${{ secrets.BUF_TOKEN }} + - run: uv run poe diffcheck diff --git a/.gitignore b/.gitignore index 0f1765ff..7c6c268a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,3 @@ -# tools, see ./Makefile -/.tmp/ - # python writes compiled bytecode to .pyc files in __pycache__ directories __pycache__ diff --git a/Makefile b/Makefile deleted file mode 100644 index 63b9566d..00000000 --- a/Makefile +++ /dev/null @@ -1,97 +0,0 @@ -# See https://tech.davis-hansson.com/p/make/ -SHELL := bash -.DELETE_ON_ERROR: -.SHELLFLAGS := -eu -o pipefail -c -.DEFAULT_GOAL := all -MAKEFLAGS += --warn-undefined-variables -MAKEFLAGS += --no-builtin-rules -MAKEFLAGS += --no-print-directory -export PYTHONPATH ?= gen -BUF_VERSION := 1.69.0 -CONFORMANCE_ARGS ?= --strict_message --expected_failures=test/conformance/nonconforming.yaml --timeout 10s -ADD_LICENSE_HEADER := go run github.com/bufbuild/buf/private/pkg/licenseheader/cmd/license-header@v${BUF_VERSION} \ - --ignore .github \ - --ignore buf.yaml \ - --ignore buf.gen.yaml \ - --ignore test/conformance/*.yaml \ - --license-type apache \ - --copyright-holder "Buf Technologies, Inc." \ - --year-range "2023-2026" -PROTOVALIDATE_VERSION ?= v1.2.0 -# Version of the cel-spec that this implementation is conformant with -# This should be kept in sync with the version in test/test_format.py -CEL_SPEC_VERSION ?= v0.25.1 -TESTDATA_FILE := test/testdata/string_ext_$(CEL_SPEC_VERSION).textproto - -PROTOVALIDATE_PROTO_PATH := buf.build/bufbuild/protovalidate:$(PROTOVALIDATE_VERSION) -PROTOVALIDATE_TESTING_PROTO_PATH := buf.build/bufbuild/protovalidate-testing:$(PROTOVALIDATE_VERSION) -ifneq ($(shell echo ${PROTOVALIDATE_VERSION} | grep -E "^v\d+\.\d+.\d+(-.+)?$$"), $(PROTOVALIDATE_VERSION)) - PROTOVALIDATE_PROTO_PATH = https://github.com/bufbuild/protovalidate.git\#subdir=proto/protovalidate,ref=$(PROTOVALIDATE_VERSION) - PROTOVALIDATE_TESTING_PROTO_PATH = https://github.com/bufbuild/protovalidate.git\#subdir=proto/protovalidate-testing,ref=$(PROTOVALIDATE_VERSION) -endif - -.PHONY: help -help: ## Describe useful make targets - @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "%-15s %s\n", $$1, $$2}' - -.PHONY: all -all: test conformance lint ## Run all tests and lint (default) - -.PHONY: clean -clean: ## Delete intermediate build artifacts - @# -X only removes untracked files, -d recurses into directories, -f actually removes files/dirs - git clean -Xdf - @echo $(CEL_SPEC_VERSION) - -.PHONY: generate -generate: ## Regenerate code and license headers - cd packages/protovalidate-proto && \ - rm -rf src && mkdir -p src/buf/validate && touch src/buf/validate/__init__.py && \ - uv run -- buf generate $(PROTOVALIDATE_PROTO_PATH) && \ - uv run -- buf generate $(PROTOVALIDATE_TESTING_PROTO_PATH) - - cd test && \ - rm -rf gen && \ - uv run -- buf generate buf.build/google/cel-spec:$(CEL_SPEC_VERSION) --exclude-path cel/expr/conformance/proto2 --exclude-path cel/expr/conformance/proto3 && \ - uv run -- buf generate - - $(ADD_LICENSE_HEADER) - -.PHONY: format -format: install ## Format code - $(ADD_LICENSE_HEADER) - uv run -- buf format --write . - uv run -- ruff format protovalidate test - uv run -- ruff check --fix protovalidate test - uv run -- tombi format - -.PHONY: test -test: install $(TESTDATA_FILE) ## Run unit tests - uv run -- pytest - -.PHONY: conformance -conformance: install ## Run conformance tests - go run github.com/bufbuild/protovalidate/tools/protovalidate-conformance@$(PROTOVALIDATE_VERSION) $(CONFORMANCE_ARGS) uv run test/conformance/runner.py - -.PHONY: lint -lint: install ## Lint code - uv run -- buf format -d --exit-code - uv run -- ruff format --check --diff protovalidate test - uv run -- ty check protovalidate - uv run -- ruff check protovalidate test - uv run -- tombi format --check - uv run -- tombi lint - uv lock --check - -.PHONY: install -install: ## Install dependencies - uv sync - -.PHONY: checkgenerate -checkgenerate: generate - @# Used in CI to verify that `make generate` doesn't produce a diff. - test -z "$$(git status --porcelain | tee /dev/stderr)" - -$(TESTDATA_FILE): - mkdir -p $(dir @) - curl -fsSL -o $@ https://raw.githubusercontent.com/google/cel-spec/refs/tags/$(CEL_SPEC_VERSION)/tests/simple/testdata/string_ext.textproto diff --git a/packages/protovalidate-proto/buf.gen.yaml b/packages/protovalidate-proto/buf.gen.yaml index 5e9c759f..c1c210ab 100644 --- a/packages/protovalidate-proto/buf.gen.yaml +++ b/packages/protovalidate-proto/buf.gen.yaml @@ -1,6 +1,5 @@ version: v2 -managed: - enabled: true +clean: true plugins: # NOTE: v26.0 is the earliest version supporting protobuf==5. - remote: buf.build/protocolbuffers/python:v26.0 diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/bool.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/bool.proto new file mode 100644 index 00000000..26ce95aa --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/bool.proto @@ -0,0 +1,32 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package buf.validate.conformance.cases; + +import "buf/validate/validate.proto"; + +message BoolNone { + bool val = 1; +} +message BoolConstTrue { + bool val = 1 [(buf.validate.field).bool.const = true]; +} +message BoolConstFalse { + bool val = 1 [(buf.validate.field).bool.const = false]; +} +message BoolExample { + bool val = 1 [(buf.validate.field).bool.example = true]; +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/bytes.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/bytes.proto new file mode 100644 index 00000000..70da7c75 --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/bytes.proto @@ -0,0 +1,114 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package buf.validate.conformance.cases; + +import "buf/validate/validate.proto"; + +message BytesNone { + bytes val = 1; +} +message BytesConst { + bytes val = 1 [(buf.validate.field).bytes.const = "foo"]; +} +message BytesIn { + bytes val = 1 [(buf.validate.field).bytes = { + in: [ + "bar", + "baz" + ] + }]; +} +message BytesNotIn { + bytes val = 1 [(buf.validate.field).bytes = { + not_in: [ + "fizz", + "buzz" + ] + }]; +} +message BytesLen { + bytes val = 1 [(buf.validate.field).bytes.len = 3]; +} +message BytesMinLen { + bytes val = 1 [(buf.validate.field).bytes.min_len = 3]; +} +message BytesMaxLen { + bytes val = 1 [(buf.validate.field).bytes.max_len = 5]; +} +message BytesMinMaxLen { + bytes val = 1 [(buf.validate.field).bytes = { + min_len: 3 + max_len: 5 + }]; +} +message BytesEqualMinMaxLen { + bytes val = 1 [(buf.validate.field).bytes = { + min_len: 5 + max_len: 5 + }]; +} +message BytesPattern { + bytes val = 1 [(buf.validate.field).bytes.pattern = "^[\\x00-\\x7F]+$"]; +} +message BytesPrefix { + bytes val = 1 [(buf.validate.field).bytes.prefix = "\x99"]; +} +message BytesContains { + bytes val = 1 [(buf.validate.field).bytes.contains = "bar"]; +} +message BytesSuffix { + bytes val = 1 [(buf.validate.field).bytes.suffix = "buz\x7a"]; +} +message BytesIP { + bytes val = 1 [(buf.validate.field).bytes.ip = true]; +} +message BytesNotIP { + bytes val = 1 [(buf.validate.field).bytes.ip = false]; +} +message BytesIPv4 { + bytes val = 1 [(buf.validate.field).bytes.ipv4 = true]; +} +message BytesNotIPv4 { + bytes val = 1 [(buf.validate.field).bytes.ipv4 = false]; +} +message BytesIPv6 { + bytes val = 1 [(buf.validate.field).bytes.ipv6 = true]; +} +message BytesNotIPv6 { + bytes val = 1 [(buf.validate.field).bytes.ipv6 = false]; +} +message BytesIPv6Ignore { + bytes val = 1 [ + (buf.validate.field).bytes.ipv6 = true, + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE + ]; +} +message BytesUUID { + bytes val = 1 [(buf.validate.field).bytes.uuid = true]; +} +message BytesNotUUID { + bytes val = 1 [(buf.validate.field).bytes.uuid = false]; +} +message BytesUUIDIgnore { + bytes val = 1 [ + (buf.validate.field).bytes.uuid = true, + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE + ]; +} +message BytesExample { + bytes val = 1 [(buf.validate.field).bytes.example = "\x99"]; +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/custom_rules/custom_rules.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/custom_rules/custom_rules.proto new file mode 100644 index 00000000..d7dc9889 --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/custom_rules/custom_rules.proto @@ -0,0 +1,312 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package buf.validate.conformance.cases.custom_rules; + +import "buf/validate/validate.proto"; + +enum Enum { + ENUM_UNSPECIFIED = 0; + ENUM_ONE = 1; +} + +// A message that does not contain any expressions +message NoExpressions { + int32 a = 1; + Enum b = 2; + Nested c = 3; + + message Nested {} +} + +// A message with message-level custom expressions +message MessageExpressions { + option (message).cel = { + id: "message_expression_scalar" + message: "a must be less than b" + expression: "this.a < this.b" + }; + option (message).cel = { + id: "message_expression_enum" + message: "c must not equal d" + expression: "this.c != this.d" + }; + option (message).cel = { + id: "message_expression_embed" + message: "e.a must equal f.a" + expression: "this.e.a == this.f.a" + }; + + int32 a = 1; + int32 b = 2; + Enum c = 3; + Enum d = 4; + Nested e = 5; + Nested f = 6; + + message Nested { + option (message).cel = { + id: "message_expression_nested" + expression: + "this.a > this.b ? ''" + ": 'a must be greater than b'" + }; + + int32 a = 1; + int32 b = 2; + } +} + +message MessageExpressionOnly { + option (message).cel_expression = "this.a > 0"; + + int32 a = 1; +} + +message MissingField { + option (message).cel = { + id: "missing_field" + message: "b must be positive" + expression: "this.b > 0" + }; + + int32 a = 1; +} + +message IncorrectType { + option (message).cel = { + id: "incorrect_type" + message: "a must start with 'foo'" + expression: "this.a.startsWith('foo')" + }; + + int32 a = 1; +} + +message DynRuntimeError { + option (message).cel = { + id: "dyn_runtime_err" + message: "dynamic type tries to use a non-existent field" + expression: "dyn(this).b == 'foo'" + }; + + int32 a = 1; +} + +message NowEqualsNow { + option (message).cel = { + id: "now_equals_now" + message: "now should equal now within an expression" + expression: "now == now" + }; +} + +message FieldExpressionOnly { + int32 val = 1 [(field).cel_expression = "this > 42"]; +} + +message FieldExpressionMultipleScalar { + int32 val = 1 [ + (field).cel = { + id: "field_expression.multiple.scalar.1" + message: "test message field_expression.multiple.scalar.1" + expression: "this > 0" + }, + (field).cel = { + id: "field_expression.multiple.scalar.2" + message: "test message field_expression.multiple.scalar.2" + expression: "this > 1" + }, + (field).cel = { + id: "field_expression.multiple.scalar.3" + message: "test message field_expression.multiple.scalar.3" + expression: "this > 2" + } + ]; +} +message FieldExpressionNestedScalar { + FieldExpressionScalar nested = 1; +} +message FieldExpressionOptionalScalar { + optional int32 val = 1 [(field).cel = { + id: "field_expression.optional.scalar" + message: "test message field_expression.optional.scalar" + expression: "this == 1" + }]; +} + +message FieldExpressionScalar { + int32 val = 1 [(field).cel = { + id: "field_expression.scalar" + message: "test message field_expression.scalar" + expression: "this == 1" + }]; +} +message FieldExpressionEnum { + Enum val = 1 [(field).cel = { + id: "field_expression.enum" + message: "test message field_expression.enum" + expression: "this == 1" + }]; +} +message FieldExpressionMessage { + Msg val = 1 [(field).cel = { + id: "field_expression.message" + message: "test message field_expression.message" + expression: "this.a == 1" + }]; + message Msg { + int32 a = 1; + } +} +message FieldExpressionMapInt32 { + map val = 1 [(buf.validate.field).cel = { + id: "field_expression.map.int32" + message: "all map values must equal 1" + expression: "this.all(k, this[k] == 1)" + }]; +} +message FieldExpressionMapInt64 { + map val = 1 [(buf.validate.field).cel = { + id: "field_expression.map.int64" + message: "all map values must equal 1" + expression: "this.all(k, this[k] == 1)" + }]; +} +message FieldExpressionMapUint32 { + map val = 1 [(buf.validate.field).cel = { + id: "field_expression.map.uint32" + message: "all map values must equal 1" + expression: "this.all(k, this[k] == uint(1))" + }]; +} +message FieldExpressionMapUint64 { + map val = 1 [(buf.validate.field).cel = { + id: "field_expression.map.uint64" + message: "all map values must equal 1" + expression: "this.all(k, this[k] == uint(1))" + }]; +} +message FieldExpressionMapBool { + map val = 1 [(buf.validate.field).cel = { + id: "field_expression.map.bool" + message: "all map values must equal false" + expression: "this.all(k, this[k] == false)" + }]; +} +message FieldExpressionMapString { + map val = 1 [(buf.validate.field).cel = { + id: "field_expression.map.string" + message: "all map values must equal 'foo'" + expression: "this.all(k, this[k] == 'foo')" + }]; +} +message FieldExpressionMapEnum { + map val = 1 [(buf.validate.field).cel = { + id: "field_expression.map.enum" + message: "test message field_expression.map.enum" + expression: "this.all(k, this[k] == 1)" + }]; +} +message FieldExpressionMapMessage { + map val = 1 [(buf.validate.field).cel = { + id: "field_expression.map.message" + message: "test message field_expression.map.message" + expression: "this.all(k, this[k].a == 1)" + }]; + message Msg { + int32 a = 1; + } +} +message FieldExpressionMapKeys { + map val = 1 [(buf.validate.field).map.keys.cel = { + id: "field_expression.map.keys" + message: "test message field_expression.map.keys" + expression: "this == 4 || this == 8" + }]; +} +message FieldExpressionMapScalarValues { + map val = 1 [(buf.validate.field).map.values.cel = { + id: "field_expression.map.scalar.values" + message: "test message field_expression.map.scalar.values" + expression: "this == 1" + }]; +} +message FieldExpressionMapEnumValues { + map val = 1 [(buf.validate.field).map.values.cel = { + id: "field_expression.map.enum.values" + message: "test message field_expression.map.enum.values" + expression: "this == 1" + }]; +} +message FieldExpressionMapMessageValues { + map val = 1 [(buf.validate.field).map.values.cel = { + id: "field_expression.map.message.values" + message: "test message field_expression.map.message.values" + expression: "this.a == 1" + }]; + message Msg { + int32 a = 1; + } +} +message FieldExpressionRepeatedScalar { + repeated int32 val = 1 [(buf.validate.field).cel = { + id: "field_expression.repeated.scalar" + message: "test message field_expression.repeated.scalar" + expression: "this.all(e, e == 1)" + }]; +} +message FieldExpressionRepeatedEnum { + repeated Enum val = 1 [(buf.validate.field).cel = { + id: "field_expression.repeated.enum" + message: "test message field_expression.repeated.enum" + expression: "this.all(e, e == 1)" + }]; +} +message FieldExpressionRepeatedMessage { + repeated Msg val = 1 [(buf.validate.field).cel = { + id: "field_expression.repeated.message" + message: "test message field_expression.repeated.message" + expression: "this.all(e, e.a == 1)" + }]; + message Msg { + int32 a = 1; + } +} +message FieldExpressionRepeatedScalarItems { + repeated int32 val = 1 [(buf.validate.field).repeated.items.cel = { + id: "field_expression.repeated.scalar.items" + message: "test message field_expression.repeated.scalar.items" + expression: "this == 1" + }]; +} +message FieldExpressionRepeatedEnumItems { + repeated Enum val = 1 [(buf.validate.field).repeated.items.cel = { + id: "field_expression.repeated.enum.items" + message: "test message field_expression.repeated.enum.items" + expression: "this == 1" + }]; +} +message FieldExpressionRepeatedMessageItems { + repeated Msg val = 1 [(buf.validate.field).repeated.items.cel = { + id: "field_expression.repeated.message.items" + message: "test message field_expression.repeated.message.items" + expression: "this.a == 1" + }]; + message Msg { + int32 a = 1; + } +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/enums.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/enums.proto new file mode 100644 index 00000000..09d98da1 --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/enums.proto @@ -0,0 +1,127 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package buf.validate.conformance.cases; + +import "buf/validate/conformance/cases/other_package/embed.proto"; +import "buf/validate/conformance/cases/yet_another_package/embed2.proto"; +import "buf/validate/validate.proto"; + +enum TestEnum { + TEST_ENUM_UNSPECIFIED = 0; + TEST_ENUM_ONE = 1; + TEST_ENUM_TWO = 2; +} + +enum TestEnumAlias { + option allow_alias = true; + + TEST_ENUM_ALIAS_UNSPECIFIED = 0; + TEST_ENUM_ALIAS_A = 1; + TEST_ENUM_ALIAS_B = 2; + TEST_ENUM_ALIAS_C = 3; + + TEST_ENUM_ALIAS_ALPHA = 1; + TEST_ENUM_ALIAS_BETA = 2; + TEST_ENUM_ALIAS_GAMMA = 3; +} + +message EnumNone { + TestEnum val = 1; +} + +message EnumConst { + TestEnum val = 1 [(buf.validate.field).enum.const = 2]; +} +message EnumAliasConst { + TestEnumAlias val = 1 [(buf.validate.field).enum.const = 2]; +} + +message EnumDefined { + TestEnum val = 1 [(buf.validate.field).enum.defined_only = true]; +} +message EnumAliasDefined { + TestEnumAlias val = 1 [(buf.validate.field).enum.defined_only = true]; +} + +message EnumIn { + TestEnum val = 1 [(buf.validate.field).enum = { + in: [ + 0, + 2 + ] + }]; +} +message EnumAliasIn { + TestEnumAlias val = 1 [(buf.validate.field).enum = { + in: [ + 0, + 2 + ] + }]; +} + +message EnumNotIn { + TestEnum val = 1 [(buf.validate.field).enum = { + not_in: [1] + }]; +} +message EnumAliasNotIn { + TestEnumAlias val = 1 [(buf.validate.field).enum = { + not_in: [1] + }]; +} + +message EnumExternal { + other_package.Embed.Enumerated val = 1 [(buf.validate.field).enum.defined_only = true]; +} +message EnumExternal2 { + other_package.Embed.DoubleEmbed.DoubleEnumerated val = 1 [(buf.validate.field).enum.defined_only = true]; +} + +message RepeatedEnumDefined { + repeated TestEnum val = 1 [(buf.validate.field).repeated.items.enum.defined_only = true]; +} +message RepeatedExternalEnumDefined { + repeated other_package.Embed.Enumerated val = 1 [(buf.validate.field).repeated.items.enum.defined_only = true]; +} +message RepeatedYetAnotherExternalEnumDefined { + repeated yet_another_package.Embed.Enumerated val = 1 [(buf.validate.field).repeated.items.enum.defined_only = true]; +} + +message MapEnumDefined { + map val = 1 [(buf.validate.field).map.values.enum.defined_only = true]; +} +message MapExternalEnumDefined { + map val = 1 [(buf.validate.field).map.values.enum.defined_only = true]; +} + +message EnumInsideOneof { + oneof foo { + TestEnum val = 1 [(buf.validate.field).enum.defined_only = true]; + } + + oneof bar { + TestEnum val2 = 2 [(buf.validate.field).enum = { + defined_only: true + not_in: 0 + }]; + } +} + +message EnumExample { + TestEnum val = 1 [(buf.validate.field).enum.example = 2]; +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/filename-with-dash.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/filename-with-dash.proto new file mode 100644 index 00000000..e5b46d74 --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/filename-with-dash.proto @@ -0,0 +1,19 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package buf.validate.conformance.cases; + +import "buf/validate/validate.proto"; diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/groups_editions.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/groups_editions.proto new file mode 100644 index 00000000..dc61c29b --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/groups_editions.proto @@ -0,0 +1,26 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +edition = "2023"; + +package buf.validate.conformance.cases; + +import "buf/validate/validate.proto"; + +message GroupDelimited { + Value value = 1 [features.message_encoding = DELIMITED]; + message Value { + bool x = 1 [(buf.validate.field).bool.const = true]; + } +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/groups_proto2.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/groups_proto2.proto new file mode 100644 index 00000000..b963594b --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/groups_proto2.proto @@ -0,0 +1,49 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto2"; + +package buf.validate.conformance.cases; + +import "buf/validate/validate.proto"; + +message GroupOptional { + optional group Optional = 1 { + optional string value = 1 [(buf.validate.field).string.const = "foo"]; + } +} + +message GroupRepeated { + repeated group Repeated = 1 { + optional int32 value = 1 [(buf.validate.field).int32.gt = 0]; + } +} + +message GroupRequired { + required group Required = 1 { + optional bool value = 1 [(buf.validate.field).bool.const = true]; + } +} + +message GroupCustom { + optional group Custom = 1 { + option (buf.validate.message).cel = { + id: "group.custom.div" + message: "value must be divisible by div" + expression: "this.value % this.div == 0" + }; + optional int32 value = 1; + optional int32 div = 2; + } +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/ignore_empty_proto2.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/ignore_empty_proto2.proto new file mode 100644 index 00000000..2c72a2cc --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/ignore_empty_proto2.proto @@ -0,0 +1,78 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto2"; + +package buf.validate.conformance.cases; + +import "buf/validate/validate.proto"; + +message IgnoreEmptyProto2ScalarOptional { + optional int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).int32.gt = 0 + ]; +} + +message IgnoreEmptyProto2ScalarOptionalWithDefault { + optional int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).int32.gt = 0, + default = 42 + ]; +} + +message IgnoreEmptyProto2ScalarRequired { + required int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).int32.gt = 0 + ]; +} + +message IgnoreEmptyProto2Message { + optional Msg val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).cel = { + id: "ignore_empty.proto2.message" + message: "foobar" + expression: "this.val == 'foo'" + } + ]; + message Msg { + optional string val = 1; + } +} + +message IgnoreEmptyProto2Oneof { + oneof o { + int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).int32.gt = 0 + ]; + } +} + +message IgnoreEmptyProto2Repeated { + repeated int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).repeated.min_items = 3 + ]; +} + +message IgnoreEmptyProto2Map { + map val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).map.min_pairs = 3 + ]; +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/ignore_empty_proto3.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/ignore_empty_proto3.proto new file mode 100644 index 00000000..4d749ec4 --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/ignore_empty_proto3.proto @@ -0,0 +1,90 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package buf.validate.conformance.cases; + +import "buf/validate/validate.proto"; + +message IgnoreEmptyProto3Scalar { + int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).int32.gt = 0 + ]; +} + +message IgnoreEmptyProto3OptionalScalar { + optional int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).int32.gt = 0 + ]; +} + +message IgnoreEmptyProto3Message { + optional Msg val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).cel = { + id: "ignore_empty.proto3.message" + message: "foobar" + expression: "this.val == 'foo'" + } + ]; + message Msg { + string val = 1; + } +} + +message IgnoreEmptyProto3Oneof { + oneof o { + int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).int32.gt = 0 + ]; + } +} + +message IgnoreEmptyProto3Repeated { + repeated int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).repeated.min_items = 3 + ]; +} + +message IgnoreEmptyProto3Map { + map val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).map.min_pairs = 3 + ]; +} + +message IgnoreEmptyRepeatedItems { + repeated int32 val = 1 [(buf.validate.field).repeated.items = { + ignore: IGNORE_IF_ZERO_VALUE + int32: {gt: 0} + }]; +} + +message IgnoreEmptyMapPairs { + map val = 1 [ + (buf.validate.field).map.keys = { + ignore: IGNORE_IF_ZERO_VALUE + string: {min_len: 3} + }, + (buf.validate.field).map.values = { + ignore: IGNORE_IF_ZERO_VALUE + int32: {gt: 0} + } + ]; +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/ignore_empty_proto_editions.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/ignore_empty_proto_editions.proto new file mode 100644 index 00000000..fed9174e --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/ignore_empty_proto_editions.proto @@ -0,0 +1,150 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +edition = "2023"; + +package buf.validate.conformance.cases; + +import "buf/validate/validate.proto"; + +message IgnoreEmptyEditionsScalarExplicitPresence { + int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).int32.gt = 0 + ]; +} + +message IgnoreEmptyEditionsScalarExplicitPresenceWithDefault { + int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).int32.gt = 0, + default = 42 + ]; +} + +message IgnoreEmptyEditionsScalarImplicitPresence { + int32 val = 1 [ + features.field_presence = IMPLICIT, + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).int32.gt = 0 + ]; +} + +message IgnoreEmptyEditionsScalarLegacyRequired { + int32 val = 1 [ + features.field_presence = LEGACY_REQUIRED, + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).int32.gt = 0 + ]; +} + +message IgnoreEmptyEditionsScalarLegacyRequiredWithDefault { + int32 val = 1 [ + features.field_presence = LEGACY_REQUIRED, + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).int32.gt = 0, + default = 42 + ]; +} + +message IgnoreEmptyEditionsMessageExplicitPresence { + Msg val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).cel = { + id: "ignore_empty.editions.message" + message: "foobar" + expression: "this.val == 'foo'" + } + ]; + message Msg { + string val = 1; + } +} + +message IgnoreEmptyEditionsMessageExplicitPresenceDelimited { + Msg val = 1 [ + features.message_encoding = DELIMITED, + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).cel = { + id: "ignore_empty.editions.message" + message: "foobar" + expression: "this.val == 'foo'" + } + ]; + message Msg { + string val = 1; + } +} + +message IgnoreEmptyEditionsMessageLegacyRequired { + Msg val = 1 [ + features.field_presence = LEGACY_REQUIRED, + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).cel = { + id: "ignore_empty.editions.message" + message: "foobar" + expression: "this.val == 'foo'" + } + ]; + message Msg { + string val = 1; + } +} + +message IgnoreEmptyEditionsMessageLegacyRequiredDelimited { + Msg val = 1 [ + features.message_encoding = DELIMITED, + features.field_presence = LEGACY_REQUIRED, + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).cel = { + id: "ignore_empty.editions.message" + message: "foobar" + expression: "this.val == 'foo'" + } + ]; + message Msg { + string val = 1; + } +} + +message IgnoreEmptyEditionsOneof { + oneof o { + int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).int32.gt = 0 + ]; + } +} + +message IgnoreEmptyEditionsRepeated { + repeated int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).repeated.min_items = 3 + ]; +} + +message IgnoreEmptyEditionsRepeatedExpanded { + repeated int32 val = 1 [ + features.repeated_field_encoding = EXPANDED, + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).repeated.min_items = 3 + ]; +} + +message IgnoreEmptyEditionsMap { + map val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).map.min_pairs = 3 + ]; +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/ignore_proto2.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/ignore_proto2.proto new file mode 100644 index 00000000..fc14dab9 --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/ignore_proto2.proto @@ -0,0 +1,322 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto2"; + +package buf.validate.conformance.cases; + +import "buf/validate/validate.proto"; + +message Proto2ScalarOptionalIgnoreUnspecified { + optional int32 val = 1 [(buf.validate.field).int32.gt = 0]; +} + +message Proto2ScalarOptionalIgnoreUnspecifiedWithDefault { + optional int32 val = 1 [ + (buf.validate.field).int32.gt = 0, + default = -42 + ]; +} + +message Proto2ScalarOptionalIgnoreEmpty { + optional int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).int32.gt = 0 + ]; +} + +message Proto2ScalarOptionalIgnoreEmptyWithDefault { + optional int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).int32.gt = 0, + default = -42 + ]; +} + +message Proto2ScalarOptionalIgnoreAlways { + optional int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_ALWAYS, + (buf.validate.field).int32.gt = 0 + ]; +} + +message Proto2ScalarOptionalIgnoreAlwaysWithDefault { + optional int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_ALWAYS, + (buf.validate.field).int32.gt = 0, + default = -42 + ]; +} + +message Proto2ScalarRequiredIgnoreUnspecified { + required int32 val = 1 [(buf.validate.field).int32.gt = 0]; +} + +message Proto2ScalarRequiredIgnoreUnspecifiedWithDefault { + required int32 val = 1 [ + (buf.validate.field).int32.gt = 0, + default = -42 + ]; +} + +message Proto2ScalarRequiredIgnoreEmpty { + required int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).int32.gt = 0 + ]; +} + +message Proto2ScalarRequiredIgnoreEmptyWithDefault { + required int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).int32.gt = 0, + default = -42 + ]; +} + +message Proto2ScalarRequiredIgnoreAlways { + required int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_ALWAYS, + (buf.validate.field).int32.gt = 0 + ]; +} + +message Proto2ScalarRequiredIgnoreAlwaysWithDefault { + required int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_ALWAYS, + (buf.validate.field).int32.gt = 0, + default = -42 + ]; +} + +message Proto2MessageOptionalIgnoreUnspecified { + optional Msg val = 1 [(buf.validate.field).cel = { + id: "proto2.message.ignore.empty" + message: "foobar" + expression: "this.val == 'foo'" + }]; + message Msg { + optional string val = 1; + } +} + +message Proto2MessageOptionalIgnoreEmpty { + optional Msg val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).cel = { + id: "proto2.message.ignore.empty" + message: "foobar" + expression: "this.val == 'foo'" + } + ]; + message Msg { + optional string val = 1; + } +} + +message Proto2MessageOptionalIgnoreAlways { + optional Msg val = 1 [ + (buf.validate.field).ignore = IGNORE_ALWAYS, + (buf.validate.field).cel = { + id: "proto2.message.ignore.always" + message: "foobar" + expression: "this.val == 'foo'" + } + ]; + message Msg { + optional string val = 1; + } +} + +message Proto2MessageRequiredIgnoreUnspecified { + required Msg val = 1 [(buf.validate.field).cel = { + id: "proto2.message.ignore.empty" + message: "foobar" + expression: "this.val == 'foo'" + }]; + message Msg { + optional string val = 1; + } +} + +message Proto2MessageRequiredIgnoreEmpty { + required Msg val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).cel = { + id: "proto2.message.ignore.empty" + message: "foobar" + expression: "this.val == 'foo'" + } + ]; + message Msg { + optional string val = 1; + } +} + +message Proto2MessageRequiredIgnoreAlways { + required Msg val = 1 [ + (buf.validate.field).ignore = IGNORE_ALWAYS, + (buf.validate.field).cel = { + id: "proto2.message.ignore.always" + message: "foobar" + expression: "this.val == 'foo'" + } + ]; + message Msg { + optional string val = 1; + } +} + +message Proto2OneofIgnoreUnspecified { + oneof o { + int32 val = 1 [(buf.validate.field).int32.gt = 0]; + } +} + +message Proto2OneofIgnoreUnspecifiedWithDefault { + oneof o { + int32 val = 1 [ + (buf.validate.field).int32.gt = 0, + default = -42 + ]; + } +} + +message Proto2OneofIgnoreEmpty { + oneof o { + int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).int32.gt = 0 + ]; + } +} + +message Proto2OneofIgnoreEmptyWithDefault { + oneof o { + int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).int32.gt = 0, + default = -42 + ]; + } +} + +message Proto2OneofIgnoreAlways { + oneof o { + int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_ALWAYS, + (buf.validate.field).int32.gt = 0 + ]; + } +} + +message Proto2OneofIgnoreAlwaysWithDefault { + oneof o { + int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_ALWAYS, + (buf.validate.field).int32.gt = 0, + default = -42 + ]; + } +} + +message Proto2RepeatedIgnoreUnspecified { + repeated int32 val = 1 [(buf.validate.field).repeated.min_items = 3]; +} + +message Proto2RepeatedIgnoreEmpty { + repeated int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).repeated.min_items = 3 + ]; +} + +message Proto2RepeatedIgnoreAlways { + repeated int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_ALWAYS, + (buf.validate.field).repeated.min_items = 3 + ]; +} + +message Proto2MapIgnoreUnspecified { + map val = 1 [(buf.validate.field).map.min_pairs = 3]; +} + +message Proto2MapIgnoreEmpty { + map val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).map.min_pairs = 3 + ]; +} + +message Proto2MapIgnoreAlways { + map val = 1 [ + (buf.validate.field).ignore = IGNORE_ALWAYS, + (buf.validate.field).map.min_pairs = 3 + ]; +} + +message Proto2RepeatedItemIgnoreUnspecified { + repeated int32 val = 1 [(buf.validate.field).repeated.items.int32.gt = 0]; +} + +message Proto2RepeatedItemIgnoreEmpty { + repeated int32 val = 1 [ + (buf.validate.field).repeated.items.ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).repeated.items.int32.gt = 0 + ]; +} + +message Proto2RepeatedItemIgnoreAlways { + repeated int32 val = 1 [ + (buf.validate.field).repeated.items.ignore = IGNORE_ALWAYS, + (buf.validate.field).repeated.items.int32.gt = 0 + ]; +} + +message Proto2MapKeyIgnoreUnspecified { + map val = 1 [(buf.validate.field).map.keys.int32.gt = 0]; +} + +message Proto2MapKeyIgnoreEmpty { + map val = 1 [ + (buf.validate.field).map.keys.ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).map.keys.int32.gt = 0 + ]; +} + +message Proto2MapKeyIgnoreAlways { + map val = 1 [ + (buf.validate.field).map.keys.ignore = IGNORE_ALWAYS, + (buf.validate.field).map.keys.int32.gt = 0 + ]; +} + +message Proto2MapValueIgnoreUnspecified { + map val = 1 [(buf.validate.field).map.values.int32.gt = 0]; +} + +message Proto2MapValueIgnoreEmpty { + map val = 1 [ + (buf.validate.field).map.values.ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).map.values.int32.gt = 0 + ]; +} + +message Proto2MapValueIgnoreAlways { + map val = 1 [ + (buf.validate.field).map.values.ignore = IGNORE_ALWAYS, + (buf.validate.field).map.values.int32.gt = 0 + ]; +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/ignore_proto3.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/ignore_proto3.proto new file mode 100644 index 00000000..97fc2c34 --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/ignore_proto3.proto @@ -0,0 +1,233 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package buf.validate.conformance.cases; + +import "buf/validate/validate.proto"; + +message Proto3ScalarOptionalIgnoreUnspecified { + optional int32 val = 1 [(buf.validate.field).int32.gt = 0]; +} + +message Proto3ScalarOptionalIgnoreEmpty { + optional int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).int32.gt = 0 + ]; +} + +message Proto3ScalarOptionalIgnoreAlways { + optional int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_ALWAYS, + (buf.validate.field).int32.gt = 0 + ]; +} + +message Proto3ScalarIgnoreUnspecified { + int32 val = 1 [(buf.validate.field).int32.gt = 0]; +} + +message Proto3ScalarIgnoreEmpty { + int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).int32.gt = 0 + ]; +} + +message Proto3ScalarIgnoreAlways { + int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_ALWAYS, + (buf.validate.field).int32.gt = 0 + ]; +} + +message Proto3MessageOptionalIgnoreUnspecified { + optional Msg val = 1 [(buf.validate.field).cel = { + id: "proto3.message.ignore.empty" + message: "foobar" + expression: "this.val == 'foo'" + }]; + message Msg { + optional string val = 1; + } +} + +message Proto3MessageOptionalIgnoreEmpty { + optional Msg val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).cel = { + id: "proto3.message.ignore.empty" + message: "foobar" + expression: "this.val == 'foo'" + } + ]; + message Msg { + optional string val = 1; + } +} + +message Proto3MessageOptionalIgnoreAlways { + optional Msg val = 1 [ + (buf.validate.field).ignore = IGNORE_ALWAYS, + (buf.validate.field).cel = { + id: "proto3.message.ignore.always" + message: "foobar" + expression: "this.val == 'foo'" + } + ]; + message Msg { + optional string val = 1; + } +} + +message Proto3MessageIgnoreUnspecified { + Msg val = 1 [(buf.validate.field).cel = { + id: "proto3.message.ignore.empty" + message: "foobar" + expression: "this.val == 'foo'" + }]; + message Msg { + optional string val = 1; + } +} + +message Proto3MessageIgnoreEmpty { + Msg val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).cel = { + id: "proto3.message.ignore.empty" + message: "foobar" + expression: "this.val == 'foo'" + } + ]; + message Msg { + optional string val = 1; + } +} + +message Proto3OneofIgnoreUnspecified { + oneof o { + int32 val = 1 [(buf.validate.field).int32.gt = 0]; + } +} + +message Proto3OneofIgnoreEmpty { + oneof o { + int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).int32.gt = 0 + ]; + } +} + +message Proto3OneofIgnoreAlways { + oneof o { + int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_ALWAYS, + (buf.validate.field).int32.gt = 0 + ]; + } +} + +message Proto3RepeatedIgnoreUnspecified { + repeated int32 val = 1 [(buf.validate.field).repeated.min_items = 3]; +} + +message Proto3RepeatedIgnoreEmpty { + repeated int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).repeated.min_items = 3 + ]; +} + +message Proto3RepeatedIgnoreAlways { + repeated int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_ALWAYS, + (buf.validate.field).repeated.min_items = 3 + ]; +} + +message Proto3MapIgnoreUnspecified { + map val = 1 [(buf.validate.field).map.min_pairs = 3]; +} + +message Proto3MapIgnoreEmpty { + map val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).map.min_pairs = 3 + ]; +} + +message Proto3MapIgnoreAlways { + map val = 1 [ + (buf.validate.field).ignore = IGNORE_ALWAYS, + (buf.validate.field).map.min_pairs = 3 + ]; +} + +message Proto3RepeatedItemIgnoreUnspecified { + repeated int32 val = 1 [(buf.validate.field).repeated.items.int32.gt = 0]; +} + +message Proto3RepeatedItemIgnoreEmpty { + repeated int32 val = 1 [ + (buf.validate.field).repeated.items.ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).repeated.items.int32.gt = 0 + ]; +} + +message Proto3RepeatedItemIgnoreAlways { + repeated int32 val = 1 [ + (buf.validate.field).repeated.items.ignore = IGNORE_ALWAYS, + (buf.validate.field).repeated.items.int32.gt = 0 + ]; +} + +message Proto3MapKeyIgnoreUnspecified { + map val = 1 [(buf.validate.field).map.keys.int32.gt = 0]; +} + +message Proto3MapKeyIgnoreEmpty { + map val = 1 [ + (buf.validate.field).map.keys.ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).map.keys.int32.gt = 0 + ]; +} + +message Proto3MapKeyIgnoreAlways { + map val = 1 [ + (buf.validate.field).map.keys.ignore = IGNORE_ALWAYS, + (buf.validate.field).map.keys.int32.gt = 0 + ]; +} + +message Proto3MapValueIgnoreUnspecified { + map val = 1 [(buf.validate.field).map.values.int32.gt = 0]; +} + +message Proto3MapValueIgnoreEmpty { + map val = 1 [ + (buf.validate.field).map.values.ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).map.values.int32.gt = 0 + ]; +} + +message Proto3MapValueIgnoreAlways { + map val = 1 [ + (buf.validate.field).map.values.ignore = IGNORE_ALWAYS, + (buf.validate.field).map.values.int32.gt = 0 + ]; +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/ignore_proto_editions.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/ignore_proto_editions.proto new file mode 100644 index 00000000..2c5355c9 --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/ignore_proto_editions.proto @@ -0,0 +1,495 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +edition = "2023"; + +package buf.validate.conformance.cases; + +import "buf/validate/validate.proto"; + +message EditionsScalarExplicitPresenceIgnoreUnspecified { + int32 val = 1 [(buf.validate.field).int32.gt = 0]; +} + +message EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault { + int32 val = 1 [ + (buf.validate.field).int32.gt = 0, + default = -42 + ]; +} + +message EditionsScalarExplicitPresenceIgnoreEmpty { + int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).int32.gt = 0 + ]; +} + +message EditionsScalarExplicitPresenceIgnoreEmptyWithDefault { + int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).int32.gt = 0, + default = -42 + ]; +} + +message EditionsScalarExplicitPresenceIgnoreAlways { + int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_ALWAYS, + (buf.validate.field).int32.gt = 0 + ]; +} + +message EditionsScalarExplicitPresenceIgnoreAlwaysWithDefault { + int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_ALWAYS, + (buf.validate.field).int32.gt = 0, + default = -42 + ]; +} + +message EditionsScalarImplicitPresenceIgnoreUnspecified { + int32 val = 1 [ + features.field_presence = IMPLICIT, + (buf.validate.field).int32.gt = 0 + ]; +} + +message EditionsScalarImplicitPresenceIgnoreEmpty { + int32 val = 1 [ + features.field_presence = IMPLICIT, + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).int32.gt = 0 + ]; +} + +message EditionsScalarImplicitPresenceIgnoreAlways { + int32 val = 1 [ + features.field_presence = IMPLICIT, + (buf.validate.field).ignore = IGNORE_ALWAYS, + (buf.validate.field).int32.gt = 0 + ]; +} + +message EditionsScalarLegacyRequiredIgnoreUnspecified { + int32 val = 1 [ + features.field_presence = LEGACY_REQUIRED, + (buf.validate.field).int32.gt = 0 + ]; +} + +message EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault { + int32 val = 1 [ + features.field_presence = LEGACY_REQUIRED, + (buf.validate.field).int32.gt = 0, + default = -42 + ]; +} + +message EditionsScalarLegacyRequiredIgnoreEmpty { + int32 val = 1 [ + features.field_presence = LEGACY_REQUIRED, + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).int32.gt = 0 + ]; +} + +message EditionsScalarLegacyRequiredIgnoreEmptyWithDefault { + int32 val = 1 [ + features.field_presence = LEGACY_REQUIRED, + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).int32.gt = 0, + default = -42 + ]; +} + +message EditionsScalarLegacyRequiredIgnoreAlways { + int32 val = 1 [ + features.field_presence = LEGACY_REQUIRED, + (buf.validate.field).ignore = IGNORE_ALWAYS, + (buf.validate.field).int32.gt = 0 + ]; +} + +message EditionsScalarLegacyRequiredIgnoreAlwaysWithDefault { + int32 val = 1 [ + features.field_presence = LEGACY_REQUIRED, + (buf.validate.field).ignore = IGNORE_ALWAYS, + (buf.validate.field).int32.gt = 0, + default = -42 + ]; +} + +message EditionsMessageExplicitPresenceIgnoreUnspecified { + Msg val = 1 [(buf.validate.field).cel = { + id: "proto.editions.message.ignore.empty" + message: "foobar" + expression: "this.val == 'foo'" + }]; + message Msg { + string val = 1; + } +} + +message EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified { + Msg val = 1 [ + features.message_encoding = DELIMITED, + (buf.validate.field).cel = { + id: "proto.editions.message.ignore.empty" + message: "foobar" + expression: "this.val == 'foo'" + } + ]; + message Msg { + string val = 1; + } +} + +message EditionsMessageExplicitPresenceIgnoreEmpty { + Msg val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).cel = { + id: "proto.editions.message.ignore.empty" + message: "foobar" + expression: "this.val == 'foo'" + } + ]; + message Msg { + string val = 1; + } +} + +message EditionsMessageExplicitPresenceDelimitedIgnoreEmpty { + Msg val = 1 [ + features.message_encoding = DELIMITED, + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).cel = { + id: "proto.editions.message.ignore.empty" + message: "foobar" + expression: "this.val == 'foo'" + } + ]; + message Msg { + string val = 1; + } +} + +message EditionsMessageExplicitPresenceIgnoreAlways { + Msg val = 1 [ + (buf.validate.field).ignore = IGNORE_ALWAYS, + (buf.validate.field).cel = { + id: "proto.editions.message.ignore.always" + message: "foobar" + expression: "this.val == 'foo'" + } + ]; + message Msg { + string val = 1; + } +} + +message EditionsMessageExplicitPresenceDelimitedIgnoreAlways { + Msg val = 1 [ + features.message_encoding = DELIMITED, + (buf.validate.field).ignore = IGNORE_ALWAYS, + (buf.validate.field).cel = { + id: "proto.editions.message.ignore.always" + message: "foobar" + expression: "this.val == 'foo'" + } + ]; + message Msg { + string val = 1; + } +} + +message EditionsMessageLegacyRequiredIgnoreUnspecified { + Msg val = 1 [ + features.field_presence = LEGACY_REQUIRED, + (buf.validate.field).cel = { + id: "proto.editions.message.ignore.empty" + message: "foobar" + expression: "this.val == 'foo'" + } + ]; + message Msg { + string val = 1; + } +} + +message EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified { + Msg val = 1 [ + features.message_encoding = DELIMITED, + features.field_presence = LEGACY_REQUIRED, + (buf.validate.field).cel = { + id: "proto.editions.message.ignore.empty" + message: "foobar" + expression: "this.val == 'foo'" + } + ]; + message Msg { + string val = 1; + } +} + +message EditionsMessageLegacyRequiredIgnoreEmpty { + Msg val = 1 [ + features.field_presence = LEGACY_REQUIRED, + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).cel = { + id: "proto.editions.message.ignore.empty" + message: "foobar" + expression: "this.val == 'foo'" + } + ]; + message Msg { + string val = 1; + } +} + +message EditionsMessageLegacyRequiredDelimitedIgnoreEmpty { + Msg val = 1 [ + features.message_encoding = DELIMITED, + features.field_presence = LEGACY_REQUIRED, + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).cel = { + id: "proto.editions.message.ignore.empty" + message: "foobar" + expression: "this.val == 'foo'" + } + ]; + message Msg { + string val = 1; + } +} + +message EditionsMessageLegacyRequiredIgnoreAlways { + Msg val = 1 [ + features.field_presence = LEGACY_REQUIRED, + (buf.validate.field).ignore = IGNORE_ALWAYS, + (buf.validate.field).cel = { + id: "proto.editions.message.ignore.empty" + message: "foobar" + expression: "this.val == 'foo'" + } + ]; + message Msg { + string val = 1; + } +} + +message EditionsMessageLegacyRequiredDelimitedIgnoreAlways { + Msg val = 1 [ + features.message_encoding = DELIMITED, + features.field_presence = LEGACY_REQUIRED, + (buf.validate.field).ignore = IGNORE_ALWAYS, + (buf.validate.field).cel = { + id: "proto.editions.message.ignore.empty" + message: "foobar" + expression: "this.val == 'foo'" + } + ]; + message Msg { + string val = 1; + } +} + +message EditionsOneofIgnoreUnspecified { + oneof o { + int32 val = 1 [(buf.validate.field).int32.gt = 0]; + } +} + +message EditionsOneofIgnoreUnspecifiedWithDefault { + oneof o { + int32 val = 1 [ + (buf.validate.field).int32.gt = 0, + default = -42 + ]; + } +} + +message EditionsOneofIgnoreEmpty { + oneof o { + int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).int32.gt = 0 + ]; + } +} + +message EditionsOneofIgnoreEmptyWithDefault { + oneof o { + int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).int32.gt = 0, + default = -42 + ]; + } +} + +message EditionsOneofIgnoreAlways { + oneof o { + int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_ALWAYS, + (buf.validate.field).int32.gt = 0 + ]; + } +} + +message EditionsOneofIgnoreAlwaysWithDefault { + oneof o { + int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_ALWAYS, + (buf.validate.field).int32.gt = 0, + default = -42 + ]; + } +} + +message EditionsRepeatedIgnoreUnspecified { + repeated int32 val = 1 [(buf.validate.field).repeated.min_items = 3]; +} + +message EditionsRepeatedExpandedIgnoreUnspecified { + repeated int32 val = 1 [ + features.repeated_field_encoding = EXPANDED, + (buf.validate.field).repeated.min_items = 3 + ]; +} + +message EditionsRepeatedIgnoreEmpty { + repeated int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).repeated.min_items = 3 + ]; +} + +message EditionsRepeatedExpandedIgnoreEmpty { + repeated int32 val = 1 [ + features.repeated_field_encoding = EXPANDED, + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).repeated.min_items = 3 + ]; +} + +message EditionsRepeatedIgnoreAlways { + repeated int32 val = 1 [ + (buf.validate.field).ignore = IGNORE_ALWAYS, + (buf.validate.field).repeated.min_items = 3 + ]; +} + +message EditionsRepeatedExpandedIgnoreAlways { + repeated int32 val = 1 [ + features.repeated_field_encoding = EXPANDED, + (buf.validate.field).ignore = IGNORE_ALWAYS, + (buf.validate.field).repeated.min_items = 3 + ]; +} + +message EditionsMapIgnoreUnspecified { + map val = 1 [(buf.validate.field).map.min_pairs = 3]; +} + +message EditionsMapIgnoreEmpty { + map val = 1 [ + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).map.min_pairs = 3 + ]; +} + +message EditionsMapIgnoreAlways { + map val = 1 [ + (buf.validate.field).ignore = IGNORE_ALWAYS, + (buf.validate.field).map.min_pairs = 3 + ]; +} + +message EditionsRepeatedItemIgnoreUnspecified { + repeated int32 val = 1 [(buf.validate.field).repeated.items.int32.gt = 0]; +} + +message EditionsRepeatedExpandedItemIgnoreUnspecified { + repeated int32 val = 1 [ + features.repeated_field_encoding = EXPANDED, + (buf.validate.field).repeated.items.int32.gt = 0 + ]; +} + +message EditionsRepeatedItemIgnoreEmpty { + repeated int32 val = 1 [ + (buf.validate.field).repeated.items.ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).repeated.items.int32.gt = 0 + ]; +} + +message EditionsRepeatedExpandedItemIgnoreEmpty { + repeated int32 val = 1 [ + features.repeated_field_encoding = EXPANDED, + (buf.validate.field).repeated.items.ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).repeated.items.int32.gt = 0 + ]; +} + +message EditionsRepeatedItemIgnoreAlways { + repeated int32 val = 1 [ + (buf.validate.field).repeated.items.ignore = IGNORE_ALWAYS, + (buf.validate.field).repeated.items.int32.gt = 0 + ]; +} + +message EditionsRepeatedExpandedItemIgnoreAlways { + repeated int32 val = 1 [ + features.repeated_field_encoding = EXPANDED, + (buf.validate.field).repeated.items.ignore = IGNORE_ALWAYS, + (buf.validate.field).repeated.items.int32.gt = 0 + ]; +} + +message EditionsMapKeyIgnoreUnspecified { + map val = 1 [(buf.validate.field).map.keys.int32.gt = 0]; +} + +message EditionsMapKeyIgnoreEmpty { + map val = 1 [ + (buf.validate.field).map.keys.ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).map.keys.int32.gt = 0 + ]; +} + +message EditionsMapKeyIgnoreAlways { + map val = 1 [ + (buf.validate.field).map.keys.ignore = IGNORE_ALWAYS, + (buf.validate.field).map.keys.int32.gt = 0 + ]; +} + +message EditionsMapValueIgnoreUnspecified { + map val = 1 [(buf.validate.field).map.values.int32.gt = 0]; +} + +message EditionsMapValueIgnoreEmpty { + map val = 1 [ + (buf.validate.field).map.values.ignore = IGNORE_IF_ZERO_VALUE, + (buf.validate.field).map.values.int32.gt = 0 + ]; +} + +message EditionsMapValueIgnoreAlways { + map val = 1 [ + (buf.validate.field).map.values.ignore = IGNORE_ALWAYS, + (buf.validate.field).map.values.int32.gt = 0 + ]; +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/kitchen_sink.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/kitchen_sink.proto new file mode 100644 index 00000000..00ba7845 --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/kitchen_sink.proto @@ -0,0 +1,73 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package buf.validate.conformance.cases; + +import "buf/validate/validate.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +enum ComplexTestEnum { + COMPLEX_TEST_ENUM_UNSPECIFIED = 0; + COMPLEX_TEST_ENUM_ONE = 1; + COMPLEX_TEST_ENUM_TWO = 2; +} + +message ComplexTestMsg { + string const = 1 [(buf.validate.field).string.const = "abcd"]; + ComplexTestMsg nested = 2; + int32 int_const = 3 [(buf.validate.field).int32.const = 5]; + bool bool_const = 4 [(buf.validate.field).bool.const = false]; + google.protobuf.FloatValue float_val = 5 [(buf.validate.field).float.gt = 0]; + google.protobuf.Duration dur_val = 6 [ + (buf.validate.field).duration.lt = {seconds: 17}, + (buf.validate.field).required = true + ]; + google.protobuf.Timestamp ts_val = 7 [(buf.validate.field).timestamp.gt = {seconds: 7}]; + ComplexTestMsg another = 8; + float float_const = 9 [(buf.validate.field).float.lt = 8]; + double double_in = 10 [(buf.validate.field).double = { + in: [ + 456.789, + 123 + ] + }]; + ComplexTestEnum enum_const = 11 [(buf.validate.field).enum.const = 2]; + google.protobuf.Any any_val = 12 [(buf.validate.field).any = { + in: ["type.googleapis.com/google.protobuf.Duration"] + }]; + repeated google.protobuf.Timestamp rep_ts_val = 13 [(buf.validate.field).repeated = { + items: { + timestamp: { + gte: {nanos: 1000000} + } + } + }]; + map map_val = 14 [(buf.validate.field).map.keys.sint32.lt = 0]; + bytes bytes_val = 15 [(buf.validate.field).bytes.const = "\x00\x99"]; + oneof o { + option (buf.validate.oneof).required = true; + + string x = 16; + int32 y = 17; + } +} + +message KitchenSinkMessage { + ComplexTestMsg val = 1; +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/library.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/library.proto new file mode 100644 index 00000000..7f052872 --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/library.proto @@ -0,0 +1,73 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package buf.validate.conformance.cases; + +import "buf/validate/validate.proto"; + +message IsHostname { + string val = 1; + option (buf.validate.message).cel = { + id: "library.is_hostname" + expression: "this.val.isHostname()" + }; +} +message IsHostAndPort { + string val = 1; + bool port_required = 2; + option (buf.validate.message).cel = { + id: "library.is_host_and_port" + expression: "this.val.isHostAndPort(this.port_required)" + }; +} +message IsIpPrefix { + string val = 1; + optional int32 version = 2; + optional bool strict = 3; + option (buf.validate.message).cel = { + id: "library.is_ip_prefix" + expression: "has(this.version) && has(this.strict) ? this.val.isIpPrefix(this.version, this.strict) : has(this.version) ? this.val.isIpPrefix(this.version) : has(this.strict) ? this.val.isIpPrefix(this.strict) : this.val.isIpPrefix()" + }; +} +message IsIp { + string val = 1; + optional int32 version = 2; + option (buf.validate.message).cel = { + id: "library.is_ip" + expression: "has(this.version) ? this.val.isIp(this.version) : this.val.isIp()" + }; +} +message IsEmail { + string val = 1; + option (buf.validate.message).cel = { + id: "library.is_email" + expression: "this.val.isEmail()" + }; +} +message IsUri { + string val = 1; + option (buf.validate.message).cel = { + id: "library.is_uri" + expression: "this.val.isUri()" + }; +} +message IsUriRef { + string val = 1; + option (buf.validate.message).cel = { + id: "library.is_uri_ref" + expression: "this.val.isUriRef()" + }; +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/maps.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/maps.proto new file mode 100644 index 00000000..4a14705b --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/maps.proto @@ -0,0 +1,79 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package buf.validate.conformance.cases; + +import "buf/validate/validate.proto"; + +message MapNone { + map val = 1; +} + +message MapMin { + map val = 1 [(buf.validate.field).map.min_pairs = 2]; +} +message MapMax { + map val = 1 [(buf.validate.field).map.max_pairs = 3]; +} +message MapMinMax { + map val = 1 [(buf.validate.field).map = { + min_pairs: 2 + max_pairs: 4 + }]; +} +message MapExact { + map val = 1 [(buf.validate.field).map = { + min_pairs: 3 + max_pairs: 3 + }]; +} + +message MapKeys { + map val = 1 [(buf.validate.field).map.keys.sint64.lt = 0]; +} +message MapValues { + map val = 1 [(buf.validate.field).map.values.string.min_len = 3]; +} + +message MapKeysPattern { + map val = 1 [(buf.validate.field).map.keys.string.pattern = "(?i)^[a-z0-9]+$"]; +} +message MapValuesPattern { + map val = 1 [(buf.validate.field).map.values.string.pattern = "(?i)^[a-z0-9]+$"]; +} + +message MapRecursive { + map val = 1; + message Msg { + string val = 1 [(buf.validate.field).string.min_len = 3]; + } +} + +message MapExactIgnore { + map val = 1 [ + (buf.validate.field).map = { + min_pairs: 3 + max_pairs: 3 + }, + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE + ]; +} + +message MultipleMaps { + map first = 1 [(buf.validate.field).map.keys.uint32.gt = 0]; + map second = 2 [(buf.validate.field).map.keys.int32.lt = 0]; + map third = 3 [(buf.validate.field).map.keys.int32.gt = 0]; +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/messages.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/messages.proto new file mode 100644 index 00000000..e97d51e2 --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/messages.proto @@ -0,0 +1,203 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package buf.validate.conformance.cases; + +import "buf/validate/conformance/cases/other_package/embed.proto"; +import "buf/validate/validate.proto"; + +message TestMsg { + string const = 1 [(buf.validate.field).string.const = "foo"]; + TestMsg nested = 2; +} + +message MessageNone { + NoneMsg val = 1; + message NoneMsg {} +} + +message Message { + TestMsg val = 1; +} +message MessageCrossPackage { + other_package.Embed val = 1; +} +message MessageSkip { + TestMsg val = 1 [(buf.validate.field).ignore = IGNORE_ALWAYS]; +} +message MessageRequired { + TestMsg val = 1 [(buf.validate.field).required = true]; +} +message MessageRequiredButOptional { + optional TestMsg val = 1 [(buf.validate.field).required = true]; +} + +message MessageRequiredOneof { + oneof one { + option (buf.validate.oneof).required = true; + TestMsg val = 1 [(buf.validate.field).required = true]; + } +} + +message MessageWith3dInside {} + +message MessageOneofSingleField { + option (buf.validate.message).oneof = { + fields: ["str_field"] + }; + string str_field = 1; + bool bool_field = 2; +} + +message MessageOneofSingleFieldRequired { + option (buf.validate.message).oneof = { + fields: ["str_field"] + required: true + }; + string str_field = 1; + bool bool_field = 2; +} + +message MessageOneofMultipleFields { + option (buf.validate.message).oneof = { + fields: [ + "str_field", + "bool_field" + ] + }; + string str_field = 1; + bool bool_field = 2; +} + +message MessageOneofMultipleFieldsRequired { + option (buf.validate.message).oneof = { + fields: [ + "str_field", + "bool_field" + ] + required: true + }; + string str_field = 1; + bool bool_field = 2; +} + +message MessageOneofMultipleSharedFields { + option (buf.validate.message).oneof = { + fields: [ + "str_field", + "bool_field" + ] + required: true + }; + option (buf.validate.message).oneof = { + fields: [ + "str_field", + "int_field" + ] + required: true + }; + string str_field = 1; + bool bool_field = 2; + int32 int_field = 3; +} + +message MessageOneofUnknownFieldName { + option (buf.validate.message).oneof = { + fields: ["xxx"] + }; + string str_field = 1; +} + +message MessageOneofDuplicateField { + option (buf.validate.message).oneof = { + fields: [ + "str_field", + "bool_field", + "str_field" + ] + }; + string str_field = 1; + bool bool_field = 2; +} + +message MessageOneofZeroFields { + option (buf.validate.message).oneof = { + fields: [] + }; + string str_field = 1; + bool bool_field = 2; +} + +message MessageOneofUnsatisfiable { + bool a = 1; + bool b = 2; + bool c = 3; + option (buf.validate.message).oneof = { + fields: [ + "a", + "b" + ] + required: true + }; + option (buf.validate.message).oneof = { + fields: [ + "b", + "c" + ] + required: true + }; + option (buf.validate.message).oneof = { + fields: [ + "a", + "c" + ] + required: true + }; +} + +message MessageOneofIgnoreUnpopulated { + option (buf.validate.message).oneof = { + fields: [ + "str_field", + "bool_field" + ] + }; + string str_field = 1; + bool bool_field = 2 [(buf.validate.field).bool.const = true]; +} + +message MessageOneofIgnoreUnpopulatedRequired { + option (buf.validate.message).oneof = { + fields: [ + "str_field", + "bool_field" + ] + required: true + }; + string str_field = 1; + bool bool_field = 2 [(buf.validate.field).bool.const = true]; +} + +message MessageOneofIgnoreOverride { + option (buf.validate.message).oneof = { + fields: [ + "msg_field", + "bool_field" + ] + }; + TestMsg msg_field = 1 [(buf.validate.field).ignore = IGNORE_ALWAYS]; + bool bool_field = 2; +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/numbers.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/numbers.proto new file mode 100644 index 00000000..a169f893 --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/numbers.proto @@ -0,0 +1,935 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package buf.validate.conformance.cases; + +import "buf/validate/validate.proto"; + +message FloatNone { + float val = 1; +} +message FloatConst { + float val = 1 [(buf.validate.field).float.const = 1.23]; +} +message FloatIn { + float val = 1 [(buf.validate.field).float = { + in: [ + 4.56, + 7.89 + ] + }]; +} +message FloatNotIn { + float val = 1 [(buf.validate.field).float = { + not_in: [0] + }]; +} +message FloatLT { + float val = 1 [(buf.validate.field).float.lt = 0]; +} +message FloatLTE { + float val = 1 [(buf.validate.field).float.lte = 64]; +} +message FloatGT { + float val = 1 [(buf.validate.field).float.gt = 16]; +} +message FloatGTE { + float val = 1 [(buf.validate.field).float.gte = 8]; +} +message FloatGTLT { + float val = 1 [(buf.validate.field).float = { + gt: 0 + lt: 10 + }]; +} +message FloatExLTGT { + float val = 1 [(buf.validate.field).float = { + lt: 0 + gt: 10 + }]; +} +message FloatGTELTE { + float val = 1 [(buf.validate.field).float = { + gte: 128 + lte: 256 + }]; +} +message FloatExGTELTE { + float val = 1 [(buf.validate.field).float = { + lte: 128 + gte: 256 + }]; +} +message FloatFinite { + float val = 1 [(buf.validate.field).float.finite = true]; +} +message FloatNotFinite { + float val = 1 [(buf.validate.field).float.finite = false]; +} +message FloatIgnore { + float val = 1 [ + (buf.validate.field).float = { + gte: 128 + lte: 256 + }, + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE + ]; +} + +message FloatIncorrectType { + float val = 1 [(buf.validate.field).double.gt = 0]; +} + +message FloatExample { + float val = 1 [(buf.validate.field).float.example = 8]; +} + +message DoubleNone { + double val = 1; +} +message DoubleConst { + double val = 1 [(buf.validate.field).double.const = 1.23]; +} +message DoubleIn { + double val = 1 [(buf.validate.field).double = { + in: [ + 4.56, + 7.89 + ] + }]; +} +message DoubleNotIn { + double val = 1 [(buf.validate.field).double = { + not_in: [0] + }]; +} +message DoubleLT { + double val = 1 [(buf.validate.field).double.lt = 0]; +} +message DoubleLTE { + double val = 1 [(buf.validate.field).double.lte = 64]; +} +message DoubleGT { + double val = 1 [(buf.validate.field).double.gt = 16]; +} +message DoubleGTE { + double val = 1 [(buf.validate.field).double.gte = 8]; +} +message DoubleGTLT { + double val = 1 [(buf.validate.field).double = { + gt: 0 + lt: 10 + }]; +} +message DoubleExLTGT { + double val = 1 [(buf.validate.field).double = { + lt: 0 + gt: 10 + }]; +} +message DoubleGTELTE { + double val = 1 [(buf.validate.field).double = { + gte: 128 + lte: 256 + }]; +} +message DoubleExGTELTE { + double val = 1 [(buf.validate.field).double = { + lte: 128 + gte: 256 + }]; +} +message DoubleFinite { + double val = 1 [(buf.validate.field).double.finite = true]; +} +message DoubleNotFinite { + double val = 1 [(buf.validate.field).double.finite = false]; +} +message DoubleIgnore { + double val = 1 [ + (buf.validate.field).double = { + gte: 128 + lte: 256 + }, + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE + ]; +} + +message DoubleIncorrectType { + double val = 1 [(buf.validate.field).float.gt = 0]; +} + +message DoubleExample { + double val = 1 [(buf.validate.field).double.example = 0]; +} + +message Int32None { + int32 val = 1; +} +message Int32Const { + int32 val = 1 [(buf.validate.field).int32.const = 1]; +} +message Int32In { + int32 val = 1 [(buf.validate.field).int32 = { + in: [ + 2, + 3 + ] + }]; +} +message Int32NotIn { + int32 val = 1 [(buf.validate.field).int32 = { + not_in: [0] + }]; +} +message Int32LT { + int32 val = 1 [(buf.validate.field).int32.lt = 0]; +} +message Int32LTE { + int32 val = 1 [(buf.validate.field).int32.lte = 64]; +} +message Int32GT { + int32 val = 1 [(buf.validate.field).int32.gt = 16]; +} +message Int32GTE { + int32 val = 1 [(buf.validate.field).int32.gte = 8]; +} +message Int32GTLT { + int32 val = 1 [(buf.validate.field).int32 = { + gt: 0 + lt: 10 + }]; +} +message Int32ExLTGT { + int32 val = 1 [(buf.validate.field).int32 = { + lt: 0 + gt: 10 + }]; +} +message Int32GTELTE { + int32 val = 1 [(buf.validate.field).int32 = { + gte: 128 + lte: 256 + }]; +} +message Int32ExGTELTE { + int32 val = 1 [(buf.validate.field).int32 = { + lte: 128 + gte: 256 + }]; +} +message Int32Ignore { + int32 val = 1 [ + (buf.validate.field).int32 = { + gte: 128 + lte: 256 + }, + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE + ]; +} + +message Int32IncorrectType { + int32 val = 1 [(buf.validate.field).float.gt = 0]; +} + +message Int32Example { + int32 val = 1 [(buf.validate.field).int32.example = 10]; +} + +message Int64None { + int64 val = 1; +} +message Int64Const { + int64 val = 1 [(buf.validate.field).int64.const = 1]; +} +message Int64In { + int64 val = 1 [(buf.validate.field).int64 = { + in: [ + 2, + 3 + ] + }]; +} +message Int64NotIn { + int64 val = 1 [(buf.validate.field).int64 = { + not_in: [0] + }]; +} +message Int64LT { + int64 val = 1 [(buf.validate.field).int64.lt = 0]; +} +message Int64LTE { + int64 val = 1 [(buf.validate.field).int64.lte = 64]; +} +message Int64GT { + int64 val = 1 [(buf.validate.field).int64.gt = 16]; +} +message Int64GTE { + int64 val = 1 [(buf.validate.field).int64.gte = 8]; +} +message Int64GTLT { + int64 val = 1 [(buf.validate.field).int64 = { + gt: 0 + lt: 10 + }]; +} +message Int64ExLTGT { + int64 val = 1 [(buf.validate.field).int64 = { + lt: 0 + gt: 10 + }]; +} +message Int64GTELTE { + int64 val = 1 [(buf.validate.field).int64 = { + gte: 128 + lte: 256 + }]; +} +message Int64ExGTELTE { + int64 val = 1 [(buf.validate.field).int64 = { + lte: 128 + gte: 256 + }]; +} +message Int64Ignore { + int64 val = 1 [ + (buf.validate.field).int64 = { + gte: 128 + lte: 256 + }, + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE + ]; +} +message Int64BigRules { + // Intentionally choose limits that are outside the range of both signed and unsigned 32-bit integers. + int64 lt_pos = 1 [(buf.validate.field).int64.lt = 5444333222]; + int64 lt_neg = 2 [(buf.validate.field).int64.lt = -5444333222]; + int64 gt_pos = 3 [(buf.validate.field).int64.gt = 5444333222]; + int64 gt_neg = 4 [(buf.validate.field).int64.gt = -5444333222]; + int64 lte_pos = 5 [(buf.validate.field).int64.lte = 5444333222]; + int64 lte_neg = 6 [(buf.validate.field).int64.lte = -5444333222]; + int64 gte_pos = 7 [(buf.validate.field).int64.gte = 5444333222]; + int64 gte_neg = 8 [(buf.validate.field).int64.gte = -5444333222]; + int64 constant_pos = 9 [(buf.validate.field).int64.const = 5444333222]; + int64 constant_neg = 10 [(buf.validate.field).int64.const = -5444333222]; + int64 in = 11 [(buf.validate.field).int64 = { + in: [ + 5444333222, + -5444333222 + ] + }]; + int64 notin = 12 [(buf.validate.field).int64 = { + not_in: [ + 5444333222, + -5444333222 + ] + }]; +} + +message Int64IncorrectType { + int64 val = 1 [(buf.validate.field).float.gt = 0]; +} + +message Int64Example { + int64 val = 1 [(buf.validate.field).int64.example = 10]; +} + +message UInt32None { + uint32 val = 1; +} +message UInt32Const { + uint32 val = 1 [(buf.validate.field).uint32.const = 1]; +} +message UInt32In { + uint32 val = 1 [(buf.validate.field).uint32 = { + in: [ + 2, + 3 + ] + }]; +} +message UInt32NotIn { + uint32 val = 1 [(buf.validate.field).uint32 = { + not_in: [0] + }]; +} +message UInt32LT { + uint32 val = 1 [(buf.validate.field).uint32.lt = 5]; +} +message UInt32LTE { + uint32 val = 1 [(buf.validate.field).uint32.lte = 64]; +} +message UInt32GT { + uint32 val = 1 [(buf.validate.field).uint32.gt = 16]; +} +message UInt32GTE { + uint32 val = 1 [(buf.validate.field).uint32.gte = 8]; +} +message UInt32GTLT { + uint32 val = 1 [(buf.validate.field).uint32 = { + gt: 5 + lt: 10 + }]; +} +message UInt32ExLTGT { + uint32 val = 1 [(buf.validate.field).uint32 = { + lt: 5 + gt: 10 + }]; +} +message UInt32GTELTE { + uint32 val = 1 [(buf.validate.field).uint32 = { + gte: 128 + lte: 256 + }]; +} +message UInt32ExGTELTE { + uint32 val = 1 [(buf.validate.field).uint32 = { + lte: 128 + gte: 256 + }]; +} +message UInt32Ignore { + uint32 val = 1 [ + (buf.validate.field).uint32 = { + gte: 128 + lte: 256 + }, + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE + ]; +} + +message UInt32IncorrectType { + uint32 val = 1 [(buf.validate.field).float.gt = 0]; +} + +message UInt32Example { + uint32 val = 1 [(buf.validate.field).uint32.example = 0]; +} + +message UInt64None { + uint64 val = 1; +} +message UInt64Const { + uint64 val = 1 [(buf.validate.field).uint64.const = 1]; +} +message UInt64In { + uint64 val = 1 [(buf.validate.field).uint64 = { + in: [ + 2, + 3 + ] + }]; +} +message UInt64NotIn { + uint64 val = 1 [(buf.validate.field).uint64 = { + not_in: [0] + }]; +} +message UInt64LT { + uint64 val = 1 [(buf.validate.field).uint64.lt = 5]; +} +message UInt64LTE { + uint64 val = 1 [(buf.validate.field).uint64.lte = 64]; +} +message UInt64GT { + uint64 val = 1 [(buf.validate.field).uint64.gt = 16]; +} +message UInt64GTE { + uint64 val = 1 [(buf.validate.field).uint64.gte = 8]; +} +message UInt64GTLT { + uint64 val = 1 [(buf.validate.field).uint64 = { + gt: 5 + lt: 10 + }]; +} +message UInt64ExLTGT { + uint64 val = 1 [(buf.validate.field).uint64 = { + lt: 5 + gt: 10 + }]; +} +message UInt64GTELTE { + uint64 val = 1 [(buf.validate.field).uint64 = { + gte: 128 + lte: 256 + }]; +} +message UInt64ExGTELTE { + uint64 val = 1 [(buf.validate.field).uint64 = { + lte: 128 + gte: 256 + }]; +} +message UInt64Ignore { + uint64 val = 1 [ + (buf.validate.field).uint64 = { + gte: 128 + lte: 256 + }, + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE + ]; +} + +message UInt64IncorrectType { + uint64 val = 1 [(buf.validate.field).float.gt = 0]; +} + +message UInt64Example { + uint64 val = 1 [(buf.validate.field).uint64.example = 0]; +} + +message SInt32None { + sint32 val = 1; +} +message SInt32Const { + sint32 val = 1 [(buf.validate.field).sint32.const = 1]; +} +message SInt32In { + sint32 val = 1 [(buf.validate.field).sint32 = { + in: [ + 2, + 3 + ] + }]; +} +message SInt32NotIn { + sint32 val = 1 [(buf.validate.field).sint32 = { + not_in: [0] + }]; +} +message SInt32LT { + sint32 val = 1 [(buf.validate.field).sint32.lt = 0]; +} +message SInt32LTE { + sint32 val = 1 [(buf.validate.field).sint32.lte = 64]; +} +message SInt32GT { + sint32 val = 1 [(buf.validate.field).sint32.gt = 16]; +} +message SInt32GTE { + sint32 val = 1 [(buf.validate.field).sint32.gte = 8]; +} +message SInt32GTLT { + sint32 val = 1 [(buf.validate.field).sint32 = { + gt: 0 + lt: 10 + }]; +} +message SInt32ExLTGT { + sint32 val = 1 [(buf.validate.field).sint32 = { + lt: 0 + gt: 10 + }]; +} +message SInt32GTELTE { + sint32 val = 1 [(buf.validate.field).sint32 = { + gte: 128 + lte: 256 + }]; +} +message SInt32ExGTELTE { + sint32 val = 1 [(buf.validate.field).sint32 = { + lte: 128 + gte: 256 + }]; +} +message SInt32Ignore { + sint32 val = 1 [ + (buf.validate.field).sint32 = { + gte: 128 + lte: 256 + }, + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE + ]; +} + +message SInt32IncorrectType { + sint32 val = 1 [(buf.validate.field).float.gt = 0]; +} + +message SInt32Example { + sint32 val = 1 [(buf.validate.field).sint32.example = 0]; +} + +message SInt64None { + sint64 val = 1; +} +message SInt64Const { + sint64 val = 1 [(buf.validate.field).sint64.const = 1]; +} +message SInt64In { + sint64 val = 1 [(buf.validate.field).sint64 = { + in: [ + 2, + 3 + ] + }]; +} +message SInt64NotIn { + sint64 val = 1 [(buf.validate.field).sint64 = { + not_in: [0] + }]; +} +message SInt64LT { + sint64 val = 1 [(buf.validate.field).sint64.lt = 0]; +} +message SInt64LTE { + sint64 val = 1 [(buf.validate.field).sint64.lte = 64]; +} +message SInt64GT { + sint64 val = 1 [(buf.validate.field).sint64.gt = 16]; +} +message SInt64GTE { + sint64 val = 1 [(buf.validate.field).sint64.gte = 8]; +} +message SInt64GTLT { + sint64 val = 1 [(buf.validate.field).sint64 = { + gt: 0 + lt: 10 + }]; +} +message SInt64ExLTGT { + sint64 val = 1 [(buf.validate.field).sint64 = { + lt: 0 + gt: 10 + }]; +} +message SInt64GTELTE { + sint64 val = 1 [(buf.validate.field).sint64 = { + gte: 128 + lte: 256 + }]; +} +message SInt64ExGTELTE { + sint64 val = 1 [(buf.validate.field).sint64 = { + lte: 128 + gte: 256 + }]; +} +message SInt64Ignore { + sint64 val = 1 [ + (buf.validate.field).sint64 = { + gte: 128 + lte: 256 + }, + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE + ]; +} +message SInt64IncorrectType { + sint64 val = 1 [(buf.validate.field).float.gt = 0]; +} + +message SInt64Example { + sint64 val = 1 [(buf.validate.field).sint64.example = 0]; +} + +message Fixed32None { + fixed32 val = 1; +} +message Fixed32Const { + fixed32 val = 1 [(buf.validate.field).fixed32.const = 1]; +} +message Fixed32In { + fixed32 val = 1 [(buf.validate.field).fixed32 = { + in: [ + 2, + 3 + ] + }]; +} +message Fixed32NotIn { + fixed32 val = 1 [(buf.validate.field).fixed32 = { + not_in: [0] + }]; +} +message Fixed32LT { + fixed32 val = 1 [(buf.validate.field).fixed32.lt = 5]; +} +message Fixed32LTE { + fixed32 val = 1 [(buf.validate.field).fixed32.lte = 64]; +} +message Fixed32GT { + fixed32 val = 1 [(buf.validate.field).fixed32.gt = 16]; +} +message Fixed32GTE { + fixed32 val = 1 [(buf.validate.field).fixed32.gte = 8]; +} +message Fixed32GTLT { + fixed32 val = 1 [(buf.validate.field).fixed32 = { + gt: 5 + lt: 10 + }]; +} +message Fixed32ExLTGT { + fixed32 val = 1 [(buf.validate.field).fixed32 = { + lt: 5 + gt: 10 + }]; +} +message Fixed32GTELTE { + fixed32 val = 1 [(buf.validate.field).fixed32 = { + gte: 128 + lte: 256 + }]; +} +message Fixed32ExGTELTE { + fixed32 val = 1 [(buf.validate.field).fixed32 = { + lte: 128 + gte: 256 + }]; +} +message Fixed32Ignore { + fixed32 val = 1 [ + (buf.validate.field).fixed32 = { + gte: 128 + lte: 256 + }, + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE + ]; +} + +message Fixed32IncorrectType { + fixed32 val = 1 [(buf.validate.field).float.gt = 0]; +} + +message Fixed32Example { + fixed32 val = 1 [(buf.validate.field).fixed32.example = 0]; +} + +message Fixed64None { + fixed64 val = 1; +} +message Fixed64Const { + fixed64 val = 1 [(buf.validate.field).fixed64.const = 1]; +} +message Fixed64In { + fixed64 val = 1 [(buf.validate.field).fixed64 = { + in: [ + 2, + 3 + ] + }]; +} +message Fixed64NotIn { + fixed64 val = 1 [(buf.validate.field).fixed64 = { + not_in: [0] + }]; +} +message Fixed64LT { + fixed64 val = 1 [(buf.validate.field).fixed64.lt = 5]; +} +message Fixed64LTE { + fixed64 val = 1 [(buf.validate.field).fixed64.lte = 64]; +} +message Fixed64GT { + fixed64 val = 1 [(buf.validate.field).fixed64.gt = 16]; +} +message Fixed64GTE { + fixed64 val = 1 [(buf.validate.field).fixed64.gte = 8]; +} +message Fixed64GTLT { + fixed64 val = 1 [(buf.validate.field).fixed64 = { + gt: 5 + lt: 10 + }]; +} +message Fixed64ExLTGT { + fixed64 val = 1 [(buf.validate.field).fixed64 = { + lt: 5 + gt: 10 + }]; +} +message Fixed64GTELTE { + fixed64 val = 1 [(buf.validate.field).fixed64 = { + gte: 128 + lte: 256 + }]; +} +message Fixed64ExGTELTE { + fixed64 val = 1 [(buf.validate.field).fixed64 = { + lte: 128 + gte: 256 + }]; +} +message Fixed64Ignore { + fixed64 val = 1 [ + (buf.validate.field).fixed64 = { + gte: 128 + lte: 256 + }, + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE + ]; +} + +message Fixed64IncorrectType { + fixed64 val = 1 [(buf.validate.field).float.gt = 0]; +} + +message Fixed64Example { + fixed64 val = 1 [(buf.validate.field).fixed64.example = 0]; +} + +message SFixed32None { + sfixed32 val = 1; +} +message SFixed32Const { + sfixed32 val = 1 [(buf.validate.field).sfixed32.const = 1]; +} +message SFixed32In { + sfixed32 val = 1 [(buf.validate.field).sfixed32 = { + in: [ + 2, + 3 + ] + }]; +} +message SFixed32NotIn { + sfixed32 val = 1 [(buf.validate.field).sfixed32 = { + not_in: [0] + }]; +} +message SFixed32LT { + sfixed32 val = 1 [(buf.validate.field).sfixed32.lt = 0]; +} +message SFixed32LTE { + sfixed32 val = 1 [(buf.validate.field).sfixed32.lte = 64]; +} +message SFixed32GT { + sfixed32 val = 1 [(buf.validate.field).sfixed32.gt = 16]; +} +message SFixed32GTE { + sfixed32 val = 1 [(buf.validate.field).sfixed32.gte = 8]; +} +message SFixed32GTLT { + sfixed32 val = 1 [(buf.validate.field).sfixed32 = { + gt: 0 + lt: 10 + }]; +} +message SFixed32ExLTGT { + sfixed32 val = 1 [(buf.validate.field).sfixed32 = { + lt: 0 + gt: 10 + }]; +} +message SFixed32GTELTE { + sfixed32 val = 1 [(buf.validate.field).sfixed32 = { + gte: 128 + lte: 256 + }]; +} +message SFixed32ExGTELTE { + sfixed32 val = 1 [(buf.validate.field).sfixed32 = { + lte: 128 + gte: 256 + }]; +} +message SFixed32Ignore { + sfixed32 val = 1 [ + (buf.validate.field).sfixed32 = { + gte: 128 + lte: 256 + }, + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE + ]; +} + +message SFixed32IncorrectType { + sfixed32 val = 1 [(buf.validate.field).float.gt = 0]; +} + +message SFixed32Example { + sfixed32 val = 1 [(buf.validate.field).sfixed32.example = 0]; +} + +message SFixed64None { + sfixed64 val = 1; +} +message SFixed64Const { + sfixed64 val = 1 [(buf.validate.field).sfixed64.const = 1]; +} +message SFixed64In { + sfixed64 val = 1 [(buf.validate.field).sfixed64 = { + in: [ + 2, + 3 + ] + }]; +} +message SFixed64NotIn { + sfixed64 val = 1 [(buf.validate.field).sfixed64 = { + not_in: [0] + }]; +} +message SFixed64LT { + sfixed64 val = 1 [(buf.validate.field).sfixed64.lt = 0]; +} +message SFixed64LTE { + sfixed64 val = 1 [(buf.validate.field).sfixed64.lte = 64]; +} +message SFixed64GT { + sfixed64 val = 1 [(buf.validate.field).sfixed64.gt = 16]; +} +message SFixed64GTE { + sfixed64 val = 1 [(buf.validate.field).sfixed64.gte = 8]; +} +message SFixed64GTLT { + sfixed64 val = 1 [(buf.validate.field).sfixed64 = { + gt: 0 + lt: 10 + }]; +} +message SFixed64ExLTGT { + sfixed64 val = 1 [(buf.validate.field).sfixed64 = { + lt: 0 + gt: 10 + }]; +} +message SFixed64GTELTE { + sfixed64 val = 1 [(buf.validate.field).sfixed64 = { + gte: 128 + lte: 256 + }]; +} +message SFixed64ExGTELTE { + sfixed64 val = 1 [(buf.validate.field).sfixed64 = { + lte: 128 + gte: 256 + }]; +} +message SFixed64Ignore { + sfixed64 val = 1 [ + (buf.validate.field).sfixed64 = { + gte: 128 + lte: 256 + }, + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE + ]; +} + +message SFixed64IncorrectType { + sfixed64 val = 1 [(buf.validate.field).float.gt = 0]; +} + +message SFixed64Example { + sfixed64 val = 1 [(buf.validate.field).sfixed64.example = 0]; +} + +message Int64LTEOptional { + optional int64 val = 1 [(buf.validate.field).int64.lte = 64]; +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/oneofs.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/oneofs.proto new file mode 100644 index 00000000..7d37e31f --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/oneofs.proto @@ -0,0 +1,58 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package buf.validate.conformance.cases; + +import "buf/validate/validate.proto"; + +message TestOneofMsg { + bool val = 1 [(buf.validate.field).bool.const = true]; +} + +message OneofNone { + oneof o { + string x = 1; + int32 y = 2; + } +} + +message Oneof { + oneof o { + string x = 1 [(buf.validate.field).string.prefix = "foo"]; + int32 y = 2 [(buf.validate.field).int32.gt = 0]; + TestOneofMsg z = 3; + } +} + +message OneofRequired { + oneof o { + option (buf.validate.oneof).required = true; + + string x = 1; + int32 y = 2; + int32 name_with_underscores = 3; + int32 under_and_1_number = 4; + } +} + +message OneofRequiredWithRequiredField { + oneof o { + option (buf.validate.oneof).required = true; + + string a = 1 [(buf.validate.field).required = true]; + string b = 2; + } +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/other_package/embed.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/other_package/embed.proto new file mode 100644 index 00000000..7b26930a --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/other_package/embed.proto @@ -0,0 +1,36 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package buf.validate.conformance.cases.other_package; + +import "buf/validate/validate.proto"; + +// Validate message embedding across packages. +message Embed { + message DoubleEmbed { + enum DoubleEnumerated { + DOUBLE_ENUMERATED_UNSPECIFIED = 0; + DOUBLE_ENUMERATED_VALUE = 1; + } + } + + int64 val = 1 [(buf.validate.field).int64.gt = 0]; + + enum Enumerated { + ENUMERATED_UNSPECIFIED = 0; + ENUMERATED_VALUE = 1; + } +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/predefined_rules_proto2.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/predefined_rules_proto2.proto new file mode 100644 index 00000000..2f239916 --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/predefined_rules_proto2.proto @@ -0,0 +1,361 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto2"; + +package buf.validate.conformance.cases; + +import "buf/validate/validate.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +extend buf.validate.FloatRules { + optional float float_abs_range_proto2 = 1161 [(buf.validate.predefined).cel = { + id: "float.abs_range.proto2" + expression: "this >= -rule && this <= rule" + message: "float value is out of range" + }]; +} + +extend buf.validate.DoubleRules { + optional double double_abs_range_proto2 = 1161 [(buf.validate.predefined).cel = { + id: "double.abs_range.proto2" + expression: "this >= -rule && this <= rule" + message: "double value is out of range" + }]; +} + +extend buf.validate.Int32Rules { + repeated int32 int32_abs_in_proto2 = 1161 [(buf.validate.predefined).cel = { + id: "int32.abs_in.proto2" + expression: "this in rule || this in rule.map(n, -n)" + message: "must be in absolute value of list" + }]; +} + +extend buf.validate.Int64Rules { + repeated google.protobuf.Int64Value int64_abs_in_proto2 = 1161 [(buf.validate.predefined).cel = { + id: "int64.abs_in.proto2" + expression: "this in rule || this in rule.map(n, -n)" + message: "must be in absolute value of list" + }]; +} + +extend buf.validate.UInt32Rules { + optional bool uint32_even_proto2 = 1161 [(buf.validate.predefined).cel = { + id: "uint32.even.proto2" + expression: "this % 2u == 0u" + message: "uint32 value is not even" + }]; +} + +extend buf.validate.UInt64Rules { + optional bool uint64_even_proto2 = 1161 [(buf.validate.predefined).cel = { + id: "uint64.even.proto2" + expression: "this % 2u == 0u" + message: "uint64 value is not even" + }]; +} + +extend buf.validate.SInt32Rules { + optional bool sint32_even_proto2 = 1161 [(buf.validate.predefined).cel = { + id: "sint32.even.proto2" + expression: "this % 2 == 0" + message: "sint32 value is not even" + }]; +} + +extend buf.validate.SInt64Rules { + optional bool sint64_even_proto2 = 1161 [(buf.validate.predefined).cel = { + id: "sint64.even.proto2" + expression: "this % 2 == 0" + message: "sint64 value is not even" + }]; +} + +extend buf.validate.Fixed32Rules { + optional bool fixed32_even_proto2 = 1161 [(buf.validate.predefined).cel = { + id: "fixed32.even.proto2" + expression: "this % 2u == 0u" + message: "fixed32 value is not even" + }]; +} + +extend buf.validate.Fixed64Rules { + optional bool fixed64_even_proto2 = 1161 [(buf.validate.predefined).cel = { + id: "fixed64.even.proto2" + expression: "this % 2u == 0u" + message: "fixed64 value is not even" + }]; +} + +extend buf.validate.SFixed32Rules { + optional bool sfixed32_even_proto2 = 1161 [(buf.validate.predefined).cel = { + id: "sfixed32.even.proto2" + expression: "this % 2 == 0" + message: "sfixed32 value is not even" + }]; +} + +extend buf.validate.SFixed64Rules { + optional bool sfixed64_even_proto2 = 1161 [(buf.validate.predefined).cel = { + id: "sfixed64.even.proto2" + expression: "this % 2 == 0" + message: "sfixed64 value is not even" + }]; +} + +extend buf.validate.BoolRules { + optional bool bool_false_proto2 = 1161 [(buf.validate.predefined).cel = { + id: "bool.false.proto2" + expression: "this == false" + message: "bool value is not false" + }]; +} + +extend buf.validate.StringRules { + optional bool string_valid_path_proto2 = 1161 [(buf.validate.predefined).cel = { + id: "string.valid_path.proto2" + expression: "!this.matches('^([^/.][^/]?|[^/][^/.]|[^/]{3,})(/([^/.][^/]?|[^/][^/.]|[^/]{3,}))*$') ? 'not a valid path: `%s`'.format([this]) : ''" + }]; +} + +extend buf.validate.BytesRules { + optional bool bytes_valid_path_proto2 = 1161 [(buf.validate.predefined).cel = { + id: "bytes.valid_path.proto2" + expression: "!string(this).matches('^([^/.][^/]?|[^/][^/.]|[^/]{3,})(/([^/.][^/]?|[^/][^/.]|[^/]{3,}))*$') ? 'not a valid path: `%s`'.format([this]) : ''" + }]; +} + +extend buf.validate.EnumRules { + optional bool enum_non_zero_proto2 = 1161 [(buf.validate.predefined).cel = { + id: "enum.non_zero.proto2" + expression: "int(this) != 0" + message: "enum value is not non-zero" + }]; +} + +extend buf.validate.RepeatedRules { + optional bool repeated_at_least_five_proto2 = 1161 [(predefined).cel = { + id: "repeated.at_least_five.proto2" + expression: "uint(this.size()) >= 5u" + message: "repeated field must have at least five values" + }]; +} + +extend buf.validate.DurationRules { + optional bool duration_too_long_proto2 = 1161 [(predefined).cel = { + id: "duration.too_long.proto2" + expression: "this <= duration('10s')" + message: "duration can't be longer than 10 seconds" + }]; +} + +extend buf.validate.TimestampRules { + optional bool timestamp_in_range_proto2 = 1161 [(predefined).cel = { + id: "timestamp.time_range.proto2" + expression: "int(this) >= 1049587200 && int(this) <= 1080432000" + message: "timestamp out of range" + }]; +} + +message PredefinedFloatRuleProto2 { + optional float val = 1 [(buf.validate.field).float.(float_abs_range_proto2) = 1.0]; +} + +message PredefinedDoubleRuleProto2 { + optional double val = 1 [(buf.validate.field).double.(double_abs_range_proto2) = 1.0]; +} + +message PredefinedInt32RuleProto2 { + optional int32 val = 1 [(buf.validate.field).int32.(int32_abs_in_proto2) = -2]; +} + +message PredefinedInt64RuleProto2 { + optional int64 val = 1 [(buf.validate.field).int64.(int64_abs_in_proto2) = {value: -2}]; +} + +message PredefinedUInt32RuleProto2 { + optional uint32 val = 1 [(buf.validate.field).uint32.(uint32_even_proto2) = true]; +} + +message PredefinedUInt64RuleProto2 { + optional uint64 val = 1 [(buf.validate.field).uint64.(uint64_even_proto2) = true]; +} + +message PredefinedSInt32RuleProto2 { + optional sint32 val = 1 [(buf.validate.field).sint32.(sint32_even_proto2) = true]; +} + +message PredefinedSInt64RuleProto2 { + optional sint64 val = 1 [(buf.validate.field).sint64.(sint64_even_proto2) = true]; +} + +message PredefinedFixed32RuleProto2 { + optional fixed32 val = 1 [(buf.validate.field).fixed32.(fixed32_even_proto2) = true]; +} + +message PredefinedFixed64RuleProto2 { + optional fixed64 val = 1 [(buf.validate.field).fixed64.(fixed64_even_proto2) = true]; +} + +message PredefinedSFixed32RuleProto2 { + optional sfixed32 val = 1 [(buf.validate.field).sfixed32.(sfixed32_even_proto2) = true]; +} + +message PredefinedSFixed64RuleProto2 { + optional sfixed64 val = 1 [(buf.validate.field).sfixed64.(sfixed64_even_proto2) = true]; +} + +message PredefinedBoolRuleProto2 { + optional bool val = 1 [(buf.validate.field).bool.(bool_false_proto2) = true]; +} + +message PredefinedStringRuleProto2 { + optional string val = 1 [(buf.validate.field).string.(string_valid_path_proto2) = true]; +} + +message PredefinedBytesRuleProto2 { + optional bytes val = 1 [(buf.validate.field).bytes.(bytes_valid_path_proto2) = true]; +} + +message PredefinedEnumRuleProto2 { + enum EnumProto2 { + ENUM_PROTO2_ZERO_UNSPECIFIED = 0; + ENUM_PROTO2_ONE = 1; + } + optional EnumProto2 val = 1 [(buf.validate.field).enum.(enum_non_zero_proto2) = true]; +} + +message PredefinedRepeatedRuleProto2 { + repeated uint64 val = 1 [(buf.validate.field).repeated.(repeated_at_least_five_proto2) = true]; +} + +message PredefinedDurationRuleProto2 { + optional google.protobuf.Duration val = 1 [(buf.validate.field).duration.(duration_too_long_proto2) = true]; +} + +message PredefinedTimestampRuleProto2 { + optional google.protobuf.Timestamp val = 1 [(buf.validate.field).timestamp.(timestamp_in_range_proto2) = true]; +} + +message PredefinedWrappedFloatRuleProto2 { + optional google.protobuf.FloatValue val = 1 [(buf.validate.field).float.(float_abs_range_proto2) = 1.0]; +} + +message PredefinedWrappedDoubleRuleProto2 { + optional google.protobuf.DoubleValue val = 1 [(buf.validate.field).double.(double_abs_range_proto2) = 1.0]; +} + +message PredefinedWrappedInt32RuleProto2 { + optional google.protobuf.Int32Value val = 1 [(buf.validate.field).int32.(int32_abs_in_proto2) = -2]; +} + +message PredefinedWrappedInt64RuleProto2 { + optional google.protobuf.Int64Value val = 1 [(buf.validate.field).int64.(int64_abs_in_proto2) = {value: -2}]; +} + +message PredefinedWrappedUInt32RuleProto2 { + optional google.protobuf.UInt32Value val = 1 [(buf.validate.field).uint32.(uint32_even_proto2) = true]; +} + +message PredefinedWrappedUInt64RuleProto2 { + optional google.protobuf.UInt64Value val = 1 [(buf.validate.field).uint64.(uint64_even_proto2) = true]; +} + +message PredefinedWrappedBoolRuleProto2 { + optional google.protobuf.BoolValue val = 1 [(buf.validate.field).bool.(bool_false_proto2) = true]; +} + +message PredefinedWrappedStringRuleProto2 { + optional google.protobuf.StringValue val = 1 [(buf.validate.field).string.(string_valid_path_proto2) = true]; +} + +message PredefinedWrappedBytesRuleProto2 { + optional google.protobuf.BytesValue val = 1 [(buf.validate.field).bytes.(bytes_valid_path_proto2) = true]; +} + +message PredefinedRepeatedWrappedFloatRuleProto2 { + repeated google.protobuf.FloatValue val = 1 [(buf.validate.field).repeated.items.float.(float_abs_range_proto2) = 1.0]; +} + +message PredefinedRepeatedWrappedDoubleRuleProto2 { + repeated google.protobuf.DoubleValue val = 1 [(buf.validate.field).repeated.items.double.(double_abs_range_proto2) = 1.0]; +} + +message PredefinedRepeatedWrappedInt32RuleProto2 { + repeated google.protobuf.Int32Value val = 1 [(buf.validate.field).repeated.items.int32.(int32_abs_in_proto2) = -2]; +} + +message PredefinedRepeatedWrappedInt64RuleProto2 { + repeated google.protobuf.Int64Value val = 1 [(buf.validate.field).repeated.items.int64.(int64_abs_in_proto2) = {value: -2}]; +} + +message PredefinedRepeatedWrappedUInt32RuleProto2 { + repeated google.protobuf.UInt32Value val = 1 [(buf.validate.field).repeated.items.uint32.(uint32_even_proto2) = true]; +} + +message PredefinedRepeatedWrappedUInt64RuleProto2 { + repeated google.protobuf.UInt64Value val = 1 [(buf.validate.field).repeated.items.uint64.(uint64_even_proto2) = true]; +} + +message PredefinedRepeatedWrappedBoolRuleProto2 { + repeated google.protobuf.BoolValue val = 1 [(buf.validate.field).repeated.items.bool.(bool_false_proto2) = true]; +} + +message PredefinedRepeatedWrappedStringRuleProto2 { + repeated google.protobuf.StringValue val = 1 [(buf.validate.field).repeated.items.string.(string_valid_path_proto2) = true]; +} + +message PredefinedRepeatedWrappedBytesRuleProto2 { + repeated google.protobuf.BytesValue val = 1 [(buf.validate.field).repeated.items.bytes.(bytes_valid_path_proto2) = true]; +} + +message PredefinedAndCustomRuleProto2 { + optional sint32 a = 1 [ + (field).cel = { + id: "predefined_and_custom_rule_scalar_proto2" + expression: "this > 24 ? '' : 'a must be greater than 24'" + }, + (field).sint32.(sint32_even_proto2) = true + ]; + + optional Nested b = 2 [(field).cel = { + id: "predefined_and_custom_rule_embedded_proto2" + message: "b.c must be a multiple of 3" + expression: "this.c % 3 == 0" + }]; + + message Nested { + optional sint32 c = 1 [ + (field).cel = { + id: "predefined_and_custom_rule_nested_proto2" + expression: "this > 0 ? '' : 'c must be positive'" + }, + (field).sint32.(sint32_even_proto2) = true + ]; + } +} + +message StandardPredefinedAndCustomRuleProto2 { + optional sint32 a = 1 [ + (field).sint32.lt = 28, + (field).sint32.(sint32_even_proto2) = true, + (field).cel = { + id: "standard_predefined_and_custom_rule_scalar_proto2" + expression: "this > 24 ? '' : 'a must be greater than 24'" + } + ]; +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/predefined_rules_proto3.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/predefined_rules_proto3.proto new file mode 100644 index 00000000..12a065dc --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/predefined_rules_proto3.proto @@ -0,0 +1,224 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package buf.validate.conformance.cases; + +import "buf/validate/conformance/cases/predefined_rules_proto2.proto"; +import "buf/validate/conformance/cases/predefined_rules_proto_editions.proto"; +import "buf/validate/validate.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +message PredefinedFloatRuleProto3 { + float val = 1 [(buf.validate.field).float.(float_abs_range_proto2) = 1.0]; +} + +message PredefinedDoubleRuleProto3 { + double val = 1 [(buf.validate.field).double.(double_abs_range_proto2) = 1.0]; +} + +message PredefinedInt32RuleProto3 { + int32 val = 1 [(buf.validate.field).int32.(int32_abs_in_proto2) = -2]; +} + +message PredefinedInt64RuleProto3 { + int64 val = 1 [(buf.validate.field).int64.(int64_abs_in_edition_2023) = {value: -2}]; +} + +message PredefinedUInt32RuleProto3 { + uint32 val = 1 [(buf.validate.field).uint32.(uint32_even_proto2) = true]; +} + +message PredefinedUInt64RuleProto3 { + uint64 val = 1 [(buf.validate.field).uint64.(uint64_even_proto2) = true]; +} + +message PredefinedSInt32RuleProto3 { + sint32 val = 1 [(buf.validate.field).sint32.(sint32_even_proto2) = true]; +} + +message PredefinedSInt64RuleProto3 { + sint64 val = 1 [(buf.validate.field).sint64.(sint64_even_proto2) = true]; +} + +message PredefinedFixed32RuleProto3 { + fixed32 val = 1 [(buf.validate.field).fixed32.(fixed32_even_proto2) = true]; +} + +message PredefinedFixed64RuleProto3 { + fixed64 val = 1 [(buf.validate.field).fixed64.(fixed64_even_proto2) = true]; +} + +message PredefinedSFixed32RuleProto3 { + sfixed32 val = 1 [(buf.validate.field).sfixed32.(sfixed32_even_proto2) = true]; +} + +message PredefinedSFixed64RuleProto3 { + sfixed64 val = 1 [(buf.validate.field).sfixed64.(sfixed64_even_proto2) = true]; +} + +message PredefinedBoolRuleProto3 { + bool val = 1 [(buf.validate.field).bool.(bool_false_proto2) = true]; +} + +message PredefinedStringRuleProto3 { + string val = 1 [(buf.validate.field).string.(string_valid_path_proto2) = true]; +} + +message PredefinedBytesRuleProto3 { + bytes val = 1 [(buf.validate.field).bytes.(bytes_valid_path_proto2) = true]; +} + +message PredefinedEnumRuleProto3 { + enum EnumProto3 { + ENUM_PROTO3_ZERO_UNSPECIFIED = 0; + ENUM_PROTO3_ONE = 1; + } + EnumProto3 val = 1 [(buf.validate.field).enum.(enum_non_zero_proto2) = true]; +} + +message PredefinedMapRuleProto3 { + map val = 1 [(buf.validate.field).map.(map_at_least_five_edition_2023) = true]; +} + +message PredefinedRepeatedRuleProto3 { + repeated uint64 val = 1 [(buf.validate.field).repeated.(repeated_at_least_five_proto2) = true]; +} + +message PredefinedDurationRuleProto3 { + google.protobuf.Duration val = 1 [(buf.validate.field).duration.(duration_too_long_proto2) = true]; +} + +message PredefinedTimestampRuleProto3 { + google.protobuf.Timestamp val = 1 [(buf.validate.field).timestamp.(timestamp_in_range_proto2) = true]; +} + +message PredefinedWrappedFloatRuleProto3 { + google.protobuf.FloatValue val = 1 [(buf.validate.field).float.(float_abs_range_proto2) = 1.0]; +} + +message PredefinedWrappedDoubleRuleProto3 { + google.protobuf.DoubleValue val = 1 [(buf.validate.field).double.(double_abs_range_proto2) = 1.0]; +} + +message PredefinedWrappedInt32RuleProto3 { + google.protobuf.Int32Value val = 1 [(buf.validate.field).int32.(int32_abs_in_proto2) = -2]; +} + +message PredefinedWrappedInt64RuleProto3 { + google.protobuf.Int64Value val = 1 [(buf.validate.field).int64.(int64_abs_in_proto2) = {value: -2}]; +} + +message PredefinedWrappedUInt32RuleProto3 { + google.protobuf.UInt32Value val = 1 [(buf.validate.field).uint32.(uint32_even_proto2) = true]; +} + +message PredefinedWrappedUInt64RuleProto3 { + google.protobuf.UInt64Value val = 1 [(buf.validate.field).uint64.(uint64_even_proto2) = true]; +} + +message PredefinedWrappedBoolRuleProto3 { + google.protobuf.BoolValue val = 1 [(buf.validate.field).bool.(bool_false_proto2) = true]; +} + +message PredefinedWrappedStringRuleProto3 { + google.protobuf.StringValue val = 1 [(buf.validate.field).string.(string_valid_path_proto2) = true]; +} + +message PredefinedWrappedBytesRuleProto3 { + google.protobuf.BytesValue val = 1 [(buf.validate.field).bytes.(bytes_valid_path_proto2) = true]; +} + +message PredefinedRepeatedWrappedFloatRuleProto3 { + repeated google.protobuf.FloatValue val = 1 [(buf.validate.field).repeated.items.float.(float_abs_range_proto2) = 1.0]; +} + +message PredefinedRepeatedWrappedDoubleRuleProto3 { + repeated google.protobuf.DoubleValue val = 1 [(buf.validate.field).repeated.items.double.(double_abs_range_proto2) = 1.0]; +} + +message PredefinedRepeatedWrappedInt32RuleProto3 { + repeated google.protobuf.Int32Value val = 1 [(buf.validate.field).repeated.items.int32.(int32_abs_in_proto2) = -2]; +} + +message PredefinedRepeatedWrappedInt64RuleProto3 { + repeated google.protobuf.Int64Value val = 1 [(buf.validate.field).repeated.items.int64.(int64_abs_in_proto2) = {value: -2}]; +} + +message PredefinedRepeatedWrappedUInt32RuleProto3 { + repeated google.protobuf.UInt32Value val = 1 [(buf.validate.field).repeated.items.uint32.(uint32_even_proto2) = true]; +} + +message PredefinedRepeatedWrappedUInt64RuleProto3 { + repeated google.protobuf.UInt64Value val = 1 [(buf.validate.field).repeated.items.uint64.(uint64_even_proto2) = true]; +} + +message PredefinedRepeatedWrappedBoolRuleProto3 { + repeated google.protobuf.BoolValue val = 1 [(buf.validate.field).repeated.items.bool.(bool_false_proto2) = true]; +} + +message PredefinedRepeatedWrappedStringRuleProto3 { + repeated google.protobuf.StringValue val = 1 [(buf.validate.field).repeated.items.string.(string_valid_path_proto2) = true]; +} + +message PredefinedRepeatedWrappedBytesRuleProto3 { + repeated google.protobuf.BytesValue val = 1 [(buf.validate.field).repeated.items.bytes.(bytes_valid_path_proto2) = true]; +} + +message PredefinedAndCustomRuleProto3 { + sint32 a = 1 [ + (field).cel = { + id: "predefined_and_custom_rule_scalar_proto3" + expression: "this > 24 ? '' : 'a must be greater than 24'" + }, + (field).sint32.(sint32_even_edition_2023) = true + ]; + + optional Nested b = 2 [(field).cel = { + id: "predefined_and_custom_rule_embedded_proto3" + message: "b.c must be a multiple of 3" + expression: "this.c % 3 == 0" + }]; + + message Nested { + sint32 c = 1 [ + (field).cel = { + id: "predefined_and_custom_rule_nested_proto3" + expression: "this > 0 ? '' : 'c must be positive'" + }, + (field).sint32.(sint32_even_edition_2023) = true + ]; + } +} + +message StandardPredefinedAndCustomRuleProto3 { + sint32 a = 1 [ + (field).sint32.lt = 28, + (field).sint32.(sint32_even_proto2) = true, + (field).cel = { + id: "standard_predefined_and_custom_rule_scalar_proto3" + expression: "this > 24 ? '' : 'a must be greater than 24'" + } + ]; +} + +// This is a workaround for https://github.com/bufbuild/buf/issues/3306. +// TODO(jchadwick-buf): Remove this when bufbuild/buf#3306 is fixed. +message PredefinedRulesProto3UnusedImportBugWorkaround { + StandardPredefinedAndCustomRuleProto2 dummy_1 = 1; + StandardPredefinedAndCustomRuleEdition2023 dummy_2 = 2; +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/predefined_rules_proto_editions.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/predefined_rules_proto_editions.proto new file mode 100644 index 00000000..a3788307 --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/predefined_rules_proto_editions.proto @@ -0,0 +1,373 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +edition = "2023"; + +package buf.validate.conformance.cases; + +import "buf/validate/validate.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +extend buf.validate.FloatRules { + float float_abs_range_edition_2023 = 1162 [(buf.validate.predefined).cel = { + id: "float.abs_range.edition_2023" + expression: "this >= -rule && this <= rule" + message: "float value is out of range" + }]; +} + +extend buf.validate.DoubleRules { + double double_abs_range_edition_2023 = 1162 [(buf.validate.predefined).cel = { + id: "double.abs_range.edition_2023" + expression: "this >= -rule && this <= rule" + message: "double value is out of range" + }]; +} + +extend buf.validate.Int32Rules { + repeated int32 int32_abs_in_edition_2023 = 1162 [(buf.validate.predefined).cel = { + id: "int32.abs_in.edition_2023" + expression: "this in rule || this in rule.map(n, -n)" + message: "must be in absolute value of list" + }]; +} + +extend buf.validate.Int64Rules { + repeated google.protobuf.Int64Value int64_abs_in_edition_2023 = 1162 [(buf.validate.predefined).cel = { + id: "int64.abs_in.edition_2023" + expression: "this in rule || this in rule.map(n, -n)" + message: "must be in absolute value of list" + }]; +} + +extend buf.validate.UInt32Rules { + bool uint32_even_edition_2023 = 1162 [(buf.validate.predefined).cel = { + id: "uint32.even.edition_2023" + expression: "this % 2u == 0u" + message: "uint32 value is not even" + }]; +} + +extend buf.validate.UInt64Rules { + bool uint64_even_edition_2023 = 1162 [(buf.validate.predefined).cel = { + id: "uint64.even.edition_2023" + expression: "this % 2u == 0u" + message: "uint64 value is not even" + }]; +} + +extend buf.validate.SInt32Rules { + bool sint32_even_edition_2023 = 1162 [(buf.validate.predefined).cel = { + id: "sint32.even.edition_2023" + expression: "this % 2 == 0" + message: "sint32 value is not even" + }]; +} + +extend buf.validate.SInt64Rules { + bool sint64_even_edition_2023 = 1162 [(buf.validate.predefined).cel = { + id: "sint64.even.edition_2023" + expression: "this % 2 == 0" + message: "sint64 value is not even" + }]; +} + +extend buf.validate.Fixed32Rules { + bool fixed32_even_edition_2023 = 1162 [(buf.validate.predefined).cel = { + id: "fixed32.even.edition_2023" + expression: "this % 2u == 0u" + message: "fixed32 value is not even" + }]; +} + +extend buf.validate.Fixed64Rules { + bool fixed64_even_edition_2023 = 1162 [(buf.validate.predefined).cel = { + id: "fixed64.even.edition_2023" + expression: "this % 2u == 0u" + message: "fixed64 value is not even" + }]; +} + +extend buf.validate.SFixed32Rules { + bool sfixed32_even_edition_2023 = 1162 [(buf.validate.predefined).cel = { + id: "sfixed32.even.edition_2023" + expression: "this % 2 == 0" + message: "sfixed32 value is not even" + }]; +} + +extend buf.validate.SFixed64Rules { + bool sfixed64_even_edition_2023 = 1162 [(buf.validate.predefined).cel = { + id: "sfixed64.even.edition_2023" + expression: "this % 2 == 0" + message: "sfixed64 value is not even" + }]; +} + +extend buf.validate.BoolRules { + bool bool_false_edition_2023 = 1162 [(buf.validate.predefined).cel = { + id: "bool.false.edition_2023" + expression: "this == false" + message: "bool value is not false" + }]; +} + +extend buf.validate.StringRules { + bool string_valid_path_edition_2023 = 1162 [(buf.validate.predefined).cel = { + id: "string.valid_path.edition_2023" + expression: "!this.matches('^([^/.][^/]?|[^/][^/.]|[^/]{3,})(/([^/.][^/]?|[^/][^/.]|[^/]{3,}))*$') ? 'not a valid path: `%s`'.format([this]) : ''" + }]; +} + +extend buf.validate.BytesRules { + bool bytes_valid_path_edition_2023 = 1162 [(buf.validate.predefined).cel = { + id: "bytes.valid_path.edition_2023" + expression: "!string(this).matches('^([^/.][^/]?|[^/][^/.]|[^/]{3,})(/([^/.][^/]?|[^/][^/.]|[^/]{3,}))*$') ? 'not a valid path: `%s`'.format([this]) : ''" + }]; +} + +extend buf.validate.EnumRules { + bool enum_non_zero_edition_2023 = 1162 [(buf.validate.predefined).cel = { + id: "enum.non_zero.edition_2023" + expression: "int(this) != 0" + message: "enum value is not non-zero" + }]; +} + +extend buf.validate.RepeatedRules { + bool repeated_at_least_five_edition_2023 = 1162 [(predefined).cel = { + id: "repeated.at_least_five.edition_2023" + expression: "uint(this.size()) >= 5u" + message: "repeated field must have at least five values" + }]; +} + +extend buf.validate.MapRules { + bool map_at_least_five_edition_2023 = 1162 [(predefined).cel = { + id: "map.at_least_five.edition_2023" + expression: "uint(this.size()) >= 5u" + message: "map must have at least five pairs" + }]; +} + +extend buf.validate.DurationRules { + bool duration_too_long_edition_2023 = 1162 [(predefined).cel = { + id: "duration.too_long.edition_2023" + expression: "this <= duration('10s')" + message: "duration can't be longer than 10 seconds" + }]; +} + +extend buf.validate.TimestampRules { + bool timestamp_in_range_edition_2023 = 1162 [(predefined).cel = { + id: "timestamp.time_range.edition_2023" + expression: "int(this) >= 1049587200 && int(this) <= 1080432000" + message: "timestamp out of range" + }]; +} + +message PredefinedFloatRuleEdition2023 { + float val = 1 [(buf.validate.field).float.(float_abs_range_edition_2023) = 1.0]; +} + +message PredefinedDoubleRuleEdition2023 { + double val = 1 [(buf.validate.field).double.(double_abs_range_edition_2023) = 1.0]; +} + +message PredefinedInt32RuleEdition2023 { + int32 val = 1 [(buf.validate.field).int32.(int32_abs_in_edition_2023) = -2]; +} + +message PredefinedInt64RuleEdition2023 { + int64 val = 1 [(buf.validate.field).int64.(int64_abs_in_edition_2023) = {value: -2}]; +} + +message PredefinedUInt32RuleEdition2023 { + uint32 val = 1 [(buf.validate.field).uint32.(uint32_even_edition_2023) = true]; +} + +message PredefinedUInt64RuleEdition2023 { + uint64 val = 1 [(buf.validate.field).uint64.(uint64_even_edition_2023) = true]; +} + +message PredefinedSInt32RuleEdition2023 { + sint32 val = 1 [(buf.validate.field).sint32.(sint32_even_edition_2023) = true]; +} + +message PredefinedSInt64RuleEdition2023 { + sint64 val = 1 [(buf.validate.field).sint64.(sint64_even_edition_2023) = true]; +} + +message PredefinedFixed32RuleEdition2023 { + fixed32 val = 1 [(buf.validate.field).fixed32.(fixed32_even_edition_2023) = true]; +} + +message PredefinedFixed64RuleEdition2023 { + fixed64 val = 1 [(buf.validate.field).fixed64.(fixed64_even_edition_2023) = true]; +} + +message PredefinedSFixed32RuleEdition2023 { + sfixed32 val = 1 [(buf.validate.field).sfixed32.(sfixed32_even_edition_2023) = true]; +} + +message PredefinedSFixed64RuleEdition2023 { + sfixed64 val = 1 [(buf.validate.field).sfixed64.(sfixed64_even_edition_2023) = true]; +} + +message PredefinedBoolRuleEdition2023 { + bool val = 1 [(buf.validate.field).bool.(bool_false_edition_2023) = true]; +} + +message PredefinedStringRuleEdition2023 { + string val = 1 [(buf.validate.field).string.(string_valid_path_edition_2023) = true]; +} + +message PredefinedBytesRuleEdition2023 { + bytes val = 1 [(buf.validate.field).bytes.(bytes_valid_path_edition_2023) = true]; +} + +message PredefinedEnumRuleEdition2023 { + enum EnumEdition2023 { + ENUM_EDITION2023_ZERO_UNSPECIFIED = 0; + ENUM_EDITION2023_ONE = 1; + } + EnumEdition2023 val = 1 [(buf.validate.field).enum.(enum_non_zero_edition_2023) = true]; +} + +message PredefinedRepeatedRuleEdition2023 { + repeated uint64 val = 1 [(buf.validate.field).repeated.(repeated_at_least_five_edition_2023) = true]; +} + +message PredefinedMapRuleEdition2023 { + map val = 1 [(buf.validate.field).map.(map_at_least_five_edition_2023) = true]; +} + +message PredefinedDurationRuleEdition2023 { + google.protobuf.Duration val = 1 [(buf.validate.field).duration.(duration_too_long_edition_2023) = true]; +} + +message PredefinedTimestampRuleEdition2023 { + google.protobuf.Timestamp val = 1 [(buf.validate.field).timestamp.(timestamp_in_range_edition_2023) = true]; +} + +message PredefinedWrappedFloatRuleEdition2023 { + google.protobuf.FloatValue val = 1 [(buf.validate.field).float.(float_abs_range_edition_2023) = 1.0]; +} + +message PredefinedWrappedDoubleRuleEdition2023 { + google.protobuf.DoubleValue val = 1 [(buf.validate.field).double.(double_abs_range_edition_2023) = 1.0]; +} + +message PredefinedWrappedInt32RuleEdition2023 { + google.protobuf.Int32Value val = 1 [(buf.validate.field).int32.(int32_abs_in_edition_2023) = -2]; +} + +message PredefinedWrappedInt64RuleEdition2023 { + google.protobuf.Int64Value val = 1 [(buf.validate.field).int64.(int64_abs_in_edition_2023) = {value: -2}]; +} + +message PredefinedWrappedUInt32RuleEdition2023 { + google.protobuf.UInt32Value val = 1 [(buf.validate.field).uint32.(uint32_even_edition_2023) = true]; +} + +message PredefinedWrappedUInt64RuleEdition2023 { + google.protobuf.UInt64Value val = 1 [(buf.validate.field).uint64.(uint64_even_edition_2023) = true]; +} + +message PredefinedWrappedBoolRuleEdition2023 { + google.protobuf.BoolValue val = 1 [(buf.validate.field).bool.(bool_false_edition_2023) = true]; +} + +message PredefinedWrappedStringRuleEdition2023 { + google.protobuf.StringValue val = 1 [(buf.validate.field).string.(string_valid_path_edition_2023) = true]; +} + +message PredefinedWrappedBytesRuleEdition2023 { + google.protobuf.BytesValue val = 1 [(buf.validate.field).bytes.(bytes_valid_path_edition_2023) = true]; +} + +message PredefinedRepeatedWrappedFloatRuleEdition2023 { + repeated google.protobuf.FloatValue val = 1 [(buf.validate.field).repeated.items.float.(float_abs_range_edition_2023) = 1.0]; +} + +message PredefinedRepeatedWrappedDoubleRuleEdition2023 { + repeated google.protobuf.DoubleValue val = 1 [(buf.validate.field).repeated.items.double.(double_abs_range_edition_2023) = 1.0]; +} + +message PredefinedRepeatedWrappedInt32RuleEdition2023 { + repeated google.protobuf.Int32Value val = 1 [(buf.validate.field).repeated.items.int32.(int32_abs_in_edition_2023) = -2]; +} + +message PredefinedRepeatedWrappedInt64RuleEdition2023 { + repeated google.protobuf.Int64Value val = 1 [(buf.validate.field).repeated.items.int64.(int64_abs_in_edition_2023) = {value: -2}]; +} + +message PredefinedRepeatedWrappedUInt32RuleEdition2023 { + repeated google.protobuf.UInt32Value val = 1 [(buf.validate.field).repeated.items.uint32.(uint32_even_edition_2023) = true]; +} + +message PredefinedRepeatedWrappedUInt64RuleEdition2023 { + repeated google.protobuf.UInt64Value val = 1 [(buf.validate.field).repeated.items.uint64.(uint64_even_edition_2023) = true]; +} + +message PredefinedRepeatedWrappedBoolRuleEdition2023 { + repeated google.protobuf.BoolValue val = 1 [(buf.validate.field).repeated.items.bool.(bool_false_edition_2023) = true]; +} + +message PredefinedRepeatedWrappedStringRuleEdition2023 { + repeated google.protobuf.StringValue val = 1 [(buf.validate.field).repeated.items.string.(string_valid_path_edition_2023) = true]; +} + +message PredefinedRepeatedWrappedBytesRuleEdition2023 { + repeated google.protobuf.BytesValue val = 1 [(buf.validate.field).repeated.items.bytes.(bytes_valid_path_edition_2023) = true]; +} + +message PredefinedAndCustomRuleEdition2023 { + sint32 a = 1 [ + (field).cel = { + id: "predefined_and_custom_rule_scalar_edition_2023" + expression: "this > 24 ? '' : 'a must be greater than 24'" + }, + (field).sint32.(sint32_even_edition_2023) = true + ]; + + Nested b = 2 [(field).cel = { + id: "predefined_and_custom_rule_embedded_edition_2023" + message: "b.c must be a multiple of 3" + expression: "this.c % 3 == 0" + }]; + + message Nested { + sint32 c = 1 [ + (field).cel = { + id: "predefined_and_custom_rule_nested_edition_2023" + expression: "this > 0 ? '' : 'c must be positive'" + }, + (field).sint32.(sint32_even_edition_2023) = true + ]; + } +} + +message StandardPredefinedAndCustomRuleEdition2023 { + sint32 a = 1 [ + (field).sint32.lt = 28, + (field).sint32.(sint32_even_edition_2023) = true, + (field).cel = { + id: "standard_predefined_and_custom_rule_scalar_edition_2023" + expression: "this > 24 ? '' : 'a must be greater than 24'" + } + ]; +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/repeated.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/repeated.proto new file mode 100644 index 00000000..77876a26 --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/repeated.proto @@ -0,0 +1,166 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package buf.validate.conformance.cases; + +import "buf/validate/conformance/cases/other_package/embed.proto"; +import "buf/validate/validate.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; + +message Embed { + int64 val = 1 [(buf.validate.field).int64.gt = 0]; +} +enum AnEnum { + AN_ENUM_UNSPECIFIED = 0; + AN_ENUM_X = 1; + AN_ENUM_Y = 2; +} + +message RepeatedNone { + repeated int64 val = 1; +} +message RepeatedEmbedNone { + repeated Embed val = 1; +} +message RepeatedEmbedCrossPackageNone { + repeated other_package.Embed val = 1; +} +message RepeatedMin { + repeated Embed val = 1 [(buf.validate.field).repeated.min_items = 2]; +} +message RepeatedMax { + repeated double val = 1 [(buf.validate.field).repeated.max_items = 3]; +} +message RepeatedMinMax { + repeated sfixed32 val = 1 [(buf.validate.field).repeated = { + min_items: 2 + max_items: 4 + }]; +} +message RepeatedExact { + repeated uint32 val = 1 [(buf.validate.field).repeated = { + min_items: 3 + max_items: 3 + }]; +} +message RepeatedUnique { + repeated string val = 1 [(buf.validate.field).repeated.unique = true]; +} +message RepeatedNotUnique { + repeated string val = 1 [(buf.validate.field).repeated.unique = false]; +} +message RepeatedMultipleUnique { + repeated string a = 1 [(buf.validate.field).repeated.unique = true]; + repeated int32 b = 2 [(buf.validate.field).repeated.unique = true]; +} +message RepeatedItemRule { + repeated float val = 1 [(buf.validate.field).repeated.items.float.gt = 0]; +} +message RepeatedItemPattern { + repeated string val = 1 [(buf.validate.field).repeated.items.string.pattern = "(?i)^[a-z0-9]+$"]; +} +message RepeatedEmbedSkip { + repeated Embed val = 1 [(buf.validate.field).repeated.items.ignore = IGNORE_ALWAYS]; +} +message RepeatedItemIn { + repeated string val = 1 [(buf.validate.field).repeated.items.string = { + in: [ + "foo", + "bar" + ] + }]; +} +message RepeatedItemNotIn { + repeated string val = 1 [(buf.validate.field).repeated.items.string = { + not_in: [ + "foo", + "bar" + ] + }]; +} +message RepeatedEnumIn { + repeated AnEnum val = 1 [(buf.validate.field).repeated.items.enum = { + in: [0] + }]; +} +message RepeatedEnumNotIn { + repeated AnEnum val = 1 [(buf.validate.field).repeated.items.enum = { + not_in: [0] + }]; +} +message RepeatedEmbeddedEnumIn { + repeated AnotherInEnum val = 1 [(buf.validate.field).repeated.items.enum = { + in: [0] + }]; + enum AnotherInEnum { + ANOTHER_IN_ENUM_UNSPECIFIED = 0; + ANOTHER_IN_ENUM_A = 1; + ANOTHER_IN_ENUM_B = 2; + } +} +message RepeatedEmbeddedEnumNotIn { + repeated AnotherNotInEnum val = 1 [(buf.validate.field).repeated.items.enum = { + not_in: [0] + }]; + enum AnotherNotInEnum { + ANOTHER_NOT_IN_ENUM_UNSPECIFIED = 0; + ANOTHER_NOT_IN_ENUM_A = 1; + ANOTHER_NOT_IN_ENUM_B = 2; + } +} +message RepeatedAnyIn { + repeated google.protobuf.Any val = 1 [(buf.validate.field).repeated.items.any = { + in: ["type.googleapis.com/google.protobuf.Duration"] + }]; +} +message RepeatedAnyNotIn { + repeated google.protobuf.Any val = 1 [(buf.validate.field).repeated.items.any = { + not_in: ["type.googleapis.com/google.protobuf.Timestamp"] + }]; +} +message RepeatedMinAndItemLen { + repeated string val = 1 [(buf.validate.field).repeated = { + items: { + string: {len: 3} + } + min_items: 1 + }]; +} +message RepeatedMinAndMaxItemLen { + repeated string val = 1 [ + (buf.validate.field).repeated.min_items = 1, + (buf.validate.field).repeated.max_items = 3 + ]; +} +message RepeatedDuration { + repeated google.protobuf.Duration val = 1 [(buf.validate.field).repeated = { + items: { + duration: { + gte: {nanos: 1000000} + } + } + }]; +} +message RepeatedExactIgnore { + repeated uint32 val = 1 [ + (buf.validate.field).repeated = { + min_items: 3 + max_items: 3 + }, + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE + ]; +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/required_field_proto2.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/required_field_proto2.proto new file mode 100644 index 00000000..850a539b --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/required_field_proto2.proto @@ -0,0 +1,99 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto2"; + +package buf.validate.conformance.cases; + +import "buf/validate/validate.proto"; + +message RequiredProto2ScalarOptional { + optional string val = 1 [(buf.validate.field).required = true]; +} +message RequiredProto2ScalarOptionalIgnoreAlways { + optional string val = 1 [ + (buf.validate.field).required = true, + (buf.validate.field).ignore = IGNORE_ALWAYS + ]; +} + +message RequiredProto2ScalarOptionalDefault { + optional string val = 1 [ + (buf.validate.field).required = true, + default = "foo" + ]; +} +message RequiredProto2ScalarOptionalDefaultIgnoreAlways { + optional string val = 1 [ + (buf.validate.field).required = true, + default = "foo", + (buf.validate.field).ignore = IGNORE_ALWAYS + ]; +} + +message RequiredProto2ScalarRequired { + required string val = 1 [(buf.validate.field).required = true]; +} + +message RequiredProto2Message { + optional Msg val = 1 [(buf.validate.field).required = true]; + message Msg { + optional string val = 1; + } +} +message RequiredProto2MessageIgnoreAlways { + optional Msg val = 1 [ + (buf.validate.field).required = true, + (buf.validate.field).ignore = IGNORE_ALWAYS + ]; + message Msg { + optional string val = 1; + } +} + +message RequiredProto2Oneof { + oneof val { + string a = 1 [(buf.validate.field).required = true]; + string b = 2; + } +} +message RequiredProto2OneofIgnoreAlways { + oneof val { + string a = 1 [ + (buf.validate.field).required = true, + (buf.validate.field).ignore = IGNORE_ALWAYS + ]; + string b = 2; + } +} + +message RequiredProto2Repeated { + repeated string val = 1 [(buf.validate.field).required = true]; +} +message RequiredProto2RepeatedIgnoreAlways { + repeated string val = 1 [ + (buf.validate.field).required = true, + (buf.validate.field).ignore = IGNORE_ALWAYS + ]; +} + +message RequiredProto2Map { + map val = 1 [(buf.validate.field).required = true]; +} +message RequiredProto2MapIgnoreAlways { + map val = 1 [ + (buf.validate.field).required = true, + (buf.validate.field).ignore = IGNORE_ALWAYS + ]; +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/required_field_proto3.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/required_field_proto3.proto new file mode 100644 index 00000000..b32d2a92 --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/required_field_proto3.proto @@ -0,0 +1,125 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package buf.validate.conformance.cases; + +import "buf/validate/validate.proto"; + +message RequiredProto3Scalar { + string val = 1 [(buf.validate.field).required = true]; +} +message RequiredProto3ScalarIgnoreAlways { + string val = 1 [ + (buf.validate.field).required = true, + (buf.validate.field).ignore = IGNORE_ALWAYS + ]; +} + +message RequiredProto3OptionalScalar { + optional string val = 1 [(buf.validate.field).required = true]; +} +message RequiredProto3OptionalScalarIgnoreAlways { + optional string val = 1 [ + (buf.validate.field).required = true, + (buf.validate.field).ignore = IGNORE_ALWAYS + ]; +} + +message RequiredProto3Message { + Msg val = 1 [(buf.validate.field).required = true]; + message Msg { + string val = 1; + } +} +message RequiredProto3MessageIgnoreAlways { + Msg val = 1 [ + (buf.validate.field).required = true, + (buf.validate.field).ignore = IGNORE_ALWAYS + ]; + message Msg { + string val = 1; + } +} + +message RequiredProto3OneOf { + oneof val { + string a = 1 [(buf.validate.field).required = true]; + string b = 2; + } +} +message RequiredProto3OneOfIgnoreAlways { + oneof val { + string a = 1 [ + (buf.validate.field).required = true, + (buf.validate.field).ignore = IGNORE_ALWAYS + ]; + string b = 2; + } +} + +message RequiredProto3Repeated { + repeated string val = 1 [(buf.validate.field).required = true]; +} +message RequiredProto3RepeatedIgnoreAlways { + repeated string val = 1 [ + (buf.validate.field).required = true, + (buf.validate.field).ignore = IGNORE_ALWAYS + ]; +} + +message RequiredProto3Map { + map val = 1 [(buf.validate.field).required = true]; +} +message RequiredProto3MapIgnoreAlways { + map val = 1 [ + (buf.validate.field).required = true, + (buf.validate.field).ignore = IGNORE_ALWAYS + ]; +} + +message RequiredProto3MapKey { + map val = 1 [(buf.validate.field).map.keys.required = true]; +} + +message RequiredProto3MapValue { + map val = 1 [(buf.validate.field).map.values.required = true]; +} + +message RequiredProto3RepeatedItem { + repeated string val = 1 [(buf.validate.field).repeated.items.required = true]; +} + +message RequiredImplicitProto3Scalar { + string val = 1 [ + (buf.validate.field).required = true, + (buf.validate.field).string.min_len = 1, + (buf.validate.field).string.max_len = 2 + ]; +} +message RequiredImplicitProto3Repeated { + repeated string val = 1 [ + (buf.validate.field).required = true, + (buf.validate.field).repeated.min_items = 1, + (buf.validate.field).repeated.max_items = 2 + ]; +} +message RequiredImplicitProto3Map { + map val = 1 [ + (buf.validate.field).required = true, + (buf.validate.field).map.min_pairs = 1, + (buf.validate.field).map.max_pairs = 2 + ]; +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/required_field_proto_editions.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/required_field_proto_editions.proto new file mode 100644 index 00000000..5e53bee4 --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/required_field_proto_editions.proto @@ -0,0 +1,171 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +edition = "2023"; + +package buf.validate.conformance.cases; + +import "buf/validate/validate.proto"; + +message RequiredEditionsScalarExplicitPresence { + string val = 1 [(buf.validate.field).required = true]; +} +message RequiredEditionsScalarExplicitPresenceIgnoreAlways { + string val = 1 [ + (buf.validate.field).required = true, + (buf.validate.field).ignore = IGNORE_ALWAYS + ]; +} + +message RequiredEditionsScalarExplicitPresenceDefault { + string val = 1 [ + (buf.validate.field).required = true, + default = "foo" + ]; +} +message RequiredEditionsScalarExplicitPresenceDefaultIgnoreAlways { + string val = 1 [ + (buf.validate.field).required = true, + default = "foo", + (buf.validate.field).ignore = IGNORE_ALWAYS + ]; +} + +message RequiredEditionsScalarImplicitPresence { + string val = 1 [ + features.field_presence = IMPLICIT, + (buf.validate.field).required = true + ]; +} +message RequiredEditionsScalarImplicitPresenceIgnoreAlways { + string val = 1 [ + features.field_presence = IMPLICIT, + (buf.validate.field).required = true, + (buf.validate.field).ignore = IGNORE_ALWAYS + ]; +} + +message RequiredEditionsScalarLegacyRequired { + string val = 1 [ + features.field_presence = LEGACY_REQUIRED, + (buf.validate.field).required = true + ]; +} + +message RequiredEditionsMessageExplicitPresence { + Msg val = 1 [(buf.validate.field).required = true]; + message Msg { + string val = 1; + } +} +message RequiredEditionsMessageExplicitPresenceIgnoreAlways { + Msg val = 1 [ + (buf.validate.field).required = true, + (buf.validate.field).ignore = IGNORE_ALWAYS + ]; + message Msg { + string val = 1; + } +} + +message RequiredEditionsMessageExplicitPresenceDelimited { + Msg val = 1 [ + features.message_encoding = DELIMITED, + (buf.validate.field).required = true + ]; + message Msg { + string val = 1; + } +} +message RequiredEditionsMessageExplicitPresenceDelimitedIgnoreAlways { + Msg val = 1 [ + features.message_encoding = DELIMITED, + (buf.validate.field).required = true, + (buf.validate.field).ignore = IGNORE_ALWAYS + ]; + message Msg { + string val = 1; + } +} + +message RequiredEditionsMessageLegacyRequired { + Msg val = 1 [ + features.field_presence = LEGACY_REQUIRED, + (buf.validate.field).required = true + ]; + message Msg { + string val = 1; + } +} + +message RequiredEditionsMessageLegacyRequiredDelimited { + Msg val = 1 [ + features.message_encoding = DELIMITED, + features.field_presence = LEGACY_REQUIRED, + (buf.validate.field).required = true + ]; + message Msg { + string val = 1; + } +} + +message RequiredEditionsOneof { + oneof val { + string a = 1 [(buf.validate.field).required = true]; + string b = 2; + } +} +message RequiredEditionsOneofIgnoreAlways { + oneof val { + string a = 1 [ + (buf.validate.field).required = true, + (buf.validate.field).ignore = IGNORE_ALWAYS + ]; + string b = 2; + } +} + +message RequiredEditionsRepeated { + repeated string val = 1 [(buf.validate.field).required = true]; +} +message RequiredEditionsRepeatedIgnoreAlways { + repeated string val = 1 [ + (buf.validate.field).required = true, + (buf.validate.field).ignore = IGNORE_ALWAYS + ]; +} + +message RequiredEditionsRepeatedExpanded { + repeated string val = 1 [ + features.repeated_field_encoding = EXPANDED, + (buf.validate.field).required = true + ]; +} +message RequiredEditionsRepeatedExpandedIgnoreAlways { + repeated string val = 1 [ + features.repeated_field_encoding = EXPANDED, + (buf.validate.field).required = true, + (buf.validate.field).ignore = IGNORE_ALWAYS + ]; +} + +message RequiredEditionsMap { + map val = 1 [(buf.validate.field).required = true]; +} +message RequiredEditionsMapIgnoreAlways { + map val = 1 [ + (buf.validate.field).required = true, + (buf.validate.field).ignore = IGNORE_ALWAYS + ]; +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/strings.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/strings.proto new file mode 100644 index 00000000..04c20fa9 --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/strings.proto @@ -0,0 +1,269 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package buf.validate.conformance.cases; + +import "buf/validate/validate.proto"; + +message StringNone { + string val = 1; +} +message StringConst { + string val = 1 [(buf.validate.field).string.const = "foo"]; +} +message StringIn { + string val = 1 [(buf.validate.field).string = { + in: [ + "bar", + "baz" + ] + }]; +} +message StringNotIn { + string val = 1 [(buf.validate.field).string = { + not_in: [ + "fizz", + "buzz" + ] + }]; +} +message StringLen { + string val = 1 [(buf.validate.field).string.len = 3]; +} +message StringMinLen { + string val = 1 [(buf.validate.field).string.min_len = 3]; +} +message StringMaxLen { + string val = 1 [(buf.validate.field).string.max_len = 5]; +} +message StringMinMaxLen { + string val = 1 [(buf.validate.field).string = { + min_len: 3 + max_len: 5 + }]; +} +message StringEqualMinMaxLen { + string val = 1 [(buf.validate.field).string = { + min_len: 5 + max_len: 5 + }]; +} +message StringLenBytes { + string val = 1 [(buf.validate.field).string.len_bytes = 4]; +} +message StringMinBytes { + string val = 1 [(buf.validate.field).string.min_bytes = 4]; +} +message StringMaxBytes { + string val = 1 [(buf.validate.field).string.max_bytes = 8]; +} +message StringMinMaxBytes { + string val = 1 [(buf.validate.field).string = { + min_bytes: 4 + max_bytes: 8 + }]; +} +message StringEqualMinMaxBytes { + string val = 1 [(buf.validate.field).string = { + min_bytes: 4 + max_bytes: 4 + }]; +} +message StringPattern { + string val = 1 [(buf.validate.field).string.pattern = "(?i)^[a-z0-9]+$"]; +} +message StringPatternEscapes { + string val = 1 [(buf.validate.field).string.pattern = "\\* \\\\ \\w"]; +} +message StringPrefix { + string val = 1 [(buf.validate.field).string.prefix = "foo"]; +} +message StringContains { + string val = 1 [(buf.validate.field).string.contains = "bar"]; +} +message StringNotContains { + string val = 1 [(buf.validate.field).string.not_contains = "bar"]; +} +message StringSuffix { + string val = 1 [(buf.validate.field).string.suffix = "baz"]; +} +message StringEmail { + string val = 1 [(buf.validate.field).string.email = true]; +} +message StringNotEmail { + string val = 1 [(buf.validate.field).string.email = false]; +} +message StringAddress { + string val = 1 [(buf.validate.field).string.address = true]; +} +message StringNotAddress { + string val = 1 [(buf.validate.field).string.address = false]; +} +message StringHostname { + string val = 1 [(buf.validate.field).string.hostname = true]; +} +message StringNotHostname { + string val = 1 [(buf.validate.field).string.hostname = false]; +} +message StringIP { + string val = 1 [(buf.validate.field).string.ip = true]; +} +message StringNotIP { + string val = 1 [(buf.validate.field).string.ip = false]; +} +message StringIPv4 { + string val = 1 [(buf.validate.field).string.ipv4 = true]; +} +message StringNotIPv4 { + string val = 1 [(buf.validate.field).string.ipv4 = false]; +} +message StringIPv6 { + string val = 1 [(buf.validate.field).string.ipv6 = true]; +} +message StringNotIPv6 { + string val = 1 [(buf.validate.field).string.ipv6 = false]; +} +message StringIPWithPrefixLen { + string val = 1 [(buf.validate.field).string.ip_with_prefixlen = true]; +} +message StringNotIPWithPrefixLen { + string val = 1 [(buf.validate.field).string.ip_with_prefixlen = false]; +} +message StringIPv4WithPrefixLen { + string val = 1 [(buf.validate.field).string.ipv4_with_prefixlen = true]; +} +message StringNotIPv4WithPrefixLen { + string val = 1 [(buf.validate.field).string.ipv4_with_prefixlen = false]; +} +message StringIPv6WithPrefixLen { + string val = 1 [(buf.validate.field).string.ipv6_with_prefixlen = true]; +} +message StringNotIPv6WithPrefixLen { + string val = 1 [(buf.validate.field).string.ipv6_with_prefixlen = false]; +} +message StringIPPrefix { + string val = 1 [(buf.validate.field).string.ip_prefix = true]; +} +message StringNotIPPrefix { + string val = 1 [(buf.validate.field).string.ip_prefix = false]; +} +message StringIPv4Prefix { + string val = 1 [(buf.validate.field).string.ipv4_prefix = true]; +} +message StringNotIPv4Prefix { + string val = 1 [(buf.validate.field).string.ipv4_prefix = false]; +} +message StringIPv6Prefix { + string val = 1 [(buf.validate.field).string.ipv6_prefix = true]; +} +message StringNotIPv6Prefix { + string val = 1 [(buf.validate.field).string.ipv6_prefix = false]; +} +message StringURI { + string val = 1 [(buf.validate.field).string.uri = true]; +} +message StringNotURI { + string val = 1 [(buf.validate.field).string.uri = false]; +} +message StringURIRef { + string val = 1 [(buf.validate.field).string.uri_ref = true]; +} +message StringNotURIRef { + string val = 1 [(buf.validate.field).string.uri_ref = false]; +} +message StringUUID { + string val = 1 [(buf.validate.field).string.uuid = true]; +} +message StringNotUUID { + string val = 1 [(buf.validate.field).string.uuid = false]; +} +message StringTUUID { + string val = 1 [(buf.validate.field).string.tuuid = true]; +} +message StringNotTUUID { + string val = 1 [(buf.validate.field).string.tuuid = false]; +} +message StringULID { + string val = 1 [(buf.validate.field).string.ulid = true]; +} +message StringNotULID { + string val = 1 [(buf.validate.field).string.ulid = false]; +} +message StringULIDIgnore { + string val = 1 [ + (buf.validate.field).string = {ulid: true}, + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE + ]; +} +message StringHttpHeaderName { + string val = 1 [(buf.validate.field).string.well_known_regex = KNOWN_REGEX_HTTP_HEADER_NAME]; +} +message StringHttpHeaderValue { + string val = 1 [(buf.validate.field).string.well_known_regex = KNOWN_REGEX_HTTP_HEADER_VALUE]; +} + +message StringHttpHeaderNameLoose { + string val = 1 [(buf.validate.field).string = { + well_known_regex: KNOWN_REGEX_HTTP_HEADER_NAME + strict: false + }]; +} + +message StringHttpHeaderValueLoose { + string val = 1 [(buf.validate.field).string = { + well_known_regex: KNOWN_REGEX_HTTP_HEADER_VALUE + strict: false + }]; +} + +message StringUUIDIgnore { + string val = 1 [ + (buf.validate.field).string = {uuid: true}, + (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE + ]; +} +message StringInOneof { + oneof foo { + string bar = 1 [(buf.validate.field).string = { + in: "a" + in: "b" + }]; + } +} + +message StringHostAndPort { + string val = 1 [(buf.validate.field).string.host_and_port = true]; +} + +message StringHostAndOptionalPort { + string val = 1 [(field).cel = { + id: "string.host_and_port.optional_port" + message: "value must be a host and (optional) port pair" + expression: "this.isHostAndPort(false)" + }]; +} + +message StringProtobufFQN { + string val = 1 [(buf.validate.field).string.protobuf_fqn = true]; +} + +message StringProtobufDotFQN { + string val = 1 [(buf.validate.field).string.protobuf_dot_fqn = true]; +} + +message StringExample { + string val = 1 [(buf.validate.field).string.example = "foo"]; +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/subdirectory/in_subdirectory.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/subdirectory/in_subdirectory.proto new file mode 100644 index 00000000..de2fd2a0 --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/subdirectory/in_subdirectory.proto @@ -0,0 +1,19 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package buf.validate.conformance.cases.subdirectory; + +import "buf/validate/validate.proto"; diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/wkt_any.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/wkt_any.proto new file mode 100644 index 00000000..5fa6c65b --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/wkt_any.proto @@ -0,0 +1,65 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package buf.validate.conformance.cases; + +import "buf/validate/validate.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +message AnyNone { + google.protobuf.Any val = 1; +} +message AnyRequired { + google.protobuf.Any val = 1 [(buf.validate.field).required = true]; +} +message AnyIn { + google.protobuf.Any val = 1 [(buf.validate.field).any = { + in: ["type.googleapis.com/google.protobuf.Duration"] + }]; +} +message AnyNotIn { + google.protobuf.Any val = 1 [(buf.validate.field).any = { + not_in: ["type.googleapis.com/google.protobuf.Timestamp"] + }]; +} + +// The below messages should throw compilation errors due to incorrect types. +message AnyWrongTypeScalar { + string val = 1 [(buf.validate.field).any = { + not_in: ["type.googleapis.com/google.protobuf.Timestamp"] + }]; +} +message AnyWrongTypeMessage { + message WrongType { + int32 val = 1; + } + WrongType val = 1 [(buf.validate.field).any = { + not_in: ["type.googleapis.com/google.protobuf.Timestamp"] + }]; +} +message AnyWrongTypeWrapper { + google.protobuf.Int32Value val = 1 [(buf.validate.field).any = { + not_in: ["type.googleapis.com/google.protobuf.Timestamp"] + }]; +} + +message AnyWrongTypeWKT { + google.protobuf.Timestamp val = 1 [(buf.validate.field).any = { + not_in: ["type.googleapis.com/google.protobuf.Timestamp"] + }]; +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/wkt_duration.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/wkt_duration.proto new file mode 100644 index 00000000..b9816ea7 --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/wkt_duration.proto @@ -0,0 +1,116 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package buf.validate.conformance.cases; + +import "buf/validate/validate.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +message DurationNone { + google.protobuf.Duration val = 1; +} + +message DurationRequired { + google.protobuf.Duration val = 1 [(buf.validate.field).required = true]; +} + +message DurationConst { + google.protobuf.Duration val = 1 [(buf.validate.field).duration.const = {seconds: 3}]; +} + +message DurationIn { + google.protobuf.Duration val = 1 [(buf.validate.field).duration = { + in: [ + {seconds: 1}, + {nanos: 1000}] + }]; +} +message DurationNotIn { + google.protobuf.Duration val = 1 [(buf.validate.field).duration = { + not_in: [ + {}] + }]; +} + +message DurationLT { + google.protobuf.Duration val = 1 [(buf.validate.field).duration.lt = {}]; +} +message DurationLTE { + google.protobuf.Duration val = 1 [(buf.validate.field).duration.lte = {seconds: 1}]; +} +message DurationGT { + google.protobuf.Duration val = 1 [(buf.validate.field).duration.gt = {nanos: 1000}]; +} +message DurationGTE { + google.protobuf.Duration val = 1 [(buf.validate.field).duration.gte = {nanos: 1000000}]; +} +message DurationGTLT { + google.protobuf.Duration val = 1 [(buf.validate.field).duration = { + gt: {} + lt: {seconds: 1} + }]; +} +message DurationExLTGT { + google.protobuf.Duration val = 1 [(buf.validate.field).duration = { + lt: {} + gt: {seconds: 1} + }]; +} +message DurationGTELTE { + google.protobuf.Duration val = 1 [(buf.validate.field).duration = { + gte: {seconds: 60} + lte: {seconds: 3600} + }]; +} +message DurationExGTELTE { + google.protobuf.Duration val = 1 [(buf.validate.field).duration = { + lte: {seconds: 60} + gte: {seconds: 3600} + }]; +} + +// Regression for earlier bug where missing Duration field would short circuit +// evaluation in C++. +message DurationFieldWithOtherFields { + google.protobuf.Duration duration_val = 1 [(buf.validate.field).duration.lte = {seconds: 1}]; + int32 int_val = 2 [(buf.validate.field).int32.gt = 16]; +} + +message DurationExample { + google.protobuf.Duration val = 1 [(buf.validate.field).duration.example = {seconds: 3}]; +} + +// The below messages should throw compilation errors due to incorrect types. +message DurationWrongTypeScalar { + int32 seconds = 1 [(buf.validate.field).duration.lte = {seconds: 1}]; +} + +message DurationWrongTypeMessage { + message WrongType { + int32 seconds = 1; + } + WrongType val = 1 [(buf.validate.field).duration.lte = {seconds: 1}]; +} + +message DurationWrongTypeWrapper { + google.protobuf.Int32Value val = 1 [(buf.validate.field).duration.example = {seconds: 3}]; +} + +message DurationWrongTypeWKT { + google.protobuf.Timestamp val = 1 [(buf.validate.field).duration.example = {seconds: 3}]; +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/wkt_field_mask.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/wkt_field_mask.proto new file mode 100644 index 00000000..e6f6571d --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/wkt_field_mask.proto @@ -0,0 +1,56 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package buf.validate.conformance.cases; + +import "buf/validate/validate.proto"; +import "google/protobuf/field_mask.proto"; + +message FieldMaskNone { + google.protobuf.FieldMask val = 1; +} +message FieldMaskRequired { + google.protobuf.FieldMask val = 1 [(buf.validate.field).required = true]; +} + +message FieldMaskConst { + google.protobuf.FieldMask val = 1 [(buf.validate.field).field_mask.const = { + paths: ["a"] + }]; +} + +message FieldMaskIn { + google.protobuf.FieldMask val = 1 [(buf.validate.field).field_mask = { + in: [ + "a", + "b" + ] + }]; +} +message FieldMaskNotIn { + google.protobuf.FieldMask val = 1 [(buf.validate.field).field_mask = { + not_in: [ + "c", + "d" + ] + }]; +} + +message FieldMaskExample { + google.protobuf.FieldMask val = 1 [(buf.validate.field).field_mask.example = { + paths: ["a"] + }]; +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/wkt_nested.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/wkt_nested.proto new file mode 100644 index 00000000..8da2703a --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/wkt_nested.proto @@ -0,0 +1,31 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package buf.validate.conformance.cases; + +import "buf/validate/validate.proto"; + +message WktLevelOne { + message WktLevelTwo { + message WktLevelThree { + string uuid = 1 [(buf.validate.field).string.uuid = true]; + } + + WktLevelThree three = 1 [(buf.validate.field).required = true]; + } + + WktLevelTwo two = 1 [(buf.validate.field).required = true]; +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/wkt_timestamp.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/wkt_timestamp.proto new file mode 100644 index 00000000..b7ca36a7 --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/wkt_timestamp.proto @@ -0,0 +1,123 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package buf.validate.conformance.cases; + +import "buf/validate/validate.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +message TimestampNone { + google.protobuf.Timestamp val = 1; +} +message TimestampRequired { + google.protobuf.Timestamp val = 1 [(buf.validate.field).required = true]; +} +message TimestampConst { + google.protobuf.Timestamp val = 1 [(buf.validate.field).timestamp.const = {seconds: 3}]; +} + +message TimestampLT { + google.protobuf.Timestamp val = 1 [(buf.validate.field).timestamp.lt = {}]; +} +message TimestampLTE { + google.protobuf.Timestamp val = 1 [(buf.validate.field).timestamp.lte = {seconds: 1}]; +} +message TimestampGT { + google.protobuf.Timestamp val = 1 [(buf.validate.field).timestamp.gt = {nanos: 1000}]; +} +message TimestampGTE { + google.protobuf.Timestamp val = 1 [(buf.validate.field).timestamp.gte = {nanos: 1000000}]; +} +message TimestampGTLT { + google.protobuf.Timestamp val = 1 [(buf.validate.field).timestamp = { + gt: {} + lt: {seconds: 1} + }]; +} +message TimestampExLTGT { + google.protobuf.Timestamp val = 1 [(buf.validate.field).timestamp = { + lt: {} + gt: {seconds: 1} + }]; +} +message TimestampGTELTE { + google.protobuf.Timestamp val = 1 [(buf.validate.field).timestamp = { + gte: {seconds: 60} + lte: {seconds: 3600} + }]; +} +message TimestampExGTELTE { + google.protobuf.Timestamp val = 1 [(buf.validate.field).timestamp = { + lte: {seconds: 60} + gte: {seconds: 3600} + }]; +} + +message TimestampLTNow { + google.protobuf.Timestamp val = 1 [(buf.validate.field).timestamp.lt_now = true]; +} +message TimestampNotLTNow { + google.protobuf.Timestamp val = 1 [(buf.validate.field).timestamp.lt_now = false]; +} +message TimestampGTNow { + google.protobuf.Timestamp val = 1 [(buf.validate.field).timestamp.gt_now = true]; +} +message TimestampNotGTNow { + google.protobuf.Timestamp val = 1 [(buf.validate.field).timestamp.gt_now = false]; +} + +message TimestampWithin { + google.protobuf.Timestamp val = 1 [(buf.validate.field).timestamp.within.seconds = 3600]; +} + +message TimestampLTNowWithin { + google.protobuf.Timestamp val = 1 [(buf.validate.field).timestamp = { + lt_now: true + within: {seconds: 3600} + }]; +} +message TimestampGTNowWithin { + google.protobuf.Timestamp val = 1 [(buf.validate.field).timestamp = { + gt_now: true + within: {seconds: 3600} + }]; +} + +message TimestampExample { + google.protobuf.Timestamp val = 1 [(buf.validate.field).timestamp.example = {seconds: 3}]; +} + +// The below messages should throw compilation errors due to rules being applied toincorrect types. +message TimestampWrongTypeScalar { + int32 val = 1 [(buf.validate.field).timestamp.lt_now = true]; +} + +message TimestampWrongTypeMessage { + message WrongType { + int32 val = 1; + } + WrongType val = 1 [(buf.validate.field).timestamp.lt_now = true]; +} + +message TimestampWrongTypeWrapper { + google.protobuf.Int32Value val = 1 [(buf.validate.field).timestamp.lt_now = true]; +} + +message TimestampWrongTypeWKT { + google.protobuf.Duration val = 1 [(buf.validate.field).timestamp.lt_now = true]; +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/wkt_wrappers.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/wkt_wrappers.proto new file mode 100644 index 00000000..57a09f0a --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/wkt_wrappers.proto @@ -0,0 +1,76 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package buf.validate.conformance.cases; + +import "buf/validate/validate.proto"; +import "google/protobuf/wrappers.proto"; + +message WrapperNone { + google.protobuf.Int32Value val = 1; +} + +message WrapperFloat { + google.protobuf.FloatValue val = 1 [(buf.validate.field).float.gt = 0]; +} +message WrapperDouble { + google.protobuf.DoubleValue val = 1 [(buf.validate.field).double.gt = 0]; +} +message WrapperInt64 { + google.protobuf.Int64Value val = 1 [(buf.validate.field).int64.gt = 0]; +} +message WrapperInt32 { + google.protobuf.Int32Value val = 1 [(buf.validate.field).int32.gt = 0]; +} +message WrapperUInt64 { + google.protobuf.UInt64Value val = 1 [(buf.validate.field).uint64.gt = 0]; +} +message WrapperUInt32 { + google.protobuf.UInt32Value val = 1 [(buf.validate.field).uint32.gt = 0]; +} +message WrapperBool { + google.protobuf.BoolValue val = 1 [(buf.validate.field).bool.const = true]; +} +message WrapperString { + google.protobuf.StringValue val = 1 [(buf.validate.field).string.suffix = "bar"]; +} +message WrapperBytes { + google.protobuf.BytesValue val = 1 [(buf.validate.field).bytes.min_len = 3]; +} +message WrapperRequiredString { + google.protobuf.StringValue val = 1 [ + (buf.validate.field).string.const = "bar", + (buf.validate.field).required = true + ]; +} +message WrapperRequiredEmptyString { + google.protobuf.StringValue val = 1 [ + (buf.validate.field).string.const = "", + (buf.validate.field).required = true + ]; +} +message WrapperOptionalUuidString { + google.protobuf.StringValue val = 1 [ + (buf.validate.field).string.uuid = true, + (buf.validate.field).required = false + ]; +} +message WrapperRequiredFloat { + google.protobuf.FloatValue val = 1 [ + (buf.validate.field).float.gt = 0, + (buf.validate.field).required = true + ]; +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/cases/yet_another_package/embed2.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/yet_another_package/embed2.proto new file mode 100644 index 00000000..d2a988df --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/cases/yet_another_package/embed2.proto @@ -0,0 +1,29 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package buf.validate.conformance.cases.yet_another_package; + +import "buf/validate/validate.proto"; + +// Validate message embedding across packages. +message Embed { + int64 val = 1 [(buf.validate.field).int64.gt = 0]; + + enum Enumerated { + ENUMERATED_UNSPECIFIED = 0; + ENUMERATED_VALUE = 1; + } +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/harness/harness.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/harness/harness.proto new file mode 100644 index 00000000..af2846ef --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/harness/harness.proto @@ -0,0 +1,51 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package buf.validate.conformance.harness; + +import "buf/validate/validate.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/descriptor.proto"; + +// TestConformanceRequest is the request for Conformance Tests. +// The FileDescriptorSet is the FileDescriptorSet to test against. +// The cases map is a map of case name to the Any message that represents the case. +message TestConformanceRequest { + google.protobuf.FileDescriptorSet fdset = 2; + map cases = 3; +} + +// TestConformanceResponse is the response for Conformance Tests. +// The results map is a map of case name to the TestResult. +message TestConformanceResponse { + map results = 1; +} + +// TestResult is the result of a single test. Only one of the fields will be set. +message TestResult { + oneof result { + // success is true if the test succeeded. + bool success = 1; + // validation_error is the error if the test failed due to validation errors. + Violations validation_error = 2; + // compilation_error is the error if the test failed due to compilation errors. + string compilation_error = 3; + // runtime_error is the error if the test failed due to runtime errors. + string runtime_error = 4; + // unexpected_error is any other error that may have occurred. + string unexpected_error = 5; + } +} diff --git a/packages/protovalidate-proto/proto/buf/validate/conformance/harness/results.proto b/packages/protovalidate-proto/proto/buf/validate/conformance/harness/results.proto new file mode 100644 index 00000000..c6f15c9e --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/conformance/harness/results.proto @@ -0,0 +1,84 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package buf.validate.conformance.harness; + +import "buf/validate/conformance/harness/harness.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/descriptor.proto"; + +// ResultOptions are the options passed to the test runner to configure the +// test run. +message ResultOptions { + // The suite filter is a regex that matches against the suite name. + string suite_filter = 1; + // The case filter is a regex that matches against the case name. + string case_filter = 2; + // If the test runner should print verbose output. + bool verbose = 3; + // If the violation message must be an exact match. + bool strict_message = 5; + // If the distinction between runtime and compile time errors must be exact. + bool strict_error = 6; + reserved 4; + reserved "strict"; +} + +// A result is the result of a test run. +message ResultSet { + // Count of successes. + int32 successes = 1; + // Count of failures. + int32 failures = 2; + // List of suite results. + repeated SuiteResults suites = 3; + // Options used to generate this result. + ResultOptions options = 4; + // Count of expected failures. + int32 expected_failures = 5; +} + +// A suite result is a single test suite result. +message SuiteResults { + // The suite name. + string name = 1; + // Count of successes. + int32 successes = 2; + // Count of failures. + int32 failures = 3; + // List of case results. + repeated CaseResult cases = 4; + // The file descriptor set used to generate this result. + google.protobuf.FileDescriptorSet fdset = 5; + // Count of expected failures. + int32 expected_failures = 6; +} + +// A case result is a single test case result. +message CaseResult { + // The case name. + string name = 1; + // Success state of the test case. True if the test case succeeded. + bool success = 2; + // The expected result. + TestResult wanted = 3; + // The actual result. + TestResult got = 4; + // The input used to invoke the test case. + google.protobuf.Any input = 5; + // Denotes if the test is expected to fail. True, if the test case was expected to fail. + bool expected_failure = 6; +} diff --git a/packages/protovalidate-proto/proto/buf/validate/validate.proto b/packages/protovalidate-proto/proto/buf/validate/validate.proto new file mode 100644 index 00000000..56117c88 --- /dev/null +++ b/packages/protovalidate-proto/proto/buf/validate/validate.proto @@ -0,0 +1,5130 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto2"; + +// [Protovalidate](https://protovalidate.com/) is the semantic validation library for Protobuf. +// It provides standard annotations to validate common rules on messages and fields, as well as the ability to use [CEL](https://cel.dev) to write custom rules. +// It's the next generation of [protoc-gen-validate](https://github.com/bufbuild/protoc-gen-validate). +// +// This package provides the options, messages, and enums that power Protovalidate. +// Apply its options to messages, fields, and oneofs in your Protobuf schemas to add validation rules: +// +// ```proto +// message User { +// string id = 1 [(buf.validate.field).string.uuid = true]; +// string first_name = 2 [(buf.validate.field).string.max_len = 64]; +// string last_name = 3 [(buf.validate.field).string.max_len = 64]; +// +// option (buf.validate.message).cel = { +// id: "first_name_requires_last_name" +// message: "last_name must be present if first_name is present" +// expression: "!has(this.first_name) || has(this.last_name)" +// }; +// } +// ``` +// +// These rules are enforced at runtime by language-specific libraries. +// See the [developer quickstart](https://protovalidate.com/quickstart/) to get started, or go directly to the runtime library for your language: +// [Go](https://github.com/bufbuild/protovalidate-go), +// [JavaScript/TypeScript](https://github.com/bufbuild/protovalidate-es), +// [Java](https://github.com/bufbuild/protovalidate-java), +// [Python](https://github.com/bufbuild/protovalidate-python), +// or [C++](https://github.com/bufbuild/protovalidate-cc). +package buf.validate; + +import "google/protobuf/descriptor.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate"; +option java_multiple_files = true; +option java_outer_classname = "ValidateProto"; +option java_package = "build.buf.validate"; + +// MessageOptions is an extension to google.protobuf.MessageOptions. It allows +// the addition of validation rules at the message level. These rules can be +// applied to incoming messages to ensure they meet certain criteria before +// being processed. +extend google.protobuf.MessageOptions { + // Rules specify the validations to be performed on this message. By default, + // no validation is performed against a message. + optional MessageRules message = 1159; +} + +// OneofOptions is an extension to google.protobuf.OneofOptions. It allows +// the addition of validation rules on a oneof. These rules can be +// applied to incoming messages to ensure they meet certain criteria before +// being processed. +extend google.protobuf.OneofOptions { + // Rules specify the validations to be performed on this oneof. By default, + // no validation is performed against a oneof. + optional OneofRules oneof = 1159; +} + +// FieldOptions is an extension to google.protobuf.FieldOptions. It allows +// the addition of validation rules at the field level. These rules can be +// applied to incoming messages to ensure they meet certain criteria before +// being processed. +extend google.protobuf.FieldOptions { + // Rules specify the validations to be performed on this field. By default, + // no validation is performed against a field. + optional FieldRules field = 1159; + + // Specifies predefined rules. When extending a standard rule message, + // this adds additional CEL expressions that apply when the extension is used. + // + // ```proto + // extend buf.validate.Int32Rules { + // bool is_zero [(buf.validate.predefined).cel = { + // id: "int32.is_zero", + // message: "must be zero", + // expression: "!rule || this == 0", + // }]; + // } + // + // message Foo { + // int32 reserved = 1 [(buf.validate.field).int32.(is_zero) = true]; + // } + // ``` + optional PredefinedRules predefined = 1160; +} + +// `Rule` represents a validation rule written in the Common Expression +// Language (CEL) syntax. Each Rule includes a unique identifier, an +// optional error message, and the CEL expression to evaluate. For more +// information, [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/). +// +// ```proto +// message Foo { +// option (buf.validate.message).cel = { +// id: "foo.bar" +// message: "bar must be greater than 0" +// expression: "this.bar > 0" +// }; +// int32 bar = 1; +// } +// ``` +message Rule { + // `id` is a string that serves as a machine-readable name for this Rule. + // It should be unique within its scope, which could be either a message or a field. + optional string id = 1; + + // `message` is an optional field that provides a human-readable error message + // for this Rule when the CEL expression evaluates to false. If a + // non-empty message is provided, any strings resulting from the CEL + // expression evaluation are ignored. + optional string message = 2; + + // `expression` is the actual CEL expression that will be evaluated for + // validation. This string must resolve to either a boolean or a string + // value. If the expression evaluates to false or a non-empty string, the + // validation is considered failed, and the message is rejected. + optional string expression = 3; +} + +// MessageRules represents validation rules that are applied to the entire message. +// It includes disabling options and a list of Rule messages representing Common Expression Language (CEL) validation rules. +message MessageRules { + // `cel_expression` is a repeated field CEL expressions. Each expression specifies a validation + // rule to be applied to this message. These rules are written in Common Expression Language (CEL) syntax. + // + // This is a simplified form of the `cel` Rule field, where only `expression` is set. This allows for + // simpler syntax when defining CEL Rules where `id` and `message` derived from the `expression`. `id` will + // be same as the `expression`. + // + // For more information, [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/). + // + // ```proto + // message MyMessage { + // // The field `foo` must be greater than 42. + // option (buf.validate.message).cel_expression = "this.foo > 42"; + // // The field `foo` must be less than 84. + // option (buf.validate.message).cel_expression = "this.foo < 84"; + // optional int32 foo = 1; + // } + // ``` + repeated string cel_expression = 5; + // `cel` is a repeated field of type Rule. Each Rule specifies a validation rule to be applied to this message. + // These rules are written in Common Expression Language (CEL) syntax. For more information, + // [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/). + // + // + // ```proto + // message MyMessage { + // // The field `foo` must be greater than 42. + // option (buf.validate.message).cel = { + // id: "my_message.value", + // message: "must be greater than 42", + // expression: "this.foo > 42", + // }; + // optional int32 foo = 1; + // } + // ``` + repeated Rule cel = 3; + + // `oneof` is a repeated field of type MessageOneofRule that specifies a list of fields + // of which at most one can be present. If `required` is also specified, then exactly one + // of the specified fields _must_ be present. + // + // This will enforce oneof-like constraints with a few features not provided by + // actual Protobuf oneof declarations: + // 1. Repeated and map fields are allowed in this validation. In a Protobuf oneof, + // only scalar fields are allowed. + // 2. Fields with implicit presence are allowed. In a Protobuf oneof, all member + // fields have explicit presence. This means that, for the purpose of determining + // how many fields are set, explicitly setting such a field to its zero value is + // effectively the same as not setting it at all. + // 3. This will always generate validation errors for a message unmarshalled from + // serialized data that sets more than one field. With a Protobuf oneof, when + // multiple fields are present in the serialized form, earlier values are usually + // silently ignored when unmarshalling, with only the last field being set when + // unmarshalling completes. + // + // Note that adding a field to a `oneof` will also set the IGNORE_IF_ZERO_VALUE on the fields. This means + // only the field that is set will be validated and the unset fields are not validated according to the field rules. + // This behavior can be overridden by setting `ignore` against a field. + // + // ```proto + // message MyMessage { + // // Only one of `field1` or `field2` _can_ be present in this message. + // option (buf.validate.message).oneof = { fields: ["field1", "field2"] }; + // // Exactly one of `field3` or `field4` _must_ be present in this message. + // option (buf.validate.message).oneof = { fields: ["field3", "field4"], required: true }; + // string field1 = 1; + // bytes field2 = 2; + // bool field3 = 3; + // int32 field4 = 4; + // } + // ``` + repeated MessageOneofRule oneof = 4; + + reserved 1; + reserved "disabled"; +} + +message MessageOneofRule { + // A list of field names to include in the oneof. All field names must be + // defined in the message. At least one field must be specified, and + // duplicates are not permitted. + repeated string fields = 1; + // If true, one of the fields specified _must_ be set. + optional bool required = 2; +} + +// The `OneofRules` message type enables you to manage rules for +// oneof fields in your protobuf messages. +message OneofRules { + // If `required` is true, exactly one field of the oneof must be set. A + // validation error is returned if no fields in the oneof are set. Further rules + // should be placed on the fields themselves to ensure they are valid values, + // such as `min_len` or `gt`. + // + // ```proto + // message MyMessage { + // oneof value { + // // Either `a` or `b` must be set. If `a` is set, it must also be + // // non-empty; whereas if `b` is set, it can still be an empty string. + // option (buf.validate.oneof).required = true; + // string a = 1 [(buf.validate.field).string.min_len = 1]; + // string b = 2; + // } + // } + // ``` + optional bool required = 1; +} + +// FieldRules encapsulates the rules for each type of field. Depending on +// the field, the correct set should be used to ensure proper validations. +message FieldRules { + // `cel_expression` is a repeated field CEL expressions. Each expression specifies a validation + // rule to be applied to this message. These rules are written in Common Expression Language (CEL) syntax. + // + // This is a simplified form of the `cel` Rule field, where only `expression` is set. This allows for + // simpler syntax when defining CEL Rules where `id` and `message` derived from the `expression`. `id` will + // be same as the `expression`. + // + // For more information, [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/). + // + // ```proto + // message MyMessage { + // // The field `value` must be greater than 42. + // optional int32 value = 1 [(buf.validate.field).cel_expression = "this > 42"]; + // } + // ``` + repeated string cel_expression = 29; + // `cel` is a repeated field used to represent a textual expression + // in the Common Expression Language (CEL) syntax. For more information, + // [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/). + // + // ```proto + // message MyMessage { + // // The field `value` must be greater than 42. + // optional int32 value = 1 [(buf.validate.field).cel = { + // id: "my_message.value", + // message: "must be greater than 42", + // expression: "this > 42", + // }]; + // } + // ``` + repeated Rule cel = 23; + // If `required` is true, the field must be set. A validation error is returned + // if the field is not set. + // + // ```proto + // syntax="proto3"; + // + // message FieldsWithPresence { + // // Requires any string to be set, including the empty string. + // optional string link = 1 [ + // (buf.validate.field).required = true + // ]; + // // Requires true or false to be set. + // optional bool disabled = 2 [ + // (buf.validate.field).required = true + // ]; + // // Requires a message to be set, including the empty message. + // SomeMessage msg = 4 [ + // (buf.validate.field).required = true + // ]; + // } + // ``` + // + // All fields in the example above track presence. By default, Protovalidate + // ignores rules on those fields if no value is set. `required` ensures that + // the fields are set and valid. + // + // Fields that don't track presence are always validated by Protovalidate, + // whether they are set or not. It is not necessary to add `required`. It + // can be added to indicate that the field cannot be the zero value. + // + // ```proto + // syntax="proto3"; + // + // message FieldsWithoutPresence { + // // `string.email` always applies, even to an empty string. + // string link = 1 [ + // (buf.validate.field).string.email = true + // ]; + // // `repeated.min_items` always applies, even to an empty list. + // repeated string labels = 2 [ + // (buf.validate.field).repeated.min_items = 1 + // ]; + // // `required`, for fields that don't track presence, indicates + // // the value of the field can't be the zero value. + // int32 zero_value_not_allowed = 3 [ + // (buf.validate.field).required = true + // ]; + // } + // ``` + // + // To learn which fields track presence, see the + // [Field Presence cheat sheet](https://protobuf.dev/programming-guides/field_presence/#cheat). + // + // Note: While field rules can be applied to repeated items, map keys, and map + // values, the elements are always considered to be set. Consequently, + // specifying `repeated.items.required` is redundant. + optional bool required = 25; + // Ignore validation rules on the field if its value matches the specified + // criteria. See the `Ignore` enum for details. + // + // ```proto + // message UpdateRequest { + // // The uri rule only applies if the field is not an empty string. + // string url = 1 [ + // (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + // (buf.validate.field).string.uri = true + // ]; + // } + // ``` + optional Ignore ignore = 27; + + oneof type { + // Scalar Field Types + FloatRules float = 1; + DoubleRules double = 2; + Int32Rules int32 = 3; + Int64Rules int64 = 4; + UInt32Rules uint32 = 5; + UInt64Rules uint64 = 6; + SInt32Rules sint32 = 7; + SInt64Rules sint64 = 8; + Fixed32Rules fixed32 = 9; + Fixed64Rules fixed64 = 10; + SFixed32Rules sfixed32 = 11; + SFixed64Rules sfixed64 = 12; + BoolRules bool = 13; + StringRules string = 14; + BytesRules bytes = 15; + + // Complex Field Types + EnumRules enum = 16; + RepeatedRules repeated = 18; + MapRules map = 19; + + // Well-Known Field Types + AnyRules any = 20; + DurationRules duration = 21; + FieldMaskRules field_mask = 28; + TimestampRules timestamp = 22; + } + + reserved 24, 26; + reserved "skipped", "ignore_empty"; +} + +// PredefinedRules are custom rules that can be re-used with +// multiple fields. +message PredefinedRules { + // `cel` is a repeated field used to represent a textual expression + // in the Common Expression Language (CEL) syntax. For more information, + // [see our documentation](https://buf.build/docs/protovalidate/schemas/predefined-rules/). + // + // ```proto + // message MyMessage { + // // The field `value` must be greater than 42. + // optional int32 value = 1 [(buf.validate.predefined).cel = { + // id: "my_message.value", + // message: "must be greater than 42", + // expression: "this > 42", + // }]; + // } + // ``` + repeated Rule cel = 1; + + reserved 24, 26; + reserved "skipped", "ignore_empty"; +} + +// Specifies how `FieldRules.ignore` behaves, depending on the field's value, and +// whether the field tracks presence. +enum Ignore { + // Ignore rules if the field tracks presence and is unset. This is the default + // behavior. + // + // In proto3, only message fields, members of a Protobuf `oneof`, and fields + // with the `optional` label track presence. Consequently, the following fields + // are always validated, whether a value is set or not: + // + // ```proto + // syntax="proto3"; + // + // message RulesApply { + // string email = 1 [ + // (buf.validate.field).string.email = true + // ]; + // int32 age = 2 [ + // (buf.validate.field).int32.gt = 0 + // ]; + // repeated string labels = 3 [ + // (buf.validate.field).repeated.min_items = 1 + // ]; + // } + // ``` + // + // In contrast, the following fields track presence, and are only validated if + // a value is set: + // + // ```proto + // syntax="proto3"; + // + // message RulesApplyIfSet { + // optional string email = 1 [ + // (buf.validate.field).string.email = true + // ]; + // oneof ref { + // string reference = 2 [ + // (buf.validate.field).string.uuid = true + // ]; + // string name = 3 [ + // (buf.validate.field).string.min_len = 4 + // ]; + // } + // SomeMessage msg = 4 [ + // (buf.validate.field).cel = {/* ... */} + // ]; + // } + // ``` + // + // To ensure that such a field is set, add the `required` rule. + // + // To learn which fields track presence, see the + // [Field Presence cheat sheet](https://protobuf.dev/programming-guides/field_presence/#cheat). + IGNORE_UNSPECIFIED = 0; + + // Ignore rules if the field is unset, or set to the zero value. + // + // The zero value depends on the field type: + // - For strings, the zero value is the empty string. + // - For bytes, the zero value is empty bytes. + // - For bool, the zero value is false. + // - For numeric types, the zero value is zero. + // - For enums, the zero value is the first defined enum value. + // - For repeated fields, the zero is an empty list. + // - For map fields, the zero is an empty map. + // - For message fields, absence of the message (typically a null-value) is considered zero value. + // + // For fields that track presence (e.g. adding the `optional` label in proto3), + // this a no-op and behavior is the same as the default `IGNORE_UNSPECIFIED`. + IGNORE_IF_ZERO_VALUE = 1; + + // Always ignore rules, including the `required` rule. + // + // This is useful for ignoring the rules of a referenced message, or to + // temporarily ignore rules during development. + // + // ```proto + // message MyMessage { + // // The field's rules will always be ignored, including any validations + // // on value's fields. + // MyOtherMessage value = 1 [ + // (buf.validate.field).ignore = IGNORE_ALWAYS + // ]; + // } + // ``` + IGNORE_ALWAYS = 3; + + reserved 2; + reserved "IGNORE_EMPTY", "IGNORE_DEFAULT", "IGNORE_IF_DEFAULT_VALUE", "IGNORE_IF_UNPOPULATED"; +} + +// FloatRules describes the rules applied to `float` values. These +// rules may also be applied to the `google.protobuf.FloatValue` Well-Known-Type. +message FloatRules { + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // message MyFloat { + // // value must equal 42.0 + // float value = 1 [(buf.validate.field).float.const = 42.0]; + // } + // ``` + optional float const = 1 [(predefined).cel = { + id: "float.const" + expression: "this != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''" + }]; + + oneof less_than { + // `lt` requires the field value to be less than the specified value (field < + // value). If the field value is equal to or greater than the specified value, + // an error message is generated. + // + // ```proto + // message MyFloat { + // // must be less than 10.0 + // float value = 1 [(buf.validate.field).float.lt = 10.0]; + // } + // ``` + float lt = 2 [(predefined).cel = { + id: "float.lt" + expression: + "!has(rules.gte) && !has(rules.gt) && (this.isNan() || this >= rules.lt)" + "? 'must be less than %s'.format([rules.lt]) : ''" + }]; + + // `lte` requires the field value to be less than or equal to the specified + // value (field <= value). If the field value is greater than the specified + // value, an error message is generated. + // + // ```proto + // message MyFloat { + // // must be less than or equal to 10.0 + // float value = 1 [(buf.validate.field).float.lte = 10.0]; + // } + // ``` + float lte = 3 [(predefined).cel = { + id: "float.lte" + expression: + "!has(rules.gte) && !has(rules.gt) && (this.isNan() || this > rules.lte)" + "? 'must be less than or equal to %s'.format([rules.lte]) : ''" + }]; + } + + oneof greater_than { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // message MyFloat { + // // must be greater than 5.0 [float.gt] + // float value = 1 [(buf.validate.field).float.gt = 5.0]; + // + // // must be greater than 5 and less than 10.0 [float.gt_lt] + // float other_value = 2 [(buf.validate.field).float = { gt: 5.0, lt: 10.0 }]; + // + // // must be greater than 10 or less than 5.0 [float.gt_lt_exclusive] + // float another_value = 3 [(buf.validate.field).float = { gt: 10.0, lt: 5.0 }]; + // } + // ``` + float gt = 4 [ + (predefined).cel = { + id: "float.gt" + expression: + "!has(rules.lt) && !has(rules.lte) && (this.isNan() || this <= rules.gt)" + "? 'must be greater than %s'.format([rules.gt]) : ''" + }, + (predefined).cel = { + id: "float.gt_lt" + expression: + "has(rules.lt) && rules.lt >= rules.gt && (this.isNan() || this >= rules.lt || this <= rules.gt)" + "? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" + }, + (predefined).cel = { + id: "float.gt_lt_exclusive" + expression: + "has(rules.lt) && rules.lt < rules.gt && (this.isNan() || (rules.lt <= this && this <= rules.gt))" + "? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" + }, + (predefined).cel = { + id: "float.gt_lte" + expression: + "has(rules.lte) && rules.lte >= rules.gt && (this.isNan() || this > rules.lte || this <= rules.gt)" + "? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" + }, + (predefined).cel = { + id: "float.gt_lte_exclusive" + expression: + "has(rules.lte) && rules.lte < rules.gt && (this.isNan() || (rules.lte < this && this <= rules.gt))" + "? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" + } + ]; + + // `gte` requires the field value to be greater than or equal to the specified + // value (exclusive). If the value of `gte` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // message MyFloat { + // // must be greater than or equal to 5.0 [float.gte] + // float value = 1 [(buf.validate.field).float.gte = 5.0]; + // + // // must be greater than or equal to 5.0 and less than 10.0 [float.gte_lt] + // float other_value = 2 [(buf.validate.field).float = { gte: 5.0, lt: 10.0 }]; + // + // // must be greater than or equal to 10.0 or less than 5.0 [float.gte_lt_exclusive] + // float another_value = 3 [(buf.validate.field).float = { gte: 10.0, lt: 5.0 }]; + // } + // ``` + float gte = 5 [ + (predefined).cel = { + id: "float.gte" + expression: + "!has(rules.lt) && !has(rules.lte) && (this.isNan() || this < rules.gte)" + "? 'must be greater than or equal to %s'.format([rules.gte]) : ''" + }, + (predefined).cel = { + id: "float.gte_lt" + expression: + "has(rules.lt) && rules.lt >= rules.gte && (this.isNan() || this >= rules.lt || this < rules.gte)" + "? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" + }, + (predefined).cel = { + id: "float.gte_lt_exclusive" + expression: + "has(rules.lt) && rules.lt < rules.gte && (this.isNan() || (rules.lt <= this && this < rules.gte))" + "? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" + }, + (predefined).cel = { + id: "float.gte_lte" + expression: + "has(rules.lte) && rules.lte >= rules.gte && (this.isNan() || this > rules.lte || this < rules.gte)" + "? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" + }, + (predefined).cel = { + id: "float.gte_lte_exclusive" + expression: + "has(rules.lte) && rules.lte < rules.gte && (this.isNan() || (rules.lte < this && this < rules.gte))" + "? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" + } + ]; + } + + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message + // is generated. + // + // ```proto + // message MyFloat { + // // must be in list [1.0, 2.0, 3.0] + // float value = 1 [(buf.validate.field).float = { in: [1.0, 2.0, 3.0] }]; + // } + // ``` + repeated float in = 6 [(predefined).cel = { + id: "float.in" + expression: "!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''" + }]; + + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error + // message is generated. + // + // ```proto + // message MyFloat { + // // value must not be in list [1.0, 2.0, 3.0] + // float value = 1 [(buf.validate.field).float = { not_in: [1.0, 2.0, 3.0] }]; + // } + // ``` + repeated float not_in = 7 [(predefined).cel = { + id: "float.not_in" + expression: "this in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''" + }]; + + // `finite` requires the field value to be finite. If the field value is + // infinite or NaN, an error message is generated. + optional bool finite = 8 [(predefined).cel = { + id: "float.finite" + expression: "rules.finite ? (this.isNan() || this.isInf() ? 'must be finite' : '') : ''" + }]; + + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // message MyFloat { + // float value = 1 [ + // (buf.validate.field).float.example = 1.0, + // (buf.validate.field).float.example = inf + // ]; + // } + // ``` + repeated float example = 9 [(predefined).cel = { + id: "float.example" + expression: "true" + }]; + + // Extension fields that have the (buf.validate.predefined) option set + // will be treated as predefined field rules. + // See https://protovalidate.com/schemas/predefined-rules/ + extensions 1000 to max; +} + +// DoubleRules describes the rules applied to `double` values. These +// rules may also be applied to the `google.protobuf.DoubleValue` Well-Known-Type. +message DoubleRules { + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // message MyDouble { + // // value must equal 42.0 + // double value = 1 [(buf.validate.field).double.const = 42.0]; + // } + // ``` + optional double const = 1 [(predefined).cel = { + id: "double.const" + expression: "this != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''" + }]; + oneof less_than { + // `lt` requires the field value to be less than the specified value (field < + // value). If the field value is equal to or greater than the specified + // value, an error message is generated. + // + // ```proto + // message MyDouble { + // // must be less than 10.0 + // double value = 1 [(buf.validate.field).double.lt = 10.0]; + // } + // ``` + double lt = 2 [(predefined).cel = { + id: "double.lt" + expression: + "!has(rules.gte) && !has(rules.gt) && (this.isNan() || this >= rules.lt)" + "? 'must be less than %s'.format([rules.lt]) : ''" + }]; + + // `lte` requires the field value to be less than or equal to the specified value + // (field <= value). If the field value is greater than the specified value, + // an error message is generated. + // + // ```proto + // message MyDouble { + // // must be less than or equal to 10.0 + // double value = 1 [(buf.validate.field).double.lte = 10.0]; + // } + // ``` + double lte = 3 [(predefined).cel = { + id: "double.lte" + expression: + "!has(rules.gte) && !has(rules.gt) && (this.isNan() || this > rules.lte)" + "? 'must be less than or equal to %s'.format([rules.lte]) : ''" + }]; + } + oneof greater_than { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or `lte`, + // the range is reversed, and the field value must be outside the specified + // range. If the field value doesn't meet the required conditions, an error + // message is generated. + // + // ```proto + // message MyDouble { + // // must be greater than 5.0 [double.gt] + // double value = 1 [(buf.validate.field).double.gt = 5.0]; + // + // // must be greater than 5 and less than 10.0 [double.gt_lt] + // double other_value = 2 [(buf.validate.field).double = { gt: 5.0, lt: 10.0 }]; + // + // // must be greater than 10 or less than 5.0 [double.gt_lt_exclusive] + // double another_value = 3 [(buf.validate.field).double = { gt: 10.0, lt: 5.0 }]; + // } + // ``` + double gt = 4 [ + (predefined).cel = { + id: "double.gt" + expression: + "!has(rules.lt) && !has(rules.lte) && (this.isNan() || this <= rules.gt)" + "? 'must be greater than %s'.format([rules.gt]) : ''" + }, + (predefined).cel = { + id: "double.gt_lt" + expression: + "has(rules.lt) && rules.lt >= rules.gt && (this.isNan() || this >= rules.lt || this <= rules.gt)" + "? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" + }, + (predefined).cel = { + id: "double.gt_lt_exclusive" + expression: + "has(rules.lt) && rules.lt < rules.gt && (this.isNan() || (rules.lt <= this && this <= rules.gt))" + "? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" + }, + (predefined).cel = { + id: "double.gt_lte" + expression: + "has(rules.lte) && rules.lte >= rules.gt && (this.isNan() || this > rules.lte || this <= rules.gt)" + "? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" + }, + (predefined).cel = { + id: "double.gt_lte_exclusive" + expression: + "has(rules.lte) && rules.lte < rules.gt && (this.isNan() || (rules.lte < this && this <= rules.gt))" + "? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" + } + ]; + + // `gte` requires the field value to be greater than or equal to the specified + // value (exclusive). If the value of `gte` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // message MyDouble { + // // must be greater than or equal to 5.0 [double.gte] + // double value = 1 [(buf.validate.field).double.gte = 5.0]; + // + // // must be greater than or equal to 5.0 and less than 10.0 [double.gte_lt] + // double other_value = 2 [(buf.validate.field).double = { gte: 5.0, lt: 10.0 }]; + // + // // must be greater than or equal to 10.0 or less than 5.0 [double.gte_lt_exclusive] + // double another_value = 3 [(buf.validate.field).double = { gte: 10.0, lt: 5.0 }]; + // } + // ``` + double gte = 5 [ + (predefined).cel = { + id: "double.gte" + expression: + "!has(rules.lt) && !has(rules.lte) && (this.isNan() || this < rules.gte)" + "? 'must be greater than or equal to %s'.format([rules.gte]) : ''" + }, + (predefined).cel = { + id: "double.gte_lt" + expression: + "has(rules.lt) && rules.lt >= rules.gte && (this.isNan() || this >= rules.lt || this < rules.gte)" + "? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" + }, + (predefined).cel = { + id: "double.gte_lt_exclusive" + expression: + "has(rules.lt) && rules.lt < rules.gte && (this.isNan() || (rules.lt <= this && this < rules.gte))" + "? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" + }, + (predefined).cel = { + id: "double.gte_lte" + expression: + "has(rules.lte) && rules.lte >= rules.gte && (this.isNan() || this > rules.lte || this < rules.gte)" + "? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" + }, + (predefined).cel = { + id: "double.gte_lte_exclusive" + expression: + "has(rules.lte) && rules.lte < rules.gte && (this.isNan() || (rules.lte < this && this < rules.gte))" + "? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" + } + ]; + } + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message is + // generated. + // + // ```proto + // message MyDouble { + // // must be in list [1.0, 2.0, 3.0] + // double value = 1 [(buf.validate.field).double = { in: [1.0, 2.0, 3.0] }]; + // } + // ``` + repeated double in = 6 [(predefined).cel = { + id: "double.in" + expression: "!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''" + }]; + + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error + // message is generated. + // + // ```proto + // message MyDouble { + // // value must not be in list [1.0, 2.0, 3.0] + // double value = 1 [(buf.validate.field).double = { not_in: [1.0, 2.0, 3.0] }]; + // } + // ``` + repeated double not_in = 7 [(predefined).cel = { + id: "double.not_in" + expression: "this in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''" + }]; + + // `finite` requires the field value to be finite. If the field value is + // infinite or NaN, an error message is generated. + optional bool finite = 8 [(predefined).cel = { + id: "double.finite" + expression: "rules.finite ? (this.isNan() || this.isInf() ? 'must be finite' : '') : ''" + }]; + + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // message MyDouble { + // double value = 1 [ + // (buf.validate.field).double.example = 1.0, + // (buf.validate.field).double.example = inf + // ]; + // } + // ``` + repeated double example = 9 [(predefined).cel = { + id: "double.example" + expression: "true" + }]; + + // Extension fields that have the (buf.validate.predefined) option set + // will be treated as predefined field rules. + // See https://protovalidate.com/schemas/predefined-rules/ + extensions 1000 to max; +} + +// Int32Rules describes the rules applied to `int32` values. These +// rules may also be applied to the `google.protobuf.Int32Value` Well-Known-Type. +message Int32Rules { + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // message MyInt32 { + // // value must equal 42 + // int32 value = 1 [(buf.validate.field).int32.const = 42]; + // } + // ``` + optional int32 const = 1 [(predefined).cel = { + id: "int32.const" + expression: "this != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''" + }]; + oneof less_than { + // `lt` requires the field value to be less than the specified value (field + // < value). If the field value is equal to or greater than the specified + // value, an error message is generated. + // + // ```proto + // message MyInt32 { + // // must be less than 10 + // int32 value = 1 [(buf.validate.field).int32.lt = 10]; + // } + // ``` + int32 lt = 2 [(predefined).cel = { + id: "int32.lt" + expression: + "!has(rules.gte) && !has(rules.gt) && this >= rules.lt" + "? 'must be less than %s'.format([rules.lt]) : ''" + }]; + + // `lte` requires the field value to be less than or equal to the specified + // value (field <= value). If the field value is greater than the specified + // value, an error message is generated. + // + // ```proto + // message MyInt32 { + // // must be less than or equal to 10 + // int32 value = 1 [(buf.validate.field).int32.lte = 10]; + // } + // ``` + int32 lte = 3 [(predefined).cel = { + id: "int32.lte" + expression: + "!has(rules.gte) && !has(rules.gt) && this > rules.lte" + "? 'must be less than or equal to %s'.format([rules.lte]) : ''" + }]; + } + oneof greater_than { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // message MyInt32 { + // // must be greater than 5 [int32.gt] + // int32 value = 1 [(buf.validate.field).int32.gt = 5]; + // + // // must be greater than 5 and less than 10 [int32.gt_lt] + // int32 other_value = 2 [(buf.validate.field).int32 = { gt: 5, lt: 10 }]; + // + // // must be greater than 10 or less than 5 [int32.gt_lt_exclusive] + // int32 another_value = 3 [(buf.validate.field).int32 = { gt: 10, lt: 5 }]; + // } + // ``` + int32 gt = 4 [ + (predefined).cel = { + id: "int32.gt" + expression: + "!has(rules.lt) && !has(rules.lte) && this <= rules.gt" + "? 'must be greater than %s'.format([rules.gt]) : ''" + }, + (predefined).cel = { + id: "int32.gt_lt" + expression: + "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)" + "? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" + }, + (predefined).cel = { + id: "int32.gt_lt_exclusive" + expression: + "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)" + "? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" + }, + (predefined).cel = { + id: "int32.gt_lte" + expression: + "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)" + "? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" + }, + (predefined).cel = { + id: "int32.gt_lte_exclusive" + expression: + "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)" + "? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" + } + ]; + + // `gte` requires the field value to be greater than or equal to the specified value + // (exclusive). If the value of `gte` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // message MyInt32 { + // // must be greater than or equal to 5 [int32.gte] + // int32 value = 1 [(buf.validate.field).int32.gte = 5]; + // + // // must be greater than or equal to 5 and less than 10 [int32.gte_lt] + // int32 other_value = 2 [(buf.validate.field).int32 = { gte: 5, lt: 10 }]; + // + // // must be greater than or equal to 10 or less than 5 [int32.gte_lt_exclusive] + // int32 another_value = 3 [(buf.validate.field).int32 = { gte: 10, lt: 5 }]; + // } + // ``` + int32 gte = 5 [ + (predefined).cel = { + id: "int32.gte" + expression: + "!has(rules.lt) && !has(rules.lte) && this < rules.gte" + "? 'must be greater than or equal to %s'.format([rules.gte]) : ''" + }, + (predefined).cel = { + id: "int32.gte_lt" + expression: + "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)" + "? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" + }, + (predefined).cel = { + id: "int32.gte_lt_exclusive" + expression: + "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)" + "? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" + }, + (predefined).cel = { + id: "int32.gte_lte" + expression: + "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)" + "? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" + }, + (predefined).cel = { + id: "int32.gte_lte_exclusive" + expression: + "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)" + "? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" + } + ]; + } + + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message is + // generated. + // + // ```proto + // message MyInt32 { + // // must be in list [1, 2, 3] + // int32 value = 1 [(buf.validate.field).int32 = { in: [1, 2, 3] }]; + // } + // ``` + repeated int32 in = 6 [(predefined).cel = { + id: "int32.in" + expression: "!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''" + }]; + + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error message + // is generated. + // + // ```proto + // message MyInt32 { + // // value must not be in list [1, 2, 3] + // int32 value = 1 [(buf.validate.field).int32 = { not_in: [1, 2, 3] }]; + // } + // ``` + repeated int32 not_in = 7 [(predefined).cel = { + id: "int32.not_in" + expression: "this in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''" + }]; + + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // message MyInt32 { + // int32 value = 1 [ + // (buf.validate.field).int32.example = 1, + // (buf.validate.field).int32.example = -10 + // ]; + // } + // ``` + repeated int32 example = 8 [(predefined).cel = { + id: "int32.example" + expression: "true" + }]; + + // Extension fields that have the (buf.validate.predefined) option set + // will be treated as predefined field rules. + // See https://protovalidate.com/schemas/predefined-rules/ + extensions 1000 to max; +} + +// Int64Rules describes the rules applied to `int64` values. These +// rules may also be applied to the `google.protobuf.Int64Value` Well-Known-Type. +message Int64Rules { + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // message MyInt64 { + // // value must equal 42 + // int64 value = 1 [(buf.validate.field).int64.const = 42]; + // } + // ``` + optional int64 const = 1 [(predefined).cel = { + id: "int64.const" + expression: "this != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''" + }]; + oneof less_than { + // `lt` requires the field value to be less than the specified value (field < + // value). If the field value is equal to or greater than the specified value, + // an error message is generated. + // + // ```proto + // message MyInt64 { + // // must be less than 10 + // int64 value = 1 [(buf.validate.field).int64.lt = 10]; + // } + // ``` + int64 lt = 2 [(predefined).cel = { + id: "int64.lt" + expression: + "!has(rules.gte) && !has(rules.gt) && this >= rules.lt" + "? 'must be less than %s'.format([rules.lt]) : ''" + }]; + + // `lte` requires the field value to be less than or equal to the specified + // value (field <= value). If the field value is greater than the specified + // value, an error message is generated. + // + // ```proto + // message MyInt64 { + // // must be less than or equal to 10 + // int64 value = 1 [(buf.validate.field).int64.lte = 10]; + // } + // ``` + int64 lte = 3 [(predefined).cel = { + id: "int64.lte" + expression: + "!has(rules.gte) && !has(rules.gt) && this > rules.lte" + "? 'must be less than or equal to %s'.format([rules.lte]) : ''" + }]; + } + oneof greater_than { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // message MyInt64 { + // // must be greater than 5 [int64.gt] + // int64 value = 1 [(buf.validate.field).int64.gt = 5]; + // + // // must be greater than 5 and less than 10 [int64.gt_lt] + // int64 other_value = 2 [(buf.validate.field).int64 = { gt: 5, lt: 10 }]; + // + // // must be greater than 10 or less than 5 [int64.gt_lt_exclusive] + // int64 another_value = 3 [(buf.validate.field).int64 = { gt: 10, lt: 5 }]; + // } + // ``` + int64 gt = 4 [ + (predefined).cel = { + id: "int64.gt" + expression: + "!has(rules.lt) && !has(rules.lte) && this <= rules.gt" + "? 'must be greater than %s'.format([rules.gt]) : ''" + }, + (predefined).cel = { + id: "int64.gt_lt" + expression: + "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)" + "? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" + }, + (predefined).cel = { + id: "int64.gt_lt_exclusive" + expression: + "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)" + "? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" + }, + (predefined).cel = { + id: "int64.gt_lte" + expression: + "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)" + "? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" + }, + (predefined).cel = { + id: "int64.gt_lte_exclusive" + expression: + "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)" + "? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" + } + ]; + + // `gte` requires the field value to be greater than or equal to the specified + // value (exclusive). If the value of `gte` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // message MyInt64 { + // // must be greater than or equal to 5 [int64.gte] + // int64 value = 1 [(buf.validate.field).int64.gte = 5]; + // + // // must be greater than or equal to 5 and less than 10 [int64.gte_lt] + // int64 other_value = 2 [(buf.validate.field).int64 = { gte: 5, lt: 10 }]; + // + // // must be greater than or equal to 10 or less than 5 [int64.gte_lt_exclusive] + // int64 another_value = 3 [(buf.validate.field).int64 = { gte: 10, lt: 5 }]; + // } + // ``` + int64 gte = 5 [ + (predefined).cel = { + id: "int64.gte" + expression: + "!has(rules.lt) && !has(rules.lte) && this < rules.gte" + "? 'must be greater than or equal to %s'.format([rules.gte]) : ''" + }, + (predefined).cel = { + id: "int64.gte_lt" + expression: + "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)" + "? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" + }, + (predefined).cel = { + id: "int64.gte_lt_exclusive" + expression: + "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)" + "? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" + }, + (predefined).cel = { + id: "int64.gte_lte" + expression: + "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)" + "? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" + }, + (predefined).cel = { + id: "int64.gte_lte_exclusive" + expression: + "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)" + "? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" + } + ]; + } + + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message is + // generated. + // + // ```proto + // message MyInt64 { + // // must be in list [1, 2, 3] + // int64 value = 1 [(buf.validate.field).int64 = { in: [1, 2, 3] }]; + // } + // ``` + repeated int64 in = 6 [(predefined).cel = { + id: "int64.in" + expression: "!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''" + }]; + + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error + // message is generated. + // + // ```proto + // message MyInt64 { + // // value must not be in list [1, 2, 3] + // int64 value = 1 [(buf.validate.field).int64 = { not_in: [1, 2, 3] }]; + // } + // ``` + repeated int64 not_in = 7 [(predefined).cel = { + id: "int64.not_in" + expression: "this in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''" + }]; + + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // message MyInt64 { + // int64 value = 1 [ + // (buf.validate.field).int64.example = 1, + // (buf.validate.field).int64.example = -10 + // ]; + // } + // ``` + repeated int64 example = 9 [(predefined).cel = { + id: "int64.example" + expression: "true" + }]; + + // Extension fields that have the (buf.validate.predefined) option set + // will be treated as predefined field rules. + // See https://protovalidate.com/schemas/predefined-rules/ + extensions 1000 to max; +} + +// UInt32Rules describes the rules applied to `uint32` values. These +// rules may also be applied to the `google.protobuf.UInt32Value` Well-Known-Type. +message UInt32Rules { + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // message MyUInt32 { + // // value must equal 42 + // uint32 value = 1 [(buf.validate.field).uint32.const = 42]; + // } + // ``` + optional uint32 const = 1 [(predefined).cel = { + id: "uint32.const" + expression: "this != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''" + }]; + oneof less_than { + // `lt` requires the field value to be less than the specified value (field < + // value). If the field value is equal to or greater than the specified value, + // an error message is generated. + // + // ```proto + // message MyUInt32 { + // // must be less than 10 + // uint32 value = 1 [(buf.validate.field).uint32.lt = 10]; + // } + // ``` + uint32 lt = 2 [(predefined).cel = { + id: "uint32.lt" + expression: + "!has(rules.gte) && !has(rules.gt) && this >= rules.lt" + "? 'must be less than %s'.format([rules.lt]) : ''" + }]; + + // `lte` requires the field value to be less than or equal to the specified + // value (field <= value). If the field value is greater than the specified + // value, an error message is generated. + // + // ```proto + // message MyUInt32 { + // // must be less than or equal to 10 + // uint32 value = 1 [(buf.validate.field).uint32.lte = 10]; + // } + // ``` + uint32 lte = 3 [(predefined).cel = { + id: "uint32.lte" + expression: + "!has(rules.gte) && !has(rules.gt) && this > rules.lte" + "? 'must be less than or equal to %s'.format([rules.lte]) : ''" + }]; + } + oneof greater_than { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // message MyUInt32 { + // // must be greater than 5 [uint32.gt] + // uint32 value = 1 [(buf.validate.field).uint32.gt = 5]; + // + // // must be greater than 5 and less than 10 [uint32.gt_lt] + // uint32 other_value = 2 [(buf.validate.field).uint32 = { gt: 5, lt: 10 }]; + // + // // must be greater than 10 or less than 5 [uint32.gt_lt_exclusive] + // uint32 another_value = 3 [(buf.validate.field).uint32 = { gt: 10, lt: 5 }]; + // } + // ``` + uint32 gt = 4 [ + (predefined).cel = { + id: "uint32.gt" + expression: + "!has(rules.lt) && !has(rules.lte) && this <= rules.gt" + "? 'must be greater than %s'.format([rules.gt]) : ''" + }, + (predefined).cel = { + id: "uint32.gt_lt" + expression: + "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)" + "? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" + }, + (predefined).cel = { + id: "uint32.gt_lt_exclusive" + expression: + "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)" + "? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" + }, + (predefined).cel = { + id: "uint32.gt_lte" + expression: + "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)" + "? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" + }, + (predefined).cel = { + id: "uint32.gt_lte_exclusive" + expression: + "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)" + "? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" + } + ]; + + // `gte` requires the field value to be greater than or equal to the specified + // value (exclusive). If the value of `gte` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // message MyUInt32 { + // // must be greater than or equal to 5 [uint32.gte] + // uint32 value = 1 [(buf.validate.field).uint32.gte = 5]; + // + // // must be greater than or equal to 5 and less than 10 [uint32.gte_lt] + // uint32 other_value = 2 [(buf.validate.field).uint32 = { gte: 5, lt: 10 }]; + // + // // must be greater than or equal to 10 or less than 5 [uint32.gte_lt_exclusive] + // uint32 another_value = 3 [(buf.validate.field).uint32 = { gte: 10, lt: 5 }]; + // } + // ``` + uint32 gte = 5 [ + (predefined).cel = { + id: "uint32.gte" + expression: + "!has(rules.lt) && !has(rules.lte) && this < rules.gte" + "? 'must be greater than or equal to %s'.format([rules.gte]) : ''" + }, + (predefined).cel = { + id: "uint32.gte_lt" + expression: + "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)" + "? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" + }, + (predefined).cel = { + id: "uint32.gte_lt_exclusive" + expression: + "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)" + "? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" + }, + (predefined).cel = { + id: "uint32.gte_lte" + expression: + "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)" + "? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" + }, + (predefined).cel = { + id: "uint32.gte_lte_exclusive" + expression: + "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)" + "? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" + } + ]; + } + + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message is + // generated. + // + // ```proto + // message MyUInt32 { + // // must be in list [1, 2, 3] + // uint32 value = 1 [(buf.validate.field).uint32 = { in: [1, 2, 3] }]; + // } + // ``` + repeated uint32 in = 6 [(predefined).cel = { + id: "uint32.in" + expression: "!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''" + }]; + + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error + // message is generated. + // + // ```proto + // message MyUInt32 { + // // value must not be in list [1, 2, 3] + // uint32 value = 1 [(buf.validate.field).uint32 = { not_in: [1, 2, 3] }]; + // } + // ``` + repeated uint32 not_in = 7 [(predefined).cel = { + id: "uint32.not_in" + expression: "this in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''" + }]; + + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // message MyUInt32 { + // uint32 value = 1 [ + // (buf.validate.field).uint32.example = 1, + // (buf.validate.field).uint32.example = 10 + // ]; + // } + // ``` + repeated uint32 example = 8 [(predefined).cel = { + id: "uint32.example" + expression: "true" + }]; + + // Extension fields that have the (buf.validate.predefined) option set + // will be treated as predefined field rules. + // See https://protovalidate.com/schemas/predefined-rules/ + extensions 1000 to max; +} + +// UInt64Rules describes the rules applied to `uint64` values. These +// rules may also be applied to the `google.protobuf.UInt64Value` Well-Known-Type. +message UInt64Rules { + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // message MyUInt64 { + // // value must equal 42 + // uint64 value = 1 [(buf.validate.field).uint64.const = 42]; + // } + // ``` + optional uint64 const = 1 [(predefined).cel = { + id: "uint64.const" + expression: "this != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''" + }]; + oneof less_than { + // `lt` requires the field value to be less than the specified value (field < + // value). If the field value is equal to or greater than the specified value, + // an error message is generated. + // + // ```proto + // message MyUInt64 { + // // must be less than 10 + // uint64 value = 1 [(buf.validate.field).uint64.lt = 10]; + // } + // ``` + uint64 lt = 2 [(predefined).cel = { + id: "uint64.lt" + expression: + "!has(rules.gte) && !has(rules.gt) && this >= rules.lt" + "? 'must be less than %s'.format([rules.lt]) : ''" + }]; + + // `lte` requires the field value to be less than or equal to the specified + // value (field <= value). If the field value is greater than the specified + // value, an error message is generated. + // + // ```proto + // message MyUInt64 { + // // must be less than or equal to 10 + // uint64 value = 1 [(buf.validate.field).uint64.lte = 10]; + // } + // ``` + uint64 lte = 3 [(predefined).cel = { + id: "uint64.lte" + expression: + "!has(rules.gte) && !has(rules.gt) && this > rules.lte" + "? 'must be less than or equal to %s'.format([rules.lte]) : ''" + }]; + } + oneof greater_than { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // message MyUInt64 { + // // must be greater than 5 [uint64.gt] + // uint64 value = 1 [(buf.validate.field).uint64.gt = 5]; + // + // // must be greater than 5 and less than 10 [uint64.gt_lt] + // uint64 other_value = 2 [(buf.validate.field).uint64 = { gt: 5, lt: 10 }]; + // + // // must be greater than 10 or less than 5 [uint64.gt_lt_exclusive] + // uint64 another_value = 3 [(buf.validate.field).uint64 = { gt: 10, lt: 5 }]; + // } + // ``` + uint64 gt = 4 [ + (predefined).cel = { + id: "uint64.gt" + expression: + "!has(rules.lt) && !has(rules.lte) && this <= rules.gt" + "? 'must be greater than %s'.format([rules.gt]) : ''" + }, + (predefined).cel = { + id: "uint64.gt_lt" + expression: + "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)" + "? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" + }, + (predefined).cel = { + id: "uint64.gt_lt_exclusive" + expression: + "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)" + "? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" + }, + (predefined).cel = { + id: "uint64.gt_lte" + expression: + "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)" + "? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" + }, + (predefined).cel = { + id: "uint64.gt_lte_exclusive" + expression: + "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)" + "? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" + } + ]; + + // `gte` requires the field value to be greater than or equal to the specified + // value (exclusive). If the value of `gte` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // message MyUInt64 { + // // must be greater than or equal to 5 [uint64.gte] + // uint64 value = 1 [(buf.validate.field).uint64.gte = 5]; + // + // // must be greater than or equal to 5 and less than 10 [uint64.gte_lt] + // uint64 other_value = 2 [(buf.validate.field).uint64 = { gte: 5, lt: 10 }]; + // + // // must be greater than or equal to 10 or less than 5 [uint64.gte_lt_exclusive] + // uint64 another_value = 3 [(buf.validate.field).uint64 = { gte: 10, lt: 5 }]; + // } + // ``` + uint64 gte = 5 [ + (predefined).cel = { + id: "uint64.gte" + expression: + "!has(rules.lt) && !has(rules.lte) && this < rules.gte" + "? 'must be greater than or equal to %s'.format([rules.gte]) : ''" + }, + (predefined).cel = { + id: "uint64.gte_lt" + expression: + "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)" + "? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" + }, + (predefined).cel = { + id: "uint64.gte_lt_exclusive" + expression: + "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)" + "? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" + }, + (predefined).cel = { + id: "uint64.gte_lte" + expression: + "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)" + "? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" + }, + (predefined).cel = { + id: "uint64.gte_lte_exclusive" + expression: + "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)" + "? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" + } + ]; + } + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message is + // generated. + // + // ```proto + // message MyUInt64 { + // // must be in list [1, 2, 3] + // uint64 value = 1 [(buf.validate.field).uint64 = { in: [1, 2, 3] }]; + // } + // ``` + repeated uint64 in = 6 [(predefined).cel = { + id: "uint64.in" + expression: "!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''" + }]; + + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error + // message is generated. + // + // ```proto + // message MyUInt64 { + // // value must not be in list [1, 2, 3] + // uint64 value = 1 [(buf.validate.field).uint64 = { not_in: [1, 2, 3] }]; + // } + // ``` + repeated uint64 not_in = 7 [(predefined).cel = { + id: "uint64.not_in" + expression: "this in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''" + }]; + + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // message MyUInt64 { + // uint64 value = 1 [ + // (buf.validate.field).uint64.example = 1, + // (buf.validate.field).uint64.example = -10 + // ]; + // } + // ``` + repeated uint64 example = 8 [(predefined).cel = { + id: "uint64.example" + expression: "true" + }]; + + // Extension fields that have the (buf.validate.predefined) option set + // will be treated as predefined field rules. + // See https://protovalidate.com/schemas/predefined-rules/ + extensions 1000 to max; +} + +// SInt32Rules describes the rules applied to `sint32` values. +message SInt32Rules { + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // message MySInt32 { + // // value must equal 42 + // sint32 value = 1 [(buf.validate.field).sint32.const = 42]; + // } + // ``` + optional sint32 const = 1 [(predefined).cel = { + id: "sint32.const" + expression: "this != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''" + }]; + oneof less_than { + // `lt` requires the field value to be less than the specified value (field + // < value). If the field value is equal to or greater than the specified + // value, an error message is generated. + // + // ```proto + // message MySInt32 { + // // must be less than 10 + // sint32 value = 1 [(buf.validate.field).sint32.lt = 10]; + // } + // ``` + sint32 lt = 2 [(predefined).cel = { + id: "sint32.lt" + expression: + "!has(rules.gte) && !has(rules.gt) && this >= rules.lt" + "? 'must be less than %s'.format([rules.lt]) : ''" + }]; + + // `lte` requires the field value to be less than or equal to the specified + // value (field <= value). If the field value is greater than the specified + // value, an error message is generated. + // + // ```proto + // message MySInt32 { + // // must be less than or equal to 10 + // sint32 value = 1 [(buf.validate.field).sint32.lte = 10]; + // } + // ``` + sint32 lte = 3 [(predefined).cel = { + id: "sint32.lte" + expression: + "!has(rules.gte) && !has(rules.gt) && this > rules.lte" + "? 'must be less than or equal to %s'.format([rules.lte]) : ''" + }]; + } + oneof greater_than { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // message MySInt32 { + // // must be greater than 5 [sint32.gt] + // sint32 value = 1 [(buf.validate.field).sint32.gt = 5]; + // + // // must be greater than 5 and less than 10 [sint32.gt_lt] + // sint32 other_value = 2 [(buf.validate.field).sint32 = { gt: 5, lt: 10 }]; + // + // // must be greater than 10 or less than 5 [sint32.gt_lt_exclusive] + // sint32 another_value = 3 [(buf.validate.field).sint32 = { gt: 10, lt: 5 }]; + // } + // ``` + sint32 gt = 4 [ + (predefined).cel = { + id: "sint32.gt" + expression: + "!has(rules.lt) && !has(rules.lte) && this <= rules.gt" + "? 'must be greater than %s'.format([rules.gt]) : ''" + }, + (predefined).cel = { + id: "sint32.gt_lt" + expression: + "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)" + "? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" + }, + (predefined).cel = { + id: "sint32.gt_lt_exclusive" + expression: + "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)" + "? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" + }, + (predefined).cel = { + id: "sint32.gt_lte" + expression: + "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)" + "? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" + }, + (predefined).cel = { + id: "sint32.gt_lte_exclusive" + expression: + "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)" + "? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" + } + ]; + + // `gte` requires the field value to be greater than or equal to the specified + // value (exclusive). If the value of `gte` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // message MySInt32 { + // // must be greater than or equal to 5 [sint32.gte] + // sint32 value = 1 [(buf.validate.field).sint32.gte = 5]; + // + // // must be greater than or equal to 5 and less than 10 [sint32.gte_lt] + // sint32 other_value = 2 [(buf.validate.field).sint32 = { gte: 5, lt: 10 }]; + // + // // must be greater than or equal to 10 or less than 5 [sint32.gte_lt_exclusive] + // sint32 another_value = 3 [(buf.validate.field).sint32 = { gte: 10, lt: 5 }]; + // } + // ``` + sint32 gte = 5 [ + (predefined).cel = { + id: "sint32.gte" + expression: + "!has(rules.lt) && !has(rules.lte) && this < rules.gte" + "? 'must be greater than or equal to %s'.format([rules.gte]) : ''" + }, + (predefined).cel = { + id: "sint32.gte_lt" + expression: + "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)" + "? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" + }, + (predefined).cel = { + id: "sint32.gte_lt_exclusive" + expression: + "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)" + "? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" + }, + (predefined).cel = { + id: "sint32.gte_lte" + expression: + "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)" + "? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" + }, + (predefined).cel = { + id: "sint32.gte_lte_exclusive" + expression: + "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)" + "? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" + } + ]; + } + + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message is + // generated. + // + // ```proto + // message MySInt32 { + // // must be in list [1, 2, 3] + // sint32 value = 1 [(buf.validate.field).sint32 = { in: [1, 2, 3] }]; + // } + // ``` + repeated sint32 in = 6 [(predefined).cel = { + id: "sint32.in" + expression: "!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''" + }]; + + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error + // message is generated. + // + // ```proto + // message MySInt32 { + // // value must not be in list [1, 2, 3] + // sint32 value = 1 [(buf.validate.field).sint32 = { not_in: [1, 2, 3] }]; + // } + // ``` + repeated sint32 not_in = 7 [(predefined).cel = { + id: "sint32.not_in" + expression: "this in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''" + }]; + + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // message MySInt32 { + // sint32 value = 1 [ + // (buf.validate.field).sint32.example = 1, + // (buf.validate.field).sint32.example = -10 + // ]; + // } + // ``` + repeated sint32 example = 8 [(predefined).cel = { + id: "sint32.example" + expression: "true" + }]; + + // Extension fields that have the (buf.validate.predefined) option set + // will be treated as predefined field rules. + // See https://protovalidate.com/schemas/predefined-rules/ + extensions 1000 to max; +} + +// SInt64Rules describes the rules applied to `sint64` values. +message SInt64Rules { + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // message MySInt64 { + // // value must equal 42 + // sint64 value = 1 [(buf.validate.field).sint64.const = 42]; + // } + // ``` + optional sint64 const = 1 [(predefined).cel = { + id: "sint64.const" + expression: "this != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''" + }]; + oneof less_than { + // `lt` requires the field value to be less than the specified value (field + // < value). If the field value is equal to or greater than the specified + // value, an error message is generated. + // + // ```proto + // message MySInt64 { + // // must be less than 10 + // sint64 value = 1 [(buf.validate.field).sint64.lt = 10]; + // } + // ``` + sint64 lt = 2 [(predefined).cel = { + id: "sint64.lt" + expression: + "!has(rules.gte) && !has(rules.gt) && this >= rules.lt" + "? 'must be less than %s'.format([rules.lt]) : ''" + }]; + + // `lte` requires the field value to be less than or equal to the specified + // value (field <= value). If the field value is greater than the specified + // value, an error message is generated. + // + // ```proto + // message MySInt64 { + // // must be less than or equal to 10 + // sint64 value = 1 [(buf.validate.field).sint64.lte = 10]; + // } + // ``` + sint64 lte = 3 [(predefined).cel = { + id: "sint64.lte" + expression: + "!has(rules.gte) && !has(rules.gt) && this > rules.lte" + "? 'must be less than or equal to %s'.format([rules.lte]) : ''" + }]; + } + oneof greater_than { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // message MySInt64 { + // // must be greater than 5 [sint64.gt] + // sint64 value = 1 [(buf.validate.field).sint64.gt = 5]; + // + // // must be greater than 5 and less than 10 [sint64.gt_lt] + // sint64 other_value = 2 [(buf.validate.field).sint64 = { gt: 5, lt: 10 }]; + // + // // must be greater than 10 or less than 5 [sint64.gt_lt_exclusive] + // sint64 another_value = 3 [(buf.validate.field).sint64 = { gt: 10, lt: 5 }]; + // } + // ``` + sint64 gt = 4 [ + (predefined).cel = { + id: "sint64.gt" + expression: + "!has(rules.lt) && !has(rules.lte) && this <= rules.gt" + "? 'must be greater than %s'.format([rules.gt]) : ''" + }, + (predefined).cel = { + id: "sint64.gt_lt" + expression: + "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)" + "? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" + }, + (predefined).cel = { + id: "sint64.gt_lt_exclusive" + expression: + "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)" + "? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" + }, + (predefined).cel = { + id: "sint64.gt_lte" + expression: + "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)" + "? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" + }, + (predefined).cel = { + id: "sint64.gt_lte_exclusive" + expression: + "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)" + "? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" + } + ]; + + // `gte` requires the field value to be greater than or equal to the specified + // value (exclusive). If the value of `gte` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // message MySInt64 { + // // must be greater than or equal to 5 [sint64.gte] + // sint64 value = 1 [(buf.validate.field).sint64.gte = 5]; + // + // // must be greater than or equal to 5 and less than 10 [sint64.gte_lt] + // sint64 other_value = 2 [(buf.validate.field).sint64 = { gte: 5, lt: 10 }]; + // + // // must be greater than or equal to 10 or less than 5 [sint64.gte_lt_exclusive] + // sint64 another_value = 3 [(buf.validate.field).sint64 = { gte: 10, lt: 5 }]; + // } + // ``` + sint64 gte = 5 [ + (predefined).cel = { + id: "sint64.gte" + expression: + "!has(rules.lt) && !has(rules.lte) && this < rules.gte" + "? 'must be greater than or equal to %s'.format([rules.gte]) : ''" + }, + (predefined).cel = { + id: "sint64.gte_lt" + expression: + "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)" + "? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" + }, + (predefined).cel = { + id: "sint64.gte_lt_exclusive" + expression: + "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)" + "? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" + }, + (predefined).cel = { + id: "sint64.gte_lte" + expression: + "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)" + "? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" + }, + (predefined).cel = { + id: "sint64.gte_lte_exclusive" + expression: + "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)" + "? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" + } + ]; + } + + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message + // is generated. + // + // ```proto + // message MySInt64 { + // // must be in list [1, 2, 3] + // sint64 value = 1 [(buf.validate.field).sint64 = { in: [1, 2, 3] }]; + // } + // ``` + repeated sint64 in = 6 [(predefined).cel = { + id: "sint64.in" + expression: "!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''" + }]; + + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error + // message is generated. + // + // ```proto + // message MySInt64 { + // // value must not be in list [1, 2, 3] + // sint64 value = 1 [(buf.validate.field).sint64 = { not_in: [1, 2, 3] }]; + // } + // ``` + repeated sint64 not_in = 7 [(predefined).cel = { + id: "sint64.not_in" + expression: "this in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''" + }]; + + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // message MySInt64 { + // sint64 value = 1 [ + // (buf.validate.field).sint64.example = 1, + // (buf.validate.field).sint64.example = -10 + // ]; + // } + // ``` + repeated sint64 example = 8 [(predefined).cel = { + id: "sint64.example" + expression: "true" + }]; + + // Extension fields that have the (buf.validate.predefined) option set + // will be treated as predefined field rules. + // See https://protovalidate.com/schemas/predefined-rules/ + extensions 1000 to max; +} + +// Fixed32Rules describes the rules applied to `fixed32` values. +message Fixed32Rules { + // `const` requires the field value to exactly match the specified value. + // If the field value doesn't match, an error message is generated. + // + // ```proto + // message MyFixed32 { + // // value must equal 42 + // fixed32 value = 1 [(buf.validate.field).fixed32.const = 42]; + // } + // ``` + optional fixed32 const = 1 [(predefined).cel = { + id: "fixed32.const" + expression: "this != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''" + }]; + oneof less_than { + // `lt` requires the field value to be less than the specified value (field < + // value). If the field value is equal to or greater than the specified value, + // an error message is generated. + // + // ```proto + // message MyFixed32 { + // // must be less than 10 + // fixed32 value = 1 [(buf.validate.field).fixed32.lt = 10]; + // } + // ``` + fixed32 lt = 2 [(predefined).cel = { + id: "fixed32.lt" + expression: + "!has(rules.gte) && !has(rules.gt) && this >= rules.lt" + "? 'must be less than %s'.format([rules.lt]) : ''" + }]; + + // `lte` requires the field value to be less than or equal to the specified + // value (field <= value). If the field value is greater than the specified + // value, an error message is generated. + // + // ```proto + // message MyFixed32 { + // // must be less than or equal to 10 + // fixed32 value = 1 [(buf.validate.field).fixed32.lte = 10]; + // } + // ``` + fixed32 lte = 3 [(predefined).cel = { + id: "fixed32.lte" + expression: + "!has(rules.gte) && !has(rules.gt) && this > rules.lte" + "? 'must be less than or equal to %s'.format([rules.lte]) : ''" + }]; + } + oneof greater_than { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // message MyFixed32 { + // // must be greater than 5 [fixed32.gt] + // fixed32 value = 1 [(buf.validate.field).fixed32.gt = 5]; + // + // // must be greater than 5 and less than 10 [fixed32.gt_lt] + // fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gt: 5, lt: 10 }]; + // + // // must be greater than 10 or less than 5 [fixed32.gt_lt_exclusive] + // fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gt: 10, lt: 5 }]; + // } + // ``` + fixed32 gt = 4 [ + (predefined).cel = { + id: "fixed32.gt" + expression: + "!has(rules.lt) && !has(rules.lte) && this <= rules.gt" + "? 'must be greater than %s'.format([rules.gt]) : ''" + }, + (predefined).cel = { + id: "fixed32.gt_lt" + expression: + "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)" + "? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" + }, + (predefined).cel = { + id: "fixed32.gt_lt_exclusive" + expression: + "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)" + "? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" + }, + (predefined).cel = { + id: "fixed32.gt_lte" + expression: + "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)" + "? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" + }, + (predefined).cel = { + id: "fixed32.gt_lte_exclusive" + expression: + "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)" + "? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" + } + ]; + + // `gte` requires the field value to be greater than or equal to the specified + // value (exclusive). If the value of `gte` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // message MyFixed32 { + // // must be greater than or equal to 5 [fixed32.gte] + // fixed32 value = 1 [(buf.validate.field).fixed32.gte = 5]; + // + // // must be greater than or equal to 5 and less than 10 [fixed32.gte_lt] + // fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gte: 5, lt: 10 }]; + // + // // must be greater than or equal to 10 or less than 5 [fixed32.gte_lt_exclusive] + // fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gte: 10, lt: 5 }]; + // } + // ``` + fixed32 gte = 5 [ + (predefined).cel = { + id: "fixed32.gte" + expression: + "!has(rules.lt) && !has(rules.lte) && this < rules.gte" + "? 'must be greater than or equal to %s'.format([rules.gte]) : ''" + }, + (predefined).cel = { + id: "fixed32.gte_lt" + expression: + "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)" + "? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" + }, + (predefined).cel = { + id: "fixed32.gte_lt_exclusive" + expression: + "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)" + "? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" + }, + (predefined).cel = { + id: "fixed32.gte_lte" + expression: + "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)" + "? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" + }, + (predefined).cel = { + id: "fixed32.gte_lte_exclusive" + expression: + "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)" + "? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" + } + ]; + } + + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message + // is generated. + // + // ```proto + // message MyFixed32 { + // // must be in list [1, 2, 3] + // fixed32 value = 1 [(buf.validate.field).fixed32 = { in: [1, 2, 3] }]; + // } + // ``` + repeated fixed32 in = 6 [(predefined).cel = { + id: "fixed32.in" + expression: "!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''" + }]; + + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error + // message is generated. + // + // ```proto + // message MyFixed32 { + // // value must not be in list [1, 2, 3] + // fixed32 value = 1 [(buf.validate.field).fixed32 = { not_in: [1, 2, 3] }]; + // } + // ``` + repeated fixed32 not_in = 7 [(predefined).cel = { + id: "fixed32.not_in" + expression: "this in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''" + }]; + + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // message MyFixed32 { + // fixed32 value = 1 [ + // (buf.validate.field).fixed32.example = 1, + // (buf.validate.field).fixed32.example = 2 + // ]; + // } + // ``` + repeated fixed32 example = 8 [(predefined).cel = { + id: "fixed32.example" + expression: "true" + }]; + + // Extension fields that have the (buf.validate.predefined) option set + // will be treated as predefined field rules. + // See https://protovalidate.com/schemas/predefined-rules/ + extensions 1000 to max; +} + +// Fixed64Rules describes the rules applied to `fixed64` values. +message Fixed64Rules { + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // message MyFixed64 { + // // value must equal 42 + // fixed64 value = 1 [(buf.validate.field).fixed64.const = 42]; + // } + // ``` + optional fixed64 const = 1 [(predefined).cel = { + id: "fixed64.const" + expression: "this != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''" + }]; + oneof less_than { + // `lt` requires the field value to be less than the specified value (field < + // value). If the field value is equal to or greater than the specified value, + // an error message is generated. + // + // ```proto + // message MyFixed64 { + // // must be less than 10 + // fixed64 value = 1 [(buf.validate.field).fixed64.lt = 10]; + // } + // ``` + fixed64 lt = 2 [(predefined).cel = { + id: "fixed64.lt" + expression: + "!has(rules.gte) && !has(rules.gt) && this >= rules.lt" + "? 'must be less than %s'.format([rules.lt]) : ''" + }]; + + // `lte` requires the field value to be less than or equal to the specified + // value (field <= value). If the field value is greater than the specified + // value, an error message is generated. + // + // ```proto + // message MyFixed64 { + // // must be less than or equal to 10 + // fixed64 value = 1 [(buf.validate.field).fixed64.lte = 10]; + // } + // ``` + fixed64 lte = 3 [(predefined).cel = { + id: "fixed64.lte" + expression: + "!has(rules.gte) && !has(rules.gt) && this > rules.lte" + "? 'must be less than or equal to %s'.format([rules.lte]) : ''" + }]; + } + oneof greater_than { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // message MyFixed64 { + // // must be greater than 5 [fixed64.gt] + // fixed64 value = 1 [(buf.validate.field).fixed64.gt = 5]; + // + // // must be greater than 5 and less than 10 [fixed64.gt_lt] + // fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gt: 5, lt: 10 }]; + // + // // must be greater than 10 or less than 5 [fixed64.gt_lt_exclusive] + // fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gt: 10, lt: 5 }]; + // } + // ``` + fixed64 gt = 4 [ + (predefined).cel = { + id: "fixed64.gt" + expression: + "!has(rules.lt) && !has(rules.lte) && this <= rules.gt" + "? 'must be greater than %s'.format([rules.gt]) : ''" + }, + (predefined).cel = { + id: "fixed64.gt_lt" + expression: + "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)" + "? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" + }, + (predefined).cel = { + id: "fixed64.gt_lt_exclusive" + expression: + "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)" + "? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" + }, + (predefined).cel = { + id: "fixed64.gt_lte" + expression: + "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)" + "? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" + }, + (predefined).cel = { + id: "fixed64.gt_lte_exclusive" + expression: + "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)" + "? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" + } + ]; + + // `gte` requires the field value to be greater than or equal to the specified + // value (exclusive). If the value of `gte` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // message MyFixed64 { + // // must be greater than or equal to 5 [fixed64.gte] + // fixed64 value = 1 [(buf.validate.field).fixed64.gte = 5]; + // + // // must be greater than or equal to 5 and less than 10 [fixed64.gte_lt] + // fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gte: 5, lt: 10 }]; + // + // // must be greater than or equal to 10 or less than 5 [fixed64.gte_lt_exclusive] + // fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gte: 10, lt: 5 }]; + // } + // ``` + fixed64 gte = 5 [ + (predefined).cel = { + id: "fixed64.gte" + expression: + "!has(rules.lt) && !has(rules.lte) && this < rules.gte" + "? 'must be greater than or equal to %s'.format([rules.gte]) : ''" + }, + (predefined).cel = { + id: "fixed64.gte_lt" + expression: + "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)" + "? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" + }, + (predefined).cel = { + id: "fixed64.gte_lt_exclusive" + expression: + "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)" + "? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" + }, + (predefined).cel = { + id: "fixed64.gte_lte" + expression: + "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)" + "? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" + }, + (predefined).cel = { + id: "fixed64.gte_lte_exclusive" + expression: + "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)" + "? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" + } + ]; + } + + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message is + // generated. + // + // ```proto + // message MyFixed64 { + // // must be in list [1, 2, 3] + // fixed64 value = 1 [(buf.validate.field).fixed64 = { in: [1, 2, 3] }]; + // } + // ``` + repeated fixed64 in = 6 [(predefined).cel = { + id: "fixed64.in" + expression: "!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''" + }]; + + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error + // message is generated. + // + // ```proto + // message MyFixed64 { + // // value must not be in list [1, 2, 3] + // fixed64 value = 1 [(buf.validate.field).fixed64 = { not_in: [1, 2, 3] }]; + // } + // ``` + repeated fixed64 not_in = 7 [(predefined).cel = { + id: "fixed64.not_in" + expression: "this in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''" + }]; + + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // message MyFixed64 { + // fixed64 value = 1 [ + // (buf.validate.field).fixed64.example = 1, + // (buf.validate.field).fixed64.example = 2 + // ]; + // } + // ``` + repeated fixed64 example = 8 [(predefined).cel = { + id: "fixed64.example" + expression: "true" + }]; + + // Extension fields that have the (buf.validate.predefined) option set + // will be treated as predefined field rules. + // See https://protovalidate.com/schemas/predefined-rules/ + extensions 1000 to max; +} + +// SFixed32Rules describes the rules applied to `fixed32` values. +message SFixed32Rules { + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // message MySFixed32 { + // // value must equal 42 + // sfixed32 value = 1 [(buf.validate.field).sfixed32.const = 42]; + // } + // ``` + optional sfixed32 const = 1 [(predefined).cel = { + id: "sfixed32.const" + expression: "this != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''" + }]; + oneof less_than { + // `lt` requires the field value to be less than the specified value (field < + // value). If the field value is equal to or greater than the specified value, + // an error message is generated. + // + // ```proto + // message MySFixed32 { + // // must be less than 10 + // sfixed32 value = 1 [(buf.validate.field).sfixed32.lt = 10]; + // } + // ``` + sfixed32 lt = 2 [(predefined).cel = { + id: "sfixed32.lt" + expression: + "!has(rules.gte) && !has(rules.gt) && this >= rules.lt" + "? 'must be less than %s'.format([rules.lt]) : ''" + }]; + + // `lte` requires the field value to be less than or equal to the specified + // value (field <= value). If the field value is greater than the specified + // value, an error message is generated. + // + // ```proto + // message MySFixed32 { + // // must be less than or equal to 10 + // sfixed32 value = 1 [(buf.validate.field).sfixed32.lte = 10]; + // } + // ``` + sfixed32 lte = 3 [(predefined).cel = { + id: "sfixed32.lte" + expression: + "!has(rules.gte) && !has(rules.gt) && this > rules.lte" + "? 'must be less than or equal to %s'.format([rules.lte]) : ''" + }]; + } + oneof greater_than { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // message MySFixed32 { + // // must be greater than 5 [sfixed32.gt] + // sfixed32 value = 1 [(buf.validate.field).sfixed32.gt = 5]; + // + // // must be greater than 5 and less than 10 [sfixed32.gt_lt] + // sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gt: 5, lt: 10 }]; + // + // // must be greater than 10 or less than 5 [sfixed32.gt_lt_exclusive] + // sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gt: 10, lt: 5 }]; + // } + // ``` + sfixed32 gt = 4 [ + (predefined).cel = { + id: "sfixed32.gt" + expression: + "!has(rules.lt) && !has(rules.lte) && this <= rules.gt" + "? 'must be greater than %s'.format([rules.gt]) : ''" + }, + (predefined).cel = { + id: "sfixed32.gt_lt" + expression: + "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)" + "? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" + }, + (predefined).cel = { + id: "sfixed32.gt_lt_exclusive" + expression: + "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)" + "? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" + }, + (predefined).cel = { + id: "sfixed32.gt_lte" + expression: + "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)" + "? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" + }, + (predefined).cel = { + id: "sfixed32.gt_lte_exclusive" + expression: + "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)" + "? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" + } + ]; + + // `gte` requires the field value to be greater than or equal to the specified + // value (exclusive). If the value of `gte` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // message MySFixed32 { + // // must be greater than or equal to 5 [sfixed32.gte] + // sfixed32 value = 1 [(buf.validate.field).sfixed32.gte = 5]; + // + // // must be greater than or equal to 5 and less than 10 [sfixed32.gte_lt] + // sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gte: 5, lt: 10 }]; + // + // // must be greater than or equal to 10 or less than 5 [sfixed32.gte_lt_exclusive] + // sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gte: 10, lt: 5 }]; + // } + // ``` + sfixed32 gte = 5 [ + (predefined).cel = { + id: "sfixed32.gte" + expression: + "!has(rules.lt) && !has(rules.lte) && this < rules.gte" + "? 'must be greater than or equal to %s'.format([rules.gte]) : ''" + }, + (predefined).cel = { + id: "sfixed32.gte_lt" + expression: + "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)" + "? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" + }, + (predefined).cel = { + id: "sfixed32.gte_lt_exclusive" + expression: + "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)" + "? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" + }, + (predefined).cel = { + id: "sfixed32.gte_lte" + expression: + "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)" + "? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" + }, + (predefined).cel = { + id: "sfixed32.gte_lte_exclusive" + expression: + "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)" + "? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" + } + ]; + } + + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message is + // generated. + // + // ```proto + // message MySFixed32 { + // // must be in list [1, 2, 3] + // sfixed32 value = 1 [(buf.validate.field).sfixed32 = { in: [1, 2, 3] }]; + // } + // ``` + repeated sfixed32 in = 6 [(predefined).cel = { + id: "sfixed32.in" + expression: "!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''" + }]; + + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error + // message is generated. + // + // ```proto + // message MySFixed32 { + // // value must not be in list [1, 2, 3] + // sfixed32 value = 1 [(buf.validate.field).sfixed32 = { not_in: [1, 2, 3] }]; + // } + // ``` + repeated sfixed32 not_in = 7 [(predefined).cel = { + id: "sfixed32.not_in" + expression: "this in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''" + }]; + + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // message MySFixed32 { + // sfixed32 value = 1 [ + // (buf.validate.field).sfixed32.example = 1, + // (buf.validate.field).sfixed32.example = 2 + // ]; + // } + // ``` + repeated sfixed32 example = 8 [(predefined).cel = { + id: "sfixed32.example" + expression: "true" + }]; + + // Extension fields that have the (buf.validate.predefined) option set + // will be treated as predefined field rules. + // See https://protovalidate.com/schemas/predefined-rules/ + extensions 1000 to max; +} + +// SFixed64Rules describes the rules applied to `fixed64` values. +message SFixed64Rules { + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // message MySFixed64 { + // // value must equal 42 + // sfixed64 value = 1 [(buf.validate.field).sfixed64.const = 42]; + // } + // ``` + optional sfixed64 const = 1 [(predefined).cel = { + id: "sfixed64.const" + expression: "this != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''" + }]; + oneof less_than { + // `lt` requires the field value to be less than the specified value (field < + // value). If the field value is equal to or greater than the specified value, + // an error message is generated. + // + // ```proto + // message MySFixed64 { + // // must be less than 10 + // sfixed64 value = 1 [(buf.validate.field).sfixed64.lt = 10]; + // } + // ``` + sfixed64 lt = 2 [(predefined).cel = { + id: "sfixed64.lt" + expression: + "!has(rules.gte) && !has(rules.gt) && this >= rules.lt" + "? 'must be less than %s'.format([rules.lt]) : ''" + }]; + + // `lte` requires the field value to be less than or equal to the specified + // value (field <= value). If the field value is greater than the specified + // value, an error message is generated. + // + // ```proto + // message MySFixed64 { + // // must be less than or equal to 10 + // sfixed64 value = 1 [(buf.validate.field).sfixed64.lte = 10]; + // } + // ``` + sfixed64 lte = 3 [(predefined).cel = { + id: "sfixed64.lte" + expression: + "!has(rules.gte) && !has(rules.gt) && this > rules.lte" + "? 'must be less than or equal to %s'.format([rules.lte]) : ''" + }]; + } + oneof greater_than { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // message MySFixed64 { + // // must be greater than 5 [sfixed64.gt] + // sfixed64 value = 1 [(buf.validate.field).sfixed64.gt = 5]; + // + // // must be greater than 5 and less than 10 [sfixed64.gt_lt] + // sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gt: 5, lt: 10 }]; + // + // // must be greater than 10 or less than 5 [sfixed64.gt_lt_exclusive] + // sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gt: 10, lt: 5 }]; + // } + // ``` + sfixed64 gt = 4 [ + (predefined).cel = { + id: "sfixed64.gt" + expression: + "!has(rules.lt) && !has(rules.lte) && this <= rules.gt" + "? 'must be greater than %s'.format([rules.gt]) : ''" + }, + (predefined).cel = { + id: "sfixed64.gt_lt" + expression: + "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)" + "? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" + }, + (predefined).cel = { + id: "sfixed64.gt_lt_exclusive" + expression: + "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)" + "? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" + }, + (predefined).cel = { + id: "sfixed64.gt_lte" + expression: + "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)" + "? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" + }, + (predefined).cel = { + id: "sfixed64.gt_lte_exclusive" + expression: + "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)" + "? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" + } + ]; + + // `gte` requires the field value to be greater than or equal to the specified + // value (exclusive). If the value of `gte` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // message MySFixed64 { + // // must be greater than or equal to 5 [sfixed64.gte] + // sfixed64 value = 1 [(buf.validate.field).sfixed64.gte = 5]; + // + // // must be greater than or equal to 5 and less than 10 [sfixed64.gte_lt] + // sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gte: 5, lt: 10 }]; + // + // // must be greater than or equal to 10 or less than 5 [sfixed64.gte_lt_exclusive] + // sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gte: 10, lt: 5 }]; + // } + // ``` + sfixed64 gte = 5 [ + (predefined).cel = { + id: "sfixed64.gte" + expression: + "!has(rules.lt) && !has(rules.lte) && this < rules.gte" + "? 'must be greater than or equal to %s'.format([rules.gte]) : ''" + }, + (predefined).cel = { + id: "sfixed64.gte_lt" + expression: + "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)" + "? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" + }, + (predefined).cel = { + id: "sfixed64.gte_lt_exclusive" + expression: + "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)" + "? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" + }, + (predefined).cel = { + id: "sfixed64.gte_lte" + expression: + "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)" + "? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" + }, + (predefined).cel = { + id: "sfixed64.gte_lte_exclusive" + expression: + "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)" + "? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" + } + ]; + } + + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message is + // generated. + // + // ```proto + // message MySFixed64 { + // // must be in list [1, 2, 3] + // sfixed64 value = 1 [(buf.validate.field).sfixed64 = { in: [1, 2, 3] }]; + // } + // ``` + repeated sfixed64 in = 6 [(predefined).cel = { + id: "sfixed64.in" + expression: "!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''" + }]; + + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error + // message is generated. + // + // ```proto + // message MySFixed64 { + // // value must not be in list [1, 2, 3] + // sfixed64 value = 1 [(buf.validate.field).sfixed64 = { not_in: [1, 2, 3] }]; + // } + // ``` + repeated sfixed64 not_in = 7 [(predefined).cel = { + id: "sfixed64.not_in" + expression: "this in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''" + }]; + + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // message MySFixed64 { + // sfixed64 value = 1 [ + // (buf.validate.field).sfixed64.example = 1, + // (buf.validate.field).sfixed64.example = 2 + // ]; + // } + // ``` + repeated sfixed64 example = 8 [(predefined).cel = { + id: "sfixed64.example" + expression: "true" + }]; + + // Extension fields that have the (buf.validate.predefined) option set + // will be treated as predefined field rules. + // See https://protovalidate.com/schemas/predefined-rules/ + extensions 1000 to max; +} + +// BoolRules describes the rules applied to `bool` values. These rules +// may also be applied to the `google.protobuf.BoolValue` Well-Known-Type. +message BoolRules { + // `const` requires the field value to exactly match the specified boolean value. + // If the field value doesn't match, an error message is generated. + // + // ```proto + // message MyBool { + // // value must equal true + // bool value = 1 [(buf.validate.field).bool.const = true]; + // } + // ``` + optional bool const = 1 [(predefined).cel = { + id: "bool.const" + expression: "this != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''" + }]; + + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // message MyBool { + // bool value = 1 [ + // (buf.validate.field).bool.example = 1, + // (buf.validate.field).bool.example = 2 + // ]; + // } + // ``` + repeated bool example = 2 [(predefined).cel = { + id: "bool.example" + expression: "true" + }]; + + // Extension fields that have the (buf.validate.predefined) option set + // will be treated as predefined field rules. + // See https://protovalidate.com/schemas/predefined-rules/ + extensions 1000 to max; +} + +// StringRules describes the rules applied to `string` values These +// rules may also be applied to the `google.protobuf.StringValue` Well-Known-Type. +message StringRules { + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // message MyString { + // // value must equal `hello` + // string value = 1 [(buf.validate.field).string.const = "hello"]; + // } + // ``` + optional string const = 1 [(predefined).cel = { + id: "string.const" + expression: "this != getField(rules, 'const') ? 'must equal `%s`'.format([getField(rules, 'const')]) : ''" + }]; + + // `len` dictates that the field value must have the specified + // number of characters (Unicode code points), which may differ from the number + // of bytes in the string. If the field value does not meet the specified + // length, an error message will be generated. + // + // ```proto + // message MyString { + // // value length must be 5 characters + // string value = 1 [(buf.validate.field).string.len = 5]; + // } + // ``` + optional uint64 len = 19 [(predefined).cel = { + id: "string.len" + expression: "uint(this.size()) != rules.len ? 'must be %s characters'.format([rules.len]) : ''" + }]; + + // `min_len` specifies that the field value must have at least the specified + // number of characters (Unicode code points), which may differ from the number + // of bytes in the string. If the field value contains fewer characters, an error + // message will be generated. + // + // ```proto + // message MyString { + // // value length must be at least 3 characters + // string value = 1 [(buf.validate.field).string.min_len = 3]; + // } + // ``` + optional uint64 min_len = 2 [(predefined).cel = { + id: "string.min_len" + expression: "uint(this.size()) < rules.min_len ? 'must be at least %s characters'.format([rules.min_len]) : ''" + }]; + + // `max_len` specifies that the field value must have no more than the specified + // number of characters (Unicode code points), which may differ from the + // number of bytes in the string. If the field value contains more characters, + // an error message will be generated. + // + // ```proto + // message MyString { + // // value length must be at most 10 characters + // string value = 1 [(buf.validate.field).string.max_len = 10]; + // } + // ``` + optional uint64 max_len = 3 [(predefined).cel = { + id: "string.max_len" + expression: "uint(this.size()) > rules.max_len ? 'must be at most %s characters'.format([rules.max_len]) : ''" + }]; + + // `len_bytes` dictates that the field value must have the specified number of + // bytes. If the field value does not match the specified length in bytes, + // an error message will be generated. + // + // ```proto + // message MyString { + // // value length must be 6 bytes + // string value = 1 [(buf.validate.field).string.len_bytes = 6]; + // } + // ``` + optional uint64 len_bytes = 20 [(predefined).cel = { + id: "string.len_bytes" + expression: "uint(bytes(this).size()) != rules.len_bytes ? 'must be %s bytes'.format([rules.len_bytes]) : ''" + }]; + + // `min_bytes` specifies that the field value must have at least the specified + // number of bytes. If the field value contains fewer bytes, an error message + // will be generated. + // + // ```proto + // message MyString { + // // value length must be at least 4 bytes + // string value = 1 [(buf.validate.field).string.min_bytes = 4]; + // } + // + // ``` + optional uint64 min_bytes = 4 [(predefined).cel = { + id: "string.min_bytes" + expression: "uint(bytes(this).size()) < rules.min_bytes ? 'must be at least %s bytes'.format([rules.min_bytes]) : ''" + }]; + + // `max_bytes` specifies that the field value must have no more than the + // specified number of bytes. If the field value contains more bytes, an + // error message will be generated. + // + // ```proto + // message MyString { + // // value length must be at most 8 bytes + // string value = 1 [(buf.validate.field).string.max_bytes = 8]; + // } + // ``` + optional uint64 max_bytes = 5 [(predefined).cel = { + id: "string.max_bytes" + expression: "uint(bytes(this).size()) > rules.max_bytes ? 'must be at most %s bytes'.format([rules.max_bytes]) : ''" + }]; + + // `pattern` specifies that the field value must match the specified + // regular expression (RE2 syntax), with the expression provided without any + // delimiters. If the field value doesn't match the regular expression, an + // error message will be generated. + // + // ```proto + // message MyString { + // // value does not match regex pattern `^[a-zA-Z]//$` + // string value = 1 [(buf.validate.field).string.pattern = "^[a-zA-Z]//$"]; + // } + // ``` + optional string pattern = 6 [(predefined).cel = { + id: "string.pattern" + expression: "!this.matches(rules.pattern) ? 'does not match regex pattern `%s`'.format([rules.pattern]) : ''" + }]; + + // `prefix` specifies that the field value must have the + // specified substring at the beginning of the string. If the field value + // doesn't start with the specified prefix, an error message will be + // generated. + // + // ```proto + // message MyString { + // // value does not have prefix `pre` + // string value = 1 [(buf.validate.field).string.prefix = "pre"]; + // } + // ``` + optional string prefix = 7 [(predefined).cel = { + id: "string.prefix" + expression: "!this.startsWith(rules.prefix) ? 'does not have prefix `%s`'.format([rules.prefix]) : ''" + }]; + + // `suffix` specifies that the field value must have the + // specified substring at the end of the string. If the field value doesn't + // end with the specified suffix, an error message will be generated. + // + // ```proto + // message MyString { + // // value does not have suffix `post` + // string value = 1 [(buf.validate.field).string.suffix = "post"]; + // } + // ``` + optional string suffix = 8 [(predefined).cel = { + id: "string.suffix" + expression: "!this.endsWith(rules.suffix) ? 'does not have suffix `%s`'.format([rules.suffix]) : ''" + }]; + + // `contains` specifies that the field value must have the + // specified substring anywhere in the string. If the field value doesn't + // contain the specified substring, an error message will be generated. + // + // ```proto + // message MyString { + // // value does not contain substring `inside`. + // string value = 1 [(buf.validate.field).string.contains = "inside"]; + // } + // ``` + optional string contains = 9 [(predefined).cel = { + id: "string.contains" + expression: "!this.contains(rules.contains) ? 'does not contain substring `%s`'.format([rules.contains]) : ''" + }]; + + // `not_contains` specifies that the field value must not have the + // specified substring anywhere in the string. If the field value contains + // the specified substring, an error message will be generated. + // + // ```proto + // message MyString { + // // value contains substring `inside`. + // string value = 1 [(buf.validate.field).string.not_contains = "inside"]; + // } + // ``` + optional string not_contains = 23 [(predefined).cel = { + id: "string.not_contains" + expression: "this.contains(rules.not_contains) ? 'contains substring `%s`'.format([rules.not_contains]) : ''" + }]; + + // `in` specifies that the field value must be equal to one of the specified + // values. If the field value isn't one of the specified values, an error + // message will be generated. + // + // ```proto + // message MyString { + // // must be in list ["apple", "banana"] + // string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"]; + // } + // ``` + repeated string in = 10 [(predefined).cel = { + id: "string.in" + expression: "!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''" + }]; + + // `not_in` specifies that the field value cannot be equal to any + // of the specified values. If the field value is one of the specified values, + // an error message will be generated. + // ```proto + // message MyString { + // // value must not be in list ["orange", "grape"] + // string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"]; + // } + // ``` + repeated string not_in = 11 [(predefined).cel = { + id: "string.not_in" + expression: "this in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''" + }]; + + // `WellKnown` rules provide advanced rules against common string + // patterns. + oneof well_known { + // `email` specifies that the field value must be a valid email address, for + // example "foo@example.com". + // + // Conforms to the definition for a valid email address from the [HTML standard](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address). + // Note that this standard willfully deviates from [RFC 5322](https://datatracker.ietf.org/doc/html/rfc5322), + // which allows many unexpected forms of email addresses and will easily match + // a typographical error. + // + // If the field value isn't a valid email address, an error message will be generated. + // + // ```proto + // message MyString { + // // must be a valid email address + // string value = 1 [(buf.validate.field).string.email = true]; + // } + // ``` + bool email = 12 [ + (predefined).cel = { + id: "string.email" + message: "must be a valid email address" + expression: "!rules.email || this == '' || this.isEmail()" + }, + (predefined).cel = { + id: "string.email_empty" + message: "value is empty, which is not a valid email address" + expression: "!rules.email || this != ''" + } + ]; + + // `hostname` specifies that the field value must be a valid hostname, for + // example "foo.example.com". + // + // A valid hostname follows the rules below: + // - The name consists of one or more labels, separated by a dot ("."). + // - Each label can be 1 to 63 alphanumeric characters. + // - A label can contain hyphens ("-"), but must not start or end with a hyphen. + // - The right-most label must not be digits only. + // - The name can have a trailing dot—for example, "foo.example.com.". + // - The name can be 253 characters at most, excluding the optional trailing dot. + // + // If the field value isn't a valid hostname, an error message will be generated. + // + // ```proto + // message MyString { + // // must be a valid hostname + // string value = 1 [(buf.validate.field).string.hostname = true]; + // } + // ``` + bool hostname = 13 [ + (predefined).cel = { + id: "string.hostname" + message: "must be a valid hostname" + expression: "!rules.hostname || this == '' || this.isHostname()" + }, + (predefined).cel = { + id: "string.hostname_empty" + message: "value is empty, which is not a valid hostname" + expression: "!rules.hostname || this != ''" + } + ]; + + // `ip` specifies that the field value must be a valid IP (v4 or v6) address. + // + // IPv4 addresses are expected in the dotted decimal format—for example, "192.168.5.21". + // IPv6 addresses are expected in their text representation—for example, "::1", + // or "2001:0DB8:ABCD:0012::0". + // + // Both formats are well-defined in the internet standard [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986). + // Zone identifiers for IPv6 addresses (for example, "fe80::a%en1") are supported. + // + // If the field value isn't a valid IP address, an error message will be + // generated. + // + // ```proto + // message MyString { + // // must be a valid IP address + // string value = 1 [(buf.validate.field).string.ip = true]; + // } + // ``` + bool ip = 14 [ + (predefined).cel = { + id: "string.ip" + message: "must be a valid IP address" + expression: "!rules.ip || this == '' || this.isIp()" + }, + (predefined).cel = { + id: "string.ip_empty" + message: "value is empty, which is not a valid IP address" + expression: "!rules.ip || this != ''" + } + ]; + + // `ipv4` specifies that the field value must be a valid IPv4 address—for + // example "192.168.5.21". If the field value isn't a valid IPv4 address, an + // error message will be generated. + // + // ```proto + // message MyString { + // // must be a valid IPv4 address + // string value = 1 [(buf.validate.field).string.ipv4 = true]; + // } + // ``` + bool ipv4 = 15 [ + (predefined).cel = { + id: "string.ipv4" + message: "must be a valid IPv4 address" + expression: "!rules.ipv4 || this == '' || this.isIp(4)" + }, + (predefined).cel = { + id: "string.ipv4_empty" + message: "value is empty, which is not a valid IPv4 address" + expression: "!rules.ipv4 || this != ''" + } + ]; + + // `ipv6` specifies that the field value must be a valid IPv6 address—for + // example "::1", or "d7a:115c:a1e0:ab12:4843:cd96:626b:430b". If the field + // value is not a valid IPv6 address, an error message will be generated. + // + // ```proto + // message MyString { + // // must be a valid IPv6 address + // string value = 1 [(buf.validate.field).string.ipv6 = true]; + // } + // ``` + bool ipv6 = 16 [ + (predefined).cel = { + id: "string.ipv6" + message: "must be a valid IPv6 address" + expression: "!rules.ipv6 || this == '' || this.isIp(6)" + }, + (predefined).cel = { + id: "string.ipv6_empty" + message: "value is empty, which is not a valid IPv6 address" + expression: "!rules.ipv6 || this != ''" + } + ]; + + // `uri` specifies that the field value must be a valid URI, for example + // "https://example.com/foo/bar?baz=quux#frag". + // + // URI is defined in the internet standard [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986). + // Zone Identifiers in IPv6 address literals are supported ([RFC 6874](https://datatracker.ietf.org/doc/html/rfc6874)). + // + // If the field value isn't a valid URI, an error message will be generated. + // + // ```proto + // message MyString { + // // must be a valid URI + // string value = 1 [(buf.validate.field).string.uri = true]; + // } + // ``` + bool uri = 17 [ + (predefined).cel = { + id: "string.uri" + message: "must be a valid URI" + expression: "!rules.uri || this == '' || this.isUri()" + }, + (predefined).cel = { + id: "string.uri_empty" + message: "value is empty, which is not a valid URI" + expression: "!rules.uri || this != ''" + } + ]; + + // `uri_ref` specifies that the field value must be a valid URI Reference—either + // a URI such as "https://example.com/foo/bar?baz=quux#frag", or a Relative + // Reference such as "./foo/bar?query". + // + // URI, URI Reference, and Relative Reference are defined in the internet + // standard [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986). Zone + // Identifiers in IPv6 address literals are supported ([RFC 6874](https://datatracker.ietf.org/doc/html/rfc6874)). + // + // If the field value isn't a valid URI Reference, an error message will be + // generated. + // + // ```proto + // message MyString { + // // must be a valid URI Reference + // string value = 1 [(buf.validate.field).string.uri_ref = true]; + // } + // ``` + bool uri_ref = 18 [(predefined).cel = { + id: "string.uri_ref" + message: "must be a valid URI Reference" + expression: "!rules.uri_ref || this.isUriRef()" + }]; + + // `address` specifies that the field value must be either a valid hostname + // (for example, "example.com"), or a valid IP (v4 or v6) address (for example, + // "192.168.0.1", or "::1"). If the field value isn't a valid hostname or IP, + // an error message will be generated. + // + // ```proto + // message MyString { + // // must be a valid hostname, or ip address + // string value = 1 [(buf.validate.field).string.address = true]; + // } + // ``` + bool address = 21 [ + (predefined).cel = { + id: "string.address" + message: "must be a valid hostname, or ip address" + expression: "!rules.address || this == '' || this.isHostname() || this.isIp()" + }, + (predefined).cel = { + id: "string.address_empty" + message: "value is empty, which is not a valid hostname, or ip address" + expression: "!rules.address || this != ''" + } + ]; + + // `uuid` specifies that the field value must be a valid UUID as defined by + // [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.2). If the + // field value isn't a valid UUID, an error message will be generated. + // + // ```proto + // message MyString { + // // must be a valid UUID + // string value = 1 [(buf.validate.field).string.uuid = true]; + // } + // ``` + bool uuid = 22 [ + (predefined).cel = { + id: "string.uuid" + message: "must be a valid UUID" + expression: "!rules.uuid || this == '' || this.matches('^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$')" + }, + (predefined).cel = { + id: "string.uuid_empty" + message: "value is empty, which is not a valid UUID" + expression: "!rules.uuid || this != ''" + } + ]; + + // `tuuid` (trimmed UUID) specifies that the field value must be a valid UUID as + // defined by [RFC 4122](https://datatracker.ietf.org/doc/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 { + // // must be a valid trimmed UUID + // string value = 1 [(buf.validate.field).string.tuuid = true]; + // } + // ``` + bool tuuid = 33 [ + (predefined).cel = { + id: "string.tuuid" + message: "must be a valid trimmed UUID" + expression: "!rules.tuuid || this == '' || this.matches('^[0-9a-fA-F]{32}$')" + }, + (predefined).cel = { + id: "string.tuuid_empty" + message: "value is empty, which is not a valid trimmed UUID" + expression: "!rules.tuuid || this != ''" + } + ]; + + // `ip_with_prefixlen` specifies that the field value must be a valid IP + // (v4 or v6) address with prefix length—for example, "192.168.5.21/16" or + // "2001:0DB8:ABCD:0012::F1/64". If the field value isn't a valid IP with + // prefix length, an error message will be generated. + // + // ```proto + // message MyString { + // // must be a valid IP with prefix length + // string value = 1 [(buf.validate.field).string.ip_with_prefixlen = true]; + // } + // ``` + bool ip_with_prefixlen = 26 [ + (predefined).cel = { + id: "string.ip_with_prefixlen" + message: "must be a valid IP prefix" + expression: "!rules.ip_with_prefixlen || this == '' || this.isIpPrefix()" + }, + (predefined).cel = { + id: "string.ip_with_prefixlen_empty" + message: "value is empty, which is not a valid IP prefix" + expression: "!rules.ip_with_prefixlen || this != ''" + } + ]; + + // `ipv4_with_prefixlen` specifies that the field value must be a valid + // IPv4 address with prefix length—for example, "192.168.5.21/16". If the + // field value isn't a valid IPv4 address with prefix length, an error + // message will be generated. + // + // ```proto + // message MyString { + // // must be a valid IPv4 address with prefix length + // string value = 1 [(buf.validate.field).string.ipv4_with_prefixlen = true]; + // } + // ``` + bool ipv4_with_prefixlen = 27 [ + (predefined).cel = { + id: "string.ipv4_with_prefixlen" + message: "must be a valid IPv4 address with prefix length" + expression: "!rules.ipv4_with_prefixlen || this == '' || this.isIpPrefix(4)" + }, + (predefined).cel = { + id: "string.ipv4_with_prefixlen_empty" + message: "value is empty, which is not a valid IPv4 address with prefix length" + expression: "!rules.ipv4_with_prefixlen || this != ''" + } + ]; + + // `ipv6_with_prefixlen` specifies that the field value must be a valid + // IPv6 address with prefix length—for example, "2001:0DB8:ABCD:0012::F1/64". + // If the field value is not a valid IPv6 address with prefix length, + // an error message will be generated. + // + // ```proto + // message MyString { + // // must be a valid IPv6 address prefix length + // string value = 1 [(buf.validate.field).string.ipv6_with_prefixlen = true]; + // } + // ``` + bool ipv6_with_prefixlen = 28 [ + (predefined).cel = { + id: "string.ipv6_with_prefixlen" + message: "must be a valid IPv6 address with prefix length" + expression: "!rules.ipv6_with_prefixlen || this == '' || this.isIpPrefix(6)" + }, + (predefined).cel = { + id: "string.ipv6_with_prefixlen_empty" + message: "value is empty, which is not a valid IPv6 address with prefix length" + expression: "!rules.ipv6_with_prefixlen || this != ''" + } + ]; + + // `ip_prefix` specifies that the field value must be a valid IP (v4 or v6) + // prefix—for example, "192.168.0.0/16" or "2001:0DB8:ABCD:0012::0/64". + // + // The prefix must have all zeros for the unmasked bits. For example, + // "2001:0DB8:ABCD:0012::0/64" designates the left-most 64 bits for the + // prefix, and the remaining 64 bits must be zero. + // + // If the field value isn't a valid IP prefix, an error message will be + // generated. + // + // ```proto + // message MyString { + // // must be a valid IP prefix + // string value = 1 [(buf.validate.field).string.ip_prefix = true]; + // } + // ``` + bool ip_prefix = 29 [ + (predefined).cel = { + id: "string.ip_prefix" + message: "must be a valid IP prefix" + expression: "!rules.ip_prefix || this == '' || this.isIpPrefix(true)" + }, + (predefined).cel = { + id: "string.ip_prefix_empty" + message: "value is empty, which is not a valid IP prefix" + expression: "!rules.ip_prefix || this != ''" + } + ]; + + // `ipv4_prefix` specifies that the field value must be a valid IPv4 + // prefix, for example "192.168.0.0/16". + // + // The prefix must have all zeros for the unmasked bits. For example, + // "192.168.0.0/16" designates the left-most 16 bits for the prefix, + // and the remaining 16 bits must be zero. + // + // If the field value isn't a valid IPv4 prefix, an error message + // will be generated. + // + // ```proto + // message MyString { + // // must be a valid IPv4 prefix + // string value = 1 [(buf.validate.field).string.ipv4_prefix = true]; + // } + // ``` + bool ipv4_prefix = 30 [ + (predefined).cel = { + id: "string.ipv4_prefix" + message: "must be a valid IPv4 prefix" + expression: "!rules.ipv4_prefix || this == '' || this.isIpPrefix(4, true)" + }, + (predefined).cel = { + id: "string.ipv4_prefix_empty" + message: "value is empty, which is not a valid IPv4 prefix" + expression: "!rules.ipv4_prefix || this != ''" + } + ]; + + // `ipv6_prefix` specifies that the field value must be a valid IPv6 prefix—for + // example, "2001:0DB8:ABCD:0012::0/64". + // + // The prefix must have all zeros for the unmasked bits. For example, + // "2001:0DB8:ABCD:0012::0/64" designates the left-most 64 bits for the + // prefix, and the remaining 64 bits must be zero. + // + // If the field value is not a valid IPv6 prefix, an error message will be + // generated. + // + // ```proto + // message MyString { + // // must be a valid IPv6 prefix + // string value = 1 [(buf.validate.field).string.ipv6_prefix = true]; + // } + // ``` + bool ipv6_prefix = 31 [ + (predefined).cel = { + id: "string.ipv6_prefix" + message: "must be a valid IPv6 prefix" + expression: "!rules.ipv6_prefix || this == '' || this.isIpPrefix(6, true)" + }, + (predefined).cel = { + id: "string.ipv6_prefix_empty" + message: "value is empty, which is not a valid IPv6 prefix" + expression: "!rules.ipv6_prefix || this != ''" + } + ]; + + // `host_and_port` specifies that the field value must be a valid host/port + // pair—for example, "example.com:8080". + // + // The host can be one of: + // - An IPv4 address in dotted decimal format—for example, "192.168.5.21". + // - An IPv6 address enclosed in square brackets—for example, "[2001:0DB8:ABCD:0012::F1]". + // - A hostname—for example, "example.com". + // + // The port is separated by a colon. It must be non-empty, with a decimal number + // in the range of 0-65535, inclusive. + bool host_and_port = 32 [ + (predefined).cel = { + id: "string.host_and_port" + message: "must be a valid host (hostname or IP address) and port pair" + expression: "!rules.host_and_port || this == '' || this.isHostAndPort(true)" + }, + (predefined).cel = { + id: "string.host_and_port_empty" + message: "value is empty, which is not a valid host and port pair" + expression: "!rules.host_and_port || this != ''" + } + ]; + + // `ulid` specifies that the field value must be a valid ULID (Universally Unique + // Lexicographically Sortable Identifier) as defined by the [ULID specification](https://github.com/ulid/spec). + // If the field value isn't a valid ULID, an error message will be generated. + // + // ```proto + // message MyString { + // // must be a valid ULID + // string value = 1 [(buf.validate.field).string.ulid = true]; + // } + // ``` + bool ulid = 35 [ + (predefined).cel = { + id: "string.ulid" + message: "must be a valid ULID" + expression: "!rules.ulid || this == '' || this.matches('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$')" + }, + (predefined).cel = { + id: "string.ulid_empty" + message: "value is empty, which is not a valid ULID" + expression: "!rules.ulid || this != ''" + } + ]; + + // `protobuf_fqn` specifies that the field value must be a valid fully-qualified + // Protobuf name as defined by the [Protobuf Language Specification](https://protobuf.com/docs/language-spec). + // + // A fully-qualified Protobuf name is a dot-separated list of Protobuf identifiers, + // where each identifier starts with a letter or underscore and is followed by zero or + // more letters, underscores, or digits. + // + // Examples: "buf.validate", "google.protobuf.Timestamp", "my_package.MyMessage". + // + // Note: historically, fully-qualified Protobuf names were represented with a leading + // dot (for example, ".buf.validate.StringRules"). Modern Protobuf does not use the + // leading dot, and most fully-qualified names are represented without it. Use + // `protobuf_dot_fqn` if a leading dot is required. + // + // If the field value isn't a valid fully-qualified Protobuf name, an error message + // will be generated. + // + // ```proto + // message MyString { + // // value must be a valid fully-qualified Protobuf name + // string value = 1 [(buf.validate.field).string.protobuf_fqn = true]; + // } + // ``` + bool protobuf_fqn = 37 [ + (predefined).cel = { + id: "string.protobuf_fqn" + message: "must be a valid fully-qualified Protobuf name" + expression: "!rules.protobuf_fqn || this == '' || this.matches('^[A-Za-z_][A-Za-z_0-9]*(\\\\.[A-Za-z_][A-Za-z_0-9]*)*$')" + }, + (predefined).cel = { + id: "string.protobuf_fqn_empty" + message: "value is empty, which is not a valid fully-qualified Protobuf name" + expression: "!rules.protobuf_fqn || this != ''" + } + ]; + + // `protobuf_dot_fqn` specifies that the field value must be a valid fully-qualified + // Protobuf name with a leading dot, as defined by the + // [Protobuf Language Specification](https://protobuf.com/docs/language-spec). + // + // A fully-qualified Protobuf name with a leading dot is a dot followed by a + // dot-separated list of Protobuf identifiers, where each identifier starts with a + // letter or underscore and is followed by zero or more letters, underscores, or + // digits. + // + // Examples: ".buf.validate", ".google.protobuf.Timestamp", ".my_package.MyMessage". + // + // Note: this is the historical representation of fully-qualified Protobuf names, + // where a leading dot denotes an absolute reference. Modern Protobuf does not use + // the leading dot, and most fully-qualified names are represented without it. Most + // users will want to use `protobuf_fqn` instead. + // + // If the field value isn't a valid fully-qualified Protobuf name with a leading dot, + // an error message will be generated. + // + // ```proto + // message MyString { + // // value must be a valid fully-qualified Protobuf name with a leading dot + // string value = 1 [(buf.validate.field).string.protobuf_dot_fqn = true]; + // } + // ``` + bool protobuf_dot_fqn = 38 [ + (predefined).cel = { + id: "string.protobuf_dot_fqn" + message: "must be a valid fully-qualified Protobuf name with a leading dot" + expression: "!rules.protobuf_dot_fqn || this == '' || this.matches('^\\\\.[A-Za-z_][A-Za-z_0-9]*(\\\\.[A-Za-z_][A-Za-z_0-9]*)*$')" + }, + (predefined).cel = { + id: "string.protobuf_dot_fqn_empty" + message: "value is empty, which is not a valid fully-qualified Protobuf name with a leading dot" + expression: "!rules.protobuf_dot_fqn || this != ''" + } + ]; + + // `well_known_regex` specifies a common well-known pattern + // defined as a regex. If the field value doesn't match the well-known + // regex, an error message will be generated. + // + // ```proto + // message MyString { + // // must be a valid HTTP header value + // string value = 1 [(buf.validate.field).string.well_known_regex = KNOWN_REGEX_HTTP_HEADER_VALUE]; + // } + // ``` + // + // #### KnownRegex + // + // `well_known_regex` contains some well-known patterns. + // + // | Name | Number | Description | + // |-------------------------------|--------|-------------------------------------------| + // | KNOWN_REGEX_UNSPECIFIED | 0 | | + // | KNOWN_REGEX_HTTP_HEADER_NAME | 1 | HTTP header name as defined by [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2) | + // | KNOWN_REGEX_HTTP_HEADER_VALUE | 2 | HTTP header value as defined by [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4) | + KnownRegex well_known_regex = 24 [ + (predefined).cel = { + id: "string.well_known_regex.header_name" + message: "must be a valid HTTP header name" + expression: + "rules.well_known_regex != 1 || this == '' || this.matches(!has(rules.strict) || rules.strict ?" + "'^:?[0-9a-zA-Z!#$%&\\'*+-.^_|~\\x60]+$' :" + "'^[^\\u0000\\u000A\\u000D]+$')" + }, + (predefined).cel = { + id: "string.well_known_regex.header_name_empty" + message: "value is empty, which is not a valid HTTP header name" + expression: "rules.well_known_regex != 1 || this != ''" + }, + (predefined).cel = { + id: "string.well_known_regex.header_value" + message: "must be a valid HTTP header value" + expression: + "rules.well_known_regex != 2 || this.matches(!has(rules.strict) || rules.strict ?" + "'^[^\\u0000-\\u0008\\u000A-\\u001F\\u007F]*$' :" + "'^[^\\u0000\\u000A\\u000D]*$')" + } + ]; + } + + // This applies to regexes `HTTP_HEADER_NAME` and `HTTP_HEADER_VALUE` to + // enable strict header validation. By default, this is true, and HTTP header + // validations are [RFC-compliant](https://datatracker.ietf.org/doc/html/rfc7230#section-3). Setting to false will enable looser + // validations that only disallow `\r\n\0` characters, which can be used to + // bypass header matching rules. + // + // ```proto + // message MyString { + // // The field `value` must have be a valid HTTP headers, but not enforced with strict rules. + // string value = 1 [(buf.validate.field).string.strict = false]; + // } + // ``` + optional bool strict = 25; + + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // message MyString { + // string value = 1 [ + // (buf.validate.field).string.example = "hello", + // (buf.validate.field).string.example = "world" + // ]; + // } + // ``` + repeated string example = 34 [(predefined).cel = { + id: "string.example" + expression: "true" + }]; + + // Extension fields that have the (buf.validate.predefined) option set + // will be treated as predefined field rules. + // See https://protovalidate.com/schemas/predefined-rules/ + extensions 1000 to max; +} + +// KnownRegex contains some well-known patterns. +enum KnownRegex { + KNOWN_REGEX_UNSPECIFIED = 0; + + // HTTP header name as defined by [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2). + KNOWN_REGEX_HTTP_HEADER_NAME = 1; + + // HTTP header value as defined by [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4). + KNOWN_REGEX_HTTP_HEADER_VALUE = 2; +} + +// BytesRules describe the rules applied to `bytes` values. These rules +// may also be applied to the `google.protobuf.BytesValue` Well-Known-Type. +message BytesRules { + // `const` requires the field value to exactly match the specified bytes + // value. If the field value doesn't match, an error message is generated. + // + // ```proto + // message MyBytes { + // // must be "\x01\x02\x03\x04" + // bytes value = 1 [(buf.validate.field).bytes.const = "\x01\x02\x03\x04"]; + // } + // ``` + optional bytes const = 1 [(predefined).cel = { + id: "bytes.const" + expression: "this != getField(rules, 'const') ? 'must be %x'.format([getField(rules, 'const')]) : ''" + }]; + + // `len` requires the field value to have the specified length in bytes. + // If the field value doesn't match, an error message is generated. + // + // ```proto + // message MyBytes { + // // value length must be 4 bytes. + // optional bytes value = 1 [(buf.validate.field).bytes.len = 4]; + // } + // ``` + optional uint64 len = 13 [(predefined).cel = { + id: "bytes.len" + expression: "uint(this.size()) != rules.len ? 'must be %s bytes'.format([rules.len]) : ''" + }]; + + // `min_len` requires the field value to have at least the specified minimum + // length in bytes. + // If the field value doesn't meet the requirement, an error message is generated. + // + // ```proto + // message MyBytes { + // // value length must be at least 2 bytes. + // optional bytes value = 1 [(buf.validate.field).bytes.min_len = 2]; + // } + // ``` + optional uint64 min_len = 2 [(predefined).cel = { + id: "bytes.min_len" + expression: "uint(this.size()) < rules.min_len ? 'must be at least %s bytes'.format([rules.min_len]) : ''" + }]; + + // `max_len` requires the field value to have at most the specified maximum + // length in bytes. + // If the field value exceeds the requirement, an error message is generated. + // + // ```proto + // message MyBytes { + // // must be at most 6 bytes. + // optional bytes value = 1 [(buf.validate.field).bytes.max_len = 6]; + // } + // ``` + optional uint64 max_len = 3 [(predefined).cel = { + id: "bytes.max_len" + expression: "uint(this.size()) > rules.max_len ? 'must be at most %s bytes'.format([rules.max_len]) : ''" + }]; + + // `pattern` requires the field value to match the specified regular + // expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)). + // The value of the field must be valid UTF-8 or validation will fail with a + // runtime error. + // If the field value doesn't match the pattern, an error message is generated. + // + // ```proto + // message MyBytes { + // // value must match regex pattern "^[a-zA-Z0-9]+$". + // optional bytes value = 1 [(buf.validate.field).bytes.pattern = "^[a-zA-Z0-9]+$"]; + // } + // ``` + optional string pattern = 4 [(predefined).cel = { + id: "bytes.pattern" + expression: "!string(this).matches(rules.pattern) ? 'must match regex pattern `%s`'.format([rules.pattern]) : ''" + }]; + + // `prefix` requires the field value to have the specified bytes at the + // beginning of the string. + // If the field value doesn't meet the requirement, an error message is generated. + // + // ```proto + // message MyBytes { + // // value does not have prefix \x01\x02 + // optional bytes value = 1 [(buf.validate.field).bytes.prefix = "\x01\x02"]; + // } + // ``` + optional bytes prefix = 5 [(predefined).cel = { + id: "bytes.prefix" + expression: "!this.startsWith(rules.prefix) ? 'does not have prefix %x'.format([rules.prefix]) : ''" + }]; + + // `suffix` requires the field value to have the specified bytes at the end + // of the string. + // If the field value doesn't meet the requirement, an error message is generated. + // + // ```proto + // message MyBytes { + // // value does not have suffix \x03\x04 + // optional bytes value = 1 [(buf.validate.field).bytes.suffix = "\x03\x04"]; + // } + // ``` + optional bytes suffix = 6 [(predefined).cel = { + id: "bytes.suffix" + expression: "!this.endsWith(rules.suffix) ? 'does not have suffix %x'.format([rules.suffix]) : ''" + }]; + + // `contains` requires the field value to have the specified bytes anywhere in + // the string. + // If the field value doesn't meet the requirement, an error message is generated. + // + // ```proto + // message MyBytes { + // // value does not contain \x02\x03 + // optional bytes value = 1 [(buf.validate.field).bytes.contains = "\x02\x03"]; + // } + // ``` + optional bytes contains = 7 [(predefined).cel = { + id: "bytes.contains" + expression: "!this.contains(rules.contains) ? 'does not contain %x'.format([rules.contains]) : ''" + }]; + + // `in` requires the field value to be equal to one of the specified + // values. If the field value doesn't match any of the specified values, an + // error message is generated. + // + // ```proto + // message MyBytes { + // // value must in ["\x01\x02", "\x02\x03", "\x03\x04"] + // optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}]; + // } + // ``` + repeated bytes in = 8 [(predefined).cel = { + id: "bytes.in" + expression: "getField(rules, 'in').size() > 0 && !(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''" + }]; + + // `not_in` requires the field value to be not equal to any of the specified + // values. + // If the field value matches any of the specified values, an error message is + // generated. + // + // ```proto + // message MyBytes { + // // value must not in ["\x01\x02", "\x02\x03", "\x03\x04"] + // optional bytes value = 1 [(buf.validate.field).bytes.not_in = {"\x01\x02", "\x02\x03", "\x03\x04"}]; + // } + // ``` + repeated bytes not_in = 9 [(predefined).cel = { + id: "bytes.not_in" + expression: "this in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''" + }]; + + // WellKnown rules provide advanced rules against common byte + // patterns + oneof well_known { + // `ip` ensures that the field `value` is a valid IP address (v4 or v6) in byte format. + // If the field value doesn't meet this rule, an error message is generated. + // + // ```proto + // message MyBytes { + // // must be a valid IP address + // optional bytes value = 1 [(buf.validate.field).bytes.ip = true]; + // } + // ``` + bool ip = 10 [ + (predefined).cel = { + id: "bytes.ip" + message: "must be a valid IP address" + expression: "!rules.ip || this.size() == 0 || this.size() == 4 || this.size() == 16" + }, + (predefined).cel = { + id: "bytes.ip_empty" + message: "value is empty, which is not a valid IP address" + expression: "!rules.ip || this.size() != 0" + } + ]; + + // `ipv4` ensures that the field `value` is a valid IPv4 address in byte format. + // If the field value doesn't meet this rule, an error message is generated. + // + // ```proto + // message MyBytes { + // // must be a valid IPv4 address + // optional bytes value = 1 [(buf.validate.field).bytes.ipv4 = true]; + // } + // ``` + bool ipv4 = 11 [ + (predefined).cel = { + id: "bytes.ipv4" + message: "must be a valid IPv4 address" + expression: "!rules.ipv4 || this.size() == 0 || this.size() == 4" + }, + (predefined).cel = { + id: "bytes.ipv4_empty" + message: "value is empty, which is not a valid IPv4 address" + expression: "!rules.ipv4 || this.size() != 0" + } + ]; + + // `ipv6` ensures that the field `value` is a valid IPv6 address in byte format. + // If the field value doesn't meet this rule, an error message is generated. + // ```proto + // message MyBytes { + // // must be a valid IPv6 address + // optional bytes value = 1 [(buf.validate.field).bytes.ipv6 = true]; + // } + // ``` + bool ipv6 = 12 [ + (predefined).cel = { + id: "bytes.ipv6" + message: "must be a valid IPv6 address" + expression: "!rules.ipv6 || this.size() == 0 || this.size() == 16" + }, + (predefined).cel = { + id: "bytes.ipv6_empty" + message: "value is empty, which is not a valid IPv6 address" + expression: "!rules.ipv6 || this.size() != 0" + } + ]; + + // `uuid` ensures that the field value encodes 128-bit UUID data as defined + // by [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.2). + // The field must contain exactly 16 bytes representing the UUID. If the + // field value isn't a valid UUID, an error message will be generated. + // + // ```proto + // message MyBytes { + // // must be a valid UUID + // optional bytes value = 1 [(buf.validate.field).bytes.uuid = true]; + // } + // ``` + bool uuid = 15 [ + (predefined).cel = { + id: "bytes.uuid" + message: "must be a valid UUID" + expression: "!rules.uuid || this.size() == 0 || this.size() == 16" + }, + (predefined).cel = { + id: "bytes.uuid_empty" + message: "value is empty, which is not a valid UUID" + expression: "!rules.uuid || this.size() != 0" + } + ]; + } + + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // message MyBytes { + // bytes value = 1 [ + // (buf.validate.field).bytes.example = "\x01\x02", + // (buf.validate.field).bytes.example = "\x02\x03" + // ]; + // } + // ``` + repeated bytes example = 14 [(predefined).cel = { + id: "bytes.example" + expression: "true" + }]; + + // Extension fields that have the (buf.validate.predefined) option set + // will be treated as predefined field rules. + // See https://protovalidate.com/schemas/predefined-rules/ + extensions 1000 to max; +} + +// EnumRules describe the rules applied to `enum` values. +message EnumRules { + // `const` requires the field value to exactly match the specified enum value. + // If the field value doesn't match, an error message is generated. + // + // ```proto + // enum MyEnum { + // MY_ENUM_UNSPECIFIED = 0; + // MY_ENUM_VALUE1 = 1; + // MY_ENUM_VALUE2 = 2; + // } + // + // message MyMessage { + // // The field `value` must be exactly MY_ENUM_VALUE1. + // MyEnum value = 1 [(buf.validate.field).enum.const = 1]; + // } + // ``` + optional int32 const = 1 [(predefined).cel = { + id: "enum.const" + expression: "this != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''" + }]; + + // `defined_only` requires the field value to be one of the defined values for + // this enum, failing on any undefined value. + // + // ```proto + // enum MyEnum { + // MY_ENUM_UNSPECIFIED = 0; + // MY_ENUM_VALUE1 = 1; + // MY_ENUM_VALUE2 = 2; + // } + // + // message MyMessage { + // // The field `value` must be a defined value of MyEnum. + // MyEnum value = 1 [(buf.validate.field).enum.defined_only = true]; + // } + // ``` + optional bool defined_only = 2; + + // `in` requires the field value to be equal to one of the + // specified enum values. If the field value doesn't match any of the + // specified values, an error message is generated. + // + // ```proto + // enum MyEnum { + // MY_ENUM_UNSPECIFIED = 0; + // MY_ENUM_VALUE1 = 1; + // MY_ENUM_VALUE2 = 2; + // } + // + // message MyMessage { + // // The field `value` must be equal to one of the specified values. + // MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}]; + // } + // ``` + repeated int32 in = 3 [(predefined).cel = { + id: "enum.in" + expression: "!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''" + }]; + + // `not_in` requires the field value to be not equal to any of the + // specified enum values. If the field value matches one of the specified + // values, an error message is generated. + // + // ```proto + // enum MyEnum { + // MY_ENUM_UNSPECIFIED = 0; + // MY_ENUM_VALUE1 = 1; + // MY_ENUM_VALUE2 = 2; + // } + // + // message MyMessage { + // // The field `value` must not be equal to any of the specified values. + // MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}]; + // } + // ``` + repeated int32 not_in = 4 [(predefined).cel = { + id: "enum.not_in" + expression: "this in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''" + }]; + + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // enum MyEnum { + // MY_ENUM_UNSPECIFIED = 0; + // MY_ENUM_VALUE1 = 1; + // MY_ENUM_VALUE2 = 2; + // } + // + // message MyMessage { + // (buf.validate.field).enum.example = 1, + // (buf.validate.field).enum.example = 2 + // } + // ``` + repeated int32 example = 5 [(predefined).cel = { + id: "enum.example" + expression: "true" + }]; + + // Extension fields that have the (buf.validate.predefined) option set + // will be treated as predefined field rules. + // See https://protovalidate.com/schemas/predefined-rules/ + extensions 1000 to max; +} + +// RepeatedRules describe the rules applied to `repeated` values. +message RepeatedRules { + // `min_items` requires that this field must contain at least the specified + // minimum number of items. + // + // Note that `min_items = 1` is equivalent to setting a field as `required`. + // + // ```proto + // message MyRepeated { + // // value must contain at least 2 items + // repeated string value = 1 [(buf.validate.field).repeated.min_items = 2]; + // } + // ``` + optional uint64 min_items = 1 [(predefined).cel = { + id: "repeated.min_items" + expression: "uint(this.size()) < rules.min_items ? 'must contain at least %d item(s)'.format([rules.min_items]) : ''" + }]; + + // `max_items` denotes that this field must not exceed a + // certain number of items as the upper limit. If the field contains more + // items than specified, an error message will be generated, requiring the + // field to maintain no more than the specified number of items. + // + // ```proto + // message MyRepeated { + // // value must contain no more than 3 item(s) + // repeated string value = 1 [(buf.validate.field).repeated.max_items = 3]; + // } + // ``` + optional uint64 max_items = 2 [(predefined).cel = { + id: "repeated.max_items" + expression: "uint(this.size()) > rules.max_items ? 'must contain no more than %s item(s)'.format([rules.max_items]) : ''" + }]; + + // `unique` indicates that all elements in this field must + // be unique. This rule is strictly applicable to scalar and enum + // types, with message types not being supported. + // + // ```proto + // message MyRepeated { + // // repeated value must contain unique items + // repeated string value = 1 [(buf.validate.field).repeated.unique = true]; + // } + // ``` + optional bool unique = 3 [(predefined).cel = { + id: "repeated.unique" + message: "repeated value must contain unique items" + expression: "!rules.unique || this.unique()" + }]; + + // `items` details the rules to be applied to each item + // in the field. Even for repeated message fields, validation is executed + // against each item unless `ignore` is specified. + // + // ```proto + // message MyRepeated { + // // The items in the field `value` must follow the specified rules. + // repeated string value = 1 [(buf.validate.field).repeated.items = { + // string: { + // min_len: 3 + // max_len: 10 + // } + // }]; + // } + // ``` + // + // Note that the `required` rule does not apply. Repeated items + // cannot be unset. + optional FieldRules items = 4; + + // Extension fields that have the (buf.validate.predefined) option set + // will be treated as predefined field rules. + // See https://protovalidate.com/schemas/predefined-rules/ + extensions 1000 to max; +} + +// MapRules describe the rules applied to `map` values. +message MapRules { + // Specifies the minimum number of key-value pairs allowed. If the field has + // fewer key-value pairs than specified, an error message is generated. + // + // ```proto + // message MyMap { + // // The field `value` must have at least 2 key-value pairs. + // map value = 1 [(buf.validate.field).map.min_pairs = 2]; + // } + // ``` + optional uint64 min_pairs = 1 [(predefined).cel = { + id: "map.min_pairs" + expression: "uint(this.size()) < rules.min_pairs ? 'map must be at least %d entries'.format([rules.min_pairs]) : ''" + }]; + + // Specifies the maximum number of key-value pairs allowed. If the field has + // more key-value pairs than specified, an error message is generated. + // + // ```proto + // message MyMap { + // // The field `value` must have at most 3 key-value pairs. + // map value = 1 [(buf.validate.field).map.max_pairs = 3]; + // } + // ``` + optional uint64 max_pairs = 2 [(predefined).cel = { + id: "map.max_pairs" + expression: "uint(this.size()) > rules.max_pairs ? 'map must be at most %d entries'.format([rules.max_pairs]) : ''" + }]; + + // Specifies the rules to be applied to each key in the field. + // + // ```proto + // message MyMap { + // // The keys in the field `value` must follow the specified rules. + // map value = 1 [(buf.validate.field).map.keys = { + // string: { + // min_len: 3 + // max_len: 10 + // } + // }]; + // } + // ``` + // + // Note that the `required` rule does not apply. Map keys cannot be unset. + optional FieldRules keys = 4; + + // Specifies the rules to be applied to the value of each key in the + // field. Message values will still have their validations evaluated unless + // `ignore` is specified. + // + // ```proto + // message MyMap { + // // The values in the field `value` must follow the specified rules. + // map value = 1 [(buf.validate.field).map.values = { + // string: { + // min_len: 5 + // max_len: 20 + // } + // }]; + // } + // ``` + // Note that the `required` rule does not apply. Map values cannot be unset. + optional FieldRules values = 5; + + // Extension fields that have the (buf.validate.predefined) option set + // will be treated as predefined field rules. + // See https://protovalidate.com/schemas/predefined-rules/ + extensions 1000 to max; +} + +// AnyRules describe rules applied exclusively to the `google.protobuf.Any` well-known type. +message AnyRules { + // `in` requires the field's `type_url` to be equal to one of the + // specified values. If it doesn't match any of the specified values, an error + // message is generated. + // + // ```proto + // message MyAny { + // // The `value` field must have a `type_url` equal to one of the specified values. + // google.protobuf.Any value = 1 [(buf.validate.field).any = { + // in: ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"] + // }]; + // } + // ``` + repeated string in = 2; + + // `not_in` requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated. + // + // ```proto + // message MyAny { + // // The `value` field must not have a `type_url` equal to any of the specified values. + // google.protobuf.Any value = 1 [(buf.validate.field).any = { + // not_in: ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"] + // }]; + // } + // ``` + repeated string not_in = 3; +} + +// DurationRules describe the rules applied exclusively to the `google.protobuf.Duration` well-known type. +message DurationRules { + // `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly. + // If the field's value deviates from the specified value, an error message + // will be generated. + // + // ```proto + // message MyDuration { + // // value must equal 5s + // google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"]; + // } + // ``` + optional google.protobuf.Duration const = 2 [(predefined).cel = { + id: "duration.const" + expression: "this != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''" + }]; + oneof less_than { + // `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type, + // exclusive. If the field's value is greater than or equal to the specified + // value, an error message will be generated. + // + // ```proto + // message MyDuration { + // // must be less than 5s + // google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"]; + // } + // ``` + google.protobuf.Duration lt = 3 [(predefined).cel = { + id: "duration.lt" + expression: + "!has(rules.gte) && !has(rules.gt) && this >= rules.lt" + "? 'must be less than %s'.format([rules.lt]) : ''" + }]; + + // `lte` indicates that the field must be less than or equal to the specified + // value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value, + // an error message will be generated. + // + // ```proto + // message MyDuration { + // // must be less than or equal to 10s + // google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"]; + // } + // ``` + google.protobuf.Duration lte = 4 [(predefined).cel = { + id: "duration.lte" + expression: + "!has(rules.gte) && !has(rules.gt) && this > rules.lte" + "? 'must be less than or equal to %s'.format([rules.lte]) : ''" + }]; + } + oneof greater_than { + // `gt` requires the duration field value to be greater than the specified + // value (exclusive). If the value of `gt` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // message MyDuration { + // // duration must be greater than 5s [duration.gt] + // google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }]; + // + // // duration must be greater than 5s and less than 10s [duration.gt_lt] + // google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }]; + // + // // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive] + // google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }]; + // } + // ``` + google.protobuf.Duration gt = 5 [ + (predefined).cel = { + id: "duration.gt" + expression: + "!has(rules.lt) && !has(rules.lte) && this <= rules.gt" + "? 'must be greater than %s'.format([rules.gt]) : ''" + }, + (predefined).cel = { + id: "duration.gt_lt" + expression: + "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)" + "? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" + }, + (predefined).cel = { + id: "duration.gt_lt_exclusive" + expression: + "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)" + "? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" + }, + (predefined).cel = { + id: "duration.gt_lte" + expression: + "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)" + "? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" + }, + (predefined).cel = { + id: "duration.gt_lte_exclusive" + expression: + "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)" + "? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" + } + ]; + + // `gte` requires the duration field value to be greater than or equal to the + // specified value (exclusive). If the value of `gte` is larger than a + // specified `lt` or `lte`, the range is reversed, and the field value must + // be outside the specified range. If the field value doesn't meet the + // required conditions, an error message is generated. + // + // ```proto + // message MyDuration { + // // duration must be greater than or equal to 5s [duration.gte] + // google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }]; + // + // // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt] + // google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }]; + // + // // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive] + // google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }]; + // } + // ``` + google.protobuf.Duration gte = 6 [ + (predefined).cel = { + id: "duration.gte" + expression: + "!has(rules.lt) && !has(rules.lte) && this < rules.gte" + "? 'must be greater than or equal to %s'.format([rules.gte]) : ''" + }, + (predefined).cel = { + id: "duration.gte_lt" + expression: + "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)" + "? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" + }, + (predefined).cel = { + id: "duration.gte_lt_exclusive" + expression: + "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)" + "? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" + }, + (predefined).cel = { + id: "duration.gte_lte" + expression: + "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)" + "? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" + }, + (predefined).cel = { + id: "duration.gte_lte_exclusive" + expression: + "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)" + "? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" + } + ]; + } + + // `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type. + // If the field's value doesn't correspond to any of the specified values, + // an error message will be generated. + // + // ```proto + // message MyDuration { + // // must be in list [1s, 2s, 3s] + // google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]]; + // } + // ``` + repeated google.protobuf.Duration in = 7 [(predefined).cel = { + id: "duration.in" + expression: "!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''" + }]; + + // `not_in` denotes that the field must not be equal to + // any of the specified values of the `google.protobuf.Duration` type. + // If the field's value matches any of these values, an error message will be + // generated. + // + // ```proto + // message MyDuration { + // // value must not be in list [1s, 2s, 3s] + // google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]]; + // } + // ``` + repeated google.protobuf.Duration not_in = 8 [(predefined).cel = { + id: "duration.not_in" + expression: "this in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''" + }]; + + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // message MyDuration { + // google.protobuf.Duration value = 1 [ + // (buf.validate.field).duration.example = { seconds: 1 }, + // (buf.validate.field).duration.example = { seconds: 2 }, + // ]; + // } + // ``` + repeated google.protobuf.Duration example = 9 [(predefined).cel = { + id: "duration.example" + expression: "true" + }]; + + // Extension fields that have the (buf.validate.predefined) option set + // will be treated as predefined field rules. + // See https://protovalidate.com/schemas/predefined-rules/ + extensions 1000 to max; +} + +// FieldMaskRules describe rules applied exclusively to the `google.protobuf.FieldMask` well-known type. +message FieldMaskRules { + // `const` dictates that the field must match the specified value of the `google.protobuf.FieldMask` type exactly. + // If the field's value deviates from the specified value, an error message + // will be generated. + // + // ```proto + // message MyFieldMask { + // // value must equal ["a"] + // google.protobuf.FieldMask value = 1 [(buf.validate.field).field_mask.const = { + // paths: ["a"] + // }]; + // } + // ``` + optional google.protobuf.FieldMask const = 1 [(predefined).cel = { + id: "field_mask.const" + expression: "this.paths != getField(rules, 'const').paths ? 'must equal paths %s'.format([getField(rules, 'const').paths]) : ''" + }]; + + // `in` requires the field value to only contain paths matching specified + // values or their subpaths. + // If any of the field value's paths doesn't match the rule, + // an error message is generated. + // See: https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask + // + // ```proto + // message MyFieldMask { + // // The `value` FieldMask must only contain paths listed in `in`. + // google.protobuf.FieldMask value = 1 [(buf.validate.field).field_mask = { + // in: ["a", "b", "c.a"] + // }]; + // } + // ``` + repeated string in = 2 [(predefined).cel = { + id: "field_mask.in" + expression: "!this.paths.all(p, p in getField(rules, 'in') || getField(rules, 'in').exists(f, p.startsWith(f+'.'))) ? 'must only contain paths in %s'.format([getField(rules, 'in')]) : ''" + }]; + + // `not_in` requires the field value to not contain paths matching specified + // values or their subpaths. + // If any of the field value's paths matches the rule, + // an error message is generated. + // See: https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask + // + // ```proto + // message MyFieldMask { + // // The `value` FieldMask shall not contain paths listed in `not_in`. + // google.protobuf.FieldMask value = 1 [(buf.validate.field).field_mask = { + // not_in: ["forbidden", "immutable", "c.a"] + // }]; + // } + // ``` + repeated string not_in = 3 [(predefined).cel = { + id: "field_mask.not_in" + expression: "!this.paths.all(p, !(p in getField(rules, 'not_in') || getField(rules, 'not_in').exists(f, p.startsWith(f+'.')))) ? 'must not contain any paths in %s'.format([getField(rules, 'not_in')]) : ''" + }]; + + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // message MyFieldMask { + // google.protobuf.FieldMask value = 1 [ + // (buf.validate.field).field_mask.example = { paths: ["a", "b"] }, + // (buf.validate.field).field_mask.example = { paths: ["c.a", "d"] }, + // ]; + // } + // ``` + repeated google.protobuf.FieldMask example = 4 [(predefined).cel = { + id: "field_mask.example" + expression: "true" + }]; + + // Extension fields that have the (buf.validate.predefined) option set + // will be treated as predefined field rules. + // See https://protovalidate.com/schemas/predefined-rules/ + extensions 1000 to max; +} + +// TimestampRules describe the rules applied exclusively to the `google.protobuf.Timestamp` well-known type. +message TimestampRules { + // `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated. + // + // ```proto + // message MyTimestamp { + // // value must equal 2023-05-03T10:00:00Z + // google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}]; + // } + // ``` + optional google.protobuf.Timestamp const = 2 [(predefined).cel = { + id: "timestamp.const" + expression: "this != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''" + }]; + oneof less_than { + // `lt` requires the timestamp field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated. + // + // ```proto + // message MyTimestamp { + // // timestamp must be less than '2023-01-01T00:00:00Z' [timestamp.lt] + // google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lt = { seconds: 1672444800 }]; + // } + // ``` + google.protobuf.Timestamp lt = 3 [(predefined).cel = { + id: "timestamp.lt" + expression: + "!has(rules.gte) && !has(rules.gt) && this >= rules.lt" + "? 'must be less than %s'.format([rules.lt]) : ''" + }]; + + // `lte` requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated. + // + // ```proto + // message MyTimestamp { + // // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte] + // google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }]; + // } + // ``` + google.protobuf.Timestamp lte = 4 [(predefined).cel = { + id: "timestamp.lte" + expression: + "!has(rules.gte) && !has(rules.gt) && this > rules.lte" + "? 'must be less than or equal to %s'.format([rules.lte]) : ''" + }]; + + // `lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule. + // + // ```proto + // message MyTimestamp { + // // must be less than now + // google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true]; + // } + // ``` + bool lt_now = 7 [(predefined).cel = { + id: "timestamp.lt_now" + expression: "(rules.lt_now && this > now) ? 'must be less than now' : ''" + }]; + } + oneof greater_than { + // `gt` requires the timestamp field value to be greater than the specified + // value (exclusive). If the value of `gt` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // message MyTimestamp { + // // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt] + // google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }]; + // + // // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt] + // google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }]; + // + // // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive] + // google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }]; + // } + // ``` + google.protobuf.Timestamp gt = 5 [ + (predefined).cel = { + id: "timestamp.gt" + expression: + "!has(rules.lt) && !has(rules.lte) && this <= rules.gt" + "? 'must be greater than %s'.format([rules.gt]) : ''" + }, + (predefined).cel = { + id: "timestamp.gt_lt" + expression: + "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)" + "? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" + }, + (predefined).cel = { + id: "timestamp.gt_lt_exclusive" + expression: + "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)" + "? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" + }, + (predefined).cel = { + id: "timestamp.gt_lte" + expression: + "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)" + "? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" + }, + (predefined).cel = { + id: "timestamp.gt_lte_exclusive" + expression: + "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)" + "? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" + } + ]; + + // `gte` requires the timestamp field value to be greater than or equal to the + // specified value (exclusive). If the value of `gte` is larger than a + // specified `lt` or `lte`, the range is reversed, and the field value + // must be outside the specified range. If the field value doesn't meet + // the required conditions, an error message is generated. + // + // ```proto + // message MyTimestamp { + // // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte] + // google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }]; + // + // // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt] + // google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }]; + // + // // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive] + // google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }]; + // } + // ``` + google.protobuf.Timestamp gte = 6 [ + (predefined).cel = { + id: "timestamp.gte" + expression: + "!has(rules.lt) && !has(rules.lte) && this < rules.gte" + "? 'must be greater than or equal to %s'.format([rules.gte]) : ''" + }, + (predefined).cel = { + id: "timestamp.gte_lt" + expression: + "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)" + "? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" + }, + (predefined).cel = { + id: "timestamp.gte_lt_exclusive" + expression: + "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)" + "? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" + }, + (predefined).cel = { + id: "timestamp.gte_lte" + expression: + "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)" + "? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" + }, + (predefined).cel = { + id: "timestamp.gte_lte_exclusive" + expression: + "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)" + "? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" + } + ]; + + // `gt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be greater than the current time. `gt_now` can only be used with the `within` rule. + // + // ```proto + // message MyTimestamp { + // // must be greater than now + // google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.gt_now = true]; + // } + // ``` + bool gt_now = 8 [(predefined).cel = { + id: "timestamp.gt_now" + expression: "(rules.gt_now && this < now) ? 'must be greater than now' : ''" + }]; + } + + // `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated. + // + // ```proto + // message MyTimestamp { + // // must be within 1 hour of now + // google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}]; + // } + // ``` + optional google.protobuf.Duration within = 9 [(predefined).cel = { + id: "timestamp.within" + expression: "this < now-rules.within || this > now+rules.within ? 'must be within %s of now'.format([rules.within]) : ''" + }]; + + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // message MyTimestamp { + // google.protobuf.Timestamp value = 1 [ + // (buf.validate.field).timestamp.example = { seconds: 1672444800 }, + // (buf.validate.field).timestamp.example = { seconds: 1672531200 }, + // ]; + // } + // ``` + repeated google.protobuf.Timestamp example = 10 [(predefined).cel = { + id: "timestamp.example" + expression: "true" + }]; + + // Extension fields that have the (buf.validate.predefined) option set + // will be treated as predefined field rules. + // See https://protovalidate.com/schemas/predefined-rules/ + extensions 1000 to max; +} + +// `Violations` is a collection of `Violation` messages. This message type is returned by +// Protovalidate when a proto message fails to meet the requirements set by the `Rule` validation rules. +// Each individual violation is represented by a `Violation` message. +message Violations { + // `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected. + repeated Violation violations = 1; +} + +// `Violation` represents a single instance where a validation rule, expressed +// as a `Rule`, was not met. It provides information about the field that +// caused the violation, the specific rule that wasn't fulfilled, and a +// human-readable error message. +// +// For example, consider the following message: +// +// ```proto +// message User { +// int32 age = 1 [(buf.validate.field).cel = { +// id: "user.age", +// expression: "this < 18 ? 'User must be at least 18 years old' : ''", +// }]; +// } +// ``` +// +// It could produce the following violation: +// +// ```json +// { +// "ruleId": "user.age", +// "message": "User must be at least 18 years old", +// "field": { +// "elements": [ +// { +// "fieldNumber": 1, +// "fieldName": "age", +// "fieldType": "TYPE_INT32" +// } +// ] +// }, +// "rule": { +// "elements": [ +// { +// "fieldNumber": 23, +// "fieldName": "cel", +// "fieldType": "TYPE_MESSAGE", +// "index": "0" +// } +// ] +// } +// } +// ``` +message Violation { + // `field` is a machine-readable path to the field that failed validation. + // This could be a nested field, in which case the path will include all the parent fields leading to the actual field that caused the violation. + // + // For example, consider the following message: + // + // ```proto + // message Message { + // bool a = 1 [(buf.validate.field).required = true]; + // } + // ``` + // + // It could produce the following violation: + // + // ```textproto + // violation { + // field { element { field_number: 1, field_name: "a", field_type: 8 } } + // ... + // } + // ``` + optional FieldPath field = 5; + + // `rule` is a machine-readable path that points to the specific rule that failed validation. + // This will be a nested field starting from the FieldRules of the field that failed validation. + // For custom rules, this will provide the path of the rule, e.g. `cel[0]`. + // + // For example, consider the following message: + // + // ```proto + // message Message { + // bool a = 1 [(buf.validate.field).required = true]; + // bool b = 2 [(buf.validate.field).cel = { + // id: "custom_rule", + // expression: "!this ? 'b must be true': ''" + // }] + // } + // ``` + // + // It could produce the following violations: + // + // ```textproto + // violation { + // rule { element { field_number: 25, field_name: "required", field_type: 8 } } + // ... + // } + // violation { + // rule { element { field_number: 23, field_name: "cel", field_type: 11, index: 0 } } + // ... + // } + // ``` + optional FieldPath rule = 6; + + // `rule_id` is the unique identifier of the `Rule` that was not fulfilled. + // This is the same `id` that was specified in the `Rule` message, allowing easy tracing of which rule was violated. + optional string rule_id = 2; + + // `message` is a human-readable error message that describes the nature of the violation. + // This can be the default error message from the violated `Rule`, or it can be a custom message that gives more context about the violation. + optional string message = 3; + + // `for_key` indicates whether the violation was caused by a map key, rather than a value. + optional bool for_key = 4; + + reserved 1; + reserved "field_path"; +} + +// `FieldPath` provides a path to a nested protobuf field. +// +// This message provides enough information to render a dotted field path even without protobuf descriptors. +// It also provides enough information to resolve a nested field through unknown wire data. +message FieldPath { + // `elements` contains each element of the path, starting from the root and recursing downward. + repeated FieldPathElement elements = 1; +} + +// `FieldPathElement` provides enough information to nest through a single protobuf field. +// +// If the selected field is a map or repeated field, the `subscript` value selects a specific element from it. +// A path that refers to a value nested under a map key or repeated field index will have a `subscript` value. +// The `field_type` field allows unambiguous resolution of a field even if descriptors are not available. +message FieldPathElement { + // `field_number` is the field number this path element refers to. + optional int32 field_number = 1; + + // `field_name` contains the field name this path element refers to. + // This can be used to display a human-readable path even if the field number is unknown. + optional string field_name = 2; + + // `field_type` specifies the type of this field. When using reflection, this value is not needed. + // + // This value is provided to make it possible to traverse unknown fields through wire data. + // When traversing wire data, be mindful of both packed[1] and delimited[2] encoding schemes. + // + // [1]: https://protobuf.dev/programming-guides/encoding/#packed + // [2]: https://protobuf.dev/programming-guides/encoding/#groups + // + // N.B.: Although groups are deprecated, the corresponding delimited encoding scheme is not, and + // can be explicitly used in Protocol Buffers 2023 Edition. + optional google.protobuf.FieldDescriptorProto.Type field_type = 3; + + // `key_type` specifies the map key type of this field. This value is useful when traversing + // unknown fields through wire data: specifically, it allows handling the differences between + // different integer encodings. + optional google.protobuf.FieldDescriptorProto.Type key_type = 4; + + // `value_type` specifies map value type of this field. This is useful if you want to display a + // value inside unknown fields through wire data. + optional google.protobuf.FieldDescriptorProto.Type value_type = 5; + + // `subscript` contains a repeated index or map key, if this path element nests into a repeated or map field. + oneof subscript { + // `index` specifies a 0-based index into a repeated field. + uint64 index = 6; + + // `bool_key` specifies a map key of type bool. + bool bool_key = 7; + + // `int_key` specifies a map key of type int32, int64, sint32, sint64, sfixed32 or sfixed64. + int64 int_key = 8; + + // `uint_key` specifies a map key of type uint32, uint64, fixed32 or fixed64. + uint64 uint_key = 9; + + // `string_key` specifies a map key of type string. + string string_key = 10; + } +} diff --git a/packages/protovalidate-proto/src/buf/validate/conformance/cases/bool_pb2.py b/packages/protovalidate-proto/src/buf/validate/conformance/cases/bool_pb2.py index fafc05da..1167f2bf 100644 --- a/packages/protovalidate-proto/src/buf/validate/conformance/cases/bool_pb2.py +++ b/packages/protovalidate-proto/src/buf/validate/conformance/cases/bool_pb2.py @@ -29,14 +29,13 @@ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n)buf/validate/conformance/cases/bool.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"\x1c\n\x08\x42oolNone\x12\x10\n\x03val\x18\x01 \x01(\x08R\x03val\"*\n\rBoolConstTrue\x12\x19\n\x03val\x18\x01 \x01(\x08\x42\x07\xbaH\x04j\x02\x08\x01R\x03val\"+\n\x0e\x42oolConstFalse\x12\x19\n\x03val\x18\x01 \x01(\x08\x42\x07\xbaH\x04j\x02\x08\x00R\x03val\"(\n\x0b\x42oolExample\x12\x19\n\x03val\x18\x01 \x01(\x08\x42\x07\xbaH\x04j\x02\x10\x01R\x03valB\xcb\x01\n\"com.buf.validate.conformance.casesB\tBoolProtoP\x01\xa2\x02\x04\x42VCC\xaa\x02\x1e\x42uf.Validate.Conformance.Cases\xca\x02\x1e\x42uf\\Validate\\Conformance\\Cases\xe2\x02*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\xea\x02!Buf::Validate::Conformance::Casesb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n)buf/validate/conformance/cases/bool.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"\x1c\n\x08\x42oolNone\x12\x10\n\x03val\x18\x01 \x01(\x08R\x03val\"*\n\rBoolConstTrue\x12\x19\n\x03val\x18\x01 \x01(\x08\x42\x07\xbaH\x04j\x02\x08\x01R\x03val\"+\n\x0e\x42oolConstFalse\x12\x19\n\x03val\x18\x01 \x01(\x08\x42\x07\xbaH\x04j\x02\x08\x00R\x03val\"(\n\x0b\x42oolExample\x12\x19\n\x03val\x18\x01 \x01(\x08\x42\x07\xbaH\x04j\x02\x10\x01R\x03valb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'buf.validate.conformance.cases.bool_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\"com.buf.validate.conformance.casesB\tBoolProtoP\001\242\002\004BVCC\252\002\036Buf.Validate.Conformance.Cases\312\002\036Buf\\Validate\\Conformance\\Cases\342\002*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\352\002!Buf::Validate::Conformance::Cases' + DESCRIPTOR._loaded_options = None _globals['_BOOLCONSTTRUE'].fields_by_name['val']._loaded_options = None _globals['_BOOLCONSTTRUE'].fields_by_name['val']._serialized_options = b'\272H\004j\002\010\001' _globals['_BOOLCONSTFALSE'].fields_by_name['val']._loaded_options = None diff --git a/packages/protovalidate-proto/src/buf/validate/conformance/cases/bytes_pb2.py b/packages/protovalidate-proto/src/buf/validate/conformance/cases/bytes_pb2.py index 562369a0..914c1533 100644 --- a/packages/protovalidate-proto/src/buf/validate/conformance/cases/bytes_pb2.py +++ b/packages/protovalidate-proto/src/buf/validate/conformance/cases/bytes_pb2.py @@ -29,14 +29,13 @@ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*buf/validate/conformance/cases/bytes.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"\x1d\n\tBytesNone\x12\x10\n\x03val\x18\x01 \x01(\x0cR\x03val\"*\n\nBytesConst\x12\x1c\n\x03val\x18\x01 \x01(\x0c\x42\n\xbaH\x07z\x05\n\x03\x66ooR\x03val\",\n\x07\x42ytesIn\x12!\n\x03val\x18\x01 \x01(\x0c\x42\x0f\xbaH\x0cz\nB\x03\x62\x61rB\x03\x62\x61zR\x03val\"1\n\nBytesNotIn\x12#\n\x03val\x18\x01 \x01(\x0c\x42\x11\xbaH\x0ez\x0cJ\x04\x66izzJ\x04\x62uzzR\x03val\"%\n\x08\x42ytesLen\x12\x19\n\x03val\x18\x01 \x01(\x0c\x42\x07\xbaH\x04z\x02h\x03R\x03val\"(\n\x0b\x42ytesMinLen\x12\x19\n\x03val\x18\x01 \x01(\x0c\x42\x07\xbaH\x04z\x02\x10\x03R\x03val\"(\n\x0b\x42ytesMaxLen\x12\x19\n\x03val\x18\x01 \x01(\x0c\x42\x07\xbaH\x04z\x02\x18\x05R\x03val\"-\n\x0e\x42ytesMinMaxLen\x12\x1b\n\x03val\x18\x01 \x01(\x0c\x42\t\xbaH\x06z\x04\x10\x03\x18\x05R\x03val\"2\n\x13\x42ytesEqualMinMaxLen\x12\x1b\n\x03val\x18\x01 \x01(\x0c\x42\t\xbaH\x06z\x04\x10\x05\x18\x05R\x03val\"7\n\x0c\x42ytesPattern\x12\'\n\x03val\x18\x01 \x01(\x0c\x42\x15\xbaH\x12z\x10\"\x0e^[\\x00-\\x7F]+$R\x03val\")\n\x0b\x42ytesPrefix\x12\x1a\n\x03val\x18\x01 \x01(\x0c\x42\x08\xbaH\x05z\x03*\x01\x99R\x03val\"-\n\rBytesContains\x12\x1c\n\x03val\x18\x01 \x01(\x0c\x42\n\xbaH\x07z\x05:\x03\x62\x61rR\x03val\",\n\x0b\x42ytesSuffix\x12\x1d\n\x03val\x18\x01 \x01(\x0c\x42\x0b\xbaH\x08z\x06\x32\x04\x62uzzR\x03val\"$\n\x07\x42ytesIP\x12\x19\n\x03val\x18\x01 \x01(\x0c\x42\x07\xbaH\x04z\x02P\x01R\x03val\"\'\n\nBytesNotIP\x12\x19\n\x03val\x18\x01 \x01(\x0c\x42\x07\xbaH\x04z\x02P\x00R\x03val\"&\n\tBytesIPv4\x12\x19\n\x03val\x18\x01 \x01(\x0c\x42\x07\xbaH\x04z\x02X\x01R\x03val\")\n\x0c\x42ytesNotIPv4\x12\x19\n\x03val\x18\x01 \x01(\x0c\x42\x07\xbaH\x04z\x02X\x00R\x03val\"&\n\tBytesIPv6\x12\x19\n\x03val\x18\x01 \x01(\x0c\x42\x07\xbaH\x04z\x02`\x01R\x03val\")\n\x0c\x42ytesNotIPv6\x12\x19\n\x03val\x18\x01 \x01(\x0c\x42\x07\xbaH\x04z\x02`\x00R\x03val\"/\n\x0f\x42ytesIPv6Ignore\x12\x1c\n\x03val\x18\x01 \x01(\x0c\x42\n\xbaH\x07z\x02`\x01\xd8\x01\x01R\x03val\"&\n\tBytesUUID\x12\x19\n\x03val\x18\x01 \x01(\x0c\x42\x07\xbaH\x04z\x02x\x01R\x03val\")\n\x0c\x42ytesNotUUID\x12\x19\n\x03val\x18\x01 \x01(\x0c\x42\x07\xbaH\x04z\x02x\x00R\x03val\"/\n\x0f\x42ytesUUIDIgnore\x12\x1c\n\x03val\x18\x01 \x01(\x0c\x42\n\xbaH\x07z\x02x\x01\xd8\x01\x01R\x03val\"*\n\x0c\x42ytesExample\x12\x1a\n\x03val\x18\x01 \x01(\x0c\x42\x08\xbaH\x05z\x03r\x01\x99R\x03valB\xcc\x01\n\"com.buf.validate.conformance.casesB\nBytesProtoP\x01\xa2\x02\x04\x42VCC\xaa\x02\x1e\x42uf.Validate.Conformance.Cases\xca\x02\x1e\x42uf\\Validate\\Conformance\\Cases\xe2\x02*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\xea\x02!Buf::Validate::Conformance::Casesb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*buf/validate/conformance/cases/bytes.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"\x1d\n\tBytesNone\x12\x10\n\x03val\x18\x01 \x01(\x0cR\x03val\"*\n\nBytesConst\x12\x1c\n\x03val\x18\x01 \x01(\x0c\x42\n\xbaH\x07z\x05\n\x03\x66ooR\x03val\",\n\x07\x42ytesIn\x12!\n\x03val\x18\x01 \x01(\x0c\x42\x0f\xbaH\x0cz\nB\x03\x62\x61rB\x03\x62\x61zR\x03val\"1\n\nBytesNotIn\x12#\n\x03val\x18\x01 \x01(\x0c\x42\x11\xbaH\x0ez\x0cJ\x04\x66izzJ\x04\x62uzzR\x03val\"%\n\x08\x42ytesLen\x12\x19\n\x03val\x18\x01 \x01(\x0c\x42\x07\xbaH\x04z\x02h\x03R\x03val\"(\n\x0b\x42ytesMinLen\x12\x19\n\x03val\x18\x01 \x01(\x0c\x42\x07\xbaH\x04z\x02\x10\x03R\x03val\"(\n\x0b\x42ytesMaxLen\x12\x19\n\x03val\x18\x01 \x01(\x0c\x42\x07\xbaH\x04z\x02\x18\x05R\x03val\"-\n\x0e\x42ytesMinMaxLen\x12\x1b\n\x03val\x18\x01 \x01(\x0c\x42\t\xbaH\x06z\x04\x10\x03\x18\x05R\x03val\"2\n\x13\x42ytesEqualMinMaxLen\x12\x1b\n\x03val\x18\x01 \x01(\x0c\x42\t\xbaH\x06z\x04\x10\x05\x18\x05R\x03val\"7\n\x0c\x42ytesPattern\x12\'\n\x03val\x18\x01 \x01(\x0c\x42\x15\xbaH\x12z\x10\"\x0e^[\\x00-\\x7F]+$R\x03val\")\n\x0b\x42ytesPrefix\x12\x1a\n\x03val\x18\x01 \x01(\x0c\x42\x08\xbaH\x05z\x03*\x01\x99R\x03val\"-\n\rBytesContains\x12\x1c\n\x03val\x18\x01 \x01(\x0c\x42\n\xbaH\x07z\x05:\x03\x62\x61rR\x03val\",\n\x0b\x42ytesSuffix\x12\x1d\n\x03val\x18\x01 \x01(\x0c\x42\x0b\xbaH\x08z\x06\x32\x04\x62uzzR\x03val\"$\n\x07\x42ytesIP\x12\x19\n\x03val\x18\x01 \x01(\x0c\x42\x07\xbaH\x04z\x02P\x01R\x03val\"\'\n\nBytesNotIP\x12\x19\n\x03val\x18\x01 \x01(\x0c\x42\x07\xbaH\x04z\x02P\x00R\x03val\"&\n\tBytesIPv4\x12\x19\n\x03val\x18\x01 \x01(\x0c\x42\x07\xbaH\x04z\x02X\x01R\x03val\")\n\x0c\x42ytesNotIPv4\x12\x19\n\x03val\x18\x01 \x01(\x0c\x42\x07\xbaH\x04z\x02X\x00R\x03val\"&\n\tBytesIPv6\x12\x19\n\x03val\x18\x01 \x01(\x0c\x42\x07\xbaH\x04z\x02`\x01R\x03val\")\n\x0c\x42ytesNotIPv6\x12\x19\n\x03val\x18\x01 \x01(\x0c\x42\x07\xbaH\x04z\x02`\x00R\x03val\"/\n\x0f\x42ytesIPv6Ignore\x12\x1c\n\x03val\x18\x01 \x01(\x0c\x42\n\xbaH\x07z\x02`\x01\xd8\x01\x01R\x03val\"&\n\tBytesUUID\x12\x19\n\x03val\x18\x01 \x01(\x0c\x42\x07\xbaH\x04z\x02x\x01R\x03val\")\n\x0c\x42ytesNotUUID\x12\x19\n\x03val\x18\x01 \x01(\x0c\x42\x07\xbaH\x04z\x02x\x00R\x03val\"/\n\x0f\x42ytesUUIDIgnore\x12\x1c\n\x03val\x18\x01 \x01(\x0c\x42\n\xbaH\x07z\x02x\x01\xd8\x01\x01R\x03val\"*\n\x0c\x42ytesExample\x12\x1a\n\x03val\x18\x01 \x01(\x0c\x42\x08\xbaH\x05z\x03r\x01\x99R\x03valb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'buf.validate.conformance.cases.bytes_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\"com.buf.validate.conformance.casesB\nBytesProtoP\001\242\002\004BVCC\252\002\036Buf.Validate.Conformance.Cases\312\002\036Buf\\Validate\\Conformance\\Cases\342\002*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\352\002!Buf::Validate::Conformance::Cases' + DESCRIPTOR._loaded_options = None _globals['_BYTESCONST'].fields_by_name['val']._loaded_options = None _globals['_BYTESCONST'].fields_by_name['val']._serialized_options = b'\272H\007z\005\n\003foo' _globals['_BYTESIN'].fields_by_name['val']._loaded_options = None diff --git a/packages/protovalidate-proto/src/buf/validate/conformance/cases/custom_rules/custom_rules_pb2.py b/packages/protovalidate-proto/src/buf/validate/conformance/cases/custom_rules/custom_rules_pb2.py index ce17f02f..8d6631e7 100644 --- a/packages/protovalidate-proto/src/buf/validate/conformance/cases/custom_rules/custom_rules_pb2.py +++ b/packages/protovalidate-proto/src/buf/validate/conformance/cases/custom_rules/custom_rules_pb2.py @@ -29,14 +29,13 @@ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n>buf/validate/conformance/cases/custom_rules/custom_rules.proto\x12+buf.validate.conformance.cases.custom_rules\x1a\x1b\x62uf/validate/validate.proto\"\xb9\x01\n\rNoExpressions\x12\x0c\n\x01\x61\x18\x01 \x01(\x05R\x01\x61\x12?\n\x01\x62\x18\x02 \x01(\x0e\x32\x31.buf.validate.conformance.cases.custom_rules.EnumR\x01\x62\x12O\n\x01\x63\x18\x03 \x01(\x0b\x32\x41.buf.validate.conformance.cases.custom_rules.NoExpressions.NestedR\x01\x63\x1a\x08\n\x06Nested\"\xab\x05\n\x12MessageExpressions\x12\x0c\n\x01\x61\x18\x01 \x01(\x05R\x01\x61\x12\x0c\n\x01\x62\x18\x02 \x01(\x05R\x01\x62\x12?\n\x01\x63\x18\x03 \x01(\x0e\x32\x31.buf.validate.conformance.cases.custom_rules.EnumR\x01\x63\x12?\n\x01\x64\x18\x04 \x01(\x0e\x32\x31.buf.validate.conformance.cases.custom_rules.EnumR\x01\x64\x12T\n\x01\x65\x18\x05 \x01(\x0b\x32\x46.buf.validate.conformance.cases.custom_rules.MessageExpressions.NestedR\x01\x65\x12T\n\x01\x66\x18\x06 \x01(\x0b\x32\x46.buf.validate.conformance.cases.custom_rules.MessageExpressions.NestedR\x01\x66\x1ax\n\x06Nested\x12\x0c\n\x01\x61\x18\x01 \x01(\x05R\x01\x61\x12\x0c\n\x01\x62\x18\x02 \x01(\x05R\x01\x62:R\xbaHO\x1aM\n\x19message_expression_nested\x1a\x30this.a > this.b ? \'\': \'a must be greater than b\':\xd0\x01\xbaH\xcc\x01\x1a\x43\n\x19message_expression_scalar\x12\x15\x61 must be less than b\x1a\x0fthis.a < this.b\x1a?\n\x17message_expression_enum\x12\x12\x63 must not equal d\x1a\x10this.c != this.d\x1a\x44\n\x18message_expression_embed\x12\x12\x65.a must equal f.a\x1a\x14this.e.a == this.f.a\"6\n\x15MessageExpressionOnly\x12\x0c\n\x01\x61\x18\x01 \x01(\x05R\x01\x61:\x0f\xbaH\x0c*\nthis.a > 0\"R\n\x0cMissingField\x12\x0c\n\x01\x61\x18\x01 \x01(\x05R\x01\x61:4\xbaH1\x1a/\n\rmissing_field\x12\x12\x62 must be positive\x1a\nthis.b > 0\"g\n\rIncorrectType\x12\x0c\n\x01\x61\x18\x01 \x01(\x05R\x01\x61:H\xbaHE\x1a\x43\n\x0eincorrect_type\x12\x17\x61 must start with \'foo\'\x1a\x18this.a.startsWith(\'foo\')\"}\n\x0f\x44ynRuntimeError\x12\x0c\n\x01\x61\x18\x01 \x01(\x05R\x01\x61:\\\xbaHY\x1aW\n\x0f\x64yn_runtime_err\x12.dynamic type tries to use a non-existent field\x1a\x14\x64yn(this).b == \'foo\'\"\\\n\x0cNowEqualsNow:L\xbaHI\x1aG\n\x0enow_equals_now\x12)now should equal now within an expression\x1a\nnow == now\"8\n\x13\x46ieldExpressionOnly\x12!\n\x03val\x18\x01 \x01(\x05\x42\x0f\xbaH\x0c\xea\x01\tthis > 42R\x03val\"\xdf\x02\n\x1d\x46ieldExpressionMultipleScalar\x12\xbd\x02\n\x03val\x18\x01 \x01(\x05\x42\xaa\x02\xbaH\xa6\x02\xba\x01_\n\"field_expression.multiple.scalar.1\x12/test message field_expression.multiple.scalar.1\x1a\x08this > 0\xba\x01_\n\"field_expression.multiple.scalar.2\x12/test message field_expression.multiple.scalar.2\x1a\x08this > 1\xba\x01_\n\"field_expression.multiple.scalar.3\x12/test message field_expression.multiple.scalar.3\x1a\x08this > 2R\x03val\"y\n\x1b\x46ieldExpressionNestedScalar\x12Z\n\x06nested\x18\x01 \x01(\x0b\x32\x42.buf.validate.conformance.cases.custom_rules.FieldExpressionScalarR\x06nested\"\xa2\x01\n\x1d\x46ieldExpressionOptionalScalar\x12y\n\x03val\x18\x01 \x01(\x05\x42\x62\xbaH_\xba\x01\\\n field_expression.optional.scalar\x12-test message field_expression.optional.scalar\x1a\tthis == 1H\x00R\x03val\x88\x01\x01\x42\x06\n\x04_val\"{\n\x15\x46ieldExpressionScalar\x12\x62\n\x03val\x18\x01 \x01(\x05\x42P\xbaHM\xba\x01J\n\x17\x66ield_expression.scalar\x12$test message field_expression.scalar\x1a\tthis == 1R\x03val\"\xa9\x01\n\x13\x46ieldExpressionEnum\x12\x91\x01\n\x03val\x18\x01 \x01(\x0e\x32\x31.buf.validate.conformance.cases.custom_rules.EnumBL\xbaHI\xba\x01\x46\n\x15\x66ield_expression.enum\x12\"test message field_expression.enum\x1a\tthis == 1R\x03val\"\xdf\x01\n\x16\x46ieldExpressionMessage\x12\xaf\x01\n\x03val\x18\x01 \x01(\x0b\x32G.buf.validate.conformance.cases.custom_rules.FieldExpressionMessage.MsgBT\xbaHQ\xba\x01N\n\x18\x66ield_expression.message\x12%test message field_expression.message\x1a\x0bthis.a == 1R\x03val\x1a\x13\n\x03Msg\x12\x0c\n\x01\x61\x18\x01 \x01(\x05R\x01\x61\"\x8f\x02\n\x17\x46ieldExpressionMapInt32\x12\xbb\x01\n\x03val\x18\x01 \x03(\x0b\x32M.buf.validate.conformance.cases.custom_rules.FieldExpressionMapInt32.ValEntryBZ\xbaHW\xba\x01T\n\x1a\x66ield_expression.map.int32\x12\x1b\x61ll map values must equal 1\x1a\x19this.all(k, this[k] == 1)R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\x8f\x02\n\x17\x46ieldExpressionMapInt64\x12\xbb\x01\n\x03val\x18\x01 \x03(\x0b\x32M.buf.validate.conformance.cases.custom_rules.FieldExpressionMapInt64.ValEntryBZ\xbaHW\xba\x01T\n\x1a\x66ield_expression.map.int64\x12\x1b\x61ll map values must equal 1\x1a\x19this.all(k, this[k] == 1)R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x03R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x03R\x05value:\x02\x38\x01\"\x98\x02\n\x18\x46ieldExpressionMapUint32\x12\xc3\x01\n\x03val\x18\x01 \x03(\x0b\x32N.buf.validate.conformance.cases.custom_rules.FieldExpressionMapUint32.ValEntryBa\xbaH^\xba\x01[\n\x1b\x66ield_expression.map.uint32\x12\x1b\x61ll map values must equal 1\x1a\x1fthis.all(k, this[k] == uint(1))R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\rR\x03key\x12\x14\n\x05value\x18\x02 \x01(\rR\x05value:\x02\x38\x01\"\x98\x02\n\x18\x46ieldExpressionMapUint64\x12\xc3\x01\n\x03val\x18\x01 \x03(\x0b\x32N.buf.validate.conformance.cases.custom_rules.FieldExpressionMapUint64.ValEntryBa\xbaH^\xba\x01[\n\x1b\x66ield_expression.map.uint64\x12\x1b\x61ll map values must equal 1\x1a\x1fthis.all(k, this[k] == uint(1))R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x04R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x04R\x05value:\x02\x38\x01\"\x94\x02\n\x16\x46ieldExpressionMapBool\x12\xc1\x01\n\x03val\x18\x01 \x03(\x0b\x32L.buf.validate.conformance.cases.custom_rules.FieldExpressionMapBool.ValEntryBa\xbaH^\xba\x01[\n\x19\x66ield_expression.map.bool\x12\x1f\x61ll map values must equal false\x1a\x1dthis.all(k, this[k] == false)R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x08R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x08R\x05value:\x02\x38\x01\"\x9a\x02\n\x18\x46ieldExpressionMapString\x12\xc5\x01\n\x03val\x18\x01 \x03(\x0b\x32N.buf.validate.conformance.cases.custom_rules.FieldExpressionMapString.ValEntryBc\xbaH`\xba\x01]\n\x1b\x66ield_expression.map.string\x12\x1f\x61ll map values must equal \'foo\'\x1a\x1dthis.all(k, this[k] == \'foo\')R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xca\x02\n\x16\x46ieldExpressionMapEnum\x12\xc4\x01\n\x03val\x18\x01 \x03(\x0b\x32L.buf.validate.conformance.cases.custom_rules.FieldExpressionMapEnum.ValEntryBd\xbaHa\xba\x01^\n\x19\x66ield_expression.map.enum\x12&test message field_expression.map.enum\x1a\x19this.all(k, this[k] == 1)R\x03val\x1ai\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12G\n\x05value\x18\x02 \x01(\x0e\x32\x31.buf.validate.conformance.cases.custom_rules.EnumR\x05value:\x02\x38\x01\"\x87\x03\n\x19\x46ieldExpressionMapMessage\x12\xcf\x01\n\x03val\x18\x01 \x03(\x0b\x32O.buf.validate.conformance.cases.custom_rules.FieldExpressionMapMessage.ValEntryBl\xbaHi\xba\x01\x66\n\x1c\x66ield_expression.map.message\x12)test message field_expression.map.message\x1a\x1bthis.all(k, this[k].a == 1)R\x03val\x1a\x82\x01\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12`\n\x05value\x18\x02 \x01(\x0b\x32J.buf.validate.conformance.cases.custom_rules.FieldExpressionMapMessage.MsgR\x05value:\x02\x38\x01\x1a\x13\n\x03Msg\x12\x0c\n\x01\x61\x18\x01 \x01(\x05R\x01\x61\"\x99\x02\n\x16\x46ieldExpressionMapKeys\x12\xc6\x01\n\x03val\x18\x01 \x03(\x0b\x32L.buf.validate.conformance.cases.custom_rules.FieldExpressionMapKeys.ValEntryBf\xbaHc\x9a\x01`\"^\xba\x01[\n\x19\x66ield_expression.map.keys\x12&test message field_expression.map.keys\x1a\x16this == 4 || this == 8R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xae\x02\n\x1e\x46ieldExpressionMapScalarValues\x12\xd3\x01\n\x03val\x18\x01 \x03(\x0b\x32T.buf.validate.conformance.cases.custom_rules.FieldExpressionMapScalarValues.ValEntryBk\xbaHh\x9a\x01\x65*c\xba\x01`\n\"field_expression.map.scalar.values\x12/test message field_expression.map.scalar.values\x1a\tthis == 1R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xd9\x02\n\x1c\x46ieldExpressionMapEnumValues\x12\xcd\x01\n\x03val\x18\x01 \x03(\x0b\x32R.buf.validate.conformance.cases.custom_rules.FieldExpressionMapEnumValues.ValEntryBg\xbaHd\x9a\x01\x61*_\xba\x01\\\n field_expression.map.enum.values\x12-test message field_expression.map.enum.values\x1a\tthis == 1R\x03val\x1ai\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12G\n\x05value\x18\x02 \x01(\x0e\x32\x31.buf.validate.conformance.cases.custom_rules.EnumR\x05value:\x02\x38\x01\"\x9c\x03\n\x1f\x46ieldExpressionMapMessageValues\x12\xd8\x01\n\x03val\x18\x01 \x03(\x0b\x32U.buf.validate.conformance.cases.custom_rules.FieldExpressionMapMessageValues.ValEntryBo\xbaHl\x9a\x01i*g\xba\x01\x64\n#field_expression.map.message.values\x12\x30test message field_expression.map.message.values\x1a\x0bthis.a == 1R\x03val\x1a\x88\x01\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x66\n\x05value\x18\x02 \x01(\x0b\x32P.buf.validate.conformance.cases.custom_rules.FieldExpressionMapMessageValues.MsgR\x05value:\x02\x38\x01\x1a\x13\n\x03Msg\x12\x0c\n\x01\x61\x18\x01 \x01(\x05R\x01\x61\"\x9f\x01\n\x1d\x46ieldExpressionRepeatedScalar\x12~\n\x03val\x18\x01 \x03(\x05\x42l\xbaHi\xba\x01\x66\n field_expression.repeated.scalar\x12-test message field_expression.repeated.scalar\x1a\x13this.all(e, e == 1)R\x03val\"\xcd\x01\n\x1b\x46ieldExpressionRepeatedEnum\x12\xad\x01\n\x03val\x18\x01 \x03(\x0e\x32\x31.buf.validate.conformance.cases.custom_rules.EnumBh\xbaHe\xba\x01\x62\n\x1e\x66ield_expression.repeated.enum\x12+test message field_expression.repeated.enum\x1a\x13this.all(e, e == 1)R\x03val\"\x8b\x02\n\x1e\x46ieldExpressionRepeatedMessage\x12\xd3\x01\n\x03val\x18\x01 \x03(\x0b\x32O.buf.validate.conformance.cases.custom_rules.FieldExpressionRepeatedMessage.MsgBp\xbaHm\xba\x01j\n!field_expression.repeated.message\x12.test message field_expression.repeated.message\x1a\x15this.all(e, e.a == 1)R\x03val\x1a\x13\n\x03Msg\x12\x0c\n\x01\x61\x18\x01 \x01(\x05R\x01\x61\"\xac\x01\n\"FieldExpressionRepeatedScalarItems\x12\x85\x01\n\x03val\x18\x01 \x03(\x05\x42s\xbaHp\x92\x01m\"k\xba\x01h\n&field_expression.repeated.scalar.items\x12\x33test message field_expression.repeated.scalar.items\x1a\tthis == 1R\x03val\"\xd9\x01\n FieldExpressionRepeatedEnumItems\x12\xb4\x01\n\x03val\x18\x01 \x03(\x0e\x32\x31.buf.validate.conformance.cases.custom_rules.EnumBo\xbaHl\x92\x01i\"g\xba\x01\x64\n$field_expression.repeated.enum.items\x12\x31test message field_expression.repeated.enum.items\x1a\tthis == 1R\x03val\"\x9c\x02\n#FieldExpressionRepeatedMessageItems\x12\xdf\x01\n\x03val\x18\x01 \x03(\x0b\x32T.buf.validate.conformance.cases.custom_rules.FieldExpressionRepeatedMessageItems.MsgBw\xbaHt\x92\x01q\"o\xba\x01l\n\'field_expression.repeated.message.items\x12\x34test message field_expression.repeated.message.items\x1a\x0bthis.a == 1R\x03val\x1a\x13\n\x03Msg\x12\x0c\n\x01\x61\x18\x01 \x01(\x05R\x01\x61**\n\x04\x45num\x12\x14\n\x10\x45NUM_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x45NUM_ONE\x10\x01\x42\x91\x02\n/com.buf.validate.conformance.cases.custom_rulesB\x10\x43ustomRulesProtoP\x01\xa2\x02\x05\x42VCCC\xaa\x02*Buf.Validate.Conformance.Cases.CustomRules\xca\x02*Buf\\Validate\\Conformance\\Cases\\CustomRules\xe2\x02\x36\x42uf\\Validate\\Conformance\\Cases\\CustomRules\\GPBMetadata\xea\x02.Buf::Validate::Conformance::Cases::CustomRulesb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n>buf/validate/conformance/cases/custom_rules/custom_rules.proto\x12+buf.validate.conformance.cases.custom_rules\x1a\x1b\x62uf/validate/validate.proto\"\xb9\x01\n\rNoExpressions\x12\x0c\n\x01\x61\x18\x01 \x01(\x05R\x01\x61\x12?\n\x01\x62\x18\x02 \x01(\x0e\x32\x31.buf.validate.conformance.cases.custom_rules.EnumR\x01\x62\x12O\n\x01\x63\x18\x03 \x01(\x0b\x32\x41.buf.validate.conformance.cases.custom_rules.NoExpressions.NestedR\x01\x63\x1a\x08\n\x06Nested\"\xab\x05\n\x12MessageExpressions\x12\x0c\n\x01\x61\x18\x01 \x01(\x05R\x01\x61\x12\x0c\n\x01\x62\x18\x02 \x01(\x05R\x01\x62\x12?\n\x01\x63\x18\x03 \x01(\x0e\x32\x31.buf.validate.conformance.cases.custom_rules.EnumR\x01\x63\x12?\n\x01\x64\x18\x04 \x01(\x0e\x32\x31.buf.validate.conformance.cases.custom_rules.EnumR\x01\x64\x12T\n\x01\x65\x18\x05 \x01(\x0b\x32\x46.buf.validate.conformance.cases.custom_rules.MessageExpressions.NestedR\x01\x65\x12T\n\x01\x66\x18\x06 \x01(\x0b\x32\x46.buf.validate.conformance.cases.custom_rules.MessageExpressions.NestedR\x01\x66\x1ax\n\x06Nested\x12\x0c\n\x01\x61\x18\x01 \x01(\x05R\x01\x61\x12\x0c\n\x01\x62\x18\x02 \x01(\x05R\x01\x62:R\xbaHO\x1aM\n\x19message_expression_nested\x1a\x30this.a > this.b ? \'\': \'a must be greater than b\':\xd0\x01\xbaH\xcc\x01\x1a\x43\n\x19message_expression_scalar\x12\x15\x61 must be less than b\x1a\x0fthis.a < this.b\x1a?\n\x17message_expression_enum\x12\x12\x63 must not equal d\x1a\x10this.c != this.d\x1a\x44\n\x18message_expression_embed\x12\x12\x65.a must equal f.a\x1a\x14this.e.a == this.f.a\"6\n\x15MessageExpressionOnly\x12\x0c\n\x01\x61\x18\x01 \x01(\x05R\x01\x61:\x0f\xbaH\x0c*\nthis.a > 0\"R\n\x0cMissingField\x12\x0c\n\x01\x61\x18\x01 \x01(\x05R\x01\x61:4\xbaH1\x1a/\n\rmissing_field\x12\x12\x62 must be positive\x1a\nthis.b > 0\"g\n\rIncorrectType\x12\x0c\n\x01\x61\x18\x01 \x01(\x05R\x01\x61:H\xbaHE\x1a\x43\n\x0eincorrect_type\x12\x17\x61 must start with \'foo\'\x1a\x18this.a.startsWith(\'foo\')\"}\n\x0f\x44ynRuntimeError\x12\x0c\n\x01\x61\x18\x01 \x01(\x05R\x01\x61:\\\xbaHY\x1aW\n\x0f\x64yn_runtime_err\x12.dynamic type tries to use a non-existent field\x1a\x14\x64yn(this).b == \'foo\'\"\\\n\x0cNowEqualsNow:L\xbaHI\x1aG\n\x0enow_equals_now\x12)now should equal now within an expression\x1a\nnow == now\"8\n\x13\x46ieldExpressionOnly\x12!\n\x03val\x18\x01 \x01(\x05\x42\x0f\xbaH\x0c\xea\x01\tthis > 42R\x03val\"\xdf\x02\n\x1d\x46ieldExpressionMultipleScalar\x12\xbd\x02\n\x03val\x18\x01 \x01(\x05\x42\xaa\x02\xbaH\xa6\x02\xba\x01_\n\"field_expression.multiple.scalar.1\x12/test message field_expression.multiple.scalar.1\x1a\x08this > 0\xba\x01_\n\"field_expression.multiple.scalar.2\x12/test message field_expression.multiple.scalar.2\x1a\x08this > 1\xba\x01_\n\"field_expression.multiple.scalar.3\x12/test message field_expression.multiple.scalar.3\x1a\x08this > 2R\x03val\"y\n\x1b\x46ieldExpressionNestedScalar\x12Z\n\x06nested\x18\x01 \x01(\x0b\x32\x42.buf.validate.conformance.cases.custom_rules.FieldExpressionScalarR\x06nested\"\xa2\x01\n\x1d\x46ieldExpressionOptionalScalar\x12y\n\x03val\x18\x01 \x01(\x05\x42\x62\xbaH_\xba\x01\\\n field_expression.optional.scalar\x12-test message field_expression.optional.scalar\x1a\tthis == 1H\x00R\x03val\x88\x01\x01\x42\x06\n\x04_val\"{\n\x15\x46ieldExpressionScalar\x12\x62\n\x03val\x18\x01 \x01(\x05\x42P\xbaHM\xba\x01J\n\x17\x66ield_expression.scalar\x12$test message field_expression.scalar\x1a\tthis == 1R\x03val\"\xa9\x01\n\x13\x46ieldExpressionEnum\x12\x91\x01\n\x03val\x18\x01 \x01(\x0e\x32\x31.buf.validate.conformance.cases.custom_rules.EnumBL\xbaHI\xba\x01\x46\n\x15\x66ield_expression.enum\x12\"test message field_expression.enum\x1a\tthis == 1R\x03val\"\xdf\x01\n\x16\x46ieldExpressionMessage\x12\xaf\x01\n\x03val\x18\x01 \x01(\x0b\x32G.buf.validate.conformance.cases.custom_rules.FieldExpressionMessage.MsgBT\xbaHQ\xba\x01N\n\x18\x66ield_expression.message\x12%test message field_expression.message\x1a\x0bthis.a == 1R\x03val\x1a\x13\n\x03Msg\x12\x0c\n\x01\x61\x18\x01 \x01(\x05R\x01\x61\"\x8f\x02\n\x17\x46ieldExpressionMapInt32\x12\xbb\x01\n\x03val\x18\x01 \x03(\x0b\x32M.buf.validate.conformance.cases.custom_rules.FieldExpressionMapInt32.ValEntryBZ\xbaHW\xba\x01T\n\x1a\x66ield_expression.map.int32\x12\x1b\x61ll map values must equal 1\x1a\x19this.all(k, this[k] == 1)R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\x8f\x02\n\x17\x46ieldExpressionMapInt64\x12\xbb\x01\n\x03val\x18\x01 \x03(\x0b\x32M.buf.validate.conformance.cases.custom_rules.FieldExpressionMapInt64.ValEntryBZ\xbaHW\xba\x01T\n\x1a\x66ield_expression.map.int64\x12\x1b\x61ll map values must equal 1\x1a\x19this.all(k, this[k] == 1)R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x03R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x03R\x05value:\x02\x38\x01\"\x98\x02\n\x18\x46ieldExpressionMapUint32\x12\xc3\x01\n\x03val\x18\x01 \x03(\x0b\x32N.buf.validate.conformance.cases.custom_rules.FieldExpressionMapUint32.ValEntryBa\xbaH^\xba\x01[\n\x1b\x66ield_expression.map.uint32\x12\x1b\x61ll map values must equal 1\x1a\x1fthis.all(k, this[k] == uint(1))R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\rR\x03key\x12\x14\n\x05value\x18\x02 \x01(\rR\x05value:\x02\x38\x01\"\x98\x02\n\x18\x46ieldExpressionMapUint64\x12\xc3\x01\n\x03val\x18\x01 \x03(\x0b\x32N.buf.validate.conformance.cases.custom_rules.FieldExpressionMapUint64.ValEntryBa\xbaH^\xba\x01[\n\x1b\x66ield_expression.map.uint64\x12\x1b\x61ll map values must equal 1\x1a\x1fthis.all(k, this[k] == uint(1))R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x04R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x04R\x05value:\x02\x38\x01\"\x94\x02\n\x16\x46ieldExpressionMapBool\x12\xc1\x01\n\x03val\x18\x01 \x03(\x0b\x32L.buf.validate.conformance.cases.custom_rules.FieldExpressionMapBool.ValEntryBa\xbaH^\xba\x01[\n\x19\x66ield_expression.map.bool\x12\x1f\x61ll map values must equal false\x1a\x1dthis.all(k, this[k] == false)R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x08R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x08R\x05value:\x02\x38\x01\"\x9a\x02\n\x18\x46ieldExpressionMapString\x12\xc5\x01\n\x03val\x18\x01 \x03(\x0b\x32N.buf.validate.conformance.cases.custom_rules.FieldExpressionMapString.ValEntryBc\xbaH`\xba\x01]\n\x1b\x66ield_expression.map.string\x12\x1f\x61ll map values must equal \'foo\'\x1a\x1dthis.all(k, this[k] == \'foo\')R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xca\x02\n\x16\x46ieldExpressionMapEnum\x12\xc4\x01\n\x03val\x18\x01 \x03(\x0b\x32L.buf.validate.conformance.cases.custom_rules.FieldExpressionMapEnum.ValEntryBd\xbaHa\xba\x01^\n\x19\x66ield_expression.map.enum\x12&test message field_expression.map.enum\x1a\x19this.all(k, this[k] == 1)R\x03val\x1ai\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12G\n\x05value\x18\x02 \x01(\x0e\x32\x31.buf.validate.conformance.cases.custom_rules.EnumR\x05value:\x02\x38\x01\"\x87\x03\n\x19\x46ieldExpressionMapMessage\x12\xcf\x01\n\x03val\x18\x01 \x03(\x0b\x32O.buf.validate.conformance.cases.custom_rules.FieldExpressionMapMessage.ValEntryBl\xbaHi\xba\x01\x66\n\x1c\x66ield_expression.map.message\x12)test message field_expression.map.message\x1a\x1bthis.all(k, this[k].a == 1)R\x03val\x1a\x82\x01\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12`\n\x05value\x18\x02 \x01(\x0b\x32J.buf.validate.conformance.cases.custom_rules.FieldExpressionMapMessage.MsgR\x05value:\x02\x38\x01\x1a\x13\n\x03Msg\x12\x0c\n\x01\x61\x18\x01 \x01(\x05R\x01\x61\"\x99\x02\n\x16\x46ieldExpressionMapKeys\x12\xc6\x01\n\x03val\x18\x01 \x03(\x0b\x32L.buf.validate.conformance.cases.custom_rules.FieldExpressionMapKeys.ValEntryBf\xbaHc\x9a\x01`\"^\xba\x01[\n\x19\x66ield_expression.map.keys\x12&test message field_expression.map.keys\x1a\x16this == 4 || this == 8R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xae\x02\n\x1e\x46ieldExpressionMapScalarValues\x12\xd3\x01\n\x03val\x18\x01 \x03(\x0b\x32T.buf.validate.conformance.cases.custom_rules.FieldExpressionMapScalarValues.ValEntryBk\xbaHh\x9a\x01\x65*c\xba\x01`\n\"field_expression.map.scalar.values\x12/test message field_expression.map.scalar.values\x1a\tthis == 1R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xd9\x02\n\x1c\x46ieldExpressionMapEnumValues\x12\xcd\x01\n\x03val\x18\x01 \x03(\x0b\x32R.buf.validate.conformance.cases.custom_rules.FieldExpressionMapEnumValues.ValEntryBg\xbaHd\x9a\x01\x61*_\xba\x01\\\n field_expression.map.enum.values\x12-test message field_expression.map.enum.values\x1a\tthis == 1R\x03val\x1ai\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12G\n\x05value\x18\x02 \x01(\x0e\x32\x31.buf.validate.conformance.cases.custom_rules.EnumR\x05value:\x02\x38\x01\"\x9c\x03\n\x1f\x46ieldExpressionMapMessageValues\x12\xd8\x01\n\x03val\x18\x01 \x03(\x0b\x32U.buf.validate.conformance.cases.custom_rules.FieldExpressionMapMessageValues.ValEntryBo\xbaHl\x9a\x01i*g\xba\x01\x64\n#field_expression.map.message.values\x12\x30test message field_expression.map.message.values\x1a\x0bthis.a == 1R\x03val\x1a\x88\x01\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x66\n\x05value\x18\x02 \x01(\x0b\x32P.buf.validate.conformance.cases.custom_rules.FieldExpressionMapMessageValues.MsgR\x05value:\x02\x38\x01\x1a\x13\n\x03Msg\x12\x0c\n\x01\x61\x18\x01 \x01(\x05R\x01\x61\"\x9f\x01\n\x1d\x46ieldExpressionRepeatedScalar\x12~\n\x03val\x18\x01 \x03(\x05\x42l\xbaHi\xba\x01\x66\n field_expression.repeated.scalar\x12-test message field_expression.repeated.scalar\x1a\x13this.all(e, e == 1)R\x03val\"\xcd\x01\n\x1b\x46ieldExpressionRepeatedEnum\x12\xad\x01\n\x03val\x18\x01 \x03(\x0e\x32\x31.buf.validate.conformance.cases.custom_rules.EnumBh\xbaHe\xba\x01\x62\n\x1e\x66ield_expression.repeated.enum\x12+test message field_expression.repeated.enum\x1a\x13this.all(e, e == 1)R\x03val\"\x8b\x02\n\x1e\x46ieldExpressionRepeatedMessage\x12\xd3\x01\n\x03val\x18\x01 \x03(\x0b\x32O.buf.validate.conformance.cases.custom_rules.FieldExpressionRepeatedMessage.MsgBp\xbaHm\xba\x01j\n!field_expression.repeated.message\x12.test message field_expression.repeated.message\x1a\x15this.all(e, e.a == 1)R\x03val\x1a\x13\n\x03Msg\x12\x0c\n\x01\x61\x18\x01 \x01(\x05R\x01\x61\"\xac\x01\n\"FieldExpressionRepeatedScalarItems\x12\x85\x01\n\x03val\x18\x01 \x03(\x05\x42s\xbaHp\x92\x01m\"k\xba\x01h\n&field_expression.repeated.scalar.items\x12\x33test message field_expression.repeated.scalar.items\x1a\tthis == 1R\x03val\"\xd9\x01\n FieldExpressionRepeatedEnumItems\x12\xb4\x01\n\x03val\x18\x01 \x03(\x0e\x32\x31.buf.validate.conformance.cases.custom_rules.EnumBo\xbaHl\x92\x01i\"g\xba\x01\x64\n$field_expression.repeated.enum.items\x12\x31test message field_expression.repeated.enum.items\x1a\tthis == 1R\x03val\"\x9c\x02\n#FieldExpressionRepeatedMessageItems\x12\xdf\x01\n\x03val\x18\x01 \x03(\x0b\x32T.buf.validate.conformance.cases.custom_rules.FieldExpressionRepeatedMessageItems.MsgBw\xbaHt\x92\x01q\"o\xba\x01l\n\'field_expression.repeated.message.items\x12\x34test message field_expression.repeated.message.items\x1a\x0bthis.a == 1R\x03val\x1a\x13\n\x03Msg\x12\x0c\n\x01\x61\x18\x01 \x01(\x05R\x01\x61**\n\x04\x45num\x12\x14\n\x10\x45NUM_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x45NUM_ONE\x10\x01\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'buf.validate.conformance.cases.custom_rules.custom_rules_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n/com.buf.validate.conformance.cases.custom_rulesB\020CustomRulesProtoP\001\242\002\005BVCCC\252\002*Buf.Validate.Conformance.Cases.CustomRules\312\002*Buf\\Validate\\Conformance\\Cases\\CustomRules\342\0026Buf\\Validate\\Conformance\\Cases\\CustomRules\\GPBMetadata\352\002.Buf::Validate::Conformance::Cases::CustomRules' + DESCRIPTOR._loaded_options = None _globals['_MESSAGEEXPRESSIONS_NESTED']._loaded_options = None _globals['_MESSAGEEXPRESSIONS_NESTED']._serialized_options = b'\272HO\032M\n\031message_expression_nested\0320this.a > this.b ? \'\': \'a must be greater than b\'' _globals['_MESSAGEEXPRESSIONS']._loaded_options = None diff --git a/packages/protovalidate-proto/src/buf/validate/conformance/cases/enums_pb2.py b/packages/protovalidate-proto/src/buf/validate/conformance/cases/enums_pb2.py index 6be6b650..2aceede9 100644 --- a/packages/protovalidate-proto/src/buf/validate/conformance/cases/enums_pb2.py +++ b/packages/protovalidate-proto/src/buf/validate/conformance/cases/enums_pb2.py @@ -31,14 +31,13 @@ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*buf/validate/conformance/cases/enums.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x38\x62uf/validate/conformance/cases/other_package/embed.proto\x1a?buf/validate/conformance/cases/yet_another_package/embed2.proto\x1a\x1b\x62uf/validate/validate.proto\"F\n\x08\x45numNone\x12:\n\x03val\x18\x01 \x01(\x0e\x32(.buf.validate.conformance.cases.TestEnumR\x03val\"Q\n\tEnumConst\x12\x44\n\x03val\x18\x01 \x01(\x0e\x32(.buf.validate.conformance.cases.TestEnumB\x08\xbaH\x05\x82\x01\x02\x08\x02R\x03val\"[\n\x0e\x45numAliasConst\x12I\n\x03val\x18\x01 \x01(\x0e\x32-.buf.validate.conformance.cases.TestEnumAliasB\x08\xbaH\x05\x82\x01\x02\x08\x02R\x03val\"S\n\x0b\x45numDefined\x12\x44\n\x03val\x18\x01 \x01(\x0e\x32(.buf.validate.conformance.cases.TestEnumB\x08\xbaH\x05\x82\x01\x02\x10\x01R\x03val\"]\n\x10\x45numAliasDefined\x12I\n\x03val\x18\x01 \x01(\x0e\x32-.buf.validate.conformance.cases.TestEnumAliasB\x08\xbaH\x05\x82\x01\x02\x10\x01R\x03val\"P\n\x06\x45numIn\x12\x46\n\x03val\x18\x01 \x01(\x0e\x32(.buf.validate.conformance.cases.TestEnumB\n\xbaH\x07\x82\x01\x04\x18\x00\x18\x02R\x03val\"Z\n\x0b\x45numAliasIn\x12K\n\x03val\x18\x01 \x01(\x0e\x32-.buf.validate.conformance.cases.TestEnumAliasB\n\xbaH\x07\x82\x01\x04\x18\x00\x18\x02R\x03val\"Q\n\tEnumNotIn\x12\x44\n\x03val\x18\x01 \x01(\x0e\x32(.buf.validate.conformance.cases.TestEnumB\x08\xbaH\x05\x82\x01\x02 \x01R\x03val\"[\n\x0e\x45numAliasNotIn\x12I\n\x03val\x18\x01 \x01(\x0e\x32-.buf.validate.conformance.cases.TestEnumAliasB\x08\xbaH\x05\x82\x01\x02 \x01R\x03val\"j\n\x0c\x45numExternal\x12Z\n\x03val\x18\x01 \x01(\x0e\x32>.buf.validate.conformance.cases.other_package.Embed.EnumeratedB\x08\xbaH\x05\x82\x01\x02\x10\x01R\x03val\"}\n\rEnumExternal2\x12l\n\x03val\x18\x01 \x01(\x0e\x32P.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed.DoubleEnumeratedB\x08\xbaH\x05\x82\x01\x02\x10\x01R\x03val\"`\n\x13RepeatedEnumDefined\x12I\n\x03val\x18\x01 \x03(\x0e\x32(.buf.validate.conformance.cases.TestEnumB\r\xbaH\n\x92\x01\x07\"\x05\x82\x01\x02\x10\x01R\x03val\"~\n\x1bRepeatedExternalEnumDefined\x12_\n\x03val\x18\x01 \x03(\x0e\x32>.buf.validate.conformance.cases.other_package.Embed.EnumeratedB\r\xbaH\n\x92\x01\x07\"\x05\x82\x01\x02\x10\x01R\x03val\"\x8e\x01\n%RepeatedYetAnotherExternalEnumDefined\x12\x65\n\x03val\x18\x01 \x03(\x0e\x32\x44.buf.validate.conformance.cases.yet_another_package.Embed.EnumeratedB\r\xbaH\n\x92\x01\x07\"\x05\x82\x01\x02\x10\x01R\x03val\"\xcc\x01\n\x0eMapEnumDefined\x12X\n\x03val\x18\x01 \x03(\x0b\x32\x37.buf.validate.conformance.cases.MapEnumDefined.ValEntryB\r\xbaH\n\x9a\x01\x07*\x05\x82\x01\x02\x10\x01R\x03val\x1a`\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12>\n\x05value\x18\x02 \x01(\x0e\x32(.buf.validate.conformance.cases.TestEnumR\x05value:\x02\x38\x01\"\xf2\x01\n\x16MapExternalEnumDefined\x12`\n\x03val\x18\x01 \x03(\x0b\x32?.buf.validate.conformance.cases.MapExternalEnumDefined.ValEntryB\r\xbaH\n\x9a\x01\x07*\x05\x82\x01\x02\x10\x01R\x03val\x1av\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12T\n\x05value\x18\x02 \x01(\x0e\x32>.buf.validate.conformance.cases.other_package.Embed.EnumeratedR\x05value:\x02\x38\x01\"\xb3\x01\n\x0f\x45numInsideOneof\x12\x46\n\x03val\x18\x01 \x01(\x0e\x32(.buf.validate.conformance.cases.TestEnumB\x08\xbaH\x05\x82\x01\x02\x10\x01H\x00R\x03val\x12J\n\x04val2\x18\x02 \x01(\x0e\x32(.buf.validate.conformance.cases.TestEnumB\n\xbaH\x07\x82\x01\x04\x10\x01 \x00H\x01R\x04val2B\x05\n\x03\x66ooB\x05\n\x03\x62\x61r\"S\n\x0b\x45numExample\x12\x44\n\x03val\x18\x01 \x01(\x0e\x32(.buf.validate.conformance.cases.TestEnumB\x08\xbaH\x05\x82\x01\x02(\x02R\x03val*K\n\x08TestEnum\x12\x19\n\x15TEST_ENUM_UNSPECIFIED\x10\x00\x12\x11\n\rTEST_ENUM_ONE\x10\x01\x12\x11\n\rTEST_ENUM_TWO\x10\x02*\xc9\x01\n\rTestEnumAlias\x12\x1f\n\x1bTEST_ENUM_ALIAS_UNSPECIFIED\x10\x00\x12\x15\n\x11TEST_ENUM_ALIAS_A\x10\x01\x12\x15\n\x11TEST_ENUM_ALIAS_B\x10\x02\x12\x15\n\x11TEST_ENUM_ALIAS_C\x10\x03\x12\x19\n\x15TEST_ENUM_ALIAS_ALPHA\x10\x01\x12\x18\n\x14TEST_ENUM_ALIAS_BETA\x10\x02\x12\x19\n\x15TEST_ENUM_ALIAS_GAMMA\x10\x03\x1a\x02\x10\x01\x42\xcc\x01\n\"com.buf.validate.conformance.casesB\nEnumsProtoP\x01\xa2\x02\x04\x42VCC\xaa\x02\x1e\x42uf.Validate.Conformance.Cases\xca\x02\x1e\x42uf\\Validate\\Conformance\\Cases\xe2\x02*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\xea\x02!Buf::Validate::Conformance::Casesb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*buf/validate/conformance/cases/enums.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x38\x62uf/validate/conformance/cases/other_package/embed.proto\x1a?buf/validate/conformance/cases/yet_another_package/embed2.proto\x1a\x1b\x62uf/validate/validate.proto\"F\n\x08\x45numNone\x12:\n\x03val\x18\x01 \x01(\x0e\x32(.buf.validate.conformance.cases.TestEnumR\x03val\"Q\n\tEnumConst\x12\x44\n\x03val\x18\x01 \x01(\x0e\x32(.buf.validate.conformance.cases.TestEnumB\x08\xbaH\x05\x82\x01\x02\x08\x02R\x03val\"[\n\x0e\x45numAliasConst\x12I\n\x03val\x18\x01 \x01(\x0e\x32-.buf.validate.conformance.cases.TestEnumAliasB\x08\xbaH\x05\x82\x01\x02\x08\x02R\x03val\"S\n\x0b\x45numDefined\x12\x44\n\x03val\x18\x01 \x01(\x0e\x32(.buf.validate.conformance.cases.TestEnumB\x08\xbaH\x05\x82\x01\x02\x10\x01R\x03val\"]\n\x10\x45numAliasDefined\x12I\n\x03val\x18\x01 \x01(\x0e\x32-.buf.validate.conformance.cases.TestEnumAliasB\x08\xbaH\x05\x82\x01\x02\x10\x01R\x03val\"P\n\x06\x45numIn\x12\x46\n\x03val\x18\x01 \x01(\x0e\x32(.buf.validate.conformance.cases.TestEnumB\n\xbaH\x07\x82\x01\x04\x18\x00\x18\x02R\x03val\"Z\n\x0b\x45numAliasIn\x12K\n\x03val\x18\x01 \x01(\x0e\x32-.buf.validate.conformance.cases.TestEnumAliasB\n\xbaH\x07\x82\x01\x04\x18\x00\x18\x02R\x03val\"Q\n\tEnumNotIn\x12\x44\n\x03val\x18\x01 \x01(\x0e\x32(.buf.validate.conformance.cases.TestEnumB\x08\xbaH\x05\x82\x01\x02 \x01R\x03val\"[\n\x0e\x45numAliasNotIn\x12I\n\x03val\x18\x01 \x01(\x0e\x32-.buf.validate.conformance.cases.TestEnumAliasB\x08\xbaH\x05\x82\x01\x02 \x01R\x03val\"j\n\x0c\x45numExternal\x12Z\n\x03val\x18\x01 \x01(\x0e\x32>.buf.validate.conformance.cases.other_package.Embed.EnumeratedB\x08\xbaH\x05\x82\x01\x02\x10\x01R\x03val\"}\n\rEnumExternal2\x12l\n\x03val\x18\x01 \x01(\x0e\x32P.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed.DoubleEnumeratedB\x08\xbaH\x05\x82\x01\x02\x10\x01R\x03val\"`\n\x13RepeatedEnumDefined\x12I\n\x03val\x18\x01 \x03(\x0e\x32(.buf.validate.conformance.cases.TestEnumB\r\xbaH\n\x92\x01\x07\"\x05\x82\x01\x02\x10\x01R\x03val\"~\n\x1bRepeatedExternalEnumDefined\x12_\n\x03val\x18\x01 \x03(\x0e\x32>.buf.validate.conformance.cases.other_package.Embed.EnumeratedB\r\xbaH\n\x92\x01\x07\"\x05\x82\x01\x02\x10\x01R\x03val\"\x8e\x01\n%RepeatedYetAnotherExternalEnumDefined\x12\x65\n\x03val\x18\x01 \x03(\x0e\x32\x44.buf.validate.conformance.cases.yet_another_package.Embed.EnumeratedB\r\xbaH\n\x92\x01\x07\"\x05\x82\x01\x02\x10\x01R\x03val\"\xcc\x01\n\x0eMapEnumDefined\x12X\n\x03val\x18\x01 \x03(\x0b\x32\x37.buf.validate.conformance.cases.MapEnumDefined.ValEntryB\r\xbaH\n\x9a\x01\x07*\x05\x82\x01\x02\x10\x01R\x03val\x1a`\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12>\n\x05value\x18\x02 \x01(\x0e\x32(.buf.validate.conformance.cases.TestEnumR\x05value:\x02\x38\x01\"\xf2\x01\n\x16MapExternalEnumDefined\x12`\n\x03val\x18\x01 \x03(\x0b\x32?.buf.validate.conformance.cases.MapExternalEnumDefined.ValEntryB\r\xbaH\n\x9a\x01\x07*\x05\x82\x01\x02\x10\x01R\x03val\x1av\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12T\n\x05value\x18\x02 \x01(\x0e\x32>.buf.validate.conformance.cases.other_package.Embed.EnumeratedR\x05value:\x02\x38\x01\"\xb3\x01\n\x0f\x45numInsideOneof\x12\x46\n\x03val\x18\x01 \x01(\x0e\x32(.buf.validate.conformance.cases.TestEnumB\x08\xbaH\x05\x82\x01\x02\x10\x01H\x00R\x03val\x12J\n\x04val2\x18\x02 \x01(\x0e\x32(.buf.validate.conformance.cases.TestEnumB\n\xbaH\x07\x82\x01\x04\x10\x01 \x00H\x01R\x04val2B\x05\n\x03\x66ooB\x05\n\x03\x62\x61r\"S\n\x0b\x45numExample\x12\x44\n\x03val\x18\x01 \x01(\x0e\x32(.buf.validate.conformance.cases.TestEnumB\x08\xbaH\x05\x82\x01\x02(\x02R\x03val*K\n\x08TestEnum\x12\x19\n\x15TEST_ENUM_UNSPECIFIED\x10\x00\x12\x11\n\rTEST_ENUM_ONE\x10\x01\x12\x11\n\rTEST_ENUM_TWO\x10\x02*\xc9\x01\n\rTestEnumAlias\x12\x1f\n\x1bTEST_ENUM_ALIAS_UNSPECIFIED\x10\x00\x12\x15\n\x11TEST_ENUM_ALIAS_A\x10\x01\x12\x15\n\x11TEST_ENUM_ALIAS_B\x10\x02\x12\x15\n\x11TEST_ENUM_ALIAS_C\x10\x03\x12\x19\n\x15TEST_ENUM_ALIAS_ALPHA\x10\x01\x12\x18\n\x14TEST_ENUM_ALIAS_BETA\x10\x02\x12\x19\n\x15TEST_ENUM_ALIAS_GAMMA\x10\x03\x1a\x02\x10\x01\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'buf.validate.conformance.cases.enums_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\"com.buf.validate.conformance.casesB\nEnumsProtoP\001\242\002\004BVCC\252\002\036Buf.Validate.Conformance.Cases\312\002\036Buf\\Validate\\Conformance\\Cases\342\002*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\352\002!Buf::Validate::Conformance::Cases' + DESCRIPTOR._loaded_options = None _globals['_TESTENUMALIAS']._loaded_options = None _globals['_TESTENUMALIAS']._serialized_options = b'\020\001' _globals['_ENUMCONST'].fields_by_name['val']._loaded_options = None diff --git a/packages/protovalidate-proto/src/buf/validate/conformance/cases/filename_with_dash_pb2.py b/packages/protovalidate-proto/src/buf/validate/conformance/cases/filename_with_dash_pb2.py index 1eb38833..a92c69d1 100644 --- a/packages/protovalidate-proto/src/buf/validate/conformance/cases/filename_with_dash_pb2.py +++ b/packages/protovalidate-proto/src/buf/validate/conformance/cases/filename_with_dash_pb2.py @@ -29,12 +29,11 @@ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n7buf/validate/conformance/cases/filename-with-dash.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.protoB\xd7\x01\n\"com.buf.validate.conformance.casesB\x15\x46ilenameWithDashProtoP\x01\xa2\x02\x04\x42VCC\xaa\x02\x1e\x42uf.Validate.Conformance.Cases\xca\x02\x1e\x42uf\\Validate\\Conformance\\Cases\xe2\x02*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\xea\x02!Buf::Validate::Conformance::Casesb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n7buf/validate/conformance/cases/filename-with-dash.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.protob\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'buf.validate.conformance.cases.filename_with_dash_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\"com.buf.validate.conformance.casesB\025FilenameWithDashProtoP\001\242\002\004BVCC\252\002\036Buf.Validate.Conformance.Cases\312\002\036Buf\\Validate\\Conformance\\Cases\342\002*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\352\002!Buf::Validate::Conformance::Cases' + DESCRIPTOR._loaded_options = None # @@protoc_insertion_point(module_scope) diff --git a/packages/protovalidate-proto/src/buf/validate/conformance/cases/groups_editions_pb2.py b/packages/protovalidate-proto/src/buf/validate/conformance/cases/groups_editions_pb2.py index d51f20c6..3f5f9fb7 100644 --- a/packages/protovalidate-proto/src/buf/validate/conformance/cases/groups_editions_pb2.py +++ b/packages/protovalidate-proto/src/buf/validate/conformance/cases/groups_editions_pb2.py @@ -29,14 +29,13 @@ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n4buf/validate/conformance/cases/groups_editions.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"\x83\x01\n\x0eGroupDelimited\x12Q\n\x05value\x18\x01 \x01(\x0b\x32\x34.buf.validate.conformance.cases.GroupDelimited.ValueB\x05\xaa\x01\x02(\x02R\x05value\x1a\x1e\n\x05Value\x12\x15\n\x01x\x18\x01 \x01(\x08\x42\x07\xbaH\x04j\x02\x08\x01R\x01xB\xd5\x01\n\"com.buf.validate.conformance.casesB\x13GroupsEditionsProtoP\x01\xa2\x02\x04\x42VCC\xaa\x02\x1e\x42uf.Validate.Conformance.Cases\xca\x02\x1e\x42uf\\Validate\\Conformance\\Cases\xe2\x02*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\xea\x02!Buf::Validate::Conformance::Casesb\x08\x65\x64itionsp\xe8\x07') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n4buf/validate/conformance/cases/groups_editions.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"\x83\x01\n\x0eGroupDelimited\x12Q\n\x05value\x18\x01 \x01(\x0b\x32\x34.buf.validate.conformance.cases.GroupDelimited.ValueB\x05\xaa\x01\x02(\x02R\x05value\x1a\x1e\n\x05Value\x12\x15\n\x01x\x18\x01 \x01(\x08\x42\x07\xbaH\x04j\x02\x08\x01R\x01xb\x08\x65\x64itionsp\xe8\x07') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'buf.validate.conformance.cases.groups_editions_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\"com.buf.validate.conformance.casesB\023GroupsEditionsProtoP\001\242\002\004BVCC\252\002\036Buf.Validate.Conformance.Cases\312\002\036Buf\\Validate\\Conformance\\Cases\342\002*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\352\002!Buf::Validate::Conformance::Cases' + DESCRIPTOR._loaded_options = None _globals['_GROUPDELIMITED_VALUE'].fields_by_name['x']._loaded_options = None _globals['_GROUPDELIMITED_VALUE'].fields_by_name['x']._serialized_options = b'\272H\004j\002\010\001' _globals['_GROUPDELIMITED'].fields_by_name['value']._loaded_options = None diff --git a/packages/protovalidate-proto/src/buf/validate/conformance/cases/groups_proto2_pb2.py b/packages/protovalidate-proto/src/buf/validate/conformance/cases/groups_proto2_pb2.py index 3fc0960b..b27f9075 100644 --- a/packages/protovalidate-proto/src/buf/validate/conformance/cases/groups_proto2_pb2.py +++ b/packages/protovalidate-proto/src/buf/validate/conformance/cases/groups_proto2_pb2.py @@ -29,14 +29,13 @@ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n2buf/validate/conformance/cases/groups_proto2.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"\x91\x01\n\rGroupOptional\x12R\n\x08optional\x18\x01 \x01(\n26.buf.validate.conformance.cases.GroupOptional.OptionalR\x08optional\x1a,\n\x08Optional\x12 \n\x05value\x18\x01 \x01(\tB\n\xbaH\x07r\x05\n\x03\x66ooR\x05value\"\x8e\x01\n\rGroupRepeated\x12R\n\x08repeated\x18\x01 \x03(\n26.buf.validate.conformance.cases.GroupRepeated.RepeatedR\x08repeated\x1a)\n\x08Repeated\x12\x1d\n\x05value\x18\x01 \x01(\x05\x42\x07\xbaH\x04\x1a\x02 \x00R\x05value\"\x8e\x01\n\rGroupRequired\x12R\n\x08required\x18\x01 \x02(\n26.buf.validate.conformance.cases.GroupRequired.RequiredR\x08required\x1a)\n\x08Required\x12\x1d\n\x05value\x18\x01 \x01(\x08\x42\x07\xbaH\x04j\x02\x08\x01R\x05value\"\xe1\x01\n\x0bGroupCustom\x12J\n\x06\x63ustom\x18\x01 \x01(\n22.buf.validate.conformance.cases.GroupCustom.CustomR\x06\x63ustom\x1a\x85\x01\n\x06\x43ustom\x12\x14\n\x05value\x18\x01 \x01(\x05R\x05value\x12\x10\n\x03\x64iv\x18\x02 \x01(\x05R\x03\x64iv:S\xbaHP\x1aN\n\x10group.custom.div\x12\x1evalue must be divisible by div\x1a\x1athis.value % this.div == 0B\xd3\x01\n\"com.buf.validate.conformance.casesB\x11GroupsProto2ProtoP\x01\xa2\x02\x04\x42VCC\xaa\x02\x1e\x42uf.Validate.Conformance.Cases\xca\x02\x1e\x42uf\\Validate\\Conformance\\Cases\xe2\x02*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\xea\x02!Buf::Validate::Conformance::Cases') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n2buf/validate/conformance/cases/groups_proto2.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"\x91\x01\n\rGroupOptional\x12R\n\x08optional\x18\x01 \x01(\n26.buf.validate.conformance.cases.GroupOptional.OptionalR\x08optional\x1a,\n\x08Optional\x12 \n\x05value\x18\x01 \x01(\tB\n\xbaH\x07r\x05\n\x03\x66ooR\x05value\"\x8e\x01\n\rGroupRepeated\x12R\n\x08repeated\x18\x01 \x03(\n26.buf.validate.conformance.cases.GroupRepeated.RepeatedR\x08repeated\x1a)\n\x08Repeated\x12\x1d\n\x05value\x18\x01 \x01(\x05\x42\x07\xbaH\x04\x1a\x02 \x00R\x05value\"\x8e\x01\n\rGroupRequired\x12R\n\x08required\x18\x01 \x02(\n26.buf.validate.conformance.cases.GroupRequired.RequiredR\x08required\x1a)\n\x08Required\x12\x1d\n\x05value\x18\x01 \x01(\x08\x42\x07\xbaH\x04j\x02\x08\x01R\x05value\"\xe1\x01\n\x0bGroupCustom\x12J\n\x06\x63ustom\x18\x01 \x01(\n22.buf.validate.conformance.cases.GroupCustom.CustomR\x06\x63ustom\x1a\x85\x01\n\x06\x43ustom\x12\x14\n\x05value\x18\x01 \x01(\x05R\x05value\x12\x10\n\x03\x64iv\x18\x02 \x01(\x05R\x03\x64iv:S\xbaHP\x1aN\n\x10group.custom.div\x12\x1evalue must be divisible by div\x1a\x1athis.value % this.div == 0') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'buf.validate.conformance.cases.groups_proto2_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\"com.buf.validate.conformance.casesB\021GroupsProto2ProtoP\001\242\002\004BVCC\252\002\036Buf.Validate.Conformance.Cases\312\002\036Buf\\Validate\\Conformance\\Cases\342\002*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\352\002!Buf::Validate::Conformance::Cases' + DESCRIPTOR._loaded_options = None _globals['_GROUPOPTIONAL_OPTIONAL'].fields_by_name['value']._loaded_options = None _globals['_GROUPOPTIONAL_OPTIONAL'].fields_by_name['value']._serialized_options = b'\272H\007r\005\n\003foo' _globals['_GROUPREPEATED_REPEATED'].fields_by_name['value']._loaded_options = None diff --git a/packages/protovalidate-proto/src/buf/validate/conformance/cases/ignore_empty_proto2_pb2.py b/packages/protovalidate-proto/src/buf/validate/conformance/cases/ignore_empty_proto2_pb2.py index 9cd7fe90..bbec60c8 100644 --- a/packages/protovalidate-proto/src/buf/validate/conformance/cases/ignore_empty_proto2_pb2.py +++ b/packages/protovalidate-proto/src/buf/validate/conformance/cases/ignore_empty_proto2_pb2.py @@ -29,14 +29,13 @@ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n8buf/validate/conformance/cases/ignore_empty_proto2.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"?\n\x1fIgnoreEmptyProto2ScalarOptional\x12\x1c\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"N\n*IgnoreEmptyProto2ScalarOptionalWithDefault\x12 \n\x03val\x18\x01 \x01(\x05:\x02\x34\x32\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"?\n\x1fIgnoreEmptyProto2ScalarRequired\x12\x1c\n\x03val\x18\x01 \x02(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"\xc7\x01\n\x18IgnoreEmptyProto2Message\x12\x91\x01\n\x03val\x18\x01 \x01(\x0b\x32<.buf.validate.conformance.cases.IgnoreEmptyProto2Message.MsgBA\xbaH>\xba\x01\x38\n\x1bignore_empty.proto2.message\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"=\n\x16IgnoreEmptyProto2Oneof\x12\x1e\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01H\x00R\x03valB\x03\n\x01o\":\n\x19IgnoreEmptyProto2Repeated\x12\x1d\n\x03val\x18\x01 \x03(\x05\x42\x0b\xbaH\x08\x92\x01\x02\x08\x03\xd8\x01\x01R\x03val\"\xac\x01\n\x14IgnoreEmptyProto2Map\x12\\\n\x03val\x18\x01 \x03(\x0b\x32=.buf.validate.conformance.cases.IgnoreEmptyProto2Map.ValEntryB\x0b\xbaH\x08\x9a\x01\x02\x08\x03\xd8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\x42\xd8\x01\n\"com.buf.validate.conformance.casesB\x16IgnoreEmptyProto2ProtoP\x01\xa2\x02\x04\x42VCC\xaa\x02\x1e\x42uf.Validate.Conformance.Cases\xca\x02\x1e\x42uf\\Validate\\Conformance\\Cases\xe2\x02*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\xea\x02!Buf::Validate::Conformance::Cases') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n8buf/validate/conformance/cases/ignore_empty_proto2.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"?\n\x1fIgnoreEmptyProto2ScalarOptional\x12\x1c\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"N\n*IgnoreEmptyProto2ScalarOptionalWithDefault\x12 \n\x03val\x18\x01 \x01(\x05:\x02\x34\x32\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"?\n\x1fIgnoreEmptyProto2ScalarRequired\x12\x1c\n\x03val\x18\x01 \x02(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"\xc7\x01\n\x18IgnoreEmptyProto2Message\x12\x91\x01\n\x03val\x18\x01 \x01(\x0b\x32<.buf.validate.conformance.cases.IgnoreEmptyProto2Message.MsgBA\xbaH>\xba\x01\x38\n\x1bignore_empty.proto2.message\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"=\n\x16IgnoreEmptyProto2Oneof\x12\x1e\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01H\x00R\x03valB\x03\n\x01o\":\n\x19IgnoreEmptyProto2Repeated\x12\x1d\n\x03val\x18\x01 \x03(\x05\x42\x0b\xbaH\x08\x92\x01\x02\x08\x03\xd8\x01\x01R\x03val\"\xac\x01\n\x14IgnoreEmptyProto2Map\x12\\\n\x03val\x18\x01 \x03(\x0b\x32=.buf.validate.conformance.cases.IgnoreEmptyProto2Map.ValEntryB\x0b\xbaH\x08\x9a\x01\x02\x08\x03\xd8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'buf.validate.conformance.cases.ignore_empty_proto2_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\"com.buf.validate.conformance.casesB\026IgnoreEmptyProto2ProtoP\001\242\002\004BVCC\252\002\036Buf.Validate.Conformance.Cases\312\002\036Buf\\Validate\\Conformance\\Cases\342\002*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\352\002!Buf::Validate::Conformance::Cases' + DESCRIPTOR._loaded_options = None _globals['_IGNOREEMPTYPROTO2SCALAROPTIONAL'].fields_by_name['val']._loaded_options = None _globals['_IGNOREEMPTYPROTO2SCALAROPTIONAL'].fields_by_name['val']._serialized_options = b'\272H\007\032\002 \000\330\001\001' _globals['_IGNOREEMPTYPROTO2SCALAROPTIONALWITHDEFAULT'].fields_by_name['val']._loaded_options = None diff --git a/packages/protovalidate-proto/src/buf/validate/conformance/cases/ignore_empty_proto3_pb2.py b/packages/protovalidate-proto/src/buf/validate/conformance/cases/ignore_empty_proto3_pb2.py index 639c3e0e..c6ee12cc 100644 --- a/packages/protovalidate-proto/src/buf/validate/conformance/cases/ignore_empty_proto3_pb2.py +++ b/packages/protovalidate-proto/src/buf/validate/conformance/cases/ignore_empty_proto3_pb2.py @@ -29,14 +29,13 @@ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n8buf/validate/conformance/cases/ignore_empty_proto3.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"7\n\x17IgnoreEmptyProto3Scalar\x12\x1c\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"L\n\x1fIgnoreEmptyProto3OptionalScalar\x12!\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01H\x00R\x03val\x88\x01\x01\x42\x06\n\x04_val\"\xd4\x01\n\x18IgnoreEmptyProto3Message\x12\x96\x01\n\x03val\x18\x01 \x01(\x0b\x32<.buf.validate.conformance.cases.IgnoreEmptyProto3Message.MsgBA\xbaH>\xba\x01\x38\n\x1bignore_empty.proto3.message\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x01H\x00R\x03val\x88\x01\x01\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03valB\x06\n\x04_val\"=\n\x16IgnoreEmptyProto3Oneof\x12\x1e\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01H\x00R\x03valB\x03\n\x01o\":\n\x19IgnoreEmptyProto3Repeated\x12\x1d\n\x03val\x18\x01 \x03(\x05\x42\x0b\xbaH\x08\x92\x01\x02\x08\x03\xd8\x01\x01R\x03val\"\xac\x01\n\x14IgnoreEmptyProto3Map\x12\\\n\x03val\x18\x01 \x03(\x0b\x32=.buf.validate.conformance.cases.IgnoreEmptyProto3Map.ValEntryB\x0b\xbaH\x08\x9a\x01\x02\x08\x03\xd8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"=\n\x18IgnoreEmptyRepeatedItems\x12!\n\x03val\x18\x01 \x03(\x05\x42\x0f\xbaH\x0c\x92\x01\t\"\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"\xb7\x01\n\x13IgnoreEmptyMapPairs\x12h\n\x03val\x18\x01 \x03(\x0b\x32<.buf.validate.conformance.cases.IgnoreEmptyMapPairs.ValEntryB\x18\xbaH\x15\x9a\x01\x12\"\x07r\x02\x10\x03\xd8\x01\x01*\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\x42\xd8\x01\n\"com.buf.validate.conformance.casesB\x16IgnoreEmptyProto3ProtoP\x01\xa2\x02\x04\x42VCC\xaa\x02\x1e\x42uf.Validate.Conformance.Cases\xca\x02\x1e\x42uf\\Validate\\Conformance\\Cases\xe2\x02*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\xea\x02!Buf::Validate::Conformance::Casesb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n8buf/validate/conformance/cases/ignore_empty_proto3.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"7\n\x17IgnoreEmptyProto3Scalar\x12\x1c\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"L\n\x1fIgnoreEmptyProto3OptionalScalar\x12!\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01H\x00R\x03val\x88\x01\x01\x42\x06\n\x04_val\"\xd4\x01\n\x18IgnoreEmptyProto3Message\x12\x96\x01\n\x03val\x18\x01 \x01(\x0b\x32<.buf.validate.conformance.cases.IgnoreEmptyProto3Message.MsgBA\xbaH>\xba\x01\x38\n\x1bignore_empty.proto3.message\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x01H\x00R\x03val\x88\x01\x01\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03valB\x06\n\x04_val\"=\n\x16IgnoreEmptyProto3Oneof\x12\x1e\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01H\x00R\x03valB\x03\n\x01o\":\n\x19IgnoreEmptyProto3Repeated\x12\x1d\n\x03val\x18\x01 \x03(\x05\x42\x0b\xbaH\x08\x92\x01\x02\x08\x03\xd8\x01\x01R\x03val\"\xac\x01\n\x14IgnoreEmptyProto3Map\x12\\\n\x03val\x18\x01 \x03(\x0b\x32=.buf.validate.conformance.cases.IgnoreEmptyProto3Map.ValEntryB\x0b\xbaH\x08\x9a\x01\x02\x08\x03\xd8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"=\n\x18IgnoreEmptyRepeatedItems\x12!\n\x03val\x18\x01 \x03(\x05\x42\x0f\xbaH\x0c\x92\x01\t\"\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"\xb7\x01\n\x13IgnoreEmptyMapPairs\x12h\n\x03val\x18\x01 \x03(\x0b\x32<.buf.validate.conformance.cases.IgnoreEmptyMapPairs.ValEntryB\x18\xbaH\x15\x9a\x01\x12\"\x07r\x02\x10\x03\xd8\x01\x01*\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'buf.validate.conformance.cases.ignore_empty_proto3_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\"com.buf.validate.conformance.casesB\026IgnoreEmptyProto3ProtoP\001\242\002\004BVCC\252\002\036Buf.Validate.Conformance.Cases\312\002\036Buf\\Validate\\Conformance\\Cases\342\002*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\352\002!Buf::Validate::Conformance::Cases' + DESCRIPTOR._loaded_options = None _globals['_IGNOREEMPTYPROTO3SCALAR'].fields_by_name['val']._loaded_options = None _globals['_IGNOREEMPTYPROTO3SCALAR'].fields_by_name['val']._serialized_options = b'\272H\007\032\002 \000\330\001\001' _globals['_IGNOREEMPTYPROTO3OPTIONALSCALAR'].fields_by_name['val']._loaded_options = None diff --git a/packages/protovalidate-proto/src/buf/validate/conformance/cases/ignore_empty_proto_editions_pb2.py b/packages/protovalidate-proto/src/buf/validate/conformance/cases/ignore_empty_proto_editions_pb2.py index dcf211f8..c4919be3 100644 --- a/packages/protovalidate-proto/src/buf/validate/conformance/cases/ignore_empty_proto_editions_pb2.py +++ b/packages/protovalidate-proto/src/buf/validate/conformance/cases/ignore_empty_proto_editions_pb2.py @@ -29,14 +29,13 @@ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n@buf/validate/conformance/cases/ignore_empty_proto_editions.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"I\n)IgnoreEmptyEditionsScalarExplicitPresence\x12\x1c\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"X\n4IgnoreEmptyEditionsScalarExplicitPresenceWithDefault\x12 \n\x03val\x18\x01 \x01(\x05:\x02\x34\x32\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"N\n)IgnoreEmptyEditionsScalarImplicitPresence\x12!\n\x03val\x18\x01 \x01(\x05\x42\x0f\xaa\x01\x02\x08\x02\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"L\n\'IgnoreEmptyEditionsScalarLegacyRequired\x12!\n\x03val\x18\x01 \x01(\x05\x42\x0f\xaa\x01\x02\x08\x03\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"[\n2IgnoreEmptyEditionsScalarLegacyRequiredWithDefault\x12%\n\x03val\x18\x01 \x01(\x05:\x02\x34\x32\x42\x0f\xaa\x01\x02\x08\x03\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"\xed\x01\n*IgnoreEmptyEditionsMessageExplicitPresence\x12\xa5\x01\n\x03val\x18\x01 \x01(\x0b\x32N.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.MsgBC\xbaH@\xba\x01:\n\x1dignore_empty.editions.message\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\x84\x02\n3IgnoreEmptyEditionsMessageExplicitPresenceDelimited\x12\xb3\x01\n\x03val\x18\x01 \x01(\x0b\x32W.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.MsgBH\xaa\x01\x02(\x02\xbaH@\xba\x01:\n\x1dignore_empty.editions.message\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xee\x01\n(IgnoreEmptyEditionsMessageLegacyRequired\x12\xa8\x01\n\x03val\x18\x01 \x01(\x0b\x32L.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.MsgBH\xaa\x01\x02\x08\x03\xbaH@\xba\x01:\n\x1dignore_empty.editions.message\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\x82\x02\n1IgnoreEmptyEditionsMessageLegacyRequiredDelimited\x12\xb3\x01\n\x03val\x18\x01 \x01(\x0b\x32U.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.MsgBJ\xaa\x01\x04\x08\x03(\x02\xbaH@\xba\x01:\n\x1dignore_empty.editions.message\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"?\n\x18IgnoreEmptyEditionsOneof\x12\x1e\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01H\x00R\x03valB\x03\n\x01o\"<\n\x1bIgnoreEmptyEditionsRepeated\x12\x1d\n\x03val\x18\x01 \x03(\x05\x42\x0b\xbaH\x08\x92\x01\x02\x08\x03\xd8\x01\x01R\x03val\"I\n#IgnoreEmptyEditionsRepeatedExpanded\x12\"\n\x03val\x18\x01 \x03(\x05\x42\x10\xaa\x01\x02\x18\x02\xbaH\x08\x92\x01\x02\x08\x03\xd8\x01\x01R\x03val\"\xb0\x01\n\x16IgnoreEmptyEditionsMap\x12^\n\x03val\x18\x01 \x03(\x0b\x32?.buf.validate.conformance.cases.IgnoreEmptyEditionsMap.ValEntryB\x0b\xbaH\x08\x9a\x01\x02\x08\x03\xd8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\x42\xdf\x01\n\"com.buf.validate.conformance.casesB\x1dIgnoreEmptyProtoEditionsProtoP\x01\xa2\x02\x04\x42VCC\xaa\x02\x1e\x42uf.Validate.Conformance.Cases\xca\x02\x1e\x42uf\\Validate\\Conformance\\Cases\xe2\x02*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\xea\x02!Buf::Validate::Conformance::Casesb\x08\x65\x64itionsp\xe8\x07') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n@buf/validate/conformance/cases/ignore_empty_proto_editions.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"I\n)IgnoreEmptyEditionsScalarExplicitPresence\x12\x1c\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"X\n4IgnoreEmptyEditionsScalarExplicitPresenceWithDefault\x12 \n\x03val\x18\x01 \x01(\x05:\x02\x34\x32\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"N\n)IgnoreEmptyEditionsScalarImplicitPresence\x12!\n\x03val\x18\x01 \x01(\x05\x42\x0f\xaa\x01\x02\x08\x02\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"L\n\'IgnoreEmptyEditionsScalarLegacyRequired\x12!\n\x03val\x18\x01 \x01(\x05\x42\x0f\xaa\x01\x02\x08\x03\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"[\n2IgnoreEmptyEditionsScalarLegacyRequiredWithDefault\x12%\n\x03val\x18\x01 \x01(\x05:\x02\x34\x32\x42\x0f\xaa\x01\x02\x08\x03\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"\xed\x01\n*IgnoreEmptyEditionsMessageExplicitPresence\x12\xa5\x01\n\x03val\x18\x01 \x01(\x0b\x32N.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.MsgBC\xbaH@\xba\x01:\n\x1dignore_empty.editions.message\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\x84\x02\n3IgnoreEmptyEditionsMessageExplicitPresenceDelimited\x12\xb3\x01\n\x03val\x18\x01 \x01(\x0b\x32W.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.MsgBH\xaa\x01\x02(\x02\xbaH@\xba\x01:\n\x1dignore_empty.editions.message\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xee\x01\n(IgnoreEmptyEditionsMessageLegacyRequired\x12\xa8\x01\n\x03val\x18\x01 \x01(\x0b\x32L.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.MsgBH\xaa\x01\x02\x08\x03\xbaH@\xba\x01:\n\x1dignore_empty.editions.message\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\x82\x02\n1IgnoreEmptyEditionsMessageLegacyRequiredDelimited\x12\xb3\x01\n\x03val\x18\x01 \x01(\x0b\x32U.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.MsgBJ\xaa\x01\x04\x08\x03(\x02\xbaH@\xba\x01:\n\x1dignore_empty.editions.message\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"?\n\x18IgnoreEmptyEditionsOneof\x12\x1e\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01H\x00R\x03valB\x03\n\x01o\"<\n\x1bIgnoreEmptyEditionsRepeated\x12\x1d\n\x03val\x18\x01 \x03(\x05\x42\x0b\xbaH\x08\x92\x01\x02\x08\x03\xd8\x01\x01R\x03val\"I\n#IgnoreEmptyEditionsRepeatedExpanded\x12\"\n\x03val\x18\x01 \x03(\x05\x42\x10\xaa\x01\x02\x18\x02\xbaH\x08\x92\x01\x02\x08\x03\xd8\x01\x01R\x03val\"\xb0\x01\n\x16IgnoreEmptyEditionsMap\x12^\n\x03val\x18\x01 \x03(\x0b\x32?.buf.validate.conformance.cases.IgnoreEmptyEditionsMap.ValEntryB\x0b\xbaH\x08\x9a\x01\x02\x08\x03\xd8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\x62\x08\x65\x64itionsp\xe8\x07') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'buf.validate.conformance.cases.ignore_empty_proto_editions_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\"com.buf.validate.conformance.casesB\035IgnoreEmptyProtoEditionsProtoP\001\242\002\004BVCC\252\002\036Buf.Validate.Conformance.Cases\312\002\036Buf\\Validate\\Conformance\\Cases\342\002*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\352\002!Buf::Validate::Conformance::Cases' + DESCRIPTOR._loaded_options = None _globals['_IGNOREEMPTYEDITIONSSCALAREXPLICITPRESENCE'].fields_by_name['val']._loaded_options = None _globals['_IGNOREEMPTYEDITIONSSCALAREXPLICITPRESENCE'].fields_by_name['val']._serialized_options = b'\272H\007\032\002 \000\330\001\001' _globals['_IGNOREEMPTYEDITIONSSCALAREXPLICITPRESENCEWITHDEFAULT'].fields_by_name['val']._loaded_options = None diff --git a/packages/protovalidate-proto/src/buf/validate/conformance/cases/ignore_proto2_pb2.py b/packages/protovalidate-proto/src/buf/validate/conformance/cases/ignore_proto2_pb2.py index 5a8c6c86..cf5592bd 100644 --- a/packages/protovalidate-proto/src/buf/validate/conformance/cases/ignore_proto2_pb2.py +++ b/packages/protovalidate-proto/src/buf/validate/conformance/cases/ignore_proto2_pb2.py @@ -29,14 +29,13 @@ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n2buf/validate/conformance/cases/ignore_proto2.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"B\n%Proto2ScalarOptionalIgnoreUnspecified\x12\x19\n\x03val\x18\x01 \x01(\x05\x42\x07\xbaH\x04\x1a\x02 \x00R\x03val\"R\n0Proto2ScalarOptionalIgnoreUnspecifiedWithDefault\x12\x1e\n\x03val\x18\x01 \x01(\x05:\x03-42B\x07\xbaH\x04\x1a\x02 \x00R\x03val\"?\n\x1fProto2ScalarOptionalIgnoreEmpty\x12\x1c\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"O\n*Proto2ScalarOptionalIgnoreEmptyWithDefault\x12!\n\x03val\x18\x01 \x01(\x05:\x03-42B\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"@\n Proto2ScalarOptionalIgnoreAlways\x12\x1c\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\"P\n+Proto2ScalarOptionalIgnoreAlwaysWithDefault\x12!\n\x03val\x18\x01 \x01(\x05:\x03-42B\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\"B\n%Proto2ScalarRequiredIgnoreUnspecified\x12\x19\n\x03val\x18\x01 \x02(\x05\x42\x07\xbaH\x04\x1a\x02 \x00R\x03val\"R\n0Proto2ScalarRequiredIgnoreUnspecifiedWithDefault\x12\x1e\n\x03val\x18\x01 \x02(\x05:\x03-42B\x07\xbaH\x04\x1a\x02 \x00R\x03val\"?\n\x1fProto2ScalarRequiredIgnoreEmpty\x12\x1c\n\x03val\x18\x01 \x02(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"O\n*Proto2ScalarRequiredIgnoreEmptyWithDefault\x12!\n\x03val\x18\x01 \x02(\x05:\x03-42B\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"@\n Proto2ScalarRequiredIgnoreAlways\x12\x1c\n\x03val\x18\x01 \x02(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\"P\n+Proto2ScalarRequiredIgnoreAlwaysWithDefault\x12!\n\x03val\x18\x01 \x02(\x05:\x03-42B\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\"\xe0\x01\n&Proto2MessageOptionalIgnoreUnspecified\x12\x9c\x01\n\x03val\x18\x01 \x01(\x0b\x32J.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.MsgB>\xbaH;\xba\x01\x38\n\x1bproto2.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xd7\x01\n Proto2MessageOptionalIgnoreEmpty\x12\x99\x01\n\x03val\x18\x01 \x01(\x0b\x32\x44.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.MsgBA\xbaH>\xba\x01\x38\n\x1bproto2.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xda\x01\n!Proto2MessageOptionalIgnoreAlways\x12\x9b\x01\n\x03val\x18\x01 \x01(\x0b\x32\x45.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreAlways.MsgBB\xbaH?\xba\x01\x39\n\x1cproto2.message.ignore.always\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x03R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xe0\x01\n&Proto2MessageRequiredIgnoreUnspecified\x12\x9c\x01\n\x03val\x18\x01 \x02(\x0b\x32J.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.MsgB>\xbaH;\xba\x01\x38\n\x1bproto2.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xd7\x01\n Proto2MessageRequiredIgnoreEmpty\x12\x99\x01\n\x03val\x18\x01 \x02(\x0b\x32\x44.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.MsgBA\xbaH>\xba\x01\x38\n\x1bproto2.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xda\x01\n!Proto2MessageRequiredIgnoreAlways\x12\x9b\x01\n\x03val\x18\x01 \x02(\x0b\x32\x45.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreAlways.MsgBB\xbaH?\xba\x01\x39\n\x1cproto2.message.ignore.always\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x03R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"@\n\x1cProto2OneofIgnoreUnspecified\x12\x1b\n\x03val\x18\x01 \x01(\x05\x42\x07\xbaH\x04\x1a\x02 \x00H\x00R\x03valB\x03\n\x01o\"P\n\'Proto2OneofIgnoreUnspecifiedWithDefault\x12 \n\x03val\x18\x01 \x01(\x05:\x03-42B\x07\xbaH\x04\x1a\x02 \x00H\x00R\x03valB\x03\n\x01o\"=\n\x16Proto2OneofIgnoreEmpty\x12\x1e\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01H\x00R\x03valB\x03\n\x01o\"M\n!Proto2OneofIgnoreEmptyWithDefault\x12#\n\x03val\x18\x01 \x01(\x05:\x03-42B\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01H\x00R\x03valB\x03\n\x01o\">\n\x17Proto2OneofIgnoreAlways\x12\x1e\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x03H\x00R\x03valB\x03\n\x01o\"N\n\"Proto2OneofIgnoreAlwaysWithDefault\x12#\n\x03val\x18\x01 \x01(\x05:\x03-42B\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x03H\x00R\x03valB\x03\n\x01o\"=\n\x1fProto2RepeatedIgnoreUnspecified\x12\x1a\n\x03val\x18\x01 \x03(\x05\x42\x08\xbaH\x05\x92\x01\x02\x08\x03R\x03val\":\n\x19Proto2RepeatedIgnoreEmpty\x12\x1d\n\x03val\x18\x01 \x03(\x05\x42\x0b\xbaH\x08\x92\x01\x02\x08\x03\xd8\x01\x01R\x03val\";\n\x1aProto2RepeatedIgnoreAlways\x12\x1d\n\x03val\x18\x01 \x03(\x05\x42\x0b\xbaH\x08\x92\x01\x02\x08\x03\xd8\x01\x03R\x03val\"\xb5\x01\n\x1aProto2MapIgnoreUnspecified\x12_\n\x03val\x18\x01 \x03(\x0b\x32\x43.buf.validate.conformance.cases.Proto2MapIgnoreUnspecified.ValEntryB\x08\xbaH\x05\x9a\x01\x02\x08\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xac\x01\n\x14Proto2MapIgnoreEmpty\x12\\\n\x03val\x18\x01 \x03(\x0b\x32=.buf.validate.conformance.cases.Proto2MapIgnoreEmpty.ValEntryB\x0b\xbaH\x08\x9a\x01\x02\x08\x03\xd8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xae\x01\n\x15Proto2MapIgnoreAlways\x12]\n\x03val\x18\x01 \x03(\x0b\x32>.buf.validate.conformance.cases.Proto2MapIgnoreAlways.ValEntryB\x0b\xbaH\x08\x9a\x01\x02\x08\x03\xd8\x01\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"E\n#Proto2RepeatedItemIgnoreUnspecified\x12\x1e\n\x03val\x18\x01 \x03(\x05\x42\x0c\xbaH\t\x92\x01\x06\"\x04\x1a\x02 \x00R\x03val\"B\n\x1dProto2RepeatedItemIgnoreEmpty\x12!\n\x03val\x18\x01 \x03(\x05\x42\x0f\xbaH\x0c\x92\x01\t\"\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"C\n\x1eProto2RepeatedItemIgnoreAlways\x12!\n\x03val\x18\x01 \x03(\x05\x42\x0f\xbaH\x0c\x92\x01\t\"\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\"\xbf\x01\n\x1dProto2MapKeyIgnoreUnspecified\x12\x66\n\x03val\x18\x01 \x03(\x0b\x32\x46.buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified.ValEntryB\x0c\xbaH\t\x9a\x01\x06\"\x04\x1a\x02 \x00R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xb6\x01\n\x17Proto2MapKeyIgnoreEmpty\x12\x63\n\x03val\x18\x01 \x03(\x0b\x32@.buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty.ValEntryB\x0f\xbaH\x0c\x9a\x01\t\"\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xb8\x01\n\x18Proto2MapKeyIgnoreAlways\x12\x64\n\x03val\x18\x01 \x03(\x0b\x32\x41.buf.validate.conformance.cases.Proto2MapKeyIgnoreAlways.ValEntryB\x0f\xbaH\x0c\x9a\x01\t\"\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xc3\x01\n\x1fProto2MapValueIgnoreUnspecified\x12h\n\x03val\x18\x01 \x03(\x0b\x32H.buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified.ValEntryB\x0c\xbaH\t\x9a\x01\x06*\x04\x1a\x02 \x00R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xba\x01\n\x19Proto2MapValueIgnoreEmpty\x12\x65\n\x03val\x18\x01 \x03(\x0b\x32\x42.buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty.ValEntryB\x0f\xbaH\x0c\x9a\x01\t*\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xbc\x01\n\x1aProto2MapValueIgnoreAlways\x12\x66\n\x03val\x18\x01 \x03(\x0b\x32\x43.buf.validate.conformance.cases.Proto2MapValueIgnoreAlways.ValEntryB\x0f\xbaH\x0c\x9a\x01\t*\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\x42\xd3\x01\n\"com.buf.validate.conformance.casesB\x11IgnoreProto2ProtoP\x01\xa2\x02\x04\x42VCC\xaa\x02\x1e\x42uf.Validate.Conformance.Cases\xca\x02\x1e\x42uf\\Validate\\Conformance\\Cases\xe2\x02*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\xea\x02!Buf::Validate::Conformance::Cases') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n2buf/validate/conformance/cases/ignore_proto2.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"B\n%Proto2ScalarOptionalIgnoreUnspecified\x12\x19\n\x03val\x18\x01 \x01(\x05\x42\x07\xbaH\x04\x1a\x02 \x00R\x03val\"R\n0Proto2ScalarOptionalIgnoreUnspecifiedWithDefault\x12\x1e\n\x03val\x18\x01 \x01(\x05:\x03-42B\x07\xbaH\x04\x1a\x02 \x00R\x03val\"?\n\x1fProto2ScalarOptionalIgnoreEmpty\x12\x1c\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"O\n*Proto2ScalarOptionalIgnoreEmptyWithDefault\x12!\n\x03val\x18\x01 \x01(\x05:\x03-42B\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"@\n Proto2ScalarOptionalIgnoreAlways\x12\x1c\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\"P\n+Proto2ScalarOptionalIgnoreAlwaysWithDefault\x12!\n\x03val\x18\x01 \x01(\x05:\x03-42B\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\"B\n%Proto2ScalarRequiredIgnoreUnspecified\x12\x19\n\x03val\x18\x01 \x02(\x05\x42\x07\xbaH\x04\x1a\x02 \x00R\x03val\"R\n0Proto2ScalarRequiredIgnoreUnspecifiedWithDefault\x12\x1e\n\x03val\x18\x01 \x02(\x05:\x03-42B\x07\xbaH\x04\x1a\x02 \x00R\x03val\"?\n\x1fProto2ScalarRequiredIgnoreEmpty\x12\x1c\n\x03val\x18\x01 \x02(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"O\n*Proto2ScalarRequiredIgnoreEmptyWithDefault\x12!\n\x03val\x18\x01 \x02(\x05:\x03-42B\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"@\n Proto2ScalarRequiredIgnoreAlways\x12\x1c\n\x03val\x18\x01 \x02(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\"P\n+Proto2ScalarRequiredIgnoreAlwaysWithDefault\x12!\n\x03val\x18\x01 \x02(\x05:\x03-42B\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\"\xe0\x01\n&Proto2MessageOptionalIgnoreUnspecified\x12\x9c\x01\n\x03val\x18\x01 \x01(\x0b\x32J.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.MsgB>\xbaH;\xba\x01\x38\n\x1bproto2.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xd7\x01\n Proto2MessageOptionalIgnoreEmpty\x12\x99\x01\n\x03val\x18\x01 \x01(\x0b\x32\x44.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.MsgBA\xbaH>\xba\x01\x38\n\x1bproto2.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xda\x01\n!Proto2MessageOptionalIgnoreAlways\x12\x9b\x01\n\x03val\x18\x01 \x01(\x0b\x32\x45.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreAlways.MsgBB\xbaH?\xba\x01\x39\n\x1cproto2.message.ignore.always\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x03R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xe0\x01\n&Proto2MessageRequiredIgnoreUnspecified\x12\x9c\x01\n\x03val\x18\x01 \x02(\x0b\x32J.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.MsgB>\xbaH;\xba\x01\x38\n\x1bproto2.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xd7\x01\n Proto2MessageRequiredIgnoreEmpty\x12\x99\x01\n\x03val\x18\x01 \x02(\x0b\x32\x44.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.MsgBA\xbaH>\xba\x01\x38\n\x1bproto2.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xda\x01\n!Proto2MessageRequiredIgnoreAlways\x12\x9b\x01\n\x03val\x18\x01 \x02(\x0b\x32\x45.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreAlways.MsgBB\xbaH?\xba\x01\x39\n\x1cproto2.message.ignore.always\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x03R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"@\n\x1cProto2OneofIgnoreUnspecified\x12\x1b\n\x03val\x18\x01 \x01(\x05\x42\x07\xbaH\x04\x1a\x02 \x00H\x00R\x03valB\x03\n\x01o\"P\n\'Proto2OneofIgnoreUnspecifiedWithDefault\x12 \n\x03val\x18\x01 \x01(\x05:\x03-42B\x07\xbaH\x04\x1a\x02 \x00H\x00R\x03valB\x03\n\x01o\"=\n\x16Proto2OneofIgnoreEmpty\x12\x1e\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01H\x00R\x03valB\x03\n\x01o\"M\n!Proto2OneofIgnoreEmptyWithDefault\x12#\n\x03val\x18\x01 \x01(\x05:\x03-42B\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01H\x00R\x03valB\x03\n\x01o\">\n\x17Proto2OneofIgnoreAlways\x12\x1e\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x03H\x00R\x03valB\x03\n\x01o\"N\n\"Proto2OneofIgnoreAlwaysWithDefault\x12#\n\x03val\x18\x01 \x01(\x05:\x03-42B\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x03H\x00R\x03valB\x03\n\x01o\"=\n\x1fProto2RepeatedIgnoreUnspecified\x12\x1a\n\x03val\x18\x01 \x03(\x05\x42\x08\xbaH\x05\x92\x01\x02\x08\x03R\x03val\":\n\x19Proto2RepeatedIgnoreEmpty\x12\x1d\n\x03val\x18\x01 \x03(\x05\x42\x0b\xbaH\x08\x92\x01\x02\x08\x03\xd8\x01\x01R\x03val\";\n\x1aProto2RepeatedIgnoreAlways\x12\x1d\n\x03val\x18\x01 \x03(\x05\x42\x0b\xbaH\x08\x92\x01\x02\x08\x03\xd8\x01\x03R\x03val\"\xb5\x01\n\x1aProto2MapIgnoreUnspecified\x12_\n\x03val\x18\x01 \x03(\x0b\x32\x43.buf.validate.conformance.cases.Proto2MapIgnoreUnspecified.ValEntryB\x08\xbaH\x05\x9a\x01\x02\x08\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xac\x01\n\x14Proto2MapIgnoreEmpty\x12\\\n\x03val\x18\x01 \x03(\x0b\x32=.buf.validate.conformance.cases.Proto2MapIgnoreEmpty.ValEntryB\x0b\xbaH\x08\x9a\x01\x02\x08\x03\xd8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xae\x01\n\x15Proto2MapIgnoreAlways\x12]\n\x03val\x18\x01 \x03(\x0b\x32>.buf.validate.conformance.cases.Proto2MapIgnoreAlways.ValEntryB\x0b\xbaH\x08\x9a\x01\x02\x08\x03\xd8\x01\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"E\n#Proto2RepeatedItemIgnoreUnspecified\x12\x1e\n\x03val\x18\x01 \x03(\x05\x42\x0c\xbaH\t\x92\x01\x06\"\x04\x1a\x02 \x00R\x03val\"B\n\x1dProto2RepeatedItemIgnoreEmpty\x12!\n\x03val\x18\x01 \x03(\x05\x42\x0f\xbaH\x0c\x92\x01\t\"\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"C\n\x1eProto2RepeatedItemIgnoreAlways\x12!\n\x03val\x18\x01 \x03(\x05\x42\x0f\xbaH\x0c\x92\x01\t\"\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\"\xbf\x01\n\x1dProto2MapKeyIgnoreUnspecified\x12\x66\n\x03val\x18\x01 \x03(\x0b\x32\x46.buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified.ValEntryB\x0c\xbaH\t\x9a\x01\x06\"\x04\x1a\x02 \x00R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xb6\x01\n\x17Proto2MapKeyIgnoreEmpty\x12\x63\n\x03val\x18\x01 \x03(\x0b\x32@.buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty.ValEntryB\x0f\xbaH\x0c\x9a\x01\t\"\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xb8\x01\n\x18Proto2MapKeyIgnoreAlways\x12\x64\n\x03val\x18\x01 \x03(\x0b\x32\x41.buf.validate.conformance.cases.Proto2MapKeyIgnoreAlways.ValEntryB\x0f\xbaH\x0c\x9a\x01\t\"\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xc3\x01\n\x1fProto2MapValueIgnoreUnspecified\x12h\n\x03val\x18\x01 \x03(\x0b\x32H.buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified.ValEntryB\x0c\xbaH\t\x9a\x01\x06*\x04\x1a\x02 \x00R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xba\x01\n\x19Proto2MapValueIgnoreEmpty\x12\x65\n\x03val\x18\x01 \x03(\x0b\x32\x42.buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty.ValEntryB\x0f\xbaH\x0c\x9a\x01\t*\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xbc\x01\n\x1aProto2MapValueIgnoreAlways\x12\x66\n\x03val\x18\x01 \x03(\x0b\x32\x43.buf.validate.conformance.cases.Proto2MapValueIgnoreAlways.ValEntryB\x0f\xbaH\x0c\x9a\x01\t*\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'buf.validate.conformance.cases.ignore_proto2_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\"com.buf.validate.conformance.casesB\021IgnoreProto2ProtoP\001\242\002\004BVCC\252\002\036Buf.Validate.Conformance.Cases\312\002\036Buf\\Validate\\Conformance\\Cases\342\002*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\352\002!Buf::Validate::Conformance::Cases' + DESCRIPTOR._loaded_options = None _globals['_PROTO2SCALAROPTIONALIGNOREUNSPECIFIED'].fields_by_name['val']._loaded_options = None _globals['_PROTO2SCALAROPTIONALIGNOREUNSPECIFIED'].fields_by_name['val']._serialized_options = b'\272H\004\032\002 \000' _globals['_PROTO2SCALAROPTIONALIGNOREUNSPECIFIEDWITHDEFAULT'].fields_by_name['val']._loaded_options = None diff --git a/packages/protovalidate-proto/src/buf/validate/conformance/cases/ignore_proto3_pb2.py b/packages/protovalidate-proto/src/buf/validate/conformance/cases/ignore_proto3_pb2.py index 337c694e..0b28ba52 100644 --- a/packages/protovalidate-proto/src/buf/validate/conformance/cases/ignore_proto3_pb2.py +++ b/packages/protovalidate-proto/src/buf/validate/conformance/cases/ignore_proto3_pb2.py @@ -29,14 +29,13 @@ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n2buf/validate/conformance/cases/ignore_proto3.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"O\n%Proto3ScalarOptionalIgnoreUnspecified\x12\x1e\n\x03val\x18\x01 \x01(\x05\x42\x07\xbaH\x04\x1a\x02 \x00H\x00R\x03val\x88\x01\x01\x42\x06\n\x04_val\"L\n\x1fProto3ScalarOptionalIgnoreEmpty\x12!\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01H\x00R\x03val\x88\x01\x01\x42\x06\n\x04_val\"M\n Proto3ScalarOptionalIgnoreAlways\x12!\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x03H\x00R\x03val\x88\x01\x01\x42\x06\n\x04_val\":\n\x1dProto3ScalarIgnoreUnspecified\x12\x19\n\x03val\x18\x01 \x01(\x05\x42\x07\xbaH\x04\x1a\x02 \x00R\x03val\"7\n\x17Proto3ScalarIgnoreEmpty\x12\x1c\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"8\n\x18Proto3ScalarIgnoreAlways\x12\x1c\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\"\xfa\x01\n&Proto3MessageOptionalIgnoreUnspecified\x12\xa1\x01\n\x03val\x18\x01 \x01(\x0b\x32J.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.MsgB>\xbaH;\xba\x01\x38\n\x1bproto3.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'H\x00R\x03val\x88\x01\x01\x1a$\n\x03Msg\x12\x15\n\x03val\x18\x01 \x01(\tH\x00R\x03val\x88\x01\x01\x42\x06\n\x04_valB\x06\n\x04_val\"\xf1\x01\n Proto3MessageOptionalIgnoreEmpty\x12\x9e\x01\n\x03val\x18\x01 \x01(\x0b\x32\x44.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.MsgBA\xbaH>\xba\x01\x38\n\x1bproto3.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x01H\x00R\x03val\x88\x01\x01\x1a$\n\x03Msg\x12\x15\n\x03val\x18\x01 \x01(\tH\x00R\x03val\x88\x01\x01\x42\x06\n\x04_valB\x06\n\x04_val\"\xf4\x01\n!Proto3MessageOptionalIgnoreAlways\x12\xa0\x01\n\x03val\x18\x01 \x01(\x0b\x32\x45.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreAlways.MsgBB\xbaH?\xba\x01\x39\n\x1cproto3.message.ignore.always\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x03H\x00R\x03val\x88\x01\x01\x1a$\n\x03Msg\x12\x15\n\x03val\x18\x01 \x01(\tH\x00R\x03val\x88\x01\x01\x42\x06\n\x04_valB\x06\n\x04_val\"\xdd\x01\n\x1eProto3MessageIgnoreUnspecified\x12\x94\x01\n\x03val\x18\x01 \x01(\x0b\x32\x42.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.MsgB>\xbaH;\xba\x01\x38\n\x1bproto3.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'R\x03val\x1a$\n\x03Msg\x12\x15\n\x03val\x18\x01 \x01(\tH\x00R\x03val\x88\x01\x01\x42\x06\n\x04_val\"\xd4\x01\n\x18Proto3MessageIgnoreEmpty\x12\x91\x01\n\x03val\x18\x01 \x01(\x0b\x32<.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.MsgBA\xbaH>\xba\x01\x38\n\x1bproto3.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x01R\x03val\x1a$\n\x03Msg\x12\x15\n\x03val\x18\x01 \x01(\tH\x00R\x03val\x88\x01\x01\x42\x06\n\x04_val\"@\n\x1cProto3OneofIgnoreUnspecified\x12\x1b\n\x03val\x18\x01 \x01(\x05\x42\x07\xbaH\x04\x1a\x02 \x00H\x00R\x03valB\x03\n\x01o\"=\n\x16Proto3OneofIgnoreEmpty\x12\x1e\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01H\x00R\x03valB\x03\n\x01o\">\n\x17Proto3OneofIgnoreAlways\x12\x1e\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x03H\x00R\x03valB\x03\n\x01o\"=\n\x1fProto3RepeatedIgnoreUnspecified\x12\x1a\n\x03val\x18\x01 \x03(\x05\x42\x08\xbaH\x05\x92\x01\x02\x08\x03R\x03val\":\n\x19Proto3RepeatedIgnoreEmpty\x12\x1d\n\x03val\x18\x01 \x03(\x05\x42\x0b\xbaH\x08\x92\x01\x02\x08\x03\xd8\x01\x01R\x03val\";\n\x1aProto3RepeatedIgnoreAlways\x12\x1d\n\x03val\x18\x01 \x03(\x05\x42\x0b\xbaH\x08\x92\x01\x02\x08\x03\xd8\x01\x03R\x03val\"\xb5\x01\n\x1aProto3MapIgnoreUnspecified\x12_\n\x03val\x18\x01 \x03(\x0b\x32\x43.buf.validate.conformance.cases.Proto3MapIgnoreUnspecified.ValEntryB\x08\xbaH\x05\x9a\x01\x02\x08\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xac\x01\n\x14Proto3MapIgnoreEmpty\x12\\\n\x03val\x18\x01 \x03(\x0b\x32=.buf.validate.conformance.cases.Proto3MapIgnoreEmpty.ValEntryB\x0b\xbaH\x08\x9a\x01\x02\x08\x03\xd8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xae\x01\n\x15Proto3MapIgnoreAlways\x12]\n\x03val\x18\x01 \x03(\x0b\x32>.buf.validate.conformance.cases.Proto3MapIgnoreAlways.ValEntryB\x0b\xbaH\x08\x9a\x01\x02\x08\x03\xd8\x01\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"E\n#Proto3RepeatedItemIgnoreUnspecified\x12\x1e\n\x03val\x18\x01 \x03(\x05\x42\x0c\xbaH\t\x92\x01\x06\"\x04\x1a\x02 \x00R\x03val\"B\n\x1dProto3RepeatedItemIgnoreEmpty\x12!\n\x03val\x18\x01 \x03(\x05\x42\x0f\xbaH\x0c\x92\x01\t\"\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"C\n\x1eProto3RepeatedItemIgnoreAlways\x12!\n\x03val\x18\x01 \x03(\x05\x42\x0f\xbaH\x0c\x92\x01\t\"\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\"\xbf\x01\n\x1dProto3MapKeyIgnoreUnspecified\x12\x66\n\x03val\x18\x01 \x03(\x0b\x32\x46.buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified.ValEntryB\x0c\xbaH\t\x9a\x01\x06\"\x04\x1a\x02 \x00R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xb6\x01\n\x17Proto3MapKeyIgnoreEmpty\x12\x63\n\x03val\x18\x01 \x03(\x0b\x32@.buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty.ValEntryB\x0f\xbaH\x0c\x9a\x01\t\"\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xb8\x01\n\x18Proto3MapKeyIgnoreAlways\x12\x64\n\x03val\x18\x01 \x03(\x0b\x32\x41.buf.validate.conformance.cases.Proto3MapKeyIgnoreAlways.ValEntryB\x0f\xbaH\x0c\x9a\x01\t\"\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xc3\x01\n\x1fProto3MapValueIgnoreUnspecified\x12h\n\x03val\x18\x01 \x03(\x0b\x32H.buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified.ValEntryB\x0c\xbaH\t\x9a\x01\x06*\x04\x1a\x02 \x00R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xba\x01\n\x19Proto3MapValueIgnoreEmpty\x12\x65\n\x03val\x18\x01 \x03(\x0b\x32\x42.buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty.ValEntryB\x0f\xbaH\x0c\x9a\x01\t*\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xbc\x01\n\x1aProto3MapValueIgnoreAlways\x12\x66\n\x03val\x18\x01 \x03(\x0b\x32\x43.buf.validate.conformance.cases.Proto3MapValueIgnoreAlways.ValEntryB\x0f\xbaH\x0c\x9a\x01\t*\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\x42\xd3\x01\n\"com.buf.validate.conformance.casesB\x11IgnoreProto3ProtoP\x01\xa2\x02\x04\x42VCC\xaa\x02\x1e\x42uf.Validate.Conformance.Cases\xca\x02\x1e\x42uf\\Validate\\Conformance\\Cases\xe2\x02*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\xea\x02!Buf::Validate::Conformance::Casesb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n2buf/validate/conformance/cases/ignore_proto3.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"O\n%Proto3ScalarOptionalIgnoreUnspecified\x12\x1e\n\x03val\x18\x01 \x01(\x05\x42\x07\xbaH\x04\x1a\x02 \x00H\x00R\x03val\x88\x01\x01\x42\x06\n\x04_val\"L\n\x1fProto3ScalarOptionalIgnoreEmpty\x12!\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01H\x00R\x03val\x88\x01\x01\x42\x06\n\x04_val\"M\n Proto3ScalarOptionalIgnoreAlways\x12!\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x03H\x00R\x03val\x88\x01\x01\x42\x06\n\x04_val\":\n\x1dProto3ScalarIgnoreUnspecified\x12\x19\n\x03val\x18\x01 \x01(\x05\x42\x07\xbaH\x04\x1a\x02 \x00R\x03val\"7\n\x17Proto3ScalarIgnoreEmpty\x12\x1c\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"8\n\x18Proto3ScalarIgnoreAlways\x12\x1c\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\"\xfa\x01\n&Proto3MessageOptionalIgnoreUnspecified\x12\xa1\x01\n\x03val\x18\x01 \x01(\x0b\x32J.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.MsgB>\xbaH;\xba\x01\x38\n\x1bproto3.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'H\x00R\x03val\x88\x01\x01\x1a$\n\x03Msg\x12\x15\n\x03val\x18\x01 \x01(\tH\x00R\x03val\x88\x01\x01\x42\x06\n\x04_valB\x06\n\x04_val\"\xf1\x01\n Proto3MessageOptionalIgnoreEmpty\x12\x9e\x01\n\x03val\x18\x01 \x01(\x0b\x32\x44.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.MsgBA\xbaH>\xba\x01\x38\n\x1bproto3.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x01H\x00R\x03val\x88\x01\x01\x1a$\n\x03Msg\x12\x15\n\x03val\x18\x01 \x01(\tH\x00R\x03val\x88\x01\x01\x42\x06\n\x04_valB\x06\n\x04_val\"\xf4\x01\n!Proto3MessageOptionalIgnoreAlways\x12\xa0\x01\n\x03val\x18\x01 \x01(\x0b\x32\x45.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreAlways.MsgBB\xbaH?\xba\x01\x39\n\x1cproto3.message.ignore.always\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x03H\x00R\x03val\x88\x01\x01\x1a$\n\x03Msg\x12\x15\n\x03val\x18\x01 \x01(\tH\x00R\x03val\x88\x01\x01\x42\x06\n\x04_valB\x06\n\x04_val\"\xdd\x01\n\x1eProto3MessageIgnoreUnspecified\x12\x94\x01\n\x03val\x18\x01 \x01(\x0b\x32\x42.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.MsgB>\xbaH;\xba\x01\x38\n\x1bproto3.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'R\x03val\x1a$\n\x03Msg\x12\x15\n\x03val\x18\x01 \x01(\tH\x00R\x03val\x88\x01\x01\x42\x06\n\x04_val\"\xd4\x01\n\x18Proto3MessageIgnoreEmpty\x12\x91\x01\n\x03val\x18\x01 \x01(\x0b\x32<.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.MsgBA\xbaH>\xba\x01\x38\n\x1bproto3.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x01R\x03val\x1a$\n\x03Msg\x12\x15\n\x03val\x18\x01 \x01(\tH\x00R\x03val\x88\x01\x01\x42\x06\n\x04_val\"@\n\x1cProto3OneofIgnoreUnspecified\x12\x1b\n\x03val\x18\x01 \x01(\x05\x42\x07\xbaH\x04\x1a\x02 \x00H\x00R\x03valB\x03\n\x01o\"=\n\x16Proto3OneofIgnoreEmpty\x12\x1e\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01H\x00R\x03valB\x03\n\x01o\">\n\x17Proto3OneofIgnoreAlways\x12\x1e\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x03H\x00R\x03valB\x03\n\x01o\"=\n\x1fProto3RepeatedIgnoreUnspecified\x12\x1a\n\x03val\x18\x01 \x03(\x05\x42\x08\xbaH\x05\x92\x01\x02\x08\x03R\x03val\":\n\x19Proto3RepeatedIgnoreEmpty\x12\x1d\n\x03val\x18\x01 \x03(\x05\x42\x0b\xbaH\x08\x92\x01\x02\x08\x03\xd8\x01\x01R\x03val\";\n\x1aProto3RepeatedIgnoreAlways\x12\x1d\n\x03val\x18\x01 \x03(\x05\x42\x0b\xbaH\x08\x92\x01\x02\x08\x03\xd8\x01\x03R\x03val\"\xb5\x01\n\x1aProto3MapIgnoreUnspecified\x12_\n\x03val\x18\x01 \x03(\x0b\x32\x43.buf.validate.conformance.cases.Proto3MapIgnoreUnspecified.ValEntryB\x08\xbaH\x05\x9a\x01\x02\x08\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xac\x01\n\x14Proto3MapIgnoreEmpty\x12\\\n\x03val\x18\x01 \x03(\x0b\x32=.buf.validate.conformance.cases.Proto3MapIgnoreEmpty.ValEntryB\x0b\xbaH\x08\x9a\x01\x02\x08\x03\xd8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xae\x01\n\x15Proto3MapIgnoreAlways\x12]\n\x03val\x18\x01 \x03(\x0b\x32>.buf.validate.conformance.cases.Proto3MapIgnoreAlways.ValEntryB\x0b\xbaH\x08\x9a\x01\x02\x08\x03\xd8\x01\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"E\n#Proto3RepeatedItemIgnoreUnspecified\x12\x1e\n\x03val\x18\x01 \x03(\x05\x42\x0c\xbaH\t\x92\x01\x06\"\x04\x1a\x02 \x00R\x03val\"B\n\x1dProto3RepeatedItemIgnoreEmpty\x12!\n\x03val\x18\x01 \x03(\x05\x42\x0f\xbaH\x0c\x92\x01\t\"\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"C\n\x1eProto3RepeatedItemIgnoreAlways\x12!\n\x03val\x18\x01 \x03(\x05\x42\x0f\xbaH\x0c\x92\x01\t\"\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\"\xbf\x01\n\x1dProto3MapKeyIgnoreUnspecified\x12\x66\n\x03val\x18\x01 \x03(\x0b\x32\x46.buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified.ValEntryB\x0c\xbaH\t\x9a\x01\x06\"\x04\x1a\x02 \x00R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xb6\x01\n\x17Proto3MapKeyIgnoreEmpty\x12\x63\n\x03val\x18\x01 \x03(\x0b\x32@.buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty.ValEntryB\x0f\xbaH\x0c\x9a\x01\t\"\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xb8\x01\n\x18Proto3MapKeyIgnoreAlways\x12\x64\n\x03val\x18\x01 \x03(\x0b\x32\x41.buf.validate.conformance.cases.Proto3MapKeyIgnoreAlways.ValEntryB\x0f\xbaH\x0c\x9a\x01\t\"\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xc3\x01\n\x1fProto3MapValueIgnoreUnspecified\x12h\n\x03val\x18\x01 \x03(\x0b\x32H.buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified.ValEntryB\x0c\xbaH\t\x9a\x01\x06*\x04\x1a\x02 \x00R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xba\x01\n\x19Proto3MapValueIgnoreEmpty\x12\x65\n\x03val\x18\x01 \x03(\x0b\x32\x42.buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty.ValEntryB\x0f\xbaH\x0c\x9a\x01\t*\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xbc\x01\n\x1aProto3MapValueIgnoreAlways\x12\x66\n\x03val\x18\x01 \x03(\x0b\x32\x43.buf.validate.conformance.cases.Proto3MapValueIgnoreAlways.ValEntryB\x0f\xbaH\x0c\x9a\x01\t*\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'buf.validate.conformance.cases.ignore_proto3_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\"com.buf.validate.conformance.casesB\021IgnoreProto3ProtoP\001\242\002\004BVCC\252\002\036Buf.Validate.Conformance.Cases\312\002\036Buf\\Validate\\Conformance\\Cases\342\002*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\352\002!Buf::Validate::Conformance::Cases' + DESCRIPTOR._loaded_options = None _globals['_PROTO3SCALAROPTIONALIGNOREUNSPECIFIED'].fields_by_name['val']._loaded_options = None _globals['_PROTO3SCALAROPTIONALIGNOREUNSPECIFIED'].fields_by_name['val']._serialized_options = b'\272H\004\032\002 \000' _globals['_PROTO3SCALAROPTIONALIGNOREEMPTY'].fields_by_name['val']._loaded_options = None diff --git a/packages/protovalidate-proto/src/buf/validate/conformance/cases/ignore_proto_editions_pb2.py b/packages/protovalidate-proto/src/buf/validate/conformance/cases/ignore_proto_editions_pb2.py index 17f3d7d2..b17ef49b 100644 --- a/packages/protovalidate-proto/src/buf/validate/conformance/cases/ignore_proto_editions_pb2.py +++ b/packages/protovalidate-proto/src/buf/validate/conformance/cases/ignore_proto_editions_pb2.py @@ -29,14 +29,13 @@ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n:buf/validate/conformance/cases/ignore_proto_editions.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"L\n/EditionsScalarExplicitPresenceIgnoreUnspecified\x12\x19\n\x03val\x18\x01 \x01(\x05\x42\x07\xbaH\x04\x1a\x02 \x00R\x03val\"\\\n:EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault\x12\x1e\n\x03val\x18\x01 \x01(\x05:\x03-42B\x07\xbaH\x04\x1a\x02 \x00R\x03val\"I\n)EditionsScalarExplicitPresenceIgnoreEmpty\x12\x1c\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"Y\n4EditionsScalarExplicitPresenceIgnoreEmptyWithDefault\x12!\n\x03val\x18\x01 \x01(\x05:\x03-42B\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"J\n*EditionsScalarExplicitPresenceIgnoreAlways\x12\x1c\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\"Z\n5EditionsScalarExplicitPresenceIgnoreAlwaysWithDefault\x12!\n\x03val\x18\x01 \x01(\x05:\x03-42B\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\"Q\n/EditionsScalarImplicitPresenceIgnoreUnspecified\x12\x1e\n\x03val\x18\x01 \x01(\x05\x42\x0c\xaa\x01\x02\x08\x02\xbaH\x04\x1a\x02 \x00R\x03val\"N\n)EditionsScalarImplicitPresenceIgnoreEmpty\x12!\n\x03val\x18\x01 \x01(\x05\x42\x0f\xaa\x01\x02\x08\x02\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"O\n*EditionsScalarImplicitPresenceIgnoreAlways\x12!\n\x03val\x18\x01 \x01(\x05\x42\x0f\xaa\x01\x02\x08\x02\xbaH\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\"O\n-EditionsScalarLegacyRequiredIgnoreUnspecified\x12\x1e\n\x03val\x18\x01 \x01(\x05\x42\x0c\xaa\x01\x02\x08\x03\xbaH\x04\x1a\x02 \x00R\x03val\"_\n8EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault\x12#\n\x03val\x18\x01 \x01(\x05:\x03-42B\x0c\xaa\x01\x02\x08\x03\xbaH\x04\x1a\x02 \x00R\x03val\"L\n\'EditionsScalarLegacyRequiredIgnoreEmpty\x12!\n\x03val\x18\x01 \x01(\x05\x42\x0f\xaa\x01\x02\x08\x03\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"\\\n2EditionsScalarLegacyRequiredIgnoreEmptyWithDefault\x12&\n\x03val\x18\x01 \x01(\x05:\x03-42B\x0f\xaa\x01\x02\x08\x03\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"M\n(EditionsScalarLegacyRequiredIgnoreAlways\x12!\n\x03val\x18\x01 \x01(\x05\x42\x0f\xaa\x01\x02\x08\x03\xbaH\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\"]\n3EditionsScalarLegacyRequiredIgnoreAlwaysWithDefault\x12&\n\x03val\x18\x01 \x01(\x05:\x03-42B\x0f\xaa\x01\x02\x08\x03\xbaH\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\"\xfc\x01\n0EditionsMessageExplicitPresenceIgnoreUnspecified\x12\xae\x01\n\x03val\x18\x01 \x01(\x0b\x32T.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.MsgBF\xbaHC\xba\x01@\n#proto.editions.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\x93\x02\n9EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified\x12\xbc\x01\n\x03val\x18\x01 \x01(\x0b\x32].buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.MsgBK\xaa\x01\x02(\x02\xbaHC\xba\x01@\n#proto.editions.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xf3\x01\n*EditionsMessageExplicitPresenceIgnoreEmpty\x12\xab\x01\n\x03val\x18\x01 \x01(\x0b\x32N.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.MsgBI\xbaHF\xba\x01@\n#proto.editions.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\x8a\x02\n3EditionsMessageExplicitPresenceDelimitedIgnoreEmpty\x12\xb9\x01\n\x03val\x18\x01 \x01(\x0b\x32W.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.MsgBN\xaa\x01\x02(\x02\xbaHF\xba\x01@\n#proto.editions.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xf6\x01\n+EditionsMessageExplicitPresenceIgnoreAlways\x12\xad\x01\n\x03val\x18\x01 \x01(\x0b\x32O.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreAlways.MsgBJ\xbaHG\xba\x01\x41\n$proto.editions.message.ignore.always\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x03R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\x8d\x02\n4EditionsMessageExplicitPresenceDelimitedIgnoreAlways\x12\xbb\x01\n\x03val\x18\x01 \x01(\x0b\x32X.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreAlways.MsgBO\xaa\x01\x02(\x02\xbaHG\xba\x01\x41\n$proto.editions.message.ignore.always\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x03R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xfd\x01\n.EditionsMessageLegacyRequiredIgnoreUnspecified\x12\xb1\x01\n\x03val\x18\x01 \x01(\x0b\x32R.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.MsgBK\xaa\x01\x02\x08\x03\xbaHC\xba\x01@\n#proto.editions.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\x91\x02\n7EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified\x12\xbc\x01\n\x03val\x18\x01 \x01(\x0b\x32[.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.MsgBM\xaa\x01\x04\x08\x03(\x02\xbaHC\xba\x01@\n#proto.editions.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xf4\x01\n(EditionsMessageLegacyRequiredIgnoreEmpty\x12\xae\x01\n\x03val\x18\x01 \x01(\x0b\x32L.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.MsgBN\xaa\x01\x02\x08\x03\xbaHF\xba\x01@\n#proto.editions.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\x88\x02\n1EditionsMessageLegacyRequiredDelimitedIgnoreEmpty\x12\xb9\x01\n\x03val\x18\x01 \x01(\x0b\x32U.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.MsgBP\xaa\x01\x04\x08\x03(\x02\xbaHF\xba\x01@\n#proto.editions.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xf6\x01\n)EditionsMessageLegacyRequiredIgnoreAlways\x12\xaf\x01\n\x03val\x18\x01 \x01(\x0b\x32M.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreAlways.MsgBN\xaa\x01\x02\x08\x03\xbaHF\xba\x01@\n#proto.editions.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x03R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\x8a\x02\n2EditionsMessageLegacyRequiredDelimitedIgnoreAlways\x12\xba\x01\n\x03val\x18\x01 \x01(\x0b\x32V.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreAlways.MsgBP\xaa\x01\x04\x08\x03(\x02\xbaHF\xba\x01@\n#proto.editions.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x03R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"B\n\x1e\x45\x64itionsOneofIgnoreUnspecified\x12\x1b\n\x03val\x18\x01 \x01(\x05\x42\x07\xbaH\x04\x1a\x02 \x00H\x00R\x03valB\x03\n\x01o\"R\n)EditionsOneofIgnoreUnspecifiedWithDefault\x12 \n\x03val\x18\x01 \x01(\x05:\x03-42B\x07\xbaH\x04\x1a\x02 \x00H\x00R\x03valB\x03\n\x01o\"?\n\x18\x45\x64itionsOneofIgnoreEmpty\x12\x1e\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01H\x00R\x03valB\x03\n\x01o\"O\n#EditionsOneofIgnoreEmptyWithDefault\x12#\n\x03val\x18\x01 \x01(\x05:\x03-42B\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01H\x00R\x03valB\x03\n\x01o\"@\n\x19\x45\x64itionsOneofIgnoreAlways\x12\x1e\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x03H\x00R\x03valB\x03\n\x01o\"P\n$EditionsOneofIgnoreAlwaysWithDefault\x12#\n\x03val\x18\x01 \x01(\x05:\x03-42B\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x03H\x00R\x03valB\x03\n\x01o\"?\n!EditionsRepeatedIgnoreUnspecified\x12\x1a\n\x03val\x18\x01 \x03(\x05\x42\x08\xbaH\x05\x92\x01\x02\x08\x03R\x03val\"L\n)EditionsRepeatedExpandedIgnoreUnspecified\x12\x1f\n\x03val\x18\x01 \x03(\x05\x42\r\xaa\x01\x02\x18\x02\xbaH\x05\x92\x01\x02\x08\x03R\x03val\"<\n\x1b\x45\x64itionsRepeatedIgnoreEmpty\x12\x1d\n\x03val\x18\x01 \x03(\x05\x42\x0b\xbaH\x08\x92\x01\x02\x08\x03\xd8\x01\x01R\x03val\"I\n#EditionsRepeatedExpandedIgnoreEmpty\x12\"\n\x03val\x18\x01 \x03(\x05\x42\x10\xaa\x01\x02\x18\x02\xbaH\x08\x92\x01\x02\x08\x03\xd8\x01\x01R\x03val\"=\n\x1c\x45\x64itionsRepeatedIgnoreAlways\x12\x1d\n\x03val\x18\x01 \x03(\x05\x42\x0b\xbaH\x08\x92\x01\x02\x08\x03\xd8\x01\x03R\x03val\"J\n$EditionsRepeatedExpandedIgnoreAlways\x12\"\n\x03val\x18\x01 \x03(\x05\x42\x10\xaa\x01\x02\x18\x02\xbaH\x08\x92\x01\x02\x08\x03\xd8\x01\x03R\x03val\"\xb9\x01\n\x1c\x45\x64itionsMapIgnoreUnspecified\x12\x61\n\x03val\x18\x01 \x03(\x0b\x32\x45.buf.validate.conformance.cases.EditionsMapIgnoreUnspecified.ValEntryB\x08\xbaH\x05\x9a\x01\x02\x08\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xb0\x01\n\x16\x45\x64itionsMapIgnoreEmpty\x12^\n\x03val\x18\x01 \x03(\x0b\x32?.buf.validate.conformance.cases.EditionsMapIgnoreEmpty.ValEntryB\x0b\xbaH\x08\x9a\x01\x02\x08\x03\xd8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xb2\x01\n\x17\x45\x64itionsMapIgnoreAlways\x12_\n\x03val\x18\x01 \x03(\x0b\x32@.buf.validate.conformance.cases.EditionsMapIgnoreAlways.ValEntryB\x0b\xbaH\x08\x9a\x01\x02\x08\x03\xd8\x01\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"G\n%EditionsRepeatedItemIgnoreUnspecified\x12\x1e\n\x03val\x18\x01 \x03(\x05\x42\x0c\xbaH\t\x92\x01\x06\"\x04\x1a\x02 \x00R\x03val\"T\n-EditionsRepeatedExpandedItemIgnoreUnspecified\x12#\n\x03val\x18\x01 \x03(\x05\x42\x11\xaa\x01\x02\x18\x02\xbaH\t\x92\x01\x06\"\x04\x1a\x02 \x00R\x03val\"D\n\x1f\x45\x64itionsRepeatedItemIgnoreEmpty\x12!\n\x03val\x18\x01 \x03(\x05\x42\x0f\xbaH\x0c\x92\x01\t\"\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"Q\n\'EditionsRepeatedExpandedItemIgnoreEmpty\x12&\n\x03val\x18\x01 \x03(\x05\x42\x14\xaa\x01\x02\x18\x02\xbaH\x0c\x92\x01\t\"\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"E\n EditionsRepeatedItemIgnoreAlways\x12!\n\x03val\x18\x01 \x03(\x05\x42\x0f\xbaH\x0c\x92\x01\t\"\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\"R\n(EditionsRepeatedExpandedItemIgnoreAlways\x12&\n\x03val\x18\x01 \x03(\x05\x42\x14\xaa\x01\x02\x18\x02\xbaH\x0c\x92\x01\t\"\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\"\xc3\x01\n\x1f\x45\x64itionsMapKeyIgnoreUnspecified\x12h\n\x03val\x18\x01 \x03(\x0b\x32H.buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified.ValEntryB\x0c\xbaH\t\x9a\x01\x06\"\x04\x1a\x02 \x00R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xba\x01\n\x19\x45\x64itionsMapKeyIgnoreEmpty\x12\x65\n\x03val\x18\x01 \x03(\x0b\x32\x42.buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty.ValEntryB\x0f\xbaH\x0c\x9a\x01\t\"\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xbc\x01\n\x1a\x45\x64itionsMapKeyIgnoreAlways\x12\x66\n\x03val\x18\x01 \x03(\x0b\x32\x43.buf.validate.conformance.cases.EditionsMapKeyIgnoreAlways.ValEntryB\x0f\xbaH\x0c\x9a\x01\t\"\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xc7\x01\n!EditionsMapValueIgnoreUnspecified\x12j\n\x03val\x18\x01 \x03(\x0b\x32J.buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified.ValEntryB\x0c\xbaH\t\x9a\x01\x06*\x04\x1a\x02 \x00R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xbe\x01\n\x1b\x45\x64itionsMapValueIgnoreEmpty\x12g\n\x03val\x18\x01 \x03(\x0b\x32\x44.buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty.ValEntryB\x0f\xbaH\x0c\x9a\x01\t*\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xc0\x01\n\x1c\x45\x64itionsMapValueIgnoreAlways\x12h\n\x03val\x18\x01 \x03(\x0b\x32\x45.buf.validate.conformance.cases.EditionsMapValueIgnoreAlways.ValEntryB\x0f\xbaH\x0c\x9a\x01\t*\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\x42\xda\x01\n\"com.buf.validate.conformance.casesB\x18IgnoreProtoEditionsProtoP\x01\xa2\x02\x04\x42VCC\xaa\x02\x1e\x42uf.Validate.Conformance.Cases\xca\x02\x1e\x42uf\\Validate\\Conformance\\Cases\xe2\x02*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\xea\x02!Buf::Validate::Conformance::Casesb\x08\x65\x64itionsp\xe8\x07') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n:buf/validate/conformance/cases/ignore_proto_editions.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"L\n/EditionsScalarExplicitPresenceIgnoreUnspecified\x12\x19\n\x03val\x18\x01 \x01(\x05\x42\x07\xbaH\x04\x1a\x02 \x00R\x03val\"\\\n:EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault\x12\x1e\n\x03val\x18\x01 \x01(\x05:\x03-42B\x07\xbaH\x04\x1a\x02 \x00R\x03val\"I\n)EditionsScalarExplicitPresenceIgnoreEmpty\x12\x1c\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"Y\n4EditionsScalarExplicitPresenceIgnoreEmptyWithDefault\x12!\n\x03val\x18\x01 \x01(\x05:\x03-42B\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"J\n*EditionsScalarExplicitPresenceIgnoreAlways\x12\x1c\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\"Z\n5EditionsScalarExplicitPresenceIgnoreAlwaysWithDefault\x12!\n\x03val\x18\x01 \x01(\x05:\x03-42B\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\"Q\n/EditionsScalarImplicitPresenceIgnoreUnspecified\x12\x1e\n\x03val\x18\x01 \x01(\x05\x42\x0c\xaa\x01\x02\x08\x02\xbaH\x04\x1a\x02 \x00R\x03val\"N\n)EditionsScalarImplicitPresenceIgnoreEmpty\x12!\n\x03val\x18\x01 \x01(\x05\x42\x0f\xaa\x01\x02\x08\x02\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"O\n*EditionsScalarImplicitPresenceIgnoreAlways\x12!\n\x03val\x18\x01 \x01(\x05\x42\x0f\xaa\x01\x02\x08\x02\xbaH\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\"O\n-EditionsScalarLegacyRequiredIgnoreUnspecified\x12\x1e\n\x03val\x18\x01 \x01(\x05\x42\x0c\xaa\x01\x02\x08\x03\xbaH\x04\x1a\x02 \x00R\x03val\"_\n8EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault\x12#\n\x03val\x18\x01 \x01(\x05:\x03-42B\x0c\xaa\x01\x02\x08\x03\xbaH\x04\x1a\x02 \x00R\x03val\"L\n\'EditionsScalarLegacyRequiredIgnoreEmpty\x12!\n\x03val\x18\x01 \x01(\x05\x42\x0f\xaa\x01\x02\x08\x03\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"\\\n2EditionsScalarLegacyRequiredIgnoreEmptyWithDefault\x12&\n\x03val\x18\x01 \x01(\x05:\x03-42B\x0f\xaa\x01\x02\x08\x03\xbaH\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"M\n(EditionsScalarLegacyRequiredIgnoreAlways\x12!\n\x03val\x18\x01 \x01(\x05\x42\x0f\xaa\x01\x02\x08\x03\xbaH\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\"]\n3EditionsScalarLegacyRequiredIgnoreAlwaysWithDefault\x12&\n\x03val\x18\x01 \x01(\x05:\x03-42B\x0f\xaa\x01\x02\x08\x03\xbaH\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\"\xfc\x01\n0EditionsMessageExplicitPresenceIgnoreUnspecified\x12\xae\x01\n\x03val\x18\x01 \x01(\x0b\x32T.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.MsgBF\xbaHC\xba\x01@\n#proto.editions.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\x93\x02\n9EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified\x12\xbc\x01\n\x03val\x18\x01 \x01(\x0b\x32].buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.MsgBK\xaa\x01\x02(\x02\xbaHC\xba\x01@\n#proto.editions.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xf3\x01\n*EditionsMessageExplicitPresenceIgnoreEmpty\x12\xab\x01\n\x03val\x18\x01 \x01(\x0b\x32N.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.MsgBI\xbaHF\xba\x01@\n#proto.editions.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\x8a\x02\n3EditionsMessageExplicitPresenceDelimitedIgnoreEmpty\x12\xb9\x01\n\x03val\x18\x01 \x01(\x0b\x32W.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.MsgBN\xaa\x01\x02(\x02\xbaHF\xba\x01@\n#proto.editions.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xf6\x01\n+EditionsMessageExplicitPresenceIgnoreAlways\x12\xad\x01\n\x03val\x18\x01 \x01(\x0b\x32O.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreAlways.MsgBJ\xbaHG\xba\x01\x41\n$proto.editions.message.ignore.always\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x03R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\x8d\x02\n4EditionsMessageExplicitPresenceDelimitedIgnoreAlways\x12\xbb\x01\n\x03val\x18\x01 \x01(\x0b\x32X.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreAlways.MsgBO\xaa\x01\x02(\x02\xbaHG\xba\x01\x41\n$proto.editions.message.ignore.always\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x03R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xfd\x01\n.EditionsMessageLegacyRequiredIgnoreUnspecified\x12\xb1\x01\n\x03val\x18\x01 \x01(\x0b\x32R.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.MsgBK\xaa\x01\x02\x08\x03\xbaHC\xba\x01@\n#proto.editions.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\x91\x02\n7EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified\x12\xbc\x01\n\x03val\x18\x01 \x01(\x0b\x32[.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.MsgBM\xaa\x01\x04\x08\x03(\x02\xbaHC\xba\x01@\n#proto.editions.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xf4\x01\n(EditionsMessageLegacyRequiredIgnoreEmpty\x12\xae\x01\n\x03val\x18\x01 \x01(\x0b\x32L.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.MsgBN\xaa\x01\x02\x08\x03\xbaHF\xba\x01@\n#proto.editions.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\x88\x02\n1EditionsMessageLegacyRequiredDelimitedIgnoreEmpty\x12\xb9\x01\n\x03val\x18\x01 \x01(\x0b\x32U.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.MsgBP\xaa\x01\x04\x08\x03(\x02\xbaHF\xba\x01@\n#proto.editions.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xf6\x01\n)EditionsMessageLegacyRequiredIgnoreAlways\x12\xaf\x01\n\x03val\x18\x01 \x01(\x0b\x32M.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreAlways.MsgBN\xaa\x01\x02\x08\x03\xbaHF\xba\x01@\n#proto.editions.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x03R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\x8a\x02\n2EditionsMessageLegacyRequiredDelimitedIgnoreAlways\x12\xba\x01\n\x03val\x18\x01 \x01(\x0b\x32V.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreAlways.MsgBP\xaa\x01\x04\x08\x03(\x02\xbaHF\xba\x01@\n#proto.editions.message.ignore.empty\x12\x06\x66oobar\x1a\x11this.val == \'foo\'\xd8\x01\x03R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"B\n\x1e\x45\x64itionsOneofIgnoreUnspecified\x12\x1b\n\x03val\x18\x01 \x01(\x05\x42\x07\xbaH\x04\x1a\x02 \x00H\x00R\x03valB\x03\n\x01o\"R\n)EditionsOneofIgnoreUnspecifiedWithDefault\x12 \n\x03val\x18\x01 \x01(\x05:\x03-42B\x07\xbaH\x04\x1a\x02 \x00H\x00R\x03valB\x03\n\x01o\"?\n\x18\x45\x64itionsOneofIgnoreEmpty\x12\x1e\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01H\x00R\x03valB\x03\n\x01o\"O\n#EditionsOneofIgnoreEmptyWithDefault\x12#\n\x03val\x18\x01 \x01(\x05:\x03-42B\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x01H\x00R\x03valB\x03\n\x01o\"@\n\x19\x45\x64itionsOneofIgnoreAlways\x12\x1e\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x03H\x00R\x03valB\x03\n\x01o\"P\n$EditionsOneofIgnoreAlwaysWithDefault\x12#\n\x03val\x18\x01 \x01(\x05:\x03-42B\n\xbaH\x07\x1a\x02 \x00\xd8\x01\x03H\x00R\x03valB\x03\n\x01o\"?\n!EditionsRepeatedIgnoreUnspecified\x12\x1a\n\x03val\x18\x01 \x03(\x05\x42\x08\xbaH\x05\x92\x01\x02\x08\x03R\x03val\"L\n)EditionsRepeatedExpandedIgnoreUnspecified\x12\x1f\n\x03val\x18\x01 \x03(\x05\x42\r\xaa\x01\x02\x18\x02\xbaH\x05\x92\x01\x02\x08\x03R\x03val\"<\n\x1b\x45\x64itionsRepeatedIgnoreEmpty\x12\x1d\n\x03val\x18\x01 \x03(\x05\x42\x0b\xbaH\x08\x92\x01\x02\x08\x03\xd8\x01\x01R\x03val\"I\n#EditionsRepeatedExpandedIgnoreEmpty\x12\"\n\x03val\x18\x01 \x03(\x05\x42\x10\xaa\x01\x02\x18\x02\xbaH\x08\x92\x01\x02\x08\x03\xd8\x01\x01R\x03val\"=\n\x1c\x45\x64itionsRepeatedIgnoreAlways\x12\x1d\n\x03val\x18\x01 \x03(\x05\x42\x0b\xbaH\x08\x92\x01\x02\x08\x03\xd8\x01\x03R\x03val\"J\n$EditionsRepeatedExpandedIgnoreAlways\x12\"\n\x03val\x18\x01 \x03(\x05\x42\x10\xaa\x01\x02\x18\x02\xbaH\x08\x92\x01\x02\x08\x03\xd8\x01\x03R\x03val\"\xb9\x01\n\x1c\x45\x64itionsMapIgnoreUnspecified\x12\x61\n\x03val\x18\x01 \x03(\x0b\x32\x45.buf.validate.conformance.cases.EditionsMapIgnoreUnspecified.ValEntryB\x08\xbaH\x05\x9a\x01\x02\x08\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xb0\x01\n\x16\x45\x64itionsMapIgnoreEmpty\x12^\n\x03val\x18\x01 \x03(\x0b\x32?.buf.validate.conformance.cases.EditionsMapIgnoreEmpty.ValEntryB\x0b\xbaH\x08\x9a\x01\x02\x08\x03\xd8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xb2\x01\n\x17\x45\x64itionsMapIgnoreAlways\x12_\n\x03val\x18\x01 \x03(\x0b\x32@.buf.validate.conformance.cases.EditionsMapIgnoreAlways.ValEntryB\x0b\xbaH\x08\x9a\x01\x02\x08\x03\xd8\x01\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"G\n%EditionsRepeatedItemIgnoreUnspecified\x12\x1e\n\x03val\x18\x01 \x03(\x05\x42\x0c\xbaH\t\x92\x01\x06\"\x04\x1a\x02 \x00R\x03val\"T\n-EditionsRepeatedExpandedItemIgnoreUnspecified\x12#\n\x03val\x18\x01 \x03(\x05\x42\x11\xaa\x01\x02\x18\x02\xbaH\t\x92\x01\x06\"\x04\x1a\x02 \x00R\x03val\"D\n\x1f\x45\x64itionsRepeatedItemIgnoreEmpty\x12!\n\x03val\x18\x01 \x03(\x05\x42\x0f\xbaH\x0c\x92\x01\t\"\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"Q\n\'EditionsRepeatedExpandedItemIgnoreEmpty\x12&\n\x03val\x18\x01 \x03(\x05\x42\x14\xaa\x01\x02\x18\x02\xbaH\x0c\x92\x01\t\"\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\"E\n EditionsRepeatedItemIgnoreAlways\x12!\n\x03val\x18\x01 \x03(\x05\x42\x0f\xbaH\x0c\x92\x01\t\"\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\"R\n(EditionsRepeatedExpandedItemIgnoreAlways\x12&\n\x03val\x18\x01 \x03(\x05\x42\x14\xaa\x01\x02\x18\x02\xbaH\x0c\x92\x01\t\"\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\"\xc3\x01\n\x1f\x45\x64itionsMapKeyIgnoreUnspecified\x12h\n\x03val\x18\x01 \x03(\x0b\x32H.buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified.ValEntryB\x0c\xbaH\t\x9a\x01\x06\"\x04\x1a\x02 \x00R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xba\x01\n\x19\x45\x64itionsMapKeyIgnoreEmpty\x12\x65\n\x03val\x18\x01 \x03(\x0b\x32\x42.buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty.ValEntryB\x0f\xbaH\x0c\x9a\x01\t\"\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xbc\x01\n\x1a\x45\x64itionsMapKeyIgnoreAlways\x12\x66\n\x03val\x18\x01 \x03(\x0b\x32\x43.buf.validate.conformance.cases.EditionsMapKeyIgnoreAlways.ValEntryB\x0f\xbaH\x0c\x9a\x01\t\"\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xc7\x01\n!EditionsMapValueIgnoreUnspecified\x12j\n\x03val\x18\x01 \x03(\x0b\x32J.buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified.ValEntryB\x0c\xbaH\t\x9a\x01\x06*\x04\x1a\x02 \x00R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xbe\x01\n\x1b\x45\x64itionsMapValueIgnoreEmpty\x12g\n\x03val\x18\x01 \x03(\x0b\x32\x44.buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty.ValEntryB\x0f\xbaH\x0c\x9a\x01\t*\x07\x1a\x02 \x00\xd8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\xc0\x01\n\x1c\x45\x64itionsMapValueIgnoreAlways\x12h\n\x03val\x18\x01 \x03(\x0b\x32\x45.buf.validate.conformance.cases.EditionsMapValueIgnoreAlways.ValEntryB\x0f\xbaH\x0c\x9a\x01\t*\x07\x1a\x02 \x00\xd8\x01\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\x62\x08\x65\x64itionsp\xe8\x07') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'buf.validate.conformance.cases.ignore_proto_editions_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\"com.buf.validate.conformance.casesB\030IgnoreProtoEditionsProtoP\001\242\002\004BVCC\252\002\036Buf.Validate.Conformance.Cases\312\002\036Buf\\Validate\\Conformance\\Cases\342\002*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\352\002!Buf::Validate::Conformance::Cases' + DESCRIPTOR._loaded_options = None _globals['_EDITIONSSCALAREXPLICITPRESENCEIGNOREUNSPECIFIED'].fields_by_name['val']._loaded_options = None _globals['_EDITIONSSCALAREXPLICITPRESENCEIGNOREUNSPECIFIED'].fields_by_name['val']._serialized_options = b'\272H\004\032\002 \000' _globals['_EDITIONSSCALAREXPLICITPRESENCEIGNOREUNSPECIFIEDWITHDEFAULT'].fields_by_name['val']._loaded_options = None diff --git a/packages/protovalidate-proto/src/buf/validate/conformance/cases/kitchen_sink_pb2.py b/packages/protovalidate-proto/src/buf/validate/conformance/cases/kitchen_sink_pb2.py index c8ec1699..bd19e2ba 100644 --- a/packages/protovalidate-proto/src/buf/validate/conformance/cases/kitchen_sink_pb2.py +++ b/packages/protovalidate-proto/src/buf/validate/conformance/cases/kitchen_sink_pb2.py @@ -33,14 +33,13 @@ from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n1buf/validate/conformance/cases/kitchen_sink.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\x1a\x19google/protobuf/any.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xbc\x08\n\x0e\x43omplexTestMsg\x12!\n\x05\x63onst\x18\x01 \x01(\tB\x0b\xbaH\x08r\x06\n\x04\x61\x62\x63\x64R\x05\x63onst\x12\x46\n\x06nested\x18\x02 \x01(\x0b\x32..buf.validate.conformance.cases.ComplexTestMsgR\x06nested\x12$\n\tint_const\x18\x03 \x01(\x05\x42\x07\xbaH\x04\x1a\x02\x08\x05R\x08intConst\x12&\n\nbool_const\x18\x04 \x01(\x08\x42\x07\xbaH\x04j\x02\x08\x00R\tboolConst\x12\x44\n\tfloat_val\x18\x05 \x01(\x0b\x32\x1b.google.protobuf.FloatValueB\n\xbaH\x07\n\x05%\x00\x00\x00\x00R\x08\x66loatVal\x12\x41\n\x07\x64ur_val\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\r\xbaH\n\xaa\x01\x04\x1a\x02\x08\x11\xc8\x01\x01R\x06\x64urVal\x12=\n\x06ts_val\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\n\xbaH\x07\xb2\x01\x04*\x02\x08\x07R\x05tsVal\x12H\n\x07\x61nother\x18\x08 \x01(\x0b\x32..buf.validate.conformance.cases.ComplexTestMsgR\x07\x61nother\x12+\n\x0b\x66loat_const\x18\t \x01(\x02\x42\n\xbaH\x07\n\x05\x15\x00\x00\x00\x41R\nfloatConst\x12\x34\n\tdouble_in\x18\n \x01(\x01\x42\x17\xbaH\x14\x12\x12\x31\xb4\xc8v\xbe\x9f\x8c|@1\x00\x00\x00\x00\x00\xc0^@R\x08\x64oubleIn\x12X\n\nenum_const\x18\x0b \x01(\x0e\x32/.buf.validate.conformance.cases.ComplexTestEnumB\x08\xbaH\x05\x82\x01\x02\x08\x02R\tenumConst\x12\x63\n\x07\x61ny_val\x18\x0c \x01(\x0b\x32\x14.google.protobuf.AnyB4\xbaH1\xa2\x01.\x12,type.googleapis.com/google.protobuf.DurationR\x06\x61nyVal\x12K\n\nrep_ts_val\x18\r \x03(\x0b\x32\x1a.google.protobuf.TimestampB\x11\xbaH\x0e\x92\x01\x0b\"\t\xb2\x01\x06\x32\x04\x10\xc0\x84=R\x08repTsVal\x12\x61\n\x07map_val\x18\x0e \x03(\x0b\x32:.buf.validate.conformance.cases.ComplexTestMsg.MapValEntryB\x0c\xbaH\t\x9a\x01\x06\"\x04:\x02\x10\x00R\x06mapVal\x12&\n\tbytes_val\x18\x0f \x01(\x0c\x42\t\xbaH\x06z\x04\n\x02\x00\x99R\x08\x62ytesVal\x12\x0e\n\x01x\x18\x10 \x01(\tH\x00R\x01x\x12\x0e\n\x01y\x18\x11 \x01(\x05H\x00R\x01y\x1a\x39\n\x0bMapValEntry\x12\x10\n\x03key\x18\x01 \x01(\x11R\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x42\n\n\x01o\x12\x05\xbaH\x02\x08\x01\"V\n\x12KitchenSinkMessage\x12@\n\x03val\x18\x01 \x01(\x0b\x32..buf.validate.conformance.cases.ComplexTestMsgR\x03val*j\n\x0f\x43omplexTestEnum\x12!\n\x1d\x43OMPLEX_TEST_ENUM_UNSPECIFIED\x10\x00\x12\x19\n\x15\x43OMPLEX_TEST_ENUM_ONE\x10\x01\x12\x19\n\x15\x43OMPLEX_TEST_ENUM_TWO\x10\x02\x42\xd2\x01\n\"com.buf.validate.conformance.casesB\x10KitchenSinkProtoP\x01\xa2\x02\x04\x42VCC\xaa\x02\x1e\x42uf.Validate.Conformance.Cases\xca\x02\x1e\x42uf\\Validate\\Conformance\\Cases\xe2\x02*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\xea\x02!Buf::Validate::Conformance::Casesb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n1buf/validate/conformance/cases/kitchen_sink.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\x1a\x19google/protobuf/any.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xbc\x08\n\x0e\x43omplexTestMsg\x12!\n\x05\x63onst\x18\x01 \x01(\tB\x0b\xbaH\x08r\x06\n\x04\x61\x62\x63\x64R\x05\x63onst\x12\x46\n\x06nested\x18\x02 \x01(\x0b\x32..buf.validate.conformance.cases.ComplexTestMsgR\x06nested\x12$\n\tint_const\x18\x03 \x01(\x05\x42\x07\xbaH\x04\x1a\x02\x08\x05R\x08intConst\x12&\n\nbool_const\x18\x04 \x01(\x08\x42\x07\xbaH\x04j\x02\x08\x00R\tboolConst\x12\x44\n\tfloat_val\x18\x05 \x01(\x0b\x32\x1b.google.protobuf.FloatValueB\n\xbaH\x07\n\x05%\x00\x00\x00\x00R\x08\x66loatVal\x12\x41\n\x07\x64ur_val\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\r\xbaH\n\xaa\x01\x04\x1a\x02\x08\x11\xc8\x01\x01R\x06\x64urVal\x12=\n\x06ts_val\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\n\xbaH\x07\xb2\x01\x04*\x02\x08\x07R\x05tsVal\x12H\n\x07\x61nother\x18\x08 \x01(\x0b\x32..buf.validate.conformance.cases.ComplexTestMsgR\x07\x61nother\x12+\n\x0b\x66loat_const\x18\t \x01(\x02\x42\n\xbaH\x07\n\x05\x15\x00\x00\x00\x41R\nfloatConst\x12\x34\n\tdouble_in\x18\n \x01(\x01\x42\x17\xbaH\x14\x12\x12\x31\xb4\xc8v\xbe\x9f\x8c|@1\x00\x00\x00\x00\x00\xc0^@R\x08\x64oubleIn\x12X\n\nenum_const\x18\x0b \x01(\x0e\x32/.buf.validate.conformance.cases.ComplexTestEnumB\x08\xbaH\x05\x82\x01\x02\x08\x02R\tenumConst\x12\x63\n\x07\x61ny_val\x18\x0c \x01(\x0b\x32\x14.google.protobuf.AnyB4\xbaH1\xa2\x01.\x12,type.googleapis.com/google.protobuf.DurationR\x06\x61nyVal\x12K\n\nrep_ts_val\x18\r \x03(\x0b\x32\x1a.google.protobuf.TimestampB\x11\xbaH\x0e\x92\x01\x0b\"\t\xb2\x01\x06\x32\x04\x10\xc0\x84=R\x08repTsVal\x12\x61\n\x07map_val\x18\x0e \x03(\x0b\x32:.buf.validate.conformance.cases.ComplexTestMsg.MapValEntryB\x0c\xbaH\t\x9a\x01\x06\"\x04:\x02\x10\x00R\x06mapVal\x12&\n\tbytes_val\x18\x0f \x01(\x0c\x42\t\xbaH\x06z\x04\n\x02\x00\x99R\x08\x62ytesVal\x12\x0e\n\x01x\x18\x10 \x01(\tH\x00R\x01x\x12\x0e\n\x01y\x18\x11 \x01(\x05H\x00R\x01y\x1a\x39\n\x0bMapValEntry\x12\x10\n\x03key\x18\x01 \x01(\x11R\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x42\n\n\x01o\x12\x05\xbaH\x02\x08\x01\"V\n\x12KitchenSinkMessage\x12@\n\x03val\x18\x01 \x01(\x0b\x32..buf.validate.conformance.cases.ComplexTestMsgR\x03val*j\n\x0f\x43omplexTestEnum\x12!\n\x1d\x43OMPLEX_TEST_ENUM_UNSPECIFIED\x10\x00\x12\x19\n\x15\x43OMPLEX_TEST_ENUM_ONE\x10\x01\x12\x19\n\x15\x43OMPLEX_TEST_ENUM_TWO\x10\x02\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'buf.validate.conformance.cases.kitchen_sink_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\"com.buf.validate.conformance.casesB\020KitchenSinkProtoP\001\242\002\004BVCC\252\002\036Buf.Validate.Conformance.Cases\312\002\036Buf\\Validate\\Conformance\\Cases\342\002*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\352\002!Buf::Validate::Conformance::Cases' + DESCRIPTOR._loaded_options = None _globals['_COMPLEXTESTMSG_MAPVALENTRY']._loaded_options = None _globals['_COMPLEXTESTMSG_MAPVALENTRY']._serialized_options = b'8\001' _globals['_COMPLEXTESTMSG'].oneofs_by_name['o']._loaded_options = None diff --git a/packages/protovalidate-proto/src/buf/validate/conformance/cases/library_pb2.py b/packages/protovalidate-proto/src/buf/validate/conformance/cases/library_pb2.py index 521458e2..494b6530 100644 --- a/packages/protovalidate-proto/src/buf/validate/conformance/cases/library_pb2.py +++ b/packages/protovalidate-proto/src/buf/validate/conformance/cases/library_pb2.py @@ -29,14 +29,13 @@ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n,buf/validate/conformance/cases/library.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"Q\n\nIsHostname\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val:1\xbaH.\x1a,\n\x13library.is_hostname\x1a\x15this.val.isHostname()\"\x93\x01\n\rIsHostAndPort\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\x12#\n\rport_required\x18\x02 \x01(\x08R\x0cportRequired:K\xbaHH\x1a\x46\n\x18library.is_host_and_port\x1a*this.val.isHostAndPort(this.port_required)\"\xf0\x02\n\nIsIpPrefix\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\x12\x1d\n\x07version\x18\x02 \x01(\x05H\x00R\x07version\x88\x01\x01\x12\x1b\n\x06strict\x18\x03 \x01(\x08H\x01R\x06strict\x88\x01\x01:\xfc\x01\xbaH\xf8\x01\x1a\xf5\x01\n\x14library.is_ip_prefix\x1a\xdc\x01has(this.version) && has(this.strict) ? this.val.isIpPrefix(this.version, this.strict) : has(this.version) ? this.val.isIpPrefix(this.version) : has(this.strict) ? this.val.isIpPrefix(this.strict) : this.val.isIpPrefix()B\n\n\x08_versionB\t\n\x07_strict\"\x9c\x01\n\x04IsIp\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\x12\x1d\n\x07version\x18\x02 \x01(\x05H\x00R\x07version\x88\x01\x01:W\xbaHT\x1aR\n\rlibrary.is_ip\x1a\x41has(this.version) ? this.val.isIp(this.version) : this.val.isIp()B\n\n\x08_version\"H\n\x07IsEmail\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val:+\xbaH(\x1a&\n\x10library.is_email\x1a\x12this.val.isEmail()\"B\n\x05IsUri\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val:\'\xbaH$\x1a\"\n\x0elibrary.is_uri\x1a\x10this.val.isUri()\"L\n\x08IsUriRef\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val:.\xbaH+\x1a)\n\x12library.is_uri_ref\x1a\x13this.val.isUriRef()B\xce\x01\n\"com.buf.validate.conformance.casesB\x0cLibraryProtoP\x01\xa2\x02\x04\x42VCC\xaa\x02\x1e\x42uf.Validate.Conformance.Cases\xca\x02\x1e\x42uf\\Validate\\Conformance\\Cases\xe2\x02*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\xea\x02!Buf::Validate::Conformance::Casesb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n,buf/validate/conformance/cases/library.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"Q\n\nIsHostname\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val:1\xbaH.\x1a,\n\x13library.is_hostname\x1a\x15this.val.isHostname()\"\x93\x01\n\rIsHostAndPort\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\x12#\n\rport_required\x18\x02 \x01(\x08R\x0cportRequired:K\xbaHH\x1a\x46\n\x18library.is_host_and_port\x1a*this.val.isHostAndPort(this.port_required)\"\xf0\x02\n\nIsIpPrefix\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\x12\x1d\n\x07version\x18\x02 \x01(\x05H\x00R\x07version\x88\x01\x01\x12\x1b\n\x06strict\x18\x03 \x01(\x08H\x01R\x06strict\x88\x01\x01:\xfc\x01\xbaH\xf8\x01\x1a\xf5\x01\n\x14library.is_ip_prefix\x1a\xdc\x01has(this.version) && has(this.strict) ? this.val.isIpPrefix(this.version, this.strict) : has(this.version) ? this.val.isIpPrefix(this.version) : has(this.strict) ? this.val.isIpPrefix(this.strict) : this.val.isIpPrefix()B\n\n\x08_versionB\t\n\x07_strict\"\x9c\x01\n\x04IsIp\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\x12\x1d\n\x07version\x18\x02 \x01(\x05H\x00R\x07version\x88\x01\x01:W\xbaHT\x1aR\n\rlibrary.is_ip\x1a\x41has(this.version) ? this.val.isIp(this.version) : this.val.isIp()B\n\n\x08_version\"H\n\x07IsEmail\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val:+\xbaH(\x1a&\n\x10library.is_email\x1a\x12this.val.isEmail()\"B\n\x05IsUri\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val:\'\xbaH$\x1a\"\n\x0elibrary.is_uri\x1a\x10this.val.isUri()\"L\n\x08IsUriRef\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val:.\xbaH+\x1a)\n\x12library.is_uri_ref\x1a\x13this.val.isUriRef()b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'buf.validate.conformance.cases.library_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\"com.buf.validate.conformance.casesB\014LibraryProtoP\001\242\002\004BVCC\252\002\036Buf.Validate.Conformance.Cases\312\002\036Buf\\Validate\\Conformance\\Cases\342\002*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\352\002!Buf::Validate::Conformance::Cases' + DESCRIPTOR._loaded_options = None _globals['_ISHOSTNAME']._loaded_options = None _globals['_ISHOSTNAME']._serialized_options = b'\272H.\032,\n\023library.is_hostname\032\025this.val.isHostname()' _globals['_ISHOSTANDPORT']._loaded_options = None diff --git a/packages/protovalidate-proto/src/buf/validate/conformance/cases/maps_pb2.py b/packages/protovalidate-proto/src/buf/validate/conformance/cases/maps_pb2.py index aa575016..c6cee085 100644 --- a/packages/protovalidate-proto/src/buf/validate/conformance/cases/maps_pb2.py +++ b/packages/protovalidate-proto/src/buf/validate/conformance/cases/maps_pb2.py @@ -29,14 +29,13 @@ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n)buf/validate/conformance/cases/maps.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"\x85\x01\n\x07MapNone\x12\x42\n\x03val\x18\x01 \x03(\x0b\x32\x30.buf.validate.conformance.cases.MapNone.ValEntryR\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\rR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x08R\x05value:\x02\x38\x01\"\x8d\x01\n\x06MapMin\x12K\n\x03val\x18\x01 \x03(\x0b\x32/.buf.validate.conformance.cases.MapMin.ValEntryB\x08\xbaH\x05\x9a\x01\x02\x08\x02R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x02R\x05value:\x02\x38\x01\"\x8d\x01\n\x06MapMax\x12K\n\x03val\x18\x01 \x03(\x0b\x32/.buf.validate.conformance.cases.MapMax.ValEntryB\x08\xbaH\x05\x9a\x01\x02\x10\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x03R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x01R\x05value:\x02\x38\x01\"\x95\x01\n\tMapMinMax\x12P\n\x03val\x18\x01 \x03(\x0b\x32\x32.buf.validate.conformance.cases.MapMinMax.ValEntryB\n\xbaH\x07\x9a\x01\x04\x08\x02\x10\x04R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x08R\x05value:\x02\x38\x01\"\x93\x01\n\x08MapExact\x12O\n\x03val\x18\x01 \x03(\x0b\x32\x31.buf.validate.conformance.cases.MapExact.ValEntryB\n\xbaH\x07\x9a\x01\x04\x08\x03\x10\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x04R\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\x93\x01\n\x07MapKeys\x12P\n\x03val\x18\x01 \x03(\x0b\x32\x30.buf.validate.conformance.cases.MapKeys.ValEntryB\x0c\xbaH\t\x9a\x01\x06\"\x04\x42\x02\x10\x00R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x12R\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\x97\x01\n\tMapValues\x12R\n\x03val\x18\x01 \x03(\x0b\x32\x32.buf.validate.conformance.cases.MapValues.ValEntryB\x0c\xbaH\t\x9a\x01\x06*\x04r\x02\x10\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xb0\x01\n\x0eMapKeysPattern\x12\x66\n\x03val\x18\x01 \x03(\x0b\x32\x37.buf.validate.conformance.cases.MapKeysPattern.ValEntryB\x1b\xbaH\x18\x9a\x01\x15\"\x13r\x11\x32\x0f(?i)^[a-z0-9]+$R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xb4\x01\n\x10MapValuesPattern\x12h\n\x03val\x18\x01 \x03(\x0b\x32\x39.buf.validate.conformance.cases.MapValuesPattern.ValEntryB\x1b\xbaH\x18\x9a\x01\x15*\x13r\x11\x32\x0f(?i)^[a-z0-9]+$R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xe3\x01\n\x0cMapRecursive\x12G\n\x03val\x18\x01 \x03(\x0b\x32\x35.buf.validate.conformance.cases.MapRecursive.ValEntryR\x03val\x1ah\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\rR\x03key\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x30.buf.validate.conformance.cases.MapRecursive.MsgR\x05value:\x02\x38\x01\x1a \n\x03Msg\x12\x19\n\x03val\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x03R\x03val\"\xa2\x01\n\x0eMapExactIgnore\x12X\n\x03val\x18\x01 \x03(\x0b\x32\x37.buf.validate.conformance.cases.MapExactIgnore.ValEntryB\r\xbaH\n\x9a\x01\x04\x08\x03\x10\x03\xd8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x04R\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xd7\x03\n\x0cMultipleMaps\x12[\n\x05\x66irst\x18\x01 \x03(\x0b\x32\x37.buf.validate.conformance.cases.MultipleMaps.FirstEntryB\x0c\xbaH\t\x9a\x01\x06\"\x04*\x02 \x00R\x05\x66irst\x12^\n\x06second\x18\x02 \x03(\x0b\x32\x38.buf.validate.conformance.cases.MultipleMaps.SecondEntryB\x0c\xbaH\t\x9a\x01\x06\"\x04\x1a\x02\x10\x00R\x06second\x12[\n\x05third\x18\x03 \x03(\x0b\x32\x37.buf.validate.conformance.cases.MultipleMaps.ThirdEntryB\x0c\xbaH\t\x9a\x01\x06\"\x04\x1a\x02 \x00R\x05third\x1a\x38\n\nFirstEntry\x12\x10\n\x03key\x18\x01 \x01(\rR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x1a\x39\n\x0bSecondEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x08R\x05value:\x02\x38\x01\x1a\x38\n\nThirdEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x08R\x05value:\x02\x38\x01\x42\xcb\x01\n\"com.buf.validate.conformance.casesB\tMapsProtoP\x01\xa2\x02\x04\x42VCC\xaa\x02\x1e\x42uf.Validate.Conformance.Cases\xca\x02\x1e\x42uf\\Validate\\Conformance\\Cases\xe2\x02*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\xea\x02!Buf::Validate::Conformance::Casesb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n)buf/validate/conformance/cases/maps.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"\x85\x01\n\x07MapNone\x12\x42\n\x03val\x18\x01 \x03(\x0b\x32\x30.buf.validate.conformance.cases.MapNone.ValEntryR\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\rR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x08R\x05value:\x02\x38\x01\"\x8d\x01\n\x06MapMin\x12K\n\x03val\x18\x01 \x03(\x0b\x32/.buf.validate.conformance.cases.MapMin.ValEntryB\x08\xbaH\x05\x9a\x01\x02\x08\x02R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x02R\x05value:\x02\x38\x01\"\x8d\x01\n\x06MapMax\x12K\n\x03val\x18\x01 \x03(\x0b\x32/.buf.validate.conformance.cases.MapMax.ValEntryB\x08\xbaH\x05\x9a\x01\x02\x10\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x03R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x01R\x05value:\x02\x38\x01\"\x95\x01\n\tMapMinMax\x12P\n\x03val\x18\x01 \x03(\x0b\x32\x32.buf.validate.conformance.cases.MapMinMax.ValEntryB\n\xbaH\x07\x9a\x01\x04\x08\x02\x10\x04R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x08R\x05value:\x02\x38\x01\"\x93\x01\n\x08MapExact\x12O\n\x03val\x18\x01 \x03(\x0b\x32\x31.buf.validate.conformance.cases.MapExact.ValEntryB\n\xbaH\x07\x9a\x01\x04\x08\x03\x10\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x04R\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\x93\x01\n\x07MapKeys\x12P\n\x03val\x18\x01 \x03(\x0b\x32\x30.buf.validate.conformance.cases.MapKeys.ValEntryB\x0c\xbaH\t\x9a\x01\x06\"\x04\x42\x02\x10\x00R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x12R\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\x97\x01\n\tMapValues\x12R\n\x03val\x18\x01 \x03(\x0b\x32\x32.buf.validate.conformance.cases.MapValues.ValEntryB\x0c\xbaH\t\x9a\x01\x06*\x04r\x02\x10\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xb0\x01\n\x0eMapKeysPattern\x12\x66\n\x03val\x18\x01 \x03(\x0b\x32\x37.buf.validate.conformance.cases.MapKeysPattern.ValEntryB\x1b\xbaH\x18\x9a\x01\x15\"\x13r\x11\x32\x0f(?i)^[a-z0-9]+$R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xb4\x01\n\x10MapValuesPattern\x12h\n\x03val\x18\x01 \x03(\x0b\x32\x39.buf.validate.conformance.cases.MapValuesPattern.ValEntryB\x1b\xbaH\x18\x9a\x01\x15*\x13r\x11\x32\x0f(?i)^[a-z0-9]+$R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xe3\x01\n\x0cMapRecursive\x12G\n\x03val\x18\x01 \x03(\x0b\x32\x35.buf.validate.conformance.cases.MapRecursive.ValEntryR\x03val\x1ah\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\rR\x03key\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x30.buf.validate.conformance.cases.MapRecursive.MsgR\x05value:\x02\x38\x01\x1a \n\x03Msg\x12\x19\n\x03val\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x03R\x03val\"\xa2\x01\n\x0eMapExactIgnore\x12X\n\x03val\x18\x01 \x03(\x0b\x32\x37.buf.validate.conformance.cases.MapExactIgnore.ValEntryB\r\xbaH\n\x9a\x01\x04\x08\x03\x10\x03\xd8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x04R\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xd7\x03\n\x0cMultipleMaps\x12[\n\x05\x66irst\x18\x01 \x03(\x0b\x32\x37.buf.validate.conformance.cases.MultipleMaps.FirstEntryB\x0c\xbaH\t\x9a\x01\x06\"\x04*\x02 \x00R\x05\x66irst\x12^\n\x06second\x18\x02 \x03(\x0b\x32\x38.buf.validate.conformance.cases.MultipleMaps.SecondEntryB\x0c\xbaH\t\x9a\x01\x06\"\x04\x1a\x02\x10\x00R\x06second\x12[\n\x05third\x18\x03 \x03(\x0b\x32\x37.buf.validate.conformance.cases.MultipleMaps.ThirdEntryB\x0c\xbaH\t\x9a\x01\x06\"\x04\x1a\x02 \x00R\x05third\x1a\x38\n\nFirstEntry\x12\x10\n\x03key\x18\x01 \x01(\rR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x1a\x39\n\x0bSecondEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x08R\x05value:\x02\x38\x01\x1a\x38\n\nThirdEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x08R\x05value:\x02\x38\x01\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'buf.validate.conformance.cases.maps_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\"com.buf.validate.conformance.casesB\tMapsProtoP\001\242\002\004BVCC\252\002\036Buf.Validate.Conformance.Cases\312\002\036Buf\\Validate\\Conformance\\Cases\342\002*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\352\002!Buf::Validate::Conformance::Cases' + DESCRIPTOR._loaded_options = None _globals['_MAPNONE_VALENTRY']._loaded_options = None _globals['_MAPNONE_VALENTRY']._serialized_options = b'8\001' _globals['_MAPMIN_VALENTRY']._loaded_options = None diff --git a/packages/protovalidate-proto/src/buf/validate/conformance/cases/messages_pb2.py b/packages/protovalidate-proto/src/buf/validate/conformance/cases/messages_pb2.py index c3d98925..001d48ad 100644 --- a/packages/protovalidate-proto/src/buf/validate/conformance/cases/messages_pb2.py +++ b/packages/protovalidate-proto/src/buf/validate/conformance/cases/messages_pb2.py @@ -30,14 +30,13 @@ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n-buf/validate/conformance/cases/messages.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x38\x62uf/validate/conformance/cases/other_package/embed.proto\x1a\x1b\x62uf/validate/validate.proto\"l\n\x07TestMsg\x12 \n\x05\x63onst\x18\x01 \x01(\tB\n\xbaH\x07r\x05\n\x03\x66ooR\x05\x63onst\x12?\n\x06nested\x18\x02 \x01(\x0b\x32\'.buf.validate.conformance.cases.TestMsgR\x06nested\"_\n\x0bMessageNone\x12\x45\n\x03val\x18\x01 \x01(\x0b\x32\x33.buf.validate.conformance.cases.MessageNone.NoneMsgR\x03val\x1a\t\n\x07NoneMsg\"D\n\x07Message\x12\x39\n\x03val\x18\x01 \x01(\x0b\x32\'.buf.validate.conformance.cases.TestMsgR\x03val\"\\\n\x13MessageCrossPackage\x12\x45\n\x03val\x18\x01 \x01(\x0b\x32\x33.buf.validate.conformance.cases.other_package.EmbedR\x03val\"P\n\x0bMessageSkip\x12\x41\n\x03val\x18\x01 \x01(\x0b\x32\'.buf.validate.conformance.cases.TestMsgB\x06\xbaH\x03\xd8\x01\x03R\x03val\"T\n\x0fMessageRequired\x12\x41\n\x03val\x18\x01 \x01(\x0b\x32\'.buf.validate.conformance.cases.TestMsgB\x06\xbaH\x03\xc8\x01\x01R\x03val\"l\n\x1aMessageRequiredButOptional\x12\x46\n\x03val\x18\x01 \x01(\x0b\x32\'.buf.validate.conformance.cases.TestMsgB\x06\xbaH\x03\xc8\x01\x01H\x00R\x03val\x88\x01\x01\x42\x06\n\x04_val\"i\n\x14MessageRequiredOneof\x12\x43\n\x03val\x18\x01 \x01(\x0b\x32\'.buf.validate.conformance.cases.TestMsgB\x06\xbaH\x03\xc8\x01\x01H\x00R\x03valB\x0c\n\x03one\x12\x05\xbaH\x02\x08\x01\"\x15\n\x13MessageWith3dInside\"g\n\x17MessageOneofSingleField\x12\x1b\n\tstr_field\x18\x01 \x01(\tR\x08strField\x12\x1d\n\nbool_field\x18\x02 \x01(\x08R\tboolField:\x10\xbaH\r\"\x0b\n\tstr_field\"q\n\x1fMessageOneofSingleFieldRequired\x12\x1b\n\tstr_field\x18\x01 \x01(\tR\x08strField\x12\x1d\n\nbool_field\x18\x02 \x01(\x08R\tboolField:\x12\xbaH\x0f\"\r\n\tstr_field\x10\x01\"v\n\x1aMessageOneofMultipleFields\x12\x1b\n\tstr_field\x18\x01 \x01(\tR\x08strField\x12\x1d\n\nbool_field\x18\x02 \x01(\x08R\tboolField:\x1c\xbaH\x19\"\x17\n\tstr_field\n\nbool_field\"\x80\x01\n\"MessageOneofMultipleFieldsRequired\x12\x1b\n\tstr_field\x18\x01 \x01(\tR\x08strField\x12\x1d\n\nbool_field\x18\x02 \x01(\x08R\tboolField:\x1e\xbaH\x1b\"\x19\n\tstr_field\n\nbool_field\x10\x01\"\xb5\x01\n MessageOneofMultipleSharedFields\x12\x1b\n\tstr_field\x18\x01 \x01(\tR\x08strField\x12\x1d\n\nbool_field\x18\x02 \x01(\x08R\tboolField\x12\x1b\n\tint_field\x18\x03 \x01(\x05R\x08intField:8\xbaH5\"\x19\n\tstr_field\n\nbool_field\x10\x01\"\x18\n\tstr_field\n\tint_field\x10\x01\"G\n\x1cMessageOneofUnknownFieldName\x12\x1b\n\tstr_field\x18\x01 \x01(\tR\x08strField:\n\xbaH\x07\"\x05\n\x03xxx\"\x81\x01\n\x1aMessageOneofDuplicateField\x12\x1b\n\tstr_field\x18\x01 \x01(\tR\x08strField\x12\x1d\n\nbool_field\x18\x02 \x01(\x08R\tboolField:\'\xbaH$\"\"\n\tstr_field\n\nbool_field\n\tstr_field\"[\n\x16MessageOneofZeroFields\x12\x1b\n\tstr_field\x18\x01 \x01(\tR\x08strField\x12\x1d\n\nbool_field\x18\x02 \x01(\x08R\tboolField:\x05\xbaH\x02\"\x00\"h\n\x19MessageOneofUnsatisfiable\x12\x0c\n\x01\x61\x18\x01 \x01(\x08R\x01\x61\x12\x0c\n\x01\x62\x18\x02 \x01(\x08R\x01\x62\x12\x0c\n\x01\x63\x18\x03 \x01(\x08R\x01\x63:!\xbaH\x1e\"\x08\n\x01\x61\n\x01\x62\x10\x01\"\x08\n\x01\x62\n\x01\x63\x10\x01\"\x08\n\x01\x61\n\x01\x63\x10\x01\"\x82\x01\n\x1dMessageOneofIgnoreUnpopulated\x12\x1b\n\tstr_field\x18\x01 \x01(\tR\x08strField\x12&\n\nbool_field\x18\x02 \x01(\x08\x42\x07\xbaH\x04j\x02\x08\x01R\tboolField:\x1c\xbaH\x19\"\x17\n\tstr_field\n\nbool_field\"\x8c\x01\n%MessageOneofIgnoreUnpopulatedRequired\x12\x1b\n\tstr_field\x18\x01 \x01(\tR\x08strField\x12&\n\nbool_field\x18\x02 \x01(\x08\x42\x07\xbaH\x04j\x02\x08\x01R\tboolField:\x1e\xbaH\x1b\"\x19\n\tstr_field\n\nbool_field\x10\x01\"\xa7\x01\n\x1aMessageOneofIgnoreOverride\x12L\n\tmsg_field\x18\x01 \x01(\x0b\x32\'.buf.validate.conformance.cases.TestMsgB\x06\xbaH\x03\xd8\x01\x03R\x08msgField\x12\x1d\n\nbool_field\x18\x02 \x01(\x08R\tboolField:\x1c\xbaH\x19\"\x17\n\tmsg_field\n\nbool_fieldB\xcf\x01\n\"com.buf.validate.conformance.casesB\rMessagesProtoP\x01\xa2\x02\x04\x42VCC\xaa\x02\x1e\x42uf.Validate.Conformance.Cases\xca\x02\x1e\x42uf\\Validate\\Conformance\\Cases\xe2\x02*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\xea\x02!Buf::Validate::Conformance::Casesb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n-buf/validate/conformance/cases/messages.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x38\x62uf/validate/conformance/cases/other_package/embed.proto\x1a\x1b\x62uf/validate/validate.proto\"l\n\x07TestMsg\x12 \n\x05\x63onst\x18\x01 \x01(\tB\n\xbaH\x07r\x05\n\x03\x66ooR\x05\x63onst\x12?\n\x06nested\x18\x02 \x01(\x0b\x32\'.buf.validate.conformance.cases.TestMsgR\x06nested\"_\n\x0bMessageNone\x12\x45\n\x03val\x18\x01 \x01(\x0b\x32\x33.buf.validate.conformance.cases.MessageNone.NoneMsgR\x03val\x1a\t\n\x07NoneMsg\"D\n\x07Message\x12\x39\n\x03val\x18\x01 \x01(\x0b\x32\'.buf.validate.conformance.cases.TestMsgR\x03val\"\\\n\x13MessageCrossPackage\x12\x45\n\x03val\x18\x01 \x01(\x0b\x32\x33.buf.validate.conformance.cases.other_package.EmbedR\x03val\"P\n\x0bMessageSkip\x12\x41\n\x03val\x18\x01 \x01(\x0b\x32\'.buf.validate.conformance.cases.TestMsgB\x06\xbaH\x03\xd8\x01\x03R\x03val\"T\n\x0fMessageRequired\x12\x41\n\x03val\x18\x01 \x01(\x0b\x32\'.buf.validate.conformance.cases.TestMsgB\x06\xbaH\x03\xc8\x01\x01R\x03val\"l\n\x1aMessageRequiredButOptional\x12\x46\n\x03val\x18\x01 \x01(\x0b\x32\'.buf.validate.conformance.cases.TestMsgB\x06\xbaH\x03\xc8\x01\x01H\x00R\x03val\x88\x01\x01\x42\x06\n\x04_val\"i\n\x14MessageRequiredOneof\x12\x43\n\x03val\x18\x01 \x01(\x0b\x32\'.buf.validate.conformance.cases.TestMsgB\x06\xbaH\x03\xc8\x01\x01H\x00R\x03valB\x0c\n\x03one\x12\x05\xbaH\x02\x08\x01\"\x15\n\x13MessageWith3dInside\"g\n\x17MessageOneofSingleField\x12\x1b\n\tstr_field\x18\x01 \x01(\tR\x08strField\x12\x1d\n\nbool_field\x18\x02 \x01(\x08R\tboolField:\x10\xbaH\r\"\x0b\n\tstr_field\"q\n\x1fMessageOneofSingleFieldRequired\x12\x1b\n\tstr_field\x18\x01 \x01(\tR\x08strField\x12\x1d\n\nbool_field\x18\x02 \x01(\x08R\tboolField:\x12\xbaH\x0f\"\r\n\tstr_field\x10\x01\"v\n\x1aMessageOneofMultipleFields\x12\x1b\n\tstr_field\x18\x01 \x01(\tR\x08strField\x12\x1d\n\nbool_field\x18\x02 \x01(\x08R\tboolField:\x1c\xbaH\x19\"\x17\n\tstr_field\n\nbool_field\"\x80\x01\n\"MessageOneofMultipleFieldsRequired\x12\x1b\n\tstr_field\x18\x01 \x01(\tR\x08strField\x12\x1d\n\nbool_field\x18\x02 \x01(\x08R\tboolField:\x1e\xbaH\x1b\"\x19\n\tstr_field\n\nbool_field\x10\x01\"\xb5\x01\n MessageOneofMultipleSharedFields\x12\x1b\n\tstr_field\x18\x01 \x01(\tR\x08strField\x12\x1d\n\nbool_field\x18\x02 \x01(\x08R\tboolField\x12\x1b\n\tint_field\x18\x03 \x01(\x05R\x08intField:8\xbaH5\"\x19\n\tstr_field\n\nbool_field\x10\x01\"\x18\n\tstr_field\n\tint_field\x10\x01\"G\n\x1cMessageOneofUnknownFieldName\x12\x1b\n\tstr_field\x18\x01 \x01(\tR\x08strField:\n\xbaH\x07\"\x05\n\x03xxx\"\x81\x01\n\x1aMessageOneofDuplicateField\x12\x1b\n\tstr_field\x18\x01 \x01(\tR\x08strField\x12\x1d\n\nbool_field\x18\x02 \x01(\x08R\tboolField:\'\xbaH$\"\"\n\tstr_field\n\nbool_field\n\tstr_field\"[\n\x16MessageOneofZeroFields\x12\x1b\n\tstr_field\x18\x01 \x01(\tR\x08strField\x12\x1d\n\nbool_field\x18\x02 \x01(\x08R\tboolField:\x05\xbaH\x02\"\x00\"h\n\x19MessageOneofUnsatisfiable\x12\x0c\n\x01\x61\x18\x01 \x01(\x08R\x01\x61\x12\x0c\n\x01\x62\x18\x02 \x01(\x08R\x01\x62\x12\x0c\n\x01\x63\x18\x03 \x01(\x08R\x01\x63:!\xbaH\x1e\"\x08\n\x01\x61\n\x01\x62\x10\x01\"\x08\n\x01\x62\n\x01\x63\x10\x01\"\x08\n\x01\x61\n\x01\x63\x10\x01\"\x82\x01\n\x1dMessageOneofIgnoreUnpopulated\x12\x1b\n\tstr_field\x18\x01 \x01(\tR\x08strField\x12&\n\nbool_field\x18\x02 \x01(\x08\x42\x07\xbaH\x04j\x02\x08\x01R\tboolField:\x1c\xbaH\x19\"\x17\n\tstr_field\n\nbool_field\"\x8c\x01\n%MessageOneofIgnoreUnpopulatedRequired\x12\x1b\n\tstr_field\x18\x01 \x01(\tR\x08strField\x12&\n\nbool_field\x18\x02 \x01(\x08\x42\x07\xbaH\x04j\x02\x08\x01R\tboolField:\x1e\xbaH\x1b\"\x19\n\tstr_field\n\nbool_field\x10\x01\"\xa7\x01\n\x1aMessageOneofIgnoreOverride\x12L\n\tmsg_field\x18\x01 \x01(\x0b\x32\'.buf.validate.conformance.cases.TestMsgB\x06\xbaH\x03\xd8\x01\x03R\x08msgField\x12\x1d\n\nbool_field\x18\x02 \x01(\x08R\tboolField:\x1c\xbaH\x19\"\x17\n\tmsg_field\n\nbool_fieldb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'buf.validate.conformance.cases.messages_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\"com.buf.validate.conformance.casesB\rMessagesProtoP\001\242\002\004BVCC\252\002\036Buf.Validate.Conformance.Cases\312\002\036Buf\\Validate\\Conformance\\Cases\342\002*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\352\002!Buf::Validate::Conformance::Cases' + DESCRIPTOR._loaded_options = None _globals['_TESTMSG'].fields_by_name['const']._loaded_options = None _globals['_TESTMSG'].fields_by_name['const']._serialized_options = b'\272H\007r\005\n\003foo' _globals['_MESSAGESKIP'].fields_by_name['val']._loaded_options = None diff --git a/packages/protovalidate-proto/src/buf/validate/conformance/cases/numbers_pb2.py b/packages/protovalidate-proto/src/buf/validate/conformance/cases/numbers_pb2.py index 47f4149e..af685a0c 100644 --- a/packages/protovalidate-proto/src/buf/validate/conformance/cases/numbers_pb2.py +++ b/packages/protovalidate-proto/src/buf/validate/conformance/cases/numbers_pb2.py @@ -29,14 +29,13 @@ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n,buf/validate/conformance/cases/numbers.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"\x1d\n\tFloatNone\x12\x10\n\x03val\x18\x01 \x01(\x02R\x03val\"*\n\nFloatConst\x12\x1c\n\x03val\x18\x01 \x01(\x02\x42\n\xbaH\x07\n\x05\r\xa4p\x9d?R\x03val\",\n\x07\x46loatIn\x12!\n\x03val\x18\x01 \x01(\x02\x42\x0f\xbaH\x0c\n\n5\x85\xeb\x91@5\xe1z\xfc@R\x03val\"*\n\nFloatNotIn\x12\x1c\n\x03val\x18\x01 \x01(\x02\x42\n\xbaH\x07\n\x05=\x00\x00\x00\x00R\x03val\"\'\n\x07\x46loatLT\x12\x1c\n\x03val\x18\x01 \x01(\x02\x42\n\xbaH\x07\n\x05\x15\x00\x00\x00\x00R\x03val\"(\n\x08\x46loatLTE\x12\x1c\n\x03val\x18\x01 \x01(\x02\x42\n\xbaH\x07\n\x05\x1d\x00\x00\x80\x42R\x03val\"\'\n\x07\x46loatGT\x12\x1c\n\x03val\x18\x01 \x01(\x02\x42\n\xbaH\x07\n\x05%\x00\x00\x80\x41R\x03val\"(\n\x08\x46loatGTE\x12\x1c\n\x03val\x18\x01 \x01(\x02\x42\n\xbaH\x07\n\x05-\x00\x00\x00\x41R\x03val\".\n\tFloatGTLT\x12!\n\x03val\x18\x01 \x01(\x02\x42\x0f\xbaH\x0c\n\n\x15\x00\x00 A%\x00\x00\x00\x00R\x03val\"0\n\x0b\x46loatExLTGT\x12!\n\x03val\x18\x01 \x01(\x02\x42\x0f\xbaH\x0c\n\n\x15\x00\x00\x00\x00%\x00\x00 AR\x03val\"0\n\x0b\x46loatGTELTE\x12!\n\x03val\x18\x01 \x01(\x02\x42\x0f\xbaH\x0c\n\n\x1d\x00\x00\x80\x43-\x00\x00\x00\x43R\x03val\"2\n\rFloatExGTELTE\x12!\n\x03val\x18\x01 \x01(\x02\x42\x0f\xbaH\x0c\n\n\x1d\x00\x00\x00\x43-\x00\x00\x80\x43R\x03val\"(\n\x0b\x46loatFinite\x12\x19\n\x03val\x18\x01 \x01(\x02\x42\x07\xbaH\x04\n\x02@\x01R\x03val\"+\n\x0e\x46loatNotFinite\x12\x19\n\x03val\x18\x01 \x01(\x02\x42\x07\xbaH\x04\n\x02@\x00R\x03val\"3\n\x0b\x46loatIgnore\x12$\n\x03val\x18\x01 \x01(\x02\x42\x12\xbaH\x0f\n\n\x1d\x00\x00\x80\x43-\x00\x00\x00\x43\xd8\x01\x01R\x03val\"6\n\x12\x46loatIncorrectType\x12 \n\x03val\x18\x01 \x01(\x02\x42\x0e\xbaH\x0b\x12\t!\x00\x00\x00\x00\x00\x00\x00\x00R\x03val\",\n\x0c\x46loatExample\x12\x1c\n\x03val\x18\x01 \x01(\x02\x42\n\xbaH\x07\n\x05M\x00\x00\x00\x41R\x03val\"\x1e\n\nDoubleNone\x12\x10\n\x03val\x18\x01 \x01(\x01R\x03val\"/\n\x0b\x44oubleConst\x12 \n\x03val\x18\x01 \x01(\x01\x42\x0e\xbaH\x0b\x12\t\t\xaeG\xe1z\x14\xae\xf3?R\x03val\"5\n\x08\x44oubleIn\x12)\n\x03val\x18\x01 \x01(\x01\x42\x17\xbaH\x14\x12\x12\x31=\n\xd7\xa3p=\x12@1\x8f\xc2\xf5(\\\x8f\x1f@R\x03val\"/\n\x0b\x44oubleNotIn\x12 \n\x03val\x18\x01 \x01(\x01\x42\x0e\xbaH\x0b\x12\t9\x00\x00\x00\x00\x00\x00\x00\x00R\x03val\",\n\x08\x44oubleLT\x12 \n\x03val\x18\x01 \x01(\x01\x42\x0e\xbaH\x0b\x12\t\x11\x00\x00\x00\x00\x00\x00\x00\x00R\x03val\"-\n\tDoubleLTE\x12 \n\x03val\x18\x01 \x01(\x01\x42\x0e\xbaH\x0b\x12\t\x19\x00\x00\x00\x00\x00\x00P@R\x03val\",\n\x08\x44oubleGT\x12 \n\x03val\x18\x01 \x01(\x01\x42\x0e\xbaH\x0b\x12\t!\x00\x00\x00\x00\x00\x00\x30@R\x03val\"-\n\tDoubleGTE\x12 \n\x03val\x18\x01 \x01(\x01\x42\x0e\xbaH\x0b\x12\t)\x00\x00\x00\x00\x00\x00 @R\x03val\"7\n\nDoubleGTLT\x12)\n\x03val\x18\x01 \x01(\x01\x42\x17\xbaH\x14\x12\x12\x11\x00\x00\x00\x00\x00\x00$@!\x00\x00\x00\x00\x00\x00\x00\x00R\x03val\"9\n\x0c\x44oubleExLTGT\x12)\n\x03val\x18\x01 \x01(\x01\x42\x17\xbaH\x14\x12\x12\x11\x00\x00\x00\x00\x00\x00\x00\x00!\x00\x00\x00\x00\x00\x00$@R\x03val\"9\n\x0c\x44oubleGTELTE\x12)\n\x03val\x18\x01 \x01(\x01\x42\x17\xbaH\x14\x12\x12\x19\x00\x00\x00\x00\x00\x00p@)\x00\x00\x00\x00\x00\x00`@R\x03val\";\n\x0e\x44oubleExGTELTE\x12)\n\x03val\x18\x01 \x01(\x01\x42\x17\xbaH\x14\x12\x12\x19\x00\x00\x00\x00\x00\x00`@)\x00\x00\x00\x00\x00\x00p@R\x03val\")\n\x0c\x44oubleFinite\x12\x19\n\x03val\x18\x01 \x01(\x01\x42\x07\xbaH\x04\x12\x02@\x01R\x03val\",\n\x0f\x44oubleNotFinite\x12\x19\n\x03val\x18\x01 \x01(\x01\x42\x07\xbaH\x04\x12\x02@\x00R\x03val\"<\n\x0c\x44oubleIgnore\x12,\n\x03val\x18\x01 \x01(\x01\x42\x1a\xbaH\x17\x12\x12\x19\x00\x00\x00\x00\x00\x00p@)\x00\x00\x00\x00\x00\x00`@\xd8\x01\x01R\x03val\"3\n\x13\x44oubleIncorrectType\x12\x1c\n\x03val\x18\x01 \x01(\x01\x42\n\xbaH\x07\n\x05%\x00\x00\x00\x00R\x03val\"1\n\rDoubleExample\x12 \n\x03val\x18\x01 \x01(\x01\x42\x0e\xbaH\x0b\x12\tI\x00\x00\x00\x00\x00\x00\x00\x00R\x03val\"\x1d\n\tInt32None\x12\x10\n\x03val\x18\x01 \x01(\x05R\x03val\"\'\n\nInt32Const\x12\x19\n\x03val\x18\x01 \x01(\x05\x42\x07\xbaH\x04\x1a\x02\x08\x01R\x03val\"&\n\x07Int32In\x12\x1b\n\x03val\x18\x01 \x01(\x05\x42\t\xbaH\x06\x1a\x04\x30\x02\x30\x03R\x03val\"\'\n\nInt32NotIn\x12\x19\n\x03val\x18\x01 \x01(\x05\x42\x07\xbaH\x04\x1a\x02\x38\x00R\x03val\"$\n\x07Int32LT\x12\x19\n\x03val\x18\x01 \x01(\x05\x42\x07\xbaH\x04\x1a\x02\x10\x00R\x03val\"%\n\x08Int32LTE\x12\x19\n\x03val\x18\x01 \x01(\x05\x42\x07\xbaH\x04\x1a\x02\x18@R\x03val\"$\n\x07Int32GT\x12\x19\n\x03val\x18\x01 \x01(\x05\x42\x07\xbaH\x04\x1a\x02 \x10R\x03val\"%\n\x08Int32GTE\x12\x19\n\x03val\x18\x01 \x01(\x05\x42\x07\xbaH\x04\x1a\x02(\x08R\x03val\"(\n\tInt32GTLT\x12\x1b\n\x03val\x18\x01 \x01(\x05\x42\t\xbaH\x06\x1a\x04\x10\n \x00R\x03val\"*\n\x0bInt32ExLTGT\x12\x1b\n\x03val\x18\x01 \x01(\x05\x42\t\xbaH\x06\x1a\x04\x10\x00 \nR\x03val\",\n\x0bInt32GTELTE\x12\x1d\n\x03val\x18\x01 \x01(\x05\x42\x0b\xbaH\x08\x1a\x06\x18\x80\x02(\x80\x01R\x03val\".\n\rInt32ExGTELTE\x12\x1d\n\x03val\x18\x01 \x01(\x05\x42\x0b\xbaH\x08\x1a\x06\x18\x80\x01(\x80\x02R\x03val\"/\n\x0bInt32Ignore\x12 \n\x03val\x18\x01 \x01(\x05\x42\x0e\xbaH\x0b\x1a\x06\x18\x80\x02(\x80\x01\xd8\x01\x01R\x03val\"2\n\x12Int32IncorrectType\x12\x1c\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\n\x05%\x00\x00\x00\x00R\x03val\")\n\x0cInt32Example\x12\x19\n\x03val\x18\x01 \x01(\x05\x42\x07\xbaH\x04\x1a\x02@\nR\x03val\"\x1d\n\tInt64None\x12\x10\n\x03val\x18\x01 \x01(\x03R\x03val\"\'\n\nInt64Const\x12\x19\n\x03val\x18\x01 \x01(\x03\x42\x07\xbaH\x04\"\x02\x08\x01R\x03val\"&\n\x07Int64In\x12\x1b\n\x03val\x18\x01 \x01(\x03\x42\t\xbaH\x06\"\x04\x30\x02\x30\x03R\x03val\"\'\n\nInt64NotIn\x12\x19\n\x03val\x18\x01 \x01(\x03\x42\x07\xbaH\x04\"\x02\x38\x00R\x03val\"$\n\x07Int64LT\x12\x19\n\x03val\x18\x01 \x01(\x03\x42\x07\xbaH\x04\"\x02\x10\x00R\x03val\"%\n\x08Int64LTE\x12\x19\n\x03val\x18\x01 \x01(\x03\x42\x07\xbaH\x04\"\x02\x18@R\x03val\"$\n\x07Int64GT\x12\x19\n\x03val\x18\x01 \x01(\x03\x42\x07\xbaH\x04\"\x02 \x10R\x03val\"%\n\x08Int64GTE\x12\x19\n\x03val\x18\x01 \x01(\x03\x42\x07\xbaH\x04\"\x02(\x08R\x03val\"(\n\tInt64GTLT\x12\x1b\n\x03val\x18\x01 \x01(\x03\x42\t\xbaH\x06\"\x04\x10\n \x00R\x03val\"*\n\x0bInt64ExLTGT\x12\x1b\n\x03val\x18\x01 \x01(\x03\x42\t\xbaH\x06\"\x04\x10\x00 \nR\x03val\",\n\x0bInt64GTELTE\x12\x1d\n\x03val\x18\x01 \x01(\x03\x42\x0b\xbaH\x08\"\x06\x18\x80\x02(\x80\x01R\x03val\".\n\rInt64ExGTELTE\x12\x1d\n\x03val\x18\x01 \x01(\x03\x42\x0b\xbaH\x08\"\x06\x18\x80\x01(\x80\x02R\x03val\"/\n\x0bInt64Ignore\x12 \n\x03val\x18\x01 \x01(\x03\x42\x0e\xbaH\x0b\"\x06\x18\x80\x02(\x80\x01\xd8\x01\x01R\x03val\"\x86\x04\n\rInt64BigRules\x12\"\n\x06lt_pos\x18\x01 \x01(\x03\x42\x0b\xbaH\x08\"\x06\x10\xa6\xdd\x87\xa4\x14R\x05ltPos\x12\'\n\x06lt_neg\x18\x02 \x01(\x03\x42\x10\xbaH\r\"\x0b\x10\xda\xa2\xf8\xdb\xeb\xff\xff\xff\xff\x01R\x05ltNeg\x12\"\n\x06gt_pos\x18\x03 \x01(\x03\x42\x0b\xbaH\x08\"\x06 \xa6\xdd\x87\xa4\x14R\x05gtPos\x12\'\n\x06gt_neg\x18\x04 \x01(\x03\x42\x10\xbaH\r\"\x0b \xda\xa2\xf8\xdb\xeb\xff\xff\xff\xff\x01R\x05gtNeg\x12$\n\x07lte_pos\x18\x05 \x01(\x03\x42\x0b\xbaH\x08\"\x06\x18\xa6\xdd\x87\xa4\x14R\x06ltePos\x12)\n\x07lte_neg\x18\x06 \x01(\x03\x42\x10\xbaH\r\"\x0b\x18\xda\xa2\xf8\xdb\xeb\xff\xff\xff\xff\x01R\x06lteNeg\x12$\n\x07gte_pos\x18\x07 \x01(\x03\x42\x0b\xbaH\x08\"\x06(\xa6\xdd\x87\xa4\x14R\x06gtePos\x12)\n\x07gte_neg\x18\x08 \x01(\x03\x42\x10\xbaH\r\"\x0b(\xda\xa2\xf8\xdb\xeb\xff\xff\xff\xff\x01R\x06gteNeg\x12.\n\x0c\x63onstant_pos\x18\t \x01(\x03\x42\x0b\xbaH\x08\"\x06\x08\xa6\xdd\x87\xa4\x14R\x0b\x63onstantPos\x12\x33\n\x0c\x63onstant_neg\x18\n \x01(\x03\x42\x10\xbaH\r\"\x0b\x08\xda\xa2\xf8\xdb\xeb\xff\xff\xff\xff\x01R\x0b\x63onstantNeg\x12&\n\x02in\x18\x0b \x01(\x03\x42\x16\xbaH\x13\"\x11\x30\xa6\xdd\x87\xa4\x14\x30\xda\xa2\xf8\xdb\xeb\xff\xff\xff\xff\x01R\x02in\x12,\n\x05notin\x18\x0c \x01(\x03\x42\x16\xbaH\x13\"\x11\x38\xa6\xdd\x87\xa4\x14\x38\xda\xa2\xf8\xdb\xeb\xff\xff\xff\xff\x01R\x05notin\"2\n\x12Int64IncorrectType\x12\x1c\n\x03val\x18\x01 \x01(\x03\x42\n\xbaH\x07\n\x05%\x00\x00\x00\x00R\x03val\")\n\x0cInt64Example\x12\x19\n\x03val\x18\x01 \x01(\x03\x42\x07\xbaH\x04\"\x02H\nR\x03val\"\x1e\n\nUInt32None\x12\x10\n\x03val\x18\x01 \x01(\rR\x03val\"(\n\x0bUInt32Const\x12\x19\n\x03val\x18\x01 \x01(\rB\x07\xbaH\x04*\x02\x08\x01R\x03val\"\'\n\x08UInt32In\x12\x1b\n\x03val\x18\x01 \x01(\rB\t\xbaH\x06*\x04\x30\x02\x30\x03R\x03val\"(\n\x0bUInt32NotIn\x12\x19\n\x03val\x18\x01 \x01(\rB\x07\xbaH\x04*\x02\x38\x00R\x03val\"%\n\x08UInt32LT\x12\x19\n\x03val\x18\x01 \x01(\rB\x07\xbaH\x04*\x02\x10\x05R\x03val\"&\n\tUInt32LTE\x12\x19\n\x03val\x18\x01 \x01(\rB\x07\xbaH\x04*\x02\x18@R\x03val\"%\n\x08UInt32GT\x12\x19\n\x03val\x18\x01 \x01(\rB\x07\xbaH\x04*\x02 \x10R\x03val\"&\n\tUInt32GTE\x12\x19\n\x03val\x18\x01 \x01(\rB\x07\xbaH\x04*\x02(\x08R\x03val\")\n\nUInt32GTLT\x12\x1b\n\x03val\x18\x01 \x01(\rB\t\xbaH\x06*\x04\x10\n \x05R\x03val\"+\n\x0cUInt32ExLTGT\x12\x1b\n\x03val\x18\x01 \x01(\rB\t\xbaH\x06*\x04\x10\x05 \nR\x03val\"-\n\x0cUInt32GTELTE\x12\x1d\n\x03val\x18\x01 \x01(\rB\x0b\xbaH\x08*\x06\x18\x80\x02(\x80\x01R\x03val\"/\n\x0eUInt32ExGTELTE\x12\x1d\n\x03val\x18\x01 \x01(\rB\x0b\xbaH\x08*\x06\x18\x80\x01(\x80\x02R\x03val\"0\n\x0cUInt32Ignore\x12 \n\x03val\x18\x01 \x01(\rB\x0e\xbaH\x0b*\x06\x18\x80\x02(\x80\x01\xd8\x01\x01R\x03val\"3\n\x13UInt32IncorrectType\x12\x1c\n\x03val\x18\x01 \x01(\rB\n\xbaH\x07\n\x05%\x00\x00\x00\x00R\x03val\"*\n\rUInt32Example\x12\x19\n\x03val\x18\x01 \x01(\rB\x07\xbaH\x04*\x02@\x00R\x03val\"\x1e\n\nUInt64None\x12\x10\n\x03val\x18\x01 \x01(\x04R\x03val\"(\n\x0bUInt64Const\x12\x19\n\x03val\x18\x01 \x01(\x04\x42\x07\xbaH\x04\x32\x02\x08\x01R\x03val\"\'\n\x08UInt64In\x12\x1b\n\x03val\x18\x01 \x01(\x04\x42\t\xbaH\x06\x32\x04\x30\x02\x30\x03R\x03val\"(\n\x0bUInt64NotIn\x12\x19\n\x03val\x18\x01 \x01(\x04\x42\x07\xbaH\x04\x32\x02\x38\x00R\x03val\"%\n\x08UInt64LT\x12\x19\n\x03val\x18\x01 \x01(\x04\x42\x07\xbaH\x04\x32\x02\x10\x05R\x03val\"&\n\tUInt64LTE\x12\x19\n\x03val\x18\x01 \x01(\x04\x42\x07\xbaH\x04\x32\x02\x18@R\x03val\"%\n\x08UInt64GT\x12\x19\n\x03val\x18\x01 \x01(\x04\x42\x07\xbaH\x04\x32\x02 \x10R\x03val\"&\n\tUInt64GTE\x12\x19\n\x03val\x18\x01 \x01(\x04\x42\x07\xbaH\x04\x32\x02(\x08R\x03val\")\n\nUInt64GTLT\x12\x1b\n\x03val\x18\x01 \x01(\x04\x42\t\xbaH\x06\x32\x04\x10\n \x05R\x03val\"+\n\x0cUInt64ExLTGT\x12\x1b\n\x03val\x18\x01 \x01(\x04\x42\t\xbaH\x06\x32\x04\x10\x05 \nR\x03val\"-\n\x0cUInt64GTELTE\x12\x1d\n\x03val\x18\x01 \x01(\x04\x42\x0b\xbaH\x08\x32\x06\x18\x80\x02(\x80\x01R\x03val\"/\n\x0eUInt64ExGTELTE\x12\x1d\n\x03val\x18\x01 \x01(\x04\x42\x0b\xbaH\x08\x32\x06\x18\x80\x01(\x80\x02R\x03val\"0\n\x0cUInt64Ignore\x12 \n\x03val\x18\x01 \x01(\x04\x42\x0e\xbaH\x0b\x32\x06\x18\x80\x02(\x80\x01\xd8\x01\x01R\x03val\"3\n\x13UInt64IncorrectType\x12\x1c\n\x03val\x18\x01 \x01(\x04\x42\n\xbaH\x07\n\x05%\x00\x00\x00\x00R\x03val\"*\n\rUInt64Example\x12\x19\n\x03val\x18\x01 \x01(\x04\x42\x07\xbaH\x04\x32\x02@\x00R\x03val\"\x1e\n\nSInt32None\x12\x10\n\x03val\x18\x01 \x01(\x11R\x03val\"(\n\x0bSInt32Const\x12\x19\n\x03val\x18\x01 \x01(\x11\x42\x07\xbaH\x04:\x02\x08\x02R\x03val\"\'\n\x08SInt32In\x12\x1b\n\x03val\x18\x01 \x01(\x11\x42\t\xbaH\x06:\x04\x30\x04\x30\x06R\x03val\"(\n\x0bSInt32NotIn\x12\x19\n\x03val\x18\x01 \x01(\x11\x42\x07\xbaH\x04:\x02\x38\x00R\x03val\"%\n\x08SInt32LT\x12\x19\n\x03val\x18\x01 \x01(\x11\x42\x07\xbaH\x04:\x02\x10\x00R\x03val\"\'\n\tSInt32LTE\x12\x1a\n\x03val\x18\x01 \x01(\x11\x42\x08\xbaH\x05:\x03\x18\x80\x01R\x03val\"%\n\x08SInt32GT\x12\x19\n\x03val\x18\x01 \x01(\x11\x42\x07\xbaH\x04:\x02 R\x03val\"&\n\tSInt32GTE\x12\x19\n\x03val\x18\x01 \x01(\x11\x42\x07\xbaH\x04:\x02(\x10R\x03val\")\n\nSInt32GTLT\x12\x1b\n\x03val\x18\x01 \x01(\x11\x42\t\xbaH\x06:\x04\x10\x14 \x00R\x03val\"+\n\x0cSInt32ExLTGT\x12\x1b\n\x03val\x18\x01 \x01(\x11\x42\t\xbaH\x06:\x04\x10\x00 \x14R\x03val\"-\n\x0cSInt32GTELTE\x12\x1d\n\x03val\x18\x01 \x01(\x11\x42\x0b\xbaH\x08:\x06\x18\x80\x04(\x80\x02R\x03val\"/\n\x0eSInt32ExGTELTE\x12\x1d\n\x03val\x18\x01 \x01(\x11\x42\x0b\xbaH\x08:\x06\x18\x80\x02(\x80\x04R\x03val\"0\n\x0cSInt32Ignore\x12 \n\x03val\x18\x01 \x01(\x11\x42\x0e\xbaH\x0b:\x06\x18\x80\x04(\x80\x02\xd8\x01\x01R\x03val\"3\n\x13SInt32IncorrectType\x12\x1c\n\x03val\x18\x01 \x01(\x11\x42\n\xbaH\x07\n\x05%\x00\x00\x00\x00R\x03val\"*\n\rSInt32Example\x12\x19\n\x03val\x18\x01 \x01(\x11\x42\x07\xbaH\x04:\x02@\x00R\x03val\"\x1e\n\nSInt64None\x12\x10\n\x03val\x18\x01 \x01(\x12R\x03val\"(\n\x0bSInt64Const\x12\x19\n\x03val\x18\x01 \x01(\x12\x42\x07\xbaH\x04\x42\x02\x08\x02R\x03val\"\'\n\x08SInt64In\x12\x1b\n\x03val\x18\x01 \x01(\x12\x42\t\xbaH\x06\x42\x04\x30\x04\x30\x06R\x03val\"(\n\x0bSInt64NotIn\x12\x19\n\x03val\x18\x01 \x01(\x12\x42\x07\xbaH\x04\x42\x02\x38\x00R\x03val\"%\n\x08SInt64LT\x12\x19\n\x03val\x18\x01 \x01(\x12\x42\x07\xbaH\x04\x42\x02\x10\x00R\x03val\"\'\n\tSInt64LTE\x12\x1a\n\x03val\x18\x01 \x01(\x12\x42\x08\xbaH\x05\x42\x03\x18\x80\x01R\x03val\"%\n\x08SInt64GT\x12\x19\n\x03val\x18\x01 \x01(\x12\x42\x07\xbaH\x04\x42\x02 R\x03val\"&\n\tSInt64GTE\x12\x19\n\x03val\x18\x01 \x01(\x12\x42\x07\xbaH\x04\x42\x02(\x10R\x03val\")\n\nSInt64GTLT\x12\x1b\n\x03val\x18\x01 \x01(\x12\x42\t\xbaH\x06\x42\x04\x10\x14 \x00R\x03val\"+\n\x0cSInt64ExLTGT\x12\x1b\n\x03val\x18\x01 \x01(\x12\x42\t\xbaH\x06\x42\x04\x10\x00 \x14R\x03val\"-\n\x0cSInt64GTELTE\x12\x1d\n\x03val\x18\x01 \x01(\x12\x42\x0b\xbaH\x08\x42\x06\x18\x80\x04(\x80\x02R\x03val\"/\n\x0eSInt64ExGTELTE\x12\x1d\n\x03val\x18\x01 \x01(\x12\x42\x0b\xbaH\x08\x42\x06\x18\x80\x02(\x80\x04R\x03val\"0\n\x0cSInt64Ignore\x12 \n\x03val\x18\x01 \x01(\x12\x42\x0e\xbaH\x0b\x42\x06\x18\x80\x04(\x80\x02\xd8\x01\x01R\x03val\"3\n\x13SInt64IncorrectType\x12\x1c\n\x03val\x18\x01 \x01(\x12\x42\n\xbaH\x07\n\x05%\x00\x00\x00\x00R\x03val\"*\n\rSInt64Example\x12\x19\n\x03val\x18\x01 \x01(\x12\x42\x07\xbaH\x04\x42\x02@\x00R\x03val\"\x1f\n\x0b\x46ixed32None\x12\x10\n\x03val\x18\x01 \x01(\x07R\x03val\",\n\x0c\x46ixed32Const\x12\x1c\n\x03val\x18\x01 \x01(\x07\x42\n\xbaH\x07J\x05\r\x01\x00\x00\x00R\x03val\".\n\tFixed32In\x12!\n\x03val\x18\x01 \x01(\x07\x42\x0f\xbaH\x0cJ\n5\x02\x00\x00\x00\x35\x03\x00\x00\x00R\x03val\",\n\x0c\x46ixed32NotIn\x12\x1c\n\x03val\x18\x01 \x01(\x07\x42\n\xbaH\x07J\x05=\x00\x00\x00\x00R\x03val\")\n\tFixed32LT\x12\x1c\n\x03val\x18\x01 \x01(\x07\x42\n\xbaH\x07J\x05\x15\x05\x00\x00\x00R\x03val\"*\n\nFixed32LTE\x12\x1c\n\x03val\x18\x01 \x01(\x07\x42\n\xbaH\x07J\x05\x1d@\x00\x00\x00R\x03val\")\n\tFixed32GT\x12\x1c\n\x03val\x18\x01 \x01(\x07\x42\n\xbaH\x07J\x05%\x10\x00\x00\x00R\x03val\"*\n\nFixed32GTE\x12\x1c\n\x03val\x18\x01 \x01(\x07\x42\n\xbaH\x07J\x05-\x08\x00\x00\x00R\x03val\"0\n\x0b\x46ixed32GTLT\x12!\n\x03val\x18\x01 \x01(\x07\x42\x0f\xbaH\x0cJ\n\x15\n\x00\x00\x00%\x05\x00\x00\x00R\x03val\"2\n\rFixed32ExLTGT\x12!\n\x03val\x18\x01 \x01(\x07\x42\x0f\xbaH\x0cJ\n\x15\x05\x00\x00\x00%\n\x00\x00\x00R\x03val\"2\n\rFixed32GTELTE\x12!\n\x03val\x18\x01 \x01(\x07\x42\x0f\xbaH\x0cJ\n\x1d\x00\x01\x00\x00-\x80\x00\x00\x00R\x03val\"4\n\x0f\x46ixed32ExGTELTE\x12!\n\x03val\x18\x01 \x01(\x07\x42\x0f\xbaH\x0cJ\n\x1d\x80\x00\x00\x00-\x00\x01\x00\x00R\x03val\"5\n\rFixed32Ignore\x12$\n\x03val\x18\x01 \x01(\x07\x42\x12\xbaH\x0fJ\n\x1d\x00\x01\x00\x00-\x80\x00\x00\x00\xd8\x01\x01R\x03val\"4\n\x14\x46ixed32IncorrectType\x12\x1c\n\x03val\x18\x01 \x01(\x07\x42\n\xbaH\x07\n\x05%\x00\x00\x00\x00R\x03val\".\n\x0e\x46ixed32Example\x12\x1c\n\x03val\x18\x01 \x01(\x07\x42\n\xbaH\x07J\x05\x45\x00\x00\x00\x00R\x03val\"\x1f\n\x0b\x46ixed64None\x12\x10\n\x03val\x18\x01 \x01(\x06R\x03val\"0\n\x0c\x46ixed64Const\x12 \n\x03val\x18\x01 \x01(\x06\x42\x0e\xbaH\x0bR\t\t\x01\x00\x00\x00\x00\x00\x00\x00R\x03val\"6\n\tFixed64In\x12)\n\x03val\x18\x01 \x01(\x06\x42\x17\xbaH\x14R\x12\x31\x02\x00\x00\x00\x00\x00\x00\x00\x31\x03\x00\x00\x00\x00\x00\x00\x00R\x03val\"0\n\x0c\x46ixed64NotIn\x12 \n\x03val\x18\x01 \x01(\x06\x42\x0e\xbaH\x0bR\t9\x00\x00\x00\x00\x00\x00\x00\x00R\x03val\"-\n\tFixed64LT\x12 \n\x03val\x18\x01 \x01(\x06\x42\x0e\xbaH\x0bR\t\x11\x05\x00\x00\x00\x00\x00\x00\x00R\x03val\".\n\nFixed64LTE\x12 \n\x03val\x18\x01 \x01(\x06\x42\x0e\xbaH\x0bR\t\x19@\x00\x00\x00\x00\x00\x00\x00R\x03val\"-\n\tFixed64GT\x12 \n\x03val\x18\x01 \x01(\x06\x42\x0e\xbaH\x0bR\t!\x10\x00\x00\x00\x00\x00\x00\x00R\x03val\".\n\nFixed64GTE\x12 \n\x03val\x18\x01 \x01(\x06\x42\x0e\xbaH\x0bR\t)\x08\x00\x00\x00\x00\x00\x00\x00R\x03val\"8\n\x0b\x46ixed64GTLT\x12)\n\x03val\x18\x01 \x01(\x06\x42\x17\xbaH\x14R\x12\x11\n\x00\x00\x00\x00\x00\x00\x00!\x05\x00\x00\x00\x00\x00\x00\x00R\x03val\":\n\rFixed64ExLTGT\x12)\n\x03val\x18\x01 \x01(\x06\x42\x17\xbaH\x14R\x12\x11\x05\x00\x00\x00\x00\x00\x00\x00!\n\x00\x00\x00\x00\x00\x00\x00R\x03val\":\n\rFixed64GTELTE\x12)\n\x03val\x18\x01 \x01(\x06\x42\x17\xbaH\x14R\x12\x19\x00\x01\x00\x00\x00\x00\x00\x00)\x80\x00\x00\x00\x00\x00\x00\x00R\x03val\"<\n\x0f\x46ixed64ExGTELTE\x12)\n\x03val\x18\x01 \x01(\x06\x42\x17\xbaH\x14R\x12\x19\x80\x00\x00\x00\x00\x00\x00\x00)\x00\x01\x00\x00\x00\x00\x00\x00R\x03val\"=\n\rFixed64Ignore\x12,\n\x03val\x18\x01 \x01(\x06\x42\x1a\xbaH\x17R\x12\x19\x00\x01\x00\x00\x00\x00\x00\x00)\x80\x00\x00\x00\x00\x00\x00\x00\xd8\x01\x01R\x03val\"4\n\x14\x46ixed64IncorrectType\x12\x1c\n\x03val\x18\x01 \x01(\x06\x42\n\xbaH\x07\n\x05%\x00\x00\x00\x00R\x03val\"2\n\x0e\x46ixed64Example\x12 \n\x03val\x18\x01 \x01(\x06\x42\x0e\xbaH\x0bR\tA\x00\x00\x00\x00\x00\x00\x00\x00R\x03val\" \n\x0cSFixed32None\x12\x10\n\x03val\x18\x01 \x01(\x0fR\x03val\"-\n\rSFixed32Const\x12\x1c\n\x03val\x18\x01 \x01(\x0f\x42\n\xbaH\x07Z\x05\r\x01\x00\x00\x00R\x03val\"/\n\nSFixed32In\x12!\n\x03val\x18\x01 \x01(\x0f\x42\x0f\xbaH\x0cZ\n5\x02\x00\x00\x00\x35\x03\x00\x00\x00R\x03val\"-\n\rSFixed32NotIn\x12\x1c\n\x03val\x18\x01 \x01(\x0f\x42\n\xbaH\x07Z\x05=\x00\x00\x00\x00R\x03val\"*\n\nSFixed32LT\x12\x1c\n\x03val\x18\x01 \x01(\x0f\x42\n\xbaH\x07Z\x05\x15\x00\x00\x00\x00R\x03val\"+\n\x0bSFixed32LTE\x12\x1c\n\x03val\x18\x01 \x01(\x0f\x42\n\xbaH\x07Z\x05\x1d@\x00\x00\x00R\x03val\"*\n\nSFixed32GT\x12\x1c\n\x03val\x18\x01 \x01(\x0f\x42\n\xbaH\x07Z\x05%\x10\x00\x00\x00R\x03val\"+\n\x0bSFixed32GTE\x12\x1c\n\x03val\x18\x01 \x01(\x0f\x42\n\xbaH\x07Z\x05-\x08\x00\x00\x00R\x03val\"1\n\x0cSFixed32GTLT\x12!\n\x03val\x18\x01 \x01(\x0f\x42\x0f\xbaH\x0cZ\n\x15\n\x00\x00\x00%\x00\x00\x00\x00R\x03val\"3\n\x0eSFixed32ExLTGT\x12!\n\x03val\x18\x01 \x01(\x0f\x42\x0f\xbaH\x0cZ\n\x15\x00\x00\x00\x00%\n\x00\x00\x00R\x03val\"3\n\x0eSFixed32GTELTE\x12!\n\x03val\x18\x01 \x01(\x0f\x42\x0f\xbaH\x0cZ\n\x1d\x00\x01\x00\x00-\x80\x00\x00\x00R\x03val\"5\n\x10SFixed32ExGTELTE\x12!\n\x03val\x18\x01 \x01(\x0f\x42\x0f\xbaH\x0cZ\n\x1d\x80\x00\x00\x00-\x00\x01\x00\x00R\x03val\"6\n\x0eSFixed32Ignore\x12$\n\x03val\x18\x01 \x01(\x0f\x42\x12\xbaH\x0fZ\n\x1d\x00\x01\x00\x00-\x80\x00\x00\x00\xd8\x01\x01R\x03val\"5\n\x15SFixed32IncorrectType\x12\x1c\n\x03val\x18\x01 \x01(\x0f\x42\n\xbaH\x07\n\x05%\x00\x00\x00\x00R\x03val\"/\n\x0fSFixed32Example\x12\x1c\n\x03val\x18\x01 \x01(\x0f\x42\n\xbaH\x07Z\x05\x45\x00\x00\x00\x00R\x03val\" \n\x0cSFixed64None\x12\x10\n\x03val\x18\x01 \x01(\x10R\x03val\"1\n\rSFixed64Const\x12 \n\x03val\x18\x01 \x01(\x10\x42\x0e\xbaH\x0b\x62\t\t\x01\x00\x00\x00\x00\x00\x00\x00R\x03val\"7\n\nSFixed64In\x12)\n\x03val\x18\x01 \x01(\x10\x42\x17\xbaH\x14\x62\x12\x31\x02\x00\x00\x00\x00\x00\x00\x00\x31\x03\x00\x00\x00\x00\x00\x00\x00R\x03val\"1\n\rSFixed64NotIn\x12 \n\x03val\x18\x01 \x01(\x10\x42\x0e\xbaH\x0b\x62\t9\x00\x00\x00\x00\x00\x00\x00\x00R\x03val\".\n\nSFixed64LT\x12 \n\x03val\x18\x01 \x01(\x10\x42\x0e\xbaH\x0b\x62\t\x11\x00\x00\x00\x00\x00\x00\x00\x00R\x03val\"/\n\x0bSFixed64LTE\x12 \n\x03val\x18\x01 \x01(\x10\x42\x0e\xbaH\x0b\x62\t\x19@\x00\x00\x00\x00\x00\x00\x00R\x03val\".\n\nSFixed64GT\x12 \n\x03val\x18\x01 \x01(\x10\x42\x0e\xbaH\x0b\x62\t!\x10\x00\x00\x00\x00\x00\x00\x00R\x03val\"/\n\x0bSFixed64GTE\x12 \n\x03val\x18\x01 \x01(\x10\x42\x0e\xbaH\x0b\x62\t)\x08\x00\x00\x00\x00\x00\x00\x00R\x03val\"9\n\x0cSFixed64GTLT\x12)\n\x03val\x18\x01 \x01(\x10\x42\x17\xbaH\x14\x62\x12\x11\n\x00\x00\x00\x00\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x00\x00R\x03val\";\n\x0eSFixed64ExLTGT\x12)\n\x03val\x18\x01 \x01(\x10\x42\x17\xbaH\x14\x62\x12\x11\x00\x00\x00\x00\x00\x00\x00\x00!\n\x00\x00\x00\x00\x00\x00\x00R\x03val\";\n\x0eSFixed64GTELTE\x12)\n\x03val\x18\x01 \x01(\x10\x42\x17\xbaH\x14\x62\x12\x19\x00\x01\x00\x00\x00\x00\x00\x00)\x80\x00\x00\x00\x00\x00\x00\x00R\x03val\"=\n\x10SFixed64ExGTELTE\x12)\n\x03val\x18\x01 \x01(\x10\x42\x17\xbaH\x14\x62\x12\x19\x80\x00\x00\x00\x00\x00\x00\x00)\x00\x01\x00\x00\x00\x00\x00\x00R\x03val\">\n\x0eSFixed64Ignore\x12,\n\x03val\x18\x01 \x01(\x10\x42\x1a\xbaH\x17\x62\x12\x19\x00\x01\x00\x00\x00\x00\x00\x00)\x80\x00\x00\x00\x00\x00\x00\x00\xd8\x01\x01R\x03val\"5\n\x15SFixed64IncorrectType\x12\x1c\n\x03val\x18\x01 \x01(\x10\x42\n\xbaH\x07\n\x05%\x00\x00\x00\x00R\x03val\"3\n\x0fSFixed64Example\x12 \n\x03val\x18\x01 \x01(\x10\x42\x0e\xbaH\x0b\x62\tA\x00\x00\x00\x00\x00\x00\x00\x00R\x03val\":\n\x10Int64LTEOptional\x12\x1e\n\x03val\x18\x01 \x01(\x03\x42\x07\xbaH\x04\"\x02\x18@H\x00R\x03val\x88\x01\x01\x42\x06\n\x04_valB\xce\x01\n\"com.buf.validate.conformance.casesB\x0cNumbersProtoP\x01\xa2\x02\x04\x42VCC\xaa\x02\x1e\x42uf.Validate.Conformance.Cases\xca\x02\x1e\x42uf\\Validate\\Conformance\\Cases\xe2\x02*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\xea\x02!Buf::Validate::Conformance::Casesb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n,buf/validate/conformance/cases/numbers.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"\x1d\n\tFloatNone\x12\x10\n\x03val\x18\x01 \x01(\x02R\x03val\"*\n\nFloatConst\x12\x1c\n\x03val\x18\x01 \x01(\x02\x42\n\xbaH\x07\n\x05\r\xa4p\x9d?R\x03val\",\n\x07\x46loatIn\x12!\n\x03val\x18\x01 \x01(\x02\x42\x0f\xbaH\x0c\n\n5\x85\xeb\x91@5\xe1z\xfc@R\x03val\"*\n\nFloatNotIn\x12\x1c\n\x03val\x18\x01 \x01(\x02\x42\n\xbaH\x07\n\x05=\x00\x00\x00\x00R\x03val\"\'\n\x07\x46loatLT\x12\x1c\n\x03val\x18\x01 \x01(\x02\x42\n\xbaH\x07\n\x05\x15\x00\x00\x00\x00R\x03val\"(\n\x08\x46loatLTE\x12\x1c\n\x03val\x18\x01 \x01(\x02\x42\n\xbaH\x07\n\x05\x1d\x00\x00\x80\x42R\x03val\"\'\n\x07\x46loatGT\x12\x1c\n\x03val\x18\x01 \x01(\x02\x42\n\xbaH\x07\n\x05%\x00\x00\x80\x41R\x03val\"(\n\x08\x46loatGTE\x12\x1c\n\x03val\x18\x01 \x01(\x02\x42\n\xbaH\x07\n\x05-\x00\x00\x00\x41R\x03val\".\n\tFloatGTLT\x12!\n\x03val\x18\x01 \x01(\x02\x42\x0f\xbaH\x0c\n\n\x15\x00\x00 A%\x00\x00\x00\x00R\x03val\"0\n\x0b\x46loatExLTGT\x12!\n\x03val\x18\x01 \x01(\x02\x42\x0f\xbaH\x0c\n\n\x15\x00\x00\x00\x00%\x00\x00 AR\x03val\"0\n\x0b\x46loatGTELTE\x12!\n\x03val\x18\x01 \x01(\x02\x42\x0f\xbaH\x0c\n\n\x1d\x00\x00\x80\x43-\x00\x00\x00\x43R\x03val\"2\n\rFloatExGTELTE\x12!\n\x03val\x18\x01 \x01(\x02\x42\x0f\xbaH\x0c\n\n\x1d\x00\x00\x00\x43-\x00\x00\x80\x43R\x03val\"(\n\x0b\x46loatFinite\x12\x19\n\x03val\x18\x01 \x01(\x02\x42\x07\xbaH\x04\n\x02@\x01R\x03val\"+\n\x0e\x46loatNotFinite\x12\x19\n\x03val\x18\x01 \x01(\x02\x42\x07\xbaH\x04\n\x02@\x00R\x03val\"3\n\x0b\x46loatIgnore\x12$\n\x03val\x18\x01 \x01(\x02\x42\x12\xbaH\x0f\n\n\x1d\x00\x00\x80\x43-\x00\x00\x00\x43\xd8\x01\x01R\x03val\"6\n\x12\x46loatIncorrectType\x12 \n\x03val\x18\x01 \x01(\x02\x42\x0e\xbaH\x0b\x12\t!\x00\x00\x00\x00\x00\x00\x00\x00R\x03val\",\n\x0c\x46loatExample\x12\x1c\n\x03val\x18\x01 \x01(\x02\x42\n\xbaH\x07\n\x05M\x00\x00\x00\x41R\x03val\"\x1e\n\nDoubleNone\x12\x10\n\x03val\x18\x01 \x01(\x01R\x03val\"/\n\x0b\x44oubleConst\x12 \n\x03val\x18\x01 \x01(\x01\x42\x0e\xbaH\x0b\x12\t\t\xaeG\xe1z\x14\xae\xf3?R\x03val\"5\n\x08\x44oubleIn\x12)\n\x03val\x18\x01 \x01(\x01\x42\x17\xbaH\x14\x12\x12\x31=\n\xd7\xa3p=\x12@1\x8f\xc2\xf5(\\\x8f\x1f@R\x03val\"/\n\x0b\x44oubleNotIn\x12 \n\x03val\x18\x01 \x01(\x01\x42\x0e\xbaH\x0b\x12\t9\x00\x00\x00\x00\x00\x00\x00\x00R\x03val\",\n\x08\x44oubleLT\x12 \n\x03val\x18\x01 \x01(\x01\x42\x0e\xbaH\x0b\x12\t\x11\x00\x00\x00\x00\x00\x00\x00\x00R\x03val\"-\n\tDoubleLTE\x12 \n\x03val\x18\x01 \x01(\x01\x42\x0e\xbaH\x0b\x12\t\x19\x00\x00\x00\x00\x00\x00P@R\x03val\",\n\x08\x44oubleGT\x12 \n\x03val\x18\x01 \x01(\x01\x42\x0e\xbaH\x0b\x12\t!\x00\x00\x00\x00\x00\x00\x30@R\x03val\"-\n\tDoubleGTE\x12 \n\x03val\x18\x01 \x01(\x01\x42\x0e\xbaH\x0b\x12\t)\x00\x00\x00\x00\x00\x00 @R\x03val\"7\n\nDoubleGTLT\x12)\n\x03val\x18\x01 \x01(\x01\x42\x17\xbaH\x14\x12\x12\x11\x00\x00\x00\x00\x00\x00$@!\x00\x00\x00\x00\x00\x00\x00\x00R\x03val\"9\n\x0c\x44oubleExLTGT\x12)\n\x03val\x18\x01 \x01(\x01\x42\x17\xbaH\x14\x12\x12\x11\x00\x00\x00\x00\x00\x00\x00\x00!\x00\x00\x00\x00\x00\x00$@R\x03val\"9\n\x0c\x44oubleGTELTE\x12)\n\x03val\x18\x01 \x01(\x01\x42\x17\xbaH\x14\x12\x12\x19\x00\x00\x00\x00\x00\x00p@)\x00\x00\x00\x00\x00\x00`@R\x03val\";\n\x0e\x44oubleExGTELTE\x12)\n\x03val\x18\x01 \x01(\x01\x42\x17\xbaH\x14\x12\x12\x19\x00\x00\x00\x00\x00\x00`@)\x00\x00\x00\x00\x00\x00p@R\x03val\")\n\x0c\x44oubleFinite\x12\x19\n\x03val\x18\x01 \x01(\x01\x42\x07\xbaH\x04\x12\x02@\x01R\x03val\",\n\x0f\x44oubleNotFinite\x12\x19\n\x03val\x18\x01 \x01(\x01\x42\x07\xbaH\x04\x12\x02@\x00R\x03val\"<\n\x0c\x44oubleIgnore\x12,\n\x03val\x18\x01 \x01(\x01\x42\x1a\xbaH\x17\x12\x12\x19\x00\x00\x00\x00\x00\x00p@)\x00\x00\x00\x00\x00\x00`@\xd8\x01\x01R\x03val\"3\n\x13\x44oubleIncorrectType\x12\x1c\n\x03val\x18\x01 \x01(\x01\x42\n\xbaH\x07\n\x05%\x00\x00\x00\x00R\x03val\"1\n\rDoubleExample\x12 \n\x03val\x18\x01 \x01(\x01\x42\x0e\xbaH\x0b\x12\tI\x00\x00\x00\x00\x00\x00\x00\x00R\x03val\"\x1d\n\tInt32None\x12\x10\n\x03val\x18\x01 \x01(\x05R\x03val\"\'\n\nInt32Const\x12\x19\n\x03val\x18\x01 \x01(\x05\x42\x07\xbaH\x04\x1a\x02\x08\x01R\x03val\"&\n\x07Int32In\x12\x1b\n\x03val\x18\x01 \x01(\x05\x42\t\xbaH\x06\x1a\x04\x30\x02\x30\x03R\x03val\"\'\n\nInt32NotIn\x12\x19\n\x03val\x18\x01 \x01(\x05\x42\x07\xbaH\x04\x1a\x02\x38\x00R\x03val\"$\n\x07Int32LT\x12\x19\n\x03val\x18\x01 \x01(\x05\x42\x07\xbaH\x04\x1a\x02\x10\x00R\x03val\"%\n\x08Int32LTE\x12\x19\n\x03val\x18\x01 \x01(\x05\x42\x07\xbaH\x04\x1a\x02\x18@R\x03val\"$\n\x07Int32GT\x12\x19\n\x03val\x18\x01 \x01(\x05\x42\x07\xbaH\x04\x1a\x02 \x10R\x03val\"%\n\x08Int32GTE\x12\x19\n\x03val\x18\x01 \x01(\x05\x42\x07\xbaH\x04\x1a\x02(\x08R\x03val\"(\n\tInt32GTLT\x12\x1b\n\x03val\x18\x01 \x01(\x05\x42\t\xbaH\x06\x1a\x04\x10\n \x00R\x03val\"*\n\x0bInt32ExLTGT\x12\x1b\n\x03val\x18\x01 \x01(\x05\x42\t\xbaH\x06\x1a\x04\x10\x00 \nR\x03val\",\n\x0bInt32GTELTE\x12\x1d\n\x03val\x18\x01 \x01(\x05\x42\x0b\xbaH\x08\x1a\x06\x18\x80\x02(\x80\x01R\x03val\".\n\rInt32ExGTELTE\x12\x1d\n\x03val\x18\x01 \x01(\x05\x42\x0b\xbaH\x08\x1a\x06\x18\x80\x01(\x80\x02R\x03val\"/\n\x0bInt32Ignore\x12 \n\x03val\x18\x01 \x01(\x05\x42\x0e\xbaH\x0b\x1a\x06\x18\x80\x02(\x80\x01\xd8\x01\x01R\x03val\"2\n\x12Int32IncorrectType\x12\x1c\n\x03val\x18\x01 \x01(\x05\x42\n\xbaH\x07\n\x05%\x00\x00\x00\x00R\x03val\")\n\x0cInt32Example\x12\x19\n\x03val\x18\x01 \x01(\x05\x42\x07\xbaH\x04\x1a\x02@\nR\x03val\"\x1d\n\tInt64None\x12\x10\n\x03val\x18\x01 \x01(\x03R\x03val\"\'\n\nInt64Const\x12\x19\n\x03val\x18\x01 \x01(\x03\x42\x07\xbaH\x04\"\x02\x08\x01R\x03val\"&\n\x07Int64In\x12\x1b\n\x03val\x18\x01 \x01(\x03\x42\t\xbaH\x06\"\x04\x30\x02\x30\x03R\x03val\"\'\n\nInt64NotIn\x12\x19\n\x03val\x18\x01 \x01(\x03\x42\x07\xbaH\x04\"\x02\x38\x00R\x03val\"$\n\x07Int64LT\x12\x19\n\x03val\x18\x01 \x01(\x03\x42\x07\xbaH\x04\"\x02\x10\x00R\x03val\"%\n\x08Int64LTE\x12\x19\n\x03val\x18\x01 \x01(\x03\x42\x07\xbaH\x04\"\x02\x18@R\x03val\"$\n\x07Int64GT\x12\x19\n\x03val\x18\x01 \x01(\x03\x42\x07\xbaH\x04\"\x02 \x10R\x03val\"%\n\x08Int64GTE\x12\x19\n\x03val\x18\x01 \x01(\x03\x42\x07\xbaH\x04\"\x02(\x08R\x03val\"(\n\tInt64GTLT\x12\x1b\n\x03val\x18\x01 \x01(\x03\x42\t\xbaH\x06\"\x04\x10\n \x00R\x03val\"*\n\x0bInt64ExLTGT\x12\x1b\n\x03val\x18\x01 \x01(\x03\x42\t\xbaH\x06\"\x04\x10\x00 \nR\x03val\",\n\x0bInt64GTELTE\x12\x1d\n\x03val\x18\x01 \x01(\x03\x42\x0b\xbaH\x08\"\x06\x18\x80\x02(\x80\x01R\x03val\".\n\rInt64ExGTELTE\x12\x1d\n\x03val\x18\x01 \x01(\x03\x42\x0b\xbaH\x08\"\x06\x18\x80\x01(\x80\x02R\x03val\"/\n\x0bInt64Ignore\x12 \n\x03val\x18\x01 \x01(\x03\x42\x0e\xbaH\x0b\"\x06\x18\x80\x02(\x80\x01\xd8\x01\x01R\x03val\"\x86\x04\n\rInt64BigRules\x12\"\n\x06lt_pos\x18\x01 \x01(\x03\x42\x0b\xbaH\x08\"\x06\x10\xa6\xdd\x87\xa4\x14R\x05ltPos\x12\'\n\x06lt_neg\x18\x02 \x01(\x03\x42\x10\xbaH\r\"\x0b\x10\xda\xa2\xf8\xdb\xeb\xff\xff\xff\xff\x01R\x05ltNeg\x12\"\n\x06gt_pos\x18\x03 \x01(\x03\x42\x0b\xbaH\x08\"\x06 \xa6\xdd\x87\xa4\x14R\x05gtPos\x12\'\n\x06gt_neg\x18\x04 \x01(\x03\x42\x10\xbaH\r\"\x0b \xda\xa2\xf8\xdb\xeb\xff\xff\xff\xff\x01R\x05gtNeg\x12$\n\x07lte_pos\x18\x05 \x01(\x03\x42\x0b\xbaH\x08\"\x06\x18\xa6\xdd\x87\xa4\x14R\x06ltePos\x12)\n\x07lte_neg\x18\x06 \x01(\x03\x42\x10\xbaH\r\"\x0b\x18\xda\xa2\xf8\xdb\xeb\xff\xff\xff\xff\x01R\x06lteNeg\x12$\n\x07gte_pos\x18\x07 \x01(\x03\x42\x0b\xbaH\x08\"\x06(\xa6\xdd\x87\xa4\x14R\x06gtePos\x12)\n\x07gte_neg\x18\x08 \x01(\x03\x42\x10\xbaH\r\"\x0b(\xda\xa2\xf8\xdb\xeb\xff\xff\xff\xff\x01R\x06gteNeg\x12.\n\x0c\x63onstant_pos\x18\t \x01(\x03\x42\x0b\xbaH\x08\"\x06\x08\xa6\xdd\x87\xa4\x14R\x0b\x63onstantPos\x12\x33\n\x0c\x63onstant_neg\x18\n \x01(\x03\x42\x10\xbaH\r\"\x0b\x08\xda\xa2\xf8\xdb\xeb\xff\xff\xff\xff\x01R\x0b\x63onstantNeg\x12&\n\x02in\x18\x0b \x01(\x03\x42\x16\xbaH\x13\"\x11\x30\xa6\xdd\x87\xa4\x14\x30\xda\xa2\xf8\xdb\xeb\xff\xff\xff\xff\x01R\x02in\x12,\n\x05notin\x18\x0c \x01(\x03\x42\x16\xbaH\x13\"\x11\x38\xa6\xdd\x87\xa4\x14\x38\xda\xa2\xf8\xdb\xeb\xff\xff\xff\xff\x01R\x05notin\"2\n\x12Int64IncorrectType\x12\x1c\n\x03val\x18\x01 \x01(\x03\x42\n\xbaH\x07\n\x05%\x00\x00\x00\x00R\x03val\")\n\x0cInt64Example\x12\x19\n\x03val\x18\x01 \x01(\x03\x42\x07\xbaH\x04\"\x02H\nR\x03val\"\x1e\n\nUInt32None\x12\x10\n\x03val\x18\x01 \x01(\rR\x03val\"(\n\x0bUInt32Const\x12\x19\n\x03val\x18\x01 \x01(\rB\x07\xbaH\x04*\x02\x08\x01R\x03val\"\'\n\x08UInt32In\x12\x1b\n\x03val\x18\x01 \x01(\rB\t\xbaH\x06*\x04\x30\x02\x30\x03R\x03val\"(\n\x0bUInt32NotIn\x12\x19\n\x03val\x18\x01 \x01(\rB\x07\xbaH\x04*\x02\x38\x00R\x03val\"%\n\x08UInt32LT\x12\x19\n\x03val\x18\x01 \x01(\rB\x07\xbaH\x04*\x02\x10\x05R\x03val\"&\n\tUInt32LTE\x12\x19\n\x03val\x18\x01 \x01(\rB\x07\xbaH\x04*\x02\x18@R\x03val\"%\n\x08UInt32GT\x12\x19\n\x03val\x18\x01 \x01(\rB\x07\xbaH\x04*\x02 \x10R\x03val\"&\n\tUInt32GTE\x12\x19\n\x03val\x18\x01 \x01(\rB\x07\xbaH\x04*\x02(\x08R\x03val\")\n\nUInt32GTLT\x12\x1b\n\x03val\x18\x01 \x01(\rB\t\xbaH\x06*\x04\x10\n \x05R\x03val\"+\n\x0cUInt32ExLTGT\x12\x1b\n\x03val\x18\x01 \x01(\rB\t\xbaH\x06*\x04\x10\x05 \nR\x03val\"-\n\x0cUInt32GTELTE\x12\x1d\n\x03val\x18\x01 \x01(\rB\x0b\xbaH\x08*\x06\x18\x80\x02(\x80\x01R\x03val\"/\n\x0eUInt32ExGTELTE\x12\x1d\n\x03val\x18\x01 \x01(\rB\x0b\xbaH\x08*\x06\x18\x80\x01(\x80\x02R\x03val\"0\n\x0cUInt32Ignore\x12 \n\x03val\x18\x01 \x01(\rB\x0e\xbaH\x0b*\x06\x18\x80\x02(\x80\x01\xd8\x01\x01R\x03val\"3\n\x13UInt32IncorrectType\x12\x1c\n\x03val\x18\x01 \x01(\rB\n\xbaH\x07\n\x05%\x00\x00\x00\x00R\x03val\"*\n\rUInt32Example\x12\x19\n\x03val\x18\x01 \x01(\rB\x07\xbaH\x04*\x02@\x00R\x03val\"\x1e\n\nUInt64None\x12\x10\n\x03val\x18\x01 \x01(\x04R\x03val\"(\n\x0bUInt64Const\x12\x19\n\x03val\x18\x01 \x01(\x04\x42\x07\xbaH\x04\x32\x02\x08\x01R\x03val\"\'\n\x08UInt64In\x12\x1b\n\x03val\x18\x01 \x01(\x04\x42\t\xbaH\x06\x32\x04\x30\x02\x30\x03R\x03val\"(\n\x0bUInt64NotIn\x12\x19\n\x03val\x18\x01 \x01(\x04\x42\x07\xbaH\x04\x32\x02\x38\x00R\x03val\"%\n\x08UInt64LT\x12\x19\n\x03val\x18\x01 \x01(\x04\x42\x07\xbaH\x04\x32\x02\x10\x05R\x03val\"&\n\tUInt64LTE\x12\x19\n\x03val\x18\x01 \x01(\x04\x42\x07\xbaH\x04\x32\x02\x18@R\x03val\"%\n\x08UInt64GT\x12\x19\n\x03val\x18\x01 \x01(\x04\x42\x07\xbaH\x04\x32\x02 \x10R\x03val\"&\n\tUInt64GTE\x12\x19\n\x03val\x18\x01 \x01(\x04\x42\x07\xbaH\x04\x32\x02(\x08R\x03val\")\n\nUInt64GTLT\x12\x1b\n\x03val\x18\x01 \x01(\x04\x42\t\xbaH\x06\x32\x04\x10\n \x05R\x03val\"+\n\x0cUInt64ExLTGT\x12\x1b\n\x03val\x18\x01 \x01(\x04\x42\t\xbaH\x06\x32\x04\x10\x05 \nR\x03val\"-\n\x0cUInt64GTELTE\x12\x1d\n\x03val\x18\x01 \x01(\x04\x42\x0b\xbaH\x08\x32\x06\x18\x80\x02(\x80\x01R\x03val\"/\n\x0eUInt64ExGTELTE\x12\x1d\n\x03val\x18\x01 \x01(\x04\x42\x0b\xbaH\x08\x32\x06\x18\x80\x01(\x80\x02R\x03val\"0\n\x0cUInt64Ignore\x12 \n\x03val\x18\x01 \x01(\x04\x42\x0e\xbaH\x0b\x32\x06\x18\x80\x02(\x80\x01\xd8\x01\x01R\x03val\"3\n\x13UInt64IncorrectType\x12\x1c\n\x03val\x18\x01 \x01(\x04\x42\n\xbaH\x07\n\x05%\x00\x00\x00\x00R\x03val\"*\n\rUInt64Example\x12\x19\n\x03val\x18\x01 \x01(\x04\x42\x07\xbaH\x04\x32\x02@\x00R\x03val\"\x1e\n\nSInt32None\x12\x10\n\x03val\x18\x01 \x01(\x11R\x03val\"(\n\x0bSInt32Const\x12\x19\n\x03val\x18\x01 \x01(\x11\x42\x07\xbaH\x04:\x02\x08\x02R\x03val\"\'\n\x08SInt32In\x12\x1b\n\x03val\x18\x01 \x01(\x11\x42\t\xbaH\x06:\x04\x30\x04\x30\x06R\x03val\"(\n\x0bSInt32NotIn\x12\x19\n\x03val\x18\x01 \x01(\x11\x42\x07\xbaH\x04:\x02\x38\x00R\x03val\"%\n\x08SInt32LT\x12\x19\n\x03val\x18\x01 \x01(\x11\x42\x07\xbaH\x04:\x02\x10\x00R\x03val\"\'\n\tSInt32LTE\x12\x1a\n\x03val\x18\x01 \x01(\x11\x42\x08\xbaH\x05:\x03\x18\x80\x01R\x03val\"%\n\x08SInt32GT\x12\x19\n\x03val\x18\x01 \x01(\x11\x42\x07\xbaH\x04:\x02 R\x03val\"&\n\tSInt32GTE\x12\x19\n\x03val\x18\x01 \x01(\x11\x42\x07\xbaH\x04:\x02(\x10R\x03val\")\n\nSInt32GTLT\x12\x1b\n\x03val\x18\x01 \x01(\x11\x42\t\xbaH\x06:\x04\x10\x14 \x00R\x03val\"+\n\x0cSInt32ExLTGT\x12\x1b\n\x03val\x18\x01 \x01(\x11\x42\t\xbaH\x06:\x04\x10\x00 \x14R\x03val\"-\n\x0cSInt32GTELTE\x12\x1d\n\x03val\x18\x01 \x01(\x11\x42\x0b\xbaH\x08:\x06\x18\x80\x04(\x80\x02R\x03val\"/\n\x0eSInt32ExGTELTE\x12\x1d\n\x03val\x18\x01 \x01(\x11\x42\x0b\xbaH\x08:\x06\x18\x80\x02(\x80\x04R\x03val\"0\n\x0cSInt32Ignore\x12 \n\x03val\x18\x01 \x01(\x11\x42\x0e\xbaH\x0b:\x06\x18\x80\x04(\x80\x02\xd8\x01\x01R\x03val\"3\n\x13SInt32IncorrectType\x12\x1c\n\x03val\x18\x01 \x01(\x11\x42\n\xbaH\x07\n\x05%\x00\x00\x00\x00R\x03val\"*\n\rSInt32Example\x12\x19\n\x03val\x18\x01 \x01(\x11\x42\x07\xbaH\x04:\x02@\x00R\x03val\"\x1e\n\nSInt64None\x12\x10\n\x03val\x18\x01 \x01(\x12R\x03val\"(\n\x0bSInt64Const\x12\x19\n\x03val\x18\x01 \x01(\x12\x42\x07\xbaH\x04\x42\x02\x08\x02R\x03val\"\'\n\x08SInt64In\x12\x1b\n\x03val\x18\x01 \x01(\x12\x42\t\xbaH\x06\x42\x04\x30\x04\x30\x06R\x03val\"(\n\x0bSInt64NotIn\x12\x19\n\x03val\x18\x01 \x01(\x12\x42\x07\xbaH\x04\x42\x02\x38\x00R\x03val\"%\n\x08SInt64LT\x12\x19\n\x03val\x18\x01 \x01(\x12\x42\x07\xbaH\x04\x42\x02\x10\x00R\x03val\"\'\n\tSInt64LTE\x12\x1a\n\x03val\x18\x01 \x01(\x12\x42\x08\xbaH\x05\x42\x03\x18\x80\x01R\x03val\"%\n\x08SInt64GT\x12\x19\n\x03val\x18\x01 \x01(\x12\x42\x07\xbaH\x04\x42\x02 R\x03val\"&\n\tSInt64GTE\x12\x19\n\x03val\x18\x01 \x01(\x12\x42\x07\xbaH\x04\x42\x02(\x10R\x03val\")\n\nSInt64GTLT\x12\x1b\n\x03val\x18\x01 \x01(\x12\x42\t\xbaH\x06\x42\x04\x10\x14 \x00R\x03val\"+\n\x0cSInt64ExLTGT\x12\x1b\n\x03val\x18\x01 \x01(\x12\x42\t\xbaH\x06\x42\x04\x10\x00 \x14R\x03val\"-\n\x0cSInt64GTELTE\x12\x1d\n\x03val\x18\x01 \x01(\x12\x42\x0b\xbaH\x08\x42\x06\x18\x80\x04(\x80\x02R\x03val\"/\n\x0eSInt64ExGTELTE\x12\x1d\n\x03val\x18\x01 \x01(\x12\x42\x0b\xbaH\x08\x42\x06\x18\x80\x02(\x80\x04R\x03val\"0\n\x0cSInt64Ignore\x12 \n\x03val\x18\x01 \x01(\x12\x42\x0e\xbaH\x0b\x42\x06\x18\x80\x04(\x80\x02\xd8\x01\x01R\x03val\"3\n\x13SInt64IncorrectType\x12\x1c\n\x03val\x18\x01 \x01(\x12\x42\n\xbaH\x07\n\x05%\x00\x00\x00\x00R\x03val\"*\n\rSInt64Example\x12\x19\n\x03val\x18\x01 \x01(\x12\x42\x07\xbaH\x04\x42\x02@\x00R\x03val\"\x1f\n\x0b\x46ixed32None\x12\x10\n\x03val\x18\x01 \x01(\x07R\x03val\",\n\x0c\x46ixed32Const\x12\x1c\n\x03val\x18\x01 \x01(\x07\x42\n\xbaH\x07J\x05\r\x01\x00\x00\x00R\x03val\".\n\tFixed32In\x12!\n\x03val\x18\x01 \x01(\x07\x42\x0f\xbaH\x0cJ\n5\x02\x00\x00\x00\x35\x03\x00\x00\x00R\x03val\",\n\x0c\x46ixed32NotIn\x12\x1c\n\x03val\x18\x01 \x01(\x07\x42\n\xbaH\x07J\x05=\x00\x00\x00\x00R\x03val\")\n\tFixed32LT\x12\x1c\n\x03val\x18\x01 \x01(\x07\x42\n\xbaH\x07J\x05\x15\x05\x00\x00\x00R\x03val\"*\n\nFixed32LTE\x12\x1c\n\x03val\x18\x01 \x01(\x07\x42\n\xbaH\x07J\x05\x1d@\x00\x00\x00R\x03val\")\n\tFixed32GT\x12\x1c\n\x03val\x18\x01 \x01(\x07\x42\n\xbaH\x07J\x05%\x10\x00\x00\x00R\x03val\"*\n\nFixed32GTE\x12\x1c\n\x03val\x18\x01 \x01(\x07\x42\n\xbaH\x07J\x05-\x08\x00\x00\x00R\x03val\"0\n\x0b\x46ixed32GTLT\x12!\n\x03val\x18\x01 \x01(\x07\x42\x0f\xbaH\x0cJ\n\x15\n\x00\x00\x00%\x05\x00\x00\x00R\x03val\"2\n\rFixed32ExLTGT\x12!\n\x03val\x18\x01 \x01(\x07\x42\x0f\xbaH\x0cJ\n\x15\x05\x00\x00\x00%\n\x00\x00\x00R\x03val\"2\n\rFixed32GTELTE\x12!\n\x03val\x18\x01 \x01(\x07\x42\x0f\xbaH\x0cJ\n\x1d\x00\x01\x00\x00-\x80\x00\x00\x00R\x03val\"4\n\x0f\x46ixed32ExGTELTE\x12!\n\x03val\x18\x01 \x01(\x07\x42\x0f\xbaH\x0cJ\n\x1d\x80\x00\x00\x00-\x00\x01\x00\x00R\x03val\"5\n\rFixed32Ignore\x12$\n\x03val\x18\x01 \x01(\x07\x42\x12\xbaH\x0fJ\n\x1d\x00\x01\x00\x00-\x80\x00\x00\x00\xd8\x01\x01R\x03val\"4\n\x14\x46ixed32IncorrectType\x12\x1c\n\x03val\x18\x01 \x01(\x07\x42\n\xbaH\x07\n\x05%\x00\x00\x00\x00R\x03val\".\n\x0e\x46ixed32Example\x12\x1c\n\x03val\x18\x01 \x01(\x07\x42\n\xbaH\x07J\x05\x45\x00\x00\x00\x00R\x03val\"\x1f\n\x0b\x46ixed64None\x12\x10\n\x03val\x18\x01 \x01(\x06R\x03val\"0\n\x0c\x46ixed64Const\x12 \n\x03val\x18\x01 \x01(\x06\x42\x0e\xbaH\x0bR\t\t\x01\x00\x00\x00\x00\x00\x00\x00R\x03val\"6\n\tFixed64In\x12)\n\x03val\x18\x01 \x01(\x06\x42\x17\xbaH\x14R\x12\x31\x02\x00\x00\x00\x00\x00\x00\x00\x31\x03\x00\x00\x00\x00\x00\x00\x00R\x03val\"0\n\x0c\x46ixed64NotIn\x12 \n\x03val\x18\x01 \x01(\x06\x42\x0e\xbaH\x0bR\t9\x00\x00\x00\x00\x00\x00\x00\x00R\x03val\"-\n\tFixed64LT\x12 \n\x03val\x18\x01 \x01(\x06\x42\x0e\xbaH\x0bR\t\x11\x05\x00\x00\x00\x00\x00\x00\x00R\x03val\".\n\nFixed64LTE\x12 \n\x03val\x18\x01 \x01(\x06\x42\x0e\xbaH\x0bR\t\x19@\x00\x00\x00\x00\x00\x00\x00R\x03val\"-\n\tFixed64GT\x12 \n\x03val\x18\x01 \x01(\x06\x42\x0e\xbaH\x0bR\t!\x10\x00\x00\x00\x00\x00\x00\x00R\x03val\".\n\nFixed64GTE\x12 \n\x03val\x18\x01 \x01(\x06\x42\x0e\xbaH\x0bR\t)\x08\x00\x00\x00\x00\x00\x00\x00R\x03val\"8\n\x0b\x46ixed64GTLT\x12)\n\x03val\x18\x01 \x01(\x06\x42\x17\xbaH\x14R\x12\x11\n\x00\x00\x00\x00\x00\x00\x00!\x05\x00\x00\x00\x00\x00\x00\x00R\x03val\":\n\rFixed64ExLTGT\x12)\n\x03val\x18\x01 \x01(\x06\x42\x17\xbaH\x14R\x12\x11\x05\x00\x00\x00\x00\x00\x00\x00!\n\x00\x00\x00\x00\x00\x00\x00R\x03val\":\n\rFixed64GTELTE\x12)\n\x03val\x18\x01 \x01(\x06\x42\x17\xbaH\x14R\x12\x19\x00\x01\x00\x00\x00\x00\x00\x00)\x80\x00\x00\x00\x00\x00\x00\x00R\x03val\"<\n\x0f\x46ixed64ExGTELTE\x12)\n\x03val\x18\x01 \x01(\x06\x42\x17\xbaH\x14R\x12\x19\x80\x00\x00\x00\x00\x00\x00\x00)\x00\x01\x00\x00\x00\x00\x00\x00R\x03val\"=\n\rFixed64Ignore\x12,\n\x03val\x18\x01 \x01(\x06\x42\x1a\xbaH\x17R\x12\x19\x00\x01\x00\x00\x00\x00\x00\x00)\x80\x00\x00\x00\x00\x00\x00\x00\xd8\x01\x01R\x03val\"4\n\x14\x46ixed64IncorrectType\x12\x1c\n\x03val\x18\x01 \x01(\x06\x42\n\xbaH\x07\n\x05%\x00\x00\x00\x00R\x03val\"2\n\x0e\x46ixed64Example\x12 \n\x03val\x18\x01 \x01(\x06\x42\x0e\xbaH\x0bR\tA\x00\x00\x00\x00\x00\x00\x00\x00R\x03val\" \n\x0cSFixed32None\x12\x10\n\x03val\x18\x01 \x01(\x0fR\x03val\"-\n\rSFixed32Const\x12\x1c\n\x03val\x18\x01 \x01(\x0f\x42\n\xbaH\x07Z\x05\r\x01\x00\x00\x00R\x03val\"/\n\nSFixed32In\x12!\n\x03val\x18\x01 \x01(\x0f\x42\x0f\xbaH\x0cZ\n5\x02\x00\x00\x00\x35\x03\x00\x00\x00R\x03val\"-\n\rSFixed32NotIn\x12\x1c\n\x03val\x18\x01 \x01(\x0f\x42\n\xbaH\x07Z\x05=\x00\x00\x00\x00R\x03val\"*\n\nSFixed32LT\x12\x1c\n\x03val\x18\x01 \x01(\x0f\x42\n\xbaH\x07Z\x05\x15\x00\x00\x00\x00R\x03val\"+\n\x0bSFixed32LTE\x12\x1c\n\x03val\x18\x01 \x01(\x0f\x42\n\xbaH\x07Z\x05\x1d@\x00\x00\x00R\x03val\"*\n\nSFixed32GT\x12\x1c\n\x03val\x18\x01 \x01(\x0f\x42\n\xbaH\x07Z\x05%\x10\x00\x00\x00R\x03val\"+\n\x0bSFixed32GTE\x12\x1c\n\x03val\x18\x01 \x01(\x0f\x42\n\xbaH\x07Z\x05-\x08\x00\x00\x00R\x03val\"1\n\x0cSFixed32GTLT\x12!\n\x03val\x18\x01 \x01(\x0f\x42\x0f\xbaH\x0cZ\n\x15\n\x00\x00\x00%\x00\x00\x00\x00R\x03val\"3\n\x0eSFixed32ExLTGT\x12!\n\x03val\x18\x01 \x01(\x0f\x42\x0f\xbaH\x0cZ\n\x15\x00\x00\x00\x00%\n\x00\x00\x00R\x03val\"3\n\x0eSFixed32GTELTE\x12!\n\x03val\x18\x01 \x01(\x0f\x42\x0f\xbaH\x0cZ\n\x1d\x00\x01\x00\x00-\x80\x00\x00\x00R\x03val\"5\n\x10SFixed32ExGTELTE\x12!\n\x03val\x18\x01 \x01(\x0f\x42\x0f\xbaH\x0cZ\n\x1d\x80\x00\x00\x00-\x00\x01\x00\x00R\x03val\"6\n\x0eSFixed32Ignore\x12$\n\x03val\x18\x01 \x01(\x0f\x42\x12\xbaH\x0fZ\n\x1d\x00\x01\x00\x00-\x80\x00\x00\x00\xd8\x01\x01R\x03val\"5\n\x15SFixed32IncorrectType\x12\x1c\n\x03val\x18\x01 \x01(\x0f\x42\n\xbaH\x07\n\x05%\x00\x00\x00\x00R\x03val\"/\n\x0fSFixed32Example\x12\x1c\n\x03val\x18\x01 \x01(\x0f\x42\n\xbaH\x07Z\x05\x45\x00\x00\x00\x00R\x03val\" \n\x0cSFixed64None\x12\x10\n\x03val\x18\x01 \x01(\x10R\x03val\"1\n\rSFixed64Const\x12 \n\x03val\x18\x01 \x01(\x10\x42\x0e\xbaH\x0b\x62\t\t\x01\x00\x00\x00\x00\x00\x00\x00R\x03val\"7\n\nSFixed64In\x12)\n\x03val\x18\x01 \x01(\x10\x42\x17\xbaH\x14\x62\x12\x31\x02\x00\x00\x00\x00\x00\x00\x00\x31\x03\x00\x00\x00\x00\x00\x00\x00R\x03val\"1\n\rSFixed64NotIn\x12 \n\x03val\x18\x01 \x01(\x10\x42\x0e\xbaH\x0b\x62\t9\x00\x00\x00\x00\x00\x00\x00\x00R\x03val\".\n\nSFixed64LT\x12 \n\x03val\x18\x01 \x01(\x10\x42\x0e\xbaH\x0b\x62\t\x11\x00\x00\x00\x00\x00\x00\x00\x00R\x03val\"/\n\x0bSFixed64LTE\x12 \n\x03val\x18\x01 \x01(\x10\x42\x0e\xbaH\x0b\x62\t\x19@\x00\x00\x00\x00\x00\x00\x00R\x03val\".\n\nSFixed64GT\x12 \n\x03val\x18\x01 \x01(\x10\x42\x0e\xbaH\x0b\x62\t!\x10\x00\x00\x00\x00\x00\x00\x00R\x03val\"/\n\x0bSFixed64GTE\x12 \n\x03val\x18\x01 \x01(\x10\x42\x0e\xbaH\x0b\x62\t)\x08\x00\x00\x00\x00\x00\x00\x00R\x03val\"9\n\x0cSFixed64GTLT\x12)\n\x03val\x18\x01 \x01(\x10\x42\x17\xbaH\x14\x62\x12\x11\n\x00\x00\x00\x00\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x00\x00R\x03val\";\n\x0eSFixed64ExLTGT\x12)\n\x03val\x18\x01 \x01(\x10\x42\x17\xbaH\x14\x62\x12\x11\x00\x00\x00\x00\x00\x00\x00\x00!\n\x00\x00\x00\x00\x00\x00\x00R\x03val\";\n\x0eSFixed64GTELTE\x12)\n\x03val\x18\x01 \x01(\x10\x42\x17\xbaH\x14\x62\x12\x19\x00\x01\x00\x00\x00\x00\x00\x00)\x80\x00\x00\x00\x00\x00\x00\x00R\x03val\"=\n\x10SFixed64ExGTELTE\x12)\n\x03val\x18\x01 \x01(\x10\x42\x17\xbaH\x14\x62\x12\x19\x80\x00\x00\x00\x00\x00\x00\x00)\x00\x01\x00\x00\x00\x00\x00\x00R\x03val\">\n\x0eSFixed64Ignore\x12,\n\x03val\x18\x01 \x01(\x10\x42\x1a\xbaH\x17\x62\x12\x19\x00\x01\x00\x00\x00\x00\x00\x00)\x80\x00\x00\x00\x00\x00\x00\x00\xd8\x01\x01R\x03val\"5\n\x15SFixed64IncorrectType\x12\x1c\n\x03val\x18\x01 \x01(\x10\x42\n\xbaH\x07\n\x05%\x00\x00\x00\x00R\x03val\"3\n\x0fSFixed64Example\x12 \n\x03val\x18\x01 \x01(\x10\x42\x0e\xbaH\x0b\x62\tA\x00\x00\x00\x00\x00\x00\x00\x00R\x03val\":\n\x10Int64LTEOptional\x12\x1e\n\x03val\x18\x01 \x01(\x03\x42\x07\xbaH\x04\"\x02\x18@H\x00R\x03val\x88\x01\x01\x42\x06\n\x04_valb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'buf.validate.conformance.cases.numbers_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\"com.buf.validate.conformance.casesB\014NumbersProtoP\001\242\002\004BVCC\252\002\036Buf.Validate.Conformance.Cases\312\002\036Buf\\Validate\\Conformance\\Cases\342\002*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\352\002!Buf::Validate::Conformance::Cases' + DESCRIPTOR._loaded_options = None _globals['_FLOATCONST'].fields_by_name['val']._loaded_options = None _globals['_FLOATCONST'].fields_by_name['val']._serialized_options = b'\272H\007\n\005\r\244p\235?' _globals['_FLOATIN'].fields_by_name['val']._loaded_options = None diff --git a/packages/protovalidate-proto/src/buf/validate/conformance/cases/oneofs_pb2.py b/packages/protovalidate-proto/src/buf/validate/conformance/cases/oneofs_pb2.py index a71ad83d..2488fa3b 100644 --- a/packages/protovalidate-proto/src/buf/validate/conformance/cases/oneofs_pb2.py +++ b/packages/protovalidate-proto/src/buf/validate/conformance/cases/oneofs_pb2.py @@ -29,14 +29,13 @@ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n+buf/validate/conformance/cases/oneofs.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\")\n\x0cTestOneofMsg\x12\x19\n\x03val\x18\x01 \x01(\x08\x42\x07\xbaH\x04j\x02\x08\x01R\x03val\"0\n\tOneofNone\x12\x0e\n\x01x\x18\x01 \x01(\tH\x00R\x01x\x12\x0e\n\x01y\x18\x02 \x01(\x05H\x00R\x01yB\x03\n\x01o\"\x7f\n\x05Oneof\x12\x1a\n\x01x\x18\x01 \x01(\tB\n\xbaH\x07r\x05:\x03\x66ooH\x00R\x01x\x12\x17\n\x01y\x18\x02 \x01(\x05\x42\x07\xbaH\x04\x1a\x02 \x00H\x00R\x01y\x12<\n\x01z\x18\x03 \x01(\x0b\x32,.buf.validate.conformance.cases.TestOneofMsgH\x00R\x01zB\x03\n\x01o\"\xa0\x01\n\rOneofRequired\x12\x0e\n\x01x\x18\x01 \x01(\tH\x00R\x01x\x12\x0e\n\x01y\x18\x02 \x01(\x05H\x00R\x01y\x12\x34\n\x15name_with_underscores\x18\x03 \x01(\x05H\x00R\x13nameWithUnderscores\x12-\n\x12under_and_1_number\x18\x04 \x01(\x05H\x00R\x0funderAnd1NumberB\n\n\x01o\x12\x05\xbaH\x02\x08\x01\"T\n\x1eOneofRequiredWithRequiredField\x12\x16\n\x01\x61\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01H\x00R\x01\x61\x12\x0e\n\x01\x62\x18\x02 \x01(\tH\x00R\x01\x62\x42\n\n\x01o\x12\x05\xbaH\x02\x08\x01\x42\xcd\x01\n\"com.buf.validate.conformance.casesB\x0bOneofsProtoP\x01\xa2\x02\x04\x42VCC\xaa\x02\x1e\x42uf.Validate.Conformance.Cases\xca\x02\x1e\x42uf\\Validate\\Conformance\\Cases\xe2\x02*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\xea\x02!Buf::Validate::Conformance::Casesb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n+buf/validate/conformance/cases/oneofs.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\")\n\x0cTestOneofMsg\x12\x19\n\x03val\x18\x01 \x01(\x08\x42\x07\xbaH\x04j\x02\x08\x01R\x03val\"0\n\tOneofNone\x12\x0e\n\x01x\x18\x01 \x01(\tH\x00R\x01x\x12\x0e\n\x01y\x18\x02 \x01(\x05H\x00R\x01yB\x03\n\x01o\"\x7f\n\x05Oneof\x12\x1a\n\x01x\x18\x01 \x01(\tB\n\xbaH\x07r\x05:\x03\x66ooH\x00R\x01x\x12\x17\n\x01y\x18\x02 \x01(\x05\x42\x07\xbaH\x04\x1a\x02 \x00H\x00R\x01y\x12<\n\x01z\x18\x03 \x01(\x0b\x32,.buf.validate.conformance.cases.TestOneofMsgH\x00R\x01zB\x03\n\x01o\"\xa0\x01\n\rOneofRequired\x12\x0e\n\x01x\x18\x01 \x01(\tH\x00R\x01x\x12\x0e\n\x01y\x18\x02 \x01(\x05H\x00R\x01y\x12\x34\n\x15name_with_underscores\x18\x03 \x01(\x05H\x00R\x13nameWithUnderscores\x12-\n\x12under_and_1_number\x18\x04 \x01(\x05H\x00R\x0funderAnd1NumberB\n\n\x01o\x12\x05\xbaH\x02\x08\x01\"T\n\x1eOneofRequiredWithRequiredField\x12\x16\n\x01\x61\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01H\x00R\x01\x61\x12\x0e\n\x01\x62\x18\x02 \x01(\tH\x00R\x01\x62\x42\n\n\x01o\x12\x05\xbaH\x02\x08\x01\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'buf.validate.conformance.cases.oneofs_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\"com.buf.validate.conformance.casesB\013OneofsProtoP\001\242\002\004BVCC\252\002\036Buf.Validate.Conformance.Cases\312\002\036Buf\\Validate\\Conformance\\Cases\342\002*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\352\002!Buf::Validate::Conformance::Cases' + DESCRIPTOR._loaded_options = None _globals['_TESTONEOFMSG'].fields_by_name['val']._loaded_options = None _globals['_TESTONEOFMSG'].fields_by_name['val']._serialized_options = b'\272H\004j\002\010\001' _globals['_ONEOF'].fields_by_name['x']._loaded_options = None diff --git a/packages/protovalidate-proto/src/buf/validate/conformance/cases/other_package/embed_pb2.py b/packages/protovalidate-proto/src/buf/validate/conformance/cases/other_package/embed_pb2.py index 33a0679a..90af4cb6 100644 --- a/packages/protovalidate-proto/src/buf/validate/conformance/cases/other_package/embed_pb2.py +++ b/packages/protovalidate-proto/src/buf/validate/conformance/cases/other_package/embed_pb2.py @@ -29,14 +29,13 @@ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n8buf/validate/conformance/cases/other_package/embed.proto\x12,buf.validate.conformance.cases.other_package\x1a\x1b\x62uf/validate/validate.proto\"\xc5\x01\n\x05\x45mbed\x12\x19\n\x03val\x18\x01 \x01(\x03\x42\x07\xbaH\x04\"\x02 \x00R\x03val\x1a\x61\n\x0b\x44oubleEmbed\"R\n\x10\x44oubleEnumerated\x12!\n\x1d\x44OUBLE_ENUMERATED_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x44OUBLE_ENUMERATED_VALUE\x10\x01\">\n\nEnumerated\x12\x1a\n\x16\x45NUMERATED_UNSPECIFIED\x10\x00\x12\x14\n\x10\x45NUMERATED_VALUE\x10\x01\x42\x90\x02\n0com.buf.validate.conformance.cases.other_packageB\nEmbedProtoP\x01\xa2\x02\x05\x42VCCO\xaa\x02+Buf.Validate.Conformance.Cases.OtherPackage\xca\x02+Buf\\Validate\\Conformance\\Cases\\OtherPackage\xe2\x02\x37\x42uf\\Validate\\Conformance\\Cases\\OtherPackage\\GPBMetadata\xea\x02/Buf::Validate::Conformance::Cases::OtherPackageb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n8buf/validate/conformance/cases/other_package/embed.proto\x12,buf.validate.conformance.cases.other_package\x1a\x1b\x62uf/validate/validate.proto\"\xc5\x01\n\x05\x45mbed\x12\x19\n\x03val\x18\x01 \x01(\x03\x42\x07\xbaH\x04\"\x02 \x00R\x03val\x1a\x61\n\x0b\x44oubleEmbed\"R\n\x10\x44oubleEnumerated\x12!\n\x1d\x44OUBLE_ENUMERATED_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x44OUBLE_ENUMERATED_VALUE\x10\x01\">\n\nEnumerated\x12\x1a\n\x16\x45NUMERATED_UNSPECIFIED\x10\x00\x12\x14\n\x10\x45NUMERATED_VALUE\x10\x01\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'buf.validate.conformance.cases.other_package.embed_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n0com.buf.validate.conformance.cases.other_packageB\nEmbedProtoP\001\242\002\005BVCCO\252\002+Buf.Validate.Conformance.Cases.OtherPackage\312\002+Buf\\Validate\\Conformance\\Cases\\OtherPackage\342\0027Buf\\Validate\\Conformance\\Cases\\OtherPackage\\GPBMetadata\352\002/Buf::Validate::Conformance::Cases::OtherPackage' + DESCRIPTOR._loaded_options = None _globals['_EMBED'].fields_by_name['val']._loaded_options = None _globals['_EMBED'].fields_by_name['val']._serialized_options = b'\272H\004\"\002 \000' _globals['_EMBED']._serialized_start=136 diff --git a/packages/protovalidate-proto/src/buf/validate/conformance/cases/predefined_rules_proto2_pb2.py b/packages/protovalidate-proto/src/buf/validate/conformance/cases/predefined_rules_proto2_pb2.py index 067f3ebe..9fedab73 100644 --- a/packages/protovalidate-proto/src/buf/validate/conformance/cases/predefined_rules_proto2_pb2.py +++ b/packages/protovalidate-proto/src/buf/validate/conformance/cases/predefined_rules_proto2_pb2.py @@ -32,14 +32,13 @@ from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n 24 ? \'\' : \'a must be greater than 24\'R\x01\x61\x12\xb4\x01\n\x01\x62\x18\x02 \x01(\x0b\x32\x44.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.NestedB`\xbaH]\xba\x01Z\n*predefined_and_custom_rule_embedded_proto2\x12\x1b\x62.c must be a multiple of 3\x1a\x0fthis.c % 3 == 0R\x01\x62\x1as\n\x06Nested\x12i\n\x01\x63\x18\x01 \x01(\x11\x42[\xbaHX:\x03\xc8H\x01\xba\x01P\n(predefined_and_custom_rule_nested_proto2\x1a$this > 0 ? \'\' : \'c must be positive\'R\x01\x63\"\xa5\x01\n%StandardPredefinedAndCustomRuleProto2\x12|\n\x01\x61\x18\x01 \x01(\x11\x42n\xbaHk:\x05\x10\x38\xc8H\x01\xba\x01\x61\n1standard_predefined_and_custom_rule_scalar_proto2\x1a,this > 24 ? \'\' : \'a must be greater than 24\'R\x01\x61:\xa9\x01\n\x16\x66loat_abs_range_proto2\x12\x18.buf.validate.FloatRules\x18\x89\t \x01(\x02\x42Y\xc2HV\nT\n\x16\x66loat.abs_range.proto2\x12\x1b\x66loat value is out of range\x1a\x1dthis >= -rule && this <= ruleR\x13\x66loatAbsRangeProto2:\xae\x01\n\x17\x64ouble_abs_range_proto2\x12\x19.buf.validate.DoubleRules\x18\x89\t \x01(\x01\x42[\xc2HX\nV\n\x17\x64ouble.abs_range.proto2\x12\x1c\x64ouble value is out of range\x1a\x1dthis >= -rule && this <= ruleR\x14\x64oubleAbsRangeProto2:\xb0\x01\n\x13int32_abs_in_proto2\x12\x18.buf.validate.Int32Rules\x18\x89\t \x03(\x05\x42\x66\xc2Hc\na\n\x13int32.abs_in.proto2\x12!must be in absolute value of list\x1a\'this in rule || this in rule.map(n, -n)R\x10int32AbsInProto2:\xcd\x01\n\x13int64_abs_in_proto2\x12\x18.buf.validate.Int64Rules\x18\x89\t \x03(\x0b\x32\x1b.google.protobuf.Int64ValueBf\xc2Hc\na\n\x13int64.abs_in.proto2\x12!must be in absolute value of list\x1a\'this in rule || this in rule.map(n, -n)R\x10int64AbsInProto2:\x8e\x01\n\x12uint32_even_proto2\x12\x19.buf.validate.UInt32Rules\x18\x89\t \x01(\x08\x42\x44\xc2HA\n?\n\x12uint32.even.proto2\x12\x18uint32 value is not even\x1a\x0fthis % 2u == 0uR\x10uint32EvenProto2:\x8e\x01\n\x12uint64_even_proto2\x12\x19.buf.validate.UInt64Rules\x18\x89\t \x01(\x08\x42\x44\xc2HA\n?\n\x12uint64.even.proto2\x12\x18uint64 value is not even\x1a\x0fthis % 2u == 0uR\x10uint64EvenProto2:\x8c\x01\n\x12sint32_even_proto2\x12\x19.buf.validate.SInt32Rules\x18\x89\t \x01(\x08\x42\x42\xc2H?\n=\n\x12sint32.even.proto2\x12\x18sint32 value is not even\x1a\rthis % 2 == 0R\x10sint32EvenProto2:\x8c\x01\n\x12sint64_even_proto2\x12\x19.buf.validate.SInt64Rules\x18\x89\t \x01(\x08\x42\x42\xc2H?\n=\n\x12sint64.even.proto2\x12\x18sint64 value is not even\x1a\rthis % 2 == 0R\x10sint64EvenProto2:\x93\x01\n\x13\x66ixed32_even_proto2\x12\x1a.buf.validate.Fixed32Rules\x18\x89\t \x01(\x08\x42\x46\xc2HC\nA\n\x13\x66ixed32.even.proto2\x12\x19\x66ixed32 value is not even\x1a\x0fthis % 2u == 0uR\x11\x66ixed32EvenProto2:\x93\x01\n\x13\x66ixed64_even_proto2\x12\x1a.buf.validate.Fixed64Rules\x18\x89\t \x01(\x08\x42\x46\xc2HC\nA\n\x13\x66ixed64.even.proto2\x12\x19\x66ixed64 value is not even\x1a\x0fthis % 2u == 0uR\x11\x66ixed64EvenProto2:\x96\x01\n\x14sfixed32_even_proto2\x12\x1b.buf.validate.SFixed32Rules\x18\x89\t \x01(\x08\x42\x46\xc2HC\nA\n\x14sfixed32.even.proto2\x12\x1asfixed32 value is not even\x1a\rthis % 2 == 0R\x12sfixed32EvenProto2:\x96\x01\n\x14sfixed64_even_proto2\x12\x1b.buf.validate.SFixed64Rules\x18\x89\t \x01(\x08\x42\x46\xc2HC\nA\n\x14sfixed64.even.proto2\x12\x1asfixed64 value is not even\x1a\rthis % 2 == 0R\x12sfixed64EvenProto2:\x86\x01\n\x11\x62ool_false_proto2\x12\x17.buf.validate.BoolRules\x18\x89\t \x01(\x08\x42@\xc2H=\n;\n\x11\x62ool.false.proto2\x12\x17\x62ool value is not false\x1a\rthis == falseR\x0f\x62oolFalseProto2:\xfe\x01\n\x18string_valid_path_proto2\x12\x19.buf.validate.StringRules\x18\x89\t \x01(\x08\x42\xa8\x01\xc2H\xa4\x01\n\xa1\x01\n\x18string.valid_path.proto2\x1a\x84\x01!this.matches(\'^([^/.][^/]?|[^/][^/.]|[^/]{3,})(/([^/.][^/]?|[^/][^/.]|[^/]{3,}))*$\') ? \'not a valid path: `%s`\'.format([this]) : \'\'R\x15stringValidPathProto2:\x82\x02\n\x17\x62ytes_valid_path_proto2\x12\x18.buf.validate.BytesRules\x18\x89\t \x01(\x08\x42\xaf\x01\xc2H\xab\x01\n\xa8\x01\n\x17\x62ytes.valid_path.proto2\x1a\x8c\x01!string(this).matches(\'^([^/.][^/]?|[^/][^/.]|[^/]{3,})(/([^/.][^/]?|[^/][^/.]|[^/]{3,}))*$\') ? \'not a valid path: `%s`\'.format([this]) : \'\'R\x14\x62ytesValidPathProto2:\x92\x01\n\x14\x65num_non_zero_proto2\x12\x17.buf.validate.EnumRules\x18\x89\t \x01(\x08\x42G\xc2HD\nB\n\x14\x65num.non_zero.proto2\x12\x1a\x65num value is not non-zero\x1a\x0eint(this) != 0R\x11\x65numNonZeroProto2:\xcc\x01\n\x1drepeated_at_least_five_proto2\x12\x1b.buf.validate.RepeatedRules\x18\x89\t \x01(\x08\x42l\xc2Hi\ng\n\x1drepeated.at_least_five.proto2\x12-repeated field must have at least five values\x1a\x17uint(this.size()) >= 5uR\x19repeatedAtLeastFiveProto2:\xb9\x01\n\x18\x64uration_too_long_proto2\x12\x1b.buf.validate.DurationRules\x18\x89\t \x01(\x08\x42\x62\xc2H_\n]\n\x18\x64uration.too_long.proto2\x12(duration can\'t be longer than 10 seconds\x1a\x17this <= duration(\'10s\')R\x15\x64urationTooLongProto2:\xc8\x01\n\x19timestamp_in_range_proto2\x12\x1c.buf.validate.TimestampRules\x18\x89\t \x01(\x08\x42n\xc2Hk\ni\n\x1btimestamp.time_range.proto2\x12\x16timestamp out of range\x1a\x32int(this) >= 1049587200 && int(this) <= 1080432000R\x16timestampInRangeProto2B\xdc\x01\n\"com.buf.validate.conformance.casesB\x1aPredefinedRulesProto2ProtoP\x01\xa2\x02\x04\x42VCC\xaa\x02\x1e\x42uf.Validate.Conformance.Cases\xca\x02\x1e\x42uf\\Validate\\Conformance\\Cases\xe2\x02*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\xea\x02!Buf::Validate::Conformance::Cases') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n 24 ? \'\' : \'a must be greater than 24\'R\x01\x61\x12\xb4\x01\n\x01\x62\x18\x02 \x01(\x0b\x32\x44.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.NestedB`\xbaH]\xba\x01Z\n*predefined_and_custom_rule_embedded_proto2\x12\x1b\x62.c must be a multiple of 3\x1a\x0fthis.c % 3 == 0R\x01\x62\x1as\n\x06Nested\x12i\n\x01\x63\x18\x01 \x01(\x11\x42[\xbaHX:\x03\xc8H\x01\xba\x01P\n(predefined_and_custom_rule_nested_proto2\x1a$this > 0 ? \'\' : \'c must be positive\'R\x01\x63\"\xa5\x01\n%StandardPredefinedAndCustomRuleProto2\x12|\n\x01\x61\x18\x01 \x01(\x11\x42n\xbaHk:\x05\x10\x38\xc8H\x01\xba\x01\x61\n1standard_predefined_and_custom_rule_scalar_proto2\x1a,this > 24 ? \'\' : \'a must be greater than 24\'R\x01\x61:\xa9\x01\n\x16\x66loat_abs_range_proto2\x12\x18.buf.validate.FloatRules\x18\x89\t \x01(\x02\x42Y\xc2HV\nT\n\x16\x66loat.abs_range.proto2\x12\x1b\x66loat value is out of range\x1a\x1dthis >= -rule && this <= ruleR\x13\x66loatAbsRangeProto2:\xae\x01\n\x17\x64ouble_abs_range_proto2\x12\x19.buf.validate.DoubleRules\x18\x89\t \x01(\x01\x42[\xc2HX\nV\n\x17\x64ouble.abs_range.proto2\x12\x1c\x64ouble value is out of range\x1a\x1dthis >= -rule && this <= ruleR\x14\x64oubleAbsRangeProto2:\xb0\x01\n\x13int32_abs_in_proto2\x12\x18.buf.validate.Int32Rules\x18\x89\t \x03(\x05\x42\x66\xc2Hc\na\n\x13int32.abs_in.proto2\x12!must be in absolute value of list\x1a\'this in rule || this in rule.map(n, -n)R\x10int32AbsInProto2:\xcd\x01\n\x13int64_abs_in_proto2\x12\x18.buf.validate.Int64Rules\x18\x89\t \x03(\x0b\x32\x1b.google.protobuf.Int64ValueBf\xc2Hc\na\n\x13int64.abs_in.proto2\x12!must be in absolute value of list\x1a\'this in rule || this in rule.map(n, -n)R\x10int64AbsInProto2:\x8e\x01\n\x12uint32_even_proto2\x12\x19.buf.validate.UInt32Rules\x18\x89\t \x01(\x08\x42\x44\xc2HA\n?\n\x12uint32.even.proto2\x12\x18uint32 value is not even\x1a\x0fthis % 2u == 0uR\x10uint32EvenProto2:\x8e\x01\n\x12uint64_even_proto2\x12\x19.buf.validate.UInt64Rules\x18\x89\t \x01(\x08\x42\x44\xc2HA\n?\n\x12uint64.even.proto2\x12\x18uint64 value is not even\x1a\x0fthis % 2u == 0uR\x10uint64EvenProto2:\x8c\x01\n\x12sint32_even_proto2\x12\x19.buf.validate.SInt32Rules\x18\x89\t \x01(\x08\x42\x42\xc2H?\n=\n\x12sint32.even.proto2\x12\x18sint32 value is not even\x1a\rthis % 2 == 0R\x10sint32EvenProto2:\x8c\x01\n\x12sint64_even_proto2\x12\x19.buf.validate.SInt64Rules\x18\x89\t \x01(\x08\x42\x42\xc2H?\n=\n\x12sint64.even.proto2\x12\x18sint64 value is not even\x1a\rthis % 2 == 0R\x10sint64EvenProto2:\x93\x01\n\x13\x66ixed32_even_proto2\x12\x1a.buf.validate.Fixed32Rules\x18\x89\t \x01(\x08\x42\x46\xc2HC\nA\n\x13\x66ixed32.even.proto2\x12\x19\x66ixed32 value is not even\x1a\x0fthis % 2u == 0uR\x11\x66ixed32EvenProto2:\x93\x01\n\x13\x66ixed64_even_proto2\x12\x1a.buf.validate.Fixed64Rules\x18\x89\t \x01(\x08\x42\x46\xc2HC\nA\n\x13\x66ixed64.even.proto2\x12\x19\x66ixed64 value is not even\x1a\x0fthis % 2u == 0uR\x11\x66ixed64EvenProto2:\x96\x01\n\x14sfixed32_even_proto2\x12\x1b.buf.validate.SFixed32Rules\x18\x89\t \x01(\x08\x42\x46\xc2HC\nA\n\x14sfixed32.even.proto2\x12\x1asfixed32 value is not even\x1a\rthis % 2 == 0R\x12sfixed32EvenProto2:\x96\x01\n\x14sfixed64_even_proto2\x12\x1b.buf.validate.SFixed64Rules\x18\x89\t \x01(\x08\x42\x46\xc2HC\nA\n\x14sfixed64.even.proto2\x12\x1asfixed64 value is not even\x1a\rthis % 2 == 0R\x12sfixed64EvenProto2:\x86\x01\n\x11\x62ool_false_proto2\x12\x17.buf.validate.BoolRules\x18\x89\t \x01(\x08\x42@\xc2H=\n;\n\x11\x62ool.false.proto2\x12\x17\x62ool value is not false\x1a\rthis == falseR\x0f\x62oolFalseProto2:\xfe\x01\n\x18string_valid_path_proto2\x12\x19.buf.validate.StringRules\x18\x89\t \x01(\x08\x42\xa8\x01\xc2H\xa4\x01\n\xa1\x01\n\x18string.valid_path.proto2\x1a\x84\x01!this.matches(\'^([^/.][^/]?|[^/][^/.]|[^/]{3,})(/([^/.][^/]?|[^/][^/.]|[^/]{3,}))*$\') ? \'not a valid path: `%s`\'.format([this]) : \'\'R\x15stringValidPathProto2:\x82\x02\n\x17\x62ytes_valid_path_proto2\x12\x18.buf.validate.BytesRules\x18\x89\t \x01(\x08\x42\xaf\x01\xc2H\xab\x01\n\xa8\x01\n\x17\x62ytes.valid_path.proto2\x1a\x8c\x01!string(this).matches(\'^([^/.][^/]?|[^/][^/.]|[^/]{3,})(/([^/.][^/]?|[^/][^/.]|[^/]{3,}))*$\') ? \'not a valid path: `%s`\'.format([this]) : \'\'R\x14\x62ytesValidPathProto2:\x92\x01\n\x14\x65num_non_zero_proto2\x12\x17.buf.validate.EnumRules\x18\x89\t \x01(\x08\x42G\xc2HD\nB\n\x14\x65num.non_zero.proto2\x12\x1a\x65num value is not non-zero\x1a\x0eint(this) != 0R\x11\x65numNonZeroProto2:\xcc\x01\n\x1drepeated_at_least_five_proto2\x12\x1b.buf.validate.RepeatedRules\x18\x89\t \x01(\x08\x42l\xc2Hi\ng\n\x1drepeated.at_least_five.proto2\x12-repeated field must have at least five values\x1a\x17uint(this.size()) >= 5uR\x19repeatedAtLeastFiveProto2:\xb9\x01\n\x18\x64uration_too_long_proto2\x12\x1b.buf.validate.DurationRules\x18\x89\t \x01(\x08\x42\x62\xc2H_\n]\n\x18\x64uration.too_long.proto2\x12(duration can\'t be longer than 10 seconds\x1a\x17this <= duration(\'10s\')R\x15\x64urationTooLongProto2:\xc8\x01\n\x19timestamp_in_range_proto2\x12\x1c.buf.validate.TimestampRules\x18\x89\t \x01(\x08\x42n\xc2Hk\ni\n\x1btimestamp.time_range.proto2\x12\x16timestamp out of range\x1a\x32int(this) >= 1049587200 && int(this) <= 1080432000R\x16timestampInRangeProto2') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'buf.validate.conformance.cases.predefined_rules_proto2_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\"com.buf.validate.conformance.casesB\032PredefinedRulesProto2ProtoP\001\242\002\004BVCC\252\002\036Buf.Validate.Conformance.Cases\312\002\036Buf\\Validate\\Conformance\\Cases\342\002*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\352\002!Buf::Validate::Conformance::Cases' + DESCRIPTOR._loaded_options = None _globals['float_abs_range_proto2']._loaded_options = None _globals['float_abs_range_proto2']._serialized_options = b'\302HV\nT\n\026float.abs_range.proto2\022\033float value is out of range\032\035this >= -rule && this <= rule' _globals['double_abs_range_proto2']._loaded_options = None diff --git a/packages/protovalidate-proto/src/buf/validate/conformance/cases/predefined_rules_proto3_pb2.py b/packages/protovalidate-proto/src/buf/validate/conformance/cases/predefined_rules_proto3_pb2.py index 5b77b2ff..9591dabb 100644 --- a/packages/protovalidate-proto/src/buf/validate/conformance/cases/predefined_rules_proto3_pb2.py +++ b/packages/protovalidate-proto/src/buf/validate/conformance/cases/predefined_rules_proto3_pb2.py @@ -34,14 +34,13 @@ from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n 24 ? \'\' : \'a must be greater than 24\'R\x01\x61\x12\xb9\x01\n\x01\x62\x18\x02 \x01(\x0b\x32\x44.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.NestedB`\xbaH]\xba\x01Z\n*predefined_and_custom_rule_embedded_proto3\x12\x1b\x62.c must be a multiple of 3\x1a\x0fthis.c % 3 == 0H\x00R\x01\x62\x88\x01\x01\x1as\n\x06Nested\x12i\n\x01\x63\x18\x01 \x01(\x11\x42[\xbaHX:\x03\xd0H\x01\xba\x01P\n(predefined_and_custom_rule_nested_proto3\x1a$this > 0 ? \'\' : \'c must be positive\'R\x01\x63\x42\x04\n\x02_b\"\xa5\x01\n%StandardPredefinedAndCustomRuleProto3\x12|\n\x01\x61\x18\x01 \x01(\x11\x42n\xbaHk:\x05\x10\x38\xc8H\x01\xba\x01\x61\n1standard_predefined_and_custom_rule_scalar_proto3\x1a,this > 24 ? \'\' : \'a must be greater than 24\'R\x01\x61\"\xf5\x01\n.PredefinedRulesProto3UnusedImportBugWorkaround\x12^\n\x07\x64ummy_1\x18\x01 \x01(\x0b\x32\x45.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2R\x06\x64ummy1\x12\x63\n\x07\x64ummy_2\x18\x02 \x01(\x0b\x32J.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023R\x06\x64ummy2B\xdc\x01\n\"com.buf.validate.conformance.casesB\x1aPredefinedRulesProto3ProtoP\x01\xa2\x02\x04\x42VCC\xaa\x02\x1e\x42uf.Validate.Conformance.Cases\xca\x02\x1e\x42uf\\Validate\\Conformance\\Cases\xe2\x02*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\xea\x02!Buf::Validate::Conformance::Casesb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n 24 ? \'\' : \'a must be greater than 24\'R\x01\x61\x12\xb9\x01\n\x01\x62\x18\x02 \x01(\x0b\x32\x44.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.NestedB`\xbaH]\xba\x01Z\n*predefined_and_custom_rule_embedded_proto3\x12\x1b\x62.c must be a multiple of 3\x1a\x0fthis.c % 3 == 0H\x00R\x01\x62\x88\x01\x01\x1as\n\x06Nested\x12i\n\x01\x63\x18\x01 \x01(\x11\x42[\xbaHX:\x03\xd0H\x01\xba\x01P\n(predefined_and_custom_rule_nested_proto3\x1a$this > 0 ? \'\' : \'c must be positive\'R\x01\x63\x42\x04\n\x02_b\"\xa5\x01\n%StandardPredefinedAndCustomRuleProto3\x12|\n\x01\x61\x18\x01 \x01(\x11\x42n\xbaHk:\x05\x10\x38\xc8H\x01\xba\x01\x61\n1standard_predefined_and_custom_rule_scalar_proto3\x1a,this > 24 ? \'\' : \'a must be greater than 24\'R\x01\x61\"\xf5\x01\n.PredefinedRulesProto3UnusedImportBugWorkaround\x12^\n\x07\x64ummy_1\x18\x01 \x01(\x0b\x32\x45.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2R\x06\x64ummy1\x12\x63\n\x07\x64ummy_2\x18\x02 \x01(\x0b\x32J.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023R\x06\x64ummy2b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'buf.validate.conformance.cases.predefined_rules_proto3_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\"com.buf.validate.conformance.casesB\032PredefinedRulesProto3ProtoP\001\242\002\004BVCC\252\002\036Buf.Validate.Conformance.Cases\312\002\036Buf\\Validate\\Conformance\\Cases\342\002*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\352\002!Buf::Validate::Conformance::Cases' + DESCRIPTOR._loaded_options = None _globals['_PREDEFINEDFLOATRULEPROTO3'].fields_by_name['val']._loaded_options = None _globals['_PREDEFINEDFLOATRULEPROTO3'].fields_by_name['val']._serialized_options = b'\272H\010\n\006\315H\000\000\200?' _globals['_PREDEFINEDDOUBLERULEPROTO3'].fields_by_name['val']._loaded_options = None diff --git a/packages/protovalidate-proto/src/buf/validate/conformance/cases/predefined_rules_proto_editions_pb2.py b/packages/protovalidate-proto/src/buf/validate/conformance/cases/predefined_rules_proto_editions_pb2.py index 5f88bc35..1dfd44e7 100644 --- a/packages/protovalidate-proto/src/buf/validate/conformance/cases/predefined_rules_proto_editions_pb2.py +++ b/packages/protovalidate-proto/src/buf/validate/conformance/cases/predefined_rules_proto_editions_pb2.py @@ -32,14 +32,13 @@ from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\nDbuf/validate/conformance/cases/predefined_rules_proto_editions.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"?\n\x1ePredefinedFloatRuleEdition2023\x12\x1d\n\x03val\x18\x01 \x01(\x02\x42\x0b\xbaH\x08\n\x06\xd5H\x00\x00\x80?R\x03val\"D\n\x1fPredefinedDoubleRuleEdition2023\x12!\n\x03val\x18\x01 \x01(\x01\x42\x0f\xbaH\x0c\x12\n\xd1H\x00\x00\x00\x00\x00\x00\xf0?R\x03val\"F\n\x1ePredefinedInt32RuleEdition2023\x12$\n\x03val\x18\x01 \x01(\x05\x42\x12\xbaH\x0f\x1a\r\xd2H\n\xfe\xff\xff\xff\xff\xff\xff\xff\xff\x01R\x03val\"G\n\x1ePredefinedInt64RuleEdition2023\x12%\n\x03val\x18\x01 \x01(\x03\x42\x13\xbaH\x10\"\x0e\xd2H\x0b\x08\xfe\xff\xff\xff\xff\xff\xff\xff\xff\x01R\x03val\"=\n\x1fPredefinedUInt32RuleEdition2023\x12\x1a\n\x03val\x18\x01 \x01(\rB\x08\xbaH\x05*\x03\xd0H\x01R\x03val\"=\n\x1fPredefinedUInt64RuleEdition2023\x12\x1a\n\x03val\x18\x01 \x01(\x04\x42\x08\xbaH\x05\x32\x03\xd0H\x01R\x03val\"=\n\x1fPredefinedSInt32RuleEdition2023\x12\x1a\n\x03val\x18\x01 \x01(\x11\x42\x08\xbaH\x05:\x03\xd0H\x01R\x03val\"=\n\x1fPredefinedSInt64RuleEdition2023\x12\x1a\n\x03val\x18\x01 \x01(\x12\x42\x08\xbaH\x05\x42\x03\xd0H\x01R\x03val\">\n PredefinedFixed32RuleEdition2023\x12\x1a\n\x03val\x18\x01 \x01(\x07\x42\x08\xbaH\x05J\x03\xd0H\x01R\x03val\">\n PredefinedFixed64RuleEdition2023\x12\x1a\n\x03val\x18\x01 \x01(\x06\x42\x08\xbaH\x05R\x03\xd0H\x01R\x03val\"?\n!PredefinedSFixed32RuleEdition2023\x12\x1a\n\x03val\x18\x01 \x01(\x0f\x42\x08\xbaH\x05Z\x03\xd0H\x01R\x03val\"?\n!PredefinedSFixed64RuleEdition2023\x12\x1a\n\x03val\x18\x01 \x01(\x10\x42\x08\xbaH\x05\x62\x03\xd0H\x01R\x03val\";\n\x1dPredefinedBoolRuleEdition2023\x12\x1a\n\x03val\x18\x01 \x01(\x08\x42\x08\xbaH\x05j\x03\xd0H\x01R\x03val\"=\n\x1fPredefinedStringRuleEdition2023\x12\x1a\n\x03val\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xd0H\x01R\x03val\"<\n\x1ePredefinedBytesRuleEdition2023\x12\x1a\n\x03val\x18\x01 \x01(\x0c\x42\x08\xbaH\x05z\x03\xd0H\x01R\x03val\"\xdf\x01\n\x1dPredefinedEnumRuleEdition2023\x12j\n\x03val\x18\x01 \x01(\x0e\x32M.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023.EnumEdition2023B\t\xbaH\x06\x82\x01\x03\xd0H\x01R\x03val\"R\n\x0f\x45numEdition2023\x12%\n!ENUM_EDITION2023_ZERO_UNSPECIFIED\x10\x00\x12\x18\n\x14\x45NUM_EDITION2023_ONE\x10\x01\"@\n!PredefinedRepeatedRuleEdition2023\x12\x1b\n\x03val\x18\x01 \x03(\x04\x42\t\xbaH\x06\x92\x01\x03\xd0H\x01R\x03val\"\xba\x01\n\x1cPredefinedMapRuleEdition2023\x12\x62\n\x03val\x18\x01 \x03(\x0b\x32\x45.buf.validate.conformance.cases.PredefinedMapRuleEdition2023.ValEntryB\t\xbaH\x06\x9a\x01\x03\xd0H\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x04R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x04R\x05value:\x02\x38\x01\"[\n!PredefinedDurationRuleEdition2023\x12\x36\n\x03val\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\t\xbaH\x06\xaa\x01\x03\xd0H\x01R\x03val\"]\n\"PredefinedTimestampRuleEdition2023\x12\x37\n\x03val\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\xbaH\x06\xb2\x01\x03\xd0H\x01R\x03val\"c\n%PredefinedWrappedFloatRuleEdition2023\x12:\n\x03val\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.FloatValueB\x0b\xbaH\x08\n\x06\xd5H\x00\x00\x80?R\x03val\"i\n&PredefinedWrappedDoubleRuleEdition2023\x12?\n\x03val\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x0f\xbaH\x0c\x12\n\xd1H\x00\x00\x00\x00\x00\x00\xf0?R\x03val\"j\n%PredefinedWrappedInt32RuleEdition2023\x12\x41\n\x03val\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x12\xbaH\x0f\x1a\r\xd2H\n\xfe\xff\xff\xff\xff\xff\xff\xff\xff\x01R\x03val\"k\n%PredefinedWrappedInt64RuleEdition2023\x12\x42\n\x03val\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.Int64ValueB\x13\xbaH\x10\"\x0e\xd2H\x0b\x08\xfe\xff\xff\xff\xff\xff\xff\xff\xff\x01R\x03val\"b\n&PredefinedWrappedUInt32RuleEdition2023\x12\x38\n\x03val\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.UInt32ValueB\x08\xbaH\x05*\x03\xd0H\x01R\x03val\"b\n&PredefinedWrappedUInt64RuleEdition2023\x12\x38\n\x03val\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.UInt64ValueB\x08\xbaH\x05\x32\x03\xd0H\x01R\x03val\"^\n$PredefinedWrappedBoolRuleEdition2023\x12\x36\n\x03val\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x08\xbaH\x05j\x03\xd0H\x01R\x03val\"b\n&PredefinedWrappedStringRuleEdition2023\x12\x38\n\x03val\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.StringValueB\x08\xbaH\x05r\x03\xd0H\x01R\x03val\"`\n%PredefinedWrappedBytesRuleEdition2023\x12\x37\n\x03val\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.BytesValueB\x08\xbaH\x05z\x03\xd0H\x01R\x03val\"p\n-PredefinedRepeatedWrappedFloatRuleEdition2023\x12?\n\x03val\x18\x01 \x03(\x0b\x32\x1b.google.protobuf.FloatValueB\x10\xbaH\r\x92\x01\n\"\x08\n\x06\xd5H\x00\x00\x80?R\x03val\"v\n.PredefinedRepeatedWrappedDoubleRuleEdition2023\x12\x44\n\x03val\x18\x01 \x03(\x0b\x32\x1c.google.protobuf.DoubleValueB\x14\xbaH\x11\x92\x01\x0e\"\x0c\x12\n\xd1H\x00\x00\x00\x00\x00\x00\xf0?R\x03val\"w\n-PredefinedRepeatedWrappedInt32RuleEdition2023\x12\x46\n\x03val\x18\x01 \x03(\x0b\x32\x1b.google.protobuf.Int32ValueB\x17\xbaH\x14\x92\x01\x11\"\x0f\x1a\r\xd2H\n\xfe\xff\xff\xff\xff\xff\xff\xff\xff\x01R\x03val\"x\n-PredefinedRepeatedWrappedInt64RuleEdition2023\x12G\n\x03val\x18\x01 \x03(\x0b\x32\x1b.google.protobuf.Int64ValueB\x18\xbaH\x15\x92\x01\x12\"\x10\"\x0e\xd2H\x0b\x08\xfe\xff\xff\xff\xff\xff\xff\xff\xff\x01R\x03val\"o\n.PredefinedRepeatedWrappedUInt32RuleEdition2023\x12=\n\x03val\x18\x01 \x03(\x0b\x32\x1c.google.protobuf.UInt32ValueB\r\xbaH\n\x92\x01\x07\"\x05*\x03\xd0H\x01R\x03val\"o\n.PredefinedRepeatedWrappedUInt64RuleEdition2023\x12=\n\x03val\x18\x01 \x03(\x0b\x32\x1c.google.protobuf.UInt64ValueB\r\xbaH\n\x92\x01\x07\"\x05\x32\x03\xd0H\x01R\x03val\"k\n,PredefinedRepeatedWrappedBoolRuleEdition2023\x12;\n\x03val\x18\x01 \x03(\x0b\x32\x1a.google.protobuf.BoolValueB\r\xbaH\n\x92\x01\x07\"\x05j\x03\xd0H\x01R\x03val\"o\n.PredefinedRepeatedWrappedStringRuleEdition2023\x12=\n\x03val\x18\x01 \x03(\x0b\x32\x1c.google.protobuf.StringValueB\r\xbaH\n\x92\x01\x07\"\x05r\x03\xd0H\x01R\x03val\"m\n-PredefinedRepeatedWrappedBytesRuleEdition2023\x12<\n\x03val\x18\x01 \x03(\x0b\x32\x1b.google.protobuf.BytesValueB\r\xbaH\n\x92\x01\x07\"\x05z\x03\xd0H\x01R\x03val\"\xda\x03\n\"PredefinedAndCustomRuleEdition2023\x12w\n\x01\x61\x18\x01 \x01(\x11\x42i\xbaHf:\x03\xd0H\x01\xba\x01^\n.predefined_and_custom_rule_scalar_edition_2023\x1a,this > 24 ? \'\' : \'a must be greater than 24\'R\x01\x61\x12\xbf\x01\n\x01\x62\x18\x02 \x01(\x0b\x32I.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.NestedBf\xbaHc\xba\x01`\n0predefined_and_custom_rule_embedded_edition_2023\x12\x1b\x62.c must be a multiple of 3\x1a\x0fthis.c % 3 == 0R\x01\x62\x1ay\n\x06Nested\x12o\n\x01\x63\x18\x01 \x01(\x11\x42\x61\xbaH^:\x03\xd0H\x01\xba\x01V\n.predefined_and_custom_rule_nested_edition_2023\x1a$this > 0 ? \'\' : \'c must be positive\'R\x01\x63\"\xb1\x01\n*StandardPredefinedAndCustomRuleEdition2023\x12\x82\x01\n\x01\x61\x18\x01 \x01(\x11\x42t\xbaHq:\x05\x10\x38\xd0H\x01\xba\x01g\n7standard_predefined_and_custom_rule_scalar_edition_2023\x1a,this > 24 ? \'\' : \'a must be greater than 24\'R\x01\x61:\xba\x01\n\x1c\x66loat_abs_range_edition_2023\x12\x18.buf.validate.FloatRules\x18\x8a\t \x01(\x02\x42_\xc2H\\\nZ\n\x1c\x66loat.abs_range.edition_2023\x12\x1b\x66loat value is out of range\x1a\x1dthis >= -rule && this <= ruleR\x18\x66loatAbsRangeEdition2023:\xbf\x01\n\x1d\x64ouble_abs_range_edition_2023\x12\x19.buf.validate.DoubleRules\x18\x8a\t \x01(\x01\x42\x61\xc2H^\n\\\n\x1d\x64ouble.abs_range.edition_2023\x12\x1c\x64ouble value is out of range\x1a\x1dthis >= -rule && this <= ruleR\x19\x64oubleAbsRangeEdition2023:\xc1\x01\n\x19int32_abs_in_edition_2023\x12\x18.buf.validate.Int32Rules\x18\x8a\t \x03(\x05\x42l\xc2Hi\ng\n\x19int32.abs_in.edition_2023\x12!must be in absolute value of list\x1a\'this in rule || this in rule.map(n, -n)R\x15int32AbsInEdition2023:\xde\x01\n\x19int64_abs_in_edition_2023\x12\x18.buf.validate.Int64Rules\x18\x8a\t \x03(\x0b\x32\x1b.google.protobuf.Int64ValueBl\xc2Hi\ng\n\x19int64.abs_in.edition_2023\x12!must be in absolute value of list\x1a\'this in rule || this in rule.map(n, -n)R\x15int64AbsInEdition2023:\x9f\x01\n\x18uint32_even_edition_2023\x12\x19.buf.validate.UInt32Rules\x18\x8a\t \x01(\x08\x42J\xc2HG\nE\n\x18uint32.even.edition_2023\x12\x18uint32 value is not even\x1a\x0fthis % 2u == 0uR\x15uint32EvenEdition2023:\x9f\x01\n\x18uint64_even_edition_2023\x12\x19.buf.validate.UInt64Rules\x18\x8a\t \x01(\x08\x42J\xc2HG\nE\n\x18uint64.even.edition_2023\x12\x18uint64 value is not even\x1a\x0fthis % 2u == 0uR\x15uint64EvenEdition2023:\x9d\x01\n\x18sint32_even_edition_2023\x12\x19.buf.validate.SInt32Rules\x18\x8a\t \x01(\x08\x42H\xc2HE\nC\n\x18sint32.even.edition_2023\x12\x18sint32 value is not even\x1a\rthis % 2 == 0R\x15sint32EvenEdition2023:\x9d\x01\n\x18sint64_even_edition_2023\x12\x19.buf.validate.SInt64Rules\x18\x8a\t \x01(\x08\x42H\xc2HE\nC\n\x18sint64.even.edition_2023\x12\x18sint64 value is not even\x1a\rthis % 2 == 0R\x15sint64EvenEdition2023:\xa4\x01\n\x19\x66ixed32_even_edition_2023\x12\x1a.buf.validate.Fixed32Rules\x18\x8a\t \x01(\x08\x42L\xc2HI\nG\n\x19\x66ixed32.even.edition_2023\x12\x19\x66ixed32 value is not even\x1a\x0fthis % 2u == 0uR\x16\x66ixed32EvenEdition2023:\xa4\x01\n\x19\x66ixed64_even_edition_2023\x12\x1a.buf.validate.Fixed64Rules\x18\x8a\t \x01(\x08\x42L\xc2HI\nG\n\x19\x66ixed64.even.edition_2023\x12\x19\x66ixed64 value is not even\x1a\x0fthis % 2u == 0uR\x16\x66ixed64EvenEdition2023:\xa7\x01\n\x1asfixed32_even_edition_2023\x12\x1b.buf.validate.SFixed32Rules\x18\x8a\t \x01(\x08\x42L\xc2HI\nG\n\x1asfixed32.even.edition_2023\x12\x1asfixed32 value is not even\x1a\rthis % 2 == 0R\x17sfixed32EvenEdition2023:\xa7\x01\n\x1asfixed64_even_edition_2023\x12\x1b.buf.validate.SFixed64Rules\x18\x8a\t \x01(\x08\x42L\xc2HI\nG\n\x1asfixed64.even.edition_2023\x12\x1asfixed64 value is not even\x1a\rthis % 2 == 0R\x17sfixed64EvenEdition2023:\x97\x01\n\x17\x62ool_false_edition_2023\x12\x17.buf.validate.BoolRules\x18\x8a\t \x01(\x08\x42\x46\xc2HC\nA\n\x17\x62ool.false.edition_2023\x12\x17\x62ool value is not false\x1a\rthis == falseR\x14\x62oolFalseEdition2023:\x8f\x02\n\x1estring_valid_path_edition_2023\x12\x19.buf.validate.StringRules\x18\x8a\t \x01(\x08\x42\xae\x01\xc2H\xaa\x01\n\xa7\x01\n\x1estring.valid_path.edition_2023\x1a\x84\x01!this.matches(\'^([^/.][^/]?|[^/][^/.]|[^/]{3,})(/([^/.][^/]?|[^/][^/.]|[^/]{3,}))*$\') ? \'not a valid path: `%s`\'.format([this]) : \'\'R\x1astringValidPathEdition2023:\x93\x02\n\x1d\x62ytes_valid_path_edition_2023\x12\x18.buf.validate.BytesRules\x18\x8a\t \x01(\x08\x42\xb5\x01\xc2H\xb1\x01\n\xae\x01\n\x1d\x62ytes.valid_path.edition_2023\x1a\x8c\x01!string(this).matches(\'^([^/.][^/]?|[^/][^/.]|[^/]{3,})(/([^/.][^/]?|[^/][^/.]|[^/]{3,}))*$\') ? \'not a valid path: `%s`\'.format([this]) : \'\'R\x19\x62ytesValidPathEdition2023:\xa3\x01\n\x1a\x65num_non_zero_edition_2023\x12\x17.buf.validate.EnumRules\x18\x8a\t \x01(\x08\x42M\xc2HJ\nH\n\x1a\x65num.non_zero.edition_2023\x12\x1a\x65num value is not non-zero\x1a\x0eint(this) != 0R\x16\x65numNonZeroEdition2023:\xdd\x01\n#repeated_at_least_five_edition_2023\x12\x1b.buf.validate.RepeatedRules\x18\x8a\t \x01(\x08\x42r\xc2Ho\nm\n#repeated.at_least_five.edition_2023\x12-repeated field must have at least five values\x1a\x17uint(this.size()) >= 5uR\x1erepeatedAtLeastFiveEdition2023:\xbd\x01\n\x1emap_at_least_five_edition_2023\x12\x16.buf.validate.MapRules\x18\x8a\t \x01(\x08\x42\x61\xc2H^\n\\\n\x1emap.at_least_five.edition_2023\x12!map must have at least five pairs\x1a\x17uint(this.size()) >= 5uR\x19mapAtLeastFiveEdition2023:\xca\x01\n\x1e\x64uration_too_long_edition_2023\x12\x1b.buf.validate.DurationRules\x18\x8a\t \x01(\x08\x42h\xc2He\nc\n\x1e\x64uration.too_long.edition_2023\x12(duration can\'t be longer than 10 seconds\x1a\x17this <= duration(\'10s\')R\x1a\x64urationTooLongEdition2023:\xd9\x01\n\x1ftimestamp_in_range_edition_2023\x12\x1c.buf.validate.TimestampRules\x18\x8a\t \x01(\x08\x42t\xc2Hq\no\n!timestamp.time_range.edition_2023\x12\x16timestamp out of range\x1a\x32int(this) >= 1049587200 && int(this) <= 1080432000R\x1btimestampInRangeEdition2023B\xe3\x01\n\"com.buf.validate.conformance.casesB!PredefinedRulesProtoEditionsProtoP\x01\xa2\x02\x04\x42VCC\xaa\x02\x1e\x42uf.Validate.Conformance.Cases\xca\x02\x1e\x42uf\\Validate\\Conformance\\Cases\xe2\x02*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\xea\x02!Buf::Validate::Conformance::Casesb\x08\x65\x64itionsp\xe8\x07') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\nDbuf/validate/conformance/cases/predefined_rules_proto_editions.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"?\n\x1ePredefinedFloatRuleEdition2023\x12\x1d\n\x03val\x18\x01 \x01(\x02\x42\x0b\xbaH\x08\n\x06\xd5H\x00\x00\x80?R\x03val\"D\n\x1fPredefinedDoubleRuleEdition2023\x12!\n\x03val\x18\x01 \x01(\x01\x42\x0f\xbaH\x0c\x12\n\xd1H\x00\x00\x00\x00\x00\x00\xf0?R\x03val\"F\n\x1ePredefinedInt32RuleEdition2023\x12$\n\x03val\x18\x01 \x01(\x05\x42\x12\xbaH\x0f\x1a\r\xd2H\n\xfe\xff\xff\xff\xff\xff\xff\xff\xff\x01R\x03val\"G\n\x1ePredefinedInt64RuleEdition2023\x12%\n\x03val\x18\x01 \x01(\x03\x42\x13\xbaH\x10\"\x0e\xd2H\x0b\x08\xfe\xff\xff\xff\xff\xff\xff\xff\xff\x01R\x03val\"=\n\x1fPredefinedUInt32RuleEdition2023\x12\x1a\n\x03val\x18\x01 \x01(\rB\x08\xbaH\x05*\x03\xd0H\x01R\x03val\"=\n\x1fPredefinedUInt64RuleEdition2023\x12\x1a\n\x03val\x18\x01 \x01(\x04\x42\x08\xbaH\x05\x32\x03\xd0H\x01R\x03val\"=\n\x1fPredefinedSInt32RuleEdition2023\x12\x1a\n\x03val\x18\x01 \x01(\x11\x42\x08\xbaH\x05:\x03\xd0H\x01R\x03val\"=\n\x1fPredefinedSInt64RuleEdition2023\x12\x1a\n\x03val\x18\x01 \x01(\x12\x42\x08\xbaH\x05\x42\x03\xd0H\x01R\x03val\">\n PredefinedFixed32RuleEdition2023\x12\x1a\n\x03val\x18\x01 \x01(\x07\x42\x08\xbaH\x05J\x03\xd0H\x01R\x03val\">\n PredefinedFixed64RuleEdition2023\x12\x1a\n\x03val\x18\x01 \x01(\x06\x42\x08\xbaH\x05R\x03\xd0H\x01R\x03val\"?\n!PredefinedSFixed32RuleEdition2023\x12\x1a\n\x03val\x18\x01 \x01(\x0f\x42\x08\xbaH\x05Z\x03\xd0H\x01R\x03val\"?\n!PredefinedSFixed64RuleEdition2023\x12\x1a\n\x03val\x18\x01 \x01(\x10\x42\x08\xbaH\x05\x62\x03\xd0H\x01R\x03val\";\n\x1dPredefinedBoolRuleEdition2023\x12\x1a\n\x03val\x18\x01 \x01(\x08\x42\x08\xbaH\x05j\x03\xd0H\x01R\x03val\"=\n\x1fPredefinedStringRuleEdition2023\x12\x1a\n\x03val\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xd0H\x01R\x03val\"<\n\x1ePredefinedBytesRuleEdition2023\x12\x1a\n\x03val\x18\x01 \x01(\x0c\x42\x08\xbaH\x05z\x03\xd0H\x01R\x03val\"\xdf\x01\n\x1dPredefinedEnumRuleEdition2023\x12j\n\x03val\x18\x01 \x01(\x0e\x32M.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023.EnumEdition2023B\t\xbaH\x06\x82\x01\x03\xd0H\x01R\x03val\"R\n\x0f\x45numEdition2023\x12%\n!ENUM_EDITION2023_ZERO_UNSPECIFIED\x10\x00\x12\x18\n\x14\x45NUM_EDITION2023_ONE\x10\x01\"@\n!PredefinedRepeatedRuleEdition2023\x12\x1b\n\x03val\x18\x01 \x03(\x04\x42\t\xbaH\x06\x92\x01\x03\xd0H\x01R\x03val\"\xba\x01\n\x1cPredefinedMapRuleEdition2023\x12\x62\n\x03val\x18\x01 \x03(\x0b\x32\x45.buf.validate.conformance.cases.PredefinedMapRuleEdition2023.ValEntryB\t\xbaH\x06\x9a\x01\x03\xd0H\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\x04R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x04R\x05value:\x02\x38\x01\"[\n!PredefinedDurationRuleEdition2023\x12\x36\n\x03val\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\t\xbaH\x06\xaa\x01\x03\xd0H\x01R\x03val\"]\n\"PredefinedTimestampRuleEdition2023\x12\x37\n\x03val\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\xbaH\x06\xb2\x01\x03\xd0H\x01R\x03val\"c\n%PredefinedWrappedFloatRuleEdition2023\x12:\n\x03val\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.FloatValueB\x0b\xbaH\x08\n\x06\xd5H\x00\x00\x80?R\x03val\"i\n&PredefinedWrappedDoubleRuleEdition2023\x12?\n\x03val\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x0f\xbaH\x0c\x12\n\xd1H\x00\x00\x00\x00\x00\x00\xf0?R\x03val\"j\n%PredefinedWrappedInt32RuleEdition2023\x12\x41\n\x03val\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x12\xbaH\x0f\x1a\r\xd2H\n\xfe\xff\xff\xff\xff\xff\xff\xff\xff\x01R\x03val\"k\n%PredefinedWrappedInt64RuleEdition2023\x12\x42\n\x03val\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.Int64ValueB\x13\xbaH\x10\"\x0e\xd2H\x0b\x08\xfe\xff\xff\xff\xff\xff\xff\xff\xff\x01R\x03val\"b\n&PredefinedWrappedUInt32RuleEdition2023\x12\x38\n\x03val\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.UInt32ValueB\x08\xbaH\x05*\x03\xd0H\x01R\x03val\"b\n&PredefinedWrappedUInt64RuleEdition2023\x12\x38\n\x03val\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.UInt64ValueB\x08\xbaH\x05\x32\x03\xd0H\x01R\x03val\"^\n$PredefinedWrappedBoolRuleEdition2023\x12\x36\n\x03val\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x08\xbaH\x05j\x03\xd0H\x01R\x03val\"b\n&PredefinedWrappedStringRuleEdition2023\x12\x38\n\x03val\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.StringValueB\x08\xbaH\x05r\x03\xd0H\x01R\x03val\"`\n%PredefinedWrappedBytesRuleEdition2023\x12\x37\n\x03val\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.BytesValueB\x08\xbaH\x05z\x03\xd0H\x01R\x03val\"p\n-PredefinedRepeatedWrappedFloatRuleEdition2023\x12?\n\x03val\x18\x01 \x03(\x0b\x32\x1b.google.protobuf.FloatValueB\x10\xbaH\r\x92\x01\n\"\x08\n\x06\xd5H\x00\x00\x80?R\x03val\"v\n.PredefinedRepeatedWrappedDoubleRuleEdition2023\x12\x44\n\x03val\x18\x01 \x03(\x0b\x32\x1c.google.protobuf.DoubleValueB\x14\xbaH\x11\x92\x01\x0e\"\x0c\x12\n\xd1H\x00\x00\x00\x00\x00\x00\xf0?R\x03val\"w\n-PredefinedRepeatedWrappedInt32RuleEdition2023\x12\x46\n\x03val\x18\x01 \x03(\x0b\x32\x1b.google.protobuf.Int32ValueB\x17\xbaH\x14\x92\x01\x11\"\x0f\x1a\r\xd2H\n\xfe\xff\xff\xff\xff\xff\xff\xff\xff\x01R\x03val\"x\n-PredefinedRepeatedWrappedInt64RuleEdition2023\x12G\n\x03val\x18\x01 \x03(\x0b\x32\x1b.google.protobuf.Int64ValueB\x18\xbaH\x15\x92\x01\x12\"\x10\"\x0e\xd2H\x0b\x08\xfe\xff\xff\xff\xff\xff\xff\xff\xff\x01R\x03val\"o\n.PredefinedRepeatedWrappedUInt32RuleEdition2023\x12=\n\x03val\x18\x01 \x03(\x0b\x32\x1c.google.protobuf.UInt32ValueB\r\xbaH\n\x92\x01\x07\"\x05*\x03\xd0H\x01R\x03val\"o\n.PredefinedRepeatedWrappedUInt64RuleEdition2023\x12=\n\x03val\x18\x01 \x03(\x0b\x32\x1c.google.protobuf.UInt64ValueB\r\xbaH\n\x92\x01\x07\"\x05\x32\x03\xd0H\x01R\x03val\"k\n,PredefinedRepeatedWrappedBoolRuleEdition2023\x12;\n\x03val\x18\x01 \x03(\x0b\x32\x1a.google.protobuf.BoolValueB\r\xbaH\n\x92\x01\x07\"\x05j\x03\xd0H\x01R\x03val\"o\n.PredefinedRepeatedWrappedStringRuleEdition2023\x12=\n\x03val\x18\x01 \x03(\x0b\x32\x1c.google.protobuf.StringValueB\r\xbaH\n\x92\x01\x07\"\x05r\x03\xd0H\x01R\x03val\"m\n-PredefinedRepeatedWrappedBytesRuleEdition2023\x12<\n\x03val\x18\x01 \x03(\x0b\x32\x1b.google.protobuf.BytesValueB\r\xbaH\n\x92\x01\x07\"\x05z\x03\xd0H\x01R\x03val\"\xda\x03\n\"PredefinedAndCustomRuleEdition2023\x12w\n\x01\x61\x18\x01 \x01(\x11\x42i\xbaHf:\x03\xd0H\x01\xba\x01^\n.predefined_and_custom_rule_scalar_edition_2023\x1a,this > 24 ? \'\' : \'a must be greater than 24\'R\x01\x61\x12\xbf\x01\n\x01\x62\x18\x02 \x01(\x0b\x32I.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.NestedBf\xbaHc\xba\x01`\n0predefined_and_custom_rule_embedded_edition_2023\x12\x1b\x62.c must be a multiple of 3\x1a\x0fthis.c % 3 == 0R\x01\x62\x1ay\n\x06Nested\x12o\n\x01\x63\x18\x01 \x01(\x11\x42\x61\xbaH^:\x03\xd0H\x01\xba\x01V\n.predefined_and_custom_rule_nested_edition_2023\x1a$this > 0 ? \'\' : \'c must be positive\'R\x01\x63\"\xb1\x01\n*StandardPredefinedAndCustomRuleEdition2023\x12\x82\x01\n\x01\x61\x18\x01 \x01(\x11\x42t\xbaHq:\x05\x10\x38\xd0H\x01\xba\x01g\n7standard_predefined_and_custom_rule_scalar_edition_2023\x1a,this > 24 ? \'\' : \'a must be greater than 24\'R\x01\x61:\xba\x01\n\x1c\x66loat_abs_range_edition_2023\x12\x18.buf.validate.FloatRules\x18\x8a\t \x01(\x02\x42_\xc2H\\\nZ\n\x1c\x66loat.abs_range.edition_2023\x12\x1b\x66loat value is out of range\x1a\x1dthis >= -rule && this <= ruleR\x18\x66loatAbsRangeEdition2023:\xbf\x01\n\x1d\x64ouble_abs_range_edition_2023\x12\x19.buf.validate.DoubleRules\x18\x8a\t \x01(\x01\x42\x61\xc2H^\n\\\n\x1d\x64ouble.abs_range.edition_2023\x12\x1c\x64ouble value is out of range\x1a\x1dthis >= -rule && this <= ruleR\x19\x64oubleAbsRangeEdition2023:\xc1\x01\n\x19int32_abs_in_edition_2023\x12\x18.buf.validate.Int32Rules\x18\x8a\t \x03(\x05\x42l\xc2Hi\ng\n\x19int32.abs_in.edition_2023\x12!must be in absolute value of list\x1a\'this in rule || this in rule.map(n, -n)R\x15int32AbsInEdition2023:\xde\x01\n\x19int64_abs_in_edition_2023\x12\x18.buf.validate.Int64Rules\x18\x8a\t \x03(\x0b\x32\x1b.google.protobuf.Int64ValueBl\xc2Hi\ng\n\x19int64.abs_in.edition_2023\x12!must be in absolute value of list\x1a\'this in rule || this in rule.map(n, -n)R\x15int64AbsInEdition2023:\x9f\x01\n\x18uint32_even_edition_2023\x12\x19.buf.validate.UInt32Rules\x18\x8a\t \x01(\x08\x42J\xc2HG\nE\n\x18uint32.even.edition_2023\x12\x18uint32 value is not even\x1a\x0fthis % 2u == 0uR\x15uint32EvenEdition2023:\x9f\x01\n\x18uint64_even_edition_2023\x12\x19.buf.validate.UInt64Rules\x18\x8a\t \x01(\x08\x42J\xc2HG\nE\n\x18uint64.even.edition_2023\x12\x18uint64 value is not even\x1a\x0fthis % 2u == 0uR\x15uint64EvenEdition2023:\x9d\x01\n\x18sint32_even_edition_2023\x12\x19.buf.validate.SInt32Rules\x18\x8a\t \x01(\x08\x42H\xc2HE\nC\n\x18sint32.even.edition_2023\x12\x18sint32 value is not even\x1a\rthis % 2 == 0R\x15sint32EvenEdition2023:\x9d\x01\n\x18sint64_even_edition_2023\x12\x19.buf.validate.SInt64Rules\x18\x8a\t \x01(\x08\x42H\xc2HE\nC\n\x18sint64.even.edition_2023\x12\x18sint64 value is not even\x1a\rthis % 2 == 0R\x15sint64EvenEdition2023:\xa4\x01\n\x19\x66ixed32_even_edition_2023\x12\x1a.buf.validate.Fixed32Rules\x18\x8a\t \x01(\x08\x42L\xc2HI\nG\n\x19\x66ixed32.even.edition_2023\x12\x19\x66ixed32 value is not even\x1a\x0fthis % 2u == 0uR\x16\x66ixed32EvenEdition2023:\xa4\x01\n\x19\x66ixed64_even_edition_2023\x12\x1a.buf.validate.Fixed64Rules\x18\x8a\t \x01(\x08\x42L\xc2HI\nG\n\x19\x66ixed64.even.edition_2023\x12\x19\x66ixed64 value is not even\x1a\x0fthis % 2u == 0uR\x16\x66ixed64EvenEdition2023:\xa7\x01\n\x1asfixed32_even_edition_2023\x12\x1b.buf.validate.SFixed32Rules\x18\x8a\t \x01(\x08\x42L\xc2HI\nG\n\x1asfixed32.even.edition_2023\x12\x1asfixed32 value is not even\x1a\rthis % 2 == 0R\x17sfixed32EvenEdition2023:\xa7\x01\n\x1asfixed64_even_edition_2023\x12\x1b.buf.validate.SFixed64Rules\x18\x8a\t \x01(\x08\x42L\xc2HI\nG\n\x1asfixed64.even.edition_2023\x12\x1asfixed64 value is not even\x1a\rthis % 2 == 0R\x17sfixed64EvenEdition2023:\x97\x01\n\x17\x62ool_false_edition_2023\x12\x17.buf.validate.BoolRules\x18\x8a\t \x01(\x08\x42\x46\xc2HC\nA\n\x17\x62ool.false.edition_2023\x12\x17\x62ool value is not false\x1a\rthis == falseR\x14\x62oolFalseEdition2023:\x8f\x02\n\x1estring_valid_path_edition_2023\x12\x19.buf.validate.StringRules\x18\x8a\t \x01(\x08\x42\xae\x01\xc2H\xaa\x01\n\xa7\x01\n\x1estring.valid_path.edition_2023\x1a\x84\x01!this.matches(\'^([^/.][^/]?|[^/][^/.]|[^/]{3,})(/([^/.][^/]?|[^/][^/.]|[^/]{3,}))*$\') ? \'not a valid path: `%s`\'.format([this]) : \'\'R\x1astringValidPathEdition2023:\x93\x02\n\x1d\x62ytes_valid_path_edition_2023\x12\x18.buf.validate.BytesRules\x18\x8a\t \x01(\x08\x42\xb5\x01\xc2H\xb1\x01\n\xae\x01\n\x1d\x62ytes.valid_path.edition_2023\x1a\x8c\x01!string(this).matches(\'^([^/.][^/]?|[^/][^/.]|[^/]{3,})(/([^/.][^/]?|[^/][^/.]|[^/]{3,}))*$\') ? \'not a valid path: `%s`\'.format([this]) : \'\'R\x19\x62ytesValidPathEdition2023:\xa3\x01\n\x1a\x65num_non_zero_edition_2023\x12\x17.buf.validate.EnumRules\x18\x8a\t \x01(\x08\x42M\xc2HJ\nH\n\x1a\x65num.non_zero.edition_2023\x12\x1a\x65num value is not non-zero\x1a\x0eint(this) != 0R\x16\x65numNonZeroEdition2023:\xdd\x01\n#repeated_at_least_five_edition_2023\x12\x1b.buf.validate.RepeatedRules\x18\x8a\t \x01(\x08\x42r\xc2Ho\nm\n#repeated.at_least_five.edition_2023\x12-repeated field must have at least five values\x1a\x17uint(this.size()) >= 5uR\x1erepeatedAtLeastFiveEdition2023:\xbd\x01\n\x1emap_at_least_five_edition_2023\x12\x16.buf.validate.MapRules\x18\x8a\t \x01(\x08\x42\x61\xc2H^\n\\\n\x1emap.at_least_five.edition_2023\x12!map must have at least five pairs\x1a\x17uint(this.size()) >= 5uR\x19mapAtLeastFiveEdition2023:\xca\x01\n\x1e\x64uration_too_long_edition_2023\x12\x1b.buf.validate.DurationRules\x18\x8a\t \x01(\x08\x42h\xc2He\nc\n\x1e\x64uration.too_long.edition_2023\x12(duration can\'t be longer than 10 seconds\x1a\x17this <= duration(\'10s\')R\x1a\x64urationTooLongEdition2023:\xd9\x01\n\x1ftimestamp_in_range_edition_2023\x12\x1c.buf.validate.TimestampRules\x18\x8a\t \x01(\x08\x42t\xc2Hq\no\n!timestamp.time_range.edition_2023\x12\x16timestamp out of range\x1a\x32int(this) >= 1049587200 && int(this) <= 1080432000R\x1btimestampInRangeEdition2023b\x08\x65\x64itionsp\xe8\x07') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'buf.validate.conformance.cases.predefined_rules_proto_editions_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\"com.buf.validate.conformance.casesB!PredefinedRulesProtoEditionsProtoP\001\242\002\004BVCC\252\002\036Buf.Validate.Conformance.Cases\312\002\036Buf\\Validate\\Conformance\\Cases\342\002*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\352\002!Buf::Validate::Conformance::Cases' + DESCRIPTOR._loaded_options = None _globals['float_abs_range_edition_2023']._loaded_options = None _globals['float_abs_range_edition_2023']._serialized_options = b'\302H\\\nZ\n\034float.abs_range.edition_2023\022\033float value is out of range\032\035this >= -rule && this <= rule' _globals['double_abs_range_edition_2023']._loaded_options = None diff --git a/packages/protovalidate-proto/src/buf/validate/conformance/cases/repeated_pb2.py b/packages/protovalidate-proto/src/buf/validate/conformance/cases/repeated_pb2.py index 27e6bdd7..fc442aa4 100644 --- a/packages/protovalidate-proto/src/buf/validate/conformance/cases/repeated_pb2.py +++ b/packages/protovalidate-proto/src/buf/validate/conformance/cases/repeated_pb2.py @@ -32,14 +32,13 @@ from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n-buf/validate/conformance/cases/repeated.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x38\x62uf/validate/conformance/cases/other_package/embed.proto\x1a\x1b\x62uf/validate/validate.proto\x1a\x19google/protobuf/any.proto\x1a\x1egoogle/protobuf/duration.proto\"\"\n\x05\x45mbed\x12\x19\n\x03val\x18\x01 \x01(\x03\x42\x07\xbaH\x04\"\x02 \x00R\x03val\" \n\x0cRepeatedNone\x12\x10\n\x03val\x18\x01 \x03(\x03R\x03val\"L\n\x11RepeatedEmbedNone\x12\x37\n\x03val\x18\x01 \x03(\x0b\x32%.buf.validate.conformance.cases.EmbedR\x03val\"f\n\x1dRepeatedEmbedCrossPackageNone\x12\x45\n\x03val\x18\x01 \x03(\x0b\x32\x33.buf.validate.conformance.cases.other_package.EmbedR\x03val\"P\n\x0bRepeatedMin\x12\x41\n\x03val\x18\x01 \x03(\x0b\x32%.buf.validate.conformance.cases.EmbedB\x08\xbaH\x05\x92\x01\x02\x08\x02R\x03val\")\n\x0bRepeatedMax\x12\x1a\n\x03val\x18\x01 \x03(\x01\x42\x08\xbaH\x05\x92\x01\x02\x10\x03R\x03val\".\n\x0eRepeatedMinMax\x12\x1c\n\x03val\x18\x01 \x03(\x0f\x42\n\xbaH\x07\x92\x01\x04\x08\x02\x10\x04R\x03val\"-\n\rRepeatedExact\x12\x1c\n\x03val\x18\x01 \x03(\rB\n\xbaH\x07\x92\x01\x04\x08\x03\x10\x03R\x03val\",\n\x0eRepeatedUnique\x12\x1a\n\x03val\x18\x01 \x03(\tB\x08\xbaH\x05\x92\x01\x02\x18\x01R\x03val\"/\n\x11RepeatedNotUnique\x12\x1a\n\x03val\x18\x01 \x03(\tB\x08\xbaH\x05\x92\x01\x02\x18\x00R\x03val\"H\n\x16RepeatedMultipleUnique\x12\x16\n\x01\x61\x18\x01 \x03(\tB\x08\xbaH\x05\x92\x01\x02\x18\x01R\x01\x61\x12\x16\n\x01\x62\x18\x02 \x03(\x05\x42\x08\xbaH\x05\x92\x01\x02\x18\x01R\x01\x62\"5\n\x10RepeatedItemRule\x12!\n\x03val\x18\x01 \x03(\x02\x42\x0f\xbaH\x0c\x92\x01\t\"\x07\n\x05%\x00\x00\x00\x00R\x03val\"D\n\x13RepeatedItemPattern\x12-\n\x03val\x18\x01 \x03(\tB\x1b\xbaH\x18\x92\x01\x15\"\x13r\x11\x32\x0f(?i)^[a-z0-9]+$R\x03val\"Y\n\x11RepeatedEmbedSkip\x12\x44\n\x03val\x18\x01 \x03(\x0b\x32%.buf.validate.conformance.cases.EmbedB\x0b\xbaH\x08\x92\x01\x05\"\x03\xd8\x01\x03R\x03val\"8\n\x0eRepeatedItemIn\x12&\n\x03val\x18\x01 \x03(\tB\x14\xbaH\x11\x92\x01\x0e\"\x0cr\nR\x03\x66ooR\x03\x62\x61rR\x03val\";\n\x11RepeatedItemNotIn\x12&\n\x03val\x18\x01 \x03(\tB\x14\xbaH\x11\x92\x01\x0e\"\x0cr\nZ\x03\x66ooZ\x03\x62\x61rR\x03val\"Y\n\x0eRepeatedEnumIn\x12G\n\x03val\x18\x01 \x03(\x0e\x32&.buf.validate.conformance.cases.AnEnumB\r\xbaH\n\x92\x01\x07\"\x05\x82\x01\x02\x18\x00R\x03val\"\\\n\x11RepeatedEnumNotIn\x12G\n\x03val\x18\x01 \x03(\x0e\x32&.buf.validate.conformance.cases.AnEnumB\r\xbaH\n\x92\x01\x07\"\x05\x82\x01\x02 \x00R\x03val\"\xdf\x01\n\x16RepeatedEmbeddedEnumIn\x12\x65\n\x03val\x18\x01 \x03(\x0e\x32\x44.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnumB\r\xbaH\n\x92\x01\x07\"\x05\x82\x01\x02\x18\x00R\x03val\"^\n\rAnotherInEnum\x12\x1f\n\x1b\x41NOTHER_IN_ENUM_UNSPECIFIED\x10\x00\x12\x15\n\x11\x41NOTHER_IN_ENUM_A\x10\x01\x12\x15\n\x11\x41NOTHER_IN_ENUM_B\x10\x02\"\xf7\x01\n\x19RepeatedEmbeddedEnumNotIn\x12k\n\x03val\x18\x01 \x03(\x0e\x32J.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnumB\r\xbaH\n\x92\x01\x07\"\x05\x82\x01\x02 \x00R\x03val\"m\n\x10\x41notherNotInEnum\x12#\n\x1f\x41NOTHER_NOT_IN_ENUM_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41NOTHER_NOT_IN_ENUM_A\x10\x01\x12\x19\n\x15\x41NOTHER_NOT_IN_ENUM_B\x10\x02\"r\n\rRepeatedAnyIn\x12\x61\n\x03val\x18\x01 \x03(\x0b\x32\x14.google.protobuf.AnyB9\xbaH6\x92\x01\x33\"1\xa2\x01.\x12,type.googleapis.com/google.protobuf.DurationR\x03val\"v\n\x10RepeatedAnyNotIn\x12\x62\n\x03val\x18\x01 \x03(\x0b\x32\x14.google.protobuf.AnyB:\xbaH7\x92\x01\x34\"2\xa2\x01/\x1a-type.googleapis.com/google.protobuf.TimestampR\x03val\":\n\x15RepeatedMinAndItemLen\x12!\n\x03val\x18\x01 \x03(\tB\x0f\xbaH\x0c\x92\x01\t\x08\x01\"\x05r\x03\x98\x01\x03R\x03val\"8\n\x18RepeatedMinAndMaxItemLen\x12\x1c\n\x03val\x18\x01 \x03(\tB\n\xbaH\x07\x92\x01\x04\x08\x01\x10\x03R\x03val\"R\n\x10RepeatedDuration\x12>\n\x03val\x18\x01 \x03(\x0b\x32\x19.google.protobuf.DurationB\x11\xbaH\x0e\x92\x01\x0b\"\t\xaa\x01\x06\x32\x04\x10\xc0\x84=R\x03val\"6\n\x13RepeatedExactIgnore\x12\x1f\n\x03val\x18\x01 \x03(\rB\r\xbaH\n\x92\x01\x04\x08\x03\x10\x03\xd8\x01\x01R\x03val*?\n\x06\x41nEnum\x12\x17\n\x13\x41N_ENUM_UNSPECIFIED\x10\x00\x12\r\n\tAN_ENUM_X\x10\x01\x12\r\n\tAN_ENUM_Y\x10\x02\x42\xcf\x01\n\"com.buf.validate.conformance.casesB\rRepeatedProtoP\x01\xa2\x02\x04\x42VCC\xaa\x02\x1e\x42uf.Validate.Conformance.Cases\xca\x02\x1e\x42uf\\Validate\\Conformance\\Cases\xe2\x02*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\xea\x02!Buf::Validate::Conformance::Casesb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n-buf/validate/conformance/cases/repeated.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x38\x62uf/validate/conformance/cases/other_package/embed.proto\x1a\x1b\x62uf/validate/validate.proto\x1a\x19google/protobuf/any.proto\x1a\x1egoogle/protobuf/duration.proto\"\"\n\x05\x45mbed\x12\x19\n\x03val\x18\x01 \x01(\x03\x42\x07\xbaH\x04\"\x02 \x00R\x03val\" \n\x0cRepeatedNone\x12\x10\n\x03val\x18\x01 \x03(\x03R\x03val\"L\n\x11RepeatedEmbedNone\x12\x37\n\x03val\x18\x01 \x03(\x0b\x32%.buf.validate.conformance.cases.EmbedR\x03val\"f\n\x1dRepeatedEmbedCrossPackageNone\x12\x45\n\x03val\x18\x01 \x03(\x0b\x32\x33.buf.validate.conformance.cases.other_package.EmbedR\x03val\"P\n\x0bRepeatedMin\x12\x41\n\x03val\x18\x01 \x03(\x0b\x32%.buf.validate.conformance.cases.EmbedB\x08\xbaH\x05\x92\x01\x02\x08\x02R\x03val\")\n\x0bRepeatedMax\x12\x1a\n\x03val\x18\x01 \x03(\x01\x42\x08\xbaH\x05\x92\x01\x02\x10\x03R\x03val\".\n\x0eRepeatedMinMax\x12\x1c\n\x03val\x18\x01 \x03(\x0f\x42\n\xbaH\x07\x92\x01\x04\x08\x02\x10\x04R\x03val\"-\n\rRepeatedExact\x12\x1c\n\x03val\x18\x01 \x03(\rB\n\xbaH\x07\x92\x01\x04\x08\x03\x10\x03R\x03val\",\n\x0eRepeatedUnique\x12\x1a\n\x03val\x18\x01 \x03(\tB\x08\xbaH\x05\x92\x01\x02\x18\x01R\x03val\"/\n\x11RepeatedNotUnique\x12\x1a\n\x03val\x18\x01 \x03(\tB\x08\xbaH\x05\x92\x01\x02\x18\x00R\x03val\"H\n\x16RepeatedMultipleUnique\x12\x16\n\x01\x61\x18\x01 \x03(\tB\x08\xbaH\x05\x92\x01\x02\x18\x01R\x01\x61\x12\x16\n\x01\x62\x18\x02 \x03(\x05\x42\x08\xbaH\x05\x92\x01\x02\x18\x01R\x01\x62\"5\n\x10RepeatedItemRule\x12!\n\x03val\x18\x01 \x03(\x02\x42\x0f\xbaH\x0c\x92\x01\t\"\x07\n\x05%\x00\x00\x00\x00R\x03val\"D\n\x13RepeatedItemPattern\x12-\n\x03val\x18\x01 \x03(\tB\x1b\xbaH\x18\x92\x01\x15\"\x13r\x11\x32\x0f(?i)^[a-z0-9]+$R\x03val\"Y\n\x11RepeatedEmbedSkip\x12\x44\n\x03val\x18\x01 \x03(\x0b\x32%.buf.validate.conformance.cases.EmbedB\x0b\xbaH\x08\x92\x01\x05\"\x03\xd8\x01\x03R\x03val\"8\n\x0eRepeatedItemIn\x12&\n\x03val\x18\x01 \x03(\tB\x14\xbaH\x11\x92\x01\x0e\"\x0cr\nR\x03\x66ooR\x03\x62\x61rR\x03val\";\n\x11RepeatedItemNotIn\x12&\n\x03val\x18\x01 \x03(\tB\x14\xbaH\x11\x92\x01\x0e\"\x0cr\nZ\x03\x66ooZ\x03\x62\x61rR\x03val\"Y\n\x0eRepeatedEnumIn\x12G\n\x03val\x18\x01 \x03(\x0e\x32&.buf.validate.conformance.cases.AnEnumB\r\xbaH\n\x92\x01\x07\"\x05\x82\x01\x02\x18\x00R\x03val\"\\\n\x11RepeatedEnumNotIn\x12G\n\x03val\x18\x01 \x03(\x0e\x32&.buf.validate.conformance.cases.AnEnumB\r\xbaH\n\x92\x01\x07\"\x05\x82\x01\x02 \x00R\x03val\"\xdf\x01\n\x16RepeatedEmbeddedEnumIn\x12\x65\n\x03val\x18\x01 \x03(\x0e\x32\x44.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnumB\r\xbaH\n\x92\x01\x07\"\x05\x82\x01\x02\x18\x00R\x03val\"^\n\rAnotherInEnum\x12\x1f\n\x1b\x41NOTHER_IN_ENUM_UNSPECIFIED\x10\x00\x12\x15\n\x11\x41NOTHER_IN_ENUM_A\x10\x01\x12\x15\n\x11\x41NOTHER_IN_ENUM_B\x10\x02\"\xf7\x01\n\x19RepeatedEmbeddedEnumNotIn\x12k\n\x03val\x18\x01 \x03(\x0e\x32J.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnumB\r\xbaH\n\x92\x01\x07\"\x05\x82\x01\x02 \x00R\x03val\"m\n\x10\x41notherNotInEnum\x12#\n\x1f\x41NOTHER_NOT_IN_ENUM_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41NOTHER_NOT_IN_ENUM_A\x10\x01\x12\x19\n\x15\x41NOTHER_NOT_IN_ENUM_B\x10\x02\"r\n\rRepeatedAnyIn\x12\x61\n\x03val\x18\x01 \x03(\x0b\x32\x14.google.protobuf.AnyB9\xbaH6\x92\x01\x33\"1\xa2\x01.\x12,type.googleapis.com/google.protobuf.DurationR\x03val\"v\n\x10RepeatedAnyNotIn\x12\x62\n\x03val\x18\x01 \x03(\x0b\x32\x14.google.protobuf.AnyB:\xbaH7\x92\x01\x34\"2\xa2\x01/\x1a-type.googleapis.com/google.protobuf.TimestampR\x03val\":\n\x15RepeatedMinAndItemLen\x12!\n\x03val\x18\x01 \x03(\tB\x0f\xbaH\x0c\x92\x01\t\x08\x01\"\x05r\x03\x98\x01\x03R\x03val\"8\n\x18RepeatedMinAndMaxItemLen\x12\x1c\n\x03val\x18\x01 \x03(\tB\n\xbaH\x07\x92\x01\x04\x08\x01\x10\x03R\x03val\"R\n\x10RepeatedDuration\x12>\n\x03val\x18\x01 \x03(\x0b\x32\x19.google.protobuf.DurationB\x11\xbaH\x0e\x92\x01\x0b\"\t\xaa\x01\x06\x32\x04\x10\xc0\x84=R\x03val\"6\n\x13RepeatedExactIgnore\x12\x1f\n\x03val\x18\x01 \x03(\rB\r\xbaH\n\x92\x01\x04\x08\x03\x10\x03\xd8\x01\x01R\x03val*?\n\x06\x41nEnum\x12\x17\n\x13\x41N_ENUM_UNSPECIFIED\x10\x00\x12\r\n\tAN_ENUM_X\x10\x01\x12\r\n\tAN_ENUM_Y\x10\x02\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'buf.validate.conformance.cases.repeated_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\"com.buf.validate.conformance.casesB\rRepeatedProtoP\001\242\002\004BVCC\252\002\036Buf.Validate.Conformance.Cases\312\002\036Buf\\Validate\\Conformance\\Cases\342\002*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\352\002!Buf::Validate::Conformance::Cases' + DESCRIPTOR._loaded_options = None _globals['_EMBED'].fields_by_name['val']._loaded_options = None _globals['_EMBED'].fields_by_name['val']._serialized_options = b'\272H\004\"\002 \000' _globals['_REPEATEDMIN'].fields_by_name['val']._loaded_options = None diff --git a/packages/protovalidate-proto/src/buf/validate/conformance/cases/required_field_proto2_pb2.py b/packages/protovalidate-proto/src/buf/validate/conformance/cases/required_field_proto2_pb2.py index 04ec9e58..345a809f 100644 --- a/packages/protovalidate-proto/src/buf/validate/conformance/cases/required_field_proto2_pb2.py +++ b/packages/protovalidate-proto/src/buf/validate/conformance/cases/required_field_proto2_pb2.py @@ -29,14 +29,13 @@ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n:buf/validate/conformance/cases/required_field_proto2.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"8\n\x1cRequiredProto2ScalarOptional\x12\x18\n\x03val\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01R\x03val\"G\n(RequiredProto2ScalarOptionalIgnoreAlways\x12\x1b\n\x03val\x18\x01 \x01(\tB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\"D\n#RequiredProto2ScalarOptionalDefault\x12\x1d\n\x03val\x18\x01 \x01(\t:\x03\x66ooB\x06\xbaH\x03\xc8\x01\x01R\x03val\"S\n/RequiredProto2ScalarOptionalDefaultIgnoreAlways\x12 \n\x03val\x18\x01 \x01(\t:\x03\x66ooB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\"8\n\x1cRequiredProto2ScalarRequired\x12\x18\n\x03val\x18\x01 \x02(\tB\x06\xbaH\x03\xc8\x01\x01R\x03val\"\x85\x01\n\x15RequiredProto2Message\x12S\n\x03val\x18\x01 \x01(\x0b\x32\x39.buf.validate.conformance.cases.RequiredProto2Message.MsgB\x06\xbaH\x03\xc8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xa0\x01\n!RequiredProto2MessageIgnoreAlways\x12\x62\n\x03val\x18\x01 \x01(\x0b\x32\x45.buf.validate.conformance.cases.RequiredProto2MessageIgnoreAlways.MsgB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"D\n\x13RequiredProto2Oneof\x12\x16\n\x01\x61\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01H\x00R\x01\x61\x12\x0e\n\x01\x62\x18\x02 \x01(\tH\x00R\x01\x62\x42\x05\n\x03val\"S\n\x1fRequiredProto2OneofIgnoreAlways\x12\x19\n\x01\x61\x18\x01 \x01(\tB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03H\x00R\x01\x61\x12\x0e\n\x01\x62\x18\x02 \x01(\tH\x00R\x01\x62\x42\x05\n\x03val\"2\n\x16RequiredProto2Repeated\x12\x18\n\x03val\x18\x01 \x03(\tB\x06\xbaH\x03\xc8\x01\x01R\x03val\"A\n\"RequiredProto2RepeatedIgnoreAlways\x12\x1b\n\x03val\x18\x01 \x03(\tB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\"\xa1\x01\n\x11RequiredProto2Map\x12T\n\x03val\x18\x01 \x03(\x0b\x32:.buf.validate.conformance.cases.RequiredProto2Map.ValEntryB\x06\xbaH\x03\xc8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xbc\x01\n\x1dRequiredProto2MapIgnoreAlways\x12\x63\n\x03val\x18\x01 \x03(\x0b\x32\x46.buf.validate.conformance.cases.RequiredProto2MapIgnoreAlways.ValEntryB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x42\xda\x01\n\"com.buf.validate.conformance.casesB\x18RequiredFieldProto2ProtoP\x01\xa2\x02\x04\x42VCC\xaa\x02\x1e\x42uf.Validate.Conformance.Cases\xca\x02\x1e\x42uf\\Validate\\Conformance\\Cases\xe2\x02*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\xea\x02!Buf::Validate::Conformance::Cases') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n:buf/validate/conformance/cases/required_field_proto2.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"8\n\x1cRequiredProto2ScalarOptional\x12\x18\n\x03val\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01R\x03val\"G\n(RequiredProto2ScalarOptionalIgnoreAlways\x12\x1b\n\x03val\x18\x01 \x01(\tB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\"D\n#RequiredProto2ScalarOptionalDefault\x12\x1d\n\x03val\x18\x01 \x01(\t:\x03\x66ooB\x06\xbaH\x03\xc8\x01\x01R\x03val\"S\n/RequiredProto2ScalarOptionalDefaultIgnoreAlways\x12 \n\x03val\x18\x01 \x01(\t:\x03\x66ooB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\"8\n\x1cRequiredProto2ScalarRequired\x12\x18\n\x03val\x18\x01 \x02(\tB\x06\xbaH\x03\xc8\x01\x01R\x03val\"\x85\x01\n\x15RequiredProto2Message\x12S\n\x03val\x18\x01 \x01(\x0b\x32\x39.buf.validate.conformance.cases.RequiredProto2Message.MsgB\x06\xbaH\x03\xc8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xa0\x01\n!RequiredProto2MessageIgnoreAlways\x12\x62\n\x03val\x18\x01 \x01(\x0b\x32\x45.buf.validate.conformance.cases.RequiredProto2MessageIgnoreAlways.MsgB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"D\n\x13RequiredProto2Oneof\x12\x16\n\x01\x61\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01H\x00R\x01\x61\x12\x0e\n\x01\x62\x18\x02 \x01(\tH\x00R\x01\x62\x42\x05\n\x03val\"S\n\x1fRequiredProto2OneofIgnoreAlways\x12\x19\n\x01\x61\x18\x01 \x01(\tB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03H\x00R\x01\x61\x12\x0e\n\x01\x62\x18\x02 \x01(\tH\x00R\x01\x62\x42\x05\n\x03val\"2\n\x16RequiredProto2Repeated\x12\x18\n\x03val\x18\x01 \x03(\tB\x06\xbaH\x03\xc8\x01\x01R\x03val\"A\n\"RequiredProto2RepeatedIgnoreAlways\x12\x1b\n\x03val\x18\x01 \x03(\tB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\"\xa1\x01\n\x11RequiredProto2Map\x12T\n\x03val\x18\x01 \x03(\x0b\x32:.buf.validate.conformance.cases.RequiredProto2Map.ValEntryB\x06\xbaH\x03\xc8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xbc\x01\n\x1dRequiredProto2MapIgnoreAlways\x12\x63\n\x03val\x18\x01 \x03(\x0b\x32\x46.buf.validate.conformance.cases.RequiredProto2MapIgnoreAlways.ValEntryB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'buf.validate.conformance.cases.required_field_proto2_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\"com.buf.validate.conformance.casesB\030RequiredFieldProto2ProtoP\001\242\002\004BVCC\252\002\036Buf.Validate.Conformance.Cases\312\002\036Buf\\Validate\\Conformance\\Cases\342\002*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\352\002!Buf::Validate::Conformance::Cases' + DESCRIPTOR._loaded_options = None _globals['_REQUIREDPROTO2SCALAROPTIONAL'].fields_by_name['val']._loaded_options = None _globals['_REQUIREDPROTO2SCALAROPTIONAL'].fields_by_name['val']._serialized_options = b'\272H\003\310\001\001' _globals['_REQUIREDPROTO2SCALAROPTIONALIGNOREALWAYS'].fields_by_name['val']._loaded_options = None diff --git a/packages/protovalidate-proto/src/buf/validate/conformance/cases/required_field_proto3_pb2.py b/packages/protovalidate-proto/src/buf/validate/conformance/cases/required_field_proto3_pb2.py index 3ce8f266..4947092e 100644 --- a/packages/protovalidate-proto/src/buf/validate/conformance/cases/required_field_proto3_pb2.py +++ b/packages/protovalidate-proto/src/buf/validate/conformance/cases/required_field_proto3_pb2.py @@ -29,14 +29,13 @@ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n:buf/validate/conformance/cases/required_field_proto3.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"0\n\x14RequiredProto3Scalar\x12\x18\n\x03val\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01R\x03val\"?\n RequiredProto3ScalarIgnoreAlways\x12\x1b\n\x03val\x18\x01 \x01(\tB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\"E\n\x1cRequiredProto3OptionalScalar\x12\x1d\n\x03val\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01H\x00R\x03val\x88\x01\x01\x42\x06\n\x04_val\"T\n(RequiredProto3OptionalScalarIgnoreAlways\x12 \n\x03val\x18\x01 \x01(\tB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03H\x00R\x03val\x88\x01\x01\x42\x06\n\x04_val\"\x85\x01\n\x15RequiredProto3Message\x12S\n\x03val\x18\x01 \x01(\x0b\x32\x39.buf.validate.conformance.cases.RequiredProto3Message.MsgB\x06\xbaH\x03\xc8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xa0\x01\n!RequiredProto3MessageIgnoreAlways\x12\x62\n\x03val\x18\x01 \x01(\x0b\x32\x45.buf.validate.conformance.cases.RequiredProto3MessageIgnoreAlways.MsgB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"D\n\x13RequiredProto3OneOf\x12\x16\n\x01\x61\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01H\x00R\x01\x61\x12\x0e\n\x01\x62\x18\x02 \x01(\tH\x00R\x01\x62\x42\x05\n\x03val\"S\n\x1fRequiredProto3OneOfIgnoreAlways\x12\x19\n\x01\x61\x18\x01 \x01(\tB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03H\x00R\x01\x61\x12\x0e\n\x01\x62\x18\x02 \x01(\tH\x00R\x01\x62\x42\x05\n\x03val\"2\n\x16RequiredProto3Repeated\x12\x18\n\x03val\x18\x01 \x03(\tB\x06\xbaH\x03\xc8\x01\x01R\x03val\"A\n\"RequiredProto3RepeatedIgnoreAlways\x12\x1b\n\x03val\x18\x01 \x03(\tB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\"\xa1\x01\n\x11RequiredProto3Map\x12T\n\x03val\x18\x01 \x03(\x0b\x32:.buf.validate.conformance.cases.RequiredProto3Map.ValEntryB\x06\xbaH\x03\xc8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xbc\x01\n\x1dRequiredProto3MapIgnoreAlways\x12\x63\n\x03val\x18\x01 \x03(\x0b\x32\x46.buf.validate.conformance.cases.RequiredProto3MapIgnoreAlways.ValEntryB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xac\x01\n\x14RequiredProto3MapKey\x12\\\n\x03val\x18\x01 \x03(\x0b\x32=.buf.validate.conformance.cases.RequiredProto3MapKey.ValEntryB\x0b\xbaH\x08\x9a\x01\x05\"\x03\xc8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xb0\x01\n\x16RequiredProto3MapValue\x12^\n\x03val\x18\x01 \x03(\x0b\x32?.buf.validate.conformance.cases.RequiredProto3MapValue.ValEntryB\x0b\xbaH\x08\x9a\x01\x05*\x03\xc8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\";\n\x1aRequiredProto3RepeatedItem\x12\x1d\n\x03val\x18\x01 \x03(\tB\x0b\xbaH\x08\x92\x01\x05\"\x03\xc8\x01\x01R\x03val\">\n\x1cRequiredImplicitProto3Scalar\x12\x1e\n\x03val\x18\x01 \x01(\tB\x0c\xbaH\tr\x04\x10\x01\x18\x02\xc8\x01\x01R\x03val\"A\n\x1eRequiredImplicitProto3Repeated\x12\x1f\n\x03val\x18\x01 \x03(\tB\r\xbaH\n\x92\x01\x04\x08\x01\x10\x02\xc8\x01\x01R\x03val\"\xb8\x01\n\x19RequiredImplicitProto3Map\x12\x63\n\x03val\x18\x01 \x03(\x0b\x32\x42.buf.validate.conformance.cases.RequiredImplicitProto3Map.ValEntryB\r\xbaH\n\x9a\x01\x04\x08\x01\x10\x02\xc8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x42\xda\x01\n\"com.buf.validate.conformance.casesB\x18RequiredFieldProto3ProtoP\x01\xa2\x02\x04\x42VCC\xaa\x02\x1e\x42uf.Validate.Conformance.Cases\xca\x02\x1e\x42uf\\Validate\\Conformance\\Cases\xe2\x02*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\xea\x02!Buf::Validate::Conformance::Casesb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n:buf/validate/conformance/cases/required_field_proto3.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"0\n\x14RequiredProto3Scalar\x12\x18\n\x03val\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01R\x03val\"?\n RequiredProto3ScalarIgnoreAlways\x12\x1b\n\x03val\x18\x01 \x01(\tB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\"E\n\x1cRequiredProto3OptionalScalar\x12\x1d\n\x03val\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01H\x00R\x03val\x88\x01\x01\x42\x06\n\x04_val\"T\n(RequiredProto3OptionalScalarIgnoreAlways\x12 \n\x03val\x18\x01 \x01(\tB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03H\x00R\x03val\x88\x01\x01\x42\x06\n\x04_val\"\x85\x01\n\x15RequiredProto3Message\x12S\n\x03val\x18\x01 \x01(\x0b\x32\x39.buf.validate.conformance.cases.RequiredProto3Message.MsgB\x06\xbaH\x03\xc8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xa0\x01\n!RequiredProto3MessageIgnoreAlways\x12\x62\n\x03val\x18\x01 \x01(\x0b\x32\x45.buf.validate.conformance.cases.RequiredProto3MessageIgnoreAlways.MsgB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"D\n\x13RequiredProto3OneOf\x12\x16\n\x01\x61\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01H\x00R\x01\x61\x12\x0e\n\x01\x62\x18\x02 \x01(\tH\x00R\x01\x62\x42\x05\n\x03val\"S\n\x1fRequiredProto3OneOfIgnoreAlways\x12\x19\n\x01\x61\x18\x01 \x01(\tB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03H\x00R\x01\x61\x12\x0e\n\x01\x62\x18\x02 \x01(\tH\x00R\x01\x62\x42\x05\n\x03val\"2\n\x16RequiredProto3Repeated\x12\x18\n\x03val\x18\x01 \x03(\tB\x06\xbaH\x03\xc8\x01\x01R\x03val\"A\n\"RequiredProto3RepeatedIgnoreAlways\x12\x1b\n\x03val\x18\x01 \x03(\tB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\"\xa1\x01\n\x11RequiredProto3Map\x12T\n\x03val\x18\x01 \x03(\x0b\x32:.buf.validate.conformance.cases.RequiredProto3Map.ValEntryB\x06\xbaH\x03\xc8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xbc\x01\n\x1dRequiredProto3MapIgnoreAlways\x12\x63\n\x03val\x18\x01 \x03(\x0b\x32\x46.buf.validate.conformance.cases.RequiredProto3MapIgnoreAlways.ValEntryB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xac\x01\n\x14RequiredProto3MapKey\x12\\\n\x03val\x18\x01 \x03(\x0b\x32=.buf.validate.conformance.cases.RequiredProto3MapKey.ValEntryB\x0b\xbaH\x08\x9a\x01\x05\"\x03\xc8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xb0\x01\n\x16RequiredProto3MapValue\x12^\n\x03val\x18\x01 \x03(\x0b\x32?.buf.validate.conformance.cases.RequiredProto3MapValue.ValEntryB\x0b\xbaH\x08\x9a\x01\x05*\x03\xc8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\";\n\x1aRequiredProto3RepeatedItem\x12\x1d\n\x03val\x18\x01 \x03(\tB\x0b\xbaH\x08\x92\x01\x05\"\x03\xc8\x01\x01R\x03val\">\n\x1cRequiredImplicitProto3Scalar\x12\x1e\n\x03val\x18\x01 \x01(\tB\x0c\xbaH\tr\x04\x10\x01\x18\x02\xc8\x01\x01R\x03val\"A\n\x1eRequiredImplicitProto3Repeated\x12\x1f\n\x03val\x18\x01 \x03(\tB\r\xbaH\n\x92\x01\x04\x08\x01\x10\x02\xc8\x01\x01R\x03val\"\xb8\x01\n\x19RequiredImplicitProto3Map\x12\x63\n\x03val\x18\x01 \x03(\x0b\x32\x42.buf.validate.conformance.cases.RequiredImplicitProto3Map.ValEntryB\r\xbaH\n\x9a\x01\x04\x08\x01\x10\x02\xc8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'buf.validate.conformance.cases.required_field_proto3_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\"com.buf.validate.conformance.casesB\030RequiredFieldProto3ProtoP\001\242\002\004BVCC\252\002\036Buf.Validate.Conformance.Cases\312\002\036Buf\\Validate\\Conformance\\Cases\342\002*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\352\002!Buf::Validate::Conformance::Cases' + DESCRIPTOR._loaded_options = None _globals['_REQUIREDPROTO3SCALAR'].fields_by_name['val']._loaded_options = None _globals['_REQUIREDPROTO3SCALAR'].fields_by_name['val']._serialized_options = b'\272H\003\310\001\001' _globals['_REQUIREDPROTO3SCALARIGNOREALWAYS'].fields_by_name['val']._loaded_options = None diff --git a/packages/protovalidate-proto/src/buf/validate/conformance/cases/required_field_proto_editions_pb2.py b/packages/protovalidate-proto/src/buf/validate/conformance/cases/required_field_proto_editions_pb2.py index c1df45b9..df393922 100644 --- a/packages/protovalidate-proto/src/buf/validate/conformance/cases/required_field_proto_editions_pb2.py +++ b/packages/protovalidate-proto/src/buf/validate/conformance/cases/required_field_proto_editions_pb2.py @@ -29,14 +29,13 @@ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\nBbuf/validate/conformance/cases/required_field_proto_editions.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"B\n&RequiredEditionsScalarExplicitPresence\x12\x18\n\x03val\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01R\x03val\"Q\n2RequiredEditionsScalarExplicitPresenceIgnoreAlways\x12\x1b\n\x03val\x18\x01 \x01(\tB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\"N\n-RequiredEditionsScalarExplicitPresenceDefault\x12\x1d\n\x03val\x18\x01 \x01(\t:\x03\x66ooB\x06\xbaH\x03\xc8\x01\x01R\x03val\"]\n9RequiredEditionsScalarExplicitPresenceDefaultIgnoreAlways\x12 \n\x03val\x18\x01 \x01(\t:\x03\x66ooB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\"G\n&RequiredEditionsScalarImplicitPresence\x12\x1d\n\x03val\x18\x01 \x01(\tB\x0b\xaa\x01\x02\x08\x02\xbaH\x03\xc8\x01\x01R\x03val\"V\n2RequiredEditionsScalarImplicitPresenceIgnoreAlways\x12 \n\x03val\x18\x01 \x01(\tB\x0e\xaa\x01\x02\x08\x02\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\"E\n$RequiredEditionsScalarLegacyRequired\x12\x1d\n\x03val\x18\x01 \x01(\tB\x0b\xaa\x01\x02\x08\x03\xbaH\x03\xc8\x01\x01R\x03val\"\xa9\x01\n\'RequiredEditionsMessageExplicitPresence\x12\x65\n\x03val\x18\x01 \x01(\x0b\x32K.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.MsgB\x06\xbaH\x03\xc8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xc4\x01\n3RequiredEditionsMessageExplicitPresenceIgnoreAlways\x12t\n\x03val\x18\x01 \x01(\x0b\x32W.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceIgnoreAlways.MsgB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xc0\x01\n0RequiredEditionsMessageExplicitPresenceDelimited\x12s\n\x03val\x18\x01 \x01(\x0b\x32T.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.MsgB\x0b\xaa\x01\x02(\x02\xbaH\x03\xc8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xdc\x01\n\n\x03val\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x0e\xbaH\x0b\x12\t!\x00\x00\x00\x00\x00\x00\x00\x00R\x03val\"F\n\x0cWrapperInt64\x12\x36\n\x03val\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.Int64ValueB\x07\xbaH\x04\"\x02 \x00R\x03val\"F\n\x0cWrapperInt32\x12\x36\n\x03val\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x07\xbaH\x04\x1a\x02 \x00R\x03val\"H\n\rWrapperUInt64\x12\x37\n\x03val\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.UInt64ValueB\x07\xbaH\x04\x32\x02 \x00R\x03val\"H\n\rWrapperUInt32\x12\x37\n\x03val\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.UInt32ValueB\x07\xbaH\x04*\x02 \x00R\x03val\"D\n\x0bWrapperBool\x12\x35\n\x03val\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x07\xbaH\x04j\x02\x08\x01R\x03val\"K\n\rWrapperString\x12:\n\x03val\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.StringValueB\n\xbaH\x07r\x05\x42\x03\x62\x61rR\x03val\"F\n\x0cWrapperBytes\x12\x36\n\x03val\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.BytesValueB\x07\xbaH\x04z\x02\x10\x03R\x03val\"V\n\x15WrapperRequiredString\x12=\n\x03val\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.StringValueB\r\xbaH\nr\x05\n\x03\x62\x61r\xc8\x01\x01R\x03val\"X\n\x1aWrapperRequiredEmptyString\x12:\n\x03val\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.StringValueB\n\xbaH\x07r\x02\n\x00\xc8\x01\x01R\x03val\"X\n\x19WrapperOptionalUuidString\x12;\n\x03val\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.StringValueB\x0b\xbaH\x08r\x03\xb0\x01\x01\xc8\x01\x00R\x03val\"T\n\x14WrapperRequiredFloat\x12<\n\x03val\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.FloatValueB\r\xbaH\n\n\x05%\x00\x00\x00\x00\xc8\x01\x01R\x03valB\xd2\x01\n\"com.buf.validate.conformance.casesB\x10WktWrappersProtoP\x01\xa2\x02\x04\x42VCC\xaa\x02\x1e\x42uf.Validate.Conformance.Cases\xca\x02\x1e\x42uf\\Validate\\Conformance\\Cases\xe2\x02*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\xea\x02!Buf::Validate::Conformance::Casesb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n1buf/validate/conformance/cases/wkt_wrappers.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\x1a\x1egoogle/protobuf/wrappers.proto\"<\n\x0bWrapperNone\x12-\n\x03val\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.Int32ValueR\x03val\"I\n\x0cWrapperFloat\x12\x39\n\x03val\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.FloatValueB\n\xbaH\x07\n\x05%\x00\x00\x00\x00R\x03val\"O\n\rWrapperDouble\x12>\n\x03val\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x0e\xbaH\x0b\x12\t!\x00\x00\x00\x00\x00\x00\x00\x00R\x03val\"F\n\x0cWrapperInt64\x12\x36\n\x03val\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.Int64ValueB\x07\xbaH\x04\"\x02 \x00R\x03val\"F\n\x0cWrapperInt32\x12\x36\n\x03val\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x07\xbaH\x04\x1a\x02 \x00R\x03val\"H\n\rWrapperUInt64\x12\x37\n\x03val\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.UInt64ValueB\x07\xbaH\x04\x32\x02 \x00R\x03val\"H\n\rWrapperUInt32\x12\x37\n\x03val\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.UInt32ValueB\x07\xbaH\x04*\x02 \x00R\x03val\"D\n\x0bWrapperBool\x12\x35\n\x03val\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x07\xbaH\x04j\x02\x08\x01R\x03val\"K\n\rWrapperString\x12:\n\x03val\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.StringValueB\n\xbaH\x07r\x05\x42\x03\x62\x61rR\x03val\"F\n\x0cWrapperBytes\x12\x36\n\x03val\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.BytesValueB\x07\xbaH\x04z\x02\x10\x03R\x03val\"V\n\x15WrapperRequiredString\x12=\n\x03val\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.StringValueB\r\xbaH\nr\x05\n\x03\x62\x61r\xc8\x01\x01R\x03val\"X\n\x1aWrapperRequiredEmptyString\x12:\n\x03val\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.StringValueB\n\xbaH\x07r\x02\n\x00\xc8\x01\x01R\x03val\"X\n\x19WrapperOptionalUuidString\x12;\n\x03val\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.StringValueB\x0b\xbaH\x08r\x03\xb0\x01\x01\xc8\x01\x00R\x03val\"T\n\x14WrapperRequiredFloat\x12<\n\x03val\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.FloatValueB\r\xbaH\n\n\x05%\x00\x00\x00\x00\xc8\x01\x01R\x03valb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'buf.validate.conformance.cases.wkt_wrappers_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\"com.buf.validate.conformance.casesB\020WktWrappersProtoP\001\242\002\004BVCC\252\002\036Buf.Validate.Conformance.Cases\312\002\036Buf\\Validate\\Conformance\\Cases\342\002*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\352\002!Buf::Validate::Conformance::Cases' + DESCRIPTOR._loaded_options = None _globals['_WRAPPERFLOAT'].fields_by_name['val']._loaded_options = None _globals['_WRAPPERFLOAT'].fields_by_name['val']._serialized_options = b'\272H\007\n\005%\000\000\000\000' _globals['_WRAPPERDOUBLE'].fields_by_name['val']._loaded_options = None diff --git a/packages/protovalidate-proto/src/buf/validate/conformance/cases/yet_another_package/embed2_pb2.py b/packages/protovalidate-proto/src/buf/validate/conformance/cases/yet_another_package/embed2_pb2.py index 8c582600..8f89722f 100644 --- a/packages/protovalidate-proto/src/buf/validate/conformance/cases/yet_another_package/embed2_pb2.py +++ b/packages/protovalidate-proto/src/buf/validate/conformance/cases/yet_another_package/embed2_pb2.py @@ -29,14 +29,13 @@ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n?buf/validate/conformance/cases/yet_another_package/embed2.proto\x12\x32\x62uf.validate.conformance.cases.yet_another_package\x1a\x1b\x62uf/validate/validate.proto\"b\n\x05\x45mbed\x12\x19\n\x03val\x18\x01 \x01(\x03\x42\x07\xbaH\x04\"\x02 \x00R\x03val\">\n\nEnumerated\x12\x1a\n\x16\x45NUMERATED_UNSPECIFIED\x10\x00\x12\x14\n\x10\x45NUMERATED_VALUE\x10\x01\x42\xab\x02\n6com.buf.validate.conformance.cases.yet_another_packageB\x0b\x45mbed2ProtoP\x01\xa2\x02\x05\x42VCCY\xaa\x02\x30\x42uf.Validate.Conformance.Cases.YetAnotherPackage\xca\x02\x30\x42uf\\Validate\\Conformance\\Cases\\YetAnotherPackage\xe2\x02\n\nEnumerated\x12\x1a\n\x16\x45NUMERATED_UNSPECIFIED\x10\x00\x12\x14\n\x10\x45NUMERATED_VALUE\x10\x01\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'buf.validate.conformance.cases.yet_another_package.embed2_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n6com.buf.validate.conformance.cases.yet_another_packageB\013Embed2ProtoP\001\242\002\005BVCCY\252\0020Buf.Validate.Conformance.Cases.YetAnotherPackage\312\0020Buf\\Validate\\Conformance\\Cases\\YetAnotherPackage\342\002\n\x03got\x18\x04 \x01(\x0b\x32,.buf.validate.conformance.harness.TestResultR\x03got\x12*\n\x05input\x18\x05 \x01(\x0b\x32\x14.google.protobuf.AnyR\x05input\x12)\n\x10\x65xpected_failure\x18\x06 \x01(\x08R\x0f\x65xpectedFailureB\xd8\x01\n$com.buf.validate.conformance.harnessB\x0cResultsProtoP\x01\xa2\x02\x04\x42VCH\xaa\x02 Buf.Validate.Conformance.Harness\xca\x02 Buf\\Validate\\Conformance\\Harness\xe2\x02,Buf\\Validate\\Conformance\\Harness\\GPBMetadata\xea\x02#Buf::Validate::Conformance::Harnessb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n.buf/validate/conformance/harness/results.proto\x12 buf.validate.conformance.harness\x1a.buf/validate/conformance/harness/harness.proto\x1a\x19google/protobuf/any.proto\x1a google/protobuf/descriptor.proto\"\xc5\x01\n\rResultOptions\x12!\n\x0csuite_filter\x18\x01 \x01(\tR\x0bsuiteFilter\x12\x1f\n\x0b\x63\x61se_filter\x18\x02 \x01(\tR\ncaseFilter\x12\x18\n\x07verbose\x18\x03 \x01(\x08R\x07verbose\x12%\n\x0estrict_message\x18\x05 \x01(\x08R\rstrictMessage\x12!\n\x0cstrict_error\x18\x06 \x01(\x08R\x0bstrictErrorJ\x04\x08\x04\x10\x05R\x06strict\"\x85\x02\n\tResultSet\x12\x1c\n\tsuccesses\x18\x01 \x01(\x05R\tsuccesses\x12\x1a\n\x08\x66\x61ilures\x18\x02 \x01(\x05R\x08\x66\x61ilures\x12\x46\n\x06suites\x18\x03 \x03(\x0b\x32..buf.validate.conformance.harness.SuiteResultsR\x06suites\x12I\n\x07options\x18\x04 \x01(\x0b\x32/.buf.validate.conformance.harness.ResultOptionsR\x07options\x12+\n\x11\x65xpected_failures\x18\x05 \x01(\x05R\x10\x65xpectedFailures\"\x87\x02\n\x0cSuiteResults\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x1c\n\tsuccesses\x18\x02 \x01(\x05R\tsuccesses\x12\x1a\n\x08\x66\x61ilures\x18\x03 \x01(\x05R\x08\x66\x61ilures\x12\x42\n\x05\x63\x61ses\x18\x04 \x03(\x0b\x32,.buf.validate.conformance.harness.CaseResultR\x05\x63\x61ses\x12\x38\n\x05\x66\x64set\x18\x05 \x01(\x0b\x32\".google.protobuf.FileDescriptorSetR\x05\x66\x64set\x12+\n\x11\x65xpected_failures\x18\x06 \x01(\x05R\x10\x65xpectedFailures\"\x97\x02\n\nCaseResult\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n\x07success\x18\x02 \x01(\x08R\x07success\x12\x44\n\x06wanted\x18\x03 \x01(\x0b\x32,.buf.validate.conformance.harness.TestResultR\x06wanted\x12>\n\x03got\x18\x04 \x01(\x0b\x32,.buf.validate.conformance.harness.TestResultR\x03got\x12*\n\x05input\x18\x05 \x01(\x0b\x32\x14.google.protobuf.AnyR\x05input\x12)\n\x10\x65xpected_failure\x18\x06 \x01(\x08R\x0f\x65xpectedFailureb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'buf.validate.conformance.harness.results_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n$com.buf.validate.conformance.harnessB\014ResultsProtoP\001\242\002\004BVCH\252\002 Buf.Validate.Conformance.Harness\312\002 Buf\\Validate\\Conformance\\Harness\342\002,Buf\\Validate\\Conformance\\Harness\\GPBMetadata\352\002#Buf::Validate::Conformance::Harness' + DESCRIPTOR._loaded_options = None _globals['_RESULTOPTIONS']._serialized_start=194 _globals['_RESULTOPTIONS']._serialized_end=391 _globals['_RESULTSET']._serialized_start=394 diff --git a/packages/protovalidate-proto/src/buf/validate/validate_pb2.py b/packages/protovalidate-proto/src/buf/validate/validate_pb2.py index 47eb22f9..da17d0ec 100644 --- a/packages/protovalidate-proto/src/buf/validate/validate_pb2.py +++ b/packages/protovalidate-proto/src/buf/validate/validate_pb2.py @@ -32,14 +32,14 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1b\x62uf/validate/validate.proto\x12\x0c\x62uf.validate\x1a google/protobuf/descriptor.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"P\n\x04Rule\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x18\n\x07message\x18\x02 \x01(\tR\x07message\x12\x1e\n\nexpression\x18\x03 \x01(\tR\nexpression\"\xa1\x01\n\x0cMessageRules\x12%\n\x0e\x63\x65l_expression\x18\x05 \x03(\tR\rcelExpression\x12$\n\x03\x63\x65l\x18\x03 \x03(\x0b\x32\x12.buf.validate.RuleR\x03\x63\x65l\x12\x34\n\x05oneof\x18\x04 \x03(\x0b\x32\x1e.buf.validate.MessageOneofRuleR\x05oneofJ\x04\x08\x01\x10\x02R\x08\x64isabled\"F\n\x10MessageOneofRule\x12\x16\n\x06\x66ields\x18\x01 \x03(\tR\x06\x66ields\x12\x1a\n\x08required\x18\x02 \x01(\x08R\x08required\"(\n\nOneofRules\x12\x1a\n\x08required\x18\x01 \x01(\x08R\x08required\"\xe3\n\n\nFieldRules\x12%\n\x0e\x63\x65l_expression\x18\x1d \x03(\tR\rcelExpression\x12$\n\x03\x63\x65l\x18\x17 \x03(\x0b\x32\x12.buf.validate.RuleR\x03\x63\x65l\x12\x1a\n\x08required\x18\x19 \x01(\x08R\x08required\x12,\n\x06ignore\x18\x1b \x01(\x0e\x32\x14.buf.validate.IgnoreR\x06ignore\x12\x30\n\x05\x66loat\x18\x01 \x01(\x0b\x32\x18.buf.validate.FloatRulesH\x00R\x05\x66loat\x12\x33\n\x06\x64ouble\x18\x02 \x01(\x0b\x32\x19.buf.validate.DoubleRulesH\x00R\x06\x64ouble\x12\x30\n\x05int32\x18\x03 \x01(\x0b\x32\x18.buf.validate.Int32RulesH\x00R\x05int32\x12\x30\n\x05int64\x18\x04 \x01(\x0b\x32\x18.buf.validate.Int64RulesH\x00R\x05int64\x12\x33\n\x06uint32\x18\x05 \x01(\x0b\x32\x19.buf.validate.UInt32RulesH\x00R\x06uint32\x12\x33\n\x06uint64\x18\x06 \x01(\x0b\x32\x19.buf.validate.UInt64RulesH\x00R\x06uint64\x12\x33\n\x06sint32\x18\x07 \x01(\x0b\x32\x19.buf.validate.SInt32RulesH\x00R\x06sint32\x12\x33\n\x06sint64\x18\x08 \x01(\x0b\x32\x19.buf.validate.SInt64RulesH\x00R\x06sint64\x12\x36\n\x07\x66ixed32\x18\t \x01(\x0b\x32\x1a.buf.validate.Fixed32RulesH\x00R\x07\x66ixed32\x12\x36\n\x07\x66ixed64\x18\n \x01(\x0b\x32\x1a.buf.validate.Fixed64RulesH\x00R\x07\x66ixed64\x12\x39\n\x08sfixed32\x18\x0b \x01(\x0b\x32\x1b.buf.validate.SFixed32RulesH\x00R\x08sfixed32\x12\x39\n\x08sfixed64\x18\x0c \x01(\x0b\x32\x1b.buf.validate.SFixed64RulesH\x00R\x08sfixed64\x12-\n\x04\x62ool\x18\r \x01(\x0b\x32\x17.buf.validate.BoolRulesH\x00R\x04\x62ool\x12\x33\n\x06string\x18\x0e \x01(\x0b\x32\x19.buf.validate.StringRulesH\x00R\x06string\x12\x30\n\x05\x62ytes\x18\x0f \x01(\x0b\x32\x18.buf.validate.BytesRulesH\x00R\x05\x62ytes\x12-\n\x04\x65num\x18\x10 \x01(\x0b\x32\x17.buf.validate.EnumRulesH\x00R\x04\x65num\x12\x39\n\x08repeated\x18\x12 \x01(\x0b\x32\x1b.buf.validate.RepeatedRulesH\x00R\x08repeated\x12*\n\x03map\x18\x13 \x01(\x0b\x32\x16.buf.validate.MapRulesH\x00R\x03map\x12*\n\x03\x61ny\x18\x14 \x01(\x0b\x32\x16.buf.validate.AnyRulesH\x00R\x03\x61ny\x12\x39\n\x08\x64uration\x18\x15 \x01(\x0b\x32\x1b.buf.validate.DurationRulesH\x00R\x08\x64uration\x12=\n\nfield_mask\x18\x1c \x01(\x0b\x32\x1c.buf.validate.FieldMaskRulesH\x00R\tfieldMask\x12<\n\ttimestamp\x18\x16 \x01(\x0b\x32\x1c.buf.validate.TimestampRulesH\x00R\ttimestampB\x06\n\x04typeJ\x04\x08\x18\x10\x19J\x04\x08\x1a\x10\x1bR\x07skippedR\x0cignore_empty\"Z\n\x0fPredefinedRules\x12$\n\x03\x63\x65l\x18\x01 \x03(\x0b\x32\x12.buf.validate.RuleR\x03\x63\x65lJ\x04\x08\x18\x10\x19J\x04\x08\x1a\x10\x1bR\x07skippedR\x0cignore_empty\"\xae\x17\n\nFloatRules\x12\x84\x01\n\x05\x63onst\x18\x01 \x01(\x02\x42n\xc2Hk\ni\n\x0b\x66loat.const\x1aZthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12\x9d\x01\n\x02lt\x18\x02 \x01(\x02\x42\x8a\x01\xc2H\x86\x01\n\x83\x01\n\x08\x66loat.lt\x1aw!has(rules.gte) && !has(rules.gt) && (this.isNan() || this >= rules.lt)? \'must be less than %s\'.format([rules.lt]) : \'\'H\x00R\x02lt\x12\xae\x01\n\x03lte\x18\x03 \x01(\x02\x42\x99\x01\xc2H\x95\x01\n\x92\x01\n\tfloat.lte\x1a\x84\x01!has(rules.gte) && !has(rules.gt) && (this.isNan() || this > rules.lte)? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'H\x00R\x03lte\x12\xd4\x07\n\x02gt\x18\x04 \x01(\x02\x42\xc1\x07\xc2H\xbd\x07\n\x86\x01\n\x08\x66loat.gt\x1az!has(rules.lt) && !has(rules.lte) && (this.isNan() || this <= rules.gt)? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\xbd\x01\n\x0b\x66loat.gt_lt\x1a\xad\x01has(rules.lt) && rules.lt >= rules.gt && (this.isNan() || this >= rules.lt || this <= rules.gt)? \'must be greater than %s and less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xc7\x01\n\x15\x66loat.gt_lt_exclusive\x1a\xad\x01has(rules.lt) && rules.lt < rules.gt && (this.isNan() || (rules.lt <= this && this <= rules.gt))? \'must be greater than %s or less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xcd\x01\n\x0c\x66loat.gt_lte\x1a\xbc\x01has(rules.lte) && rules.lte >= rules.gt && (this.isNan() || this > rules.lte || this <= rules.gt)? \'must be greater than %s and less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'\n\xd7\x01\n\x16\x66loat.gt_lte_exclusive\x1a\xbc\x01has(rules.lte) && rules.lte < rules.gt && (this.isNan() || (rules.lte < this && this <= rules.gt))? \'must be greater than %s or less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'H\x01R\x02gt\x12\xa1\x08\n\x03gte\x18\x05 \x01(\x02\x42\x8c\x08\xc2H\x88\x08\n\x95\x01\n\tfloat.gte\x1a\x87\x01!has(rules.lt) && !has(rules.lte) && (this.isNan() || this < rules.gte)? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\xcc\x01\n\x0c\x66loat.gte_lt\x1a\xbb\x01has(rules.lt) && rules.lt >= rules.gte && (this.isNan() || this >= rules.lt || this < rules.gte)? \'must be greater than or equal to %s and less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xd6\x01\n\x16\x66loat.gte_lt_exclusive\x1a\xbb\x01has(rules.lt) && rules.lt < rules.gte && (this.isNan() || (rules.lt <= this && this < rules.gte))? \'must be greater than or equal to %s or less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xdc\x01\n\rfloat.gte_lte\x1a\xca\x01has(rules.lte) && rules.lte >= rules.gte && (this.isNan() || this > rules.lte || this < rules.gte)? \'must be greater than or equal to %s and less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'\n\xe6\x01\n\x17\x66loat.gte_lte_exclusive\x1a\xca\x01has(rules.lte) && rules.lte < rules.gte && (this.isNan() || (rules.lte < this && this < rules.gte))? \'must be greater than or equal to %s or less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'H\x01R\x03gte\x12}\n\x02in\x18\x06 \x03(\x02\x42m\xc2Hj\nh\n\x08\x66loat.in\x1a\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'R\x02in\x12w\n\x06not_in\x18\x07 \x03(\x02\x42`\xc2H]\n[\n\x0c\x66loat.not_in\x1aKthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'R\x05notIn\x12w\n\x06\x66inite\x18\x08 \x01(\x08\x42_\xc2H\\\nZ\n\x0c\x66loat.finite\x1aJrules.finite ? (this.isNan() || this.isInf() ? \'must be finite\' : \'\') : \'\'R\x06\x66inite\x12\x34\n\x07\x65xample\x18\t \x03(\x02\x42\x1a\xc2H\x17\n\x15\n\rfloat.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\x42\x0b\n\tless_thanB\x0e\n\x0cgreater_than\"\xc0\x17\n\x0b\x44oubleRules\x12\x85\x01\n\x05\x63onst\x18\x01 \x01(\x01\x42o\xc2Hl\nj\n\x0c\x64ouble.const\x1aZthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12\x9e\x01\n\x02lt\x18\x02 \x01(\x01\x42\x8b\x01\xc2H\x87\x01\n\x84\x01\n\tdouble.lt\x1aw!has(rules.gte) && !has(rules.gt) && (this.isNan() || this >= rules.lt)? \'must be less than %s\'.format([rules.lt]) : \'\'H\x00R\x02lt\x12\xaf\x01\n\x03lte\x18\x03 \x01(\x01\x42\x9a\x01\xc2H\x96\x01\n\x93\x01\n\ndouble.lte\x1a\x84\x01!has(rules.gte) && !has(rules.gt) && (this.isNan() || this > rules.lte)? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'H\x00R\x03lte\x12\xd9\x07\n\x02gt\x18\x04 \x01(\x01\x42\xc6\x07\xc2H\xc2\x07\n\x87\x01\n\tdouble.gt\x1az!has(rules.lt) && !has(rules.lte) && (this.isNan() || this <= rules.gt)? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\xbe\x01\n\x0c\x64ouble.gt_lt\x1a\xad\x01has(rules.lt) && rules.lt >= rules.gt && (this.isNan() || this >= rules.lt || this <= rules.gt)? \'must be greater than %s and less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xc8\x01\n\x16\x64ouble.gt_lt_exclusive\x1a\xad\x01has(rules.lt) && rules.lt < rules.gt && (this.isNan() || (rules.lt <= this && this <= rules.gt))? \'must be greater than %s or less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xce\x01\n\rdouble.gt_lte\x1a\xbc\x01has(rules.lte) && rules.lte >= rules.gt && (this.isNan() || this > rules.lte || this <= rules.gt)? \'must be greater than %s and less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'\n\xd8\x01\n\x17\x64ouble.gt_lte_exclusive\x1a\xbc\x01has(rules.lte) && rules.lte < rules.gt && (this.isNan() || (rules.lte < this && this <= rules.gt))? \'must be greater than %s or less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'H\x01R\x02gt\x12\xa6\x08\n\x03gte\x18\x05 \x01(\x01\x42\x91\x08\xc2H\x8d\x08\n\x96\x01\n\ndouble.gte\x1a\x87\x01!has(rules.lt) && !has(rules.lte) && (this.isNan() || this < rules.gte)? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\xcd\x01\n\rdouble.gte_lt\x1a\xbb\x01has(rules.lt) && rules.lt >= rules.gte && (this.isNan() || this >= rules.lt || this < rules.gte)? \'must be greater than or equal to %s and less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xd7\x01\n\x17\x64ouble.gte_lt_exclusive\x1a\xbb\x01has(rules.lt) && rules.lt < rules.gte && (this.isNan() || (rules.lt <= this && this < rules.gte))? \'must be greater than or equal to %s or less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xdd\x01\n\x0e\x64ouble.gte_lte\x1a\xca\x01has(rules.lte) && rules.lte >= rules.gte && (this.isNan() || this > rules.lte || this < rules.gte)? \'must be greater than or equal to %s and less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'\n\xe7\x01\n\x18\x64ouble.gte_lte_exclusive\x1a\xca\x01has(rules.lte) && rules.lte < rules.gte && (this.isNan() || (rules.lte < this && this < rules.gte))? \'must be greater than or equal to %s or less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'H\x01R\x03gte\x12~\n\x02in\x18\x06 \x03(\x01\x42n\xc2Hk\ni\n\tdouble.in\x1a\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'R\x02in\x12x\n\x06not_in\x18\x07 \x03(\x01\x42\x61\xc2H^\n\\\n\rdouble.not_in\x1aKthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'R\x05notIn\x12x\n\x06\x66inite\x18\x08 \x01(\x08\x42`\xc2H]\n[\n\rdouble.finite\x1aJrules.finite ? (this.isNan() || this.isInf() ? \'must be finite\' : \'\') : \'\'R\x06\x66inite\x12\x35\n\x07\x65xample\x18\t \x03(\x01\x42\x1b\xc2H\x18\n\x16\n\x0e\x64ouble.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\x42\x0b\n\tless_thanB\x0e\n\x0cgreater_than\"\xde\x14\n\nInt32Rules\x12\x84\x01\n\x05\x63onst\x18\x01 \x01(\x05\x42n\xc2Hk\ni\n\x0bint32.const\x1aZthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12\x88\x01\n\x02lt\x18\x02 \x01(\x05\x42v\xc2Hs\nq\n\x08int32.lt\x1a\x65!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'H\x00R\x02lt\x12\x9a\x01\n\x03lte\x18\x03 \x01(\x05\x42\x85\x01\xc2H\x81\x01\n\x7f\n\tint32.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'H\x00R\x03lte\x12\xfd\x06\n\x02gt\x18\x04 \x01(\x05\x42\xea\x06\xc2H\xe6\x06\nt\n\x08int32.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\xad\x01\n\x0bint32.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \'must be greater than %s and less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xb5\x01\n\x15int32.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \'must be greater than %s or less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xbd\x01\n\x0cint32.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \'must be greater than %s and less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'\n\xc5\x01\n\x16int32.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \'must be greater than %s or less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'H\x01R\x02gt\x12\xca\x07\n\x03gte\x18\x05 \x01(\x05\x42\xb5\x07\xc2H\xb1\x07\n\x82\x01\n\tint32.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\xbc\x01\n\x0cint32.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \'must be greater than or equal to %s and less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xc4\x01\n\x16int32.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \'must be greater than or equal to %s or less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xcc\x01\n\rint32.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \'must be greater than or equal to %s and less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'\n\xd4\x01\n\x17int32.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \'must be greater than or equal to %s or less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'H\x01R\x03gte\x12}\n\x02in\x18\x06 \x03(\x05\x42m\xc2Hj\nh\n\x08int32.in\x1a\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'R\x02in\x12w\n\x06not_in\x18\x07 \x03(\x05\x42`\xc2H]\n[\n\x0cint32.not_in\x1aKthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'R\x05notIn\x12\x34\n\x07\x65xample\x18\x08 \x03(\x05\x42\x1a\xc2H\x17\n\x15\n\rint32.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\x42\x0b\n\tless_thanB\x0e\n\x0cgreater_than\"\xde\x14\n\nInt64Rules\x12\x84\x01\n\x05\x63onst\x18\x01 \x01(\x03\x42n\xc2Hk\ni\n\x0bint64.const\x1aZthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12\x88\x01\n\x02lt\x18\x02 \x01(\x03\x42v\xc2Hs\nq\n\x08int64.lt\x1a\x65!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'H\x00R\x02lt\x12\x9a\x01\n\x03lte\x18\x03 \x01(\x03\x42\x85\x01\xc2H\x81\x01\n\x7f\n\tint64.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'H\x00R\x03lte\x12\xfd\x06\n\x02gt\x18\x04 \x01(\x03\x42\xea\x06\xc2H\xe6\x06\nt\n\x08int64.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\xad\x01\n\x0bint64.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \'must be greater than %s and less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xb5\x01\n\x15int64.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \'must be greater than %s or less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xbd\x01\n\x0cint64.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \'must be greater than %s and less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'\n\xc5\x01\n\x16int64.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \'must be greater than %s or less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'H\x01R\x02gt\x12\xca\x07\n\x03gte\x18\x05 \x01(\x03\x42\xb5\x07\xc2H\xb1\x07\n\x82\x01\n\tint64.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\xbc\x01\n\x0cint64.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \'must be greater than or equal to %s and less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xc4\x01\n\x16int64.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \'must be greater than or equal to %s or less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xcc\x01\n\rint64.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \'must be greater than or equal to %s and less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'\n\xd4\x01\n\x17int64.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \'must be greater than or equal to %s or less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'H\x01R\x03gte\x12}\n\x02in\x18\x06 \x03(\x03\x42m\xc2Hj\nh\n\x08int64.in\x1a\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'R\x02in\x12w\n\x06not_in\x18\x07 \x03(\x03\x42`\xc2H]\n[\n\x0cint64.not_in\x1aKthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'R\x05notIn\x12\x34\n\x07\x65xample\x18\t \x03(\x03\x42\x1a\xc2H\x17\n\x15\n\rint64.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\x42\x0b\n\tless_thanB\x0e\n\x0cgreater_than\"\xf0\x14\n\x0bUInt32Rules\x12\x85\x01\n\x05\x63onst\x18\x01 \x01(\rBo\xc2Hl\nj\n\x0cuint32.const\x1aZthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12\x89\x01\n\x02lt\x18\x02 \x01(\rBw\xc2Ht\nr\n\tuint32.lt\x1a\x65!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'H\x00R\x02lt\x12\x9c\x01\n\x03lte\x18\x03 \x01(\rB\x87\x01\xc2H\x83\x01\n\x80\x01\n\nuint32.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'H\x00R\x03lte\x12\x82\x07\n\x02gt\x18\x04 \x01(\rB\xef\x06\xc2H\xeb\x06\nu\n\tuint32.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\xae\x01\n\x0cuint32.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \'must be greater than %s and less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xb6\x01\n\x16uint32.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \'must be greater than %s or less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xbe\x01\n\ruint32.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \'must be greater than %s and less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'\n\xc6\x01\n\x17uint32.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \'must be greater than %s or less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'H\x01R\x02gt\x12\xcf\x07\n\x03gte\x18\x05 \x01(\rB\xba\x07\xc2H\xb6\x07\n\x83\x01\n\nuint32.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\xbd\x01\n\ruint32.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \'must be greater than or equal to %s and less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xc5\x01\n\x17uint32.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \'must be greater than or equal to %s or less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xcd\x01\n\x0euint32.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \'must be greater than or equal to %s and less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'\n\xd5\x01\n\x18uint32.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \'must be greater than or equal to %s or less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'H\x01R\x03gte\x12~\n\x02in\x18\x06 \x03(\rBn\xc2Hk\ni\n\tuint32.in\x1a\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'R\x02in\x12x\n\x06not_in\x18\x07 \x03(\rBa\xc2H^\n\\\n\ruint32.not_in\x1aKthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'R\x05notIn\x12\x35\n\x07\x65xample\x18\x08 \x03(\rB\x1b\xc2H\x18\n\x16\n\x0euint32.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\x42\x0b\n\tless_thanB\x0e\n\x0cgreater_than\"\xf0\x14\n\x0bUInt64Rules\x12\x85\x01\n\x05\x63onst\x18\x01 \x01(\x04\x42o\xc2Hl\nj\n\x0cuint64.const\x1aZthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12\x89\x01\n\x02lt\x18\x02 \x01(\x04\x42w\xc2Ht\nr\n\tuint64.lt\x1a\x65!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'H\x00R\x02lt\x12\x9c\x01\n\x03lte\x18\x03 \x01(\x04\x42\x87\x01\xc2H\x83\x01\n\x80\x01\n\nuint64.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'H\x00R\x03lte\x12\x82\x07\n\x02gt\x18\x04 \x01(\x04\x42\xef\x06\xc2H\xeb\x06\nu\n\tuint64.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\xae\x01\n\x0cuint64.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \'must be greater than %s and less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xb6\x01\n\x16uint64.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \'must be greater than %s or less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xbe\x01\n\ruint64.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \'must be greater than %s and less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'\n\xc6\x01\n\x17uint64.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \'must be greater than %s or less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'H\x01R\x02gt\x12\xcf\x07\n\x03gte\x18\x05 \x01(\x04\x42\xba\x07\xc2H\xb6\x07\n\x83\x01\n\nuint64.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\xbd\x01\n\ruint64.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \'must be greater than or equal to %s and less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xc5\x01\n\x17uint64.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \'must be greater than or equal to %s or less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xcd\x01\n\x0euint64.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \'must be greater than or equal to %s and less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'\n\xd5\x01\n\x18uint64.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \'must be greater than or equal to %s or less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'H\x01R\x03gte\x12~\n\x02in\x18\x06 \x03(\x04\x42n\xc2Hk\ni\n\tuint64.in\x1a\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'R\x02in\x12x\n\x06not_in\x18\x07 \x03(\x04\x42\x61\xc2H^\n\\\n\ruint64.not_in\x1aKthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'R\x05notIn\x12\x35\n\x07\x65xample\x18\x08 \x03(\x04\x42\x1b\xc2H\x18\n\x16\n\x0euint64.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\x42\x0b\n\tless_thanB\x0e\n\x0cgreater_than\"\xf0\x14\n\x0bSInt32Rules\x12\x85\x01\n\x05\x63onst\x18\x01 \x01(\x11\x42o\xc2Hl\nj\n\x0csint32.const\x1aZthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12\x89\x01\n\x02lt\x18\x02 \x01(\x11\x42w\xc2Ht\nr\n\tsint32.lt\x1a\x65!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'H\x00R\x02lt\x12\x9c\x01\n\x03lte\x18\x03 \x01(\x11\x42\x87\x01\xc2H\x83\x01\n\x80\x01\n\nsint32.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'H\x00R\x03lte\x12\x82\x07\n\x02gt\x18\x04 \x01(\x11\x42\xef\x06\xc2H\xeb\x06\nu\n\tsint32.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\xae\x01\n\x0csint32.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \'must be greater than %s and less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xb6\x01\n\x16sint32.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \'must be greater than %s or less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xbe\x01\n\rsint32.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \'must be greater than %s and less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'\n\xc6\x01\n\x17sint32.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \'must be greater than %s or less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'H\x01R\x02gt\x12\xcf\x07\n\x03gte\x18\x05 \x01(\x11\x42\xba\x07\xc2H\xb6\x07\n\x83\x01\n\nsint32.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\xbd\x01\n\rsint32.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \'must be greater than or equal to %s and less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xc5\x01\n\x17sint32.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \'must be greater than or equal to %s or less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xcd\x01\n\x0esint32.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \'must be greater than or equal to %s and less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'\n\xd5\x01\n\x18sint32.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \'must be greater than or equal to %s or less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'H\x01R\x03gte\x12~\n\x02in\x18\x06 \x03(\x11\x42n\xc2Hk\ni\n\tsint32.in\x1a\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'R\x02in\x12x\n\x06not_in\x18\x07 \x03(\x11\x42\x61\xc2H^\n\\\n\rsint32.not_in\x1aKthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'R\x05notIn\x12\x35\n\x07\x65xample\x18\x08 \x03(\x11\x42\x1b\xc2H\x18\n\x16\n\x0esint32.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\x42\x0b\n\tless_thanB\x0e\n\x0cgreater_than\"\xf0\x14\n\x0bSInt64Rules\x12\x85\x01\n\x05\x63onst\x18\x01 \x01(\x12\x42o\xc2Hl\nj\n\x0csint64.const\x1aZthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12\x89\x01\n\x02lt\x18\x02 \x01(\x12\x42w\xc2Ht\nr\n\tsint64.lt\x1a\x65!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'H\x00R\x02lt\x12\x9c\x01\n\x03lte\x18\x03 \x01(\x12\x42\x87\x01\xc2H\x83\x01\n\x80\x01\n\nsint64.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'H\x00R\x03lte\x12\x82\x07\n\x02gt\x18\x04 \x01(\x12\x42\xef\x06\xc2H\xeb\x06\nu\n\tsint64.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\xae\x01\n\x0csint64.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \'must be greater than %s and less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xb6\x01\n\x16sint64.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \'must be greater than %s or less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xbe\x01\n\rsint64.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \'must be greater than %s and less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'\n\xc6\x01\n\x17sint64.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \'must be greater than %s or less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'H\x01R\x02gt\x12\xcf\x07\n\x03gte\x18\x05 \x01(\x12\x42\xba\x07\xc2H\xb6\x07\n\x83\x01\n\nsint64.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\xbd\x01\n\rsint64.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \'must be greater than or equal to %s and less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xc5\x01\n\x17sint64.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \'must be greater than or equal to %s or less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xcd\x01\n\x0esint64.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \'must be greater than or equal to %s and less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'\n\xd5\x01\n\x18sint64.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \'must be greater than or equal to %s or less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'H\x01R\x03gte\x12~\n\x02in\x18\x06 \x03(\x12\x42n\xc2Hk\ni\n\tsint64.in\x1a\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'R\x02in\x12x\n\x06not_in\x18\x07 \x03(\x12\x42\x61\xc2H^\n\\\n\rsint64.not_in\x1aKthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'R\x05notIn\x12\x35\n\x07\x65xample\x18\x08 \x03(\x12\x42\x1b\xc2H\x18\n\x16\n\x0esint64.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\x42\x0b\n\tless_thanB\x0e\n\x0cgreater_than\"\x81\x15\n\x0c\x46ixed32Rules\x12\x86\x01\n\x05\x63onst\x18\x01 \x01(\x07\x42p\xc2Hm\nk\n\rfixed32.const\x1aZthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12\x8a\x01\n\x02lt\x18\x02 \x01(\x07\x42x\xc2Hu\ns\n\nfixed32.lt\x1a\x65!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'H\x00R\x02lt\x12\x9d\x01\n\x03lte\x18\x03 \x01(\x07\x42\x88\x01\xc2H\x84\x01\n\x81\x01\n\x0b\x66ixed32.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'H\x00R\x03lte\x12\x87\x07\n\x02gt\x18\x04 \x01(\x07\x42\xf4\x06\xc2H\xf0\x06\nv\n\nfixed32.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\xaf\x01\n\rfixed32.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \'must be greater than %s and less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xb7\x01\n\x17\x66ixed32.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \'must be greater than %s or less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xbf\x01\n\x0e\x66ixed32.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \'must be greater than %s and less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'\n\xc7\x01\n\x18\x66ixed32.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \'must be greater than %s or less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'H\x01R\x02gt\x12\xd4\x07\n\x03gte\x18\x05 \x01(\x07\x42\xbf\x07\xc2H\xbb\x07\n\x84\x01\n\x0b\x66ixed32.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\xbe\x01\n\x0e\x66ixed32.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \'must be greater than or equal to %s and less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xc6\x01\n\x18\x66ixed32.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \'must be greater than or equal to %s or less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xce\x01\n\x0f\x66ixed32.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \'must be greater than or equal to %s and less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'\n\xd6\x01\n\x19\x66ixed32.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \'must be greater than or equal to %s or less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'H\x01R\x03gte\x12\x7f\n\x02in\x18\x06 \x03(\x07\x42o\xc2Hl\nj\n\nfixed32.in\x1a\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'R\x02in\x12y\n\x06not_in\x18\x07 \x03(\x07\x42\x62\xc2H_\n]\n\x0e\x66ixed32.not_in\x1aKthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'R\x05notIn\x12\x36\n\x07\x65xample\x18\x08 \x03(\x07\x42\x1c\xc2H\x19\n\x17\n\x0f\x66ixed32.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\x42\x0b\n\tless_thanB\x0e\n\x0cgreater_than\"\x81\x15\n\x0c\x46ixed64Rules\x12\x86\x01\n\x05\x63onst\x18\x01 \x01(\x06\x42p\xc2Hm\nk\n\rfixed64.const\x1aZthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12\x8a\x01\n\x02lt\x18\x02 \x01(\x06\x42x\xc2Hu\ns\n\nfixed64.lt\x1a\x65!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'H\x00R\x02lt\x12\x9d\x01\n\x03lte\x18\x03 \x01(\x06\x42\x88\x01\xc2H\x84\x01\n\x81\x01\n\x0b\x66ixed64.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'H\x00R\x03lte\x12\x87\x07\n\x02gt\x18\x04 \x01(\x06\x42\xf4\x06\xc2H\xf0\x06\nv\n\nfixed64.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\xaf\x01\n\rfixed64.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \'must be greater than %s and less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xb7\x01\n\x17\x66ixed64.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \'must be greater than %s or less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xbf\x01\n\x0e\x66ixed64.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \'must be greater than %s and less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'\n\xc7\x01\n\x18\x66ixed64.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \'must be greater than %s or less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'H\x01R\x02gt\x12\xd4\x07\n\x03gte\x18\x05 \x01(\x06\x42\xbf\x07\xc2H\xbb\x07\n\x84\x01\n\x0b\x66ixed64.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\xbe\x01\n\x0e\x66ixed64.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \'must be greater than or equal to %s and less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xc6\x01\n\x18\x66ixed64.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \'must be greater than or equal to %s or less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xce\x01\n\x0f\x66ixed64.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \'must be greater than or equal to %s and less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'\n\xd6\x01\n\x19\x66ixed64.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \'must be greater than or equal to %s or less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'H\x01R\x03gte\x12\x7f\n\x02in\x18\x06 \x03(\x06\x42o\xc2Hl\nj\n\nfixed64.in\x1a\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'R\x02in\x12y\n\x06not_in\x18\x07 \x03(\x06\x42\x62\xc2H_\n]\n\x0e\x66ixed64.not_in\x1aKthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'R\x05notIn\x12\x36\n\x07\x65xample\x18\x08 \x03(\x06\x42\x1c\xc2H\x19\n\x17\n\x0f\x66ixed64.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\x42\x0b\n\tless_thanB\x0e\n\x0cgreater_than\"\x93\x15\n\rSFixed32Rules\x12\x87\x01\n\x05\x63onst\x18\x01 \x01(\x0f\x42q\xc2Hn\nl\n\x0esfixed32.const\x1aZthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12\x8b\x01\n\x02lt\x18\x02 \x01(\x0f\x42y\xc2Hv\nt\n\x0bsfixed32.lt\x1a\x65!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'H\x00R\x02lt\x12\x9e\x01\n\x03lte\x18\x03 \x01(\x0f\x42\x89\x01\xc2H\x85\x01\n\x82\x01\n\x0csfixed32.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'H\x00R\x03lte\x12\x8c\x07\n\x02gt\x18\x04 \x01(\x0f\x42\xf9\x06\xc2H\xf5\x06\nw\n\x0bsfixed32.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\xb0\x01\n\x0esfixed32.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \'must be greater than %s and less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xb8\x01\n\x18sfixed32.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \'must be greater than %s or less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xc0\x01\n\x0fsfixed32.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \'must be greater than %s and less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'\n\xc8\x01\n\x19sfixed32.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \'must be greater than %s or less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'H\x01R\x02gt\x12\xd9\x07\n\x03gte\x18\x05 \x01(\x0f\x42\xc4\x07\xc2H\xc0\x07\n\x85\x01\n\x0csfixed32.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\xbf\x01\n\x0fsfixed32.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \'must be greater than or equal to %s and less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xc7\x01\n\x19sfixed32.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \'must be greater than or equal to %s or less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xcf\x01\n\x10sfixed32.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \'must be greater than or equal to %s and less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'\n\xd7\x01\n\x1asfixed32.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \'must be greater than or equal to %s or less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'H\x01R\x03gte\x12\x80\x01\n\x02in\x18\x06 \x03(\x0f\x42p\xc2Hm\nk\n\x0bsfixed32.in\x1a\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'R\x02in\x12z\n\x06not_in\x18\x07 \x03(\x0f\x42\x63\xc2H`\n^\n\x0fsfixed32.not_in\x1aKthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'R\x05notIn\x12\x37\n\x07\x65xample\x18\x08 \x03(\x0f\x42\x1d\xc2H\x1a\n\x18\n\x10sfixed32.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\x42\x0b\n\tless_thanB\x0e\n\x0cgreater_than\"\x93\x15\n\rSFixed64Rules\x12\x87\x01\n\x05\x63onst\x18\x01 \x01(\x10\x42q\xc2Hn\nl\n\x0esfixed64.const\x1aZthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12\x8b\x01\n\x02lt\x18\x02 \x01(\x10\x42y\xc2Hv\nt\n\x0bsfixed64.lt\x1a\x65!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'H\x00R\x02lt\x12\x9e\x01\n\x03lte\x18\x03 \x01(\x10\x42\x89\x01\xc2H\x85\x01\n\x82\x01\n\x0csfixed64.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'H\x00R\x03lte\x12\x8c\x07\n\x02gt\x18\x04 \x01(\x10\x42\xf9\x06\xc2H\xf5\x06\nw\n\x0bsfixed64.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\xb0\x01\n\x0esfixed64.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \'must be greater than %s and less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xb8\x01\n\x18sfixed64.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \'must be greater than %s or less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xc0\x01\n\x0fsfixed64.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \'must be greater than %s and less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'\n\xc8\x01\n\x19sfixed64.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \'must be greater than %s or less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'H\x01R\x02gt\x12\xd9\x07\n\x03gte\x18\x05 \x01(\x10\x42\xc4\x07\xc2H\xc0\x07\n\x85\x01\n\x0csfixed64.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\xbf\x01\n\x0fsfixed64.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \'must be greater than or equal to %s and less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xc7\x01\n\x19sfixed64.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \'must be greater than or equal to %s or less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xcf\x01\n\x10sfixed64.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \'must be greater than or equal to %s and less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'\n\xd7\x01\n\x1asfixed64.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \'must be greater than or equal to %s or less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'H\x01R\x03gte\x12\x80\x01\n\x02in\x18\x06 \x03(\x10\x42p\xc2Hm\nk\n\x0bsfixed64.in\x1a\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'R\x02in\x12z\n\x06not_in\x18\x07 \x03(\x10\x42\x63\xc2H`\n^\n\x0fsfixed64.not_in\x1aKthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'R\x05notIn\x12\x37\n\x07\x65xample\x18\x08 \x03(\x10\x42\x1d\xc2H\x1a\n\x18\n\x10sfixed64.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\x42\x0b\n\tless_thanB\x0e\n\x0cgreater_than\"\xd1\x01\n\tBoolRules\x12\x83\x01\n\x05\x63onst\x18\x01 \x01(\x08\x42m\xc2Hj\nh\n\nbool.const\x1aZthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12\x33\n\x07\x65xample\x18\x02 \x03(\x08\x42\x19\xc2H\x16\n\x14\n\x0c\x62ool.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"\xcf?\n\x0bStringRules\x12\x87\x01\n\x05\x63onst\x18\x01 \x01(\tBq\xc2Hn\nl\n\x0cstring.const\x1a\\this != getField(rules, \'const\') ? \'must equal `%s`\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12v\n\x03len\x18\x13 \x01(\x04\x42\x64\xc2Ha\n_\n\nstring.len\x1aQuint(this.size()) != rules.len ? \'must be %s characters\'.format([rules.len]) : \'\'R\x03len\x12\x91\x01\n\x07min_len\x18\x02 \x01(\x04\x42x\xc2Hu\ns\n\x0estring.min_len\x1a\x61uint(this.size()) < rules.min_len ? \'must be at least %s characters\'.format([rules.min_len]) : \'\'R\x06minLen\x12\x90\x01\n\x07max_len\x18\x03 \x01(\x04\x42w\xc2Ht\nr\n\x0estring.max_len\x1a`uint(this.size()) > rules.max_len ? \'must be at most %s characters\'.format([rules.max_len]) : \'\'R\x06maxLen\x12\x95\x01\n\tlen_bytes\x18\x14 \x01(\x04\x42x\xc2Hu\ns\n\x10string.len_bytes\x1a_uint(bytes(this).size()) != rules.len_bytes ? \'must be %s bytes\'.format([rules.len_bytes]) : \'\'R\x08lenBytes\x12\x9e\x01\n\tmin_bytes\x18\x04 \x01(\x04\x42\x80\x01\xc2H}\n{\n\x10string.min_bytes\x1aguint(bytes(this).size()) < rules.min_bytes ? \'must be at least %s bytes\'.format([rules.min_bytes]) : \'\'R\x08minBytes\x12\x9c\x01\n\tmax_bytes\x18\x05 \x01(\x04\x42\x7f\xc2H|\nz\n\x10string.max_bytes\x1a\x66uint(bytes(this).size()) > rules.max_bytes ? \'must be at most %s bytes\'.format([rules.max_bytes]) : \'\'R\x08maxBytes\x12\x90\x01\n\x07pattern\x18\x06 \x01(\tBv\xc2Hs\nq\n\x0estring.pattern\x1a_!this.matches(rules.pattern) ? \'does not match regex pattern `%s`\'.format([rules.pattern]) : \'\'R\x07pattern\x12\x86\x01\n\x06prefix\x18\x07 \x01(\tBn\xc2Hk\ni\n\rstring.prefix\x1aX!this.startsWith(rules.prefix) ? \'does not have prefix `%s`\'.format([rules.prefix]) : \'\'R\x06prefix\x12\x84\x01\n\x06suffix\x18\x08 \x01(\tBl\xc2Hi\ng\n\rstring.suffix\x1aV!this.endsWith(rules.suffix) ? \'does not have suffix `%s`\'.format([rules.suffix]) : \'\'R\x06suffix\x12\x94\x01\n\x08\x63ontains\x18\t \x01(\tBx\xc2Hu\ns\n\x0fstring.contains\x1a`!this.contains(rules.contains) ? \'does not contain substring `%s`\'.format([rules.contains]) : \'\'R\x08\x63ontains\x12\x9e\x01\n\x0cnot_contains\x18\x17 \x01(\tB{\xc2Hx\nv\n\x13string.not_contains\x1a_this.contains(rules.not_contains) ? \'contains substring `%s`\'.format([rules.not_contains]) : \'\'R\x0bnotContains\x12~\n\x02in\x18\n \x03(\tBn\xc2Hk\ni\n\tstring.in\x1a\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'R\x02in\x12x\n\x06not_in\x18\x0b \x03(\tBa\xc2H^\n\\\n\rstring.not_in\x1aKthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'R\x05notIn\x12\xe0\x01\n\x05\x65mail\x18\x0c \x01(\x08\x42\xc7\x01\xc2H\xc3\x01\n[\n\x0cstring.email\x12\x1dmust be a valid email address\x1a,!rules.email || this == \'\' || this.isEmail()\nd\n\x12string.email_empty\x12\x32value is empty, which is not a valid email address\x1a\x1a!rules.email || this != \'\'H\x00R\x05\x65mail\x12\xeb\x01\n\x08hostname\x18\r \x01(\x08\x42\xcc\x01\xc2H\xc8\x01\n_\n\x0fstring.hostname\x12\x18must be a valid hostname\x1a\x32!rules.hostname || this == \'\' || this.isHostname()\ne\n\x15string.hostname_empty\x12-value is empty, which is not a valid hostname\x1a\x1d!rules.hostname || this != \'\'H\x00R\x08hostname\x12\xc5\x01\n\x02ip\x18\x0e \x01(\x08\x42\xb2\x01\xc2H\xae\x01\nO\n\tstring.ip\x12\x1amust be a valid IP address\x1a&!rules.ip || this == \'\' || this.isIp()\n[\n\x0fstring.ip_empty\x12/value is empty, which is not a valid IP address\x1a\x17!rules.ip || this != \'\'H\x00R\x02ip\x12\xd6\x01\n\x04ipv4\x18\x0f \x01(\x08\x42\xbf\x01\xc2H\xbb\x01\nV\n\x0bstring.ipv4\x12\x1cmust be a valid IPv4 address\x1a)!rules.ipv4 || this == \'\' || this.isIp(4)\na\n\x11string.ipv4_empty\x12\x31value is empty, which is not a valid IPv4 address\x1a\x19!rules.ipv4 || this != \'\'H\x00R\x04ipv4\x12\xd6\x01\n\x04ipv6\x18\x10 \x01(\x08\x42\xbf\x01\xc2H\xbb\x01\nV\n\x0bstring.ipv6\x12\x1cmust be a valid IPv6 address\x1a)!rules.ipv6 || this == \'\' || this.isIp(6)\na\n\x11string.ipv6_empty\x12\x31value is empty, which is not a valid IPv6 address\x1a\x19!rules.ipv6 || this != \'\'H\x00R\x04ipv6\x12\xbe\x01\n\x03uri\x18\x11 \x01(\x08\x42\xa9\x01\xc2H\xa5\x01\nK\n\nstring.uri\x12\x13must be a valid URI\x1a(!rules.uri || this == \'\' || this.isUri()\nV\n\x10string.uri_empty\x12(value is empty, which is not a valid URI\x1a\x18!rules.uri || this != \'\'H\x00R\x03uri\x12r\n\x07uri_ref\x18\x12 \x01(\x08\x42W\xc2HT\nR\n\x0estring.uri_ref\x12\x1dmust be a valid URI Reference\x1a!!rules.uri_ref || this.isUriRef()H\x00R\x06uriRef\x12\x92\x02\n\x07\x61\x64\x64ress\x18\x15 \x01(\x08\x42\xf5\x01\xc2H\xf1\x01\n{\n\x0estring.address\x12\'must be a valid hostname, or ip address\x1a@!rules.address || this == \'\' || this.isHostname() || this.isIp()\nr\n\x14string.address_empty\x12!rules.ipv4_with_prefixlen || this == \'\' || this.isIpPrefix(4)\n\x92\x01\n string.ipv4_with_prefixlen_empty\x12\x44value is empty, which is not a valid IPv4 address with prefix length\x1a(!rules.ipv4_with_prefixlen || this != \'\'H\x00R\x11ipv4WithPrefixlen\x12\xdc\x02\n\x13ipv6_with_prefixlen\x18\x1c \x01(\x08\x42\xa9\x02\xc2H\xa5\x02\n\x8d\x01\n\x1astring.ipv6_with_prefixlen\x12/must be a valid IPv6 address with prefix length\x1a>!rules.ipv6_with_prefixlen || this == \'\' || this.isIpPrefix(6)\n\x92\x01\n string.ipv6_with_prefixlen_empty\x12\x44value is empty, which is not a valid IPv6 address with prefix length\x1a(!rules.ipv6_with_prefixlen || this != \'\'H\x00R\x11ipv6WithPrefixlen\x12\xf6\x01\n\tip_prefix\x18\x1d \x01(\x08\x42\xd6\x01\xc2H\xd2\x01\nf\n\x10string.ip_prefix\x12\x19must be a valid IP prefix\x1a\x37!rules.ip_prefix || this == \'\' || this.isIpPrefix(true)\nh\n\x16string.ip_prefix_empty\x12.value is empty, which is not a valid IP prefix\x1a\x1e!rules.ip_prefix || this != \'\'H\x00R\x08ipPrefix\x12\x89\x02\n\x0bipv4_prefix\x18\x1e \x01(\x08\x42\xe5\x01\xc2H\xe1\x01\no\n\x12string.ipv4_prefix\x12\x1bmust be a valid IPv4 prefix\x1a!rules.host_and_port || this == \'\' || this.isHostAndPort(true)\ny\n\x1astring.host_and_port_empty\x12\x37value is empty, which is not a valid host and port pair\x1a\"!rules.host_and_port || this != \'\'H\x00R\x0bhostAndPort\x12\xf4\x01\n\x04ulid\x18# \x01(\x08\x42\xdd\x01\xc2H\xd9\x01\n|\n\x0bstring.ulid\x12\x14must be a valid ULID\x1aW!rules.ulid || this == \'\' || this.matches(\'^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$\')\nY\n\x11string.ulid_empty\x12)value is empty, which is not a valid ULID\x1a\x19!rules.ulid || this != \'\'H\x00R\x04ulid\x12\xe1\x02\n\x0cprotobuf_fqn\x18% \x01(\x08\x42\xbb\x02\xc2H\xb7\x02\n\xaf\x01\n\x13string.protobuf_fqn\x12-must be a valid fully-qualified Protobuf name\x1ai!rules.protobuf_fqn || this == \'\' || this.matches(\'^[A-Za-z_][A-Za-z_0-9]*(\\\\.[A-Za-z_][A-Za-z_0-9]*)*$\')\n\x82\x01\n\x19string.protobuf_fqn_empty\x12\x42value is empty, which is not a valid fully-qualified Protobuf name\x1a!!rules.protobuf_fqn || this != \'\'H\x00R\x0bprotobufFqn\x12\xa1\x03\n\x10protobuf_dot_fqn\x18& \x01(\x08\x42\xf4\x02\xc2H\xf0\x02\n\xcd\x01\n\x17string.protobuf_dot_fqn\x12@must be a valid fully-qualified Protobuf name with a leading dot\x1ap!rules.protobuf_dot_fqn || this == \'\' || this.matches(\'^\\\\.[A-Za-z_][A-Za-z_0-9]*(\\\\.[A-Za-z_][A-Za-z_0-9]*)*$\')\n\x9d\x01\n\x1dstring.protobuf_dot_fqn_empty\x12Uvalue is empty, which is not a valid fully-qualified Protobuf name with a leading dot\x1a%!rules.protobuf_dot_fqn || this != \'\'H\x00R\x0eprotobufDotFqn\x12\xac\x05\n\x10well_known_regex\x18\x18 \x01(\x0e\x32\x18.buf.validate.KnownRegexB\xe5\x04\xc2H\xe1\x04\n\xea\x01\n#string.well_known_regex.header_name\x12 must be a valid HTTP header name\x1a\xa0\x01rules.well_known_regex != 1 || this == \'\' || this.matches(!has(rules.strict) || rules.strict ?\'^:?[0-9a-zA-Z!#$%&\\\'*+-.^_|~\\x60]+$\' :\'^[^\\u0000\\u000A\\u000D]+$\')\n\x8d\x01\n)string.well_known_regex.header_name_empty\x12\x35value is empty, which is not a valid HTTP header name\x1a)rules.well_known_regex != 1 || this != \'\'\n\xe1\x01\n$string.well_known_regex.header_value\x12!must be a valid HTTP header value\x1a\x95\x01rules.well_known_regex != 2 || this.matches(!has(rules.strict) || rules.strict ?\'^[^\\u0000-\\u0008\\u000A-\\u001F\\u007F]*$\' :\'^[^\\u0000\\u000A\\u000D]*$\')H\x00R\x0ewellKnownRegex\x12\x16\n\x06strict\x18\x19 \x01(\x08R\x06strict\x12\x35\n\x07\x65xample\x18\" \x03(\tB\x1b\xc2H\x18\n\x16\n\x0estring.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\x42\x0c\n\nwell_known\"\xca\x12\n\nBytesRules\x12\x81\x01\n\x05\x63onst\x18\x01 \x01(\x0c\x42k\xc2Hh\nf\n\x0b\x62ytes.const\x1aWthis != getField(rules, \'const\') ? \'must be %x\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12p\n\x03len\x18\r \x01(\x04\x42^\xc2H[\nY\n\tbytes.len\x1aLuint(this.size()) != rules.len ? \'must be %s bytes\'.format([rules.len]) : \'\'R\x03len\x12\x8b\x01\n\x07min_len\x18\x02 \x01(\x04\x42r\xc2Ho\nm\n\rbytes.min_len\x1a\\uint(this.size()) < rules.min_len ? \'must be at least %s bytes\'.format([rules.min_len]) : \'\'R\x06minLen\x12\x8a\x01\n\x07max_len\x18\x03 \x01(\x04\x42q\xc2Hn\nl\n\rbytes.max_len\x1a[uint(this.size()) > rules.max_len ? \'must be at most %s bytes\'.format([rules.max_len]) : \'\'R\x06maxLen\x12\x93\x01\n\x07pattern\x18\x04 \x01(\tBy\xc2Hv\nt\n\rbytes.pattern\x1a\x63!string(this).matches(rules.pattern) ? \'must match regex pattern `%s`\'.format([rules.pattern]) : \'\'R\x07pattern\x12\x83\x01\n\x06prefix\x18\x05 \x01(\x0c\x42k\xc2Hh\nf\n\x0c\x62ytes.prefix\x1aV!this.startsWith(rules.prefix) ? \'does not have prefix %x\'.format([rules.prefix]) : \'\'R\x06prefix\x12\x81\x01\n\x06suffix\x18\x06 \x01(\x0c\x42i\xc2Hf\nd\n\x0c\x62ytes.suffix\x1aT!this.endsWith(rules.suffix) ? \'does not have suffix %x\'.format([rules.suffix]) : \'\'R\x06suffix\x12\x87\x01\n\x08\x63ontains\x18\x07 \x01(\x0c\x42k\xc2Hh\nf\n\x0e\x62ytes.contains\x1aT!this.contains(rules.contains) ? \'does not contain %x\'.format([rules.contains]) : \'\'R\x08\x63ontains\x12\xa5\x01\n\x02in\x18\x08 \x03(\x0c\x42\x94\x01\xc2H\x90\x01\n\x8d\x01\n\x08\x62ytes.in\x1a\x80\x01getField(rules, \'in\').size() > 0 && !(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'R\x02in\x12w\n\x06not_in\x18\t \x03(\x0c\x42`\xc2H]\n[\n\x0c\x62ytes.not_in\x1aKthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'R\x05notIn\x12\xe9\x01\n\x02ip\x18\n \x01(\x08\x42\xd6\x01\xc2H\xd2\x01\nn\n\x08\x62ytes.ip\x12\x1amust be a valid IP address\x1a\x46!rules.ip || this.size() == 0 || this.size() == 4 || this.size() == 16\n`\n\x0e\x62ytes.ip_empty\x12/value is empty, which is not a valid IP address\x1a\x1d!rules.ip || this.size() != 0H\x00R\x02ip\x12\xe4\x01\n\x04ipv4\x18\x0b \x01(\x08\x42\xcd\x01\xc2H\xc9\x01\n_\n\nbytes.ipv4\x12\x1cmust be a valid IPv4 address\x1a\x33!rules.ipv4 || this.size() == 0 || this.size() == 4\nf\n\x10\x62ytes.ipv4_empty\x12\x31value is empty, which is not a valid IPv4 address\x1a\x1f!rules.ipv4 || this.size() != 0H\x00R\x04ipv4\x12\xe5\x01\n\x04ipv6\x18\x0c \x01(\x08\x42\xce\x01\xc2H\xca\x01\n`\n\nbytes.ipv6\x12\x1cmust be a valid IPv6 address\x1a\x34!rules.ipv6 || this.size() == 0 || this.size() == 16\nf\n\x10\x62ytes.ipv6_empty\x12\x31value is empty, which is not a valid IPv6 address\x1a\x1f!rules.ipv6 || this.size() != 0H\x00R\x04ipv6\x12\xd5\x01\n\x04uuid\x18\x0f \x01(\x08\x42\xbe\x01\xc2H\xba\x01\nX\n\nbytes.uuid\x12\x14must be a valid UUID\x1a\x34!rules.uuid || this.size() == 0 || this.size() == 16\n^\n\x10\x62ytes.uuid_empty\x12)value is empty, which is not a valid UUID\x1a\x1f!rules.uuid || this.size() != 0H\x00R\x04uuid\x12\x34\n\x07\x65xample\x18\x0e \x03(\x0c\x42\x1a\xc2H\x17\n\x15\n\rbytes.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\x42\x0c\n\nwell_known\"\xea\x03\n\tEnumRules\x12\x83\x01\n\x05\x63onst\x18\x01 \x01(\x05\x42m\xc2Hj\nh\n\nenum.const\x1aZthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12!\n\x0c\x64\x65\x66ined_only\x18\x02 \x01(\x08R\x0b\x64\x65\x66inedOnly\x12|\n\x02in\x18\x03 \x03(\x05\x42l\xc2Hi\ng\n\x07\x65num.in\x1a\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'R\x02in\x12v\n\x06not_in\x18\x04 \x03(\x05\x42_\xc2H\\\nZ\n\x0b\x65num.not_in\x1aKthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'R\x05notIn\x12\x33\n\x07\x65xample\x18\x05 \x03(\x05\x42\x19\xc2H\x16\n\x14\n\x0c\x65num.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"\x90\x04\n\rRepeatedRules\x12\xa0\x01\n\tmin_items\x18\x01 \x01(\x04\x42\x82\x01\xc2H\x7f\n}\n\x12repeated.min_items\x1aguint(this.size()) < rules.min_items ? \'must contain at least %d item(s)\'.format([rules.min_items]) : \'\'R\x08minItems\x12\xa6\x01\n\tmax_items\x18\x02 \x01(\x04\x42\x88\x01\xc2H\x84\x01\n\x81\x01\n\x12repeated.max_items\x1akuint(this.size()) > rules.max_items ? \'must contain no more than %s item(s)\'.format([rules.max_items]) : \'\'R\x08maxItems\x12x\n\x06unique\x18\x03 \x01(\x08\x42`\xc2H]\n[\n\x0frepeated.unique\x12(repeated value must contain unique items\x1a\x1e!rules.unique || this.unique()R\x06unique\x12.\n\x05items\x18\x04 \x01(\x0b\x32\x18.buf.validate.FieldRulesR\x05items*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"\xac\x03\n\x08MapRules\x12\x99\x01\n\tmin_pairs\x18\x01 \x01(\x04\x42|\xc2Hy\nw\n\rmap.min_pairs\x1a\x66uint(this.size()) < rules.min_pairs ? \'map must be at least %d entries\'.format([rules.min_pairs]) : \'\'R\x08minPairs\x12\x98\x01\n\tmax_pairs\x18\x02 \x01(\x04\x42{\xc2Hx\nv\n\rmap.max_pairs\x1a\x65uint(this.size()) > rules.max_pairs ? \'map must be at most %d entries\'.format([rules.max_pairs]) : \'\'R\x08maxPairs\x12,\n\x04keys\x18\x04 \x01(\x0b\x32\x18.buf.validate.FieldRulesR\x04keys\x12\x30\n\x06values\x18\x05 \x01(\x0b\x32\x18.buf.validate.FieldRulesR\x06values*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"1\n\x08\x41nyRules\x12\x0e\n\x02in\x18\x02 \x03(\tR\x02in\x12\x15\n\x06not_in\x18\x03 \x03(\tR\x05notIn\"\xec\x16\n\rDurationRules\x12\xa2\x01\n\x05\x63onst\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationBq\xc2Hn\nl\n\x0e\x64uration.const\x1aZthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12\xa6\x01\n\x02lt\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationBy\xc2Hv\nt\n\x0b\x64uration.lt\x1a\x65!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'H\x00R\x02lt\x12\xb9\x01\n\x03lte\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationB\x89\x01\xc2H\x85\x01\n\x82\x01\n\x0c\x64uration.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'H\x00R\x03lte\x12\xa7\x07\n\x02gt\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\xf9\x06\xc2H\xf5\x06\nw\n\x0b\x64uration.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\xb0\x01\n\x0e\x64uration.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \'must be greater than %s and less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xb8\x01\n\x18\x64uration.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \'must be greater than %s or less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xc0\x01\n\x0f\x64uration.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \'must be greater than %s and less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'\n\xc8\x01\n\x19\x64uration.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \'must be greater than %s or less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'H\x01R\x02gt\x12\xf4\x07\n\x03gte\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\xc4\x07\xc2H\xc0\x07\n\x85\x01\n\x0c\x64uration.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\xbf\x01\n\x0f\x64uration.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \'must be greater than or equal to %s and less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xc7\x01\n\x19\x64uration.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \'must be greater than or equal to %s or less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xcf\x01\n\x10\x64uration.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \'must be greater than or equal to %s and less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'\n\xd7\x01\n\x1a\x64uration.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \'must be greater than or equal to %s or less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'H\x01R\x03gte\x12\x9b\x01\n\x02in\x18\x07 \x03(\x0b\x32\x19.google.protobuf.DurationBp\xc2Hm\nk\n\x0b\x64uration.in\x1a\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'R\x02in\x12\x95\x01\n\x06not_in\x18\x08 \x03(\x0b\x32\x19.google.protobuf.DurationBc\xc2H`\n^\n\x0f\x64uration.not_in\x1aKthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'R\x05notIn\x12R\n\x07\x65xample\x18\t \x03(\x0b\x32\x19.google.protobuf.DurationB\x1d\xc2H\x1a\n\x18\n\x10\x64uration.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\x42\x0b\n\tless_thanB\x0e\n\x0cgreater_than\"\x86\x06\n\x0e\x46ieldMaskRules\x12\xc0\x01\n\x05\x63onst\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x8d\x01\xc2H\x89\x01\n\x86\x01\n\x10\x66ield_mask.const\x1arthis.paths != getField(rules, \'const\').paths ? \'must equal paths %s\'.format([getField(rules, \'const\').paths]) : \'\'R\x05\x63onst\x12\xd7\x01\n\x02in\x18\x02 \x03(\tB\xc6\x01\xc2H\xc2\x01\n\xbf\x01\n\rfield_mask.in\x1a\xad\x01!this.paths.all(p, p in getField(rules, \'in\') || getField(rules, \'in\').exists(f, p.startsWith(f+\'.\'))) ? \'must only contain paths in %s\'.format([getField(rules, \'in\')]) : \'\'R\x02in\x12\xf4\x01\n\x06not_in\x18\x03 \x03(\tB\xdc\x01\xc2H\xd8\x01\n\xd5\x01\n\x11\x66ield_mask.not_in\x1a\xbf\x01!this.paths.all(p, !(p in getField(rules, \'not_in\') || getField(rules, \'not_in\').exists(f, p.startsWith(f+\'.\')))) ? \'must not contain any paths in %s\'.format([getField(rules, \'not_in\')]) : \'\'R\x05notIn\x12U\n\x07\x65xample\x18\x04 \x03(\x0b\x32\x1a.google.protobuf.FieldMaskB\x1f\xc2H\x1c\n\x1a\n\x12\x66ield_mask.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"\xe8\x17\n\x0eTimestampRules\x12\xa4\x01\n\x05\x63onst\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampBr\xc2Ho\nm\n\x0ftimestamp.const\x1aZthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12\xa8\x01\n\x02lt\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampBz\xc2Hw\nu\n\x0ctimestamp.lt\x1a\x65!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'H\x00R\x02lt\x12\xbb\x01\n\x03lte\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x8a\x01\xc2H\x86\x01\n\x83\x01\n\rtimestamp.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'H\x00R\x03lte\x12m\n\x06lt_now\x18\x07 \x01(\x08\x42T\xc2HQ\nO\n\x10timestamp.lt_now\x1a;(rules.lt_now && this > now) ? \'must be less than now\' : \'\'H\x00R\x05ltNow\x12\xad\x07\n\x02gt\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\xfe\x06\xc2H\xfa\x06\nx\n\x0ctimestamp.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\xb1\x01\n\x0ftimestamp.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \'must be greater than %s and less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xb9\x01\n\x19timestamp.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \'must be greater than %s or less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xc1\x01\n\x10timestamp.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \'must be greater than %s and less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'\n\xc9\x01\n\x1atimestamp.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \'must be greater than %s or less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'H\x01R\x02gt\x12\xfa\x07\n\x03gte\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\xc9\x07\xc2H\xc5\x07\n\x86\x01\n\rtimestamp.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\xc0\x01\n\x10timestamp.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \'must be greater than or equal to %s and less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xc8\x01\n\x1atimestamp.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \'must be greater than or equal to %s or less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xd0\x01\n\x11timestamp.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \'must be greater than or equal to %s and less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'\n\xd8\x01\n\x1btimestamp.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \'must be greater than or equal to %s or less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'H\x01R\x03gte\x12p\n\x06gt_now\x18\x08 \x01(\x08\x42W\xc2HT\nR\n\x10timestamp.gt_now\x1a>(rules.gt_now && this < now) ? \'must be greater than now\' : \'\'H\x01R\x05gtNow\x12\xb9\x01\n\x06within\x18\t \x01(\x0b\x32\x19.google.protobuf.DurationB\x85\x01\xc2H\x81\x01\n\x7f\n\x10timestamp.within\x1akthis < now-rules.within || this > now+rules.within ? \'must be within %s of now\'.format([rules.within]) : \'\'R\x06within\x12T\n\x07\x65xample\x18\n \x03(\x0b\x32\x1a.google.protobuf.TimestampB\x1e\xc2H\x1b\n\x19\n\x11timestamp.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\x42\x0b\n\tless_thanB\x0e\n\x0cgreater_than\"E\n\nViolations\x12\x37\n\nviolations\x18\x01 \x03(\x0b\x32\x17.buf.validate.ViolationR\nviolations\"\xc5\x01\n\tViolation\x12-\n\x05\x66ield\x18\x05 \x01(\x0b\x32\x17.buf.validate.FieldPathR\x05\x66ield\x12+\n\x04rule\x18\x06 \x01(\x0b\x32\x17.buf.validate.FieldPathR\x04rule\x12\x17\n\x07rule_id\x18\x02 \x01(\tR\x06ruleId\x12\x18\n\x07message\x18\x03 \x01(\tR\x07message\x12\x17\n\x07\x66or_key\x18\x04 \x01(\x08R\x06\x66orKeyJ\x04\x08\x01\x10\x02R\nfield_path\"G\n\tFieldPath\x12:\n\x08\x65lements\x18\x01 \x03(\x0b\x32\x1e.buf.validate.FieldPathElementR\x08\x65lements\"\xcc\x03\n\x10\x46ieldPathElement\x12!\n\x0c\x66ield_number\x18\x01 \x01(\x05R\x0b\x66ieldNumber\x12\x1d\n\nfield_name\x18\x02 \x01(\tR\tfieldName\x12I\n\nfield_type\x18\x03 \x01(\x0e\x32*.google.protobuf.FieldDescriptorProto.TypeR\tfieldType\x12\x45\n\x08key_type\x18\x04 \x01(\x0e\x32*.google.protobuf.FieldDescriptorProto.TypeR\x07keyType\x12I\n\nvalue_type\x18\x05 \x01(\x0e\x32*.google.protobuf.FieldDescriptorProto.TypeR\tvalueType\x12\x16\n\x05index\x18\x06 \x01(\x04H\x00R\x05index\x12\x1b\n\x08\x62ool_key\x18\x07 \x01(\x08H\x00R\x07\x62oolKey\x12\x19\n\x07int_key\x18\x08 \x01(\x03H\x00R\x06intKey\x12\x1b\n\x08uint_key\x18\t \x01(\x04H\x00R\x07uintKey\x12\x1f\n\nstring_key\x18\n \x01(\tH\x00R\tstringKeyB\x0b\n\tsubscript*\xa1\x01\n\x06Ignore\x12\x16\n\x12IGNORE_UNSPECIFIED\x10\x00\x12\x18\n\x14IGNORE_IF_ZERO_VALUE\x10\x01\x12\x11\n\rIGNORE_ALWAYS\x10\x03\"\x04\x08\x02\x10\x02*\x0cIGNORE_EMPTY*\x0eIGNORE_DEFAULT*\x17IGNORE_IF_DEFAULT_VALUE*\x15IGNORE_IF_UNPOPULATED*n\n\nKnownRegex\x12\x1b\n\x17KNOWN_REGEX_UNSPECIFIED\x10\x00\x12 \n\x1cKNOWN_REGEX_HTTP_HEADER_NAME\x10\x01\x12!\n\x1dKNOWN_REGEX_HTTP_HEADER_VALUE\x10\x02:V\n\x07message\x12\x1f.google.protobuf.MessageOptions\x18\x87\t \x01(\x0b\x32\x1a.buf.validate.MessageRulesR\x07message:N\n\x05oneof\x12\x1d.google.protobuf.OneofOptions\x18\x87\t \x01(\x0b\x32\x18.buf.validate.OneofRulesR\x05oneof:N\n\x05\x66ield\x12\x1d.google.protobuf.FieldOptions\x18\x87\t \x01(\x0b\x32\x18.buf.validate.FieldRulesR\x05\x66ield:]\n\npredefined\x12\x1d.google.protobuf.FieldOptions\x18\x88\t \x01(\x0b\x32\x1d.buf.validate.PredefinedRulesR\npredefinedB\xbb\x01\n\x10\x63om.buf.validateB\rValidateProtoP\x01ZGbuf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate\xa2\x02\x03\x42VX\xaa\x02\x0c\x42uf.Validate\xca\x02\x0c\x42uf\\Validate\xe2\x02\x18\x42uf\\Validate\\GPBMetadata\xea\x02\rBuf::Validate') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1b\x62uf/validate/validate.proto\x12\x0c\x62uf.validate\x1a google/protobuf/descriptor.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"P\n\x04Rule\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x18\n\x07message\x18\x02 \x01(\tR\x07message\x12\x1e\n\nexpression\x18\x03 \x01(\tR\nexpression\"\xa1\x01\n\x0cMessageRules\x12%\n\x0e\x63\x65l_expression\x18\x05 \x03(\tR\rcelExpression\x12$\n\x03\x63\x65l\x18\x03 \x03(\x0b\x32\x12.buf.validate.RuleR\x03\x63\x65l\x12\x34\n\x05oneof\x18\x04 \x03(\x0b\x32\x1e.buf.validate.MessageOneofRuleR\x05oneofJ\x04\x08\x01\x10\x02R\x08\x64isabled\"F\n\x10MessageOneofRule\x12\x16\n\x06\x66ields\x18\x01 \x03(\tR\x06\x66ields\x12\x1a\n\x08required\x18\x02 \x01(\x08R\x08required\"(\n\nOneofRules\x12\x1a\n\x08required\x18\x01 \x01(\x08R\x08required\"\xe3\n\n\nFieldRules\x12%\n\x0e\x63\x65l_expression\x18\x1d \x03(\tR\rcelExpression\x12$\n\x03\x63\x65l\x18\x17 \x03(\x0b\x32\x12.buf.validate.RuleR\x03\x63\x65l\x12\x1a\n\x08required\x18\x19 \x01(\x08R\x08required\x12,\n\x06ignore\x18\x1b \x01(\x0e\x32\x14.buf.validate.IgnoreR\x06ignore\x12\x30\n\x05\x66loat\x18\x01 \x01(\x0b\x32\x18.buf.validate.FloatRulesH\x00R\x05\x66loat\x12\x33\n\x06\x64ouble\x18\x02 \x01(\x0b\x32\x19.buf.validate.DoubleRulesH\x00R\x06\x64ouble\x12\x30\n\x05int32\x18\x03 \x01(\x0b\x32\x18.buf.validate.Int32RulesH\x00R\x05int32\x12\x30\n\x05int64\x18\x04 \x01(\x0b\x32\x18.buf.validate.Int64RulesH\x00R\x05int64\x12\x33\n\x06uint32\x18\x05 \x01(\x0b\x32\x19.buf.validate.UInt32RulesH\x00R\x06uint32\x12\x33\n\x06uint64\x18\x06 \x01(\x0b\x32\x19.buf.validate.UInt64RulesH\x00R\x06uint64\x12\x33\n\x06sint32\x18\x07 \x01(\x0b\x32\x19.buf.validate.SInt32RulesH\x00R\x06sint32\x12\x33\n\x06sint64\x18\x08 \x01(\x0b\x32\x19.buf.validate.SInt64RulesH\x00R\x06sint64\x12\x36\n\x07\x66ixed32\x18\t \x01(\x0b\x32\x1a.buf.validate.Fixed32RulesH\x00R\x07\x66ixed32\x12\x36\n\x07\x66ixed64\x18\n \x01(\x0b\x32\x1a.buf.validate.Fixed64RulesH\x00R\x07\x66ixed64\x12\x39\n\x08sfixed32\x18\x0b \x01(\x0b\x32\x1b.buf.validate.SFixed32RulesH\x00R\x08sfixed32\x12\x39\n\x08sfixed64\x18\x0c \x01(\x0b\x32\x1b.buf.validate.SFixed64RulesH\x00R\x08sfixed64\x12-\n\x04\x62ool\x18\r \x01(\x0b\x32\x17.buf.validate.BoolRulesH\x00R\x04\x62ool\x12\x33\n\x06string\x18\x0e \x01(\x0b\x32\x19.buf.validate.StringRulesH\x00R\x06string\x12\x30\n\x05\x62ytes\x18\x0f \x01(\x0b\x32\x18.buf.validate.BytesRulesH\x00R\x05\x62ytes\x12-\n\x04\x65num\x18\x10 \x01(\x0b\x32\x17.buf.validate.EnumRulesH\x00R\x04\x65num\x12\x39\n\x08repeated\x18\x12 \x01(\x0b\x32\x1b.buf.validate.RepeatedRulesH\x00R\x08repeated\x12*\n\x03map\x18\x13 \x01(\x0b\x32\x16.buf.validate.MapRulesH\x00R\x03map\x12*\n\x03\x61ny\x18\x14 \x01(\x0b\x32\x16.buf.validate.AnyRulesH\x00R\x03\x61ny\x12\x39\n\x08\x64uration\x18\x15 \x01(\x0b\x32\x1b.buf.validate.DurationRulesH\x00R\x08\x64uration\x12=\n\nfield_mask\x18\x1c \x01(\x0b\x32\x1c.buf.validate.FieldMaskRulesH\x00R\tfieldMask\x12<\n\ttimestamp\x18\x16 \x01(\x0b\x32\x1c.buf.validate.TimestampRulesH\x00R\ttimestampB\x06\n\x04typeJ\x04\x08\x18\x10\x19J\x04\x08\x1a\x10\x1bR\x07skippedR\x0cignore_empty\"Z\n\x0fPredefinedRules\x12$\n\x03\x63\x65l\x18\x01 \x03(\x0b\x32\x12.buf.validate.RuleR\x03\x63\x65lJ\x04\x08\x18\x10\x19J\x04\x08\x1a\x10\x1bR\x07skippedR\x0cignore_empty\"\xae\x17\n\nFloatRules\x12\x84\x01\n\x05\x63onst\x18\x01 \x01(\x02\x42n\xc2Hk\ni\n\x0b\x66loat.const\x1aZthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12\x9d\x01\n\x02lt\x18\x02 \x01(\x02\x42\x8a\x01\xc2H\x86\x01\n\x83\x01\n\x08\x66loat.lt\x1aw!has(rules.gte) && !has(rules.gt) && (this.isNan() || this >= rules.lt)? \'must be less than %s\'.format([rules.lt]) : \'\'H\x00R\x02lt\x12\xae\x01\n\x03lte\x18\x03 \x01(\x02\x42\x99\x01\xc2H\x95\x01\n\x92\x01\n\tfloat.lte\x1a\x84\x01!has(rules.gte) && !has(rules.gt) && (this.isNan() || this > rules.lte)? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'H\x00R\x03lte\x12\xd4\x07\n\x02gt\x18\x04 \x01(\x02\x42\xc1\x07\xc2H\xbd\x07\n\x86\x01\n\x08\x66loat.gt\x1az!has(rules.lt) && !has(rules.lte) && (this.isNan() || this <= rules.gt)? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\xbd\x01\n\x0b\x66loat.gt_lt\x1a\xad\x01has(rules.lt) && rules.lt >= rules.gt && (this.isNan() || this >= rules.lt || this <= rules.gt)? \'must be greater than %s and less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xc7\x01\n\x15\x66loat.gt_lt_exclusive\x1a\xad\x01has(rules.lt) && rules.lt < rules.gt && (this.isNan() || (rules.lt <= this && this <= rules.gt))? \'must be greater than %s or less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xcd\x01\n\x0c\x66loat.gt_lte\x1a\xbc\x01has(rules.lte) && rules.lte >= rules.gt && (this.isNan() || this > rules.lte || this <= rules.gt)? \'must be greater than %s and less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'\n\xd7\x01\n\x16\x66loat.gt_lte_exclusive\x1a\xbc\x01has(rules.lte) && rules.lte < rules.gt && (this.isNan() || (rules.lte < this && this <= rules.gt))? \'must be greater than %s or less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'H\x01R\x02gt\x12\xa1\x08\n\x03gte\x18\x05 \x01(\x02\x42\x8c\x08\xc2H\x88\x08\n\x95\x01\n\tfloat.gte\x1a\x87\x01!has(rules.lt) && !has(rules.lte) && (this.isNan() || this < rules.gte)? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\xcc\x01\n\x0c\x66loat.gte_lt\x1a\xbb\x01has(rules.lt) && rules.lt >= rules.gte && (this.isNan() || this >= rules.lt || this < rules.gte)? \'must be greater than or equal to %s and less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xd6\x01\n\x16\x66loat.gte_lt_exclusive\x1a\xbb\x01has(rules.lt) && rules.lt < rules.gte && (this.isNan() || (rules.lt <= this && this < rules.gte))? \'must be greater than or equal to %s or less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xdc\x01\n\rfloat.gte_lte\x1a\xca\x01has(rules.lte) && rules.lte >= rules.gte && (this.isNan() || this > rules.lte || this < rules.gte)? \'must be greater than or equal to %s and less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'\n\xe6\x01\n\x17\x66loat.gte_lte_exclusive\x1a\xca\x01has(rules.lte) && rules.lte < rules.gte && (this.isNan() || (rules.lte < this && this < rules.gte))? \'must be greater than or equal to %s or less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'H\x01R\x03gte\x12}\n\x02in\x18\x06 \x03(\x02\x42m\xc2Hj\nh\n\x08\x66loat.in\x1a\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'R\x02in\x12w\n\x06not_in\x18\x07 \x03(\x02\x42`\xc2H]\n[\n\x0c\x66loat.not_in\x1aKthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'R\x05notIn\x12w\n\x06\x66inite\x18\x08 \x01(\x08\x42_\xc2H\\\nZ\n\x0c\x66loat.finite\x1aJrules.finite ? (this.isNan() || this.isInf() ? \'must be finite\' : \'\') : \'\'R\x06\x66inite\x12\x34\n\x07\x65xample\x18\t \x03(\x02\x42\x1a\xc2H\x17\n\x15\n\rfloat.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\x42\x0b\n\tless_thanB\x0e\n\x0cgreater_than\"\xc0\x17\n\x0b\x44oubleRules\x12\x85\x01\n\x05\x63onst\x18\x01 \x01(\x01\x42o\xc2Hl\nj\n\x0c\x64ouble.const\x1aZthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12\x9e\x01\n\x02lt\x18\x02 \x01(\x01\x42\x8b\x01\xc2H\x87\x01\n\x84\x01\n\tdouble.lt\x1aw!has(rules.gte) && !has(rules.gt) && (this.isNan() || this >= rules.lt)? \'must be less than %s\'.format([rules.lt]) : \'\'H\x00R\x02lt\x12\xaf\x01\n\x03lte\x18\x03 \x01(\x01\x42\x9a\x01\xc2H\x96\x01\n\x93\x01\n\ndouble.lte\x1a\x84\x01!has(rules.gte) && !has(rules.gt) && (this.isNan() || this > rules.lte)? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'H\x00R\x03lte\x12\xd9\x07\n\x02gt\x18\x04 \x01(\x01\x42\xc6\x07\xc2H\xc2\x07\n\x87\x01\n\tdouble.gt\x1az!has(rules.lt) && !has(rules.lte) && (this.isNan() || this <= rules.gt)? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\xbe\x01\n\x0c\x64ouble.gt_lt\x1a\xad\x01has(rules.lt) && rules.lt >= rules.gt && (this.isNan() || this >= rules.lt || this <= rules.gt)? \'must be greater than %s and less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xc8\x01\n\x16\x64ouble.gt_lt_exclusive\x1a\xad\x01has(rules.lt) && rules.lt < rules.gt && (this.isNan() || (rules.lt <= this && this <= rules.gt))? \'must be greater than %s or less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xce\x01\n\rdouble.gt_lte\x1a\xbc\x01has(rules.lte) && rules.lte >= rules.gt && (this.isNan() || this > rules.lte || this <= rules.gt)? \'must be greater than %s and less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'\n\xd8\x01\n\x17\x64ouble.gt_lte_exclusive\x1a\xbc\x01has(rules.lte) && rules.lte < rules.gt && (this.isNan() || (rules.lte < this && this <= rules.gt))? \'must be greater than %s or less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'H\x01R\x02gt\x12\xa6\x08\n\x03gte\x18\x05 \x01(\x01\x42\x91\x08\xc2H\x8d\x08\n\x96\x01\n\ndouble.gte\x1a\x87\x01!has(rules.lt) && !has(rules.lte) && (this.isNan() || this < rules.gte)? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\xcd\x01\n\rdouble.gte_lt\x1a\xbb\x01has(rules.lt) && rules.lt >= rules.gte && (this.isNan() || this >= rules.lt || this < rules.gte)? \'must be greater than or equal to %s and less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xd7\x01\n\x17\x64ouble.gte_lt_exclusive\x1a\xbb\x01has(rules.lt) && rules.lt < rules.gte && (this.isNan() || (rules.lt <= this && this < rules.gte))? \'must be greater than or equal to %s or less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xdd\x01\n\x0e\x64ouble.gte_lte\x1a\xca\x01has(rules.lte) && rules.lte >= rules.gte && (this.isNan() || this > rules.lte || this < rules.gte)? \'must be greater than or equal to %s and less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'\n\xe7\x01\n\x18\x64ouble.gte_lte_exclusive\x1a\xca\x01has(rules.lte) && rules.lte < rules.gte && (this.isNan() || (rules.lte < this && this < rules.gte))? \'must be greater than or equal to %s or less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'H\x01R\x03gte\x12~\n\x02in\x18\x06 \x03(\x01\x42n\xc2Hk\ni\n\tdouble.in\x1a\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'R\x02in\x12x\n\x06not_in\x18\x07 \x03(\x01\x42\x61\xc2H^\n\\\n\rdouble.not_in\x1aKthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'R\x05notIn\x12x\n\x06\x66inite\x18\x08 \x01(\x08\x42`\xc2H]\n[\n\rdouble.finite\x1aJrules.finite ? (this.isNan() || this.isInf() ? \'must be finite\' : \'\') : \'\'R\x06\x66inite\x12\x35\n\x07\x65xample\x18\t \x03(\x01\x42\x1b\xc2H\x18\n\x16\n\x0e\x64ouble.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\x42\x0b\n\tless_thanB\x0e\n\x0cgreater_than\"\xde\x14\n\nInt32Rules\x12\x84\x01\n\x05\x63onst\x18\x01 \x01(\x05\x42n\xc2Hk\ni\n\x0bint32.const\x1aZthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12\x88\x01\n\x02lt\x18\x02 \x01(\x05\x42v\xc2Hs\nq\n\x08int32.lt\x1a\x65!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'H\x00R\x02lt\x12\x9a\x01\n\x03lte\x18\x03 \x01(\x05\x42\x85\x01\xc2H\x81\x01\n\x7f\n\tint32.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'H\x00R\x03lte\x12\xfd\x06\n\x02gt\x18\x04 \x01(\x05\x42\xea\x06\xc2H\xe6\x06\nt\n\x08int32.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\xad\x01\n\x0bint32.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \'must be greater than %s and less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xb5\x01\n\x15int32.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \'must be greater than %s or less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xbd\x01\n\x0cint32.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \'must be greater than %s and less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'\n\xc5\x01\n\x16int32.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \'must be greater than %s or less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'H\x01R\x02gt\x12\xca\x07\n\x03gte\x18\x05 \x01(\x05\x42\xb5\x07\xc2H\xb1\x07\n\x82\x01\n\tint32.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\xbc\x01\n\x0cint32.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \'must be greater than or equal to %s and less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xc4\x01\n\x16int32.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \'must be greater than or equal to %s or less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xcc\x01\n\rint32.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \'must be greater than or equal to %s and less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'\n\xd4\x01\n\x17int32.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \'must be greater than or equal to %s or less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'H\x01R\x03gte\x12}\n\x02in\x18\x06 \x03(\x05\x42m\xc2Hj\nh\n\x08int32.in\x1a\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'R\x02in\x12w\n\x06not_in\x18\x07 \x03(\x05\x42`\xc2H]\n[\n\x0cint32.not_in\x1aKthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'R\x05notIn\x12\x34\n\x07\x65xample\x18\x08 \x03(\x05\x42\x1a\xc2H\x17\n\x15\n\rint32.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\x42\x0b\n\tless_thanB\x0e\n\x0cgreater_than\"\xde\x14\n\nInt64Rules\x12\x84\x01\n\x05\x63onst\x18\x01 \x01(\x03\x42n\xc2Hk\ni\n\x0bint64.const\x1aZthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12\x88\x01\n\x02lt\x18\x02 \x01(\x03\x42v\xc2Hs\nq\n\x08int64.lt\x1a\x65!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'H\x00R\x02lt\x12\x9a\x01\n\x03lte\x18\x03 \x01(\x03\x42\x85\x01\xc2H\x81\x01\n\x7f\n\tint64.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'H\x00R\x03lte\x12\xfd\x06\n\x02gt\x18\x04 \x01(\x03\x42\xea\x06\xc2H\xe6\x06\nt\n\x08int64.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\xad\x01\n\x0bint64.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \'must be greater than %s and less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xb5\x01\n\x15int64.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \'must be greater than %s or less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xbd\x01\n\x0cint64.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \'must be greater than %s and less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'\n\xc5\x01\n\x16int64.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \'must be greater than %s or less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'H\x01R\x02gt\x12\xca\x07\n\x03gte\x18\x05 \x01(\x03\x42\xb5\x07\xc2H\xb1\x07\n\x82\x01\n\tint64.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\xbc\x01\n\x0cint64.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \'must be greater than or equal to %s and less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xc4\x01\n\x16int64.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \'must be greater than or equal to %s or less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xcc\x01\n\rint64.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \'must be greater than or equal to %s and less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'\n\xd4\x01\n\x17int64.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \'must be greater than or equal to %s or less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'H\x01R\x03gte\x12}\n\x02in\x18\x06 \x03(\x03\x42m\xc2Hj\nh\n\x08int64.in\x1a\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'R\x02in\x12w\n\x06not_in\x18\x07 \x03(\x03\x42`\xc2H]\n[\n\x0cint64.not_in\x1aKthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'R\x05notIn\x12\x34\n\x07\x65xample\x18\t \x03(\x03\x42\x1a\xc2H\x17\n\x15\n\rint64.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\x42\x0b\n\tless_thanB\x0e\n\x0cgreater_than\"\xf0\x14\n\x0bUInt32Rules\x12\x85\x01\n\x05\x63onst\x18\x01 \x01(\rBo\xc2Hl\nj\n\x0cuint32.const\x1aZthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12\x89\x01\n\x02lt\x18\x02 \x01(\rBw\xc2Ht\nr\n\tuint32.lt\x1a\x65!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'H\x00R\x02lt\x12\x9c\x01\n\x03lte\x18\x03 \x01(\rB\x87\x01\xc2H\x83\x01\n\x80\x01\n\nuint32.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'H\x00R\x03lte\x12\x82\x07\n\x02gt\x18\x04 \x01(\rB\xef\x06\xc2H\xeb\x06\nu\n\tuint32.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\xae\x01\n\x0cuint32.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \'must be greater than %s and less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xb6\x01\n\x16uint32.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \'must be greater than %s or less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xbe\x01\n\ruint32.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \'must be greater than %s and less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'\n\xc6\x01\n\x17uint32.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \'must be greater than %s or less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'H\x01R\x02gt\x12\xcf\x07\n\x03gte\x18\x05 \x01(\rB\xba\x07\xc2H\xb6\x07\n\x83\x01\n\nuint32.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\xbd\x01\n\ruint32.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \'must be greater than or equal to %s and less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xc5\x01\n\x17uint32.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \'must be greater than or equal to %s or less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xcd\x01\n\x0euint32.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \'must be greater than or equal to %s and less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'\n\xd5\x01\n\x18uint32.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \'must be greater than or equal to %s or less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'H\x01R\x03gte\x12~\n\x02in\x18\x06 \x03(\rBn\xc2Hk\ni\n\tuint32.in\x1a\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'R\x02in\x12x\n\x06not_in\x18\x07 \x03(\rBa\xc2H^\n\\\n\ruint32.not_in\x1aKthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'R\x05notIn\x12\x35\n\x07\x65xample\x18\x08 \x03(\rB\x1b\xc2H\x18\n\x16\n\x0euint32.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\x42\x0b\n\tless_thanB\x0e\n\x0cgreater_than\"\xf0\x14\n\x0bUInt64Rules\x12\x85\x01\n\x05\x63onst\x18\x01 \x01(\x04\x42o\xc2Hl\nj\n\x0cuint64.const\x1aZthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12\x89\x01\n\x02lt\x18\x02 \x01(\x04\x42w\xc2Ht\nr\n\tuint64.lt\x1a\x65!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'H\x00R\x02lt\x12\x9c\x01\n\x03lte\x18\x03 \x01(\x04\x42\x87\x01\xc2H\x83\x01\n\x80\x01\n\nuint64.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'H\x00R\x03lte\x12\x82\x07\n\x02gt\x18\x04 \x01(\x04\x42\xef\x06\xc2H\xeb\x06\nu\n\tuint64.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\xae\x01\n\x0cuint64.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \'must be greater than %s and less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xb6\x01\n\x16uint64.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \'must be greater than %s or less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xbe\x01\n\ruint64.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \'must be greater than %s and less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'\n\xc6\x01\n\x17uint64.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \'must be greater than %s or less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'H\x01R\x02gt\x12\xcf\x07\n\x03gte\x18\x05 \x01(\x04\x42\xba\x07\xc2H\xb6\x07\n\x83\x01\n\nuint64.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\xbd\x01\n\ruint64.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \'must be greater than or equal to %s and less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xc5\x01\n\x17uint64.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \'must be greater than or equal to %s or less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xcd\x01\n\x0euint64.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \'must be greater than or equal to %s and less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'\n\xd5\x01\n\x18uint64.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \'must be greater than or equal to %s or less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'H\x01R\x03gte\x12~\n\x02in\x18\x06 \x03(\x04\x42n\xc2Hk\ni\n\tuint64.in\x1a\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'R\x02in\x12x\n\x06not_in\x18\x07 \x03(\x04\x42\x61\xc2H^\n\\\n\ruint64.not_in\x1aKthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'R\x05notIn\x12\x35\n\x07\x65xample\x18\x08 \x03(\x04\x42\x1b\xc2H\x18\n\x16\n\x0euint64.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\x42\x0b\n\tless_thanB\x0e\n\x0cgreater_than\"\xf0\x14\n\x0bSInt32Rules\x12\x85\x01\n\x05\x63onst\x18\x01 \x01(\x11\x42o\xc2Hl\nj\n\x0csint32.const\x1aZthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12\x89\x01\n\x02lt\x18\x02 \x01(\x11\x42w\xc2Ht\nr\n\tsint32.lt\x1a\x65!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'H\x00R\x02lt\x12\x9c\x01\n\x03lte\x18\x03 \x01(\x11\x42\x87\x01\xc2H\x83\x01\n\x80\x01\n\nsint32.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'H\x00R\x03lte\x12\x82\x07\n\x02gt\x18\x04 \x01(\x11\x42\xef\x06\xc2H\xeb\x06\nu\n\tsint32.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\xae\x01\n\x0csint32.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \'must be greater than %s and less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xb6\x01\n\x16sint32.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \'must be greater than %s or less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xbe\x01\n\rsint32.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \'must be greater than %s and less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'\n\xc6\x01\n\x17sint32.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \'must be greater than %s or less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'H\x01R\x02gt\x12\xcf\x07\n\x03gte\x18\x05 \x01(\x11\x42\xba\x07\xc2H\xb6\x07\n\x83\x01\n\nsint32.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\xbd\x01\n\rsint32.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \'must be greater than or equal to %s and less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xc5\x01\n\x17sint32.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \'must be greater than or equal to %s or less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xcd\x01\n\x0esint32.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \'must be greater than or equal to %s and less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'\n\xd5\x01\n\x18sint32.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \'must be greater than or equal to %s or less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'H\x01R\x03gte\x12~\n\x02in\x18\x06 \x03(\x11\x42n\xc2Hk\ni\n\tsint32.in\x1a\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'R\x02in\x12x\n\x06not_in\x18\x07 \x03(\x11\x42\x61\xc2H^\n\\\n\rsint32.not_in\x1aKthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'R\x05notIn\x12\x35\n\x07\x65xample\x18\x08 \x03(\x11\x42\x1b\xc2H\x18\n\x16\n\x0esint32.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\x42\x0b\n\tless_thanB\x0e\n\x0cgreater_than\"\xf0\x14\n\x0bSInt64Rules\x12\x85\x01\n\x05\x63onst\x18\x01 \x01(\x12\x42o\xc2Hl\nj\n\x0csint64.const\x1aZthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12\x89\x01\n\x02lt\x18\x02 \x01(\x12\x42w\xc2Ht\nr\n\tsint64.lt\x1a\x65!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'H\x00R\x02lt\x12\x9c\x01\n\x03lte\x18\x03 \x01(\x12\x42\x87\x01\xc2H\x83\x01\n\x80\x01\n\nsint64.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'H\x00R\x03lte\x12\x82\x07\n\x02gt\x18\x04 \x01(\x12\x42\xef\x06\xc2H\xeb\x06\nu\n\tsint64.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\xae\x01\n\x0csint64.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \'must be greater than %s and less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xb6\x01\n\x16sint64.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \'must be greater than %s or less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xbe\x01\n\rsint64.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \'must be greater than %s and less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'\n\xc6\x01\n\x17sint64.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \'must be greater than %s or less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'H\x01R\x02gt\x12\xcf\x07\n\x03gte\x18\x05 \x01(\x12\x42\xba\x07\xc2H\xb6\x07\n\x83\x01\n\nsint64.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\xbd\x01\n\rsint64.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \'must be greater than or equal to %s and less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xc5\x01\n\x17sint64.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \'must be greater than or equal to %s or less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xcd\x01\n\x0esint64.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \'must be greater than or equal to %s and less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'\n\xd5\x01\n\x18sint64.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \'must be greater than or equal to %s or less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'H\x01R\x03gte\x12~\n\x02in\x18\x06 \x03(\x12\x42n\xc2Hk\ni\n\tsint64.in\x1a\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'R\x02in\x12x\n\x06not_in\x18\x07 \x03(\x12\x42\x61\xc2H^\n\\\n\rsint64.not_in\x1aKthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'R\x05notIn\x12\x35\n\x07\x65xample\x18\x08 \x03(\x12\x42\x1b\xc2H\x18\n\x16\n\x0esint64.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\x42\x0b\n\tless_thanB\x0e\n\x0cgreater_than\"\x81\x15\n\x0c\x46ixed32Rules\x12\x86\x01\n\x05\x63onst\x18\x01 \x01(\x07\x42p\xc2Hm\nk\n\rfixed32.const\x1aZthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12\x8a\x01\n\x02lt\x18\x02 \x01(\x07\x42x\xc2Hu\ns\n\nfixed32.lt\x1a\x65!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'H\x00R\x02lt\x12\x9d\x01\n\x03lte\x18\x03 \x01(\x07\x42\x88\x01\xc2H\x84\x01\n\x81\x01\n\x0b\x66ixed32.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'H\x00R\x03lte\x12\x87\x07\n\x02gt\x18\x04 \x01(\x07\x42\xf4\x06\xc2H\xf0\x06\nv\n\nfixed32.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\xaf\x01\n\rfixed32.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \'must be greater than %s and less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xb7\x01\n\x17\x66ixed32.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \'must be greater than %s or less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xbf\x01\n\x0e\x66ixed32.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \'must be greater than %s and less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'\n\xc7\x01\n\x18\x66ixed32.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \'must be greater than %s or less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'H\x01R\x02gt\x12\xd4\x07\n\x03gte\x18\x05 \x01(\x07\x42\xbf\x07\xc2H\xbb\x07\n\x84\x01\n\x0b\x66ixed32.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\xbe\x01\n\x0e\x66ixed32.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \'must be greater than or equal to %s and less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xc6\x01\n\x18\x66ixed32.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \'must be greater than or equal to %s or less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xce\x01\n\x0f\x66ixed32.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \'must be greater than or equal to %s and less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'\n\xd6\x01\n\x19\x66ixed32.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \'must be greater than or equal to %s or less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'H\x01R\x03gte\x12\x7f\n\x02in\x18\x06 \x03(\x07\x42o\xc2Hl\nj\n\nfixed32.in\x1a\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'R\x02in\x12y\n\x06not_in\x18\x07 \x03(\x07\x42\x62\xc2H_\n]\n\x0e\x66ixed32.not_in\x1aKthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'R\x05notIn\x12\x36\n\x07\x65xample\x18\x08 \x03(\x07\x42\x1c\xc2H\x19\n\x17\n\x0f\x66ixed32.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\x42\x0b\n\tless_thanB\x0e\n\x0cgreater_than\"\x81\x15\n\x0c\x46ixed64Rules\x12\x86\x01\n\x05\x63onst\x18\x01 \x01(\x06\x42p\xc2Hm\nk\n\rfixed64.const\x1aZthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12\x8a\x01\n\x02lt\x18\x02 \x01(\x06\x42x\xc2Hu\ns\n\nfixed64.lt\x1a\x65!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'H\x00R\x02lt\x12\x9d\x01\n\x03lte\x18\x03 \x01(\x06\x42\x88\x01\xc2H\x84\x01\n\x81\x01\n\x0b\x66ixed64.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'H\x00R\x03lte\x12\x87\x07\n\x02gt\x18\x04 \x01(\x06\x42\xf4\x06\xc2H\xf0\x06\nv\n\nfixed64.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\xaf\x01\n\rfixed64.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \'must be greater than %s and less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xb7\x01\n\x17\x66ixed64.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \'must be greater than %s or less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xbf\x01\n\x0e\x66ixed64.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \'must be greater than %s and less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'\n\xc7\x01\n\x18\x66ixed64.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \'must be greater than %s or less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'H\x01R\x02gt\x12\xd4\x07\n\x03gte\x18\x05 \x01(\x06\x42\xbf\x07\xc2H\xbb\x07\n\x84\x01\n\x0b\x66ixed64.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\xbe\x01\n\x0e\x66ixed64.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \'must be greater than or equal to %s and less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xc6\x01\n\x18\x66ixed64.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \'must be greater than or equal to %s or less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xce\x01\n\x0f\x66ixed64.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \'must be greater than or equal to %s and less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'\n\xd6\x01\n\x19\x66ixed64.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \'must be greater than or equal to %s or less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'H\x01R\x03gte\x12\x7f\n\x02in\x18\x06 \x03(\x06\x42o\xc2Hl\nj\n\nfixed64.in\x1a\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'R\x02in\x12y\n\x06not_in\x18\x07 \x03(\x06\x42\x62\xc2H_\n]\n\x0e\x66ixed64.not_in\x1aKthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'R\x05notIn\x12\x36\n\x07\x65xample\x18\x08 \x03(\x06\x42\x1c\xc2H\x19\n\x17\n\x0f\x66ixed64.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\x42\x0b\n\tless_thanB\x0e\n\x0cgreater_than\"\x93\x15\n\rSFixed32Rules\x12\x87\x01\n\x05\x63onst\x18\x01 \x01(\x0f\x42q\xc2Hn\nl\n\x0esfixed32.const\x1aZthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12\x8b\x01\n\x02lt\x18\x02 \x01(\x0f\x42y\xc2Hv\nt\n\x0bsfixed32.lt\x1a\x65!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'H\x00R\x02lt\x12\x9e\x01\n\x03lte\x18\x03 \x01(\x0f\x42\x89\x01\xc2H\x85\x01\n\x82\x01\n\x0csfixed32.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'H\x00R\x03lte\x12\x8c\x07\n\x02gt\x18\x04 \x01(\x0f\x42\xf9\x06\xc2H\xf5\x06\nw\n\x0bsfixed32.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\xb0\x01\n\x0esfixed32.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \'must be greater than %s and less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xb8\x01\n\x18sfixed32.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \'must be greater than %s or less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xc0\x01\n\x0fsfixed32.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \'must be greater than %s and less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'\n\xc8\x01\n\x19sfixed32.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \'must be greater than %s or less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'H\x01R\x02gt\x12\xd9\x07\n\x03gte\x18\x05 \x01(\x0f\x42\xc4\x07\xc2H\xc0\x07\n\x85\x01\n\x0csfixed32.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\xbf\x01\n\x0fsfixed32.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \'must be greater than or equal to %s and less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xc7\x01\n\x19sfixed32.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \'must be greater than or equal to %s or less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xcf\x01\n\x10sfixed32.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \'must be greater than or equal to %s and less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'\n\xd7\x01\n\x1asfixed32.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \'must be greater than or equal to %s or less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'H\x01R\x03gte\x12\x80\x01\n\x02in\x18\x06 \x03(\x0f\x42p\xc2Hm\nk\n\x0bsfixed32.in\x1a\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'R\x02in\x12z\n\x06not_in\x18\x07 \x03(\x0f\x42\x63\xc2H`\n^\n\x0fsfixed32.not_in\x1aKthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'R\x05notIn\x12\x37\n\x07\x65xample\x18\x08 \x03(\x0f\x42\x1d\xc2H\x1a\n\x18\n\x10sfixed32.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\x42\x0b\n\tless_thanB\x0e\n\x0cgreater_than\"\x93\x15\n\rSFixed64Rules\x12\x87\x01\n\x05\x63onst\x18\x01 \x01(\x10\x42q\xc2Hn\nl\n\x0esfixed64.const\x1aZthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12\x8b\x01\n\x02lt\x18\x02 \x01(\x10\x42y\xc2Hv\nt\n\x0bsfixed64.lt\x1a\x65!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'H\x00R\x02lt\x12\x9e\x01\n\x03lte\x18\x03 \x01(\x10\x42\x89\x01\xc2H\x85\x01\n\x82\x01\n\x0csfixed64.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'H\x00R\x03lte\x12\x8c\x07\n\x02gt\x18\x04 \x01(\x10\x42\xf9\x06\xc2H\xf5\x06\nw\n\x0bsfixed64.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\xb0\x01\n\x0esfixed64.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \'must be greater than %s and less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xb8\x01\n\x18sfixed64.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \'must be greater than %s or less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xc0\x01\n\x0fsfixed64.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \'must be greater than %s and less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'\n\xc8\x01\n\x19sfixed64.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \'must be greater than %s or less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'H\x01R\x02gt\x12\xd9\x07\n\x03gte\x18\x05 \x01(\x10\x42\xc4\x07\xc2H\xc0\x07\n\x85\x01\n\x0csfixed64.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\xbf\x01\n\x0fsfixed64.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \'must be greater than or equal to %s and less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xc7\x01\n\x19sfixed64.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \'must be greater than or equal to %s or less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xcf\x01\n\x10sfixed64.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \'must be greater than or equal to %s and less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'\n\xd7\x01\n\x1asfixed64.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \'must be greater than or equal to %s or less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'H\x01R\x03gte\x12\x80\x01\n\x02in\x18\x06 \x03(\x10\x42p\xc2Hm\nk\n\x0bsfixed64.in\x1a\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'R\x02in\x12z\n\x06not_in\x18\x07 \x03(\x10\x42\x63\xc2H`\n^\n\x0fsfixed64.not_in\x1aKthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'R\x05notIn\x12\x37\n\x07\x65xample\x18\x08 \x03(\x10\x42\x1d\xc2H\x1a\n\x18\n\x10sfixed64.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\x42\x0b\n\tless_thanB\x0e\n\x0cgreater_than\"\xd1\x01\n\tBoolRules\x12\x83\x01\n\x05\x63onst\x18\x01 \x01(\x08\x42m\xc2Hj\nh\n\nbool.const\x1aZthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12\x33\n\x07\x65xample\x18\x02 \x03(\x08\x42\x19\xc2H\x16\n\x14\n\x0c\x62ool.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"\xcf?\n\x0bStringRules\x12\x87\x01\n\x05\x63onst\x18\x01 \x01(\tBq\xc2Hn\nl\n\x0cstring.const\x1a\\this != getField(rules, \'const\') ? \'must equal `%s`\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12v\n\x03len\x18\x13 \x01(\x04\x42\x64\xc2Ha\n_\n\nstring.len\x1aQuint(this.size()) != rules.len ? \'must be %s characters\'.format([rules.len]) : \'\'R\x03len\x12\x91\x01\n\x07min_len\x18\x02 \x01(\x04\x42x\xc2Hu\ns\n\x0estring.min_len\x1a\x61uint(this.size()) < rules.min_len ? \'must be at least %s characters\'.format([rules.min_len]) : \'\'R\x06minLen\x12\x90\x01\n\x07max_len\x18\x03 \x01(\x04\x42w\xc2Ht\nr\n\x0estring.max_len\x1a`uint(this.size()) > rules.max_len ? \'must be at most %s characters\'.format([rules.max_len]) : \'\'R\x06maxLen\x12\x95\x01\n\tlen_bytes\x18\x14 \x01(\x04\x42x\xc2Hu\ns\n\x10string.len_bytes\x1a_uint(bytes(this).size()) != rules.len_bytes ? \'must be %s bytes\'.format([rules.len_bytes]) : \'\'R\x08lenBytes\x12\x9e\x01\n\tmin_bytes\x18\x04 \x01(\x04\x42\x80\x01\xc2H}\n{\n\x10string.min_bytes\x1aguint(bytes(this).size()) < rules.min_bytes ? \'must be at least %s bytes\'.format([rules.min_bytes]) : \'\'R\x08minBytes\x12\x9c\x01\n\tmax_bytes\x18\x05 \x01(\x04\x42\x7f\xc2H|\nz\n\x10string.max_bytes\x1a\x66uint(bytes(this).size()) > rules.max_bytes ? \'must be at most %s bytes\'.format([rules.max_bytes]) : \'\'R\x08maxBytes\x12\x90\x01\n\x07pattern\x18\x06 \x01(\tBv\xc2Hs\nq\n\x0estring.pattern\x1a_!this.matches(rules.pattern) ? \'does not match regex pattern `%s`\'.format([rules.pattern]) : \'\'R\x07pattern\x12\x86\x01\n\x06prefix\x18\x07 \x01(\tBn\xc2Hk\ni\n\rstring.prefix\x1aX!this.startsWith(rules.prefix) ? \'does not have prefix `%s`\'.format([rules.prefix]) : \'\'R\x06prefix\x12\x84\x01\n\x06suffix\x18\x08 \x01(\tBl\xc2Hi\ng\n\rstring.suffix\x1aV!this.endsWith(rules.suffix) ? \'does not have suffix `%s`\'.format([rules.suffix]) : \'\'R\x06suffix\x12\x94\x01\n\x08\x63ontains\x18\t \x01(\tBx\xc2Hu\ns\n\x0fstring.contains\x1a`!this.contains(rules.contains) ? \'does not contain substring `%s`\'.format([rules.contains]) : \'\'R\x08\x63ontains\x12\x9e\x01\n\x0cnot_contains\x18\x17 \x01(\tB{\xc2Hx\nv\n\x13string.not_contains\x1a_this.contains(rules.not_contains) ? \'contains substring `%s`\'.format([rules.not_contains]) : \'\'R\x0bnotContains\x12~\n\x02in\x18\n \x03(\tBn\xc2Hk\ni\n\tstring.in\x1a\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'R\x02in\x12x\n\x06not_in\x18\x0b \x03(\tBa\xc2H^\n\\\n\rstring.not_in\x1aKthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'R\x05notIn\x12\xe0\x01\n\x05\x65mail\x18\x0c \x01(\x08\x42\xc7\x01\xc2H\xc3\x01\n[\n\x0cstring.email\x12\x1dmust be a valid email address\x1a,!rules.email || this == \'\' || this.isEmail()\nd\n\x12string.email_empty\x12\x32value is empty, which is not a valid email address\x1a\x1a!rules.email || this != \'\'H\x00R\x05\x65mail\x12\xeb\x01\n\x08hostname\x18\r \x01(\x08\x42\xcc\x01\xc2H\xc8\x01\n_\n\x0fstring.hostname\x12\x18must be a valid hostname\x1a\x32!rules.hostname || this == \'\' || this.isHostname()\ne\n\x15string.hostname_empty\x12-value is empty, which is not a valid hostname\x1a\x1d!rules.hostname || this != \'\'H\x00R\x08hostname\x12\xc5\x01\n\x02ip\x18\x0e \x01(\x08\x42\xb2\x01\xc2H\xae\x01\nO\n\tstring.ip\x12\x1amust be a valid IP address\x1a&!rules.ip || this == \'\' || this.isIp()\n[\n\x0fstring.ip_empty\x12/value is empty, which is not a valid IP address\x1a\x17!rules.ip || this != \'\'H\x00R\x02ip\x12\xd6\x01\n\x04ipv4\x18\x0f \x01(\x08\x42\xbf\x01\xc2H\xbb\x01\nV\n\x0bstring.ipv4\x12\x1cmust be a valid IPv4 address\x1a)!rules.ipv4 || this == \'\' || this.isIp(4)\na\n\x11string.ipv4_empty\x12\x31value is empty, which is not a valid IPv4 address\x1a\x19!rules.ipv4 || this != \'\'H\x00R\x04ipv4\x12\xd6\x01\n\x04ipv6\x18\x10 \x01(\x08\x42\xbf\x01\xc2H\xbb\x01\nV\n\x0bstring.ipv6\x12\x1cmust be a valid IPv6 address\x1a)!rules.ipv6 || this == \'\' || this.isIp(6)\na\n\x11string.ipv6_empty\x12\x31value is empty, which is not a valid IPv6 address\x1a\x19!rules.ipv6 || this != \'\'H\x00R\x04ipv6\x12\xbe\x01\n\x03uri\x18\x11 \x01(\x08\x42\xa9\x01\xc2H\xa5\x01\nK\n\nstring.uri\x12\x13must be a valid URI\x1a(!rules.uri || this == \'\' || this.isUri()\nV\n\x10string.uri_empty\x12(value is empty, which is not a valid URI\x1a\x18!rules.uri || this != \'\'H\x00R\x03uri\x12r\n\x07uri_ref\x18\x12 \x01(\x08\x42W\xc2HT\nR\n\x0estring.uri_ref\x12\x1dmust be a valid URI Reference\x1a!!rules.uri_ref || this.isUriRef()H\x00R\x06uriRef\x12\x92\x02\n\x07\x61\x64\x64ress\x18\x15 \x01(\x08\x42\xf5\x01\xc2H\xf1\x01\n{\n\x0estring.address\x12\'must be a valid hostname, or ip address\x1a@!rules.address || this == \'\' || this.isHostname() || this.isIp()\nr\n\x14string.address_empty\x12!rules.ipv4_with_prefixlen || this == \'\' || this.isIpPrefix(4)\n\x92\x01\n string.ipv4_with_prefixlen_empty\x12\x44value is empty, which is not a valid IPv4 address with prefix length\x1a(!rules.ipv4_with_prefixlen || this != \'\'H\x00R\x11ipv4WithPrefixlen\x12\xdc\x02\n\x13ipv6_with_prefixlen\x18\x1c \x01(\x08\x42\xa9\x02\xc2H\xa5\x02\n\x8d\x01\n\x1astring.ipv6_with_prefixlen\x12/must be a valid IPv6 address with prefix length\x1a>!rules.ipv6_with_prefixlen || this == \'\' || this.isIpPrefix(6)\n\x92\x01\n string.ipv6_with_prefixlen_empty\x12\x44value is empty, which is not a valid IPv6 address with prefix length\x1a(!rules.ipv6_with_prefixlen || this != \'\'H\x00R\x11ipv6WithPrefixlen\x12\xf6\x01\n\tip_prefix\x18\x1d \x01(\x08\x42\xd6\x01\xc2H\xd2\x01\nf\n\x10string.ip_prefix\x12\x19must be a valid IP prefix\x1a\x37!rules.ip_prefix || this == \'\' || this.isIpPrefix(true)\nh\n\x16string.ip_prefix_empty\x12.value is empty, which is not a valid IP prefix\x1a\x1e!rules.ip_prefix || this != \'\'H\x00R\x08ipPrefix\x12\x89\x02\n\x0bipv4_prefix\x18\x1e \x01(\x08\x42\xe5\x01\xc2H\xe1\x01\no\n\x12string.ipv4_prefix\x12\x1bmust be a valid IPv4 prefix\x1a!rules.host_and_port || this == \'\' || this.isHostAndPort(true)\ny\n\x1astring.host_and_port_empty\x12\x37value is empty, which is not a valid host and port pair\x1a\"!rules.host_and_port || this != \'\'H\x00R\x0bhostAndPort\x12\xf4\x01\n\x04ulid\x18# \x01(\x08\x42\xdd\x01\xc2H\xd9\x01\n|\n\x0bstring.ulid\x12\x14must be a valid ULID\x1aW!rules.ulid || this == \'\' || this.matches(\'^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$\')\nY\n\x11string.ulid_empty\x12)value is empty, which is not a valid ULID\x1a\x19!rules.ulid || this != \'\'H\x00R\x04ulid\x12\xe1\x02\n\x0cprotobuf_fqn\x18% \x01(\x08\x42\xbb\x02\xc2H\xb7\x02\n\xaf\x01\n\x13string.protobuf_fqn\x12-must be a valid fully-qualified Protobuf name\x1ai!rules.protobuf_fqn || this == \'\' || this.matches(\'^[A-Za-z_][A-Za-z_0-9]*(\\\\.[A-Za-z_][A-Za-z_0-9]*)*$\')\n\x82\x01\n\x19string.protobuf_fqn_empty\x12\x42value is empty, which is not a valid fully-qualified Protobuf name\x1a!!rules.protobuf_fqn || this != \'\'H\x00R\x0bprotobufFqn\x12\xa1\x03\n\x10protobuf_dot_fqn\x18& \x01(\x08\x42\xf4\x02\xc2H\xf0\x02\n\xcd\x01\n\x17string.protobuf_dot_fqn\x12@must be a valid fully-qualified Protobuf name with a leading dot\x1ap!rules.protobuf_dot_fqn || this == \'\' || this.matches(\'^\\\\.[A-Za-z_][A-Za-z_0-9]*(\\\\.[A-Za-z_][A-Za-z_0-9]*)*$\')\n\x9d\x01\n\x1dstring.protobuf_dot_fqn_empty\x12Uvalue is empty, which is not a valid fully-qualified Protobuf name with a leading dot\x1a%!rules.protobuf_dot_fqn || this != \'\'H\x00R\x0eprotobufDotFqn\x12\xac\x05\n\x10well_known_regex\x18\x18 \x01(\x0e\x32\x18.buf.validate.KnownRegexB\xe5\x04\xc2H\xe1\x04\n\xea\x01\n#string.well_known_regex.header_name\x12 must be a valid HTTP header name\x1a\xa0\x01rules.well_known_regex != 1 || this == \'\' || this.matches(!has(rules.strict) || rules.strict ?\'^:?[0-9a-zA-Z!#$%&\\\'*+-.^_|~\\x60]+$\' :\'^[^\\u0000\\u000A\\u000D]+$\')\n\x8d\x01\n)string.well_known_regex.header_name_empty\x12\x35value is empty, which is not a valid HTTP header name\x1a)rules.well_known_regex != 1 || this != \'\'\n\xe1\x01\n$string.well_known_regex.header_value\x12!must be a valid HTTP header value\x1a\x95\x01rules.well_known_regex != 2 || this.matches(!has(rules.strict) || rules.strict ?\'^[^\\u0000-\\u0008\\u000A-\\u001F\\u007F]*$\' :\'^[^\\u0000\\u000A\\u000D]*$\')H\x00R\x0ewellKnownRegex\x12\x16\n\x06strict\x18\x19 \x01(\x08R\x06strict\x12\x35\n\x07\x65xample\x18\" \x03(\tB\x1b\xc2H\x18\n\x16\n\x0estring.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\x42\x0c\n\nwell_known\"\xca\x12\n\nBytesRules\x12\x81\x01\n\x05\x63onst\x18\x01 \x01(\x0c\x42k\xc2Hh\nf\n\x0b\x62ytes.const\x1aWthis != getField(rules, \'const\') ? \'must be %x\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12p\n\x03len\x18\r \x01(\x04\x42^\xc2H[\nY\n\tbytes.len\x1aLuint(this.size()) != rules.len ? \'must be %s bytes\'.format([rules.len]) : \'\'R\x03len\x12\x8b\x01\n\x07min_len\x18\x02 \x01(\x04\x42r\xc2Ho\nm\n\rbytes.min_len\x1a\\uint(this.size()) < rules.min_len ? \'must be at least %s bytes\'.format([rules.min_len]) : \'\'R\x06minLen\x12\x8a\x01\n\x07max_len\x18\x03 \x01(\x04\x42q\xc2Hn\nl\n\rbytes.max_len\x1a[uint(this.size()) > rules.max_len ? \'must be at most %s bytes\'.format([rules.max_len]) : \'\'R\x06maxLen\x12\x93\x01\n\x07pattern\x18\x04 \x01(\tBy\xc2Hv\nt\n\rbytes.pattern\x1a\x63!string(this).matches(rules.pattern) ? \'must match regex pattern `%s`\'.format([rules.pattern]) : \'\'R\x07pattern\x12\x83\x01\n\x06prefix\x18\x05 \x01(\x0c\x42k\xc2Hh\nf\n\x0c\x62ytes.prefix\x1aV!this.startsWith(rules.prefix) ? \'does not have prefix %x\'.format([rules.prefix]) : \'\'R\x06prefix\x12\x81\x01\n\x06suffix\x18\x06 \x01(\x0c\x42i\xc2Hf\nd\n\x0c\x62ytes.suffix\x1aT!this.endsWith(rules.suffix) ? \'does not have suffix %x\'.format([rules.suffix]) : \'\'R\x06suffix\x12\x87\x01\n\x08\x63ontains\x18\x07 \x01(\x0c\x42k\xc2Hh\nf\n\x0e\x62ytes.contains\x1aT!this.contains(rules.contains) ? \'does not contain %x\'.format([rules.contains]) : \'\'R\x08\x63ontains\x12\xa5\x01\n\x02in\x18\x08 \x03(\x0c\x42\x94\x01\xc2H\x90\x01\n\x8d\x01\n\x08\x62ytes.in\x1a\x80\x01getField(rules, \'in\').size() > 0 && !(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'R\x02in\x12w\n\x06not_in\x18\t \x03(\x0c\x42`\xc2H]\n[\n\x0c\x62ytes.not_in\x1aKthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'R\x05notIn\x12\xe9\x01\n\x02ip\x18\n \x01(\x08\x42\xd6\x01\xc2H\xd2\x01\nn\n\x08\x62ytes.ip\x12\x1amust be a valid IP address\x1a\x46!rules.ip || this.size() == 0 || this.size() == 4 || this.size() == 16\n`\n\x0e\x62ytes.ip_empty\x12/value is empty, which is not a valid IP address\x1a\x1d!rules.ip || this.size() != 0H\x00R\x02ip\x12\xe4\x01\n\x04ipv4\x18\x0b \x01(\x08\x42\xcd\x01\xc2H\xc9\x01\n_\n\nbytes.ipv4\x12\x1cmust be a valid IPv4 address\x1a\x33!rules.ipv4 || this.size() == 0 || this.size() == 4\nf\n\x10\x62ytes.ipv4_empty\x12\x31value is empty, which is not a valid IPv4 address\x1a\x1f!rules.ipv4 || this.size() != 0H\x00R\x04ipv4\x12\xe5\x01\n\x04ipv6\x18\x0c \x01(\x08\x42\xce\x01\xc2H\xca\x01\n`\n\nbytes.ipv6\x12\x1cmust be a valid IPv6 address\x1a\x34!rules.ipv6 || this.size() == 0 || this.size() == 16\nf\n\x10\x62ytes.ipv6_empty\x12\x31value is empty, which is not a valid IPv6 address\x1a\x1f!rules.ipv6 || this.size() != 0H\x00R\x04ipv6\x12\xd5\x01\n\x04uuid\x18\x0f \x01(\x08\x42\xbe\x01\xc2H\xba\x01\nX\n\nbytes.uuid\x12\x14must be a valid UUID\x1a\x34!rules.uuid || this.size() == 0 || this.size() == 16\n^\n\x10\x62ytes.uuid_empty\x12)value is empty, which is not a valid UUID\x1a\x1f!rules.uuid || this.size() != 0H\x00R\x04uuid\x12\x34\n\x07\x65xample\x18\x0e \x03(\x0c\x42\x1a\xc2H\x17\n\x15\n\rbytes.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\x42\x0c\n\nwell_known\"\xea\x03\n\tEnumRules\x12\x83\x01\n\x05\x63onst\x18\x01 \x01(\x05\x42m\xc2Hj\nh\n\nenum.const\x1aZthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12!\n\x0c\x64\x65\x66ined_only\x18\x02 \x01(\x08R\x0b\x64\x65\x66inedOnly\x12|\n\x02in\x18\x03 \x03(\x05\x42l\xc2Hi\ng\n\x07\x65num.in\x1a\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'R\x02in\x12v\n\x06not_in\x18\x04 \x03(\x05\x42_\xc2H\\\nZ\n\x0b\x65num.not_in\x1aKthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'R\x05notIn\x12\x33\n\x07\x65xample\x18\x05 \x03(\x05\x42\x19\xc2H\x16\n\x14\n\x0c\x65num.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"\x90\x04\n\rRepeatedRules\x12\xa0\x01\n\tmin_items\x18\x01 \x01(\x04\x42\x82\x01\xc2H\x7f\n}\n\x12repeated.min_items\x1aguint(this.size()) < rules.min_items ? \'must contain at least %d item(s)\'.format([rules.min_items]) : \'\'R\x08minItems\x12\xa6\x01\n\tmax_items\x18\x02 \x01(\x04\x42\x88\x01\xc2H\x84\x01\n\x81\x01\n\x12repeated.max_items\x1akuint(this.size()) > rules.max_items ? \'must contain no more than %s item(s)\'.format([rules.max_items]) : \'\'R\x08maxItems\x12x\n\x06unique\x18\x03 \x01(\x08\x42`\xc2H]\n[\n\x0frepeated.unique\x12(repeated value must contain unique items\x1a\x1e!rules.unique || this.unique()R\x06unique\x12.\n\x05items\x18\x04 \x01(\x0b\x32\x18.buf.validate.FieldRulesR\x05items*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"\xac\x03\n\x08MapRules\x12\x99\x01\n\tmin_pairs\x18\x01 \x01(\x04\x42|\xc2Hy\nw\n\rmap.min_pairs\x1a\x66uint(this.size()) < rules.min_pairs ? \'map must be at least %d entries\'.format([rules.min_pairs]) : \'\'R\x08minPairs\x12\x98\x01\n\tmax_pairs\x18\x02 \x01(\x04\x42{\xc2Hx\nv\n\rmap.max_pairs\x1a\x65uint(this.size()) > rules.max_pairs ? \'map must be at most %d entries\'.format([rules.max_pairs]) : \'\'R\x08maxPairs\x12,\n\x04keys\x18\x04 \x01(\x0b\x32\x18.buf.validate.FieldRulesR\x04keys\x12\x30\n\x06values\x18\x05 \x01(\x0b\x32\x18.buf.validate.FieldRulesR\x06values*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"1\n\x08\x41nyRules\x12\x0e\n\x02in\x18\x02 \x03(\tR\x02in\x12\x15\n\x06not_in\x18\x03 \x03(\tR\x05notIn\"\xec\x16\n\rDurationRules\x12\xa2\x01\n\x05\x63onst\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationBq\xc2Hn\nl\n\x0e\x64uration.const\x1aZthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12\xa6\x01\n\x02lt\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationBy\xc2Hv\nt\n\x0b\x64uration.lt\x1a\x65!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'H\x00R\x02lt\x12\xb9\x01\n\x03lte\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationB\x89\x01\xc2H\x85\x01\n\x82\x01\n\x0c\x64uration.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'H\x00R\x03lte\x12\xa7\x07\n\x02gt\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\xf9\x06\xc2H\xf5\x06\nw\n\x0b\x64uration.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\xb0\x01\n\x0e\x64uration.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \'must be greater than %s and less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xb8\x01\n\x18\x64uration.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \'must be greater than %s or less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xc0\x01\n\x0f\x64uration.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \'must be greater than %s and less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'\n\xc8\x01\n\x19\x64uration.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \'must be greater than %s or less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'H\x01R\x02gt\x12\xf4\x07\n\x03gte\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\xc4\x07\xc2H\xc0\x07\n\x85\x01\n\x0c\x64uration.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\xbf\x01\n\x0f\x64uration.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \'must be greater than or equal to %s and less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xc7\x01\n\x19\x64uration.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \'must be greater than or equal to %s or less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xcf\x01\n\x10\x64uration.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \'must be greater than or equal to %s and less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'\n\xd7\x01\n\x1a\x64uration.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \'must be greater than or equal to %s or less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'H\x01R\x03gte\x12\x9b\x01\n\x02in\x18\x07 \x03(\x0b\x32\x19.google.protobuf.DurationBp\xc2Hm\nk\n\x0b\x64uration.in\x1a\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'R\x02in\x12\x95\x01\n\x06not_in\x18\x08 \x03(\x0b\x32\x19.google.protobuf.DurationBc\xc2H`\n^\n\x0f\x64uration.not_in\x1aKthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'R\x05notIn\x12R\n\x07\x65xample\x18\t \x03(\x0b\x32\x19.google.protobuf.DurationB\x1d\xc2H\x1a\n\x18\n\x10\x64uration.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\x42\x0b\n\tless_thanB\x0e\n\x0cgreater_than\"\x86\x06\n\x0e\x46ieldMaskRules\x12\xc0\x01\n\x05\x63onst\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x8d\x01\xc2H\x89\x01\n\x86\x01\n\x10\x66ield_mask.const\x1arthis.paths != getField(rules, \'const\').paths ? \'must equal paths %s\'.format([getField(rules, \'const\').paths]) : \'\'R\x05\x63onst\x12\xd7\x01\n\x02in\x18\x02 \x03(\tB\xc6\x01\xc2H\xc2\x01\n\xbf\x01\n\rfield_mask.in\x1a\xad\x01!this.paths.all(p, p in getField(rules, \'in\') || getField(rules, \'in\').exists(f, p.startsWith(f+\'.\'))) ? \'must only contain paths in %s\'.format([getField(rules, \'in\')]) : \'\'R\x02in\x12\xf4\x01\n\x06not_in\x18\x03 \x03(\tB\xdc\x01\xc2H\xd8\x01\n\xd5\x01\n\x11\x66ield_mask.not_in\x1a\xbf\x01!this.paths.all(p, !(p in getField(rules, \'not_in\') || getField(rules, \'not_in\').exists(f, p.startsWith(f+\'.\')))) ? \'must not contain any paths in %s\'.format([getField(rules, \'not_in\')]) : \'\'R\x05notIn\x12U\n\x07\x65xample\x18\x04 \x03(\x0b\x32\x1a.google.protobuf.FieldMaskB\x1f\xc2H\x1c\n\x1a\n\x12\x66ield_mask.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"\xe8\x17\n\x0eTimestampRules\x12\xa4\x01\n\x05\x63onst\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampBr\xc2Ho\nm\n\x0ftimestamp.const\x1aZthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'R\x05\x63onst\x12\xa8\x01\n\x02lt\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampBz\xc2Hw\nu\n\x0ctimestamp.lt\x1a\x65!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'H\x00R\x02lt\x12\xbb\x01\n\x03lte\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x8a\x01\xc2H\x86\x01\n\x83\x01\n\rtimestamp.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'H\x00R\x03lte\x12m\n\x06lt_now\x18\x07 \x01(\x08\x42T\xc2HQ\nO\n\x10timestamp.lt_now\x1a;(rules.lt_now && this > now) ? \'must be less than now\' : \'\'H\x00R\x05ltNow\x12\xad\x07\n\x02gt\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\xfe\x06\xc2H\xfa\x06\nx\n\x0ctimestamp.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\xb1\x01\n\x0ftimestamp.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \'must be greater than %s and less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xb9\x01\n\x19timestamp.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \'must be greater than %s or less than %s\'.format([rules.gt, rules.lt]) : \'\'\n\xc1\x01\n\x10timestamp.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \'must be greater than %s and less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'\n\xc9\x01\n\x1atimestamp.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \'must be greater than %s or less than or equal to %s\'.format([rules.gt, rules.lte]) : \'\'H\x01R\x02gt\x12\xfa\x07\n\x03gte\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\xc9\x07\xc2H\xc5\x07\n\x86\x01\n\rtimestamp.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\xc0\x01\n\x10timestamp.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \'must be greater than or equal to %s and less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xc8\x01\n\x1atimestamp.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \'must be greater than or equal to %s or less than %s\'.format([rules.gte, rules.lt]) : \'\'\n\xd0\x01\n\x11timestamp.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \'must be greater than or equal to %s and less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'\n\xd8\x01\n\x1btimestamp.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \'must be greater than or equal to %s or less than or equal to %s\'.format([rules.gte, rules.lte]) : \'\'H\x01R\x03gte\x12p\n\x06gt_now\x18\x08 \x01(\x08\x42W\xc2HT\nR\n\x10timestamp.gt_now\x1a>(rules.gt_now && this < now) ? \'must be greater than now\' : \'\'H\x01R\x05gtNow\x12\xb9\x01\n\x06within\x18\t \x01(\x0b\x32\x19.google.protobuf.DurationB\x85\x01\xc2H\x81\x01\n\x7f\n\x10timestamp.within\x1akthis < now-rules.within || this > now+rules.within ? \'must be within %s of now\'.format([rules.within]) : \'\'R\x06within\x12T\n\x07\x65xample\x18\n \x03(\x0b\x32\x1a.google.protobuf.TimestampB\x1e\xc2H\x1b\n\x19\n\x11timestamp.example\x1a\x04trueR\x07\x65xample*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\x42\x0b\n\tless_thanB\x0e\n\x0cgreater_than\"E\n\nViolations\x12\x37\n\nviolations\x18\x01 \x03(\x0b\x32\x17.buf.validate.ViolationR\nviolations\"\xc5\x01\n\tViolation\x12-\n\x05\x66ield\x18\x05 \x01(\x0b\x32\x17.buf.validate.FieldPathR\x05\x66ield\x12+\n\x04rule\x18\x06 \x01(\x0b\x32\x17.buf.validate.FieldPathR\x04rule\x12\x17\n\x07rule_id\x18\x02 \x01(\tR\x06ruleId\x12\x18\n\x07message\x18\x03 \x01(\tR\x07message\x12\x17\n\x07\x66or_key\x18\x04 \x01(\x08R\x06\x66orKeyJ\x04\x08\x01\x10\x02R\nfield_path\"G\n\tFieldPath\x12:\n\x08\x65lements\x18\x01 \x03(\x0b\x32\x1e.buf.validate.FieldPathElementR\x08\x65lements\"\xcc\x03\n\x10\x46ieldPathElement\x12!\n\x0c\x66ield_number\x18\x01 \x01(\x05R\x0b\x66ieldNumber\x12\x1d\n\nfield_name\x18\x02 \x01(\tR\tfieldName\x12I\n\nfield_type\x18\x03 \x01(\x0e\x32*.google.protobuf.FieldDescriptorProto.TypeR\tfieldType\x12\x45\n\x08key_type\x18\x04 \x01(\x0e\x32*.google.protobuf.FieldDescriptorProto.TypeR\x07keyType\x12I\n\nvalue_type\x18\x05 \x01(\x0e\x32*.google.protobuf.FieldDescriptorProto.TypeR\tvalueType\x12\x16\n\x05index\x18\x06 \x01(\x04H\x00R\x05index\x12\x1b\n\x08\x62ool_key\x18\x07 \x01(\x08H\x00R\x07\x62oolKey\x12\x19\n\x07int_key\x18\x08 \x01(\x03H\x00R\x06intKey\x12\x1b\n\x08uint_key\x18\t \x01(\x04H\x00R\x07uintKey\x12\x1f\n\nstring_key\x18\n \x01(\tH\x00R\tstringKeyB\x0b\n\tsubscript*\xa1\x01\n\x06Ignore\x12\x16\n\x12IGNORE_UNSPECIFIED\x10\x00\x12\x18\n\x14IGNORE_IF_ZERO_VALUE\x10\x01\x12\x11\n\rIGNORE_ALWAYS\x10\x03\"\x04\x08\x02\x10\x02*\x0cIGNORE_EMPTY*\x0eIGNORE_DEFAULT*\x17IGNORE_IF_DEFAULT_VALUE*\x15IGNORE_IF_UNPOPULATED*n\n\nKnownRegex\x12\x1b\n\x17KNOWN_REGEX_UNSPECIFIED\x10\x00\x12 \n\x1cKNOWN_REGEX_HTTP_HEADER_NAME\x10\x01\x12!\n\x1dKNOWN_REGEX_HTTP_HEADER_VALUE\x10\x02:V\n\x07message\x12\x1f.google.protobuf.MessageOptions\x18\x87\t \x01(\x0b\x32\x1a.buf.validate.MessageRulesR\x07message:N\n\x05oneof\x12\x1d.google.protobuf.OneofOptions\x18\x87\t \x01(\x0b\x32\x18.buf.validate.OneofRulesR\x05oneof:N\n\x05\x66ield\x12\x1d.google.protobuf.FieldOptions\x18\x87\t \x01(\x0b\x32\x18.buf.validate.FieldRulesR\x05\x66ield:]\n\npredefined\x12\x1d.google.protobuf.FieldOptions\x18\x88\t \x01(\x0b\x32\x1d.buf.validate.PredefinedRulesR\npredefinedBn\n\x12\x62uild.buf.validateB\rValidateProtoP\x01ZGbuf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'buf.validate.validate_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\020com.buf.validateB\rValidateProtoP\001ZGbuf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate\242\002\003BVX\252\002\014Buf.Validate\312\002\014Buf\\Validate\342\002\030Buf\\Validate\\GPBMetadata\352\002\rBuf::Validate' + _globals['DESCRIPTOR']._serialized_options = b'\n\022build.buf.validateB\rValidateProtoP\001ZGbuf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate' _globals['_FLOATRULES'].fields_by_name['const']._loaded_options = None _globals['_FLOATRULES'].fields_by_name['const']._serialized_options = b'\302Hk\ni\n\013float.const\032Zthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'' _globals['_FLOATRULES'].fields_by_name['lt']._loaded_options = None diff --git a/poe_tasks.toml b/poe_tasks.toml new file mode 100644 index 00000000..faa6b2a1 --- /dev/null +++ b/poe_tasks.toml @@ -0,0 +1,114 @@ +#:schema https://json.schemastore.org/partial-poe.json + +[env] +PROTOVALIDATE_VERSION.default = "v1.2.0" + +[tasks.add-license-header] +help = "Add license header to all source files" +cmd = """ +go run github.com/bufbuild/buf/private/pkg/licenseheader/cmd/license-header@v1.69.0 + --ignore .github --ignore buf.yaml + --ignore buf.gen.yaml + --ignore test/conformance/nonconforming.yaml + --license-type apache + --copyright-holder "Buf Technologies, Inc." + --year-range "2023-2026" +""" + +[tasks.check] +help = "Run code checks" +sequence = [ + "lint", + "test", + "test-conformance", +] + +[tasks.diffcheck] +help = "Check for uncommitted or untracked files (guards against codegen regressions)" +shell = "test -z \"$(git status --porcelain | tee /dev/stderr)\"" + +[tasks.generate] +sequence = [ + "generate-cel", + "generate-protovalidate", + "generate-test", + "add-license-header", +] + +[tasks.generate-cel] +script = "scripts.generate_cel:main" + +[tasks.generate-protovalidate] +script = "scripts.generate_protovalidate:main(environ['PROTOVALIDATE_VERSION'])" + +[tasks.generate-test] +sequence = [ + { script = "poethepoet.scripts:rm('test/gen/tests')" }, + { cmd = "buf generate", cwd = "test" }, +] + +[tasks.format] +help = "Apply all possible auto-formatting to files" +sequence = [ + "format-python", + "format-protos", + "format-toml", + "add-license-header" +] + +[tasks.format-protos] +help = "Apply auto-formatting to protobuf files" +cmd = "buf format --write" + +[tasks.format-python] +help = "Apply auto-formatting to Python files" +sequence = [ + { cmd = "ruff check --fix --unsafe-fixes --exit-zero" }, + { cmd = "ruff format" } +] + +[tasks.format-toml] +help = "Apply formatting to TOML files" +cmd = "tombi format" + +[tasks.lint] +help = "Apply all possible linting to files" +sequence = [ + "lint-python", + "lint-protos", + "lint-toml", + { cmd = "uv lock --check" } +] + +[tasks.lint-protos] +help = "Apply linting to protobuf files" +cmd = "buf format -d --exit-code" + +[tasks.lint-python] +help = "Apply linting to Python files" +sequence = [ + { cmd = "ruff check" }, + { cmd = "ruff format --check" }, + { cmd = "ty check protovalidate" }, +] + +[tasks.lint-toml] +help = "Apply linting to TOML files" +sequence = [ + { cmd = "tombi format --check" }, + { cmd = "tombi lint" }, +] + +[tasks.test-conformance] +help = "Run the CEL conformance tests" +cmd = """ +go run github.com/bufbuild/protovalidate/tools/protovalidate-conformance@${PROTOVALIDATE_VERSION} + --strict_message + --expected_failures=test/conformance/nonconforming.yaml + --timeout 10s + python test/conformance/runner.py +""" + +[tasks.test] +help = "Run unit tests" +cmd = "pytest" diff --git a/pyproject.toml b/pyproject.toml index 77e66a88..2d39634c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,9 @@ dev = [ "protovalidate-proto", "buf-bin==1.69.0", + "fix-protobuf-imports==0.1.7", "google-re2-stubs==0.1.1", + "poethepoet==0.46.0", "pytest==9.0.3", "ruff==0.15.14", "tombi==1.0.0", @@ -65,7 +67,6 @@ raw-options = { fallback_version = "0.0.0" } # Turn all warnings into errors, # except DeprecationWarnings (which we knowingly tolerate due to using old `protobuf` APIs). filterwarnings = ["error", "ignore::DeprecationWarning"] -pythonpath = ["test/gen"] strict = true # restrict testpaths to speed up test discovery testpaths = ["test"] diff --git a/scripts/generate_cel.py b/scripts/generate_cel.py new file mode 100644 index 00000000..efac2f5f --- /dev/null +++ b/scripts/generate_cel.py @@ -0,0 +1,54 @@ +# Copyright 2023-2026 Buf Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import shutil +import subprocess +from pathlib import Path +from urllib.request import urlopen + +from fix_protobuf_imports.fix_protobuf_imports import fix_protobuf_imports + +from test.test_format import CEL_SPEC_VERSION + +test_dir = Path(__file__).parent.parent / "test" + + +def main() -> None: + """Generates CEL conformance protos and fetches CEL testdata""" + + shutil.rmtree(test_dir / "gen" / "cel", ignore_errors=True) + + subprocess.run( # noqa: S603 + [ # noqa: S607 + "buf", + "generate", + f"buf.build/google/cel-spec:{CEL_SPEC_VERSION}", + "--exclude-path", + "cel/expr/conformance/proto2", + "--exclude-path", + "cel/expr/conformance/proto3", + ], + check=True, + cwd=test_dir, + ) + + with urlopen( + f"https://raw.githubusercontent.com/google/cel-spec/refs/tags/{CEL_SPEC_VERSION}/tests/simple/testdata/string_ext.textproto" + ) as res: + out_path = test_dir / "testdata" / f"string_ext_{CEL_SPEC_VERSION}.textproto" + out_path.parent.mkdir(parents=True, exist_ok=True) + with open(out_path, "wb") as f: + f.write(res.read()) + + fix_protobuf_imports.callback(test_dir / "gen", dry=False) diff --git a/scripts/generate_protovalidate.py b/scripts/generate_protovalidate.py new file mode 100644 index 00000000..35d978a6 --- /dev/null +++ b/scripts/generate_protovalidate.py @@ -0,0 +1,40 @@ +# Copyright 2023-2026 Buf Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import re +import shutil +import subprocess +from pathlib import Path + + +def main(version: str) -> None: + if re.match(r"^v\d+\.\d+\.\d+(\-.+)?$", version): + # Version tag, fetch from BSR + protovalidate_path = f"buf.build/bufbuild/protovalidate:{version}" + protovalidate_testing_path = f"buf.build/bufbuild/protovalidate-testing:{version}" + else: + # Not a tag, generally an unreleased commit, fetch directly from git + protovalidate_path = f"https://github.com/bufbuild/protovalidate.git#subdir=proto/protovalidate,ref={version}" + protovalidate_testing_path = ( + f"https://github.com/bufbuild/protovalidate.git#subdir=proto/protovalidate-testing,ref={version}" + ) + + protos_dir = Path(__file__).parent.parent / "packages" / "protovalidate-proto" / "proto" + shutil.rmtree(protos_dir, ignore_errors=True) + protos_dir.mkdir(parents=True, exist_ok=True) + + subprocess.run(["buf", "export", protovalidate_path, "-o", protos_dir], check=True) # noqa: S603, S607 + subprocess.run(["buf", "export", protovalidate_testing_path, "-o", protos_dir], check=True) # noqa: S603, S607 + subprocess.run(["buf", "generate"], cwd=protos_dir.parent, check=True) # noqa: S607 + (protos_dir.parent / "src" / "buf" / "validate" / "__init__.py").touch() diff --git a/test/gen/cel/expr/checked_pb2.py b/test/gen/cel/expr/checked_pb2.py index a86c6558..cedbcc34 100644 --- a/test/gen/cel/expr/checked_pb2.py +++ b/test/gen/cel/expr/checked_pb2.py @@ -26,7 +26,7 @@ _sym_db = _symbol_database.Default() -from cel.expr import syntax_pb2 as cel_dot_expr_dot_syntax__pb2 +from ...cel.expr import syntax_pb2 as cel_dot_expr_dot_syntax__pb2 from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 diff --git a/test/gen/cel/expr/checked_pb2.pyi b/test/gen/cel/expr/checked_pb2.pyi index df24c43d..cafce078 100644 --- a/test/gen/cel/expr/checked_pb2.pyi +++ b/test/gen/cel/expr/checked_pb2.pyi @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from cel.expr import syntax_pb2 as _syntax_pb2 +from ...cel.expr import syntax_pb2 as _syntax_pb2 from google.protobuf import empty_pb2 as _empty_pb2 from google.protobuf import struct_pb2 as _struct_pb2 from google.protobuf.internal import containers as _containers diff --git a/test/gen/cel/expr/conformance/conformance_service_pb2.py b/test/gen/cel/expr/conformance/conformance_service_pb2.py index 0a4a460e..2e7f0249 100644 --- a/test/gen/cel/expr/conformance/conformance_service_pb2.py +++ b/test/gen/cel/expr/conformance/conformance_service_pb2.py @@ -26,9 +26,9 @@ _sym_db = _symbol_database.Default() -from cel.expr import checked_pb2 as cel_dot_expr_dot_checked__pb2 -from cel.expr import eval_pb2 as cel_dot_expr_dot_eval__pb2 -from cel.expr import syntax_pb2 as cel_dot_expr_dot_syntax__pb2 +from ....cel.expr import checked_pb2 as cel_dot_expr_dot_checked__pb2 +from ....cel.expr import eval_pb2 as cel_dot_expr_dot_eval__pb2 +from ....cel.expr import syntax_pb2 as cel_dot_expr_dot_syntax__pb2 DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n.cel/expr/conformance/conformance_service.proto\x12\x14\x63\x65l.expr.conformance\x1a\x16\x63\x65l/expr/checked.proto\x1a\x13\x63\x65l/expr/eval.proto\x1a\x15\x63\x65l/expr/syntax.proto\"\xa4\x01\n\x0cParseRequest\x12\x1d\n\ncel_source\x18\x01 \x01(\tR\tcelSource\x12%\n\x0esyntax_version\x18\x02 \x01(\tR\rsyntaxVersion\x12\'\n\x0fsource_location\x18\x03 \x01(\tR\x0esourceLocation\x12%\n\x0e\x64isable_macros\x18\x04 \x01(\x08R\rdisableMacros\"r\n\rParseResponse\x12\x35\n\x0bparsed_expr\x18\x01 \x01(\x0b\x32\x14.cel.expr.ParsedExprR\nparsedExpr\x12*\n\x06issues\x18\x02 \x01(\x0b\x32\x12.cel.expr.ErrorSetR\x06issues\"\xac\x01\n\x0c\x43heckRequest\x12\x35\n\x0bparsed_expr\x18\x01 \x01(\x0b\x32\x14.cel.expr.ParsedExprR\nparsedExpr\x12)\n\x08type_env\x18\x02 \x03(\x0b\x32\x0e.cel.expr.DeclR\x07typeEnv\x12\x1c\n\tcontainer\x18\x03 \x01(\tR\tcontainer\x12\x1c\n\nno_std_env\x18\x04 \x01(\x08R\x08noStdEnv\"u\n\rCheckResponse\x12\x38\n\x0c\x63hecked_expr\x18\x01 \x01(\x0b\x32\x15.cel.expr.CheckedExprR\x0b\x63heckedExpr\x12*\n\x06issues\x18\x02 \x01(\x0b\x32\x12.cel.expr.ErrorSetR\x06issues\"\xcc\x02\n\x0b\x45valRequest\x12\x37\n\x0bparsed_expr\x18\x01 \x01(\x0b\x32\x14.cel.expr.ParsedExprH\x00R\nparsedExpr\x12:\n\x0c\x63hecked_expr\x18\x02 \x01(\x0b\x32\x15.cel.expr.CheckedExprH\x00R\x0b\x63heckedExpr\x12K\n\x08\x62indings\x18\x03 \x03(\x0b\x32/.cel.expr.conformance.EvalRequest.BindingsEntryR\x08\x62indings\x12\x1c\n\tcontainer\x18\x04 \x01(\tR\tcontainer\x1aP\n\rBindingsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x13.cel.expr.ExprValueR\x05value:\x02\x38\x01\x42\x0b\n\texpr_kind\"g\n\x0c\x45valResponse\x12+\n\x06result\x18\x01 \x01(\x0b\x32\x13.cel.expr.ExprValueR\x06result\x12*\n\x06issues\x18\x02 \x01(\x0b\x32\x12.cel.expr.ErrorSetR\x06issues\"p\n\x0eSourcePosition\x12\x1a\n\x08location\x18\x01 \x01(\tR\x08location\x12\x16\n\x06offset\x18\x02 \x01(\x05R\x06offset\x12\x12\n\x04line\x18\x03 \x01(\x05R\x04line\x12\x16\n\x06\x63olumn\x18\x04 \x01(\x05R\x06\x63olumn\"\xf8\x01\n\x0cIssueDetails\x12G\n\x08severity\x18\x01 \x01(\x0e\x32+.cel.expr.conformance.IssueDetails.SeverityR\x08severity\x12@\n\x08position\x18\x02 \x01(\x0b\x32$.cel.expr.conformance.SourcePositionR\x08position\x12\x0e\n\x02id\x18\x03 \x01(\x03R\x02id\"M\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x44\x45PRECATION\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x32\x8d\x02\n\x12\x43onformanceService\x12R\n\x05Parse\x12\".cel.expr.conformance.ParseRequest\x1a#.cel.expr.conformance.ParseResponse\"\x00\x12R\n\x05\x43heck\x12\".cel.expr.conformance.CheckRequest\x1a#.cel.expr.conformance.CheckResponse\"\x00\x12O\n\x04\x45val\x12!.cel.expr.conformance.EvalRequest\x1a\".cel.expr.conformance.EvalResponse\"\x00\x42\xc2\x01\n\x18\x63om.cel.expr.conformanceB\x17\x43onformanceServiceProtoP\x01Z\x18\x63\x65l.dev/expr/conformance\xf8\x01\x01\xa2\x02\x03\x43\x45\x43\xaa\x02\x14\x43\x65l.Expr.Conformance\xca\x02\x14\x43\x65l\\Expr\\Conformance\xe2\x02 Cel\\Expr\\Conformance\\GPBMetadata\xea\x02\x16\x43\x65l::Expr::Conformanceb\x06proto3') diff --git a/test/gen/cel/expr/conformance/conformance_service_pb2.pyi b/test/gen/cel/expr/conformance/conformance_service_pb2.pyi index c9b34b82..6e5f5aa4 100644 --- a/test/gen/cel/expr/conformance/conformance_service_pb2.pyi +++ b/test/gen/cel/expr/conformance/conformance_service_pb2.pyi @@ -12,9 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -from cel.expr import checked_pb2 as _checked_pb2 -from cel.expr import eval_pb2 as _eval_pb2 -from cel.expr import syntax_pb2 as _syntax_pb2 +from ....cel.expr import checked_pb2 as _checked_pb2 +from ....cel.expr import eval_pb2 as _eval_pb2 +from ....cel.expr import syntax_pb2 as _syntax_pb2 from google.protobuf.internal import containers as _containers from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper from google.protobuf import descriptor as _descriptor diff --git a/test/gen/cel/expr/conformance/env_config_pb2.py b/test/gen/cel/expr/conformance/env_config_pb2.py index 808a8286..4ebdc7e5 100644 --- a/test/gen/cel/expr/conformance/env_config_pb2.py +++ b/test/gen/cel/expr/conformance/env_config_pb2.py @@ -26,7 +26,7 @@ _sym_db = _symbol_database.Default() -from cel.expr import checked_pb2 as cel_dot_expr_dot_checked__pb2 +from ....cel.expr import checked_pb2 as cel_dot_expr_dot_checked__pb2 from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2 diff --git a/test/gen/cel/expr/conformance/env_config_pb2.pyi b/test/gen/cel/expr/conformance/env_config_pb2.pyi index b1e0b67f..d7f1da21 100644 --- a/test/gen/cel/expr/conformance/env_config_pb2.pyi +++ b/test/gen/cel/expr/conformance/env_config_pb2.pyi @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from cel.expr import checked_pb2 as _checked_pb2 +from ....cel.expr import checked_pb2 as _checked_pb2 from google.protobuf import struct_pb2 as _struct_pb2 from google.protobuf import descriptor_pb2 as _descriptor_pb2 from google.protobuf.internal import containers as _containers diff --git a/test/gen/cel/expr/conformance/test/simple_pb2.py b/test/gen/cel/expr/conformance/test/simple_pb2.py index 798105ef..5891e568 100644 --- a/test/gen/cel/expr/conformance/test/simple_pb2.py +++ b/test/gen/cel/expr/conformance/test/simple_pb2.py @@ -26,9 +26,9 @@ _sym_db = _symbol_database.Default() -from cel.expr import checked_pb2 as cel_dot_expr_dot_checked__pb2 -from cel.expr import eval_pb2 as cel_dot_expr_dot_eval__pb2 -from cel.expr import value_pb2 as cel_dot_expr_dot_value__pb2 +from .....cel.expr import checked_pb2 as cel_dot_expr_dot_checked__pb2 +from .....cel.expr import eval_pb2 as cel_dot_expr_dot_eval__pb2 +from .....cel.expr import value_pb2 as cel_dot_expr_dot_value__pb2 DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n&cel/expr/conformance/test/simple.proto\x12\x19\x63\x65l.expr.conformance.test\x1a\x16\x63\x65l/expr/checked.proto\x1a\x13\x63\x65l/expr/eval.proto\x1a\x14\x63\x65l/expr/value.proto\"\x8e\x01\n\x0eSimpleTestFile\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x02 \x01(\tR\x0b\x64\x65scription\x12\x46\n\x07section\x18\x03 \x03(\x0b\x32,.cel.expr.conformance.test.SimpleTestSectionR\x07section\"\x84\x01\n\x11SimpleTestSection\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x02 \x01(\tR\x0b\x64\x65scription\x12\x39\n\x04test\x18\x03 \x03(\x0b\x32%.cel.expr.conformance.test.SimpleTestR\x04test\"\xdd\x06\n\nSimpleTest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x02 \x01(\tR\x0b\x64\x65scription\x12\x12\n\x04\x65xpr\x18\x03 \x01(\tR\x04\x65xpr\x12%\n\x0e\x64isable_macros\x18\x04 \x01(\x08R\rdisableMacros\x12#\n\rdisable_check\x18\x05 \x01(\x08R\x0c\x64isableCheck\x12\x1d\n\ncheck_only\x18\x0f \x01(\x08R\tcheckOnly\x12)\n\x08type_env\x18\x06 \x03(\x0b\x32\x0e.cel.expr.DeclR\x07typeEnv\x12\x1c\n\tcontainer\x18\r \x01(\tR\tcontainer\x12\x16\n\x06locale\x18\x0e \x01(\tR\x06locale\x12O\n\x08\x62indings\x18\x07 \x03(\x0b\x32\x33.cel.expr.conformance.test.SimpleTest.BindingsEntryR\x08\x62indings\x12\'\n\x05value\x18\x08 \x01(\x0b\x32\x0f.cel.expr.ValueH\x00R\x05value\x12K\n\x0ctyped_result\x18\x10 \x01(\x0b\x32&.cel.expr.conformance.test.TypedResultH\x00R\x0btypedResult\x12\x33\n\neval_error\x18\t \x01(\x0b\x32\x12.cel.expr.ErrorSetH\x00R\tevalError\x12T\n\x0f\x61ny_eval_errors\x18\n \x01(\x0b\x32*.cel.expr.conformance.test.ErrorSetMatcherH\x00R\ranyEvalErrors\x12\x30\n\x07unknown\x18\x0b \x01(\x0b\x32\x14.cel.expr.UnknownSetH\x00R\x07unknown\x12Q\n\x0c\x61ny_unknowns\x18\x0c \x01(\x0b\x32,.cel.expr.conformance.test.UnknownSetMatcherH\x00R\x0b\x61nyUnknowns\x1aP\n\rBindingsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x13.cel.expr.ExprValueR\x05value:\x02\x38\x01\x42\x10\n\x0eresult_matcher\"i\n\x0bTypedResult\x12\'\n\x06result\x18\x01 \x01(\x0b\x32\x0f.cel.expr.ValueR\x06result\x12\x31\n\x0c\x64\x65\x64uced_type\x18\x02 \x01(\x0b\x32\x0e.cel.expr.TypeR\x0b\x64\x65\x64ucedType\"=\n\x0f\x45rrorSetMatcher\x12*\n\x06\x65rrors\x18\x01 \x03(\x0b\x32\x12.cel.expr.ErrorSetR\x06\x65rrors\"E\n\x11UnknownSetMatcher\x12\x30\n\x08unknowns\x18\x01 \x03(\x0b\x32\x14.cel.expr.UnknownSetR\x08unknownsB\xd6\x01\n\x1d\x63om.cel.expr.conformance.testB\x0bSimpleProtoP\x01Z\x1d\x63\x65l.dev/expr/conformance/test\xf8\x01\x01\xa2\x02\x04\x43\x45\x43T\xaa\x02\x19\x43\x65l.Expr.Conformance.Test\xca\x02\x19\x43\x65l\\Expr\\Conformance\\Test\xe2\x02%Cel\\Expr\\Conformance\\Test\\GPBMetadata\xea\x02\x1c\x43\x65l::Expr::Conformance::Testb\x06proto3') diff --git a/test/gen/cel/expr/conformance/test/simple_pb2.pyi b/test/gen/cel/expr/conformance/test/simple_pb2.pyi index d391b0c2..b0d46999 100644 --- a/test/gen/cel/expr/conformance/test/simple_pb2.pyi +++ b/test/gen/cel/expr/conformance/test/simple_pb2.pyi @@ -12,9 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -from cel.expr import checked_pb2 as _checked_pb2 -from cel.expr import eval_pb2 as _eval_pb2 -from cel.expr import value_pb2 as _value_pb2 +from .....cel.expr import checked_pb2 as _checked_pb2 +from .....cel.expr import eval_pb2 as _eval_pb2 +from .....cel.expr import value_pb2 as _value_pb2 from google.protobuf.internal import containers as _containers from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message diff --git a/test/gen/cel/expr/conformance/test/suite_pb2.py b/test/gen/cel/expr/conformance/test/suite_pb2.py index a0bac40d..7731e549 100644 --- a/test/gen/cel/expr/conformance/test/suite_pb2.py +++ b/test/gen/cel/expr/conformance/test/suite_pb2.py @@ -26,10 +26,10 @@ _sym_db = _symbol_database.Default() -from cel.expr import checked_pb2 as cel_dot_expr_dot_checked__pb2 -from cel.expr import eval_pb2 as cel_dot_expr_dot_eval__pb2 -from cel.expr import value_pb2 as cel_dot_expr_dot_value__pb2 -from cel.expr.conformance import env_config_pb2 as cel_dot_expr_dot_conformance_dot_env__config__pb2 +from .....cel.expr import checked_pb2 as cel_dot_expr_dot_checked__pb2 +from .....cel.expr import eval_pb2 as cel_dot_expr_dot_eval__pb2 +from .....cel.expr import value_pb2 as cel_dot_expr_dot_value__pb2 +from .....cel.expr.conformance import env_config_pb2 as cel_dot_expr_dot_conformance_dot_env__config__pb2 from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2 diff --git a/test/gen/cel/expr/conformance/test/suite_pb2.pyi b/test/gen/cel/expr/conformance/test/suite_pb2.pyi index ccb0feab..3b618044 100644 --- a/test/gen/cel/expr/conformance/test/suite_pb2.pyi +++ b/test/gen/cel/expr/conformance/test/suite_pb2.pyi @@ -12,10 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -from cel.expr import checked_pb2 as _checked_pb2 -from cel.expr import eval_pb2 as _eval_pb2 -from cel.expr import value_pb2 as _value_pb2 -from cel.expr.conformance import env_config_pb2 as _env_config_pb2 +from .....cel.expr import checked_pb2 as _checked_pb2 +from .....cel.expr import eval_pb2 as _eval_pb2 +from .....cel.expr import value_pb2 as _value_pb2 +from .....cel.expr.conformance import env_config_pb2 as _env_config_pb2 from google.protobuf import any_pb2 as _any_pb2 from google.protobuf.internal import containers as _containers from google.protobuf import descriptor as _descriptor diff --git a/test/gen/cel/expr/eval_pb2.py b/test/gen/cel/expr/eval_pb2.py index 6ee10b54..adba9f18 100644 --- a/test/gen/cel/expr/eval_pb2.py +++ b/test/gen/cel/expr/eval_pb2.py @@ -27,7 +27,7 @@ from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2 -from cel.expr import value_pb2 as cel_dot_expr_dot_value__pb2 +from ...cel.expr import value_pb2 as cel_dot_expr_dot_value__pb2 DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13\x63\x65l/expr/eval.proto\x12\x08\x63\x65l.expr\x1a\x19google/protobuf/any.proto\x1a\x14\x63\x65l/expr/value.proto\"\xa2\x01\n\tEvalState\x12+\n\x06values\x18\x01 \x03(\x0b\x32\x13.cel.expr.ExprValueR\x06values\x12\x34\n\x07results\x18\x03 \x03(\x0b\x32\x1a.cel.expr.EvalState.ResultR\x07results\x1a\x32\n\x06Result\x12\x12\n\x04\x65xpr\x18\x01 \x01(\x03R\x04\x65xpr\x12\x14\n\x05value\x18\x02 \x01(\x03R\x05value\"\x9a\x01\n\tExprValue\x12\'\n\x05value\x18\x01 \x01(\x0b\x32\x0f.cel.expr.ValueH\x00R\x05value\x12*\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x12.cel.expr.ErrorSetH\x00R\x05\x65rror\x12\x30\n\x07unknown\x18\x03 \x01(\x0b\x32\x14.cel.expr.UnknownSetH\x00R\x07unknownB\x06\n\x04kind\"4\n\x08\x45rrorSet\x12(\n\x06\x65rrors\x18\x01 \x03(\x0b\x32\x10.cel.expr.StatusR\x06\x65rrors\"f\n\x06Status\x12\x12\n\x04\x63ode\x18\x01 \x01(\x05R\x04\x63ode\x12\x18\n\x07message\x18\x02 \x01(\tR\x07message\x12.\n\x07\x64\x65tails\x18\x03 \x03(\x0b\x32\x14.google.protobuf.AnyR\x07\x64\x65tails\"\"\n\nUnknownSet\x12\x14\n\x05\x65xprs\x18\x01 \x03(\x03R\x05\x65xprsBk\n\x0c\x63om.cel.exprB\tEvalProtoP\x01Z\x0c\x63\x65l.dev/expr\xf8\x01\x01\xa2\x02\x03\x43\x45X\xaa\x02\x08\x43\x65l.Expr\xca\x02\x08\x43\x65l\\Expr\xe2\x02\x14\x43\x65l\\Expr\\GPBMetadata\xea\x02\tCel::Exprb\x06proto3') diff --git a/test/gen/cel/expr/eval_pb2.pyi b/test/gen/cel/expr/eval_pb2.pyi index 8e1a7636..5ec53fb0 100644 --- a/test/gen/cel/expr/eval_pb2.pyi +++ b/test/gen/cel/expr/eval_pb2.pyi @@ -13,7 +13,7 @@ # limitations under the License. from google.protobuf import any_pb2 as _any_pb2 -from cel.expr import value_pb2 as _value_pb2 +from ...cel.expr import value_pb2 as _value_pb2 from google.protobuf.internal import containers as _containers from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message diff --git a/test/gen/cel/expr/explain_pb2.py b/test/gen/cel/expr/explain_pb2.py index 99746bbd..5b9dac00 100644 --- a/test/gen/cel/expr/explain_pb2.py +++ b/test/gen/cel/expr/explain_pb2.py @@ -26,7 +26,7 @@ _sym_db = _symbol_database.Default() -from cel.expr import value_pb2 as cel_dot_expr_dot_value__pb2 +from ...cel.expr import value_pb2 as cel_dot_expr_dot_value__pb2 DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16\x63\x65l/expr/explain.proto\x12\x08\x63\x65l.expr\x1a\x14\x63\x65l/expr/value.proto\"\xae\x01\n\x07\x45xplain\x12\'\n\x06values\x18\x01 \x03(\x0b\x32\x0f.cel.expr.ValueR\x06values\x12\x39\n\nexpr_steps\x18\x02 \x03(\x0b\x32\x1a.cel.expr.Explain.ExprStepR\texprSteps\x1a;\n\x08\x45xprStep\x12\x0e\n\x02id\x18\x01 \x01(\x03R\x02id\x12\x1f\n\x0bvalue_index\x18\x02 \x01(\x05R\nvalueIndex:\x02\x18\x01\x42n\n\x0c\x63om.cel.exprB\x0c\x45xplainProtoP\x01Z\x0c\x63\x65l.dev/expr\xf8\x01\x01\xa2\x02\x03\x43\x45X\xaa\x02\x08\x43\x65l.Expr\xca\x02\x08\x43\x65l\\Expr\xe2\x02\x14\x43\x65l\\Expr\\GPBMetadata\xea\x02\tCel::Exprb\x06proto3') diff --git a/test/gen/cel/expr/explain_pb2.pyi b/test/gen/cel/expr/explain_pb2.pyi index be436191..51bd906f 100644 --- a/test/gen/cel/expr/explain_pb2.pyi +++ b/test/gen/cel/expr/explain_pb2.pyi @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from cel.expr import value_pb2 as _value_pb2 +from ...cel.expr import value_pb2 as _value_pb2 from google.protobuf.internal import containers as _containers from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message diff --git a/test/test_format.py b/test/test_format.py index 88c20eb0..6fd97476 100644 --- a/test/test_format.py +++ b/test/test_format.py @@ -14,6 +14,7 @@ from collections.abc import Iterable, MutableMapping from itertools import chain +from pathlib import Path from typing import Any import celpy @@ -28,7 +29,6 @@ from .gen.cel.expr.conformance.test import simple_pb2 # Version of the cel-spec that this implementation is conformant with. -# This should be kept in sync with the version in ../Makefile. CEL_SPEC_VERSION = "v0.25.1" skipped_tests = [ @@ -84,9 +84,10 @@ def get_eval_error_message(test: simple_pb2.SimpleTest) -> str | None: # The test data from the cel-spec conformance tests -cel_test_data = load_test_data(f"test/testdata/string_ext_{CEL_SPEC_VERSION}.textproto") +testdata_dir = Path(__file__).parent / "testdata" +cel_test_data = load_test_data(testdata_dir / f"string_ext_{CEL_SPEC_VERSION}.textproto") # Our supplemental tests of functionality not in the cel conformance file, but defined in the spec. -supplemental_test_data = load_test_data("test/testdata/string_ext_supplemental.textproto") +supplemental_test_data = load_test_data(testdata_dir / "string_ext_supplemental.textproto") # Combine the test data from both files into one sections = cel_test_data.section diff --git a/uv.lock b/uv.lock index 894d15dc..7504178d 100644 --- a/uv.lock +++ b/uv.lock @@ -49,6 +49,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/1e/f8/38812adc3f787c2c2e8ba56f524185ed379656c10b40347a32796ba61c08/cel_python-0.5.0-py3-none-any.whl", hash = "sha256:d0f85008b89655c2bb18d797d2fa3f96f2ed80f4a3b43b0e8138c6646581e5f6", size = 84950, upload-time = "2026-01-31T19:07:11.821Z" }, ] +[[package]] +name = "click" +version = "8.4.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/9b/98/518d8e5081007684232226f475082b30087d0f585e8457db087298259f49/click-8.4.1.tar.gz", hash = "sha256:918b5633eddf6b41c32d4f454bf0de810065c74e3f7dbf8ee5452f8be88d3e96", size = 353007, upload-time = "2026-05-22T04:08:37.769Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c7/0d/67e5b4109ea4a837e80daa87c2c696711955e40449a97e8926672534def2/click-8.4.1-py3-none-any.whl", hash = "sha256:482be17c6991b8c19c5429a1e995d9b0efdbb63172824c41f99965dc0ade8ec2", size = 116639, upload-time = "2026-05-22T04:08:35.26Z" }, +] + [[package]] name = "colorama" version = "0.4.6" @@ -70,6 +82,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/8a/0e/97c33bf5009bdbac74fd2beace167cab3f978feb69cc36f1ef79360d6c4e/exceptiongroup-1.3.1-py3-none-any.whl", hash = "sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598", size = 16740, upload-time = "2025-11-21T23:01:53.443Z" }, ] +[[package]] +name = "fix-protobuf-imports" +version = "0.1.7" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "click" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c7/c8/b5464411051fc876aac32323ceeafe3308ec619b6ed66a2dc36f759e1811/fix_protobuf_imports-0.1.7.tar.gz", hash = "sha256:19e21b909e13b034906414199fc32011e6d161ffbb900935eb4df7ef7fa84c87", size = 4240, upload-time = "2022-09-16T16:29:36.934Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c2/f8/58c189f06800aebe813bcc33a52ffc9c19260e2642b0ca0e39d69cf202c0/fix_protobuf_imports-0.1.7-py3-none-any.whl", hash = "sha256:d0363779783db5ebab586f4e34cddfd96ba8fbb5c39e7d04bcb743fc9a1222d0", size = 4582, upload-time = "2022-09-16T16:29:35.339Z" }, +] + [[package]] name = "google-re2" version = "1.1.20251105" @@ -180,6 +204,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/df/b2/87e62e8c3e2f4b32e5fe99e0b86d576da1312593b39f47d8ceef365e95ed/packaging-26.2-py3-none-any.whl", hash = "sha256:5fc45236b9446107ff2415ce77c807cee2862cb6fac22b8a73826d0693b0980e", size = 100195, upload-time = "2026-04-24T20:15:22.081Z" }, ] +[[package]] +name = "pastel" +version = "0.2.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/76/f1/4594f5e0fcddb6953e5b8fe00da8c317b8b41b547e2b3ae2da7512943c62/pastel-0.2.1.tar.gz", hash = "sha256:e6581ac04e973cac858828c6202c1e1e81fee1dc7de7683f3e1ffe0bfd8a573d", size = 7555, upload-time = "2020-09-16T19:21:12.43Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/aa/18/a8444036c6dd65ba3624c63b734d3ba95ba63ace513078e1580590075d21/pastel-0.2.1-py2.py3-none-any.whl", hash = "sha256:4349225fcdf6c2bb34d483e523475de5bb04a5c10ef711263452cb37d7dd4364", size = 5955, upload-time = "2020-09-16T19:21:11.409Z" }, +] + [[package]] name = "pendulum" version = "3.2.0" @@ -258,6 +291,20 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" }, ] +[[package]] +name = "poethepoet" +version = "0.46.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pastel" }, + { name = "pyyaml" }, + { name = "tomli", marker = "python_full_version < '3.11'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/3b/f5/d501fcb67e450fd3fae9db06050420c0c6043758cfa8c30ba40278211265/poethepoet-0.46.0.tar.gz", hash = "sha256:daf8469031879ef59ef0b34fdba83574d65e41eb9186e20cd0f7c89ce479b030", size = 117276, upload-time = "2026-05-15T15:52:02.548Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/af/01/a9d6ea30351919298d3dc237172ae6a60ce0224ecaaee289b671ab979c13/poethepoet-0.46.0-py3-none-any.whl", hash = "sha256:dc6d770a14792d124abac9066c5a707876027d1878ac9ca26cf57e9b2a96dc89", size = 150581, upload-time = "2026-05-15T15:52:01.118Z" }, +] + [[package]] name = "protobuf" version = "7.35.0" @@ -285,7 +332,9 @@ dependencies = [ [package.dev-dependencies] dev = [ { name = "buf-bin" }, + { name = "fix-protobuf-imports" }, { name = "google-re2-stubs" }, + { name = "poethepoet" }, { name = "protovalidate-proto" }, { name = "pytest" }, { name = "ruff" }, @@ -308,7 +357,9 @@ requires-dist = [ [package.metadata.requires-dev] dev = [ { name = "buf-bin", specifier = "==1.69.0" }, + { name = "fix-protobuf-imports", specifier = "==0.1.7" }, { name = "google-re2-stubs", specifier = "==0.1.1" }, + { name = "poethepoet", specifier = "==0.46.0" }, { name = "protovalidate-proto", editable = "packages/protovalidate-proto" }, { name = "pytest", specifier = "==9.0.3" }, { name = "ruff", specifier = "==0.15.14" },