forked from anomalyco/opencode-sdk-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpart.py
More file actions
37 lines (24 loc) · 924 Bytes
/
Copy pathpart.py
File metadata and controls
37 lines (24 loc) · 924 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import List, Union
from typing_extensions import Literal, Annotated, TypeAlias
from pydantic import Field as FieldInfo
from .._utils import PropertyInfo
from .._models import BaseModel
from .file_part import FilePart
from .text_part import TextPart
from .tool_part import ToolPart
from .snapshot_part import SnapshotPart
from .step_start_part import StepStartPart
from .step_finish_part import StepFinishPart
__all__ = ["Part", "PatchPart"]
class PatchPart(BaseModel):
id: str
files: List[str]
hash: str
message_id: str = FieldInfo(alias="messageID")
session_id: str = FieldInfo(alias="sessionID")
type: Literal["patch"]
Part: TypeAlias = Annotated[
Union[TextPart, FilePart, ToolPart, StepStartPart, StepFinishPart, SnapshotPart, PatchPart],
PropertyInfo(discriminator="type"),
]