# 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 .custom_auth_info import CustomAuthInfo
from .custom_http_header import CustomHttpHeader
from .custom_client_info import CustomClientInfo


class CustomHead(object):
    _types = {
        "id": str,
        "tenant_id": str,
        "app_id": str,
        "open_id": str,
        "tenant_key": str,
        "auth": CustomAuthInfo,
        "http_header": CustomHttpHeader,
        "locale": str,
        "client": CustomClientInfo,
        "session_uuid": str,
    }

    def __init__(self, d=None):
        self.id: Optional[str] = None
        self.tenant_id: Optional[str] = None
        self.app_id: Optional[str] = None
        self.open_id: Optional[str] = None
        self.tenant_key: Optional[str] = None
        self.auth: Optional[CustomAuthInfo] = None
        self.http_header: Optional[CustomHttpHeader] = None
        self.locale: Optional[str] = None
        self.client: Optional[CustomClientInfo] = None
        self.session_uuid: Optional[str] = None
        init(self, d, self._types)

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


class CustomHeadBuilder(object):
    def __init__(self) -> None:
        self._custom_head = CustomHead()

    def id(self, id: str) -> "CustomHeadBuilder":
        self._custom_head.id = id
        return self

    def tenant_id(self, tenant_id: str) -> "CustomHeadBuilder":
        self._custom_head.tenant_id = tenant_id
        return self

    def app_id(self, app_id: str) -> "CustomHeadBuilder":
        self._custom_head.app_id = app_id
        return self

    def open_id(self, open_id: str) -> "CustomHeadBuilder":
        self._custom_head.open_id = open_id
        return self

    def tenant_key(self, tenant_key: str) -> "CustomHeadBuilder":
        self._custom_head.tenant_key = tenant_key
        return self

    def auth(self, auth: CustomAuthInfo) -> "CustomHeadBuilder":
        self._custom_head.auth = auth
        return self

    def http_header(self, http_header: CustomHttpHeader) -> "CustomHeadBuilder":
        self._custom_head.http_header = http_header
        return self

    def locale(self, locale: str) -> "CustomHeadBuilder":
        self._custom_head.locale = locale
        return self

    def client(self, client: CustomClientInfo) -> "CustomHeadBuilder":
        self._custom_head.client = client
        return self

    def session_uuid(self, session_uuid: str) -> "CustomHeadBuilder":
        self._custom_head.session_uuid = session_uuid
        return self

    def build(self) -> "CustomHead":
        return self._custom_head
