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

__all__ = (
    "MixedDrink",
    "Test",
)


from typing import (
    Optional,
)

from pydantic import model_validator
from pydantic.dataclasses import dataclass

import betterproto_fw


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

    shots: int = betterproto_fw.int32_field(1)
    """
    
    """


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

    pitied: Optional[int] = betterproto_fw.int32_field(1, optional=True, group="foo")
    """
    
    """

    pitier: Optional[str] = betterproto_fw.string_field(2, optional=True, group="foo")
    """
    
    """

    just_a_regular_field: int = betterproto_fw.int32_field(3)
    """
    
    """

    drinks: Optional[int] = betterproto_fw.int32_field(11, optional=True, group="bar")
    """
    
    """

    bar_name: Optional[str] = betterproto_fw.string_field(
        12, optional=True, group="bar"
    )
    """
    
    """

    mixed_drink: Optional["MixedDrink"] = betterproto_fw.message_field(
        13, optional=True, group="bar"
    )
    """
    
    """

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