# 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 QuerySheetFilterViewReq(object):
    spreadsheet_token: str = attr.ib(
        default="", metadata={"req_type": "path"}
    )  # 表格 token, 示例值："shtcnmBA*****yGehy8"
    sheet_id: str = attr.ib(
        default="", metadata={"req_type": "path"}
    )  # 子表 id, 示例值："0b**12"


@attr.s
class QuerySheetFilterViewRespItem(object):
    filter_view_id: str = attr.ib(default="", metadata={"req_type": "json"})  # 筛选视图 id
    filter_view_name: str = attr.ib(default="", metadata={"req_type": "json"})  # 筛选视图名字
    range_: str = attr.ib(default="", metadata={"req_type": "json"})  # 筛选视图的筛选范围


@attr.s
class QuerySheetFilterViewResp(object):
    items: typing.List[QuerySheetFilterViewRespItem] = attr.ib(
        factory=lambda: [], metadata={"req_type": "json"}
    )  # 子表的所有筛选视图信息，id、name、range


def _gen_query_sheet_filter_view_req(request, options) -> RawRequestReq:
    return RawRequestReq(
        dataclass=QuerySheetFilterViewResp,
        scope="Drive",
        api="QuerySheetFilterView",
        method="GET",
        url="https://open.feishu.cn/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/query",
        body=request,
        method_option=_new_method_option(options),
        need_tenant_access_token=True,
        need_user_access_token=True,
    )
