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

import typing

import pydantic
from ...core.pydantic_utilities import IS_PYDANTIC_V2
from ...core.unchecked_base_model import UncheckedBaseModel
from .priority_changed_current_priority import PriorityChangedCurrentPriority
from .priority_changed_previous_priority import PriorityChangedPreviousPriority


class PriorityChanged(UncheckedBaseModel):
    """
    Contains details about priority changes for conversation part type <code>priority_changed</code>.
    """

    current_priority: typing.Optional[PriorityChangedCurrentPriority] = pydantic.Field(default=None)
    """
    Current priority state
    """

    previous_priority: typing.Optional[PriorityChangedPreviousPriority] = pydantic.Field(default=None)
    """
    Previous priority state
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
