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

from __future__ import annotations

from typing import Literal

from pydantic import BaseModel, Field


class Cat(BaseModel):
    pet_type: Literal['cat']


class Dog(BaseModel):
    pet_type: Literal['dog']


class Animal(BaseModel):
    pet: Cat | Dog = Field(..., discriminator='pet_type', title='Pet')
