# 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 .basic_info import BasicInfo
from .audit_log_op_info import AuditLogOpInfo
from .audit_log_login_info import AuditLogLoginInfo
from .audit_log_device_info import AuditLogDeviceInfo
from .audit_log_net_info import AuditLogNetInfo


class AuditLogDetail(object):
    _types = {
        "log_id": str,
        "basic_info": BasicInfo,
        "op_info": AuditLogOpInfo,
        "login_info": AuditLogLoginInfo,
        "device_info": AuditLogDeviceInfo,
        "net_info": AuditLogNetInfo,
    }

    def __init__(self, d=None):
        self.log_id: Optional[str] = None
        self.basic_info: Optional[BasicInfo] = None
        self.op_info: Optional[AuditLogOpInfo] = None
        self.login_info: Optional[AuditLogLoginInfo] = None
        self.device_info: Optional[AuditLogDeviceInfo] = None
        self.net_info: Optional[AuditLogNetInfo] = None
        init(self, d, self._types)

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


class AuditLogDetailBuilder(object):
    def __init__(self) -> None:
        self._audit_log_detail = AuditLogDetail()

    def log_id(self, log_id: str) -> "AuditLogDetailBuilder":
        self._audit_log_detail.log_id = log_id
        return self

    def basic_info(self, basic_info: BasicInfo) -> "AuditLogDetailBuilder":
        self._audit_log_detail.basic_info = basic_info
        return self

    def op_info(self, op_info: AuditLogOpInfo) -> "AuditLogDetailBuilder":
        self._audit_log_detail.op_info = op_info
        return self

    def login_info(self, login_info: AuditLogLoginInfo) -> "AuditLogDetailBuilder":
        self._audit_log_detail.login_info = login_info
        return self

    def device_info(self, device_info: AuditLogDeviceInfo) -> "AuditLogDetailBuilder":
        self._audit_log_detail.device_info = device_info
        return self

    def net_info(self, net_info: AuditLogNetInfo) -> "AuditLogDetailBuilder":
        self._audit_log_detail.net_info = net_info
        return self

    def build(self) -> "AuditLogDetail":
        return self._audit_log_detail
