# generated by datamodel-codegen:
#   filename:  example.json

from __future__ import annotations

from enum import Enum

from pydantic.v1 import Field

from oold.model.v1 import LinkedBaseModel


class Hobby(str, Enum):
    """
    Defines various hobbies as an enum.
    """

    SPORTS = "ex:sports"
    """
    Sports hobby, e.g. football, basketball, etc.
    """
    MUSIC = "ex:music"
    """
    Music hobby, e.g. playing instruments, singing, etc.
    """
    ART = "ex:art"
    """
    Art hobby, e.g. painting, drawing, etc.
    """


class Example(LinkedBaseModel):
    class Config:
        schema_extra = {"title": "Example"}

    type: str | None = ["example"]
    hobby: Hobby | None = Field(
        None,
        options={
            "enum_titles": [
                "Sports hobby, e.g. football, basketball, etc.",
                "Music hobby, e.g. playing instruments, singing, etc.",
                "Art hobby, e.g. painting, drawing, etc.",
            ]
        },
        x_enum_varnames=["SPORTS", "MUSIC", "ART"],
    )
    """
    Defines various hobbies as an enum.
    """
