44 lines
1.1 KiB
Python
44 lines
1.1 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
|
||
|
from .i18n_content import I18nContent
|
||
|
|
||
|
|
||
|
class CostItem(object):
|
||
|
_types = {
|
||
|
"id": str,
|
||
|
"name": List[I18nContent],
|
||
|
"enable_correct": bool,
|
||
|
}
|
||
|
|
||
|
def __init__(self, d=None):
|
||
|
self.id: Optional[str] = None
|
||
|
self.name: Optional[List[I18nContent]] = None
|
||
|
self.enable_correct: Optional[bool] = None
|
||
|
init(self, d, self._types)
|
||
|
|
||
|
@staticmethod
|
||
|
def builder() -> "CostItemBuilder":
|
||
|
return CostItemBuilder()
|
||
|
|
||
|
|
||
|
class CostItemBuilder(object):
|
||
|
def __init__(self) -> None:
|
||
|
self._cost_item = CostItem()
|
||
|
|
||
|
def id(self, id: str) -> "CostItemBuilder":
|
||
|
self._cost_item.id = id
|
||
|
return self
|
||
|
|
||
|
def name(self, name: List[I18nContent]) -> "CostItemBuilder":
|
||
|
self._cost_item.name = name
|
||
|
return self
|
||
|
|
||
|
def enable_correct(self, enable_correct: bool) -> "CostItemBuilder":
|
||
|
self._cost_item.enable_correct = enable_correct
|
||
|
return self
|
||
|
|
||
|
def build(self) -> "CostItem":
|
||
|
return self._cost_item
|