# 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 UpdateApprovalMessageReq(object):
    message_id: str = attr.ib(
        default="", metadata={"req_type": "json"}
    )  # 卡片 id，发送卡片时会拿到
    status: str = attr.ib(
        default="", metadata={"req_type": "json"}
    )  # 状态类型，用于更新第一个action文字内容，枚举：<br> APPROVED:-已同意<br>REJECTED:-已拒绝<br>CANCELLED:-已撤回<br>FORWARDED:-已转交<br>ROLLBACK:-已回退<br>ADD:-已加签<br>DELETED:-已删除<br>PROCESSED:-已处理


@attr.s
class UpdateApprovalMessageResp(object):
    message_id: str = attr.ib(
        default="", metadata={"req_type": "json"}
    )  # 消息 id ，用于卡片更新、撤回


def _gen_update_approval_message_req(request, options) -> RawRequestReq:
    return RawRequestReq(
        dataclass=UpdateApprovalMessageResp,
        scope="Approval",
        api="UpdateApprovalMessage",
        method="POST",
        url="https://www.feishu.cn/approval/openapi/v1/message/update",
        body=request,
        method_option=_new_method_option(options),
        need_tenant_access_token=True,
    )
