# 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 GetBitableMetaReq(object):
    app_token: str = attr.ib(
        default="", metadata={"req_type": "path"}
    )  # bitable app token, 示例值："appbcbWCzen6D8dezhoCH2RpMAh"


@attr.s
class GetBitableMetaRespApp(object):
    app_token: str = attr.ib(
        default="", metadata={"req_type": "json"}
    )  # 多维表格的 app_token
    revision: int = attr.ib(default=0, metadata={"req_type": "json"})  # 多维表格的版本号


@attr.s
class GetBitableMetaResp(object):
    app: GetBitableMetaRespApp = attr.ib(
        default=None, metadata={"req_type": "json"}
    )  # 多维表格元数据


def _gen_get_bitable_meta_req(request, options) -> RawRequestReq:
    return RawRequestReq(
        dataclass=GetBitableMetaResp,
        scope="Bitable",
        api="GetBitableMeta",
        method="GET",
        url="https://open.feishu.cn/open-apis/bitable/v1/apps/:app_token",
        body=request,
        method_option=_new_method_option(options),
        need_tenant_access_token=True,
        need_user_access_token=True,
    )
