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

// EventV2ApplicationBotMenuV6 当用户点击类型为事件的机器人菜单时触发
//
// doc: https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/bot/events/menu
// new doc: https://open.feishu.cn/document/client-docs/bot-v3/events/menu
func (r *EventCallbackService) HandlerEventV2ApplicationBotMenuV6(f EventV2ApplicationBotMenuV6Handler) {
	r.cli.eventHandler.eventV2ApplicationBotMenuV6Handler = f
}

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

// EventV2ApplicationBotMenuV6 ...
type EventV2ApplicationBotMenuV6 struct {
	Operator  *EventV2ApplicationBotMenuV6Operator `json:"operator,omitempty"`  // 用户信息
	EventKey  string                               `json:"event_key,omitempty"` // 菜单事件的唯一标识, 长度范围: `1` ～ `30` 字符
	Timestamp int64                                `json:"timestamp,omitempty"` // 用户点击菜单时间, 长度范围: `1` ～ `30`
}

// EventV2ApplicationBotMenuV6Operator ...
type EventV2ApplicationBotMenuV6Operator struct {
	OperatorName string                                         `json:"operator_name,omitempty"` // 用户名称, 长度范围: `1` ～ `100` 字符, 字段权限要求: 获取机器人自定义菜单操作人名称
	OperatorID   *EventV2ApplicationBotMenuV6OperatorOperatorID `json:"operator_id,omitempty"`   // 用户 ID
}

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