# Code generated by Lark OpenAPI.

from typing import Optional

from lark_oapi.core.construct import init


class GetSpreadsheet(object):
    _types = {
        "title": str,
        "owner_id": str,
        "token": str,
        "url": str,
    }

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

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


class GetSpreadsheetBuilder(object):
    def __init__(self) -> None:
        self._get_spreadsheet = GetSpreadsheet()

    def title(self, title: str) -> "GetSpreadsheetBuilder":
        self._get_spreadsheet.title = title
        return self

    def owner_id(self, owner_id: str) -> "GetSpreadsheetBuilder":
        self._get_spreadsheet.owner_id = owner_id
        return self

    def token(self, token: str) -> "GetSpreadsheetBuilder":
        self._get_spreadsheet.token = token
        return self

    def url(self, url: str) -> "GetSpreadsheetBuilder":
        self._get_spreadsheet.url = url
        return self

    def build(self) -> "GetSpreadsheet":
        return self._get_spreadsheet
