diff --git a/Makefile b/Makefile index 86558adc..b2a1efb2 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ ADD_LICENSE_HEADER := $(BIN)/license-header \ --license-type apache \ --copyright-holder "Buf Technologies, Inc." \ --year-range "2023-2025" -PROTOVALIDATE_VERSION ?= v0.10.3 +PROTOVALIDATE_VERSION ?= v0.10.4 .PHONY: help help: ## Describe useful make targets diff --git a/gen/buf/validate/conformance/cases/required_field_proto2_pb2.py b/gen/buf/validate/conformance/cases/required_field_proto2_pb2.py index 0f969fc1..3888f3cd 100644 --- a/gen/buf/validate/conformance/cases/required_field_proto2_pb2.py +++ b/gen/buf/validate/conformance/cases/required_field_proto2_pb2.py @@ -39,7 +39,7 @@ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n:buf/validate/conformance/cases/required_field_proto2.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\";\n\x1cRequiredProto2ScalarOptional\x12\x1b\n\x03val\x18\x01 \x01(\tB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\"G\n#RequiredProto2ScalarOptionalDefault\x12 \n\x03val\x18\x01 \x01(\t:\x03\x66ooB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\"8\n\x1cRequiredProto2ScalarRequired\x12\x18\n\x03val\x18\x01 \x02(\tB\x06\xbaH\x03\xc8\x01\x01R\x03val\"\x85\x01\n\x15RequiredProto2Message\x12S\n\x03val\x18\x01 \x01(\x0b\x32\x39.buf.validate.conformance.cases.RequiredProto2Message.MsgB\x06\xbaH\x03\xc8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"D\n\x13RequiredProto2Oneof\x12\x16\n\x01\x61\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01H\x00R\x01\x61\x12\x0e\n\x01\x62\x18\x02 \x01(\tH\x00R\x01\x62\x42\x05\n\x03val\"2\n\x16RequiredProto2Repeated\x12\x18\n\x03val\x18\x01 \x03(\tB\x06\xbaH\x03\xc8\x01\x01R\x03val\"\xa1\x01\n\x11RequiredProto2Map\x12T\n\x03val\x18\x01 \x03(\x0b\x32:.buf.validate.conformance.cases.RequiredProto2Map.ValEntryB\x06\xbaH\x03\xc8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x42\xda\x01\n\"com.buf.validate.conformance.casesB\x18RequiredFieldProto2ProtoP\x01\xa2\x02\x04\x42VCC\xaa\x02\x1e\x42uf.Validate.Conformance.Cases\xca\x02\x1e\x42uf\\Validate\\Conformance\\Cases\xe2\x02*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\xea\x02!Buf::Validate::Conformance::Cases') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n:buf/validate/conformance/cases/required_field_proto2.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"8\n\x1cRequiredProto2ScalarOptional\x12\x18\n\x03val\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01R\x03val\"G\n(RequiredProto2ScalarOptionalIgnoreAlways\x12\x1b\n\x03val\x18\x01 \x01(\tB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\"D\n#RequiredProto2ScalarOptionalDefault\x12\x1d\n\x03val\x18\x01 \x01(\t:\x03\x66ooB\x06\xbaH\x03\xc8\x01\x01R\x03val\"S\n/RequiredProto2ScalarOptionalDefaultIgnoreAlways\x12 \n\x03val\x18\x01 \x01(\t:\x03\x66ooB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\"8\n\x1cRequiredProto2ScalarRequired\x12\x18\n\x03val\x18\x01 \x02(\tB\x06\xbaH\x03\xc8\x01\x01R\x03val\"\x85\x01\n\x15RequiredProto2Message\x12S\n\x03val\x18\x01 \x01(\x0b\x32\x39.buf.validate.conformance.cases.RequiredProto2Message.MsgB\x06\xbaH\x03\xc8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xa0\x01\n!RequiredProto2MessageIgnoreAlways\x12\x62\n\x03val\x18\x01 \x01(\x0b\x32\x45.buf.validate.conformance.cases.RequiredProto2MessageIgnoreAlways.MsgB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"D\n\x13RequiredProto2Oneof\x12\x16\n\x01\x61\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01H\x00R\x01\x61\x12\x0e\n\x01\x62\x18\x02 \x01(\tH\x00R\x01\x62\x42\x05\n\x03val\"S\n\x1fRequiredProto2OneofIgnoreAlways\x12\x19\n\x01\x61\x18\x01 \x01(\tB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03H\x00R\x01\x61\x12\x0e\n\x01\x62\x18\x02 \x01(\tH\x00R\x01\x62\x42\x05\n\x03val\"2\n\x16RequiredProto2Repeated\x12\x18\n\x03val\x18\x01 \x03(\tB\x06\xbaH\x03\xc8\x01\x01R\x03val\"A\n\"RequiredProto2RepeatedIgnoreAlways\x12\x1b\n\x03val\x18\x01 \x03(\tB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\"\xa1\x01\n\x11RequiredProto2Map\x12T\n\x03val\x18\x01 \x03(\x0b\x32:.buf.validate.conformance.cases.RequiredProto2Map.ValEntryB\x06\xbaH\x03\xc8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xbc\x01\n\x1dRequiredProto2MapIgnoreAlways\x12\x63\n\x03val\x18\x01 \x03(\x0b\x32\x46.buf.validate.conformance.cases.RequiredProto2MapIgnoreAlways.ValEntryB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x42\xda\x01\n\"com.buf.validate.conformance.casesB\x18RequiredFieldProto2ProtoP\x01\xa2\x02\x04\x42VCC\xaa\x02\x1e\x42uf.Validate.Conformance.Cases\xca\x02\x1e\x42uf\\Validate\\Conformance\\Cases\xe2\x02*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\xea\x02!Buf::Validate::Conformance::Cases') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -48,37 +48,67 @@ _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'\n\"com.buf.validate.conformance.casesB\030RequiredFieldProto2ProtoP\001\242\002\004BVCC\252\002\036Buf.Validate.Conformance.Cases\312\002\036Buf\\Validate\\Conformance\\Cases\342\002*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\352\002!Buf::Validate::Conformance::Cases' _globals['_REQUIREDPROTO2SCALAROPTIONAL'].fields_by_name['val']._loaded_options = None - _globals['_REQUIREDPROTO2SCALAROPTIONAL'].fields_by_name['val']._serialized_options = b'\272H\006\310\001\001\330\001\003' + _globals['_REQUIREDPROTO2SCALAROPTIONAL'].fields_by_name['val']._serialized_options = b'\272H\003\310\001\001' + _globals['_REQUIREDPROTO2SCALAROPTIONALIGNOREALWAYS'].fields_by_name['val']._loaded_options = None + _globals['_REQUIREDPROTO2SCALAROPTIONALIGNOREALWAYS'].fields_by_name['val']._serialized_options = b'\272H\006\310\001\001\330\001\003' _globals['_REQUIREDPROTO2SCALAROPTIONALDEFAULT'].fields_by_name['val']._loaded_options = None - _globals['_REQUIREDPROTO2SCALAROPTIONALDEFAULT'].fields_by_name['val']._serialized_options = b'\272H\006\310\001\001\330\001\003' + _globals['_REQUIREDPROTO2SCALAROPTIONALDEFAULT'].fields_by_name['val']._serialized_options = b'\272H\003\310\001\001' + _globals['_REQUIREDPROTO2SCALAROPTIONALDEFAULTIGNOREALWAYS'].fields_by_name['val']._loaded_options = None + _globals['_REQUIREDPROTO2SCALAROPTIONALDEFAULTIGNOREALWAYS'].fields_by_name['val']._serialized_options = b'\272H\006\310\001\001\330\001\003' _globals['_REQUIREDPROTO2SCALARREQUIRED'].fields_by_name['val']._loaded_options = None _globals['_REQUIREDPROTO2SCALARREQUIRED'].fields_by_name['val']._serialized_options = b'\272H\003\310\001\001' _globals['_REQUIREDPROTO2MESSAGE'].fields_by_name['val']._loaded_options = None _globals['_REQUIREDPROTO2MESSAGE'].fields_by_name['val']._serialized_options = b'\272H\003\310\001\001' + _globals['_REQUIREDPROTO2MESSAGEIGNOREALWAYS'].fields_by_name['val']._loaded_options = None + _globals['_REQUIREDPROTO2MESSAGEIGNOREALWAYS'].fields_by_name['val']._serialized_options = b'\272H\006\310\001\001\330\001\003' _globals['_REQUIREDPROTO2ONEOF'].fields_by_name['a']._loaded_options = None _globals['_REQUIREDPROTO2ONEOF'].fields_by_name['a']._serialized_options = b'\272H\003\310\001\001' + _globals['_REQUIREDPROTO2ONEOFIGNOREALWAYS'].fields_by_name['a']._loaded_options = None + _globals['_REQUIREDPROTO2ONEOFIGNOREALWAYS'].fields_by_name['a']._serialized_options = b'\272H\006\310\001\001\330\001\003' _globals['_REQUIREDPROTO2REPEATED'].fields_by_name['val']._loaded_options = None _globals['_REQUIREDPROTO2REPEATED'].fields_by_name['val']._serialized_options = b'\272H\003\310\001\001' + _globals['_REQUIREDPROTO2REPEATEDIGNOREALWAYS'].fields_by_name['val']._loaded_options = None + _globals['_REQUIREDPROTO2REPEATEDIGNOREALWAYS'].fields_by_name['val']._serialized_options = b'\272H\006\310\001\001\330\001\003' _globals['_REQUIREDPROTO2MAP_VALENTRY']._loaded_options = None _globals['_REQUIREDPROTO2MAP_VALENTRY']._serialized_options = b'8\001' _globals['_REQUIREDPROTO2MAP'].fields_by_name['val']._loaded_options = None _globals['_REQUIREDPROTO2MAP'].fields_by_name['val']._serialized_options = b'\272H\003\310\001\001' + _globals['_REQUIREDPROTO2MAPIGNOREALWAYS_VALENTRY']._loaded_options = None + _globals['_REQUIREDPROTO2MAPIGNOREALWAYS_VALENTRY']._serialized_options = b'8\001' + _globals['_REQUIREDPROTO2MAPIGNOREALWAYS'].fields_by_name['val']._loaded_options = None + _globals['_REQUIREDPROTO2MAPIGNOREALWAYS'].fields_by_name['val']._serialized_options = b'\272H\006\310\001\001\330\001\003' _globals['_REQUIREDPROTO2SCALAROPTIONAL']._serialized_start=123 - _globals['_REQUIREDPROTO2SCALAROPTIONAL']._serialized_end=182 - _globals['_REQUIREDPROTO2SCALAROPTIONALDEFAULT']._serialized_start=184 - _globals['_REQUIREDPROTO2SCALAROPTIONALDEFAULT']._serialized_end=255 - _globals['_REQUIREDPROTO2SCALARREQUIRED']._serialized_start=257 - _globals['_REQUIREDPROTO2SCALARREQUIRED']._serialized_end=313 - _globals['_REQUIREDPROTO2MESSAGE']._serialized_start=316 - _globals['_REQUIREDPROTO2MESSAGE']._serialized_end=449 - _globals['_REQUIREDPROTO2MESSAGE_MSG']._serialized_start=426 - _globals['_REQUIREDPROTO2MESSAGE_MSG']._serialized_end=449 - _globals['_REQUIREDPROTO2ONEOF']._serialized_start=451 - _globals['_REQUIREDPROTO2ONEOF']._serialized_end=519 - _globals['_REQUIREDPROTO2REPEATED']._serialized_start=521 - _globals['_REQUIREDPROTO2REPEATED']._serialized_end=571 - _globals['_REQUIREDPROTO2MAP']._serialized_start=574 - _globals['_REQUIREDPROTO2MAP']._serialized_end=735 - _globals['_REQUIREDPROTO2MAP_VALENTRY']._serialized_start=681 - _globals['_REQUIREDPROTO2MAP_VALENTRY']._serialized_end=735 + _globals['_REQUIREDPROTO2SCALAROPTIONAL']._serialized_end=179 + _globals['_REQUIREDPROTO2SCALAROPTIONALIGNOREALWAYS']._serialized_start=181 + _globals['_REQUIREDPROTO2SCALAROPTIONALIGNOREALWAYS']._serialized_end=252 + _globals['_REQUIREDPROTO2SCALAROPTIONALDEFAULT']._serialized_start=254 + _globals['_REQUIREDPROTO2SCALAROPTIONALDEFAULT']._serialized_end=322 + _globals['_REQUIREDPROTO2SCALAROPTIONALDEFAULTIGNOREALWAYS']._serialized_start=324 + _globals['_REQUIREDPROTO2SCALAROPTIONALDEFAULTIGNOREALWAYS']._serialized_end=407 + _globals['_REQUIREDPROTO2SCALARREQUIRED']._serialized_start=409 + _globals['_REQUIREDPROTO2SCALARREQUIRED']._serialized_end=465 + _globals['_REQUIREDPROTO2MESSAGE']._serialized_start=468 + _globals['_REQUIREDPROTO2MESSAGE']._serialized_end=601 + _globals['_REQUIREDPROTO2MESSAGE_MSG']._serialized_start=578 + _globals['_REQUIREDPROTO2MESSAGE_MSG']._serialized_end=601 + _globals['_REQUIREDPROTO2MESSAGEIGNOREALWAYS']._serialized_start=604 + _globals['_REQUIREDPROTO2MESSAGEIGNOREALWAYS']._serialized_end=764 + _globals['_REQUIREDPROTO2MESSAGEIGNOREALWAYS_MSG']._serialized_start=578 + _globals['_REQUIREDPROTO2MESSAGEIGNOREALWAYS_MSG']._serialized_end=601 + _globals['_REQUIREDPROTO2ONEOF']._serialized_start=766 + _globals['_REQUIREDPROTO2ONEOF']._serialized_end=834 + _globals['_REQUIREDPROTO2ONEOFIGNOREALWAYS']._serialized_start=836 + _globals['_REQUIREDPROTO2ONEOFIGNOREALWAYS']._serialized_end=919 + _globals['_REQUIREDPROTO2REPEATED']._serialized_start=921 + _globals['_REQUIREDPROTO2REPEATED']._serialized_end=971 + _globals['_REQUIREDPROTO2REPEATEDIGNOREALWAYS']._serialized_start=973 + _globals['_REQUIREDPROTO2REPEATEDIGNOREALWAYS']._serialized_end=1038 + _globals['_REQUIREDPROTO2MAP']._serialized_start=1041 + _globals['_REQUIREDPROTO2MAP']._serialized_end=1202 + _globals['_REQUIREDPROTO2MAP_VALENTRY']._serialized_start=1148 + _globals['_REQUIREDPROTO2MAP_VALENTRY']._serialized_end=1202 + _globals['_REQUIREDPROTO2MAPIGNOREALWAYS']._serialized_start=1205 + _globals['_REQUIREDPROTO2MAPIGNOREALWAYS']._serialized_end=1393 + _globals['_REQUIREDPROTO2MAPIGNOREALWAYS_VALENTRY']._serialized_start=1148 + _globals['_REQUIREDPROTO2MAPIGNOREALWAYS_VALENTRY']._serialized_end=1202 # @@protoc_insertion_point(module_scope) diff --git a/gen/buf/validate/conformance/cases/required_field_proto2_pb2.pyi b/gen/buf/validate/conformance/cases/required_field_proto2_pb2.pyi index baab1e25..ee398420 100644 --- a/gen/buf/validate/conformance/cases/required_field_proto2_pb2.pyi +++ b/gen/buf/validate/conformance/cases/required_field_proto2_pb2.pyi @@ -26,12 +26,24 @@ class RequiredProto2ScalarOptional(_message.Message): val: str def __init__(self, val: _Optional[str] = ...) -> None: ... +class RequiredProto2ScalarOptionalIgnoreAlways(_message.Message): + __slots__ = ("val",) + VAL_FIELD_NUMBER: _ClassVar[int] + val: str + def __init__(self, val: _Optional[str] = ...) -> None: ... + class RequiredProto2ScalarOptionalDefault(_message.Message): __slots__ = ("val",) VAL_FIELD_NUMBER: _ClassVar[int] val: str def __init__(self, val: _Optional[str] = ...) -> None: ... +class RequiredProto2ScalarOptionalDefaultIgnoreAlways(_message.Message): + __slots__ = ("val",) + VAL_FIELD_NUMBER: _ClassVar[int] + val: str + def __init__(self, val: _Optional[str] = ...) -> None: ... + class RequiredProto2ScalarRequired(_message.Message): __slots__ = ("val",) VAL_FIELD_NUMBER: _ClassVar[int] @@ -49,6 +61,17 @@ class RequiredProto2Message(_message.Message): val: RequiredProto2Message.Msg def __init__(self, val: _Optional[_Union[RequiredProto2Message.Msg, _Mapping]] = ...) -> None: ... +class RequiredProto2MessageIgnoreAlways(_message.Message): + __slots__ = ("val",) + class Msg(_message.Message): + __slots__ = ("val",) + VAL_FIELD_NUMBER: _ClassVar[int] + val: str + def __init__(self, val: _Optional[str] = ...) -> None: ... + VAL_FIELD_NUMBER: _ClassVar[int] + val: RequiredProto2MessageIgnoreAlways.Msg + def __init__(self, val: _Optional[_Union[RequiredProto2MessageIgnoreAlways.Msg, _Mapping]] = ...) -> None: ... + class RequiredProto2Oneof(_message.Message): __slots__ = ("a", "b") A_FIELD_NUMBER: _ClassVar[int] @@ -57,12 +80,26 @@ class RequiredProto2Oneof(_message.Message): b: str def __init__(self, a: _Optional[str] = ..., b: _Optional[str] = ...) -> None: ... +class RequiredProto2OneofIgnoreAlways(_message.Message): + __slots__ = ("a", "b") + A_FIELD_NUMBER: _ClassVar[int] + B_FIELD_NUMBER: _ClassVar[int] + a: str + b: str + def __init__(self, a: _Optional[str] = ..., b: _Optional[str] = ...) -> None: ... + class RequiredProto2Repeated(_message.Message): __slots__ = ("val",) VAL_FIELD_NUMBER: _ClassVar[int] val: _containers.RepeatedScalarFieldContainer[str] def __init__(self, val: _Optional[_Iterable[str]] = ...) -> None: ... +class RequiredProto2RepeatedIgnoreAlways(_message.Message): + __slots__ = ("val",) + VAL_FIELD_NUMBER: _ClassVar[int] + val: _containers.RepeatedScalarFieldContainer[str] + def __init__(self, val: _Optional[_Iterable[str]] = ...) -> None: ... + class RequiredProto2Map(_message.Message): __slots__ = ("val",) class ValEntry(_message.Message): @@ -75,3 +112,16 @@ class RequiredProto2Map(_message.Message): VAL_FIELD_NUMBER: _ClassVar[int] val: _containers.ScalarMap[str, str] def __init__(self, val: _Optional[_Mapping[str, str]] = ...) -> None: ... + +class RequiredProto2MapIgnoreAlways(_message.Message): + __slots__ = ("val",) + class ValEntry(_message.Message): + __slots__ = ("key", "value") + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + VAL_FIELD_NUMBER: _ClassVar[int] + val: _containers.ScalarMap[str, str] + def __init__(self, val: _Optional[_Mapping[str, str]] = ...) -> None: ... diff --git a/gen/buf/validate/conformance/cases/required_field_proto3_pb2.py b/gen/buf/validate/conformance/cases/required_field_proto3_pb2.py index 105042fc..ca360a5a 100644 --- a/gen/buf/validate/conformance/cases/required_field_proto3_pb2.py +++ b/gen/buf/validate/conformance/cases/required_field_proto3_pb2.py @@ -39,7 +39,7 @@ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n:buf/validate/conformance/cases/required_field_proto3.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"0\n\x14RequiredProto3Scalar\x12\x18\n\x03val\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01R\x03val\"E\n\x1cRequiredProto3OptionalScalar\x12\x1d\n\x03val\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01H\x00R\x03val\x88\x01\x01\x42\x06\n\x04_val\"\x85\x01\n\x15RequiredProto3Message\x12S\n\x03val\x18\x01 \x01(\x0b\x32\x39.buf.validate.conformance.cases.RequiredProto3Message.MsgB\x06\xbaH\x03\xc8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"D\n\x13RequiredProto3OneOf\x12\x16\n\x01\x61\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01H\x00R\x01\x61\x12\x0e\n\x01\x62\x18\x02 \x01(\tH\x00R\x01\x62\x42\x05\n\x03val\"2\n\x16RequiredProto3Repeated\x12\x18\n\x03val\x18\x01 \x03(\tB\x06\xbaH\x03\xc8\x01\x01R\x03val\"\xa1\x01\n\x11RequiredProto3Map\x12T\n\x03val\x18\x01 \x03(\x0b\x32:.buf.validate.conformance.cases.RequiredProto3Map.ValEntryB\x06\xbaH\x03\xc8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x42\xda\x01\n\"com.buf.validate.conformance.casesB\x18RequiredFieldProto3ProtoP\x01\xa2\x02\x04\x42VCC\xaa\x02\x1e\x42uf.Validate.Conformance.Cases\xca\x02\x1e\x42uf\\Validate\\Conformance\\Cases\xe2\x02*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\xea\x02!Buf::Validate::Conformance::Casesb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n:buf/validate/conformance/cases/required_field_proto3.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"0\n\x14RequiredProto3Scalar\x12\x18\n\x03val\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01R\x03val\"?\n RequiredProto3ScalarIgnoreAlways\x12\x1b\n\x03val\x18\x01 \x01(\tB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\"E\n\x1cRequiredProto3OptionalScalar\x12\x1d\n\x03val\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01H\x00R\x03val\x88\x01\x01\x42\x06\n\x04_val\"T\n(RequiredProto3OptionalScalarIgnoreAlways\x12 \n\x03val\x18\x01 \x01(\tB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03H\x00R\x03val\x88\x01\x01\x42\x06\n\x04_val\"\x85\x01\n\x15RequiredProto3Message\x12S\n\x03val\x18\x01 \x01(\x0b\x32\x39.buf.validate.conformance.cases.RequiredProto3Message.MsgB\x06\xbaH\x03\xc8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xa0\x01\n!RequiredProto3MessageIgnoreAlways\x12\x62\n\x03val\x18\x01 \x01(\x0b\x32\x45.buf.validate.conformance.cases.RequiredProto3MessageIgnoreAlways.MsgB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"D\n\x13RequiredProto3OneOf\x12\x16\n\x01\x61\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01H\x00R\x01\x61\x12\x0e\n\x01\x62\x18\x02 \x01(\tH\x00R\x01\x62\x42\x05\n\x03val\"S\n\x1fRequiredProto3OneOfIgnoreAlways\x12\x19\n\x01\x61\x18\x01 \x01(\tB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03H\x00R\x01\x61\x12\x0e\n\x01\x62\x18\x02 \x01(\tH\x00R\x01\x62\x42\x05\n\x03val\"2\n\x16RequiredProto3Repeated\x12\x18\n\x03val\x18\x01 \x03(\tB\x06\xbaH\x03\xc8\x01\x01R\x03val\"A\n\"RequiredProto3RepeatedIgnoreAlways\x12\x1b\n\x03val\x18\x01 \x03(\tB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\"\xa1\x01\n\x11RequiredProto3Map\x12T\n\x03val\x18\x01 \x03(\x0b\x32:.buf.validate.conformance.cases.RequiredProto3Map.ValEntryB\x06\xbaH\x03\xc8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xbc\x01\n\x1dRequiredProto3MapIgnoreAlways\x12\x63\n\x03val\x18\x01 \x03(\x0b\x32\x46.buf.validate.conformance.cases.RequiredProto3MapIgnoreAlways.ValEntryB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x42\xda\x01\n\"com.buf.validate.conformance.casesB\x18RequiredFieldProto3ProtoP\x01\xa2\x02\x04\x42VCC\xaa\x02\x1e\x42uf.Validate.Conformance.Cases\xca\x02\x1e\x42uf\\Validate\\Conformance\\Cases\xe2\x02*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\xea\x02!Buf::Validate::Conformance::Casesb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -49,32 +49,62 @@ _globals['DESCRIPTOR']._serialized_options = b'\n\"com.buf.validate.conformance.casesB\030RequiredFieldProto3ProtoP\001\242\002\004BVCC\252\002\036Buf.Validate.Conformance.Cases\312\002\036Buf\\Validate\\Conformance\\Cases\342\002*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\352\002!Buf::Validate::Conformance::Cases' _globals['_REQUIREDPROTO3SCALAR'].fields_by_name['val']._loaded_options = None _globals['_REQUIREDPROTO3SCALAR'].fields_by_name['val']._serialized_options = b'\272H\003\310\001\001' + _globals['_REQUIREDPROTO3SCALARIGNOREALWAYS'].fields_by_name['val']._loaded_options = None + _globals['_REQUIREDPROTO3SCALARIGNOREALWAYS'].fields_by_name['val']._serialized_options = b'\272H\006\310\001\001\330\001\003' _globals['_REQUIREDPROTO3OPTIONALSCALAR'].fields_by_name['val']._loaded_options = None _globals['_REQUIREDPROTO3OPTIONALSCALAR'].fields_by_name['val']._serialized_options = b'\272H\003\310\001\001' + _globals['_REQUIREDPROTO3OPTIONALSCALARIGNOREALWAYS'].fields_by_name['val']._loaded_options = None + _globals['_REQUIREDPROTO3OPTIONALSCALARIGNOREALWAYS'].fields_by_name['val']._serialized_options = b'\272H\006\310\001\001\330\001\003' _globals['_REQUIREDPROTO3MESSAGE'].fields_by_name['val']._loaded_options = None _globals['_REQUIREDPROTO3MESSAGE'].fields_by_name['val']._serialized_options = b'\272H\003\310\001\001' + _globals['_REQUIREDPROTO3MESSAGEIGNOREALWAYS'].fields_by_name['val']._loaded_options = None + _globals['_REQUIREDPROTO3MESSAGEIGNOREALWAYS'].fields_by_name['val']._serialized_options = b'\272H\006\310\001\001\330\001\003' _globals['_REQUIREDPROTO3ONEOF'].fields_by_name['a']._loaded_options = None _globals['_REQUIREDPROTO3ONEOF'].fields_by_name['a']._serialized_options = b'\272H\003\310\001\001' + _globals['_REQUIREDPROTO3ONEOFIGNOREALWAYS'].fields_by_name['a']._loaded_options = None + _globals['_REQUIREDPROTO3ONEOFIGNOREALWAYS'].fields_by_name['a']._serialized_options = b'\272H\006\310\001\001\330\001\003' _globals['_REQUIREDPROTO3REPEATED'].fields_by_name['val']._loaded_options = None _globals['_REQUIREDPROTO3REPEATED'].fields_by_name['val']._serialized_options = b'\272H\003\310\001\001' + _globals['_REQUIREDPROTO3REPEATEDIGNOREALWAYS'].fields_by_name['val']._loaded_options = None + _globals['_REQUIREDPROTO3REPEATEDIGNOREALWAYS'].fields_by_name['val']._serialized_options = b'\272H\006\310\001\001\330\001\003' _globals['_REQUIREDPROTO3MAP_VALENTRY']._loaded_options = None _globals['_REQUIREDPROTO3MAP_VALENTRY']._serialized_options = b'8\001' _globals['_REQUIREDPROTO3MAP'].fields_by_name['val']._loaded_options = None _globals['_REQUIREDPROTO3MAP'].fields_by_name['val']._serialized_options = b'\272H\003\310\001\001' + _globals['_REQUIREDPROTO3MAPIGNOREALWAYS_VALENTRY']._loaded_options = None + _globals['_REQUIREDPROTO3MAPIGNOREALWAYS_VALENTRY']._serialized_options = b'8\001' + _globals['_REQUIREDPROTO3MAPIGNOREALWAYS'].fields_by_name['val']._loaded_options = None + _globals['_REQUIREDPROTO3MAPIGNOREALWAYS'].fields_by_name['val']._serialized_options = b'\272H\006\310\001\001\330\001\003' _globals['_REQUIREDPROTO3SCALAR']._serialized_start=123 _globals['_REQUIREDPROTO3SCALAR']._serialized_end=171 - _globals['_REQUIREDPROTO3OPTIONALSCALAR']._serialized_start=173 - _globals['_REQUIREDPROTO3OPTIONALSCALAR']._serialized_end=242 - _globals['_REQUIREDPROTO3MESSAGE']._serialized_start=245 - _globals['_REQUIREDPROTO3MESSAGE']._serialized_end=378 - _globals['_REQUIREDPROTO3MESSAGE_MSG']._serialized_start=355 - _globals['_REQUIREDPROTO3MESSAGE_MSG']._serialized_end=378 - _globals['_REQUIREDPROTO3ONEOF']._serialized_start=380 - _globals['_REQUIREDPROTO3ONEOF']._serialized_end=448 - _globals['_REQUIREDPROTO3REPEATED']._serialized_start=450 - _globals['_REQUIREDPROTO3REPEATED']._serialized_end=500 - _globals['_REQUIREDPROTO3MAP']._serialized_start=503 - _globals['_REQUIREDPROTO3MAP']._serialized_end=664 - _globals['_REQUIREDPROTO3MAP_VALENTRY']._serialized_start=610 - _globals['_REQUIREDPROTO3MAP_VALENTRY']._serialized_end=664 + _globals['_REQUIREDPROTO3SCALARIGNOREALWAYS']._serialized_start=173 + _globals['_REQUIREDPROTO3SCALARIGNOREALWAYS']._serialized_end=236 + _globals['_REQUIREDPROTO3OPTIONALSCALAR']._serialized_start=238 + _globals['_REQUIREDPROTO3OPTIONALSCALAR']._serialized_end=307 + _globals['_REQUIREDPROTO3OPTIONALSCALARIGNOREALWAYS']._serialized_start=309 + _globals['_REQUIREDPROTO3OPTIONALSCALARIGNOREALWAYS']._serialized_end=393 + _globals['_REQUIREDPROTO3MESSAGE']._serialized_start=396 + _globals['_REQUIREDPROTO3MESSAGE']._serialized_end=529 + _globals['_REQUIREDPROTO3MESSAGE_MSG']._serialized_start=506 + _globals['_REQUIREDPROTO3MESSAGE_MSG']._serialized_end=529 + _globals['_REQUIREDPROTO3MESSAGEIGNOREALWAYS']._serialized_start=532 + _globals['_REQUIREDPROTO3MESSAGEIGNOREALWAYS']._serialized_end=692 + _globals['_REQUIREDPROTO3MESSAGEIGNOREALWAYS_MSG']._serialized_start=506 + _globals['_REQUIREDPROTO3MESSAGEIGNOREALWAYS_MSG']._serialized_end=529 + _globals['_REQUIREDPROTO3ONEOF']._serialized_start=694 + _globals['_REQUIREDPROTO3ONEOF']._serialized_end=762 + _globals['_REQUIREDPROTO3ONEOFIGNOREALWAYS']._serialized_start=764 + _globals['_REQUIREDPROTO3ONEOFIGNOREALWAYS']._serialized_end=847 + _globals['_REQUIREDPROTO3REPEATED']._serialized_start=849 + _globals['_REQUIREDPROTO3REPEATED']._serialized_end=899 + _globals['_REQUIREDPROTO3REPEATEDIGNOREALWAYS']._serialized_start=901 + _globals['_REQUIREDPROTO3REPEATEDIGNOREALWAYS']._serialized_end=966 + _globals['_REQUIREDPROTO3MAP']._serialized_start=969 + _globals['_REQUIREDPROTO3MAP']._serialized_end=1130 + _globals['_REQUIREDPROTO3MAP_VALENTRY']._serialized_start=1076 + _globals['_REQUIREDPROTO3MAP_VALENTRY']._serialized_end=1130 + _globals['_REQUIREDPROTO3MAPIGNOREALWAYS']._serialized_start=1133 + _globals['_REQUIREDPROTO3MAPIGNOREALWAYS']._serialized_end=1321 + _globals['_REQUIREDPROTO3MAPIGNOREALWAYS_VALENTRY']._serialized_start=1076 + _globals['_REQUIREDPROTO3MAPIGNOREALWAYS_VALENTRY']._serialized_end=1130 # @@protoc_insertion_point(module_scope) diff --git a/gen/buf/validate/conformance/cases/required_field_proto3_pb2.pyi b/gen/buf/validate/conformance/cases/required_field_proto3_pb2.pyi index 639e8191..44e6a792 100644 --- a/gen/buf/validate/conformance/cases/required_field_proto3_pb2.pyi +++ b/gen/buf/validate/conformance/cases/required_field_proto3_pb2.pyi @@ -26,12 +26,24 @@ class RequiredProto3Scalar(_message.Message): val: str def __init__(self, val: _Optional[str] = ...) -> None: ... +class RequiredProto3ScalarIgnoreAlways(_message.Message): + __slots__ = ("val",) + VAL_FIELD_NUMBER: _ClassVar[int] + val: str + def __init__(self, val: _Optional[str] = ...) -> None: ... + class RequiredProto3OptionalScalar(_message.Message): __slots__ = ("val",) VAL_FIELD_NUMBER: _ClassVar[int] val: str def __init__(self, val: _Optional[str] = ...) -> None: ... +class RequiredProto3OptionalScalarIgnoreAlways(_message.Message): + __slots__ = ("val",) + VAL_FIELD_NUMBER: _ClassVar[int] + val: str + def __init__(self, val: _Optional[str] = ...) -> None: ... + class RequiredProto3Message(_message.Message): __slots__ = ("val",) class Msg(_message.Message): @@ -43,6 +55,17 @@ class RequiredProto3Message(_message.Message): val: RequiredProto3Message.Msg def __init__(self, val: _Optional[_Union[RequiredProto3Message.Msg, _Mapping]] = ...) -> None: ... +class RequiredProto3MessageIgnoreAlways(_message.Message): + __slots__ = ("val",) + class Msg(_message.Message): + __slots__ = ("val",) + VAL_FIELD_NUMBER: _ClassVar[int] + val: str + def __init__(self, val: _Optional[str] = ...) -> None: ... + VAL_FIELD_NUMBER: _ClassVar[int] + val: RequiredProto3MessageIgnoreAlways.Msg + def __init__(self, val: _Optional[_Union[RequiredProto3MessageIgnoreAlways.Msg, _Mapping]] = ...) -> None: ... + class RequiredProto3OneOf(_message.Message): __slots__ = ("a", "b") A_FIELD_NUMBER: _ClassVar[int] @@ -51,12 +74,26 @@ class RequiredProto3OneOf(_message.Message): b: str def __init__(self, a: _Optional[str] = ..., b: _Optional[str] = ...) -> None: ... +class RequiredProto3OneOfIgnoreAlways(_message.Message): + __slots__ = ("a", "b") + A_FIELD_NUMBER: _ClassVar[int] + B_FIELD_NUMBER: _ClassVar[int] + a: str + b: str + def __init__(self, a: _Optional[str] = ..., b: _Optional[str] = ...) -> None: ... + class RequiredProto3Repeated(_message.Message): __slots__ = ("val",) VAL_FIELD_NUMBER: _ClassVar[int] val: _containers.RepeatedScalarFieldContainer[str] def __init__(self, val: _Optional[_Iterable[str]] = ...) -> None: ... +class RequiredProto3RepeatedIgnoreAlways(_message.Message): + __slots__ = ("val",) + VAL_FIELD_NUMBER: _ClassVar[int] + val: _containers.RepeatedScalarFieldContainer[str] + def __init__(self, val: _Optional[_Iterable[str]] = ...) -> None: ... + class RequiredProto3Map(_message.Message): __slots__ = ("val",) class ValEntry(_message.Message): @@ -69,3 +106,16 @@ class RequiredProto3Map(_message.Message): VAL_FIELD_NUMBER: _ClassVar[int] val: _containers.ScalarMap[str, str] def __init__(self, val: _Optional[_Mapping[str, str]] = ...) -> None: ... + +class RequiredProto3MapIgnoreAlways(_message.Message): + __slots__ = ("val",) + class ValEntry(_message.Message): + __slots__ = ("key", "value") + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + VAL_FIELD_NUMBER: _ClassVar[int] + val: _containers.ScalarMap[str, str] + def __init__(self, val: _Optional[_Mapping[str, str]] = ...) -> None: ... diff --git a/gen/buf/validate/conformance/cases/required_field_proto_editions_pb2.py b/gen/buf/validate/conformance/cases/required_field_proto_editions_pb2.py index 838b6374..7b33edc3 100644 --- a/gen/buf/validate/conformance/cases/required_field_proto_editions_pb2.py +++ b/gen/buf/validate/conformance/cases/required_field_proto_editions_pb2.py @@ -39,7 +39,7 @@ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\nBbuf/validate/conformance/cases/required_field_proto_editions.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"B\n&RequiredEditionsScalarExplicitPresence\x12\x18\n\x03val\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01R\x03val\"N\n-RequiredEditionsScalarExplicitPresenceDefault\x12\x1d\n\x03val\x18\x01 \x01(\t:\x03\x66ooB\x06\xbaH\x03\xc8\x01\x01R\x03val\"G\n&RequiredEditionsScalarImplicitPresence\x12\x1d\n\x03val\x18\x01 \x01(\tB\x0b\xaa\x01\x02\x08\x02\xbaH\x03\xc8\x01\x01R\x03val\"E\n$RequiredEditionsScalarLegacyRequired\x12\x1d\n\x03val\x18\x01 \x01(\tB\x0b\xaa\x01\x02\x08\x03\xbaH\x03\xc8\x01\x01R\x03val\"\xa9\x01\n\'RequiredEditionsMessageExplicitPresence\x12\x65\n\x03val\x18\x01 \x01(\x0b\x32K.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.MsgB\x06\xbaH\x03\xc8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xc0\x01\n0RequiredEditionsMessageExplicitPresenceDelimited\x12s\n\x03val\x18\x01 \x01(\x0b\x32T.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.MsgB\x0b\xaa\x01\x02(\x02\xbaH\x03\xc8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xaa\x01\n%RequiredEditionsMessageLegacyRequired\x12h\n\x03val\x18\x01 \x01(\x0b\x32I.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.MsgB\x0b\xaa\x01\x02\x08\x03\xbaH\x03\xc8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xbe\x01\n.RequiredEditionsMessageLegacyRequiredDelimited\x12s\n\x03val\x18\x01 \x01(\x0b\x32R.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.MsgB\r\xaa\x01\x04\x08\x03(\x02\xbaH\x03\xc8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"F\n\x15RequiredEditionsOneof\x12\x16\n\x01\x61\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01H\x00R\x01\x61\x12\x0e\n\x01\x62\x18\x02 \x01(\tH\x00R\x01\x62\x42\x05\n\x03val\"4\n\x18RequiredEditionsRepeated\x12\x18\n\x03val\x18\x01 \x03(\tB\x06\xbaH\x03\xc8\x01\x01R\x03val\"A\n RequiredEditionsRepeatedExpanded\x12\x1d\n\x03val\x18\x01 \x03(\tB\x0b\xaa\x01\x02\x18\x02\xbaH\x03\xc8\x01\x01R\x03val\"\xa5\x01\n\x13RequiredEditionsMap\x12V\n\x03val\x18\x01 \x03(\x0b\x32<.buf.validate.conformance.cases.RequiredEditionsMap.ValEntryB\x06\xbaH\x03\xc8\x01\x01R\x03val\x1a\x36\n\x08ValEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x42\xe1\x01\n\"com.buf.validate.conformance.casesB\x1fRequiredFieldProtoEditionsProtoP\x01\xa2\x02\x04\x42VCC\xaa\x02\x1e\x42uf.Validate.Conformance.Cases\xca\x02\x1e\x42uf\\Validate\\Conformance\\Cases\xe2\x02*Buf\\Validate\\Conformance\\Cases\\GPBMetadata\xea\x02!Buf::Validate::Conformance::Casesb\x08\x65\x64itionsp\xe8\x07') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\nBbuf/validate/conformance/cases/required_field_proto_editions.proto\x12\x1e\x62uf.validate.conformance.cases\x1a\x1b\x62uf/validate/validate.proto\"B\n&RequiredEditionsScalarExplicitPresence\x12\x18\n\x03val\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01R\x03val\"Q\n2RequiredEditionsScalarExplicitPresenceIgnoreAlways\x12\x1b\n\x03val\x18\x01 \x01(\tB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\"N\n-RequiredEditionsScalarExplicitPresenceDefault\x12\x1d\n\x03val\x18\x01 \x01(\t:\x03\x66ooB\x06\xbaH\x03\xc8\x01\x01R\x03val\"]\n9RequiredEditionsScalarExplicitPresenceDefaultIgnoreAlways\x12 \n\x03val\x18\x01 \x01(\t:\x03\x66ooB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\"G\n&RequiredEditionsScalarImplicitPresence\x12\x1d\n\x03val\x18\x01 \x01(\tB\x0b\xaa\x01\x02\x08\x02\xbaH\x03\xc8\x01\x01R\x03val\"V\n2RequiredEditionsScalarImplicitPresenceIgnoreAlways\x12 \n\x03val\x18\x01 \x01(\tB\x0e\xaa\x01\x02\x08\x02\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\"E\n$RequiredEditionsScalarLegacyRequired\x12\x1d\n\x03val\x18\x01 \x01(\tB\x0b\xaa\x01\x02\x08\x03\xbaH\x03\xc8\x01\x01R\x03val\"\xa9\x01\n\'RequiredEditionsMessageExplicitPresence\x12\x65\n\x03val\x18\x01 \x01(\x0b\x32K.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.MsgB\x06\xbaH\x03\xc8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xc4\x01\n3RequiredEditionsMessageExplicitPresenceIgnoreAlways\x12t\n\x03val\x18\x01 \x01(\x0b\x32W.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceIgnoreAlways.MsgB\t\xbaH\x06\xc8\x01\x01\xd8\x01\x03R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xc0\x01\n0RequiredEditionsMessageExplicitPresenceDelimited\x12s\n\x03val\x18\x01 \x01(\x0b\x32T.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.MsgB\x0b\xaa\x01\x02(\x02\xbaH\x03\xc8\x01\x01R\x03val\x1a\x17\n\x03Msg\x12\x10\n\x03val\x18\x01 \x01(\tR\x03val\"\xdc\x01\n None: ... +class RequiredEditionsScalarExplicitPresenceIgnoreAlways(_message.Message): + __slots__ = ("val",) + VAL_FIELD_NUMBER: _ClassVar[int] + val: str + def __init__(self, val: _Optional[str] = ...) -> None: ... + class RequiredEditionsScalarExplicitPresenceDefault(_message.Message): __slots__ = ("val",) VAL_FIELD_NUMBER: _ClassVar[int] val: str def __init__(self, val: _Optional[str] = ...) -> None: ... +class RequiredEditionsScalarExplicitPresenceDefaultIgnoreAlways(_message.Message): + __slots__ = ("val",) + VAL_FIELD_NUMBER: _ClassVar[int] + val: str + def __init__(self, val: _Optional[str] = ...) -> None: ... + class RequiredEditionsScalarImplicitPresence(_message.Message): __slots__ = ("val",) VAL_FIELD_NUMBER: _ClassVar[int] val: str def __init__(self, val: _Optional[str] = ...) -> None: ... +class RequiredEditionsScalarImplicitPresenceIgnoreAlways(_message.Message): + __slots__ = ("val",) + VAL_FIELD_NUMBER: _ClassVar[int] + val: str + def __init__(self, val: _Optional[str] = ...) -> None: ... + class RequiredEditionsScalarLegacyRequired(_message.Message): __slots__ = ("val",) VAL_FIELD_NUMBER: _ClassVar[int] @@ -55,6 +73,17 @@ class RequiredEditionsMessageExplicitPresence(_message.Message): val: RequiredEditionsMessageExplicitPresence.Msg def __init__(self, val: _Optional[_Union[RequiredEditionsMessageExplicitPresence.Msg, _Mapping]] = ...) -> None: ... +class RequiredEditionsMessageExplicitPresenceIgnoreAlways(_message.Message): + __slots__ = ("val",) + class Msg(_message.Message): + __slots__ = ("val",) + VAL_FIELD_NUMBER: _ClassVar[int] + val: str + def __init__(self, val: _Optional[str] = ...) -> None: ... + VAL_FIELD_NUMBER: _ClassVar[int] + val: RequiredEditionsMessageExplicitPresenceIgnoreAlways.Msg + def __init__(self, val: _Optional[_Union[RequiredEditionsMessageExplicitPresenceIgnoreAlways.Msg, _Mapping]] = ...) -> None: ... + class RequiredEditionsMessageExplicitPresenceDelimited(_message.Message): __slots__ = ("val",) class Msg(_message.Message): @@ -66,6 +95,17 @@ class RequiredEditionsMessageExplicitPresenceDelimited(_message.Message): val: RequiredEditionsMessageExplicitPresenceDelimited.Msg def __init__(self, val: _Optional[_Union[RequiredEditionsMessageExplicitPresenceDelimited.Msg, _Mapping]] = ...) -> None: ... +class RequiredEditionsMessageExplicitPresenceDelimitedIgnoreAlways(_message.Message): + __slots__ = ("val",) + class Msg(_message.Message): + __slots__ = ("val",) + VAL_FIELD_NUMBER: _ClassVar[int] + val: str + def __init__(self, val: _Optional[str] = ...) -> None: ... + VAL_FIELD_NUMBER: _ClassVar[int] + val: RequiredEditionsMessageExplicitPresenceDelimitedIgnoreAlways.Msg + def __init__(self, val: _Optional[_Union[RequiredEditionsMessageExplicitPresenceDelimitedIgnoreAlways.Msg, _Mapping]] = ...) -> None: ... + class RequiredEditionsMessageLegacyRequired(_message.Message): __slots__ = ("val",) class Msg(_message.Message): @@ -96,18 +136,38 @@ class RequiredEditionsOneof(_message.Message): b: str def __init__(self, a: _Optional[str] = ..., b: _Optional[str] = ...) -> None: ... +class RequiredEditionsOneofIgnoreAlways(_message.Message): + __slots__ = ("a", "b") + A_FIELD_NUMBER: _ClassVar[int] + B_FIELD_NUMBER: _ClassVar[int] + a: str + b: str + def __init__(self, a: _Optional[str] = ..., b: _Optional[str] = ...) -> None: ... + class RequiredEditionsRepeated(_message.Message): __slots__ = ("val",) VAL_FIELD_NUMBER: _ClassVar[int] val: _containers.RepeatedScalarFieldContainer[str] def __init__(self, val: _Optional[_Iterable[str]] = ...) -> None: ... +class RequiredEditionsRepeatedIgnoreAlways(_message.Message): + __slots__ = ("val",) + VAL_FIELD_NUMBER: _ClassVar[int] + val: _containers.RepeatedScalarFieldContainer[str] + def __init__(self, val: _Optional[_Iterable[str]] = ...) -> None: ... + class RequiredEditionsRepeatedExpanded(_message.Message): __slots__ = ("val",) VAL_FIELD_NUMBER: _ClassVar[int] val: _containers.RepeatedScalarFieldContainer[str] def __init__(self, val: _Optional[_Iterable[str]] = ...) -> None: ... +class RequiredEditionsRepeatedExpandedIgnoreAlways(_message.Message): + __slots__ = ("val",) + VAL_FIELD_NUMBER: _ClassVar[int] + val: _containers.RepeatedScalarFieldContainer[str] + def __init__(self, val: _Optional[_Iterable[str]] = ...) -> None: ... + class RequiredEditionsMap(_message.Message): __slots__ = ("val",) class ValEntry(_message.Message): @@ -120,3 +180,16 @@ class RequiredEditionsMap(_message.Message): VAL_FIELD_NUMBER: _ClassVar[int] val: _containers.ScalarMap[str, str] def __init__(self, val: _Optional[_Mapping[str, str]] = ...) -> None: ... + +class RequiredEditionsMapIgnoreAlways(_message.Message): + __slots__ = ("val",) + class ValEntry(_message.Message): + __slots__ = ("key", "value") + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + VAL_FIELD_NUMBER: _ClassVar[int] + val: _containers.ScalarMap[str, str] + def __init__(self, val: _Optional[_Mapping[str, str]] = ...) -> None: ... diff --git a/tests/conformance/nonconforming.yaml b/tests/conformance/nonconforming.yaml index 531cf553..308969b8 100644 --- a/tests/conformance/nonconforming.yaml +++ b/tests/conformance/nonconforming.yaml @@ -1047,18 +1047,3 @@ library/is_uri_ref: # 1. constraint_id: "library.is_uri_ref" # message: "" # for_key: false -standard_constraints/required: - - proto2/scalar/optional/unset - # input: [type.googleapis.com/buf.validate.conformance.cases.RequiredProto2ScalarOptional]:{} - # want: validation error (1 violation) - # 1. constraint_id: "required" - # field: "val" elements:{field_number:1 field_name:"val" field_type:TYPE_STRING} - # rule: "required" elements:{field_number:25 field_name:"required" field_type:TYPE_BOOL} - # got: valid - - proto2/scalar/optional_with_default/unset - # input: [type.googleapis.com/buf.validate.conformance.cases.RequiredProto2ScalarOptionalDefault]:{} - # want: validation error (1 violation) - # 1. constraint_id: "required" - # field: "val" elements:{field_number:1 field_name:"val" field_type:TYPE_STRING} - # rule: "required" elements:{field_number:25 field_name:"required" field_type:TYPE_BOOL} - # got: valid