# Code generated by lark_sdk_gen. DO NOT EDIT.

from pylark.lark_request import RawRequestReq, _new_method_option
import attr
import typing
import io


@attr.s
class UpdateSheetPropertyReqProperties(object):
    title: str = attr.ib(
        default="", metadata={"req_type": "json"}
    )  # spreadsheet 的标题，最大长度100个字符


@attr.s
class UpdateSheetPropertyReq(object):
    spreadsheet_token: str = attr.ib(
        default="", metadata={"req_type": "path"}
    )  # spreadsheet 的 token，获取方式见[在线表格开发指南](https://open.feishu.cn/document/ukTMukTMukTM/uATMzUjLwEzM14CMxMTN/overview)
    properties: UpdateSheetPropertyReqProperties = attr.ib(
        default=None, metadata={"req_type": "json"}
    )  # spreadsheet 的属性


@attr.s
class UpdateSheetPropertyResp(object):
    spreadsheet_token: str = attr.ib(
        default="", metadata={"req_type": "json"}
    )  # spreadsheet 的 token
    title: str = attr.ib(default="", metadata={"req_type": "json"})  # spreadsheet 的标题


def _gen_update_sheet_property_req(request, options) -> RawRequestReq:
    return RawRequestReq(
        dataclass=UpdateSheetPropertyResp,
        scope="Drive",
        api="UpdateSheetProperty",
        method="PUT",
        url="https://open.feishu.cn/open-apis/sheets/v2/spreadsheets/:spreadsheetToken/properties",
        body=request,
        method_option=_new_method_option(options),
        need_tenant_access_token=True,
        need_user_access_token=True,
    )
