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

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


class ShiftWage(UncheckedBaseModel):
    """
    The hourly wage rate used to compensate an employee for this shift.

    Deprecated at Square API version 2025-05-21. See the [migration notes](https://developer.squareup.com/docs/labor-api/what-it-does#migration-notes).
    """

    title: typing.Optional[str] = pydantic.Field(default=None)
    """
    The name of the job performed during this shift.
    """

    hourly_rate: typing.Optional[Money] = pydantic.Field(default=None)
    """
    Can be a custom-set hourly wage or the calculated effective hourly
    wage based on the annual wage and hours worked per week.
    """

    job_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The id of the job performed during this shift. Square
    labor-reporting UIs might group shifts together by id.
    """

    tip_eligible: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Whether team members are eligible for tips when working this job.
    """

    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
