# 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 FileDetail(object):
    _types = {
        "token": str,
        "name": str,
        "links": List[str],
    }

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

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


class FileDetailBuilder(object):
    def __init__(self) -> None:
        self._file_detail = FileDetail()

    def token(self, token: str) -> "FileDetailBuilder":
        self._file_detail.token = token
        return self

    def name(self, name: str) -> "FileDetailBuilder":
        self._file_detail.name = name
        return self

    def links(self, links: List[str]) -> "FileDetailBuilder":
        self._file_detail.links = links
        return self

    def build(self) -> "FileDetail":
        return self._file_detail
