# generated by datamodel-codegen:
#   filename:  nested_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 CatBreed(RootModel[Any]):
    root: Any


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


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


class PetType(Enum):
    Cat = 'Cat'


class PetType1(Enum):
    Dog = 'Dog'


class C1(BaseModel):
    hunts: bool | None = None
    age: str | None = None


class C2(BaseModel):
    hunts: bool | None = None
    age: str | None = None


class D1(BaseModel):
    bark: bool | None = None
    age: str | None = None


class D2(BaseModel):
    hunts: bool | None = None
    age: str | None = None


class Cat(BaseModel):
    pet_type: PetType
    breed: C1 | C2 | None = Field(None, title='breed')


class Dog(BaseModel):
    pet_type: PetType1
    breed: D1 | D2 = Field(..., title='breed')


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