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

// EventV2CalendarCalendarACLDeletedV4 当订阅的日历上有访问控制被删除时, 将会触发此事件。
//
// 你需要先为用户[订阅日历访问控制变更事件](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-acl/subscription), 并且需要在应用中配置事件订阅, 这样才可以在事件触发时接收到事件数据。了解事件订阅参见[事件订阅概述](https://open.feishu.cn/document/ukTMukTMukTM/uUTNz4SN1MjL1UzM)。
//
// doc: https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-acl/events/deleted
// new doc: https://open.feishu.cn/document/server-docs/calendar-v4/calendar-acl/events/deleted
func (r *EventCallbackService) HandlerEventV2CalendarCalendarACLDeletedV4(f EventV2CalendarCalendarACLDeletedV4Handler) {
	r.cli.eventHandler.eventV2CalendarCalendarACLDeletedV4Handler = f
}

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

// EventV2CalendarCalendarACLDeletedV4 ...
type EventV2CalendarCalendarACLDeletedV4 struct {
	ACLID      string                                       `json:"acl_id,omitempty"`       // 访问控制 ID。该 ID 在单个日历实体内唯一, 不同日历实体可能存在重复的访问控制 ID。
	Role       CalendarRole                                 `json:"role,omitempty"`         // 对日历的访问权限, 可选值有: unknown: 未知权限。, free_busy_reader: 游客, 只能看到忙碌、空闲信息。, reader: 订阅者, 可查看所有日程详情。, writer: 编辑者, 可创建及修改日程。, owner: 管理员, 可管理日历及共享设置。
	Scope      *EventV2CalendarCalendarACLDeletedV4Scope    `json:"scope,omitempty"`        // 权限生效范围。
	UserIDList []*EventV2CalendarCalendarACLDeletedV4UserID `json:"user_id_list,omitempty"` // 需要推送事件的用户列表。
}

// EventV2CalendarCalendarACLDeletedV4Scope ...
type EventV2CalendarCalendarACLDeletedV4Scope struct {
	Type   string                                          `json:"type,omitempty"`    // 权限生效范围的类型, 可选值有: user: 用户
	UserID *EventV2CalendarCalendarACLDeletedV4ScopeUserID `json:"user_id,omitempty"` // 用户 ID
}

// EventV2CalendarCalendarACLDeletedV4ScopeUserID ...
type EventV2CalendarCalendarACLDeletedV4ScopeUserID struct {
	UnionID string `json:"union_id,omitempty"` // 用户的 union id
	UserID  string `json:"user_id,omitempty"`  // 用户的 user id, 字段权限要求: 获取用户 user ID
	OpenID  string `json:"open_id,omitempty"`  // 用户的 open id
}

// EventV2CalendarCalendarACLDeletedV4UserID ...
type EventV2CalendarCalendarACLDeletedV4UserID 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。
}
