# 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 .carrier_proposed_assignment_driver_all_of_2_external_ids import CarrierProposedAssignmentDriverAllOf2ExternalIds
from .equipment_id import EquipmentId
from .equipment_installed_gateway import EquipmentInstalledGateway
from .equipment_name import EquipmentName
from .tag_tiny_response import TagTinyResponse


class EquipmentObject(UniversalBaseModel):
    """
    An equipment object.
    """

    asset_serial: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="assetSerial"),
        pydantic.Field(alias="assetSerial", description="An equipment identification number."),
    ] = None
    external_ids: typing_extensions.Annotated[
        typing.Optional[CarrierProposedAssignmentDriverAllOf2ExternalIds],
        FieldMetadata(alias="externalIds"),
        pydantic.Field(alias="externalIds"),
    ] = None
    id: EquipmentId
    installed_gateway: typing_extensions.Annotated[
        typing.Optional[EquipmentInstalledGateway],
        FieldMetadata(alias="installedGateway"),
        pydantic.Field(alias="installedGateway"),
    ] = None
    name: typing.Optional[EquipmentName] = None
    notes: typing.Optional[str] = pydantic.Field(default=None)
    """
    Notes about a piece of equipment. Samsara supports a maximum of 255 chars.
    """

    tags: typing.Optional[typing.List[TagTinyResponse]] = pydantic.Field(default=None)
    """
    An array of all tag mini-objects that are associated with the given equipment.
    """

    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
