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

from __future__ import annotations

from typing import Any, Dict, List, Optional, Union

from pydantic import BaseModel


class Address(BaseModel):
    street: Optional[str] = None
    city: Optional[str] = None


class ContactInfo(BaseModel):
    email: Optional[str] = None
    phone: Optional[str] = None


class ProjectedPerson(BaseModel):
    id: Optional[int] = None
    name: Optional[str] = None
    address: Optional[Address] = None
    metadata: Optional[Dict[str, str]] = None
    contact: Optional[ContactInfo] = None
    tags: Optional[List[str]] = None
    priority: Optional[Union[int, str]] = None


class Person(ProjectedPerson):
    nickname: Optional[str] = None
    id: int
    name: str
    address: Dict[str, Any]
    metadata: Dict[str, str]
    contact: ContactInfo
    tags: List[str]
    priority: Union[int, str]
