# 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 Session(object):
    _types = {
        "id": int,
        "created_at": int,
        "effected_at": int,
        "type": str,
        "status": str,
        "active_intent_id": int,
        "channel_type": str,
        "enable_debug": bool,
        "kvs": str,
    }

    def __init__(self, d=None):
        self.id: Optional[int] = None
        self.created_at: Optional[int] = None
        self.effected_at: Optional[int] = None
        self.type: Optional[str] = None
        self.status: Optional[str] = None
        self.active_intent_id: Optional[int] = None
        self.channel_type: Optional[str] = None
        self.enable_debug: Optional[bool] = None
        self.kvs: Optional[str] = None
        init(self, d, self._types)

    @staticmethod
    def builder() -> "SessionBuilder":
        return SessionBuilder()


class SessionBuilder(object):
    def __init__(self) -> None:
        self._session = Session()

    def id(self, id: int) -> "SessionBuilder":
        self._session.id = id
        return self

    def created_at(self, created_at: int) -> "SessionBuilder":
        self._session.created_at = created_at
        return self

    def effected_at(self, effected_at: int) -> "SessionBuilder":
        self._session.effected_at = effected_at
        return self

    def type(self, type: str) -> "SessionBuilder":
        self._session.type = type
        return self

    def status(self, status: str) -> "SessionBuilder":
        self._session.status = status
        return self

    def active_intent_id(self, active_intent_id: int) -> "SessionBuilder":
        self._session.active_intent_id = active_intent_id
        return self

    def channel_type(self, channel_type: str) -> "SessionBuilder":
        self._session.channel_type = channel_type
        return self

    def enable_debug(self, enable_debug: bool) -> "SessionBuilder":
        self._session.enable_debug = enable_debug
        return self

    def kvs(self, kvs: str) -> "SessionBuilder":
        self._session.kvs = kvs
        return self

    def build(self) -> "Session":
        return self._session
