# 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 CustomAuthInfo(object):
    _types = {
        "session_key": str,
        "user_id": str,
        "open_app_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.auth_type: Optional[str] = None
        self.extra: Optional[Dict[str, str]] = None
        init(self, d, self._types)

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


class CustomAuthInfoBuilder(object):
    def __init__(self) -> None:
        self._custom_auth_info = CustomAuthInfo()

    def session_key(self, session_key: str) -> "CustomAuthInfoBuilder":
        self._custom_auth_info.session_key = session_key
        return self

    def user_id(self, user_id: str) -> "CustomAuthInfoBuilder":
        self._custom_auth_info.user_id = user_id
        return self

    def open_app_id(self, open_app_id: str) -> "CustomAuthInfoBuilder":
        self._custom_auth_info.open_app_id = open_app_id
        return self

    def auth_type(self, auth_type: str) -> "CustomAuthInfoBuilder":
        self._custom_auth_info.auth_type = auth_type
        return self

    def extra(self, extra: Dict[str, str]) -> "CustomAuthInfoBuilder":
        self._custom_auth_info.extra = extra
        return self

    def build(self) -> "CustomAuthInfo":
        return self._custom_auth_info
