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

from __future__ import annotations

from typing import Literal

from pydantic import AliasChoices, BaseModel, Field


class Dog(BaseModel):
    bark: bool | None = None
    petType: Literal['dog'] = Field(
        ..., validation_alias=AliasChoices('pet_type', 'petType', 'pet-type')
    )


class Cat(BaseModel):
    meow: bool | None = None
    petType: Literal['cat'] = Field(
        ..., validation_alias=AliasChoices('pet_type', 'petType', 'pet-type')
    )


class Model(BaseModel):
    pet: Dog | Cat | None = Field(None, discriminator='petType')
