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

__all__ = (
    "Nothing",
    "MaybeNothing",
    "Test",
)


from typing import (
    Optional,
)

from pydantic import model_validator
from pydantic.dataclasses import dataclass

import betterproto


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

    pass


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

    sometimes: str = betterproto.string_field(42)
    """
    
    """


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

    nothing: Optional["Nothing"] = betterproto.message_field(
        1, optional=True, group="empty"
    )
    """
    
    """

    maybe1: Optional["MaybeNothing"] = betterproto.message_field(
        2, optional=True, group="empty"
    )
    """
    
    """

    maybe2: Optional["MaybeNothing"] = betterproto.message_field(
        3, optional=True, group="empty"
    )
    """
    
    """

    @model_validator(mode="after")
    def check_oneof(cls, values):
        return cls._validate_field_groups(values)
