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

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


class VendorContact(UncheckedBaseModel):
    """
    Represents a contact of a [Vendor](entity:Vendor).
    """

    id: typing.Optional[str] = pydantic.Field(default=None)
    """
    A unique Square-generated ID for the [VendorContact](entity:VendorContact).
    This field is required when attempting to update a [VendorContact](entity:VendorContact).
    """

    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    The name of the [VendorContact](entity:VendorContact).
    This field is required when attempting to create a [Vendor](entity:Vendor).
    """

    email_address: typing.Optional[str] = pydantic.Field(default=None)
    """
    The email address of the [VendorContact](entity:VendorContact).
    """

    phone_number: typing.Optional[str] = pydantic.Field(default=None)
    """
    The phone number of the [VendorContact](entity:VendorContact).
    """

    removed: typing.Optional[bool] = pydantic.Field(default=None)
    """
    The state of the [VendorContact](entity:VendorContact).
    """

    ordinal: int = pydantic.Field()
    """
    The ordinal of the [VendorContact](entity:VendorContact).
    """

    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
