"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
# @generated-id: 61801f21f4b0

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


class JSONPatchAppendTypedDict(TypedDict):
    path: str
    r"""A JSON Pointer (RFC 6901) identifying the target location within the document. Can be a string path (e.g., '/foo/bar'), '/', '', or an empty list [] for root-level operations."""
    value: str
    r"""The value to use for the operation. A string to append to the existing value"""
    op: Literal["append"]
    r"""'append' is an extension for efficient string concatenation in streaming scenarios."""


class JSONPatchAppend(BaseModel):
    path: str
    r"""A JSON Pointer (RFC 6901) identifying the target location within the document. Can be a string path (e.g., '/foo/bar'), '/', '', or an empty list [] for root-level operations."""

    value: str
    r"""The value to use for the operation. A string to append to the existing value"""

    op: Annotated[
        Annotated[Literal["append"], AfterValidator(validate_const("append"))],
        pydantic.Field(alias="op"),
    ] = "append"
    r"""'append' is an extension for efficient string concatenation in streaming scenarios."""


try:
    JSONPatchAppend.model_rebuild()
except NameError:
    pass
