# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: google/protobuf/descriptor.proto
# plugin: python-betterproto2
# This file has been @generated

__all__ = (
    "DescriptorProto",
    "DescriptorProtoExtensionRange",
    "DescriptorProtoReservedRange",
    "Edition",
    "EnumDescriptorProto",
    "EnumDescriptorProtoEnumReservedRange",
    "EnumOptions",
    "EnumValueDescriptorProto",
    "EnumValueOptions",
    "ExtensionRangeOptions",
    "ExtensionRangeOptionsDeclaration",
    "ExtensionRangeOptionsVerificationState",
    "FeatureSet",
    "FeatureSetDefaults",
    "FeatureSetDefaultsFeatureSetEditionDefault",
    "FeatureSetEnumType",
    "FeatureSetFieldPresence",
    "FeatureSetJsonFormat",
    "FeatureSetMessageEncoding",
    "FeatureSetRepeatedFieldEncoding",
    "FeatureSetUtf8Validation",
    "FieldDescriptorProto",
    "FieldDescriptorProtoLabel",
    "FieldDescriptorProtoType",
    "FieldOptions",
    "FieldOptionsCType",
    "FieldOptionsEditionDefault",
    "FieldOptionsFeatureSupport",
    "FieldOptionsJsType",
    "FieldOptionsOptionRetention",
    "FieldOptionsOptionTargetType",
    "FileDescriptorProto",
    "FileDescriptorSet",
    "FileOptions",
    "FileOptionsOptimizeMode",
    "GeneratedCodeInfo",
    "GeneratedCodeInfoAnnotation",
    "GeneratedCodeInfoAnnotationSemantic",
    "MessageOptions",
    "MethodDescriptorProto",
    "MethodOptions",
    "MethodOptionsIdempotencyLevel",
    "OneofDescriptorProto",
    "OneofOptions",
    "ServiceDescriptorProto",
    "ServiceOptions",
    "SourceCodeInfo",
    "SourceCodeInfoLocation",
    "UninterpretedOption",
    "UninterpretedOptionNamePart",
)

import warnings
from dataclasses import dataclass

import betterproto2

from ...message_pool import default_message_pool

betterproto2.check_compiler_version("0.5.1")


class Edition(betterproto2.Enum):
    """
    The full set of known editions.
    """

    @staticmethod
    def _serialized_pb():
        return b"\n\x07Edition\x12\x11\n\x0fEDITION_UNKNOWN\x12\x13\n\x0eEDITION_LEGACY\x10\x84\x07\x12\x13\n\x0eEDITION_PROTO2\x10\xe6\x07\x12\x13\n\x0eEDITION_PROTO3\x10\xe7\x07\x12\x11\n\x0cEDITION_2023\x10\xe8\x07\x12\x11\n\x0cEDITION_2024\x10\xe9\x07\x12\x17\n\x13EDITION_1_TEST_ONLY\x10\x01\x12\x17\n\x13EDITION_2_TEST_ONLY\x10\x02\x12\x1d\n\x17EDITION_99997_TEST_ONLY\x10\x9d\x8d\x06\x12\x1d\n\x17EDITION_99998_TEST_ONLY\x10\x9e\x8d\x06\x12\x1d\n\x17EDITION_99999_TEST_ONLY\x10\x9f\x8d\x06\x12\x13\n\x0bEDITION_MAX\x10\xff\xff\xff\xff\x07"

    UNKNOWN = 0
    """
    A placeholder for an unknown edition value.
    """

    LEGACY = 900
    """
    A placeholder edition for specifying default behaviors *before* a feature
    was first introduced.  This is effectively an "infinite past".
    """

    PROTO2 = 998
    """
    Legacy syntax "editions".  These pre-date editions, but behave much like
    distinct editions.  These can't be used to specify the edition of proto
    files, but feature definitions must supply proto2/proto3 defaults for
    backwards compatibility.
    """

    PROTO3 = 999

    _2023 = 1000
    """
    Editions that have been released.  The specific values are arbitrary and
    should not be depended on, but they will always be time-ordered for easy
    comparison.
    """

    _2024 = 1001

    _1_TEST_ONLY = 1
    """
    Placeholder editions for testing feature resolution.  These should not be
    used or relied on outside of tests.
    """

    _2_TEST_ONLY = 2

    _99997_TEST_ONLY = 99997

    _99998_TEST_ONLY = 99998

    _99999_TEST_ONLY = 99999

    MAX = 2147483647
    """
    Placeholder for specifying unbounded edition support.  This should only
    ever be used by plugins that can expect to never require any changes to
    support a new edition.
    """


class ExtensionRangeOptionsVerificationState(betterproto2.Enum):
    """
    The verification state of the extension range.
    """

    @staticmethod
    def _serialized_pb():
        return b"\n'ExtensionRangeOptions.VerificationState\x12\r\n\x0bDECLARATION\x12\x0e\n\nUNVERIFIED\x10\x01"

    DECLARATION = 0
    """
    All the extensions of the range must be declared.
    """

    UNVERIFIED = 1


class FeatureSetEnumType(betterproto2.Enum):
    @staticmethod
    def _serialized_pb():
        return b"\n\x13FeatureSet.EnumType\x12\x13\n\x11ENUM_TYPE_UNKNOWN\x12\x08\n\x04OPEN\x10\x01\x12\n\n\x06CLOSED\x10\x02"

    ENUM_TYPE_UNKNOWN = 0

    OPEN = 1

    CLOSED = 2


class FeatureSetFieldPresence(betterproto2.Enum):
    @staticmethod
    def _serialized_pb():
        return b"\n\x18FeatureSet.FieldPresence\x12\x18\n\x16FIELD_PRESENCE_UNKNOWN\x12\x0c\n\x08EXPLICIT\x10\x01\x12\x0c\n\x08IMPLICIT\x10\x02\x12\x13\n\x0fLEGACY_REQUIRED\x10\x03"

    FIELD_PRESENCE_UNKNOWN = 0

    EXPLICIT = 1

    IMPLICIT = 2

    LEGACY_REQUIRED = 3


class FeatureSetJsonFormat(betterproto2.Enum):
    @staticmethod
    def _serialized_pb():
        return b"\n\x15FeatureSet.JsonFormat\x12\x15\n\x13JSON_FORMAT_UNKNOWN\x12\t\n\x05ALLOW\x10\x01\x12\x16\n\x12LEGACY_BEST_EFFORT\x10\x02"

    JSON_FORMAT_UNKNOWN = 0

    ALLOW = 1

    LEGACY_BEST_EFFORT = 2


class FeatureSetMessageEncoding(betterproto2.Enum):
    @staticmethod
    def _serialized_pb():
        return b"\n\x1aFeatureSet.MessageEncoding\x12\x1a\n\x18MESSAGE_ENCODING_UNKNOWN\x12\x13\n\x0fLENGTH_PREFIXED\x10\x01\x12\r\n\tDELIMITED\x10\x02"

    MESSAGE_ENCODING_UNKNOWN = 0

    LENGTH_PREFIXED = 1

    DELIMITED = 2


class FeatureSetRepeatedFieldEncoding(betterproto2.Enum):
    @staticmethod
    def _serialized_pb():
        return b"\n FeatureSet.RepeatedFieldEncoding\x12!\n\x1fREPEATED_FIELD_ENCODING_UNKNOWN\x12\n\n\x06PACKED\x10\x01\x12\x0c\n\x08EXPANDED\x10\x02"

    REPEATED_FIELD_ENCODING_UNKNOWN = 0

    PACKED = 1

    EXPANDED = 2


class FeatureSetUtf8Validation(betterproto2.Enum):
    @staticmethod
    def _serialized_pb():
        return b'\n\x19FeatureSet.Utf8Validation\x12\x19\n\x17UTF8_VALIDATION_UNKNOWN\x12\n\n\x06VERIFY\x10\x02\x12\x08\n\x04NONE\x10\x03"\x04\x08\x01\x10\x01'

    UTF8_VALIDATION_UNKNOWN = 0

    VERIFY = 2

    NONE = 3


class FieldDescriptorProtoLabel(betterproto2.Enum):
    @staticmethod
    def _serialized_pb():
        return b"\n\x1aFieldDescriptorProto.Label\x12\x12\n\x0eLABEL_OPTIONAL\x10\x01\x12\x12\n\x0eLABEL_REPEATED\x10\x03\x12\x12\n\x0eLABEL_REQUIRED\x10\x02"

    LABEL_OPTIONAL = 1
    """
    0 is reserved for errors
    """

    LABEL_REPEATED = 3

    LABEL_REQUIRED = 2
    """
    The required label is only allowed in google.protobuf.  In proto3 and Editions
    it's explicitly prohibited.  In Editions, the `field_presence` feature
    can be used to get this behavior.
    """


class FieldDescriptorProtoType(betterproto2.Enum):
    @staticmethod
    def _serialized_pb():
        return b"\n\x19FieldDescriptorProto.Type\x12\x0f\n\x0bTYPE_DOUBLE\x10\x01\x12\x0e\n\nTYPE_FLOAT\x10\x02\x12\x0e\n\nTYPE_INT64\x10\x03\x12\x0f\n\x0bTYPE_UINT64\x10\x04\x12\x0e\n\nTYPE_INT32\x10\x05\x12\x10\n\x0cTYPE_FIXED64\x10\x06\x12\x10\n\x0cTYPE_FIXED32\x10\x07\x12\r\n\tTYPE_BOOL\x10\x08\x12\x0f\n\x0bTYPE_STRING\x10\t\x12\x0e\n\nTYPE_GROUP\x10\n\x12\x10\n\x0cTYPE_MESSAGE\x10\x0b\x12\x0e\n\nTYPE_BYTES\x10\x0c\x12\x0f\n\x0bTYPE_UINT32\x10\r\x12\r\n\tTYPE_ENUM\x10\x0e\x12\x11\n\rTYPE_SFIXED32\x10\x0f\x12\x11\n\rTYPE_SFIXED64\x10\x10\x12\x0f\n\x0bTYPE_SINT32\x10\x11\x12\x0f\n\x0bTYPE_SINT64\x10\x12"

    TYPE_DOUBLE = 1
    """
    0 is reserved for errors.
    Order is weird for historical reasons.
    """

    TYPE_FLOAT = 2

    TYPE_INT64 = 3
    """
    Not ZigZag encoded.  Negative numbers take 10 bytes.  Use TYPE_SINT64 if
    negative values are likely.
    """

    TYPE_UINT64 = 4

    TYPE_INT32 = 5
    """
    Not ZigZag encoded.  Negative numbers take 10 bytes.  Use TYPE_SINT32 if
    negative values are likely.
    """

    TYPE_FIXED64 = 6

    TYPE_FIXED32 = 7

    TYPE_BOOL = 8

    TYPE_STRING = 9

    TYPE_GROUP = 10
    """
    Tag-delimited aggregate.
    Group type is deprecated and not supported after google.protobuf. However, Proto3
    implementations should still be able to parse the group wire format and
    treat group fields as unknown fields.  In Editions, the group wire format
    can be enabled via the `message_encoding` feature.
    """

    TYPE_MESSAGE = 11
    """
    Length-delimited aggregate.
    """

    TYPE_BYTES = 12
    """
    New in version 2.
    """

    TYPE_UINT32 = 13

    TYPE_ENUM = 14

    TYPE_SFIXED32 = 15

    TYPE_SFIXED64 = 16

    TYPE_SINT32 = 17
    """
    Uses ZigZag encoding.
    """

    TYPE_SINT64 = 18
    """
    Uses ZigZag encoding.
    """


class FieldOptionsCType(betterproto2.Enum):
    @staticmethod
    def _serialized_pb():
        return b"\n\x12FieldOptions.CType\x12\x08\n\x06STRING\x12\x08\n\x04CORD\x10\x01\x12\x10\n\x0cSTRING_PIECE\x10\x02"

    STRING = 0
    """
    Default mode.
    """

    CORD = 1
    """
    The option [ctype=CORD] may be applied to a non-repeated field of type
    "bytes". It indicates that in C++, the data should be stored in a Cord
    instead of a string.  For very large strings, this may reduce memory
    fragmentation. It may also allow better performance when parsing from a
    Cord, or when parsing with aliasing enabled, as the parsed Cord may then
    alias the original buffer.
    """

    STRING_PIECE = 2


class FieldOptionsJsType(betterproto2.Enum):
    @staticmethod
    def _serialized_pb():
        return b"\n\x13FieldOptions.JSType\x12\x0b\n\tJS_NORMAL\x12\r\n\tJS_STRING\x10\x01\x12\r\n\tJS_NUMBER\x10\x02"

    JS_NORMAL = 0
    """
    Use the default type.
    """

    JS_STRING = 1
    """
    Use JavaScript strings.
    """

    JS_NUMBER = 2
    """
    Use JavaScript numbers.
    """


class FieldOptionsOptionRetention(betterproto2.Enum):
    """
    If set to RETENTION_SOURCE, the option will be omitted from the binary.
    """

    @staticmethod
    def _serialized_pb():
        return b"\n\x1cFieldOptions.OptionRetention\x12\x13\n\x11RETENTION_UNKNOWN\x12\x15\n\x11RETENTION_RUNTIME\x10\x01\x12\x14\n\x10RETENTION_SOURCE\x10\x02"

    RETENTION_UNKNOWN = 0

    RETENTION_RUNTIME = 1

    RETENTION_SOURCE = 2


class FieldOptionsOptionTargetType(betterproto2.Enum):
    """
    This indicates the types of entities that the field may apply to when used
    as an option. If it is unset, then the field may be freely used as an
    option on any kind of entity.
    """

    @staticmethod
    def _serialized_pb():
        return b"\n\x1dFieldOptions.OptionTargetType\x12\x15\n\x13TARGET_TYPE_UNKNOWN\x12\x14\n\x10TARGET_TYPE_FILE\x10\x01\x12\x1f\n\x1bTARGET_TYPE_EXTENSION_RANGE\x10\x02\x12\x17\n\x13TARGET_TYPE_MESSAGE\x10\x03\x12\x15\n\x11TARGET_TYPE_FIELD\x10\x04\x12\x15\n\x11TARGET_TYPE_ONEOF\x10\x05\x12\x14\n\x10TARGET_TYPE_ENUM\x10\x06\x12\x1a\n\x16TARGET_TYPE_ENUM_ENTRY\x10\x07\x12\x17\n\x13TARGET_TYPE_SERVICE\x10\x08\x12\x16\n\x12TARGET_TYPE_METHOD\x10\t"

    TARGET_TYPE_UNKNOWN = 0

    TARGET_TYPE_FILE = 1

    TARGET_TYPE_EXTENSION_RANGE = 2

    TARGET_TYPE_MESSAGE = 3

    TARGET_TYPE_FIELD = 4

    TARGET_TYPE_ONEOF = 5

    TARGET_TYPE_ENUM = 6

    TARGET_TYPE_ENUM_ENTRY = 7

    TARGET_TYPE_SERVICE = 8

    TARGET_TYPE_METHOD = 9


class FileOptionsOptimizeMode(betterproto2.Enum):
    """
    Generated classes can be optimized for speed or code size.
    """

    @staticmethod
    def _serialized_pb():
        return b"\n\x18FileOptions.OptimizeMode\x12\t\n\x05SPEED\x10\x01\x12\r\n\tCODE_SIZE\x10\x02\x12\x10\n\x0cLITE_RUNTIME\x10\x03"

    SPEED = 1
    """
    Generate complete code for parsing, serialization,
    """

    CODE_SIZE = 2
    """
    etc.

    Use ReflectionOps to implement these methods.
    """

    LITE_RUNTIME = 3
    """
    Generate code using MessageLite and the lite runtime.
    """


class GeneratedCodeInfoAnnotationSemantic(betterproto2.Enum):
    """
    Represents the identified object's effect on the element in the original
    .proto file.
    """

    @staticmethod
    def _serialized_pb():
        return b"\n%GeneratedCodeInfo.Annotation.Semantic\x12\x06\n\x04NONE\x12\x07\n\x03SET\x10\x01\x12\t\n\x05ALIAS\x10\x02"

    NONE = 0
    """
    There is no effect or the effect is indescribable.
    """

    SET = 1
    """
    The element is set or otherwise mutated.
    """

    ALIAS = 2
    """
    An alias to the element is returned.
    """


class MethodOptionsIdempotencyLevel(betterproto2.Enum):
    """
    Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
    or neither? HTTP based RPC implementation may choose GET verb for safe
    methods, and PUT verb for idempotent methods instead of the default POST.
    """

    @staticmethod
    def _serialized_pb():
        return b"\n\x1eMethodOptions.IdempotencyLevel\x12\x15\n\x13IDEMPOTENCY_UNKNOWN\x12\x13\n\x0fNO_SIDE_EFFECTS\x10\x01\x12\x0e\n\nIDEMPOTENT\x10\x02"

    IDEMPOTENCY_UNKNOWN = 0

    NO_SIDE_EFFECTS = 1
    """
    implies idempotent
    """

    IDEMPOTENT = 2
    """
    idempotent, but may have side effects
    """


@dataclass(eq=False, repr=False)
class DescriptorProto(betterproto2.Message):
    """
    Describes a message type.
    """

    @staticmethod
    def _serialized_pb():
        return b"\n\x0fDescriptorProto\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12;\n\x05field\x18\x02 \x03(\x0b2%.google.protobuf.FieldDescriptorProtoR\x05field\x12C\n\textension\x18\x06 \x03(\x0b2%.google.protobuf.FieldDescriptorProtoR\textension\x12A\n\x0bnested_type\x18\x03 \x03(\x0b2 .google.protobuf.DescriptorProtoR\nnestedType\x12A\n\tenum_type\x18\x04 \x03(\x0b2$.google.protobuf.EnumDescriptorProtoR\x08enumType\x12X\n\x0fextension_range\x18\x05 \x03(\x0b2/.google.protobuf.DescriptorProto.ExtensionRangeR\x0eextensionRange\x12D\n\noneof_decl\x18\x08 \x03(\x0b2%.google.protobuf.OneofDescriptorProtoR\toneofDecl\x129\n\x07options\x18\x07 \x01(\x0b2\x1f.google.protobuf.MessageOptionsR\x07options\x12U\n\x0ereserved_range\x18\t \x03(\x0b2..google.protobuf.DescriptorProto.ReservedRangeR\rreservedRange\x12#\n\rreserved_name\x18\n \x03(\tR\x0creservedName\x1a\x8a\x01\n\x1eDescriptorProto.ExtensionRange\x12\x14\n\x05start\x18\x01 \x01(\x05R\x05start\x12\x10\n\x03end\x18\x02 \x01(\x05R\x03end\x12@\n\x07options\x18\x03 \x01(\x0b2&.google.protobuf.ExtensionRangeOptionsR\x07options\x1aG\n\x1dDescriptorProto.ReservedRange\x12\x14\n\x05start\x18\x01 \x01(\x05R\x05start\x12\x10\n\x03end\x18\x02 \x01(\x05R\x03end"

    name: "str" = betterproto2.field(1, betterproto2.TYPE_STRING)

    field: "list[FieldDescriptorProto]" = betterproto2.field(
        2, betterproto2.TYPE_MESSAGE, repeated=True
    )

    extension: "list[FieldDescriptorProto]" = betterproto2.field(
        6, betterproto2.TYPE_MESSAGE, repeated=True
    )

    nested_type: "list[DescriptorProto]" = betterproto2.field(
        3, betterproto2.TYPE_MESSAGE, repeated=True
    )

    enum_type: "list[EnumDescriptorProto]" = betterproto2.field(
        4, betterproto2.TYPE_MESSAGE, repeated=True
    )

    extension_range: "list[DescriptorProtoExtensionRange]" = betterproto2.field(
        5, betterproto2.TYPE_MESSAGE, repeated=True
    )

    oneof_decl: "list[OneofDescriptorProto]" = betterproto2.field(
        8, betterproto2.TYPE_MESSAGE, repeated=True
    )

    options: "MessageOptions | None" = betterproto2.field(
        7, betterproto2.TYPE_MESSAGE, optional=True
    )

    reserved_range: "list[DescriptorProtoReservedRange]" = betterproto2.field(
        9, betterproto2.TYPE_MESSAGE, repeated=True
    )

    reserved_name: "list[str]" = betterproto2.field(
        10, betterproto2.TYPE_STRING, repeated=True
    )
    """
    Reserved field names, which may not be used by fields in the same message.
    A given name may only be reserved once.
    """


default_message_pool.register_message(
    "google.protobuf", "DescriptorProto", DescriptorProto
)


@dataclass(eq=False, repr=False)
class DescriptorProtoExtensionRange(betterproto2.Message):
    @staticmethod
    def _serialized_pb():
        return b"\n\x1eDescriptorProto.ExtensionRange\x12\x14\n\x05start\x18\x01 \x01(\x05R\x05start\x12\x10\n\x03end\x18\x02 \x01(\x05R\x03end\x12@\n\x07options\x18\x03 \x01(\x0b2&.google.protobuf.ExtensionRangeOptionsR\x07options"

    start: "int" = betterproto2.field(1, betterproto2.TYPE_INT32)
    """
    Inclusive.
    """

    end: "int" = betterproto2.field(2, betterproto2.TYPE_INT32)
    """
    Exclusive.
    """

    options: "ExtensionRangeOptions | None" = betterproto2.field(
        3, betterproto2.TYPE_MESSAGE, optional=True
    )


default_message_pool.register_message(
    "google.protobuf", "DescriptorProto.ExtensionRange", DescriptorProtoExtensionRange
)


@dataclass(eq=False, repr=False)
class DescriptorProtoReservedRange(betterproto2.Message):
    """
    Range of reserved tag numbers. Reserved tag numbers may not be used by
    fields or extension ranges in the same message. Reserved ranges may
    not overlap.
    """

    @staticmethod
    def _serialized_pb():
        return b"\n\x1dDescriptorProto.ReservedRange\x12\x14\n\x05start\x18\x01 \x01(\x05R\x05start\x12\x10\n\x03end\x18\x02 \x01(\x05R\x03end"

    start: "int" = betterproto2.field(1, betterproto2.TYPE_INT32)
    """
    Inclusive.
    """

    end: "int" = betterproto2.field(2, betterproto2.TYPE_INT32)
    """
    Exclusive.
    """


default_message_pool.register_message(
    "google.protobuf", "DescriptorProto.ReservedRange", DescriptorProtoReservedRange
)


@dataclass(eq=False, repr=False)
class EnumDescriptorProto(betterproto2.Message):
    """
    Describes an enum type.
    """

    @staticmethod
    def _serialized_pb():
        return b"\n\x13EnumDescriptorProto\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12?\n\x05value\x18\x02 \x03(\x0b2).google.protobuf.EnumValueDescriptorProtoR\x05value\x126\n\x07options\x18\x03 \x01(\x0b2\x1c.google.protobuf.EnumOptionsR\x07options\x12]\n\x0ereserved_range\x18\x04 \x03(\x0b26.google.protobuf.EnumDescriptorProto.EnumReservedRangeR\rreservedRange\x12#\n\rreserved_name\x18\x05 \x03(\tR\x0creservedName\x1aO\n%EnumDescriptorProto.EnumReservedRange\x12\x14\n\x05start\x18\x01 \x01(\x05R\x05start\x12\x10\n\x03end\x18\x02 \x01(\x05R\x03end"

    name: "str" = betterproto2.field(1, betterproto2.TYPE_STRING)

    value: "list[EnumValueDescriptorProto]" = betterproto2.field(
        2, betterproto2.TYPE_MESSAGE, repeated=True
    )

    options: "EnumOptions | None" = betterproto2.field(
        3, betterproto2.TYPE_MESSAGE, optional=True
    )

    reserved_range: "list[EnumDescriptorProtoEnumReservedRange]" = betterproto2.field(
        4, betterproto2.TYPE_MESSAGE, repeated=True
    )
    """
    Range of reserved numeric values. Reserved numeric values may not be used
    by enum values in the same enum declaration. Reserved ranges may not
    overlap.
    """

    reserved_name: "list[str]" = betterproto2.field(
        5, betterproto2.TYPE_STRING, repeated=True
    )
    """
    Reserved enum value names, which may not be reused. A given name may only
    be reserved once.
    """


default_message_pool.register_message(
    "google.protobuf", "EnumDescriptorProto", EnumDescriptorProto
)


@dataclass(eq=False, repr=False)
class EnumDescriptorProtoEnumReservedRange(betterproto2.Message):
    """
    Range of reserved numeric values. Reserved values may not be used by
    entries in the same enum. Reserved ranges may not overlap.

    Note that this is distinct from DescriptorProto.ReservedRange in that it
    is inclusive such that it can appropriately represent the entire int32
    domain.
    """

    @staticmethod
    def _serialized_pb():
        return b"\n%EnumDescriptorProto.EnumReservedRange\x12\x14\n\x05start\x18\x01 \x01(\x05R\x05start\x12\x10\n\x03end\x18\x02 \x01(\x05R\x03end"

    start: "int" = betterproto2.field(1, betterproto2.TYPE_INT32)
    """
    Inclusive.
    """

    end: "int" = betterproto2.field(2, betterproto2.TYPE_INT32)
    """
    Inclusive.
    """


default_message_pool.register_message(
    "google.protobuf",
    "EnumDescriptorProto.EnumReservedRange",
    EnumDescriptorProtoEnumReservedRange,
)


@dataclass(eq=False, repr=False)
class EnumOptions(betterproto2.Message):
    @staticmethod
    def _serialized_pb():
        return b'\n\x0bEnumOptions\x12\x1f\n\x0ballow_alias\x18\x02 \x01(\x08R\nallowAlias\x12%\n\ndeprecated\x18\x03 \x01(\x08:\x05falseR\ndeprecated\x12V\n&deprecated_legacy_json_field_conflicts\x18\x06 \x01(\x08R"deprecatedLegacyJsonFieldConflictsB\x02\x18\x01\x127\n\x08features\x18\x07 \x01(\x0b2\x1b.google.protobuf.FeatureSetR\x08features\x12X\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b2$.google.protobuf.UninterpretedOptionR\x13uninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02J\x04\x08\x05\x10\x06'

    allow_alias: "bool" = betterproto2.field(2, betterproto2.TYPE_BOOL)
    """
    Set this option to true to allow mapping different tag names to the same
    value.
    """

    deprecated: "bool" = betterproto2.field(3, betterproto2.TYPE_BOOL)
    """
    Is this enum deprecated?
    Depending on the target platform, this can emit Deprecated annotations
    for the enum, or it will be completely ignored; in the very least, this
    is a formalization for deprecating enums.
    """

    deprecated_legacy_json_field_conflicts: "bool" = betterproto2.field(
        6, betterproto2.TYPE_BOOL
    )
    """
    Enable the legacy handling of JSON field name conflicts.  This lowercases
    and strips underscored from the fields before comparison in proto3 only.
    The new behavior takes `json_name` into account and applies to proto2 as
    well.
    TODO Remove this legacy behavior once downstream teams have
    had time to migrate.
    """

    features: "FeatureSet | None" = betterproto2.field(
        7, betterproto2.TYPE_MESSAGE, optional=True
    )
    """
    Any features defined in the specific edition.
    """

    uninterpreted_option: "list[UninterpretedOption]" = betterproto2.field(
        999, betterproto2.TYPE_MESSAGE, repeated=True
    )
    """
    The parser stores options it doesn't recognize here. See above.
    """

    def __post_init__(self) -> None:
        super().__post_init__()
        if self.is_set("deprecated_legacy_json_field_conflicts"):
            warnings.warn(
                "EnumOptions.deprecated_legacy_json_field_conflicts is deprecated",
                DeprecationWarning,
            )


default_message_pool.register_message("google.protobuf", "EnumOptions", EnumOptions)


@dataclass(eq=False, repr=False)
class EnumValueDescriptorProto(betterproto2.Message):
    """
    Describes a value within an enum.
    """

    @staticmethod
    def _serialized_pb():
        return b"\n\x18EnumValueDescriptorProto\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x16\n\x06number\x18\x02 \x01(\x05R\x06number\x12;\n\x07options\x18\x03 \x01(\x0b2!.google.protobuf.EnumValueOptionsR\x07options"

    name: "str" = betterproto2.field(1, betterproto2.TYPE_STRING)

    number: "int" = betterproto2.field(2, betterproto2.TYPE_INT32)

    options: "EnumValueOptions | None" = betterproto2.field(
        3, betterproto2.TYPE_MESSAGE, optional=True
    )


default_message_pool.register_message(
    "google.protobuf", "EnumValueDescriptorProto", EnumValueDescriptorProto
)


@dataclass(eq=False, repr=False)
class EnumValueOptions(betterproto2.Message):
    @staticmethod
    def _serialized_pb():
        return b"\n\x10EnumValueOptions\x12%\n\ndeprecated\x18\x01 \x01(\x08:\x05falseR\ndeprecated\x127\n\x08features\x18\x02 \x01(\x0b2\x1b.google.protobuf.FeatureSetR\x08features\x12(\n\x0cdebug_redact\x18\x03 \x01(\x08:\x05falseR\x0bdebugRedact\x12U\n\x0ffeature_support\x18\x04 \x01(\x0b2,.google.protobuf.FieldOptions.FeatureSupportR\x0efeatureSupport\x12X\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b2$.google.protobuf.UninterpretedOptionR\x13uninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02"

    deprecated: "bool" = betterproto2.field(1, betterproto2.TYPE_BOOL)
    """
    Is this enum value deprecated?
    Depending on the target platform, this can emit Deprecated annotations
    for the enum value, or it will be completely ignored; in the very least,
    this is a formalization for deprecating enum values.
    """

    features: "FeatureSet | None" = betterproto2.field(
        2, betterproto2.TYPE_MESSAGE, optional=True
    )
    """
    Any features defined in the specific edition.
    """

    debug_redact: "bool" = betterproto2.field(3, betterproto2.TYPE_BOOL)
    """
    Indicate that fields annotated with this enum value should not be printed
    out when using debug formats, e.g. when the field contains sensitive
    credentials.
    """

    feature_support: "FieldOptionsFeatureSupport | None" = betterproto2.field(
        4, betterproto2.TYPE_MESSAGE, optional=True
    )
    """
    Information about the support window of a feature value.
    """

    uninterpreted_option: "list[UninterpretedOption]" = betterproto2.field(
        999, betterproto2.TYPE_MESSAGE, repeated=True
    )
    """
    The parser stores options it doesn't recognize here. See above.
    """


default_message_pool.register_message(
    "google.protobuf", "EnumValueOptions", EnumValueOptions
)


@dataclass(eq=False, repr=False)
class ExtensionRangeOptions(betterproto2.Message):
    @staticmethod
    def _serialized_pb():
        return b"\n\x15ExtensionRangeOptions\x12X\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b2$.google.protobuf.UninterpretedOptionR\x13uninterpretedOption\x12Y\n\x0bdeclaration\x18\x02 \x03(\x0b22.google.protobuf.ExtensionRangeOptions.DeclarationR\x0bdeclarationB\x03\x88\x01\x02\x127\n\x08features\x182 \x01(\x0b2\x1b.google.protobuf.FeatureSetR\x08features\x12m\n\x0cverification\x18\x03 \x01(\x0e28.google.protobuf.ExtensionRangeOptions.VerificationState:\nUNVERIFIEDR\x0cverificationB\x03\x88\x01\x02\x1a\xaa\x01\n!ExtensionRangeOptions.Declaration\x12\x16\n\x06number\x18\x01 \x01(\x05R\x06number\x12\x1b\n\tfull_name\x18\x02 \x01(\tR\x08fullName\x12\x12\n\x04type\x18\x03 \x01(\tR\x04type\x12\x1a\n\x08reserved\x18\x05 \x01(\x08R\x08reserved\x12\x1a\n\x08repeated\x18\x06 \x01(\x08R\x08repeatedJ\x04\x08\x04\x10\x05\"H\n'ExtensionRangeOptions.VerificationState\x12\r\n\x0bDECLARATION\x12\x0e\n\nUNVERIFIED\x10\x01*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02"

    uninterpreted_option: "list[UninterpretedOption]" = betterproto2.field(
        999, betterproto2.TYPE_MESSAGE, repeated=True
    )
    """
    The parser stores options it doesn't recognize here. See above.
    """

    declaration: "list[ExtensionRangeOptionsDeclaration]" = betterproto2.field(
        2, betterproto2.TYPE_MESSAGE, repeated=True
    )
    """
    For external users: DO NOT USE. We are in the process of open sourcing
    extension declaration and executing internal cleanups before it can be
    used externally.
    """

    features: "FeatureSet | None" = betterproto2.field(
        50, betterproto2.TYPE_MESSAGE, optional=True
    )
    """
    Any features defined in the specific edition.
    """

    verification: "ExtensionRangeOptionsVerificationState" = betterproto2.field(
        3,
        betterproto2.TYPE_ENUM,
        default_factory=lambda: ExtensionRangeOptionsVerificationState(0),
    )
    """
    The verification state of the range.
    TODO: flip the default to DECLARATION once all empty ranges
    are marked as UNVERIFIED.
    """


default_message_pool.register_message(
    "google.protobuf", "ExtensionRangeOptions", ExtensionRangeOptions
)


@dataclass(eq=False, repr=False)
class ExtensionRangeOptionsDeclaration(betterproto2.Message):
    @staticmethod
    def _serialized_pb():
        return b"\n!ExtensionRangeOptions.Declaration\x12\x16\n\x06number\x18\x01 \x01(\x05R\x06number\x12\x1b\n\tfull_name\x18\x02 \x01(\tR\x08fullName\x12\x12\n\x04type\x18\x03 \x01(\tR\x04type\x12\x1a\n\x08reserved\x18\x05 \x01(\x08R\x08reserved\x12\x1a\n\x08repeated\x18\x06 \x01(\x08R\x08repeatedJ\x04\x08\x04\x10\x05"

    number: "int" = betterproto2.field(1, betterproto2.TYPE_INT32)
    """
    The extension number declared within the extension range.
    """

    full_name: "str" = betterproto2.field(2, betterproto2.TYPE_STRING)
    """
    The fully-qualified name of the extension field. There must be a leading
    dot in front of the full name.
    """

    type: "str" = betterproto2.field(3, betterproto2.TYPE_STRING)
    """
    The fully-qualified type name of the extension field. Unlike
    Metadata.type, Declaration.type must have a leading dot for messages
    and enums.
    """

    reserved: "bool" = betterproto2.field(5, betterproto2.TYPE_BOOL)
    """
    If true, indicates that the number is reserved in the extension range,
    and any extension field with the number will fail to compile. Set this
    when a declared extension field is deleted.
    """

    repeated: "bool" = betterproto2.field(6, betterproto2.TYPE_BOOL)
    """
    If true, indicates that the extension must be defined as repeated.
    Otherwise the extension must be defined as optional.
    """


default_message_pool.register_message(
    "google.protobuf",
    "ExtensionRangeOptions.Declaration",
    ExtensionRangeOptionsDeclaration,
)


@dataclass(eq=False, repr=False)
class FeatureSet(betterproto2.Message):
    """
    ===================================================================
    Features

    TODO Enums in C++ gencode (and potentially other languages) are
    not well scoped.  This means that each of the feature enums below can clash
    with each other.  The short names we've chosen maximize call-site
    readability, but leave us very open to this scenario.  A future feature will
    be designed and implemented to handle this, hopefully before we ever hit a
    conflict here.
    """

    @staticmethod
    def _serialized_pb():
        return b'\n\nFeatureSet\x12\x91\x01\n\x0efield_presence\x18\x01 \x01(\x0e2).google.protobuf.FeatureSet.FieldPresenceR\rfieldPresenceB?\x88\x01\x01\x98\x01\x04\x98\x01\x01\xa2\x01\r\x12\x08EXPLICIT\x18\x84\x07\xa2\x01\r\x12\x08IMPLICIT\x18\xe7\x07\xa2\x01\r\x12\x08EXPLICIT\x18\xe8\x07\xb2\x01\x03\x08\xe8\x07\x12l\n\tenum_type\x18\x02 \x01(\x0e2$.google.protobuf.FeatureSet.EnumTypeR\x08enumTypeB)\x88\x01\x01\x98\x01\x06\x98\x01\x01\xa2\x01\x0b\x12\x06CLOSED\x18\x84\x07\xa2\x01\t\x12\x04OPEN\x18\xe7\x07\xb2\x01\x03\x08\xe8\x07\x12\x98\x01\n\x17repeated_field_encoding\x18\x03 \x01(\x0e21.google.protobuf.FeatureSet.RepeatedFieldEncodingR\x15repeatedFieldEncodingB-\x88\x01\x01\x98\x01\x04\x98\x01\x01\xa2\x01\r\x12\x08EXPANDED\x18\x84\x07\xa2\x01\x0b\x12\x06PACKED\x18\xe7\x07\xb2\x01\x03\x08\xe8\x07\x12~\n\x0futf8_validation\x18\x04 \x01(\x0e2*.google.protobuf.FeatureSet.Utf8ValidationR\x0eutf8ValidationB)\x88\x01\x01\x98\x01\x04\x98\x01\x01\xa2\x01\t\x12\x04NONE\x18\x84\x07\xa2\x01\x0b\x12\x06VERIFY\x18\xe7\x07\xb2\x01\x03\x08\xe8\x07\x12~\n\x10message_encoding\x18\x05 \x01(\x0e2+.google.protobuf.FeatureSet.MessageEncodingR\x0fmessageEncodingB&\x88\x01\x01\x98\x01\x04\x98\x01\x01\xa2\x01\x14\x12\x0fLENGTH_PREFIXED\x18\x84\x07\xb2\x01\x03\x08\xe8\x07\x12\x82\x01\n\x0bjson_format\x18\x06 \x01(\x0e2&.google.protobuf.FeatureSet.JsonFormatR\njsonFormatB9\x88\x01\x01\x98\x01\x03\x98\x01\x06\x98\x01\x01\xa2\x01\x17\x12\x12LEGACY_BEST_EFFORT\x18\x84\x07\xa2\x01\n\x12\x05ALLOW\x18\xe7\x07\xb2\x01\x03\x08\xe8\x07"e\n\x18FeatureSet.FieldPresence\x12\x18\n\x16FIELD_PRESENCE_UNKNOWN\x12\x0c\n\x08EXPLICIT\x10\x01\x12\x0c\n\x08IMPLICIT\x10\x02\x12\x13\n\x0fLEGACY_REQUIRED\x10\x03"@\n\x13FeatureSet.EnumType\x12\x13\n\x11ENUM_TYPE_UNKNOWN\x12\x08\n\x04OPEN\x10\x01\x12\n\n\x06CLOSED\x10\x02"_\n FeatureSet.RepeatedFieldEncoding\x12!\n\x1fREPEATED_FIELD_ENCODING_UNKNOWN\x12\n\n\x06PACKED\x10\x01\x12\x0c\n\x08EXPANDED\x10\x02"R\n\x19FeatureSet.Utf8Validation\x12\x19\n\x17UTF8_VALIDATION_UNKNOWN\x12\n\n\x06VERIFY\x10\x02\x12\x08\n\x04NONE\x10\x03"\x04\x08\x01\x10\x01"\\\n\x1aFeatureSet.MessageEncoding\x12\x1a\n\x18MESSAGE_ENCODING_UNKNOWN\x12\x13\n\x0fLENGTH_PREFIXED\x10\x01\x12\r\n\tDELIMITED\x10\x02"Q\n\x15FeatureSet.JsonFormat\x12\x15\n\x13JSON_FORMAT_UNKNOWN\x12\t\n\x05ALLOW\x10\x01\x12\x16\n\x12LEGACY_BEST_EFFORT\x10\x02*\x8b\x01\x08\xe8\x07\x10\x8bN\x1a\x82\x01\x12\x1d\x08\xe8\x07\x12\x07.pb.cpp\x1a\x0f.pb.CppFeatures\x12\x1f\x08\xe9\x07\x12\x08.pb.java\x1a\x10.pb.JavaFeatures\x12\x1b\x08\xea\x07\x12\x06.pb.go\x1a\x0e.pb.GoFeatures\x12#\x08\x86N\x12\n.pb.proto1\x1a\x12.pb.Proto1Features*\x06\x08\x8bN\x10\x90N*\x06\x08\x90N\x10\x91NJ\x06\x08\xe7\x07\x10\xe8\x07'

    field_presence: "FeatureSetFieldPresence" = betterproto2.field(
        1, betterproto2.TYPE_ENUM, default_factory=lambda: FeatureSetFieldPresence(0)
    )

    enum_type: "FeatureSetEnumType" = betterproto2.field(
        2, betterproto2.TYPE_ENUM, default_factory=lambda: FeatureSetEnumType(0)
    )

    repeated_field_encoding: "FeatureSetRepeatedFieldEncoding" = betterproto2.field(
        3,
        betterproto2.TYPE_ENUM,
        default_factory=lambda: FeatureSetRepeatedFieldEncoding(0),
    )

    utf8_validation: "FeatureSetUtf8Validation" = betterproto2.field(
        4, betterproto2.TYPE_ENUM, default_factory=lambda: FeatureSetUtf8Validation(0)
    )

    message_encoding: "FeatureSetMessageEncoding" = betterproto2.field(
        5, betterproto2.TYPE_ENUM, default_factory=lambda: FeatureSetMessageEncoding(0)
    )

    json_format: "FeatureSetJsonFormat" = betterproto2.field(
        6, betterproto2.TYPE_ENUM, default_factory=lambda: FeatureSetJsonFormat(0)
    )


default_message_pool.register_message("google.protobuf", "FeatureSet", FeatureSet)


@dataclass(eq=False, repr=False)
class FeatureSetDefaults(betterproto2.Message):
    """
    A compiled specification for the defaults of a set of features.  These
    messages are generated from FeatureSet extensions and can be used to seed
    feature resolution. The resolution with this object becomes a simple search
    for the closest matching edition, followed by proto merges.
    """

    @staticmethod
    def _serialized_pb():
        return b"\n\x12FeatureSetDefaults\x12X\n\x08defaults\x18\x01 \x03(\x0b2<.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefaultR\x08defaults\x12A\n\x0fminimum_edition\x18\x04 \x01(\x0e2\x18.google.protobuf.EditionR\x0eminimumEdition\x12A\n\x0fmaximum_edition\x18\x05 \x01(\x0e2\x18.google.protobuf.EditionR\x0emaximumEdition\x1a\x8b\x02\n+FeatureSetDefaults.FeatureSetEditionDefault\x122\n\x07edition\x18\x03 \x01(\x0e2\x18.google.protobuf.EditionR\x07edition\x12N\n\x14overridable_features\x18\x04 \x01(\x0b2\x1b.google.protobuf.FeatureSetR\x13overridableFeatures\x12B\n\x0efixed_features\x18\x05 \x01(\x0b2\x1b.google.protobuf.FeatureSetR\rfixedFeaturesJ\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03R\x08features"

    defaults: "list[FeatureSetDefaultsFeatureSetEditionDefault]" = betterproto2.field(
        1, betterproto2.TYPE_MESSAGE, repeated=True
    )

    minimum_edition: "Edition" = betterproto2.field(
        4, betterproto2.TYPE_ENUM, default_factory=lambda: Edition(0)
    )
    """
    The minimum supported edition (inclusive) when this was constructed.
    Editions before this will not have defaults.
    """

    maximum_edition: "Edition" = betterproto2.field(
        5, betterproto2.TYPE_ENUM, default_factory=lambda: Edition(0)
    )
    """
    The maximum known edition (inclusive) when this was constructed. Editions
    after this will not have reliable defaults.
    """


default_message_pool.register_message(
    "google.protobuf", "FeatureSetDefaults", FeatureSetDefaults
)


@dataclass(eq=False, repr=False)
class FeatureSetDefaultsFeatureSetEditionDefault(betterproto2.Message):
    """
    A map from every known edition with a unique set of defaults to its
    defaults. Not all editions may be contained here.  For a given edition,
    the defaults at the closest matching edition ordered at or before it should
    be used.  This field must be in strict ascending order by edition.
    """

    @staticmethod
    def _serialized_pb():
        return b"\n+FeatureSetDefaults.FeatureSetEditionDefault\x122\n\x07edition\x18\x03 \x01(\x0e2\x18.google.protobuf.EditionR\x07edition\x12N\n\x14overridable_features\x18\x04 \x01(\x0b2\x1b.google.protobuf.FeatureSetR\x13overridableFeatures\x12B\n\x0efixed_features\x18\x05 \x01(\x0b2\x1b.google.protobuf.FeatureSetR\rfixedFeaturesJ\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03R\x08features"

    edition: "Edition" = betterproto2.field(
        3, betterproto2.TYPE_ENUM, default_factory=lambda: Edition(0)
    )

    overridable_features: "FeatureSet | None" = betterproto2.field(
        4, betterproto2.TYPE_MESSAGE, optional=True
    )
    """
    Defaults of features that can be overridden in this edition.
    """

    fixed_features: "FeatureSet | None" = betterproto2.field(
        5, betterproto2.TYPE_MESSAGE, optional=True
    )
    """
    Defaults of features that can't be overridden in this edition.
    """


default_message_pool.register_message(
    "google.protobuf",
    "FeatureSetDefaults.FeatureSetEditionDefault",
    FeatureSetDefaultsFeatureSetEditionDefault,
)


@dataclass(eq=False, repr=False)
class FieldDescriptorProto(betterproto2.Message):
    """
    Describes a field within a message.
    """

    @staticmethod
    def _serialized_pb():
        return b'\n\x14FieldDescriptorProto\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x16\n\x06number\x18\x03 \x01(\x05R\x06number\x12A\n\x05label\x18\x04 \x01(\x0e2+.google.protobuf.FieldDescriptorProto.LabelR\x05label\x12>\n\x04type\x18\x05 \x01(\x0e2*.google.protobuf.FieldDescriptorProto.TypeR\x04type\x12\x1b\n\ttype_name\x18\x06 \x01(\tR\x08typeName\x12\x1a\n\x08extendee\x18\x02 \x01(\tR\x08extendee\x12#\n\rdefault_value\x18\x07 \x01(\tR\x0cdefaultValue\x12\x1f\n\x0boneof_index\x18\t \x01(\x05R\noneofIndex\x12\x1b\n\tjson_name\x18\n \x01(\tR\x08jsonName\x127\n\x07options\x18\x08 \x01(\x0b2\x1d.google.protobuf.FieldOptionsR\x07options\x12\'\n\x0fproto3_optional\x18\x11 \x01(\x08R\x0eproto3Optional"\xcb\x02\n\x19FieldDescriptorProto.Type\x12\x0f\n\x0bTYPE_DOUBLE\x10\x01\x12\x0e\n\nTYPE_FLOAT\x10\x02\x12\x0e\n\nTYPE_INT64\x10\x03\x12\x0f\n\x0bTYPE_UINT64\x10\x04\x12\x0e\n\nTYPE_INT32\x10\x05\x12\x10\n\x0cTYPE_FIXED64\x10\x06\x12\x10\n\x0cTYPE_FIXED32\x10\x07\x12\r\n\tTYPE_BOOL\x10\x08\x12\x0f\n\x0bTYPE_STRING\x10\t\x12\x0e\n\nTYPE_GROUP\x10\n\x12\x10\n\x0cTYPE_MESSAGE\x10\x0b\x12\x0e\n\nTYPE_BYTES\x10\x0c\x12\x0f\n\x0bTYPE_UINT32\x10\r\x12\r\n\tTYPE_ENUM\x10\x0e\x12\x11\n\rTYPE_SFIXED32\x10\x0f\x12\x11\n\rTYPE_SFIXED64\x10\x10\x12\x0f\n\x0bTYPE_SINT32\x10\x11\x12\x0f\n\x0bTYPE_SINT64\x10\x12"X\n\x1aFieldDescriptorProto.Label\x12\x12\n\x0eLABEL_OPTIONAL\x10\x01\x12\x12\n\x0eLABEL_REPEATED\x10\x03\x12\x12\n\x0eLABEL_REQUIRED\x10\x02'

    name: "str" = betterproto2.field(1, betterproto2.TYPE_STRING)

    number: "int" = betterproto2.field(3, betterproto2.TYPE_INT32)

    label: "FieldDescriptorProtoLabel" = betterproto2.field(
        4, betterproto2.TYPE_ENUM, default_factory=lambda: FieldDescriptorProtoLabel(0)
    )

    type: "FieldDescriptorProtoType" = betterproto2.field(
        5, betterproto2.TYPE_ENUM, default_factory=lambda: FieldDescriptorProtoType(0)
    )
    """
    If type_name is set, this need not be set.  If both this and type_name
    are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
    """

    type_name: "str" = betterproto2.field(6, betterproto2.TYPE_STRING)
    """
    For message and enum types, this is the name of the type.  If the name
    starts with a '.', it is fully-qualified.  Otherwise, C++-like scoping
    rules are used to find the type (i.e. first the nested types within this
    message are searched, then within the parent, on up to the root
    namespace).
    """

    extendee: "str" = betterproto2.field(2, betterproto2.TYPE_STRING)
    """
    For extensions, this is the name of the type being extended.  It is
    resolved in the same manner as type_name.
    """

    default_value: "str" = betterproto2.field(7, betterproto2.TYPE_STRING)
    """
    For numeric types, contains the original text representation of the value.
    For booleans, "true" or "false".
    For strings, contains the default text contents (not escaped in any way).
    For bytes, contains the C escaped value.  All bytes >= 128 are escaped.
    """

    oneof_index: "int" = betterproto2.field(9, betterproto2.TYPE_INT32)
    """
    If set, gives the index of a oneof in the containing type's oneof_decl
    list.  This field is a member of that oneof.
    """

    json_name: "str" = betterproto2.field(10, betterproto2.TYPE_STRING)
    """
    JSON name of this field. The value is set by protocol compiler. If the
    user has set a "json_name" option on this field, that option's value
    will be used. Otherwise, it's deduced from the field's name by converting
    it to camelCase.
    """

    options: "FieldOptions | None" = betterproto2.field(
        8, betterproto2.TYPE_MESSAGE, optional=True
    )

    proto3_optional: "bool" = betterproto2.field(17, betterproto2.TYPE_BOOL)
    """
    If true, this is a proto3 "optional". When a proto3 field is optional, it
    tracks presence regardless of field type.

    When proto3_optional is true, this field must belong to a oneof to signal
    to old proto3 clients that presence is tracked for this field. This oneof
    is known as a "synthetic" oneof, and this field must be its sole member
    (each proto3 optional field gets its own synthetic oneof). Synthetic oneofs
    exist in the descriptor only, and do not generate any API. Synthetic oneofs
    must be ordered after all "real" oneofs.

    For message fields, proto3_optional doesn't create any semantic change,
    since non-repeated message fields always track presence. However it still
    indicates the semantic detail of whether the user wrote "optional" or not.
    This can be useful for round-tripping the .proto file. For consistency we
    give message fields a synthetic oneof also, even though it is not required
    to track presence. This is especially important because the parser can't
    tell if a field is a message or an enum, so it must always create a
    synthetic oneof.

    Proto2 optional fields do not set this flag, because they already indicate
    optional with `LABEL_OPTIONAL`.
    """


default_message_pool.register_message(
    "google.protobuf", "FieldDescriptorProto", FieldDescriptorProto
)


@dataclass(eq=False, repr=False)
class FieldOptions(betterproto2.Message):
    @staticmethod
    def _serialized_pb():
        return b'\n\x0cFieldOptions\x12A\n\x05ctype\x18\x01 \x01(\x0e2#.google.protobuf.FieldOptions.CType:\x06STRINGR\x05ctype\x12\x16\n\x06packed\x18\x02 \x01(\x08R\x06packed\x12G\n\x06jstype\x18\x06 \x01(\x0e2$.google.protobuf.FieldOptions.JSType:\tJS_NORMALR\x06jstype\x12\x19\n\x04lazy\x18\x05 \x01(\x08:\x05falseR\x04lazy\x12.\n\x0funverified_lazy\x18\x0f \x01(\x08:\x05falseR\x0eunverifiedLazy\x12%\n\ndeprecated\x18\x03 \x01(\x08:\x05falseR\ndeprecated\x12\x19\n\x04weak\x18\n \x01(\x08:\x05falseR\x04weak\x12(\n\x0cdebug_redact\x18\x10 \x01(\x08:\x05falseR\x0bdebugRedact\x12K\n\tretention\x18\x11 \x01(\x0e2-.google.protobuf.FieldOptions.OptionRetentionR\tretention\x12H\n\x07targets\x18\x13 \x03(\x0e2..google.protobuf.FieldOptions.OptionTargetTypeR\x07targets\x12W\n\x10edition_defaults\x18\x14 \x03(\x0b2,.google.protobuf.FieldOptions.EditionDefaultR\x0feditionDefaults\x127\n\x08features\x18\x15 \x01(\x0b2\x1b.google.protobuf.FeatureSetR\x08features\x12U\n\x0ffeature_support\x18\x16 \x01(\x0b2,.google.protobuf.FieldOptions.FeatureSupportR\x0efeatureSupport\x12X\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b2$.google.protobuf.UninterpretedOptionR\x13uninterpretedOption\x1ag\n\x1bFieldOptions.EditionDefault\x122\n\x07edition\x18\x03 \x01(\x0e2\x18.google.protobuf.EditionR\x07edition\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value\x1a\xa3\x02\n\x1bFieldOptions.FeatureSupport\x12G\n\x12edition_introduced\x18\x01 \x01(\x0e2\x18.google.protobuf.EditionR\x11editionIntroduced\x12G\n\x12edition_deprecated\x18\x02 \x01(\x0e2\x18.google.protobuf.EditionR\x11editionDeprecated\x12/\n\x13deprecation_warning\x18\x03 \x01(\tR\x12deprecationWarning\x12A\n\x0fedition_removed\x18\x04 \x01(\x0e2\x18.google.protobuf.EditionR\x0eeditionRemoved":\n\x12FieldOptions.CType\x12\x08\n\x06STRING\x12\x08\n\x04CORD\x10\x01\x12\x10\n\x0cSTRING_PIECE\x10\x02"@\n\x13FieldOptions.JSType\x12\x0b\n\tJS_NORMAL\x12\r\n\tJS_STRING\x10\x01\x12\r\n\tJS_NUMBER\x10\x02"`\n\x1cFieldOptions.OptionRetention\x12\x13\n\x11RETENTION_UNKNOWN\x12\x15\n\x11RETENTION_RUNTIME\x10\x01\x12\x14\n\x10RETENTION_SOURCE\x10\x02"\x97\x02\n\x1dFieldOptions.OptionTargetType\x12\x15\n\x13TARGET_TYPE_UNKNOWN\x12\x14\n\x10TARGET_TYPE_FILE\x10\x01\x12\x1f\n\x1bTARGET_TYPE_EXTENSION_RANGE\x10\x02\x12\x17\n\x13TARGET_TYPE_MESSAGE\x10\x03\x12\x15\n\x11TARGET_TYPE_FIELD\x10\x04\x12\x15\n\x11TARGET_TYPE_ONEOF\x10\x05\x12\x14\n\x10TARGET_TYPE_ENUM\x10\x06\x12\x1a\n\x16TARGET_TYPE_ENUM_ENTRY\x10\x07\x12\x17\n\x13TARGET_TYPE_SERVICE\x10\x08\x12\x16\n\x12TARGET_TYPE_METHOD\x10\t*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02J\x04\x08\x04\x10\x05J\x04\x08\x12\x10\x13'

    ctype: "FieldOptionsCType" = betterproto2.field(
        1, betterproto2.TYPE_ENUM, default_factory=lambda: FieldOptionsCType(0)
    )
    """
    NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead.
    The ctype option instructs the C++ code generator to use a different
    representation of the field than it normally would.  See the specific
    options below.  This option is only implemented to support use of
    [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of
    type "bytes" in the open source release.
    TODO: make ctype actually deprecated.
    """

    packed: "bool" = betterproto2.field(2, betterproto2.TYPE_BOOL)
    """
    The packed option can be enabled for repeated primitive fields to enable
    a more efficient representation on the wire. Rather than repeatedly
    writing the tag and type for each element, the entire array is encoded as
    a single length-delimited blob. In proto3, only explicit setting it to
    false will avoid using packed encoding.  This option is prohibited in
    Editions, but the `repeated_field_encoding` feature can be used to control
    the behavior.
    """

    jstype: "FieldOptionsJsType" = betterproto2.field(
        6, betterproto2.TYPE_ENUM, default_factory=lambda: FieldOptionsJsType(0)
    )
    """
    The jstype option determines the JavaScript type used for values of the
    field.  The option is permitted only for 64 bit integral and fixed types
    (int64, uint64, sint64, fixed64, sfixed64).  A field with jstype JS_STRING
    is represented as JavaScript string, which avoids loss of precision that
    can happen when a large value is converted to a floating point JavaScript.
    Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
    use the JavaScript "number" type.  The behavior of the default option
    JS_NORMAL is implementation dependent.

    This option is an enum to permit additional types to be added, e.g.
    goog.math.Integer.
    """

    lazy: "bool" = betterproto2.field(5, betterproto2.TYPE_BOOL)
    """
    Should this field be parsed lazily?  Lazy applies only to message-type
    fields.  It means that when the outer message is initially parsed, the
    inner message's contents will not be parsed but instead stored in encoded
    form.  The inner message will actually be parsed when it is first accessed.

    This is only a hint.  Implementations are free to choose whether to use
    eager or lazy parsing regardless of the value of this option.  However,
    setting this option true suggests that the protocol author believes that
    using lazy parsing on this field is worth the additional bookkeeping
    overhead typically needed to implement it.

    This option does not affect the public interface of any generated code;
    all method signatures remain the same.  Furthermore, thread-safety of the
    interface is not affected by this option; const methods remain safe to
    call from multiple threads concurrently, while non-const methods continue
    to require exclusive access.

    Note that lazy message fields are still eagerly verified to check
    ill-formed wireformat or missing required fields. Calling IsInitialized()
    on the outer message would fail if the inner message has missing required
    fields. Failed verification would result in parsing failure (except when
    uninitialized messages are acceptable).
    """

    unverified_lazy: "bool" = betterproto2.field(15, betterproto2.TYPE_BOOL)
    """
    unverified_lazy does no correctness checks on the byte stream. This should
    only be used where lazy with verification is prohibitive for performance
    reasons.
    """

    deprecated: "bool" = betterproto2.field(3, betterproto2.TYPE_BOOL)
    """
    Is this field deprecated?
    Depending on the target platform, this can emit Deprecated annotations
    for accessors, or it will be completely ignored; in the very least, this
    is a formalization for deprecating fields.
    """

    weak: "bool" = betterproto2.field(10, betterproto2.TYPE_BOOL)
    """
    For Google-internal migration only. Do not use.
    """

    debug_redact: "bool" = betterproto2.field(16, betterproto2.TYPE_BOOL)
    """
    Indicate that the field value should not be printed out when using debug
    formats, e.g. when the field contains sensitive credentials.
    """

    retention: "FieldOptionsOptionRetention" = betterproto2.field(
        17,
        betterproto2.TYPE_ENUM,
        default_factory=lambda: FieldOptionsOptionRetention(0),
    )

    targets: "list[FieldOptionsOptionTargetType]" = betterproto2.field(
        19, betterproto2.TYPE_ENUM, repeated=True
    )

    edition_defaults: "list[FieldOptionsEditionDefault]" = betterproto2.field(
        20, betterproto2.TYPE_MESSAGE, repeated=True
    )

    features: "FeatureSet | None" = betterproto2.field(
        21, betterproto2.TYPE_MESSAGE, optional=True
    )
    """
    Any features defined in the specific edition.
    """

    feature_support: "FieldOptionsFeatureSupport | None" = betterproto2.field(
        22, betterproto2.TYPE_MESSAGE, optional=True
    )

    uninterpreted_option: "list[UninterpretedOption]" = betterproto2.field(
        999, betterproto2.TYPE_MESSAGE, repeated=True
    )
    """
    The parser stores options it doesn't recognize here. See above.
    """


default_message_pool.register_message("google.protobuf", "FieldOptions", FieldOptions)


@dataclass(eq=False, repr=False)
class FieldOptionsEditionDefault(betterproto2.Message):
    @staticmethod
    def _serialized_pb():
        return b"\n\x1bFieldOptions.EditionDefault\x122\n\x07edition\x18\x03 \x01(\x0e2\x18.google.protobuf.EditionR\x07edition\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value"

    edition: "Edition" = betterproto2.field(
        3, betterproto2.TYPE_ENUM, default_factory=lambda: Edition(0)
    )

    value: "str" = betterproto2.field(2, betterproto2.TYPE_STRING)
    """
    Textproto value.
    """


default_message_pool.register_message(
    "google.protobuf", "FieldOptions.EditionDefault", FieldOptionsEditionDefault
)


@dataclass(eq=False, repr=False)
class FieldOptionsFeatureSupport(betterproto2.Message):
    """
    Information about the support window of a feature.
    """

    @staticmethod
    def _serialized_pb():
        return b"\n\x1bFieldOptions.FeatureSupport\x12G\n\x12edition_introduced\x18\x01 \x01(\x0e2\x18.google.protobuf.EditionR\x11editionIntroduced\x12G\n\x12edition_deprecated\x18\x02 \x01(\x0e2\x18.google.protobuf.EditionR\x11editionDeprecated\x12/\n\x13deprecation_warning\x18\x03 \x01(\tR\x12deprecationWarning\x12A\n\x0fedition_removed\x18\x04 \x01(\x0e2\x18.google.protobuf.EditionR\x0eeditionRemoved"

    edition_introduced: "Edition" = betterproto2.field(
        1, betterproto2.TYPE_ENUM, default_factory=lambda: Edition(0)
    )
    """
    The edition that this feature was first available in.  In editions
    earlier than this one, the default assigned to EDITION_LEGACY will be
    used, and proto files will not be able to override it.
    """

    edition_deprecated: "Edition" = betterproto2.field(
        2, betterproto2.TYPE_ENUM, default_factory=lambda: Edition(0)
    )
    """
    The edition this feature becomes deprecated in.  Using this after this
    edition may trigger warnings.
    """

    deprecation_warning: "str" = betterproto2.field(3, betterproto2.TYPE_STRING)
    """
    The deprecation warning text if this feature is used after the edition it
    was marked deprecated in.
    """

    edition_removed: "Edition" = betterproto2.field(
        4, betterproto2.TYPE_ENUM, default_factory=lambda: Edition(0)
    )
    """
    The edition this feature is no longer available in.  In editions after
    this one, the last default assigned will be used, and proto files will
    not be able to override it.
    """


default_message_pool.register_message(
    "google.protobuf", "FieldOptions.FeatureSupport", FieldOptionsFeatureSupport
)


@dataclass(eq=False, repr=False)
class FileDescriptorProto(betterproto2.Message):
    """
    Describes a complete .proto file.
    """

    @staticmethod
    def _serialized_pb():
        return b"\n\x13FileDescriptorProto\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n\x07package\x18\x02 \x01(\tR\x07package\x12\x1e\n\ndependency\x18\x03 \x03(\tR\ndependency\x12+\n\x11public_dependency\x18\n \x03(\x05R\x10publicDependency\x12'\n\x0fweak_dependency\x18\x0b \x03(\x05R\x0eweakDependency\x12C\n\x0cmessage_type\x18\x04 \x03(\x0b2 .google.protobuf.DescriptorProtoR\x0bmessageType\x12A\n\tenum_type\x18\x05 \x03(\x0b2$.google.protobuf.EnumDescriptorProtoR\x08enumType\x12A\n\x07service\x18\x06 \x03(\x0b2'.google.protobuf.ServiceDescriptorProtoR\x07service\x12C\n\textension\x18\x07 \x03(\x0b2%.google.protobuf.FieldDescriptorProtoR\textension\x126\n\x07options\x18\x08 \x01(\x0b2\x1c.google.protobuf.FileOptionsR\x07options\x12I\n\x10source_code_info\x18\t \x01(\x0b2\x1f.google.protobuf.SourceCodeInfoR\x0esourceCodeInfo\x12\x16\n\x06syntax\x18\x0c \x01(\tR\x06syntax\x122\n\x07edition\x18\x0e \x01(\x0e2\x18.google.protobuf.EditionR\x07edition"

    name: "str" = betterproto2.field(1, betterproto2.TYPE_STRING)
    """
    file name, relative to root of source tree
    """

    package: "str" = betterproto2.field(2, betterproto2.TYPE_STRING)
    """
    e.g. "foo", "foo.bar", etc.
    """

    dependency: "list[str]" = betterproto2.field(
        3, betterproto2.TYPE_STRING, repeated=True
    )
    """
    Names of files imported by this file.
    """

    public_dependency: "list[int]" = betterproto2.field(
        10, betterproto2.TYPE_INT32, repeated=True
    )
    """
    Indexes of the public imported files in the dependency list above.
    """

    weak_dependency: "list[int]" = betterproto2.field(
        11, betterproto2.TYPE_INT32, repeated=True
    )
    """
    Indexes of the weak imported files in the dependency list.
    For Google-internal migration only. Do not use.
    """

    message_type: "list[DescriptorProto]" = betterproto2.field(
        4, betterproto2.TYPE_MESSAGE, repeated=True
    )
    """
    All top-level definitions in this file.
    """

    enum_type: "list[EnumDescriptorProto]" = betterproto2.field(
        5, betterproto2.TYPE_MESSAGE, repeated=True
    )

    service: "list[ServiceDescriptorProto]" = betterproto2.field(
        6, betterproto2.TYPE_MESSAGE, repeated=True
    )

    extension: "list[FieldDescriptorProto]" = betterproto2.field(
        7, betterproto2.TYPE_MESSAGE, repeated=True
    )

    options: "FileOptions | None" = betterproto2.field(
        8, betterproto2.TYPE_MESSAGE, optional=True
    )

    source_code_info: "SourceCodeInfo | None" = betterproto2.field(
        9, betterproto2.TYPE_MESSAGE, optional=True
    )
    """
    This field contains optional information about the original source code.
    You may safely remove this entire field without harming runtime
    functionality of the descriptors -- the information is needed only by
    development tools.
    """

    syntax: "str" = betterproto2.field(12, betterproto2.TYPE_STRING)
    """
    The syntax of the proto file.
    The supported values are "proto2", "proto3", and "editions".

    If `edition` is present, this value must be "editions".
    """

    edition: "Edition" = betterproto2.field(
        14, betterproto2.TYPE_ENUM, default_factory=lambda: Edition(0)
    )
    """
    The edition of the proto file.
    """


default_message_pool.register_message(
    "google.protobuf", "FileDescriptorProto", FileDescriptorProto
)


@dataclass(eq=False, repr=False)
class FileDescriptorSet(betterproto2.Message):
    """
    The protocol compiler can output a FileDescriptorSet containing the .proto
    files it parses.
    """

    @staticmethod
    def _serialized_pb():
        return b"\n\x11FileDescriptorSet\x128\n\x04file\x18\x01 \x03(\x0b2$.google.protobuf.FileDescriptorProtoR\x04file*{\x08\x80\xec\xca\xff\x01\x10\x81\xec\xca\xff\x01\x1am\x12k\x08\x80\xec\xca\xff\x01\x124.buf.descriptor.v1.buf_file_descriptor_set_extension\x1a-.buf.descriptor.v1.FileDescriptorSetExtension"

    file: "list[FileDescriptorProto]" = betterproto2.field(
        1, betterproto2.TYPE_MESSAGE, repeated=True
    )


default_message_pool.register_message(
    "google.protobuf", "FileDescriptorSet", FileDescriptorSet
)


@dataclass(eq=False, repr=False)
class FileOptions(betterproto2.Message):
    """
    ===================================================================
    Options

    Each of the definitions above may have "options" attached.  These are
    just annotations which may cause code to be generated slightly differently
    or may contain hints for code that manipulates protocol messages.

    Clients may define custom options as extensions of the *Options messages.
    These extensions may not yet be known at parsing time, so the parser cannot
    store the values in them.  Instead it stores them in a field in the *Options
    message called uninterpreted_option. This field must have the same name
    across all *Options messages. We then use this field to populate the
    extensions when we build a descriptor, at which point all protos have been
    parsed and so all extensions are known.

    Extension numbers for custom options may be chosen as follows:
    * For options which will only be used within a single application or
      organization, or for experimental options, use field numbers 50000
      through 99999.  It is up to you to ensure that you do not use the
      same number for multiple options.
    * For options which will be published and used publicly by multiple
      independent entities, e-mail protobuf-global-extension-registry@google.com
      to reserve extension numbers. Simply provide your project name (e.g.
      Objective-C plugin) and your project website (if available) -- there's no
      need to explain how you intend to use them. Usually you only need one
      extension number. You can declare multiple options with only one extension
      number by putting them in a sub-message. See the Custom Options section of
      the docs for examples:
      https://developers.google.com/protocol-buffers/docs/proto#options
      If this turns out to be popular, a web service will be set up
      to automatically assign option numbers.
    """

    @staticmethod
    def _serialized_pb():
        return b"\n\x0bFileOptions\x12!\n\x0cjava_package\x18\x01 \x01(\tR\x0bjavaPackage\x120\n\x14java_outer_classname\x18\x08 \x01(\tR\x12javaOuterClassname\x125\n\x13java_multiple_files\x18\n \x01(\x08:\x05falseR\x11javaMultipleFiles\x12D\n\x1djava_generate_equals_and_hash\x18\x14 \x01(\x08R\x19javaGenerateEqualsAndHashB\x02\x18\x01\x12:\n\x16java_string_check_utf8\x18\x1b \x01(\x08:\x05falseR\x13javaStringCheckUtf8\x12S\n\x0coptimize_for\x18\t \x01(\x0e2).google.protobuf.FileOptions.OptimizeMode:\x05SPEEDR\x0boptimizeFor\x12\x1d\n\ngo_package\x18\x0b \x01(\tR\tgoPackage\x125\n\x13cc_generic_services\x18\x10 \x01(\x08:\x05falseR\x11ccGenericServices\x129\n\x15java_generic_services\x18\x11 \x01(\x08:\x05falseR\x13javaGenericServices\x125\n\x13py_generic_services\x18\x12 \x01(\x08:\x05falseR\x11pyGenericServices\x12%\n\ndeprecated\x18\x17 \x01(\x08:\x05falseR\ndeprecated\x12.\n\x10cc_enable_arenas\x18\x1f \x01(\x08:\x04trueR\x0eccEnableArenas\x12*\n\x11objc_class_prefix\x18$ \x01(\tR\x0fobjcClassPrefix\x12)\n\x10csharp_namespace\x18% \x01(\tR\x0fcsharpNamespace\x12!\n\x0cswift_prefix\x18' \x01(\tR\x0bswiftPrefix\x12(\n\x10php_class_prefix\x18( \x01(\tR\x0ephpClassPrefix\x12#\n\rphp_namespace\x18) \x01(\tR\x0cphpNamespace\x124\n\x16php_metadata_namespace\x18, \x01(\tR\x14phpMetadataNamespace\x12!\n\x0cruby_package\x18- \x01(\tR\x0brubyPackage\x127\n\x08features\x182 \x01(\x0b2\x1b.google.protobuf.FeatureSetR\x08features\x12X\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b2$.google.protobuf.UninterpretedOptionR\x13uninterpretedOption\"F\n\x18FileOptions.OptimizeMode\x12\t\n\x05SPEED\x10\x01\x12\r\n\tCODE_SIZE\x10\x02\x12\x10\n\x0cLITE_RUNTIME\x10\x03*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02J\x04\x08*\x10+J\x04\x08&\x10'R\x14php_generic_services"

    java_package: "str" = betterproto2.field(1, betterproto2.TYPE_STRING)
    """
    Sets the Java package where classes generated from this .proto will be
    placed.  By default, the proto package is used, but this is often
    inappropriate because proto packages do not normally start with backwards
    domain names.
    """

    java_outer_classname: "str" = betterproto2.field(8, betterproto2.TYPE_STRING)
    """
    Controls the name of the wrapper Java class generated for the .proto file.
    That class will always contain the .proto file's getDescriptor() method as
    well as any top-level extensions defined in the .proto file.
    If java_multiple_files is disabled, then all the other classes from the
    .proto file will be nested inside the single wrapper outer class.
    """

    java_multiple_files: "bool" = betterproto2.field(10, betterproto2.TYPE_BOOL)
    """
    If enabled, then the Java code generator will generate a separate .java
    file for each top-level message, enum, and service defined in the .proto
    file.  Thus, these types will *not* be nested inside the wrapper class
    named by java_outer_classname.  However, the wrapper class will still be
    generated to contain the file's getDescriptor() method as well as any
    top-level extensions defined in the file.
    """

    java_generate_equals_and_hash: "bool" = betterproto2.field(
        20, betterproto2.TYPE_BOOL
    )
    """
    This option does nothing.
    """

    java_string_check_utf8: "bool" = betterproto2.field(27, betterproto2.TYPE_BOOL)
    """
    A proto2 file can set this to true to opt in to UTF-8 checking for Java,
    which will throw an exception if invalid UTF-8 is parsed from the wire or
    assigned to a string field.

    TODO: clarify exactly what kinds of field types this option
    applies to, and update these docs accordingly.

    Proto3 files already perform these checks. Setting the option explicitly to
    false has no effect: it cannot be used to opt proto3 files out of UTF-8
    checks.
    """

    optimize_for: "FileOptionsOptimizeMode" = betterproto2.field(
        9, betterproto2.TYPE_ENUM, default_factory=lambda: FileOptionsOptimizeMode(0)
    )

    go_package: "str" = betterproto2.field(11, betterproto2.TYPE_STRING)
    """
    Sets the Go package where structs generated from this .proto will be
    placed. If omitted, the Go package will be derived from the following:
      - The basename of the package import path, if provided.
      - Otherwise, the package statement in the .proto file, if present.
      - Otherwise, the basename of the .proto file, without extension.
    """

    cc_generic_services: "bool" = betterproto2.field(16, betterproto2.TYPE_BOOL)
    """
    Should generic services be generated in each language?  "Generic" services
    are not specific to any particular RPC system.  They are generated by the
    main code generators in each language (without additional plugins).
    Generic services were the only kind of service generation supported by
    early versions of google.protobuf.

    Generic services are now considered deprecated in favor of using plugins
    that generate code specific to your particular RPC system.  Therefore,
    these default to false.  Old code which depends on generic services should
    explicitly set them to true.
    """

    java_generic_services: "bool" = betterproto2.field(17, betterproto2.TYPE_BOOL)

    py_generic_services: "bool" = betterproto2.field(18, betterproto2.TYPE_BOOL)

    deprecated: "bool" = betterproto2.field(23, betterproto2.TYPE_BOOL)
    """
    Is this file deprecated?
    Depending on the target platform, this can emit Deprecated annotations
    for everything in the file, or it will be completely ignored; in the very
    least, this is a formalization for deprecating files.
    """

    cc_enable_arenas: "bool" = betterproto2.field(31, betterproto2.TYPE_BOOL)
    """
    Enables the use of arenas for the proto messages in this file. This applies
    only to generated classes for C++.
    """

    objc_class_prefix: "str" = betterproto2.field(36, betterproto2.TYPE_STRING)
    """
    Sets the objective c class prefix which is prepended to all objective c
    generated classes from this .proto. There is no default.
    """

    csharp_namespace: "str" = betterproto2.field(37, betterproto2.TYPE_STRING)
    """
    Namespace for generated classes; defaults to the package.
    """

    swift_prefix: "str" = betterproto2.field(39, betterproto2.TYPE_STRING)
    """
    By default Swift generators will take the proto package and CamelCase it
    replacing '.' with underscore and use that to prefix the types/symbols
    defined. When this options is provided, they will use this value instead
    to prefix the types/symbols defined.
    """

    php_class_prefix: "str" = betterproto2.field(40, betterproto2.TYPE_STRING)
    """
    Sets the php class prefix which is prepended to all php generated classes
    from this .proto. Default is empty.
    """

    php_namespace: "str" = betterproto2.field(41, betterproto2.TYPE_STRING)
    """
    Use this option to change the namespace of php generated classes. Default
    is empty. When this option is empty, the package name will be used for
    determining the namespace.
    """

    php_metadata_namespace: "str" = betterproto2.field(44, betterproto2.TYPE_STRING)
    """
    Use this option to change the namespace of php generated metadata classes.
    Default is empty. When this option is empty, the proto file name will be
    used for determining the namespace.
    """

    ruby_package: "str" = betterproto2.field(45, betterproto2.TYPE_STRING)
    """
    Use this option to change the package of ruby generated classes. Default
    is empty. When this option is not set, the package name will be used for
    determining the ruby package.
    """

    features: "FeatureSet | None" = betterproto2.field(
        50, betterproto2.TYPE_MESSAGE, optional=True
    )
    """
    Any features defined in the specific edition.
    """

    uninterpreted_option: "list[UninterpretedOption]" = betterproto2.field(
        999, betterproto2.TYPE_MESSAGE, repeated=True
    )
    """
    The parser stores options it doesn't recognize here.
    See the documentation for the "Options" section above.
    """

    def __post_init__(self) -> None:
        super().__post_init__()
        if self.is_set("java_generate_equals_and_hash"):
            warnings.warn(
                "FileOptions.java_generate_equals_and_hash is deprecated",
                DeprecationWarning,
            )


default_message_pool.register_message("google.protobuf", "FileOptions", FileOptions)


@dataclass(eq=False, repr=False)
class GeneratedCodeInfo(betterproto2.Message):
    """
    Describes the relationship between generated code and its original source
    file. A GeneratedCodeInfo message is associated with only one generated
    source file, but may contain references to different source .proto files.
    """

    @staticmethod
    def _serialized_pb():
        return b'\n\x11GeneratedCodeInfo\x12M\n\nannotation\x18\x01 \x03(\x0b2-.google.protobuf.GeneratedCodeInfo.AnnotationR\nannotation\x1a\x98\x02\n\x1cGeneratedCodeInfo.Annotation\x12\x16\n\x04path\x18\x01 \x03(\x05R\x04pathB\x02\x10\x01\x12\x1f\n\x0bsource_file\x18\x02 \x01(\tR\nsourceFile\x12\x14\n\x05begin\x18\x03 \x01(\x05R\x05begin\x12\x10\n\x03end\x18\x04 \x01(\x05R\x03end\x12R\n\x08semantic\x18\x05 \x01(\x0e26.google.protobuf.GeneratedCodeInfo.Annotation.SemanticR\x08semantic"C\n%GeneratedCodeInfo.Annotation.Semantic\x12\x06\n\x04NONE\x12\x07\n\x03SET\x10\x01\x12\t\n\x05ALIAS\x10\x02'

    annotation: "list[GeneratedCodeInfoAnnotation]" = betterproto2.field(
        1, betterproto2.TYPE_MESSAGE, repeated=True
    )
    """
    An Annotation connects some span of text in generated code to an element
    of its generating .proto file.
    """


default_message_pool.register_message(
    "google.protobuf", "GeneratedCodeInfo", GeneratedCodeInfo
)


@dataclass(eq=False, repr=False)
class GeneratedCodeInfoAnnotation(betterproto2.Message):
    @staticmethod
    def _serialized_pb():
        return b'\n\x1cGeneratedCodeInfo.Annotation\x12\x16\n\x04path\x18\x01 \x03(\x05R\x04pathB\x02\x10\x01\x12\x1f\n\x0bsource_file\x18\x02 \x01(\tR\nsourceFile\x12\x14\n\x05begin\x18\x03 \x01(\x05R\x05begin\x12\x10\n\x03end\x18\x04 \x01(\x05R\x03end\x12R\n\x08semantic\x18\x05 \x01(\x0e26.google.protobuf.GeneratedCodeInfo.Annotation.SemanticR\x08semantic"C\n%GeneratedCodeInfo.Annotation.Semantic\x12\x06\n\x04NONE\x12\x07\n\x03SET\x10\x01\x12\t\n\x05ALIAS\x10\x02'

    path: "list[int]" = betterproto2.field(1, betterproto2.TYPE_INT32, repeated=True)
    """
    Identifies the element in the original source .proto file. This field
    is formatted the same as SourceCodeInfo.Location.path.
    """

    source_file: "str" = betterproto2.field(2, betterproto2.TYPE_STRING)
    """
    Identifies the filesystem path to the original source .proto.
    """

    begin: "int" = betterproto2.field(3, betterproto2.TYPE_INT32)
    """
    Identifies the starting offset in bytes in the generated code
    that relates to the identified object.
    """

    end: "int" = betterproto2.field(4, betterproto2.TYPE_INT32)
    """
    Identifies the ending offset in bytes in the generated code that
    relates to the identified object. The end offset should be one past
    the last relevant byte (so the length of the text = end - begin).
    """

    semantic: "GeneratedCodeInfoAnnotationSemantic" = betterproto2.field(
        5,
        betterproto2.TYPE_ENUM,
        default_factory=lambda: GeneratedCodeInfoAnnotationSemantic(0),
    )


default_message_pool.register_message(
    "google.protobuf", "GeneratedCodeInfo.Annotation", GeneratedCodeInfoAnnotation
)


@dataclass(eq=False, repr=False)
class MessageOptions(betterproto2.Message):
    @staticmethod
    def _serialized_pb():
        return b'\n\x0eMessageOptions\x12<\n\x17message_set_wire_format\x18\x01 \x01(\x08:\x05falseR\x14messageSetWireFormat\x12L\n\x1fno_standard_descriptor_accessor\x18\x02 \x01(\x08:\x05falseR\x1cnoStandardDescriptorAccessor\x12%\n\ndeprecated\x18\x03 \x01(\x08:\x05falseR\ndeprecated\x12\x1b\n\tmap_entry\x18\x07 \x01(\x08R\x08mapEntry\x12V\n&deprecated_legacy_json_field_conflicts\x18\x0b \x01(\x08R"deprecatedLegacyJsonFieldConflictsB\x02\x18\x01\x127\n\x08features\x18\x0c \x01(\x0b2\x1b.google.protobuf.FeatureSetR\x08features\x12X\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b2$.google.protobuf.UninterpretedOptionR\x13uninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02J\x04\x08\x04\x10\x05J\x04\x08\x05\x10\x06J\x04\x08\x06\x10\x07J\x04\x08\x08\x10\tJ\x04\x08\t\x10\n'

    message_set_wire_format: "bool" = betterproto2.field(1, betterproto2.TYPE_BOOL)
    """
    Set true to use the old proto1 MessageSet wire format for extensions.
    This is provided for backwards-compatibility with the MessageSet wire
    format.  You should not use this for any other reason:  It's less
    efficient, has fewer features, and is more complicated.

    The message must be defined exactly as follows:
      message Foo {
        option message_set_wire_format = true;
        extensions 4 to max;
      }
    Note that the message cannot have any defined fields; MessageSets only
    have extensions.

    All extensions of your type must be singular messages; e.g. they cannot
    be int32s, enums, or repeated messages.

    Because this is an option, the above two restrictions are not enforced by
    the protocol compiler.
    """

    no_standard_descriptor_accessor: "bool" = betterproto2.field(
        2, betterproto2.TYPE_BOOL
    )
    """
    Disables the generation of the standard "descriptor()" accessor, which can
    conflict with a field of the same name.  This is meant to make migration
    from proto1 easier; new code should avoid fields named "descriptor".
    """

    deprecated: "bool" = betterproto2.field(3, betterproto2.TYPE_BOOL)
    """
    Is this message deprecated?
    Depending on the target platform, this can emit Deprecated annotations
    for the message, or it will be completely ignored; in the very least,
    this is a formalization for deprecating messages.
    """

    map_entry: "bool" = betterproto2.field(7, betterproto2.TYPE_BOOL)
    """
    Whether the message is an automatically generated map entry type for the
    maps field.

    For maps fields:
        map<KeyType, ValueType> map_field = 1;
    The parsed descriptor looks like:
        message MapFieldEntry {
            option map_entry = true;
            optional KeyType key = 1;
            optional ValueType value = 2;
        }
        repeated MapFieldEntry map_field = 1;

    Implementations may choose not to generate the map_entry=true message, but
    use a native map in the target language to hold the keys and values.
    The reflection APIs in such implementations still need to work as
    if the field is a repeated message field.

    NOTE: Do not set the option in .proto files. Always use the maps syntax
    instead. The option should only be implicitly set by the proto compiler
    parser.
    """

    deprecated_legacy_json_field_conflicts: "bool" = betterproto2.field(
        11, betterproto2.TYPE_BOOL
    )
    """
    Enable the legacy handling of JSON field name conflicts.  This lowercases
    and strips underscored from the fields before comparison in proto3 only.
    The new behavior takes `json_name` into account and applies to proto2 as
    well.

    This should only be used as a temporary measure against broken builds due
    to the change in behavior for JSON field name conflicts.

    TODO This is legacy behavior we plan to remove once downstream
    teams have had time to migrate.
    """

    features: "FeatureSet | None" = betterproto2.field(
        12, betterproto2.TYPE_MESSAGE, optional=True
    )
    """
    Any features defined in the specific edition.
    """

    uninterpreted_option: "list[UninterpretedOption]" = betterproto2.field(
        999, betterproto2.TYPE_MESSAGE, repeated=True
    )
    """
    The parser stores options it doesn't recognize here. See above.
    """

    def __post_init__(self) -> None:
        super().__post_init__()
        if self.is_set("deprecated_legacy_json_field_conflicts"):
            warnings.warn(
                "MessageOptions.deprecated_legacy_json_field_conflicts is deprecated",
                DeprecationWarning,
            )


default_message_pool.register_message(
    "google.protobuf", "MessageOptions", MessageOptions
)


@dataclass(eq=False, repr=False)
class MethodDescriptorProto(betterproto2.Message):
    """
    Describes a method of a service.
    """

    @staticmethod
    def _serialized_pb():
        return b"\n\x15MethodDescriptorProto\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x1d\n\ninput_type\x18\x02 \x01(\tR\tinputType\x12\x1f\n\x0boutput_type\x18\x03 \x01(\tR\noutputType\x128\n\x07options\x18\x04 \x01(\x0b2\x1e.google.protobuf.MethodOptionsR\x07options\x120\n\x10client_streaming\x18\x05 \x01(\x08:\x05falseR\x0fclientStreaming\x120\n\x10server_streaming\x18\x06 \x01(\x08:\x05falseR\x0fserverStreaming"

    name: "str" = betterproto2.field(1, betterproto2.TYPE_STRING)

    input_type: "str" = betterproto2.field(2, betterproto2.TYPE_STRING)
    """
    Input and output type names.  These are resolved in the same way as
    FieldDescriptorProto.type_name, but must refer to a message type.
    """

    output_type: "str" = betterproto2.field(3, betterproto2.TYPE_STRING)

    options: "MethodOptions | None" = betterproto2.field(
        4, betterproto2.TYPE_MESSAGE, optional=True
    )

    client_streaming: "bool" = betterproto2.field(5, betterproto2.TYPE_BOOL)
    """
    Identifies if client streams multiple client messages
    """

    server_streaming: "bool" = betterproto2.field(6, betterproto2.TYPE_BOOL)
    """
    Identifies if server streams multiple server messages
    """


default_message_pool.register_message(
    "google.protobuf", "MethodDescriptorProto", MethodDescriptorProto
)


@dataclass(eq=False, repr=False)
class MethodOptions(betterproto2.Message):
    @staticmethod
    def _serialized_pb():
        return b'\n\rMethodOptions\x12%\n\ndeprecated\x18! \x01(\x08:\x05falseR\ndeprecated\x12q\n\x11idempotency_level\x18" \x01(\x0e2/.google.protobuf.MethodOptions.IdempotencyLevel:\x13IDEMPOTENCY_UNKNOWNR\x10idempotencyLevel\x127\n\x08features\x18# \x01(\x0b2\x1b.google.protobuf.FeatureSetR\x08features\x12X\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b2$.google.protobuf.UninterpretedOptionR\x13uninterpretedOption"\\\n\x1eMethodOptions.IdempotencyLevel\x12\x15\n\x13IDEMPOTENCY_UNKNOWN\x12\x13\n\x0fNO_SIDE_EFFECTS\x10\x01\x12\x0e\n\nIDEMPOTENT\x10\x02*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02'

    deprecated: "bool" = betterproto2.field(33, betterproto2.TYPE_BOOL)
    """
    Note:  Field numbers 1 through 32 are reserved for Google's internal RPC
      framework.  We apologize for hoarding these numbers to ourselves, but
      we were already using them long before we decided to release Protocol
      Buffers.

    Is this method deprecated?
    Depending on the target platform, this can emit Deprecated annotations
    for the method, or it will be completely ignored; in the very least,
    this is a formalization for deprecating methods.
    """

    idempotency_level: "MethodOptionsIdempotencyLevel" = betterproto2.field(
        34,
        betterproto2.TYPE_ENUM,
        default_factory=lambda: MethodOptionsIdempotencyLevel(0),
    )

    features: "FeatureSet | None" = betterproto2.field(
        35, betterproto2.TYPE_MESSAGE, optional=True
    )
    """
    Any features defined in the specific edition.
    """

    uninterpreted_option: "list[UninterpretedOption]" = betterproto2.field(
        999, betterproto2.TYPE_MESSAGE, repeated=True
    )
    """
    The parser stores options it doesn't recognize here. See above.
    """


default_message_pool.register_message("google.protobuf", "MethodOptions", MethodOptions)


@dataclass(eq=False, repr=False)
class OneofDescriptorProto(betterproto2.Message):
    """
    Describes a oneof.
    """

    @staticmethod
    def _serialized_pb():
        return b"\n\x14OneofDescriptorProto\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x127\n\x07options\x18\x02 \x01(\x0b2\x1d.google.protobuf.OneofOptionsR\x07options"

    name: "str" = betterproto2.field(1, betterproto2.TYPE_STRING)

    options: "OneofOptions | None" = betterproto2.field(
        2, betterproto2.TYPE_MESSAGE, optional=True
    )


default_message_pool.register_message(
    "google.protobuf", "OneofDescriptorProto", OneofDescriptorProto
)


@dataclass(eq=False, repr=False)
class OneofOptions(betterproto2.Message):
    @staticmethod
    def _serialized_pb():
        return b"\n\x0cOneofOptions\x127\n\x08features\x18\x01 \x01(\x0b2\x1b.google.protobuf.FeatureSetR\x08features\x12X\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b2$.google.protobuf.UninterpretedOptionR\x13uninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02"

    features: "FeatureSet | None" = betterproto2.field(
        1, betterproto2.TYPE_MESSAGE, optional=True
    )
    """
    Any features defined in the specific edition.
    """

    uninterpreted_option: "list[UninterpretedOption]" = betterproto2.field(
        999, betterproto2.TYPE_MESSAGE, repeated=True
    )
    """
    The parser stores options it doesn't recognize here. See above.
    """


default_message_pool.register_message("google.protobuf", "OneofOptions", OneofOptions)


@dataclass(eq=False, repr=False)
class ServiceDescriptorProto(betterproto2.Message):
    """
    Describes a service.
    """

    @staticmethod
    def _serialized_pb():
        return b"\n\x16ServiceDescriptorProto\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12>\n\x06method\x18\x02 \x03(\x0b2&.google.protobuf.MethodDescriptorProtoR\x06method\x129\n\x07options\x18\x03 \x01(\x0b2\x1f.google.protobuf.ServiceOptionsR\x07options"

    name: "str" = betterproto2.field(1, betterproto2.TYPE_STRING)

    method: "list[MethodDescriptorProto]" = betterproto2.field(
        2, betterproto2.TYPE_MESSAGE, repeated=True
    )

    options: "ServiceOptions | None" = betterproto2.field(
        3, betterproto2.TYPE_MESSAGE, optional=True
    )


default_message_pool.register_message(
    "google.protobuf", "ServiceDescriptorProto", ServiceDescriptorProto
)


@dataclass(eq=False, repr=False)
class ServiceOptions(betterproto2.Message):
    @staticmethod
    def _serialized_pb():
        return b'\n\x0eServiceOptions\x127\n\x08features\x18" \x01(\x0b2\x1b.google.protobuf.FeatureSetR\x08features\x12%\n\ndeprecated\x18! \x01(\x08:\x05falseR\ndeprecated\x12X\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b2$.google.protobuf.UninterpretedOptionR\x13uninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02'

    features: "FeatureSet | None" = betterproto2.field(
        34, betterproto2.TYPE_MESSAGE, optional=True
    )
    """
    Any features defined in the specific edition.
    """

    deprecated: "bool" = betterproto2.field(33, betterproto2.TYPE_BOOL)
    """
    Note:  Field numbers 1 through 32 are reserved for Google's internal RPC
      framework.  We apologize for hoarding these numbers to ourselves, but
      we were already using them long before we decided to release Protocol
      Buffers.

    Is this service deprecated?
    Depending on the target platform, this can emit Deprecated annotations
    for the service, or it will be completely ignored; in the very least,
    this is a formalization for deprecating services.
    """

    uninterpreted_option: "list[UninterpretedOption]" = betterproto2.field(
        999, betterproto2.TYPE_MESSAGE, repeated=True
    )
    """
    The parser stores options it doesn't recognize here. See above.
    """


default_message_pool.register_message(
    "google.protobuf", "ServiceOptions", ServiceOptions
)


@dataclass(eq=False, repr=False)
class SourceCodeInfo(betterproto2.Message):
    """
    ===================================================================
    Optional source code info

    Encapsulates information about the original source file from which a
    FileDescriptorProto was generated.
    """

    @staticmethod
    def _serialized_pb():
        return b"\n\x0eSourceCodeInfo\x12D\n\x08location\x18\x01 \x03(\x0b2(.google.protobuf.SourceCodeInfo.LocationR\x08location\x1a\xdd\x01\n\x17SourceCodeInfo.Location\x12\x16\n\x04path\x18\x01 \x03(\x05R\x04pathB\x02\x10\x01\x12\x16\n\x04span\x18\x02 \x03(\x05R\x04spanB\x02\x10\x01\x12)\n\x10leading_comments\x18\x03 \x01(\tR\x0fleadingComments\x12+\n\x11trailing_comments\x18\x04 \x01(\tR\x10trailingComments\x12:\n\x19leading_detached_comments\x18\x06 \x03(\tR\x17leadingDetachedComments*u\x08\x80\xec\xca\xff\x01\x10\x81\xec\xca\xff\x01\x1ag\x12e\x08\x80\xec\xca\xff\x01\x121.buf.descriptor.v1.buf_source_code_info_extension\x1a*.buf.descriptor.v1.SourceCodeInfoExtension"

    location: "list[SourceCodeInfoLocation]" = betterproto2.field(
        1, betterproto2.TYPE_MESSAGE, repeated=True
    )
    """
    A Location identifies a piece of source code in a .proto file which
    corresponds to a particular definition.  This information is intended
    to be useful to IDEs, code indexers, documentation generators, and similar
    tools.

    For example, say we have a file like:
      message Foo {
        optional string foo = 1;
      }
    Let's look at just the field definition:
      optional string foo = 1;
      ^       ^^     ^^  ^  ^^^
      a       bc     de  f  ghi
    We have the following locations:
      span   path               represents
      [a,i)  [ 4, 0, 2, 0 ]     The whole field definition.
      [a,b)  [ 4, 0, 2, 0, 4 ]  The label (optional).
      [c,d)  [ 4, 0, 2, 0, 5 ]  The type (string).
      [e,f)  [ 4, 0, 2, 0, 1 ]  The name (foo).
      [g,h)  [ 4, 0, 2, 0, 3 ]  The number (1).

    Notes:
    - A location may refer to a repeated field itself (i.e. not to any
      particular index within it).  This is used whenever a set of elements are
      logically enclosed in a single code segment.  For example, an entire
      extend block (possibly containing multiple extension definitions) will
      have an outer location whose path refers to the "extensions" repeated
      field without an index.
    - Multiple locations may have the same path.  This happens when a single
      logical declaration is spread out across multiple places.  The most
      obvious example is the "extend" block again -- there may be multiple
      extend blocks in the same scope, each of which will have the same path.
    - A location's span is not always a subset of its parent's span.  For
      example, the "extendee" of an extension declaration appears at the
      beginning of the "extend" block and is shared by all extensions within
      the block.
    - Just because a location's span is a subset of some other location's span
      does not mean that it is a descendant.  For example, a "group" defines
      both a type and a field in a single declaration.  Thus, the locations
      corresponding to the type and field and their components will overlap.
    - Code which tries to interpret locations should probably be designed to
      ignore those that it doesn't understand, as more types of locations could
      be recorded in the future.
    """


default_message_pool.register_message(
    "google.protobuf", "SourceCodeInfo", SourceCodeInfo
)


@dataclass(eq=False, repr=False)
class SourceCodeInfoLocation(betterproto2.Message):
    @staticmethod
    def _serialized_pb():
        return b"\n\x17SourceCodeInfo.Location\x12\x16\n\x04path\x18\x01 \x03(\x05R\x04pathB\x02\x10\x01\x12\x16\n\x04span\x18\x02 \x03(\x05R\x04spanB\x02\x10\x01\x12)\n\x10leading_comments\x18\x03 \x01(\tR\x0fleadingComments\x12+\n\x11trailing_comments\x18\x04 \x01(\tR\x10trailingComments\x12:\n\x19leading_detached_comments\x18\x06 \x03(\tR\x17leadingDetachedComments"

    path: "list[int]" = betterproto2.field(1, betterproto2.TYPE_INT32, repeated=True)
    """
    Identifies which part of the FileDescriptorProto was defined at this
    location.

    Each element is a field number or an index.  They form a path from
    the root FileDescriptorProto to the place where the definition appears.
    For example, this path:
      [ 4, 3, 2, 7, 1 ]
    refers to:
      file.message_type(3)  // 4, 3
          .field(7)         // 2, 7
          .name()           // 1
    This is because FileDescriptorProto.message_type has field number 4:
      repeated DescriptorProto message_type = 4;
    and DescriptorProto.field has field number 2:
      repeated FieldDescriptorProto field = 2;
    and FieldDescriptorProto.name has field number 1:
      optional string name = 1;

    Thus, the above path gives the location of a field name.  If we removed
    the last element:
      [ 4, 3, 2, 7 ]
    this path refers to the whole field declaration (from the beginning
    of the label to the terminating semicolon).
    """

    span: "list[int]" = betterproto2.field(2, betterproto2.TYPE_INT32, repeated=True)
    """
    Always has exactly three or four elements: start line, start column,
    end line (optional, otherwise assumed same as start line), end column.
    These are packed into a single field for efficiency.  Note that line
    and column numbers are zero-based -- typically you will want to add
    1 to each before displaying to a user.
    """

    leading_comments: "str" = betterproto2.field(3, betterproto2.TYPE_STRING)
    """
    If this SourceCodeInfo represents a complete declaration, these are any
    comments appearing before and after the declaration which appear to be
    attached to the declaration.

    A series of line comments appearing on consecutive lines, with no other
    tokens appearing on those lines, will be treated as a single comment.

    leading_detached_comments will keep paragraphs of comments that appear
    before (but not connected to) the current element. Each paragraph,
    separated by empty lines, will be one comment element in the repeated
    field.

    Only the comment content is provided; comment markers (e.g. //) are
    stripped out.  For block comments, leading whitespace and an asterisk
    will be stripped from the beginning of each line other than the first.
    Newlines are included in the output.

    Examples:

      optional int32 foo = 1;  // Comment attached to foo.
      // Comment attached to bar.
      optional int32 bar = 2;

      optional string baz = 3;
      // Comment attached to baz.
      // Another line attached to baz.

      // Comment attached to moo.
      //
      // Another line attached to moo.
      optional double moo = 4;

      // Detached comment for corge. This is not leading or trailing comments
      // to moo or corge because there are blank lines separating it from
      // both.

      // Detached comment for corge paragraph 2.

      optional string corge = 5;
      /* Block comment attached
       * to corge.  Leading asterisks
       * will be removed. */
      /* Block comment attached to
       * grault. */
      optional int32 grault = 6;

      // ignored detached comments.
    """

    trailing_comments: "str" = betterproto2.field(4, betterproto2.TYPE_STRING)

    leading_detached_comments: "list[str]" = betterproto2.field(
        6, betterproto2.TYPE_STRING, repeated=True
    )


default_message_pool.register_message(
    "google.protobuf", "SourceCodeInfo.Location", SourceCodeInfoLocation
)


@dataclass(eq=False, repr=False)
class UninterpretedOption(betterproto2.Message):
    """
    A message representing a option the parser does not recognize. This only
    appears in options protos created by the compiler::Parser class.
    DescriptorPool resolves these when building Descriptor objects. Therefore,
    options protos in descriptor objects (e.g. returned by Descriptor::options(),
    or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
    in them.
    """

    @staticmethod
    def _serialized_pb():
        return b"\n\x13UninterpretedOption\x12A\n\x04name\x18\x02 \x03(\x0b2-.google.protobuf.UninterpretedOption.NamePartR\x04name\x12)\n\x10identifier_value\x18\x03 \x01(\tR\x0fidentifierValue\x12,\n\x12positive_int_value\x18\x04 \x01(\x04R\x10positiveIntValue\x12,\n\x12negative_int_value\x18\x05 \x01(\x03R\x10negativeIntValue\x12!\n\x0cdouble_value\x18\x06 \x01(\x01R\x0bdoubleValue\x12!\n\x0cstring_value\x18\x07 \x01(\x0cR\x0bstringValue\x12'\n\x0faggregate_value\x18\x08 \x01(\tR\x0eaggregateValue\x1a^\n\x1cUninterpretedOption.NamePart\x12\x1b\n\tname_part\x18\x01 \x02(\tR\x08namePart\x12!\n\x0cis_extension\x18\x02 \x02(\x08R\x0bisExtension"

    name: "list[UninterpretedOptionNamePart]" = betterproto2.field(
        2, betterproto2.TYPE_MESSAGE, repeated=True
    )

    identifier_value: "str" = betterproto2.field(3, betterproto2.TYPE_STRING)
    """
    The value of the uninterpreted option, in whatever type the tokenizer
    identified it as during parsing. Exactly one of these should be set.
    """

    positive_int_value: "int" = betterproto2.field(4, betterproto2.TYPE_UINT64)

    negative_int_value: "int" = betterproto2.field(5, betterproto2.TYPE_INT64)

    double_value: "float" = betterproto2.field(6, betterproto2.TYPE_DOUBLE)

    string_value: "bytes" = betterproto2.field(7, betterproto2.TYPE_BYTES)

    aggregate_value: "str" = betterproto2.field(8, betterproto2.TYPE_STRING)


default_message_pool.register_message(
    "google.protobuf", "UninterpretedOption", UninterpretedOption
)


@dataclass(eq=False, repr=False)
class UninterpretedOptionNamePart(betterproto2.Message):
    """
    The name of the uninterpreted option.  Each string represents a segment in
    a dot-separated name.  is_extension is true iff a segment represents an
    extension (denoted with parentheses in options specs in .proto files).
    E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents
    "foo.(bar.baz).moo".
    """

    @staticmethod
    def _serialized_pb():
        return b"\n\x1cUninterpretedOption.NamePart\x12\x1b\n\tname_part\x18\x01 \x02(\tR\x08namePart\x12!\n\x0cis_extension\x18\x02 \x02(\x08R\x0bisExtension"

    name_part: "str" = betterproto2.field(1, betterproto2.TYPE_STRING)

    is_extension: "bool" = betterproto2.field(2, betterproto2.TYPE_BOOL)


default_message_pool.register_message(
    "google.protobuf", "UninterpretedOption.NamePart", UninterpretedOptionNamePart
)
