"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from kombo.types import BaseModel
from kombo.utils import validate_const
import pydantic
from pydantic.functional_validators import AfterValidator
from typing import Literal
from typing_extensions import Annotated, TypedDict


PostForceSyncPositiveResponseType = Literal[
    "FULL",
    "DELTA",
]
r"""The type of the triggered sync. May differ from request, if the integration does not support delta syncs or if another sync is already running."""


class PostForceSyncPositiveResponseDataTypedDict(TypedDict):
    already_queued: bool
    r"""We only allow 1 concurrent sync to be running or queued."""
    sync_id: str
    r"""ID of the newly-created or already-queued-or-running sync."""
    type: PostForceSyncPositiveResponseType
    r"""The type of the triggered sync. May differ from request, if the integration does not support delta syncs or if another sync is already running."""


class PostForceSyncPositiveResponseData(BaseModel):
    already_queued: bool
    r"""We only allow 1 concurrent sync to be running or queued."""

    sync_id: str
    r"""ID of the newly-created or already-queued-or-running sync."""

    type: PostForceSyncPositiveResponseType
    r"""The type of the triggered sync. May differ from request, if the integration does not support delta syncs or if another sync is already running."""


class PostForceSyncPositiveResponseTypedDict(TypedDict):
    data: PostForceSyncPositiveResponseDataTypedDict
    status: Literal["success"]


class PostForceSyncPositiveResponse(BaseModel):
    data: PostForceSyncPositiveResponseData

    STATUS: Annotated[
        Annotated[Literal["success"], AfterValidator(validate_const("success"))],
        pydantic.Field(alias="status"),
    ] = "success"


try:
    PostForceSyncPositiveResponse.model_rebuild()
except NameError:
    pass
