# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: nestedtwice.proto
# plugin: python-betterproto
# This file has been @generated

__all__ = (
    "TestTopMiddleEnumBottom",
    "Test",
    "TestTop",
    "TestTopMiddle",
    "TestTopMiddleTopMiddleBottom",
    "TestTopMiddleBottom",
)


from typing import (
    List,
)

from pydantic.dataclasses import dataclass

import betterproto


class TestTopMiddleEnumBottom(betterproto.Enum):
    """EnumBottom doc."""

    A = 0
    """EnumBottom.A doc. """

    B = 1
    """
    
    """

    @classmethod
    def __get_pydantic_core_schema__(cls, _source_type, _handler):
        from pydantic_core import core_schema

        return core_schema.int_schema(ge=0)


@dataclass(eq=False, repr=False, config={"extra": "forbid"})
class Test(betterproto.Message):
    """Test doc."""

    top: "TestTop" = betterproto.message_field(1)
    """Test.top doc. """


@dataclass(eq=False, repr=False, config={"extra": "forbid"})
class TestTop(betterproto.Message):
    """Top doc."""

    name: str = betterproto.string_field(1)
    """Top.name doc. """

    middle: "TestTopMiddle" = betterproto.message_field(2)
    """
    
    """


@dataclass(eq=False, repr=False, config={"extra": "forbid"})
class TestTopMiddle(betterproto.Message):
    """Middle doc."""

    bottom: List["TestTopMiddleBottom"] = betterproto.message_field(2)
    """Middle.bottom doc. """

    enum_bottom: List["TestTopMiddleEnumBottom"] = betterproto.enum_field(3)
    """
    
    """

    top_middle_bottom: List["TestTopMiddleTopMiddleBottom"] = betterproto.message_field(
        4
    )
    """
    
    """

    bar: bool = betterproto.bool_field(5)
    """
    
    """


@dataclass(eq=False, repr=False, config={"extra": "forbid"})
class TestTopMiddleTopMiddleBottom(betterproto.Message):
    """TopMiddleBottom doc."""

    a: str = betterproto.string_field(1)
    """TopMiddleBottom.a doc."""


@dataclass(eq=False, repr=False, config={"extra": "forbid"})
class TestTopMiddleBottom(betterproto.Message):
    """Bottom doc."""

    foo: str = betterproto.string_field(1)
    """Bottom.foo doc. """
