diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml new file mode 100644 index 00000000..18b5e9c2 --- /dev/null +++ b/.github/workflows/python-tests.yml @@ -0,0 +1,42 @@ +name: python-tests + +on: + pull_request: + branches: + - main + push: + branches: + - main + +permissions: + contents: read + +jobs: + test: + name: Python (${{ matrix.python-version }}) + runs-on: ubuntu-latest + timeout-minutes: 10 + strategy: + fail-fast: false + matrix: + python-version: ["3.13", "3.14"] + + steps: + - name: Check out code + uses: actions/checkout@v7 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v6 + with: + python-version: ${{ matrix.python-version }} + + - name: Install with test dependencies + run: | + pip install -e python + pip install werkzeug pytest + env: + VERSION: v0.0.0 + + - name: Run Python client tests + run: | + python -m pytest python/metalstack/client/tests/ -v diff --git a/proto/buf.gen.yaml b/proto/buf.gen.yaml index cea84a5a..16d17d24 100644 --- a/proto/buf.gen.yaml +++ b/proto/buf.gen.yaml @@ -22,6 +22,7 @@ plugins: # python - remote: buf.build/protocolbuffers/python:v35.1 out: ../python + include_imports: True - remote: buf.build/protocolbuffers/pyi:v35.1 out: ../python - remote: buf.build/connectrpc/python:v0.10.1 diff --git a/python/buf/validate/validate_pb2.py b/python/buf/validate/validate_pb2.py new file mode 100644 index 00000000..fd490a5a --- /dev/null +++ b/python/buf/validate/validate_pb2.py @@ -0,0 +1,469 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: buf/validate/validate.proto +# Protobuf Python Version: 7.35.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 7, + 35, + 1, + '', + 'buf/validate/validate.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2 +from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 +from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 +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') + +_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['_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 + _globals['_FLOATRULES'].fields_by_name['lt']._serialized_options = b'\302H\206\001\n\203\001\n\010float.lt\032w!has(rules.gte) && !has(rules.gt) && (this.isNan() || this >= rules.lt)? \'must be less than %s\'.format([rules.lt]) : \'\'' + _globals['_FLOATRULES'].fields_by_name['lte']._loaded_options = None + _globals['_FLOATRULES'].fields_by_name['lte']._serialized_options = b'\302H\225\001\n\222\001\n\tfloat.lte\032\204\001!has(rules.gte) && !has(rules.gt) && (this.isNan() || this > rules.lte)? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'' + _globals['_FLOATRULES'].fields_by_name['gt']._loaded_options = None + _globals['_FLOATRULES'].fields_by_name['gt']._serialized_options = b'\302H\275\007\n\206\001\n\010float.gt\032z!has(rules.lt) && !has(rules.lte) && (this.isNan() || this <= rules.gt)? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\275\001\n\013float.gt_lt\032\255\001has(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\307\001\n\025float.gt_lt_exclusive\032\255\001has(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\315\001\n\014float.gt_lte\032\274\001has(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\327\001\n\026float.gt_lte_exclusive\032\274\001has(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]) : \'\'' + _globals['_FLOATRULES'].fields_by_name['gte']._loaded_options = None + _globals['_FLOATRULES'].fields_by_name['gte']._serialized_options = b'\302H\210\010\n\225\001\n\tfloat.gte\032\207\001!has(rules.lt) && !has(rules.lte) && (this.isNan() || this < rules.gte)? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\314\001\n\014float.gte_lt\032\273\001has(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\326\001\n\026float.gte_lt_exclusive\032\273\001has(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\334\001\n\rfloat.gte_lte\032\312\001has(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\346\001\n\027float.gte_lte_exclusive\032\312\001has(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]) : \'\'' + _globals['_FLOATRULES'].fields_by_name['in']._loaded_options = None + _globals['_FLOATRULES'].fields_by_name['in']._serialized_options = b'\302Hj\nh\n\010float.in\032\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'' + _globals['_FLOATRULES'].fields_by_name['not_in']._loaded_options = None + _globals['_FLOATRULES'].fields_by_name['not_in']._serialized_options = b'\302H]\n[\n\014float.not_in\032Kthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'' + _globals['_FLOATRULES'].fields_by_name['finite']._loaded_options = None + _globals['_FLOATRULES'].fields_by_name['finite']._serialized_options = b'\302H\\\nZ\n\014float.finite\032Jrules.finite ? (this.isNan() || this.isInf() ? \'must be finite\' : \'\') : \'\'' + _globals['_FLOATRULES'].fields_by_name['example']._loaded_options = None + _globals['_FLOATRULES'].fields_by_name['example']._serialized_options = b'\302H\027\n\025\n\rfloat.example\032\004true' + _globals['_DOUBLERULES'].fields_by_name['const']._loaded_options = None + _globals['_DOUBLERULES'].fields_by_name['const']._serialized_options = b'\302Hl\nj\n\014double.const\032Zthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'' + _globals['_DOUBLERULES'].fields_by_name['lt']._loaded_options = None + _globals['_DOUBLERULES'].fields_by_name['lt']._serialized_options = b'\302H\207\001\n\204\001\n\tdouble.lt\032w!has(rules.gte) && !has(rules.gt) && (this.isNan() || this >= rules.lt)? \'must be less than %s\'.format([rules.lt]) : \'\'' + _globals['_DOUBLERULES'].fields_by_name['lte']._loaded_options = None + _globals['_DOUBLERULES'].fields_by_name['lte']._serialized_options = b'\302H\226\001\n\223\001\n\ndouble.lte\032\204\001!has(rules.gte) && !has(rules.gt) && (this.isNan() || this > rules.lte)? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'' + _globals['_DOUBLERULES'].fields_by_name['gt']._loaded_options = None + _globals['_DOUBLERULES'].fields_by_name['gt']._serialized_options = b'\302H\302\007\n\207\001\n\tdouble.gt\032z!has(rules.lt) && !has(rules.lte) && (this.isNan() || this <= rules.gt)? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\276\001\n\014double.gt_lt\032\255\001has(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\310\001\n\026double.gt_lt_exclusive\032\255\001has(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\316\001\n\rdouble.gt_lte\032\274\001has(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\330\001\n\027double.gt_lte_exclusive\032\274\001has(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]) : \'\'' + _globals['_DOUBLERULES'].fields_by_name['gte']._loaded_options = None + _globals['_DOUBLERULES'].fields_by_name['gte']._serialized_options = b'\302H\215\010\n\226\001\n\ndouble.gte\032\207\001!has(rules.lt) && !has(rules.lte) && (this.isNan() || this < rules.gte)? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\315\001\n\rdouble.gte_lt\032\273\001has(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\327\001\n\027double.gte_lt_exclusive\032\273\001has(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\335\001\n\016double.gte_lte\032\312\001has(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\347\001\n\030double.gte_lte_exclusive\032\312\001has(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]) : \'\'' + _globals['_DOUBLERULES'].fields_by_name['in']._loaded_options = None + _globals['_DOUBLERULES'].fields_by_name['in']._serialized_options = b'\302Hk\ni\n\tdouble.in\032\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'' + _globals['_DOUBLERULES'].fields_by_name['not_in']._loaded_options = None + _globals['_DOUBLERULES'].fields_by_name['not_in']._serialized_options = b'\302H^\n\\\n\rdouble.not_in\032Kthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'' + _globals['_DOUBLERULES'].fields_by_name['finite']._loaded_options = None + _globals['_DOUBLERULES'].fields_by_name['finite']._serialized_options = b'\302H]\n[\n\rdouble.finite\032Jrules.finite ? (this.isNan() || this.isInf() ? \'must be finite\' : \'\') : \'\'' + _globals['_DOUBLERULES'].fields_by_name['example']._loaded_options = None + _globals['_DOUBLERULES'].fields_by_name['example']._serialized_options = b'\302H\030\n\026\n\016double.example\032\004true' + _globals['_INT32RULES'].fields_by_name['const']._loaded_options = None + _globals['_INT32RULES'].fields_by_name['const']._serialized_options = b'\302Hk\ni\n\013int32.const\032Zthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'' + _globals['_INT32RULES'].fields_by_name['lt']._loaded_options = None + _globals['_INT32RULES'].fields_by_name['lt']._serialized_options = b'\302Hs\nq\n\010int32.lt\032e!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'' + _globals['_INT32RULES'].fields_by_name['lte']._loaded_options = None + _globals['_INT32RULES'].fields_by_name['lte']._serialized_options = b'\302H\201\001\n\177\n\tint32.lte\032r!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'' + _globals['_INT32RULES'].fields_by_name['gt']._loaded_options = None + _globals['_INT32RULES'].fields_by_name['gt']._serialized_options = b'\302H\346\006\nt\n\010int32.gt\032h!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\255\001\n\013int32.gt_lt\032\235\001has(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\265\001\n\025int32.gt_lt_exclusive\032\233\001has(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\275\001\n\014int32.gt_lte\032\254\001has(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\305\001\n\026int32.gt_lte_exclusive\032\252\001has(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]) : \'\'' + _globals['_INT32RULES'].fields_by_name['gte']._loaded_options = None + _globals['_INT32RULES'].fields_by_name['gte']._serialized_options = b'\302H\261\007\n\202\001\n\tint32.gte\032u!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\274\001\n\014int32.gte_lt\032\253\001has(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\304\001\n\026int32.gte_lt_exclusive\032\251\001has(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\314\001\n\rint32.gte_lte\032\272\001has(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\324\001\n\027int32.gte_lte_exclusive\032\270\001has(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]) : \'\'' + _globals['_INT32RULES'].fields_by_name['in']._loaded_options = None + _globals['_INT32RULES'].fields_by_name['in']._serialized_options = b'\302Hj\nh\n\010int32.in\032\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'' + _globals['_INT32RULES'].fields_by_name['not_in']._loaded_options = None + _globals['_INT32RULES'].fields_by_name['not_in']._serialized_options = b'\302H]\n[\n\014int32.not_in\032Kthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'' + _globals['_INT32RULES'].fields_by_name['example']._loaded_options = None + _globals['_INT32RULES'].fields_by_name['example']._serialized_options = b'\302H\027\n\025\n\rint32.example\032\004true' + _globals['_INT64RULES'].fields_by_name['const']._loaded_options = None + _globals['_INT64RULES'].fields_by_name['const']._serialized_options = b'\302Hk\ni\n\013int64.const\032Zthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'' + _globals['_INT64RULES'].fields_by_name['lt']._loaded_options = None + _globals['_INT64RULES'].fields_by_name['lt']._serialized_options = b'\302Hs\nq\n\010int64.lt\032e!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'' + _globals['_INT64RULES'].fields_by_name['lte']._loaded_options = None + _globals['_INT64RULES'].fields_by_name['lte']._serialized_options = b'\302H\201\001\n\177\n\tint64.lte\032r!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'' + _globals['_INT64RULES'].fields_by_name['gt']._loaded_options = None + _globals['_INT64RULES'].fields_by_name['gt']._serialized_options = b'\302H\346\006\nt\n\010int64.gt\032h!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\255\001\n\013int64.gt_lt\032\235\001has(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\265\001\n\025int64.gt_lt_exclusive\032\233\001has(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\275\001\n\014int64.gt_lte\032\254\001has(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\305\001\n\026int64.gt_lte_exclusive\032\252\001has(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]) : \'\'' + _globals['_INT64RULES'].fields_by_name['gte']._loaded_options = None + _globals['_INT64RULES'].fields_by_name['gte']._serialized_options = b'\302H\261\007\n\202\001\n\tint64.gte\032u!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\274\001\n\014int64.gte_lt\032\253\001has(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\304\001\n\026int64.gte_lt_exclusive\032\251\001has(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\314\001\n\rint64.gte_lte\032\272\001has(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\324\001\n\027int64.gte_lte_exclusive\032\270\001has(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]) : \'\'' + _globals['_INT64RULES'].fields_by_name['in']._loaded_options = None + _globals['_INT64RULES'].fields_by_name['in']._serialized_options = b'\302Hj\nh\n\010int64.in\032\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'' + _globals['_INT64RULES'].fields_by_name['not_in']._loaded_options = None + _globals['_INT64RULES'].fields_by_name['not_in']._serialized_options = b'\302H]\n[\n\014int64.not_in\032Kthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'' + _globals['_INT64RULES'].fields_by_name['example']._loaded_options = None + _globals['_INT64RULES'].fields_by_name['example']._serialized_options = b'\302H\027\n\025\n\rint64.example\032\004true' + _globals['_UINT32RULES'].fields_by_name['const']._loaded_options = None + _globals['_UINT32RULES'].fields_by_name['const']._serialized_options = b'\302Hl\nj\n\014uint32.const\032Zthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'' + _globals['_UINT32RULES'].fields_by_name['lt']._loaded_options = None + _globals['_UINT32RULES'].fields_by_name['lt']._serialized_options = b'\302Ht\nr\n\tuint32.lt\032e!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'' + _globals['_UINT32RULES'].fields_by_name['lte']._loaded_options = None + _globals['_UINT32RULES'].fields_by_name['lte']._serialized_options = b'\302H\203\001\n\200\001\n\nuint32.lte\032r!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'' + _globals['_UINT32RULES'].fields_by_name['gt']._loaded_options = None + _globals['_UINT32RULES'].fields_by_name['gt']._serialized_options = b'\302H\353\006\nu\n\tuint32.gt\032h!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\256\001\n\014uint32.gt_lt\032\235\001has(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\266\001\n\026uint32.gt_lt_exclusive\032\233\001has(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\276\001\n\ruint32.gt_lte\032\254\001has(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\306\001\n\027uint32.gt_lte_exclusive\032\252\001has(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]) : \'\'' + _globals['_UINT32RULES'].fields_by_name['gte']._loaded_options = None + _globals['_UINT32RULES'].fields_by_name['gte']._serialized_options = b'\302H\266\007\n\203\001\n\nuint32.gte\032u!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\275\001\n\ruint32.gte_lt\032\253\001has(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\305\001\n\027uint32.gte_lt_exclusive\032\251\001has(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\315\001\n\016uint32.gte_lte\032\272\001has(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\325\001\n\030uint32.gte_lte_exclusive\032\270\001has(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]) : \'\'' + _globals['_UINT32RULES'].fields_by_name['in']._loaded_options = None + _globals['_UINT32RULES'].fields_by_name['in']._serialized_options = b'\302Hk\ni\n\tuint32.in\032\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'' + _globals['_UINT32RULES'].fields_by_name['not_in']._loaded_options = None + _globals['_UINT32RULES'].fields_by_name['not_in']._serialized_options = b'\302H^\n\\\n\ruint32.not_in\032Kthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'' + _globals['_UINT32RULES'].fields_by_name['example']._loaded_options = None + _globals['_UINT32RULES'].fields_by_name['example']._serialized_options = b'\302H\030\n\026\n\016uint32.example\032\004true' + _globals['_UINT64RULES'].fields_by_name['const']._loaded_options = None + _globals['_UINT64RULES'].fields_by_name['const']._serialized_options = b'\302Hl\nj\n\014uint64.const\032Zthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'' + _globals['_UINT64RULES'].fields_by_name['lt']._loaded_options = None + _globals['_UINT64RULES'].fields_by_name['lt']._serialized_options = b'\302Ht\nr\n\tuint64.lt\032e!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'' + _globals['_UINT64RULES'].fields_by_name['lte']._loaded_options = None + _globals['_UINT64RULES'].fields_by_name['lte']._serialized_options = b'\302H\203\001\n\200\001\n\nuint64.lte\032r!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'' + _globals['_UINT64RULES'].fields_by_name['gt']._loaded_options = None + _globals['_UINT64RULES'].fields_by_name['gt']._serialized_options = b'\302H\353\006\nu\n\tuint64.gt\032h!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\256\001\n\014uint64.gt_lt\032\235\001has(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\266\001\n\026uint64.gt_lt_exclusive\032\233\001has(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\276\001\n\ruint64.gt_lte\032\254\001has(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\306\001\n\027uint64.gt_lte_exclusive\032\252\001has(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]) : \'\'' + _globals['_UINT64RULES'].fields_by_name['gte']._loaded_options = None + _globals['_UINT64RULES'].fields_by_name['gte']._serialized_options = b'\302H\266\007\n\203\001\n\nuint64.gte\032u!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\275\001\n\ruint64.gte_lt\032\253\001has(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\305\001\n\027uint64.gte_lt_exclusive\032\251\001has(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\315\001\n\016uint64.gte_lte\032\272\001has(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\325\001\n\030uint64.gte_lte_exclusive\032\270\001has(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]) : \'\'' + _globals['_UINT64RULES'].fields_by_name['in']._loaded_options = None + _globals['_UINT64RULES'].fields_by_name['in']._serialized_options = b'\302Hk\ni\n\tuint64.in\032\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'' + _globals['_UINT64RULES'].fields_by_name['not_in']._loaded_options = None + _globals['_UINT64RULES'].fields_by_name['not_in']._serialized_options = b'\302H^\n\\\n\ruint64.not_in\032Kthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'' + _globals['_UINT64RULES'].fields_by_name['example']._loaded_options = None + _globals['_UINT64RULES'].fields_by_name['example']._serialized_options = b'\302H\030\n\026\n\016uint64.example\032\004true' + _globals['_SINT32RULES'].fields_by_name['const']._loaded_options = None + _globals['_SINT32RULES'].fields_by_name['const']._serialized_options = b'\302Hl\nj\n\014sint32.const\032Zthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'' + _globals['_SINT32RULES'].fields_by_name['lt']._loaded_options = None + _globals['_SINT32RULES'].fields_by_name['lt']._serialized_options = b'\302Ht\nr\n\tsint32.lt\032e!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'' + _globals['_SINT32RULES'].fields_by_name['lte']._loaded_options = None + _globals['_SINT32RULES'].fields_by_name['lte']._serialized_options = b'\302H\203\001\n\200\001\n\nsint32.lte\032r!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'' + _globals['_SINT32RULES'].fields_by_name['gt']._loaded_options = None + _globals['_SINT32RULES'].fields_by_name['gt']._serialized_options = b'\302H\353\006\nu\n\tsint32.gt\032h!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\256\001\n\014sint32.gt_lt\032\235\001has(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\266\001\n\026sint32.gt_lt_exclusive\032\233\001has(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\276\001\n\rsint32.gt_lte\032\254\001has(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\306\001\n\027sint32.gt_lte_exclusive\032\252\001has(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]) : \'\'' + _globals['_SINT32RULES'].fields_by_name['gte']._loaded_options = None + _globals['_SINT32RULES'].fields_by_name['gte']._serialized_options = b'\302H\266\007\n\203\001\n\nsint32.gte\032u!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\275\001\n\rsint32.gte_lt\032\253\001has(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\305\001\n\027sint32.gte_lt_exclusive\032\251\001has(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\315\001\n\016sint32.gte_lte\032\272\001has(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\325\001\n\030sint32.gte_lte_exclusive\032\270\001has(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]) : \'\'' + _globals['_SINT32RULES'].fields_by_name['in']._loaded_options = None + _globals['_SINT32RULES'].fields_by_name['in']._serialized_options = b'\302Hk\ni\n\tsint32.in\032\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'' + _globals['_SINT32RULES'].fields_by_name['not_in']._loaded_options = None + _globals['_SINT32RULES'].fields_by_name['not_in']._serialized_options = b'\302H^\n\\\n\rsint32.not_in\032Kthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'' + _globals['_SINT32RULES'].fields_by_name['example']._loaded_options = None + _globals['_SINT32RULES'].fields_by_name['example']._serialized_options = b'\302H\030\n\026\n\016sint32.example\032\004true' + _globals['_SINT64RULES'].fields_by_name['const']._loaded_options = None + _globals['_SINT64RULES'].fields_by_name['const']._serialized_options = b'\302Hl\nj\n\014sint64.const\032Zthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'' + _globals['_SINT64RULES'].fields_by_name['lt']._loaded_options = None + _globals['_SINT64RULES'].fields_by_name['lt']._serialized_options = b'\302Ht\nr\n\tsint64.lt\032e!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'' + _globals['_SINT64RULES'].fields_by_name['lte']._loaded_options = None + _globals['_SINT64RULES'].fields_by_name['lte']._serialized_options = b'\302H\203\001\n\200\001\n\nsint64.lte\032r!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'' + _globals['_SINT64RULES'].fields_by_name['gt']._loaded_options = None + _globals['_SINT64RULES'].fields_by_name['gt']._serialized_options = b'\302H\353\006\nu\n\tsint64.gt\032h!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\256\001\n\014sint64.gt_lt\032\235\001has(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\266\001\n\026sint64.gt_lt_exclusive\032\233\001has(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\276\001\n\rsint64.gt_lte\032\254\001has(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\306\001\n\027sint64.gt_lte_exclusive\032\252\001has(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]) : \'\'' + _globals['_SINT64RULES'].fields_by_name['gte']._loaded_options = None + _globals['_SINT64RULES'].fields_by_name['gte']._serialized_options = b'\302H\266\007\n\203\001\n\nsint64.gte\032u!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\275\001\n\rsint64.gte_lt\032\253\001has(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\305\001\n\027sint64.gte_lt_exclusive\032\251\001has(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\315\001\n\016sint64.gte_lte\032\272\001has(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\325\001\n\030sint64.gte_lte_exclusive\032\270\001has(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]) : \'\'' + _globals['_SINT64RULES'].fields_by_name['in']._loaded_options = None + _globals['_SINT64RULES'].fields_by_name['in']._serialized_options = b'\302Hk\ni\n\tsint64.in\032\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'' + _globals['_SINT64RULES'].fields_by_name['not_in']._loaded_options = None + _globals['_SINT64RULES'].fields_by_name['not_in']._serialized_options = b'\302H^\n\\\n\rsint64.not_in\032Kthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'' + _globals['_SINT64RULES'].fields_by_name['example']._loaded_options = None + _globals['_SINT64RULES'].fields_by_name['example']._serialized_options = b'\302H\030\n\026\n\016sint64.example\032\004true' + _globals['_FIXED32RULES'].fields_by_name['const']._loaded_options = None + _globals['_FIXED32RULES'].fields_by_name['const']._serialized_options = b'\302Hm\nk\n\rfixed32.const\032Zthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'' + _globals['_FIXED32RULES'].fields_by_name['lt']._loaded_options = None + _globals['_FIXED32RULES'].fields_by_name['lt']._serialized_options = b'\302Hu\ns\n\nfixed32.lt\032e!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'' + _globals['_FIXED32RULES'].fields_by_name['lte']._loaded_options = None + _globals['_FIXED32RULES'].fields_by_name['lte']._serialized_options = b'\302H\204\001\n\201\001\n\013fixed32.lte\032r!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'' + _globals['_FIXED32RULES'].fields_by_name['gt']._loaded_options = None + _globals['_FIXED32RULES'].fields_by_name['gt']._serialized_options = b'\302H\360\006\nv\n\nfixed32.gt\032h!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\257\001\n\rfixed32.gt_lt\032\235\001has(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\267\001\n\027fixed32.gt_lt_exclusive\032\233\001has(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\277\001\n\016fixed32.gt_lte\032\254\001has(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\307\001\n\030fixed32.gt_lte_exclusive\032\252\001has(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]) : \'\'' + _globals['_FIXED32RULES'].fields_by_name['gte']._loaded_options = None + _globals['_FIXED32RULES'].fields_by_name['gte']._serialized_options = b'\302H\273\007\n\204\001\n\013fixed32.gte\032u!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\276\001\n\016fixed32.gte_lt\032\253\001has(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\306\001\n\030fixed32.gte_lt_exclusive\032\251\001has(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\316\001\n\017fixed32.gte_lte\032\272\001has(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\326\001\n\031fixed32.gte_lte_exclusive\032\270\001has(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]) : \'\'' + _globals['_FIXED32RULES'].fields_by_name['in']._loaded_options = None + _globals['_FIXED32RULES'].fields_by_name['in']._serialized_options = b'\302Hl\nj\n\nfixed32.in\032\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'' + _globals['_FIXED32RULES'].fields_by_name['not_in']._loaded_options = None + _globals['_FIXED32RULES'].fields_by_name['not_in']._serialized_options = b'\302H_\n]\n\016fixed32.not_in\032Kthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'' + _globals['_FIXED32RULES'].fields_by_name['example']._loaded_options = None + _globals['_FIXED32RULES'].fields_by_name['example']._serialized_options = b'\302H\031\n\027\n\017fixed32.example\032\004true' + _globals['_FIXED64RULES'].fields_by_name['const']._loaded_options = None + _globals['_FIXED64RULES'].fields_by_name['const']._serialized_options = b'\302Hm\nk\n\rfixed64.const\032Zthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'' + _globals['_FIXED64RULES'].fields_by_name['lt']._loaded_options = None + _globals['_FIXED64RULES'].fields_by_name['lt']._serialized_options = b'\302Hu\ns\n\nfixed64.lt\032e!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'' + _globals['_FIXED64RULES'].fields_by_name['lte']._loaded_options = None + _globals['_FIXED64RULES'].fields_by_name['lte']._serialized_options = b'\302H\204\001\n\201\001\n\013fixed64.lte\032r!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'' + _globals['_FIXED64RULES'].fields_by_name['gt']._loaded_options = None + _globals['_FIXED64RULES'].fields_by_name['gt']._serialized_options = b'\302H\360\006\nv\n\nfixed64.gt\032h!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\257\001\n\rfixed64.gt_lt\032\235\001has(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\267\001\n\027fixed64.gt_lt_exclusive\032\233\001has(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\277\001\n\016fixed64.gt_lte\032\254\001has(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\307\001\n\030fixed64.gt_lte_exclusive\032\252\001has(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]) : \'\'' + _globals['_FIXED64RULES'].fields_by_name['gte']._loaded_options = None + _globals['_FIXED64RULES'].fields_by_name['gte']._serialized_options = b'\302H\273\007\n\204\001\n\013fixed64.gte\032u!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\276\001\n\016fixed64.gte_lt\032\253\001has(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\306\001\n\030fixed64.gte_lt_exclusive\032\251\001has(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\316\001\n\017fixed64.gte_lte\032\272\001has(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\326\001\n\031fixed64.gte_lte_exclusive\032\270\001has(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]) : \'\'' + _globals['_FIXED64RULES'].fields_by_name['in']._loaded_options = None + _globals['_FIXED64RULES'].fields_by_name['in']._serialized_options = b'\302Hl\nj\n\nfixed64.in\032\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'' + _globals['_FIXED64RULES'].fields_by_name['not_in']._loaded_options = None + _globals['_FIXED64RULES'].fields_by_name['not_in']._serialized_options = b'\302H_\n]\n\016fixed64.not_in\032Kthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'' + _globals['_FIXED64RULES'].fields_by_name['example']._loaded_options = None + _globals['_FIXED64RULES'].fields_by_name['example']._serialized_options = b'\302H\031\n\027\n\017fixed64.example\032\004true' + _globals['_SFIXED32RULES'].fields_by_name['const']._loaded_options = None + _globals['_SFIXED32RULES'].fields_by_name['const']._serialized_options = b'\302Hn\nl\n\016sfixed32.const\032Zthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'' + _globals['_SFIXED32RULES'].fields_by_name['lt']._loaded_options = None + _globals['_SFIXED32RULES'].fields_by_name['lt']._serialized_options = b'\302Hv\nt\n\013sfixed32.lt\032e!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'' + _globals['_SFIXED32RULES'].fields_by_name['lte']._loaded_options = None + _globals['_SFIXED32RULES'].fields_by_name['lte']._serialized_options = b'\302H\205\001\n\202\001\n\014sfixed32.lte\032r!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'' + _globals['_SFIXED32RULES'].fields_by_name['gt']._loaded_options = None + _globals['_SFIXED32RULES'].fields_by_name['gt']._serialized_options = b'\302H\365\006\nw\n\013sfixed32.gt\032h!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\260\001\n\016sfixed32.gt_lt\032\235\001has(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\270\001\n\030sfixed32.gt_lt_exclusive\032\233\001has(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\300\001\n\017sfixed32.gt_lte\032\254\001has(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\310\001\n\031sfixed32.gt_lte_exclusive\032\252\001has(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]) : \'\'' + _globals['_SFIXED32RULES'].fields_by_name['gte']._loaded_options = None + _globals['_SFIXED32RULES'].fields_by_name['gte']._serialized_options = b'\302H\300\007\n\205\001\n\014sfixed32.gte\032u!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\277\001\n\017sfixed32.gte_lt\032\253\001has(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\307\001\n\031sfixed32.gte_lt_exclusive\032\251\001has(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\317\001\n\020sfixed32.gte_lte\032\272\001has(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\327\001\n\032sfixed32.gte_lte_exclusive\032\270\001has(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]) : \'\'' + _globals['_SFIXED32RULES'].fields_by_name['in']._loaded_options = None + _globals['_SFIXED32RULES'].fields_by_name['in']._serialized_options = b'\302Hm\nk\n\013sfixed32.in\032\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'' + _globals['_SFIXED32RULES'].fields_by_name['not_in']._loaded_options = None + _globals['_SFIXED32RULES'].fields_by_name['not_in']._serialized_options = b'\302H`\n^\n\017sfixed32.not_in\032Kthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'' + _globals['_SFIXED32RULES'].fields_by_name['example']._loaded_options = None + _globals['_SFIXED32RULES'].fields_by_name['example']._serialized_options = b'\302H\032\n\030\n\020sfixed32.example\032\004true' + _globals['_SFIXED64RULES'].fields_by_name['const']._loaded_options = None + _globals['_SFIXED64RULES'].fields_by_name['const']._serialized_options = b'\302Hn\nl\n\016sfixed64.const\032Zthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'' + _globals['_SFIXED64RULES'].fields_by_name['lt']._loaded_options = None + _globals['_SFIXED64RULES'].fields_by_name['lt']._serialized_options = b'\302Hv\nt\n\013sfixed64.lt\032e!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'' + _globals['_SFIXED64RULES'].fields_by_name['lte']._loaded_options = None + _globals['_SFIXED64RULES'].fields_by_name['lte']._serialized_options = b'\302H\205\001\n\202\001\n\014sfixed64.lte\032r!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'' + _globals['_SFIXED64RULES'].fields_by_name['gt']._loaded_options = None + _globals['_SFIXED64RULES'].fields_by_name['gt']._serialized_options = b'\302H\365\006\nw\n\013sfixed64.gt\032h!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\260\001\n\016sfixed64.gt_lt\032\235\001has(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\270\001\n\030sfixed64.gt_lt_exclusive\032\233\001has(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\300\001\n\017sfixed64.gt_lte\032\254\001has(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\310\001\n\031sfixed64.gt_lte_exclusive\032\252\001has(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]) : \'\'' + _globals['_SFIXED64RULES'].fields_by_name['gte']._loaded_options = None + _globals['_SFIXED64RULES'].fields_by_name['gte']._serialized_options = b'\302H\300\007\n\205\001\n\014sfixed64.gte\032u!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\277\001\n\017sfixed64.gte_lt\032\253\001has(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\307\001\n\031sfixed64.gte_lt_exclusive\032\251\001has(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\317\001\n\020sfixed64.gte_lte\032\272\001has(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\327\001\n\032sfixed64.gte_lte_exclusive\032\270\001has(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]) : \'\'' + _globals['_SFIXED64RULES'].fields_by_name['in']._loaded_options = None + _globals['_SFIXED64RULES'].fields_by_name['in']._serialized_options = b'\302Hm\nk\n\013sfixed64.in\032\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'' + _globals['_SFIXED64RULES'].fields_by_name['not_in']._loaded_options = None + _globals['_SFIXED64RULES'].fields_by_name['not_in']._serialized_options = b'\302H`\n^\n\017sfixed64.not_in\032Kthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'' + _globals['_SFIXED64RULES'].fields_by_name['example']._loaded_options = None + _globals['_SFIXED64RULES'].fields_by_name['example']._serialized_options = b'\302H\032\n\030\n\020sfixed64.example\032\004true' + _globals['_BOOLRULES'].fields_by_name['const']._loaded_options = None + _globals['_BOOLRULES'].fields_by_name['const']._serialized_options = b'\302Hj\nh\n\nbool.const\032Zthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'' + _globals['_BOOLRULES'].fields_by_name['example']._loaded_options = None + _globals['_BOOLRULES'].fields_by_name['example']._serialized_options = b'\302H\026\n\024\n\014bool.example\032\004true' + _globals['_STRINGRULES'].fields_by_name['const']._loaded_options = None + _globals['_STRINGRULES'].fields_by_name['const']._serialized_options = b'\302Hn\nl\n\014string.const\032\\this != getField(rules, \'const\') ? \'must equal `%s`\'.format([getField(rules, \'const\')]) : \'\'' + _globals['_STRINGRULES'].fields_by_name['len']._loaded_options = None + _globals['_STRINGRULES'].fields_by_name['len']._serialized_options = b'\302Ha\n_\n\nstring.len\032Quint(this.size()) != rules.len ? \'must be %s characters\'.format([rules.len]) : \'\'' + _globals['_STRINGRULES'].fields_by_name['min_len']._loaded_options = None + _globals['_STRINGRULES'].fields_by_name['min_len']._serialized_options = b'\302Hu\ns\n\016string.min_len\032auint(this.size()) < rules.min_len ? \'must be at least %s characters\'.format([rules.min_len]) : \'\'' + _globals['_STRINGRULES'].fields_by_name['max_len']._loaded_options = None + _globals['_STRINGRULES'].fields_by_name['max_len']._serialized_options = b'\302Ht\nr\n\016string.max_len\032`uint(this.size()) > rules.max_len ? \'must be at most %s characters\'.format([rules.max_len]) : \'\'' + _globals['_STRINGRULES'].fields_by_name['len_bytes']._loaded_options = None + _globals['_STRINGRULES'].fields_by_name['len_bytes']._serialized_options = b'\302Hu\ns\n\020string.len_bytes\032_uint(bytes(this).size()) != rules.len_bytes ? \'must be %s bytes\'.format([rules.len_bytes]) : \'\'' + _globals['_STRINGRULES'].fields_by_name['min_bytes']._loaded_options = None + _globals['_STRINGRULES'].fields_by_name['min_bytes']._serialized_options = b'\302H}\n{\n\020string.min_bytes\032guint(bytes(this).size()) < rules.min_bytes ? \'must be at least %s bytes\'.format([rules.min_bytes]) : \'\'' + _globals['_STRINGRULES'].fields_by_name['max_bytes']._loaded_options = None + _globals['_STRINGRULES'].fields_by_name['max_bytes']._serialized_options = b'\302H|\nz\n\020string.max_bytes\032fuint(bytes(this).size()) > rules.max_bytes ? \'must be at most %s bytes\'.format([rules.max_bytes]) : \'\'' + _globals['_STRINGRULES'].fields_by_name['pattern']._loaded_options = None + _globals['_STRINGRULES'].fields_by_name['pattern']._serialized_options = b'\302Hs\nq\n\016string.pattern\032_!this.matches(rules.pattern) ? \'does not match regex pattern `%s`\'.format([rules.pattern]) : \'\'' + _globals['_STRINGRULES'].fields_by_name['prefix']._loaded_options = None + _globals['_STRINGRULES'].fields_by_name['prefix']._serialized_options = b'\302Hk\ni\n\rstring.prefix\032X!this.startsWith(rules.prefix) ? \'does not have prefix `%s`\'.format([rules.prefix]) : \'\'' + _globals['_STRINGRULES'].fields_by_name['suffix']._loaded_options = None + _globals['_STRINGRULES'].fields_by_name['suffix']._serialized_options = b'\302Hi\ng\n\rstring.suffix\032V!this.endsWith(rules.suffix) ? \'does not have suffix `%s`\'.format([rules.suffix]) : \'\'' + _globals['_STRINGRULES'].fields_by_name['contains']._loaded_options = None + _globals['_STRINGRULES'].fields_by_name['contains']._serialized_options = b'\302Hu\ns\n\017string.contains\032`!this.contains(rules.contains) ? \'does not contain substring `%s`\'.format([rules.contains]) : \'\'' + _globals['_STRINGRULES'].fields_by_name['not_contains']._loaded_options = None + _globals['_STRINGRULES'].fields_by_name['not_contains']._serialized_options = b'\302Hx\nv\n\023string.not_contains\032_this.contains(rules.not_contains) ? \'contains substring `%s`\'.format([rules.not_contains]) : \'\'' + _globals['_STRINGRULES'].fields_by_name['in']._loaded_options = None + _globals['_STRINGRULES'].fields_by_name['in']._serialized_options = b'\302Hk\ni\n\tstring.in\032\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'' + _globals['_STRINGRULES'].fields_by_name['not_in']._loaded_options = None + _globals['_STRINGRULES'].fields_by_name['not_in']._serialized_options = b'\302H^\n\\\n\rstring.not_in\032Kthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'' + _globals['_STRINGRULES'].fields_by_name['email']._loaded_options = None + _globals['_STRINGRULES'].fields_by_name['email']._serialized_options = b'\302H\303\001\n[\n\014string.email\022\035must be a valid email address\032,!rules.email || this == \'\' || this.isEmail()\nd\n\022string.email_empty\0222value is empty, which is not a valid email address\032\032!rules.email || this != \'\'' + _globals['_STRINGRULES'].fields_by_name['hostname']._loaded_options = None + _globals['_STRINGRULES'].fields_by_name['hostname']._serialized_options = b'\302H\310\001\n_\n\017string.hostname\022\030must be a valid hostname\0322!rules.hostname || this == \'\' || this.isHostname()\ne\n\025string.hostname_empty\022-value is empty, which is not a valid hostname\032\035!rules.hostname || this != \'\'' + _globals['_STRINGRULES'].fields_by_name['ip']._loaded_options = None + _globals['_STRINGRULES'].fields_by_name['ip']._serialized_options = b'\302H\256\001\nO\n\tstring.ip\022\032must be a valid IP address\032&!rules.ip || this == \'\' || this.isIp()\n[\n\017string.ip_empty\022/value is empty, which is not a valid IP address\032\027!rules.ip || this != \'\'' + _globals['_STRINGRULES'].fields_by_name['ipv4']._loaded_options = None + _globals['_STRINGRULES'].fields_by_name['ipv4']._serialized_options = b'\302H\273\001\nV\n\013string.ipv4\022\034must be a valid IPv4 address\032)!rules.ipv4 || this == \'\' || this.isIp(4)\na\n\021string.ipv4_empty\0221value is empty, which is not a valid IPv4 address\032\031!rules.ipv4 || this != \'\'' + _globals['_STRINGRULES'].fields_by_name['ipv6']._loaded_options = None + _globals['_STRINGRULES'].fields_by_name['ipv6']._serialized_options = b'\302H\273\001\nV\n\013string.ipv6\022\034must be a valid IPv6 address\032)!rules.ipv6 || this == \'\' || this.isIp(6)\na\n\021string.ipv6_empty\0221value is empty, which is not a valid IPv6 address\032\031!rules.ipv6 || this != \'\'' + _globals['_STRINGRULES'].fields_by_name['uri']._loaded_options = None + _globals['_STRINGRULES'].fields_by_name['uri']._serialized_options = b'\302H\245\001\nK\n\nstring.uri\022\023must be a valid URI\032(!rules.uri || this == \'\' || this.isUri()\nV\n\020string.uri_empty\022(value is empty, which is not a valid URI\032\030!rules.uri || this != \'\'' + _globals['_STRINGRULES'].fields_by_name['uri_ref']._loaded_options = None + _globals['_STRINGRULES'].fields_by_name['uri_ref']._serialized_options = b'\302HT\nR\n\016string.uri_ref\022\035must be a valid URI Reference\032!!rules.uri_ref || this.isUriRef()' + _globals['_STRINGRULES'].fields_by_name['address']._loaded_options = None + _globals['_STRINGRULES'].fields_by_name['address']._serialized_options = b'\302H\361\001\n{\n\016string.address\022\'must be a valid hostname, or ip address\032@!rules.address || this == \'\' || this.isHostname() || this.isIp()\nr\n\024string.address_empty\022!rules.ipv4_with_prefixlen || this == \'\' || this.isIpPrefix(4)\n\222\001\n string.ipv4_with_prefixlen_empty\022Dvalue is empty, which is not a valid IPv4 address with prefix length\032(!rules.ipv4_with_prefixlen || this != \'\'' + _globals['_STRINGRULES'].fields_by_name['ipv6_with_prefixlen']._loaded_options = None + _globals['_STRINGRULES'].fields_by_name['ipv6_with_prefixlen']._serialized_options = b'\302H\245\002\n\215\001\n\032string.ipv6_with_prefixlen\022/must be a valid IPv6 address with prefix length\032>!rules.ipv6_with_prefixlen || this == \'\' || this.isIpPrefix(6)\n\222\001\n string.ipv6_with_prefixlen_empty\022Dvalue is empty, which is not a valid IPv6 address with prefix length\032(!rules.ipv6_with_prefixlen || this != \'\'' + _globals['_STRINGRULES'].fields_by_name['ip_prefix']._loaded_options = None + _globals['_STRINGRULES'].fields_by_name['ip_prefix']._serialized_options = b'\302H\322\001\nf\n\020string.ip_prefix\022\031must be a valid IP prefix\0327!rules.ip_prefix || this == \'\' || this.isIpPrefix(true)\nh\n\026string.ip_prefix_empty\022.value is empty, which is not a valid IP prefix\032\036!rules.ip_prefix || this != \'\'' + _globals['_STRINGRULES'].fields_by_name['ipv4_prefix']._loaded_options = None + _globals['_STRINGRULES'].fields_by_name['ipv4_prefix']._serialized_options = b'\302H\341\001\no\n\022string.ipv4_prefix\022\033must be a valid IPv4 prefix\032!rules.host_and_port || this == \'\' || this.isHostAndPort(true)\ny\n\032string.host_and_port_empty\0227value is empty, which is not a valid host and port pair\032\"!rules.host_and_port || this != \'\'' + _globals['_STRINGRULES'].fields_by_name['ulid']._loaded_options = None + _globals['_STRINGRULES'].fields_by_name['ulid']._serialized_options = b'\302H\331\001\n|\n\013string.ulid\022\024must be a valid ULID\032W!rules.ulid || this == \'\' || this.matches(\'^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$\')\nY\n\021string.ulid_empty\022)value is empty, which is not a valid ULID\032\031!rules.ulid || this != \'\'' + _globals['_STRINGRULES'].fields_by_name['protobuf_fqn']._loaded_options = None + _globals['_STRINGRULES'].fields_by_name['protobuf_fqn']._serialized_options = b'\302H\267\002\n\257\001\n\023string.protobuf_fqn\022-must be a valid fully-qualified Protobuf name\032i!rules.protobuf_fqn || this == \'\' || this.matches(\'^[A-Za-z_][A-Za-z_0-9]*(\\\\.[A-Za-z_][A-Za-z_0-9]*)*$\')\n\202\001\n\031string.protobuf_fqn_empty\022Bvalue is empty, which is not a valid fully-qualified Protobuf name\032!!rules.protobuf_fqn || this != \'\'' + _globals['_STRINGRULES'].fields_by_name['protobuf_dot_fqn']._loaded_options = None + _globals['_STRINGRULES'].fields_by_name['protobuf_dot_fqn']._serialized_options = b'\302H\360\002\n\315\001\n\027string.protobuf_dot_fqn\022@must be a valid fully-qualified Protobuf name with a leading dot\032p!rules.protobuf_dot_fqn || this == \'\' || this.matches(\'^\\\\.[A-Za-z_][A-Za-z_0-9]*(\\\\.[A-Za-z_][A-Za-z_0-9]*)*$\')\n\235\001\n\035string.protobuf_dot_fqn_empty\022Uvalue is empty, which is not a valid fully-qualified Protobuf name with a leading dot\032%!rules.protobuf_dot_fqn || this != \'\'' + _globals['_STRINGRULES'].fields_by_name['well_known_regex']._loaded_options = None + _globals['_STRINGRULES'].fields_by_name['well_known_regex']._serialized_options = b'\302H\341\004\n\352\001\n#string.well_known_regex.header_name\022 must be a valid HTTP header name\032\240\001rules.well_known_regex != 1 || this == \'\' || this.matches(!has(rules.strict) || rules.strict ?\'^:?[0-9a-zA-Z!#$%&\\\'*+-.^_|~\\x60]+$\' :\'^[^\\u0000\\u000A\\u000D]+$\')\n\215\001\n)string.well_known_regex.header_name_empty\0225value is empty, which is not a valid HTTP header name\032)rules.well_known_regex != 1 || this != \'\'\n\341\001\n$string.well_known_regex.header_value\022!must be a valid HTTP header value\032\225\001rules.well_known_regex != 2 || this.matches(!has(rules.strict) || rules.strict ?\'^[^\\u0000-\\u0008\\u000A-\\u001F\\u007F]*$\' :\'^[^\\u0000\\u000A\\u000D]*$\')' + _globals['_STRINGRULES'].fields_by_name['example']._loaded_options = None + _globals['_STRINGRULES'].fields_by_name['example']._serialized_options = b'\302H\030\n\026\n\016string.example\032\004true' + _globals['_BYTESRULES'].fields_by_name['const']._loaded_options = None + _globals['_BYTESRULES'].fields_by_name['const']._serialized_options = b'\302Hh\nf\n\013bytes.const\032Wthis != getField(rules, \'const\') ? \'must be %x\'.format([getField(rules, \'const\')]) : \'\'' + _globals['_BYTESRULES'].fields_by_name['len']._loaded_options = None + _globals['_BYTESRULES'].fields_by_name['len']._serialized_options = b'\302H[\nY\n\tbytes.len\032Luint(this.size()) != rules.len ? \'must be %s bytes\'.format([rules.len]) : \'\'' + _globals['_BYTESRULES'].fields_by_name['min_len']._loaded_options = None + _globals['_BYTESRULES'].fields_by_name['min_len']._serialized_options = b'\302Ho\nm\n\rbytes.min_len\032\\uint(this.size()) < rules.min_len ? \'must be at least %s bytes\'.format([rules.min_len]) : \'\'' + _globals['_BYTESRULES'].fields_by_name['max_len']._loaded_options = None + _globals['_BYTESRULES'].fields_by_name['max_len']._serialized_options = b'\302Hn\nl\n\rbytes.max_len\032[uint(this.size()) > rules.max_len ? \'must be at most %s bytes\'.format([rules.max_len]) : \'\'' + _globals['_BYTESRULES'].fields_by_name['pattern']._loaded_options = None + _globals['_BYTESRULES'].fields_by_name['pattern']._serialized_options = b'\302Hv\nt\n\rbytes.pattern\032c!string(this).matches(rules.pattern) ? \'must match regex pattern `%s`\'.format([rules.pattern]) : \'\'' + _globals['_BYTESRULES'].fields_by_name['prefix']._loaded_options = None + _globals['_BYTESRULES'].fields_by_name['prefix']._serialized_options = b'\302Hh\nf\n\014bytes.prefix\032V!this.startsWith(rules.prefix) ? \'does not have prefix %x\'.format([rules.prefix]) : \'\'' + _globals['_BYTESRULES'].fields_by_name['suffix']._loaded_options = None + _globals['_BYTESRULES'].fields_by_name['suffix']._serialized_options = b'\302Hf\nd\n\014bytes.suffix\032T!this.endsWith(rules.suffix) ? \'does not have suffix %x\'.format([rules.suffix]) : \'\'' + _globals['_BYTESRULES'].fields_by_name['contains']._loaded_options = None + _globals['_BYTESRULES'].fields_by_name['contains']._serialized_options = b'\302Hh\nf\n\016bytes.contains\032T!this.contains(rules.contains) ? \'does not contain %x\'.format([rules.contains]) : \'\'' + _globals['_BYTESRULES'].fields_by_name['in']._loaded_options = None + _globals['_BYTESRULES'].fields_by_name['in']._serialized_options = b'\302H\220\001\n\215\001\n\010bytes.in\032\200\001getField(rules, \'in\').size() > 0 && !(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'' + _globals['_BYTESRULES'].fields_by_name['not_in']._loaded_options = None + _globals['_BYTESRULES'].fields_by_name['not_in']._serialized_options = b'\302H]\n[\n\014bytes.not_in\032Kthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'' + _globals['_BYTESRULES'].fields_by_name['ip']._loaded_options = None + _globals['_BYTESRULES'].fields_by_name['ip']._serialized_options = b'\302H\322\001\nn\n\010bytes.ip\022\032must be a valid IP address\032F!rules.ip || this.size() == 0 || this.size() == 4 || this.size() == 16\n`\n\016bytes.ip_empty\022/value is empty, which is not a valid IP address\032\035!rules.ip || this.size() != 0' + _globals['_BYTESRULES'].fields_by_name['ipv4']._loaded_options = None + _globals['_BYTESRULES'].fields_by_name['ipv4']._serialized_options = b'\302H\311\001\n_\n\nbytes.ipv4\022\034must be a valid IPv4 address\0323!rules.ipv4 || this.size() == 0 || this.size() == 4\nf\n\020bytes.ipv4_empty\0221value is empty, which is not a valid IPv4 address\032\037!rules.ipv4 || this.size() != 0' + _globals['_BYTESRULES'].fields_by_name['ipv6']._loaded_options = None + _globals['_BYTESRULES'].fields_by_name['ipv6']._serialized_options = b'\302H\312\001\n`\n\nbytes.ipv6\022\034must be a valid IPv6 address\0324!rules.ipv6 || this.size() == 0 || this.size() == 16\nf\n\020bytes.ipv6_empty\0221value is empty, which is not a valid IPv6 address\032\037!rules.ipv6 || this.size() != 0' + _globals['_BYTESRULES'].fields_by_name['uuid']._loaded_options = None + _globals['_BYTESRULES'].fields_by_name['uuid']._serialized_options = b'\302H\272\001\nX\n\nbytes.uuid\022\024must be a valid UUID\0324!rules.uuid || this.size() == 0 || this.size() == 16\n^\n\020bytes.uuid_empty\022)value is empty, which is not a valid UUID\032\037!rules.uuid || this.size() != 0' + _globals['_BYTESRULES'].fields_by_name['example']._loaded_options = None + _globals['_BYTESRULES'].fields_by_name['example']._serialized_options = b'\302H\027\n\025\n\rbytes.example\032\004true' + _globals['_ENUMRULES'].fields_by_name['const']._loaded_options = None + _globals['_ENUMRULES'].fields_by_name['const']._serialized_options = b'\302Hj\nh\n\nenum.const\032Zthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'' + _globals['_ENUMRULES'].fields_by_name['in']._loaded_options = None + _globals['_ENUMRULES'].fields_by_name['in']._serialized_options = b'\302Hi\ng\n\007enum.in\032\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'' + _globals['_ENUMRULES'].fields_by_name['not_in']._loaded_options = None + _globals['_ENUMRULES'].fields_by_name['not_in']._serialized_options = b'\302H\\\nZ\n\013enum.not_in\032Kthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'' + _globals['_ENUMRULES'].fields_by_name['example']._loaded_options = None + _globals['_ENUMRULES'].fields_by_name['example']._serialized_options = b'\302H\026\n\024\n\014enum.example\032\004true' + _globals['_REPEATEDRULES'].fields_by_name['min_items']._loaded_options = None + _globals['_REPEATEDRULES'].fields_by_name['min_items']._serialized_options = b'\302H\177\n}\n\022repeated.min_items\032guint(this.size()) < rules.min_items ? \'must contain at least %d item(s)\'.format([rules.min_items]) : \'\'' + _globals['_REPEATEDRULES'].fields_by_name['max_items']._loaded_options = None + _globals['_REPEATEDRULES'].fields_by_name['max_items']._serialized_options = b'\302H\204\001\n\201\001\n\022repeated.max_items\032kuint(this.size()) > rules.max_items ? \'must contain no more than %s item(s)\'.format([rules.max_items]) : \'\'' + _globals['_REPEATEDRULES'].fields_by_name['unique']._loaded_options = None + _globals['_REPEATEDRULES'].fields_by_name['unique']._serialized_options = b'\302H]\n[\n\017repeated.unique\022(repeated value must contain unique items\032\036!rules.unique || this.unique()' + _globals['_MAPRULES'].fields_by_name['min_pairs']._loaded_options = None + _globals['_MAPRULES'].fields_by_name['min_pairs']._serialized_options = b'\302Hy\nw\n\rmap.min_pairs\032fuint(this.size()) < rules.min_pairs ? \'map must be at least %d entries\'.format([rules.min_pairs]) : \'\'' + _globals['_MAPRULES'].fields_by_name['max_pairs']._loaded_options = None + _globals['_MAPRULES'].fields_by_name['max_pairs']._serialized_options = b'\302Hx\nv\n\rmap.max_pairs\032euint(this.size()) > rules.max_pairs ? \'map must be at most %d entries\'.format([rules.max_pairs]) : \'\'' + _globals['_DURATIONRULES'].fields_by_name['const']._loaded_options = None + _globals['_DURATIONRULES'].fields_by_name['const']._serialized_options = b'\302Hn\nl\n\016duration.const\032Zthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'' + _globals['_DURATIONRULES'].fields_by_name['lt']._loaded_options = None + _globals['_DURATIONRULES'].fields_by_name['lt']._serialized_options = b'\302Hv\nt\n\013duration.lt\032e!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'' + _globals['_DURATIONRULES'].fields_by_name['lte']._loaded_options = None + _globals['_DURATIONRULES'].fields_by_name['lte']._serialized_options = b'\302H\205\001\n\202\001\n\014duration.lte\032r!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'' + _globals['_DURATIONRULES'].fields_by_name['gt']._loaded_options = None + _globals['_DURATIONRULES'].fields_by_name['gt']._serialized_options = b'\302H\365\006\nw\n\013duration.gt\032h!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\260\001\n\016duration.gt_lt\032\235\001has(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\270\001\n\030duration.gt_lt_exclusive\032\233\001has(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\300\001\n\017duration.gt_lte\032\254\001has(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\310\001\n\031duration.gt_lte_exclusive\032\252\001has(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]) : \'\'' + _globals['_DURATIONRULES'].fields_by_name['gte']._loaded_options = None + _globals['_DURATIONRULES'].fields_by_name['gte']._serialized_options = b'\302H\300\007\n\205\001\n\014duration.gte\032u!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\277\001\n\017duration.gte_lt\032\253\001has(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\307\001\n\031duration.gte_lt_exclusive\032\251\001has(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\317\001\n\020duration.gte_lte\032\272\001has(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\327\001\n\032duration.gte_lte_exclusive\032\270\001has(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]) : \'\'' + _globals['_DURATIONRULES'].fields_by_name['in']._loaded_options = None + _globals['_DURATIONRULES'].fields_by_name['in']._serialized_options = b'\302Hm\nk\n\013duration.in\032\\!(this in getField(rules, \'in\')) ? \'must be in list %s\'.format([getField(rules, \'in\')]) : \'\'' + _globals['_DURATIONRULES'].fields_by_name['not_in']._loaded_options = None + _globals['_DURATIONRULES'].fields_by_name['not_in']._serialized_options = b'\302H`\n^\n\017duration.not_in\032Kthis in rules.not_in ? \'must not be in list %s\'.format([rules.not_in]) : \'\'' + _globals['_DURATIONRULES'].fields_by_name['example']._loaded_options = None + _globals['_DURATIONRULES'].fields_by_name['example']._serialized_options = b'\302H\032\n\030\n\020duration.example\032\004true' + _globals['_FIELDMASKRULES'].fields_by_name['const']._loaded_options = None + _globals['_FIELDMASKRULES'].fields_by_name['const']._serialized_options = b'\302H\211\001\n\206\001\n\020field_mask.const\032rthis.paths != getField(rules, \'const\').paths ? \'must equal paths %s\'.format([getField(rules, \'const\').paths]) : \'\'' + _globals['_FIELDMASKRULES'].fields_by_name['in']._loaded_options = None + _globals['_FIELDMASKRULES'].fields_by_name['in']._serialized_options = b'\302H\302\001\n\277\001\n\rfield_mask.in\032\255\001!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\')]) : \'\'' + _globals['_FIELDMASKRULES'].fields_by_name['not_in']._loaded_options = None + _globals['_FIELDMASKRULES'].fields_by_name['not_in']._serialized_options = b'\302H\330\001\n\325\001\n\021field_mask.not_in\032\277\001!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\')]) : \'\'' + _globals['_FIELDMASKRULES'].fields_by_name['example']._loaded_options = None + _globals['_FIELDMASKRULES'].fields_by_name['example']._serialized_options = b'\302H\034\n\032\n\022field_mask.example\032\004true' + _globals['_TIMESTAMPRULES'].fields_by_name['const']._loaded_options = None + _globals['_TIMESTAMPRULES'].fields_by_name['const']._serialized_options = b'\302Ho\nm\n\017timestamp.const\032Zthis != getField(rules, \'const\') ? \'must equal %s\'.format([getField(rules, \'const\')]) : \'\'' + _globals['_TIMESTAMPRULES'].fields_by_name['lt']._loaded_options = None + _globals['_TIMESTAMPRULES'].fields_by_name['lt']._serialized_options = b'\302Hw\nu\n\014timestamp.lt\032e!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \'must be less than %s\'.format([rules.lt]) : \'\'' + _globals['_TIMESTAMPRULES'].fields_by_name['lte']._loaded_options = None + _globals['_TIMESTAMPRULES'].fields_by_name['lte']._serialized_options = b'\302H\206\001\n\203\001\n\rtimestamp.lte\032r!has(rules.gte) && !has(rules.gt) && this > rules.lte? \'must be less than or equal to %s\'.format([rules.lte]) : \'\'' + _globals['_TIMESTAMPRULES'].fields_by_name['lt_now']._loaded_options = None + _globals['_TIMESTAMPRULES'].fields_by_name['lt_now']._serialized_options = b'\302HQ\nO\n\020timestamp.lt_now\032;(rules.lt_now && this > now) ? \'must be less than now\' : \'\'' + _globals['_TIMESTAMPRULES'].fields_by_name['gt']._loaded_options = None + _globals['_TIMESTAMPRULES'].fields_by_name['gt']._serialized_options = b'\302H\372\006\nx\n\014timestamp.gt\032h!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \'must be greater than %s\'.format([rules.gt]) : \'\'\n\261\001\n\017timestamp.gt_lt\032\235\001has(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\271\001\n\031timestamp.gt_lt_exclusive\032\233\001has(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\301\001\n\020timestamp.gt_lte\032\254\001has(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\311\001\n\032timestamp.gt_lte_exclusive\032\252\001has(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]) : \'\'' + _globals['_TIMESTAMPRULES'].fields_by_name['gte']._loaded_options = None + _globals['_TIMESTAMPRULES'].fields_by_name['gte']._serialized_options = b'\302H\305\007\n\206\001\n\rtimestamp.gte\032u!has(rules.lt) && !has(rules.lte) && this < rules.gte? \'must be greater than or equal to %s\'.format([rules.gte]) : \'\'\n\300\001\n\020timestamp.gte_lt\032\253\001has(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\310\001\n\032timestamp.gte_lt_exclusive\032\251\001has(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\320\001\n\021timestamp.gte_lte\032\272\001has(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\330\001\n\033timestamp.gte_lte_exclusive\032\270\001has(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]) : \'\'' + _globals['_TIMESTAMPRULES'].fields_by_name['gt_now']._loaded_options = None + _globals['_TIMESTAMPRULES'].fields_by_name['gt_now']._serialized_options = b'\302HT\nR\n\020timestamp.gt_now\032>(rules.gt_now && this < now) ? \'must be greater than now\' : \'\'' + _globals['_TIMESTAMPRULES'].fields_by_name['within']._loaded_options = None + _globals['_TIMESTAMPRULES'].fields_by_name['within']._serialized_options = b'\302H\201\001\n\177\n\020timestamp.within\032kthis < now-rules.within || this > now+rules.within ? \'must be within %s of now\'.format([rules.within]) : \'\'' + _globals['_TIMESTAMPRULES'].fields_by_name['example']._loaded_options = None + _globals['_TIMESTAMPRULES'].fields_by_name['example']._serialized_options = b'\302H\033\n\031\n\021timestamp.example\032\004true' + _globals['_IGNORE']._serialized_start=54642 + _globals['_IGNORE']._serialized_end=54803 + _globals['_KNOWNREGEX']._serialized_start=54805 + _globals['_KNOWNREGEX']._serialized_end=54915 + _globals['_RULE']._serialized_start=178 + _globals['_RULE']._serialized_end=258 + _globals['_MESSAGERULES']._serialized_start=261 + _globals['_MESSAGERULES']._serialized_end=422 + _globals['_MESSAGEONEOFRULE']._serialized_start=424 + _globals['_MESSAGEONEOFRULE']._serialized_end=494 + _globals['_ONEOFRULES']._serialized_start=496 + _globals['_ONEOFRULES']._serialized_end=536 + _globals['_FIELDRULES']._serialized_start=539 + _globals['_FIELDRULES']._serialized_end=1918 + _globals['_PREDEFINEDRULES']._serialized_start=1920 + _globals['_PREDEFINEDRULES']._serialized_end=2010 + _globals['_FLOATRULES']._serialized_start=2013 + _globals['_FLOATRULES']._serialized_end=5003 + _globals['_DOUBLERULES']._serialized_start=5006 + _globals['_DOUBLERULES']._serialized_end=8014 + _globals['_INT32RULES']._serialized_start=8017 + _globals['_INT32RULES']._serialized_end=10671 + _globals['_INT64RULES']._serialized_start=10674 + _globals['_INT64RULES']._serialized_end=13328 + _globals['_UINT32RULES']._serialized_start=13331 + _globals['_UINT32RULES']._serialized_end=16003 + _globals['_UINT64RULES']._serialized_start=16006 + _globals['_UINT64RULES']._serialized_end=18678 + _globals['_SINT32RULES']._serialized_start=18681 + _globals['_SINT32RULES']._serialized_end=21353 + _globals['_SINT64RULES']._serialized_start=21356 + _globals['_SINT64RULES']._serialized_end=24028 + _globals['_FIXED32RULES']._serialized_start=24031 + _globals['_FIXED32RULES']._serialized_end=26720 + _globals['_FIXED64RULES']._serialized_start=26723 + _globals['_FIXED64RULES']._serialized_end=29412 + _globals['_SFIXED32RULES']._serialized_start=29415 + _globals['_SFIXED32RULES']._serialized_end=32122 + _globals['_SFIXED64RULES']._serialized_start=32125 + _globals['_SFIXED64RULES']._serialized_end=34832 + _globals['_BOOLRULES']._serialized_start=34835 + _globals['_BOOLRULES']._serialized_end=35044 + _globals['_STRINGRULES']._serialized_start=35047 + _globals['_STRINGRULES']._serialized_end=43190 + _globals['_BYTESRULES']._serialized_start=43193 + _globals['_BYTESRULES']._serialized_end=45571 + _globals['_ENUMRULES']._serialized_start=45574 + _globals['_ENUMRULES']._serialized_end=46064 + _globals['_REPEATEDRULES']._serialized_start=46067 + _globals['_REPEATEDRULES']._serialized_end=46595 + _globals['_MAPRULES']._serialized_start=46598 + _globals['_MAPRULES']._serialized_end=47026 + _globals['_ANYRULES']._serialized_start=47028 + _globals['_ANYRULES']._serialized_end=47077 + _globals['_DURATIONRULES']._serialized_start=47080 + _globals['_DURATIONRULES']._serialized_end=50004 + _globals['_FIELDMASKRULES']._serialized_start=50007 + _globals['_FIELDMASKRULES']._serialized_end=50781 + _globals['_TIMESTAMPRULES']._serialized_start=50784 + _globals['_TIMESTAMPRULES']._serialized_end=53832 + _globals['_VIOLATIONS']._serialized_start=53834 + _globals['_VIOLATIONS']._serialized_end=53903 + _globals['_VIOLATION']._serialized_start=53906 + _globals['_VIOLATION']._serialized_end=54103 + _globals['_FIELDPATH']._serialized_start=54105 + _globals['_FIELDPATH']._serialized_end=54176 + _globals['_FIELDPATHELEMENT']._serialized_start=54179 + _globals['_FIELDPATHELEMENT']._serialized_end=54639 +# @@protoc_insertion_point(module_scope) diff --git a/python/metalstack/client/tests/__init__.py b/python/metalstack/client/tests/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/python/metalstack/client/tests/conftest.py b/python/metalstack/client/tests/conftest.py new file mode 100644 index 00000000..8cf48df9 --- /dev/null +++ b/python/metalstack/client/tests/conftest.py @@ -0,0 +1,172 @@ +from collections.abc import Iterator +from typing import Any + +import pyqwest +import pytest +from connectrpc.request import RequestContext +from pyqwest.testing import WSGITransport + +from metalstack.api.v2 import ip_pb2 +from metalstack.api.v2 import version_pb2 +from metalstack.api.v2.ip_connect import ( + IPServiceWSGIApplication, +) +from metalstack.api.v2.version_connect import ( + VersionServiceWSGIApplication, +) +from metalstack.client.client import Client +from metalstack.infra.v2 import bmc_pb2 +from metalstack.infra.v2 import component_pb2 as infra_component_pb2 +from metalstack.infra.v2.bmc_connect import ( + BMCServiceWSGIApplication, +) +from metalstack.infra.v2.component_connect import ( + ComponentServiceWSGIApplication, +) + + +class MockVersionService: + def __init__(self, version: str = "1.0"): + self._version = version + + def get( + self, request: version_pb2.VersionServiceGetRequest, ctx: RequestContext + ) -> version_pb2.VersionServiceGetResponse: + return version_pb2.VersionServiceGetResponse( + version=version_pb2.Version(version=self._version) + ) + + +class MockIPService: + def __init__(self): + self.received_auth: str | None = None + + def get( + self, request: ip_pb2.IPServiceGetRequest, ctx: RequestContext + ) -> ip_pb2.IPServiceGetResponse: + self.received_auth = ctx.request_headers().get("authorization") + return ip_pb2.IPServiceGetResponse( + ip=ip_pb2.IP(ip=request.ip, project=request.project) + ) + + def create( + self, request: ip_pb2.IPServiceCreateRequest, ctx: RequestContext + ) -> ip_pb2.IPServiceCreateResponse: + return ip_pb2.IPServiceCreateResponse() + + def update( + self, request: ip_pb2.IPServiceUpdateRequest, ctx: RequestContext + ) -> ip_pb2.IPServiceUpdateResponse: + return ip_pb2.IPServiceUpdateResponse() + + def list( + self, request: ip_pb2.IPServiceListRequest, ctx: RequestContext + ) -> ip_pb2.IPServiceListResponse: + return ip_pb2.IPServiceListResponse() + + def delete( + self, request: ip_pb2.IPServiceDeleteRequest, ctx: RequestContext + ) -> ip_pb2.IPServiceDeleteResponse: + return ip_pb2.IPServiceDeleteResponse() + + +class MockBMCService: + def __init__(self): + self.received_auth: str | None = None + + def update_b_m_c_info( + self, request: bmc_pb2.UpdateBMCInfoRequest, ctx: RequestContext + ) -> bmc_pb2.UpdateBMCInfoResponse: + self.received_auth = ctx.request_headers().get("authorization") + return bmc_pb2.UpdateBMCInfoResponse() + + def wait_for_b_m_c_command( + self, request: bmc_pb2.WaitForBMCCommandRequest, ctx: RequestContext + ) -> Iterator[bmc_pb2.WaitForBMCCommandResponse]: + self.received_auth = ctx.request_headers().get("authorization") + yield bmc_pb2.WaitForBMCCommandResponse(uuid="test-uuid", command_id="cmd-1") + + def b_m_c_command_done( + self, request: bmc_pb2.BMCCommandDoneRequest, ctx: RequestContext + ) -> bmc_pb2.BMCCommandDoneResponse: + return bmc_pb2.BMCCommandDoneResponse() + + +class MockComponentService: + def __init__(self): + self.pings: list[infra_component_pb2.ComponentServicePingRequest] = [] + + def ping( + self, + request: infra_component_pb2.ComponentServicePingRequest, + ctx: RequestContext, + ) -> infra_component_pb2.ComponentServicePingResponse: + self.pings.append( + infra_component_pb2.ComponentServicePingRequest( + type=request.type, + identifier=request.identifier, + started_at=request.started_at, + interval=request.interval, + version=request.version, + ) + ) + return infra_component_pb2.ComponentServicePingResponse() + + +def _build_combined_wsgi_app(services: dict[str, Any]): + """Build a combined WSGI app that dispatches by path prefix.""" + + def application(environ, start_response): + path = environ.get("PATH_INFO", "/") + for prefix, app in services.items(): + if path.startswith(prefix): + return app(environ, start_response) + from werkzeug.exceptions import NotFound + + return NotFound()(environ, start_response) + + return application + + +@pytest.fixture +def mock_version_service(): + return MockVersionService() + + +@pytest.fixture +def mock_ip_service(): + return MockIPService() + + +@pytest.fixture +def mock_bmc_service(): + return MockBMCService() + + +@pytest.fixture +def mock_component_service(): + return MockComponentService() + + +@pytest.fixture +def test_client( + mock_version_service, + mock_ip_service, + mock_bmc_service, + mock_component_service, +): + """Create a Client with WSGI-backed transport for testing.""" + services = { + "/metalstack.api.v2.VersionService": VersionServiceWSGIApplication( + mock_version_service + ), + "/metalstack.api.v2.IPService": IPServiceWSGIApplication(mock_ip_service), + "/metalstack.infra.v2.BMCService": BMCServiceWSGIApplication(mock_bmc_service), + "/metalstack.infra.v2.ComponentService": ComponentServiceWSGIApplication( + mock_component_service + ), + } + transport = WSGITransport(_build_combined_wsgi_app(services)) + c = Client(baseurl="http://test", timeout=10) + c._client = pyqwest.SyncClient(transport=transport) + return c diff --git a/python/metalstack/client/tests/test_client.py b/python/metalstack/client/tests/test_client.py new file mode 100644 index 00000000..57e3f8f2 --- /dev/null +++ b/python/metalstack/client/tests/test_client.py @@ -0,0 +1,122 @@ +"""Tests mirroring go/client/client_test.go. + +Test_Client -> test_client_apiv2_version_get +Test_ClientInterceptors -> test_client_auth_header_unary, test_client_auth_header_streaming +""" + +import pyqwest +import pytest +from pyqwest.testing import WSGITransport + +from metalstack.api.v2 import ip_pb2 +from metalstack.api.v2 import version_pb2 +from metalstack.api.v2.ip_connect import ( + IPServiceClientSync, + IPServiceWSGIApplication, +) +from metalstack.api.v2.version_connect import ( + VersionServiceClientSync, + VersionServiceWSGIApplication, +) +from metalstack.client.client import Client +from metalstack.infra.v2 import bmc_pb2 +from metalstack.infra.v2.bmc_connect import ( + BMCServiceClientSync, + BMCServiceWSGIApplication, +) +from metalstack.infra.v2 import component_pb2 as infra_component_pb2 +from metalstack.infra.v2.component_connect import ( + ComponentServiceClientSync, + ComponentServiceWSGIApplication, +) + +from .conftest import ( + MockBMCService, + MockComponentService, + MockIPService, + MockVersionService, + _build_combined_wsgi_app, +) + + +class TestClient: + """Mirrors Test_Client from client_test.go. + + Tests client instantiation and basic RPC calls through the generated Client wrapper. + """ + + def test_client_creates_service_groups(self, test_client): + """Client exposes adminv2, apiv2, infrav2 service groups.""" + assert test_client.apiv2() is not None + assert test_client.infrav2() is not None + + def test_client_apiv2_version_get(self, test_client, mock_version_service): + """Version.Get returns the expected version through the Client wrapper.""" + resp = test_client.apiv2().version().get( + request=version_pb2.VersionServiceGetRequest() + ) + assert resp is not None + assert resp.version.version == "1.0" + + def test_client_apiv2_version_get_custom_version(self, mock_version_service): + """Client can be configured with a custom version response.""" + mock_version_service._version = "2.5.3" + vs = MockVersionService(version="2.5.3") + ips = MockIPService() + bmc = MockBMCService() + cs = MockComponentService() + + services = { + "/metalstack.api.v2.VersionService": VersionServiceWSGIApplication(vs), + "/metalstack.api.v2.IPService": IPServiceWSGIApplication(ips), + "/metalstack.infra.v2.BMCService": BMCServiceWSGIApplication(bmc), + "/metalstack.infra.v2.ComponentService": ComponentServiceWSGIApplication(cs), + } + transport = WSGITransport(_build_combined_wsgi_app(services)) + c = Client(baseurl="http://test", timeout=10) + c._client = pyqwest.SyncClient(transport=transport) + + resp = c.apiv2().version().get( + request=version_pb2.VersionServiceGetRequest() + ) + assert resp.version.version == "2.5.3" + + +class TestClientInterceptors: + """Mirrors Test_ClientInterceptors from client_test.go. + + Tests that auth headers are correctly passed for both unary and streaming calls. + """ + + def test_client_auth_header_unary(self, test_client, mock_bmc_service): + """Unary call has Authorization header set.""" + token = "test-bearer-token" + resp = test_client.infrav2().bmc().update_b_m_c_info( + request=bmc_pb2.UpdateBMCInfoRequest(), + headers={"authorization": f"Bearer {token}"}, + ) + assert resp is not None + assert mock_bmc_service.received_auth == f"Bearer {token}" + + def test_client_auth_header_streaming(self, test_client, mock_bmc_service): + """Streaming call has Authorization header set.""" + token = "test-stream-token" + stream = test_client.infrav2().bmc().wait_for_b_m_c_command( + request=bmc_pb2.WaitForBMCCommandRequest(), + headers={"authorization": f"Bearer {token}"}, + ) + assert stream is not None + for cmd in stream: + assert cmd.uuid == "test-uuid" + assert mock_bmc_service.received_auth == f"Bearer {token}" + + def test_client_auth_header_ip_get(self, test_client, mock_ip_service): + """IP Get call has Authorization header set.""" + token = "ip-service-token" + resp = test_client.apiv2().ip().get( + request=ip_pb2.IPServiceGetRequest(ip="10.0.0.1"), + headers={"authorization": f"Bearer {token}"}, + ) + assert resp is not None + assert resp.ip.ip == "10.0.0.1" + assert mock_ip_service.received_auth == f"Bearer {token}" diff --git a/python/metalstack/client/tests/test_interceptor.py b/python/metalstack/client/tests/test_interceptor.py new file mode 100644 index 00000000..e381a36c --- /dev/null +++ b/python/metalstack/client/tests/test_interceptor.py @@ -0,0 +1,173 @@ +"""Tests mirroring go/client/test_interceptor_test.go. + +Tests the interceptor pattern using connectrpc's MetadataInterceptorSync, +which is the Python equivalent of Go's TestClientInterceptor. +""" + +import pyqwest +import pytest +from connectrpc.interceptor import MetadataInterceptorSync +from connectrpc.request import RequestContext +from pyqwest.testing import WSGITransport + +from metalstack.api.v2 import ip_pb2 +from metalstack.api.v2.ip_connect import ( + IPServiceClientSync, + IPServiceWSGIApplication, +) +from metalstack.client.client import Client + +from .conftest import MockIPService, _build_combined_wsgi_app + + +class AuthInterceptor: + """Client-side interceptor that injects an Authorization header. + + Mirrors the authInterceptor from go/client/client-interceptors.go. + """ + + def __init__(self, token: str): + self.token = token + + def on_start_sync(self, ctx: RequestContext) -> None: + ctx.request_headers().add("authorization", f"Bearer {self.token}") + + def on_end_sync(self, token, ctx: RequestContext, error) -> None: + pass + + +class RequestRecordingInterceptor: + """Interceptor that records the received request for assertion. + + Mirrors the TestClientInterceptor from go/client/test_interceptor.go. + """ + + def __init__(self): + self.calls: list[tuple[str, str]] = [] + + def on_start_sync(self, ctx: RequestContext) -> None: + method = ctx.method() + self.calls.append( + (method.service_name, method.name) + ) + + def on_end_sync(self, token, ctx: RequestContext, error) -> None: + pass + + +class TestInterceptor: + """Mirrors TestInterceptor from test_interceptor_test.go. + + Tests that an interceptor can intercept a call and verify request/response flow. + """ + + def test_interceptor_receives_request(self, mock_ip_service): + """Interceptor can observe the service and method being called.""" + ips = MockIPService() + from metalstack.infra.v2.bmc_connect import BMCServiceWSGIApplication + from metalstack.infra.v2.component_connect import ComponentServiceWSGIApplication + from metalstack.api.v2.version_connect import VersionServiceWSGIApplication + from metalstack.infra.v2 import bmc_pb2 + from metalstack.infra.v2 import component_pb2 as infra_component_pb2 + + class NoopBMC: + def update_b_m_c_info(self, request, ctx): + from metalstack.infra.v2.bmc_pb2 import UpdateBMCInfoResponse + return UpdateBMCInfoResponse() + def wait_for_b_m_c_command(self, request, ctx): + from metalstack.infra.v2.bmc_pb2 import WaitForBMCCommandResponse + yield WaitForBMCCommandResponse() + def b_m_c_command_done(self, request, ctx): + from metalstack.infra.v2.bmc_pb2 import BMCCommandDoneResponse + return BMCCommandDoneResponse() + + class NoopComponent: + def ping(self, request, ctx): + from metalstack.infra.v2.component_pb2 import ComponentServicePingResponse + return ComponentServicePingResponse() + + class NoopVersion: + def get(self, request, ctx): + from metalstack.api.v2.version_pb2 import VersionServiceGetResponse, Version + return VersionServiceGetResponse(version=Version(version="0.0")) + + services = { + "/metalstack.api.v2.VersionService": VersionServiceWSGIApplication(NoopVersion()), + "/metalstack.api.v2.IPService": IPServiceWSGIApplication(ips), + "/metalstack.infra.v2.BMCService": BMCServiceWSGIApplication(NoopBMC()), + "/metalstack.infra.v2.ComponentService": ComponentServiceWSGIApplication(NoopComponent()), + } + transport = WSGITransport(_build_combined_wsgi_app(services)) + + interceptor = RequestRecordingInterceptor() + + svc = IPServiceClientSync( + "http://test", + http_client=pyqwest.SyncClient(transport=transport), + interceptors=[interceptor], + ) + + resp = svc.get( + request=ip_pb2.IPServiceGetRequest(ip="1.2.3.4"), + ) + + assert resp.ip.ip == "1.2.3.4" + assert len(interceptor.calls) == 1 + assert interceptor.calls[0] == ("metalstack.api.v2.IPService", "Get") + + def test_auth_interceptor_injects_token(self): + """Auth interceptor injects Authorization header that the server receives.""" + ips = MockIPService() + from metalstack.infra.v2.bmc_connect import BMCServiceWSGIApplication + from metalstack.infra.v2.component_connect import ComponentServiceWSGIApplication + from metalstack.api.v2.version_connect import VersionServiceWSGIApplication + + class NoopBMC: + def update_b_m_c_info(self, request, ctx): + from metalstack.infra.v2.bmc_pb2 import UpdateBMCInfoResponse + return UpdateBMCInfoResponse() + def wait_for_b_m_c_command(self, request, ctx): + from metalstack.infra.v2.bmc_pb2 import WaitForBMCCommandResponse + yield WaitForBMCCommandResponse() + def b_m_c_command_done(self, request, ctx): + from metalstack.infra.v2.bmc_pb2 import BMCCommandDoneResponse + return BMCCommandDoneResponse() + + class NoopComponent: + def ping(self, request, ctx): + from metalstack.infra.v2.component_pb2 import ComponentServicePingResponse + return ComponentServicePingResponse() + + class NoopVersion: + def get(self, request, ctx): + from metalstack.api.v2.version_pb2 import VersionServiceGetResponse, Version + return VersionServiceGetResponse(version=Version(version="0.0")) + + services = { + "/metalstack.api.v2.VersionService": VersionServiceWSGIApplication(NoopVersion()), + "/metalstack.api.v2.IPService": IPServiceWSGIApplication(ips), + "/metalstack.infra.v2.BMCService": BMCServiceWSGIApplication(NoopBMC()), + "/metalstack.infra.v2.ComponentService": ComponentServiceWSGIApplication(NoopComponent()), + } + transport = WSGITransport(_build_combined_wsgi_app(services)) + + svc = IPServiceClientSync( + "http://test", + http_client=pyqwest.SyncClient(transport=transport), + interceptors=[AuthInterceptor("my-secret-token")], + ) + + resp = svc.get(request=ip_pb2.IPServiceGetRequest(ip="1.2.3.4")) + + assert resp.ip.ip == "1.2.3.4" + assert ips.received_auth == "Bearer my-secret-token" + + def test_interceptor_on_client_wrapper(self, test_client, mock_ip_service): + """Client wrapper passes headers through to the underlying service.""" + token = "wrapper-test-token" + resp = test_client.apiv2().ip().get( + request=ip_pb2.IPServiceGetRequest(ip="5.6.7.8"), + headers={"authorization": f"Bearer {token}"}, + ) + assert resp.ip.ip == "5.6.7.8" + assert mock_ip_service.received_auth == f"Bearer {token}" diff --git a/python/metalstack/client/tests/test_ping.py b/python/metalstack/client/tests/test_ping.py new file mode 100644 index 00000000..4985ede4 --- /dev/null +++ b/python/metalstack/client/tests/test_ping.py @@ -0,0 +1,103 @@ +"""Tests mirroring go/client/ping_test.go. + +Tests the ComponentService.Ping RPC which is used by the Go client's Ping() method. +The Python client doesn't have a built-in Ping() method, but we test the underlying +ComponentService call that would be used to implement one. +""" + +import threading +import time +from datetime import timedelta + +import pytest +from google.protobuf import duration_pb2, timestamp_pb2 + +from metalstack.api.v2 import component_pb2 as api_component_pb2 +from metalstack.api.v2 import version_pb2 +from metalstack.infra.v2 import component_pb2 as infra_component_pb2 + + +class TestPing: + """Mirrors Test_Ping from ping_test.go. + + Verifies that ComponentServicePingRequest is correctly constructed and sent, + and that the mock service receives the expected fields. + """ + + def test_ping_request_fields(self, test_client, mock_component_service): + """Ping request contains correct component type, identifier, started_at, interval, version.""" + started_at = timestamp_pb2.Timestamp(seconds=1000) + interval = duration_pb2.Duration(seconds=5) + version = version_pb2.Version(version="1.0.0", git_sha1="abc123") + + resp = test_client.infrav2().component().ping( + request=infra_component_pb2.ComponentServicePingRequest( + type=api_component_pb2.COMPONENT_TYPE_METAL_CORE, + identifier="server01", + started_at=started_at, + interval=interval, + version=version, + ), + headers={"authorization": "Bearer test-token"}, + ) + + assert resp is not None + assert len(mock_component_service.pings) == 1 + + ping = mock_component_service.pings[0] + assert ping.type == api_component_pb2.COMPONENT_TYPE_METAL_CORE + assert ping.identifier == "server01" + assert ping.started_at.seconds == 1000 + assert ping.interval.seconds == 5 + assert ping.version.version == "1.0.0" + assert ping.version.git_sha1 == "abc123" + + def test_ping_multiple_requests(self, test_client, mock_component_service): + """Multiple ping calls are recorded correctly.""" + started_at = timestamp_pb2.Timestamp(seconds=2000) + interval = duration_pb2.Duration(seconds=10) + + for _ in range(3): + test_client.infrav2().component().ping( + request=infra_component_pb2.ComponentServicePingRequest( + type=api_component_pb2.COMPONENT_TYPE_METAL_CORE, + identifier="server02", + started_at=started_at, + interval=interval, + ), + headers={"authorization": "Bearer test-token"}, + ) + + assert len(mock_component_service.pings) == 3 + for ping in mock_component_service.pings: + assert ping.identifier == "server02" + assert ping.type == api_component_pb2.COMPONENT_TYPE_METAL_CORE + assert ping.started_at.seconds == 2000 + assert ping.interval.seconds == 10 + + def test_ping_background_simulation(self, test_client, mock_component_service): + """Simulate background pinging from a thread, similar to Go's ticker goroutine.""" + started_at = timestamp_pb2.Timestamp(seconds=3000) + interval = duration_pb2.Duration(seconds=1) + ping_count = 5 + + def do_pings(): + for _ in range(ping_count): + test_client.infrav2().component().ping( + request=infra_component_pb2.ComponentServicePingRequest( + type=api_component_pb2.COMPONENT_TYPE_METAL_CORE, + identifier="background-worker", + started_at=started_at, + interval=interval, + ), + headers={"authorization": "Bearer test-token"}, + ) + time.sleep(0.05) + + thread = threading.Thread(target=do_pings) + thread.start() + thread.join() + + assert len(mock_component_service.pings) == ping_count + for ping in mock_component_service.pings: + assert ping.identifier == "background-worker" diff --git a/python/metalstack/client/tests/test_token_persistent.py b/python/metalstack/client/tests/test_token_persistent.py new file mode 100644 index 00000000..2b84d867 --- /dev/null +++ b/python/metalstack/client/tests/test_token_persistent.py @@ -0,0 +1,91 @@ +"""Tests mirroring go/client/token-persistent-funcs_test.go. + +Tests filesystem-based token persistence, which is the Python equivalent of +Go's NewFilesystemTokenPersister. +""" + +import os +import tempfile +from pathlib import Path + +import pytest + + +class FilesystemTokenPersister: + """Persists a token to a file on disk. + + Mirrors the filesystem struct and persist method from + go/client/token-persistent-funcs.go. + """ + + def __init__(self, token_path: str): + self._token_path = token_path + + def persist(self, token: str) -> None: + Path(self._token_path).write_text(token) + + +def new_filesystem_token_persister(token_file: str) -> FilesystemTokenPersister: + """Create a new filesystem token persister. + + Mirrors NewFilesystemTokenPersister from go/client/token-persistent-funcs.go. + """ + path = Path(token_file) + if not path.exists(): + raise FileNotFoundError(f"token file {token_file} does not exist") + if os.access(token_file, os.W_OK) is False: + raise ValueError(f"tokenfile {token_file} is not writable") + return FilesystemTokenPersister(token_file) + + +class TestFilesystemTokenPersister: + """Mirrors TestNewFilesystemTokenPersiter from token-persistent-funcs_test.go.""" + + def test_persist_and_read_back(self, tmp_path): + """Write a token to a file and read it back.""" + token_path = str(tmp_path / "token") + Path(token_path).touch(mode=0o600) + + persister = new_filesystem_token_persister(token_path) + token = "a-token" + + persister.persist(token) + + content = Path(token_path).read_text() + assert content == token + + def test_persister_requires_existing_file(self, tmp_path): + """Persister raises FileNotFoundError for non-existent file.""" + token_path = str(tmp_path / "nonexistent") + with pytest.raises(FileNotFoundError): + new_filesystem_token_persister(token_path) + + def test_persister_requires_writable_file(self, tmp_path): + """Persister raises ValueError for read-only file.""" + token_path = str(tmp_path / "readonly") + Path(token_path).touch(mode=0o444) + + with pytest.raises(ValueError, match="not writable"): + new_filesystem_token_persister(token_path) + + def test_overwrite_existing_token(self, tmp_path): + """Persisting a new token overwrites the previous one.""" + token_path = str(tmp_path / "token") + Path(token_path).write_text("old-token") + + persister = new_filesystem_token_persister(token_path) + persister.persist("new-token") + + content = Path(token_path).read_text() + assert content == "new-token" + + def test_persist_empty_token(self, tmp_path): + """Persisting an empty token writes an empty file.""" + token_path = str(tmp_path / "token") + Path(token_path).touch(mode=0o600) + + persister = new_filesystem_token_persister(token_path) + persister.persist("") + + content = Path(token_path).read_text() + assert content == "" diff --git a/python/setup.py b/python/setup.py index c9d0298b..e979ea69 100644 --- a/python/setup.py +++ b/python/setup.py @@ -4,7 +4,9 @@ NAME = "metal-stack-api" REQUIRES = [ - "connectrpc>=0.10.0", + # this version needs to match the version specified in buf.gen.yaml + "connectrpc==0.10.1", + "protobuf>=7.0", "protovalidate>=1.2.0", ] @@ -24,9 +26,8 @@ 'Natural Language :: English', 'Operating System :: POSIX', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: 3.12', 'Programming Language :: Python :: 3.13', + 'Programming Language :: Python :: 3.14', ], include_package_data=True, )