# 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 GetApplicationRoleMemberRequest(BaseRequest):
    def __init__(self) -> None:
        super().__init__()
        self.need_display_name: Optional[bool] = None
        self.use_api_id: Optional[bool] = None
        self.namespace: Optional[str] = None
        self.role_api_name: Optional[str] = None

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


class GetApplicationRoleMemberRequestBuilder(object):

    def __init__(self) -> None:
        get_application_role_member_request = GetApplicationRoleMemberRequest()
        get_application_role_member_request.http_method = HttpMethod.GET
        get_application_role_member_request.uri = "/open-apis/apaas/v1/applications/:namespace/roles/:role_api_name/member"
        get_application_role_member_request.token_types = {AccessTokenType.TENANT}
        self._get_application_role_member_request: GetApplicationRoleMemberRequest = get_application_role_member_request

    def need_display_name(self, need_display_name: bool) -> "GetApplicationRoleMemberRequestBuilder":
        self._get_application_role_member_request.need_display_name = need_display_name
        self._get_application_role_member_request.add_query("need_display_name", need_display_name)
        return self

    def use_api_id(self, use_api_id: bool) -> "GetApplicationRoleMemberRequestBuilder":
        self._get_application_role_member_request.use_api_id = use_api_id
        self._get_application_role_member_request.add_query("use_api_id", use_api_id)
        return self

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

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

    def build(self) -> GetApplicationRoleMemberRequest:
        return self._get_application_role_member_request
