# Code generated by Lark OpenAPI.

from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
from lark_oapi.core.model import BaseRequest
from lark_oapi.core.enum import HttpMethod, AccessTokenType


class DataChangeLogDetailApplicationAuditLogRequest(BaseRequest):
    def __init__(self) -> None:
        super().__init__()
        self.log_id: Optional[str] = None
        self.namespace: Optional[str] = None

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


class DataChangeLogDetailApplicationAuditLogRequestBuilder(object):

    def __init__(self) -> None:
        data_change_log_detail_application_audit_log_request = DataChangeLogDetailApplicationAuditLogRequest()
        data_change_log_detail_application_audit_log_request.http_method = HttpMethod.GET
        data_change_log_detail_application_audit_log_request.uri = "/open-apis/apaas/v1/applications/:namespace/audit_log/data_change_log_detail"
        data_change_log_detail_application_audit_log_request.token_types = {AccessTokenType.USER}
        self._data_change_log_detail_application_audit_log_request: DataChangeLogDetailApplicationAuditLogRequest = data_change_log_detail_application_audit_log_request

    def log_id(self, log_id: str) -> "DataChangeLogDetailApplicationAuditLogRequestBuilder":
        self._data_change_log_detail_application_audit_log_request.log_id = log_id
        self._data_change_log_detail_application_audit_log_request.add_query("log_id", log_id)
        return self

    def namespace(self, namespace: str) -> "DataChangeLogDetailApplicationAuditLogRequestBuilder":
        self._data_change_log_detail_application_audit_log_request.namespace = namespace
        self._data_change_log_detail_application_audit_log_request.paths["namespace"] = str(namespace)
        return self

    def build(self) -> DataChangeLogDetailApplicationAuditLogRequest:
        return self._data_change_log_detail_application_audit_log_request
