# 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


class VendorObjectResponseBody(UniversalBaseModel):
    """
    A maintenance vendor.
    """

    address_id: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="addressId"),
        pydantic.Field(
            alias="addressId",
            description="Linked Samsara Address ID. Use the Addresses API to retrieve name, address, coordinates, and notes.",
        ),
    ] = None
    category_ids: typing_extensions.Annotated[
        typing.List[str],
        FieldMetadata(alias="categoryIds"),
        pydantic.Field(
            alias="categoryIds",
            description="Category UUIDs for this vendor. Use the Vendor Categories endpoint to resolve names.",
        ),
    ]
    external_ids: typing_extensions.Annotated[
        typing.Optional[typing.Dict[str, str]],
        FieldMetadata(alias="externalIds"),
        pydantic.Field(alias="externalIds", description="A map of external ids"),
    ] = None
    id: str = pydantic.Field()
    """
    Unique UUID of the vendor.
    """

    services_provided: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="servicesProvided"),
        pydantic.Field(alias="servicesProvided", description="Description of services provided by the vendor."),
    ] = None
    vendor_id: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="vendorId"),
        pydantic.Field(
            alias="vendorId",
            description="The vendor's legacy vendor ID from the source system. Multiple vendor locations may share the same vendorId if they belong to the same parent company.",
        ),
    ] = 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
