# 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 .gross_vehicle_weight_unit import GrossVehicleWeightUnit


class GrossVehicleWeight(UniversalBaseModel):
    """
    The gross weight of the vehicle in either pounds (lb) or kilograms (kg). Only returned for customers with commercial speed limits (CSL) enabled.
    """

    unit: typing.Optional[GrossVehicleWeightUnit] = pydantic.Field(default=None)
    """
    The unit of weight for the vehicle.
    """

    weight: typing.Optional[int] = pydantic.Field(default=None)
    """
    The weight value of the vehicle.
    """

    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
