# 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 .upload_file_app_data_asset_request_body import UploadFileAppDataAssetRequestBody


class UploadFileAppDataAssetRequest(BaseRequest):
    def __init__(self) -> None:
        super().__init__()
        self.tenant_type: Optional[str] = None
        self.app_id: Optional[str] = None
        self.request_body: Optional[UploadFileAppDataAssetRequestBody] = None

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


class UploadFileAppDataAssetRequestBuilder(object):

    def __init__(self) -> None:
        upload_file_app_data_asset_request = UploadFileAppDataAssetRequest()
        upload_file_app_data_asset_request.http_method = HttpMethod.POST
        upload_file_app_data_asset_request.uri = "/open-apis/aily/v1/apps/:app_id/data_assets/upload_file"
        upload_file_app_data_asset_request.token_types = {AccessTokenType.USER, AccessTokenType.TENANT}
        self._upload_file_app_data_asset_request: UploadFileAppDataAssetRequest = upload_file_app_data_asset_request

    def tenant_type(self, tenant_type: str) -> "UploadFileAppDataAssetRequestBuilder":
        self._upload_file_app_data_asset_request.tenant_type = tenant_type
        self._upload_file_app_data_asset_request.add_query("tenant_type", tenant_type)
        return self

    def app_id(self, app_id: str) -> "UploadFileAppDataAssetRequestBuilder":
        self._upload_file_app_data_asset_request.app_id = app_id
        self._upload_file_app_data_asset_request.paths["app_id"] = str(app_id)
        return self

    def request_body(self, request_body: UploadFileAppDataAssetRequestBody) -> "UploadFileAppDataAssetRequestBuilder":
        self._upload_file_app_data_asset_request.request_body = request_body
        self._upload_file_app_data_asset_request.body = request_body
        return self

    def build(self) -> UploadFileAppDataAssetRequest:
        return self._upload_file_app_data_asset_request
