Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add timestamp.valid evaluator #85

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 43 additions & 37 deletions gen/buf/validate/conformance/cases/repeated_pb2.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2


DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n-buf/validate/conformance/cases/repeated.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x38\x62uf/validate/conformance/cases/other_package/embed.proto\x1a\x1b\x62uf/validate/validate.proto\x1a\x19google/protobuf/any.proto\x1a\x1egoogle/protobuf/duration.proto\"\"\n\x05\x45mbed\x12\x19\n\x03val\x18\x01 \x01(\x03\x42\x07\xbaH\x04\"\x02 \x00R\x03val\" \n\x0cRepeatedNone\x12\x10\n\x03val\x18\x01 \x03(\x03R\x03val\"L\n\x11RepeatedEmbedNone\x12\x37\n\x03val\x18\x01 \x03(\x0b\x32%.buf.validate.conformance.cases.EmbedR\x03val\"f\n\x1dRepeatedEmbedCrossPackageNone\x12\x45\n\x03val\x18\x01 \x03(\x0b\x32\x33.buf.validate.conformance.cases.other_package.EmbedR\x03val\"P\n\x0bRepeatedMin\x12\x41\n\x03val\x18\x01 \x03(\x0b\x32%.buf.validate.conformance.cases.EmbedB\x08\xbaH\x05\x92\x01\x02\x08\x02R\x03val\")\n\x0bRepeatedMax\x12\x1a\n\x03val\x18\x01 \x03(\x01\x42\x08\xbaH\x05\x92\x01\x02\x10\x03R\x03val\".\n\x0eRepeatedMinMax\x12\x1c\n\x03val\x18\x01 \x03(\x0f\x42\n\xbaH\x07\x92\x01\x04\x08\x02\x10\x04R\x03val\"-\n\rRepeatedExact\x12\x1c\n\x03val\x18\x01 \x03(\rB\n\xbaH\x07\x92\x01\x04\x08\x03\x10\x03R\x03val\",\n\x0eRepeatedUnique\x12\x1a\n\x03val\x18\x01 \x03(\tB\x08\xbaH\x05\x92\x01\x02\x18\x01R\x03val\"5\n\x10RepeatedItemRule\x12!\n\x03val\x18\x01 \x03(\x02\x42\x0f\xbaH\x0c\x92\x01\t\"\x07\n\x05%\x00\x00\x00\x00R\x03val\"D\n\x13RepeatedItemPattern\x12-\n\x03val\x18\x01 \x03(\tB\x1b\xbaH\x18\x92\x01\x15\"\x13r\x11\x32\x0f(?i)^[a-z0-9]+$R\x03val\"Y\n\x11RepeatedEmbedSkip\x12\x44\n\x03val\x18\x01 \x03(\x0b\x32%.buf.validate.conformance.cases.EmbedB\x0b\xbaH\x08\x92\x01\x05\"\x03\xc0\x01\x01R\x03val\"8\n\x0eRepeatedItemIn\x12&\n\x03val\x18\x01 \x03(\tB\x14\xbaH\x11\x92\x01\x0e\"\x0cr\nR\x03\x66ooR\x03\x62\x61rR\x03val\";\n\x11RepeatedItemNotIn\x12&\n\x03val\x18\x01 \x03(\tB\x14\xbaH\x11\x92\x01\x0e\"\x0cr\nZ\x03\x66ooZ\x03\x62\x61rR\x03val\"Z\n\x0eRepeatedEnumIn\x12H\n\x03val\x18\x01 \x03(\x0e\x32&.buf.validate.conformance.cases.AnEnumB\x0e\xbaH\x0b\x92\x01\x08\"\x06\x82\x01\x03\x1a\x01\x00R\x03val\"]\n\x11RepeatedEnumNotIn\x12H\n\x03val\x18\x01 \x03(\x0e\x32&.buf.validate.conformance.cases.AnEnumB\x0e\xbaH\x0b\x92\x01\x08\"\x06\x82\x01\x03\"\x01\x00R\x03val\"\xe0\x01\n\x16RepeatedEmbeddedEnumIn\x12\x66\n\x03val\x18\x01 \x03(\x0e\x32\x44.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnumB\x0e\xbaH\x0b\x92\x01\x08\"\x06\x82\x01\x03\x1a\x01\x00R\x03val\"^\n\rAnotherInEnum\x12\x1f\n\x1b\x41NOTHER_IN_ENUM_UNSPECIFIED\x10\x00\x12\x15\n\x11\x41NOTHER_IN_ENUM_A\x10\x01\x12\x15\n\x11\x41NOTHER_IN_ENUM_B\x10\x02\"\xf8\x01\n\x19RepeatedEmbeddedEnumNotIn\x12l\n\x03val\x18\x01 \x03(\x0e\x32J.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnumB\x0e\xbaH\x0b\x92\x01\x08\"\x06\x82\x01\x03\"\x01\x00R\x03val\"m\n\x10\x41notherNotInEnum\x12#\n\x1f\x41NOTHER_NOT_IN_ENUM_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41NOTHER_NOT_IN_ENUM_A\x10\x01\x12\x19\n\x15\x41NOTHER_NOT_IN_ENUM_B\x10\x02\"r\n\rRepeatedAnyIn\x12\x61\n\x03val\x18\x01 \x03(\x0b\x32\x14.google.protobuf.AnyB9\xbaH6\x92\x01\x33\"1\xa2\x01.\x12,type.googleapis.com/google.protobuf.DurationR\x03val\"v\n\x10RepeatedAnyNotIn\x12\x62\n\x03val\x18\x01 \x03(\x0b\x32\x14.google.protobuf.AnyB:\xbaH7\x92\x01\x34\"2\xa2\x01/\x1a-type.googleapis.com/google.protobuf.TimestampR\x03val\":\n\x15RepeatedMinAndItemLen\x12!\n\x03val\x18\x01 \x03(\tB\x0f\xbaH\x0c\x92\x01\t\x08\x01\"\x05r\x03\x98\x01\x03R\x03val\"8\n\x18RepeatedMinAndMaxItemLen\x12\x1c\n\x03val\x18\x01 \x03(\tB\n\xbaH\x07\x92\x01\x04\x08\x01\x10\x03R\x03val\"R\n\x10RepeatedDuration\x12>\n\x03val\x18\x01 \x03(\x0b\x32\x19.google.protobuf.DurationB\x11\xbaH\x0e\x92\x01\x0b\"\t\xaa\x01\x06\x32\x04\x10\xc0\x84=R\x03val\"6\n\x13RepeatedExactIgnore\x12\x1f\n\x03val\x18\x01 \x03(\rB\r\xbaH\n\x92\x01\x04\x08\x03\x10\x03\xd0\x01\x01R\x03val*?\n\x06\x41nEnum\x12\x17\n\x13\x41N_ENUM_UNSPECIFIED\x10\x00\x12\r\n\tAN_ENUM_X\x10\x01\x12\r\n\tAN_ENUM_Y\x10\x02\x62\x06proto3')
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n-buf/validate/conformance/cases/repeated.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x38\x62uf/validate/conformance/cases/other_package/embed.proto\x1a\x1b\x62uf/validate/validate.proto\x1a\x19google/protobuf/any.proto\x1a\x1egoogle/protobuf/duration.proto\"\"\n\x05\x45mbed\x12\x19\n\x03val\x18\x01 \x01(\x03\x42\x07\xbaH\x04\"\x02 \x00R\x03val\" \n\x0cRepeatedNone\x12\x10\n\x03val\x18\x01 \x03(\x03R\x03val\"L\n\x11RepeatedEmbedNone\x12\x37\n\x03val\x18\x01 \x03(\x0b\x32%.buf.validate.conformance.cases.EmbedR\x03val\"f\n\x1dRepeatedEmbedCrossPackageNone\x12\x45\n\x03val\x18\x01 \x03(\x0b\x32\x33.buf.validate.conformance.cases.other_package.EmbedR\x03val\"P\n\x0bRepeatedMin\x12\x41\n\x03val\x18\x01 \x03(\x0b\x32%.buf.validate.conformance.cases.EmbedB\x08\xbaH\x05\x92\x01\x02\x08\x02R\x03val\")\n\x0bRepeatedMax\x12\x1a\n\x03val\x18\x01 \x03(\x01\x42\x08\xbaH\x05\x92\x01\x02\x10\x03R\x03val\".\n\x0eRepeatedMinMax\x12\x1c\n\x03val\x18\x01 \x03(\x0f\x42\n\xbaH\x07\x92\x01\x04\x08\x02\x10\x04R\x03val\"-\n\rRepeatedExact\x12\x1c\n\x03val\x18\x01 \x03(\rB\n\xbaH\x07\x92\x01\x04\x08\x03\x10\x03R\x03val\",\n\x0eRepeatedUnique\x12\x1a\n\x03val\x18\x01 \x03(\tB\x08\xbaH\x05\x92\x01\x02\x18\x01R\x03val\"H\n\x16RepeatedMultipleUnique\x12\x16\n\x01\x61\x18\x01 \x03(\tB\x08\xbaH\x05\x92\x01\x02\x18\x01R\x01\x61\x12\x16\n\x01\x62\x18\x02 \x03(\x05\x42\x08\xbaH\x05\x92\x01\x02\x18\x01R\x01\x62\"5\n\x10RepeatedItemRule\x12!\n\x03val\x18\x01 \x03(\x02\x42\x0f\xbaH\x0c\x92\x01\t\"\x07\n\x05%\x00\x00\x00\x00R\x03val\"D\n\x13RepeatedItemPattern\x12-\n\x03val\x18\x01 \x03(\tB\x1b\xbaH\x18\x92\x01\x15\"\x13r\x11\x32\x0f(?i)^[a-z0-9]+$R\x03val\"Y\n\x11RepeatedEmbedSkip\x12\x44\n\x03val\x18\x01 \x03(\x0b\x32%.buf.validate.conformance.cases.EmbedB\x0b\xbaH\x08\x92\x01\x05\"\x03\xc0\x01\x01R\x03val\"8\n\x0eRepeatedItemIn\x12&\n\x03val\x18\x01 \x03(\tB\x14\xbaH\x11\x92\x01\x0e\"\x0cr\nR\x03\x66ooR\x03\x62\x61rR\x03val\";\n\x11RepeatedItemNotIn\x12&\n\x03val\x18\x01 \x03(\tB\x14\xbaH\x11\x92\x01\x0e\"\x0cr\nZ\x03\x66ooZ\x03\x62\x61rR\x03val\"Z\n\x0eRepeatedEnumIn\x12H\n\x03val\x18\x01 \x03(\x0e\x32&.buf.validate.conformance.cases.AnEnumB\x0e\xbaH\x0b\x92\x01\x08\"\x06\x82\x01\x03\x1a\x01\x00R\x03val\"]\n\x11RepeatedEnumNotIn\x12H\n\x03val\x18\x01 \x03(\x0e\x32&.buf.validate.conformance.cases.AnEnumB\x0e\xbaH\x0b\x92\x01\x08\"\x06\x82\x01\x03\"\x01\x00R\x03val\"\xe0\x01\n\x16RepeatedEmbeddedEnumIn\x12\x66\n\x03val\x18\x01 \x03(\x0e\x32\x44.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnumB\x0e\xbaH\x0b\x92\x01\x08\"\x06\x82\x01\x03\x1a\x01\x00R\x03val\"^\n\rAnotherInEnum\x12\x1f\n\x1b\x41NOTHER_IN_ENUM_UNSPECIFIED\x10\x00\x12\x15\n\x11\x41NOTHER_IN_ENUM_A\x10\x01\x12\x15\n\x11\x41NOTHER_IN_ENUM_B\x10\x02\"\xf8\x01\n\x19RepeatedEmbeddedEnumNotIn\x12l\n\x03val\x18\x01 \x03(\x0e\x32J.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnumB\x0e\xbaH\x0b\x92\x01\x08\"\x06\x82\x01\x03\"\x01\x00R\x03val\"m\n\x10\x41notherNotInEnum\x12#\n\x1f\x41NOTHER_NOT_IN_ENUM_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41NOTHER_NOT_IN_ENUM_A\x10\x01\x12\x19\n\x15\x41NOTHER_NOT_IN_ENUM_B\x10\x02\"r\n\rRepeatedAnyIn\x12\x61\n\x03val\x18\x01 \x03(\x0b\x32\x14.google.protobuf.AnyB9\xbaH6\x92\x01\x33\"1\xa2\x01.\x12,type.googleapis.com/google.protobuf.DurationR\x03val\"v\n\x10RepeatedAnyNotIn\x12\x62\n\x03val\x18\x01 \x03(\x0b\x32\x14.google.protobuf.AnyB:\xbaH7\x92\x01\x34\"2\xa2\x01/\x1a-type.googleapis.com/google.protobuf.TimestampR\x03val\":\n\x15RepeatedMinAndItemLen\x12!\n\x03val\x18\x01 \x03(\tB\x0f\xbaH\x0c\x92\x01\t\x08\x01\"\x05r\x03\x98\x01\x03R\x03val\"8\n\x18RepeatedMinAndMaxItemLen\x12\x1c\n\x03val\x18\x01 \x03(\tB\n\xbaH\x07\x92\x01\x04\x08\x01\x10\x03R\x03val\"R\n\x10RepeatedDuration\x12>\n\x03val\x18\x01 \x03(\x0b\x32\x19.google.protobuf.DurationB\x11\xbaH\x0e\x92\x01\x0b\"\t\xaa\x01\x06\x32\x04\x10\xc0\x84=R\x03val\"6\n\x13RepeatedExactIgnore\x12\x1f\n\x03val\x18\x01 \x03(\rB\r\xbaH\n\x92\x01\x04\x08\x03\x10\x03\xd0\x01\x01R\x03val*?\n\x06\x41nEnum\x12\x17\n\x13\x41N_ENUM_UNSPECIFIED\x10\x00\x12\r\n\tAN_ENUM_X\x10\x01\x12\r\n\tAN_ENUM_Y\x10\x02\x62\x06proto3')

_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
Expand All @@ -51,6 +51,10 @@
_REPEATEDEXACT.fields_by_name['val']._serialized_options = b'\272H\007\222\001\004\010\003\020\003'
_REPEATEDUNIQUE.fields_by_name['val']._options = None
_REPEATEDUNIQUE.fields_by_name['val']._serialized_options = b'\272H\005\222\001\002\030\001'
_REPEATEDMULTIPLEUNIQUE.fields_by_name['a']._options = None
_REPEATEDMULTIPLEUNIQUE.fields_by_name['a']._serialized_options = b'\272H\005\222\001\002\030\001'
_REPEATEDMULTIPLEUNIQUE.fields_by_name['b']._options = None
_REPEATEDMULTIPLEUNIQUE.fields_by_name['b']._serialized_options = b'\272H\005\222\001\002\030\001'
_REPEATEDITEMRULE.fields_by_name['val']._options = None
_REPEATEDITEMRULE.fields_by_name['val']._serialized_options = b'\272H\014\222\001\t\"\007\n\005%\000\000\000\000'
_REPEATEDITEMPATTERN.fields_by_name['val']._options = None
Expand Down Expand Up @@ -81,8 +85,8 @@
_REPEATEDDURATION.fields_by_name['val']._serialized_options = b'\272H\016\222\001\013\"\t\252\001\0062\004\020\300\204='
_REPEATEDEXACTIGNORE.fields_by_name['val']._options = None
_REPEATEDEXACTIGNORE.fields_by_name['val']._serialized_options = b'\272H\n\222\001\004\010\003\020\003\320\001\001'
_globals['_ANENUM']._serialized_start=2239
_globals['_ANENUM']._serialized_end=2302
_globals['_ANENUM']._serialized_start=2313
_globals['_ANENUM']._serialized_end=2376
_globals['_EMBED']._serialized_start=227
_globals['_EMBED']._serialized_end=261
_globals['_REPEATEDNONE']._serialized_start=263
Expand All @@ -101,38 +105,40 @@
_globals['_REPEATEDEXACT']._serialized_end=697
_globals['_REPEATEDUNIQUE']._serialized_start=699
_globals['_REPEATEDUNIQUE']._serialized_end=743
_globals['_REPEATEDITEMRULE']._serialized_start=745
_globals['_REPEATEDITEMRULE']._serialized_end=798
_globals['_REPEATEDITEMPATTERN']._serialized_start=800
_globals['_REPEATEDITEMPATTERN']._serialized_end=868
_globals['_REPEATEDEMBEDSKIP']._serialized_start=870
_globals['_REPEATEDEMBEDSKIP']._serialized_end=959
_globals['_REPEATEDITEMIN']._serialized_start=961
_globals['_REPEATEDITEMIN']._serialized_end=1017
_globals['_REPEATEDITEMNOTIN']._serialized_start=1019
_globals['_REPEATEDITEMNOTIN']._serialized_end=1078
_globals['_REPEATEDENUMIN']._serialized_start=1080
_globals['_REPEATEDENUMIN']._serialized_end=1170
_globals['_REPEATEDENUMNOTIN']._serialized_start=1172
_globals['_REPEATEDENUMNOTIN']._serialized_end=1265
_globals['_REPEATEDEMBEDDEDENUMIN']._serialized_start=1268
_globals['_REPEATEDEMBEDDEDENUMIN']._serialized_end=1492
_globals['_REPEATEDEMBEDDEDENUMIN_ANOTHERINENUM']._serialized_start=1398
_globals['_REPEATEDEMBEDDEDENUMIN_ANOTHERINENUM']._serialized_end=1492
_globals['_REPEATEDEMBEDDEDENUMNOTIN']._serialized_start=1495
_globals['_REPEATEDEMBEDDEDENUMNOTIN']._serialized_end=1743
_globals['_REPEATEDEMBEDDEDENUMNOTIN_ANOTHERNOTINENUM']._serialized_start=1634
_globals['_REPEATEDEMBEDDEDENUMNOTIN_ANOTHERNOTINENUM']._serialized_end=1743
_globals['_REPEATEDANYIN']._serialized_start=1745
_globals['_REPEATEDANYIN']._serialized_end=1859
_globals['_REPEATEDANYNOTIN']._serialized_start=1861
_globals['_REPEATEDANYNOTIN']._serialized_end=1979
_globals['_REPEATEDMINANDITEMLEN']._serialized_start=1981
_globals['_REPEATEDMINANDITEMLEN']._serialized_end=2039
_globals['_REPEATEDMINANDMAXITEMLEN']._serialized_start=2041
_globals['_REPEATEDMINANDMAXITEMLEN']._serialized_end=2097
_globals['_REPEATEDDURATION']._serialized_start=2099
_globals['_REPEATEDDURATION']._serialized_end=2181
_globals['_REPEATEDEXACTIGNORE']._serialized_start=2183
_globals['_REPEATEDEXACTIGNORE']._serialized_end=2237
_globals['_REPEATEDMULTIPLEUNIQUE']._serialized_start=745
_globals['_REPEATEDMULTIPLEUNIQUE']._serialized_end=817
_globals['_REPEATEDITEMRULE']._serialized_start=819
_globals['_REPEATEDITEMRULE']._serialized_end=872
_globals['_REPEATEDITEMPATTERN']._serialized_start=874
_globals['_REPEATEDITEMPATTERN']._serialized_end=942
_globals['_REPEATEDEMBEDSKIP']._serialized_start=944
_globals['_REPEATEDEMBEDSKIP']._serialized_end=1033
_globals['_REPEATEDITEMIN']._serialized_start=1035
_globals['_REPEATEDITEMIN']._serialized_end=1091
_globals['_REPEATEDITEMNOTIN']._serialized_start=1093
_globals['_REPEATEDITEMNOTIN']._serialized_end=1152
_globals['_REPEATEDENUMIN']._serialized_start=1154
_globals['_REPEATEDENUMIN']._serialized_end=1244
_globals['_REPEATEDENUMNOTIN']._serialized_start=1246
_globals['_REPEATEDENUMNOTIN']._serialized_end=1339
_globals['_REPEATEDEMBEDDEDENUMIN']._serialized_start=1342
_globals['_REPEATEDEMBEDDEDENUMIN']._serialized_end=1566
_globals['_REPEATEDEMBEDDEDENUMIN_ANOTHERINENUM']._serialized_start=1472
_globals['_REPEATEDEMBEDDEDENUMIN_ANOTHERINENUM']._serialized_end=1566
_globals['_REPEATEDEMBEDDEDENUMNOTIN']._serialized_start=1569
_globals['_REPEATEDEMBEDDEDENUMNOTIN']._serialized_end=1817
_globals['_REPEATEDEMBEDDEDENUMNOTIN_ANOTHERNOTINENUM']._serialized_start=1708
_globals['_REPEATEDEMBEDDEDENUMNOTIN_ANOTHERNOTINENUM']._serialized_end=1817
_globals['_REPEATEDANYIN']._serialized_start=1819
_globals['_REPEATEDANYIN']._serialized_end=1933
_globals['_REPEATEDANYNOTIN']._serialized_start=1935
_globals['_REPEATEDANYNOTIN']._serialized_end=2053
_globals['_REPEATEDMINANDITEMLEN']._serialized_start=2055
_globals['_REPEATEDMINANDITEMLEN']._serialized_end=2113
_globals['_REPEATEDMINANDMAXITEMLEN']._serialized_start=2115
_globals['_REPEATEDMINANDMAXITEMLEN']._serialized_end=2171
_globals['_REPEATEDDURATION']._serialized_start=2173
_globals['_REPEATEDDURATION']._serialized_end=2255
_globals['_REPEATEDEXACTIGNORE']._serialized_start=2257
_globals['_REPEATEDEXACTIGNORE']._serialized_end=2311
# @@protoc_insertion_point(module_scope)
8 changes: 8 additions & 0 deletions gen/buf/validate/conformance/cases/repeated_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@ class RepeatedUnique(_message.Message):
val: _containers.RepeatedScalarFieldContainer[str]
def __init__(self, val: _Optional[_Iterable[str]] = ...) -> None: ...

class RepeatedMultipleUnique(_message.Message):
__slots__ = ["a", "b"]
A_FIELD_NUMBER: _ClassVar[int]
B_FIELD_NUMBER: _ClassVar[int]
a: _containers.RepeatedScalarFieldContainer[str]
b: _containers.RepeatedScalarFieldContainer[int]
def __init__(self, a: _Optional[_Iterable[str]] = ..., b: _Optional[_Iterable[int]] = ...) -> None: ...

class RepeatedItemRule(_message.Message):
__slots__ = ["val"]
VAL_FIELD_NUMBER: _ClassVar[int]
Expand Down
Loading
Loading