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

// EventV2CalendarCalendarChangedV4 当用户订阅日历变更事件后, 如果用户日历列表内发生了日历变动, 则会触发该事件。
//
// - 你需要先为用户[订阅日历变更事件](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/subscription), 并且需要在应用中配置事件订阅, 这样才可以在事件触发时接收到事件数据。了解事件订阅参见[事件订阅概述](https://open.feishu.cn/document/ukTMukTMukTM/uUTNz4SN1MjL1UzM)。
// - 该事件主要包含发生日历变动的用户信息, 不包含日历信息。因此当你接收到事件请求后, 还需要提取 user_id_list 字段中的用户信息, 然后用这些用户身份（user_access_token）调用[查询日历列表](https://open.feishu.cn/document/ukTMukTMukTM/uMTM14yMxUjLzETN)接口, 获取日历的增量变更数据。
//
// doc: https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/events/changed
// new doc: https://open.feishu.cn/document/server-docs/calendar-v4/calendar/events/changed
func (r *EventCallbackService) HandlerEventV2CalendarCalendarChangedV4(f EventV2CalendarCalendarChangedV4Handler) {
	r.cli.eventHandler.eventV2CalendarCalendarChangedV4Handler = f
}

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

// EventV2CalendarCalendarChangedV4 ...
type EventV2CalendarCalendarChangedV4 struct {
	UserIDList []*EventV2CalendarCalendarChangedV4UserID `json:"user_id_list,omitempty"` // 需要推送事件的用户列表。关于用户不同 ID 的介绍, 参见[用户身份概述](https://open.feishu.cn/document/home/user-identity-introduction/introduction)
}

// EventV2CalendarCalendarChangedV4UserID ...
type EventV2CalendarCalendarChangedV4UserID struct {
	UnionID string `json:"union_id,omitempty"` // 用户的 union_id。
	UserID  string `json:"user_id,omitempty"`  // 用户的 user_id。
	OpenID  string `json:"open_id,omitempty"`  // 用户的 open_id。
}
