// 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"
)

// EventV2ApprovalApprovalUpdatedV4 了解事件订阅的使用场景和配置流程, 请点击查看 [事件订阅概述](https://open.feishu.cn/document/ukTMukTMukTM/uUTNz4SN1MjL1UzM)。
//
// 「审批」定义更新时触发此事件
// * 依赖权限: [访问审批应用] 或 [查看、创建、更新、删除审批应用相关信息]
//
// doc: https://open.feishu.cn/document/ukTMukTMukTM/uIDO24iM4YjLygjN/event/custom-approval-event
// new doc: https://open.feishu.cn/document/server-docs/approval-v4/event/common-event/custom-approval-event
func (r *EventCallbackService) HandlerEventV2ApprovalApprovalUpdatedV4(f EventV2ApprovalApprovalUpdatedV4Handler) {
	r.cli.eventHandler.eventV2ApprovalApprovalUpdatedV4Handler = f
}

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

// EventV2ApprovalApprovalUpdatedV4 ...
type EventV2ApprovalApprovalUpdatedV4 struct {
	Object *EventV2ApprovalApprovalUpdatedV4Object `json:"object,omitempty"` // 为当前的数据, 事件的标准格式
}

// EventV2ApprovalApprovalUpdatedV4Object ...
type EventV2ApprovalApprovalUpdatedV4Object struct {
	ApprovalID       string `json:"approval_id,omitempty"`        // 审批定义id
	ApprovalCode     string `json:"approval_code,omitempty"`      // 审批定义code
	VersionID        string `json:"version_id,omitempty"`         // 审批定义版本号
	WidgetGroupType  int64  `json:"widget_group_type,omitempty"`  // 控件组类型, 0表示未使用. 如: 0
	FormDefinitionID string `json:"form_definition_id,omitempty"` // 表单定义ID
	ProcessObj       string `json:"process_obj,omitempty"`        // 审批流程设计
	Timestamp        string `json:"timestamp,omitempty"`          // 时间
	Extra            string `json:"extra,omitempty"`              // 扩展字段
}
