49 lines
1.2 KiB
Python
49 lines
1.2 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 Project(object):
|
||
|
_types = {
|
||
|
"title": str,
|
||
|
"url": str,
|
||
|
"sub_type": str,
|
||
|
"view_type": str,
|
||
|
}
|
||
|
|
||
|
def __init__(self, d=None):
|
||
|
self.title: Optional[str] = None
|
||
|
self.url: Optional[str] = None
|
||
|
self.sub_type: Optional[str] = None
|
||
|
self.view_type: Optional[str] = None
|
||
|
init(self, d, self._types)
|
||
|
|
||
|
@staticmethod
|
||
|
def builder() -> "ProjectBuilder":
|
||
|
return ProjectBuilder()
|
||
|
|
||
|
|
||
|
class ProjectBuilder(object):
|
||
|
def __init__(self) -> None:
|
||
|
self._project = Project()
|
||
|
|
||
|
def title(self, title: str) -> "ProjectBuilder":
|
||
|
self._project.title = title
|
||
|
return self
|
||
|
|
||
|
def url(self, url: str) -> "ProjectBuilder":
|
||
|
self._project.url = url
|
||
|
return self
|
||
|
|
||
|
def sub_type(self, sub_type: str) -> "ProjectBuilder":
|
||
|
self._project.sub_type = sub_type
|
||
|
return self
|
||
|
|
||
|
def view_type(self, view_type: str) -> "ProjectBuilder":
|
||
|
self._project.view_type = view_type
|
||
|
return self
|
||
|
|
||
|
def build(self) -> "Project":
|
||
|
return self._project
|