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

from ..core.unchecked_base_model import UncheckedBaseModel
import typing
from .measurement_unit import MeasurementUnit
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class StandardUnitDescription(UncheckedBaseModel):
    """
    Contains the name and abbreviation for standard measurement unit.
    """

    unit: typing.Optional[MeasurementUnit] = pydantic.Field(default=None)
    """
    Identifies the measurement unit being described.
    """

    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    UI display name of the measurement unit. For example, 'Pound'.
    """

    abbreviation: typing.Optional[str] = pydantic.Field(default=None)
    """
    UI display abbreviation for the measurement unit. For example, 'lb'.
    """

    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
