# 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 UpdateChatAnnouncementReq(object):
    chat_id: str = attr.ib(
        default="", metadata={"req_type": "path"}
    )  # 待修改公告的群 ID, 示例值："oc_5ad11d72b830411d72b836c20"
    revision: str = attr.ib(
        default="", metadata={"req_type": "json"}
    )  # 文档当前版本号 int64 类型，get 接口会返回, 示例值："12"
    requests: typing.List[str] = attr.ib(
        factory=lambda: [], metadata={"req_type": "json"}
    )  # 修改文档请求的序列化字段


@attr.s
class UpdateChatAnnouncementResp(object):
    pass


def _gen_update_chat_announcement_req(request, options) -> RawRequestReq:
    return RawRequestReq(
        dataclass=UpdateChatAnnouncementResp,
        scope="Chat",
        api="UpdateChatAnnouncement",
        method="PATCH",
        url="https://open.feishu.cn/open-apis/im/v1/chats/:chat_id/announcement",
        body=request,
        method_option=_new_method_option(options),
        need_tenant_access_token=True,
        need_user_access_token=True,
    )
