# generated by datamodel-codegen:
#   filename:  json_pointer.json
#   timestamp: 2019-07-26T00:00:00+00:00

from __future__ import annotations

from enum import Enum
from typing import Any

from pydantic import BaseModel, ConfigDict, Field, RootModel


class Pets(RootModel[Any]):
    root: Any


class PetType(Enum):
    Cat = 'Cat'


class Cat(BaseModel):
    pet_type: PetType
    hunts: bool
    age: str


class PetType1(Enum):
    Dog = 'Dog'


class Dog(BaseModel):
    pet_type: PetType1
    bark: bool
    breed: str


class Person(BaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    name: str | None = Field(None, title='name')
    pet: Cat | Dog | None = Field(None, title='pet')
