68 lines
1.9 KiB
Python
68 lines
1.9 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 .message_error import MessageError
|
||
|
|
||
|
|
||
|
class Intent(object):
|
||
|
_types = {
|
||
|
"id": int,
|
||
|
"created_at": int,
|
||
|
"session_id": int,
|
||
|
"status": str,
|
||
|
"sub_status": str,
|
||
|
"channel_type": str,
|
||
|
"error": MessageError,
|
||
|
}
|
||
|
|
||
|
def __init__(self, d=None):
|
||
|
self.id: Optional[int] = None
|
||
|
self.created_at: Optional[int] = None
|
||
|
self.session_id: Optional[int] = None
|
||
|
self.status: Optional[str] = None
|
||
|
self.sub_status: Optional[str] = None
|
||
|
self.channel_type: Optional[str] = None
|
||
|
self.error: Optional[MessageError] = None
|
||
|
init(self, d, self._types)
|
||
|
|
||
|
@staticmethod
|
||
|
def builder() -> "IntentBuilder":
|
||
|
return IntentBuilder()
|
||
|
|
||
|
|
||
|
class IntentBuilder(object):
|
||
|
def __init__(self) -> None:
|
||
|
self._intent = Intent()
|
||
|
|
||
|
def id(self, id: int) -> "IntentBuilder":
|
||
|
self._intent.id = id
|
||
|
return self
|
||
|
|
||
|
def created_at(self, created_at: int) -> "IntentBuilder":
|
||
|
self._intent.created_at = created_at
|
||
|
return self
|
||
|
|
||
|
def session_id(self, session_id: int) -> "IntentBuilder":
|
||
|
self._intent.session_id = session_id
|
||
|
return self
|
||
|
|
||
|
def status(self, status: str) -> "IntentBuilder":
|
||
|
self._intent.status = status
|
||
|
return self
|
||
|
|
||
|
def sub_status(self, sub_status: str) -> "IntentBuilder":
|
||
|
self._intent.sub_status = sub_status
|
||
|
return self
|
||
|
|
||
|
def channel_type(self, channel_type: str) -> "IntentBuilder":
|
||
|
self._intent.channel_type = channel_type
|
||
|
return self
|
||
|
|
||
|
def error(self, error: MessageError) -> "IntentBuilder":
|
||
|
self._intent.error = error
|
||
|
return self
|
||
|
|
||
|
def build(self) -> "Intent":
|
||
|
return self._intent
|