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

from __future__ import annotations

from typing import Literal

from pydantic import AliasChoices, BaseModel, Field


class SystemMessage(BaseModel):
    messageType: Literal['system'] = Field(
        ...,
        validation_alias=AliasChoices('message_type', 'messageType', 'message-type'),
    )
    content: str


class UserMessage(BaseModel):
    messageType: Literal['user'] = Field(
        ...,
        validation_alias=AliasChoices('message_type', 'messageType', 'message-type'),
    )
    content: str


class Model(BaseModel):
    message: SystemMessage | UserMessage | None = Field(
        None, discriminator='messageType'
    )
