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

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .defect_types_response_data_response_body_section_type import DefectTypesResponseDataResponseBodySectionType
from .defect_types_response_data_response_body_severity import DefectTypesResponseDataResponseBodySeverity


class DefectTypesResponseDataResponseBody(UniversalBaseModel):
    """
    Defect type data.
    """

    created_at_time: typing_extensions.Annotated[
        str,
        FieldMetadata(alias="createdAtTime"),
        pydantic.Field(alias="createdAtTime", description="Time when defect type was created in RFC 3339 format."),
    ]
    id: str = pydantic.Field()
    """
    The unique ID of the DVIR defect type.
    """

    label: str = pydantic.Field()
    """
    DVIR defect type label.
    """

    section_type: typing_extensions.Annotated[
        DefectTypesResponseDataResponseBodySectionType,
        FieldMetadata(alias="sectionType"),
        pydantic.Field(
            alias="sectionType",
            description="Section for DVIR defect type.  Valid values: `exteriorFront`, `exteriorRear`, `exteriorSideUnderneath`, `interiorDriverCab`, `interiorPassengerArea`, `other`, `unknown`",
        ),
    ]
    severity: typing.Optional[DefectTypesResponseDataResponseBodySeverity] = pydantic.Field(default=None)
    """
    The severity of the defect type. Only present for DVIR 2.0 defect types.  Valid values: `major`, `minor`, `notApplicable`
    """

    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
