73 lines
2.1 KiB
Python
73 lines
2.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
|
||
|
|
||
|
|
||
|
class AuthInfo(object):
|
||
|
_types = {
|
||
|
"session_key": str,
|
||
|
"user_id": str,
|
||
|
"open_app_id": str,
|
||
|
"region": str,
|
||
|
"open_bot_id": str,
|
||
|
"bot_id": str,
|
||
|
"auth_type": str,
|
||
|
"extra": Dict[str, str],
|
||
|
}
|
||
|
|
||
|
def __init__(self, d=None):
|
||
|
self.session_key: Optional[str] = None
|
||
|
self.user_id: Optional[str] = None
|
||
|
self.open_app_id: Optional[str] = None
|
||
|
self.region: Optional[str] = None
|
||
|
self.open_bot_id: Optional[str] = None
|
||
|
self.bot_id: Optional[str] = None
|
||
|
self.auth_type: Optional[str] = None
|
||
|
self.extra: Optional[Dict[str, str]] = None
|
||
|
init(self, d, self._types)
|
||
|
|
||
|
@staticmethod
|
||
|
def builder() -> "AuthInfoBuilder":
|
||
|
return AuthInfoBuilder()
|
||
|
|
||
|
|
||
|
class AuthInfoBuilder(object):
|
||
|
def __init__(self) -> None:
|
||
|
self._auth_info = AuthInfo()
|
||
|
|
||
|
def session_key(self, session_key: str) -> "AuthInfoBuilder":
|
||
|
self._auth_info.session_key = session_key
|
||
|
return self
|
||
|
|
||
|
def user_id(self, user_id: str) -> "AuthInfoBuilder":
|
||
|
self._auth_info.user_id = user_id
|
||
|
return self
|
||
|
|
||
|
def open_app_id(self, open_app_id: str) -> "AuthInfoBuilder":
|
||
|
self._auth_info.open_app_id = open_app_id
|
||
|
return self
|
||
|
|
||
|
def region(self, region: str) -> "AuthInfoBuilder":
|
||
|
self._auth_info.region = region
|
||
|
return self
|
||
|
|
||
|
def open_bot_id(self, open_bot_id: str) -> "AuthInfoBuilder":
|
||
|
self._auth_info.open_bot_id = open_bot_id
|
||
|
return self
|
||
|
|
||
|
def bot_id(self, bot_id: str) -> "AuthInfoBuilder":
|
||
|
self._auth_info.bot_id = bot_id
|
||
|
return self
|
||
|
|
||
|
def auth_type(self, auth_type: str) -> "AuthInfoBuilder":
|
||
|
self._auth_info.auth_type = auth_type
|
||
|
return self
|
||
|
|
||
|
def extra(self, extra: Dict[str, str]) -> "AuthInfoBuilder":
|
||
|
self._auth_info.extra = extra
|
||
|
return self
|
||
|
|
||
|
def build(self) -> "AuthInfo":
|
||
|
return self._auth_info
|