A structure that contains a file name and its content.
| 28 | |
| 29 | @dataclasses.dataclass(frozen=True) |
| 30 | class File: |
| 31 | """A structure that contains a file name and its content.""" |
| 32 | |
| 33 | name: str |
| 34 | """ |
| 35 | The name of the file with file extension (e.g., "file.csv"). |
| 36 | """ |
| 37 | |
| 38 | content: str | bytes |
| 39 | """ |
| 40 | The base64-encoded bytes of the file content or the original bytes of the file content. |
| 41 | """ |
| 42 | |
| 43 | mime_type: str = 'text/plain' |
| 44 | """ |
| 45 | The mime type of the file (e.g., "image/png"). |
| 46 | """ |
| 47 | |
| 48 | |
| 49 | @dataclasses.dataclass |
no outgoing calls