# 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 .patch_safety_events_dismissal_reason_body_request_body_code import (
    PatchSafetyEventsDismissalReasonBodyRequestBodyCode,
)


class PatchSafetyEventsDismissalReasonBodyRequestBody(UniversalBaseModel):
    """
    Dismissal reason. Required when eventState is `dismissed`. Must not be provided for other states.
    """

    code: PatchSafetyEventsDismissalReasonBodyRequestBodyCode = pydantic.Field()
    """
    The dismissal reason code associated with the event.  Valid values: `incorrect`, `minorEvent`, `other`
    """

    comment: typing.Optional[str] = pydantic.Field(default=None)
    """
    The dismissal reason comment associated with the event.
    """

    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
