# 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 BulkPublishScheduledShiftsData(UncheckedBaseModel):
    """
    Represents options for an individual publish request in a
    [BulkPublishScheduledShifts](api-endpoint:Labor-BulkPublishScheduledShifts)
    operation, provided as the value in a key-value pair.
    """

    version: typing.Optional[int] = pydantic.Field(default=None)
    """
    The current version of the scheduled shift, used to enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency)
    control. If the provided version doesn't match the server version, the request fails.
    If omitted, Square executes a blind write, potentially overwriting data from another publish request.
    """

    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
