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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .address import Address


class Contact(UniversalBaseModel):
    """
    Individual person associated with an account
    """

    first_name: typing.Optional[str] = None
    last_name: str
    email: typing.Optional[str] = None
    phone: typing.Optional[str] = None
    mobile: typing.Optional[str] = None
    title: typing.Optional[str] = pydantic.Field(default=None)
    """
    Job title
    """

    department: typing.Optional[str] = None
    account_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Related account ID
    """

    address: typing.Optional[Address] = None
    description: typing.Optional[str] = None
    source: typing.Optional[str] = pydantic.Field(default=None)
    """
    e.g., Web, Phone, Referral
    """

    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
