# 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
from .batch_remove_authorization_application_role_member_request_body import \
    BatchRemoveAuthorizationApplicationRoleMemberRequestBody


class BatchRemoveAuthorizationApplicationRoleMemberRequest(BaseRequest):
    def __init__(self) -> None:
        super().__init__()
        self.namespace: Optional[str] = None
        self.role_api_name: Optional[str] = None
        self.request_body: Optional[BatchRemoveAuthorizationApplicationRoleMemberRequestBody] = None

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


class BatchRemoveAuthorizationApplicationRoleMemberRequestBuilder(object):

    def __init__(self) -> None:
        batch_remove_authorization_application_role_member_request = BatchRemoveAuthorizationApplicationRoleMemberRequest()
        batch_remove_authorization_application_role_member_request.http_method = HttpMethod.POST
        batch_remove_authorization_application_role_member_request.uri = "/open-apis/apaas/v1/applications/:namespace/roles/:role_api_name/member/batch_remove_authorization"
        batch_remove_authorization_application_role_member_request.token_types = {AccessTokenType.TENANT}
        self._batch_remove_authorization_application_role_member_request: BatchRemoveAuthorizationApplicationRoleMemberRequest = batch_remove_authorization_application_role_member_request

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

    def role_api_name(self, role_api_name: str) -> "BatchRemoveAuthorizationApplicationRoleMemberRequestBuilder":
        self._batch_remove_authorization_application_role_member_request.role_api_name = role_api_name
        self._batch_remove_authorization_application_role_member_request.paths["role_api_name"] = str(role_api_name)
        return self

    def request_body(self,
                     request_body: BatchRemoveAuthorizationApplicationRoleMemberRequestBody) -> "BatchRemoveAuthorizationApplicationRoleMemberRequestBuilder":
        self._batch_remove_authorization_application_role_member_request.request_body = request_body
        self._batch_remove_authorization_application_role_member_request.body = request_body
        return self

    def build(self) -> BatchRemoveAuthorizationApplicationRoleMemberRequest:
        return self._batch_remove_authorization_application_role_member_request
