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

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


class GetApplicationEnvironmentVariableRequestBuilder(object):

    def __init__(self) -> None:
        get_application_environment_variable_request = GetApplicationEnvironmentVariableRequest()
        get_application_environment_variable_request.http_method = HttpMethod.GET
        get_application_environment_variable_request.uri = "/open-apis/apaas/v1/applications/:namespace/environment_variables/:environment_variable_api_name"
        get_application_environment_variable_request.token_types = {AccessTokenType.TENANT}
        self._get_application_environment_variable_request: GetApplicationEnvironmentVariableRequest = get_application_environment_variable_request

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

    def environment_variable_api_name(self,
                                      environment_variable_api_name: str) -> "GetApplicationEnvironmentVariableRequestBuilder":
        self._get_application_environment_variable_request.environment_variable_api_name = environment_variable_api_name
        self._get_application_environment_variable_request.paths["environment_variable_api_name"] = str(
            environment_variable_api_name)
        return self

    def build(self) -> GetApplicationEnvironmentVariableRequest:
        return self._get_application_environment_variable_request
