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

from __future__ import annotations

from typing import Any

from pydantic import BaseModel, Field, constr


class Person(BaseModel):
    name: constr(min_length=1) = Field(..., description='The things name')
    type: Any | None = 'playground:Location'
    type_list: list[Any] | None = [
        'playground:Person',
        'playground:Thing',
        'playground:Location',
    ]
    address: constr(min_length=5) = Field(
        ..., description='The address of the location'
    )


class Entity(BaseModel):
    type: str
    type_list: list[str] | None = ['playground:Entity']


class Entity2(BaseModel):
    type: str
    type_list: list[str]


class Thing(Entity):
    type: str | None = 'playground:Thing'
    type_list: list[str] | None = ['playground:Thing']
    name: constr(min_length=1) = Field(..., description='The things name')


class Location(Entity2):
    type: str | None = 'playground:Location'
    type_list: list[str] | None = ['playground:Location']
    address: constr(min_length=5) = Field(
        ..., description='The address of the location'
    )
