Debian Codegraph @

src/anthropic/types/file_metadata.py

raw
1 from typing import Optional
2 from datetime import datetime
3 from typing_extensions import Literal
4
5 from .._models import BaseModel
6
7 __all__ = ["FileMetadata"]
8
9
10 class FileMetadata(BaseModel):
11 id: str
12 """Unique object identifier.
13
14 The format and length of IDs may change over time.
15 """
16
17 created_at: datetime
18 """RFC 3339 datetime string representing when the file was created."""
19
20 filename: str
21 """Original filename of the uploaded file."""
22
23 mime_type: str
24 """MIME type of the file."""
25
26 size_bytes: int
27 """Size of the file in bytes."""
28
29 type: Literal["file"]
30 """Object type.
31
32 For files, this is always `"file"`.
33 """
34
35 downloadable: Optional[bool] = None
36 """Whether the file can be downloaded."""
37
38 expires_at: Optional[datetime] = None
39 """
40 RFC 3339 datetime string representing when the file will expire and become
41 unavailable for download. Null if the file does not expire. For files uploaded
42 with `expires_in_seconds`, this is the upload time plus that value.
43 """