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

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 Any, Literal
from typing_extensions import Annotated, TypedDict


class JSONPatchReplaceTypedDict(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: Any
    r"""The value to use for the operation"""
    op: Literal["replace"]
    r"""Replace operation"""


class JSONPatchReplace(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: Any
    r"""The value to use for the operation"""

    op: Annotated[
        Annotated[Literal["replace"], AfterValidator(validate_const("replace"))],
        pydantic.Field(alias="op"),
    ] = "replace"
    r"""Replace operation"""


try:
    JSONPatchReplace.model_rebuild()
except NameError:
    pass
