# 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 CustomClientInfo(object):
    _types = {
        "platform": str,
        "lark_version": str,
        "app_form": int,
        "app_version": str,
        "os": str,
        "client_ip": str,
        "device_id": str,
    }

    def __init__(self, d=None):
        self.platform: Optional[str] = None
        self.lark_version: Optional[str] = None
        self.app_form: Optional[int] = None
        self.app_version: Optional[str] = None
        self.os: Optional[str] = None
        self.client_ip: Optional[str] = None
        self.device_id: Optional[str] = None
        init(self, d, self._types)

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


class CustomClientInfoBuilder(object):
    def __init__(self) -> None:
        self._custom_client_info = CustomClientInfo()

    def platform(self, platform: str) -> "CustomClientInfoBuilder":
        self._custom_client_info.platform = platform
        return self

    def lark_version(self, lark_version: str) -> "CustomClientInfoBuilder":
        self._custom_client_info.lark_version = lark_version
        return self

    def app_form(self, app_form: int) -> "CustomClientInfoBuilder":
        self._custom_client_info.app_form = app_form
        return self

    def app_version(self, app_version: str) -> "CustomClientInfoBuilder":
        self._custom_client_info.app_version = app_version
        return self

    def os(self, os: str) -> "CustomClientInfoBuilder":
        self._custom_client_info.os = os
        return self

    def client_ip(self, client_ip: str) -> "CustomClientInfoBuilder":
        self._custom_client_info.client_ip = client_ip
        return self

    def device_id(self, device_id: str) -> "CustomClientInfoBuilder":
        self._custom_client_info.device_id = device_id
        return self

    def build(self) -> "CustomClientInfo":
        return self._custom_client_info
