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

import typing

import pydantic
from ......core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .denial_reason_content import DenialReasonContent


class ServiceLineDenialReason(UniversalBaseModel):
    """
    The reason a given service line was denied within a given time range.
    A service line may be denied for different reasons over time, but only one reason at a time.
    """

    reason: typing.Optional[DenialReasonContent] = pydantic.Field(default=None)
    """
    Text of the denial reason
    """

    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
