"""Pydantic models for the T API (generated by clientsmith, do not edit)."""

from __future__ import annotations

from typing import Annotated, Literal

from pydantic import BaseModel, ConfigDict, Field


class Cat(BaseModel):
    model_config = ConfigDict(populate_by_name=True, protected_namespaces=())

    kind: Literal["kitty"]
    lives: int | None = None


class Dog(BaseModel):
    model_config = ConfigDict(populate_by_name=True, protected_namespaces=())

    kind: Literal["dog"]


class Holder(BaseModel):
    model_config = ConfigDict(populate_by_name=True, protected_namespaces=())

    either: Cat | str | None = None


Loose = str | int | None

Pet = Annotated[Cat | Dog, Field(discriminator="kind")]

Cat.model_rebuild()
Dog.model_rebuild()
Holder.model_rebuild()

__all__ = [
    "Cat",
    "Dog",
    "Holder",
    "Loose",
    "Pet",
]
