# 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 RecognizeBasicImageReq(object):
    image: str = attr.ib(
        default="", metadata={"req_type": "json"}
    )  # base64 后的图片数据, 示例值："base64后的图片二进制数据"


@attr.s
class RecognizeBasicImageResp(object):
    text_list: typing.List[str] = attr.ib(
        factory=lambda: [], metadata={"req_type": "json"}
    )  # 按区域识别，返回文本列表


def _gen_recognize_basic_image_req(request, options) -> RawRequestReq:
    return RawRequestReq(
        dataclass=RecognizeBasicImageResp,
        scope="AI",
        api="RecognizeBasicImage",
        method="POST",
        url="https://open.feishu.cn/open-apis/optical_char_recognition/v1/image/basic_recognize",
        body=request,
        method_option=_new_method_option(options),
        need_tenant_access_token=True,
    )
