// Code generated by lark_sdk_gen. DO NOT EDIT.
/**
 * Copyright 2022 chyroc
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package lark

import (
	"context"
)

// EventV2IMMessageRecalledV1 消息被撤回后触发此事件。
//
// doc: https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/events/recalled
// new doc: https://open.feishu.cn/document/server-docs/im-v1/message/events/recalled
func (r *EventCallbackService) HandlerEventV2IMMessageRecalledV1(f EventV2IMMessageRecalledV1Handler) {
	r.cli.eventHandler.eventV2IMMessageRecalledV1Handler = f
}

// EventV2IMMessageRecalledV1Handler event EventV2IMMessageRecalledV1 handler
type EventV2IMMessageRecalledV1Handler func(ctx context.Context, cli *Lark, schema string, header *EventHeaderV2, event *EventV2IMMessageRecalledV1) (string, error)

// EventV2IMMessageRecalledV1 ...
type EventV2IMMessageRecalledV1 struct {
	MessageID  string `json:"message_id,omitempty"`  // 消息ID
	ChatID     string `json:"chat_id,omitempty"`     // 群ID
	RecallTime string `json:"recall_time,omitempty"` // 撤回时间
	RecallType string `json:"recall_type,omitempty"` // 撤回类型, 可选值有: message_owner: 消息发送者撤回, group_owner: 群主撤回, group_manager: 群管理员撤回, enterprise_manager: 企业管理员撤回
}
