# Code generated by Lark OpenAPI.

from typing import Optional

from lark_oapi.core.construct import init


class DownloadToken(object):
    _types = {
        "token": str,
    }

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

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


class DownloadTokenBuilder(object):
    def __init__(self) -> None:
        self._download_token = DownloadToken()

    def token(self, token: str) -> "DownloadTokenBuilder":
        self._download_token.token = token
        return self

    def build(self) -> "DownloadToken":
        return self._download_token
