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

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


class WageSetting(UncheckedBaseModel):
    """
    Represents information about the overtime exemption status, job assignments, and compensation
    for a [team member](entity:TeamMember).
    """

    team_member_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The ID of the team member associated with the wage setting.
    """

    job_assignments: typing.Optional[typing.List[JobAssignment]] = pydantic.Field(default=None)
    """
    **Required** The ordered list of jobs that the team member is assigned to.
    The first job assignment is considered the team member's primary job.
    """

    is_overtime_exempt: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Whether the team member is exempt from the overtime rules of the seller's country.
    """

    version: typing.Optional[int] = pydantic.Field(default=None)
    """
    **Read only** Used for resolving concurrency issues. The request fails if the version
    provided does not match the server version at the time of the request. If not provided,
    Square executes a blind write, potentially overwriting data from another write. For more information,
    see [optimistic concurrency](https://developer.squareup.com/docs/working-with-apis/optimistic-concurrency).
    """

    created_at: typing.Optional[str] = pydantic.Field(default=None)
    """
    The timestamp when the wage setting was created, in RFC 3339 format.
    """

    updated_at: typing.Optional[str] = pydantic.Field(default=None)
    """
    The timestamp when the wage setting was last updated, 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
