49 lines
1.3 KiB
Python
49 lines
1.3 KiB
Python
![]() |
# Code generated by Lark OpenAPI.
|
||
|
|
||
|
from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
|
||
|
from lark_oapi.core.construct import init
|
||
|
|
||
|
|
||
|
class Attachment(object):
|
||
|
_types = {
|
||
|
"file_token": str,
|
||
|
"file_size": str,
|
||
|
"is_deleted": bool,
|
||
|
"name": str,
|
||
|
}
|
||
|
|
||
|
def __init__(self, d=None):
|
||
|
self.file_token: Optional[str] = None
|
||
|
self.file_size: Optional[str] = None
|
||
|
self.is_deleted: Optional[bool] = None
|
||
|
self.name: Optional[str] = None
|
||
|
init(self, d, self._types)
|
||
|
|
||
|
@staticmethod
|
||
|
def builder() -> "AttachmentBuilder":
|
||
|
return AttachmentBuilder()
|
||
|
|
||
|
|
||
|
class AttachmentBuilder(object):
|
||
|
def __init__(self) -> None:
|
||
|
self._attachment = Attachment()
|
||
|
|
||
|
def file_token(self, file_token: str) -> "AttachmentBuilder":
|
||
|
self._attachment.file_token = file_token
|
||
|
return self
|
||
|
|
||
|
def file_size(self, file_size: str) -> "AttachmentBuilder":
|
||
|
self._attachment.file_size = file_size
|
||
|
return self
|
||
|
|
||
|
def is_deleted(self, is_deleted: bool) -> "AttachmentBuilder":
|
||
|
self._attachment.is_deleted = is_deleted
|
||
|
return self
|
||
|
|
||
|
def name(self, name: str) -> "AttachmentBuilder":
|
||
|
self._attachment.name = name
|
||
|
return self
|
||
|
|
||
|
def build(self) -> "Attachment":
|
||
|
return self._attachment
|