# 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 GetHelpdeskFAQImageReq(object):
    id: str = attr.ib(default="", metadata={"req_type": "path"})  # 知识库ID, 示例值："12345"
    image_key: str = attr.ib(
        default="", metadata={"req_type": "path"}
    )  # 图像key, 示例值："img_b07ffac0-19c1-48a3-afca-599f8ea825fj"


@attr.s
class GetHelpdeskFAQImageRespFile(object):
    pass


@attr.s
class GetHelpdeskFAQImageResp(object):
    file: typing.Union[str, bytes, io.BytesIO] = attr.ib(
        default=None, metadata={"req_type": "json"}
    )


@attr.s
class GetHelpdeskFAQImageResp(object):
    is_file: bool = attr.ib(factory=lambda: bool(), metadata={"req_type": "json"})
    code: int = attr.ib(default=0, metadata={"req_type": "json"})
    msg: str = attr.ib(default="", metadata={"req_type": "json"})
    data: GetHelpdeskFAQImageResp = attr.ib(default=None, metadata={"req_type": "json"})


def _gen_get_helpdesk_faq_image_req(request, options) -> RawRequestReq:
    return RawRequestReq(
        dataclass=GetHelpdeskFAQImageResp,
        scope="Helpdesk",
        api="GetHelpdeskFAQImage",
        method="GET",
        url="https://open.feishu.cn/open-apis/helpdesk/v1/faqs/:id/image/:image_key",
        body=request,
        method_option=_new_method_option(options),
        need_tenant_access_token=True,
        need_helpdesk_auth=True,
    )
