# 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 .attribute_entity_external_ids import AttributeEntityExternalIds
from .attribute_value_tiny import AttributeValueTiny


class AttributeEntity(UniversalBaseModel):
    date_values: typing_extensions.Annotated[
        typing.Optional[typing.List[str]],
        FieldMetadata(alias="dateValues"),
        pydantic.Field(
            alias="dateValues",
            description="Date values that are associated with this attribute (RFC 3339 date format: YYYY-MM-DD).",
        ),
    ] = None
    entity_id: typing_extensions.Annotated[
        typing.Optional[int], FieldMetadata(alias="entityId"), pydantic.Field(alias="entityId")
    ] = None
    external_ids: typing_extensions.Annotated[
        typing.Optional[AttributeEntityExternalIds],
        FieldMetadata(alias="externalIds"),
        pydantic.Field(
            alias="externalIds",
            description="The [external IDs](https://developers.samsara.com/docs/external-ids) for the given object.",
        ),
    ] = None
    name: typing.Optional[str] = None
    number_values: typing_extensions.Annotated[
        typing.Optional[typing.List[float]],
        FieldMetadata(alias="numberValues"),
        pydantic.Field(
            alias="numberValues",
            description="Number values that are associated with this attribute. Note: this field is `null` for `text` and `freeform-multi-select` attribute types.`",
        ),
    ] = None
    string_values: typing_extensions.Annotated[
        typing.Optional[typing.List[str]],
        FieldMetadata(alias="stringValues"),
        pydantic.Field(
            alias="stringValues",
            description="String values that are associated with this attribute. Note: this field is `null` for `text` and `freeform-multi-select` attribute types.`",
        ),
    ] = None
    values: typing.Optional[typing.List[AttributeValueTiny]] = pydantic.Field(default=None)
    """
    Representation of values that includes ids. Note: this field is `null` for `text` and `freeform-multi-select` attribute types.`
    """

    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
