# 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 GetApplicationAuditLogRequest(BaseRequest):
    def __init__(self) -> None:
        super().__init__()
        self.log_id: Optional[str] = None
        self.namespace: Optional[str] = None

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


class GetApplicationAuditLogRequestBuilder(object):

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

    def log_id(self, log_id: str) -> "GetApplicationAuditLogRequestBuilder":
        self._get_application_audit_log_request.log_id = log_id
        self._get_application_audit_log_request.add_query("log_id", log_id)
        return self

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

    def build(self) -> GetApplicationAuditLogRequest:
        return self._get_application_audit_log_request
