# Code generated by Lark OpenAPI.

from typing import Optional

from lark_oapi.core.construct import init


class UserAccessTokenInfo(object):
    _types = {
        "access_token": str,
        "token_type": str,
        "expires_in": int,
        "name": str,
        "en_name": str,
        "avatar_url": str,
        "avatar_thumb": str,
        "avatar_middle": str,
        "avatar_big": str,
        "open_id": str,
        "union_id": str,
        "email": str,
        "enterprise_email": str,
        "user_id": str,
        "mobile": str,
        "tenant_key": str,
        "refresh_expires_in": int,
        "refresh_token": str,
        "sid": str,
    }

    def __init__(self, d=None):
        self.access_token: Optional[str] = None
        self.token_type: Optional[str] = None
        self.expires_in: Optional[int] = None
        self.name: Optional[str] = None
        self.en_name: Optional[str] = None
        self.avatar_url: Optional[str] = None
        self.avatar_thumb: Optional[str] = None
        self.avatar_middle: Optional[str] = None
        self.avatar_big: Optional[str] = None
        self.open_id: Optional[str] = None
        self.union_id: Optional[str] = None
        self.email: Optional[str] = None
        self.enterprise_email: Optional[str] = None
        self.user_id: Optional[str] = None
        self.mobile: Optional[str] = None
        self.tenant_key: Optional[str] = None
        self.refresh_expires_in: Optional[int] = None
        self.refresh_token: Optional[str] = None
        self.sid: Optional[str] = None
        init(self, d, self._types)

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


class UserAccessTokenInfoBuilder(object):
    def __init__(self) -> None:
        self._user_access_token_info = UserAccessTokenInfo()

    def access_token(self, access_token: str) -> "UserAccessTokenInfoBuilder":
        self._user_access_token_info.access_token = access_token
        return self

    def token_type(self, token_type: str) -> "UserAccessTokenInfoBuilder":
        self._user_access_token_info.token_type = token_type
        return self

    def expires_in(self, expires_in: int) -> "UserAccessTokenInfoBuilder":
        self._user_access_token_info.expires_in = expires_in
        return self

    def name(self, name: str) -> "UserAccessTokenInfoBuilder":
        self._user_access_token_info.name = name
        return self

    def en_name(self, en_name: str) -> "UserAccessTokenInfoBuilder":
        self._user_access_token_info.en_name = en_name
        return self

    def avatar_url(self, avatar_url: str) -> "UserAccessTokenInfoBuilder":
        self._user_access_token_info.avatar_url = avatar_url
        return self

    def avatar_thumb(self, avatar_thumb: str) -> "UserAccessTokenInfoBuilder":
        self._user_access_token_info.avatar_thumb = avatar_thumb
        return self

    def avatar_middle(self, avatar_middle: str) -> "UserAccessTokenInfoBuilder":
        self._user_access_token_info.avatar_middle = avatar_middle
        return self

    def avatar_big(self, avatar_big: str) -> "UserAccessTokenInfoBuilder":
        self._user_access_token_info.avatar_big = avatar_big
        return self

    def open_id(self, open_id: str) -> "UserAccessTokenInfoBuilder":
        self._user_access_token_info.open_id = open_id
        return self

    def union_id(self, union_id: str) -> "UserAccessTokenInfoBuilder":
        self._user_access_token_info.union_id = union_id
        return self

    def email(self, email: str) -> "UserAccessTokenInfoBuilder":
        self._user_access_token_info.email = email
        return self

    def enterprise_email(self, enterprise_email: str) -> "UserAccessTokenInfoBuilder":
        self._user_access_token_info.enterprise_email = enterprise_email
        return self

    def user_id(self, user_id: str) -> "UserAccessTokenInfoBuilder":
        self._user_access_token_info.user_id = user_id
        return self

    def mobile(self, mobile: str) -> "UserAccessTokenInfoBuilder":
        self._user_access_token_info.mobile = mobile
        return self

    def tenant_key(self, tenant_key: str) -> "UserAccessTokenInfoBuilder":
        self._user_access_token_info.tenant_key = tenant_key
        return self

    def refresh_expires_in(self, refresh_expires_in: int) -> "UserAccessTokenInfoBuilder":
        self._user_access_token_info.refresh_expires_in = refresh_expires_in
        return self

    def refresh_token(self, refresh_token: str) -> "UserAccessTokenInfoBuilder":
        self._user_access_token_info.refresh_token = refresh_token
        return self

    def sid(self, sid: str) -> "UserAccessTokenInfoBuilder":
        self._user_access_token_info.sid = sid
        return self

    def build(self) -> "UserAccessTokenInfo":
        return self._user_access_token_info
