# Code generated by Lark OpenAPI.

from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
from lark_oapi.core.construct import init


class MaterialUploadResult(object):
    _types = {
        "file_token": str,
        "result": int,
    }

    def __init__(self, d=None):
        self.file_token: Optional[str] = None
        self.result: Optional[int] = None
        init(self, d, self._types)

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


class MaterialUploadResultBuilder(object):
    def __init__(self) -> None:
        self._material_upload_result = MaterialUploadResult()

    def file_token(self, file_token: str) -> "MaterialUploadResultBuilder":
        self._material_upload_result.file_token = file_token
        return self

    def result(self, result: int) -> "MaterialUploadResultBuilder":
        self._material_upload_result.result = result
        return self

    def build(self) -> "MaterialUploadResult":
        return self._material_upload_result
