# 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 .tire_fault_code_details_object_request_body_manufacturer import TireFaultCodeDetailsObjectRequestBodyManufacturer
from .tire_fault_code_details_object_request_body_specific_tire_fault_codes_item import (
    TireFaultCodeDetailsObjectRequestBodySpecificTireFaultCodesItem,
)


class TireFaultCodeDetailsObjectRequestBody(UniversalBaseModel):
    """
    Details specific to Tire Fault Code. At least one fault code or fault code group must be selected.
    """

    has_cautionary_tire_fault_codes: typing_extensions.Annotated[
        typing.Optional[bool],
        FieldMetadata(alias="hasCautionaryTireFaultCodes"),
        pydantic.Field(
            alias="hasCautionaryTireFaultCodes",
            description="If true then alert over pressure, under pressure, across axle fault, or leak detected fault codes. Defaults to false.",
        ),
    ] = None
    has_critical_tire_fault_codes: typing_extensions.Annotated[
        typing.Optional[bool],
        FieldMetadata(alias="hasCriticalTireFaultCodes"),
        pydantic.Field(
            alias="hasCriticalTireFaultCodes",
            description="If true then alert over temperature or extreme pressure over or under fault codes. Defaults to false.",
        ),
    ] = None
    manufacturer: TireFaultCodeDetailsObjectRequestBodyManufacturer = pydantic.Field()
    """
    The tire manufacturer.  Valid values: `MANUFACTURER_BENDIX`, `MANUFACTURER_CONTINENTAL`, `MANUFACTURER_DORAN`, `MANUFACTURER_HENDRICKSON`, `MANUFACTURER_INVALID`, `MANUFACTURER_PRESSURE_PRO`, `MANUFACTURER_SENSATA`, `MANUFACTURER_UNIVERSAL_J1939`, `MANUFACTURER_UNIVERSAL_R141`
    """

    specific_tire_fault_codes: typing_extensions.Annotated[
        typing.Optional[typing.List[TireFaultCodeDetailsObjectRequestBodySpecificTireFaultCodesItem]],
        FieldMetadata(alias="specificTireFaultCodes"),
        pydantic.Field(
            alias="specificTireFaultCodes", description="The list of specific tire fault codes to be alerted on."
        ),
    ] = None

    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
