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

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


class Employee(UncheckedBaseModel):
    """
    An employee object that is used by the external API.

    DEPRECATED at version 2020-08-26. Replaced by [TeamMember](entity:TeamMember).
    """

    id: typing.Optional[str] = pydantic.Field(default=None)
    """
    UUID for this object.
    """

    first_name: typing.Optional[str] = pydantic.Field(default=None)
    """
    The employee's first name.
    """

    last_name: typing.Optional[str] = pydantic.Field(default=None)
    """
    The employee's last name.
    """

    email: typing.Optional[str] = pydantic.Field(default=None)
    """
    The employee's email address
    """

    phone_number: typing.Optional[str] = pydantic.Field(default=None)
    """
    The employee's phone number in E.164 format, i.e. "+12125554250"
    """

    location_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    A list of location IDs where this employee has access to.
    """

    status: typing.Optional[EmployeeStatus] = pydantic.Field(default=None)
    """
    Specifies the status of the employees being fetched.
    See [EmployeeStatus](#type-employeestatus) for possible values
    """

    is_owner: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Whether this employee is the owner of the merchant. Each merchant
    has one owner employee, and that employee has full authority over
    the account.
    """

    created_at: typing.Optional[str] = pydantic.Field(default=None)
    """
    A read-only timestamp in RFC 3339 format.
    """

    updated_at: typing.Optional[str] = pydantic.Field(default=None)
    """
    A read-only timestamp in RFC 3339 format.
    """

    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
