# 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 SendUrgentPhoneMessageReqUserIDType(object):
    pass


@attr.s
class SendUrgentPhoneMessageReq(object):
    user_id_type: SendUrgentPhoneMessageReqUserIDType = attr.ib(
        factory=lambda: SendUrgentPhoneMessageReqUserIDType(),
        metadata={"req_type": "query"},
    )  # 用户 ID 类型, 示例值："open_id", 可选值有: `open_id`：用户的 open id, `union_id`：用户的 union id, `user_id`：用户的 user id, 默认值: `open_id`, 当值为 `user_id`, 字段权限要求:  获取用户 user ID
    message_id: str = attr.ib(
        default="", metadata={"req_type": "path"}
    )  # 待加急的消息的ID, 示例值："om_dc13264520392913993dd051dba21dcf"
    user_id_list: typing.List[str] = attr.ib(
        factory=lambda: [], metadata={"req_type": "json"}
    )  # 目标用户的ID, 示例值：["ou_6yf8af6bgb9100449565764t3382b168"]


@attr.s
class SendUrgentPhoneMessageResp(object):
    invalid_user_id_list: typing.List[str] = attr.ib(
        factory=lambda: [], metadata={"req_type": "json"}
    )  # 无效的用户ID


def _gen_send_urgent_phone_message_req(request, options) -> RawRequestReq:
    return RawRequestReq(
        dataclass=SendUrgentPhoneMessageResp,
        scope="Message",
        api="SendUrgentPhoneMessage",
        method="PATCH",
        url="https://open.feishu.cn/open-apis/im/v1/messages/:message_id/urgent_phone",
        body=request,
        method_option=_new_method_option(options),
        need_tenant_access_token=True,
    )
