# generated by datamodel-codegen:
#   filename:  example.json
#   timestamp: 2025-06-16T04:13:17+00:00

from __future__ import annotations

from typing import Optional, Union

from pydantic.v1 import Field

from oold.model.v1 import LinkedBaseModel


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

    subprop0: Optional[str] = Field(None, custom_key="custom_value_0")
    subprop1: Optional[str] = Field(None, custom_key="custom_value_1")


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

    subprop0: Optional[str] = Field(None, custom_key="custom_value_0")
    subprop2: Optional[str] = Field(None, custom_key="custom_value_2")


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

    type: Optional[str] = ["example"]
    prop1: Optional[str] = Field(None, custom_key="custom_value")
    prop2: Optional[Union[Subschema1, Subschema2]] = Field(
        None, custom_key="custom_value"
    )
