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

from __future__ import annotations

from pydantic import BaseModel, Field, conint


class Animal(BaseModel):
    id: str


class Paragraph(BaseModel):
    emphasis: list[str] | None = None
    lang: str | None = None
    value: str | None = None


class Vehicle(BaseModel):
    vin: str


class Car(Vehicle):
    doors: conint(ge=1)


class Cat(Animal):
    lives: conint(ge=1)


class Dog(Animal):
    breed: str


class Zoo(BaseModel):
    animal: list[Cat | Dog] = Field(..., min_length=1)
    vehicle: Vehicle | Car | None = None
    description: Paragraph | None = None


class Model(BaseModel):
    vehicle: Vehicle
    zoo: Zoo = Field(..., title='Zoo')
