// Package calendar code generated by oapi sdk gen
/*
 * MIT License
 *
 * Copyright (c) 2022 Lark Technologies Pte. Ltd.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice, shall be included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

package larkcalendar

import (
	"fmt"

	"context"
	"errors"

	"github.com/larksuite/oapi-sdk-go/v3/event"

	"github.com/larksuite/oapi-sdk-go/v3/core"
)

const (
	EventPermissionsPrivate          = "private"             // 私密
	EventPermissionsShowOnlyFreeBusy = "show_only_free_busy" // 仅展示忙闲信息
	EventPermissionsPublic           = "public"              // 他人可查看日程详情
)

const (
	UserIdTypeUserId  = "user_id"  // 以user_id来识别用户id
	UserIdTypeUnionId = "union_id" // 以union_id来识别用户id
	UserIdTypeOpenId  = "open_id"  // 以open_id来识别用户id
)

const (
	EventPermissionsPatchCalendarPrivate          = "private"             // 私密
	EventPermissionsPatchCalendarShowOnlyFreeBusy = "show_only_free_busy" // 仅展示忙闲信息
	EventPermissionsPatchCalendarPublic           = "public"              // 他人可查看日程详情
)

const (
	UserIdTypePrimaryCalendarUserId  = "user_id"  // 以user_id来识别用户id
	UserIdTypePrimaryCalendarUnionId = "union_id" // 以union_id来识别用户id
	UserIdTypePrimaryCalendarOpenId  = "open_id"  // 以open_id来识别用户id
)

const (
	UserIdTypePrimarysCalendarUserId  = "user_id"  // 以user_id来识别用户id
	UserIdTypePrimarysCalendarUnionId = "union_id" // 以union_id来识别用户id
	UserIdTypePrimarysCalendarOpenId  = "open_id"  // 以open_id来识别用户id
)

const (
	CalendarAccessRoleUnkonwn        = "unknown"          // 未知权限
	CalendarAccessRoleFreeBusyReader = "free_busy_reader" // 游客，只能看到忙碌/空闲信息
	CalendarAccessRoleReader         = "reader"           // 订阅者，查看所有日程详情
	CalendarAccessRoleWriter         = "writer"           // 编辑者，创建及修改日程
	CalendarAccessRoleOwner          = "owner"            // 管理员，管理日历及共享设置
)

const (
	UserIdTypeCreateCalendarAclUserId  = "user_id"  // 以user_id来识别用户
	UserIdTypeCreateCalendarAclUnionId = "union_id" // 以union_id来识别用户
	UserIdTypeCreateCalendarAclOpenId  = "open_id"  // 以open_id来识别用户
)

const (
	UserIdTypeListCalendarAclUserId  = "user_id"  // 以user_id来识别用户id
	UserIdTypeListCalendarAclUnionId = "union_id" // 以union_id来识别用户id
	UserIdTypeListCalendarAclOpenId  = "open_id"  // 以open_id来识别用户id
)

const (
	EventVisibilityDefault = "default" // 默认权限，仅向他人显示是否“忙碌”
	EventVisibilityPublic  = "public"  // 公开，显示日程详情
	EventVisibilityPrivate = "private" // 私密，仅自己可见
)

const (
	EventAttendeeAbilityNone            = "none"              // 无法编辑日程、无法邀请其它参与人、无法查看参与人列表
	EventAttendeeAbilityCanSeeOthers    = "can_see_others"    // 无法编辑日程、无法邀请其它参与人、可以查看参与人列表
	EventAttendeeAbilityCanInviteOthers = "can_invite_others" // 无法编辑日程、可以邀请其它参与人、可以查看参与人列表
	EventAttendeeAbilityCanModifyEvent  = "can_modify_event"  // 可以编辑日程、可以邀请其它参与人、可以查看参与人列表
)

const (
	EventFreeBusyStatusBusy = "busy" // 忙碌
	EventFreeBusyStatusFree = "free" // 空闲
)

const (
	UserIdTypeCreateCalendarEventUserId  = "user_id"  // 以user_id来识别用户
	UserIdTypeCreateCalendarEventUnionId = "union_id" // 以union_id来识别用户
	UserIdTypeCreateCalendarEventOpenId  = "open_id"  // 以open_id来识别用户
)

const (
	NeedNotificationTrue  = "true"  // 发送通知
	NeedNotificationFalse = "false" // 不发送通知
)

const (
	UserIdTypeGetCalendarEventUserId  = "user_id"  // 以user_id来识别用户
	UserIdTypeGetCalendarEventUnionId = "union_id" // 以union_id来识别用户
	UserIdTypeGetCalendarEventOpenId  = "open_id"  // 以open_id来识别用户
)

const (
	UserIdTypeInstanceViewCalendarEventUserId  = "user_id"  // 以user_id来识别用户
	UserIdTypeInstanceViewCalendarEventUnionId = "union_id" // 以union_id来识别用户
	UserIdTypeInstanceViewCalendarEventOpenId  = "open_id"  // 以open_id来识别用户
)

const (
	UserIdTypeListCalendarEventUserId  = "user_id"  // 以user_id来识别用户
	UserIdTypeListCalendarEventUnionId = "union_id" // 以union_id来识别用户
	UserIdTypeListCalendarEventOpenId  = "open_id"  // 以open_id来识别用户
)

const (
	EventVisibilityPatchCalendarEventDefault = "default" // 默认权限，仅向他人显示是否“忙碌”
	EventVisibilityPatchCalendarEventPublic  = "public"  // 公开，显示日程详情
	EventVisibilityPatchCalendarEventPrivate = "private" // 私密，仅自己可见
)

const (
	EventAttendeeAbilityPatchCalendarEventNone            = "none"              // 无法编辑日程、无法邀请其它参与人、无法查看参与人列表
	EventAttendeeAbilityPatchCalendarEventCanSeeOthers    = "can_see_others"    // 无法编辑日程、无法邀请其它参与人、可以查看参与人列表
	EventAttendeeAbilityPatchCalendarEventCanInviteOthers = "can_invite_others" // 无法编辑日程、可以邀请其它参与人、可以查看参与人列表
	EventAttendeeAbilityPatchCalendarEventCanModifyEvent  = "can_modify_event"  // 可以编辑日程、可以邀请其它参与人、可以查看参与人列表
)

const (
	EventFreeBusyStatusPatchCalendarEventBusy = "busy" // 忙碌
	EventFreeBusyStatusPatchCalendarEventFree = "free" // 空闲
)

const (
	UserIdTypePatchCalendarEventUserId  = "user_id"  // 以user_id来识别用户
	UserIdTypePatchCalendarEventUnionId = "union_id" // 以union_id来识别用户
	UserIdTypePatchCalendarEventOpenId  = "open_id"  // 以open_id来识别用户
)

const (
	RsvpStatusAccept    = "accept"    // 接受
	RsvpStatusDecline   = "decline"   // 拒绝
	RsvpStatusTentative = "tentative" // 待定
)

const (
	UserIdTypeSearchCalendarEventUserId  = "user_id"  // 以user_id来识别用户id
	UserIdTypeSearchCalendarEventUnionId = "union_id" // 以union_id来识别用户id
	UserIdTypeSearchCalendarEventOpenId  = "open_id"  // 以open_id来识别用户id
)

const (
	UserIdTypeBatchDeleteCalendarEventAttendeeUserId  = "user_id"  // 以user_id来识别用户id
	UserIdTypeBatchDeleteCalendarEventAttendeeUnionId = "union_id" // 以union_id来识别用户id
	UserIdTypeBatchDeleteCalendarEventAttendeeOpenId  = "open_id"  // 以open_id来识别用户id
)

const (
	UserIdTypeCreateCalendarEventAttendeeUserId  = "user_id"  // 以user_id来识别用户id
	UserIdTypeCreateCalendarEventAttendeeUnionId = "union_id" // 以union_id来识别用户id
	UserIdTypeCreateCalendarEventAttendeeOpenId  = "open_id"  // 以open_id来识别用户id
)

const (
	UserIdTypeListCalendarEventAttendeeUserId  = "user_id"  // 以user_id来识别用户id
	UserIdTypeListCalendarEventAttendeeUnionId = "union_id" // 以union_id来识别用户id
	UserIdTypeListCalendarEventAttendeeOpenId  = "open_id"  // 以open_id来识别用户id
)

const (
	UserIdTypeListCalendarEventAttendeeChatMemberUserId  = "user_id"  // 以user_id来识别用户
	UserIdTypeListCalendarEventAttendeeChatMemberUnionId = "union_id" // 以union_id来识别用户
	UserIdTypeListCalendarEventAttendeeChatMemberOpenId  = "open_id"  // 以open_id来识别用户
)

const (
	UserIdTypeCreateExchangeBindingUserId  = "user_id"  // 以user_id来识别用户
	UserIdTypeCreateExchangeBindingUnionId = "union_id" // 以union_id来识别用户
	UserIdTypeCreateExchangeBindingOpenId  = "open_id"  // 以open_id来识别用户
)

const (
	UserIdTypeGetExchangeBindingUserId  = "user_id"  // 以user_id来识别用户
	UserIdTypeGetExchangeBindingUnionId = "union_id" // 以union_id来识别用户
	UserIdTypeGetExchangeBindingOpenId  = "open_id"  // 以open_id来识别用户
)

const (
	UserIdTypeBatchFreebusyUserId  = "user_id"  // 以user_id来识别用户id
	UserIdTypeBatchFreebusyUnionId = "union_id" // 以union_id来识别用户id
	UserIdTypeBatchFreebusyOpenId  = "open_id"  // 以open_id来识别用户id
)

const (
	UserIdTypeListFreebusyUserId  = "user_id"  // 以user_id来识别用户id
	UserIdTypeListFreebusyUnionId = "union_id" // 以union_id来识别用户id
	UserIdTypeListFreebusyOpenId  = "open_id"  // 以open_id来识别用户id
)

const (
	UserIdTypeCreateTimeoffEventUserId  = "user_id"  // 以user_id来识别用户id
	UserIdTypeCreateTimeoffEventUnionId = "union_id" // 以union_id来识别用户id
	UserIdTypeCreateTimeoffEventOpenId  = "open_id"  // 以open_id来识别用户id
)

type AclScope struct {
	Type *string `json:"type,omitempty"` // 权限类型，当type为User时，值为open_id/user_id/union_id

	UserId *string `json:"user_id,omitempty"` // 用户ID，参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction)
}

type AclScopeBuilder struct {
	type_    string // 权限类型，当type为User时，值为open_id/user_id/union_id
	typeFlag bool

	userId     string // 用户ID，参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction)
	userIdFlag bool
}

func NewAclScopeBuilder() *AclScopeBuilder {
	builder := &AclScopeBuilder{}
	return builder
}

// 权限类型，当type为User时，值为open_id/user_id/union_id
//
// 示例值：user
func (builder *AclScopeBuilder) Type(type_ string) *AclScopeBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// 用户ID，参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction)
//
// 示例值：ou_xxxxxx
func (builder *AclScopeBuilder) UserId(userId string) *AclScopeBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

func (builder *AclScopeBuilder) Build() *AclScope {
	req := &AclScope{}
	if builder.typeFlag {
		req.Type = &builder.type_

	}
	if builder.userIdFlag {
		req.UserId = &builder.userId

	}
	return req
}

type AclScopeEvent struct {
	Type *string `json:"type,omitempty"` // 权限类型，当type为User时，值为open_id/user_id/union_id

	UserId *UserId `json:"user_id,omitempty"` // 用户 ID
}

type AclScopeEventBuilder struct {
	type_    string // 权限类型，当type为User时，值为open_id/user_id/union_id
	typeFlag bool

	userId     *UserId // 用户 ID
	userIdFlag bool
}

func NewAclScopeEventBuilder() *AclScopeEventBuilder {
	builder := &AclScopeEventBuilder{}
	return builder
}

// 权限类型，当type为User时，值为open_id/user_id/union_id
//
// 示例值：user
func (builder *AclScopeEventBuilder) Type(type_ string) *AclScopeEventBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// 用户 ID
//
// 示例值：
func (builder *AclScopeEventBuilder) UserId(userId *UserId) *AclScopeEventBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

func (builder *AclScopeEventBuilder) Build() *AclScopeEvent {
	req := &AclScopeEvent{}
	if builder.typeFlag {
		req.Type = &builder.type_

	}
	if builder.userIdFlag {
		req.UserId = builder.userId
	}
	return req
}

type Attachment struct {
	FileToken *string `json:"file_token,omitempty"` // 附件token

	FileSize *string `json:"file_size,omitempty"` // 附件大小

	IsDeleted *bool `json:"is_deleted,omitempty"` // 是否删除附件

	Name *string `json:"name,omitempty"` // 附件名称
}

type AttachmentBuilder struct {
	fileToken     string // 附件token
	fileTokenFlag bool

	fileSize     string // 附件大小
	fileSizeFlag bool

	isDeleted     bool // 是否删除附件
	isDeletedFlag bool

	name     string // 附件名称
	nameFlag bool
}

func NewAttachmentBuilder() *AttachmentBuilder {
	builder := &AttachmentBuilder{}
	return builder
}

// 附件token
//
// 示例值：xAAAAA
func (builder *AttachmentBuilder) FileToken(fileToken string) *AttachmentBuilder {
	builder.fileToken = fileToken
	builder.fileTokenFlag = true
	return builder
}

// 附件大小
//
// 示例值：2345
func (builder *AttachmentBuilder) FileSize(fileSize string) *AttachmentBuilder {
	builder.fileSize = fileSize
	builder.fileSizeFlag = true
	return builder
}

// 是否删除附件
//
// 示例值：true
func (builder *AttachmentBuilder) IsDeleted(isDeleted bool) *AttachmentBuilder {
	builder.isDeleted = isDeleted
	builder.isDeletedFlag = true
	return builder
}

// 附件名称
//
// 示例值：附件.jpeg
func (builder *AttachmentBuilder) Name(name string) *AttachmentBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

func (builder *AttachmentBuilder) Build() *Attachment {
	req := &Attachment{}
	if builder.fileTokenFlag {
		req.FileToken = &builder.fileToken

	}
	if builder.fileSizeFlag {
		req.FileSize = &builder.fileSize

	}
	if builder.isDeletedFlag {
		req.IsDeleted = &builder.isDeleted

	}
	if builder.nameFlag {
		req.Name = &builder.name

	}
	return req
}

type AttendeeChatMember struct {
	RsvpStatus *string `json:"rsvp_status,omitempty"` // 参与人RSVP状态

	IsOptional *bool `json:"is_optional,omitempty"` // 参与人是否为「可选参加」

	DisplayName *string `json:"display_name,omitempty"` // 参与人名称

	IsOrganizer *bool `json:"is_organizer,omitempty"` // 参与人是否为日程组织者

	IsExternal *bool `json:"is_external,omitempty"` // 参与人是否为外部参与人
}

type AttendeeChatMemberBuilder struct {
	rsvpStatus     string // 参与人RSVP状态
	rsvpStatusFlag bool

	isOptional     bool // 参与人是否为「可选参加」
	isOptionalFlag bool

	displayName     string // 参与人名称
	displayNameFlag bool

	isOrganizer     bool // 参与人是否为日程组织者
	isOrganizerFlag bool

	isExternal     bool // 参与人是否为外部参与人
	isExternalFlag bool
}

func NewAttendeeChatMemberBuilder() *AttendeeChatMemberBuilder {
	builder := &AttendeeChatMemberBuilder{}
	return builder
}

// 参与人RSVP状态
//
// 示例值：needs_action
func (builder *AttendeeChatMemberBuilder) RsvpStatus(rsvpStatus string) *AttendeeChatMemberBuilder {
	builder.rsvpStatus = rsvpStatus
	builder.rsvpStatusFlag = true
	return builder
}

// 参与人是否为「可选参加」
//
// 示例值：true
func (builder *AttendeeChatMemberBuilder) IsOptional(isOptional bool) *AttendeeChatMemberBuilder {
	builder.isOptional = isOptional
	builder.isOptionalFlag = true
	return builder
}

// 参与人名称
//
// 示例值：Group
func (builder *AttendeeChatMemberBuilder) DisplayName(displayName string) *AttendeeChatMemberBuilder {
	builder.displayName = displayName
	builder.displayNameFlag = true
	return builder
}

// 参与人是否为日程组织者
//
// 示例值：false
func (builder *AttendeeChatMemberBuilder) IsOrganizer(isOrganizer bool) *AttendeeChatMemberBuilder {
	builder.isOrganizer = isOrganizer
	builder.isOrganizerFlag = true
	return builder
}

// 参与人是否为外部参与人
//
// 示例值：false
func (builder *AttendeeChatMemberBuilder) IsExternal(isExternal bool) *AttendeeChatMemberBuilder {
	builder.isExternal = isExternal
	builder.isExternalFlag = true
	return builder
}

func (builder *AttendeeChatMemberBuilder) Build() *AttendeeChatMember {
	req := &AttendeeChatMember{}
	if builder.rsvpStatusFlag {
		req.RsvpStatus = &builder.rsvpStatus

	}
	if builder.isOptionalFlag {
		req.IsOptional = &builder.isOptional

	}
	if builder.displayNameFlag {
		req.DisplayName = &builder.displayName

	}
	if builder.isOrganizerFlag {
		req.IsOrganizer = &builder.isOrganizer

	}
	if builder.isExternalFlag {
		req.IsExternal = &builder.isExternal

	}
	return req
}

type BookMeetingRoomData struct {
	MeetingRoomId *string `json:"meeting_room_id,omitempty"` // 会议室ID

	Hint *string `json:"hint,omitempty"` // 返回给ai的会议室描述数据

	Rooms []*RoomMeta `json:"rooms,omitempty"` // 日历实体列表

	RecurrenceRule *string `json:"recurrence_rule,omitempty"` // 重复性日程规则
}

type BookMeetingRoomDataBuilder struct {
	meetingRoomId     string // 会议室ID
	meetingRoomIdFlag bool

	hint     string // 返回给ai的会议室描述数据
	hintFlag bool

	rooms     []*RoomMeta // 日历实体列表
	roomsFlag bool

	recurrenceRule     string // 重复性日程规则
	recurrenceRuleFlag bool
}

func NewBookMeetingRoomDataBuilder() *BookMeetingRoomDataBuilder {
	builder := &BookMeetingRoomDataBuilder{}
	return builder
}

// 会议室ID
//
// 示例值：none
func (builder *BookMeetingRoomDataBuilder) MeetingRoomId(meetingRoomId string) *BookMeetingRoomDataBuilder {
	builder.meetingRoomId = meetingRoomId
	builder.meetingRoomIdFlag = true
	return builder
}

// 返回给ai的会议室描述数据
//
// 示例值：none
func (builder *BookMeetingRoomDataBuilder) Hint(hint string) *BookMeetingRoomDataBuilder {
	builder.hint = hint
	builder.hintFlag = true
	return builder
}

// 日历实体列表
//
// 示例值：
func (builder *BookMeetingRoomDataBuilder) Rooms(rooms []*RoomMeta) *BookMeetingRoomDataBuilder {
	builder.rooms = rooms
	builder.roomsFlag = true
	return builder
}

// 重复性日程规则
//
// 示例值：none
func (builder *BookMeetingRoomDataBuilder) RecurrenceRule(recurrenceRule string) *BookMeetingRoomDataBuilder {
	builder.recurrenceRule = recurrenceRule
	builder.recurrenceRuleFlag = true
	return builder
}

func (builder *BookMeetingRoomDataBuilder) Build() *BookMeetingRoomData {
	req := &BookMeetingRoomData{}
	if builder.meetingRoomIdFlag {
		req.MeetingRoomId = &builder.meetingRoomId

	}
	if builder.hintFlag {
		req.Hint = &builder.hint

	}
	if builder.roomsFlag {
		req.Rooms = builder.rooms
	}
	if builder.recurrenceRuleFlag {
		req.RecurrenceRule = &builder.recurrenceRule

	}
	return req
}

type Calendar struct {
	CalendarId *string `json:"calendar_id,omitempty"` // 日历ID。参见[日历ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)

	Summary *string `json:"summary,omitempty"` // 日历标题

	Description *string `json:"description,omitempty"` // 日历描述

	Permissions *string `json:"permissions,omitempty"` // 日历公开范围

	Color *int `json:"color,omitempty"` // 日历颜色，颜色RGB值的int32表示。客户端展示时会映射到色板上最接近的一种颜色。仅对当前身份生效

	Type *string `json:"type,omitempty"` // 日历类型

	SummaryAlias *string `json:"summary_alias,omitempty"` // 日历备注名，修改或添加后仅对当前身份生效

	IsDeleted *bool `json:"is_deleted,omitempty"` // 对于当前身份，日历是否已经被标记为删除

	IsThirdParty *bool `json:"is_third_party,omitempty"` // 当前日历是否是第三方数据；三方日历及日程只支持读，不支持写入

	Role *string `json:"role,omitempty"` // 当前身份对于该日历的访问权限
}

type CalendarBuilder struct {
	calendarId     string // 日历ID。参见[日历ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)
	calendarIdFlag bool

	summary     string // 日历标题
	summaryFlag bool

	description     string // 日历描述
	descriptionFlag bool

	permissions     string // 日历公开范围
	permissionsFlag bool

	color     int // 日历颜色，颜色RGB值的int32表示。客户端展示时会映射到色板上最接近的一种颜色。仅对当前身份生效
	colorFlag bool

	type_    string // 日历类型
	typeFlag bool

	summaryAlias     string // 日历备注名，修改或添加后仅对当前身份生效
	summaryAliasFlag bool

	isDeleted     bool // 对于当前身份，日历是否已经被标记为删除
	isDeletedFlag bool

	isThirdParty     bool // 当前日历是否是第三方数据；三方日历及日程只支持读，不支持写入
	isThirdPartyFlag bool

	role     string // 当前身份对于该日历的访问权限
	roleFlag bool
}

func NewCalendarBuilder() *CalendarBuilder {
	builder := &CalendarBuilder{}
	return builder
}

// 日历ID。参见[日历ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)
//
// 示例值：feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
func (builder *CalendarBuilder) CalendarId(calendarId string) *CalendarBuilder {
	builder.calendarId = calendarId
	builder.calendarIdFlag = true
	return builder
}

// 日历标题
//
// 示例值：测试日历
func (builder *CalendarBuilder) Summary(summary string) *CalendarBuilder {
	builder.summary = summary
	builder.summaryFlag = true
	return builder
}

// 日历描述
//
// 示例值：使用开放接口创建日历
func (builder *CalendarBuilder) Description(description string) *CalendarBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 日历公开范围
//
// 示例值：private
func (builder *CalendarBuilder) Permissions(permissions string) *CalendarBuilder {
	builder.permissions = permissions
	builder.permissionsFlag = true
	return builder
}

// 日历颜色，颜色RGB值的int32表示。客户端展示时会映射到色板上最接近的一种颜色。仅对当前身份生效
//
// 示例值：-1
func (builder *CalendarBuilder) Color(color int) *CalendarBuilder {
	builder.color = color
	builder.colorFlag = true
	return builder
}

// 日历类型
//
// 示例值：shared
func (builder *CalendarBuilder) Type(type_ string) *CalendarBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// 日历备注名，修改或添加后仅对当前身份生效
//
// 示例值：日历备注名
func (builder *CalendarBuilder) SummaryAlias(summaryAlias string) *CalendarBuilder {
	builder.summaryAlias = summaryAlias
	builder.summaryAliasFlag = true
	return builder
}

// 对于当前身份，日历是否已经被标记为删除
//
// 示例值：false
func (builder *CalendarBuilder) IsDeleted(isDeleted bool) *CalendarBuilder {
	builder.isDeleted = isDeleted
	builder.isDeletedFlag = true
	return builder
}

// 当前日历是否是第三方数据；三方日历及日程只支持读，不支持写入
//
// 示例值：false
func (builder *CalendarBuilder) IsThirdParty(isThirdParty bool) *CalendarBuilder {
	builder.isThirdParty = isThirdParty
	builder.isThirdPartyFlag = true
	return builder
}

// 当前身份对于该日历的访问权限
//
// 示例值：owner
func (builder *CalendarBuilder) Role(role string) *CalendarBuilder {
	builder.role = role
	builder.roleFlag = true
	return builder
}

func (builder *CalendarBuilder) Build() *Calendar {
	req := &Calendar{}
	if builder.calendarIdFlag {
		req.CalendarId = &builder.calendarId

	}
	if builder.summaryFlag {
		req.Summary = &builder.summary

	}
	if builder.descriptionFlag {
		req.Description = &builder.description

	}
	if builder.permissionsFlag {
		req.Permissions = &builder.permissions

	}
	if builder.colorFlag {
		req.Color = &builder.color

	}
	if builder.typeFlag {
		req.Type = &builder.type_

	}
	if builder.summaryAliasFlag {
		req.SummaryAlias = &builder.summaryAlias

	}
	if builder.isDeletedFlag {
		req.IsDeleted = &builder.isDeleted

	}
	if builder.isThirdPartyFlag {
		req.IsThirdParty = &builder.isThirdParty

	}
	if builder.roleFlag {
		req.Role = &builder.role

	}
	return req
}

type CalendarAcl struct {
	AclId *string `json:"acl_id,omitempty"` // acl资源ID。参见[ACL ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-acl/introduction)

	Role *string `json:"role,omitempty"` // 对日历的访问权限

	Scope *AclScope `json:"scope,omitempty"` // 权限范围
}

type CalendarAclBuilder struct {
	aclId     string // acl资源ID。参见[ACL ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-acl/introduction)
	aclIdFlag bool

	role     string // 对日历的访问权限
	roleFlag bool

	scope     *AclScope // 权限范围
	scopeFlag bool
}

func NewCalendarAclBuilder() *CalendarAclBuilder {
	builder := &CalendarAclBuilder{}
	return builder
}

// acl资源ID。参见[ACL ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-acl/introduction)
//
// 示例值：user_xxxxxx
func (builder *CalendarAclBuilder) AclId(aclId string) *CalendarAclBuilder {
	builder.aclId = aclId
	builder.aclIdFlag = true
	return builder
}

// 对日历的访问权限
//
// 示例值：writer
func (builder *CalendarAclBuilder) Role(role string) *CalendarAclBuilder {
	builder.role = role
	builder.roleFlag = true
	return builder
}

// 权限范围
//
// 示例值：
func (builder *CalendarAclBuilder) Scope(scope *AclScope) *CalendarAclBuilder {
	builder.scope = scope
	builder.scopeFlag = true
	return builder
}

func (builder *CalendarAclBuilder) Build() *CalendarAcl {
	req := &CalendarAcl{}
	if builder.aclIdFlag {
		req.AclId = &builder.aclId

	}
	if builder.roleFlag {
		req.Role = &builder.role

	}
	if builder.scopeFlag {
		req.Scope = builder.scope
	}
	return req
}

type CalendarAclEvent struct {
	AclId *string `json:"acl_id,omitempty"` // acl资源ID

	Role *string `json:"role,omitempty"` // 对日历的访问权限

	Scope *AclScopeEvent `json:"scope,omitempty"` // 权限范围

	UserIdList []*UserId `json:"user_id_list,omitempty"` // 需要推送事件的用户列表
}

type CalendarAclEventBuilder struct {
	aclId     string // acl资源ID
	aclIdFlag bool

	role     string // 对日历的访问权限
	roleFlag bool

	scope     *AclScopeEvent // 权限范围
	scopeFlag bool

	userIdList     []*UserId // 需要推送事件的用户列表
	userIdListFlag bool
}

func NewCalendarAclEventBuilder() *CalendarAclEventBuilder {
	builder := &CalendarAclEventBuilder{}
	return builder
}

// acl资源ID
//
// 示例值：user_xxxxx
func (builder *CalendarAclEventBuilder) AclId(aclId string) *CalendarAclEventBuilder {
	builder.aclId = aclId
	builder.aclIdFlag = true
	return builder
}

// 对日历的访问权限
//
// 示例值：unknown
func (builder *CalendarAclEventBuilder) Role(role string) *CalendarAclEventBuilder {
	builder.role = role
	builder.roleFlag = true
	return builder
}

// 权限范围
//
// 示例值：
func (builder *CalendarAclEventBuilder) Scope(scope *AclScopeEvent) *CalendarAclEventBuilder {
	builder.scope = scope
	builder.scopeFlag = true
	return builder
}

// 需要推送事件的用户列表
//
// 示例值：
func (builder *CalendarAclEventBuilder) UserIdList(userIdList []*UserId) *CalendarAclEventBuilder {
	builder.userIdList = userIdList
	builder.userIdListFlag = true
	return builder
}

func (builder *CalendarAclEventBuilder) Build() *CalendarAclEvent {
	req := &CalendarAclEvent{}
	if builder.aclIdFlag {
		req.AclId = &builder.aclId

	}
	if builder.roleFlag {
		req.Role = &builder.role

	}
	if builder.scopeFlag {
		req.Scope = builder.scope
	}
	if builder.userIdListFlag {
		req.UserIdList = builder.userIdList
	}
	return req
}

type CalendarAttendeeResourceCustomization struct {
	IndexKey *string `json:"index_key,omitempty"` // 每个配置的唯一ID

	InputContent *string `json:"input_content,omitempty"` // 当type类型为填空时，该参数需要填入

	Options []*CustomizationOption `json:"options,omitempty"` // 每个配置的选项
}

type CalendarAttendeeResourceCustomizationBuilder struct {
	indexKey     string // 每个配置的唯一ID
	indexKeyFlag bool

	inputContent     string // 当type类型为填空时，该参数需要填入
	inputContentFlag bool

	options     []*CustomizationOption // 每个配置的选项
	optionsFlag bool
}

func NewCalendarAttendeeResourceCustomizationBuilder() *CalendarAttendeeResourceCustomizationBuilder {
	builder := &CalendarAttendeeResourceCustomizationBuilder{}
	return builder
}

// 每个配置的唯一ID
//
// 示例值：16281481596100
func (builder *CalendarAttendeeResourceCustomizationBuilder) IndexKey(indexKey string) *CalendarAttendeeResourceCustomizationBuilder {
	builder.indexKey = indexKey
	builder.indexKeyFlag = true
	return builder
}

// 当type类型为填空时，该参数需要填入
//
// 示例值：xxx
func (builder *CalendarAttendeeResourceCustomizationBuilder) InputContent(inputContent string) *CalendarAttendeeResourceCustomizationBuilder {
	builder.inputContent = inputContent
	builder.inputContentFlag = true
	return builder
}

// 每个配置的选项
//
// 示例值：无
func (builder *CalendarAttendeeResourceCustomizationBuilder) Options(options []*CustomizationOption) *CalendarAttendeeResourceCustomizationBuilder {
	builder.options = options
	builder.optionsFlag = true
	return builder
}

func (builder *CalendarAttendeeResourceCustomizationBuilder) Build() *CalendarAttendeeResourceCustomization {
	req := &CalendarAttendeeResourceCustomization{}
	if builder.indexKeyFlag {
		req.IndexKey = &builder.indexKey

	}
	if builder.inputContentFlag {
		req.InputContent = &builder.inputContent

	}
	if builder.optionsFlag {
		req.Options = builder.options
	}
	return req
}

type CalendarEvent struct {
	EventId *string `json:"event_id,omitempty"` // 日程ID。参见[日程ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/introduction)

	OrganizerCalendarId *string `json:"organizer_calendar_id,omitempty"` // 日程组织者日历ID。参见[日历ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)

	Summary *string `json:"summary,omitempty"` // 日程标题

	Description *string `json:"description,omitempty"` // 日程描述；目前不支持编辑富文本描述，如果日程描述通过客户端编辑过，更新描述会导致富文本格式丢失

	NeedNotification *bool `json:"need_notification,omitempty"` // 更新日程是否给日程参与人发送bot通知，默认为true

	StartTime *TimeInfo `json:"start_time,omitempty"` // 日程开始时间

	EndTime *TimeInfo `json:"end_time,omitempty"` // 日程结束时间

	Vchat *Vchat `json:"vchat,omitempty"` // 视频会议信息。

	Visibility *string `json:"visibility,omitempty"` // 日程公开范围，新建日程默认为Default；仅新建日程时对所有参与人生效，之后修改该属性仅对当前身份生效

	AttendeeAbility *string `json:"attendee_ability,omitempty"` // 参与人权限

	FreeBusyStatus *string `json:"free_busy_status,omitempty"` // 日程占用的忙闲状态，新建日程默认为Busy；仅新建日程时对所有参与人生效，之后修改该属性仅对当前身份生效

	Location *EventLocation `json:"location,omitempty"` // 日程地点

	Color *int `json:"color,omitempty"` // 日程颜色，颜色RGB值的int32表示。仅对当前身份生效；客户端展示时会映射到色板上最接近的一种颜色；值为0或-1时默认跟随日历颜色。

	Reminders []*Reminder `json:"reminders,omitempty"` // 日程提醒列表

	Recurrence *string `json:"recurrence,omitempty"` // 重复日程的重复性规则；参考[rfc5545](https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10)；;- 不支持COUNT和UNTIL同时出现；;- 预定会议室重复日程长度不得超过两年。

	Status *string `json:"status,omitempty"` // 日程状态

	IsException *bool `json:"is_exception,omitempty"` // 日程是否是一个重复日程的例外日程

	RecurringEventId *string `json:"recurring_event_id,omitempty"` // 例外日程的原重复日程的event_id

	CreateTime *string `json:"create_time,omitempty"` // 日程的创建时间（秒级时间戳）

	Schemas []*Schema `json:"schemas,omitempty"` // 日程自定义信息；控制日程详情页的ui展示。

	EventOrganizer *EventOrganizer `json:"event_organizer,omitempty"` // 日程组织者信息

	AppLink *string `json:"app_link,omitempty"` // 日程的app_link,跳转到具体的某个日程

	Attendees []*CalendarEventAttendee `json:"attendees,omitempty"` // 日程参与人信息

	HasMoreAttendee *bool `json:"has_more_attendee,omitempty"` // 是否有更多的参与人

	Attachments []*Attachment `json:"attachments,omitempty"` // 日程附件

	EventCheckIn *EventCheckIn `json:"event_check_in,omitempty"` // 日程签到设置，为空则不进行日程签到设置

	Source *string `json:"source,omitempty"` // 日程source
}

type CalendarEventBuilder struct {
	eventId     string // 日程ID。参见[日程ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/introduction)
	eventIdFlag bool

	organizerCalendarId     string // 日程组织者日历ID。参见[日历ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)
	organizerCalendarIdFlag bool

	summary     string // 日程标题
	summaryFlag bool

	description     string // 日程描述；目前不支持编辑富文本描述，如果日程描述通过客户端编辑过，更新描述会导致富文本格式丢失
	descriptionFlag bool

	needNotification     bool // 更新日程是否给日程参与人发送bot通知，默认为true
	needNotificationFlag bool

	startTime     *TimeInfo // 日程开始时间
	startTimeFlag bool

	endTime     *TimeInfo // 日程结束时间
	endTimeFlag bool

	vchat     *Vchat // 视频会议信息。
	vchatFlag bool

	visibility     string // 日程公开范围，新建日程默认为Default；仅新建日程时对所有参与人生效，之后修改该属性仅对当前身份生效
	visibilityFlag bool

	attendeeAbility     string // 参与人权限
	attendeeAbilityFlag bool

	freeBusyStatus     string // 日程占用的忙闲状态，新建日程默认为Busy；仅新建日程时对所有参与人生效，之后修改该属性仅对当前身份生效
	freeBusyStatusFlag bool

	location     *EventLocation // 日程地点
	locationFlag bool

	color     int // 日程颜色，颜色RGB值的int32表示。仅对当前身份生效；客户端展示时会映射到色板上最接近的一种颜色；值为0或-1时默认跟随日历颜色。
	colorFlag bool

	reminders     []*Reminder // 日程提醒列表
	remindersFlag bool

	recurrence     string // 重复日程的重复性规则；参考[rfc5545](https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10)；;- 不支持COUNT和UNTIL同时出现；;- 预定会议室重复日程长度不得超过两年。
	recurrenceFlag bool

	status     string // 日程状态
	statusFlag bool

	isException     bool // 日程是否是一个重复日程的例外日程
	isExceptionFlag bool

	recurringEventId     string // 例外日程的原重复日程的event_id
	recurringEventIdFlag bool

	createTime     string // 日程的创建时间（秒级时间戳）
	createTimeFlag bool

	schemas     []*Schema // 日程自定义信息；控制日程详情页的ui展示。
	schemasFlag bool

	eventOrganizer     *EventOrganizer // 日程组织者信息
	eventOrganizerFlag bool

	appLink     string // 日程的app_link,跳转到具体的某个日程
	appLinkFlag bool

	attendees     []*CalendarEventAttendee // 日程参与人信息
	attendeesFlag bool

	hasMoreAttendee     bool // 是否有更多的参与人
	hasMoreAttendeeFlag bool

	attachments     []*Attachment // 日程附件
	attachmentsFlag bool

	eventCheckIn     *EventCheckIn // 日程签到设置，为空则不进行日程签到设置
	eventCheckInFlag bool

	source     string // 日程source
	sourceFlag bool
}

func NewCalendarEventBuilder() *CalendarEventBuilder {
	builder := &CalendarEventBuilder{}
	return builder
}

// 日程ID。参见[日程ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/introduction)
//
// 示例值：00592a0e-7edf-4678-bc9d-1b77383ef08e_0
func (builder *CalendarEventBuilder) EventId(eventId string) *CalendarEventBuilder {
	builder.eventId = eventId
	builder.eventIdFlag = true
	return builder
}

// 日程组织者日历ID。参见[日历ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)
//
// 示例值：feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
func (builder *CalendarEventBuilder) OrganizerCalendarId(organizerCalendarId string) *CalendarEventBuilder {
	builder.organizerCalendarId = organizerCalendarId
	builder.organizerCalendarIdFlag = true
	return builder
}

// 日程标题
//
// 示例值：日程标题
func (builder *CalendarEventBuilder) Summary(summary string) *CalendarEventBuilder {
	builder.summary = summary
	builder.summaryFlag = true
	return builder
}

// 日程描述；目前不支持编辑富文本描述，如果日程描述通过客户端编辑过，更新描述会导致富文本格式丢失
//
// 示例值：日程描述
func (builder *CalendarEventBuilder) Description(description string) *CalendarEventBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 更新日程是否给日程参与人发送bot通知，默认为true
//
// 示例值：false
func (builder *CalendarEventBuilder) NeedNotification(needNotification bool) *CalendarEventBuilder {
	builder.needNotification = needNotification
	builder.needNotificationFlag = true
	return builder
}

// 日程开始时间
//
// 示例值：
func (builder *CalendarEventBuilder) StartTime(startTime *TimeInfo) *CalendarEventBuilder {
	builder.startTime = startTime
	builder.startTimeFlag = true
	return builder
}

// 日程结束时间
//
// 示例值：
func (builder *CalendarEventBuilder) EndTime(endTime *TimeInfo) *CalendarEventBuilder {
	builder.endTime = endTime
	builder.endTimeFlag = true
	return builder
}

// 视频会议信息。
//
// 示例值：
func (builder *CalendarEventBuilder) Vchat(vchat *Vchat) *CalendarEventBuilder {
	builder.vchat = vchat
	builder.vchatFlag = true
	return builder
}

// 日程公开范围，新建日程默认为Default；仅新建日程时对所有参与人生效，之后修改该属性仅对当前身份生效
//
// 示例值：default
func (builder *CalendarEventBuilder) Visibility(visibility string) *CalendarEventBuilder {
	builder.visibility = visibility
	builder.visibilityFlag = true
	return builder
}

// 参与人权限
//
// 示例值：can_see_others
func (builder *CalendarEventBuilder) AttendeeAbility(attendeeAbility string) *CalendarEventBuilder {
	builder.attendeeAbility = attendeeAbility
	builder.attendeeAbilityFlag = true
	return builder
}

// 日程占用的忙闲状态，新建日程默认为Busy；仅新建日程时对所有参与人生效，之后修改该属性仅对当前身份生效
//
// 示例值：busy
func (builder *CalendarEventBuilder) FreeBusyStatus(freeBusyStatus string) *CalendarEventBuilder {
	builder.freeBusyStatus = freeBusyStatus
	builder.freeBusyStatusFlag = true
	return builder
}

// 日程地点
//
// 示例值：
func (builder *CalendarEventBuilder) Location(location *EventLocation) *CalendarEventBuilder {
	builder.location = location
	builder.locationFlag = true
	return builder
}

// 日程颜色，颜色RGB值的int32表示。仅对当前身份生效；客户端展示时会映射到色板上最接近的一种颜色；值为0或-1时默认跟随日历颜色。
//
// 示例值：-1
func (builder *CalendarEventBuilder) Color(color int) *CalendarEventBuilder {
	builder.color = color
	builder.colorFlag = true
	return builder
}

// 日程提醒列表
//
// 示例值：
func (builder *CalendarEventBuilder) Reminders(reminders []*Reminder) *CalendarEventBuilder {
	builder.reminders = reminders
	builder.remindersFlag = true
	return builder
}

// 重复日程的重复性规则；参考[rfc5545](https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10)；;- 不支持COUNT和UNTIL同时出现；;- 预定会议室重复日程长度不得超过两年。
//
// 示例值：FREQ=DAILY;INTERVAL=1
func (builder *CalendarEventBuilder) Recurrence(recurrence string) *CalendarEventBuilder {
	builder.recurrence = recurrence
	builder.recurrenceFlag = true
	return builder
}

// 日程状态
//
// 示例值：confirmed
func (builder *CalendarEventBuilder) Status(status string) *CalendarEventBuilder {
	builder.status = status
	builder.statusFlag = true
	return builder
}

// 日程是否是一个重复日程的例外日程
//
// 示例值：false
func (builder *CalendarEventBuilder) IsException(isException bool) *CalendarEventBuilder {
	builder.isException = isException
	builder.isExceptionFlag = true
	return builder
}

// 例外日程的原重复日程的event_id
//
// 示例值：1cd45aaa-fa70-4195-80b7-c93b2e208f45
func (builder *CalendarEventBuilder) RecurringEventId(recurringEventId string) *CalendarEventBuilder {
	builder.recurringEventId = recurringEventId
	builder.recurringEventIdFlag = true
	return builder
}

// 日程的创建时间（秒级时间戳）
//
// 示例值：1602504000
func (builder *CalendarEventBuilder) CreateTime(createTime string) *CalendarEventBuilder {
	builder.createTime = createTime
	builder.createTimeFlag = true
	return builder
}

// 日程自定义信息；控制日程详情页的ui展示。
//
// 示例值：
func (builder *CalendarEventBuilder) Schemas(schemas []*Schema) *CalendarEventBuilder {
	builder.schemas = schemas
	builder.schemasFlag = true
	return builder
}

// 日程组织者信息
//
// 示例值：
func (builder *CalendarEventBuilder) EventOrganizer(eventOrganizer *EventOrganizer) *CalendarEventBuilder {
	builder.eventOrganizer = eventOrganizer
	builder.eventOrganizerFlag = true
	return builder
}

// 日程的app_link,跳转到具体的某个日程
//
// 示例值：https://applink.larkoffice.com/client/calendar/event/detail?calendarId=7039673579105026066&key=aeac9c56-aeb1-4179-a21b-02f278f59048&originalTime=0&startTime=1700496000
func (builder *CalendarEventBuilder) AppLink(appLink string) *CalendarEventBuilder {
	builder.appLink = appLink
	builder.appLinkFlag = true
	return builder
}

// 日程参与人信息
//
// 示例值：
func (builder *CalendarEventBuilder) Attendees(attendees []*CalendarEventAttendee) *CalendarEventBuilder {
	builder.attendees = attendees
	builder.attendeesFlag = true
	return builder
}

// 是否有更多的参与人
//
// 示例值：
func (builder *CalendarEventBuilder) HasMoreAttendee(hasMoreAttendee bool) *CalendarEventBuilder {
	builder.hasMoreAttendee = hasMoreAttendee
	builder.hasMoreAttendeeFlag = true
	return builder
}

// 日程附件
//
// 示例值：
func (builder *CalendarEventBuilder) Attachments(attachments []*Attachment) *CalendarEventBuilder {
	builder.attachments = attachments
	builder.attachmentsFlag = true
	return builder
}

// 日程签到设置，为空则不进行日程签到设置
//
// 示例值：
func (builder *CalendarEventBuilder) EventCheckIn(eventCheckIn *EventCheckIn) *CalendarEventBuilder {
	builder.eventCheckIn = eventCheckIn
	builder.eventCheckInFlag = true
	return builder
}

// 日程source
//
// 示例值：source
func (builder *CalendarEventBuilder) Source(source string) *CalendarEventBuilder {
	builder.source = source
	builder.sourceFlag = true
	return builder
}

func (builder *CalendarEventBuilder) Build() *CalendarEvent {
	req := &CalendarEvent{}
	if builder.eventIdFlag {
		req.EventId = &builder.eventId

	}
	if builder.organizerCalendarIdFlag {
		req.OrganizerCalendarId = &builder.organizerCalendarId

	}
	if builder.summaryFlag {
		req.Summary = &builder.summary

	}
	if builder.descriptionFlag {
		req.Description = &builder.description

	}
	if builder.needNotificationFlag {
		req.NeedNotification = &builder.needNotification

	}
	if builder.startTimeFlag {
		req.StartTime = builder.startTime
	}
	if builder.endTimeFlag {
		req.EndTime = builder.endTime
	}
	if builder.vchatFlag {
		req.Vchat = builder.vchat
	}
	if builder.visibilityFlag {
		req.Visibility = &builder.visibility

	}
	if builder.attendeeAbilityFlag {
		req.AttendeeAbility = &builder.attendeeAbility

	}
	if builder.freeBusyStatusFlag {
		req.FreeBusyStatus = &builder.freeBusyStatus

	}
	if builder.locationFlag {
		req.Location = builder.location
	}
	if builder.colorFlag {
		req.Color = &builder.color

	}
	if builder.remindersFlag {
		req.Reminders = builder.reminders
	}
	if builder.recurrenceFlag {
		req.Recurrence = &builder.recurrence

	}
	if builder.statusFlag {
		req.Status = &builder.status

	}
	if builder.isExceptionFlag {
		req.IsException = &builder.isException

	}
	if builder.recurringEventIdFlag {
		req.RecurringEventId = &builder.recurringEventId

	}
	if builder.createTimeFlag {
		req.CreateTime = &builder.createTime

	}
	if builder.schemasFlag {
		req.Schemas = builder.schemas
	}
	if builder.eventOrganizerFlag {
		req.EventOrganizer = builder.eventOrganizer
	}
	if builder.appLinkFlag {
		req.AppLink = &builder.appLink

	}
	if builder.attendeesFlag {
		req.Attendees = builder.attendees
	}
	if builder.hasMoreAttendeeFlag {
		req.HasMoreAttendee = &builder.hasMoreAttendee

	}
	if builder.attachmentsFlag {
		req.Attachments = builder.attachments
	}
	if builder.eventCheckInFlag {
		req.EventCheckIn = builder.eventCheckIn
	}
	if builder.sourceFlag {
		req.Source = &builder.source

	}
	return req
}

type CalendarEventAttendee struct {
	Type *string `json:"type,omitempty"` // 参与人类型

	AttendeeId *string `json:"attendee_id,omitempty"` // 参与人ID。参见[参与人ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee/introduction#4998889c)

	RsvpStatus *string `json:"rsvp_status,omitempty"` // 参与人RSVP状态

	IsOptional *bool `json:"is_optional,omitempty"` // 参与人是否为「可选参加」，无法编辑群参与人的此字段

	IsOrganizer *bool `json:"is_organizer,omitempty"` // 参与人是否为日程组织者

	IsExternal *bool `json:"is_external,omitempty"` // 参与人是否为外部参与人；外部参与人不支持编辑

	DisplayName *string `json:"display_name,omitempty"` // 参与人名称

	ChatMembers []*AttendeeChatMember `json:"chat_members,omitempty"` // 群中的群成员，当type为Chat时有效；群成员不支持编辑

	UserId *string `json:"user_id,omitempty"` // 参与人的用户id，依赖于user_id_type返回对应的取值，当is_external为true时，此字段只会返回open_id或者union_id，参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction)

	ChatId *string `json:"chat_id,omitempty"` // chat类型参与人的群组chat_id，参见[群ID 说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-id-description)

	RoomId *string `json:"room_id,omitempty"` // resource类型参与人的会议室room_id

	ThirdPartyEmail *string `json:"third_party_email,omitempty"` // third_party类型参与人的邮箱

	OperateId *string `json:"operate_id,omitempty"` // 如果日程是使用应用身份创建的，在添加会议室的时候，用来指定会议室的联系人，在会议室视图展示。参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction)

	ResourceCustomization []*CalendarAttendeeResourceCustomization `json:"resource_customization,omitempty"` // 会议室的个性化配置

	ApprovalReason *string `json:"approval_reason,omitempty"` // 会议室审批原因
}

type CalendarEventAttendeeBuilder struct {
	type_    string // 参与人类型
	typeFlag bool

	attendeeId     string // 参与人ID。参见[参与人ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee/introduction#4998889c)
	attendeeIdFlag bool

	rsvpStatus     string // 参与人RSVP状态
	rsvpStatusFlag bool

	isOptional     bool // 参与人是否为「可选参加」，无法编辑群参与人的此字段
	isOptionalFlag bool

	isOrganizer     bool // 参与人是否为日程组织者
	isOrganizerFlag bool

	isExternal     bool // 参与人是否为外部参与人；外部参与人不支持编辑
	isExternalFlag bool

	displayName     string // 参与人名称
	displayNameFlag bool

	chatMembers     []*AttendeeChatMember // 群中的群成员，当type为Chat时有效；群成员不支持编辑
	chatMembersFlag bool

	userId     string // 参与人的用户id，依赖于user_id_type返回对应的取值，当is_external为true时，此字段只会返回open_id或者union_id，参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction)
	userIdFlag bool

	chatId     string // chat类型参与人的群组chat_id，参见[群ID 说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-id-description)
	chatIdFlag bool

	roomId     string // resource类型参与人的会议室room_id
	roomIdFlag bool

	thirdPartyEmail     string // third_party类型参与人的邮箱
	thirdPartyEmailFlag bool

	operateId     string // 如果日程是使用应用身份创建的，在添加会议室的时候，用来指定会议室的联系人，在会议室视图展示。参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction)
	operateIdFlag bool

	resourceCustomization     []*CalendarAttendeeResourceCustomization // 会议室的个性化配置
	resourceCustomizationFlag bool

	approvalReason     string // 会议室审批原因
	approvalReasonFlag bool
}

func NewCalendarEventAttendeeBuilder() *CalendarEventAttendeeBuilder {
	builder := &CalendarEventAttendeeBuilder{}
	return builder
}

// 参与人类型
//
// 示例值：user
func (builder *CalendarEventAttendeeBuilder) Type(type_ string) *CalendarEventAttendeeBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// 参与人ID。参见[参与人ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee/introduction#4998889c)
//
// 示例值：user_xxxxxx
func (builder *CalendarEventAttendeeBuilder) AttendeeId(attendeeId string) *CalendarEventAttendeeBuilder {
	builder.attendeeId = attendeeId
	builder.attendeeIdFlag = true
	return builder
}

// 参与人RSVP状态
//
// 示例值：needs_action
func (builder *CalendarEventAttendeeBuilder) RsvpStatus(rsvpStatus string) *CalendarEventAttendeeBuilder {
	builder.rsvpStatus = rsvpStatus
	builder.rsvpStatusFlag = true
	return builder
}

// 参与人是否为「可选参加」，无法编辑群参与人的此字段
//
// 示例值：true
func (builder *CalendarEventAttendeeBuilder) IsOptional(isOptional bool) *CalendarEventAttendeeBuilder {
	builder.isOptional = isOptional
	builder.isOptionalFlag = true
	return builder
}

// 参与人是否为日程组织者
//
// 示例值：true
func (builder *CalendarEventAttendeeBuilder) IsOrganizer(isOrganizer bool) *CalendarEventAttendeeBuilder {
	builder.isOrganizer = isOrganizer
	builder.isOrganizerFlag = true
	return builder
}

// 参与人是否为外部参与人；外部参与人不支持编辑
//
// 示例值：false
func (builder *CalendarEventAttendeeBuilder) IsExternal(isExternal bool) *CalendarEventAttendeeBuilder {
	builder.isExternal = isExternal
	builder.isExternalFlag = true
	return builder
}

// 参与人名称
//
// 示例值：Zhang San
func (builder *CalendarEventAttendeeBuilder) DisplayName(displayName string) *CalendarEventAttendeeBuilder {
	builder.displayName = displayName
	builder.displayNameFlag = true
	return builder
}

// 群中的群成员，当type为Chat时有效；群成员不支持编辑
//
// 示例值：
func (builder *CalendarEventAttendeeBuilder) ChatMembers(chatMembers []*AttendeeChatMember) *CalendarEventAttendeeBuilder {
	builder.chatMembers = chatMembers
	builder.chatMembersFlag = true
	return builder
}

// 参与人的用户id，依赖于user_id_type返回对应的取值，当is_external为true时，此字段只会返回open_id或者union_id，参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction)
//
// 示例值：ou_xxxxxxxx
func (builder *CalendarEventAttendeeBuilder) UserId(userId string) *CalendarEventAttendeeBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

// chat类型参与人的群组chat_id，参见[群ID 说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-id-description)
//
// 示例值：oc_xxxxxxxxx
func (builder *CalendarEventAttendeeBuilder) ChatId(chatId string) *CalendarEventAttendeeBuilder {
	builder.chatId = chatId
	builder.chatIdFlag = true
	return builder
}

// resource类型参与人的会议室room_id
//
// 示例值：omm_xxxxxxxx
func (builder *CalendarEventAttendeeBuilder) RoomId(roomId string) *CalendarEventAttendeeBuilder {
	builder.roomId = roomId
	builder.roomIdFlag = true
	return builder
}

// third_party类型参与人的邮箱
//
// 示例值：wangwu@email.com
func (builder *CalendarEventAttendeeBuilder) ThirdPartyEmail(thirdPartyEmail string) *CalendarEventAttendeeBuilder {
	builder.thirdPartyEmail = thirdPartyEmail
	builder.thirdPartyEmailFlag = true
	return builder
}

// 如果日程是使用应用身份创建的，在添加会议室的时候，用来指定会议室的联系人，在会议室视图展示。参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction)
//
// 示例值：ou_xxxxxxxx
func (builder *CalendarEventAttendeeBuilder) OperateId(operateId string) *CalendarEventAttendeeBuilder {
	builder.operateId = operateId
	builder.operateIdFlag = true
	return builder
}

// 会议室的个性化配置
//
// 示例值：
func (builder *CalendarEventAttendeeBuilder) ResourceCustomization(resourceCustomization []*CalendarAttendeeResourceCustomization) *CalendarEventAttendeeBuilder {
	builder.resourceCustomization = resourceCustomization
	builder.resourceCustomizationFlag = true
	return builder
}

// 会议室审批原因
//
// 示例值：申请审批原因
func (builder *CalendarEventAttendeeBuilder) ApprovalReason(approvalReason string) *CalendarEventAttendeeBuilder {
	builder.approvalReason = approvalReason
	builder.approvalReasonFlag = true
	return builder
}

func (builder *CalendarEventAttendeeBuilder) Build() *CalendarEventAttendee {
	req := &CalendarEventAttendee{}
	if builder.typeFlag {
		req.Type = &builder.type_

	}
	if builder.attendeeIdFlag {
		req.AttendeeId = &builder.attendeeId

	}
	if builder.rsvpStatusFlag {
		req.RsvpStatus = &builder.rsvpStatus

	}
	if builder.isOptionalFlag {
		req.IsOptional = &builder.isOptional

	}
	if builder.isOrganizerFlag {
		req.IsOrganizer = &builder.isOrganizer

	}
	if builder.isExternalFlag {
		req.IsExternal = &builder.isExternal

	}
	if builder.displayNameFlag {
		req.DisplayName = &builder.displayName

	}
	if builder.chatMembersFlag {
		req.ChatMembers = builder.chatMembers
	}
	if builder.userIdFlag {
		req.UserId = &builder.userId

	}
	if builder.chatIdFlag {
		req.ChatId = &builder.chatId

	}
	if builder.roomIdFlag {
		req.RoomId = &builder.roomId

	}
	if builder.thirdPartyEmailFlag {
		req.ThirdPartyEmail = &builder.thirdPartyEmail

	}
	if builder.operateIdFlag {
		req.OperateId = &builder.operateId

	}
	if builder.resourceCustomizationFlag {
		req.ResourceCustomization = builder.resourceCustomization
	}
	if builder.approvalReasonFlag {
		req.ApprovalReason = &builder.approvalReason

	}
	return req
}

type CalendarEventAttendeeChatMember struct {
	RsvpStatus *string `json:"rsvp_status,omitempty"` // 参与人RSVP状态

	IsOptional *bool `json:"is_optional,omitempty"` // 参与人是否为「可选参加」

	DisplayName *string `json:"display_name,omitempty"` // 参与人名称

	OpenId *string `json:"open_id,omitempty"` // 参与人open_id，参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction);;**示例值**："ou_xxxxxxxx"

	IsOrganizer *bool `json:"is_organizer,omitempty"` // 参与人是否为日程组织者

	IsExternal *bool `json:"is_external,omitempty"` // 参与人是否为外部参与人
}

type CalendarEventAttendeeChatMemberBuilder struct {
	rsvpStatus     string // 参与人RSVP状态
	rsvpStatusFlag bool

	isOptional     bool // 参与人是否为「可选参加」
	isOptionalFlag bool

	displayName     string // 参与人名称
	displayNameFlag bool

	openId     string // 参与人open_id，参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction);;**示例值**："ou_xxxxxxxx"
	openIdFlag bool

	isOrganizer     bool // 参与人是否为日程组织者
	isOrganizerFlag bool

	isExternal     bool // 参与人是否为外部参与人
	isExternalFlag bool
}

func NewCalendarEventAttendeeChatMemberBuilder() *CalendarEventAttendeeChatMemberBuilder {
	builder := &CalendarEventAttendeeChatMemberBuilder{}
	return builder
}

// 参与人RSVP状态
//
// 示例值：needs_action
func (builder *CalendarEventAttendeeChatMemberBuilder) RsvpStatus(rsvpStatus string) *CalendarEventAttendeeChatMemberBuilder {
	builder.rsvpStatus = rsvpStatus
	builder.rsvpStatusFlag = true
	return builder
}

// 参与人是否为「可选参加」
//
// 示例值：true
func (builder *CalendarEventAttendeeChatMemberBuilder) IsOptional(isOptional bool) *CalendarEventAttendeeChatMemberBuilder {
	builder.isOptional = isOptional
	builder.isOptionalFlag = true
	return builder
}

// 参与人名称
//
// 示例值：Zhang San
func (builder *CalendarEventAttendeeChatMemberBuilder) DisplayName(displayName string) *CalendarEventAttendeeChatMemberBuilder {
	builder.displayName = displayName
	builder.displayNameFlag = true
	return builder
}

// 参与人open_id，参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction);;**示例值**："ou_xxxxxxxx"
//
// 示例值：ou_143669c5a53647f00f6c80a0253aa68b
func (builder *CalendarEventAttendeeChatMemberBuilder) OpenId(openId string) *CalendarEventAttendeeChatMemberBuilder {
	builder.openId = openId
	builder.openIdFlag = true
	return builder
}

// 参与人是否为日程组织者
//
// 示例值：true
func (builder *CalendarEventAttendeeChatMemberBuilder) IsOrganizer(isOrganizer bool) *CalendarEventAttendeeChatMemberBuilder {
	builder.isOrganizer = isOrganizer
	builder.isOrganizerFlag = true
	return builder
}

// 参与人是否为外部参与人
//
// 示例值：false
func (builder *CalendarEventAttendeeChatMemberBuilder) IsExternal(isExternal bool) *CalendarEventAttendeeChatMemberBuilder {
	builder.isExternal = isExternal
	builder.isExternalFlag = true
	return builder
}

func (builder *CalendarEventAttendeeChatMemberBuilder) Build() *CalendarEventAttendeeChatMember {
	req := &CalendarEventAttendeeChatMember{}
	if builder.rsvpStatusFlag {
		req.RsvpStatus = &builder.rsvpStatus

	}
	if builder.isOptionalFlag {
		req.IsOptional = &builder.isOptional

	}
	if builder.displayNameFlag {
		req.DisplayName = &builder.displayName

	}
	if builder.openIdFlag {
		req.OpenId = &builder.openId

	}
	if builder.isOrganizerFlag {
		req.IsOrganizer = &builder.isOrganizer

	}
	if builder.isExternalFlag {
		req.IsExternal = &builder.isExternal

	}
	return req
}

type CalendarEventAttendeeId struct {
	Type *string `json:"type,omitempty"` // 参与人类型，仅当新建参与人时可设置类型

	AttendeeId *string `json:"attendee_id,omitempty"` // 参与人ID

	UserId *string `json:"user_id,omitempty"` // 参与人的用户id，依赖于user_id_type返回对应的取值，当is_external为true时，此字段只会返回open_id或者union_id

	ChatId *string `json:"chat_id,omitempty"` // chat类型参与人的群组chat_id

	RoomId *string `json:"room_id,omitempty"` // resource类型参与人的会议室room_id

	ThirdPartyEmail *string `json:"third_party_email,omitempty"` // third_party类型参与人的邮箱
}

type CalendarEventAttendeeIdBuilder struct {
	type_    string // 参与人类型，仅当新建参与人时可设置类型
	typeFlag bool

	attendeeId     string // 参与人ID
	attendeeIdFlag bool

	userId     string // 参与人的用户id，依赖于user_id_type返回对应的取值，当is_external为true时，此字段只会返回open_id或者union_id
	userIdFlag bool

	chatId     string // chat类型参与人的群组chat_id
	chatIdFlag bool

	roomId     string // resource类型参与人的会议室room_id
	roomIdFlag bool

	thirdPartyEmail     string // third_party类型参与人的邮箱
	thirdPartyEmailFlag bool
}

func NewCalendarEventAttendeeIdBuilder() *CalendarEventAttendeeIdBuilder {
	builder := &CalendarEventAttendeeIdBuilder{}
	return builder
}

// 参与人类型，仅当新建参与人时可设置类型
//
// 示例值：user
func (builder *CalendarEventAttendeeIdBuilder) Type(type_ string) *CalendarEventAttendeeIdBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// 参与人ID
//
// 示例值：user_xxxxxx
func (builder *CalendarEventAttendeeIdBuilder) AttendeeId(attendeeId string) *CalendarEventAttendeeIdBuilder {
	builder.attendeeId = attendeeId
	builder.attendeeIdFlag = true
	return builder
}

// 参与人的用户id，依赖于user_id_type返回对应的取值，当is_external为true时，此字段只会返回open_id或者union_id
//
// 示例值：ou_xxxxxxxx
func (builder *CalendarEventAttendeeIdBuilder) UserId(userId string) *CalendarEventAttendeeIdBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

// chat类型参与人的群组chat_id
//
// 示例值：oc_xxxxxxxxx
func (builder *CalendarEventAttendeeIdBuilder) ChatId(chatId string) *CalendarEventAttendeeIdBuilder {
	builder.chatId = chatId
	builder.chatIdFlag = true
	return builder
}

// resource类型参与人的会议室room_id
//
// 示例值：omm_xxxxxxxx
func (builder *CalendarEventAttendeeIdBuilder) RoomId(roomId string) *CalendarEventAttendeeIdBuilder {
	builder.roomId = roomId
	builder.roomIdFlag = true
	return builder
}

// third_party类型参与人的邮箱
//
// 示例值：wangwu@email.com
func (builder *CalendarEventAttendeeIdBuilder) ThirdPartyEmail(thirdPartyEmail string) *CalendarEventAttendeeIdBuilder {
	builder.thirdPartyEmail = thirdPartyEmail
	builder.thirdPartyEmailFlag = true
	return builder
}

func (builder *CalendarEventAttendeeIdBuilder) Build() *CalendarEventAttendeeId {
	req := &CalendarEventAttendeeId{}
	if builder.typeFlag {
		req.Type = &builder.type_

	}
	if builder.attendeeIdFlag {
		req.AttendeeId = &builder.attendeeId

	}
	if builder.userIdFlag {
		req.UserId = &builder.userId

	}
	if builder.chatIdFlag {
		req.ChatId = &builder.chatId

	}
	if builder.roomIdFlag {
		req.RoomId = &builder.roomId

	}
	if builder.thirdPartyEmailFlag {
		req.ThirdPartyEmail = &builder.thirdPartyEmail

	}
	return req
}

type CalendarEventAttendeeResp struct {
	Type *string `json:"type,omitempty"` // 参与人类型，仅当新建参与人时可设置类型。

	AttendeeId *string `json:"attendee_id,omitempty"` // 参与人ID

	RsvpStatus *string `json:"rsvp_status,omitempty"` // 参与人RSVP状态

	IsOptional *bool `json:"is_optional,omitempty"` // 参与人是否为「可选参加」，无法编辑群参与人的此字段

	IsOrganizer *bool `json:"is_organizer,omitempty"` // 参与人是否为日程组织者

	IsExternal *bool `json:"is_external,omitempty"` // 参与人是否为外部参与人；外部参与人不支持编辑

	DisplayName *string `json:"display_name,omitempty"` // 参与人名称

	ChatMembers []*AttendeeChatMember `json:"chat_members,omitempty"` // 群中的群成员，当type为Chat时有效；群成员不支持编辑

	UserId *string `json:"user_id,omitempty"` // 参与人的用户id，依赖于user_id_type返回对应的取值，当is_external为true时，此字段只会返回open_id或者union_id

	ChatId *string `json:"chat_id,omitempty"` // chat类型参与人的群组chat_id

	RoomId *string `json:"room_id,omitempty"` // resource类型参与人的会议室room_id

	ThirdPartyEmail *string `json:"third_party_email,omitempty"` // third_party类型参与人的邮箱

	OperateId *string `json:"operate_id,omitempty"` // bot身份操作时，为预定的会议室指定实际预定人

	ResourceCustomization []*CalendarAttendeeResourceCustomization `json:"resource_customization,omitempty"` // 会议室的个性化配置
}

type CalendarEventAttendeeRespBuilder struct {
	type_    string // 参与人类型，仅当新建参与人时可设置类型。
	typeFlag bool

	attendeeId     string // 参与人ID
	attendeeIdFlag bool

	rsvpStatus     string // 参与人RSVP状态
	rsvpStatusFlag bool

	isOptional     bool // 参与人是否为「可选参加」，无法编辑群参与人的此字段
	isOptionalFlag bool

	isOrganizer     bool // 参与人是否为日程组织者
	isOrganizerFlag bool

	isExternal     bool // 参与人是否为外部参与人；外部参与人不支持编辑
	isExternalFlag bool

	displayName     string // 参与人名称
	displayNameFlag bool

	chatMembers     []*AttendeeChatMember // 群中的群成员，当type为Chat时有效；群成员不支持编辑
	chatMembersFlag bool

	userId     string // 参与人的用户id，依赖于user_id_type返回对应的取值，当is_external为true时，此字段只会返回open_id或者union_id
	userIdFlag bool

	chatId     string // chat类型参与人的群组chat_id
	chatIdFlag bool

	roomId     string // resource类型参与人的会议室room_id
	roomIdFlag bool

	thirdPartyEmail     string // third_party类型参与人的邮箱
	thirdPartyEmailFlag bool

	operateId     string // bot身份操作时，为预定的会议室指定实际预定人
	operateIdFlag bool

	resourceCustomization     []*CalendarAttendeeResourceCustomization // 会议室的个性化配置
	resourceCustomizationFlag bool
}

func NewCalendarEventAttendeeRespBuilder() *CalendarEventAttendeeRespBuilder {
	builder := &CalendarEventAttendeeRespBuilder{}
	return builder
}

// 参与人类型，仅当新建参与人时可设置类型。
//
// 示例值：
func (builder *CalendarEventAttendeeRespBuilder) Type(type_ string) *CalendarEventAttendeeRespBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// 参与人ID
//
// 示例值：ou_xxxxx
func (builder *CalendarEventAttendeeRespBuilder) AttendeeId(attendeeId string) *CalendarEventAttendeeRespBuilder {
	builder.attendeeId = attendeeId
	builder.attendeeIdFlag = true
	return builder
}

// 参与人RSVP状态
//
// 示例值：
func (builder *CalendarEventAttendeeRespBuilder) RsvpStatus(rsvpStatus string) *CalendarEventAttendeeRespBuilder {
	builder.rsvpStatus = rsvpStatus
	builder.rsvpStatusFlag = true
	return builder
}

// 参与人是否为「可选参加」，无法编辑群参与人的此字段
//
// 示例值：false
func (builder *CalendarEventAttendeeRespBuilder) IsOptional(isOptional bool) *CalendarEventAttendeeRespBuilder {
	builder.isOptional = isOptional
	builder.isOptionalFlag = true
	return builder
}

// 参与人是否为日程组织者
//
// 示例值：false
func (builder *CalendarEventAttendeeRespBuilder) IsOrganizer(isOrganizer bool) *CalendarEventAttendeeRespBuilder {
	builder.isOrganizer = isOrganizer
	builder.isOrganizerFlag = true
	return builder
}

// 参与人是否为外部参与人；外部参与人不支持编辑
//
// 示例值：
func (builder *CalendarEventAttendeeRespBuilder) IsExternal(isExternal bool) *CalendarEventAttendeeRespBuilder {
	builder.isExternal = isExternal
	builder.isExternalFlag = true
	return builder
}

// 参与人名称
//
// 示例值：lijian
func (builder *CalendarEventAttendeeRespBuilder) DisplayName(displayName string) *CalendarEventAttendeeRespBuilder {
	builder.displayName = displayName
	builder.displayNameFlag = true
	return builder
}

// 群中的群成员，当type为Chat时有效；群成员不支持编辑
//
// 示例值：
func (builder *CalendarEventAttendeeRespBuilder) ChatMembers(chatMembers []*AttendeeChatMember) *CalendarEventAttendeeRespBuilder {
	builder.chatMembers = chatMembers
	builder.chatMembersFlag = true
	return builder
}

// 参与人的用户id，依赖于user_id_type返回对应的取值，当is_external为true时，此字段只会返回open_id或者union_id
//
// 示例值：ou_xxxxxxxx
func (builder *CalendarEventAttendeeRespBuilder) UserId(userId string) *CalendarEventAttendeeRespBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

// chat类型参与人的群组chat_id
//
// 示例值：oc_xxxxxxxxx
func (builder *CalendarEventAttendeeRespBuilder) ChatId(chatId string) *CalendarEventAttendeeRespBuilder {
	builder.chatId = chatId
	builder.chatIdFlag = true
	return builder
}

// resource类型参与人的会议室room_id
//
// 示例值：omm_xxxxxxxx
func (builder *CalendarEventAttendeeRespBuilder) RoomId(roomId string) *CalendarEventAttendeeRespBuilder {
	builder.roomId = roomId
	builder.roomIdFlag = true
	return builder
}

// third_party类型参与人的邮箱
//
// 示例值：wangwu@email.com
func (builder *CalendarEventAttendeeRespBuilder) ThirdPartyEmail(thirdPartyEmail string) *CalendarEventAttendeeRespBuilder {
	builder.thirdPartyEmail = thirdPartyEmail
	builder.thirdPartyEmailFlag = true
	return builder
}

// bot身份操作时，为预定的会议室指定实际预定人
//
// 示例值：ou_xxxxxxxx
func (builder *CalendarEventAttendeeRespBuilder) OperateId(operateId string) *CalendarEventAttendeeRespBuilder {
	builder.operateId = operateId
	builder.operateIdFlag = true
	return builder
}

// 会议室的个性化配置
//
// 示例值：
func (builder *CalendarEventAttendeeRespBuilder) ResourceCustomization(resourceCustomization []*CalendarAttendeeResourceCustomization) *CalendarEventAttendeeRespBuilder {
	builder.resourceCustomization = resourceCustomization
	builder.resourceCustomizationFlag = true
	return builder
}

func (builder *CalendarEventAttendeeRespBuilder) Build() *CalendarEventAttendeeResp {
	req := &CalendarEventAttendeeResp{}
	if builder.typeFlag {
		req.Type = &builder.type_

	}
	if builder.attendeeIdFlag {
		req.AttendeeId = &builder.attendeeId

	}
	if builder.rsvpStatusFlag {
		req.RsvpStatus = &builder.rsvpStatus

	}
	if builder.isOptionalFlag {
		req.IsOptional = &builder.isOptional

	}
	if builder.isOrganizerFlag {
		req.IsOrganizer = &builder.isOrganizer

	}
	if builder.isExternalFlag {
		req.IsExternal = &builder.isExternal

	}
	if builder.displayNameFlag {
		req.DisplayName = &builder.displayName

	}
	if builder.chatMembersFlag {
		req.ChatMembers = builder.chatMembers
	}
	if builder.userIdFlag {
		req.UserId = &builder.userId

	}
	if builder.chatIdFlag {
		req.ChatId = &builder.chatId

	}
	if builder.roomIdFlag {
		req.RoomId = &builder.roomId

	}
	if builder.thirdPartyEmailFlag {
		req.ThirdPartyEmail = &builder.thirdPartyEmail

	}
	if builder.operateIdFlag {
		req.OperateId = &builder.operateId

	}
	if builder.resourceCustomizationFlag {
		req.ResourceCustomization = builder.resourceCustomization
	}
	return req
}

type CalendarEventResp struct {
	EventId *string `json:"event_id,omitempty"` // 日程ID

	OrganizerCalendarId *string `json:"organizer_calendar_id,omitempty"` // 日程组织者日历ID

	Summary *string `json:"summary,omitempty"` // 日程标题

	Description *string `json:"description,omitempty"` // 日程描述

	NeedNotification *bool `json:"need_notification,omitempty"` // 是否发送通知消息

	StartTime *TimeInfo `json:"start_time,omitempty"` // 日程开始时间

	EndTime *TimeInfo `json:"end_time,omitempty"` // 日程结束时间

	Vchat *Vchat `json:"vchat,omitempty"` // 视频会议信息，仅当日程至少有一位attendee时生效

	Visibility *string `json:"visibility,omitempty"` // 日程公开范围，新建日程默认为Default；仅新建日程时对所有参与人生效，之后修改该属性仅对当前身份生效

	AttendeeAbility *string `json:"attendee_ability,omitempty"` // 参与人权限

	FreeBusyStatus *string `json:"free_busy_status,omitempty"` // 日程占用的忙闲状态，新建日程默认为Busy；仅新建日程时对所有参与人生效，之后修改该属性仅对当前身份生效

	Location *EventLocation `json:"location,omitempty"` // 日程地点

	Color *int `json:"color,omitempty"` // 日程颜色，颜色RGB值的int32表示。仅对当前身份生效；客户端展示时会映射到色板上最接近的一种颜色；值为0或-1时默认跟随日历颜色。

	Reminders []*Reminder `json:"reminders,omitempty"` // 日程提醒列表

	Recurrence *string `json:"recurrence,omitempty"` // 重复日程的重复性规则

	Status *string `json:"status,omitempty"` // 日程状态

	IsException *bool `json:"is_exception,omitempty"` // 日程是否是一个重复日程的例外日程

	RecurringEventId *string `json:"recurring_event_id,omitempty"` // 例外日程的原重复日程的event_id

	CreateTime *string `json:"create_time,omitempty"` // 日程的创建时间戳

	Schemas []*Schema `json:"schemas,omitempty"` // 日程自定义信息
}

type CalendarEventRespBuilder struct {
	eventId     string // 日程ID
	eventIdFlag bool

	organizerCalendarId     string // 日程组织者日历ID
	organizerCalendarIdFlag bool

	summary     string // 日程标题
	summaryFlag bool

	description     string // 日程描述
	descriptionFlag bool

	needNotification     bool // 是否发送通知消息
	needNotificationFlag bool

	startTime     *TimeInfo // 日程开始时间
	startTimeFlag bool

	endTime     *TimeInfo // 日程结束时间
	endTimeFlag bool

	vchat     *Vchat // 视频会议信息，仅当日程至少有一位attendee时生效
	vchatFlag bool

	visibility     string // 日程公开范围，新建日程默认为Default；仅新建日程时对所有参与人生效，之后修改该属性仅对当前身份生效
	visibilityFlag bool

	attendeeAbility     string // 参与人权限
	attendeeAbilityFlag bool

	freeBusyStatus     string // 日程占用的忙闲状态，新建日程默认为Busy；仅新建日程时对所有参与人生效，之后修改该属性仅对当前身份生效
	freeBusyStatusFlag bool

	location     *EventLocation // 日程地点
	locationFlag bool

	color     int // 日程颜色，颜色RGB值的int32表示。仅对当前身份生效；客户端展示时会映射到色板上最接近的一种颜色；值为0或-1时默认跟随日历颜色。
	colorFlag bool

	reminders     []*Reminder // 日程提醒列表
	remindersFlag bool

	recurrence     string // 重复日程的重复性规则
	recurrenceFlag bool

	status     string // 日程状态
	statusFlag bool

	isException     bool // 日程是否是一个重复日程的例外日程
	isExceptionFlag bool

	recurringEventId     string // 例外日程的原重复日程的event_id
	recurringEventIdFlag bool

	createTime     string // 日程的创建时间戳
	createTimeFlag bool

	schemas     []*Schema // 日程自定义信息
	schemasFlag bool
}

func NewCalendarEventRespBuilder() *CalendarEventRespBuilder {
	builder := &CalendarEventRespBuilder{}
	return builder
}

// 日程ID
//
// 示例值：75d28f9b-e35c-4230-8a83-4a661497db54_0
func (builder *CalendarEventRespBuilder) EventId(eventId string) *CalendarEventRespBuilder {
	builder.eventId = eventId
	builder.eventIdFlag = true
	return builder
}

// 日程组织者日历ID
//
// 示例值：feishu.cn_HF9U2MbibE8PPpjro6xjqa@group.calendar.feishu.cn
func (builder *CalendarEventRespBuilder) OrganizerCalendarId(organizerCalendarId string) *CalendarEventRespBuilder {
	builder.organizerCalendarId = organizerCalendarId
	builder.organizerCalendarIdFlag = true
	return builder
}

// 日程标题
//
// 示例值：日程主题
func (builder *CalendarEventRespBuilder) Summary(summary string) *CalendarEventRespBuilder {
	builder.summary = summary
	builder.summaryFlag = true
	return builder
}

// 日程描述
//
// 示例值：日程描述
func (builder *CalendarEventRespBuilder) Description(description string) *CalendarEventRespBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 是否发送通知消息
//
// 示例值：true
func (builder *CalendarEventRespBuilder) NeedNotification(needNotification bool) *CalendarEventRespBuilder {
	builder.needNotification = needNotification
	builder.needNotificationFlag = true
	return builder
}

// 日程开始时间
//
// 示例值：
func (builder *CalendarEventRespBuilder) StartTime(startTime *TimeInfo) *CalendarEventRespBuilder {
	builder.startTime = startTime
	builder.startTimeFlag = true
	return builder
}

// 日程结束时间
//
// 示例值：
func (builder *CalendarEventRespBuilder) EndTime(endTime *TimeInfo) *CalendarEventRespBuilder {
	builder.endTime = endTime
	builder.endTimeFlag = true
	return builder
}

// 视频会议信息，仅当日程至少有一位attendee时生效
//
// 示例值：
func (builder *CalendarEventRespBuilder) Vchat(vchat *Vchat) *CalendarEventRespBuilder {
	builder.vchat = vchat
	builder.vchatFlag = true
	return builder
}

// 日程公开范围，新建日程默认为Default；仅新建日程时对所有参与人生效，之后修改该属性仅对当前身份生效
//
// 示例值：
func (builder *CalendarEventRespBuilder) Visibility(visibility string) *CalendarEventRespBuilder {
	builder.visibility = visibility
	builder.visibilityFlag = true
	return builder
}

// 参与人权限
//
// 示例值：
func (builder *CalendarEventRespBuilder) AttendeeAbility(attendeeAbility string) *CalendarEventRespBuilder {
	builder.attendeeAbility = attendeeAbility
	builder.attendeeAbilityFlag = true
	return builder
}

// 日程占用的忙闲状态，新建日程默认为Busy；仅新建日程时对所有参与人生效，之后修改该属性仅对当前身份生效
//
// 示例值：
func (builder *CalendarEventRespBuilder) FreeBusyStatus(freeBusyStatus string) *CalendarEventRespBuilder {
	builder.freeBusyStatus = freeBusyStatus
	builder.freeBusyStatusFlag = true
	return builder
}

// 日程地点
//
// 示例值：
func (builder *CalendarEventRespBuilder) Location(location *EventLocation) *CalendarEventRespBuilder {
	builder.location = location
	builder.locationFlag = true
	return builder
}

// 日程颜色，颜色RGB值的int32表示。仅对当前身份生效；客户端展示时会映射到色板上最接近的一种颜色；值为0或-1时默认跟随日历颜色。
//
// 示例值：-1
func (builder *CalendarEventRespBuilder) Color(color int) *CalendarEventRespBuilder {
	builder.color = color
	builder.colorFlag = true
	return builder
}

// 日程提醒列表
//
// 示例值：
func (builder *CalendarEventRespBuilder) Reminders(reminders []*Reminder) *CalendarEventRespBuilder {
	builder.reminders = reminders
	builder.remindersFlag = true
	return builder
}

// 重复日程的重复性规则
//
// 示例值：FREQ=DAILY;INTERVAL=1
func (builder *CalendarEventRespBuilder) Recurrence(recurrence string) *CalendarEventRespBuilder {
	builder.recurrence = recurrence
	builder.recurrenceFlag = true
	return builder
}

// 日程状态
//
// 示例值：
func (builder *CalendarEventRespBuilder) Status(status string) *CalendarEventRespBuilder {
	builder.status = status
	builder.statusFlag = true
	return builder
}

// 日程是否是一个重复日程的例外日程
//
// 示例值：true
func (builder *CalendarEventRespBuilder) IsException(isException bool) *CalendarEventRespBuilder {
	builder.isException = isException
	builder.isExceptionFlag = true
	return builder
}

// 例外日程的原重复日程的event_id
//
// 示例值：75d28f9b-e35c-4230-8a83-4a661497db54_0
func (builder *CalendarEventRespBuilder) RecurringEventId(recurringEventId string) *CalendarEventRespBuilder {
	builder.recurringEventId = recurringEventId
	builder.recurringEventIdFlag = true
	return builder
}

// 日程的创建时间戳
//
// 示例值：1682585100
func (builder *CalendarEventRespBuilder) CreateTime(createTime string) *CalendarEventRespBuilder {
	builder.createTime = createTime
	builder.createTimeFlag = true
	return builder
}

// 日程自定义信息
//
// 示例值：
func (builder *CalendarEventRespBuilder) Schemas(schemas []*Schema) *CalendarEventRespBuilder {
	builder.schemas = schemas
	builder.schemasFlag = true
	return builder
}

func (builder *CalendarEventRespBuilder) Build() *CalendarEventResp {
	req := &CalendarEventResp{}
	if builder.eventIdFlag {
		req.EventId = &builder.eventId

	}
	if builder.organizerCalendarIdFlag {
		req.OrganizerCalendarId = &builder.organizerCalendarId

	}
	if builder.summaryFlag {
		req.Summary = &builder.summary

	}
	if builder.descriptionFlag {
		req.Description = &builder.description

	}
	if builder.needNotificationFlag {
		req.NeedNotification = &builder.needNotification

	}
	if builder.startTimeFlag {
		req.StartTime = builder.startTime
	}
	if builder.endTimeFlag {
		req.EndTime = builder.endTime
	}
	if builder.vchatFlag {
		req.Vchat = builder.vchat
	}
	if builder.visibilityFlag {
		req.Visibility = &builder.visibility

	}
	if builder.attendeeAbilityFlag {
		req.AttendeeAbility = &builder.attendeeAbility

	}
	if builder.freeBusyStatusFlag {
		req.FreeBusyStatus = &builder.freeBusyStatus

	}
	if builder.locationFlag {
		req.Location = builder.location
	}
	if builder.colorFlag {
		req.Color = &builder.color

	}
	if builder.remindersFlag {
		req.Reminders = builder.reminders
	}
	if builder.recurrenceFlag {
		req.Recurrence = &builder.recurrence

	}
	if builder.statusFlag {
		req.Status = &builder.status

	}
	if builder.isExceptionFlag {
		req.IsException = &builder.isException

	}
	if builder.recurringEventIdFlag {
		req.RecurringEventId = &builder.recurringEventId

	}
	if builder.createTimeFlag {
		req.CreateTime = &builder.createTime

	}
	if builder.schemasFlag {
		req.Schemas = builder.schemas
	}
	return req
}

type CalendarFreebusy struct {
	StartTime *string `json:"start_time,omitempty"` // 忙闲信息开始时间，RFC3339 date_time格式

	EndTime *string `json:"end_time,omitempty"` // 忙闲信息结束时间，RFC3339 date_time格式

	CalendarId *string `json:"calendar_id,omitempty"` // 日历id
}

type CalendarFreebusyBuilder struct {
	startTime     string // 忙闲信息开始时间，RFC3339 date_time格式
	startTimeFlag bool

	endTime     string // 忙闲信息结束时间，RFC3339 date_time格式
	endTimeFlag bool

	calendarId     string // 日历id
	calendarIdFlag bool
}

func NewCalendarFreebusyBuilder() *CalendarFreebusyBuilder {
	builder := &CalendarFreebusyBuilder{}
	return builder
}

// 忙闲信息开始时间，RFC3339 date_time格式
//
// 示例值：2020-10-28T22:30:00+08:00
func (builder *CalendarFreebusyBuilder) StartTime(startTime string) *CalendarFreebusyBuilder {
	builder.startTime = startTime
	builder.startTimeFlag = true
	return builder
}

// 忙闲信息结束时间，RFC3339 date_time格式
//
// 示例值：2020-10-28T22:30:00+08:00
func (builder *CalendarFreebusyBuilder) EndTime(endTime string) *CalendarFreebusyBuilder {
	builder.endTime = endTime
	builder.endTimeFlag = true
	return builder
}

// 日历id
//
// 示例值：feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
func (builder *CalendarFreebusyBuilder) CalendarId(calendarId string) *CalendarFreebusyBuilder {
	builder.calendarId = calendarId
	builder.calendarIdFlag = true
	return builder
}

func (builder *CalendarFreebusyBuilder) Build() *CalendarFreebusy {
	req := &CalendarFreebusy{}
	if builder.startTimeFlag {
		req.StartTime = &builder.startTime

	}
	if builder.endTimeFlag {
		req.EndTime = &builder.endTime

	}
	if builder.calendarIdFlag {
		req.CalendarId = &builder.calendarId

	}
	return req
}

type CalendarFreebusyError struct {
	CalendarId *string `json:"calendar_id,omitempty"` // 日历id

	ErrorMsg *string `json:"error_msg,omitempty"` // 错误信息
}

type CalendarFreebusyErrorBuilder struct {
	calendarId     string // 日历id
	calendarIdFlag bool

	errorMsg     string // 错误信息
	errorMsgFlag bool
}

func NewCalendarFreebusyErrorBuilder() *CalendarFreebusyErrorBuilder {
	builder := &CalendarFreebusyErrorBuilder{}
	return builder
}

// 日历id
//
// 示例值：feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
func (builder *CalendarFreebusyErrorBuilder) CalendarId(calendarId string) *CalendarFreebusyErrorBuilder {
	builder.calendarId = calendarId
	builder.calendarIdFlag = true
	return builder
}

// 错误信息
//
// 示例值：xxx
func (builder *CalendarFreebusyErrorBuilder) ErrorMsg(errorMsg string) *CalendarFreebusyErrorBuilder {
	builder.errorMsg = errorMsg
	builder.errorMsgFlag = true
	return builder
}

func (builder *CalendarFreebusyErrorBuilder) Build() *CalendarFreebusyError {
	req := &CalendarFreebusyError{}
	if builder.calendarIdFlag {
		req.CalendarId = &builder.calendarId

	}
	if builder.errorMsgFlag {
		req.ErrorMsg = &builder.errorMsg

	}
	return req
}

type CalendarPrimaryBatchReq struct {
	UserIds []string `json:"user_ids,omitempty"` // 用户ID列表
}

type CalendarPrimaryBatchReqBuilder struct {
	userIds     []string // 用户ID列表
	userIdsFlag bool
}

func NewCalendarPrimaryBatchReqBuilder() *CalendarPrimaryBatchReqBuilder {
	builder := &CalendarPrimaryBatchReqBuilder{}
	return builder
}

// 用户ID列表
//
// 示例值：
func (builder *CalendarPrimaryBatchReqBuilder) UserIds(userIds []string) *CalendarPrimaryBatchReqBuilder {
	builder.userIds = userIds
	builder.userIdsFlag = true
	return builder
}

func (builder *CalendarPrimaryBatchReqBuilder) Build() *CalendarPrimaryBatchReq {
	req := &CalendarPrimaryBatchReq{}
	if builder.userIdsFlag {
		req.UserIds = builder.userIds
	}
	return req
}

type CalendarUnderstandExtra struct {
	AiTaskId *string `json:"ai_task_id,omitempty"` // ai任务唯一标识

	EventUid *string `json:"event_uid,omitempty"` // 日程uid

	OriginTime *string `json:"origin_time,omitempty"` // 日程origin_time
}

type CalendarUnderstandExtraBuilder struct {
	aiTaskId     string // ai任务唯一标识
	aiTaskIdFlag bool

	eventUid     string // 日程uid
	eventUidFlag bool

	originTime     string // 日程origin_time
	originTimeFlag bool
}

func NewCalendarUnderstandExtraBuilder() *CalendarUnderstandExtraBuilder {
	builder := &CalendarUnderstandExtraBuilder{}
	return builder
}

// ai任务唯一标识
//
// 示例值：none
func (builder *CalendarUnderstandExtraBuilder) AiTaskId(aiTaskId string) *CalendarUnderstandExtraBuilder {
	builder.aiTaskId = aiTaskId
	builder.aiTaskIdFlag = true
	return builder
}

// 日程uid
//
// 示例值：b60bbd53-a52c-45a5-940a-1987de6a000f
func (builder *CalendarUnderstandExtraBuilder) EventUid(eventUid string) *CalendarUnderstandExtraBuilder {
	builder.eventUid = eventUid
	builder.eventUidFlag = true
	return builder
}

// 日程origin_time
//
// 示例值：1695355200
func (builder *CalendarUnderstandExtraBuilder) OriginTime(originTime string) *CalendarUnderstandExtraBuilder {
	builder.originTime = originTime
	builder.originTimeFlag = true
	return builder
}

func (builder *CalendarUnderstandExtraBuilder) Build() *CalendarUnderstandExtra {
	req := &CalendarUnderstandExtra{}
	if builder.aiTaskIdFlag {
		req.AiTaskId = &builder.aiTaskId

	}
	if builder.eventUidFlag {
		req.EventUid = &builder.eventUid

	}
	if builder.originTimeFlag {
		req.OriginTime = &builder.originTime

	}
	return req
}

type CalendarUnderstandScenarioContext struct {
	Scenario *string `json:"scenario,omitempty"` // 会话所处的业务场景

	WorkMode *int `json:"work_mode,omitempty"` // 会话所处的业务模式

	Extra *CalendarUnderstandExtra `json:"extra,omitempty"` // 透传数据

	SystemInfo *SystemInfo `json:"system_info,omitempty"` // 系统信息
}

type CalendarUnderstandScenarioContextBuilder struct {
	scenario     string // 会话所处的业务场景
	scenarioFlag bool

	workMode     int // 会话所处的业务模式
	workModeFlag bool

	extra     *CalendarUnderstandExtra // 透传数据
	extraFlag bool

	systemInfo     *SystemInfo // 系统信息
	systemInfoFlag bool
}

func NewCalendarUnderstandScenarioContextBuilder() *CalendarUnderstandScenarioContextBuilder {
	builder := &CalendarUnderstandScenarioContextBuilder{}
	return builder
}

// 会话所处的业务场景
//
// 示例值：IM
func (builder *CalendarUnderstandScenarioContextBuilder) Scenario(scenario string) *CalendarUnderstandScenarioContextBuilder {
	builder.scenario = scenario
	builder.scenarioFlag = true
	return builder
}

// 会话所处的业务模式
//
// 示例值：1
func (builder *CalendarUnderstandScenarioContextBuilder) WorkMode(workMode int) *CalendarUnderstandScenarioContextBuilder {
	builder.workMode = workMode
	builder.workModeFlag = true
	return builder
}

// 透传数据
//
// 示例值：
func (builder *CalendarUnderstandScenarioContextBuilder) Extra(extra *CalendarUnderstandExtra) *CalendarUnderstandScenarioContextBuilder {
	builder.extra = extra
	builder.extraFlag = true
	return builder
}

// 系统信息
//
// 示例值：
func (builder *CalendarUnderstandScenarioContextBuilder) SystemInfo(systemInfo *SystemInfo) *CalendarUnderstandScenarioContextBuilder {
	builder.systemInfo = systemInfo
	builder.systemInfoFlag = true
	return builder
}

func (builder *CalendarUnderstandScenarioContextBuilder) Build() *CalendarUnderstandScenarioContext {
	req := &CalendarUnderstandScenarioContext{}
	if builder.scenarioFlag {
		req.Scenario = &builder.scenario

	}
	if builder.workModeFlag {
		req.WorkMode = &builder.workMode

	}
	if builder.extraFlag {
		req.Extra = builder.extra
	}
	if builder.systemInfoFlag {
		req.SystemInfo = builder.systemInfo
	}
	return req
}

type CardCallback struct {
	MessageId *string `json:"message_id,omitempty"` // 卡片的消息ID

	Status *MyaiCardStatus `json:"status,omitempty"` // 卡片状态

	CallbackInfo *string `json:"callback_info,omitempty"` // 业务定义的回调数据，json格式
}

type CardCallbackBuilder struct {
	messageId     string // 卡片的消息ID
	messageIdFlag bool

	status     *MyaiCardStatus // 卡片状态
	statusFlag bool

	callbackInfo     string // 业务定义的回调数据，json格式
	callbackInfoFlag bool
}

func NewCardCallbackBuilder() *CardCallbackBuilder {
	builder := &CardCallbackBuilder{}
	return builder
}

// 卡片的消息ID
//
// 示例值：om_dc13264520392913993dd051dba21dcf
func (builder *CardCallbackBuilder) MessageId(messageId string) *CardCallbackBuilder {
	builder.messageId = messageId
	builder.messageIdFlag = true
	return builder
}

// 卡片状态
//
// 示例值：
func (builder *CardCallbackBuilder) Status(status *MyaiCardStatus) *CardCallbackBuilder {
	builder.status = status
	builder.statusFlag = true
	return builder
}

// 业务定义的回调数据，json格式
//
// 示例值：无
func (builder *CardCallbackBuilder) CallbackInfo(callbackInfo string) *CardCallbackBuilder {
	builder.callbackInfo = callbackInfo
	builder.callbackInfoFlag = true
	return builder
}

func (builder *CardCallbackBuilder) Build() *CardCallback {
	req := &CardCallback{}
	if builder.messageIdFlag {
		req.MessageId = &builder.messageId

	}
	if builder.statusFlag {
		req.Status = builder.status
	}
	if builder.callbackInfoFlag {
		req.CallbackInfo = &builder.callbackInfo

	}
	return req
}

type CardPresent struct {
	Body *string `json:"body,omitempty"` // 卡片json内容

	Interactable *bool `json:"interactable,omitempty"` // 是否为交互卡片

	Type *string `json:"type,omitempty"` // 卡片类型

	OperationType *string `json:"operation_type,omitempty"` // 操作类型

	CallbackInfo *string `json:"callback_info,omitempty"` // 业务定义的卡片回调信息
}

type CardPresentBuilder struct {
	body     string // 卡片json内容
	bodyFlag bool

	interactable     bool // 是否为交互卡片
	interactableFlag bool

	type_    string // 卡片类型
	typeFlag bool

	operationType     string // 操作类型
	operationTypeFlag bool

	callbackInfo     string // 业务定义的卡片回调信息
	callbackInfoFlag bool
}

func NewCardPresentBuilder() *CardPresentBuilder {
	builder := &CardPresentBuilder{}
	return builder
}

// 卡片json内容
//
// 示例值：无
func (builder *CardPresentBuilder) Body(body string) *CardPresentBuilder {
	builder.body = body
	builder.bodyFlag = true
	return builder
}

// 是否为交互卡片
//
// 示例值：true
func (builder *CardPresentBuilder) Interactable(interactable bool) *CardPresentBuilder {
	builder.interactable = interactable
	builder.interactableFlag = true
	return builder
}

// 卡片类型
//
// 示例值：14
func (builder *CardPresentBuilder) Type(type_ string) *CardPresentBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// 操作类型
//
// 示例值：UPDATE
func (builder *CardPresentBuilder) OperationType(operationType string) *CardPresentBuilder {
	builder.operationType = operationType
	builder.operationTypeFlag = true
	return builder
}

// 业务定义的卡片回调信息
//
// 示例值：无
func (builder *CardPresentBuilder) CallbackInfo(callbackInfo string) *CardPresentBuilder {
	builder.callbackInfo = callbackInfo
	builder.callbackInfoFlag = true
	return builder
}

func (builder *CardPresentBuilder) Build() *CardPresent {
	req := &CardPresent{}
	if builder.bodyFlag {
		req.Body = &builder.body

	}
	if builder.interactableFlag {
		req.Interactable = &builder.interactable

	}
	if builder.typeFlag {
		req.Type = &builder.type_

	}
	if builder.operationTypeFlag {
		req.OperationType = &builder.operationType

	}
	if builder.callbackInfoFlag {
		req.CallbackInfo = &builder.callbackInfo

	}
	return req
}

type CheckInTime struct {
	TimeType *string `json:"time_type,omitempty"` // (分钟)偏移量相对于的日程时间节点类型

	Duration *int `json:"duration,omitempty"` // 相对于日程开始或者结束的偏移量(分钟)
}

type CheckInTimeBuilder struct {
	timeType     string // (分钟)偏移量相对于的日程时间节点类型
	timeTypeFlag bool

	duration     int // 相对于日程开始或者结束的偏移量(分钟)
	durationFlag bool
}

func NewCheckInTimeBuilder() *CheckInTimeBuilder {
	builder := &CheckInTimeBuilder{}
	return builder
}

// (分钟)偏移量相对于的日程时间节点类型
//
// 示例值：
func (builder *CheckInTimeBuilder) TimeType(timeType string) *CheckInTimeBuilder {
	builder.timeType = timeType
	builder.timeTypeFlag = true
	return builder
}

// 相对于日程开始或者结束的偏移量(分钟)
//
// 示例值：15
func (builder *CheckInTimeBuilder) Duration(duration int) *CheckInTimeBuilder {
	builder.duration = duration
	builder.durationFlag = true
	return builder
}

func (builder *CheckInTimeBuilder) Build() *CheckInTime {
	req := &CheckInTime{}
	if builder.timeTypeFlag {
		req.TimeType = &builder.timeType

	}
	if builder.durationFlag {
		req.Duration = &builder.duration

	}
	return req
}

type CustomizationOption struct {
	OptionKey *string `json:"option_key,omitempty"` // 每个选项的唯一ID

	OthersContent *string `json:"others_content,omitempty"` // 当type类型为其它选项时，该参数需要填入
}

type CustomizationOptionBuilder struct {
	optionKey     string // 每个选项的唯一ID
	optionKeyFlag bool

	othersContent     string // 当type类型为其它选项时，该参数需要填入
	othersContentFlag bool
}

func NewCustomizationOptionBuilder() *CustomizationOptionBuilder {
	builder := &CustomizationOptionBuilder{}
	return builder
}

// 每个选项的唯一ID
//
// 示例值：16281481596185
func (builder *CustomizationOptionBuilder) OptionKey(optionKey string) *CustomizationOptionBuilder {
	builder.optionKey = optionKey
	builder.optionKeyFlag = true
	return builder
}

// 当type类型为其它选项时，该参数需要填入
//
// 示例值：xxx
func (builder *CustomizationOptionBuilder) OthersContent(othersContent string) *CustomizationOptionBuilder {
	builder.othersContent = othersContent
	builder.othersContentFlag = true
	return builder
}

func (builder *CustomizationOptionBuilder) Build() *CustomizationOption {
	req := &CustomizationOption{}
	if builder.optionKeyFlag {
		req.OptionKey = &builder.optionKey

	}
	if builder.othersContentFlag {
		req.OthersContent = &builder.othersContent

	}
	return req
}

type DepartmentId struct {
	DepartmentId *string `json:"department_id,omitempty"` //

	OpenDepartmentId *string `json:"open_department_id,omitempty"` //
}

type DepartmentIdBuilder struct {
	departmentId     string //
	departmentIdFlag bool

	openDepartmentId     string //
	openDepartmentIdFlag bool
}

func NewDepartmentIdBuilder() *DepartmentIdBuilder {
	builder := &DepartmentIdBuilder{}
	return builder
}

//
//
// 示例值：
func (builder *DepartmentIdBuilder) DepartmentId(departmentId string) *DepartmentIdBuilder {
	builder.departmentId = departmentId
	builder.departmentIdFlag = true
	return builder
}

//
//
// 示例值：
func (builder *DepartmentIdBuilder) OpenDepartmentId(openDepartmentId string) *DepartmentIdBuilder {
	builder.openDepartmentId = openDepartmentId
	builder.openDepartmentIdFlag = true
	return builder
}

func (builder *DepartmentIdBuilder) Build() *DepartmentId {
	req := &DepartmentId{}
	if builder.departmentIdFlag {
		req.DepartmentId = &builder.departmentId

	}
	if builder.openDepartmentIdFlag {
		req.OpenDepartmentId = &builder.openDepartmentId

	}
	return req
}

type EventBriefInfoAi struct {
	EventId *string `json:"event_id,omitempty"` // 日程ID

	Summary *string `json:"summary,omitempty"` // 日程名称

	StartTime *string `json:"start_time,omitempty"` // 日程开始时间

	EndTime *string `json:"end_time,omitempty"` // 日程结束时间

	AppLink *string `json:"app_link,omitempty"` // 日程链接

	Organizer *EventOrganizer `json:"organizer,omitempty"` // 日程组织者
}

type EventBriefInfoAiBuilder struct {
	eventId     string // 日程ID
	eventIdFlag bool

	summary     string // 日程名称
	summaryFlag bool

	startTime     string // 日程开始时间
	startTimeFlag bool

	endTime     string // 日程结束时间
	endTimeFlag bool

	appLink     string // 日程链接
	appLinkFlag bool

	organizer     *EventOrganizer // 日程组织者
	organizerFlag bool
}

func NewEventBriefInfoAiBuilder() *EventBriefInfoAiBuilder {
	builder := &EventBriefInfoAiBuilder{}
	return builder
}

// 日程ID
//
// 示例值：00592a0e-7edf-4678-bc9d-1b77383ef08e_0
func (builder *EventBriefInfoAiBuilder) EventId(eventId string) *EventBriefInfoAiBuilder {
	builder.eventId = eventId
	builder.eventIdFlag = true
	return builder
}

// 日程名称
//
// 示例值：会议
func (builder *EventBriefInfoAiBuilder) Summary(summary string) *EventBriefInfoAiBuilder {
	builder.summary = summary
	builder.summaryFlag = true
	return builder
}

// 日程开始时间
//
// 示例值：2022-10-01 10:00:00
func (builder *EventBriefInfoAiBuilder) StartTime(startTime string) *EventBriefInfoAiBuilder {
	builder.startTime = startTime
	builder.startTimeFlag = true
	return builder
}

// 日程结束时间
//
// 示例值：2022-10-01 11:00:00
func (builder *EventBriefInfoAiBuilder) EndTime(endTime string) *EventBriefInfoAiBuilder {
	builder.endTime = endTime
	builder.endTimeFlag = true
	return builder
}

// 日程链接
//
// 示例值：https://applink.feishu.cn/client/calendar/event/detail?calendarId=xxxxxx&key=xxxxxx&originalTime=xxxxxx&startTime=xxxxxx
func (builder *EventBriefInfoAiBuilder) AppLink(appLink string) *EventBriefInfoAiBuilder {
	builder.appLink = appLink
	builder.appLinkFlag = true
	return builder
}

// 日程组织者
//
// 示例值：
func (builder *EventBriefInfoAiBuilder) Organizer(organizer *EventOrganizer) *EventBriefInfoAiBuilder {
	builder.organizer = organizer
	builder.organizerFlag = true
	return builder
}

func (builder *EventBriefInfoAiBuilder) Build() *EventBriefInfoAi {
	req := &EventBriefInfoAi{}
	if builder.eventIdFlag {
		req.EventId = &builder.eventId

	}
	if builder.summaryFlag {
		req.Summary = &builder.summary

	}
	if builder.startTimeFlag {
		req.StartTime = &builder.startTime

	}
	if builder.endTimeFlag {
		req.EndTime = &builder.endTime

	}
	if builder.appLinkFlag {
		req.AppLink = &builder.appLink

	}
	if builder.organizerFlag {
		req.Organizer = builder.organizer
	}
	return req
}

type EventCard struct {
	Summary *string `json:"summary,omitempty"` // 日程主题

	StartTime *string `json:"start_time,omitempty"` // 日程开始时间，日期+时间格式

	EndTime *string `json:"end_time,omitempty"` // 日程结束时间，日期+时间格式

	StartTimezone *string `json:"start_timezone,omitempty"` // 日程开始时间时区

	ParticipantIds *string `json:"participant_ids,omitempty"` // 日程参与人open ID

	RecurrenceRule *string `json:"recurrence_rule,omitempty"` // 日程的重复性规则

	MeetingRoomIds *string `json:"meeting_room_ids,omitempty"` // 需要预定的会议室ID列表

	Duration *string `json:"duration,omitempty"` // 需要预定的日程长度

	NeedMeetingNotes *string `json:"need_meeting_notes,omitempty"` // 是否需要生成会议纪要

	ScenarioContextSchemaVersion *string `json:"scenario_context_schema_version,omitempty"` // 上下文信息 schema 版本

	ScenarioContext *CalendarUnderstandScenarioContext `json:"scenario_context,omitempty"` // 上下文信息

	EventId *string `json:"event_id,omitempty"` // 日程的uid_originTime
}

type EventCardBuilder struct {
	summary     string // 日程主题
	summaryFlag bool

	startTime     string // 日程开始时间，日期+时间格式
	startTimeFlag bool

	endTime     string // 日程结束时间，日期+时间格式
	endTimeFlag bool

	startTimezone     string // 日程开始时间时区
	startTimezoneFlag bool

	participantIds     string // 日程参与人open ID
	participantIdsFlag bool

	recurrenceRule     string // 日程的重复性规则
	recurrenceRuleFlag bool

	meetingRoomIds     string // 需要预定的会议室ID列表
	meetingRoomIdsFlag bool

	duration     string // 需要预定的日程长度
	durationFlag bool

	needMeetingNotes     string // 是否需要生成会议纪要
	needMeetingNotesFlag bool

	scenarioContextSchemaVersion     string // 上下文信息 schema 版本
	scenarioContextSchemaVersionFlag bool

	scenarioContext     *CalendarUnderstandScenarioContext // 上下文信息
	scenarioContextFlag bool

	eventId     string // 日程的uid_originTime
	eventIdFlag bool
}

func NewEventCardBuilder() *EventCardBuilder {
	builder := &EventCardBuilder{}
	return builder
}

// 日程主题
//
// 示例值：日程主题
func (builder *EventCardBuilder) Summary(summary string) *EventCardBuilder {
	builder.summary = summary
	builder.summaryFlag = true
	return builder
}

// 日程开始时间，日期+时间格式
//
// 示例值：2023-01-01T00:00
func (builder *EventCardBuilder) StartTime(startTime string) *EventCardBuilder {
	builder.startTime = startTime
	builder.startTimeFlag = true
	return builder
}

// 日程结束时间，日期+时间格式
//
// 示例值：2023-01-01T01:00
func (builder *EventCardBuilder) EndTime(endTime string) *EventCardBuilder {
	builder.endTime = endTime
	builder.endTimeFlag = true
	return builder
}

// 日程开始时间时区
//
// 示例值：Asia/Shanghai
func (builder *EventCardBuilder) StartTimezone(startTimezone string) *EventCardBuilder {
	builder.startTimezone = startTimezone
	builder.startTimezoneFlag = true
	return builder
}

// 日程参与人open ID
//
// 示例值：ou_xxx;ou_yyy
func (builder *EventCardBuilder) ParticipantIds(participantIds string) *EventCardBuilder {
	builder.participantIds = participantIds
	builder.participantIdsFlag = true
	return builder
}

// 日程的重复性规则
//
// 示例值：FREQ=DAILY;INTERVAL=1
func (builder *EventCardBuilder) RecurrenceRule(recurrenceRule string) *EventCardBuilder {
	builder.recurrenceRule = recurrenceRule
	builder.recurrenceRuleFlag = true
	return builder
}

// 需要预定的会议室ID列表
//
// 示例值：omm_xxx;omm_yyy
func (builder *EventCardBuilder) MeetingRoomIds(meetingRoomIds string) *EventCardBuilder {
	builder.meetingRoomIds = meetingRoomIds
	builder.meetingRoomIdsFlag = true
	return builder
}

// 需要预定的日程长度
//
// 示例值：1小时30分钟
func (builder *EventCardBuilder) Duration(duration string) *EventCardBuilder {
	builder.duration = duration
	builder.durationFlag = true
	return builder
}

// 是否需要生成会议纪要
//
// 示例值：true
func (builder *EventCardBuilder) NeedMeetingNotes(needMeetingNotes string) *EventCardBuilder {
	builder.needMeetingNotes = needMeetingNotes
	builder.needMeetingNotesFlag = true
	return builder
}

// 上下文信息 schema 版本
//
// 示例值：v1
func (builder *EventCardBuilder) ScenarioContextSchemaVersion(scenarioContextSchemaVersion string) *EventCardBuilder {
	builder.scenarioContextSchemaVersion = scenarioContextSchemaVersion
	builder.scenarioContextSchemaVersionFlag = true
	return builder
}

// 上下文信息
//
// 示例值：
func (builder *EventCardBuilder) ScenarioContext(scenarioContext *CalendarUnderstandScenarioContext) *EventCardBuilder {
	builder.scenarioContext = scenarioContext
	builder.scenarioContextFlag = true
	return builder
}

// 日程的uid_originTime
//
// 示例值：11dd1004-7cfb-4ad2-89a0-aa3c82f34dda_0
func (builder *EventCardBuilder) EventId(eventId string) *EventCardBuilder {
	builder.eventId = eventId
	builder.eventIdFlag = true
	return builder
}

func (builder *EventCardBuilder) Build() *EventCard {
	req := &EventCard{}
	if builder.summaryFlag {
		req.Summary = &builder.summary

	}
	if builder.startTimeFlag {
		req.StartTime = &builder.startTime

	}
	if builder.endTimeFlag {
		req.EndTime = &builder.endTime

	}
	if builder.startTimezoneFlag {
		req.StartTimezone = &builder.startTimezone

	}
	if builder.participantIdsFlag {
		req.ParticipantIds = &builder.participantIds

	}
	if builder.recurrenceRuleFlag {
		req.RecurrenceRule = &builder.recurrenceRule

	}
	if builder.meetingRoomIdsFlag {
		req.MeetingRoomIds = &builder.meetingRoomIds

	}
	if builder.durationFlag {
		req.Duration = &builder.duration

	}
	if builder.needMeetingNotesFlag {
		req.NeedMeetingNotes = &builder.needMeetingNotes

	}
	if builder.scenarioContextSchemaVersionFlag {
		req.ScenarioContextSchemaVersion = &builder.scenarioContextSchemaVersion

	}
	if builder.scenarioContextFlag {
		req.ScenarioContext = builder.scenarioContext
	}
	if builder.eventIdFlag {
		req.EventId = &builder.eventId

	}
	return req
}

type EventCheckIn struct {
	EnableCheckIn *bool `json:"enable_check_in,omitempty"` // 是否启用日程签到

	CheckInStartTime *CheckInTime `json:"check_in_start_time,omitempty"` // 日程签到开始时间

	CheckInEndTime *CheckInTime `json:"check_in_end_time,omitempty"` // 日程签到结束时间

	NeedNotifyAttendees *bool `json:"need_notify_attendees,omitempty"` // 签到开始时是否自动发送签到通知给参与者
}

type EventCheckInBuilder struct {
	enableCheckIn     bool // 是否启用日程签到
	enableCheckInFlag bool

	checkInStartTime     *CheckInTime // 日程签到开始时间
	checkInStartTimeFlag bool

	checkInEndTime     *CheckInTime // 日程签到结束时间
	checkInEndTimeFlag bool

	needNotifyAttendees     bool // 签到开始时是否自动发送签到通知给参与者
	needNotifyAttendeesFlag bool
}

func NewEventCheckInBuilder() *EventCheckInBuilder {
	builder := &EventCheckInBuilder{}
	return builder
}

// 是否启用日程签到
//
// 示例值：
func (builder *EventCheckInBuilder) EnableCheckIn(enableCheckIn bool) *EventCheckInBuilder {
	builder.enableCheckIn = enableCheckIn
	builder.enableCheckInFlag = true
	return builder
}

// 日程签到开始时间
//
// 示例值：
func (builder *EventCheckInBuilder) CheckInStartTime(checkInStartTime *CheckInTime) *EventCheckInBuilder {
	builder.checkInStartTime = checkInStartTime
	builder.checkInStartTimeFlag = true
	return builder
}

// 日程签到结束时间
//
// 示例值：
func (builder *EventCheckInBuilder) CheckInEndTime(checkInEndTime *CheckInTime) *EventCheckInBuilder {
	builder.checkInEndTime = checkInEndTime
	builder.checkInEndTimeFlag = true
	return builder
}

// 签到开始时是否自动发送签到通知给参与者
//
// 示例值：
func (builder *EventCheckInBuilder) NeedNotifyAttendees(needNotifyAttendees bool) *EventCheckInBuilder {
	builder.needNotifyAttendees = needNotifyAttendees
	builder.needNotifyAttendeesFlag = true
	return builder
}

func (builder *EventCheckInBuilder) Build() *EventCheckIn {
	req := &EventCheckIn{}
	if builder.enableCheckInFlag {
		req.EnableCheckIn = &builder.enableCheckIn

	}
	if builder.checkInStartTimeFlag {
		req.CheckInStartTime = builder.checkInStartTime
	}
	if builder.checkInEndTimeFlag {
		req.CheckInEndTime = builder.checkInEndTime
	}
	if builder.needNotifyAttendeesFlag {
		req.NeedNotifyAttendees = &builder.needNotifyAttendees

	}
	return req
}

type EventLocation struct {
	Name *string `json:"name,omitempty"` // 地点名称

	Address *string `json:"address,omitempty"` // 地点地址

	Latitude *float64 `json:"latitude,omitempty"` // 地点坐标纬度信息，对于国内的地点，采用GCJ-02标准，海外地点采用WGS84标准

	Longitude *float64 `json:"longitude,omitempty"` // 地点坐标经度信息，对于国内的地点，采用GCJ-02标准，海外地点采用WGS84标准
}

type EventLocationBuilder struct {
	name     string // 地点名称
	nameFlag bool

	address     string // 地点地址
	addressFlag bool

	latitude     float64 // 地点坐标纬度信息，对于国内的地点，采用GCJ-02标准，海外地点采用WGS84标准
	latitudeFlag bool

	longitude     float64 // 地点坐标经度信息，对于国内的地点，采用GCJ-02标准，海外地点采用WGS84标准
	longitudeFlag bool
}

func NewEventLocationBuilder() *EventLocationBuilder {
	builder := &EventLocationBuilder{}
	return builder
}

// 地点名称
//
// 示例值：地点名称
func (builder *EventLocationBuilder) Name(name string) *EventLocationBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 地点地址
//
// 示例值：地点地址
func (builder *EventLocationBuilder) Address(address string) *EventLocationBuilder {
	builder.address = address
	builder.addressFlag = true
	return builder
}

// 地点坐标纬度信息，对于国内的地点，采用GCJ-02标准，海外地点采用WGS84标准
//
// 示例值：1.100000023841858
func (builder *EventLocationBuilder) Latitude(latitude float64) *EventLocationBuilder {
	builder.latitude = latitude
	builder.latitudeFlag = true
	return builder
}

// 地点坐标经度信息，对于国内的地点，采用GCJ-02标准，海外地点采用WGS84标准
//
// 示例值：2.200000047683716
func (builder *EventLocationBuilder) Longitude(longitude float64) *EventLocationBuilder {
	builder.longitude = longitude
	builder.longitudeFlag = true
	return builder
}

func (builder *EventLocationBuilder) Build() *EventLocation {
	req := &EventLocation{}
	if builder.nameFlag {
		req.Name = &builder.name

	}
	if builder.addressFlag {
		req.Address = &builder.address

	}
	if builder.latitudeFlag {
		req.Latitude = &builder.latitude

	}
	if builder.longitudeFlag {
		req.Longitude = &builder.longitude

	}
	return req
}

type EventOrganizer struct {
	UserId *string `json:"user_id,omitempty"` // 日程组织者user ID

	DisplayName *string `json:"display_name,omitempty"` // 日程组织者姓名
}

type EventOrganizerBuilder struct {
	userId     string // 日程组织者user ID
	userIdFlag bool

	displayName     string // 日程组织者姓名
	displayNameFlag bool
}

func NewEventOrganizerBuilder() *EventOrganizerBuilder {
	builder := &EventOrganizerBuilder{}
	return builder
}

// 日程组织者user ID
//
// 示例值：ou_xxxxxx
func (builder *EventOrganizerBuilder) UserId(userId string) *EventOrganizerBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

// 日程组织者姓名
//
// 示例值：孙二二
func (builder *EventOrganizerBuilder) DisplayName(displayName string) *EventOrganizerBuilder {
	builder.displayName = displayName
	builder.displayNameFlag = true
	return builder
}

func (builder *EventOrganizerBuilder) Build() *EventOrganizer {
	req := &EventOrganizer{}
	if builder.userIdFlag {
		req.UserId = &builder.userId

	}
	if builder.displayNameFlag {
		req.DisplayName = &builder.displayName

	}
	return req
}

type EventSearchFilter struct {
	StartTime *TimeInfo `json:"start_time,omitempty"` // 搜索过滤项，日程搜索区间的开始时间，被搜索日程的事件必须与搜索区间有交集

	EndTime *TimeInfo `json:"end_time,omitempty"` // 搜索过滤项，日程搜索区间的结束时间，被搜索日程的事件必须与搜索区间有交集

	UserIds []string `json:"user_ids,omitempty"` // 搜索过滤项，参与人的用户ID列表，被搜索日程中必须包含至少一个其中的参与人。参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction)

	RoomIds []string `json:"room_ids,omitempty"` // 搜索过滤项，会议室ID列表，被搜索日程中必须包含至少一个其中的会议室

	ChatIds []string `json:"chat_ids,omitempty"` // 搜索过滤项，群ID列表，被搜索日程的参与人中必须包含至少一个其中的群。参见[群ID 说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-id-description)
}

type EventSearchFilterBuilder struct {
	startTime     *TimeInfo // 搜索过滤项，日程搜索区间的开始时间，被搜索日程的事件必须与搜索区间有交集
	startTimeFlag bool

	endTime     *TimeInfo // 搜索过滤项，日程搜索区间的结束时间，被搜索日程的事件必须与搜索区间有交集
	endTimeFlag bool

	userIds     []string // 搜索过滤项，参与人的用户ID列表，被搜索日程中必须包含至少一个其中的参与人。参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction)
	userIdsFlag bool

	roomIds     []string // 搜索过滤项，会议室ID列表，被搜索日程中必须包含至少一个其中的会议室
	roomIdsFlag bool

	chatIds     []string // 搜索过滤项，群ID列表，被搜索日程的参与人中必须包含至少一个其中的群。参见[群ID 说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-id-description)
	chatIdsFlag bool
}

func NewEventSearchFilterBuilder() *EventSearchFilterBuilder {
	builder := &EventSearchFilterBuilder{}
	return builder
}

// 搜索过滤项，日程搜索区间的开始时间，被搜索日程的事件必须与搜索区间有交集
//
// 示例值：
func (builder *EventSearchFilterBuilder) StartTime(startTime *TimeInfo) *EventSearchFilterBuilder {
	builder.startTime = startTime
	builder.startTimeFlag = true
	return builder
}

// 搜索过滤项，日程搜索区间的结束时间，被搜索日程的事件必须与搜索区间有交集
//
// 示例值：
func (builder *EventSearchFilterBuilder) EndTime(endTime *TimeInfo) *EventSearchFilterBuilder {
	builder.endTime = endTime
	builder.endTimeFlag = true
	return builder
}

// 搜索过滤项，参与人的用户ID列表，被搜索日程中必须包含至少一个其中的参与人。参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction)
//
// 示例值：xxxxx
func (builder *EventSearchFilterBuilder) UserIds(userIds []string) *EventSearchFilterBuilder {
	builder.userIds = userIds
	builder.userIdsFlag = true
	return builder
}

// 搜索过滤项，会议室ID列表，被搜索日程中必须包含至少一个其中的会议室
//
// 示例值：xxxxx
func (builder *EventSearchFilterBuilder) RoomIds(roomIds []string) *EventSearchFilterBuilder {
	builder.roomIds = roomIds
	builder.roomIdsFlag = true
	return builder
}

// 搜索过滤项，群ID列表，被搜索日程的参与人中必须包含至少一个其中的群。参见[群ID 说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-id-description)
//
// 示例值：xxxxx
func (builder *EventSearchFilterBuilder) ChatIds(chatIds []string) *EventSearchFilterBuilder {
	builder.chatIds = chatIds
	builder.chatIdsFlag = true
	return builder
}

func (builder *EventSearchFilterBuilder) Build() *EventSearchFilter {
	req := &EventSearchFilter{}
	if builder.startTimeFlag {
		req.StartTime = builder.startTime
	}
	if builder.endTimeFlag {
		req.EndTime = builder.endTime
	}
	if builder.userIdsFlag {
		req.UserIds = builder.userIds
	}
	if builder.roomIdsFlag {
		req.RoomIds = builder.roomIds
	}
	if builder.chatIdsFlag {
		req.ChatIds = builder.chatIds
	}
	return req
}

type EventTime struct {
	TimeStamp *string `json:"time_stamp,omitempty"` // 时间戳
}

type EventTimeBuilder struct {
	timeStamp     string // 时间戳
	timeStampFlag bool
}

func NewEventTimeBuilder() *EventTimeBuilder {
	builder := &EventTimeBuilder{}
	return builder
}

// 时间戳
//
// 示例值：171214912293
func (builder *EventTimeBuilder) TimeStamp(timeStamp string) *EventTimeBuilder {
	builder.timeStamp = timeStamp
	builder.timeStampFlag = true
	return builder
}

func (builder *EventTimeBuilder) Build() *EventTime {
	req := &EventTime{}
	if builder.timeStampFlag {
		req.TimeStamp = &builder.timeStamp

	}
	return req
}

type ExchangeBinding struct {
	AdminAccount *string `json:"admin_account,omitempty"` // admin账户

	ExchangeAccount *string `json:"exchange_account,omitempty"` // 用户绑定的exchange账户

	UserId *string `json:"user_id,omitempty"` // exchange账户绑定user唯一标识id，参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction)

	Status *string `json:"status,omitempty"` // exchange账户同步状态

	ExchangeBindingId *string `json:"exchange_binding_id,omitempty"` // exchange绑定唯一标识id。参见[exchange绑定ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/exchange_binding/introduction#12533d5e)
}

type ExchangeBindingBuilder struct {
	adminAccount     string // admin账户
	adminAccountFlag bool

	exchangeAccount     string // 用户绑定的exchange账户
	exchangeAccountFlag bool

	userId     string // exchange账户绑定user唯一标识id，参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction)
	userIdFlag bool

	status     string // exchange账户同步状态
	statusFlag bool

	exchangeBindingId     string // exchange绑定唯一标识id。参见[exchange绑定ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/exchange_binding/introduction#12533d5e)
	exchangeBindingIdFlag bool
}

func NewExchangeBindingBuilder() *ExchangeBindingBuilder {
	builder := &ExchangeBindingBuilder{}
	return builder
}

// admin账户
//
// 示例值：email_admin_example@outlook.com
func (builder *ExchangeBindingBuilder) AdminAccount(adminAccount string) *ExchangeBindingBuilder {
	builder.adminAccount = adminAccount
	builder.adminAccountFlag = true
	return builder
}

// 用户绑定的exchange账户
//
// 示例值：email_account_example@outlook.com
func (builder *ExchangeBindingBuilder) ExchangeAccount(exchangeAccount string) *ExchangeBindingBuilder {
	builder.exchangeAccount = exchangeAccount
	builder.exchangeAccountFlag = true
	return builder
}

// exchange账户绑定user唯一标识id，参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction)
//
// 示例值：ou_xxxxxxxxxxxxxxxxxx
func (builder *ExchangeBindingBuilder) UserId(userId string) *ExchangeBindingBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

// exchange账户同步状态
//
// 示例值：doing
func (builder *ExchangeBindingBuilder) Status(status string) *ExchangeBindingBuilder {
	builder.status = status
	builder.statusFlag = true
	return builder
}

// exchange绑定唯一标识id。参见[exchange绑定ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/exchange_binding/introduction#12533d5e)
//
// 示例值：ZW1haWxfYWRtaW5fZXhhbXBsZUBvdXRsb29rLmNvbSBlbWFpbF9hY2NvdW50X2V4YW1wbGVAb3V0bG9vay5jb20=
func (builder *ExchangeBindingBuilder) ExchangeBindingId(exchangeBindingId string) *ExchangeBindingBuilder {
	builder.exchangeBindingId = exchangeBindingId
	builder.exchangeBindingIdFlag = true
	return builder
}

func (builder *ExchangeBindingBuilder) Build() *ExchangeBinding {
	req := &ExchangeBinding{}
	if builder.adminAccountFlag {
		req.AdminAccount = &builder.adminAccount

	}
	if builder.exchangeAccountFlag {
		req.ExchangeAccount = &builder.exchangeAccount

	}
	if builder.userIdFlag {
		req.UserId = &builder.userId

	}
	if builder.statusFlag {
		req.Status = &builder.status

	}
	if builder.exchangeBindingIdFlag {
		req.ExchangeBindingId = &builder.exchangeBindingId

	}
	return req
}

type File struct {
	FileToken *string `json:"file_token,omitempty"` // 附件token

	FileSize *string `json:"file_size,omitempty"` // 附件大小

	Name *string `json:"name,omitempty"` // 附件名称
}

type FileBuilder struct {
	fileToken     string // 附件token
	fileTokenFlag bool

	fileSize     string // 附件大小
	fileSizeFlag bool

	name     string // 附件名称
	nameFlag bool
}

func NewFileBuilder() *FileBuilder {
	builder := &FileBuilder{}
	return builder
}

// 附件token
//
// 示例值：xAAAAA
func (builder *FileBuilder) FileToken(fileToken string) *FileBuilder {
	builder.fileToken = fileToken
	builder.fileTokenFlag = true
	return builder
}

// 附件大小
//
// 示例值：2345
func (builder *FileBuilder) FileSize(fileSize string) *FileBuilder {
	builder.fileSize = fileSize
	builder.fileSizeFlag = true
	return builder
}

// 附件名称
//
// 示例值：附件.jpeg
func (builder *FileBuilder) Name(name string) *FileBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

func (builder *FileBuilder) Build() *File {
	req := &File{}
	if builder.fileTokenFlag {
		req.FileToken = &builder.fileToken

	}
	if builder.fileSizeFlag {
		req.FileSize = &builder.fileSize

	}
	if builder.nameFlag {
		req.Name = &builder.name

	}
	return req
}

type FreeTime struct {
	FreeTimeStart *string `json:"free_time_start,omitempty"` // 空闲开始时间

	FreeTimeEnd *string `json:"free_time_end,omitempty"` // 空闲结束时间

	FreeTimeList *string `json:"free_time_list,omitempty"` // 空闲时间列表
}

type FreeTimeBuilder struct {
	freeTimeStart     string // 空闲开始时间
	freeTimeStartFlag bool

	freeTimeEnd     string // 空闲结束时间
	freeTimeEndFlag bool

	freeTimeList     string // 空闲时间列表
	freeTimeListFlag bool
}

func NewFreeTimeBuilder() *FreeTimeBuilder {
	builder := &FreeTimeBuilder{}
	return builder
}

// 空闲开始时间
//
// 示例值：none
func (builder *FreeTimeBuilder) FreeTimeStart(freeTimeStart string) *FreeTimeBuilder {
	builder.freeTimeStart = freeTimeStart
	builder.freeTimeStartFlag = true
	return builder
}

// 空闲结束时间
//
// 示例值：none
func (builder *FreeTimeBuilder) FreeTimeEnd(freeTimeEnd string) *FreeTimeBuilder {
	builder.freeTimeEnd = freeTimeEnd
	builder.freeTimeEndFlag = true
	return builder
}

// 空闲时间列表
//
// 示例值：none
func (builder *FreeTimeBuilder) FreeTimeList(freeTimeList string) *FreeTimeBuilder {
	builder.freeTimeList = freeTimeList
	builder.freeTimeListFlag = true
	return builder
}

func (builder *FreeTimeBuilder) Build() *FreeTime {
	req := &FreeTime{}
	if builder.freeTimeStartFlag {
		req.FreeTimeStart = &builder.freeTimeStart

	}
	if builder.freeTimeEndFlag {
		req.FreeTimeEnd = &builder.freeTimeEnd

	}
	if builder.freeTimeListFlag {
		req.FreeTimeList = &builder.freeTimeList

	}
	return req
}

type FreeTimeAi struct {
	FreeTimeList *string `json:"free_time_list,omitempty"` // 空闲时间列表
}

type FreeTimeAiBuilder struct {
	freeTimeList     string // 空闲时间列表
	freeTimeListFlag bool
}

func NewFreeTimeAiBuilder() *FreeTimeAiBuilder {
	builder := &FreeTimeAiBuilder{}
	return builder
}

// 空闲时间列表
//
// 示例值：2023-12-05T15:00:00--2023-12-05T15:30:00;2023-12-05T15:30:00--2023-12-05T16:00:00;
func (builder *FreeTimeAiBuilder) FreeTimeList(freeTimeList string) *FreeTimeAiBuilder {
	builder.freeTimeList = freeTimeList
	builder.freeTimeListFlag = true
	return builder
}

func (builder *FreeTimeAiBuilder) Build() *FreeTimeAi {
	req := &FreeTimeAi{}
	if builder.freeTimeListFlag {
		req.FreeTimeList = &builder.freeTimeList

	}
	return req
}

type FreeTimeSlot struct {
	StartTime *string `json:"start_time,omitempty"` // 空闲时间段的开始时间

	EndTime *string `json:"end_time,omitempty"` // 空闲时间段的结束时间

	Length *int `json:"length,omitempty"` // 空闲时间段长度，单位 s
}

type FreeTimeSlotBuilder struct {
	startTime     string // 空闲时间段的开始时间
	startTimeFlag bool

	endTime     string // 空闲时间段的结束时间
	endTimeFlag bool

	length     int // 空闲时间段长度，单位 s
	lengthFlag bool
}

func NewFreeTimeSlotBuilder() *FreeTimeSlotBuilder {
	builder := &FreeTimeSlotBuilder{}
	return builder
}

// 空闲时间段的开始时间
//
// 示例值：2023-09-01 15:00:00
func (builder *FreeTimeSlotBuilder) StartTime(startTime string) *FreeTimeSlotBuilder {
	builder.startTime = startTime
	builder.startTimeFlag = true
	return builder
}

// 空闲时间段的结束时间
//
// 示例值：2023-09-01 16:00:00
func (builder *FreeTimeSlotBuilder) EndTime(endTime string) *FreeTimeSlotBuilder {
	builder.endTime = endTime
	builder.endTimeFlag = true
	return builder
}

// 空闲时间段长度，单位 s
//
// 示例值：3600
func (builder *FreeTimeSlotBuilder) Length(length int) *FreeTimeSlotBuilder {
	builder.length = length
	builder.lengthFlag = true
	return builder
}

func (builder *FreeTimeSlotBuilder) Build() *FreeTimeSlot {
	req := &FreeTimeSlot{}
	if builder.startTimeFlag {
		req.StartTime = &builder.startTime

	}
	if builder.endTimeFlag {
		req.EndTime = &builder.endTime

	}
	if builder.lengthFlag {
		req.Length = &builder.length

	}
	return req
}

type Freebusy struct {
	StartTime *string `json:"start_time,omitempty"` // 忙闲信息开始时间，RFC3339 date_time 格式

	EndTime *string `json:"end_time,omitempty"` // 忙闲信息结束时间，RFC3339 date_time 格式

	RsvpStatus *string `json:"rsvp_status,omitempty"` // 参与人RSVP状态
}

type FreebusyBuilder struct {
	startTime     string // 忙闲信息开始时间，RFC3339 date_time 格式
	startTimeFlag bool

	endTime     string // 忙闲信息结束时间，RFC3339 date_time 格式
	endTimeFlag bool

	rsvpStatus     string // 参与人RSVP状态
	rsvpStatusFlag bool
}

func NewFreebusyBuilder() *FreebusyBuilder {
	builder := &FreebusyBuilder{}
	return builder
}

// 忙闲信息开始时间，RFC3339 date_time 格式
//
// 示例值：2020-10-28T22:30:00+08:00
func (builder *FreebusyBuilder) StartTime(startTime string) *FreebusyBuilder {
	builder.startTime = startTime
	builder.startTimeFlag = true
	return builder
}

// 忙闲信息结束时间，RFC3339 date_time 格式
//
// 示例值：2020-10-28T22:45:00+08:00
func (builder *FreebusyBuilder) EndTime(endTime string) *FreebusyBuilder {
	builder.endTime = endTime
	builder.endTimeFlag = true
	return builder
}

// 参与人RSVP状态
//
// 示例值：
func (builder *FreebusyBuilder) RsvpStatus(rsvpStatus string) *FreebusyBuilder {
	builder.rsvpStatus = rsvpStatus
	builder.rsvpStatusFlag = true
	return builder
}

func (builder *FreebusyBuilder) Build() *Freebusy {
	req := &Freebusy{}
	if builder.startTimeFlag {
		req.StartTime = &builder.startTime

	}
	if builder.endTimeFlag {
		req.EndTime = &builder.endTime

	}
	if builder.rsvpStatusFlag {
		req.RsvpStatus = &builder.rsvpStatus

	}
	return req
}

type I18nMeetingDescription struct {
	Lang *string `json:"lang,omitempty"` // 语言

	Description *string `json:"description,omitempty"` // 会议描述
}

type I18nMeetingDescriptionBuilder struct {
	lang     string // 语言
	langFlag bool

	description     string // 会议描述
	descriptionFlag bool
}

func NewI18nMeetingDescriptionBuilder() *I18nMeetingDescriptionBuilder {
	builder := &I18nMeetingDescriptionBuilder{}
	return builder
}

// 语言
//
// 示例值：zh-cn
func (builder *I18nMeetingDescriptionBuilder) Lang(lang string) *I18nMeetingDescriptionBuilder {
	builder.lang = lang
	builder.langFlag = true
	return builder
}

// 会议描述
//
// 示例值：www.example.com
func (builder *I18nMeetingDescriptionBuilder) Description(description string) *I18nMeetingDescriptionBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

func (builder *I18nMeetingDescriptionBuilder) Build() *I18nMeetingDescription {
	req := &I18nMeetingDescription{}
	if builder.langFlag {
		req.Lang = &builder.lang

	}
	if builder.descriptionFlag {
		req.Description = &builder.description

	}
	return req
}

type Instance struct {
	EventId *string `json:"event_id,omitempty"` // 日程实例ID

	Summary *string `json:"summary,omitempty"` // 日程主题

	Description *string `json:"description,omitempty"` // 日程描述

	StartTime *TimeInfo `json:"start_time,omitempty"` // 开始时间

	EndTime *TimeInfo `json:"end_time,omitempty"` // 结束时间

	Status *string `json:"status,omitempty"` // 日程状态

	IsException *bool `json:"is_exception,omitempty"` // 是否是例外日程实例

	AppLink *string `json:"app_link,omitempty"` // 日程的app_link,跳转到具体的某个日程

	OrganizerCalendarId *string `json:"organizer_calendar_id,omitempty"` // 日程组织者日历ID

	Vchat *Vchat `json:"vchat,omitempty"` // 视频会议信息，仅当日程至少有一位attendee时生效

	Visibility *string `json:"visibility,omitempty"` // 日程公开范围，新建日程默认为Default；仅新建日程时对所有参与人生效，之后修改该属性仅对当前身份生效

	AttendeeAbility *string `json:"attendee_ability,omitempty"` // 参与人权限

	FreeBusyStatus *string `json:"free_busy_status,omitempty"` // 日程占用的忙闲状态，新建日程默认为Busy；仅新建日程时对所有参与人生效，之后修改该属性仅对当前身份生效

	Location *EventLocation `json:"location,omitempty"` // 日程地点

	Color *int `json:"color,omitempty"` // 日程颜色，颜色RGB值的int32表示。仅对当前身份生效；客户端展示时会映射到色板上最接近的一种颜色；值为0或-1时默认跟随日历颜色。

	RecurringEventId *string `json:"recurring_event_id,omitempty"` // 例外日程的原重复日程的event_id

	EventOrganizer *EventOrganizer `json:"event_organizer,omitempty"` // 日程组织者信息

	Attendees []*CalendarEventAttendee `json:"attendees,omitempty"` // 日程参与人信息
}

type InstanceBuilder struct {
	eventId     string // 日程实例ID
	eventIdFlag bool

	summary     string // 日程主题
	summaryFlag bool

	description     string // 日程描述
	descriptionFlag bool

	startTime     *TimeInfo // 开始时间
	startTimeFlag bool

	endTime     *TimeInfo // 结束时间
	endTimeFlag bool

	status     string // 日程状态
	statusFlag bool

	isException     bool // 是否是例外日程实例
	isExceptionFlag bool

	appLink     string // 日程的app_link,跳转到具体的某个日程
	appLinkFlag bool

	organizerCalendarId     string // 日程组织者日历ID
	organizerCalendarIdFlag bool

	vchat     *Vchat // 视频会议信息，仅当日程至少有一位attendee时生效
	vchatFlag bool

	visibility     string // 日程公开范围，新建日程默认为Default；仅新建日程时对所有参与人生效，之后修改该属性仅对当前身份生效
	visibilityFlag bool

	attendeeAbility     string // 参与人权限
	attendeeAbilityFlag bool

	freeBusyStatus     string // 日程占用的忙闲状态，新建日程默认为Busy；仅新建日程时对所有参与人生效，之后修改该属性仅对当前身份生效
	freeBusyStatusFlag bool

	location     *EventLocation // 日程地点
	locationFlag bool

	color     int // 日程颜色，颜色RGB值的int32表示。仅对当前身份生效；客户端展示时会映射到色板上最接近的一种颜色；值为0或-1时默认跟随日历颜色。
	colorFlag bool

	recurringEventId     string // 例外日程的原重复日程的event_id
	recurringEventIdFlag bool

	eventOrganizer     *EventOrganizer // 日程组织者信息
	eventOrganizerFlag bool

	attendees     []*CalendarEventAttendee // 日程参与人信息
	attendeesFlag bool
}

func NewInstanceBuilder() *InstanceBuilder {
	builder := &InstanceBuilder{}
	return builder
}

// 日程实例ID
//
// 示例值：75d28f9b-e35c-4230-8a83-4a661497db54_1602504000
func (builder *InstanceBuilder) EventId(eventId string) *InstanceBuilder {
	builder.eventId = eventId
	builder.eventIdFlag = true
	return builder
}

// 日程主题
//
// 示例值：日程主题
func (builder *InstanceBuilder) Summary(summary string) *InstanceBuilder {
	builder.summary = summary
	builder.summaryFlag = true
	return builder
}

// 日程描述
//
// 示例值：desc
func (builder *InstanceBuilder) Description(description string) *InstanceBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 开始时间
//
// 示例值：
func (builder *InstanceBuilder) StartTime(startTime *TimeInfo) *InstanceBuilder {
	builder.startTime = startTime
	builder.startTimeFlag = true
	return builder
}

// 结束时间
//
// 示例值：
func (builder *InstanceBuilder) EndTime(endTime *TimeInfo) *InstanceBuilder {
	builder.endTime = endTime
	builder.endTimeFlag = true
	return builder
}

// 日程状态
//
// 示例值：confirmed
func (builder *InstanceBuilder) Status(status string) *InstanceBuilder {
	builder.status = status
	builder.statusFlag = true
	return builder
}

// 是否是例外日程实例
//
// 示例值：false
func (builder *InstanceBuilder) IsException(isException bool) *InstanceBuilder {
	builder.isException = isException
	builder.isExceptionFlag = true
	return builder
}

// 日程的app_link,跳转到具体的某个日程
//
// 示例值：https://applink.larkoffice.com/client/calendar/event/detail?calendarId=7039673579105026066&key=aeac9c56-aeb1-4179-a21b-02f278f59048&originalTime=0&startTime=1700496000
func (builder *InstanceBuilder) AppLink(appLink string) *InstanceBuilder {
	builder.appLink = appLink
	builder.appLinkFlag = true
	return builder
}

// 日程组织者日历ID
//
// 示例值：feishu.cn_HF9U2MbibE8PPpjro6xjqa@group.calendar.feishu.cn
func (builder *InstanceBuilder) OrganizerCalendarId(organizerCalendarId string) *InstanceBuilder {
	builder.organizerCalendarId = organizerCalendarId
	builder.organizerCalendarIdFlag = true
	return builder
}

// 视频会议信息，仅当日程至少有一位attendee时生效
//
// 示例值：
func (builder *InstanceBuilder) Vchat(vchat *Vchat) *InstanceBuilder {
	builder.vchat = vchat
	builder.vchatFlag = true
	return builder
}

// 日程公开范围，新建日程默认为Default；仅新建日程时对所有参与人生效，之后修改该属性仅对当前身份生效
//
// 示例值：
func (builder *InstanceBuilder) Visibility(visibility string) *InstanceBuilder {
	builder.visibility = visibility
	builder.visibilityFlag = true
	return builder
}

// 参与人权限
//
// 示例值：
func (builder *InstanceBuilder) AttendeeAbility(attendeeAbility string) *InstanceBuilder {
	builder.attendeeAbility = attendeeAbility
	builder.attendeeAbilityFlag = true
	return builder
}

// 日程占用的忙闲状态，新建日程默认为Busy；仅新建日程时对所有参与人生效，之后修改该属性仅对当前身份生效
//
// 示例值：
func (builder *InstanceBuilder) FreeBusyStatus(freeBusyStatus string) *InstanceBuilder {
	builder.freeBusyStatus = freeBusyStatus
	builder.freeBusyStatusFlag = true
	return builder
}

// 日程地点
//
// 示例值：
func (builder *InstanceBuilder) Location(location *EventLocation) *InstanceBuilder {
	builder.location = location
	builder.locationFlag = true
	return builder
}

// 日程颜色，颜色RGB值的int32表示。仅对当前身份生效；客户端展示时会映射到色板上最接近的一种颜色；值为0或-1时默认跟随日历颜色。
//
// 示例值：0
func (builder *InstanceBuilder) Color(color int) *InstanceBuilder {
	builder.color = color
	builder.colorFlag = true
	return builder
}

// 例外日程的原重复日程的event_id
//
// 示例值：75d28f9b-e35c-4230-8a83-4a661497db54_0
func (builder *InstanceBuilder) RecurringEventId(recurringEventId string) *InstanceBuilder {
	builder.recurringEventId = recurringEventId
	builder.recurringEventIdFlag = true
	return builder
}

// 日程组织者信息
//
// 示例值：
func (builder *InstanceBuilder) EventOrganizer(eventOrganizer *EventOrganizer) *InstanceBuilder {
	builder.eventOrganizer = eventOrganizer
	builder.eventOrganizerFlag = true
	return builder
}

// 日程参与人信息
//
// 示例值：
func (builder *InstanceBuilder) Attendees(attendees []*CalendarEventAttendee) *InstanceBuilder {
	builder.attendees = attendees
	builder.attendeesFlag = true
	return builder
}

func (builder *InstanceBuilder) Build() *Instance {
	req := &Instance{}
	if builder.eventIdFlag {
		req.EventId = &builder.eventId

	}
	if builder.summaryFlag {
		req.Summary = &builder.summary

	}
	if builder.descriptionFlag {
		req.Description = &builder.description

	}
	if builder.startTimeFlag {
		req.StartTime = builder.startTime
	}
	if builder.endTimeFlag {
		req.EndTime = builder.endTime
	}
	if builder.statusFlag {
		req.Status = &builder.status

	}
	if builder.isExceptionFlag {
		req.IsException = &builder.isException

	}
	if builder.appLinkFlag {
		req.AppLink = &builder.appLink

	}
	if builder.organizerCalendarIdFlag {
		req.OrganizerCalendarId = &builder.organizerCalendarId

	}
	if builder.vchatFlag {
		req.Vchat = builder.vchat
	}
	if builder.visibilityFlag {
		req.Visibility = &builder.visibility

	}
	if builder.attendeeAbilityFlag {
		req.AttendeeAbility = &builder.attendeeAbility

	}
	if builder.freeBusyStatusFlag {
		req.FreeBusyStatus = &builder.freeBusyStatus

	}
	if builder.locationFlag {
		req.Location = builder.location
	}
	if builder.colorFlag {
		req.Color = &builder.color

	}
	if builder.recurringEventIdFlag {
		req.RecurringEventId = &builder.recurringEventId

	}
	if builder.eventOrganizerFlag {
		req.EventOrganizer = builder.eventOrganizer
	}
	if builder.attendeesFlag {
		req.Attendees = builder.attendees
	}
	return req
}

type MeetingChat struct {
	MeetingChatId *string `json:"meeting_chat_id,omitempty"` // 会议群ID

	Applink *string `json:"applink,omitempty"` // 群分享链接
}

type MeetingChatBuilder struct {
	meetingChatId     string // 会议群ID
	meetingChatIdFlag bool

	applink     string // 群分享链接
	applinkFlag bool
}

func NewMeetingChatBuilder() *MeetingChatBuilder {
	builder := &MeetingChatBuilder{}
	return builder
}

// 会议群ID
//
// 示例值：oc_a0553eda9014c201e6969b478895c230
func (builder *MeetingChatBuilder) MeetingChatId(meetingChatId string) *MeetingChatBuilder {
	builder.meetingChatId = meetingChatId
	builder.meetingChatIdFlag = true
	return builder
}

// 群分享链接
//
// 示例值：https://applink.feishu.cn/client/chat/open?openChatId=oc_a0553eda9014c201e6969b478895c230
func (builder *MeetingChatBuilder) Applink(applink string) *MeetingChatBuilder {
	builder.applink = applink
	builder.applinkFlag = true
	return builder
}

func (builder *MeetingChatBuilder) Build() *MeetingChat {
	req := &MeetingChat{}
	if builder.meetingChatIdFlag {
		req.MeetingChatId = &builder.meetingChatId

	}
	if builder.applinkFlag {
		req.Applink = &builder.applink

	}
	return req
}

type MeetingMinute struct {
	DocToken *string `json:"doc_token,omitempty"` // 文档token

	DocUrl *string `json:"doc_url,omitempty"` // 文档URL
}

type MeetingMinuteBuilder struct {
	docToken     string // 文档token
	docTokenFlag bool

	docUrl     string // 文档URL
	docUrlFlag bool
}

func NewMeetingMinuteBuilder() *MeetingMinuteBuilder {
	builder := &MeetingMinuteBuilder{}
	return builder
}

// 文档token
//
// 示例值：WCEZdjUSSoH5rvx6hEhcyMjxn6c
func (builder *MeetingMinuteBuilder) DocToken(docToken string) *MeetingMinuteBuilder {
	builder.docToken = docToken
	builder.docTokenFlag = true
	return builder
}

// 文档URL
//
// 示例值：https://bytedance.feishu.cn/docx/WCEZdjUSSoH5rvx6hEhcyMjxn6c
func (builder *MeetingMinuteBuilder) DocUrl(docUrl string) *MeetingMinuteBuilder {
	builder.docUrl = docUrl
	builder.docUrlFlag = true
	return builder
}

func (builder *MeetingMinuteBuilder) Build() *MeetingMinute {
	req := &MeetingMinute{}
	if builder.docTokenFlag {
		req.DocToken = &builder.docToken

	}
	if builder.docUrlFlag {
		req.DocUrl = &builder.docUrl

	}
	return req
}

type MeetingSettings struct {
	OwnerId *string `json:"owner_id,omitempty"` // 设置会议 owner

	JoinMeetingPermission *string `json:"join_meeting_permission,omitempty"` // 设置入会范围

	Password *string `json:"password,omitempty"` // 设置会议密码，仅支持 4-9 位数字

	AssignHosts []string `json:"assign_hosts,omitempty"` // 指定主持人

	AutoRecord *bool `json:"auto_record,omitempty"` // 设置自动录制

	OpenLobby *bool `json:"open_lobby,omitempty"` // 开启等候室

	AllowAttendeesStart *bool `json:"allow_attendees_start,omitempty"` // 允许日程参与者发起会议
}

type MeetingSettingsBuilder struct {
	ownerId     string // 设置会议 owner
	ownerIdFlag bool

	joinMeetingPermission     string // 设置入会范围
	joinMeetingPermissionFlag bool

	password     string // 设置会议密码，仅支持 4-9 位数字
	passwordFlag bool

	assignHosts     []string // 指定主持人
	assignHostsFlag bool

	autoRecord     bool // 设置自动录制
	autoRecordFlag bool

	openLobby     bool // 开启等候室
	openLobbyFlag bool

	allowAttendeesStart     bool // 允许日程参与者发起会议
	allowAttendeesStartFlag bool
}

func NewMeetingSettingsBuilder() *MeetingSettingsBuilder {
	builder := &MeetingSettingsBuilder{}
	return builder
}

// 设置会议 owner
//
// 示例值：ou_7d8a6e6df7621556ce0d21922b676706ccs
func (builder *MeetingSettingsBuilder) OwnerId(ownerId string) *MeetingSettingsBuilder {
	builder.ownerId = ownerId
	builder.ownerIdFlag = true
	return builder
}

// 设置入会范围
//
// 示例值：
func (builder *MeetingSettingsBuilder) JoinMeetingPermission(joinMeetingPermission string) *MeetingSettingsBuilder {
	builder.joinMeetingPermission = joinMeetingPermission
	builder.joinMeetingPermissionFlag = true
	return builder
}

// 设置会议密码，仅支持 4-9 位数字
//
// 示例值：971024
func (builder *MeetingSettingsBuilder) Password(password string) *MeetingSettingsBuilder {
	builder.password = password
	builder.passwordFlag = true
	return builder
}

// 指定主持人
//
// 示例值：
func (builder *MeetingSettingsBuilder) AssignHosts(assignHosts []string) *MeetingSettingsBuilder {
	builder.assignHosts = assignHosts
	builder.assignHostsFlag = true
	return builder
}

// 设置自动录制
//
// 示例值：false
func (builder *MeetingSettingsBuilder) AutoRecord(autoRecord bool) *MeetingSettingsBuilder {
	builder.autoRecord = autoRecord
	builder.autoRecordFlag = true
	return builder
}

// 开启等候室
//
// 示例值：true
func (builder *MeetingSettingsBuilder) OpenLobby(openLobby bool) *MeetingSettingsBuilder {
	builder.openLobby = openLobby
	builder.openLobbyFlag = true
	return builder
}

// 允许日程参与者发起会议
//
// 示例值：true
func (builder *MeetingSettingsBuilder) AllowAttendeesStart(allowAttendeesStart bool) *MeetingSettingsBuilder {
	builder.allowAttendeesStart = allowAttendeesStart
	builder.allowAttendeesStartFlag = true
	return builder
}

func (builder *MeetingSettingsBuilder) Build() *MeetingSettings {
	req := &MeetingSettings{}
	if builder.ownerIdFlag {
		req.OwnerId = &builder.ownerId

	}
	if builder.joinMeetingPermissionFlag {
		req.JoinMeetingPermission = &builder.joinMeetingPermission

	}
	if builder.passwordFlag {
		req.Password = &builder.password

	}
	if builder.assignHostsFlag {
		req.AssignHosts = builder.assignHosts
	}
	if builder.autoRecordFlag {
		req.AutoRecord = &builder.autoRecord

	}
	if builder.openLobbyFlag {
		req.OpenLobby = &builder.openLobby

	}
	if builder.allowAttendeesStartFlag {
		req.AllowAttendeesStart = &builder.allowAttendeesStart

	}
	return req
}

type MyAiEventDetail struct {
	EventId *string `json:"event_id,omitempty"` // 日程的uid_originTime

	Summary *string `json:"summary,omitempty"` // 日程主题

	StartTime *string `json:"start_time,omitempty"` // 日程开始时间

	EndTime *string `json:"end_time,omitempty"` // 日程结束时间

	Timezone *string `json:"timezone,omitempty"` // 时区

	RecurrenceRule *string `json:"recurrence_rule,omitempty"` // 日程的重复性规则

	Participants []*UserMeta `json:"participants,omitempty"` // 参与人实体列表

	Rooms []*RoomMeta `json:"rooms,omitempty"` // 会议室实体列表

	AccessRole *string `json:"access_role,omitempty"` // 日程的权限
}

type MyAiEventDetailBuilder struct {
	eventId     string // 日程的uid_originTime
	eventIdFlag bool

	summary     string // 日程主题
	summaryFlag bool

	startTime     string // 日程开始时间
	startTimeFlag bool

	endTime     string // 日程结束时间
	endTimeFlag bool

	timezone     string // 时区
	timezoneFlag bool

	recurrenceRule     string // 日程的重复性规则
	recurrenceRuleFlag bool

	participants     []*UserMeta // 参与人实体列表
	participantsFlag bool

	rooms     []*RoomMeta // 会议室实体列表
	roomsFlag bool

	accessRole     string // 日程的权限
	accessRoleFlag bool
}

func NewMyAiEventDetailBuilder() *MyAiEventDetailBuilder {
	builder := &MyAiEventDetailBuilder{}
	return builder
}

// 日程的uid_originTime
//
// 示例值：11dd1004-7cfb-4ad2-89a0-aa3c82f34dda_0
func (builder *MyAiEventDetailBuilder) EventId(eventId string) *MyAiEventDetailBuilder {
	builder.eventId = eventId
	builder.eventIdFlag = true
	return builder
}

// 日程主题
//
// 示例值：none
func (builder *MyAiEventDetailBuilder) Summary(summary string) *MyAiEventDetailBuilder {
	builder.summary = summary
	builder.summaryFlag = true
	return builder
}

// 日程开始时间
//
// 示例值：none
func (builder *MyAiEventDetailBuilder) StartTime(startTime string) *MyAiEventDetailBuilder {
	builder.startTime = startTime
	builder.startTimeFlag = true
	return builder
}

// 日程结束时间
//
// 示例值：none
func (builder *MyAiEventDetailBuilder) EndTime(endTime string) *MyAiEventDetailBuilder {
	builder.endTime = endTime
	builder.endTimeFlag = true
	return builder
}

// 时区
//
// 示例值：Asia/Shanghai
func (builder *MyAiEventDetailBuilder) Timezone(timezone string) *MyAiEventDetailBuilder {
	builder.timezone = timezone
	builder.timezoneFlag = true
	return builder
}

// 日程的重复性规则
//
// 示例值：FREQ=DAILY;INTERVAL=1
func (builder *MyAiEventDetailBuilder) RecurrenceRule(recurrenceRule string) *MyAiEventDetailBuilder {
	builder.recurrenceRule = recurrenceRule
	builder.recurrenceRuleFlag = true
	return builder
}

// 参与人实体列表
//
// 示例值：
func (builder *MyAiEventDetailBuilder) Participants(participants []*UserMeta) *MyAiEventDetailBuilder {
	builder.participants = participants
	builder.participantsFlag = true
	return builder
}

// 会议室实体列表
//
// 示例值：
func (builder *MyAiEventDetailBuilder) Rooms(rooms []*RoomMeta) *MyAiEventDetailBuilder {
	builder.rooms = rooms
	builder.roomsFlag = true
	return builder
}

// 日程的权限
//
// 示例值：read/invite/edit
func (builder *MyAiEventDetailBuilder) AccessRole(accessRole string) *MyAiEventDetailBuilder {
	builder.accessRole = accessRole
	builder.accessRoleFlag = true
	return builder
}

func (builder *MyAiEventDetailBuilder) Build() *MyAiEventDetail {
	req := &MyAiEventDetail{}
	if builder.eventIdFlag {
		req.EventId = &builder.eventId

	}
	if builder.summaryFlag {
		req.Summary = &builder.summary

	}
	if builder.startTimeFlag {
		req.StartTime = &builder.startTime

	}
	if builder.endTimeFlag {
		req.EndTime = &builder.endTime

	}
	if builder.timezoneFlag {
		req.Timezone = &builder.timezone

	}
	if builder.recurrenceRuleFlag {
		req.RecurrenceRule = &builder.recurrenceRule

	}
	if builder.participantsFlag {
		req.Participants = builder.participants
	}
	if builder.roomsFlag {
		req.Rooms = builder.rooms
	}
	if builder.accessRoleFlag {
		req.AccessRole = &builder.accessRole

	}
	return req
}

type MyAiEventInfo struct {
	EventId *string `json:"event_id,omitempty"` // 日程的uid_originTime

	Summary *string `json:"summary,omitempty"` // 日程主题

	StartTime *string `json:"start_time,omitempty"` // 日程开始时间，日期+时间格式

	EndTime *string `json:"end_time,omitempty"` // 日程结束时间，日期+时间格式

	StartTimezone *string `json:"start_timezone,omitempty"` // 日程开始时间时区

	RecurrenceRule *string `json:"recurrence_rule,omitempty"` // 日程的重复性规则

	ParticipantIds *string `json:"participant_ids,omitempty"` // 日程参与人open ID

	MeetingRoomIds *string `json:"meeting_room_ids,omitempty"` // 需要预定的会议室ID列表
}

type MyAiEventInfoBuilder struct {
	eventId     string // 日程的uid_originTime
	eventIdFlag bool

	summary     string // 日程主题
	summaryFlag bool

	startTime     string // 日程开始时间，日期+时间格式
	startTimeFlag bool

	endTime     string // 日程结束时间，日期+时间格式
	endTimeFlag bool

	startTimezone     string // 日程开始时间时区
	startTimezoneFlag bool

	recurrenceRule     string // 日程的重复性规则
	recurrenceRuleFlag bool

	participantIds     string // 日程参与人open ID
	participantIdsFlag bool

	meetingRoomIds     string // 需要预定的会议室ID列表
	meetingRoomIdsFlag bool
}

func NewMyAiEventInfoBuilder() *MyAiEventInfoBuilder {
	builder := &MyAiEventInfoBuilder{}
	return builder
}

// 日程的uid_originTime
//
// 示例值：11dd1004-7cfb-4ad2-89a0-aa3c82f34dda_0
func (builder *MyAiEventInfoBuilder) EventId(eventId string) *MyAiEventInfoBuilder {
	builder.eventId = eventId
	builder.eventIdFlag = true
	return builder
}

// 日程主题
//
// 示例值：日程主题
func (builder *MyAiEventInfoBuilder) Summary(summary string) *MyAiEventInfoBuilder {
	builder.summary = summary
	builder.summaryFlag = true
	return builder
}

// 日程开始时间，日期+时间格式
//
// 示例值：2023-01-01T00:00
func (builder *MyAiEventInfoBuilder) StartTime(startTime string) *MyAiEventInfoBuilder {
	builder.startTime = startTime
	builder.startTimeFlag = true
	return builder
}

// 日程结束时间，日期+时间格式
//
// 示例值：2023-01-01T01:00
func (builder *MyAiEventInfoBuilder) EndTime(endTime string) *MyAiEventInfoBuilder {
	builder.endTime = endTime
	builder.endTimeFlag = true
	return builder
}

// 日程开始时间时区
//
// 示例值：Asia/Shanghai
func (builder *MyAiEventInfoBuilder) StartTimezone(startTimezone string) *MyAiEventInfoBuilder {
	builder.startTimezone = startTimezone
	builder.startTimezoneFlag = true
	return builder
}

// 日程的重复性规则
//
// 示例值：FREQ=DAILY;INTERVAL=1
func (builder *MyAiEventInfoBuilder) RecurrenceRule(recurrenceRule string) *MyAiEventInfoBuilder {
	builder.recurrenceRule = recurrenceRule
	builder.recurrenceRuleFlag = true
	return builder
}

// 日程参与人open ID
//
// 示例值：ou_xxx;ou_yyy
func (builder *MyAiEventInfoBuilder) ParticipantIds(participantIds string) *MyAiEventInfoBuilder {
	builder.participantIds = participantIds
	builder.participantIdsFlag = true
	return builder
}

// 需要预定的会议室ID列表
//
// 示例值：omm_xxx;omm_yyy
func (builder *MyAiEventInfoBuilder) MeetingRoomIds(meetingRoomIds string) *MyAiEventInfoBuilder {
	builder.meetingRoomIds = meetingRoomIds
	builder.meetingRoomIdsFlag = true
	return builder
}

func (builder *MyAiEventInfoBuilder) Build() *MyAiEventInfo {
	req := &MyAiEventInfo{}
	if builder.eventIdFlag {
		req.EventId = &builder.eventId

	}
	if builder.summaryFlag {
		req.Summary = &builder.summary

	}
	if builder.startTimeFlag {
		req.StartTime = &builder.startTime

	}
	if builder.endTimeFlag {
		req.EndTime = &builder.endTime

	}
	if builder.startTimezoneFlag {
		req.StartTimezone = &builder.startTimezone

	}
	if builder.recurrenceRuleFlag {
		req.RecurrenceRule = &builder.recurrenceRule

	}
	if builder.participantIdsFlag {
		req.ParticipantIds = &builder.participantIds

	}
	if builder.meetingRoomIdsFlag {
		req.MeetingRoomIds = &builder.meetingRoomIds

	}
	return req
}

type MyaiCardStatus struct {
	FromStatus *string `json:"from_status,omitempty"` // 卡片原来的状态

	ToStatus *string `json:"to_status,omitempty"` // 卡片的新状态
}

type MyaiCardStatusBuilder struct {
	fromStatus     string // 卡片原来的状态
	fromStatusFlag bool

	toStatus     string // 卡片的新状态
	toStatusFlag bool
}

func NewMyaiCardStatusBuilder() *MyaiCardStatusBuilder {
	builder := &MyaiCardStatusBuilder{}
	return builder
}

// 卡片原来的状态
//
// 示例值：CREATED
func (builder *MyaiCardStatusBuilder) FromStatus(fromStatus string) *MyaiCardStatusBuilder {
	builder.fromStatus = fromStatus
	builder.fromStatusFlag = true
	return builder
}

// 卡片的新状态
//
// 示例值：INVALIDATED
func (builder *MyaiCardStatusBuilder) ToStatus(toStatus string) *MyaiCardStatusBuilder {
	builder.toStatus = toStatus
	builder.toStatusFlag = true
	return builder
}

func (builder *MyaiCardStatusBuilder) Build() *MyaiCardStatus {
	req := &MyaiCardStatus{}
	if builder.fromStatusFlag {
		req.FromStatus = &builder.fromStatus

	}
	if builder.toStatusFlag {
		req.ToStatus = &builder.toStatus

	}
	return req
}

type MyaiDocDetail struct {
	Title *string `json:"title,omitempty"` // 文档标题

	Url *string `json:"url,omitempty"` // 文档链接

	Token *string `json:"token,omitempty"` // 文档Token

	DocType *string `json:"doc_type,omitempty"` // 文档类型

	Extra *string `json:"extra,omitempty"` // 文档附加信息
}

type MyaiDocDetailBuilder struct {
	title     string // 文档标题
	titleFlag bool

	url     string // 文档链接
	urlFlag bool

	token     string // 文档Token
	tokenFlag bool

	docType     string // 文档类型
	docTypeFlag bool

	extra     string // 文档附加信息
	extraFlag bool
}

func NewMyaiDocDetailBuilder() *MyaiDocDetailBuilder {
	builder := &MyaiDocDetailBuilder{}
	return builder
}

// 文档标题
//
// 示例值：none
func (builder *MyaiDocDetailBuilder) Title(title string) *MyaiDocDetailBuilder {
	builder.title = title
	builder.titleFlag = true
	return builder
}

// 文档链接
//
// 示例值：none
func (builder *MyaiDocDetailBuilder) Url(url string) *MyaiDocDetailBuilder {
	builder.url = url
	builder.urlFlag = true
	return builder
}

// 文档Token
//
// 示例值：none
func (builder *MyaiDocDetailBuilder) Token(token string) *MyaiDocDetailBuilder {
	builder.token = token
	builder.tokenFlag = true
	return builder
}

// 文档类型
//
// 示例值：none
func (builder *MyaiDocDetailBuilder) DocType(docType string) *MyaiDocDetailBuilder {
	builder.docType = docType
	builder.docTypeFlag = true
	return builder
}

// 文档附加信息
//
// 示例值：none
func (builder *MyaiDocDetailBuilder) Extra(extra string) *MyaiDocDetailBuilder {
	builder.extra = extra
	builder.extraFlag = true
	return builder
}

func (builder *MyaiDocDetailBuilder) Build() *MyaiDocDetail {
	req := &MyaiDocDetail{}
	if builder.titleFlag {
		req.Title = &builder.title

	}
	if builder.urlFlag {
		req.Url = &builder.url

	}
	if builder.tokenFlag {
		req.Token = &builder.token

	}
	if builder.docTypeFlag {
		req.DocType = &builder.docType

	}
	if builder.extraFlag {
		req.Extra = &builder.extra

	}
	return req
}

type MyaiReply struct {
	Reply *string `json:"reply,omitempty"` // 返回给myai的自然语言描述

	StartTime *string `json:"start_time,omitempty"` // 日程开始时间

	EndTime *string `json:"end_time,omitempty"` // 日程结束时间

	Rooms []*RoomMeta `json:"rooms,omitempty"` // 会议室实体列表

	Summary *string `json:"summary,omitempty"` // 日程主题

	Participants []*UserMeta `json:"participants,omitempty"` // 参与人实体列表

	EventId *string `json:"event_id,omitempty"` // 日程的uid_originTime

	RecurrenceRule *string `json:"recurrence_rule,omitempty"` // 日程的重复性规则
}

type MyaiReplyBuilder struct {
	reply     string // 返回给myai的自然语言描述
	replyFlag bool

	startTime     string // 日程开始时间
	startTimeFlag bool

	endTime     string // 日程结束时间
	endTimeFlag bool

	rooms     []*RoomMeta // 会议室实体列表
	roomsFlag bool

	summary     string // 日程主题
	summaryFlag bool

	participants     []*UserMeta // 参与人实体列表
	participantsFlag bool

	eventId     string // 日程的uid_originTime
	eventIdFlag bool

	recurrenceRule     string // 日程的重复性规则
	recurrenceRuleFlag bool
}

func NewMyaiReplyBuilder() *MyaiReplyBuilder {
	builder := &MyaiReplyBuilder{}
	return builder
}

// 返回给myai的自然语言描述
//
// 示例值：none
func (builder *MyaiReplyBuilder) Reply(reply string) *MyaiReplyBuilder {
	builder.reply = reply
	builder.replyFlag = true
	return builder
}

// 日程开始时间
//
// 示例值：none
func (builder *MyaiReplyBuilder) StartTime(startTime string) *MyaiReplyBuilder {
	builder.startTime = startTime
	builder.startTimeFlag = true
	return builder
}

// 日程结束时间
//
// 示例值：none
func (builder *MyaiReplyBuilder) EndTime(endTime string) *MyaiReplyBuilder {
	builder.endTime = endTime
	builder.endTimeFlag = true
	return builder
}

// 会议室实体列表
//
// 示例值：
func (builder *MyaiReplyBuilder) Rooms(rooms []*RoomMeta) *MyaiReplyBuilder {
	builder.rooms = rooms
	builder.roomsFlag = true
	return builder
}

// 日程主题
//
// 示例值：none
func (builder *MyaiReplyBuilder) Summary(summary string) *MyaiReplyBuilder {
	builder.summary = summary
	builder.summaryFlag = true
	return builder
}

// 参与人实体列表
//
// 示例值：
func (builder *MyaiReplyBuilder) Participants(participants []*UserMeta) *MyaiReplyBuilder {
	builder.participants = participants
	builder.participantsFlag = true
	return builder
}

// 日程的uid_originTime
//
// 示例值：11dd1004-7cfb-4ad2-89a0-aa3c82f34dda_0
func (builder *MyaiReplyBuilder) EventId(eventId string) *MyaiReplyBuilder {
	builder.eventId = eventId
	builder.eventIdFlag = true
	return builder
}

// 日程的重复性规则
//
// 示例值：FREQ=DAILY;INTERVAL=1
func (builder *MyaiReplyBuilder) RecurrenceRule(recurrenceRule string) *MyaiReplyBuilder {
	builder.recurrenceRule = recurrenceRule
	builder.recurrenceRuleFlag = true
	return builder
}

func (builder *MyaiReplyBuilder) Build() *MyaiReply {
	req := &MyaiReply{}
	if builder.replyFlag {
		req.Reply = &builder.reply

	}
	if builder.startTimeFlag {
		req.StartTime = &builder.startTime

	}
	if builder.endTimeFlag {
		req.EndTime = &builder.endTime

	}
	if builder.roomsFlag {
		req.Rooms = builder.rooms
	}
	if builder.summaryFlag {
		req.Summary = &builder.summary

	}
	if builder.participantsFlag {
		req.Participants = builder.participants
	}
	if builder.eventIdFlag {
		req.EventId = &builder.eventId

	}
	if builder.recurrenceRuleFlag {
		req.RecurrenceRule = &builder.recurrenceRule

	}
	return req
}

type MyaiSearchDocResult struct {
	DocItems []*MyaiDocDetail `json:"doc_items,omitempty"` // 返回的文档列表

	Message *string `json:"message,omitempty"` // 返回给AI的信息
}

type MyaiSearchDocResultBuilder struct {
	docItems     []*MyaiDocDetail // 返回的文档列表
	docItemsFlag bool

	message     string // 返回给AI的信息
	messageFlag bool
}

func NewMyaiSearchDocResultBuilder() *MyaiSearchDocResultBuilder {
	builder := &MyaiSearchDocResultBuilder{}
	return builder
}

// 返回的文档列表
//
// 示例值：
func (builder *MyaiSearchDocResultBuilder) DocItems(docItems []*MyaiDocDetail) *MyaiSearchDocResultBuilder {
	builder.docItems = docItems
	builder.docItemsFlag = true
	return builder
}

// 返回给AI的信息
//
// 示例值：以下是返回的文档内容
func (builder *MyaiSearchDocResultBuilder) Message(message string) *MyaiSearchDocResultBuilder {
	builder.message = message
	builder.messageFlag = true
	return builder
}

func (builder *MyaiSearchDocResultBuilder) Build() *MyaiSearchDocResult {
	req := &MyaiSearchDocResult{}
	if builder.docItemsFlag {
		req.DocItems = builder.docItems
	}
	if builder.messageFlag {
		req.Message = &builder.message

	}
	return req
}

type OpenEventRsvpInfo struct {
	FromUserId *UserId `json:"from_user_id,omitempty"` // RSVP操作者

	RsvpStatus *string `json:"rsvp_status,omitempty"` // RSVP操作状态
}

type OpenEventRsvpInfoBuilder struct {
	fromUserId     *UserId // RSVP操作者
	fromUserIdFlag bool

	rsvpStatus     string // RSVP操作状态
	rsvpStatusFlag bool
}

func NewOpenEventRsvpInfoBuilder() *OpenEventRsvpInfoBuilder {
	builder := &OpenEventRsvpInfoBuilder{}
	return builder
}

// RSVP操作者
//
// 示例值：
func (builder *OpenEventRsvpInfoBuilder) FromUserId(fromUserId *UserId) *OpenEventRsvpInfoBuilder {
	builder.fromUserId = fromUserId
	builder.fromUserIdFlag = true
	return builder
}

// RSVP操作状态
//
// 示例值：accept
func (builder *OpenEventRsvpInfoBuilder) RsvpStatus(rsvpStatus string) *OpenEventRsvpInfoBuilder {
	builder.rsvpStatus = rsvpStatus
	builder.rsvpStatusFlag = true
	return builder
}

func (builder *OpenEventRsvpInfoBuilder) Build() *OpenEventRsvpInfo {
	req := &OpenEventRsvpInfo{}
	if builder.fromUserIdFlag {
		req.FromUserId = builder.fromUserId
	}
	if builder.rsvpStatusFlag {
		req.RsvpStatus = &builder.rsvpStatus

	}
	return req
}

type OperateCardData struct {
	MeetingUrl *string `json:"meeting_url,omitempty"` // 视频会议链接

	MeetingNo *string `json:"meeting_no,omitempty"` // 视频会议no
}

type OperateCardDataBuilder struct {
	meetingUrl     string // 视频会议链接
	meetingUrlFlag bool

	meetingNo     string // 视频会议no
	meetingNoFlag bool
}

func NewOperateCardDataBuilder() *OperateCardDataBuilder {
	builder := &OperateCardDataBuilder{}
	return builder
}

// 视频会议链接
//
// 示例值：https://vc.feishu.cn/j/152568231
func (builder *OperateCardDataBuilder) MeetingUrl(meetingUrl string) *OperateCardDataBuilder {
	builder.meetingUrl = meetingUrl
	builder.meetingUrlFlag = true
	return builder
}

// 视频会议no
//
// 示例值：808056935
func (builder *OperateCardDataBuilder) MeetingNo(meetingNo string) *OperateCardDataBuilder {
	builder.meetingNo = meetingNo
	builder.meetingNoFlag = true
	return builder
}

func (builder *OperateCardDataBuilder) Build() *OperateCardData {
	req := &OperateCardData{}
	if builder.meetingUrlFlag {
		req.MeetingUrl = &builder.meetingUrl

	}
	if builder.meetingNoFlag {
		req.MeetingNo = &builder.meetingNo

	}
	return req
}

type Reminder struct {
	Minutes *int `json:"minutes,omitempty"` // 日程提醒时间的偏移量，正数时表示在日程开始前X分钟提醒，负数时表示在日程开始后X分钟提醒;新建或更新日程时传入该字段，仅对当前身份生效
}

type ReminderBuilder struct {
	minutes     int // 日程提醒时间的偏移量，正数时表示在日程开始前X分钟提醒，负数时表示在日程开始后X分钟提醒;新建或更新日程时传入该字段，仅对当前身份生效
	minutesFlag bool
}

func NewReminderBuilder() *ReminderBuilder {
	builder := &ReminderBuilder{}
	return builder
}

// 日程提醒时间的偏移量，正数时表示在日程开始前X分钟提醒，负数时表示在日程开始后X分钟提醒;新建或更新日程时传入该字段，仅对当前身份生效
//
// 示例值：5
func (builder *ReminderBuilder) Minutes(minutes int) *ReminderBuilder {
	builder.minutes = minutes
	builder.minutesFlag = true
	return builder
}

func (builder *ReminderBuilder) Build() *Reminder {
	req := &Reminder{}
	if builder.minutesFlag {
		req.Minutes = &builder.minutes

	}
	return req
}

type RoomMeta struct {
	Name *string `json:"name,omitempty"` // 会议室名称

	RoomId *string `json:"room_id,omitempty"` // 会议室ID
}

type RoomMetaBuilder struct {
	name     string // 会议室名称
	nameFlag bool

	roomId     string // 会议室ID
	roomIdFlag bool
}

func NewRoomMetaBuilder() *RoomMetaBuilder {
	builder := &RoomMetaBuilder{}
	return builder
}

// 会议室名称
//
// 示例值：none
func (builder *RoomMetaBuilder) Name(name string) *RoomMetaBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 会议室ID
//
// 示例值：none
func (builder *RoomMetaBuilder) RoomId(roomId string) *RoomMetaBuilder {
	builder.roomId = roomId
	builder.roomIdFlag = true
	return builder
}

func (builder *RoomMetaBuilder) Build() *RoomMeta {
	req := &RoomMeta{}
	if builder.nameFlag {
		req.Name = &builder.name

	}
	if builder.roomIdFlag {
		req.RoomId = &builder.roomId

	}
	return req
}

type Schema struct {
	UiName *string `json:"ui_name,omitempty"` // UI名称。取值范围如下： ;- ForwardIcon: 日程转发按钮 ;- MeetingChatIcon: 会议群聊按钮 ;- MeetingMinutesIcon: 会议纪要按钮 ;- MeetingVideo: 视频会议区域 ;- RSVP: 接受/拒绝/待定区域 ;- Attendee: 参与者区域 ;- OrganizerOrCreator: 组织者/创建者区域

	UiStatus *string `json:"ui_status,omitempty"` // UI项自定义状态。**目前只支持hide**

	AppLink *string `json:"app_link,omitempty"` // 按钮点击后跳转的链接; **该字段暂不支持传入。**
}

type SchemaBuilder struct {
	uiName     string // UI名称。取值范围如下： ;- ForwardIcon: 日程转发按钮 ;- MeetingChatIcon: 会议群聊按钮 ;- MeetingMinutesIcon: 会议纪要按钮 ;- MeetingVideo: 视频会议区域 ;- RSVP: 接受/拒绝/待定区域 ;- Attendee: 参与者区域 ;- OrganizerOrCreator: 组织者/创建者区域
	uiNameFlag bool

	uiStatus     string // UI项自定义状态。**目前只支持hide**
	uiStatusFlag bool

	appLink     string // 按钮点击后跳转的链接; **该字段暂不支持传入。**
	appLinkFlag bool
}

func NewSchemaBuilder() *SchemaBuilder {
	builder := &SchemaBuilder{}
	return builder
}

// UI名称。取值范围如下： ;- ForwardIcon: 日程转发按钮 ;- MeetingChatIcon: 会议群聊按钮 ;- MeetingMinutesIcon: 会议纪要按钮 ;- MeetingVideo: 视频会议区域 ;- RSVP: 接受/拒绝/待定区域 ;- Attendee: 参与者区域 ;- OrganizerOrCreator: 组织者/创建者区域
//
// 示例值：ForwardIcon
func (builder *SchemaBuilder) UiName(uiName string) *SchemaBuilder {
	builder.uiName = uiName
	builder.uiNameFlag = true
	return builder
}

// UI项自定义状态。**目前只支持hide**
//
// 示例值：hide
func (builder *SchemaBuilder) UiStatus(uiStatus string) *SchemaBuilder {
	builder.uiStatus = uiStatus
	builder.uiStatusFlag = true
	return builder
}

// 按钮点击后跳转的链接; **该字段暂不支持传入。**
//
// 示例值：https://applink.feishu.cn/client/calendar/event/detail?calendarId=xxxxxx&key=xxxxxx&originalTime=xxxxxx&startTime=xxxxxx
func (builder *SchemaBuilder) AppLink(appLink string) *SchemaBuilder {
	builder.appLink = appLink
	builder.appLinkFlag = true
	return builder
}

func (builder *SchemaBuilder) Build() *Schema {
	req := &Schema{}
	if builder.uiNameFlag {
		req.UiName = &builder.uiName

	}
	if builder.uiStatusFlag {
		req.UiStatus = &builder.uiStatus

	}
	if builder.appLinkFlag {
		req.AppLink = &builder.appLink

	}
	return req
}

type SearchEventData struct {
	Events []*EventBriefInfoAi `json:"events,omitempty"` // 日程列表

	Msg *string `json:"msg,omitempty"` // 返回给prompt展示内容
}

type SearchEventDataBuilder struct {
	events     []*EventBriefInfoAi // 日程列表
	eventsFlag bool

	msg     string // 返回给prompt展示内容
	msgFlag bool
}

func NewSearchEventDataBuilder() *SearchEventDataBuilder {
	builder := &SearchEventDataBuilder{}
	return builder
}

// 日程列表
//
// 示例值：
func (builder *SearchEventDataBuilder) Events(events []*EventBriefInfoAi) *SearchEventDataBuilder {
	builder.events = events
	builder.eventsFlag = true
	return builder
}

// 返回给prompt展示内容
//
// 示例值：帮我展示卡片消息
func (builder *SearchEventDataBuilder) Msg(msg string) *SearchEventDataBuilder {
	builder.msg = msg
	builder.msgFlag = true
	return builder
}

func (builder *SearchEventDataBuilder) Build() *SearchEventData {
	req := &SearchEventData{}
	if builder.eventsFlag {
		req.Events = builder.events
	}
	if builder.msgFlag {
		req.Msg = &builder.msg

	}
	return req
}

type SearchUserDataAi struct {
	QueryKeyword *string `json:"query_keyword,omitempty"` // 查询传入的单个Keyword

	UserInfo *UserMeta `json:"user_info,omitempty"` // 搜索到的用户信息
}

type SearchUserDataAiBuilder struct {
	queryKeyword     string // 查询传入的单个Keyword
	queryKeywordFlag bool

	userInfo     *UserMeta // 搜索到的用户信息
	userInfoFlag bool
}

func NewSearchUserDataAiBuilder() *SearchUserDataAiBuilder {
	builder := &SearchUserDataAiBuilder{}
	return builder
}

// 查询传入的单个Keyword
//
// 示例值：UserName
func (builder *SearchUserDataAiBuilder) QueryKeyword(queryKeyword string) *SearchUserDataAiBuilder {
	builder.queryKeyword = queryKeyword
	builder.queryKeywordFlag = true
	return builder
}

// 搜索到的用户信息
//
// 示例值：
func (builder *SearchUserDataAiBuilder) UserInfo(userInfo *UserMeta) *SearchUserDataAiBuilder {
	builder.userInfo = userInfo
	builder.userInfoFlag = true
	return builder
}

func (builder *SearchUserDataAiBuilder) Build() *SearchUserDataAi {
	req := &SearchUserDataAi{}
	if builder.queryKeywordFlag {
		req.QueryKeyword = &builder.queryKeyword

	}
	if builder.userInfoFlag {
		req.UserInfo = builder.userInfo
	}
	return req
}

type SearchUserResultAi struct {
	SearchResults []*SearchUserDataAi `json:"search_results,omitempty"` // 搜索结果
}

type SearchUserResultAiBuilder struct {
	searchResults     []*SearchUserDataAi // 搜索结果
	searchResultsFlag bool
}

func NewSearchUserResultAiBuilder() *SearchUserResultAiBuilder {
	builder := &SearchUserResultAiBuilder{}
	return builder
}

// 搜索结果
//
// 示例值：
func (builder *SearchUserResultAiBuilder) SearchResults(searchResults []*SearchUserDataAi) *SearchUserResultAiBuilder {
	builder.searchResults = searchResults
	builder.searchResultsFlag = true
	return builder
}

func (builder *SearchUserResultAiBuilder) Build() *SearchUserResultAi {
	req := &SearchUserResultAi{}
	if builder.searchResultsFlag {
		req.SearchResults = builder.searchResults
	}
	return req
}

type Setting struct {
}

type SettingBuilder struct {
}

func NewSettingBuilder() *SettingBuilder {
	builder := &SettingBuilder{}
	return builder
}

func (builder *SettingBuilder) Build() *Setting {
	req := &Setting{}
	return req
}

type SystemInfo struct {
	SessionId *string `json:"session_id,omitempty"` // session_id

	Lang *string `json:"lang,omitempty"` // 用户问题的语种

	Locale *string `json:"locale,omitempty"` // 请求客户端的语种类
}

type SystemInfoBuilder struct {
	sessionId     string // session_id
	sessionIdFlag bool

	lang     string // 用户问题的语种
	langFlag bool

	locale     string // 请求客户端的语种类
	localeFlag bool
}

func NewSystemInfoBuilder() *SystemInfoBuilder {
	builder := &SystemInfoBuilder{}
	return builder
}

// session_id
//
// 示例值：56786545678765456785345678
func (builder *SystemInfoBuilder) SessionId(sessionId string) *SystemInfoBuilder {
	builder.sessionId = sessionId
	builder.sessionIdFlag = true
	return builder
}

// 用户问题的语种
//
// 示例值：zh
func (builder *SystemInfoBuilder) Lang(lang string) *SystemInfoBuilder {
	builder.lang = lang
	builder.langFlag = true
	return builder
}

// 请求客户端的语种类
//
// 示例值：en_us
func (builder *SystemInfoBuilder) Locale(locale string) *SystemInfoBuilder {
	builder.locale = locale
	builder.localeFlag = true
	return builder
}

func (builder *SystemInfoBuilder) Build() *SystemInfo {
	req := &SystemInfo{}
	if builder.sessionIdFlag {
		req.SessionId = &builder.sessionId

	}
	if builder.langFlag {
		req.Lang = &builder.lang

	}
	if builder.localeFlag {
		req.Locale = &builder.locale

	}
	return req
}

type ThirdPartyMeetingSettings struct {
	MeetingType *string `json:"meeting_type,omitempty"` // 三方会议类型

	MeetingId *string `json:"meeting_id,omitempty"` // 会议ID

	MeetingNo *string `json:"meeting_no,omitempty"` // 会议号

	Password *string `json:"password,omitempty"` // 密码

	MeetingDescriptions []*I18nMeetingDescription `json:"meeting_descriptions,omitempty"` // 多语言会议描述
}

type ThirdPartyMeetingSettingsBuilder struct {
	meetingType     string // 三方会议类型
	meetingTypeFlag bool

	meetingId     string // 会议ID
	meetingIdFlag bool

	meetingNo     string // 会议号
	meetingNoFlag bool

	password     string // 密码
	passwordFlag bool

	meetingDescriptions     []*I18nMeetingDescription // 多语言会议描述
	meetingDescriptionsFlag bool
}

func NewThirdPartyMeetingSettingsBuilder() *ThirdPartyMeetingSettingsBuilder {
	builder := &ThirdPartyMeetingSettingsBuilder{}
	return builder
}

// 三方会议类型
//
// 示例值：julinker
func (builder *ThirdPartyMeetingSettingsBuilder) MeetingType(meetingType string) *ThirdPartyMeetingSettingsBuilder {
	builder.meetingType = meetingType
	builder.meetingTypeFlag = true
	return builder
}

// 会议ID
//
// 示例值：123
func (builder *ThirdPartyMeetingSettingsBuilder) MeetingId(meetingId string) *ThirdPartyMeetingSettingsBuilder {
	builder.meetingId = meetingId
	builder.meetingIdFlag = true
	return builder
}

// 会议号
//
// 示例值：123
func (builder *ThirdPartyMeetingSettingsBuilder) MeetingNo(meetingNo string) *ThirdPartyMeetingSettingsBuilder {
	builder.meetingNo = meetingNo
	builder.meetingNoFlag = true
	return builder
}

// 密码
//
// 示例值：123
func (builder *ThirdPartyMeetingSettingsBuilder) Password(password string) *ThirdPartyMeetingSettingsBuilder {
	builder.password = password
	builder.passwordFlag = true
	return builder
}

// 多语言会议描述
//
// 示例值：
func (builder *ThirdPartyMeetingSettingsBuilder) MeetingDescriptions(meetingDescriptions []*I18nMeetingDescription) *ThirdPartyMeetingSettingsBuilder {
	builder.meetingDescriptions = meetingDescriptions
	builder.meetingDescriptionsFlag = true
	return builder
}

func (builder *ThirdPartyMeetingSettingsBuilder) Build() *ThirdPartyMeetingSettings {
	req := &ThirdPartyMeetingSettings{}
	if builder.meetingTypeFlag {
		req.MeetingType = &builder.meetingType

	}
	if builder.meetingIdFlag {
		req.MeetingId = &builder.meetingId

	}
	if builder.meetingNoFlag {
		req.MeetingNo = &builder.meetingNo

	}
	if builder.passwordFlag {
		req.Password = &builder.password

	}
	if builder.meetingDescriptionsFlag {
		req.MeetingDescriptions = builder.meetingDescriptions
	}
	return req
}

type TimeInfo struct {
	Date *string `json:"date,omitempty"` // 仅全天日程使用该字段，如2018-09-01。需满足 RFC3339 格式。不能与 timestamp 同时指定

	Timestamp *string `json:"timestamp,omitempty"` // 秒级时间戳，如1602504000(表示2020/10/12 20:0:00 +8时区)

	Timezone *string `json:"timezone,omitempty"` // 时区名称，使用IANA Time Zone Database标准，如Asia/Shanghai；全天日程时区固定为UTC，非全天日程时区默认为Asia/Shanghai
}

type TimeInfoBuilder struct {
	date     string // 仅全天日程使用该字段，如2018-09-01。需满足 RFC3339 格式。不能与 timestamp 同时指定
	dateFlag bool

	timestamp     string // 秒级时间戳，如1602504000(表示2020/10/12 20:0:00 +8时区)
	timestampFlag bool

	timezone     string // 时区名称，使用IANA Time Zone Database标准，如Asia/Shanghai；全天日程时区固定为UTC，非全天日程时区默认为Asia/Shanghai
	timezoneFlag bool
}

func NewTimeInfoBuilder() *TimeInfoBuilder {
	builder := &TimeInfoBuilder{}
	return builder
}

// 仅全天日程使用该字段，如2018-09-01。需满足 RFC3339 格式。不能与 timestamp 同时指定
//
// 示例值：2018-09-01
func (builder *TimeInfoBuilder) Date(date string) *TimeInfoBuilder {
	builder.date = date
	builder.dateFlag = true
	return builder
}

// 秒级时间戳，如1602504000(表示2020/10/12 20:0:00 +8时区)
//
// 示例值：1602504000
func (builder *TimeInfoBuilder) Timestamp(timestamp string) *TimeInfoBuilder {
	builder.timestamp = timestamp
	builder.timestampFlag = true
	return builder
}

// 时区名称，使用IANA Time Zone Database标准，如Asia/Shanghai；全天日程时区固定为UTC，非全天日程时区默认为Asia/Shanghai
//
// 示例值：Asia/Shanghai
func (builder *TimeInfoBuilder) Timezone(timezone string) *TimeInfoBuilder {
	builder.timezone = timezone
	builder.timezoneFlag = true
	return builder
}

func (builder *TimeInfoBuilder) Build() *TimeInfo {
	req := &TimeInfo{}
	if builder.dateFlag {
		req.Date = &builder.date

	}
	if builder.timestampFlag {
		req.Timestamp = &builder.timestamp

	}
	if builder.timezoneFlag {
		req.Timezone = &builder.timezone

	}
	return req
}

type TimeSpan struct {
	StartTime *string `json:"start_time,omitempty"` // 空闲时间-开始时间

	EndTime *string `json:"end_time,omitempty"` // 空闲时间-结束时间
}

type TimeSpanBuilder struct {
	startTime     string // 空闲时间-开始时间
	startTimeFlag bool

	endTime     string // 空闲时间-结束时间
	endTimeFlag bool
}

func NewTimeSpanBuilder() *TimeSpanBuilder {
	builder := &TimeSpanBuilder{}
	return builder
}

// 空闲时间-开始时间
//
// 示例值：none
func (builder *TimeSpanBuilder) StartTime(startTime string) *TimeSpanBuilder {
	builder.startTime = startTime
	builder.startTimeFlag = true
	return builder
}

// 空闲时间-结束时间
//
// 示例值：none
func (builder *TimeSpanBuilder) EndTime(endTime string) *TimeSpanBuilder {
	builder.endTime = endTime
	builder.endTimeFlag = true
	return builder
}

func (builder *TimeSpanBuilder) Build() *TimeSpan {
	req := &TimeSpan{}
	if builder.startTimeFlag {
		req.StartTime = &builder.startTime

	}
	if builder.endTimeFlag {
		req.EndTime = &builder.endTime

	}
	return req
}

type TimeoffEvent struct {
	TimeoffEventId *string `json:"timeoff_event_id,omitempty"` // 请假日程ID。参见[请假日程ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/timeoff_event/introduction#b6611a02)

	UserId *string `json:"user_id,omitempty"` // 用户id，参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction)

	Timezone *string `json:"timezone,omitempty"` // 时区

	StartTime *string `json:"start_time,omitempty"` // 休假开始时间：;有时间戳(1609430400)和日期(2021-01-01)两种格式，其它格式无效；;时间戳格式是按小时休假日程，日期格式是全天休假日程；;start_time与end_time格式需保持一致，否则无效。

	EndTime *string `json:"end_time,omitempty"` // 休假结束时间：;有时间戳(1609430400)和日期(2021-01-01)两种格式，其它格式无效；;时间戳格式是按小时休假日程，日期格式是全天休假日程；;start_time与end_time格式需保持一致，否则无效。

	Title *string `json:"title,omitempty"` // 自定义请假日程标题，没有设置则为默认日程标题

	Description *string `json:"description,omitempty"` // 自定义请假日程描述，没有设置则为默认日程描述
}

type TimeoffEventBuilder struct {
	timeoffEventId     string // 请假日程ID。参见[请假日程ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/timeoff_event/introduction#b6611a02)
	timeoffEventIdFlag bool

	userId     string // 用户id，参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction)
	userIdFlag bool

	timezone     string // 时区
	timezoneFlag bool

	startTime     string // 休假开始时间：;有时间戳(1609430400)和日期(2021-01-01)两种格式，其它格式无效；;时间戳格式是按小时休假日程，日期格式是全天休假日程；;start_time与end_time格式需保持一致，否则无效。
	startTimeFlag bool

	endTime     string // 休假结束时间：;有时间戳(1609430400)和日期(2021-01-01)两种格式，其它格式无效；;时间戳格式是按小时休假日程，日期格式是全天休假日程；;start_time与end_time格式需保持一致，否则无效。
	endTimeFlag bool

	title     string // 自定义请假日程标题，没有设置则为默认日程标题
	titleFlag bool

	description     string // 自定义请假日程描述，没有设置则为默认日程描述
	descriptionFlag bool
}

func NewTimeoffEventBuilder() *TimeoffEventBuilder {
	builder := &TimeoffEventBuilder{}
	return builder
}

// 请假日程ID。参见[请假日程ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/timeoff_event/introduction#b6611a02)
//
// 示例值：timeoff:XXXXXX-XXXX-0917-1623-aa493d591a39-XXXXXX
func (builder *TimeoffEventBuilder) TimeoffEventId(timeoffEventId string) *TimeoffEventBuilder {
	builder.timeoffEventId = timeoffEventId
	builder.timeoffEventIdFlag = true
	return builder
}

// 用户id，参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction)
//
// 示例值：ou_XXXXXXXXXX
func (builder *TimeoffEventBuilder) UserId(userId string) *TimeoffEventBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

// 时区
//
// 示例值：Asia/Shanghai
func (builder *TimeoffEventBuilder) Timezone(timezone string) *TimeoffEventBuilder {
	builder.timezone = timezone
	builder.timezoneFlag = true
	return builder
}

// 休假开始时间：;有时间戳(1609430400)和日期(2021-01-01)两种格式，其它格式无效；;时间戳格式是按小时休假日程，日期格式是全天休假日程；;start_time与end_time格式需保持一致，否则无效。
//
// 示例值：2021-01-01
func (builder *TimeoffEventBuilder) StartTime(startTime string) *TimeoffEventBuilder {
	builder.startTime = startTime
	builder.startTimeFlag = true
	return builder
}

// 休假结束时间：;有时间戳(1609430400)和日期(2021-01-01)两种格式，其它格式无效；;时间戳格式是按小时休假日程，日期格式是全天休假日程；;start_time与end_time格式需保持一致，否则无效。
//
// 示例值：2021-01-01
func (builder *TimeoffEventBuilder) EndTime(endTime string) *TimeoffEventBuilder {
	builder.endTime = endTime
	builder.endTimeFlag = true
	return builder
}

// 自定义请假日程标题，没有设置则为默认日程标题
//
// 示例值：请假中(全天) / 1-Day Time Off
func (builder *TimeoffEventBuilder) Title(title string) *TimeoffEventBuilder {
	builder.title = title
	builder.titleFlag = true
	return builder
}

// 自定义请假日程描述，没有设置则为默认日程描述
//
// 示例值：若删除此日程，飞书中相应的“请假”标签将自动消失，而请假系统中的休假申请不会被撤销。
func (builder *TimeoffEventBuilder) Description(description string) *TimeoffEventBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

func (builder *TimeoffEventBuilder) Build() *TimeoffEvent {
	req := &TimeoffEvent{}
	if builder.timeoffEventIdFlag {
		req.TimeoffEventId = &builder.timeoffEventId

	}
	if builder.userIdFlag {
		req.UserId = &builder.userId

	}
	if builder.timezoneFlag {
		req.Timezone = &builder.timezone

	}
	if builder.startTimeFlag {
		req.StartTime = &builder.startTime

	}
	if builder.endTimeFlag {
		req.EndTime = &builder.endTime

	}
	if builder.titleFlag {
		req.Title = &builder.title

	}
	if builder.descriptionFlag {
		req.Description = &builder.description

	}
	return req
}

type UserCalendar struct {
	Calendar *Calendar `json:"calendar,omitempty"` // 日历实体信息

	UserId *string `json:"user_id,omitempty"` // 日历的创建者user ID，参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction)
}

type UserCalendarBuilder struct {
	calendar     *Calendar // 日历实体信息
	calendarFlag bool

	userId     string // 日历的创建者user ID，参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction)
	userIdFlag bool
}

func NewUserCalendarBuilder() *UserCalendarBuilder {
	builder := &UserCalendarBuilder{}
	return builder
}

// 日历实体信息
//
// 示例值：
func (builder *UserCalendarBuilder) Calendar(calendar *Calendar) *UserCalendarBuilder {
	builder.calendar = calendar
	builder.calendarFlag = true
	return builder
}

// 日历的创建者user ID，参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction)
//
// 示例值：ou_xxxxxx
func (builder *UserCalendarBuilder) UserId(userId string) *UserCalendarBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

func (builder *UserCalendarBuilder) Build() *UserCalendar {
	req := &UserCalendar{}
	if builder.calendarFlag {
		req.Calendar = builder.calendar
	}
	if builder.userIdFlag {
		req.UserId = &builder.userId

	}
	return req
}

type UserFreebusy struct {
	FreebusyItems []*Freebusy `json:"freebusy_items,omitempty"` // 日历上请求时间区间内的忙闲信息

	UserId *string `json:"user_id,omitempty"` // 日历的创建者userID
}

type UserFreebusyBuilder struct {
	freebusyItems     []*Freebusy // 日历上请求时间区间内的忙闲信息
	freebusyItemsFlag bool

	userId     string // 日历的创建者userID
	userIdFlag bool
}

func NewUserFreebusyBuilder() *UserFreebusyBuilder {
	builder := &UserFreebusyBuilder{}
	return builder
}

// 日历上请求时间区间内的忙闲信息
//
// 示例值：
func (builder *UserFreebusyBuilder) FreebusyItems(freebusyItems []*Freebusy) *UserFreebusyBuilder {
	builder.freebusyItems = freebusyItems
	builder.freebusyItemsFlag = true
	return builder
}

// 日历的创建者userID
//
// 示例值：
func (builder *UserFreebusyBuilder) UserId(userId string) *UserFreebusyBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

func (builder *UserFreebusyBuilder) Build() *UserFreebusy {
	req := &UserFreebusy{}
	if builder.freebusyItemsFlag {
		req.FreebusyItems = builder.freebusyItems
	}
	if builder.userIdFlag {
		req.UserId = &builder.userId

	}
	return req
}

type UserId struct {
	UserId *string `json:"user_id,omitempty"` //

	OpenId *string `json:"open_id,omitempty"` //

	UnionId *string `json:"union_id,omitempty"` //
}

type UserIdBuilder struct {
	userId     string //
	userIdFlag bool

	openId     string //
	openIdFlag bool

	unionId     string //
	unionIdFlag bool
}

func NewUserIdBuilder() *UserIdBuilder {
	builder := &UserIdBuilder{}
	return builder
}

//
//
// 示例值：
func (builder *UserIdBuilder) UserId(userId string) *UserIdBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

//
//
// 示例值：
func (builder *UserIdBuilder) OpenId(openId string) *UserIdBuilder {
	builder.openId = openId
	builder.openIdFlag = true
	return builder
}

//
//
// 示例值：
func (builder *UserIdBuilder) UnionId(unionId string) *UserIdBuilder {
	builder.unionId = unionId
	builder.unionIdFlag = true
	return builder
}

func (builder *UserIdBuilder) Build() *UserId {
	req := &UserId{}
	if builder.userIdFlag {
		req.UserId = &builder.userId

	}
	if builder.openIdFlag {
		req.OpenId = &builder.openId

	}
	if builder.unionIdFlag {
		req.UnionId = &builder.unionId

	}
	return req
}

type UserMeta struct {
	Name *string `json:"name,omitempty"` // 用户名称

	UserId *string `json:"user_id,omitempty"` // 用户ID
}

type UserMetaBuilder struct {
	name     string // 用户名称
	nameFlag bool

	userId     string // 用户ID
	userIdFlag bool
}

func NewUserMetaBuilder() *UserMetaBuilder {
	builder := &UserMetaBuilder{}
	return builder
}

// 用户名称
//
// 示例值：none
func (builder *UserMetaBuilder) Name(name string) *UserMetaBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 用户ID
//
// 示例值：none
func (builder *UserMetaBuilder) UserId(userId string) *UserMetaBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

func (builder *UserMetaBuilder) Build() *UserMeta {
	req := &UserMeta{}
	if builder.nameFlag {
		req.Name = &builder.name

	}
	if builder.userIdFlag {
		req.UserId = &builder.userId

	}
	return req
}

type VcInfo struct {
	UniqueId *string `json:"unique_id,omitempty"` // 会议唯一ID

	MeetingNo *string `json:"meeting_no,omitempty"` // 会议号
}

type VcInfoBuilder struct {
	uniqueId     string // 会议唯一ID
	uniqueIdFlag bool

	meetingNo     string // 会议号
	meetingNoFlag bool
}

func NewVcInfoBuilder() *VcInfoBuilder {
	builder := &VcInfoBuilder{}
	return builder
}

// 会议唯一ID
//
// 示例值：7226647229510582291
func (builder *VcInfoBuilder) UniqueId(uniqueId string) *VcInfoBuilder {
	builder.uniqueId = uniqueId
	builder.uniqueIdFlag = true
	return builder
}

// 会议号
//
// 示例值：808056935
func (builder *VcInfoBuilder) MeetingNo(meetingNo string) *VcInfoBuilder {
	builder.meetingNo = meetingNo
	builder.meetingNoFlag = true
	return builder
}

func (builder *VcInfoBuilder) Build() *VcInfo {
	req := &VcInfo{}
	if builder.uniqueIdFlag {
		req.UniqueId = &builder.uniqueId

	}
	if builder.meetingNoFlag {
		req.MeetingNo = &builder.meetingNo

	}
	return req
}

type Vchat struct {
	VcType *string `json:"vc_type,omitempty"` // 视频会议类型

	IconType *string `json:"icon_type,omitempty"` // 第三方视频会议icon类型；可以为空，为空展示默认icon。

	Description *string `json:"description,omitempty"` // 第三方视频会议文案，可以为空，为空展示默认文案

	MeetingUrl *string `json:"meeting_url,omitempty"` // 视频会议URL

	LiveLink *string `json:"live_link,omitempty"` // VC视频会议转直播URL，当vc_type=vc时有值。

	VcInfo *VcInfo `json:"vc_info,omitempty"` // VC视频会议原生信息。

	MeetingSettings *MeetingSettings `json:"meeting_settings,omitempty"` // VC视频会议的会前设置

	ThirdPartyMeetingSettings *ThirdPartyMeetingSettings `json:"third_party_meeting_settings,omitempty"` // 三方会议设置
}

type VchatBuilder struct {
	vcType     string // 视频会议类型
	vcTypeFlag bool

	iconType     string // 第三方视频会议icon类型；可以为空，为空展示默认icon。
	iconTypeFlag bool

	description     string // 第三方视频会议文案，可以为空，为空展示默认文案
	descriptionFlag bool

	meetingUrl     string // 视频会议URL
	meetingUrlFlag bool

	liveLink     string // VC视频会议转直播URL，当vc_type=vc时有值。
	liveLinkFlag bool

	vcInfo     *VcInfo // VC视频会议原生信息。
	vcInfoFlag bool

	meetingSettings     *MeetingSettings // VC视频会议的会前设置
	meetingSettingsFlag bool

	thirdPartyMeetingSettings     *ThirdPartyMeetingSettings // 三方会议设置
	thirdPartyMeetingSettingsFlag bool
}

func NewVchatBuilder() *VchatBuilder {
	builder := &VchatBuilder{}
	return builder
}

// 视频会议类型
//
// 示例值：third_party
func (builder *VchatBuilder) VcType(vcType string) *VchatBuilder {
	builder.vcType = vcType
	builder.vcTypeFlag = true
	return builder
}

// 第三方视频会议icon类型；可以为空，为空展示默认icon。
//
// 示例值：vc
func (builder *VchatBuilder) IconType(iconType string) *VchatBuilder {
	builder.iconType = iconType
	builder.iconTypeFlag = true
	return builder
}

// 第三方视频会议文案，可以为空，为空展示默认文案
//
// 示例值：发起视频会议
func (builder *VchatBuilder) Description(description string) *VchatBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 视频会议URL
//
// 示例值：https://example.com
func (builder *VchatBuilder) MeetingUrl(meetingUrl string) *VchatBuilder {
	builder.meetingUrl = meetingUrl
	builder.meetingUrlFlag = true
	return builder
}

// VC视频会议转直播URL，当vc_type=vc时有值。
//
// 示例值：https://meetings.feishu.cn/s/1iof4hpw6i51w
func (builder *VchatBuilder) LiveLink(liveLink string) *VchatBuilder {
	builder.liveLink = liveLink
	builder.liveLinkFlag = true
	return builder
}

// VC视频会议原生信息。
//
// 示例值：
func (builder *VchatBuilder) VcInfo(vcInfo *VcInfo) *VchatBuilder {
	builder.vcInfo = vcInfo
	builder.vcInfoFlag = true
	return builder
}

// VC视频会议的会前设置
//
// 示例值：
func (builder *VchatBuilder) MeetingSettings(meetingSettings *MeetingSettings) *VchatBuilder {
	builder.meetingSettings = meetingSettings
	builder.meetingSettingsFlag = true
	return builder
}

// 三方会议设置
//
// 示例值：
func (builder *VchatBuilder) ThirdPartyMeetingSettings(thirdPartyMeetingSettings *ThirdPartyMeetingSettings) *VchatBuilder {
	builder.thirdPartyMeetingSettings = thirdPartyMeetingSettings
	builder.thirdPartyMeetingSettingsFlag = true
	return builder
}

func (builder *VchatBuilder) Build() *Vchat {
	req := &Vchat{}
	if builder.vcTypeFlag {
		req.VcType = &builder.vcType

	}
	if builder.iconTypeFlag {
		req.IconType = &builder.iconType

	}
	if builder.descriptionFlag {
		req.Description = &builder.description

	}
	if builder.meetingUrlFlag {
		req.MeetingUrl = &builder.meetingUrl

	}
	if builder.liveLinkFlag {
		req.LiveLink = &builder.liveLink

	}
	if builder.vcInfoFlag {
		req.VcInfo = builder.vcInfo
	}
	if builder.meetingSettingsFlag {
		req.MeetingSettings = builder.meetingSettings
	}
	if builder.thirdPartyMeetingSettingsFlag {
		req.ThirdPartyMeetingSettings = builder.thirdPartyMeetingSettings
	}
	return req
}

type Workhour struct {
	DayOfWeek *int `json:"day_of_week,omitempty"` // 工作日，定义每周的星期几为工作日.枚举值 0-6 代表 周日-周六

	StartTime *int `json:"start_time,omitempty"` // 工作时间的开始时间，单位为分钟，取值 0 - 1440

	EndTime *int `json:"end_time,omitempty"` // 工作时间的结束时间，单位为分钟，取值 start_time - 1440
}

type WorkhourBuilder struct {
	dayOfWeek     int // 工作日，定义每周的星期几为工作日.枚举值 0-6 代表 周日-周六
	dayOfWeekFlag bool

	startTime     int // 工作时间的开始时间，单位为分钟，取值 0 - 1440
	startTimeFlag bool

	endTime     int // 工作时间的结束时间，单位为分钟，取值 start_time - 1440
	endTimeFlag bool
}

func NewWorkhourBuilder() *WorkhourBuilder {
	builder := &WorkhourBuilder{}
	return builder
}

// 工作日，定义每周的星期几为工作日.枚举值 0-6 代表 周日-周六
//
// 示例值：1
func (builder *WorkhourBuilder) DayOfWeek(dayOfWeek int) *WorkhourBuilder {
	builder.dayOfWeek = dayOfWeek
	builder.dayOfWeekFlag = true
	return builder
}

// 工作时间的开始时间，单位为分钟，取值 0 - 1440
//
// 示例值：480
func (builder *WorkhourBuilder) StartTime(startTime int) *WorkhourBuilder {
	builder.startTime = startTime
	builder.startTimeFlag = true
	return builder
}

// 工作时间的结束时间，单位为分钟，取值 start_time - 1440
//
// 示例值：1020
func (builder *WorkhourBuilder) EndTime(endTime int) *WorkhourBuilder {
	builder.endTime = endTime
	builder.endTimeFlag = true
	return builder
}

func (builder *WorkhourBuilder) Build() *Workhour {
	req := &Workhour{}
	if builder.dayOfWeekFlag {
		req.DayOfWeek = &builder.dayOfWeek

	}
	if builder.startTimeFlag {
		req.StartTime = &builder.startTime

	}
	if builder.endTimeFlag {
		req.EndTime = &builder.endTime

	}
	return req
}

type WorkhourSetting struct {
	Timezone *string `json:"timezone,omitempty"` // 用户设置的对外展示时区

	Workhours []*Workhour `json:"workhours,omitempty"` // 工作时间设置

	EnableWorkHour *bool `json:"enable_work_hour,omitempty"` // 用户是否启用工作时间设置

	UserId *string `json:"user_id,omitempty"` // 用户user id
}

type WorkhourSettingBuilder struct {
	timezone     string // 用户设置的对外展示时区
	timezoneFlag bool

	workhours     []*Workhour // 工作时间设置
	workhoursFlag bool

	enableWorkHour     bool // 用户是否启用工作时间设置
	enableWorkHourFlag bool

	userId     string // 用户user id
	userIdFlag bool
}

func NewWorkhourSettingBuilder() *WorkhourSettingBuilder {
	builder := &WorkhourSettingBuilder{}
	return builder
}

// 用户设置的对外展示时区
//
// 示例值：Asia/Shanghai
func (builder *WorkhourSettingBuilder) Timezone(timezone string) *WorkhourSettingBuilder {
	builder.timezone = timezone
	builder.timezoneFlag = true
	return builder
}

// 工作时间设置
//
// 示例值：
func (builder *WorkhourSettingBuilder) Workhours(workhours []*Workhour) *WorkhourSettingBuilder {
	builder.workhours = workhours
	builder.workhoursFlag = true
	return builder
}

// 用户是否启用工作时间设置
//
// 示例值：false
func (builder *WorkhourSettingBuilder) EnableWorkHour(enableWorkHour bool) *WorkhourSettingBuilder {
	builder.enableWorkHour = enableWorkHour
	builder.enableWorkHourFlag = true
	return builder
}

// 用户user id
//
// 示例值：ou_xxxxxx
func (builder *WorkhourSettingBuilder) UserId(userId string) *WorkhourSettingBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

func (builder *WorkhourSettingBuilder) Build() *WorkhourSetting {
	req := &WorkhourSetting{}
	if builder.timezoneFlag {
		req.Timezone = &builder.timezone

	}
	if builder.workhoursFlag {
		req.Workhours = builder.workhours
	}
	if builder.enableWorkHourFlag {
		req.EnableWorkHour = &builder.enableWorkHour

	}
	if builder.userIdFlag {
		req.UserId = &builder.userId

	}
	return req
}

type CreateCalendarReqBuilder struct {
	apiReq   *larkcore.ApiReq
	calendar *Calendar
}

func NewCreateCalendarReqBuilder() *CreateCalendarReqBuilder {
	builder := &CreateCalendarReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 该接口用于为当前身份（应用 / 用户）创建一个共享日历。;;身份由 Header Authorization 的 Token 类型决定。
func (builder *CreateCalendarReqBuilder) Calendar(calendar *Calendar) *CreateCalendarReqBuilder {
	builder.calendar = calendar
	return builder
}

func (builder *CreateCalendarReqBuilder) Build() *CreateCalendarReq {
	req := &CreateCalendarReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.Body = builder.calendar
	return req
}

type CreateCalendarReq struct {
	apiReq   *larkcore.ApiReq
	Calendar *Calendar `body:""`
}

type CreateCalendarRespData struct {
	Calendar *Calendar `json:"calendar,omitempty"` // 新创建的日历实体
}

type CreateCalendarResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *CreateCalendarRespData `json:"data"` // 业务数据
}

func (resp *CreateCalendarResp) Success() bool {
	return resp.Code == 0
}

type DeleteCalendarReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewDeleteCalendarReqBuilder() *DeleteCalendarReqBuilder {
	builder := &DeleteCalendarReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 日历ID。参见[日历ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)
//
// 示例值：feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
func (builder *DeleteCalendarReqBuilder) CalendarId(calendarId string) *DeleteCalendarReqBuilder {
	builder.apiReq.PathParams.Set("calendar_id", fmt.Sprint(calendarId))
	return builder
}

func (builder *DeleteCalendarReqBuilder) Build() *DeleteCalendarReq {
	req := &DeleteCalendarReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	return req
}

type DeleteCalendarReq struct {
	apiReq *larkcore.ApiReq
}

type DeleteCalendarResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *DeleteCalendarResp) Success() bool {
	return resp.Code == 0
}

type GetCalendarReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewGetCalendarReqBuilder() *GetCalendarReqBuilder {
	builder := &GetCalendarReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 日历ID。参见[日历ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)
//
// 示例值：feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
func (builder *GetCalendarReqBuilder) CalendarId(calendarId string) *GetCalendarReqBuilder {
	builder.apiReq.PathParams.Set("calendar_id", fmt.Sprint(calendarId))
	return builder
}

func (builder *GetCalendarReqBuilder) Build() *GetCalendarReq {
	req := &GetCalendarReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	return req
}

type GetCalendarReq struct {
	apiReq *larkcore.ApiReq
}

type GetCalendarRespData struct {
	CalendarId *string `json:"calendar_id,omitempty"` // 日历OpenId

	Summary *string `json:"summary,omitempty"` // 日历标题

	Description *string `json:"description,omitempty"` // 日历描述

	Permissions *string `json:"permissions,omitempty"` // 权限

	Color *int `json:"color,omitempty"` // 日历颜色，颜色RGB值的int32表示。客户端展示时会映射到色板上最接近的一种颜色。仅对当前身份生效

	Type *string `json:"type,omitempty"` // 日历类型

	SummaryAlias *string `json:"summary_alias,omitempty"` // 日历备注名，修改或添加后仅对当前身份生效

	IsDeleted *bool `json:"is_deleted,omitempty"` // 对于当前身份，日历是否已经被标记为删除

	IsThirdParty *bool `json:"is_third_party,omitempty"` // 当前日历是否是第三方数据；三方日历及日程只支持读，不支持写入

	Role *string `json:"role,omitempty"` // 当前身份对于该日历的访问权限
}

type GetCalendarResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *GetCalendarRespData `json:"data"` // 业务数据
}

func (resp *GetCalendarResp) Success() bool {
	return resp.Code == 0
}

type ListCalendarReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewListCalendarReqBuilder() *ListCalendarReqBuilder {
	builder := &ListCalendarReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 一次请求要求返回最大数量，默认500，取值范围为[50. 1000]
//
// 示例值：50
func (builder *ListCalendarReqBuilder) PageSize(pageSize int) *ListCalendarReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 上次请求Response返回的分页标记，首次请求时为空
//
// 示例值：ListCalendarsPageToken_xxx
func (builder *ListCalendarReqBuilder) PageToken(pageToken string) *ListCalendarReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

// 上次请求Response返回的增量同步标记，分页请求未结束时为空
//
// 示例值：ListCalendarsSyncToken_xxx
func (builder *ListCalendarReqBuilder) SyncToken(syncToken string) *ListCalendarReqBuilder {
	builder.apiReq.QueryParams.Set("sync_token", fmt.Sprint(syncToken))
	return builder
}

func (builder *ListCalendarReqBuilder) Build() *ListCalendarReq {
	req := &ListCalendarReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type ListCalendarReq struct {
	apiReq *larkcore.ApiReq
}

type ListCalendarRespData struct {
	HasMore *bool `json:"has_more,omitempty"` // 是否还有更多数据

	PageToken *string `json:"page_token,omitempty"` // 下次请求需要带上的分页标记，90 天有效期

	SyncToken *string `json:"sync_token,omitempty"` // 下次请求需要带上的增量同步标记，90 天有效期

	CalendarList []*Calendar `json:"calendar_list,omitempty"` // 分页加载的日历数据列表
}

type ListCalendarResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ListCalendarRespData `json:"data"` // 业务数据
}

func (resp *ListCalendarResp) Success() bool {
	return resp.Code == 0
}

type MgetCalendarReqBodyBuilder struct {
	calendarIds     []string // 日历ID列表
	calendarIdsFlag bool
}

func NewMgetCalendarReqBodyBuilder() *MgetCalendarReqBodyBuilder {
	builder := &MgetCalendarReqBodyBuilder{}
	return builder
}

// 日历ID列表
//
//示例值：
func (builder *MgetCalendarReqBodyBuilder) CalendarIds(calendarIds []string) *MgetCalendarReqBodyBuilder {
	builder.calendarIds = calendarIds
	builder.calendarIdsFlag = true
	return builder
}

func (builder *MgetCalendarReqBodyBuilder) Build() *MgetCalendarReqBody {
	req := &MgetCalendarReqBody{}
	if builder.calendarIdsFlag {
		req.CalendarIds = builder.calendarIds
	}
	return req
}

type MgetCalendarPathReqBodyBuilder struct {
	calendarIds     []string
	calendarIdsFlag bool
}

func NewMgetCalendarPathReqBodyBuilder() *MgetCalendarPathReqBodyBuilder {
	builder := &MgetCalendarPathReqBodyBuilder{}
	return builder
}

// 日历ID列表
//
// 示例值：
func (builder *MgetCalendarPathReqBodyBuilder) CalendarIds(calendarIds []string) *MgetCalendarPathReqBodyBuilder {
	builder.calendarIds = calendarIds
	builder.calendarIdsFlag = true
	return builder
}

func (builder *MgetCalendarPathReqBodyBuilder) Build() (*MgetCalendarReqBody, error) {
	req := &MgetCalendarReqBody{}
	if builder.calendarIdsFlag {
		req.CalendarIds = builder.calendarIds
	}
	return req, nil
}

type MgetCalendarReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *MgetCalendarReqBody
}

func NewMgetCalendarReqBuilder() *MgetCalendarReqBuilder {
	builder := &MgetCalendarReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *MgetCalendarReqBuilder) UserIdType(userIdType string) *MgetCalendarReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

//
func (builder *MgetCalendarReqBuilder) Body(body *MgetCalendarReqBody) *MgetCalendarReqBuilder {
	builder.body = body
	return builder
}

func (builder *MgetCalendarReqBuilder) Build() *MgetCalendarReq {
	req := &MgetCalendarReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.body
	return req
}

type MgetCalendarReqBody struct {
	CalendarIds []string `json:"calendar_ids,omitempty"` // 日历ID列表
}

type MgetCalendarReq struct {
	apiReq *larkcore.ApiReq
	Body   *MgetCalendarReqBody `body:""`
}

type MgetCalendarRespData struct {
	Calendars []*Calendar `json:"calendars,omitempty"` // 日历列表
}

type MgetCalendarResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *MgetCalendarRespData `json:"data"` // 业务数据
}

func (resp *MgetCalendarResp) Success() bool {
	return resp.Code == 0
}

type PatchCalendarReqBuilder struct {
	apiReq   *larkcore.ApiReq
	calendar *Calendar
}

func NewPatchCalendarReqBuilder() *PatchCalendarReqBuilder {
	builder := &PatchCalendarReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 日历ID。参见[日历ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)
//
// 示例值：feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
func (builder *PatchCalendarReqBuilder) CalendarId(calendarId string) *PatchCalendarReqBuilder {
	builder.apiReq.PathParams.Set("calendar_id", fmt.Sprint(calendarId))
	return builder
}

// 该接口用于以当前身份（应用 / 用户）修改日历信息。;;身份由 Header Authorization 的 Token 类型决定。
func (builder *PatchCalendarReqBuilder) Calendar(calendar *Calendar) *PatchCalendarReqBuilder {
	builder.calendar = calendar
	return builder
}

func (builder *PatchCalendarReqBuilder) Build() *PatchCalendarReq {
	req := &PatchCalendarReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.calendar
	return req
}

type PatchCalendarReq struct {
	apiReq   *larkcore.ApiReq
	Calendar *Calendar `body:""`
}

type PatchCalendarRespData struct {
	Calendar *Calendar `json:"calendar,omitempty"` // 更新后的日历实体
}

type PatchCalendarResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *PatchCalendarRespData `json:"data"` // 业务数据
}

func (resp *PatchCalendarResp) Success() bool {
	return resp.Code == 0
}

type PrimaryCalendarReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewPrimaryCalendarReqBuilder() *PrimaryCalendarReqBuilder {
	builder := &PrimaryCalendarReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *PrimaryCalendarReqBuilder) UserIdType(userIdType string) *PrimaryCalendarReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

func (builder *PrimaryCalendarReqBuilder) Build() *PrimaryCalendarReq {
	req := &PrimaryCalendarReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type PrimaryCalendarReq struct {
	apiReq *larkcore.ApiReq
}

type PrimaryCalendarRespData struct {
	Calendars []*UserCalendar `json:"calendars,omitempty"` // 主日历列表
}

type PrimaryCalendarResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *PrimaryCalendarRespData `json:"data"` // 业务数据
}

func (resp *PrimaryCalendarResp) Success() bool {
	return resp.Code == 0
}

type PrimarysCalendarReqBodyBuilder struct {
	userIds     []string // 用户ID列表
	userIdsFlag bool
}

func NewPrimarysCalendarReqBodyBuilder() *PrimarysCalendarReqBodyBuilder {
	builder := &PrimarysCalendarReqBodyBuilder{}
	return builder
}

// 用户ID列表
//
//示例值：
func (builder *PrimarysCalendarReqBodyBuilder) UserIds(userIds []string) *PrimarysCalendarReqBodyBuilder {
	builder.userIds = userIds
	builder.userIdsFlag = true
	return builder
}

func (builder *PrimarysCalendarReqBodyBuilder) Build() *PrimarysCalendarReqBody {
	req := &PrimarysCalendarReqBody{}
	if builder.userIdsFlag {
		req.UserIds = builder.userIds
	}
	return req
}

type PrimarysCalendarPathReqBodyBuilder struct {
	userIds     []string
	userIdsFlag bool
}

func NewPrimarysCalendarPathReqBodyBuilder() *PrimarysCalendarPathReqBodyBuilder {
	builder := &PrimarysCalendarPathReqBodyBuilder{}
	return builder
}

// 用户ID列表
//
// 示例值：
func (builder *PrimarysCalendarPathReqBodyBuilder) UserIds(userIds []string) *PrimarysCalendarPathReqBodyBuilder {
	builder.userIds = userIds
	builder.userIdsFlag = true
	return builder
}

func (builder *PrimarysCalendarPathReqBodyBuilder) Build() (*PrimarysCalendarReqBody, error) {
	req := &PrimarysCalendarReqBody{}
	if builder.userIdsFlag {
		req.UserIds = builder.userIds
	}
	return req, nil
}

type PrimarysCalendarReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *PrimarysCalendarReqBody
}

func NewPrimarysCalendarReqBuilder() *PrimarysCalendarReqBuilder {
	builder := &PrimarysCalendarReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *PrimarysCalendarReqBuilder) UserIdType(userIdType string) *PrimarysCalendarReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

//
func (builder *PrimarysCalendarReqBuilder) Body(body *PrimarysCalendarReqBody) *PrimarysCalendarReqBuilder {
	builder.body = body
	return builder
}

func (builder *PrimarysCalendarReqBuilder) Build() *PrimarysCalendarReq {
	req := &PrimarysCalendarReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.body
	return req
}

type PrimarysCalendarReqBody struct {
	UserIds []string `json:"user_ids,omitempty"` // 用户ID列表
}

type PrimarysCalendarReq struct {
	apiReq *larkcore.ApiReq
	Body   *PrimarysCalendarReqBody `body:""`
}

type PrimarysCalendarRespData struct {
	Calendars []*UserCalendar `json:"calendars,omitempty"` // 主日历列表
}

type PrimarysCalendarResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *PrimarysCalendarRespData `json:"data"` // 业务数据
}

func (resp *PrimarysCalendarResp) Success() bool {
	return resp.Code == 0
}

type SearchCalendarReqBodyBuilder struct {
	query     string // 搜索关键字
	queryFlag bool
}

func NewSearchCalendarReqBodyBuilder() *SearchCalendarReqBodyBuilder {
	builder := &SearchCalendarReqBodyBuilder{}
	return builder
}

// 搜索关键字
//
//示例值：query words
func (builder *SearchCalendarReqBodyBuilder) Query(query string) *SearchCalendarReqBodyBuilder {
	builder.query = query
	builder.queryFlag = true
	return builder
}

func (builder *SearchCalendarReqBodyBuilder) Build() *SearchCalendarReqBody {
	req := &SearchCalendarReqBody{}
	if builder.queryFlag {
		req.Query = &builder.query
	}
	return req
}

type SearchCalendarPathReqBodyBuilder struct {
	query     string
	queryFlag bool
}

func NewSearchCalendarPathReqBodyBuilder() *SearchCalendarPathReqBodyBuilder {
	builder := &SearchCalendarPathReqBodyBuilder{}
	return builder
}

// 搜索关键字
//
// 示例值：query words
func (builder *SearchCalendarPathReqBodyBuilder) Query(query string) *SearchCalendarPathReqBodyBuilder {
	builder.query = query
	builder.queryFlag = true
	return builder
}

func (builder *SearchCalendarPathReqBodyBuilder) Build() (*SearchCalendarReqBody, error) {
	req := &SearchCalendarReqBody{}
	if builder.queryFlag {
		req.Query = &builder.query
	}
	return req, nil
}

type SearchCalendarReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *SearchCalendarReqBody
	limit  int // 最大返回多少记录，当使用迭代器访问时才有效
}

func NewSearchCalendarReqBuilder() *SearchCalendarReqBuilder {
	builder := &SearchCalendarReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 最大返回多少记录，当使用迭代器访问时才有效
func (builder *SearchCalendarReqBuilder) Limit(limit int) *SearchCalendarReqBuilder {
	builder.limit = limit
	return builder
}

// 分页标记，第一次请求不填，表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该page_token 获取查询结果
//
// 示例值：10
func (builder *SearchCalendarReqBuilder) PageToken(pageToken string) *SearchCalendarReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

// 分页大小
//
// 示例值：10
func (builder *SearchCalendarReqBuilder) PageSize(pageSize int) *SearchCalendarReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 该接口用于通过关键字查询公共日历或用户主日历。
func (builder *SearchCalendarReqBuilder) Body(body *SearchCalendarReqBody) *SearchCalendarReqBuilder {
	builder.body = body
	return builder
}

func (builder *SearchCalendarReqBuilder) Build() *SearchCalendarReq {
	req := &SearchCalendarReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.Limit = builder.limit
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.body
	return req
}

type SearchCalendarReqBody struct {
	Query *string `json:"query,omitempty"` // 搜索关键字
}

type SearchCalendarReq struct {
	apiReq *larkcore.ApiReq
	Body   *SearchCalendarReqBody `body:""`
	Limit  int                    // 最多返回多少记录，只有在使用迭代器访问时，才有效

}

type SearchCalendarRespData struct {
	Items []*Calendar `json:"items,omitempty"` // 搜索命中的日历列表

	PageToken *string `json:"page_token,omitempty"` // 下次请求需要带上的分页标记
}

type SearchCalendarResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *SearchCalendarRespData `json:"data"` // 业务数据
}

func (resp *SearchCalendarResp) Success() bool {
	return resp.Code == 0
}

type SubscribeCalendarReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewSubscribeCalendarReqBuilder() *SubscribeCalendarReqBuilder {
	builder := &SubscribeCalendarReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 日历ID。参见[日历ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)
//
// 示例值：feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
func (builder *SubscribeCalendarReqBuilder) CalendarId(calendarId string) *SubscribeCalendarReqBuilder {
	builder.apiReq.PathParams.Set("calendar_id", fmt.Sprint(calendarId))
	return builder
}

func (builder *SubscribeCalendarReqBuilder) Build() *SubscribeCalendarReq {
	req := &SubscribeCalendarReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	return req
}

type SubscribeCalendarReq struct {
	apiReq *larkcore.ApiReq
}

type SubscribeCalendarRespData struct {
	Calendar *Calendar `json:"calendar,omitempty"` // 订阅的日历实体
}

type SubscribeCalendarResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *SubscribeCalendarRespData `json:"data"` // 业务数据
}

func (resp *SubscribeCalendarResp) Success() bool {
	return resp.Code == 0
}

type SubscriptionCalendarResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *SubscriptionCalendarResp) Success() bool {
	return resp.Code == 0
}

type UnsubscribeCalendarReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewUnsubscribeCalendarReqBuilder() *UnsubscribeCalendarReqBuilder {
	builder := &UnsubscribeCalendarReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 日历ID。参见[日历ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)
//
// 示例值：feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
func (builder *UnsubscribeCalendarReqBuilder) CalendarId(calendarId string) *UnsubscribeCalendarReqBuilder {
	builder.apiReq.PathParams.Set("calendar_id", fmt.Sprint(calendarId))
	return builder
}

func (builder *UnsubscribeCalendarReqBuilder) Build() *UnsubscribeCalendarReq {
	req := &UnsubscribeCalendarReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	return req
}

type UnsubscribeCalendarReq struct {
	apiReq *larkcore.ApiReq
}

type UnsubscribeCalendarResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *UnsubscribeCalendarResp) Success() bool {
	return resp.Code == 0
}

type UnsubscriptionCalendarResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *UnsubscriptionCalendarResp) Success() bool {
	return resp.Code == 0
}

type CreateCalendarAclReqBuilder struct {
	apiReq      *larkcore.ApiReq
	calendarAcl *CalendarAcl
}

func NewCreateCalendarAclReqBuilder() *CreateCalendarAclReqBuilder {
	builder := &CreateCalendarAclReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 日历ID。参见[日历ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)
//
// 示例值：feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
func (builder *CreateCalendarAclReqBuilder) CalendarId(calendarId string) *CreateCalendarAclReqBuilder {
	builder.apiReq.PathParams.Set("calendar_id", fmt.Sprint(calendarId))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *CreateCalendarAclReqBuilder) UserIdType(userIdType string) *CreateCalendarAclReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

// 该接口用于以当前身份（应用 / 用户）给日历添加访问控制权限，即日历成员。;;身份由 Header Authorization 的 Token 类型决定。
func (builder *CreateCalendarAclReqBuilder) CalendarAcl(calendarAcl *CalendarAcl) *CreateCalendarAclReqBuilder {
	builder.calendarAcl = calendarAcl
	return builder
}

func (builder *CreateCalendarAclReqBuilder) Build() *CreateCalendarAclReq {
	req := &CreateCalendarAclReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.calendarAcl
	return req
}

type CreateCalendarAclReq struct {
	apiReq      *larkcore.ApiReq
	CalendarAcl *CalendarAcl `body:""`
}

type CreateCalendarAclRespData struct {
	AclId *string `json:"acl_id,omitempty"` // acl资源ID

	Role *string `json:"role,omitempty"` // 对日历的访问权限

	Scope *AclScope `json:"scope,omitempty"` // 权限范围
}

type CreateCalendarAclResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *CreateCalendarAclRespData `json:"data"` // 业务数据
}

func (resp *CreateCalendarAclResp) Success() bool {
	return resp.Code == 0
}

type DeleteCalendarAclReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewDeleteCalendarAclReqBuilder() *DeleteCalendarAclReqBuilder {
	builder := &DeleteCalendarAclReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 日历ID。参见[日历ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)
//
// 示例值：feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
func (builder *DeleteCalendarAclReqBuilder) CalendarId(calendarId string) *DeleteCalendarAclReqBuilder {
	builder.apiReq.PathParams.Set("calendar_id", fmt.Sprint(calendarId))
	return builder
}

// acl资源ID。参见[ACL ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-acl/introduction)
//
// 示例值：user_xxxxxx
func (builder *DeleteCalendarAclReqBuilder) AclId(aclId string) *DeleteCalendarAclReqBuilder {
	builder.apiReq.PathParams.Set("acl_id", fmt.Sprint(aclId))
	return builder
}

func (builder *DeleteCalendarAclReqBuilder) Build() *DeleteCalendarAclReq {
	req := &DeleteCalendarAclReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	return req
}

type DeleteCalendarAclReq struct {
	apiReq *larkcore.ApiReq
}

type DeleteCalendarAclResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *DeleteCalendarAclResp) Success() bool {
	return resp.Code == 0
}

type ListCalendarAclReqBuilder struct {
	apiReq *larkcore.ApiReq
	limit  int // 最大返回多少记录，当使用迭代器访问时才有效
}

func NewListCalendarAclReqBuilder() *ListCalendarAclReqBuilder {
	builder := &ListCalendarAclReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 最大返回多少记录，当使用迭代器访问时才有效
func (builder *ListCalendarAclReqBuilder) Limit(limit int) *ListCalendarAclReqBuilder {
	builder.limit = limit
	return builder
}

// 日历ID。参见[日历ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)
//
// 示例值：feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
func (builder *ListCalendarAclReqBuilder) CalendarId(calendarId string) *ListCalendarAclReqBuilder {
	builder.apiReq.PathParams.Set("calendar_id", fmt.Sprint(calendarId))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *ListCalendarAclReqBuilder) UserIdType(userIdType string) *ListCalendarAclReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

// 分页标记，第一次请求不填，表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该page_token 获取查询结果
//
// 示例值：xxx
func (builder *ListCalendarAclReqBuilder) PageToken(pageToken string) *ListCalendarAclReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

// 分页大小
//
// 示例值：10，小于10取10
func (builder *ListCalendarAclReqBuilder) PageSize(pageSize int) *ListCalendarAclReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

func (builder *ListCalendarAclReqBuilder) Build() *ListCalendarAclReq {
	req := &ListCalendarAclReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.Limit = builder.limit
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type ListCalendarAclReq struct {
	apiReq *larkcore.ApiReq
	Limit  int // 最多返回多少记录，只有在使用迭代器访问时，才有效

}

type ListCalendarAclRespData struct {
	Acls []*CalendarAcl `json:"acls,omitempty"` // 入参日历对应的acl列表

	HasMore *bool `json:"has_more,omitempty"` // 是否有下一页数据

	PageToken *string `json:"page_token,omitempty"` // 下次请求需要带上的分页标记，90 天有效期
}

type ListCalendarAclResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ListCalendarAclRespData `json:"data"` // 业务数据
}

func (resp *ListCalendarAclResp) Success() bool {
	return resp.Code == 0
}

type SubscriptionCalendarAclReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewSubscriptionCalendarAclReqBuilder() *SubscriptionCalendarAclReqBuilder {
	builder := &SubscriptionCalendarAclReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 日历ID。参见[日历ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)
//
// 示例值：feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
func (builder *SubscriptionCalendarAclReqBuilder) CalendarId(calendarId string) *SubscriptionCalendarAclReqBuilder {
	builder.apiReq.PathParams.Set("calendar_id", fmt.Sprint(calendarId))
	return builder
}

func (builder *SubscriptionCalendarAclReqBuilder) Build() *SubscriptionCalendarAclReq {
	req := &SubscriptionCalendarAclReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	return req
}

type SubscriptionCalendarAclReq struct {
	apiReq *larkcore.ApiReq
}

type SubscriptionCalendarAclResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *SubscriptionCalendarAclResp) Success() bool {
	return resp.Code == 0
}

type UnsubscriptionCalendarAclReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewUnsubscriptionCalendarAclReqBuilder() *UnsubscriptionCalendarAclReqBuilder {
	builder := &UnsubscriptionCalendarAclReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 日历ID。参见[日历ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)
//
// 示例值：feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
func (builder *UnsubscriptionCalendarAclReqBuilder) CalendarId(calendarId string) *UnsubscriptionCalendarAclReqBuilder {
	builder.apiReq.PathParams.Set("calendar_id", fmt.Sprint(calendarId))
	return builder
}

func (builder *UnsubscriptionCalendarAclReqBuilder) Build() *UnsubscriptionCalendarAclReq {
	req := &UnsubscriptionCalendarAclReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	return req
}

type UnsubscriptionCalendarAclReq struct {
	apiReq *larkcore.ApiReq
}

type UnsubscriptionCalendarAclResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *UnsubscriptionCalendarAclResp) Success() bool {
	return resp.Code == 0
}

type CreateCalendarEventReqBuilder struct {
	apiReq        *larkcore.ApiReq
	calendarEvent *CalendarEvent
}

func NewCreateCalendarEventReqBuilder() *CreateCalendarEventReqBuilder {
	builder := &CreateCalendarEventReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 日历ID。参见[日历ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)
//
// 示例值：feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
func (builder *CreateCalendarEventReqBuilder) CalendarId(calendarId string) *CreateCalendarEventReqBuilder {
	builder.apiReq.PathParams.Set("calendar_id", fmt.Sprint(calendarId))
	return builder
}

// 幂等唯一key
//
// 示例值：25fdf41b-8c80-2ce1-e94c-de8b5e7aa7e6
func (builder *CreateCalendarEventReqBuilder) IdempotencyKey(idempotencyKey string) *CreateCalendarEventReqBuilder {
	builder.apiReq.QueryParams.Set("idempotency_key", fmt.Sprint(idempotencyKey))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *CreateCalendarEventReqBuilder) UserIdType(userIdType string) *CreateCalendarEventReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

// 该接口用于以当前身份（应用 / 用户）在日历上创建一个日程。;;身份由 Header Authorization 的 Token 类型决定。
func (builder *CreateCalendarEventReqBuilder) CalendarEvent(calendarEvent *CalendarEvent) *CreateCalendarEventReqBuilder {
	builder.calendarEvent = calendarEvent
	return builder
}

func (builder *CreateCalendarEventReqBuilder) Build() *CreateCalendarEventReq {
	req := &CreateCalendarEventReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.calendarEvent
	return req
}

type CreateCalendarEventReq struct {
	apiReq        *larkcore.ApiReq
	CalendarEvent *CalendarEvent `body:""`
}

type CreateCalendarEventRespData struct {
	Event *CalendarEvent `json:"event,omitempty"` // 新创建的日程实体
}

type CreateCalendarEventResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *CreateCalendarEventRespData `json:"data"` // 业务数据
}

func (resp *CreateCalendarEventResp) Success() bool {
	return resp.Code == 0
}

type DeleteCalendarEventReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewDeleteCalendarEventReqBuilder() *DeleteCalendarEventReqBuilder {
	builder := &DeleteCalendarEventReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 日历ID。参见[日历ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)
//
// 示例值：feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
func (builder *DeleteCalendarEventReqBuilder) CalendarId(calendarId string) *DeleteCalendarEventReqBuilder {
	builder.apiReq.PathParams.Set("calendar_id", fmt.Sprint(calendarId))
	return builder
}

// 日程ID。参见[日程ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/introduction)
//
// 示例值：xxxxxxxxx_0
func (builder *DeleteCalendarEventReqBuilder) EventId(eventId string) *DeleteCalendarEventReqBuilder {
	builder.apiReq.PathParams.Set("event_id", fmt.Sprint(eventId))
	return builder
}

// 删除日程是否给日程参与人发送bot通知，默认为true
//
// 示例值：
func (builder *DeleteCalendarEventReqBuilder) NeedNotification(needNotification string) *DeleteCalendarEventReqBuilder {
	builder.apiReq.QueryParams.Set("need_notification", fmt.Sprint(needNotification))
	return builder
}

func (builder *DeleteCalendarEventReqBuilder) Build() *DeleteCalendarEventReq {
	req := &DeleteCalendarEventReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type DeleteCalendarEventReq struct {
	apiReq *larkcore.ApiReq
}

type DeleteCalendarEventResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *DeleteCalendarEventResp) Success() bool {
	return resp.Code == 0
}

type GetCalendarEventReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewGetCalendarEventReqBuilder() *GetCalendarEventReqBuilder {
	builder := &GetCalendarEventReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 日历ID。参见[日历ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)
//
// 示例值：feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
func (builder *GetCalendarEventReqBuilder) CalendarId(calendarId string) *GetCalendarEventReqBuilder {
	builder.apiReq.PathParams.Set("calendar_id", fmt.Sprint(calendarId))
	return builder
}

// 日程ID。参见[日程ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/introduction)
//
// 示例值：xxxxxxxxx_0
func (builder *GetCalendarEventReqBuilder) EventId(eventId string) *GetCalendarEventReqBuilder {
	builder.apiReq.PathParams.Set("event_id", fmt.Sprint(eventId))
	return builder
}

// 是否需要返回会前设置
//
// 示例值：false
func (builder *GetCalendarEventReqBuilder) NeedMeetingSettings(needMeetingSettings bool) *GetCalendarEventReqBuilder {
	builder.apiReq.QueryParams.Set("need_meeting_settings", fmt.Sprint(needMeetingSettings))
	return builder
}

// 是否需要返回参与人信息
//
// 示例值：false
func (builder *GetCalendarEventReqBuilder) NeedAttendee(needAttendee bool) *GetCalendarEventReqBuilder {
	builder.apiReq.QueryParams.Set("need_attendee", fmt.Sprint(needAttendee))
	return builder
}

// 返回的最大参与人数量
//
// 示例值：false
func (builder *GetCalendarEventReqBuilder) MaxAttendeeNum(maxAttendeeNum int) *GetCalendarEventReqBuilder {
	builder.apiReq.QueryParams.Set("max_attendee_num", fmt.Sprint(maxAttendeeNum))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *GetCalendarEventReqBuilder) UserIdType(userIdType string) *GetCalendarEventReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

func (builder *GetCalendarEventReqBuilder) Build() *GetCalendarEventReq {
	req := &GetCalendarEventReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type GetCalendarEventReq struct {
	apiReq *larkcore.ApiReq
}

type GetCalendarEventRespData struct {
	Event *CalendarEvent `json:"event,omitempty"` // 日程实体
}

type GetCalendarEventResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *GetCalendarEventRespData `json:"data"` // 业务数据
}

func (resp *GetCalendarEventResp) Success() bool {
	return resp.Code == 0
}

type InstanceViewCalendarEventReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewInstanceViewCalendarEventReqBuilder() *InstanceViewCalendarEventReqBuilder {
	builder := &InstanceViewCalendarEventReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 日历ID
//
// 示例值：feishu.cn_HF9U2MbibE8PPpjro6xjqa@group.calendar.feishu.cn
func (builder *InstanceViewCalendarEventReqBuilder) CalendarId(calendarId string) *InstanceViewCalendarEventReqBuilder {
	builder.apiReq.PathParams.Set("calendar_id", fmt.Sprint(calendarId))
	return builder
}

// 日程开始Unix时间戳，单位为秒
//
// 示例值：1631777271
func (builder *InstanceViewCalendarEventReqBuilder) StartTime(startTime string) *InstanceViewCalendarEventReqBuilder {
	builder.apiReq.QueryParams.Set("start_time", fmt.Sprint(startTime))
	return builder
}

// 日程结束Unix时间戳，单位为秒
//
// 示例值：1631777271
func (builder *InstanceViewCalendarEventReqBuilder) EndTime(endTime string) *InstanceViewCalendarEventReqBuilder {
	builder.apiReq.QueryParams.Set("end_time", fmt.Sprint(endTime))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *InstanceViewCalendarEventReqBuilder) UserIdType(userIdType string) *InstanceViewCalendarEventReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

func (builder *InstanceViewCalendarEventReqBuilder) Build() *InstanceViewCalendarEventReq {
	req := &InstanceViewCalendarEventReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type InstanceViewCalendarEventReq struct {
	apiReq *larkcore.ApiReq
}

type InstanceViewCalendarEventRespData struct {
	Items []*Instance `json:"items,omitempty"` // 日程instance列表
}

type InstanceViewCalendarEventResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *InstanceViewCalendarEventRespData `json:"data"` // 业务数据
}

func (resp *InstanceViewCalendarEventResp) Success() bool {
	return resp.Code == 0
}

type InstancesCalendarEventReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewInstancesCalendarEventReqBuilder() *InstancesCalendarEventReqBuilder {
	builder := &InstancesCalendarEventReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 日历资源ID
//
// 示例值：feishu.cn_HF9U2MbibE8PPpjro6xjqa@group.calendar.feishu.cn
func (builder *InstancesCalendarEventReqBuilder) CalendarId(calendarId string) *InstancesCalendarEventReqBuilder {
	builder.apiReq.PathParams.Set("calendar_id", fmt.Sprint(calendarId))
	return builder
}

// 日程资源ID
//
// 示例值：75d28f9b-e35c-4230-8a83-4a661497db54_0
func (builder *InstancesCalendarEventReqBuilder) EventId(eventId string) *InstancesCalendarEventReqBuilder {
	builder.apiReq.PathParams.Set("event_id", fmt.Sprint(eventId))
	return builder
}

// 日程实例开始Unix时间戳，单位为秒,日程的end_time的下限（不包含）
//
// 示例值：1631777271
func (builder *InstancesCalendarEventReqBuilder) StartTime(startTime string) *InstancesCalendarEventReqBuilder {
	builder.apiReq.QueryParams.Set("start_time", fmt.Sprint(startTime))
	return builder
}

// 日程实例结束Unix时间戳，单位为秒,日程的start_time上限（不包含）
//
// 示例值：1631777271
func (builder *InstancesCalendarEventReqBuilder) EndTime(endTime string) *InstancesCalendarEventReqBuilder {
	builder.apiReq.QueryParams.Set("end_time", fmt.Sprint(endTime))
	return builder
}

// 分页大小
//
// 示例值：
func (builder *InstancesCalendarEventReqBuilder) PageSize(pageSize int) *InstancesCalendarEventReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 分页标记，第一次请求不填，表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该 page_token 获取查询结果
//
// 示例值：
func (builder *InstancesCalendarEventReqBuilder) PageToken(pageToken string) *InstancesCalendarEventReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

func (builder *InstancesCalendarEventReqBuilder) Build() *InstancesCalendarEventReq {
	req := &InstancesCalendarEventReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type InstancesCalendarEventReq struct {
	apiReq *larkcore.ApiReq
}

type InstancesCalendarEventRespData struct {
	Items []*Instance `json:"items,omitempty"` // instances实例

	PageToken *string `json:"page_token,omitempty"` //

	HasMore *bool `json:"has_more,omitempty"` //
}

type InstancesCalendarEventResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *InstancesCalendarEventRespData `json:"data"` // 业务数据
}

func (resp *InstancesCalendarEventResp) Success() bool {
	return resp.Code == 0
}

type ListCalendarEventReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewListCalendarEventReqBuilder() *ListCalendarEventReqBuilder {
	builder := &ListCalendarEventReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 日历ID。参见[日历ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)
//
// 示例值：feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
func (builder *ListCalendarEventReqBuilder) CalendarId(calendarId string) *ListCalendarEventReqBuilder {
	builder.apiReq.PathParams.Set("calendar_id", fmt.Sprint(calendarId))
	return builder
}

// 一次请求要求返回最大数量，默认500，取值范围为[50, 1000]
//
// 示例值：50
func (builder *ListCalendarEventReqBuilder) PageSize(pageSize int) *ListCalendarEventReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 拉取anchor_time之后的日程，为timestamp
//
// 示例值：1609430400
func (builder *ListCalendarEventReqBuilder) AnchorTime(anchorTime string) *ListCalendarEventReqBuilder {
	builder.apiReq.QueryParams.Set("anchor_time", fmt.Sprint(anchorTime))
	return builder
}

// 上次请求Response返回的分页标记，首次请求时为空
//
// 示例值：ListCalendarsPageToken_1632452910_1632539310
func (builder *ListCalendarEventReqBuilder) PageToken(pageToken string) *ListCalendarEventReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

// 上次请求Response返回的增量同步标记，分页请求未结束时为空
//
// 示例值：ListCalendarsSyncToken_1632452910
func (builder *ListCalendarEventReqBuilder) SyncToken(syncToken string) *ListCalendarEventReqBuilder {
	builder.apiReq.QueryParams.Set("sync_token", fmt.Sprint(syncToken))
	return builder
}

// 日程开始Unix时间戳，单位为秒
//
// 示例值：1631777271
func (builder *ListCalendarEventReqBuilder) StartTime(startTime string) *ListCalendarEventReqBuilder {
	builder.apiReq.QueryParams.Set("start_time", fmt.Sprint(startTime))
	return builder
}

// 日程结束Unix时间戳，单位为秒
//
// 示例值：1631777271
func (builder *ListCalendarEventReqBuilder) EndTime(endTime string) *ListCalendarEventReqBuilder {
	builder.apiReq.QueryParams.Set("end_time", fmt.Sprint(endTime))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *ListCalendarEventReqBuilder) UserIdType(userIdType string) *ListCalendarEventReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

func (builder *ListCalendarEventReqBuilder) Build() *ListCalendarEventReq {
	req := &ListCalendarEventReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type ListCalendarEventReq struct {
	apiReq *larkcore.ApiReq
}

type ListCalendarEventRespData struct {
	HasMore *bool `json:"has_more,omitempty"` // 是否还有更多数据

	PageToken *string `json:"page_token,omitempty"` // 下次请求需要带上的分页标记

	SyncToken *string `json:"sync_token,omitempty"` // 下次请求需要带上的增量同步标记

	Items []*CalendarEvent `json:"items,omitempty"` // 日程列表
}

type ListCalendarEventResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ListCalendarEventRespData `json:"data"` // 业务数据
}

func (resp *ListCalendarEventResp) Success() bool {
	return resp.Code == 0
}

type PatchCalendarEventReqBuilder struct {
	apiReq        *larkcore.ApiReq
	calendarEvent *CalendarEvent
}

func NewPatchCalendarEventReqBuilder() *PatchCalendarEventReqBuilder {
	builder := &PatchCalendarEventReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 日历ID。参见[日历ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)
//
// 示例值：feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
func (builder *PatchCalendarEventReqBuilder) CalendarId(calendarId string) *PatchCalendarEventReqBuilder {
	builder.apiReq.PathParams.Set("calendar_id", fmt.Sprint(calendarId))
	return builder
}

// 日程ID。参见[日程ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/introduction)
//
// 示例值：00592a0e-7edf-4678-bc9d-1b77383ef08e_0
func (builder *PatchCalendarEventReqBuilder) EventId(eventId string) *PatchCalendarEventReqBuilder {
	builder.apiReq.PathParams.Set("event_id", fmt.Sprint(eventId))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *PatchCalendarEventReqBuilder) UserIdType(userIdType string) *PatchCalendarEventReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

// 该接口用于以当前身份（应用 / 用户）更新日历上的一个日程。;;身份由 Header Authorization 的 Token 类型决定。
func (builder *PatchCalendarEventReqBuilder) CalendarEvent(calendarEvent *CalendarEvent) *PatchCalendarEventReqBuilder {
	builder.calendarEvent = calendarEvent
	return builder
}

func (builder *PatchCalendarEventReqBuilder) Build() *PatchCalendarEventReq {
	req := &PatchCalendarEventReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.calendarEvent
	return req
}

type PatchCalendarEventReq struct {
	apiReq        *larkcore.ApiReq
	CalendarEvent *CalendarEvent `body:""`
}

type PatchCalendarEventRespData struct {
	Event *CalendarEvent `json:"event,omitempty"` // 更新后的日程实体
}

type PatchCalendarEventResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *PatchCalendarEventRespData `json:"data"` // 业务数据
}

func (resp *PatchCalendarEventResp) Success() bool {
	return resp.Code == 0
}

type ReplyCalendarEventReqBodyBuilder struct {
	rsvpStatus     string // rsvp-日程状态
	rsvpStatusFlag bool
}

func NewReplyCalendarEventReqBodyBuilder() *ReplyCalendarEventReqBodyBuilder {
	builder := &ReplyCalendarEventReqBodyBuilder{}
	return builder
}

// rsvp-日程状态
//
//示例值：accept
func (builder *ReplyCalendarEventReqBodyBuilder) RsvpStatus(rsvpStatus string) *ReplyCalendarEventReqBodyBuilder {
	builder.rsvpStatus = rsvpStatus
	builder.rsvpStatusFlag = true
	return builder
}

func (builder *ReplyCalendarEventReqBodyBuilder) Build() *ReplyCalendarEventReqBody {
	req := &ReplyCalendarEventReqBody{}
	if builder.rsvpStatusFlag {
		req.RsvpStatus = &builder.rsvpStatus
	}
	return req
}

type ReplyCalendarEventPathReqBodyBuilder struct {
	rsvpStatus     string
	rsvpStatusFlag bool
}

func NewReplyCalendarEventPathReqBodyBuilder() *ReplyCalendarEventPathReqBodyBuilder {
	builder := &ReplyCalendarEventPathReqBodyBuilder{}
	return builder
}

// rsvp-日程状态
//
// 示例值：accept
func (builder *ReplyCalendarEventPathReqBodyBuilder) RsvpStatus(rsvpStatus string) *ReplyCalendarEventPathReqBodyBuilder {
	builder.rsvpStatus = rsvpStatus
	builder.rsvpStatusFlag = true
	return builder
}

func (builder *ReplyCalendarEventPathReqBodyBuilder) Build() (*ReplyCalendarEventReqBody, error) {
	req := &ReplyCalendarEventReqBody{}
	if builder.rsvpStatusFlag {
		req.RsvpStatus = &builder.rsvpStatus
	}
	return req, nil
}

type ReplyCalendarEventReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *ReplyCalendarEventReqBody
}

func NewReplyCalendarEventReqBuilder() *ReplyCalendarEventReqBuilder {
	builder := &ReplyCalendarEventReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 日历资源ID
//
// 示例值：feishu.cn_HF9U2MbibE8PPpjro6xjqa@group.calendar.feishu.cn
func (builder *ReplyCalendarEventReqBuilder) CalendarId(calendarId string) *ReplyCalendarEventReqBuilder {
	builder.apiReq.PathParams.Set("calendar_id", fmt.Sprint(calendarId))
	return builder
}

// 日程资源ID
//
// 示例值：75d28f9b-e35c-4230-8a83-4a661497db54_0
func (builder *ReplyCalendarEventReqBuilder) EventId(eventId string) *ReplyCalendarEventReqBuilder {
	builder.apiReq.PathParams.Set("event_id", fmt.Sprint(eventId))
	return builder
}

//
func (builder *ReplyCalendarEventReqBuilder) Body(body *ReplyCalendarEventReqBody) *ReplyCalendarEventReqBuilder {
	builder.body = body
	return builder
}

func (builder *ReplyCalendarEventReqBuilder) Build() *ReplyCalendarEventReq {
	req := &ReplyCalendarEventReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type ReplyCalendarEventReqBody struct {
	RsvpStatus *string `json:"rsvp_status,omitempty"` // rsvp-日程状态
}

type ReplyCalendarEventReq struct {
	apiReq *larkcore.ApiReq
	Body   *ReplyCalendarEventReqBody `body:""`
}

type ReplyCalendarEventResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *ReplyCalendarEventResp) Success() bool {
	return resp.Code == 0
}

type SearchCalendarEventReqBodyBuilder struct {
	query     string // 搜索关键字
	queryFlag bool

	filter     *EventSearchFilter // 搜索过滤器
	filterFlag bool
}

func NewSearchCalendarEventReqBodyBuilder() *SearchCalendarEventReqBodyBuilder {
	builder := &SearchCalendarEventReqBodyBuilder{}
	return builder
}

// 搜索关键字
//
//示例值：query words
func (builder *SearchCalendarEventReqBodyBuilder) Query(query string) *SearchCalendarEventReqBodyBuilder {
	builder.query = query
	builder.queryFlag = true
	return builder
}

// 搜索过滤器
//
//示例值：
func (builder *SearchCalendarEventReqBodyBuilder) Filter(filter *EventSearchFilter) *SearchCalendarEventReqBodyBuilder {
	builder.filter = filter
	builder.filterFlag = true
	return builder
}

func (builder *SearchCalendarEventReqBodyBuilder) Build() *SearchCalendarEventReqBody {
	req := &SearchCalendarEventReqBody{}
	if builder.queryFlag {
		req.Query = &builder.query
	}
	if builder.filterFlag {
		req.Filter = builder.filter
	}
	return req
}

type SearchCalendarEventPathReqBodyBuilder struct {
	query      string
	queryFlag  bool
	filter     *EventSearchFilter
	filterFlag bool
}

func NewSearchCalendarEventPathReqBodyBuilder() *SearchCalendarEventPathReqBodyBuilder {
	builder := &SearchCalendarEventPathReqBodyBuilder{}
	return builder
}

// 搜索关键字
//
// 示例值：query words
func (builder *SearchCalendarEventPathReqBodyBuilder) Query(query string) *SearchCalendarEventPathReqBodyBuilder {
	builder.query = query
	builder.queryFlag = true
	return builder
}

// 搜索过滤器
//
// 示例值：
func (builder *SearchCalendarEventPathReqBodyBuilder) Filter(filter *EventSearchFilter) *SearchCalendarEventPathReqBodyBuilder {
	builder.filter = filter
	builder.filterFlag = true
	return builder
}

func (builder *SearchCalendarEventPathReqBodyBuilder) Build() (*SearchCalendarEventReqBody, error) {
	req := &SearchCalendarEventReqBody{}
	if builder.queryFlag {
		req.Query = &builder.query
	}
	if builder.filterFlag {
		req.Filter = builder.filter
	}
	return req, nil
}

type SearchCalendarEventReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *SearchCalendarEventReqBody
	limit  int // 最大返回多少记录，当使用迭代器访问时才有效
}

func NewSearchCalendarEventReqBuilder() *SearchCalendarEventReqBuilder {
	builder := &SearchCalendarEventReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 最大返回多少记录，当使用迭代器访问时才有效
func (builder *SearchCalendarEventReqBuilder) Limit(limit int) *SearchCalendarEventReqBuilder {
	builder.limit = limit
	return builder
}

// 日历ID。参见[日历ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)
//
// 示例值：feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
func (builder *SearchCalendarEventReqBuilder) CalendarId(calendarId string) *SearchCalendarEventReqBuilder {
	builder.apiReq.PathParams.Set("calendar_id", fmt.Sprint(calendarId))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *SearchCalendarEventReqBuilder) UserIdType(userIdType string) *SearchCalendarEventReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

// 分页标记，第一次请求不填，表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该page_token 获取查询结果
//
// 示例值：xxxxx
func (builder *SearchCalendarEventReqBuilder) PageToken(pageToken string) *SearchCalendarEventReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

// 分页大小
//
// 示例值：10
func (builder *SearchCalendarEventReqBuilder) PageSize(pageSize int) *SearchCalendarEventReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 该接口用于以用户身份搜索某日历下的相关日程。;;身份由 Header Authorization 的 Token 类型决定。
func (builder *SearchCalendarEventReqBuilder) Body(body *SearchCalendarEventReqBody) *SearchCalendarEventReqBuilder {
	builder.body = body
	return builder
}

func (builder *SearchCalendarEventReqBuilder) Build() *SearchCalendarEventReq {
	req := &SearchCalendarEventReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.Limit = builder.limit
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.body
	return req
}

type SearchCalendarEventReqBody struct {
	Query *string `json:"query,omitempty"` // 搜索关键字

	Filter *EventSearchFilter `json:"filter,omitempty"` // 搜索过滤器
}

type SearchCalendarEventReq struct {
	apiReq *larkcore.ApiReq
	Body   *SearchCalendarEventReqBody `body:""`
	Limit  int                         // 最多返回多少记录，只有在使用迭代器访问时，才有效

}

type SearchCalendarEventRespData struct {
	Items []*CalendarEvent `json:"items,omitempty"` // 搜索命中的日程列表

	PageToken *string `json:"page_token,omitempty"` // 下次请求需要带上的分页标记
}

type SearchCalendarEventResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *SearchCalendarEventRespData `json:"data"` // 业务数据
}

func (resp *SearchCalendarEventResp) Success() bool {
	return resp.Code == 0
}

type SubscriptionCalendarEventReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewSubscriptionCalendarEventReqBuilder() *SubscriptionCalendarEventReqBuilder {
	builder := &SubscriptionCalendarEventReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 日历ID。参见[日历ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)
//
// 示例值：feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
func (builder *SubscriptionCalendarEventReqBuilder) CalendarId(calendarId string) *SubscriptionCalendarEventReqBuilder {
	builder.apiReq.PathParams.Set("calendar_id", fmt.Sprint(calendarId))
	return builder
}

func (builder *SubscriptionCalendarEventReqBuilder) Build() *SubscriptionCalendarEventReq {
	req := &SubscriptionCalendarEventReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	return req
}

type SubscriptionCalendarEventReq struct {
	apiReq *larkcore.ApiReq
}

type SubscriptionCalendarEventResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *SubscriptionCalendarEventResp) Success() bool {
	return resp.Code == 0
}

type UnsubscriptionCalendarEventReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewUnsubscriptionCalendarEventReqBuilder() *UnsubscriptionCalendarEventReqBuilder {
	builder := &UnsubscriptionCalendarEventReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 日历ID。参见[日历ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)
//
// 示例值：feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
func (builder *UnsubscriptionCalendarEventReqBuilder) CalendarId(calendarId string) *UnsubscriptionCalendarEventReqBuilder {
	builder.apiReq.PathParams.Set("calendar_id", fmt.Sprint(calendarId))
	return builder
}

func (builder *UnsubscriptionCalendarEventReqBuilder) Build() *UnsubscriptionCalendarEventReq {
	req := &UnsubscriptionCalendarEventReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	return req
}

type UnsubscriptionCalendarEventReq struct {
	apiReq *larkcore.ApiReq
}

type UnsubscriptionCalendarEventResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *UnsubscriptionCalendarEventResp) Success() bool {
	return resp.Code == 0
}

type BatchDeleteCalendarEventAttendeeReqBodyBuilder struct {
	attendeeIds     []string // 要移除的参与人 ID 列表。参见[参与人ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee/introduction#4998889c)
	attendeeIdsFlag bool

	deleteIds     []*CalendarEventAttendeeId // 需要删除的参与人类型实体ID，作为attendee_ids字段的补充。
	deleteIdsFlag bool

	needNotification     bool // 删除日程参与人时是否要给参与人发送bot通知，默认为true
	needNotificationFlag bool

	instanceStartTimeAdmin     string // 使用管理员身份访问时要修改的实例
	instanceStartTimeAdminFlag bool

	isEnableAdmin     bool // 是否启用管理员身份(需先在管理后台设置某人为会议室管理员)
	isEnableAdminFlag bool
}

func NewBatchDeleteCalendarEventAttendeeReqBodyBuilder() *BatchDeleteCalendarEventAttendeeReqBodyBuilder {
	builder := &BatchDeleteCalendarEventAttendeeReqBodyBuilder{}
	return builder
}

// 要移除的参与人 ID 列表。参见[参与人ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee/introduction#4998889c)
//
//示例值：["user_xxxxx", "chat_xxxxx", "resource_xxxxx", "third_party_xxxxx"]
func (builder *BatchDeleteCalendarEventAttendeeReqBodyBuilder) AttendeeIds(attendeeIds []string) *BatchDeleteCalendarEventAttendeeReqBodyBuilder {
	builder.attendeeIds = attendeeIds
	builder.attendeeIdsFlag = true
	return builder
}

// 需要删除的参与人类型实体ID，作为attendee_ids字段的补充。
//
//示例值：
func (builder *BatchDeleteCalendarEventAttendeeReqBodyBuilder) DeleteIds(deleteIds []*CalendarEventAttendeeId) *BatchDeleteCalendarEventAttendeeReqBodyBuilder {
	builder.deleteIds = deleteIds
	builder.deleteIdsFlag = true
	return builder
}

// 删除日程参与人时是否要给参与人发送bot通知，默认为true
//
//示例值：false
func (builder *BatchDeleteCalendarEventAttendeeReqBodyBuilder) NeedNotification(needNotification bool) *BatchDeleteCalendarEventAttendeeReqBodyBuilder {
	builder.needNotification = needNotification
	builder.needNotificationFlag = true
	return builder
}

// 使用管理员身份访问时要修改的实例
//
//示例值：1647320400
func (builder *BatchDeleteCalendarEventAttendeeReqBodyBuilder) InstanceStartTimeAdmin(instanceStartTimeAdmin string) *BatchDeleteCalendarEventAttendeeReqBodyBuilder {
	builder.instanceStartTimeAdmin = instanceStartTimeAdmin
	builder.instanceStartTimeAdminFlag = true
	return builder
}

// 是否启用管理员身份(需先在管理后台设置某人为会议室管理员)
//
//示例值：false
func (builder *BatchDeleteCalendarEventAttendeeReqBodyBuilder) IsEnableAdmin(isEnableAdmin bool) *BatchDeleteCalendarEventAttendeeReqBodyBuilder {
	builder.isEnableAdmin = isEnableAdmin
	builder.isEnableAdminFlag = true
	return builder
}

func (builder *BatchDeleteCalendarEventAttendeeReqBodyBuilder) Build() *BatchDeleteCalendarEventAttendeeReqBody {
	req := &BatchDeleteCalendarEventAttendeeReqBody{}
	if builder.attendeeIdsFlag {
		req.AttendeeIds = builder.attendeeIds
	}
	if builder.deleteIdsFlag {
		req.DeleteIds = builder.deleteIds
	}
	if builder.needNotificationFlag {
		req.NeedNotification = &builder.needNotification
	}
	if builder.instanceStartTimeAdminFlag {
		req.InstanceStartTimeAdmin = &builder.instanceStartTimeAdmin
	}
	if builder.isEnableAdminFlag {
		req.IsEnableAdmin = &builder.isEnableAdmin
	}
	return req
}

type BatchDeleteCalendarEventAttendeePathReqBodyBuilder struct {
	attendeeIds                []string
	attendeeIdsFlag            bool
	deleteIds                  []*CalendarEventAttendeeId
	deleteIdsFlag              bool
	needNotification           bool
	needNotificationFlag       bool
	instanceStartTimeAdmin     string
	instanceStartTimeAdminFlag bool
	isEnableAdmin              bool
	isEnableAdminFlag          bool
}

func NewBatchDeleteCalendarEventAttendeePathReqBodyBuilder() *BatchDeleteCalendarEventAttendeePathReqBodyBuilder {
	builder := &BatchDeleteCalendarEventAttendeePathReqBodyBuilder{}
	return builder
}

// 要移除的参与人 ID 列表。参见[参与人ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee/introduction#4998889c)
//
// 示例值：["user_xxxxx", "chat_xxxxx", "resource_xxxxx", "third_party_xxxxx"]
func (builder *BatchDeleteCalendarEventAttendeePathReqBodyBuilder) AttendeeIds(attendeeIds []string) *BatchDeleteCalendarEventAttendeePathReqBodyBuilder {
	builder.attendeeIds = attendeeIds
	builder.attendeeIdsFlag = true
	return builder
}

// 需要删除的参与人类型实体ID，作为attendee_ids字段的补充。
//
// 示例值：
func (builder *BatchDeleteCalendarEventAttendeePathReqBodyBuilder) DeleteIds(deleteIds []*CalendarEventAttendeeId) *BatchDeleteCalendarEventAttendeePathReqBodyBuilder {
	builder.deleteIds = deleteIds
	builder.deleteIdsFlag = true
	return builder
}

// 删除日程参与人时是否要给参与人发送bot通知，默认为true
//
// 示例值：false
func (builder *BatchDeleteCalendarEventAttendeePathReqBodyBuilder) NeedNotification(needNotification bool) *BatchDeleteCalendarEventAttendeePathReqBodyBuilder {
	builder.needNotification = needNotification
	builder.needNotificationFlag = true
	return builder
}

// 使用管理员身份访问时要修改的实例
//
// 示例值：1647320400
func (builder *BatchDeleteCalendarEventAttendeePathReqBodyBuilder) InstanceStartTimeAdmin(instanceStartTimeAdmin string) *BatchDeleteCalendarEventAttendeePathReqBodyBuilder {
	builder.instanceStartTimeAdmin = instanceStartTimeAdmin
	builder.instanceStartTimeAdminFlag = true
	return builder
}

// 是否启用管理员身份(需先在管理后台设置某人为会议室管理员)
//
// 示例值：false
func (builder *BatchDeleteCalendarEventAttendeePathReqBodyBuilder) IsEnableAdmin(isEnableAdmin bool) *BatchDeleteCalendarEventAttendeePathReqBodyBuilder {
	builder.isEnableAdmin = isEnableAdmin
	builder.isEnableAdminFlag = true
	return builder
}

func (builder *BatchDeleteCalendarEventAttendeePathReqBodyBuilder) Build() (*BatchDeleteCalendarEventAttendeeReqBody, error) {
	req := &BatchDeleteCalendarEventAttendeeReqBody{}
	if builder.attendeeIdsFlag {
		req.AttendeeIds = builder.attendeeIds
	}
	if builder.deleteIdsFlag {
		req.DeleteIds = builder.deleteIds
	}
	if builder.needNotificationFlag {
		req.NeedNotification = &builder.needNotification
	}
	if builder.instanceStartTimeAdminFlag {
		req.InstanceStartTimeAdmin = &builder.instanceStartTimeAdmin
	}
	if builder.isEnableAdminFlag {
		req.IsEnableAdmin = &builder.isEnableAdmin
	}
	return req, nil
}

type BatchDeleteCalendarEventAttendeeReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *BatchDeleteCalendarEventAttendeeReqBody
}

func NewBatchDeleteCalendarEventAttendeeReqBuilder() *BatchDeleteCalendarEventAttendeeReqBuilder {
	builder := &BatchDeleteCalendarEventAttendeeReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 日历ID。参见[日历ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)
//
// 示例值：feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
func (builder *BatchDeleteCalendarEventAttendeeReqBuilder) CalendarId(calendarId string) *BatchDeleteCalendarEventAttendeeReqBuilder {
	builder.apiReq.PathParams.Set("calendar_id", fmt.Sprint(calendarId))
	return builder
}

// 日程ID。参见[日程ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/introduction)
//
// 示例值：xxxxxxxxx_0
func (builder *BatchDeleteCalendarEventAttendeeReqBuilder) EventId(eventId string) *BatchDeleteCalendarEventAttendeeReqBuilder {
	builder.apiReq.PathParams.Set("event_id", fmt.Sprint(eventId))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *BatchDeleteCalendarEventAttendeeReqBuilder) UserIdType(userIdType string) *BatchDeleteCalendarEventAttendeeReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

// 批量删除日程的参与人。
func (builder *BatchDeleteCalendarEventAttendeeReqBuilder) Body(body *BatchDeleteCalendarEventAttendeeReqBody) *BatchDeleteCalendarEventAttendeeReqBuilder {
	builder.body = body
	return builder
}

func (builder *BatchDeleteCalendarEventAttendeeReqBuilder) Build() *BatchDeleteCalendarEventAttendeeReq {
	req := &BatchDeleteCalendarEventAttendeeReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.body
	return req
}

type BatchDeleteCalendarEventAttendeeReqBody struct {
	AttendeeIds []string `json:"attendee_ids,omitempty"` // 要移除的参与人 ID 列表。参见[参与人ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee/introduction#4998889c)

	DeleteIds []*CalendarEventAttendeeId `json:"delete_ids,omitempty"` // 需要删除的参与人类型实体ID，作为attendee_ids字段的补充。

	NeedNotification *bool `json:"need_notification,omitempty"` // 删除日程参与人时是否要给参与人发送bot通知，默认为true

	InstanceStartTimeAdmin *string `json:"instance_start_time_admin,omitempty"` // 使用管理员身份访问时要修改的实例

	IsEnableAdmin *bool `json:"is_enable_admin,omitempty"` // 是否启用管理员身份(需先在管理后台设置某人为会议室管理员)
}

type BatchDeleteCalendarEventAttendeeReq struct {
	apiReq *larkcore.ApiReq
	Body   *BatchDeleteCalendarEventAttendeeReqBody `body:""`
}

type BatchDeleteCalendarEventAttendeeResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *BatchDeleteCalendarEventAttendeeResp) Success() bool {
	return resp.Code == 0
}

type CreateCalendarEventAttendeeReqBodyBuilder struct {
	attendees     []*CalendarEventAttendee // 新增参与人列表；;- 单次请求会议室的数量限制为100。
	attendeesFlag bool

	needNotification     bool // 是否给参与人发送bot通知 默认为true
	needNotificationFlag bool

	instanceStartTimeAdmin     string // 使用管理员身份访问时要修改的实例(仅用于重复日程修改其中的一个实例，非重复日程无需填此字段)
	instanceStartTimeAdminFlag bool

	isEnableAdmin     bool // 是否启用管理员身份(需先在管理后台设置某人为会议室管理员)
	isEnableAdminFlag bool

	addOperatorToAttendee     bool // 是否添加会议室operate_id标识的用户到参与人
	addOperatorToAttendeeFlag bool
}

func NewCreateCalendarEventAttendeeReqBodyBuilder() *CreateCalendarEventAttendeeReqBodyBuilder {
	builder := &CreateCalendarEventAttendeeReqBodyBuilder{}
	return builder
}

// 新增参与人列表；;- 单次请求会议室的数量限制为100。
//
//示例值：
func (builder *CreateCalendarEventAttendeeReqBodyBuilder) Attendees(attendees []*CalendarEventAttendee) *CreateCalendarEventAttendeeReqBodyBuilder {
	builder.attendees = attendees
	builder.attendeesFlag = true
	return builder
}

// 是否给参与人发送bot通知 默认为true
//
//示例值：false
func (builder *CreateCalendarEventAttendeeReqBodyBuilder) NeedNotification(needNotification bool) *CreateCalendarEventAttendeeReqBodyBuilder {
	builder.needNotification = needNotification
	builder.needNotificationFlag = true
	return builder
}

// 使用管理员身份访问时要修改的实例(仅用于重复日程修改其中的一个实例，非重复日程无需填此字段)
//
//示例值：1647320400
func (builder *CreateCalendarEventAttendeeReqBodyBuilder) InstanceStartTimeAdmin(instanceStartTimeAdmin string) *CreateCalendarEventAttendeeReqBodyBuilder {
	builder.instanceStartTimeAdmin = instanceStartTimeAdmin
	builder.instanceStartTimeAdminFlag = true
	return builder
}

// 是否启用管理员身份(需先在管理后台设置某人为会议室管理员)
//
//示例值：false
func (builder *CreateCalendarEventAttendeeReqBodyBuilder) IsEnableAdmin(isEnableAdmin bool) *CreateCalendarEventAttendeeReqBodyBuilder {
	builder.isEnableAdmin = isEnableAdmin
	builder.isEnableAdminFlag = true
	return builder
}

// 是否添加会议室operate_id标识的用户到参与人
//
//示例值：false
func (builder *CreateCalendarEventAttendeeReqBodyBuilder) AddOperatorToAttendee(addOperatorToAttendee bool) *CreateCalendarEventAttendeeReqBodyBuilder {
	builder.addOperatorToAttendee = addOperatorToAttendee
	builder.addOperatorToAttendeeFlag = true
	return builder
}

func (builder *CreateCalendarEventAttendeeReqBodyBuilder) Build() *CreateCalendarEventAttendeeReqBody {
	req := &CreateCalendarEventAttendeeReqBody{}
	if builder.attendeesFlag {
		req.Attendees = builder.attendees
	}
	if builder.needNotificationFlag {
		req.NeedNotification = &builder.needNotification
	}
	if builder.instanceStartTimeAdminFlag {
		req.InstanceStartTimeAdmin = &builder.instanceStartTimeAdmin
	}
	if builder.isEnableAdminFlag {
		req.IsEnableAdmin = &builder.isEnableAdmin
	}
	if builder.addOperatorToAttendeeFlag {
		req.AddOperatorToAttendee = &builder.addOperatorToAttendee
	}
	return req
}

type CreateCalendarEventAttendeePathReqBodyBuilder struct {
	attendees                  []*CalendarEventAttendee
	attendeesFlag              bool
	needNotification           bool
	needNotificationFlag       bool
	instanceStartTimeAdmin     string
	instanceStartTimeAdminFlag bool
	isEnableAdmin              bool
	isEnableAdminFlag          bool
	addOperatorToAttendee      bool
	addOperatorToAttendeeFlag  bool
}

func NewCreateCalendarEventAttendeePathReqBodyBuilder() *CreateCalendarEventAttendeePathReqBodyBuilder {
	builder := &CreateCalendarEventAttendeePathReqBodyBuilder{}
	return builder
}

// 新增参与人列表；;- 单次请求会议室的数量限制为100。
//
// 示例值：
func (builder *CreateCalendarEventAttendeePathReqBodyBuilder) Attendees(attendees []*CalendarEventAttendee) *CreateCalendarEventAttendeePathReqBodyBuilder {
	builder.attendees = attendees
	builder.attendeesFlag = true
	return builder
}

// 是否给参与人发送bot通知 默认为true
//
// 示例值：false
func (builder *CreateCalendarEventAttendeePathReqBodyBuilder) NeedNotification(needNotification bool) *CreateCalendarEventAttendeePathReqBodyBuilder {
	builder.needNotification = needNotification
	builder.needNotificationFlag = true
	return builder
}

// 使用管理员身份访问时要修改的实例(仅用于重复日程修改其中的一个实例，非重复日程无需填此字段)
//
// 示例值：1647320400
func (builder *CreateCalendarEventAttendeePathReqBodyBuilder) InstanceStartTimeAdmin(instanceStartTimeAdmin string) *CreateCalendarEventAttendeePathReqBodyBuilder {
	builder.instanceStartTimeAdmin = instanceStartTimeAdmin
	builder.instanceStartTimeAdminFlag = true
	return builder
}

// 是否启用管理员身份(需先在管理后台设置某人为会议室管理员)
//
// 示例值：false
func (builder *CreateCalendarEventAttendeePathReqBodyBuilder) IsEnableAdmin(isEnableAdmin bool) *CreateCalendarEventAttendeePathReqBodyBuilder {
	builder.isEnableAdmin = isEnableAdmin
	builder.isEnableAdminFlag = true
	return builder
}

// 是否添加会议室operate_id标识的用户到参与人
//
// 示例值：false
func (builder *CreateCalendarEventAttendeePathReqBodyBuilder) AddOperatorToAttendee(addOperatorToAttendee bool) *CreateCalendarEventAttendeePathReqBodyBuilder {
	builder.addOperatorToAttendee = addOperatorToAttendee
	builder.addOperatorToAttendeeFlag = true
	return builder
}

func (builder *CreateCalendarEventAttendeePathReqBodyBuilder) Build() (*CreateCalendarEventAttendeeReqBody, error) {
	req := &CreateCalendarEventAttendeeReqBody{}
	if builder.attendeesFlag {
		req.Attendees = builder.attendees
	}
	if builder.needNotificationFlag {
		req.NeedNotification = &builder.needNotification
	}
	if builder.instanceStartTimeAdminFlag {
		req.InstanceStartTimeAdmin = &builder.instanceStartTimeAdmin
	}
	if builder.isEnableAdminFlag {
		req.IsEnableAdmin = &builder.isEnableAdmin
	}
	if builder.addOperatorToAttendeeFlag {
		req.AddOperatorToAttendee = &builder.addOperatorToAttendee
	}
	return req, nil
}

type CreateCalendarEventAttendeeReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *CreateCalendarEventAttendeeReqBody
}

func NewCreateCalendarEventAttendeeReqBuilder() *CreateCalendarEventAttendeeReqBuilder {
	builder := &CreateCalendarEventAttendeeReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 日历ID。参见[日历ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)
//
// 示例值：feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
func (builder *CreateCalendarEventAttendeeReqBuilder) CalendarId(calendarId string) *CreateCalendarEventAttendeeReqBuilder {
	builder.apiReq.PathParams.Set("calendar_id", fmt.Sprint(calendarId))
	return builder
}

// 日程ID。参见[日程ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/introduction)
//
// 示例值：xxxxxxxxx_0
func (builder *CreateCalendarEventAttendeeReqBuilder) EventId(eventId string) *CreateCalendarEventAttendeeReqBuilder {
	builder.apiReq.PathParams.Set("event_id", fmt.Sprint(eventId))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *CreateCalendarEventAttendeeReqBuilder) UserIdType(userIdType string) *CreateCalendarEventAttendeeReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

// 批量给日程添加参与人。
func (builder *CreateCalendarEventAttendeeReqBuilder) Body(body *CreateCalendarEventAttendeeReqBody) *CreateCalendarEventAttendeeReqBuilder {
	builder.body = body
	return builder
}

func (builder *CreateCalendarEventAttendeeReqBuilder) Build() *CreateCalendarEventAttendeeReq {
	req := &CreateCalendarEventAttendeeReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.body
	return req
}

type CreateCalendarEventAttendeeReqBody struct {
	Attendees []*CalendarEventAttendee `json:"attendees,omitempty"` // 新增参与人列表；;- 单次请求会议室的数量限制为100。

	NeedNotification *bool `json:"need_notification,omitempty"` // 是否给参与人发送bot通知 默认为true

	InstanceStartTimeAdmin *string `json:"instance_start_time_admin,omitempty"` // 使用管理员身份访问时要修改的实例(仅用于重复日程修改其中的一个实例，非重复日程无需填此字段)

	IsEnableAdmin *bool `json:"is_enable_admin,omitempty"` // 是否启用管理员身份(需先在管理后台设置某人为会议室管理员)

	AddOperatorToAttendee *bool `json:"add_operator_to_attendee,omitempty"` // 是否添加会议室operate_id标识的用户到参与人
}

type CreateCalendarEventAttendeeReq struct {
	apiReq *larkcore.ApiReq
	Body   *CreateCalendarEventAttendeeReqBody `body:""`
}

type CreateCalendarEventAttendeeRespData struct {
	Attendees []*CalendarEventAttendee `json:"attendees,omitempty"` // 新增参与人后的日程所有参与人列表
}

type CreateCalendarEventAttendeeResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *CreateCalendarEventAttendeeRespData `json:"data"` // 业务数据
}

func (resp *CreateCalendarEventAttendeeResp) Success() bool {
	return resp.Code == 0
}

type ListCalendarEventAttendeeReqBuilder struct {
	apiReq *larkcore.ApiReq
	limit  int // 最大返回多少记录，当使用迭代器访问时才有效
}

func NewListCalendarEventAttendeeReqBuilder() *ListCalendarEventAttendeeReqBuilder {
	builder := &ListCalendarEventAttendeeReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 最大返回多少记录，当使用迭代器访问时才有效
func (builder *ListCalendarEventAttendeeReqBuilder) Limit(limit int) *ListCalendarEventAttendeeReqBuilder {
	builder.limit = limit
	return builder
}

// 日历ID。参见[日历ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)
//
// 示例值：feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
func (builder *ListCalendarEventAttendeeReqBuilder) CalendarId(calendarId string) *ListCalendarEventAttendeeReqBuilder {
	builder.apiReq.PathParams.Set("calendar_id", fmt.Sprint(calendarId))
	return builder
}

// 日程ID。参见[日程ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/introduction)
//
// 示例值：xxxxxxxxx_0
func (builder *ListCalendarEventAttendeeReqBuilder) EventId(eventId string) *ListCalendarEventAttendeeReqBuilder {
	builder.apiReq.PathParams.Set("event_id", fmt.Sprint(eventId))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *ListCalendarEventAttendeeReqBuilder) UserIdType(userIdType string) *ListCalendarEventAttendeeReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

// 是否需要会议室表单信息
//
// 示例值：true
func (builder *ListCalendarEventAttendeeReqBuilder) NeedResourceCustomization(needResourceCustomization bool) *ListCalendarEventAttendeeReqBuilder {
	builder.apiReq.QueryParams.Set("need_resource_customization", fmt.Sprint(needResourceCustomization))
	return builder
}

// 分页标记，第一次请求不填，表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该page_token 获取查询结果
//
// 示例值：780TRhwXXXXX
func (builder *ListCalendarEventAttendeeReqBuilder) PageToken(pageToken string) *ListCalendarEventAttendeeReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

// 分页大小
//
// 示例值：10
func (builder *ListCalendarEventAttendeeReqBuilder) PageSize(pageSize int) *ListCalendarEventAttendeeReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

func (builder *ListCalendarEventAttendeeReqBuilder) Build() *ListCalendarEventAttendeeReq {
	req := &ListCalendarEventAttendeeReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.Limit = builder.limit
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type ListCalendarEventAttendeeReq struct {
	apiReq *larkcore.ApiReq
	Limit  int // 最多返回多少记录，只有在使用迭代器访问时，才有效

}

type ListCalendarEventAttendeeRespData struct {
	Items []*CalendarEventAttendee `json:"items,omitempty"` // 日程的参与者列表

	HasMore *bool `json:"has_more,omitempty"` // 是否有下一页数据

	PageToken *string `json:"page_token,omitempty"` // 下次请求需要带上的分页标记，90 天有效期
}

type ListCalendarEventAttendeeResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ListCalendarEventAttendeeRespData `json:"data"` // 业务数据
}

func (resp *ListCalendarEventAttendeeResp) Success() bool {
	return resp.Code == 0
}

type ListCalendarEventAttendeeChatMemberReqBuilder struct {
	apiReq *larkcore.ApiReq
	limit  int // 最大返回多少记录，当使用迭代器访问时才有效
}

func NewListCalendarEventAttendeeChatMemberReqBuilder() *ListCalendarEventAttendeeChatMemberReqBuilder {
	builder := &ListCalendarEventAttendeeChatMemberReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 最大返回多少记录，当使用迭代器访问时才有效
func (builder *ListCalendarEventAttendeeChatMemberReqBuilder) Limit(limit int) *ListCalendarEventAttendeeChatMemberReqBuilder {
	builder.limit = limit
	return builder
}

// 日历ID。参见[日历ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)
//
// 示例值：feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
func (builder *ListCalendarEventAttendeeChatMemberReqBuilder) CalendarId(calendarId string) *ListCalendarEventAttendeeChatMemberReqBuilder {
	builder.apiReq.PathParams.Set("calendar_id", fmt.Sprint(calendarId))
	return builder
}

// 日程ID。参见[日程ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/introduction)
//
// 示例值：xxxxxxxxx_0
func (builder *ListCalendarEventAttendeeChatMemberReqBuilder) EventId(eventId string) *ListCalendarEventAttendeeChatMemberReqBuilder {
	builder.apiReq.PathParams.Set("event_id", fmt.Sprint(eventId))
	return builder
}

// 群参与人 ID。参见[参与人ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee/introduction#4998889c)
//
// 示例值：chat_xxxxxx
func (builder *ListCalendarEventAttendeeChatMemberReqBuilder) AttendeeId(attendeeId string) *ListCalendarEventAttendeeChatMemberReqBuilder {
	builder.apiReq.PathParams.Set("attendee_id", fmt.Sprint(attendeeId))
	return builder
}

// 分页标记，第一次请求不填，表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该page_token 获取查询结果
//
// 示例值：23jhysaxxxxsysy
func (builder *ListCalendarEventAttendeeChatMemberReqBuilder) PageToken(pageToken string) *ListCalendarEventAttendeeChatMemberReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

// 分页大小
//
// 示例值：10
func (builder *ListCalendarEventAttendeeChatMemberReqBuilder) PageSize(pageSize int) *ListCalendarEventAttendeeChatMemberReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *ListCalendarEventAttendeeChatMemberReqBuilder) UserIdType(userIdType string) *ListCalendarEventAttendeeChatMemberReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

func (builder *ListCalendarEventAttendeeChatMemberReqBuilder) Build() *ListCalendarEventAttendeeChatMemberReq {
	req := &ListCalendarEventAttendeeChatMemberReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.Limit = builder.limit
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type ListCalendarEventAttendeeChatMemberReq struct {
	apiReq *larkcore.ApiReq
	Limit  int // 最多返回多少记录，只有在使用迭代器访问时，才有效

}

type ListCalendarEventAttendeeChatMemberRespData struct {
	Items []*CalendarEventAttendeeChatMember `json:"items,omitempty"` // 群中的群成员，当type为chat时有效；群成员不支持编辑

	HasMore *bool `json:"has_more,omitempty"` // 是否有下一页数据

	PageToken *string `json:"page_token,omitempty"` // 下次请求需要带上的分页标记
}

type ListCalendarEventAttendeeChatMemberResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ListCalendarEventAttendeeChatMemberRespData `json:"data"` // 业务数据
}

func (resp *ListCalendarEventAttendeeChatMemberResp) Success() bool {
	return resp.Code == 0
}

type CreateCalendarEventMeetingChatReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewCreateCalendarEventMeetingChatReqBuilder() *CreateCalendarEventMeetingChatReqBuilder {
	builder := &CreateCalendarEventMeetingChatReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 日历ID
//
// 示例值：feishu.cn_HF9U2MbibE8PPpjro6xjqa@group.calendar.feishu.cn
func (builder *CreateCalendarEventMeetingChatReqBuilder) CalendarId(calendarId string) *CreateCalendarEventMeetingChatReqBuilder {
	builder.apiReq.PathParams.Set("calendar_id", fmt.Sprint(calendarId))
	return builder
}

// 日程ID
//
// 示例值：75d28f9b-e35c-4230-8a83-4a661497db54_0
func (builder *CreateCalendarEventMeetingChatReqBuilder) EventId(eventId string) *CreateCalendarEventMeetingChatReqBuilder {
	builder.apiReq.PathParams.Set("event_id", fmt.Sprint(eventId))
	return builder
}

func (builder *CreateCalendarEventMeetingChatReqBuilder) Build() *CreateCalendarEventMeetingChatReq {
	req := &CreateCalendarEventMeetingChatReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	return req
}

type CreateCalendarEventMeetingChatReq struct {
	apiReq *larkcore.ApiReq
}

type CreateCalendarEventMeetingChatRespData struct {
	MeetingChatId *string `json:"meeting_chat_id,omitempty"` // 会议群ID

	Applink *string `json:"applink,omitempty"` // 群分享链接
}

type CreateCalendarEventMeetingChatResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *CreateCalendarEventMeetingChatRespData `json:"data"` // 业务数据
}

func (resp *CreateCalendarEventMeetingChatResp) Success() bool {
	return resp.Code == 0
}

type DeleteCalendarEventMeetingChatReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewDeleteCalendarEventMeetingChatReqBuilder() *DeleteCalendarEventMeetingChatReqBuilder {
	builder := &DeleteCalendarEventMeetingChatReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 日历ID
//
// 示例值：feishu.cn_HF9U2MbibE8PPpjro6xjqa@group.calendar.feishu.cn
func (builder *DeleteCalendarEventMeetingChatReqBuilder) CalendarId(calendarId string) *DeleteCalendarEventMeetingChatReqBuilder {
	builder.apiReq.PathParams.Set("calendar_id", fmt.Sprint(calendarId))
	return builder
}

// 日程ID
//
// 示例值：75d28f9b-e35c-4230-8a83-4a661497db54_0
func (builder *DeleteCalendarEventMeetingChatReqBuilder) EventId(eventId string) *DeleteCalendarEventMeetingChatReqBuilder {
	builder.apiReq.PathParams.Set("event_id", fmt.Sprint(eventId))
	return builder
}

// 会议群ID
//
// 示例值：oc_a0553eda9014c201e6969b478895c230
func (builder *DeleteCalendarEventMeetingChatReqBuilder) MeetingChatId(meetingChatId string) *DeleteCalendarEventMeetingChatReqBuilder {
	builder.apiReq.QueryParams.Set("meeting_chat_id", fmt.Sprint(meetingChatId))
	return builder
}

func (builder *DeleteCalendarEventMeetingChatReqBuilder) Build() *DeleteCalendarEventMeetingChatReq {
	req := &DeleteCalendarEventMeetingChatReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type DeleteCalendarEventMeetingChatReq struct {
	apiReq *larkcore.ApiReq
}

type DeleteCalendarEventMeetingChatResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *DeleteCalendarEventMeetingChatResp) Success() bool {
	return resp.Code == 0
}

type CreateCalendarEventMeetingMinuteReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewCreateCalendarEventMeetingMinuteReqBuilder() *CreateCalendarEventMeetingMinuteReqBuilder {
	builder := &CreateCalendarEventMeetingMinuteReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 日历ID
//
// 示例值：feishu.cn_HF9U2MbibE8PPpjro6xjqa@group.calendar.feishu.cn
func (builder *CreateCalendarEventMeetingMinuteReqBuilder) CalendarId(calendarId string) *CreateCalendarEventMeetingMinuteReqBuilder {
	builder.apiReq.PathParams.Set("calendar_id", fmt.Sprint(calendarId))
	return builder
}

// 日程ID
//
// 示例值：75d28f9b-e35c-4230-8a83-4a661497db54_0
func (builder *CreateCalendarEventMeetingMinuteReqBuilder) EventId(eventId string) *CreateCalendarEventMeetingMinuteReqBuilder {
	builder.apiReq.PathParams.Set("event_id", fmt.Sprint(eventId))
	return builder
}

func (builder *CreateCalendarEventMeetingMinuteReqBuilder) Build() *CreateCalendarEventMeetingMinuteReq {
	req := &CreateCalendarEventMeetingMinuteReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	return req
}

type CreateCalendarEventMeetingMinuteReq struct {
	apiReq *larkcore.ApiReq
}

type CreateCalendarEventMeetingMinuteRespData struct {
	DocUrl *string `json:"doc_url,omitempty"` // 文档URL
}

type CreateCalendarEventMeetingMinuteResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *CreateCalendarEventMeetingMinuteRespData `json:"data"` // 业务数据
}

func (resp *CreateCalendarEventMeetingMinuteResp) Success() bool {
	return resp.Code == 0
}

type CreateExchangeBindingReqBuilder struct {
	apiReq          *larkcore.ApiReq
	exchangeBinding *ExchangeBinding
}

func NewCreateExchangeBindingReqBuilder() *CreateExchangeBindingReqBuilder {
	builder := &CreateExchangeBindingReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *CreateExchangeBindingReqBuilder) UserIdType(userIdType string) *CreateExchangeBindingReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

// 本接口将Exchange账户绑定到飞书账户，进而支持Exchange日历的导入
func (builder *CreateExchangeBindingReqBuilder) ExchangeBinding(exchangeBinding *ExchangeBinding) *CreateExchangeBindingReqBuilder {
	builder.exchangeBinding = exchangeBinding
	return builder
}

func (builder *CreateExchangeBindingReqBuilder) Build() *CreateExchangeBindingReq {
	req := &CreateExchangeBindingReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.exchangeBinding
	return req
}

type CreateExchangeBindingReq struct {
	apiReq          *larkcore.ApiReq
	ExchangeBinding *ExchangeBinding `body:""`
}

type CreateExchangeBindingRespData struct {
	AdminAccount *string `json:"admin_account,omitempty"` // admin账户

	ExchangeAccount *string `json:"exchange_account,omitempty"` // 用户绑定的Exchange账户

	UserId *string `json:"user_id,omitempty"` // Exchange账户绑定user唯一标识id

	Status *string `json:"status,omitempty"` // Exchange账户同步状态

	ExchangeBindingId *string `json:"exchange_binding_id,omitempty"` // exchange绑定唯一标识id
}

type CreateExchangeBindingResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *CreateExchangeBindingRespData `json:"data"` // 业务数据
}

func (resp *CreateExchangeBindingResp) Success() bool {
	return resp.Code == 0
}

type DeleteExchangeBindingReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewDeleteExchangeBindingReqBuilder() *DeleteExchangeBindingReqBuilder {
	builder := &DeleteExchangeBindingReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// exchange绑定唯一标识id。参见[exchange绑定ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/exchange_binding/introduction#12533d5e)
//
// 示例值：ZW1haWxfYWRtaW5fZXhhbXBsZUBvdXRsb29rLmNvbSBlbWFpbF9hY2NvdW50X2V4YW1wbGVAb3V0bG9vay5jb20=
func (builder *DeleteExchangeBindingReqBuilder) ExchangeBindingId(exchangeBindingId string) *DeleteExchangeBindingReqBuilder {
	builder.apiReq.PathParams.Set("exchange_binding_id", fmt.Sprint(exchangeBindingId))
	return builder
}

func (builder *DeleteExchangeBindingReqBuilder) Build() *DeleteExchangeBindingReq {
	req := &DeleteExchangeBindingReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	return req
}

type DeleteExchangeBindingReq struct {
	apiReq *larkcore.ApiReq
}

type DeleteExchangeBindingResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *DeleteExchangeBindingResp) Success() bool {
	return resp.Code == 0
}

type GetExchangeBindingReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewGetExchangeBindingReqBuilder() *GetExchangeBindingReqBuilder {
	builder := &GetExchangeBindingReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// exchange绑定唯一标识id。参见[exchange绑定ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/exchange_binding/introduction#12533d5e)
//
// 示例值：ZW1haWxfYWRtaW5fZXhhbXBsZUBvdXRsb29rLmNvbSBlbWFpbF9hY2NvdW50X2V4YW1wbGVAb3V0bG9vay5jb20=
func (builder *GetExchangeBindingReqBuilder) ExchangeBindingId(exchangeBindingId string) *GetExchangeBindingReqBuilder {
	builder.apiReq.PathParams.Set("exchange_binding_id", fmt.Sprint(exchangeBindingId))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *GetExchangeBindingReqBuilder) UserIdType(userIdType string) *GetExchangeBindingReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

func (builder *GetExchangeBindingReqBuilder) Build() *GetExchangeBindingReq {
	req := &GetExchangeBindingReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type GetExchangeBindingReq struct {
	apiReq *larkcore.ApiReq
}

type GetExchangeBindingRespData struct {
	AdminAccount *string `json:"admin_account,omitempty"` // admin账户

	ExchangeAccount *string `json:"exchange_account,omitempty"` // 用户绑定的Exchange账户

	UserId *string `json:"user_id,omitempty"` // Exchange账户绑定user唯一标识id

	Status *string `json:"status,omitempty"` // Exchange账户同步状态

	ExchangeBindingId *string `json:"exchange_binding_id,omitempty"` // Exchange绑定关系唯一标识ID
}

type GetExchangeBindingResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *GetExchangeBindingRespData `json:"data"` // 业务数据
}

func (resp *GetExchangeBindingResp) Success() bool {
	return resp.Code == 0
}

type BatchFreebusyReqBodyBuilder struct {
	timeMin     string // 获取忙闲信息的开始时间，RFC3339 date_time格式；time_min与time_max的时间区间不能超过3个月。
	timeMinFlag bool

	timeMax     string // 获取忙闲信息的开始时间，RFC3339 date_time格式；time_min与time_max的时间区间不能超过3个月。
	timeMaxFlag bool

	userIds     []string // 用户ID列表
	userIdsFlag bool

	includeExternalCalendar     bool // 是否包含绑定的三方日历中的日程，不传默认为true，即包含。
	includeExternalCalendarFlag bool

	onlyBusy     bool // 是否包含标记为空闲的日程，不传默认为true，即包含空闲日程。
	onlyBusyFlag bool

	needRsvpStatus     bool // 是否需要RSVP状态信息
	needRsvpStatusFlag bool
}

func NewBatchFreebusyReqBodyBuilder() *BatchFreebusyReqBodyBuilder {
	builder := &BatchFreebusyReqBodyBuilder{}
	return builder
}

// 获取忙闲信息的开始时间，RFC3339 date_time格式；time_min与time_max的时间区间不能超过3个月。
//
//示例值：2020-10-28T12:00:00+08:00
func (builder *BatchFreebusyReqBodyBuilder) TimeMin(timeMin string) *BatchFreebusyReqBodyBuilder {
	builder.timeMin = timeMin
	builder.timeMinFlag = true
	return builder
}

// 获取忙闲信息的开始时间，RFC3339 date_time格式；time_min与time_max的时间区间不能超过3个月。
//
//示例值：2020-10-28T12:00:00+08:00
func (builder *BatchFreebusyReqBodyBuilder) TimeMax(timeMax string) *BatchFreebusyReqBodyBuilder {
	builder.timeMax = timeMax
	builder.timeMaxFlag = true
	return builder
}

// 用户ID列表
//
//示例值：
func (builder *BatchFreebusyReqBodyBuilder) UserIds(userIds []string) *BatchFreebusyReqBodyBuilder {
	builder.userIds = userIds
	builder.userIdsFlag = true
	return builder
}

// 是否包含绑定的三方日历中的日程，不传默认为true，即包含。
//
//示例值：true
func (builder *BatchFreebusyReqBodyBuilder) IncludeExternalCalendar(includeExternalCalendar bool) *BatchFreebusyReqBodyBuilder {
	builder.includeExternalCalendar = includeExternalCalendar
	builder.includeExternalCalendarFlag = true
	return builder
}

// 是否包含标记为空闲的日程，不传默认为true，即包含空闲日程。
//
//示例值：true
func (builder *BatchFreebusyReqBodyBuilder) OnlyBusy(onlyBusy bool) *BatchFreebusyReqBodyBuilder {
	builder.onlyBusy = onlyBusy
	builder.onlyBusyFlag = true
	return builder
}

// 是否需要RSVP状态信息
//
//示例值：true
func (builder *BatchFreebusyReqBodyBuilder) NeedRsvpStatus(needRsvpStatus bool) *BatchFreebusyReqBodyBuilder {
	builder.needRsvpStatus = needRsvpStatus
	builder.needRsvpStatusFlag = true
	return builder
}

func (builder *BatchFreebusyReqBodyBuilder) Build() *BatchFreebusyReqBody {
	req := &BatchFreebusyReqBody{}
	if builder.timeMinFlag {
		req.TimeMin = &builder.timeMin
	}
	if builder.timeMaxFlag {
		req.TimeMax = &builder.timeMax
	}
	if builder.userIdsFlag {
		req.UserIds = builder.userIds
	}
	if builder.includeExternalCalendarFlag {
		req.IncludeExternalCalendar = &builder.includeExternalCalendar
	}
	if builder.onlyBusyFlag {
		req.OnlyBusy = &builder.onlyBusy
	}
	if builder.needRsvpStatusFlag {
		req.NeedRsvpStatus = &builder.needRsvpStatus
	}
	return req
}

type BatchFreebusyPathReqBodyBuilder struct {
	timeMin                     string
	timeMinFlag                 bool
	timeMax                     string
	timeMaxFlag                 bool
	userIds                     []string
	userIdsFlag                 bool
	includeExternalCalendar     bool
	includeExternalCalendarFlag bool
	onlyBusy                    bool
	onlyBusyFlag                bool
	needRsvpStatus              bool
	needRsvpStatusFlag          bool
}

func NewBatchFreebusyPathReqBodyBuilder() *BatchFreebusyPathReqBodyBuilder {
	builder := &BatchFreebusyPathReqBodyBuilder{}
	return builder
}

// 获取忙闲信息的开始时间，RFC3339 date_time格式；time_min与time_max的时间区间不能超过3个月。
//
// 示例值：2020-10-28T12:00:00+08:00
func (builder *BatchFreebusyPathReqBodyBuilder) TimeMin(timeMin string) *BatchFreebusyPathReqBodyBuilder {
	builder.timeMin = timeMin
	builder.timeMinFlag = true
	return builder
}

// 获取忙闲信息的开始时间，RFC3339 date_time格式；time_min与time_max的时间区间不能超过3个月。
//
// 示例值：2020-10-28T12:00:00+08:00
func (builder *BatchFreebusyPathReqBodyBuilder) TimeMax(timeMax string) *BatchFreebusyPathReqBodyBuilder {
	builder.timeMax = timeMax
	builder.timeMaxFlag = true
	return builder
}

// 用户ID列表
//
// 示例值：
func (builder *BatchFreebusyPathReqBodyBuilder) UserIds(userIds []string) *BatchFreebusyPathReqBodyBuilder {
	builder.userIds = userIds
	builder.userIdsFlag = true
	return builder
}

// 是否包含绑定的三方日历中的日程，不传默认为true，即包含。
//
// 示例值：true
func (builder *BatchFreebusyPathReqBodyBuilder) IncludeExternalCalendar(includeExternalCalendar bool) *BatchFreebusyPathReqBodyBuilder {
	builder.includeExternalCalendar = includeExternalCalendar
	builder.includeExternalCalendarFlag = true
	return builder
}

// 是否包含标记为空闲的日程，不传默认为true，即包含空闲日程。
//
// 示例值：true
func (builder *BatchFreebusyPathReqBodyBuilder) OnlyBusy(onlyBusy bool) *BatchFreebusyPathReqBodyBuilder {
	builder.onlyBusy = onlyBusy
	builder.onlyBusyFlag = true
	return builder
}

// 是否需要RSVP状态信息
//
// 示例值：true
func (builder *BatchFreebusyPathReqBodyBuilder) NeedRsvpStatus(needRsvpStatus bool) *BatchFreebusyPathReqBodyBuilder {
	builder.needRsvpStatus = needRsvpStatus
	builder.needRsvpStatusFlag = true
	return builder
}

func (builder *BatchFreebusyPathReqBodyBuilder) Build() (*BatchFreebusyReqBody, error) {
	req := &BatchFreebusyReqBody{}
	if builder.timeMinFlag {
		req.TimeMin = &builder.timeMin
	}
	if builder.timeMaxFlag {
		req.TimeMax = &builder.timeMax
	}
	if builder.userIdsFlag {
		req.UserIds = builder.userIds
	}
	if builder.includeExternalCalendarFlag {
		req.IncludeExternalCalendar = &builder.includeExternalCalendar
	}
	if builder.onlyBusyFlag {
		req.OnlyBusy = &builder.onlyBusy
	}
	if builder.needRsvpStatusFlag {
		req.NeedRsvpStatus = &builder.needRsvpStatus
	}
	return req, nil
}

type BatchFreebusyReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *BatchFreebusyReqBody
}

func NewBatchFreebusyReqBuilder() *BatchFreebusyReqBuilder {
	builder := &BatchFreebusyReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *BatchFreebusyReqBuilder) UserIdType(userIdType string) *BatchFreebusyReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

//
func (builder *BatchFreebusyReqBuilder) Body(body *BatchFreebusyReqBody) *BatchFreebusyReqBuilder {
	builder.body = body
	return builder
}

func (builder *BatchFreebusyReqBuilder) Build() *BatchFreebusyReq {
	req := &BatchFreebusyReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.body
	return req
}

type BatchFreebusyReqBody struct {
	TimeMin *string `json:"time_min,omitempty"` // 获取忙闲信息的开始时间，RFC3339 date_time格式；time_min与time_max的时间区间不能超过3个月。

	TimeMax *string `json:"time_max,omitempty"` // 获取忙闲信息的开始时间，RFC3339 date_time格式；time_min与time_max的时间区间不能超过3个月。

	UserIds []string `json:"user_ids,omitempty"` // 用户ID列表

	IncludeExternalCalendar *bool `json:"include_external_calendar,omitempty"` // 是否包含绑定的三方日历中的日程，不传默认为true，即包含。

	OnlyBusy *bool `json:"only_busy,omitempty"` // 是否包含标记为空闲的日程，不传默认为true，即包含空闲日程。

	NeedRsvpStatus *bool `json:"need_rsvp_status,omitempty"` // 是否需要RSVP状态信息
}

type BatchFreebusyReq struct {
	apiReq *larkcore.ApiReq
	Body   *BatchFreebusyReqBody `body:""`
}

type BatchFreebusyRespData struct {
	FreebusyLists []*UserFreebusy `json:"freebusy_lists,omitempty"` // 用户忙闲信息列表
}

type BatchFreebusyResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *BatchFreebusyRespData `json:"data"` // 业务数据
}

func (resp *BatchFreebusyResp) Success() bool {
	return resp.Code == 0
}

type ListFreebusyReqBodyBuilder struct {
	timeMin     string // 查询时段开始时间，需要url编码
	timeMinFlag bool

	timeMax     string // 查询时段结束时间，需要url编码
	timeMaxFlag bool

	userId     string // 用户user_id，输入时与 room_id 二选一。参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction)
	userIdFlag bool

	roomId     string // 会议室room_id，输入时与 user_id 二选一
	roomIdFlag bool

	includeExternalCalendar     bool // 是否包含绑定的三方日历中的日程，不传默认为true，即包含。
	includeExternalCalendarFlag bool

	onlyBusy     bool // 是否包含标记为空闲的日程，不传默认为true，即包含。
	onlyBusyFlag bool

	needRsvpStatus     bool // 是否需要RSVP状态信息
	needRsvpStatusFlag bool
}

func NewListFreebusyReqBodyBuilder() *ListFreebusyReqBodyBuilder {
	builder := &ListFreebusyReqBodyBuilder{}
	return builder
}

// 查询时段开始时间，需要url编码
//
//示例值：2020-10-28T12:00:00+08:00
func (builder *ListFreebusyReqBodyBuilder) TimeMin(timeMin string) *ListFreebusyReqBodyBuilder {
	builder.timeMin = timeMin
	builder.timeMinFlag = true
	return builder
}

// 查询时段结束时间，需要url编码
//
//示例值：2020-12-28T12:00:00+08:00
func (builder *ListFreebusyReqBodyBuilder) TimeMax(timeMax string) *ListFreebusyReqBodyBuilder {
	builder.timeMax = timeMax
	builder.timeMaxFlag = true
	return builder
}

// 用户user_id，输入时与 room_id 二选一。参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction)
//
//示例值：ou_xxxxxxxxxx
func (builder *ListFreebusyReqBodyBuilder) UserId(userId string) *ListFreebusyReqBodyBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

// 会议室room_id，输入时与 user_id 二选一
//
//示例值：omm_xxxxxxxxxx
func (builder *ListFreebusyReqBodyBuilder) RoomId(roomId string) *ListFreebusyReqBodyBuilder {
	builder.roomId = roomId
	builder.roomIdFlag = true
	return builder
}

// 是否包含绑定的三方日历中的日程，不传默认为true，即包含。
//
//示例值：true
func (builder *ListFreebusyReqBodyBuilder) IncludeExternalCalendar(includeExternalCalendar bool) *ListFreebusyReqBodyBuilder {
	builder.includeExternalCalendar = includeExternalCalendar
	builder.includeExternalCalendarFlag = true
	return builder
}

// 是否包含标记为空闲的日程，不传默认为true，即包含。
//
//示例值：true
func (builder *ListFreebusyReqBodyBuilder) OnlyBusy(onlyBusy bool) *ListFreebusyReqBodyBuilder {
	builder.onlyBusy = onlyBusy
	builder.onlyBusyFlag = true
	return builder
}

// 是否需要RSVP状态信息
//
//示例值：true
func (builder *ListFreebusyReqBodyBuilder) NeedRsvpStatus(needRsvpStatus bool) *ListFreebusyReqBodyBuilder {
	builder.needRsvpStatus = needRsvpStatus
	builder.needRsvpStatusFlag = true
	return builder
}

func (builder *ListFreebusyReqBodyBuilder) Build() *ListFreebusyReqBody {
	req := &ListFreebusyReqBody{}
	if builder.timeMinFlag {
		req.TimeMin = &builder.timeMin
	}
	if builder.timeMaxFlag {
		req.TimeMax = &builder.timeMax
	}
	if builder.userIdFlag {
		req.UserId = &builder.userId
	}
	if builder.roomIdFlag {
		req.RoomId = &builder.roomId
	}
	if builder.includeExternalCalendarFlag {
		req.IncludeExternalCalendar = &builder.includeExternalCalendar
	}
	if builder.onlyBusyFlag {
		req.OnlyBusy = &builder.onlyBusy
	}
	if builder.needRsvpStatusFlag {
		req.NeedRsvpStatus = &builder.needRsvpStatus
	}
	return req
}

type ListFreebusyPathReqBodyBuilder struct {
	timeMin                     string
	timeMinFlag                 bool
	timeMax                     string
	timeMaxFlag                 bool
	userId                      string
	userIdFlag                  bool
	roomId                      string
	roomIdFlag                  bool
	includeExternalCalendar     bool
	includeExternalCalendarFlag bool
	onlyBusy                    bool
	onlyBusyFlag                bool
	needRsvpStatus              bool
	needRsvpStatusFlag          bool
}

func NewListFreebusyPathReqBodyBuilder() *ListFreebusyPathReqBodyBuilder {
	builder := &ListFreebusyPathReqBodyBuilder{}
	return builder
}

// 查询时段开始时间，需要url编码
//
// 示例值：2020-10-28T12:00:00+08:00
func (builder *ListFreebusyPathReqBodyBuilder) TimeMin(timeMin string) *ListFreebusyPathReqBodyBuilder {
	builder.timeMin = timeMin
	builder.timeMinFlag = true
	return builder
}

// 查询时段结束时间，需要url编码
//
// 示例值：2020-12-28T12:00:00+08:00
func (builder *ListFreebusyPathReqBodyBuilder) TimeMax(timeMax string) *ListFreebusyPathReqBodyBuilder {
	builder.timeMax = timeMax
	builder.timeMaxFlag = true
	return builder
}

// 用户user_id，输入时与 room_id 二选一。参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction)
//
// 示例值：ou_xxxxxxxxxx
func (builder *ListFreebusyPathReqBodyBuilder) UserId(userId string) *ListFreebusyPathReqBodyBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

// 会议室room_id，输入时与 user_id 二选一
//
// 示例值：omm_xxxxxxxxxx
func (builder *ListFreebusyPathReqBodyBuilder) RoomId(roomId string) *ListFreebusyPathReqBodyBuilder {
	builder.roomId = roomId
	builder.roomIdFlag = true
	return builder
}

// 是否包含绑定的三方日历中的日程，不传默认为true，即包含。
//
// 示例值：true
func (builder *ListFreebusyPathReqBodyBuilder) IncludeExternalCalendar(includeExternalCalendar bool) *ListFreebusyPathReqBodyBuilder {
	builder.includeExternalCalendar = includeExternalCalendar
	builder.includeExternalCalendarFlag = true
	return builder
}

// 是否包含标记为空闲的日程，不传默认为true，即包含。
//
// 示例值：true
func (builder *ListFreebusyPathReqBodyBuilder) OnlyBusy(onlyBusy bool) *ListFreebusyPathReqBodyBuilder {
	builder.onlyBusy = onlyBusy
	builder.onlyBusyFlag = true
	return builder
}

// 是否需要RSVP状态信息
//
// 示例值：true
func (builder *ListFreebusyPathReqBodyBuilder) NeedRsvpStatus(needRsvpStatus bool) *ListFreebusyPathReqBodyBuilder {
	builder.needRsvpStatus = needRsvpStatus
	builder.needRsvpStatusFlag = true
	return builder
}

func (builder *ListFreebusyPathReqBodyBuilder) Build() (*ListFreebusyReqBody, error) {
	req := &ListFreebusyReqBody{}
	if builder.timeMinFlag {
		req.TimeMin = &builder.timeMin
	}
	if builder.timeMaxFlag {
		req.TimeMax = &builder.timeMax
	}
	if builder.userIdFlag {
		req.UserId = &builder.userId
	}
	if builder.roomIdFlag {
		req.RoomId = &builder.roomId
	}
	if builder.includeExternalCalendarFlag {
		req.IncludeExternalCalendar = &builder.includeExternalCalendar
	}
	if builder.onlyBusyFlag {
		req.OnlyBusy = &builder.onlyBusy
	}
	if builder.needRsvpStatusFlag {
		req.NeedRsvpStatus = &builder.needRsvpStatus
	}
	return req, nil
}

type ListFreebusyReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *ListFreebusyReqBody
}

func NewListFreebusyReqBuilder() *ListFreebusyReqBuilder {
	builder := &ListFreebusyReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *ListFreebusyReqBuilder) UserIdType(userIdType string) *ListFreebusyReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

// 查询用户主日历或会议室的忙闲信息。
func (builder *ListFreebusyReqBuilder) Body(body *ListFreebusyReqBody) *ListFreebusyReqBuilder {
	builder.body = body
	return builder
}

func (builder *ListFreebusyReqBuilder) Build() *ListFreebusyReq {
	req := &ListFreebusyReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.body
	return req
}

type ListFreebusyReqBody struct {
	TimeMin *string `json:"time_min,omitempty"` // 查询时段开始时间，需要url编码

	TimeMax *string `json:"time_max,omitempty"` // 查询时段结束时间，需要url编码

	UserId *string `json:"user_id,omitempty"` // 用户user_id，输入时与 room_id 二选一。参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction)

	RoomId *string `json:"room_id,omitempty"` // 会议室room_id，输入时与 user_id 二选一

	IncludeExternalCalendar *bool `json:"include_external_calendar,omitempty"` // 是否包含绑定的三方日历中的日程，不传默认为true，即包含。

	OnlyBusy *bool `json:"only_busy,omitempty"` // 是否包含标记为空闲的日程，不传默认为true，即包含。

	NeedRsvpStatus *bool `json:"need_rsvp_status,omitempty"` // 是否需要RSVP状态信息
}

type ListFreebusyReq struct {
	apiReq *larkcore.ApiReq
	Body   *ListFreebusyReqBody `body:""`
}

type ListFreebusyRespData struct {
	FreebusyList []*Freebusy `json:"freebusy_list,omitempty"` // 日历上请求时间区间内的忙碌时间段信息。
}

type ListFreebusyResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ListFreebusyRespData `json:"data"` // 业务数据
}

func (resp *ListFreebusyResp) Success() bool {
	return resp.Code == 0
}

type GenerateCaldavConfSettingReqBodyBuilder struct {
	deviceName     string // 需要同步日历的设备名，在日历中展示用来管理密码
	deviceNameFlag bool
}

func NewGenerateCaldavConfSettingReqBodyBuilder() *GenerateCaldavConfSettingReqBodyBuilder {
	builder := &GenerateCaldavConfSettingReqBodyBuilder{}
	return builder
}

// 需要同步日历的设备名，在日历中展示用来管理密码
//
//示例值：iPhone
func (builder *GenerateCaldavConfSettingReqBodyBuilder) DeviceName(deviceName string) *GenerateCaldavConfSettingReqBodyBuilder {
	builder.deviceName = deviceName
	builder.deviceNameFlag = true
	return builder
}

func (builder *GenerateCaldavConfSettingReqBodyBuilder) Build() *GenerateCaldavConfSettingReqBody {
	req := &GenerateCaldavConfSettingReqBody{}
	if builder.deviceNameFlag {
		req.DeviceName = &builder.deviceName
	}
	return req
}

type GenerateCaldavConfSettingPathReqBodyBuilder struct {
	deviceName     string
	deviceNameFlag bool
}

func NewGenerateCaldavConfSettingPathReqBodyBuilder() *GenerateCaldavConfSettingPathReqBodyBuilder {
	builder := &GenerateCaldavConfSettingPathReqBodyBuilder{}
	return builder
}

// 需要同步日历的设备名，在日历中展示用来管理密码
//
// 示例值：iPhone
func (builder *GenerateCaldavConfSettingPathReqBodyBuilder) DeviceName(deviceName string) *GenerateCaldavConfSettingPathReqBodyBuilder {
	builder.deviceName = deviceName
	builder.deviceNameFlag = true
	return builder
}

func (builder *GenerateCaldavConfSettingPathReqBodyBuilder) Build() (*GenerateCaldavConfSettingReqBody, error) {
	req := &GenerateCaldavConfSettingReqBody{}
	if builder.deviceNameFlag {
		req.DeviceName = &builder.deviceName
	}
	return req, nil
}

type GenerateCaldavConfSettingReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *GenerateCaldavConfSettingReqBody
}

func NewGenerateCaldavConfSettingReqBuilder() *GenerateCaldavConfSettingReqBuilder {
	builder := &GenerateCaldavConfSettingReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 用于为当前用户生成一个CalDAV账号密码，用于将飞书日历信息同步到本地设备日历。
func (builder *GenerateCaldavConfSettingReqBuilder) Body(body *GenerateCaldavConfSettingReqBody) *GenerateCaldavConfSettingReqBuilder {
	builder.body = body
	return builder
}

func (builder *GenerateCaldavConfSettingReqBuilder) Build() *GenerateCaldavConfSettingReq {
	req := &GenerateCaldavConfSettingReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.Body = builder.body
	return req
}

type GenerateCaldavConfSettingReqBody struct {
	DeviceName *string `json:"device_name,omitempty"` // 需要同步日历的设备名，在日历中展示用来管理密码
}

type GenerateCaldavConfSettingReq struct {
	apiReq *larkcore.ApiReq
	Body   *GenerateCaldavConfSettingReqBody `body:""`
}

type GenerateCaldavConfSettingRespData struct {
	Password *string `json:"password,omitempty"` // caldav密码

	UserName *string `json:"user_name,omitempty"` // caldav用户名

	ServerAddress *string `json:"server_address,omitempty"` // 服务器地址

	DeviceName *string `json:"device_name,omitempty"` // 设备名
}

type GenerateCaldavConfSettingResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *GenerateCaldavConfSettingRespData `json:"data"` // 业务数据
}

func (resp *GenerateCaldavConfSettingResp) Success() bool {
	return resp.Code == 0
}

type CreateTimeoffEventReqBuilder struct {
	apiReq       *larkcore.ApiReq
	timeoffEvent *TimeoffEvent
}

func NewCreateTimeoffEventReqBuilder() *CreateTimeoffEventReqBuilder {
	builder := &CreateTimeoffEventReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *CreateTimeoffEventReqBuilder) UserIdType(userIdType string) *CreateTimeoffEventReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

// 为指定用户创建一个请假日程，可以是一个普通请假日程，也可以是一个全天日程。;创建请假日程后，会在相应时间内，在用户个人签名页展示请假信息。
func (builder *CreateTimeoffEventReqBuilder) TimeoffEvent(timeoffEvent *TimeoffEvent) *CreateTimeoffEventReqBuilder {
	builder.timeoffEvent = timeoffEvent
	return builder
}

func (builder *CreateTimeoffEventReqBuilder) Build() *CreateTimeoffEventReq {
	req := &CreateTimeoffEventReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.timeoffEvent
	return req
}

type CreateTimeoffEventReq struct {
	apiReq       *larkcore.ApiReq
	TimeoffEvent *TimeoffEvent `body:""`
}

type CreateTimeoffEventRespData struct {
	TimeoffEventId *string `json:"timeoff_event_id,omitempty"` // 休假申请的唯一标识id

	UserId *string `json:"user_id,omitempty"` // 用户的user id

	Timezone *string `json:"timezone,omitempty"` // 休假人的时区

	StartTime *string `json:"start_time,omitempty"` // 休假开始时间（时间戳）/日期（2021-01-01），为日期时将生成全天日程，且与end_time对应，不符合将返回错误

	EndTime *string `json:"end_time,omitempty"` // 休假结束时间（时间戳）/日期（2021-01-01），为日期时将生成全天日程，与start_time对应，不符合将返回错误

	Title *string `json:"title,omitempty"` // 休假日程标题，可自定义例如："请假中(全天) / 1-Day Time Off"，"请假中(半天) / 0.5-Day Time Off"，"长期休假中 / Leave of Absence"，"请假中"

	Description *string `json:"description,omitempty"` // 休假日程描述，可自定义,例如：;"若拒绝或删除此日程，飞书中相应的“请假”标签将自动消失，而请假系统中的休假申请不会被撤销。;;If the event is rejected or deleted, corresponding "On Leave" tag in Feishu will disappear, while the leave request in the time off system will not be revoked."
}

type CreateTimeoffEventResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *CreateTimeoffEventRespData `json:"data"` // 业务数据
}

func (resp *CreateTimeoffEventResp) Success() bool {
	return resp.Code == 0
}

type DeleteTimeoffEventReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewDeleteTimeoffEventReqBuilder() *DeleteTimeoffEventReqBuilder {
	builder := &DeleteTimeoffEventReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 休假申请的唯一标识id。参见[请假日程ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/timeoff_event/introduction#b6611a02)
//
// 示例值：timeoff:XXXXXX-XXXX-0917-1623-aa493d591a39
func (builder *DeleteTimeoffEventReqBuilder) TimeoffEventId(timeoffEventId string) *DeleteTimeoffEventReqBuilder {
	builder.apiReq.PathParams.Set("timeoff_event_id", fmt.Sprint(timeoffEventId))
	return builder
}

func (builder *DeleteTimeoffEventReqBuilder) Build() *DeleteTimeoffEventReq {
	req := &DeleteTimeoffEventReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	return req
}

type DeleteTimeoffEventReq struct {
	apiReq *larkcore.ApiReq
}

type DeleteTimeoffEventResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *DeleteTimeoffEventResp) Success() bool {
	return resp.Code == 0
}

type P2CalendarChangedV4Data struct {
	UserIdList []*UserId `json:"user_id_list,omitempty"` // 需要推送事件的用户列表
}

type P2CalendarChangedV4 struct {
	*larkevent.EventV2Base                          // 事件基础数据
	*larkevent.EventReq                             // 请求原生数据
	Event                  *P2CalendarChangedV4Data `json:"event"` // 事件内容
}

func (m *P2CalendarChangedV4) RawReq(req *larkevent.EventReq) {
	m.EventReq = req
}

type P2CalendarAclCreatedV4Data struct {
	AclId *string `json:"acl_id,omitempty"` // acl资源ID

	Role *string `json:"role,omitempty"` // 对日历的访问权限

	Scope *AclScopeEvent `json:"scope,omitempty"` // 权限范围

	UserIdList []*UserId `json:"user_id_list,omitempty"` // 需要推送事件的用户列表
}

type P2CalendarAclCreatedV4 struct {
	*larkevent.EventV2Base                             // 事件基础数据
	*larkevent.EventReq                                // 请求原生数据
	Event                  *P2CalendarAclCreatedV4Data `json:"event"` // 事件内容
}

func (m *P2CalendarAclCreatedV4) RawReq(req *larkevent.EventReq) {
	m.EventReq = req
}

type P2CalendarAclDeletedV4Data struct {
	AclId *string `json:"acl_id,omitempty"` // acl资源ID

	Role *string `json:"role,omitempty"` // 对日历的访问权限

	Scope *AclScopeEvent `json:"scope,omitempty"` // 权限范围

	UserIdList []*UserId `json:"user_id_list,omitempty"` // 需要推送事件的用户列表
}

type P2CalendarAclDeletedV4 struct {
	*larkevent.EventV2Base                             // 事件基础数据
	*larkevent.EventReq                                // 请求原生数据
	Event                  *P2CalendarAclDeletedV4Data `json:"event"` // 事件内容
}

func (m *P2CalendarAclDeletedV4) RawReq(req *larkevent.EventReq) {
	m.EventReq = req
}

type P2CalendarEventChangedV4Data struct {
	CalendarId *string `json:"calendar_id,omitempty"` // 日历id

	UserIdList []*UserId `json:"user_id_list,omitempty"` // 需要推送事件的用户列表

	CalendarEventId *string `json:"calendar_event_id,omitempty"` // 发生变更的日程ID

	ChangeType *string `json:"change_type,omitempty"` // 变更类型

	RsvpInfos []*OpenEventRsvpInfo `json:"rsvp_infos,omitempty"` // RSVP变更详情
}

type P2CalendarEventChangedV4 struct {
	*larkevent.EventV2Base                               // 事件基础数据
	*larkevent.EventReq                                  // 请求原生数据
	Event                  *P2CalendarEventChangedV4Data `json:"event"` // 事件内容
}

func (m *P2CalendarEventChangedV4) RawReq(req *larkevent.EventReq) {
	m.EventReq = req
}

type SearchCalendarIterator struct {
	nextPageToken *string
	items         []*Calendar
	index         int
	limit         int
	ctx           context.Context
	req           *SearchCalendarReq
	listFunc      func(ctx context.Context, req *SearchCalendarReq, options ...larkcore.RequestOptionFunc) (*SearchCalendarResp, error)
	options       []larkcore.RequestOptionFunc
	curlNum       int
}

func (iterator *SearchCalendarIterator) Next() (bool, *Calendar, error) {
	// 达到最大量，则返回
	if iterator.limit > 0 && iterator.curlNum >= iterator.limit {
		return false, nil, nil
	}

	// 为0则拉取数据
	if iterator.index == 0 || iterator.index >= len(iterator.items) {
		if iterator.index != 0 && iterator.nextPageToken == nil {
			return false, nil, nil
		}
		if iterator.nextPageToken != nil {
			iterator.req.apiReq.QueryParams.Set("page_token", *iterator.nextPageToken)
		}
		resp, err := iterator.listFunc(iterator.ctx, iterator.req, iterator.options...)
		if err != nil {
			return false, nil, err
		}

		if resp.Code != 0 {
			return false, nil, errors.New(fmt.Sprintf("Code:%d,Msg:%s", resp.Code, resp.Msg))
		}

		if len(resp.Data.Items) == 0 {
			return false, nil, nil
		}

		iterator.nextPageToken = resp.Data.PageToken
		iterator.items = resp.Data.Items
		iterator.index = 0
	}

	block := iterator.items[iterator.index]
	iterator.index++
	iterator.curlNum++
	return true, block, nil
}

func (iterator *SearchCalendarIterator) NextPageToken() *string {
	return iterator.nextPageToken
}

type ListCalendarAclIterator struct {
	nextPageToken *string
	items         []*CalendarAcl
	index         int
	limit         int
	ctx           context.Context
	req           *ListCalendarAclReq
	listFunc      func(ctx context.Context, req *ListCalendarAclReq, options ...larkcore.RequestOptionFunc) (*ListCalendarAclResp, error)
	options       []larkcore.RequestOptionFunc
	curlNum       int
}

func (iterator *ListCalendarAclIterator) Next() (bool, *CalendarAcl, error) {
	// 达到最大量，则返回
	if iterator.limit > 0 && iterator.curlNum >= iterator.limit {
		return false, nil, nil
	}

	// 为0则拉取数据
	if iterator.index == 0 || iterator.index >= len(iterator.items) {
		if iterator.index != 0 && iterator.nextPageToken == nil {
			return false, nil, nil
		}
		if iterator.nextPageToken != nil {
			iterator.req.apiReq.QueryParams.Set("page_token", *iterator.nextPageToken)
		}
		resp, err := iterator.listFunc(iterator.ctx, iterator.req, iterator.options...)
		if err != nil {
			return false, nil, err
		}

		if resp.Code != 0 {
			return false, nil, errors.New(fmt.Sprintf("Code:%d,Msg:%s", resp.Code, resp.Msg))
		}

		if len(resp.Data.Acls) == 0 {
			return false, nil, nil
		}

		iterator.nextPageToken = resp.Data.PageToken
		iterator.items = resp.Data.Acls
		iterator.index = 0
	}

	block := iterator.items[iterator.index]
	iterator.index++
	iterator.curlNum++
	return true, block, nil
}

func (iterator *ListCalendarAclIterator) NextPageToken() *string {
	return iterator.nextPageToken
}

type SearchCalendarEventIterator struct {
	nextPageToken *string
	items         []*CalendarEvent
	index         int
	limit         int
	ctx           context.Context
	req           *SearchCalendarEventReq
	listFunc      func(ctx context.Context, req *SearchCalendarEventReq, options ...larkcore.RequestOptionFunc) (*SearchCalendarEventResp, error)
	options       []larkcore.RequestOptionFunc
	curlNum       int
}

func (iterator *SearchCalendarEventIterator) Next() (bool, *CalendarEvent, error) {
	// 达到最大量，则返回
	if iterator.limit > 0 && iterator.curlNum >= iterator.limit {
		return false, nil, nil
	}

	// 为0则拉取数据
	if iterator.index == 0 || iterator.index >= len(iterator.items) {
		if iterator.index != 0 && iterator.nextPageToken == nil {
			return false, nil, nil
		}
		if iterator.nextPageToken != nil {
			iterator.req.apiReq.QueryParams.Set("page_token", *iterator.nextPageToken)
		}
		resp, err := iterator.listFunc(iterator.ctx, iterator.req, iterator.options...)
		if err != nil {
			return false, nil, err
		}

		if resp.Code != 0 {
			return false, nil, errors.New(fmt.Sprintf("Code:%d,Msg:%s", resp.Code, resp.Msg))
		}

		if len(resp.Data.Items) == 0 {
			return false, nil, nil
		}

		iterator.nextPageToken = resp.Data.PageToken
		iterator.items = resp.Data.Items
		iterator.index = 0
	}

	block := iterator.items[iterator.index]
	iterator.index++
	iterator.curlNum++
	return true, block, nil
}

func (iterator *SearchCalendarEventIterator) NextPageToken() *string {
	return iterator.nextPageToken
}

type ListCalendarEventAttendeeIterator struct {
	nextPageToken *string
	items         []*CalendarEventAttendee
	index         int
	limit         int
	ctx           context.Context
	req           *ListCalendarEventAttendeeReq
	listFunc      func(ctx context.Context, req *ListCalendarEventAttendeeReq, options ...larkcore.RequestOptionFunc) (*ListCalendarEventAttendeeResp, error)
	options       []larkcore.RequestOptionFunc
	curlNum       int
}

func (iterator *ListCalendarEventAttendeeIterator) Next() (bool, *CalendarEventAttendee, error) {
	// 达到最大量，则返回
	if iterator.limit > 0 && iterator.curlNum >= iterator.limit {
		return false, nil, nil
	}

	// 为0则拉取数据
	if iterator.index == 0 || iterator.index >= len(iterator.items) {
		if iterator.index != 0 && iterator.nextPageToken == nil {
			return false, nil, nil
		}
		if iterator.nextPageToken != nil {
			iterator.req.apiReq.QueryParams.Set("page_token", *iterator.nextPageToken)
		}
		resp, err := iterator.listFunc(iterator.ctx, iterator.req, iterator.options...)
		if err != nil {
			return false, nil, err
		}

		if resp.Code != 0 {
			return false, nil, errors.New(fmt.Sprintf("Code:%d,Msg:%s", resp.Code, resp.Msg))
		}

		if len(resp.Data.Items) == 0 {
			return false, nil, nil
		}

		iterator.nextPageToken = resp.Data.PageToken
		iterator.items = resp.Data.Items
		iterator.index = 0
	}

	block := iterator.items[iterator.index]
	iterator.index++
	iterator.curlNum++
	return true, block, nil
}

func (iterator *ListCalendarEventAttendeeIterator) NextPageToken() *string {
	return iterator.nextPageToken
}

type ListCalendarEventAttendeeChatMemberIterator struct {
	nextPageToken *string
	items         []*CalendarEventAttendeeChatMember
	index         int
	limit         int
	ctx           context.Context
	req           *ListCalendarEventAttendeeChatMemberReq
	listFunc      func(ctx context.Context, req *ListCalendarEventAttendeeChatMemberReq, options ...larkcore.RequestOptionFunc) (*ListCalendarEventAttendeeChatMemberResp, error)
	options       []larkcore.RequestOptionFunc
	curlNum       int
}

func (iterator *ListCalendarEventAttendeeChatMemberIterator) Next() (bool, *CalendarEventAttendeeChatMember, error) {
	// 达到最大量，则返回
	if iterator.limit > 0 && iterator.curlNum >= iterator.limit {
		return false, nil, nil
	}

	// 为0则拉取数据
	if iterator.index == 0 || iterator.index >= len(iterator.items) {
		if iterator.index != 0 && iterator.nextPageToken == nil {
			return false, nil, nil
		}
		if iterator.nextPageToken != nil {
			iterator.req.apiReq.QueryParams.Set("page_token", *iterator.nextPageToken)
		}
		resp, err := iterator.listFunc(iterator.ctx, iterator.req, iterator.options...)
		if err != nil {
			return false, nil, err
		}

		if resp.Code != 0 {
			return false, nil, errors.New(fmt.Sprintf("Code:%d,Msg:%s", resp.Code, resp.Msg))
		}

		if len(resp.Data.Items) == 0 {
			return false, nil, nil
		}

		iterator.nextPageToken = resp.Data.PageToken
		iterator.items = resp.Data.Items
		iterator.index = 0
	}

	block := iterator.items[iterator.index]
	iterator.index++
	iterator.curlNum++
	return true, block, nil
}

func (iterator *ListCalendarEventAttendeeChatMemberIterator) NextPageToken() *string {
	return iterator.nextPageToken
}
