# This file was auto-generated by Fern from our API Definition.

from __future__ import annotations

import typing

import typing_extensions

from ...core.unchecked_base_model import UnionMetadata
from ...types.pronunciation_dictionary_alias_rule_request_model import PronunciationDictionaryAliasRuleRequestModel
from ...types.pronunciation_dictionary_phoneme_rule_request_model import PronunciationDictionaryPhonemeRuleRequestModel


class PronunciationDictionaryRule_Alias(PronunciationDictionaryAliasRuleRequestModel):
    type: typing.Literal["alias"] = "alias"

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True
        populate_by_name = True


class PronunciationDictionaryRule_Phoneme(PronunciationDictionaryPhonemeRuleRequestModel):
    type: typing.Literal["phoneme"] = "phoneme"

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True
        populate_by_name = True


PronunciationDictionaryRule = typing_extensions.Annotated[
    typing.Union[PronunciationDictionaryRule_Alias, PronunciationDictionaryRule_Phoneme],
    UnionMetadata(discriminant="type"),
]
