// Package application 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 larkapplication

import (
	"fmt"

	"context"
	"errors"

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

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

const (
	UpdateAppBadgeUserIDTypeUserId  = "user_id"  // 以user_id来识别用户
	UpdateAppBadgeUserIDTypeUnionId = "union_id" // 以union_id来识别用户
	UpdateAppBadgeUserIDTypeOpenId  = "open_id"  // 以open_id来识别用户
)

const (
	ListAppRecommendRuleUserIDTypeUserId  = "user_id"  // 以user_id来识别用户
	ListAppRecommendRuleUserIDTypeUnionId = "union_id" // 以union_id来识别用户
	ListAppRecommendRuleUserIDTypeOpenId  = "open_id"  // 以open_id来识别用户
)

const (
	GetAppContactsRangeConfigurationDepartmentIDTypeDepartmentId     = "department_id"      // 以自定义department_id来标识部门
	GetAppContactsRangeConfigurationDepartmentIDTypeOpenDepartmentId = "open_department_id" // 以open_department_id来标识部门
)

const (
	GetAppContactsRangeConfigurationUserIDTypeUserId  = "user_id"  // 以user_id来识别用户
	GetAppContactsRangeConfigurationUserIDTypeUnionId = "union_id" // 以union_id来识别用户
	GetAppContactsRangeConfigurationUserIDTypeOpenId  = "open_id"  // 以open_id来识别用户
)

const (
	I18nKeyZhCn = "zh_cn" // 中文
	I18nKeyEnUs = "en_us" // 英文
	I18nKeyJaJp = "ja_jp" // 日文
)

const (
	GetApplicationUserIDTypeUserId  = "user_id"  // 以user_id来识别用户
	GetApplicationUserIDTypeUnionId = "union_id" // 以union_id来识别用户
	GetApplicationUserIDTypeOpenId  = "open_id"  // 以open_id来识别用户
)

const (
	AvailabilityStatusAvailabilityStopped     = 0 // 停用
	AvailabilityStatusAvailabilityActivated   = 1 // 启用
	AvailabilityStatusAvailabilityUnactivated = 2 // 未启用

)

const (
	PaymentTypeFree = 0 // 免费
	PaymentTypePaid = 1 // 付费

)

const (
	OwnerTypeFeishuTechnology = 0 // 飞书科技
	OwnerTypeFeishuThirdParty = 1 // 飞书合作伙伴
	OwnerTypeEnterpriseMember = 2 // 企业内成员

)

const (
	I18nKeyPatchApplicationZhCn = "zh_cn" // 中文
	I18nKeyPatchApplicationEnUs = "en_us" // 英文
	I18nKeyPatchApplicationJaJp = "ja_jp" // 日文
)

const (
	I18nKeyUnderauditlistApplicationZhCn = "zh_cn" // 中文
	I18nKeyUnderauditlistApplicationEnUs = "en_us" // 英文
	I18nKeyUnderauditlistApplicationJaJp = "ja_jp" // 日文
)

const (
	ListUnderAuditApplicationUserIDTypeUserId  = "user_id"  // 以user_id来识别用户
	ListUnderAuditApplicationUserIDTypeUnionId = "union_id" // 以union_id来识别用户
	ListUnderAuditApplicationUserIDTypeOpenId  = "open_id"  // 以open_id来识别用户
)

const (
	CycleTypeDay   = 1 // 日活
	CycleTypeWeek  = 2 // 周活， date字段应该填自然周周一的日期
	CycleTypeMonth = 3 // 月活， date字段应该填自然月1号的日期

)

const (
	DepartmentOverviewApplicationAppUsageDepartmentIDTypeDepartmentId     = "department_id"      // 以自定义department_id来标识部门
	DepartmentOverviewApplicationAppUsageDepartmentIDTypeOpenDepartmentId = "open_department_id" // 以open_department_id来标识部门
)

const (
	MessagePushOverviewApplicationAppUsageCycleTypeDay   = 1 // 日活
	MessagePushOverviewApplicationAppUsageCycleTypeWeek  = 2 // 周活， date字段应该填自然周周一的日期
	MessagePushOverviewApplicationAppUsageCycleTypeMonth = 3 // 月活， date字段应该填自然月1号的日期

)

const (
	MessagePushOverviewApplicationAppUsageDepartmentIdTypeDepartmentId     = "department_id"      // 以自定义department_id来标识部门
	MessagePushOverviewApplicationAppUsageDepartmentIdTypeOpenDepartmentId = "open_department_id" // 以open_department_id来标识部门
)

const (
	CycleTypeOverviewApplicationAppUsageDay   = 1 // 日活
	CycleTypeOverviewApplicationAppUsageWeek  = 2 // 周活， date字段应该填自然周周一的日期
	CycleTypeOverviewApplicationAppUsageMonth = 3 // 月活， date字段应该填自然月1号的日期

)

const (
	OverviewApplicationAppUsageAbilityApp = "app" // 返回应用整体的数据
	OverviewApplicationAppUsageAbilityMp  = "mp"  // 返回小程序的数据
	OverviewApplicationAppUsageAbilityH5  = "h5"  // 返回网页的数据
	OverviewApplicationAppUsageAbilityBot = "bot" // 返回机器人的数据
)

const (
	DepartmentIdTypeDepartmentId     = "department_id"      // 以自定义department_id来标识部门
	DepartmentIdTypeOpenDepartmentId = "open_department_id" // 以open_department_id来标识部门
)

const (
	GetAppVersionContactsRangeDepartmentIDTypeDepartmentId     = "department_id"      // 以自定义department_id来标识部门
	GetAppVersionContactsRangeDepartmentIDTypeOpenDepartmentId = "open_department_id" // 以open_department_id来标识部门
)

const (
	GetAppVersionContactsRangeUserIDTypeUserId  = "user_id"  // 以user_id来识别用户
	GetAppVersionContactsRangeUserIDTypeUnionId = "union_id" // 以union_id来识别用户
	GetAppVersionContactsRangeUserIDTypeOpenId  = "open_id"  // 以open_id来识别用户
)

const (
	I18nKeyGetApplicationAppVersionZhCn = "zh_cn" // 中文
	I18nKeyGetApplicationAppVersionEnUs = "en_us" // 英文
	I18nKeyGetApplicationAppVersionJaJp = "ja_jp" // 日文
)

const (
	GetAppVersionUserIDTypeUserId  = "user_id"  // 以user_id来识别用户
	GetAppVersionUserIDTypeUnionId = "union_id" // 以union_id来识别用户
	GetAppVersionUserIDTypeOpenId  = "open_id"  // 以open_id来识别用户
)

const (
	I18nKeyListApplicationAppVersionZhCn = "zh_cn" // 中文
	I18nKeyListApplicationAppVersionEnUs = "en_us" // 英文
	I18nKeyListApplicationAppVersionJaJp = "ja_jp" // 日文
)

const (
	ListApplicationAppVersionUserIDTypeUserId  = "user_id"  // 以user_id来识别用户
	ListApplicationAppVersionUserIDTypeUnionId = "union_id" // 以union_id来识别用户
	ListApplicationAppVersionUserIDTypeOpenId  = "open_id"  // 以open_id来识别用户
)

const (
	AppVersionStatusUnknown    = 0 // 未知状态
	AppVersionStatusAudited    = 1 // 审核通过
	AppVersionStatusReject     = 2 // 审核拒绝
	AppVersionStatusUnderAudit = 3 // 审核中
	AppVersionStatusUnaudit    = 4 // 未提交审核

)

const (
	UpdateAppVersionUserIDTypeUserId  = "user_id"  // 以user_id来识别用户
	UpdateAppVersionUserIDTypeUnionId = "union_id" // 以union_id来识别用户
	UpdateAppVersionUserIDTypeOpenId  = "open_id"  // 以open_id来识别用户
)

const (
	GetApplicationCollaboratorsUserIDTypeOpenId  = "open_id"  // 用户 open_id
	GetApplicationCollaboratorsUserIDTypeUnionId = "union_id" // 用户 union_id
	GetApplicationCollaboratorsUserIDTypeUserId  = "user_id"  // 用户 user_id
)

const (
	UpdateApplicationCollaboratorsUserIDTypeOpenId  = "open_id"  // 用户 open_id
	UpdateApplicationCollaboratorsUserIDTypeUnionId = "union_id" // 用户 union_id
	UpdateApplicationCollaboratorsUserIDTypeUserId  = "user_id"  // 用户 user_id
)

const (
	PatchApplicationContactsRangeContactsRangeTypeEqualToAvailability = "equal_to_availability" // 与应用可用范围一致
	PatchApplicationContactsRangeContactsRangeTypeSome                = "some"                  // 修改部分成员
	PatchApplicationContactsRangeContactsRangeTypeAll                 = "all"                   // 全部成员范围
)

const (
	PatchApplicationContactsRangeUserIDTypeOpenId  = "open_id"  // 以open_id 标识成员
	PatchApplicationContactsRangeUserIDTypeUserId  = "user_id"  // 以user_id 标识用户
	PatchApplicationContactsRangeUserIDTypeUnionId = "union_id" // 以union_id 标识用户
)

const (
	PatchApplicationContactsRangeDepartmentIDTypeOpenDepartmentId = "open_department_id" // 以open_department_id标识部门
	PatchApplicationContactsRangeDepartmentIDTypeDepartmentId     = "department_id"      // 以department_id标识部门
)

const (
	OpenFeedbackTypeFault  = 1 // 故障反馈
	OpenFeedbackTypeAdvice = 2 // 产品建议

)

const (
	OpenMarkStatusUnmarked   = 0 // 反馈未处理
	OpenMarkStatusMarked     = 1 // 反馈已处理
	OpenMarkStatusProcessing = 2 // 反馈处理中
	OpenMarkStatusClosed     = 3 // 反馈已关闭

)

const (
	ListApplicationFeedbackUserIDTypeOpenId  = "open_id"  // 用户的 open id
	ListApplicationFeedbackUserIDTypeUnionId = "union_id" // 用户的 union id
	ListApplicationFeedbackUserIDTypeUserId  = "user_id"  // 用户的 user id
)

const (
	PatchApplicationFeedbackUserIDTypeOpenId  = "open_id"  // 用户的 open id
	PatchApplicationFeedbackUserIDTypeUnionId = "union_id" // 用户的 union id
	PatchApplicationFeedbackUserIDTypeUserId  = "user_id"  // 用户的 user id
)

const (
	OpenMarkStatusPatchApplicationFeedbackUnmarked   = 0 // 反馈未处理
	OpenMarkStatusPatchApplicationFeedbackMarked     = 1 // 反馈已处理
	OpenMarkStatusPatchApplicationFeedbackProcessing = 2 // 反馈处理中
	OpenMarkStatusPatchApplicationFeedbackClosed     = 3 // 反馈已关闭

)

const (
	UpdateApplicationOwnerUserIDTypeOpenId  = "open_id"  // 以open_id 标识用户
	UpdateApplicationOwnerUserIDTypeUserId  = "user_id"  // 以user_id 标识用户
	UpdateApplicationOwnerUserIDTypeUnionId = "union_id" // 以union_id 标识用户
)

const (
	CheckWhiteBlackListApplicationVisibilityUserIDTypeUserId  = "user_id"  // 以user_id来标识用户
	CheckWhiteBlackListApplicationVisibilityUserIDTypeUnionId = "union_id" // 以union_id来标识用户
	CheckWhiteBlackListApplicationVisibilityUserIDTypeOpenId  = "open_id"  // 以open_id来标识用户
)

const (
	CheckWhiteBlackListApplicationVisibilityDepartmentIDTypeDepartmentId     = "department_id"      // 以department_id来标识部门
	CheckWhiteBlackListApplicationVisibilityDepartmentIDTypeOpenDepartmentId = "open_department_id" // 以open_department_id来标识部门
)

const (
	PatchApplicationVisibilityDepartmentIDTypeOpenDepartmentId = "open_department_id" // 以open_department_id标识部门
	PatchApplicationVisibilityDepartmentIDTypeDepartmentId     = "department_id"      // 以department_id标识部门
)

const (
	PatchApplicationVisibilityUserIDTypeOpenId  = "open_id"  // 以open_id 标识用户
	PatchApplicationVisibilityUserIDTypeUserId  = "user_id"  // 以user_id 标识用户
	PatchApplicationVisibilityUserIDTypeUnionId = "union_id" // 以union_id 标识用户
)

type Accessibility struct {
	Reason *string `json:"reason,omitempty"` // 更新访问状态原因说明，停用OpenAPI时将作为OpenAPI错误消息返回；若设置停用，则该字段必填.

	State *string `json:"state,omitempty"` // 访问状态,取值"Enable"或"Disable"
}

type AccessibilityBuilder struct {
	reason     string // 更新访问状态原因说明，停用OpenAPI时将作为OpenAPI错误消息返回；若设置停用，则该字段必填.
	reasonFlag bool

	state     string // 访问状态,取值"Enable"或"Disable"
	stateFlag bool
}

func NewAccessibilityBuilder() *AccessibilityBuilder {
	builder := &AccessibilityBuilder{}
	return builder
}

// 更新访问状态原因说明，停用OpenAPI时将作为OpenAPI错误消息返回；若设置停用，则该字段必填.
//
// 示例值：应用发送消息过于频繁，暂停应用调用发送OpenAPI
func (builder *AccessibilityBuilder) Reason(reason string) *AccessibilityBuilder {
	builder.reason = reason
	builder.reasonFlag = true
	return builder
}

// 访问状态,取值"Enable"或"Disable"
//
// 示例值：Enable
func (builder *AccessibilityBuilder) State(state string) *AccessibilityBuilder {
	builder.state = state
	builder.stateFlag = true
	return builder
}

func (builder *AccessibilityBuilder) Build() *Accessibility {
	req := &Accessibility{}
	if builder.reasonFlag {
		req.Reason = &builder.reason

	}
	if builder.stateFlag {
		req.State = &builder.state

	}
	return req
}

type AppAbility struct {
	Gadget *Gadget `json:"gadget,omitempty"` // 小程序能力

	WebApp *WebApp `json:"web_app,omitempty"` // 网页能力

	Bot *Bot `json:"bot,omitempty"` // 机器人能力

	WorkplaceWidgets []*WorkplaceWidget `json:"workplace_widgets,omitempty"` // 小组件能力

	Navigate *Navigate `json:"navigate,omitempty"` // 主导航小程序

	CloudDoc *CloudDoc `json:"cloud_doc,omitempty"` // 云文档应用

	DocsBlocks []*DocsBlock `json:"docs_blocks,omitempty"` // 云文档小组件

	MessageAction *MessageAction `json:"message_action,omitempty"` // 消息快捷操作

	PlusMenu *PlusMenu `json:"plus_menu,omitempty"` // 加号菜单
}

type AppAbilityBuilder struct {
	gadget     *Gadget // 小程序能力
	gadgetFlag bool

	webApp     *WebApp // 网页能力
	webAppFlag bool

	bot     *Bot // 机器人能力
	botFlag bool

	workplaceWidgets     []*WorkplaceWidget // 小组件能力
	workplaceWidgetsFlag bool

	navigate     *Navigate // 主导航小程序
	navigateFlag bool

	cloudDoc     *CloudDoc // 云文档应用
	cloudDocFlag bool

	docsBlocks     []*DocsBlock // 云文档小组件
	docsBlocksFlag bool

	messageAction     *MessageAction // 消息快捷操作
	messageActionFlag bool

	plusMenu     *PlusMenu // 加号菜单
	plusMenuFlag bool
}

func NewAppAbilityBuilder() *AppAbilityBuilder {
	builder := &AppAbilityBuilder{}
	return builder
}

// 小程序能力
//
// 示例值：
func (builder *AppAbilityBuilder) Gadget(gadget *Gadget) *AppAbilityBuilder {
	builder.gadget = gadget
	builder.gadgetFlag = true
	return builder
}

// 网页能力
//
// 示例值：
func (builder *AppAbilityBuilder) WebApp(webApp *WebApp) *AppAbilityBuilder {
	builder.webApp = webApp
	builder.webAppFlag = true
	return builder
}

// 机器人能力
//
// 示例值：
func (builder *AppAbilityBuilder) Bot(bot *Bot) *AppAbilityBuilder {
	builder.bot = bot
	builder.botFlag = true
	return builder
}

// 小组件能力
//
// 示例值：
func (builder *AppAbilityBuilder) WorkplaceWidgets(workplaceWidgets []*WorkplaceWidget) *AppAbilityBuilder {
	builder.workplaceWidgets = workplaceWidgets
	builder.workplaceWidgetsFlag = true
	return builder
}

// 主导航小程序
//
// 示例值：
func (builder *AppAbilityBuilder) Navigate(navigate *Navigate) *AppAbilityBuilder {
	builder.navigate = navigate
	builder.navigateFlag = true
	return builder
}

// 云文档应用
//
// 示例值：
func (builder *AppAbilityBuilder) CloudDoc(cloudDoc *CloudDoc) *AppAbilityBuilder {
	builder.cloudDoc = cloudDoc
	builder.cloudDocFlag = true
	return builder
}

// 云文档小组件
//
// 示例值：
func (builder *AppAbilityBuilder) DocsBlocks(docsBlocks []*DocsBlock) *AppAbilityBuilder {
	builder.docsBlocks = docsBlocks
	builder.docsBlocksFlag = true
	return builder
}

// 消息快捷操作
//
// 示例值：
func (builder *AppAbilityBuilder) MessageAction(messageAction *MessageAction) *AppAbilityBuilder {
	builder.messageAction = messageAction
	builder.messageActionFlag = true
	return builder
}

// 加号菜单
//
// 示例值：
func (builder *AppAbilityBuilder) PlusMenu(plusMenu *PlusMenu) *AppAbilityBuilder {
	builder.plusMenu = plusMenu
	builder.plusMenuFlag = true
	return builder
}

func (builder *AppAbilityBuilder) Build() *AppAbility {
	req := &AppAbility{}
	if builder.gadgetFlag {
		req.Gadget = builder.gadget
	}
	if builder.webAppFlag {
		req.WebApp = builder.webApp
	}
	if builder.botFlag {
		req.Bot = builder.bot
	}
	if builder.workplaceWidgetsFlag {
		req.WorkplaceWidgets = builder.workplaceWidgets
	}
	if builder.navigateFlag {
		req.Navigate = builder.navigate
	}
	if builder.cloudDocFlag {
		req.CloudDoc = builder.cloudDoc
	}
	if builder.docsBlocksFlag {
		req.DocsBlocks = builder.docsBlocks
	}
	if builder.messageActionFlag {
		req.MessageAction = builder.messageAction
	}
	if builder.plusMenuFlag {
		req.PlusMenu = builder.plusMenu
	}
	return req
}

type AppAbilityBot struct {
	Enable *bool `json:"enable,omitempty"` // 是否开启

	MessageCardCallbackUrl *string `json:"message_card_callback_url,omitempty"` // 消息卡片的回调地址

	I18ns []*AppAbilityBotI18n `json:"i18ns,omitempty"` // 国际化内容
}

type AppAbilityBotBuilder struct {
	enable     bool // 是否开启
	enableFlag bool

	messageCardCallbackUrl     string // 消息卡片的回调地址
	messageCardCallbackUrlFlag bool

	i18ns     []*AppAbilityBotI18n // 国际化内容
	i18nsFlag bool
}

func NewAppAbilityBotBuilder() *AppAbilityBotBuilder {
	builder := &AppAbilityBotBuilder{}
	return builder
}

// 是否开启
//
// 示例值：true
func (builder *AppAbilityBotBuilder) Enable(enable bool) *AppAbilityBotBuilder {
	builder.enable = enable
	builder.enableFlag = true
	return builder
}

// 消息卡片的回调地址
//
// 示例值：https://open.feishu.cn
func (builder *AppAbilityBotBuilder) MessageCardCallbackUrl(messageCardCallbackUrl string) *AppAbilityBotBuilder {
	builder.messageCardCallbackUrl = messageCardCallbackUrl
	builder.messageCardCallbackUrlFlag = true
	return builder
}

// 国际化内容
//
// 示例值：
func (builder *AppAbilityBotBuilder) I18ns(i18ns []*AppAbilityBotI18n) *AppAbilityBotBuilder {
	builder.i18ns = i18ns
	builder.i18nsFlag = true
	return builder
}

func (builder *AppAbilityBotBuilder) Build() *AppAbilityBot {
	req := &AppAbilityBot{}
	if builder.enableFlag {
		req.Enable = &builder.enable

	}
	if builder.messageCardCallbackUrlFlag {
		req.MessageCardCallbackUrl = &builder.messageCardCallbackUrl

	}
	if builder.i18nsFlag {
		req.I18ns = builder.i18ns
	}
	return req
}

type AppAbilityBotI18n struct {
	I18nKey *string `json:"i18n_key,omitempty"` // 语种类型

	GetStartedDesc *string `json:"get_started_desc,omitempty"` // 如何开始使用描述文案
}

type AppAbilityBotI18nBuilder struct {
	i18nKey     string // 语种类型
	i18nKeyFlag bool

	getStartedDesc     string // 如何开始使用描述文案
	getStartedDescFlag bool
}

func NewAppAbilityBotI18nBuilder() *AppAbilityBotI18nBuilder {
	builder := &AppAbilityBotI18nBuilder{}
	return builder
}

// 语种类型
//
// 示例值：zh_cn
func (builder *AppAbilityBotI18nBuilder) I18nKey(i18nKey string) *AppAbilityBotI18nBuilder {
	builder.i18nKey = i18nKey
	builder.i18nKeyFlag = true
	return builder
}

// 如何开始使用描述文案
//
// 示例值：如何使用机器人
func (builder *AppAbilityBotI18nBuilder) GetStartedDesc(getStartedDesc string) *AppAbilityBotI18nBuilder {
	builder.getStartedDesc = getStartedDesc
	builder.getStartedDescFlag = true
	return builder
}

func (builder *AppAbilityBotI18nBuilder) Build() *AppAbilityBotI18n {
	req := &AppAbilityBotI18n{}
	if builder.i18nKeyFlag {
		req.I18nKey = &builder.i18nKey

	}
	if builder.getStartedDescFlag {
		req.GetStartedDesc = &builder.getStartedDesc

	}
	return req
}

type AppAbilityWeb struct {
	Enable *bool `json:"enable,omitempty"` // 是否开启网页应用能力

	PcUrl *string `json:"pc_url,omitempty"` // PC端链接

	PcNewPageOpenMode *string `json:"pc_new_page_open_mode,omitempty"` // PC端新页面打开方式

	MobileUrl *string `json:"mobile_url,omitempty"` // 移动端链接
}

type AppAbilityWebBuilder struct {
	enable     bool // 是否开启网页应用能力
	enableFlag bool

	pcUrl     string // PC端链接
	pcUrlFlag bool

	pcNewPageOpenMode     string // PC端新页面打开方式
	pcNewPageOpenModeFlag bool

	mobileUrl     string // 移动端链接
	mobileUrlFlag bool
}

func NewAppAbilityWebBuilder() *AppAbilityWebBuilder {
	builder := &AppAbilityWebBuilder{}
	return builder
}

// 是否开启网页应用能力
//
// 示例值：true
func (builder *AppAbilityWebBuilder) Enable(enable bool) *AppAbilityWebBuilder {
	builder.enable = enable
	builder.enableFlag = true
	return builder
}

// PC端链接
//
// 示例值：https://open.feishu.cn/
func (builder *AppAbilityWebBuilder) PcUrl(pcUrl string) *AppAbilityWebBuilder {
	builder.pcUrl = pcUrl
	builder.pcUrlFlag = true
	return builder
}

// PC端新页面打开方式
//
// 示例值：new_tab
func (builder *AppAbilityWebBuilder) PcNewPageOpenMode(pcNewPageOpenMode string) *AppAbilityWebBuilder {
	builder.pcNewPageOpenMode = pcNewPageOpenMode
	builder.pcNewPageOpenModeFlag = true
	return builder
}

// 移动端链接
//
// 示例值：https://open.feishu.cn/
func (builder *AppAbilityWebBuilder) MobileUrl(mobileUrl string) *AppAbilityWebBuilder {
	builder.mobileUrl = mobileUrl
	builder.mobileUrlFlag = true
	return builder
}

func (builder *AppAbilityWebBuilder) Build() *AppAbilityWeb {
	req := &AppAbilityWeb{}
	if builder.enableFlag {
		req.Enable = &builder.enable

	}
	if builder.pcUrlFlag {
		req.PcUrl = &builder.pcUrl

	}
	if builder.pcNewPageOpenModeFlag {
		req.PcNewPageOpenMode = &builder.pcNewPageOpenMode

	}
	if builder.mobileUrlFlag {
		req.MobileUrl = &builder.mobileUrl

	}
	return req
}

type AppAdminUser struct {
	AdminType []string `json:"admin_type,omitempty"` // 管理员类型列表，如果该管理员同时是超级管理员 又是管理员，则同时返回两个角色。 ""super_admin""：超级管理员 ""admin""：管理员 返回示例：[""super_admin"",""admin""]"

	UserId *string `json:"user_id,omitempty"` // 反馈用户id，租户内用户的唯一标识 ，ID值与查询参数中的user_id_type对应
}

type AppAdminUserBuilder struct {
	adminType     []string // 管理员类型列表，如果该管理员同时是超级管理员 又是管理员，则同时返回两个角色。 ""super_admin""：超级管理员 ""admin""：管理员 返回示例：[""super_admin"",""admin""]"
	adminTypeFlag bool

	userId     string // 反馈用户id，租户内用户的唯一标识 ，ID值与查询参数中的user_id_type对应
	userIdFlag bool
}

func NewAppAdminUserBuilder() *AppAdminUserBuilder {
	builder := &AppAdminUserBuilder{}
	return builder
}

// 管理员类型列表，如果该管理员同时是超级管理员 又是管理员，则同时返回两个角色。 ""super_admin""：超级管理员 ""admin""：管理员 返回示例：[""super_admin"",""admin""]"
//
// 示例值：["admin","super_admin"]
func (builder *AppAdminUserBuilder) AdminType(adminType []string) *AppAdminUserBuilder {
	builder.adminType = adminType
	builder.adminTypeFlag = true
	return builder
}

// 反馈用户id，租户内用户的唯一标识 ，ID值与查询参数中的user_id_type对应
//
// 示例值：6865121785549946899
func (builder *AppAdminUserBuilder) UserId(userId string) *AppAdminUserBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

func (builder *AppAdminUserBuilder) Build() *AppAdminUser {
	req := &AppAdminUser{}
	if builder.adminTypeFlag {
		req.AdminType = builder.adminType
	}
	if builder.userIdFlag {
		req.UserId = &builder.userId

	}
	return req
}

type AppBadge struct {
	UserId *string `json:"user_id,omitempty"` // 用户ID

	Version *string `json:"version,omitempty"` // badge数据版本号

	Extra *string `json:"extra,omitempty"` // badge extra 信息

	Pc *ClientBadgeNum `json:"pc,omitempty"` // pc端badge数量

	Mobile *ClientBadgeNum `json:"mobile,omitempty"` // 移动端badge数量
}

type AppBadgeBuilder struct {
	userId     string // 用户ID
	userIdFlag bool

	version     string // badge数据版本号
	versionFlag bool

	extra     string // badge extra 信息
	extraFlag bool

	pc     *ClientBadgeNum // pc端badge数量
	pcFlag bool

	mobile     *ClientBadgeNum // 移动端badge数量
	mobileFlag bool
}

func NewAppBadgeBuilder() *AppBadgeBuilder {
	builder := &AppBadgeBuilder{}
	return builder
}

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

// badge数据版本号
//
// 示例值：1664360599355
func (builder *AppBadgeBuilder) Version(version string) *AppBadgeBuilder {
	builder.version = version
	builder.versionFlag = true
	return builder
}

// badge extra 信息
//
// 示例值：{}
func (builder *AppBadgeBuilder) Extra(extra string) *AppBadgeBuilder {
	builder.extra = extra
	builder.extraFlag = true
	return builder
}

// pc端badge数量
//
// 示例值：
func (builder *AppBadgeBuilder) Pc(pc *ClientBadgeNum) *AppBadgeBuilder {
	builder.pc = pc
	builder.pcFlag = true
	return builder
}

// 移动端badge数量
//
// 示例值：
func (builder *AppBadgeBuilder) Mobile(mobile *ClientBadgeNum) *AppBadgeBuilder {
	builder.mobile = mobile
	builder.mobileFlag = true
	return builder
}

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

	}
	if builder.versionFlag {
		req.Version = &builder.version

	}
	if builder.extraFlag {
		req.Extra = &builder.extra

	}
	if builder.pcFlag {
		req.Pc = builder.pc
	}
	if builder.mobileFlag {
		req.Mobile = builder.mobile
	}
	return req
}

type AppCollaborator struct {
	Type *string `json:"type,omitempty"` // 人员类型

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

type AppCollaboratorBuilder struct {
	type_    string // 人员类型
	typeFlag bool

	userId     string // 用户ID
	userIdFlag bool
}

func NewAppCollaboratorBuilder() *AppCollaboratorBuilder {
	builder := &AppCollaboratorBuilder{}
	return builder
}

// 人员类型
//
// 示例值：administrator
func (builder *AppCollaboratorBuilder) Type(type_ string) *AppCollaboratorBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

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

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

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

	}
	return req
}

type AppCommonCategory struct {
	I18nKey *string `json:"i18n_key,omitempty"` // 国际化语言的 key

	Category *string `json:"category,omitempty"` // 应用分类
}

type AppCommonCategoryBuilder struct {
	i18nKey     string // 国际化语言的 key
	i18nKeyFlag bool

	category     string // 应用分类
	categoryFlag bool
}

func NewAppCommonCategoryBuilder() *AppCommonCategoryBuilder {
	builder := &AppCommonCategoryBuilder{}
	return builder
}

// 国际化语言的 key
//
// 示例值：zh_cn
func (builder *AppCommonCategoryBuilder) I18nKey(i18nKey string) *AppCommonCategoryBuilder {
	builder.i18nKey = i18nKey
	builder.i18nKeyFlag = true
	return builder
}

// 应用分类
//
// 示例值：分析工具
func (builder *AppCommonCategoryBuilder) Category(category string) *AppCommonCategoryBuilder {
	builder.category = category
	builder.categoryFlag = true
	return builder
}

func (builder *AppCommonCategoryBuilder) Build() *AppCommonCategory {
	req := &AppCommonCategory{}
	if builder.i18nKeyFlag {
		req.I18nKey = &builder.i18nKey

	}
	if builder.categoryFlag {
		req.Category = &builder.category

	}
	return req
}

type AppConfigCallback struct {
	CallbackType *string `json:"callback_type,omitempty"` // 回调类型

	RequestUrl *string `json:"request_url,omitempty"` // 如果回调是 webhook，webhook 的请求地址

	AddCallbacks []string `json:"add_callbacks,omitempty"` // 添加哪些回调

	RemoveCallbacks []string `json:"remove_callbacks,omitempty"` // 移除哪些回调
}

type AppConfigCallbackBuilder struct {
	callbackType     string // 回调类型
	callbackTypeFlag bool

	requestUrl     string // 如果回调是 webhook，webhook 的请求地址
	requestUrlFlag bool

	addCallbacks     []string // 添加哪些回调
	addCallbacksFlag bool

	removeCallbacks     []string // 移除哪些回调
	removeCallbacksFlag bool
}

func NewAppConfigCallbackBuilder() *AppConfigCallbackBuilder {
	builder := &AppConfigCallbackBuilder{}
	return builder
}

// 回调类型
//
// 示例值：webhook
func (builder *AppConfigCallbackBuilder) CallbackType(callbackType string) *AppConfigCallbackBuilder {
	builder.callbackType = callbackType
	builder.callbackTypeFlag = true
	return builder
}

// 如果回调是 webhook，webhook 的请求地址
//
// 示例值：https://open.feishu.cn/callback
func (builder *AppConfigCallbackBuilder) RequestUrl(requestUrl string) *AppConfigCallbackBuilder {
	builder.requestUrl = requestUrl
	builder.requestUrlFlag = true
	return builder
}

// 添加哪些回调
//
// 示例值：
func (builder *AppConfigCallbackBuilder) AddCallbacks(addCallbacks []string) *AppConfigCallbackBuilder {
	builder.addCallbacks = addCallbacks
	builder.addCallbacksFlag = true
	return builder
}

// 移除哪些回调
//
// 示例值：
func (builder *AppConfigCallbackBuilder) RemoveCallbacks(removeCallbacks []string) *AppConfigCallbackBuilder {
	builder.removeCallbacks = removeCallbacks
	builder.removeCallbacksFlag = true
	return builder
}

func (builder *AppConfigCallbackBuilder) Build() *AppConfigCallback {
	req := &AppConfigCallback{}
	if builder.callbackTypeFlag {
		req.CallbackType = &builder.callbackType

	}
	if builder.requestUrlFlag {
		req.RequestUrl = &builder.requestUrl

	}
	if builder.addCallbacksFlag {
		req.AddCallbacks = builder.addCallbacks
	}
	if builder.removeCallbacksFlag {
		req.RemoveCallbacks = builder.removeCallbacks
	}
	return req
}

type AppConfigContactsRange struct {
	ContactsRangeType *string `json:"contacts_range_type,omitempty"` // 更新范围方式

	VisibleList *AppContactsRangeIdList `json:"visible_list,omitempty"` // 通讯录可用人员列表
}

type AppConfigContactsRangeBuilder struct {
	contactsRangeType     string // 更新范围方式
	contactsRangeTypeFlag bool

	visibleList     *AppContactsRangeIdList // 通讯录可用人员列表
	visibleListFlag bool
}

func NewAppConfigContactsRangeBuilder() *AppConfigContactsRangeBuilder {
	builder := &AppConfigContactsRangeBuilder{}
	return builder
}

// 更新范围方式
//
// 示例值：some
func (builder *AppConfigContactsRangeBuilder) ContactsRangeType(contactsRangeType string) *AppConfigContactsRangeBuilder {
	builder.contactsRangeType = contactsRangeType
	builder.contactsRangeTypeFlag = true
	return builder
}

// 通讯录可用人员列表
//
// 示例值：
func (builder *AppConfigContactsRangeBuilder) VisibleList(visibleList *AppContactsRangeIdList) *AppConfigContactsRangeBuilder {
	builder.visibleList = visibleList
	builder.visibleListFlag = true
	return builder
}

func (builder *AppConfigContactsRangeBuilder) Build() *AppConfigContactsRange {
	req := &AppConfigContactsRange{}
	if builder.contactsRangeTypeFlag {
		req.ContactsRangeType = &builder.contactsRangeType

	}
	if builder.visibleListFlag {
		req.VisibleList = builder.visibleList
	}
	return req
}

type AppConfigEvent struct {
	SubscriptionType *string `json:"subscription_type,omitempty"` // 订阅方式

	RequestUrl *string `json:"request_url,omitempty"` // 接收事件的服务器地址

	AddEvents []string `json:"add_events,omitempty"` // 添加事件列表

	RemoveEvents []string `json:"remove_events,omitempty"` // 删除事件列表
}

type AppConfigEventBuilder struct {
	subscriptionType     string // 订阅方式
	subscriptionTypeFlag bool

	requestUrl     string // 接收事件的服务器地址
	requestUrlFlag bool

	addEvents     []string // 添加事件列表
	addEventsFlag bool

	removeEvents     []string // 删除事件列表
	removeEventsFlag bool
}

func NewAppConfigEventBuilder() *AppConfigEventBuilder {
	builder := &AppConfigEventBuilder{}
	return builder
}

// 订阅方式
//
// 示例值：webhook
func (builder *AppConfigEventBuilder) SubscriptionType(subscriptionType string) *AppConfigEventBuilder {
	builder.subscriptionType = subscriptionType
	builder.subscriptionTypeFlag = true
	return builder
}

// 接收事件的服务器地址
//
// 示例值：https://open.feishu.cn/
func (builder *AppConfigEventBuilder) RequestUrl(requestUrl string) *AppConfigEventBuilder {
	builder.requestUrl = requestUrl
	builder.requestUrlFlag = true
	return builder
}

// 添加事件列表
//
// 示例值：
func (builder *AppConfigEventBuilder) AddEvents(addEvents []string) *AppConfigEventBuilder {
	builder.addEvents = addEvents
	builder.addEventsFlag = true
	return builder
}

// 删除事件列表
//
// 示例值：
func (builder *AppConfigEventBuilder) RemoveEvents(removeEvents []string) *AppConfigEventBuilder {
	builder.removeEvents = removeEvents
	builder.removeEventsFlag = true
	return builder
}

func (builder *AppConfigEventBuilder) Build() *AppConfigEvent {
	req := &AppConfigEvent{}
	if builder.subscriptionTypeFlag {
		req.SubscriptionType = &builder.subscriptionType

	}
	if builder.requestUrlFlag {
		req.RequestUrl = &builder.requestUrl

	}
	if builder.addEventsFlag {
		req.AddEvents = builder.addEvents
	}
	if builder.removeEventsFlag {
		req.RemoveEvents = builder.removeEvents
	}
	return req
}

type AppConfigScope struct {
	AddScopes []*AppConfigScopeItem `json:"add_scopes,omitempty"` // 新增权限

	RemoveScopes []*AppConfigScopeItem `json:"remove_scopes,omitempty"` // 删除权限
}

type AppConfigScopeBuilder struct {
	addScopes     []*AppConfigScopeItem // 新增权限
	addScopesFlag bool

	removeScopes     []*AppConfigScopeItem // 删除权限
	removeScopesFlag bool
}

func NewAppConfigScopeBuilder() *AppConfigScopeBuilder {
	builder := &AppConfigScopeBuilder{}
	return builder
}

// 新增权限
//
// 示例值：
func (builder *AppConfigScopeBuilder) AddScopes(addScopes []*AppConfigScopeItem) *AppConfigScopeBuilder {
	builder.addScopes = addScopes
	builder.addScopesFlag = true
	return builder
}

// 删除权限
//
// 示例值：
func (builder *AppConfigScopeBuilder) RemoveScopes(removeScopes []*AppConfigScopeItem) *AppConfigScopeBuilder {
	builder.removeScopes = removeScopes
	builder.removeScopesFlag = true
	return builder
}

func (builder *AppConfigScopeBuilder) Build() *AppConfigScope {
	req := &AppConfigScope{}
	if builder.addScopesFlag {
		req.AddScopes = builder.addScopes
	}
	if builder.removeScopesFlag {
		req.RemoveScopes = builder.removeScopes
	}
	return req
}

type AppConfigScopeItem struct {
	ScopeName *string `json:"scope_name,omitempty"` // 权限名称

	TokenType *string `json:"token_type,omitempty"` // 身份类型
}

type AppConfigScopeItemBuilder struct {
	scopeName     string // 权限名称
	scopeNameFlag bool

	tokenType     string // 身份类型
	tokenTypeFlag bool
}

func NewAppConfigScopeItemBuilder() *AppConfigScopeItemBuilder {
	builder := &AppConfigScopeItemBuilder{}
	return builder
}

// 权限名称
//
// 示例值：im:message
func (builder *AppConfigScopeItemBuilder) ScopeName(scopeName string) *AppConfigScopeItemBuilder {
	builder.scopeName = scopeName
	builder.scopeNameFlag = true
	return builder
}

// 身份类型
//
// 示例值：tenant
func (builder *AppConfigScopeItemBuilder) TokenType(tokenType string) *AppConfigScopeItemBuilder {
	builder.tokenType = tokenType
	builder.tokenTypeFlag = true
	return builder
}

func (builder *AppConfigScopeItemBuilder) Build() *AppConfigScopeItem {
	req := &AppConfigScopeItem{}
	if builder.scopeNameFlag {
		req.ScopeName = &builder.scopeName

	}
	if builder.tokenTypeFlag {
		req.TokenType = &builder.tokenType

	}
	return req
}

type AppConfigSecurity struct {
	Add *AppConfigSecurityItem `json:"add,omitempty"` // 新增项

	Remove *AppConfigSecurityItem `json:"remove,omitempty"` // 删除列表
}

type AppConfigSecurityBuilder struct {
	add     *AppConfigSecurityItem // 新增项
	addFlag bool

	remove     *AppConfigSecurityItem // 删除列表
	removeFlag bool
}

func NewAppConfigSecurityBuilder() *AppConfigSecurityBuilder {
	builder := &AppConfigSecurityBuilder{}
	return builder
}

// 新增项
//
// 示例值：
func (builder *AppConfigSecurityBuilder) Add(add *AppConfigSecurityItem) *AppConfigSecurityBuilder {
	builder.add = add
	builder.addFlag = true
	return builder
}

// 删除列表
//
// 示例值：
func (builder *AppConfigSecurityBuilder) Remove(remove *AppConfigSecurityItem) *AppConfigSecurityBuilder {
	builder.remove = remove
	builder.removeFlag = true
	return builder
}

func (builder *AppConfigSecurityBuilder) Build() *AppConfigSecurity {
	req := &AppConfigSecurity{}
	if builder.addFlag {
		req.Add = builder.add
	}
	if builder.removeFlag {
		req.Remove = builder.remove
	}
	return req
}

type AppConfigSecurityItem struct {
	RedirectUrls []string `json:"redirect_urls,omitempty"` // 重定向URL

	AllowedIps []string `json:"allowed_ips,omitempty"` // IP白名单 IP需要填写调用方出口公网IP地址

	H5TrustedDomains []string `json:"h5_trusted_domains,omitempty"` // H5可信域名仅可信域名内的 H5 可以访问 JSAPI，部分需要鉴权的 JSAPI 必填。

	WebViewTrustedDomains []string `json:"web_view_trusted_domains,omitempty"` // Web-View 可信域名

	AllowedSchemas []string `json:"allowed_schemas,omitempty"` // 小程序协议名白名单

	AllowedServerDomains []string `json:"allowed_server_domains,omitempty"` // 服务器可信域名
}

type AppConfigSecurityItemBuilder struct {
	redirectUrls     []string // 重定向URL
	redirectUrlsFlag bool

	allowedIps     []string // IP白名单 IP需要填写调用方出口公网IP地址
	allowedIpsFlag bool

	h5TrustedDomains     []string // H5可信域名仅可信域名内的 H5 可以访问 JSAPI，部分需要鉴权的 JSAPI 必填。
	h5TrustedDomainsFlag bool

	webViewTrustedDomains     []string // Web-View 可信域名
	webViewTrustedDomainsFlag bool

	allowedSchemas     []string // 小程序协议名白名单
	allowedSchemasFlag bool

	allowedServerDomains     []string // 服务器可信域名
	allowedServerDomainsFlag bool
}

func NewAppConfigSecurityItemBuilder() *AppConfigSecurityItemBuilder {
	builder := &AppConfigSecurityItemBuilder{}
	return builder
}

// 重定向URL
//
// 示例值：
func (builder *AppConfigSecurityItemBuilder) RedirectUrls(redirectUrls []string) *AppConfigSecurityItemBuilder {
	builder.redirectUrls = redirectUrls
	builder.redirectUrlsFlag = true
	return builder
}

// IP白名单 IP需要填写调用方出口公网IP地址
//
// 示例值：
func (builder *AppConfigSecurityItemBuilder) AllowedIps(allowedIps []string) *AppConfigSecurityItemBuilder {
	builder.allowedIps = allowedIps
	builder.allowedIpsFlag = true
	return builder
}

// H5可信域名仅可信域名内的 H5 可以访问 JSAPI，部分需要鉴权的 JSAPI 必填。
//
// 示例值：
func (builder *AppConfigSecurityItemBuilder) H5TrustedDomains(h5TrustedDomains []string) *AppConfigSecurityItemBuilder {
	builder.h5TrustedDomains = h5TrustedDomains
	builder.h5TrustedDomainsFlag = true
	return builder
}

// Web-View 可信域名
//
// 示例值：
func (builder *AppConfigSecurityItemBuilder) WebViewTrustedDomains(webViewTrustedDomains []string) *AppConfigSecurityItemBuilder {
	builder.webViewTrustedDomains = webViewTrustedDomains
	builder.webViewTrustedDomainsFlag = true
	return builder
}

// 小程序协议名白名单
//
// 示例值：
func (builder *AppConfigSecurityItemBuilder) AllowedSchemas(allowedSchemas []string) *AppConfigSecurityItemBuilder {
	builder.allowedSchemas = allowedSchemas
	builder.allowedSchemasFlag = true
	return builder
}

// 服务器可信域名
//
// 示例值：
func (builder *AppConfigSecurityItemBuilder) AllowedServerDomains(allowedServerDomains []string) *AppConfigSecurityItemBuilder {
	builder.allowedServerDomains = allowedServerDomains
	builder.allowedServerDomainsFlag = true
	return builder
}

func (builder *AppConfigSecurityItemBuilder) Build() *AppConfigSecurityItem {
	req := &AppConfigSecurityItem{}
	if builder.redirectUrlsFlag {
		req.RedirectUrls = builder.redirectUrls
	}
	if builder.allowedIpsFlag {
		req.AllowedIps = builder.allowedIps
	}
	if builder.h5TrustedDomainsFlag {
		req.H5TrustedDomains = builder.h5TrustedDomains
	}
	if builder.webViewTrustedDomainsFlag {
		req.WebViewTrustedDomains = builder.webViewTrustedDomains
	}
	if builder.allowedSchemasFlag {
		req.AllowedSchemas = builder.allowedSchemas
	}
	if builder.allowedServerDomainsFlag {
		req.AllowedServerDomains = builder.allowedServerDomains
	}
	return req
}

type AppConfigVisibility struct {
	IsVisibleToAll *bool `json:"is_visible_to_all,omitempty"` // 是否全员可见,false:否;true:是;不填:继续当前状态不改变.如果可见范围为全员后添加的可用人员则无效,禁用人员仍然有效

	VisibleList *AppVisibilityIdList `json:"visible_list,omitempty"` // 可用人员列表
}

type AppConfigVisibilityBuilder struct {
	isVisibleToAll     bool // 是否全员可见,false:否;true:是;不填:继续当前状态不改变.如果可见范围为全员后添加的可用人员则无效,禁用人员仍然有效
	isVisibleToAllFlag bool

	visibleList     *AppVisibilityIdList // 可用人员列表
	visibleListFlag bool
}

func NewAppConfigVisibilityBuilder() *AppConfigVisibilityBuilder {
	builder := &AppConfigVisibilityBuilder{}
	return builder
}

// 是否全员可见,false:否;true:是;不填:继续当前状态不改变.如果可见范围为全员后添加的可用人员则无效,禁用人员仍然有效
//
// 示例值：false
func (builder *AppConfigVisibilityBuilder) IsVisibleToAll(isVisibleToAll bool) *AppConfigVisibilityBuilder {
	builder.isVisibleToAll = isVisibleToAll
	builder.isVisibleToAllFlag = true
	return builder
}

// 可用人员列表
//
// 示例值：
func (builder *AppConfigVisibilityBuilder) VisibleList(visibleList *AppVisibilityIdList) *AppConfigVisibilityBuilder {
	builder.visibleList = visibleList
	builder.visibleListFlag = true
	return builder
}

func (builder *AppConfigVisibilityBuilder) Build() *AppConfigVisibility {
	req := &AppConfigVisibility{}
	if builder.isVisibleToAllFlag {
		req.IsVisibleToAll = &builder.isVisibleToAll

	}
	if builder.visibleListFlag {
		req.VisibleList = builder.visibleList
	}
	return req
}

type AppContactsRangeIdList struct {
	UserIds []string `json:"user_ids,omitempty"` // 成员id列表

	DepartmentIds []string `json:"department_ids,omitempty"` // 部门id列表

	GroupIds []string `json:"group_ids,omitempty"` // 用户组列表
}

type AppContactsRangeIdListBuilder struct {
	userIds     []string // 成员id列表
	userIdsFlag bool

	departmentIds     []string // 部门id列表
	departmentIdsFlag bool

	groupIds     []string // 用户组列表
	groupIdsFlag bool
}

func NewAppContactsRangeIdListBuilder() *AppContactsRangeIdListBuilder {
	builder := &AppContactsRangeIdListBuilder{}
	return builder
}

// 成员id列表
//
// 示例值：
func (builder *AppContactsRangeIdListBuilder) UserIds(userIds []string) *AppContactsRangeIdListBuilder {
	builder.userIds = userIds
	builder.userIdsFlag = true
	return builder
}

// 部门id列表
//
// 示例值：
func (builder *AppContactsRangeIdListBuilder) DepartmentIds(departmentIds []string) *AppContactsRangeIdListBuilder {
	builder.departmentIds = departmentIds
	builder.departmentIdsFlag = true
	return builder
}

// 用户组列表
//
// 示例值：
func (builder *AppContactsRangeIdListBuilder) GroupIds(groupIds []string) *AppContactsRangeIdListBuilder {
	builder.groupIds = groupIds
	builder.groupIdsFlag = true
	return builder
}

func (builder *AppContactsRangeIdListBuilder) Build() *AppContactsRangeIdList {
	req := &AppContactsRangeIdList{}
	if builder.userIdsFlag {
		req.UserIds = builder.userIds
	}
	if builder.departmentIdsFlag {
		req.DepartmentIds = builder.departmentIds
	}
	if builder.groupIdsFlag {
		req.GroupIds = builder.groupIds
	}
	return req
}

type AppCustomCategory struct {
	I18nKey *string `json:"i18n_key,omitempty"` // 国际化语言的 key

	Description *string `json:"description,omitempty"` // 应用权限的国际化描述

	AppIds []string `json:"app_ids,omitempty"` // 在该分组下的应用 id 列表
}

type AppCustomCategoryBuilder struct {
	i18nKey     string // 国际化语言的 key
	i18nKeyFlag bool

	description     string // 应用权限的国际化描述
	descriptionFlag bool

	appIds     []string // 在该分组下的应用 id 列表
	appIdsFlag bool
}

func NewAppCustomCategoryBuilder() *AppCustomCategoryBuilder {
	builder := &AppCustomCategoryBuilder{}
	return builder
}

// 国际化语言的 key
//
// 示例值：zh_cn
func (builder *AppCustomCategoryBuilder) I18nKey(i18nKey string) *AppCustomCategoryBuilder {
	builder.i18nKey = i18nKey
	builder.i18nKeyFlag = true
	return builder
}

// 应用权限的国际化描述
//
// 示例值：获取应用信息
func (builder *AppCustomCategoryBuilder) Description(description string) *AppCustomCategoryBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 在该分组下的应用 id 列表
//
// 示例值：
func (builder *AppCustomCategoryBuilder) AppIds(appIds []string) *AppCustomCategoryBuilder {
	builder.appIds = appIds
	builder.appIdsFlag = true
	return builder
}

func (builder *AppCustomCategoryBuilder) Build() *AppCustomCategory {
	req := &AppCustomCategory{}
	if builder.i18nKeyFlag {
		req.I18nKey = &builder.i18nKey

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

	}
	if builder.appIdsFlag {
		req.AppIds = builder.appIds
	}
	return req
}

type AppCustomCategoryI18nInfo struct {
	I18nKey *string `json:"i18n_key,omitempty"` // 国际化语言的 key

	Name *string `json:"name,omitempty"` // 自定义分组的国际化名称
}

type AppCustomCategoryI18nInfoBuilder struct {
	i18nKey     string // 国际化语言的 key
	i18nKeyFlag bool

	name     string // 自定义分组的国际化名称
	nameFlag bool
}

func NewAppCustomCategoryI18nInfoBuilder() *AppCustomCategoryI18nInfoBuilder {
	builder := &AppCustomCategoryI18nInfoBuilder{}
	return builder
}

// 国际化语言的 key
//
// 示例值：zh_cn
func (builder *AppCustomCategoryI18nInfoBuilder) I18nKey(i18nKey string) *AppCustomCategoryI18nInfoBuilder {
	builder.i18nKey = i18nKey
	builder.i18nKeyFlag = true
	return builder
}

// 自定义分组的国际化名称
//
// 示例值：名称
func (builder *AppCustomCategoryI18nInfoBuilder) Name(name string) *AppCustomCategoryI18nInfoBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

func (builder *AppCustomCategoryI18nInfoBuilder) Build() *AppCustomCategoryI18nInfo {
	req := &AppCustomCategoryI18nInfo{}
	if builder.i18nKeyFlag {
		req.I18nKey = &builder.i18nKey

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

	}
	return req
}

type AppI18nInfo struct {
	I18nKey *string `json:"i18n_key,omitempty"` // 国际化语言的 key

	Name *string `json:"name,omitempty"` // 应用国际化名称

	Description *string `json:"description,omitempty"` // 应用国际化描述（副标题）

	HelpUse *string `json:"help_use,omitempty"` // 国际化帮助文档链接
}

type AppI18nInfoBuilder struct {
	i18nKey     string // 国际化语言的 key
	i18nKeyFlag bool

	name     string // 应用国际化名称
	nameFlag bool

	description     string // 应用国际化描述（副标题）
	descriptionFlag bool

	helpUse     string // 国际化帮助文档链接
	helpUseFlag bool
}

func NewAppI18nInfoBuilder() *AppI18nInfoBuilder {
	builder := &AppI18nInfoBuilder{}
	return builder
}

// 国际化语言的 key
//
// 示例值：zh_cn
func (builder *AppI18nInfoBuilder) I18nKey(i18nKey string) *AppI18nInfoBuilder {
	builder.i18nKey = i18nKey
	builder.i18nKeyFlag = true
	return builder
}

// 应用国际化名称
//
// 示例值：应用名称
func (builder *AppI18nInfoBuilder) Name(name string) *AppI18nInfoBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 应用国际化描述（副标题）
//
// 示例值：应用描述
func (builder *AppI18nInfoBuilder) Description(description string) *AppI18nInfoBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 国际化帮助文档链接
//
// 示例值：https://www.example.com
func (builder *AppI18nInfoBuilder) HelpUse(helpUse string) *AppI18nInfoBuilder {
	builder.helpUse = helpUse
	builder.helpUseFlag = true
	return builder
}

func (builder *AppI18nInfoBuilder) Build() *AppI18nInfo {
	req := &AppI18nInfo{}
	if builder.i18nKeyFlag {
		req.I18nKey = &builder.i18nKey

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

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

	}
	if builder.helpUseFlag {
		req.HelpUse = &builder.helpUse

	}
	return req
}

type AppMessageTrendItem struct {
	ChatType *string `json:"chat_type,omitempty"` // 聊天类型，private：私聊；group：群聊

	EventType *string `json:"event_type,omitempty"` // 消息事件类型,message_send:已发送消息;bot_notify_get_message:bot 通知收到消息;message_read:消息已读

	MessageType *string `json:"message_type,omitempty"` // 消息类型，大小写不敏感，text：文本消息；image：图片消息；interactive：卡片消息；post：富文本消息；share_chat：群名片

	Trend []*UsageTrendItem `json:"trend,omitempty"` //
}

type AppMessageTrendItemBuilder struct {
	chatType     string // 聊天类型，private：私聊；group：群聊
	chatTypeFlag bool

	eventType     string // 消息事件类型,message_send:已发送消息;bot_notify_get_message:bot 通知收到消息;message_read:消息已读
	eventTypeFlag bool

	messageType     string // 消息类型，大小写不敏感，text：文本消息；image：图片消息；interactive：卡片消息；post：富文本消息；share_chat：群名片
	messageTypeFlag bool

	trend     []*UsageTrendItem //
	trendFlag bool
}

func NewAppMessageTrendItemBuilder() *AppMessageTrendItemBuilder {
	builder := &AppMessageTrendItemBuilder{}
	return builder
}

// 聊天类型，private：私聊；group：群聊
//
// 示例值：
func (builder *AppMessageTrendItemBuilder) ChatType(chatType string) *AppMessageTrendItemBuilder {
	builder.chatType = chatType
	builder.chatTypeFlag = true
	return builder
}

// 消息事件类型,message_send:已发送消息;bot_notify_get_message:bot 通知收到消息;message_read:消息已读
//
// 示例值：
func (builder *AppMessageTrendItemBuilder) EventType(eventType string) *AppMessageTrendItemBuilder {
	builder.eventType = eventType
	builder.eventTypeFlag = true
	return builder
}

// 消息类型，大小写不敏感，text：文本消息；image：图片消息；interactive：卡片消息；post：富文本消息；share_chat：群名片
//
// 示例值：
func (builder *AppMessageTrendItemBuilder) MessageType(messageType string) *AppMessageTrendItemBuilder {
	builder.messageType = messageType
	builder.messageTypeFlag = true
	return builder
}

//
//
// 示例值：
func (builder *AppMessageTrendItemBuilder) Trend(trend []*UsageTrendItem) *AppMessageTrendItemBuilder {
	builder.trend = trend
	builder.trendFlag = true
	return builder
}

func (builder *AppMessageTrendItemBuilder) Build() *AppMessageTrendItem {
	req := &AppMessageTrendItem{}
	if builder.chatTypeFlag {
		req.ChatType = &builder.chatType

	}
	if builder.eventTypeFlag {
		req.EventType = &builder.eventType

	}
	if builder.messageTypeFlag {
		req.MessageType = &builder.messageType

	}
	if builder.trendFlag {
		req.Trend = builder.trend
	}
	return req
}

type AppRecommendRule struct {
	Id *string `json:"id,omitempty"` // 推荐规则 ID

	Name *string `json:"name,omitempty"` // 推荐规则名称

	Status *string `json:"status,omitempty"` // 推荐规则启用状态

	VisibilityInfo *AppRecommendRuleVisibilityInfo `json:"visibility_info,omitempty"` // 推荐规则可见性信息

	RecommendItemInfos []*AppRecommendRuleItemInfo `json:"recommend_item_infos,omitempty"` // 不可移除推荐应用项列表

	DistributedRecommendItemInfos []*AppRecommendRuleItemInfo `json:"distributed_recommend_item_infos,omitempty"` // 可移除推荐应用项列表
}

type AppRecommendRuleBuilder struct {
	id     string // 推荐规则 ID
	idFlag bool

	name     string // 推荐规则名称
	nameFlag bool

	status     string // 推荐规则启用状态
	statusFlag bool

	visibilityInfo     *AppRecommendRuleVisibilityInfo // 推荐规则可见性信息
	visibilityInfoFlag bool

	recommendItemInfos     []*AppRecommendRuleItemInfo // 不可移除推荐应用项列表
	recommendItemInfosFlag bool

	distributedRecommendItemInfos     []*AppRecommendRuleItemInfo // 可移除推荐应用项列表
	distributedRecommendItemInfosFlag bool
}

func NewAppRecommendRuleBuilder() *AppRecommendRuleBuilder {
	builder := &AppRecommendRuleBuilder{}
	return builder
}

// 推荐规则 ID
//
// 示例值：7137896480337641492
func (builder *AppRecommendRuleBuilder) Id(id string) *AppRecommendRuleBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 推荐规则名称
//
// 示例值：管理员小白的推荐规则
func (builder *AppRecommendRuleBuilder) Name(name string) *AppRecommendRuleBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 推荐规则启用状态
//
// 示例值：open
func (builder *AppRecommendRuleBuilder) Status(status string) *AppRecommendRuleBuilder {
	builder.status = status
	builder.statusFlag = true
	return builder
}

// 推荐规则可见性信息
//
// 示例值：
func (builder *AppRecommendRuleBuilder) VisibilityInfo(visibilityInfo *AppRecommendRuleVisibilityInfo) *AppRecommendRuleBuilder {
	builder.visibilityInfo = visibilityInfo
	builder.visibilityInfoFlag = true
	return builder
}

// 不可移除推荐应用项列表
//
// 示例值：
func (builder *AppRecommendRuleBuilder) RecommendItemInfos(recommendItemInfos []*AppRecommendRuleItemInfo) *AppRecommendRuleBuilder {
	builder.recommendItemInfos = recommendItemInfos
	builder.recommendItemInfosFlag = true
	return builder
}

// 可移除推荐应用项列表
//
// 示例值：
func (builder *AppRecommendRuleBuilder) DistributedRecommendItemInfos(distributedRecommendItemInfos []*AppRecommendRuleItemInfo) *AppRecommendRuleBuilder {
	builder.distributedRecommendItemInfos = distributedRecommendItemInfos
	builder.distributedRecommendItemInfosFlag = true
	return builder
}

func (builder *AppRecommendRuleBuilder) Build() *AppRecommendRule {
	req := &AppRecommendRule{}
	if builder.idFlag {
		req.Id = &builder.id

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

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

	}
	if builder.visibilityInfoFlag {
		req.VisibilityInfo = builder.visibilityInfo
	}
	if builder.recommendItemInfosFlag {
		req.RecommendItemInfos = builder.recommendItemInfos
	}
	if builder.distributedRecommendItemInfosFlag {
		req.DistributedRecommendItemInfos = builder.distributedRecommendItemInfos
	}
	return req
}

type AppRecommendRuleItemInfo struct {
	ItemId *string `json:"item_id,omitempty"` // 推荐应用项 ID

	ItemType *string `json:"item_type,omitempty"` // 推荐应用项类型

	Name *string `json:"name,omitempty"` // 推荐应用项名称

	Description *string `json:"description,omitempty"` // 推荐应用项描述

	LinkUrl *string `json:"link_url,omitempty"` // 链接类型应用项的跳转链接（应用类型该字段为空）

	ClientId *string `json:"client_id,omitempty"` // 应用类型应用项的 app id（链接类型该字段为空）

	IconUrl *string `json:"icon_url,omitempty"` // 应用项图标链接

	DefaultLocale *string `json:"default_locale,omitempty"` // 链接类型应用项的默认展示语种（应用类型该字段为空）

	I18nName *AppRecommendRuleItemInfoI18nName `json:"i18n_name,omitempty"` // 应用项的多语种名称
}

type AppRecommendRuleItemInfoBuilder struct {
	itemId     string // 推荐应用项 ID
	itemIdFlag bool

	itemType     string // 推荐应用项类型
	itemTypeFlag bool

	name     string // 推荐应用项名称
	nameFlag bool

	description     string // 推荐应用项描述
	descriptionFlag bool

	linkUrl     string // 链接类型应用项的跳转链接（应用类型该字段为空）
	linkUrlFlag bool

	clientId     string // 应用类型应用项的 app id（链接类型该字段为空）
	clientIdFlag bool

	iconUrl     string // 应用项图标链接
	iconUrlFlag bool

	defaultLocale     string // 链接类型应用项的默认展示语种（应用类型该字段为空）
	defaultLocaleFlag bool

	i18nName     *AppRecommendRuleItemInfoI18nName // 应用项的多语种名称
	i18nNameFlag bool
}

func NewAppRecommendRuleItemInfoBuilder() *AppRecommendRuleItemInfoBuilder {
	builder := &AppRecommendRuleItemInfoBuilder{}
	return builder
}

// 推荐应用项 ID
//
// 示例值：7137896480337625108
func (builder *AppRecommendRuleItemInfoBuilder) ItemId(itemId string) *AppRecommendRuleItemInfoBuilder {
	builder.itemId = itemId
	builder.itemIdFlag = true
	return builder
}

// 推荐应用项类型
//
// 示例值：application
func (builder *AppRecommendRuleItemInfoBuilder) ItemType(itemType string) *AppRecommendRuleItemInfoBuilder {
	builder.itemType = itemType
	builder.itemTypeFlag = true
	return builder
}

// 推荐应用项名称
//
// 示例值：审批
func (builder *AppRecommendRuleItemInfoBuilder) Name(name string) *AppRecommendRuleItemInfoBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 推荐应用项描述
//
// 示例值：审批应用的描述
func (builder *AppRecommendRuleItemInfoBuilder) Description(description string) *AppRecommendRuleItemInfoBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 链接类型应用项的跳转链接（应用类型该字段为空）
//
// 示例值：http://www.example.com
func (builder *AppRecommendRuleItemInfoBuilder) LinkUrl(linkUrl string) *AppRecommendRuleItemInfoBuilder {
	builder.linkUrl = linkUrl
	builder.linkUrlFlag = true
	return builder
}

// 应用类型应用项的 app id（链接类型该字段为空）
//
// 示例值：cli_a274440757b8901c
func (builder *AppRecommendRuleItemInfoBuilder) ClientId(clientId string) *AppRecommendRuleItemInfoBuilder {
	builder.clientId = clientId
	builder.clientIdFlag = true
	return builder
}

// 应用项图标链接
//
// 示例值：https://internal-api-lark-file.feishu-boe.cn/static-resource/v1/v2_6150f3c3-ceee-453e-a1ae-7c11d7f13edj~?image_size=&cut_type=&quality=&format=&sticker_format=.webp
func (builder *AppRecommendRuleItemInfoBuilder) IconUrl(iconUrl string) *AppRecommendRuleItemInfoBuilder {
	builder.iconUrl = iconUrl
	builder.iconUrlFlag = true
	return builder
}

// 链接类型应用项的默认展示语种（应用类型该字段为空）
//
// 示例值：zh_cn
func (builder *AppRecommendRuleItemInfoBuilder) DefaultLocale(defaultLocale string) *AppRecommendRuleItemInfoBuilder {
	builder.defaultLocale = defaultLocale
	builder.defaultLocaleFlag = true
	return builder
}

// 应用项的多语种名称
//
// 示例值：
func (builder *AppRecommendRuleItemInfoBuilder) I18nName(i18nName *AppRecommendRuleItemInfoI18nName) *AppRecommendRuleItemInfoBuilder {
	builder.i18nName = i18nName
	builder.i18nNameFlag = true
	return builder
}

func (builder *AppRecommendRuleItemInfoBuilder) Build() *AppRecommendRuleItemInfo {
	req := &AppRecommendRuleItemInfo{}
	if builder.itemIdFlag {
		req.ItemId = &builder.itemId

	}
	if builder.itemTypeFlag {
		req.ItemType = &builder.itemType

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

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

	}
	if builder.linkUrlFlag {
		req.LinkUrl = &builder.linkUrl

	}
	if builder.clientIdFlag {
		req.ClientId = &builder.clientId

	}
	if builder.iconUrlFlag {
		req.IconUrl = &builder.iconUrl

	}
	if builder.defaultLocaleFlag {
		req.DefaultLocale = &builder.defaultLocale

	}
	if builder.i18nNameFlag {
		req.I18nName = builder.i18nName
	}
	return req
}

type AppRecommendRuleItemInfoI18nName struct {
	ZhCn *string `json:"zh_cn,omitempty"` // 应用项的简体中文名称

	ZhHk *string `json:"zh_hk,omitempty"` // 应用项的繁体中文（中国香港）名称

	ZhTw *string `json:"zh_tw,omitempty"` // 应用项的繁体中文（中国台湾）名称

	EnUs *string `json:"en_us,omitempty"` // 应用项的英文名称

	JaJp *string `json:"ja_jp,omitempty"` // 应用项的日文名称
}

type AppRecommendRuleItemInfoI18nNameBuilder struct {
	zhCn     string // 应用项的简体中文名称
	zhCnFlag bool

	zhHk     string // 应用项的繁体中文（中国香港）名称
	zhHkFlag bool

	zhTw     string // 应用项的繁体中文（中国台湾）名称
	zhTwFlag bool

	enUs     string // 应用项的英文名称
	enUsFlag bool

	jaJp     string // 应用项的日文名称
	jaJpFlag bool
}

func NewAppRecommendRuleItemInfoI18nNameBuilder() *AppRecommendRuleItemInfoI18nNameBuilder {
	builder := &AppRecommendRuleItemInfoI18nNameBuilder{}
	return builder
}

// 应用项的简体中文名称
//
// 示例值：审批
func (builder *AppRecommendRuleItemInfoI18nNameBuilder) ZhCn(zhCn string) *AppRecommendRuleItemInfoI18nNameBuilder {
	builder.zhCn = zhCn
	builder.zhCnFlag = true
	return builder
}

// 应用项的繁体中文（中国香港）名称
//
// 示例值：審批
func (builder *AppRecommendRuleItemInfoI18nNameBuilder) ZhHk(zhHk string) *AppRecommendRuleItemInfoI18nNameBuilder {
	builder.zhHk = zhHk
	builder.zhHkFlag = true
	return builder
}

// 应用项的繁体中文（中国台湾）名称
//
// 示例值：審批
func (builder *AppRecommendRuleItemInfoI18nNameBuilder) ZhTw(zhTw string) *AppRecommendRuleItemInfoI18nNameBuilder {
	builder.zhTw = zhTw
	builder.zhTwFlag = true
	return builder
}

// 应用项的英文名称
//
// 示例值：Approval
func (builder *AppRecommendRuleItemInfoI18nNameBuilder) EnUs(enUs string) *AppRecommendRuleItemInfoI18nNameBuilder {
	builder.enUs = enUs
	builder.enUsFlag = true
	return builder
}

// 应用项的日文名称
//
// 示例值：承認
func (builder *AppRecommendRuleItemInfoI18nNameBuilder) JaJp(jaJp string) *AppRecommendRuleItemInfoI18nNameBuilder {
	builder.jaJp = jaJp
	builder.jaJpFlag = true
	return builder
}

func (builder *AppRecommendRuleItemInfoI18nNameBuilder) Build() *AppRecommendRuleItemInfoI18nName {
	req := &AppRecommendRuleItemInfoI18nName{}
	if builder.zhCnFlag {
		req.ZhCn = &builder.zhCn

	}
	if builder.zhHkFlag {
		req.ZhHk = &builder.zhHk

	}
	if builder.zhTwFlag {
		req.ZhTw = &builder.zhTw

	}
	if builder.enUsFlag {
		req.EnUs = &builder.enUs

	}
	if builder.jaJpFlag {
		req.JaJp = &builder.jaJp

	}
	return req
}

type AppRecommendRuleVisibilityInfo struct {
	IsAll *bool `json:"is_all,omitempty"` // 是否全员可见

	DepartmentIds []string `json:"department_ids,omitempty"` // 可见部门 ID 列表

	UserIds []string `json:"user_ids,omitempty"` // 可见用户 ID 列表

	GroupIds []string `json:"group_ids,omitempty"` // 可见用户组 ID 列表
}

type AppRecommendRuleVisibilityInfoBuilder struct {
	isAll     bool // 是否全员可见
	isAllFlag bool

	departmentIds     []string // 可见部门 ID 列表
	departmentIdsFlag bool

	userIds     []string // 可见用户 ID 列表
	userIdsFlag bool

	groupIds     []string // 可见用户组 ID 列表
	groupIdsFlag bool
}

func NewAppRecommendRuleVisibilityInfoBuilder() *AppRecommendRuleVisibilityInfoBuilder {
	builder := &AppRecommendRuleVisibilityInfoBuilder{}
	return builder
}

// 是否全员可见
//
// 示例值：true
func (builder *AppRecommendRuleVisibilityInfoBuilder) IsAll(isAll bool) *AppRecommendRuleVisibilityInfoBuilder {
	builder.isAll = isAll
	builder.isAllFlag = true
	return builder
}

// 可见部门 ID 列表
//
// 示例值：od-fef5204d44fa03fad66278cb8e8036e4
func (builder *AppRecommendRuleVisibilityInfoBuilder) DepartmentIds(departmentIds []string) *AppRecommendRuleVisibilityInfoBuilder {
	builder.departmentIds = departmentIds
	builder.departmentIdsFlag = true
	return builder
}

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

// 可见用户组 ID 列表
//
// 示例值：7137608198773686291
func (builder *AppRecommendRuleVisibilityInfoBuilder) GroupIds(groupIds []string) *AppRecommendRuleVisibilityInfoBuilder {
	builder.groupIds = groupIds
	builder.groupIdsFlag = true
	return builder
}

func (builder *AppRecommendRuleVisibilityInfoBuilder) Build() *AppRecommendRuleVisibilityInfo {
	req := &AppRecommendRuleVisibilityInfo{}
	if builder.isAllFlag {
		req.IsAll = &builder.isAll

	}
	if builder.departmentIdsFlag {
		req.DepartmentIds = builder.departmentIds
	}
	if builder.userIdsFlag {
		req.UserIds = builder.userIds
	}
	if builder.groupIdsFlag {
		req.GroupIds = builder.groupIds
	}
	return req
}

type AppScope struct {
	Scope *string `json:"scope,omitempty"` // 应用权限

	Description *string `json:"description,omitempty"` // 应用权限的国际化描述

	Level *int `json:"level,omitempty"` // 权限等级描述

	TokenTypes []string `json:"token_types,omitempty"` // 返回用户身份类型user、应用身份类型tenant。如果两种类型都支持，则同时返回两个。
}

type AppScopeBuilder struct {
	scope     string // 应用权限
	scopeFlag bool

	description     string // 应用权限的国际化描述
	descriptionFlag bool

	level     int // 权限等级描述
	levelFlag bool

	tokenTypes     []string // 返回用户身份类型user、应用身份类型tenant。如果两种类型都支持，则同时返回两个。
	tokenTypesFlag bool
}

func NewAppScopeBuilder() *AppScopeBuilder {
	builder := &AppScopeBuilder{}
	return builder
}

// 应用权限
//
// 示例值：contact:user.base
func (builder *AppScopeBuilder) Scope(scope string) *AppScopeBuilder {
	builder.scope = scope
	builder.scopeFlag = true
	return builder
}

// 应用权限的国际化描述
//
// 示例值：获取应用信息
func (builder *AppScopeBuilder) Description(description string) *AppScopeBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 权限等级描述
//
// 示例值：1
func (builder *AppScopeBuilder) Level(level int) *AppScopeBuilder {
	builder.level = level
	builder.levelFlag = true
	return builder
}

// 返回用户身份类型user、应用身份类型tenant。如果两种类型都支持，则同时返回两个。
//
// 示例值：
func (builder *AppScopeBuilder) TokenTypes(tokenTypes []string) *AppScopeBuilder {
	builder.tokenTypes = tokenTypes
	builder.tokenTypesFlag = true
	return builder
}

func (builder *AppScopeBuilder) Build() *AppScope {
	req := &AppScope{}
	if builder.scopeFlag {
		req.Scope = &builder.scope

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

	}
	if builder.levelFlag {
		req.Level = &builder.level

	}
	if builder.tokenTypesFlag {
		req.TokenTypes = builder.tokenTypes
	}
	return req
}

type AppScopeI18nInfo struct {
	I18nKey *string `json:"i18n_key,omitempty"` // 国际化语言的 key

	Description *string `json:"description,omitempty"` // 应用权限的国际化描述
}

type AppScopeI18nInfoBuilder struct {
	i18nKey     string // 国际化语言的 key
	i18nKeyFlag bool

	description     string // 应用权限的国际化描述
	descriptionFlag bool
}

func NewAppScopeI18nInfoBuilder() *AppScopeI18nInfoBuilder {
	builder := &AppScopeI18nInfoBuilder{}
	return builder
}

// 国际化语言的 key
//
// 示例值：zh_cn
func (builder *AppScopeI18nInfoBuilder) I18nKey(i18nKey string) *AppScopeI18nInfoBuilder {
	builder.i18nKey = i18nKey
	builder.i18nKeyFlag = true
	return builder
}

// 应用权限的国际化描述
//
// 示例值：获取应用信息
func (builder *AppScopeI18nInfoBuilder) Description(description string) *AppScopeI18nInfoBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

func (builder *AppScopeI18nInfoBuilder) Build() *AppScopeI18nInfo {
	req := &AppScopeI18nInfo{}
	if builder.i18nKeyFlag {
		req.I18nKey = &builder.i18nKey

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

	}
	return req
}

type AppScopes struct {
	HighLevelScopes []string `json:"high_level_scopes,omitempty"` // 应用高级权限列表

	LowLevelScopes []string `json:"low_level_scopes,omitempty"` // 应用低级权限列表
}

type AppScopesBuilder struct {
	highLevelScopes     []string // 应用高级权限列表
	highLevelScopesFlag bool

	lowLevelScopes     []string // 应用低级权限列表
	lowLevelScopesFlag bool
}

func NewAppScopesBuilder() *AppScopesBuilder {
	builder := &AppScopesBuilder{}
	return builder
}

// 应用高级权限列表
//
// 示例值：
func (builder *AppScopesBuilder) HighLevelScopes(highLevelScopes []string) *AppScopesBuilder {
	builder.highLevelScopes = highLevelScopes
	builder.highLevelScopesFlag = true
	return builder
}

// 应用低级权限列表
//
// 示例值：
func (builder *AppScopesBuilder) LowLevelScopes(lowLevelScopes []string) *AppScopesBuilder {
	builder.lowLevelScopes = lowLevelScopes
	builder.lowLevelScopesFlag = true
	return builder
}

func (builder *AppScopesBuilder) Build() *AppScopes {
	req := &AppScopes{}
	if builder.highLevelScopesFlag {
		req.HighLevelScopes = builder.highLevelScopes
	}
	if builder.lowLevelScopesFlag {
		req.LowLevelScopes = builder.lowLevelScopes
	}
	return req
}

type AppUsageTrendItems struct {
	Id *string `json:"id,omitempty"` // 部门号

	Trend []*UsageTrendItem `json:"trend,omitempty"` // 趋势统计
}

type AppUsageTrendItemsBuilder struct {
	id     string // 部门号
	idFlag bool

	trend     []*UsageTrendItem // 趋势统计
	trendFlag bool
}

func NewAppUsageTrendItemsBuilder() *AppUsageTrendItemsBuilder {
	builder := &AppUsageTrendItemsBuilder{}
	return builder
}

// 部门号
//
// 示例值：
func (builder *AppUsageTrendItemsBuilder) Id(id string) *AppUsageTrendItemsBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 趋势统计
//
// 示例值：
func (builder *AppUsageTrendItemsBuilder) Trend(trend []*UsageTrendItem) *AppUsageTrendItemsBuilder {
	builder.trend = trend
	builder.trendFlag = true
	return builder
}

func (builder *AppUsageTrendItemsBuilder) Build() *AppUsageTrendItems {
	req := &AppUsageTrendItems{}
	if builder.idFlag {
		req.Id = &builder.id

	}
	if builder.trendFlag {
		req.Trend = builder.trend
	}
	return req
}

type AppVersionId struct {
	Version *string `json:"version,omitempty"` // 开发者填入的应用版本 ID

	VersionId *string `json:"version_id,omitempty"` // 唯一标识应用版本的 ID
}

type AppVersionIdBuilder struct {
	version     string // 开发者填入的应用版本 ID
	versionFlag bool

	versionId     string // 唯一标识应用版本的 ID
	versionIdFlag bool
}

func NewAppVersionIdBuilder() *AppVersionIdBuilder {
	builder := &AppVersionIdBuilder{}
	return builder
}

// 开发者填入的应用版本 ID
//
// 示例值：1.0.0
func (builder *AppVersionIdBuilder) Version(version string) *AppVersionIdBuilder {
	builder.version = version
	builder.versionFlag = true
	return builder
}

// 唯一标识应用版本的 ID
//
// 示例值：oav_d317f090b7258ad0372aa53963cda70d
func (builder *AppVersionIdBuilder) VersionId(versionId string) *AppVersionIdBuilder {
	builder.versionId = versionId
	builder.versionIdFlag = true
	return builder
}

func (builder *AppVersionIdBuilder) Build() *AppVersionId {
	req := &AppVersionId{}
	if builder.versionFlag {
		req.Version = &builder.version

	}
	if builder.versionIdFlag {
		req.VersionId = &builder.versionId

	}
	return req
}

type AppVersionRemark struct {
	Remark *string `json:"remark,omitempty"` // 备注说明

	UpdateRemark *string `json:"update_remark,omitempty"` // 更新说明

	Visibility *AppVisibility `json:"visibility,omitempty"` // 应用当前版本开发者编辑的可见性建议，若开发者未编辑可见性建议，则该字段无内容
}

type AppVersionRemarkBuilder struct {
	remark     string // 备注说明
	remarkFlag bool

	updateRemark     string // 更新说明
	updateRemarkFlag bool

	visibility     *AppVisibility // 应用当前版本开发者编辑的可见性建议，若开发者未编辑可见性建议，则该字段无内容
	visibilityFlag bool
}

func NewAppVersionRemarkBuilder() *AppVersionRemarkBuilder {
	builder := &AppVersionRemarkBuilder{}
	return builder
}

// 备注说明
//
// 示例值：备注说明
func (builder *AppVersionRemarkBuilder) Remark(remark string) *AppVersionRemarkBuilder {
	builder.remark = remark
	builder.remarkFlag = true
	return builder
}

// 更新说明
//
// 示例值：更新说明
func (builder *AppVersionRemarkBuilder) UpdateRemark(updateRemark string) *AppVersionRemarkBuilder {
	builder.updateRemark = updateRemark
	builder.updateRemarkFlag = true
	return builder
}

// 应用当前版本开发者编辑的可见性建议，若开发者未编辑可见性建议，则该字段无内容
//
// 示例值：
func (builder *AppVersionRemarkBuilder) Visibility(visibility *AppVisibility) *AppVersionRemarkBuilder {
	builder.visibility = visibility
	builder.visibilityFlag = true
	return builder
}

func (builder *AppVersionRemarkBuilder) Build() *AppVersionRemark {
	req := &AppVersionRemark{}
	if builder.remarkFlag {
		req.Remark = &builder.remark

	}
	if builder.updateRemarkFlag {
		req.UpdateRemark = &builder.updateRemark

	}
	if builder.visibilityFlag {
		req.Visibility = builder.visibility
	}
	return req
}

type AppVersionRemarkEvent struct {
	Remark *string `json:"remark,omitempty"` // 备注说明

	UpdateRemark *string `json:"update_remark,omitempty"` // 更新说明

	Visibility *AppVisibilityEvent `json:"visibility,omitempty"` // 可见性名单
}

type AppVersionRemarkEventBuilder struct {
	remark     string // 备注说明
	remarkFlag bool

	updateRemark     string // 更新说明
	updateRemarkFlag bool

	visibility     *AppVisibilityEvent // 可见性名单
	visibilityFlag bool
}

func NewAppVersionRemarkEventBuilder() *AppVersionRemarkEventBuilder {
	builder := &AppVersionRemarkEventBuilder{}
	return builder
}

// 备注说明
//
// 示例值：备注说明
func (builder *AppVersionRemarkEventBuilder) Remark(remark string) *AppVersionRemarkEventBuilder {
	builder.remark = remark
	builder.remarkFlag = true
	return builder
}

// 更新说明
//
// 示例值：更新说明
func (builder *AppVersionRemarkEventBuilder) UpdateRemark(updateRemark string) *AppVersionRemarkEventBuilder {
	builder.updateRemark = updateRemark
	builder.updateRemarkFlag = true
	return builder
}

// 可见性名单
//
// 示例值：
func (builder *AppVersionRemarkEventBuilder) Visibility(visibility *AppVisibilityEvent) *AppVersionRemarkEventBuilder {
	builder.visibility = visibility
	builder.visibilityFlag = true
	return builder
}

func (builder *AppVersionRemarkEventBuilder) Build() *AppVersionRemarkEvent {
	req := &AppVersionRemarkEvent{}
	if builder.remarkFlag {
		req.Remark = &builder.remark

	}
	if builder.updateRemarkFlag {
		req.UpdateRemark = &builder.updateRemark

	}
	if builder.visibilityFlag {
		req.Visibility = builder.visibility
	}
	return req
}

type AppVisibility struct {
	IsAll *bool `json:"is_all,omitempty"` // 是否全员可见

	VisibleList *AppVisibleList `json:"visible_list,omitempty"` // 可见名单

	InvisibleList *AppVisibleList `json:"invisible_list,omitempty"` // 不可见名单
}

type AppVisibilityBuilder struct {
	isAll     bool // 是否全员可见
	isAllFlag bool

	visibleList     *AppVisibleList // 可见名单
	visibleListFlag bool

	invisibleList     *AppVisibleList // 不可见名单
	invisibleListFlag bool
}

func NewAppVisibilityBuilder() *AppVisibilityBuilder {
	builder := &AppVisibilityBuilder{}
	return builder
}

// 是否全员可见
//
// 示例值：false
func (builder *AppVisibilityBuilder) IsAll(isAll bool) *AppVisibilityBuilder {
	builder.isAll = isAll
	builder.isAllFlag = true
	return builder
}

// 可见名单
//
// 示例值：
func (builder *AppVisibilityBuilder) VisibleList(visibleList *AppVisibleList) *AppVisibilityBuilder {
	builder.visibleList = visibleList
	builder.visibleListFlag = true
	return builder
}

// 不可见名单
//
// 示例值：
func (builder *AppVisibilityBuilder) InvisibleList(invisibleList *AppVisibleList) *AppVisibilityBuilder {
	builder.invisibleList = invisibleList
	builder.invisibleListFlag = true
	return builder
}

func (builder *AppVisibilityBuilder) Build() *AppVisibility {
	req := &AppVisibility{}
	if builder.isAllFlag {
		req.IsAll = &builder.isAll

	}
	if builder.visibleListFlag {
		req.VisibleList = builder.visibleList
	}
	if builder.invisibleListFlag {
		req.InvisibleList = builder.invisibleList
	}
	return req
}

type AppVisibilityEvent struct {
	IsAll *bool `json:"is_all,omitempty"` // 是否全员可见

	VisibleList *AppVisibleListEvent `json:"visible_list,omitempty"` // 可见名单

	InvisibleList *AppVisibleListEvent `json:"invisible_list,omitempty"` // 不可见名单
}

type AppVisibilityEventBuilder struct {
	isAll     bool // 是否全员可见
	isAllFlag bool

	visibleList     *AppVisibleListEvent // 可见名单
	visibleListFlag bool

	invisibleList     *AppVisibleListEvent // 不可见名单
	invisibleListFlag bool
}

func NewAppVisibilityEventBuilder() *AppVisibilityEventBuilder {
	builder := &AppVisibilityEventBuilder{}
	return builder
}

// 是否全员可见
//
// 示例值：false
func (builder *AppVisibilityEventBuilder) IsAll(isAll bool) *AppVisibilityEventBuilder {
	builder.isAll = isAll
	builder.isAllFlag = true
	return builder
}

// 可见名单
//
// 示例值：
func (builder *AppVisibilityEventBuilder) VisibleList(visibleList *AppVisibleListEvent) *AppVisibilityEventBuilder {
	builder.visibleList = visibleList
	builder.visibleListFlag = true
	return builder
}

// 不可见名单
//
// 示例值：
func (builder *AppVisibilityEventBuilder) InvisibleList(invisibleList *AppVisibleListEvent) *AppVisibilityEventBuilder {
	builder.invisibleList = invisibleList
	builder.invisibleListFlag = true
	return builder
}

func (builder *AppVisibilityEventBuilder) Build() *AppVisibilityEvent {
	req := &AppVisibilityEvent{}
	if builder.isAllFlag {
		req.IsAll = &builder.isAll

	}
	if builder.visibleListFlag {
		req.VisibleList = builder.visibleList
	}
	if builder.invisibleListFlag {
		req.InvisibleList = builder.invisibleList
	}
	return req
}

type AppVisibilityIdList struct {
	UserIds []string `json:"user_ids,omitempty"` // 成员id列表(open_id/union_id/user_id)

	DepartmentIds []string `json:"department_ids,omitempty"` // 部门id列表(自定义部门id/open_department_id)

	GroupIds []string `json:"group_ids,omitempty"` // 用户组id
}

type AppVisibilityIdListBuilder struct {
	userIds     []string // 成员id列表(open_id/union_id/user_id)
	userIdsFlag bool

	departmentIds     []string // 部门id列表(自定义部门id/open_department_id)
	departmentIdsFlag bool

	groupIds     []string // 用户组id
	groupIdsFlag bool
}

func NewAppVisibilityIdListBuilder() *AppVisibilityIdListBuilder {
	builder := &AppVisibilityIdListBuilder{}
	return builder
}

// 成员id列表(open_id/union_id/user_id)
//
// 示例值：
func (builder *AppVisibilityIdListBuilder) UserIds(userIds []string) *AppVisibilityIdListBuilder {
	builder.userIds = userIds
	builder.userIdsFlag = true
	return builder
}

// 部门id列表(自定义部门id/open_department_id)
//
// 示例值：
func (builder *AppVisibilityIdListBuilder) DepartmentIds(departmentIds []string) *AppVisibilityIdListBuilder {
	builder.departmentIds = departmentIds
	builder.departmentIdsFlag = true
	return builder
}

// 用户组id
//
// 示例值：
func (builder *AppVisibilityIdListBuilder) GroupIds(groupIds []string) *AppVisibilityIdListBuilder {
	builder.groupIds = groupIds
	builder.groupIdsFlag = true
	return builder
}

func (builder *AppVisibilityIdListBuilder) Build() *AppVisibilityIdList {
	req := &AppVisibilityIdList{}
	if builder.userIdsFlag {
		req.UserIds = builder.userIds
	}
	if builder.departmentIdsFlag {
		req.DepartmentIds = builder.departmentIds
	}
	if builder.groupIdsFlag {
		req.GroupIds = builder.groupIds
	}
	return req
}

type AppVisibilityItem struct {
	UserId *string `json:"user_id,omitempty"` // 租户内用户的唯一标识，ID值与查询参数中的user_id_type 对应

	DepartmentId *string `json:"department_id,omitempty"` // 用户所属部门的ID，ID值与查询参数中的department_id_type 对应

	GroupId *string `json:"group_id,omitempty"` // 用户组 ID group_id 用来标识租户内一个唯一的用户组
}

type AppVisibilityItemBuilder struct {
	userId     string // 租户内用户的唯一标识，ID值与查询参数中的user_id_type 对应
	userIdFlag bool

	departmentId     string // 用户所属部门的ID，ID值与查询参数中的department_id_type 对应
	departmentIdFlag bool

	groupId     string // 用户组 ID group_id 用来标识租户内一个唯一的用户组
	groupIdFlag bool
}

func NewAppVisibilityItemBuilder() *AppVisibilityItemBuilder {
	builder := &AppVisibilityItemBuilder{}
	return builder
}

// 租户内用户的唯一标识，ID值与查询参数中的user_id_type 对应
//
// 示例值：ou_d317f090b7258ad0372aa53963cda70d
func (builder *AppVisibilityItemBuilder) UserId(userId string) *AppVisibilityItemBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

// 用户所属部门的ID，ID值与查询参数中的department_id_type 对应
//
// 示例值：od-aa2c50a04769feefededb7a05b7525a8
func (builder *AppVisibilityItemBuilder) DepartmentId(departmentId string) *AppVisibilityItemBuilder {
	builder.departmentId = departmentId
	builder.departmentIdFlag = true
	return builder
}

// 用户组 ID group_id 用来标识租户内一个唯一的用户组
//
// 示例值：
func (builder *AppVisibilityItemBuilder) GroupId(groupId string) *AppVisibilityItemBuilder {
	builder.groupId = groupId
	builder.groupIdFlag = true
	return builder
}

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

	}
	if builder.departmentIdFlag {
		req.DepartmentId = &builder.departmentId

	}
	if builder.groupIdFlag {
		req.GroupId = &builder.groupId

	}
	return req
}

type AppVisibleList struct {
	OpenIds []string `json:"open_ids,omitempty"` // 可见性成员 open_id 列表

	DepartmentIds []string `json:"department_ids,omitempty"` // 可见性部门的 id 列表

	GroupIds []string `json:"group_ids,omitempty"` // 可见性成员 group_id 列表
}

type AppVisibleListBuilder struct {
	openIds     []string // 可见性成员 open_id 列表
	openIdsFlag bool

	departmentIds     []string // 可见性部门的 id 列表
	departmentIdsFlag bool

	groupIds     []string // 可见性成员 group_id 列表
	groupIdsFlag bool
}

func NewAppVisibleListBuilder() *AppVisibleListBuilder {
	builder := &AppVisibleListBuilder{}
	return builder
}

// 可见性成员 open_id 列表
//
// 示例值：
func (builder *AppVisibleListBuilder) OpenIds(openIds []string) *AppVisibleListBuilder {
	builder.openIds = openIds
	builder.openIdsFlag = true
	return builder
}

// 可见性部门的 id 列表
//
// 示例值：
func (builder *AppVisibleListBuilder) DepartmentIds(departmentIds []string) *AppVisibleListBuilder {
	builder.departmentIds = departmentIds
	builder.departmentIdsFlag = true
	return builder
}

// 可见性成员 group_id 列表
//
// 示例值：
func (builder *AppVisibleListBuilder) GroupIds(groupIds []string) *AppVisibleListBuilder {
	builder.groupIds = groupIds
	builder.groupIdsFlag = true
	return builder
}

func (builder *AppVisibleListBuilder) Build() *AppVisibleList {
	req := &AppVisibleList{}
	if builder.openIdsFlag {
		req.OpenIds = builder.openIds
	}
	if builder.departmentIdsFlag {
		req.DepartmentIds = builder.departmentIds
	}
	if builder.groupIdsFlag {
		req.GroupIds = builder.groupIds
	}
	return req
}

type AppVisibleListEvent struct {
	OpenIds []*UserId `json:"open_ids,omitempty"` // 可见性成员 id 列表

	DepartmentIds []string `json:"department_ids,omitempty"` // 可见性部门的 id 列表
}

type AppVisibleListEventBuilder struct {
	openIds     []*UserId // 可见性成员 id 列表
	openIdsFlag bool

	departmentIds     []string // 可见性部门的 id 列表
	departmentIdsFlag bool
}

func NewAppVisibleListEventBuilder() *AppVisibleListEventBuilder {
	builder := &AppVisibleListEventBuilder{}
	return builder
}

// 可见性成员 id 列表
//
// 示例值：
func (builder *AppVisibleListEventBuilder) OpenIds(openIds []*UserId) *AppVisibleListEventBuilder {
	builder.openIds = openIds
	builder.openIdsFlag = true
	return builder
}

// 可见性部门的 id 列表
//
// 示例值：
func (builder *AppVisibleListEventBuilder) DepartmentIds(departmentIds []string) *AppVisibleListEventBuilder {
	builder.departmentIds = departmentIds
	builder.departmentIdsFlag = true
	return builder
}

func (builder *AppVisibleListEventBuilder) Build() *AppVisibleListEvent {
	req := &AppVisibleListEvent{}
	if builder.openIdsFlag {
		req.OpenIds = builder.openIds
	}
	if builder.departmentIdsFlag {
		req.DepartmentIds = builder.departmentIds
	}
	return req
}

type Application struct {
	AppId *string `json:"app_id,omitempty"` // 应用的 app_id

	CreatorId *string `json:"creator_id,omitempty"` // 应用创建者（所有者）

	Status *int `json:"status,omitempty"` // 应用状态

	SceneType *int `json:"scene_type,omitempty"` // 应用类型

	PaymentType *int `json:"payment_type,omitempty"` // 付费类型

	CreateSource *string `json:"create_source,omitempty"` // 应用创建来源(目前仅Base应用返回)

	RedirectUrls []string `json:"redirect_urls,omitempty"` // 安全设置中的重定向 URL

	OnlineVersionId *string `json:"online_version_id,omitempty"` // 发布在线上的应用版本 ID，若没有则为空

	UnauditVersionId *string `json:"unaudit_version_id,omitempty"` // 在审核中的版本 ID，若没有则为空

	AppName *string `json:"app_name,omitempty"` // 应用名称

	AvatarUrl *string `json:"avatar_url,omitempty"` // 应用图标 url

	Description *string `json:"description,omitempty"` // 应用默认描述

	Scopes []*AppScope `json:"scopes,omitempty"` // 应用权限列表

	BackHomeUrl *string `json:"back_home_url,omitempty"` // 后台主页地址

	I18n []*AppI18nInfo `json:"i18n,omitempty"` // 应用的国际化信息列表

	PrimaryLanguage *string `json:"primary_language,omitempty"` // 应用主语言

	CommonCategories []string `json:"common_categories,omitempty"` // 应用分类的国际化描述

	Owner *ApplicationOwner `json:"owner,omitempty"` // 应用的所有者信息

	MobileDefaultAbility *string `json:"mobile_default_ability,omitempty"` // 移动端默认能力

	PcDefaultAbility *string `json:"pc_default_ability,omitempty"` // PC端默认能力

	Secret *string `json:"secret,omitempty"` // 应用密钥

	Event *SubscribedEvent `json:"event,omitempty"` // 应用事件订阅信息

	Callback *Callback `json:"callback,omitempty"` // 应用回调配置

	Encryption *EventAndCallbackEncryptStrategy `json:"encryption,omitempty"` // 应用加密策略

	Security *AppConfigSecurityItem `json:"security,omitempty"` // 应用安全配置
}

type ApplicationBuilder struct {
	appId     string // 应用的 app_id
	appIdFlag bool

	creatorId     string // 应用创建者（所有者）
	creatorIdFlag bool

	status     int // 应用状态
	statusFlag bool

	sceneType     int // 应用类型
	sceneTypeFlag bool

	paymentType     int // 付费类型
	paymentTypeFlag bool

	createSource     string // 应用创建来源(目前仅Base应用返回)
	createSourceFlag bool

	redirectUrls     []string // 安全设置中的重定向 URL
	redirectUrlsFlag bool

	onlineVersionId     string // 发布在线上的应用版本 ID，若没有则为空
	onlineVersionIdFlag bool

	unauditVersionId     string // 在审核中的版本 ID，若没有则为空
	unauditVersionIdFlag bool

	appName     string // 应用名称
	appNameFlag bool

	avatarUrl     string // 应用图标 url
	avatarUrlFlag bool

	description     string // 应用默认描述
	descriptionFlag bool

	scopes     []*AppScope // 应用权限列表
	scopesFlag bool

	backHomeUrl     string // 后台主页地址
	backHomeUrlFlag bool

	i18n     []*AppI18nInfo // 应用的国际化信息列表
	i18nFlag bool

	primaryLanguage     string // 应用主语言
	primaryLanguageFlag bool

	commonCategories     []string // 应用分类的国际化描述
	commonCategoriesFlag bool

	owner     *ApplicationOwner // 应用的所有者信息
	ownerFlag bool

	mobileDefaultAbility     string // 移动端默认能力
	mobileDefaultAbilityFlag bool

	pcDefaultAbility     string // PC端默认能力
	pcDefaultAbilityFlag bool

	secret     string // 应用密钥
	secretFlag bool

	event     *SubscribedEvent // 应用事件订阅信息
	eventFlag bool

	callback     *Callback // 应用回调配置
	callbackFlag bool

	encryption     *EventAndCallbackEncryptStrategy // 应用加密策略
	encryptionFlag bool

	security     *AppConfigSecurityItem // 应用安全配置
	securityFlag bool
}

func NewApplicationBuilder() *ApplicationBuilder {
	builder := &ApplicationBuilder{}
	return builder
}

// 应用的 app_id
//
// 示例值：cli_9b445f5258795107
func (builder *ApplicationBuilder) AppId(appId string) *ApplicationBuilder {
	builder.appId = appId
	builder.appIdFlag = true
	return builder
}

// 应用创建者（所有者）
//
// 示例值：ou_d317f090b7258ad0372aa53963cda70d
func (builder *ApplicationBuilder) CreatorId(creatorId string) *ApplicationBuilder {
	builder.creatorId = creatorId
	builder.creatorIdFlag = true
	return builder
}

// 应用状态
//
// 示例值：1
func (builder *ApplicationBuilder) Status(status int) *ApplicationBuilder {
	builder.status = status
	builder.statusFlag = true
	return builder
}

// 应用类型
//
// 示例值：0
func (builder *ApplicationBuilder) SceneType(sceneType int) *ApplicationBuilder {
	builder.sceneType = sceneType
	builder.sceneTypeFlag = true
	return builder
}

// 付费类型
//
// 示例值：0
func (builder *ApplicationBuilder) PaymentType(paymentType int) *ApplicationBuilder {
	builder.paymentType = paymentType
	builder.paymentTypeFlag = true
	return builder
}

// 应用创建来源(目前仅Base应用返回)
//
// 示例值：base
func (builder *ApplicationBuilder) CreateSource(createSource string) *ApplicationBuilder {
	builder.createSource = createSource
	builder.createSourceFlag = true
	return builder
}

// 安全设置中的重定向 URL
//
// 示例值：
func (builder *ApplicationBuilder) RedirectUrls(redirectUrls []string) *ApplicationBuilder {
	builder.redirectUrls = redirectUrls
	builder.redirectUrlsFlag = true
	return builder
}

// 发布在线上的应用版本 ID，若没有则为空
//
// 示例值：oav_d317f090b7258ad0372aa53963cda70d
func (builder *ApplicationBuilder) OnlineVersionId(onlineVersionId string) *ApplicationBuilder {
	builder.onlineVersionId = onlineVersionId
	builder.onlineVersionIdFlag = true
	return builder
}

// 在审核中的版本 ID，若没有则为空
//
// 示例值：oav_d317f090b7258ad0372aa53963cda70d
func (builder *ApplicationBuilder) UnauditVersionId(unauditVersionId string) *ApplicationBuilder {
	builder.unauditVersionId = unauditVersionId
	builder.unauditVersionIdFlag = true
	return builder
}

// 应用名称
//
// 示例值：应用名称
func (builder *ApplicationBuilder) AppName(appName string) *ApplicationBuilder {
	builder.appName = appName
	builder.appNameFlag = true
	return builder
}

// 应用图标 url
//
// 示例值：https://sf1-ttcdn-tos.pstatp.com/img/avatar/d279000ca4d3f7f6aaff~72x72.jpg
func (builder *ApplicationBuilder) AvatarUrl(avatarUrl string) *ApplicationBuilder {
	builder.avatarUrl = avatarUrl
	builder.avatarUrlFlag = true
	return builder
}

// 应用默认描述
//
// 示例值：应用描述
func (builder *ApplicationBuilder) Description(description string) *ApplicationBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 应用权限列表
//
// 示例值：
func (builder *ApplicationBuilder) Scopes(scopes []*AppScope) *ApplicationBuilder {
	builder.scopes = scopes
	builder.scopesFlag = true
	return builder
}

// 后台主页地址
//
// 示例值：https://www.example.com
func (builder *ApplicationBuilder) BackHomeUrl(backHomeUrl string) *ApplicationBuilder {
	builder.backHomeUrl = backHomeUrl
	builder.backHomeUrlFlag = true
	return builder
}

// 应用的国际化信息列表
//
// 示例值：
func (builder *ApplicationBuilder) I18n(i18n []*AppI18nInfo) *ApplicationBuilder {
	builder.i18n = i18n
	builder.i18nFlag = true
	return builder
}

// 应用主语言
//
// 示例值：zh_cn
func (builder *ApplicationBuilder) PrimaryLanguage(primaryLanguage string) *ApplicationBuilder {
	builder.primaryLanguage = primaryLanguage
	builder.primaryLanguageFlag = true
	return builder
}

// 应用分类的国际化描述
//
// 示例值：["办公效率"]
func (builder *ApplicationBuilder) CommonCategories(commonCategories []string) *ApplicationBuilder {
	builder.commonCategories = commonCategories
	builder.commonCategoriesFlag = true
	return builder
}

// 应用的所有者信息
//
// 示例值：
func (builder *ApplicationBuilder) Owner(owner *ApplicationOwner) *ApplicationBuilder {
	builder.owner = owner
	builder.ownerFlag = true
	return builder
}

// 移动端默认能力
//
// 示例值：gadget
func (builder *ApplicationBuilder) MobileDefaultAbility(mobileDefaultAbility string) *ApplicationBuilder {
	builder.mobileDefaultAbility = mobileDefaultAbility
	builder.mobileDefaultAbilityFlag = true
	return builder
}

// PC端默认能力
//
// 示例值：gadget
func (builder *ApplicationBuilder) PcDefaultAbility(pcDefaultAbility string) *ApplicationBuilder {
	builder.pcDefaultAbility = pcDefaultAbility
	builder.pcDefaultAbilityFlag = true
	return builder
}

// 应用密钥
//
// 示例值：XJG4pdMq5CtWIL5xPrYqGtbMIANvLqFV
func (builder *ApplicationBuilder) Secret(secret string) *ApplicationBuilder {
	builder.secret = secret
	builder.secretFlag = true
	return builder
}

// 应用事件订阅信息
//
// 示例值：
func (builder *ApplicationBuilder) Event(event *SubscribedEvent) *ApplicationBuilder {
	builder.event = event
	builder.eventFlag = true
	return builder
}

// 应用回调配置
//
// 示例值：
func (builder *ApplicationBuilder) Callback(callback *Callback) *ApplicationBuilder {
	builder.callback = callback
	builder.callbackFlag = true
	return builder
}

// 应用加密策略
//
// 示例值：
func (builder *ApplicationBuilder) Encryption(encryption *EventAndCallbackEncryptStrategy) *ApplicationBuilder {
	builder.encryption = encryption
	builder.encryptionFlag = true
	return builder
}

// 应用安全配置
//
// 示例值：
func (builder *ApplicationBuilder) Security(security *AppConfigSecurityItem) *ApplicationBuilder {
	builder.security = security
	builder.securityFlag = true
	return builder
}

func (builder *ApplicationBuilder) Build() *Application {
	req := &Application{}
	if builder.appIdFlag {
		req.AppId = &builder.appId

	}
	if builder.creatorIdFlag {
		req.CreatorId = &builder.creatorId

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

	}
	if builder.sceneTypeFlag {
		req.SceneType = &builder.sceneType

	}
	if builder.paymentTypeFlag {
		req.PaymentType = &builder.paymentType

	}
	if builder.createSourceFlag {
		req.CreateSource = &builder.createSource

	}
	if builder.redirectUrlsFlag {
		req.RedirectUrls = builder.redirectUrls
	}
	if builder.onlineVersionIdFlag {
		req.OnlineVersionId = &builder.onlineVersionId

	}
	if builder.unauditVersionIdFlag {
		req.UnauditVersionId = &builder.unauditVersionId

	}
	if builder.appNameFlag {
		req.AppName = &builder.appName

	}
	if builder.avatarUrlFlag {
		req.AvatarUrl = &builder.avatarUrl

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

	}
	if builder.scopesFlag {
		req.Scopes = builder.scopes
	}
	if builder.backHomeUrlFlag {
		req.BackHomeUrl = &builder.backHomeUrl

	}
	if builder.i18nFlag {
		req.I18n = builder.i18n
	}
	if builder.primaryLanguageFlag {
		req.PrimaryLanguage = &builder.primaryLanguage

	}
	if builder.commonCategoriesFlag {
		req.CommonCategories = builder.commonCategories
	}
	if builder.ownerFlag {
		req.Owner = builder.owner
	}
	if builder.mobileDefaultAbilityFlag {
		req.MobileDefaultAbility = &builder.mobileDefaultAbility

	}
	if builder.pcDefaultAbilityFlag {
		req.PcDefaultAbility = &builder.pcDefaultAbility

	}
	if builder.secretFlag {
		req.Secret = &builder.secret

	}
	if builder.eventFlag {
		req.Event = builder.event
	}
	if builder.callbackFlag {
		req.Callback = builder.callback
	}
	if builder.encryptionFlag {
		req.Encryption = builder.encryption
	}
	if builder.securityFlag {
		req.Security = builder.security
	}
	return req
}

type ApplicationAppContactsRange struct {
	ContactsScopeType *string `json:"contacts_scope_type,omitempty"` // 通讯录可见性类型

	VisibleList *AppVisibleList `json:"visible_list,omitempty"` // 可用名单
}

type ApplicationAppContactsRangeBuilder struct {
	contactsScopeType     string // 通讯录可见性类型
	contactsScopeTypeFlag bool

	visibleList     *AppVisibleList // 可用名单
	visibleListFlag bool
}

func NewApplicationAppContactsRangeBuilder() *ApplicationAppContactsRangeBuilder {
	builder := &ApplicationAppContactsRangeBuilder{}
	return builder
}

// 通讯录可见性类型
//
// 示例值：some
func (builder *ApplicationAppContactsRangeBuilder) ContactsScopeType(contactsScopeType string) *ApplicationAppContactsRangeBuilder {
	builder.contactsScopeType = contactsScopeType
	builder.contactsScopeTypeFlag = true
	return builder
}

// 可用名单
//
// 示例值：
func (builder *ApplicationAppContactsRangeBuilder) VisibleList(visibleList *AppVisibleList) *ApplicationAppContactsRangeBuilder {
	builder.visibleList = visibleList
	builder.visibleListFlag = true
	return builder
}

func (builder *ApplicationAppContactsRangeBuilder) Build() *ApplicationAppContactsRange {
	req := &ApplicationAppContactsRange{}
	if builder.contactsScopeTypeFlag {
		req.ContactsScopeType = &builder.contactsScopeType

	}
	if builder.visibleListFlag {
		req.VisibleList = builder.visibleList
	}
	return req
}

type ApplicationAppUsage struct {
	MetricName *string `json:"metric_name,omitempty"` // 指标名称

	MetricValue *int `json:"metric_value,omitempty"` // 指标值
}

type ApplicationAppUsageBuilder struct {
	metricName     string // 指标名称
	metricNameFlag bool

	metricValue     int // 指标值
	metricValueFlag bool
}

func NewApplicationAppUsageBuilder() *ApplicationAppUsageBuilder {
	builder := &ApplicationAppUsageBuilder{}
	return builder
}

// 指标名称
//
// 示例值：pv
func (builder *ApplicationAppUsageBuilder) MetricName(metricName string) *ApplicationAppUsageBuilder {
	builder.metricName = metricName
	builder.metricNameFlag = true
	return builder
}

// 指标值
//
// 示例值：100
func (builder *ApplicationAppUsageBuilder) MetricValue(metricValue int) *ApplicationAppUsageBuilder {
	builder.metricValue = metricValue
	builder.metricValueFlag = true
	return builder
}

func (builder *ApplicationAppUsageBuilder) Build() *ApplicationAppUsage {
	req := &ApplicationAppUsage{}
	if builder.metricNameFlag {
		req.MetricName = &builder.metricName

	}
	if builder.metricValueFlag {
		req.MetricValue = &builder.metricValue

	}
	return req
}

type ApplicationAppVersion struct {
	AppId *string `json:"app_id,omitempty"` // 应用 id

	Version *string `json:"version,omitempty"` // 在开发者后台填入的应用版本号

	VersionId *string `json:"version_id,omitempty"` // 唯一标识应用版本的 ID

	AppName *string `json:"app_name,omitempty"` // 应用默认名称

	AvatarUrl *string `json:"avatar_url,omitempty"` // 应用头像 url

	Description *string `json:"description,omitempty"` // 应用默认描述

	Scopes []*AppScope `json:"scopes,omitempty"` // 应用权限列表

	BackHomeUrl *string `json:"back_home_url,omitempty"` // 后台主页地址

	I18n []*AppI18nInfo `json:"i18n,omitempty"` // 应用的国际化信息列表

	CommonCategories []string `json:"common_categories,omitempty"` // 应用分类的国际化描述

	Events []string `json:"events,omitempty"` // 应用已订阅开放平台事件列表

	Status *int `json:"status,omitempty"` // 版本状态

	CreateTime *string `json:"create_time,omitempty"` // 版本创建时间（单位：s）

	PublishTime *string `json:"publish_time,omitempty"` // 版本发布时间（单位：s）

	Ability *AppAbility `json:"ability,omitempty"` // 当前版本下应用开启的能力

	Remark *AppVersionRemark `json:"remark,omitempty"` // 跟随应用版本的信息

	EventInfos []*Event `json:"event_infos,omitempty"` // 应用已订阅事件详情列表
}

type ApplicationAppVersionBuilder struct {
	appId     string // 应用 id
	appIdFlag bool

	version     string // 在开发者后台填入的应用版本号
	versionFlag bool

	versionId     string // 唯一标识应用版本的 ID
	versionIdFlag bool

	appName     string // 应用默认名称
	appNameFlag bool

	avatarUrl     string // 应用头像 url
	avatarUrlFlag bool

	description     string // 应用默认描述
	descriptionFlag bool

	scopes     []*AppScope // 应用权限列表
	scopesFlag bool

	backHomeUrl     string // 后台主页地址
	backHomeUrlFlag bool

	i18n     []*AppI18nInfo // 应用的国际化信息列表
	i18nFlag bool

	commonCategories     []string // 应用分类的国际化描述
	commonCategoriesFlag bool

	events     []string // 应用已订阅开放平台事件列表
	eventsFlag bool

	status     int // 版本状态
	statusFlag bool

	createTime     string // 版本创建时间（单位：s）
	createTimeFlag bool

	publishTime     string // 版本发布时间（单位：s）
	publishTimeFlag bool

	ability     *AppAbility // 当前版本下应用开启的能力
	abilityFlag bool

	remark     *AppVersionRemark // 跟随应用版本的信息
	remarkFlag bool

	eventInfos     []*Event // 应用已订阅事件详情列表
	eventInfosFlag bool
}

func NewApplicationAppVersionBuilder() *ApplicationAppVersionBuilder {
	builder := &ApplicationAppVersionBuilder{}
	return builder
}

// 应用 id
//
// 示例值：cli_9f3ca975326b501b
func (builder *ApplicationAppVersionBuilder) AppId(appId string) *ApplicationAppVersionBuilder {
	builder.appId = appId
	builder.appIdFlag = true
	return builder
}

// 在开发者后台填入的应用版本号
//
// 示例值：1.0.0
func (builder *ApplicationAppVersionBuilder) Version(version string) *ApplicationAppVersionBuilder {
	builder.version = version
	builder.versionFlag = true
	return builder
}

// 唯一标识应用版本的 ID
//
// 示例值：oav_d317f090b7258ad0372aa53963cda70d
func (builder *ApplicationAppVersionBuilder) VersionId(versionId string) *ApplicationAppVersionBuilder {
	builder.versionId = versionId
	builder.versionIdFlag = true
	return builder
}

// 应用默认名称
//
// 示例值：应用名称
func (builder *ApplicationAppVersionBuilder) AppName(appName string) *ApplicationAppVersionBuilder {
	builder.appName = appName
	builder.appNameFlag = true
	return builder
}

// 应用头像 url
//
// 示例值：https://www.example.com
func (builder *ApplicationAppVersionBuilder) AvatarUrl(avatarUrl string) *ApplicationAppVersionBuilder {
	builder.avatarUrl = avatarUrl
	builder.avatarUrlFlag = true
	return builder
}

// 应用默认描述
//
// 示例值：应用描述
func (builder *ApplicationAppVersionBuilder) Description(description string) *ApplicationAppVersionBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 应用权限列表
//
// 示例值：
func (builder *ApplicationAppVersionBuilder) Scopes(scopes []*AppScope) *ApplicationAppVersionBuilder {
	builder.scopes = scopes
	builder.scopesFlag = true
	return builder
}

// 后台主页地址
//
// 示例值：https://www.example.com
func (builder *ApplicationAppVersionBuilder) BackHomeUrl(backHomeUrl string) *ApplicationAppVersionBuilder {
	builder.backHomeUrl = backHomeUrl
	builder.backHomeUrlFlag = true
	return builder
}

// 应用的国际化信息列表
//
// 示例值：
func (builder *ApplicationAppVersionBuilder) I18n(i18n []*AppI18nInfo) *ApplicationAppVersionBuilder {
	builder.i18n = i18n
	builder.i18nFlag = true
	return builder
}

// 应用分类的国际化描述
//
// 示例值：
func (builder *ApplicationAppVersionBuilder) CommonCategories(commonCategories []string) *ApplicationAppVersionBuilder {
	builder.commonCategories = commonCategories
	builder.commonCategoriesFlag = true
	return builder
}

// 应用已订阅开放平台事件列表
//
// 示例值：
func (builder *ApplicationAppVersionBuilder) Events(events []string) *ApplicationAppVersionBuilder {
	builder.events = events
	builder.eventsFlag = true
	return builder
}

// 版本状态
//
// 示例值：1
func (builder *ApplicationAppVersionBuilder) Status(status int) *ApplicationAppVersionBuilder {
	builder.status = status
	builder.statusFlag = true
	return builder
}

// 版本创建时间（单位：s）
//
// 示例值：1610462759
func (builder *ApplicationAppVersionBuilder) CreateTime(createTime string) *ApplicationAppVersionBuilder {
	builder.createTime = createTime
	builder.createTimeFlag = true
	return builder
}

// 版本发布时间（单位：s）
//
// 示例值：1610462759
func (builder *ApplicationAppVersionBuilder) PublishTime(publishTime string) *ApplicationAppVersionBuilder {
	builder.publishTime = publishTime
	builder.publishTimeFlag = true
	return builder
}

// 当前版本下应用开启的能力
//
// 示例值：
func (builder *ApplicationAppVersionBuilder) Ability(ability *AppAbility) *ApplicationAppVersionBuilder {
	builder.ability = ability
	builder.abilityFlag = true
	return builder
}

// 跟随应用版本的信息
//
// 示例值：
func (builder *ApplicationAppVersionBuilder) Remark(remark *AppVersionRemark) *ApplicationAppVersionBuilder {
	builder.remark = remark
	builder.remarkFlag = true
	return builder
}

// 应用已订阅事件详情列表
//
// 示例值：
func (builder *ApplicationAppVersionBuilder) EventInfos(eventInfos []*Event) *ApplicationAppVersionBuilder {
	builder.eventInfos = eventInfos
	builder.eventInfosFlag = true
	return builder
}

func (builder *ApplicationAppVersionBuilder) Build() *ApplicationAppVersion {
	req := &ApplicationAppVersion{}
	if builder.appIdFlag {
		req.AppId = &builder.appId

	}
	if builder.versionFlag {
		req.Version = &builder.version

	}
	if builder.versionIdFlag {
		req.VersionId = &builder.versionId

	}
	if builder.appNameFlag {
		req.AppName = &builder.appName

	}
	if builder.avatarUrlFlag {
		req.AvatarUrl = &builder.avatarUrl

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

	}
	if builder.scopesFlag {
		req.Scopes = builder.scopes
	}
	if builder.backHomeUrlFlag {
		req.BackHomeUrl = &builder.backHomeUrl

	}
	if builder.i18nFlag {
		req.I18n = builder.i18n
	}
	if builder.commonCategoriesFlag {
		req.CommonCategories = builder.commonCategories
	}
	if builder.eventsFlag {
		req.Events = builder.events
	}
	if builder.statusFlag {
		req.Status = &builder.status

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

	}
	if builder.publishTimeFlag {
		req.PublishTime = &builder.publishTime

	}
	if builder.abilityFlag {
		req.Ability = builder.ability
	}
	if builder.remarkFlag {
		req.Remark = builder.remark
	}
	if builder.eventInfosFlag {
		req.EventInfos = builder.eventInfos
	}
	return req
}

type ApplicationAppVersionEvent struct {
	AppId *string `json:"app_id,omitempty"` // 应用 id

	Version *string `json:"version,omitempty"` // 开发者填入的应用版本 ID

	VersionId *string `json:"version_id,omitempty"` // 唯一标识应用版本的 ID

	AppName *string `json:"app_name,omitempty"` // 应用默认名称

	AvatarUrl *string `json:"avatar_url,omitempty"` // 应用头像 url

	Description *string `json:"description,omitempty"` // 应用默认描述

	Scopes []*AppScope `json:"scopes,omitempty"` // 应用权限列表

	BackHomeUrl *string `json:"back_home_url,omitempty"` // 后台主页地址

	I18n []*AppI18nInfo `json:"i18n,omitempty"` // 应用的国际化信息列表

	CommonCategories []string `json:"common_categories,omitempty"` // 应用分类的国际化描述

	Events []string `json:"events,omitempty"` // 应用已订阅开放平台事件列表

	Status *int `json:"status,omitempty"` // 版本状态

	CreateTime *string `json:"create_time,omitempty"` // 版本创建时间（单位：s）

	PublishTime *string `json:"publish_time,omitempty"` // 版本发布时间（单位：s）

	Ability *AppAbility `json:"ability,omitempty"` // 当前版本下应用开启的能力

	Remark *AppVersionRemarkEvent `json:"remark,omitempty"` // 跟随应用版本的信息
}

type ApplicationAppVersionEventBuilder struct {
	appId     string // 应用 id
	appIdFlag bool

	version     string // 开发者填入的应用版本 ID
	versionFlag bool

	versionId     string // 唯一标识应用版本的 ID
	versionIdFlag bool

	appName     string // 应用默认名称
	appNameFlag bool

	avatarUrl     string // 应用头像 url
	avatarUrlFlag bool

	description     string // 应用默认描述
	descriptionFlag bool

	scopes     []*AppScope // 应用权限列表
	scopesFlag bool

	backHomeUrl     string // 后台主页地址
	backHomeUrlFlag bool

	i18n     []*AppI18nInfo // 应用的国际化信息列表
	i18nFlag bool

	commonCategories     []string // 应用分类的国际化描述
	commonCategoriesFlag bool

	events     []string // 应用已订阅开放平台事件列表
	eventsFlag bool

	status     int // 版本状态
	statusFlag bool

	createTime     string // 版本创建时间（单位：s）
	createTimeFlag bool

	publishTime     string // 版本发布时间（单位：s）
	publishTimeFlag bool

	ability     *AppAbility // 当前版本下应用开启的能力
	abilityFlag bool

	remark     *AppVersionRemarkEvent // 跟随应用版本的信息
	remarkFlag bool
}

func NewApplicationAppVersionEventBuilder() *ApplicationAppVersionEventBuilder {
	builder := &ApplicationAppVersionEventBuilder{}
	return builder
}

// 应用 id
//
// 示例值：cli_9f3ca975326b501b
func (builder *ApplicationAppVersionEventBuilder) AppId(appId string) *ApplicationAppVersionEventBuilder {
	builder.appId = appId
	builder.appIdFlag = true
	return builder
}

// 开发者填入的应用版本 ID
//
// 示例值：1.0.0
func (builder *ApplicationAppVersionEventBuilder) Version(version string) *ApplicationAppVersionEventBuilder {
	builder.version = version
	builder.versionFlag = true
	return builder
}

// 唯一标识应用版本的 ID
//
// 示例值：oav_d317f090b7258ad0372aa53963cda70d
func (builder *ApplicationAppVersionEventBuilder) VersionId(versionId string) *ApplicationAppVersionEventBuilder {
	builder.versionId = versionId
	builder.versionIdFlag = true
	return builder
}

// 应用默认名称
//
// 示例值：应用名称
func (builder *ApplicationAppVersionEventBuilder) AppName(appName string) *ApplicationAppVersionEventBuilder {
	builder.appName = appName
	builder.appNameFlag = true
	return builder
}

// 应用头像 url
//
// 示例值：https://www.example.com
func (builder *ApplicationAppVersionEventBuilder) AvatarUrl(avatarUrl string) *ApplicationAppVersionEventBuilder {
	builder.avatarUrl = avatarUrl
	builder.avatarUrlFlag = true
	return builder
}

// 应用默认描述
//
// 示例值：应用描述
func (builder *ApplicationAppVersionEventBuilder) Description(description string) *ApplicationAppVersionEventBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 应用权限列表
//
// 示例值：
func (builder *ApplicationAppVersionEventBuilder) Scopes(scopes []*AppScope) *ApplicationAppVersionEventBuilder {
	builder.scopes = scopes
	builder.scopesFlag = true
	return builder
}

// 后台主页地址
//
// 示例值：https://www.example.com
func (builder *ApplicationAppVersionEventBuilder) BackHomeUrl(backHomeUrl string) *ApplicationAppVersionEventBuilder {
	builder.backHomeUrl = backHomeUrl
	builder.backHomeUrlFlag = true
	return builder
}

// 应用的国际化信息列表
//
// 示例值：
func (builder *ApplicationAppVersionEventBuilder) I18n(i18n []*AppI18nInfo) *ApplicationAppVersionEventBuilder {
	builder.i18n = i18n
	builder.i18nFlag = true
	return builder
}

// 应用分类的国际化描述
//
// 示例值：
func (builder *ApplicationAppVersionEventBuilder) CommonCategories(commonCategories []string) *ApplicationAppVersionEventBuilder {
	builder.commonCategories = commonCategories
	builder.commonCategoriesFlag = true
	return builder
}

// 应用已订阅开放平台事件列表
//
// 示例值：
func (builder *ApplicationAppVersionEventBuilder) Events(events []string) *ApplicationAppVersionEventBuilder {
	builder.events = events
	builder.eventsFlag = true
	return builder
}

// 版本状态
//
// 示例值：1
func (builder *ApplicationAppVersionEventBuilder) Status(status int) *ApplicationAppVersionEventBuilder {
	builder.status = status
	builder.statusFlag = true
	return builder
}

// 版本创建时间（单位：s）
//
// 示例值：1610462759
func (builder *ApplicationAppVersionEventBuilder) CreateTime(createTime string) *ApplicationAppVersionEventBuilder {
	builder.createTime = createTime
	builder.createTimeFlag = true
	return builder
}

// 版本发布时间（单位：s）
//
// 示例值：1610462759
func (builder *ApplicationAppVersionEventBuilder) PublishTime(publishTime string) *ApplicationAppVersionEventBuilder {
	builder.publishTime = publishTime
	builder.publishTimeFlag = true
	return builder
}

// 当前版本下应用开启的能力
//
// 示例值：
func (builder *ApplicationAppVersionEventBuilder) Ability(ability *AppAbility) *ApplicationAppVersionEventBuilder {
	builder.ability = ability
	builder.abilityFlag = true
	return builder
}

// 跟随应用版本的信息
//
// 示例值：
func (builder *ApplicationAppVersionEventBuilder) Remark(remark *AppVersionRemarkEvent) *ApplicationAppVersionEventBuilder {
	builder.remark = remark
	builder.remarkFlag = true
	return builder
}

func (builder *ApplicationAppVersionEventBuilder) Build() *ApplicationAppVersionEvent {
	req := &ApplicationAppVersionEvent{}
	if builder.appIdFlag {
		req.AppId = &builder.appId

	}
	if builder.versionFlag {
		req.Version = &builder.version

	}
	if builder.versionIdFlag {
		req.VersionId = &builder.versionId

	}
	if builder.appNameFlag {
		req.AppName = &builder.appName

	}
	if builder.avatarUrlFlag {
		req.AvatarUrl = &builder.avatarUrl

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

	}
	if builder.scopesFlag {
		req.Scopes = builder.scopes
	}
	if builder.backHomeUrlFlag {
		req.BackHomeUrl = &builder.backHomeUrl

	}
	if builder.i18nFlag {
		req.I18n = builder.i18n
	}
	if builder.commonCategoriesFlag {
		req.CommonCategories = builder.commonCategories
	}
	if builder.eventsFlag {
		req.Events = builder.events
	}
	if builder.statusFlag {
		req.Status = &builder.status

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

	}
	if builder.publishTimeFlag {
		req.PublishTime = &builder.publishTime

	}
	if builder.abilityFlag {
		req.Ability = builder.ability
	}
	if builder.remarkFlag {
		req.Remark = builder.remark
	}
	return req
}

type ApplicationDepartmentAppUsage struct {
	DepartmentId *string `json:"department_id,omitempty"` // 租户内部门的唯一标识，ID值与查询参数中的department_id_type 对应。

	App []*ApplicationAppUsage `json:"app,omitempty"` // 应用整体使用情况，指标值包括：uv：活跃用户数，total_users：累计用户数，new_users：新增用户数，pv：在应用（小程序或网页）中访问的页面数，lifecycle：打开应用（小程序或网页）的次数

	Gadget []*ApplicationAppUsage `json:"gadget,omitempty"` // 小程序使用情况，没有小程序形态时为null，指标值包括：uv（小程序活跃用户数）、pv（用户在小程序中的访问页面数）、lifecycle（小程序的打开次数）

	Webapp []*ApplicationAppUsage `json:"webapp,omitempty"` // 网页应用使用情况，没有网页应用形态时为null，指标值包括：uv（网页应用活跃用户数）、pv（用户在网页应用中的访问页面数）、lifecycle（网页应用的打开次数）

	Bot []*ApplicationAppUsage `json:"bot,omitempty"` // 机器人使用情况，没有机器人形态时为null，;指标值包括：uv（机器人的活跃用户数）
}

type ApplicationDepartmentAppUsageBuilder struct {
	departmentId     string // 租户内部门的唯一标识，ID值与查询参数中的department_id_type 对应。
	departmentIdFlag bool

	app     []*ApplicationAppUsage // 应用整体使用情况，指标值包括：uv：活跃用户数，total_users：累计用户数，new_users：新增用户数，pv：在应用（小程序或网页）中访问的页面数，lifecycle：打开应用（小程序或网页）的次数
	appFlag bool

	gadget     []*ApplicationAppUsage // 小程序使用情况，没有小程序形态时为null，指标值包括：uv（小程序活跃用户数）、pv（用户在小程序中的访问页面数）、lifecycle（小程序的打开次数）
	gadgetFlag bool

	webapp     []*ApplicationAppUsage // 网页应用使用情况，没有网页应用形态时为null，指标值包括：uv（网页应用活跃用户数）、pv（用户在网页应用中的访问页面数）、lifecycle（网页应用的打开次数）
	webappFlag bool

	bot     []*ApplicationAppUsage // 机器人使用情况，没有机器人形态时为null，;指标值包括：uv（机器人的活跃用户数）
	botFlag bool
}

func NewApplicationDepartmentAppUsageBuilder() *ApplicationDepartmentAppUsageBuilder {
	builder := &ApplicationDepartmentAppUsageBuilder{}
	return builder
}

// 租户内部门的唯一标识，ID值与查询参数中的department_id_type 对应。
//
// 示例值：
func (builder *ApplicationDepartmentAppUsageBuilder) DepartmentId(departmentId string) *ApplicationDepartmentAppUsageBuilder {
	builder.departmentId = departmentId
	builder.departmentIdFlag = true
	return builder
}

// 应用整体使用情况，指标值包括：uv：活跃用户数，total_users：累计用户数，new_users：新增用户数，pv：在应用（小程序或网页）中访问的页面数，lifecycle：打开应用（小程序或网页）的次数
//
// 示例值：
func (builder *ApplicationDepartmentAppUsageBuilder) App(app []*ApplicationAppUsage) *ApplicationDepartmentAppUsageBuilder {
	builder.app = app
	builder.appFlag = true
	return builder
}

// 小程序使用情况，没有小程序形态时为null，指标值包括：uv（小程序活跃用户数）、pv（用户在小程序中的访问页面数）、lifecycle（小程序的打开次数）
//
// 示例值：
func (builder *ApplicationDepartmentAppUsageBuilder) Gadget(gadget []*ApplicationAppUsage) *ApplicationDepartmentAppUsageBuilder {
	builder.gadget = gadget
	builder.gadgetFlag = true
	return builder
}

// 网页应用使用情况，没有网页应用形态时为null，指标值包括：uv（网页应用活跃用户数）、pv（用户在网页应用中的访问页面数）、lifecycle（网页应用的打开次数）
//
// 示例值：
func (builder *ApplicationDepartmentAppUsageBuilder) Webapp(webapp []*ApplicationAppUsage) *ApplicationDepartmentAppUsageBuilder {
	builder.webapp = webapp
	builder.webappFlag = true
	return builder
}

// 机器人使用情况，没有机器人形态时为null，;指标值包括：uv（机器人的活跃用户数）
//
// 示例值：
func (builder *ApplicationDepartmentAppUsageBuilder) Bot(bot []*ApplicationAppUsage) *ApplicationDepartmentAppUsageBuilder {
	builder.bot = bot
	builder.botFlag = true
	return builder
}

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

	}
	if builder.appFlag {
		req.App = builder.app
	}
	if builder.gadgetFlag {
		req.Gadget = builder.gadget
	}
	if builder.webappFlag {
		req.Webapp = builder.webapp
	}
	if builder.botFlag {
		req.Bot = builder.bot
	}
	return req
}

type ApplicationEventOwner struct {
	Type *int `json:"type,omitempty"` // 应用所有者类型，可选值有：0：飞书科技（海外是另个名字企业），1：飞书合作伙伴，2：企业内成员

	Name *string `json:"name,omitempty"` // 应用开发商名称，仅商店应用返回

	HelpDesk *string `json:"help_desk,omitempty"` // 应用开发商的服务台链接，进商店应用返回。仅当应用商店配置了这种联系方式时才会返回

	Email *string `json:"email,omitempty"` // 应用开发商的邮箱，仅商店应用返回。仅当应用商店配置了这种联系方式时才会返回

	Phone *string `json:"phone,omitempty"` // 应用开发商的手机号，进商店应用返回。仅当应用商店配置了这种联系方式时才会返回

	OwnerId *UserId `json:"owner_id,omitempty"` // 应用所有者用户ID

	CustomerServiceAccount *string `json:"customer_service_account,omitempty"` // 客服账号
}

type ApplicationEventOwnerBuilder struct {
	type_    int // 应用所有者类型，可选值有：0：飞书科技（海外是另个名字企业），1：飞书合作伙伴，2：企业内成员
	typeFlag bool

	name     string // 应用开发商名称，仅商店应用返回
	nameFlag bool

	helpDesk     string // 应用开发商的服务台链接，进商店应用返回。仅当应用商店配置了这种联系方式时才会返回
	helpDeskFlag bool

	email     string // 应用开发商的邮箱，仅商店应用返回。仅当应用商店配置了这种联系方式时才会返回
	emailFlag bool

	phone     string // 应用开发商的手机号，进商店应用返回。仅当应用商店配置了这种联系方式时才会返回
	phoneFlag bool

	ownerId     *UserId // 应用所有者用户ID
	ownerIdFlag bool

	customerServiceAccount     string // 客服账号
	customerServiceAccountFlag bool
}

func NewApplicationEventOwnerBuilder() *ApplicationEventOwnerBuilder {
	builder := &ApplicationEventOwnerBuilder{}
	return builder
}

// 应用所有者类型，可选值有：0：飞书科技（海外是另个名字企业），1：飞书合作伙伴，2：企业内成员
//
// 示例值：0
func (builder *ApplicationEventOwnerBuilder) Type(type_ int) *ApplicationEventOwnerBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// 应用开发商名称，仅商店应用返回
//
// 示例值：应用名称
func (builder *ApplicationEventOwnerBuilder) Name(name string) *ApplicationEventOwnerBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 应用开发商的服务台链接，进商店应用返回。仅当应用商店配置了这种联系方式时才会返回
//
// 示例值：
func (builder *ApplicationEventOwnerBuilder) HelpDesk(helpDesk string) *ApplicationEventOwnerBuilder {
	builder.helpDesk = helpDesk
	builder.helpDeskFlag = true
	return builder
}

// 应用开发商的邮箱，仅商店应用返回。仅当应用商店配置了这种联系方式时才会返回
//
// 示例值：
func (builder *ApplicationEventOwnerBuilder) Email(email string) *ApplicationEventOwnerBuilder {
	builder.email = email
	builder.emailFlag = true
	return builder
}

// 应用开发商的手机号，进商店应用返回。仅当应用商店配置了这种联系方式时才会返回
//
// 示例值：
func (builder *ApplicationEventOwnerBuilder) Phone(phone string) *ApplicationEventOwnerBuilder {
	builder.phone = phone
	builder.phoneFlag = true
	return builder
}

// 应用所有者用户ID
//
// 示例值：ou_155184d1e73cbfb8973e5a9e698e74f2
func (builder *ApplicationEventOwnerBuilder) OwnerId(ownerId *UserId) *ApplicationEventOwnerBuilder {
	builder.ownerId = ownerId
	builder.ownerIdFlag = true
	return builder
}

// 客服账号
//
// 示例值：feishu@bytedance.com
func (builder *ApplicationEventOwnerBuilder) CustomerServiceAccount(customerServiceAccount string) *ApplicationEventOwnerBuilder {
	builder.customerServiceAccount = customerServiceAccount
	builder.customerServiceAccountFlag = true
	return builder
}

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

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

	}
	if builder.helpDeskFlag {
		req.HelpDesk = &builder.helpDesk

	}
	if builder.emailFlag {
		req.Email = &builder.email

	}
	if builder.phoneFlag {
		req.Phone = &builder.phone

	}
	if builder.ownerIdFlag {
		req.OwnerId = builder.ownerId
	}
	if builder.customerServiceAccountFlag {
		req.CustomerServiceAccount = &builder.customerServiceAccount

	}
	return req
}

type ApplicationFeedback struct {
	FeedbackId *string `json:"feedback_id,omitempty"` // 应用反馈 ID，应用反馈记录唯一标识

	AppId *string `json:"app_id,omitempty"` // 被反馈应用ID

	FeedbackTime *string `json:"feedback_time,omitempty"` // 反馈提交时间，格式为yyyy-mm-dd hh:mm:ss

	TenantName *string `json:"tenant_name,omitempty"` // 反馈用户的租户名， 查询 isv 应用时返回

	FeedbackType *int `json:"feedback_type,omitempty"` // 反馈类型

	Status *int `json:"status,omitempty"` // 反馈处理状态

	FaultType []int `json:"fault_type,omitempty"` // 故障类型列表：1: 黑屏 2: 白屏 3: 无法打开小程序  4: 卡顿 5: 小程序闪退 6: 页面加载慢 7: 死机 8: 其他异常

	FaultTime *string `json:"fault_time,omitempty"` // 故障时间，格式为yyyy-mm-dd hh:mm:ss

	Source *int `json:"source,omitempty"` // 反馈来源：1： 小程序 2：网页应用 3：机器人 4：webSDK

	Contact *string `json:"contact,omitempty"` // 用户联系方式，只有用户填写联系方式后返回

	UpdateTime *string `json:"update_time,omitempty"` // 反馈处理时间，格式为yyyy-mm-dd hh:mm:ss

	Description *string `json:"description,omitempty"` // 反馈问题描述

	UserId *string `json:"user_id,omitempty"` // 反馈用户id，租户内用户的唯一标识 ，ID值与查询参数中的user_id_type对应

	OperatorId *string `json:"operator_id,omitempty"` // 操作者id，租户内用户的唯一标识， ID值与查询参数中的user_id_type 对应

	Images []string `json:"images,omitempty"` // 反馈图片url列表，url 过期时间三天

	FeedbackPath *string `json:"feedback_path,omitempty"` // 反馈页面路径;- 如触发反馈的应用类型为小程序，则上报小程序当前页面的path信息;- 如触发反馈的应用类型为网页或网页应用，则上报当前网页的url信息;- 如为其他应用类型，则字段返回值为空
}

type ApplicationFeedbackBuilder struct {
	feedbackId     string // 应用反馈 ID，应用反馈记录唯一标识
	feedbackIdFlag bool

	appId     string // 被反馈应用ID
	appIdFlag bool

	feedbackTime     string // 反馈提交时间，格式为yyyy-mm-dd hh:mm:ss
	feedbackTimeFlag bool

	tenantName     string // 反馈用户的租户名， 查询 isv 应用时返回
	tenantNameFlag bool

	feedbackType     int // 反馈类型
	feedbackTypeFlag bool

	status     int // 反馈处理状态
	statusFlag bool

	faultType     []int // 故障类型列表：1: 黑屏 2: 白屏 3: 无法打开小程序  4: 卡顿 5: 小程序闪退 6: 页面加载慢 7: 死机 8: 其他异常
	faultTypeFlag bool

	faultTime     string // 故障时间，格式为yyyy-mm-dd hh:mm:ss
	faultTimeFlag bool

	source     int // 反馈来源：1： 小程序 2：网页应用 3：机器人 4：webSDK
	sourceFlag bool

	contact     string // 用户联系方式，只有用户填写联系方式后返回
	contactFlag bool

	updateTime     string // 反馈处理时间，格式为yyyy-mm-dd hh:mm:ss
	updateTimeFlag bool

	description     string // 反馈问题描述
	descriptionFlag bool

	userId     string // 反馈用户id，租户内用户的唯一标识 ，ID值与查询参数中的user_id_type对应
	userIdFlag bool

	operatorId     string // 操作者id，租户内用户的唯一标识， ID值与查询参数中的user_id_type 对应
	operatorIdFlag bool

	images     []string // 反馈图片url列表，url 过期时间三天
	imagesFlag bool

	feedbackPath     string // 反馈页面路径;- 如触发反馈的应用类型为小程序，则上报小程序当前页面的path信息;- 如触发反馈的应用类型为网页或网页应用，则上报当前网页的url信息;- 如为其他应用类型，则字段返回值为空
	feedbackPathFlag bool
}

func NewApplicationFeedbackBuilder() *ApplicationFeedbackBuilder {
	builder := &ApplicationFeedbackBuilder{}
	return builder
}

// 应用反馈 ID，应用反馈记录唯一标识
//
// 示例值：7057888018203574291
func (builder *ApplicationFeedbackBuilder) FeedbackId(feedbackId string) *ApplicationFeedbackBuilder {
	builder.feedbackId = feedbackId
	builder.feedbackIdFlag = true
	return builder
}

// 被反馈应用ID
//
// 示例值：cli_9b445f5258795107
func (builder *ApplicationFeedbackBuilder) AppId(appId string) *ApplicationFeedbackBuilder {
	builder.appId = appId
	builder.appIdFlag = true
	return builder
}

// 反馈提交时间，格式为yyyy-mm-dd hh:mm:ss
//
// 示例值：2022-01-30 11:30:12
func (builder *ApplicationFeedbackBuilder) FeedbackTime(feedbackTime string) *ApplicationFeedbackBuilder {
	builder.feedbackTime = feedbackTime
	builder.feedbackTimeFlag = true
	return builder
}

// 反馈用户的租户名， 查询 isv 应用时返回
//
// 示例值：字节跳动
func (builder *ApplicationFeedbackBuilder) TenantName(tenantName string) *ApplicationFeedbackBuilder {
	builder.tenantName = tenantName
	builder.tenantNameFlag = true
	return builder
}

// 反馈类型
//
// 示例值：1
func (builder *ApplicationFeedbackBuilder) FeedbackType(feedbackType int) *ApplicationFeedbackBuilder {
	builder.feedbackType = feedbackType
	builder.feedbackTypeFlag = true
	return builder
}

// 反馈处理状态
//
// 示例值：0
func (builder *ApplicationFeedbackBuilder) Status(status int) *ApplicationFeedbackBuilder {
	builder.status = status
	builder.statusFlag = true
	return builder
}

// 故障类型列表：1: 黑屏 2: 白屏 3: 无法打开小程序  4: 卡顿 5: 小程序闪退 6: 页面加载慢 7: 死机 8: 其他异常
//
// 示例值：[1,2,3]
func (builder *ApplicationFeedbackBuilder) FaultType(faultType []int) *ApplicationFeedbackBuilder {
	builder.faultType = faultType
	builder.faultTypeFlag = true
	return builder
}

// 故障时间，格式为yyyy-mm-dd hh:mm:ss
//
// 示例值：2022-01-30 11:30:12
func (builder *ApplicationFeedbackBuilder) FaultTime(faultTime string) *ApplicationFeedbackBuilder {
	builder.faultTime = faultTime
	builder.faultTimeFlag = true
	return builder
}

// 反馈来源：1： 小程序 2：网页应用 3：机器人 4：webSDK
//
// 示例值：1
func (builder *ApplicationFeedbackBuilder) Source(source int) *ApplicationFeedbackBuilder {
	builder.source = source
	builder.sourceFlag = true
	return builder
}

// 用户联系方式，只有用户填写联系方式后返回
//
// 示例值：wang@bytedance.com
func (builder *ApplicationFeedbackBuilder) Contact(contact string) *ApplicationFeedbackBuilder {
	builder.contact = contact
	builder.contactFlag = true
	return builder
}

// 反馈处理时间，格式为yyyy-mm-dd hh:mm:ss
//
// 示例值：2022-01-30 11:30:12
func (builder *ApplicationFeedbackBuilder) UpdateTime(updateTime string) *ApplicationFeedbackBuilder {
	builder.updateTime = updateTime
	builder.updateTimeFlag = true
	return builder
}

// 反馈问题描述
//
// 示例值：反馈描述
func (builder *ApplicationFeedbackBuilder) Description(description string) *ApplicationFeedbackBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 反馈用户id，租户内用户的唯一标识 ，ID值与查询参数中的user_id_type对应
//
// 示例值：ou_9565b69967831233761cc2f11b4c089f
func (builder *ApplicationFeedbackBuilder) UserId(userId string) *ApplicationFeedbackBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

// 操作者id，租户内用户的唯一标识， ID值与查询参数中的user_id_type 对应
//
// 示例值：ou_9565b69967831233761cc2f11b4c089f
func (builder *ApplicationFeedbackBuilder) OperatorId(operatorId string) *ApplicationFeedbackBuilder {
	builder.operatorId = operatorId
	builder.operatorIdFlag = true
	return builder
}

// 反馈图片url列表，url 过期时间三天
//
// 示例值：
func (builder *ApplicationFeedbackBuilder) Images(images []string) *ApplicationFeedbackBuilder {
	builder.images = images
	builder.imagesFlag = true
	return builder
}

// 反馈页面路径;- 如触发反馈的应用类型为小程序，则上报小程序当前页面的path信息;- 如触发反馈的应用类型为网页或网页应用，则上报当前网页的url信息;- 如为其他应用类型，则字段返回值为空
//
// 示例值：index/page
func (builder *ApplicationFeedbackBuilder) FeedbackPath(feedbackPath string) *ApplicationFeedbackBuilder {
	builder.feedbackPath = feedbackPath
	builder.feedbackPathFlag = true
	return builder
}

func (builder *ApplicationFeedbackBuilder) Build() *ApplicationFeedback {
	req := &ApplicationFeedback{}
	if builder.feedbackIdFlag {
		req.FeedbackId = &builder.feedbackId

	}
	if builder.appIdFlag {
		req.AppId = &builder.appId

	}
	if builder.feedbackTimeFlag {
		req.FeedbackTime = &builder.feedbackTime

	}
	if builder.tenantNameFlag {
		req.TenantName = &builder.tenantName

	}
	if builder.feedbackTypeFlag {
		req.FeedbackType = &builder.feedbackType

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

	}
	if builder.faultTypeFlag {
		req.FaultType = builder.faultType
	}
	if builder.faultTimeFlag {
		req.FaultTime = &builder.faultTime

	}
	if builder.sourceFlag {
		req.Source = &builder.source

	}
	if builder.contactFlag {
		req.Contact = &builder.contact

	}
	if builder.updateTimeFlag {
		req.UpdateTime = &builder.updateTime

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

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

	}
	if builder.operatorIdFlag {
		req.OperatorId = &builder.operatorId

	}
	if builder.imagesFlag {
		req.Images = builder.images
	}
	if builder.feedbackPathFlag {
		req.FeedbackPath = &builder.feedbackPath

	}
	return req
}

type ApplicationOwner struct {
	Type *int `json:"type,omitempty"` // 应用所有者类型

	OwnerId *string `json:"owner_id,omitempty"` // 应用所有者ID

	Name *string `json:"name,omitempty"` // 应用开发商名称(仅商店应用返回)

	HelpDesk *string `json:"help_desk,omitempty"` // 应用开发商服务台链接(仅商店应用返回)

	Email *string `json:"email,omitempty"` // 应用开发商的邮箱(仅商店应用返回)

	Phone *string `json:"phone,omitempty"` // 应用开发商的手机号(仅商店应用返回)

	CustomerServiceAccount *string `json:"customer_service_account,omitempty"` // 客服账号，仅当商店应用配置了这种联系方式时才会返回
}

type ApplicationOwnerBuilder struct {
	type_    int // 应用所有者类型
	typeFlag bool

	ownerId     string // 应用所有者ID
	ownerIdFlag bool

	name     string // 应用开发商名称(仅商店应用返回)
	nameFlag bool

	helpDesk     string // 应用开发商服务台链接(仅商店应用返回)
	helpDeskFlag bool

	email     string // 应用开发商的邮箱(仅商店应用返回)
	emailFlag bool

	phone     string // 应用开发商的手机号(仅商店应用返回)
	phoneFlag bool

	customerServiceAccount     string // 客服账号，仅当商店应用配置了这种联系方式时才会返回
	customerServiceAccountFlag bool
}

func NewApplicationOwnerBuilder() *ApplicationOwnerBuilder {
	builder := &ApplicationOwnerBuilder{}
	return builder
}

// 应用所有者类型
//
// 示例值：0
func (builder *ApplicationOwnerBuilder) Type(type_ int) *ApplicationOwnerBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// 应用所有者ID
//
// 示例值：ou_d317f090b7258ad0372aa53963cda70d
func (builder *ApplicationOwnerBuilder) OwnerId(ownerId string) *ApplicationOwnerBuilder {
	builder.ownerId = ownerId
	builder.ownerIdFlag = true
	return builder
}

// 应用开发商名称(仅商店应用返回)
//
// 示例值：test tenant
func (builder *ApplicationOwnerBuilder) Name(name string) *ApplicationOwnerBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 应用开发商服务台链接(仅商店应用返回)
//
// 示例值：https://applink.feishu.cn/client/helpdesk/open?id=6940534140529803284
func (builder *ApplicationOwnerBuilder) HelpDesk(helpDesk string) *ApplicationOwnerBuilder {
	builder.helpDesk = helpDesk
	builder.helpDeskFlag = true
	return builder
}

// 应用开发商的邮箱(仅商店应用返回)
//
// 示例值：test123@163.com
func (builder *ApplicationOwnerBuilder) Email(email string) *ApplicationOwnerBuilder {
	builder.email = email
	builder.emailFlag = true
	return builder
}

// 应用开发商的手机号(仅商店应用返回)
//
// 示例值：1234534234234
func (builder *ApplicationOwnerBuilder) Phone(phone string) *ApplicationOwnerBuilder {
	builder.phone = phone
	builder.phoneFlag = true
	return builder
}

// 客服账号，仅当商店应用配置了这种联系方式时才会返回
//
// 示例值：feishu@bytedance.com
func (builder *ApplicationOwnerBuilder) CustomerServiceAccount(customerServiceAccount string) *ApplicationOwnerBuilder {
	builder.customerServiceAccount = customerServiceAccount
	builder.customerServiceAccountFlag = true
	return builder
}

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

	}
	if builder.ownerIdFlag {
		req.OwnerId = &builder.ownerId

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

	}
	if builder.helpDeskFlag {
		req.HelpDesk = &builder.helpDesk

	}
	if builder.emailFlag {
		req.Email = &builder.email

	}
	if builder.phoneFlag {
		req.Phone = &builder.phone

	}
	if builder.customerServiceAccountFlag {
		req.CustomerServiceAccount = &builder.customerServiceAccount

	}
	return req
}

type ApplicationVisibility struct {
	IsAll *bool `json:"is_all,omitempty"` // 是否全员可见

	VisibleList *AppVisibleList `json:"visible_list,omitempty"` // 可见名单

	InvisibleList *AppVisibleList `json:"invisible_list,omitempty"` // 不可见名单
}

type ApplicationVisibilityBuilder struct {
	isAll     bool // 是否全员可见
	isAllFlag bool

	visibleList     *AppVisibleList // 可见名单
	visibleListFlag bool

	invisibleList     *AppVisibleList // 不可见名单
	invisibleListFlag bool
}

func NewApplicationVisibilityBuilder() *ApplicationVisibilityBuilder {
	builder := &ApplicationVisibilityBuilder{}
	return builder
}

// 是否全员可见
//
// 示例值：false
func (builder *ApplicationVisibilityBuilder) IsAll(isAll bool) *ApplicationVisibilityBuilder {
	builder.isAll = isAll
	builder.isAllFlag = true
	return builder
}

// 可见名单
//
// 示例值：
func (builder *ApplicationVisibilityBuilder) VisibleList(visibleList *AppVisibleList) *ApplicationVisibilityBuilder {
	builder.visibleList = visibleList
	builder.visibleListFlag = true
	return builder
}

// 不可见名单
//
// 示例值：
func (builder *ApplicationVisibilityBuilder) InvisibleList(invisibleList *AppVisibleList) *ApplicationVisibilityBuilder {
	builder.invisibleList = invisibleList
	builder.invisibleListFlag = true
	return builder
}

func (builder *ApplicationVisibilityBuilder) Build() *ApplicationVisibility {
	req := &ApplicationVisibility{}
	if builder.isAllFlag {
		req.IsAll = &builder.isAll

	}
	if builder.visibleListFlag {
		req.VisibleList = builder.visibleList
	}
	if builder.invisibleListFlag {
		req.InvisibleList = builder.invisibleList
	}
	return req
}

type ApplicationVisibilityDepartmentWhiteBlackInfo struct {
	DepartmentId *string `json:"department_id,omitempty"` // 部门ID

	InWhiteList *bool `json:"in_white_list,omitempty"` // 是否在白名单中

	InBlackList *bool `json:"in_black_list,omitempty"` // 是否在黑名单中
}

type ApplicationVisibilityDepartmentWhiteBlackInfoBuilder struct {
	departmentId     string // 部门ID
	departmentIdFlag bool

	inWhiteList     bool // 是否在白名单中
	inWhiteListFlag bool

	inBlackList     bool // 是否在黑名单中
	inBlackListFlag bool
}

func NewApplicationVisibilityDepartmentWhiteBlackInfoBuilder() *ApplicationVisibilityDepartmentWhiteBlackInfoBuilder {
	builder := &ApplicationVisibilityDepartmentWhiteBlackInfoBuilder{}
	return builder
}

// 部门ID
//
// 示例值：od-aa2c50a04769feefededb7a05b7525a8
func (builder *ApplicationVisibilityDepartmentWhiteBlackInfoBuilder) DepartmentId(departmentId string) *ApplicationVisibilityDepartmentWhiteBlackInfoBuilder {
	builder.departmentId = departmentId
	builder.departmentIdFlag = true
	return builder
}

// 是否在白名单中
//
// 示例值：false
func (builder *ApplicationVisibilityDepartmentWhiteBlackInfoBuilder) InWhiteList(inWhiteList bool) *ApplicationVisibilityDepartmentWhiteBlackInfoBuilder {
	builder.inWhiteList = inWhiteList
	builder.inWhiteListFlag = true
	return builder
}

// 是否在黑名单中
//
// 示例值：false
func (builder *ApplicationVisibilityDepartmentWhiteBlackInfoBuilder) InBlackList(inBlackList bool) *ApplicationVisibilityDepartmentWhiteBlackInfoBuilder {
	builder.inBlackList = inBlackList
	builder.inBlackListFlag = true
	return builder
}

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

	}
	if builder.inWhiteListFlag {
		req.InWhiteList = &builder.inWhiteList

	}
	if builder.inBlackListFlag {
		req.InBlackList = &builder.inBlackList

	}
	return req
}

type ApplicationVisibilityGroupWhiteBlackInfo struct {
	GroupId *string `json:"group_id,omitempty"` // 用户组ID

	InWhiteList *bool `json:"in_white_list,omitempty"` // 是否在白名单中

	InBlackList *bool `json:"in_black_list,omitempty"` // 是否在黑名单中
}

type ApplicationVisibilityGroupWhiteBlackInfoBuilder struct {
	groupId     string // 用户组ID
	groupIdFlag bool

	inWhiteList     bool // 是否在白名单中
	inWhiteListFlag bool

	inBlackList     bool // 是否在黑名单中
	inBlackListFlag bool
}

func NewApplicationVisibilityGroupWhiteBlackInfoBuilder() *ApplicationVisibilityGroupWhiteBlackInfoBuilder {
	builder := &ApplicationVisibilityGroupWhiteBlackInfoBuilder{}
	return builder
}

// 用户组ID
//
// 示例值：96815a9cd9beg8g4
func (builder *ApplicationVisibilityGroupWhiteBlackInfoBuilder) GroupId(groupId string) *ApplicationVisibilityGroupWhiteBlackInfoBuilder {
	builder.groupId = groupId
	builder.groupIdFlag = true
	return builder
}

// 是否在白名单中
//
// 示例值：false
func (builder *ApplicationVisibilityGroupWhiteBlackInfoBuilder) InWhiteList(inWhiteList bool) *ApplicationVisibilityGroupWhiteBlackInfoBuilder {
	builder.inWhiteList = inWhiteList
	builder.inWhiteListFlag = true
	return builder
}

// 是否在黑名单中
//
// 示例值：false
func (builder *ApplicationVisibilityGroupWhiteBlackInfoBuilder) InBlackList(inBlackList bool) *ApplicationVisibilityGroupWhiteBlackInfoBuilder {
	builder.inBlackList = inBlackList
	builder.inBlackListFlag = true
	return builder
}

func (builder *ApplicationVisibilityGroupWhiteBlackInfoBuilder) Build() *ApplicationVisibilityGroupWhiteBlackInfo {
	req := &ApplicationVisibilityGroupWhiteBlackInfo{}
	if builder.groupIdFlag {
		req.GroupId = &builder.groupId

	}
	if builder.inWhiteListFlag {
		req.InWhiteList = &builder.inWhiteList

	}
	if builder.inBlackListFlag {
		req.InBlackList = &builder.inBlackList

	}
	return req
}

type ApplicationVisibilityUserWhiteBlackInfo struct {
	UserId *string `json:"user_id,omitempty"` // 用户ID

	InWhiteList *bool `json:"in_white_list,omitempty"` // 是否在白名单中

	InBlackList *bool `json:"in_black_list,omitempty"` // 是否在黑名单中

	InPaidList *bool `json:"in_paid_list,omitempty"` // 是否在付费名单中
}

type ApplicationVisibilityUserWhiteBlackInfoBuilder struct {
	userId     string // 用户ID
	userIdFlag bool

	inWhiteList     bool // 是否在白名单中
	inWhiteListFlag bool

	inBlackList     bool // 是否在黑名单中
	inBlackListFlag bool

	inPaidList     bool // 是否在付费名单中
	inPaidListFlag bool
}

func NewApplicationVisibilityUserWhiteBlackInfoBuilder() *ApplicationVisibilityUserWhiteBlackInfoBuilder {
	builder := &ApplicationVisibilityUserWhiteBlackInfoBuilder{}
	return builder
}

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

// 是否在白名单中
//
// 示例值：false
func (builder *ApplicationVisibilityUserWhiteBlackInfoBuilder) InWhiteList(inWhiteList bool) *ApplicationVisibilityUserWhiteBlackInfoBuilder {
	builder.inWhiteList = inWhiteList
	builder.inWhiteListFlag = true
	return builder
}

// 是否在黑名单中
//
// 示例值：false
func (builder *ApplicationVisibilityUserWhiteBlackInfoBuilder) InBlackList(inBlackList bool) *ApplicationVisibilityUserWhiteBlackInfoBuilder {
	builder.inBlackList = inBlackList
	builder.inBlackListFlag = true
	return builder
}

// 是否在付费名单中
//
// 示例值：false
func (builder *ApplicationVisibilityUserWhiteBlackInfoBuilder) InPaidList(inPaidList bool) *ApplicationVisibilityUserWhiteBlackInfoBuilder {
	builder.inPaidList = inPaidList
	builder.inPaidListFlag = true
	return builder
}

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

	}
	if builder.inWhiteListFlag {
		req.InWhiteList = &builder.inWhiteList

	}
	if builder.inBlackListFlag {
		req.InBlackList = &builder.inBlackList

	}
	if builder.inPaidListFlag {
		req.InPaidList = &builder.inPaidList

	}
	return req
}

type Block struct {
	BlockTypeId *string `json:"block_type_id,omitempty"` // BlockTypeID

	VersionId *string `json:"version_id,omitempty"` // 上传 block 小程序的 version id

	I18n []*BlockI18nInfo `json:"i18n,omitempty"` // block 的国际化信息

	MobileIconUrl *string `json:"mobile_icon_url,omitempty"` // 移动端 icon 链接

	PcIconUrl *string `json:"pc_icon_url,omitempty"` // pc 端口 icon 链接
}

type BlockBuilder struct {
	blockTypeId     string // BlockTypeID
	blockTypeIdFlag bool

	versionId     string // 上传 block 小程序的 version id
	versionIdFlag bool

	i18n     []*BlockI18nInfo // block 的国际化信息
	i18nFlag bool

	mobileIconUrl     string // 移动端 icon 链接
	mobileIconUrlFlag bool

	pcIconUrl     string // pc 端口 icon 链接
	pcIconUrlFlag bool
}

func NewBlockBuilder() *BlockBuilder {
	builder := &BlockBuilder{}
	return builder
}

// BlockTypeID
//
// 示例值：blk_4fb61568435880110854c1d0
func (builder *BlockBuilder) BlockTypeId(blockTypeId string) *BlockBuilder {
	builder.blockTypeId = blockTypeId
	builder.blockTypeIdFlag = true
	return builder
}

// 上传 block 小程序的 version id
//
// 示例值：1.0.0
func (builder *BlockBuilder) VersionId(versionId string) *BlockBuilder {
	builder.versionId = versionId
	builder.versionIdFlag = true
	return builder
}

// block 的国际化信息
//
// 示例值：
func (builder *BlockBuilder) I18n(i18n []*BlockI18nInfo) *BlockBuilder {
	builder.i18n = i18n
	builder.i18nFlag = true
	return builder
}

// 移动端 icon 链接
//
// 示例值：https://www.example.com
func (builder *BlockBuilder) MobileIconUrl(mobileIconUrl string) *BlockBuilder {
	builder.mobileIconUrl = mobileIconUrl
	builder.mobileIconUrlFlag = true
	return builder
}

// pc 端口 icon 链接
//
// 示例值：https://www.example.com
func (builder *BlockBuilder) PcIconUrl(pcIconUrl string) *BlockBuilder {
	builder.pcIconUrl = pcIconUrl
	builder.pcIconUrlFlag = true
	return builder
}

func (builder *BlockBuilder) Build() *Block {
	req := &Block{}
	if builder.blockTypeIdFlag {
		req.BlockTypeId = &builder.blockTypeId

	}
	if builder.versionIdFlag {
		req.VersionId = &builder.versionId

	}
	if builder.i18nFlag {
		req.I18n = builder.i18n
	}
	if builder.mobileIconUrlFlag {
		req.MobileIconUrl = &builder.mobileIconUrl

	}
	if builder.pcIconUrlFlag {
		req.PcIconUrl = &builder.pcIconUrl

	}
	return req
}

type BlockI18nInfo struct {
	I18nKey *string `json:"i18n_key,omitempty"` // 国际化语言的 key

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

type BlockI18nInfoBuilder struct {
	i18nKey     string // 国际化语言的 key
	i18nKeyFlag bool

	name     string // 名称
	nameFlag bool
}

func NewBlockI18nInfoBuilder() *BlockI18nInfoBuilder {
	builder := &BlockI18nInfoBuilder{}
	return builder
}

// 国际化语言的 key
//
// 示例值：zh_cn
func (builder *BlockI18nInfoBuilder) I18nKey(i18nKey string) *BlockI18nInfoBuilder {
	builder.i18nKey = i18nKey
	builder.i18nKeyFlag = true
	return builder
}

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

func (builder *BlockI18nInfoBuilder) Build() *BlockI18nInfo {
	req := &BlockI18nInfo{}
	if builder.i18nKeyFlag {
		req.I18nKey = &builder.i18nKey

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

	}
	return req
}

type Bot struct {
	CardRequestUrl *string `json:"card_request_url,omitempty"` // 消息卡片回调地址
}

type BotBuilder struct {
	cardRequestUrl     string // 消息卡片回调地址
	cardRequestUrlFlag bool
}

func NewBotBuilder() *BotBuilder {
	builder := &BotBuilder{}
	return builder
}

// 消息卡片回调地址
//
// 示例值：https://www.example.com
func (builder *BotBuilder) CardRequestUrl(cardRequestUrl string) *BotBuilder {
	builder.cardRequestUrl = cardRequestUrl
	builder.cardRequestUrlFlag = true
	return builder
}

func (builder *BotBuilder) Build() *Bot {
	req := &Bot{}
	if builder.cardRequestUrlFlag {
		req.CardRequestUrl = &builder.cardRequestUrl

	}
	return req
}

type BotDisplayInfo struct {
	Id *string `json:"id,omitempty"` // botID

	Name *string `json:"name,omitempty"` // bot name

	AvatarUrl *string `json:"avatar_url,omitempty"` // bot avatar

	TenantId *string `json:"tenant_id,omitempty"` // 租户信息

	I18nNames map[string]string `json:"i18n_names,omitempty"` // 多语言名称

	I18nDescriptions map[string]string `json:"i18n_descriptions,omitempty"` // 多语言描述
}

type BotDisplayInfoBuilder struct {
	id     string // botID
	idFlag bool

	name     string // bot name
	nameFlag bool

	avatarUrl     string // bot avatar
	avatarUrlFlag bool

	tenantId     string // 租户信息
	tenantIdFlag bool

	i18nNames     map[string]string // 多语言名称
	i18nNamesFlag bool

	i18nDescriptions     map[string]string // 多语言描述
	i18nDescriptionsFlag bool
}

func NewBotDisplayInfoBuilder() *BotDisplayInfoBuilder {
	builder := &BotDisplayInfoBuilder{}
	return builder
}

// botID
//
// 示例值：7331683233945616413
func (builder *BotDisplayInfoBuilder) Id(id string) *BotDisplayInfoBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// bot name
//
// 示例值：机器人
func (builder *BotDisplayInfoBuilder) Name(name string) *BotDisplayInfoBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// bot avatar
//
// 示例值：1
func (builder *BotDisplayInfoBuilder) AvatarUrl(avatarUrl string) *BotDisplayInfoBuilder {
	builder.avatarUrl = avatarUrl
	builder.avatarUrlFlag = true
	return builder
}

// 租户信息
//
// 示例值：2
func (builder *BotDisplayInfoBuilder) TenantId(tenantId string) *BotDisplayInfoBuilder {
	builder.tenantId = tenantId
	builder.tenantIdFlag = true
	return builder
}

// 多语言名称
//
// 示例值：
func (builder *BotDisplayInfoBuilder) I18nNames(i18nNames map[string]string) *BotDisplayInfoBuilder {
	builder.i18nNames = i18nNames
	builder.i18nNamesFlag = true
	return builder
}

// 多语言描述
//
// 示例值：
func (builder *BotDisplayInfoBuilder) I18nDescriptions(i18nDescriptions map[string]string) *BotDisplayInfoBuilder {
	builder.i18nDescriptions = i18nDescriptions
	builder.i18nDescriptionsFlag = true
	return builder
}

func (builder *BotDisplayInfoBuilder) Build() *BotDisplayInfo {
	req := &BotDisplayInfo{}
	if builder.idFlag {
		req.Id = &builder.id

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

	}
	if builder.avatarUrlFlag {
		req.AvatarUrl = &builder.avatarUrl

	}
	if builder.tenantIdFlag {
		req.TenantId = &builder.tenantId

	}
	if builder.i18nNamesFlag {
		req.I18nNames = builder.i18nNames
	}
	if builder.i18nDescriptionsFlag {
		req.I18nDescriptions = builder.i18nDescriptions
	}
	return req
}

type Callback struct {
	CallbackType *string `json:"callback_type,omitempty"` // 回调类型

	RequestUrl *string `json:"request_url,omitempty"` // 回调地址

	SubscribedCallbacks []string `json:"subscribed_callbacks,omitempty"` // 订阅的回调列表
}

type CallbackBuilder struct {
	callbackType     string // 回调类型
	callbackTypeFlag bool

	requestUrl     string // 回调地址
	requestUrlFlag bool

	subscribedCallbacks     []string // 订阅的回调列表
	subscribedCallbacksFlag bool
}

func NewCallbackBuilder() *CallbackBuilder {
	builder := &CallbackBuilder{}
	return builder
}

// 回调类型
//
// 示例值：webhook
func (builder *CallbackBuilder) CallbackType(callbackType string) *CallbackBuilder {
	builder.callbackType = callbackType
	builder.callbackTypeFlag = true
	return builder
}

// 回调地址
//
// 示例值：https://open.feishu.cn/
func (builder *CallbackBuilder) RequestUrl(requestUrl string) *CallbackBuilder {
	builder.requestUrl = requestUrl
	builder.requestUrlFlag = true
	return builder
}

// 订阅的回调列表
//
// 示例值：
func (builder *CallbackBuilder) SubscribedCallbacks(subscribedCallbacks []string) *CallbackBuilder {
	builder.subscribedCallbacks = subscribedCallbacks
	builder.subscribedCallbacksFlag = true
	return builder
}

func (builder *CallbackBuilder) Build() *Callback {
	req := &Callback{}
	if builder.callbackTypeFlag {
		req.CallbackType = &builder.callbackType

	}
	if builder.requestUrlFlag {
		req.RequestUrl = &builder.requestUrl

	}
	if builder.subscribedCallbacksFlag {
		req.SubscribedCallbacks = builder.subscribedCallbacks
	}
	return req
}

type ClientBadgeNum struct {
	WebApp *int `json:"web_app,omitempty"` // h5能力的badge数量

	Gadget *int `json:"gadget,omitempty"` // 小程序能力的badge数量
}

type ClientBadgeNumBuilder struct {
	webApp     int // h5能力的badge数量
	webAppFlag bool

	gadget     int // 小程序能力的badge数量
	gadgetFlag bool
}

func NewClientBadgeNumBuilder() *ClientBadgeNumBuilder {
	builder := &ClientBadgeNumBuilder{}
	return builder
}

// h5能力的badge数量
//
// 示例值：1
func (builder *ClientBadgeNumBuilder) WebApp(webApp int) *ClientBadgeNumBuilder {
	builder.webApp = webApp
	builder.webAppFlag = true
	return builder
}

// 小程序能力的badge数量
//
// 示例值：2
func (builder *ClientBadgeNumBuilder) Gadget(gadget int) *ClientBadgeNumBuilder {
	builder.gadget = gadget
	builder.gadgetFlag = true
	return builder
}

func (builder *ClientBadgeNumBuilder) Build() *ClientBadgeNum {
	req := &ClientBadgeNum{}
	if builder.webAppFlag {
		req.WebApp = &builder.webApp

	}
	if builder.gadgetFlag {
		req.Gadget = &builder.gadget

	}
	return req
}

type CloudDoc struct {
	SpaceUrl *string `json:"space_url,omitempty"` // 云空间重定向 url

	I18n []*CloudDocI18nInfo `json:"i18n,omitempty"` // 国际化信息

	IconUrl *string `json:"icon_url,omitempty"` // 图标链接

	Mode *int `json:"mode,omitempty"` // 云文档支持模式
}

type CloudDocBuilder struct {
	spaceUrl     string // 云空间重定向 url
	spaceUrlFlag bool

	i18n     []*CloudDocI18nInfo // 国际化信息
	i18nFlag bool

	iconUrl     string // 图标链接
	iconUrlFlag bool

	mode     int // 云文档支持模式
	modeFlag bool
}

func NewCloudDocBuilder() *CloudDocBuilder {
	builder := &CloudDocBuilder{}
	return builder
}

// 云空间重定向 url
//
// 示例值：https://www.example.com
func (builder *CloudDocBuilder) SpaceUrl(spaceUrl string) *CloudDocBuilder {
	builder.spaceUrl = spaceUrl
	builder.spaceUrlFlag = true
	return builder
}

// 国际化信息
//
// 示例值：
func (builder *CloudDocBuilder) I18n(i18n []*CloudDocI18nInfo) *CloudDocBuilder {
	builder.i18n = i18n
	builder.i18nFlag = true
	return builder
}

// 图标链接
//
// 示例值：https://www.example.com
func (builder *CloudDocBuilder) IconUrl(iconUrl string) *CloudDocBuilder {
	builder.iconUrl = iconUrl
	builder.iconUrlFlag = true
	return builder
}

// 云文档支持模式
//
// 示例值：1
func (builder *CloudDocBuilder) Mode(mode int) *CloudDocBuilder {
	builder.mode = mode
	builder.modeFlag = true
	return builder
}

func (builder *CloudDocBuilder) Build() *CloudDoc {
	req := &CloudDoc{}
	if builder.spaceUrlFlag {
		req.SpaceUrl = &builder.spaceUrl

	}
	if builder.i18nFlag {
		req.I18n = builder.i18n
	}
	if builder.iconUrlFlag {
		req.IconUrl = &builder.iconUrl

	}
	if builder.modeFlag {
		req.Mode = &builder.mode

	}
	return req
}

type CloudDocI18nInfo struct {
	I18nKey *string `json:"i18n_key,omitempty"` // 国际化语言的 key

	Name *string `json:"name,omitempty"` // 云文档国际化名称

	ReadDescription *string `json:"read_description,omitempty"` // 云文档国际化读权限说明

	WriteDescription *string `json:"write_description,omitempty"` // 云文档国际化写权限说明
}

type CloudDocI18nInfoBuilder struct {
	i18nKey     string // 国际化语言的 key
	i18nKeyFlag bool

	name     string // 云文档国际化名称
	nameFlag bool

	readDescription     string // 云文档国际化读权限说明
	readDescriptionFlag bool

	writeDescription     string // 云文档国际化写权限说明
	writeDescriptionFlag bool
}

func NewCloudDocI18nInfoBuilder() *CloudDocI18nInfoBuilder {
	builder := &CloudDocI18nInfoBuilder{}
	return builder
}

// 国际化语言的 key
//
// 示例值：zh_cn
func (builder *CloudDocI18nInfoBuilder) I18nKey(i18nKey string) *CloudDocI18nInfoBuilder {
	builder.i18nKey = i18nKey
	builder.i18nKeyFlag = true
	return builder
}

// 云文档国际化名称
//
// 示例值：名称
func (builder *CloudDocI18nInfoBuilder) Name(name string) *CloudDocI18nInfoBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 云文档国际化读权限说明
//
// 示例值：读权限说明
func (builder *CloudDocI18nInfoBuilder) ReadDescription(readDescription string) *CloudDocI18nInfoBuilder {
	builder.readDescription = readDescription
	builder.readDescriptionFlag = true
	return builder
}

// 云文档国际化写权限说明
//
// 示例值：写权限说明
func (builder *CloudDocI18nInfoBuilder) WriteDescription(writeDescription string) *CloudDocI18nInfoBuilder {
	builder.writeDescription = writeDescription
	builder.writeDescriptionFlag = true
	return builder
}

func (builder *CloudDocI18nInfoBuilder) Build() *CloudDocI18nInfo {
	req := &CloudDocI18nInfo{}
	if builder.i18nKeyFlag {
		req.I18nKey = &builder.i18nKey

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

	}
	if builder.readDescriptionFlag {
		req.ReadDescription = &builder.readDescription

	}
	if builder.writeDescriptionFlag {
		req.WriteDescription = &builder.writeDescription

	}
	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 DocsBlock struct {
	BlockTypeId *string `json:"block_type_id,omitempty"` // BlockTypeID

	I18n []*BlockI18nInfo `json:"i18n,omitempty"` // block 的国际化信息

	MobileIconUrl *string `json:"mobile_icon_url,omitempty"` // 移动端 icon 链接

	PcIconUrl *string `json:"pc_icon_url,omitempty"` // pc 端口 icon 链接
}

type DocsBlockBuilder struct {
	blockTypeId     string // BlockTypeID
	blockTypeIdFlag bool

	i18n     []*BlockI18nInfo // block 的国际化信息
	i18nFlag bool

	mobileIconUrl     string // 移动端 icon 链接
	mobileIconUrlFlag bool

	pcIconUrl     string // pc 端口 icon 链接
	pcIconUrlFlag bool
}

func NewDocsBlockBuilder() *DocsBlockBuilder {
	builder := &DocsBlockBuilder{}
	return builder
}

// BlockTypeID
//
// 示例值：blk_4fb61568435880110854c1d0
func (builder *DocsBlockBuilder) BlockTypeId(blockTypeId string) *DocsBlockBuilder {
	builder.blockTypeId = blockTypeId
	builder.blockTypeIdFlag = true
	return builder
}

// block 的国际化信息
//
// 示例值：
func (builder *DocsBlockBuilder) I18n(i18n []*BlockI18nInfo) *DocsBlockBuilder {
	builder.i18n = i18n
	builder.i18nFlag = true
	return builder
}

// 移动端 icon 链接
//
// 示例值：https://www.example.com
func (builder *DocsBlockBuilder) MobileIconUrl(mobileIconUrl string) *DocsBlockBuilder {
	builder.mobileIconUrl = mobileIconUrl
	builder.mobileIconUrlFlag = true
	return builder
}

// pc 端口 icon 链接
//
// 示例值：https://www.example.com
func (builder *DocsBlockBuilder) PcIconUrl(pcIconUrl string) *DocsBlockBuilder {
	builder.pcIconUrl = pcIconUrl
	builder.pcIconUrlFlag = true
	return builder
}

func (builder *DocsBlockBuilder) Build() *DocsBlock {
	req := &DocsBlock{}
	if builder.blockTypeIdFlag {
		req.BlockTypeId = &builder.blockTypeId

	}
	if builder.i18nFlag {
		req.I18n = builder.i18n
	}
	if builder.mobileIconUrlFlag {
		req.MobileIconUrl = &builder.mobileIconUrl

	}
	if builder.pcIconUrlFlag {
		req.PcIconUrl = &builder.pcIconUrl

	}
	return req
}

type Event struct {
	EventType *string `json:"event_type,omitempty"` // 事件类型，事件唯一标识

	EventName *string `json:"event_name,omitempty"` // 事件名称

	EventDescription *string `json:"event_description,omitempty"` // 事件描述
}

type EventBuilder struct {
	eventType     string // 事件类型，事件唯一标识
	eventTypeFlag bool

	eventName     string // 事件名称
	eventNameFlag bool

	eventDescription     string // 事件描述
	eventDescriptionFlag bool
}

func NewEventBuilder() *EventBuilder {
	builder := &EventBuilder{}
	return builder
}

// 事件类型，事件唯一标识
//
// 示例值：im.chat.updated_v1
func (builder *EventBuilder) EventType(eventType string) *EventBuilder {
	builder.eventType = eventType
	builder.eventTypeFlag = true
	return builder
}

// 事件名称
//
// 示例值：群配置修改事件
func (builder *EventBuilder) EventName(eventName string) *EventBuilder {
	builder.eventName = eventName
	builder.eventNameFlag = true
	return builder
}

// 事件描述
//
// 示例值：群聊名称、头像、描述以及群编辑权限、群分享权限等被修改时推送事件
func (builder *EventBuilder) EventDescription(eventDescription string) *EventBuilder {
	builder.eventDescription = eventDescription
	builder.eventDescriptionFlag = true
	return builder
}

func (builder *EventBuilder) Build() *Event {
	req := &Event{}
	if builder.eventTypeFlag {
		req.EventType = &builder.eventType

	}
	if builder.eventNameFlag {
		req.EventName = &builder.eventName

	}
	if builder.eventDescriptionFlag {
		req.EventDescription = &builder.eventDescription

	}
	return req
}

type EventAndCallbackEncryptStrategy struct {
	EncryptionKey *string `json:"encryption_key,omitempty"` // 加密key, 配置 Encrypt Key 后，开放平台将向请求地址推送加密后的事件

	VerificationToken *string `json:"verification_token,omitempty"` // 开放平台向应用推送的事件中都带有此 Token，应用可以据此 Token 验证推送的事件是否属于该应用。
}

type EventAndCallbackEncryptStrategyBuilder struct {
	encryptionKey     string // 加密key, 配置 Encrypt Key 后，开放平台将向请求地址推送加密后的事件
	encryptionKeyFlag bool

	verificationToken     string // 开放平台向应用推送的事件中都带有此 Token，应用可以据此 Token 验证推送的事件是否属于该应用。
	verificationTokenFlag bool
}

func NewEventAndCallbackEncryptStrategyBuilder() *EventAndCallbackEncryptStrategyBuilder {
	builder := &EventAndCallbackEncryptStrategyBuilder{}
	return builder
}

// 加密key, 配置 Encrypt Key 后，开放平台将向请求地址推送加密后的事件
//
// 示例值：xE4k2SkQgtbC8jZEviGRshiZrdPqdkRI
func (builder *EventAndCallbackEncryptStrategyBuilder) EncryptionKey(encryptionKey string) *EventAndCallbackEncryptStrategyBuilder {
	builder.encryptionKey = encryptionKey
	builder.encryptionKeyFlag = true
	return builder
}

// 开放平台向应用推送的事件中都带有此 Token，应用可以据此 Token 验证推送的事件是否属于该应用。
//
// 示例值：lVEjWtBAu6kVIgSLMV3C4f5W2sAAwvqS
func (builder *EventAndCallbackEncryptStrategyBuilder) VerificationToken(verificationToken string) *EventAndCallbackEncryptStrategyBuilder {
	builder.verificationToken = verificationToken
	builder.verificationTokenFlag = true
	return builder
}

func (builder *EventAndCallbackEncryptStrategyBuilder) Build() *EventAndCallbackEncryptStrategy {
	req := &EventAndCallbackEncryptStrategy{}
	if builder.encryptionKeyFlag {
		req.EncryptionKey = &builder.encryptionKey

	}
	if builder.verificationTokenFlag {
		req.VerificationToken = &builder.verificationToken

	}
	return req
}

type Gadget struct {
	EnablePcMode *int `json:"enable_pc_mode,omitempty"` // pc 支持的小程序模式，bit 位表示

	SchemaUrls []string `json:"schema_urls,omitempty"` // schema url 列表

	PcUseMobilePkg *bool `json:"pc_use_mobile_pkg,omitempty"` // pc 端是否使用小程序版本

	PcVersion *string `json:"pc_version,omitempty"` // pc 的小程序版本号

	MobileVersion *string `json:"mobile_version,omitempty"` // 移动端小程序版本号

	MobileMinLarkVersion *string `json:"mobile_min_lark_version,omitempty"` // 移动端兼容的最低飞书版本

	PcMinLarkVersion *string `json:"pc_min_lark_version,omitempty"` // pc 端兼容的最低飞书版本
}

type GadgetBuilder struct {
	enablePcMode     int // pc 支持的小程序模式，bit 位表示
	enablePcModeFlag bool

	schemaUrls     []string // schema url 列表
	schemaUrlsFlag bool

	pcUseMobilePkg     bool // pc 端是否使用小程序版本
	pcUseMobilePkgFlag bool

	pcVersion     string // pc 的小程序版本号
	pcVersionFlag bool

	mobileVersion     string // 移动端小程序版本号
	mobileVersionFlag bool

	mobileMinLarkVersion     string // 移动端兼容的最低飞书版本
	mobileMinLarkVersionFlag bool

	pcMinLarkVersion     string // pc 端兼容的最低飞书版本
	pcMinLarkVersionFlag bool
}

func NewGadgetBuilder() *GadgetBuilder {
	builder := &GadgetBuilder{}
	return builder
}

// pc 支持的小程序模式，bit 位表示
//
// 示例值：1
func (builder *GadgetBuilder) EnablePcMode(enablePcMode int) *GadgetBuilder {
	builder.enablePcMode = enablePcMode
	builder.enablePcModeFlag = true
	return builder
}

// schema url 列表
//
// 示例值：
func (builder *GadgetBuilder) SchemaUrls(schemaUrls []string) *GadgetBuilder {
	builder.schemaUrls = schemaUrls
	builder.schemaUrlsFlag = true
	return builder
}

// pc 端是否使用小程序版本
//
// 示例值：false
func (builder *GadgetBuilder) PcUseMobilePkg(pcUseMobilePkg bool) *GadgetBuilder {
	builder.pcUseMobilePkg = pcUseMobilePkg
	builder.pcUseMobilePkgFlag = true
	return builder
}

// pc 的小程序版本号
//
// 示例值：1.0.0
func (builder *GadgetBuilder) PcVersion(pcVersion string) *GadgetBuilder {
	builder.pcVersion = pcVersion
	builder.pcVersionFlag = true
	return builder
}

// 移动端小程序版本号
//
// 示例值：1.0.0
func (builder *GadgetBuilder) MobileVersion(mobileVersion string) *GadgetBuilder {
	builder.mobileVersion = mobileVersion
	builder.mobileVersionFlag = true
	return builder
}

// 移动端兼容的最低飞书版本
//
// 示例值：2.0
func (builder *GadgetBuilder) MobileMinLarkVersion(mobileMinLarkVersion string) *GadgetBuilder {
	builder.mobileMinLarkVersion = mobileMinLarkVersion
	builder.mobileMinLarkVersionFlag = true
	return builder
}

// pc 端兼容的最低飞书版本
//
// 示例值：2.0
func (builder *GadgetBuilder) PcMinLarkVersion(pcMinLarkVersion string) *GadgetBuilder {
	builder.pcMinLarkVersion = pcMinLarkVersion
	builder.pcMinLarkVersionFlag = true
	return builder
}

func (builder *GadgetBuilder) Build() *Gadget {
	req := &Gadget{}
	if builder.enablePcModeFlag {
		req.EnablePcMode = &builder.enablePcMode

	}
	if builder.schemaUrlsFlag {
		req.SchemaUrls = builder.schemaUrls
	}
	if builder.pcUseMobilePkgFlag {
		req.PcUseMobilePkg = &builder.pcUseMobilePkg

	}
	if builder.pcVersionFlag {
		req.PcVersion = &builder.pcVersion

	}
	if builder.mobileVersionFlag {
		req.MobileVersion = &builder.mobileVersion

	}
	if builder.mobileMinLarkVersionFlag {
		req.MobileMinLarkVersion = &builder.mobileMinLarkVersion

	}
	if builder.pcMinLarkVersionFlag {
		req.PcMinLarkVersion = &builder.pcMinLarkVersion

	}
	return req
}

type MessageAction struct {
	PcAppLink *string `json:"pc_app_link,omitempty"` // pc 端链接

	MobileAppLink *string `json:"mobile_app_link,omitempty"` // 移动端链接

	I18n []*MessageActionI18nInfo `json:"i18n,omitempty"` // 国际化信息
}

type MessageActionBuilder struct {
	pcAppLink     string // pc 端链接
	pcAppLinkFlag bool

	mobileAppLink     string // 移动端链接
	mobileAppLinkFlag bool

	i18n     []*MessageActionI18nInfo // 国际化信息
	i18nFlag bool
}

func NewMessageActionBuilder() *MessageActionBuilder {
	builder := &MessageActionBuilder{}
	return builder
}

// pc 端链接
//
// 示例值：https://www.example.com
func (builder *MessageActionBuilder) PcAppLink(pcAppLink string) *MessageActionBuilder {
	builder.pcAppLink = pcAppLink
	builder.pcAppLinkFlag = true
	return builder
}

// 移动端链接
//
// 示例值：https://www.example.com
func (builder *MessageActionBuilder) MobileAppLink(mobileAppLink string) *MessageActionBuilder {
	builder.mobileAppLink = mobileAppLink
	builder.mobileAppLinkFlag = true
	return builder
}

// 国际化信息
//
// 示例值：
func (builder *MessageActionBuilder) I18n(i18n []*MessageActionI18nInfo) *MessageActionBuilder {
	builder.i18n = i18n
	builder.i18nFlag = true
	return builder
}

func (builder *MessageActionBuilder) Build() *MessageAction {
	req := &MessageAction{}
	if builder.pcAppLinkFlag {
		req.PcAppLink = &builder.pcAppLink

	}
	if builder.mobileAppLinkFlag {
		req.MobileAppLink = &builder.mobileAppLink

	}
	if builder.i18nFlag {
		req.I18n = builder.i18n
	}
	return req
}

type MessageActionI18nInfo struct {
	I18nKey *string `json:"i18n_key,omitempty"` // 国际化语言的 key

	Name *string `json:"name,omitempty"` // 国际化名称
}

type MessageActionI18nInfoBuilder struct {
	i18nKey     string // 国际化语言的 key
	i18nKeyFlag bool

	name     string // 国际化名称
	nameFlag bool
}

func NewMessageActionI18nInfoBuilder() *MessageActionI18nInfoBuilder {
	builder := &MessageActionI18nInfoBuilder{}
	return builder
}

// 国际化语言的 key
//
// 示例值：zh_cn
func (builder *MessageActionI18nInfoBuilder) I18nKey(i18nKey string) *MessageActionI18nInfoBuilder {
	builder.i18nKey = i18nKey
	builder.i18nKeyFlag = true
	return builder
}

// 国际化名称
//
// 示例值：名称
func (builder *MessageActionI18nInfoBuilder) Name(name string) *MessageActionI18nInfoBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

func (builder *MessageActionI18nInfoBuilder) Build() *MessageActionI18nInfo {
	req := &MessageActionI18nInfo{}
	if builder.i18nKeyFlag {
		req.I18nKey = &builder.i18nKey

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

	}
	return req
}

type MessageOverviewItem struct {
	PageView *string `json:"page_view,omitempty"` // 用户访问量

	UniqueVisitor *string `json:"unique_visitor,omitempty"` // unique 访问量

	ChatType *string `json:"chat_type,omitempty"` // 聊天类型，大小写不敏感，private：私聊；group：群聊

	MessageType *string `json:"message_type,omitempty"` // 消息类型，大小写不敏感，text：文本消息；image：图片消息；interactive：卡片消息；post：富文本消息；share_chat：群名片

	EventType *string `json:"event_type,omitempty"` // 事件类型
}

type MessageOverviewItemBuilder struct {
	pageView     string // 用户访问量
	pageViewFlag bool

	uniqueVisitor     string // unique 访问量
	uniqueVisitorFlag bool

	chatType     string // 聊天类型，大小写不敏感，private：私聊；group：群聊
	chatTypeFlag bool

	messageType     string // 消息类型，大小写不敏感，text：文本消息；image：图片消息；interactive：卡片消息；post：富文本消息；share_chat：群名片
	messageTypeFlag bool

	eventType     string // 事件类型
	eventTypeFlag bool
}

func NewMessageOverviewItemBuilder() *MessageOverviewItemBuilder {
	builder := &MessageOverviewItemBuilder{}
	return builder
}

// 用户访问量
//
// 示例值：
func (builder *MessageOverviewItemBuilder) PageView(pageView string) *MessageOverviewItemBuilder {
	builder.pageView = pageView
	builder.pageViewFlag = true
	return builder
}

// unique 访问量
//
// 示例值：
func (builder *MessageOverviewItemBuilder) UniqueVisitor(uniqueVisitor string) *MessageOverviewItemBuilder {
	builder.uniqueVisitor = uniqueVisitor
	builder.uniqueVisitorFlag = true
	return builder
}

// 聊天类型，大小写不敏感，private：私聊；group：群聊
//
// 示例值：
func (builder *MessageOverviewItemBuilder) ChatType(chatType string) *MessageOverviewItemBuilder {
	builder.chatType = chatType
	builder.chatTypeFlag = true
	return builder
}

// 消息类型，大小写不敏感，text：文本消息；image：图片消息；interactive：卡片消息；post：富文本消息；share_chat：群名片
//
// 示例值：
func (builder *MessageOverviewItemBuilder) MessageType(messageType string) *MessageOverviewItemBuilder {
	builder.messageType = messageType
	builder.messageTypeFlag = true
	return builder
}

// 事件类型
//
// 示例值：
func (builder *MessageOverviewItemBuilder) EventType(eventType string) *MessageOverviewItemBuilder {
	builder.eventType = eventType
	builder.eventTypeFlag = true
	return builder
}

func (builder *MessageOverviewItemBuilder) Build() *MessageOverviewItem {
	req := &MessageOverviewItem{}
	if builder.pageViewFlag {
		req.PageView = &builder.pageView

	}
	if builder.uniqueVisitorFlag {
		req.UniqueVisitor = &builder.uniqueVisitor

	}
	if builder.chatTypeFlag {
		req.ChatType = &builder.chatType

	}
	if builder.messageTypeFlag {
		req.MessageType = &builder.messageType

	}
	if builder.eventTypeFlag {
		req.EventType = &builder.eventType

	}
	return req
}

type Miniprogram struct {
	EnablePcMode *int `json:"enable_pc_mode,omitempty"` // pc 支持的小程序模式，bit 位表示

	SchemaUrls []string `json:"schema_urls,omitempty"` // schema url 列表

	PcUseMobilePkg *bool `json:"pc_use_mobile_pkg,omitempty"` // pc 端是否使用小程序版本

	PcVersionId *string `json:"pc_version_id,omitempty"` // pc 的小程序版本号

	MobileVersionId *string `json:"mobile_version_id,omitempty"` // 移动端小程序版本号

	MobileMinLarkVersion *string `json:"mobile_min_lark_version,omitempty"` // 移动端兼容的最低飞书版本

	PcMinLarkVersion *string `json:"pc_min_lark_version,omitempty"` // pc 端兼容的最低飞书版本
}

type MiniprogramBuilder struct {
	enablePcMode     int // pc 支持的小程序模式，bit 位表示
	enablePcModeFlag bool

	schemaUrls     []string // schema url 列表
	schemaUrlsFlag bool

	pcUseMobilePkg     bool // pc 端是否使用小程序版本
	pcUseMobilePkgFlag bool

	pcVersionId     string // pc 的小程序版本号
	pcVersionIdFlag bool

	mobileVersionId     string // 移动端小程序版本号
	mobileVersionIdFlag bool

	mobileMinLarkVersion     string // 移动端兼容的最低飞书版本
	mobileMinLarkVersionFlag bool

	pcMinLarkVersion     string // pc 端兼容的最低飞书版本
	pcMinLarkVersionFlag bool
}

func NewMiniprogramBuilder() *MiniprogramBuilder {
	builder := &MiniprogramBuilder{}
	return builder
}

// pc 支持的小程序模式，bit 位表示
//
// 示例值：1
func (builder *MiniprogramBuilder) EnablePcMode(enablePcMode int) *MiniprogramBuilder {
	builder.enablePcMode = enablePcMode
	builder.enablePcModeFlag = true
	return builder
}

// schema url 列表
//
// 示例值：
func (builder *MiniprogramBuilder) SchemaUrls(schemaUrls []string) *MiniprogramBuilder {
	builder.schemaUrls = schemaUrls
	builder.schemaUrlsFlag = true
	return builder
}

// pc 端是否使用小程序版本
//
// 示例值：false
func (builder *MiniprogramBuilder) PcUseMobilePkg(pcUseMobilePkg bool) *MiniprogramBuilder {
	builder.pcUseMobilePkg = pcUseMobilePkg
	builder.pcUseMobilePkgFlag = true
	return builder
}

// pc 的小程序版本号
//
// 示例值：1.0.0
func (builder *MiniprogramBuilder) PcVersionId(pcVersionId string) *MiniprogramBuilder {
	builder.pcVersionId = pcVersionId
	builder.pcVersionIdFlag = true
	return builder
}

// 移动端小程序版本号
//
// 示例值：1.0.0
func (builder *MiniprogramBuilder) MobileVersionId(mobileVersionId string) *MiniprogramBuilder {
	builder.mobileVersionId = mobileVersionId
	builder.mobileVersionIdFlag = true
	return builder
}

// 移动端兼容的最低飞书版本
//
// 示例值：2.0
func (builder *MiniprogramBuilder) MobileMinLarkVersion(mobileMinLarkVersion string) *MiniprogramBuilder {
	builder.mobileMinLarkVersion = mobileMinLarkVersion
	builder.mobileMinLarkVersionFlag = true
	return builder
}

// pc 端兼容的最低飞书版本
//
// 示例值：2.0
func (builder *MiniprogramBuilder) PcMinLarkVersion(pcMinLarkVersion string) *MiniprogramBuilder {
	builder.pcMinLarkVersion = pcMinLarkVersion
	builder.pcMinLarkVersionFlag = true
	return builder
}

func (builder *MiniprogramBuilder) Build() *Miniprogram {
	req := &Miniprogram{}
	if builder.enablePcModeFlag {
		req.EnablePcMode = &builder.enablePcMode

	}
	if builder.schemaUrlsFlag {
		req.SchemaUrls = builder.schemaUrls
	}
	if builder.pcUseMobilePkgFlag {
		req.PcUseMobilePkg = &builder.pcUseMobilePkg

	}
	if builder.pcVersionIdFlag {
		req.PcVersionId = &builder.pcVersionId

	}
	if builder.mobileVersionIdFlag {
		req.MobileVersionId = &builder.mobileVersionId

	}
	if builder.mobileMinLarkVersionFlag {
		req.MobileMinLarkVersion = &builder.mobileMinLarkVersion

	}
	if builder.pcMinLarkVersionFlag {
		req.PcMinLarkVersion = &builder.pcMinLarkVersion

	}
	return req
}

type MsgAction struct {
	PcAppLink *string `json:"pc_app_link,omitempty"` // pc 端链接

	MobileAppLink *string `json:"mobile_app_link,omitempty"` // 移动端链接

	I18n []*MsgActionI18nInfo `json:"i18n,omitempty"` // 国际化信息
}

type MsgActionBuilder struct {
	pcAppLink     string // pc 端链接
	pcAppLinkFlag bool

	mobileAppLink     string // 移动端链接
	mobileAppLinkFlag bool

	i18n     []*MsgActionI18nInfo // 国际化信息
	i18nFlag bool
}

func NewMsgActionBuilder() *MsgActionBuilder {
	builder := &MsgActionBuilder{}
	return builder
}

// pc 端链接
//
// 示例值：https://www.example.com
func (builder *MsgActionBuilder) PcAppLink(pcAppLink string) *MsgActionBuilder {
	builder.pcAppLink = pcAppLink
	builder.pcAppLinkFlag = true
	return builder
}

// 移动端链接
//
// 示例值：https://www.example.com
func (builder *MsgActionBuilder) MobileAppLink(mobileAppLink string) *MsgActionBuilder {
	builder.mobileAppLink = mobileAppLink
	builder.mobileAppLinkFlag = true
	return builder
}

// 国际化信息
//
// 示例值：
func (builder *MsgActionBuilder) I18n(i18n []*MsgActionI18nInfo) *MsgActionBuilder {
	builder.i18n = i18n
	builder.i18nFlag = true
	return builder
}

func (builder *MsgActionBuilder) Build() *MsgAction {
	req := &MsgAction{}
	if builder.pcAppLinkFlag {
		req.PcAppLink = &builder.pcAppLink

	}
	if builder.mobileAppLinkFlag {
		req.MobileAppLink = &builder.mobileAppLink

	}
	if builder.i18nFlag {
		req.I18n = builder.i18n
	}
	return req
}

type MsgActionI18nInfo struct {
	I18nKey *string `json:"i18n_key,omitempty"` // 国际化语言的 key

	Name *string `json:"name,omitempty"` // 国际化名称
}

type MsgActionI18nInfoBuilder struct {
	i18nKey     string // 国际化语言的 key
	i18nKeyFlag bool

	name     string // 国际化名称
	nameFlag bool
}

func NewMsgActionI18nInfoBuilder() *MsgActionI18nInfoBuilder {
	builder := &MsgActionI18nInfoBuilder{}
	return builder
}

// 国际化语言的 key
//
// 示例值：zh_cn
func (builder *MsgActionI18nInfoBuilder) I18nKey(i18nKey string) *MsgActionI18nInfoBuilder {
	builder.i18nKey = i18nKey
	builder.i18nKeyFlag = true
	return builder
}

// 国际化名称
//
// 示例值：名称
func (builder *MsgActionI18nInfoBuilder) Name(name string) *MsgActionI18nInfoBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

func (builder *MsgActionI18nInfoBuilder) Build() *MsgActionI18nInfo {
	req := &MsgActionI18nInfo{}
	if builder.i18nKeyFlag {
		req.I18nKey = &builder.i18nKey

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

	}
	return req
}

type Navigate struct {
	Pc *NavigateMeta `json:"pc,omitempty"` // pc 端主导航信息

	Mobile *NavigateMeta `json:"mobile,omitempty"` // 移动端主导航信息
}

type NavigateBuilder struct {
	pc     *NavigateMeta // pc 端主导航信息
	pcFlag bool

	mobile     *NavigateMeta // 移动端主导航信息
	mobileFlag bool
}

func NewNavigateBuilder() *NavigateBuilder {
	builder := &NavigateBuilder{}
	return builder
}

// pc 端主导航信息
//
// 示例值：
func (builder *NavigateBuilder) Pc(pc *NavigateMeta) *NavigateBuilder {
	builder.pc = pc
	builder.pcFlag = true
	return builder
}

// 移动端主导航信息
//
// 示例值：
func (builder *NavigateBuilder) Mobile(mobile *NavigateMeta) *NavigateBuilder {
	builder.mobile = mobile
	builder.mobileFlag = true
	return builder
}

func (builder *NavigateBuilder) Build() *Navigate {
	req := &Navigate{}
	if builder.pcFlag {
		req.Pc = builder.pc
	}
	if builder.mobileFlag {
		req.Mobile = builder.mobile
	}
	return req
}

type NavigateMeta struct {
	Version *string `json:"version,omitempty"` // 主导航小程序版本号

	ImageUrl *string `json:"image_url,omitempty"` // 默认图片 url

	HoverImageUrl *string `json:"hover_image_url,omitempty"` // 选中态图片 url
}

type NavigateMetaBuilder struct {
	version     string // 主导航小程序版本号
	versionFlag bool

	imageUrl     string // 默认图片 url
	imageUrlFlag bool

	hoverImageUrl     string // 选中态图片 url
	hoverImageUrlFlag bool
}

func NewNavigateMetaBuilder() *NavigateMetaBuilder {
	builder := &NavigateMetaBuilder{}
	return builder
}

// 主导航小程序版本号
//
// 示例值：1.0.0
func (builder *NavigateMetaBuilder) Version(version string) *NavigateMetaBuilder {
	builder.version = version
	builder.versionFlag = true
	return builder
}

// 默认图片 url
//
// 示例值：https://www.example.com
func (builder *NavigateMetaBuilder) ImageUrl(imageUrl string) *NavigateMetaBuilder {
	builder.imageUrl = imageUrl
	builder.imageUrlFlag = true
	return builder
}

// 选中态图片 url
//
// 示例值：https://www.example.com
func (builder *NavigateMetaBuilder) HoverImageUrl(hoverImageUrl string) *NavigateMetaBuilder {
	builder.hoverImageUrl = hoverImageUrl
	builder.hoverImageUrlFlag = true
	return builder
}

func (builder *NavigateMetaBuilder) Build() *NavigateMeta {
	req := &NavigateMeta{}
	if builder.versionFlag {
		req.Version = &builder.version

	}
	if builder.imageUrlFlag {
		req.ImageUrl = &builder.imageUrl

	}
	if builder.hoverImageUrlFlag {
		req.HoverImageUrl = &builder.hoverImageUrl

	}
	return req
}

type OpenapiOption struct {
	HttpMethod *string `json:"http_method,omitempty"` // OpenAPI HTTP method

	UrlPattern *string `json:"url_pattern,omitempty"` // OpenAPI HTTP URL

	Accessibility *Accessibility `json:"accessibility,omitempty"` // 可访问性
}

type OpenapiOptionBuilder struct {
	httpMethod     string // OpenAPI HTTP method
	httpMethodFlag bool

	urlPattern     string // OpenAPI HTTP URL
	urlPatternFlag bool

	accessibility     *Accessibility // 可访问性
	accessibilityFlag bool
}

func NewOpenapiOptionBuilder() *OpenapiOptionBuilder {
	builder := &OpenapiOptionBuilder{}
	return builder
}

// OpenAPI HTTP method
//
// 示例值：GET
func (builder *OpenapiOptionBuilder) HttpMethod(httpMethod string) *OpenapiOptionBuilder {
	builder.httpMethod = httpMethod
	builder.httpMethodFlag = true
	return builder
}

// OpenAPI HTTP URL
//
// 示例值：/open-apis/contact/v3/users/:user_id
func (builder *OpenapiOptionBuilder) UrlPattern(urlPattern string) *OpenapiOptionBuilder {
	builder.urlPattern = urlPattern
	builder.urlPatternFlag = true
	return builder
}

// 可访问性
//
// 示例值：
func (builder *OpenapiOptionBuilder) Accessibility(accessibility *Accessibility) *OpenapiOptionBuilder {
	builder.accessibility = accessibility
	builder.accessibilityFlag = true
	return builder
}

func (builder *OpenapiOptionBuilder) Build() *OpenapiOption {
	req := &OpenapiOption{}
	if builder.httpMethodFlag {
		req.HttpMethod = &builder.httpMethod

	}
	if builder.urlPatternFlag {
		req.UrlPattern = &builder.urlPattern

	}
	if builder.accessibilityFlag {
		req.Accessibility = builder.accessibility
	}
	return req
}

type Operator struct {
	OperatorName *string `json:"operator_name,omitempty"` // 用户名称

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

type OperatorBuilder struct {
	operatorName     string // 用户名称
	operatorNameFlag bool

	operatorId     *UserId // 用户 ID
	operatorIdFlag bool
}

func NewOperatorBuilder() *OperatorBuilder {
	builder := &OperatorBuilder{}
	return builder
}

// 用户名称
//
// 示例值：张三
func (builder *OperatorBuilder) OperatorName(operatorName string) *OperatorBuilder {
	builder.operatorName = operatorName
	builder.operatorNameFlag = true
	return builder
}

// 用户 ID
//
// 示例值：ou_ff0b7ba35fb********67dfc8b885136
func (builder *OperatorBuilder) OperatorId(operatorId *UserId) *OperatorBuilder {
	builder.operatorId = operatorId
	builder.operatorIdFlag = true
	return builder
}

func (builder *OperatorBuilder) Build() *Operator {
	req := &Operator{}
	if builder.operatorNameFlag {
		req.OperatorName = &builder.operatorName

	}
	if builder.operatorIdFlag {
		req.OperatorId = builder.operatorId
	}
	return req
}

type PlusMenu struct {
	PcAppLink *string `json:"pc_app_link,omitempty"` // pc 端链接

	MobileAppLink *string `json:"mobile_app_link,omitempty"` // 移动端链接
}

type PlusMenuBuilder struct {
	pcAppLink     string // pc 端链接
	pcAppLinkFlag bool

	mobileAppLink     string // 移动端链接
	mobileAppLinkFlag bool
}

func NewPlusMenuBuilder() *PlusMenuBuilder {
	builder := &PlusMenuBuilder{}
	return builder
}

// pc 端链接
//
// 示例值：https://www.example.com
func (builder *PlusMenuBuilder) PcAppLink(pcAppLink string) *PlusMenuBuilder {
	builder.pcAppLink = pcAppLink
	builder.pcAppLinkFlag = true
	return builder
}

// 移动端链接
//
// 示例值：https://www.example.com
func (builder *PlusMenuBuilder) MobileAppLink(mobileAppLink string) *PlusMenuBuilder {
	builder.mobileAppLink = mobileAppLink
	builder.mobileAppLinkFlag = true
	return builder
}

func (builder *PlusMenuBuilder) Build() *PlusMenu {
	req := &PlusMenu{}
	if builder.pcAppLinkFlag {
		req.PcAppLink = &builder.pcAppLink

	}
	if builder.mobileAppLinkFlag {
		req.MobileAppLink = &builder.mobileAppLink

	}
	return req
}

type Scope struct {
	ScopeName *string `json:"scope_name,omitempty"` // 权限名称，形如 user.phone:readonly

	GrantStatus *int `json:"grant_status,omitempty"` // 租户应用权限授予状态

	ScopeType *string `json:"scope_type,omitempty"` // 权限的身份类型，形如 user(用户身份)、tenant(应用身份)
}

type ScopeBuilder struct {
	scopeName     string // 权限名称，形如 user.phone:readonly
	scopeNameFlag bool

	grantStatus     int // 租户应用权限授予状态
	grantStatusFlag bool

	scopeType     string // 权限的身份类型，形如 user(用户身份)、tenant(应用身份)
	scopeTypeFlag bool
}

func NewScopeBuilder() *ScopeBuilder {
	builder := &ScopeBuilder{}
	return builder
}

// 权限名称，形如 user.phone:readonly
//
// 示例值：user.phone:readonly
func (builder *ScopeBuilder) ScopeName(scopeName string) *ScopeBuilder {
	builder.scopeName = scopeName
	builder.scopeNameFlag = true
	return builder
}

// 租户应用权限授予状态
//
// 示例值：
func (builder *ScopeBuilder) GrantStatus(grantStatus int) *ScopeBuilder {
	builder.grantStatus = grantStatus
	builder.grantStatusFlag = true
	return builder
}

// 权限的身份类型，形如 user(用户身份)、tenant(应用身份)
//
// 示例值：
func (builder *ScopeBuilder) ScopeType(scopeType string) *ScopeBuilder {
	builder.scopeType = scopeType
	builder.scopeTypeFlag = true
	return builder
}

func (builder *ScopeBuilder) Build() *Scope {
	req := &Scope{}
	if builder.scopeNameFlag {
		req.ScopeName = &builder.scopeName

	}
	if builder.grantStatusFlag {
		req.GrantStatus = &builder.grantStatus

	}
	if builder.scopeTypeFlag {
		req.ScopeType = &builder.scopeType

	}
	return req
}

type Security struct {
	AllowedIps []string `json:"allowed_ips,omitempty"` // ip白名单

	H5TrustedDomains []string `json:"h5_trusted_domains,omitempty"` // H5可信域名
}

type SecurityBuilder struct {
	allowedIps     []string // ip白名单
	allowedIpsFlag bool

	h5TrustedDomains     []string // H5可信域名
	h5TrustedDomainsFlag bool
}

func NewSecurityBuilder() *SecurityBuilder {
	builder := &SecurityBuilder{}
	return builder
}

// ip白名单
//
// 示例值：
func (builder *SecurityBuilder) AllowedIps(allowedIps []string) *SecurityBuilder {
	builder.allowedIps = allowedIps
	builder.allowedIpsFlag = true
	return builder
}

// H5可信域名
//
// 示例值：
func (builder *SecurityBuilder) H5TrustedDomains(h5TrustedDomains []string) *SecurityBuilder {
	builder.h5TrustedDomains = h5TrustedDomains
	builder.h5TrustedDomainsFlag = true
	return builder
}

func (builder *SecurityBuilder) Build() *Security {
	req := &Security{}
	if builder.allowedIpsFlag {
		req.AllowedIps = builder.allowedIps
	}
	if builder.h5TrustedDomainsFlag {
		req.H5TrustedDomains = builder.h5TrustedDomains
	}
	return req
}

type SubscribedEvent struct {
	SubscriptionType *string `json:"subscription_type,omitempty"` // 订阅类型

	RequestUrl *string `json:"request_url,omitempty"` // 回调地址

	SubscribedEvents []string `json:"subscribed_events,omitempty"` // 订阅事件列表
}

type SubscribedEventBuilder struct {
	subscriptionType     string // 订阅类型
	subscriptionTypeFlag bool

	requestUrl     string // 回调地址
	requestUrlFlag bool

	subscribedEvents     []string // 订阅事件列表
	subscribedEventsFlag bool
}

func NewSubscribedEventBuilder() *SubscribedEventBuilder {
	builder := &SubscribedEventBuilder{}
	return builder
}

// 订阅类型
//
// 示例值：webhook
func (builder *SubscribedEventBuilder) SubscriptionType(subscriptionType string) *SubscribedEventBuilder {
	builder.subscriptionType = subscriptionType
	builder.subscriptionTypeFlag = true
	return builder
}

// 回调地址
//
// 示例值：https://open.feishu.cn/
func (builder *SubscribedEventBuilder) RequestUrl(requestUrl string) *SubscribedEventBuilder {
	builder.requestUrl = requestUrl
	builder.requestUrlFlag = true
	return builder
}

// 订阅事件列表
//
// 示例值：
func (builder *SubscribedEventBuilder) SubscribedEvents(subscribedEvents []string) *SubscribedEventBuilder {
	builder.subscribedEvents = subscribedEvents
	builder.subscribedEventsFlag = true
	return builder
}

func (builder *SubscribedEventBuilder) Build() *SubscribedEvent {
	req := &SubscribedEvent{}
	if builder.subscriptionTypeFlag {
		req.SubscriptionType = &builder.subscriptionType

	}
	if builder.requestUrlFlag {
		req.RequestUrl = &builder.requestUrl

	}
	if builder.subscribedEventsFlag {
		req.SubscribedEvents = builder.subscribedEvents
	}
	return req
}

type UsageOverviewItem struct {
	PageView *string `json:"page_view,omitempty"` // 应用使用pv

	UniqueVisitor *string `json:"unique_visitor,omitempty"` // 应用使用uv

	DepartmentId *string `json:"department_id,omitempty"` // 部门号
}

type UsageOverviewItemBuilder struct {
	pageView     string // 应用使用pv
	pageViewFlag bool

	uniqueVisitor     string // 应用使用uv
	uniqueVisitorFlag bool

	departmentId     string // 部门号
	departmentIdFlag bool
}

func NewUsageOverviewItemBuilder() *UsageOverviewItemBuilder {
	builder := &UsageOverviewItemBuilder{}
	return builder
}

// 应用使用pv
//
// 示例值：
func (builder *UsageOverviewItemBuilder) PageView(pageView string) *UsageOverviewItemBuilder {
	builder.pageView = pageView
	builder.pageViewFlag = true
	return builder
}

// 应用使用uv
//
// 示例值：
func (builder *UsageOverviewItemBuilder) UniqueVisitor(uniqueVisitor string) *UsageOverviewItemBuilder {
	builder.uniqueVisitor = uniqueVisitor
	builder.uniqueVisitorFlag = true
	return builder
}

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

func (builder *UsageOverviewItemBuilder) Build() *UsageOverviewItem {
	req := &UsageOverviewItem{}
	if builder.pageViewFlag {
		req.PageView = &builder.pageView

	}
	if builder.uniqueVisitorFlag {
		req.UniqueVisitor = &builder.uniqueVisitor

	}
	if builder.departmentIdFlag {
		req.DepartmentId = &builder.departmentId

	}
	return req
}

type UsageTrendItem struct {
	Timestamp *string `json:"timestamp,omitempty"` // 时间戳

	PageView *string `json:"page_view,omitempty"` // 应用使用pv

	UniqueVisitor *string `json:"unique_visitor,omitempty"` // 应用使用uv
}

type UsageTrendItemBuilder struct {
	timestamp     string // 时间戳
	timestampFlag bool

	pageView     string // 应用使用pv
	pageViewFlag bool

	uniqueVisitor     string // 应用使用uv
	uniqueVisitorFlag bool
}

func NewUsageTrendItemBuilder() *UsageTrendItemBuilder {
	builder := &UsageTrendItemBuilder{}
	return builder
}

// 时间戳
//
// 示例值：
func (builder *UsageTrendItemBuilder) Timestamp(timestamp string) *UsageTrendItemBuilder {
	builder.timestamp = timestamp
	builder.timestampFlag = true
	return builder
}

// 应用使用pv
//
// 示例值：
func (builder *UsageTrendItemBuilder) PageView(pageView string) *UsageTrendItemBuilder {
	builder.pageView = pageView
	builder.pageViewFlag = true
	return builder
}

// 应用使用uv
//
// 示例值：
func (builder *UsageTrendItemBuilder) UniqueVisitor(uniqueVisitor string) *UsageTrendItemBuilder {
	builder.uniqueVisitor = uniqueVisitor
	builder.uniqueVisitorFlag = true
	return builder
}

func (builder *UsageTrendItemBuilder) Build() *UsageTrendItem {
	req := &UsageTrendItem{}
	if builder.timestampFlag {
		req.Timestamp = &builder.timestamp

	}
	if builder.pageViewFlag {
		req.PageView = &builder.pageView

	}
	if builder.uniqueVisitorFlag {
		req.UniqueVisitor = &builder.uniqueVisitor

	}
	return req
}

type UsageUser struct {
	UserId *string `json:"user_id,omitempty"` // 用户id
}

type UsageUserBuilder struct {
	userId     string // 用户id
	userIdFlag bool
}

func NewUsageUserBuilder() *UsageUserBuilder {
	builder := &UsageUserBuilder{}
	return builder
}

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

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

	}
	return req
}

type User struct {
	UserId *UserId `json:"user_id,omitempty"` // user_id
}

type UserBuilder struct {
	userId     *UserId // user_id
	userIdFlag bool
}

func NewUserBuilder() *UserBuilder {
	builder := &UserBuilder{}
	return builder
}

// user_id
//
// 示例值：
func (builder *UserBuilder) UserId(userId *UserId) *UserBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

func (builder *UserBuilder) Build() *User {
	req := &User{}
	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 WebApp struct {
	PcUrl *string `json:"pc_url,omitempty"` // pc 端 url

	MobileUrl *string `json:"mobile_url,omitempty"` // 移动端 url
}

type WebAppBuilder struct {
	pcUrl     string // pc 端 url
	pcUrlFlag bool

	mobileUrl     string // 移动端 url
	mobileUrlFlag bool
}

func NewWebAppBuilder() *WebAppBuilder {
	builder := &WebAppBuilder{}
	return builder
}

// pc 端 url
//
// 示例值：https://www.example.com
func (builder *WebAppBuilder) PcUrl(pcUrl string) *WebAppBuilder {
	builder.pcUrl = pcUrl
	builder.pcUrlFlag = true
	return builder
}

// 移动端 url
//
// 示例值：https://www.example.com
func (builder *WebAppBuilder) MobileUrl(mobileUrl string) *WebAppBuilder {
	builder.mobileUrl = mobileUrl
	builder.mobileUrlFlag = true
	return builder
}

func (builder *WebAppBuilder) Build() *WebApp {
	req := &WebApp{}
	if builder.pcUrlFlag {
		req.PcUrl = &builder.pcUrl

	}
	if builder.mobileUrlFlag {
		req.MobileUrl = &builder.mobileUrl

	}
	return req
}

type Widget struct {
}

type WidgetBuilder struct {
}

func NewWidgetBuilder() *WidgetBuilder {
	builder := &WidgetBuilder{}
	return builder
}

func (builder *WidgetBuilder) Build() *Widget {
	req := &Widget{}
	return req
}

type WorkplaceWidget struct {
	MinLarkVersion *string `json:"min_lark_version,omitempty"` // 最低兼容飞书版本号
}

type WorkplaceWidgetBuilder struct {
	minLarkVersion     string // 最低兼容飞书版本号
	minLarkVersionFlag bool
}

func NewWorkplaceWidgetBuilder() *WorkplaceWidgetBuilder {
	builder := &WorkplaceWidgetBuilder{}
	return builder
}

// 最低兼容飞书版本号
//
// 示例值：1.0.0
func (builder *WorkplaceWidgetBuilder) MinLarkVersion(minLarkVersion string) *WorkplaceWidgetBuilder {
	builder.minLarkVersion = minLarkVersion
	builder.minLarkVersionFlag = true
	return builder
}

func (builder *WorkplaceWidgetBuilder) Build() *WorkplaceWidget {
	req := &WorkplaceWidget{}
	if builder.minLarkVersionFlag {
		req.MinLarkVersion = &builder.minLarkVersion

	}
	return req
}

type SetAppBadgeReqBuilder struct {
	apiReq   *larkcore.ApiReq
	appBadge *AppBadge
}

func NewSetAppBadgeReqBuilder() *SetAppBadgeReqBuilder {
	builder := &SetAppBadgeReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *SetAppBadgeReqBuilder) UserIdType(userIdType string) *SetAppBadgeReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

// 更新应用红点信息，用于工作台场景
func (builder *SetAppBadgeReqBuilder) AppBadge(appBadge *AppBadge) *SetAppBadgeReqBuilder {
	builder.appBadge = appBadge
	return builder
}

func (builder *SetAppBadgeReqBuilder) Build() *SetAppBadgeReq {
	req := &SetAppBadgeReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.appBadge
	return req
}

type SetAppBadgeReq struct {
	apiReq   *larkcore.ApiReq
	AppBadge *AppBadge `body:""`
}

type SetAppBadgeResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *SetAppBadgeResp) Success() bool {
	return resp.Code == 0
}

type ListAppRecommendRuleReqBuilder struct {
	apiReq *larkcore.ApiReq
	limit  int // 最大返回多少记录，当使用迭代器访问时才有效
}

func NewListAppRecommendRuleReqBuilder() *ListAppRecommendRuleReqBuilder {
	builder := &ListAppRecommendRuleReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 最大返回多少记录，当使用迭代器访问时才有效
func (builder *ListAppRecommendRuleReqBuilder) Limit(limit int) *ListAppRecommendRuleReqBuilder {
	builder.limit = limit
	return builder
}

// 分页大小
//
// 示例值：10
func (builder *ListAppRecommendRuleReqBuilder) PageSize(pageSize int) *ListAppRecommendRuleReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 分页标记，第一次请求不填，表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该 page_token 获取查询结果
//
// 示例值：new-e11ee058b4a8ed2881da11ac7e37c4fc
func (builder *ListAppRecommendRuleReqBuilder) PageToken(pageToken string) *ListAppRecommendRuleReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *ListAppRecommendRuleReqBuilder) UserIdType(userIdType string) *ListAppRecommendRuleReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

func (builder *ListAppRecommendRuleReqBuilder) Build() *ListAppRecommendRuleReq {
	req := &ListAppRecommendRuleReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.Limit = builder.limit
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type ListAppRecommendRuleReq struct {
	apiReq *larkcore.ApiReq
	Limit  int // 最多返回多少记录，只有在使用迭代器访问时，才有效

}

type ListAppRecommendRuleRespData struct {
	Rules []*AppRecommendRule `json:"rules,omitempty"` // 推荐规则列表

	PageToken *string `json:"page_token,omitempty"` // 分页标记，当 has_more 为 true 时，会同时返回新的 page_token，否则不返回 page_token

	HasMore *bool `json:"has_more,omitempty"` // 是否还有更多项
}

type ListAppRecommendRuleResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ListAppRecommendRuleRespData `json:"data"` // 业务数据
}

func (resp *ListAppRecommendRuleResp) Success() bool {
	return resp.Code == 0
}

type ContactsRangeConfigurationApplicationReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewContactsRangeConfigurationApplicationReqBuilder() *ContactsRangeConfigurationApplicationReqBuilder {
	builder := &ContactsRangeConfigurationApplicationReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 应用的 id
//
// 示例值：cli_9b445f5258795107
func (builder *ContactsRangeConfigurationApplicationReqBuilder) AppId(appId string) *ContactsRangeConfigurationApplicationReqBuilder {
	builder.apiReq.PathParams.Set("app_id", fmt.Sprint(appId))
	return builder
}

// 分页大小
//
// 示例值：20
func (builder *ContactsRangeConfigurationApplicationReqBuilder) PageSize(pageSize int) *ContactsRangeConfigurationApplicationReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 分页标记，第一次请求不填，表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该 page_token 获取查询结果
//
// 示例值：new-e3c5a0627cdf0c2e057da7257b90376a
func (builder *ContactsRangeConfigurationApplicationReqBuilder) PageToken(pageToken string) *ContactsRangeConfigurationApplicationReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

// 返回值的部门ID的类型
//
// 示例值：department_id
func (builder *ContactsRangeConfigurationApplicationReqBuilder) DepartmentIdType(departmentIdType string) *ContactsRangeConfigurationApplicationReqBuilder {
	builder.apiReq.QueryParams.Set("department_id_type", fmt.Sprint(departmentIdType))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *ContactsRangeConfigurationApplicationReqBuilder) UserIdType(userIdType string) *ContactsRangeConfigurationApplicationReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

func (builder *ContactsRangeConfigurationApplicationReqBuilder) Build() *ContactsRangeConfigurationApplicationReq {
	req := &ContactsRangeConfigurationApplicationReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type ContactsRangeConfigurationApplicationReq struct {
	apiReq *larkcore.ApiReq
}

type ContactsRangeConfigurationApplicationRespData struct {
	ContactsRange *ApplicationAppContactsRange `json:"contacts_range,omitempty"` //

	HasMore *bool `json:"has_more,omitempty"` // 是否还有更多项

	PageToken *string `json:"page_token,omitempty"` // 分页标记，当 has_more 为 true 时，会同时返回新的 page_token，否则不返回 page_token
}

type ContactsRangeConfigurationApplicationResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ContactsRangeConfigurationApplicationRespData `json:"data"` // 业务数据
}

func (resp *ContactsRangeConfigurationApplicationResp) Success() bool {
	return resp.Code == 0
}

type GetApplicationReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewGetApplicationReqBuilder() *GetApplicationReqBuilder {
	builder := &GetApplicationReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 应用的 app_id，需要查询其他应用信息时，必须申请[获取应用信息](https://open.feishu.cn/document/ukTMukTMukTM/uQjN3QjL0YzN04CN2cDN)权限，仅查询本应用信息时，可填入 "me" 或者应用自身 app_id
//
// 示例值：cli_9b445f5258795107
func (builder *GetApplicationReqBuilder) AppId(appId string) *GetApplicationReqBuilder {
	builder.apiReq.PathParams.Set("app_id", fmt.Sprint(appId))
	return builder
}

// 指定获取应用在该语言下的信息
//
// 示例值：zh_cn
func (builder *GetApplicationReqBuilder) Lang(lang string) *GetApplicationReqBuilder {
	builder.apiReq.QueryParams.Set("lang", fmt.Sprint(lang))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *GetApplicationReqBuilder) UserIdType(userIdType string) *GetApplicationReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

func (builder *GetApplicationReqBuilder) Build() *GetApplicationReq {
	req := &GetApplicationReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type GetApplicationReq struct {
	apiReq *larkcore.ApiReq
}

type GetApplicationRespData struct {
	App *Application `json:"app,omitempty"` // 应用数据
}

type GetApplicationResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *GetApplicationRespData `json:"data"` // 业务数据
}

func (resp *GetApplicationResp) Success() bool {
	return resp.Code == 0
}

type ListApplicationReqBuilder struct {
	apiReq *larkcore.ApiReq
	limit  int // 最大返回多少记录，当使用迭代器访问时才有效
}

func NewListApplicationReqBuilder() *ListApplicationReqBuilder {
	builder := &ListApplicationReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 最大返回多少记录，当使用迭代器访问时才有效
func (builder *ListApplicationReqBuilder) Limit(limit int) *ListApplicationReqBuilder {
	builder.limit = limit
	return builder
}

// 分页大小
//
// 示例值：50
func (builder *ListApplicationReqBuilder) PageSize(pageSize int) *ListApplicationReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 分页标记，第一次请求不填，表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该 page_token 获取查询结果
//
// 示例值：AQD9/Rn9eij9Pm39ED40/dk53s4Ebp882DYfFaPFbz00L4CMZJrqGdzNyc8BcZtDbwVUvRmQTvyMYicnGWrde9X56TgdBuS+JKiSIkdexPw=
func (builder *ListApplicationReqBuilder) PageToken(pageToken string) *ListApplicationReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

// 用户 ID 类型
//
// 示例值：
func (builder *ListApplicationReqBuilder) UserIdType(userIdType string) *ListApplicationReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

// 应用的图标、描述、帮助文档链接是按照应用的主语言返回；其他内容（如应用权限、应用分类）按照该参数设定返回对应的语言。可选值有： zh_cn：中文 en_us：英文 ja_jp：日文  如不填写，则按照应用的主语言返回
//
// 示例值：zh_cn
func (builder *ListApplicationReqBuilder) Lang(lang string) *ListApplicationReqBuilder {
	builder.apiReq.QueryParams.Set("lang", fmt.Sprint(lang))
	return builder
}

// 不传入代表全部返回。传入则按照这种应用状态返回。应用状态可选值有：0：停用状态1：启用状态 2：未启用状态
//
// 示例值：0
func (builder *ListApplicationReqBuilder) Status(status int) *ListApplicationReqBuilder {
	builder.apiReq.QueryParams.Set("status", fmt.Sprint(status))
	return builder
}

// 不传入代表全部返回。传入则按照这种应用状态返回。 付费类型 可选值： 0：免费 1：付费
//
// 示例值：0
func (builder *ListApplicationReqBuilder) PaymentType(paymentType int) *ListApplicationReqBuilder {
	builder.apiReq.QueryParams.Set("payment_type", fmt.Sprint(paymentType))
	return builder
}

// 不传入代表全部返回。传入则按照这种应用状态返回。所有者类型，可选值： 0：飞书科技 1：飞书合作伙伴 2：企业内成员
//
// 示例值：0
func (builder *ListApplicationReqBuilder) OwnerType(ownerType int) *ListApplicationReqBuilder {
	builder.apiReq.QueryParams.Set("owner_type", fmt.Sprint(ownerType))
	return builder
}

func (builder *ListApplicationReqBuilder) Build() *ListApplicationReq {
	req := &ListApplicationReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.Limit = builder.limit
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type ListApplicationReq struct {
	apiReq *larkcore.ApiReq
	Limit  int // 最多返回多少记录，只有在使用迭代器访问时，才有效

}

type ListApplicationRespData struct {
	AppList []*Application `json:"app_list,omitempty"` // 应用列表

	PageToken *string `json:"page_token,omitempty"` // 分页标记，当 has_more 为 true 时，会同时返回新的 page_token，否则不返回 page_token

	HasMore *bool `json:"has_more,omitempty"` // 是否还有更多项

	TotalCount *int `json:"total_count,omitempty"` // 应用状态=启用的应用总数
}

type ListApplicationResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ListApplicationRespData `json:"data"` // 业务数据
}

func (resp *ListApplicationResp) Success() bool {
	return resp.Code == 0
}

type PatchApplicationReqBuilder struct {
	apiReq      *larkcore.ApiReq
	application *Application
}

func NewPatchApplicationReqBuilder() *PatchApplicationReqBuilder {
	builder := &PatchApplicationReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 应用的 id
//
// 示例值：cli_9b445f5258795107
func (builder *PatchApplicationReqBuilder) AppId(appId string) *PatchApplicationReqBuilder {
	builder.apiReq.PathParams.Set("app_id", fmt.Sprint(appId))
	return builder
}

// 指定返回的语言
//
// 示例值：zh_cn
func (builder *PatchApplicationReqBuilder) Lang(lang string) *PatchApplicationReqBuilder {
	builder.apiReq.QueryParams.Set("lang", fmt.Sprint(lang))
	return builder
}

// 更新应用的分组信息（分组会影响应用在工作台中的分类情况，请谨慎更新）
func (builder *PatchApplicationReqBuilder) Application(application *Application) *PatchApplicationReqBuilder {
	builder.application = application
	return builder
}

func (builder *PatchApplicationReqBuilder) Build() *PatchApplicationReq {
	req := &PatchApplicationReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.application
	return req
}

type PatchApplicationReq struct {
	apiReq      *larkcore.ApiReq
	Application *Application `body:""`
}

type PatchApplicationResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *PatchApplicationResp) Success() bool {
	return resp.Code == 0
}

type UnderauditlistApplicationReqBuilder struct {
	apiReq *larkcore.ApiReq
	limit  int // 最大返回多少记录，当使用迭代器访问时才有效
}

func NewUnderauditlistApplicationReqBuilder() *UnderauditlistApplicationReqBuilder {
	builder := &UnderauditlistApplicationReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 最大返回多少记录，当使用迭代器访问时才有效
func (builder *UnderauditlistApplicationReqBuilder) Limit(limit int) *UnderauditlistApplicationReqBuilder {
	builder.limit = limit
	return builder
}

// 指定返回的语言
//
// 示例值：zh_cn
func (builder *UnderauditlistApplicationReqBuilder) Lang(lang string) *UnderauditlistApplicationReqBuilder {
	builder.apiReq.QueryParams.Set("lang", fmt.Sprint(lang))
	return builder
}

// 分页标记，第一次请求不填，表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该page_token 获取查询结果
//
// 示例值：new-e3c5a0627cdf0c2e057da7257b90376a
func (builder *UnderauditlistApplicationReqBuilder) PageToken(pageToken string) *UnderauditlistApplicationReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

// 分页大小
//
// 示例值：10
func (builder *UnderauditlistApplicationReqBuilder) PageSize(pageSize int) *UnderauditlistApplicationReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *UnderauditlistApplicationReqBuilder) UserIdType(userIdType string) *UnderauditlistApplicationReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

func (builder *UnderauditlistApplicationReqBuilder) Build() *UnderauditlistApplicationReq {
	req := &UnderauditlistApplicationReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.Limit = builder.limit
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type UnderauditlistApplicationReq struct {
	apiReq *larkcore.ApiReq
	Limit  int // 最多返回多少记录，只有在使用迭代器访问时，才有效

}

type UnderauditlistApplicationRespData struct {
	Items []*Application `json:"items,omitempty"` // 待审核应用列表

	HasMore *bool `json:"has_more,omitempty"` // 是否有下一页数据

	PageToken *string `json:"page_token,omitempty"` // 下一页分页的token
}

type UnderauditlistApplicationResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *UnderauditlistApplicationRespData `json:"data"` // 业务数据
}

func (resp *UnderauditlistApplicationResp) Success() bool {
	return resp.Code == 0
}

type DepartmentOverviewApplicationAppUsageReqBodyBuilder struct {
	date     string // 查询日期，格式为yyyy-mm-dd，若cycle_type为1，date可以为任何自然日；若cycle_type为2，则输入的date必须为周一； 若cycle_type为3，则输入的date必须为每月1号
	dateFlag bool

	cycleType     int // 活跃周期的统计类型
	cycleTypeFlag bool

	departmentId     string // 查询的部门id，获取方法可参考[部门ID概述](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/field-overview);-  若部门id为空，则返回当前租户的使用数据；若填写部门id，则返回当前部门的使用数据（包含子部门的用户） 以及多级子部门的使用数据。;-  若路径参数中department_id_type为空或者为open_department_id，则此处应该填写部门的 open_department_id；若路径参数中department_id_type为department_id，则此处应该填写部门的 department_id。;- 若不填写则返回整个租户的数据
	departmentIdFlag bool

	recursion     int // 是否需要查询部门下多层子部门的数据。未设置或为0时，仅查询department_id对应的部门。设置为n时，查询department_id及其n级子部门的数据。仅在department_id参数传递时有效，最大值为4。
	recursionFlag bool

	pageSize     int // 分页大小，取值范围 1~20
	pageSizeFlag bool

	pageToken     string // 分页标记，第一次请求不填，表示从头开始遍历；当返回的has_more为true时，会返回新的page_token，再次调用接口，传入这个page_token，将获得下一页数据。
	pageTokenFlag bool
}

func NewDepartmentOverviewApplicationAppUsageReqBodyBuilder() *DepartmentOverviewApplicationAppUsageReqBodyBuilder {
	builder := &DepartmentOverviewApplicationAppUsageReqBodyBuilder{}
	return builder
}

// 查询日期，格式为yyyy-mm-dd，若cycle_type为1，date可以为任何自然日；若cycle_type为2，则输入的date必须为周一； 若cycle_type为3，则输入的date必须为每月1号
//
//示例值：2021-07-08
func (builder *DepartmentOverviewApplicationAppUsageReqBodyBuilder) Date(date string) *DepartmentOverviewApplicationAppUsageReqBodyBuilder {
	builder.date = date
	builder.dateFlag = true
	return builder
}

// 活跃周期的统计类型
//
//示例值：1
func (builder *DepartmentOverviewApplicationAppUsageReqBodyBuilder) CycleType(cycleType int) *DepartmentOverviewApplicationAppUsageReqBodyBuilder {
	builder.cycleType = cycleType
	builder.cycleTypeFlag = true
	return builder
}

// 查询的部门id，获取方法可参考[部门ID概述](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/field-overview);-  若部门id为空，则返回当前租户的使用数据；若填写部门id，则返回当前部门的使用数据（包含子部门的用户） 以及多级子部门的使用数据。;-  若路径参数中department_id_type为空或者为open_department_id，则此处应该填写部门的 open_department_id；若路径参数中department_id_type为department_id，则此处应该填写部门的 department_id。;- 若不填写则返回整个租户的数据
//
//示例值：od-4e6ac4d14bcd5071a37a39de902c7141
func (builder *DepartmentOverviewApplicationAppUsageReqBodyBuilder) DepartmentId(departmentId string) *DepartmentOverviewApplicationAppUsageReqBodyBuilder {
	builder.departmentId = departmentId
	builder.departmentIdFlag = true
	return builder
}

// 是否需要查询部门下多层子部门的数据。未设置或为0时，仅查询department_id对应的部门。设置为n时，查询department_id及其n级子部门的数据。仅在department_id参数传递时有效，最大值为4。
//
//示例值：0
func (builder *DepartmentOverviewApplicationAppUsageReqBodyBuilder) Recursion(recursion int) *DepartmentOverviewApplicationAppUsageReqBodyBuilder {
	builder.recursion = recursion
	builder.recursionFlag = true
	return builder
}

// 分页大小，取值范围 1~20
//
//示例值：10
func (builder *DepartmentOverviewApplicationAppUsageReqBodyBuilder) PageSize(pageSize int) *DepartmentOverviewApplicationAppUsageReqBodyBuilder {
	builder.pageSize = pageSize
	builder.pageSizeFlag = true
	return builder
}

// 分页标记，第一次请求不填，表示从头开始遍历；当返回的has_more为true时，会返回新的page_token，再次调用接口，传入这个page_token，将获得下一页数据。
//
//示例值：new-1a8f509162ca3c95405838d05ccded09
func (builder *DepartmentOverviewApplicationAppUsageReqBodyBuilder) PageToken(pageToken string) *DepartmentOverviewApplicationAppUsageReqBodyBuilder {
	builder.pageToken = pageToken
	builder.pageTokenFlag = true
	return builder
}

func (builder *DepartmentOverviewApplicationAppUsageReqBodyBuilder) Build() *DepartmentOverviewApplicationAppUsageReqBody {
	req := &DepartmentOverviewApplicationAppUsageReqBody{}
	if builder.dateFlag {
		req.Date = &builder.date
	}
	if builder.cycleTypeFlag {
		req.CycleType = &builder.cycleType
	}
	if builder.departmentIdFlag {
		req.DepartmentId = &builder.departmentId
	}
	if builder.recursionFlag {
		req.Recursion = &builder.recursion
	}
	if builder.pageSizeFlag {
		req.PageSize = &builder.pageSize
	}
	if builder.pageTokenFlag {
		req.PageToken = &builder.pageToken
	}
	return req
}

type DepartmentOverviewApplicationAppUsagePathReqBodyBuilder struct {
	date             string
	dateFlag         bool
	cycleType        int
	cycleTypeFlag    bool
	departmentId     string
	departmentIdFlag bool
	recursion        int
	recursionFlag    bool
	pageSize         int
	pageSizeFlag     bool
	pageToken        string
	pageTokenFlag    bool
}

func NewDepartmentOverviewApplicationAppUsagePathReqBodyBuilder() *DepartmentOverviewApplicationAppUsagePathReqBodyBuilder {
	builder := &DepartmentOverviewApplicationAppUsagePathReqBodyBuilder{}
	return builder
}

// 查询日期，格式为yyyy-mm-dd，若cycle_type为1，date可以为任何自然日；若cycle_type为2，则输入的date必须为周一； 若cycle_type为3，则输入的date必须为每月1号
//
// 示例值：2021-07-08
func (builder *DepartmentOverviewApplicationAppUsagePathReqBodyBuilder) Date(date string) *DepartmentOverviewApplicationAppUsagePathReqBodyBuilder {
	builder.date = date
	builder.dateFlag = true
	return builder
}

// 活跃周期的统计类型
//
// 示例值：1
func (builder *DepartmentOverviewApplicationAppUsagePathReqBodyBuilder) CycleType(cycleType int) *DepartmentOverviewApplicationAppUsagePathReqBodyBuilder {
	builder.cycleType = cycleType
	builder.cycleTypeFlag = true
	return builder
}

// 查询的部门id，获取方法可参考[部门ID概述](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/field-overview);-  若部门id为空，则返回当前租户的使用数据；若填写部门id，则返回当前部门的使用数据（包含子部门的用户） 以及多级子部门的使用数据。;-  若路径参数中department_id_type为空或者为open_department_id，则此处应该填写部门的 open_department_id；若路径参数中department_id_type为department_id，则此处应该填写部门的 department_id。;- 若不填写则返回整个租户的数据
//
// 示例值：od-4e6ac4d14bcd5071a37a39de902c7141
func (builder *DepartmentOverviewApplicationAppUsagePathReqBodyBuilder) DepartmentId(departmentId string) *DepartmentOverviewApplicationAppUsagePathReqBodyBuilder {
	builder.departmentId = departmentId
	builder.departmentIdFlag = true
	return builder
}

// 是否需要查询部门下多层子部门的数据。未设置或为0时，仅查询department_id对应的部门。设置为n时，查询department_id及其n级子部门的数据。仅在department_id参数传递时有效，最大值为4。
//
// 示例值：0
func (builder *DepartmentOverviewApplicationAppUsagePathReqBodyBuilder) Recursion(recursion int) *DepartmentOverviewApplicationAppUsagePathReqBodyBuilder {
	builder.recursion = recursion
	builder.recursionFlag = true
	return builder
}

// 分页大小，取值范围 1~20
//
// 示例值：10
func (builder *DepartmentOverviewApplicationAppUsagePathReqBodyBuilder) PageSize(pageSize int) *DepartmentOverviewApplicationAppUsagePathReqBodyBuilder {
	builder.pageSize = pageSize
	builder.pageSizeFlag = true
	return builder
}

// 分页标记，第一次请求不填，表示从头开始遍历；当返回的has_more为true时，会返回新的page_token，再次调用接口，传入这个page_token，将获得下一页数据。
//
// 示例值：new-1a8f509162ca3c95405838d05ccded09
func (builder *DepartmentOverviewApplicationAppUsagePathReqBodyBuilder) PageToken(pageToken string) *DepartmentOverviewApplicationAppUsagePathReqBodyBuilder {
	builder.pageToken = pageToken
	builder.pageTokenFlag = true
	return builder
}

func (builder *DepartmentOverviewApplicationAppUsagePathReqBodyBuilder) Build() (*DepartmentOverviewApplicationAppUsageReqBody, error) {
	req := &DepartmentOverviewApplicationAppUsageReqBody{}
	if builder.dateFlag {
		req.Date = &builder.date
	}
	if builder.cycleTypeFlag {
		req.CycleType = &builder.cycleType
	}
	if builder.departmentIdFlag {
		req.DepartmentId = &builder.departmentId
	}
	if builder.recursionFlag {
		req.Recursion = &builder.recursion
	}
	if builder.pageSizeFlag {
		req.PageSize = &builder.pageSize
	}
	if builder.pageTokenFlag {
		req.PageToken = &builder.pageToken
	}
	return req, nil
}

type DepartmentOverviewApplicationAppUsageReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *DepartmentOverviewApplicationAppUsageReqBody
}

func NewDepartmentOverviewApplicationAppUsageReqBuilder() *DepartmentOverviewApplicationAppUsageReqBuilder {
	builder := &DepartmentOverviewApplicationAppUsageReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 目标应用 ID
//
// 示例值：cli_9f115af860f7901b
func (builder *DepartmentOverviewApplicationAppUsageReqBuilder) AppId(appId string) *DepartmentOverviewApplicationAppUsageReqBuilder {
	builder.apiReq.PathParams.Set("app_id", fmt.Sprint(appId))
	return builder
}

// 调用中使用的部门ID的类型
//
// 示例值：open_department_id
func (builder *DepartmentOverviewApplicationAppUsageReqBuilder) DepartmentIdType(departmentIdType string) *DepartmentOverviewApplicationAppUsageReqBuilder {
	builder.apiReq.QueryParams.Set("department_id_type", fmt.Sprint(departmentIdType))
	return builder
}

// 查看应用在某一天/某一周/某一个月的使用数据，可以根据部门做多层子部门的筛选
func (builder *DepartmentOverviewApplicationAppUsageReqBuilder) Body(body *DepartmentOverviewApplicationAppUsageReqBody) *DepartmentOverviewApplicationAppUsageReqBuilder {
	builder.body = body
	return builder
}

func (builder *DepartmentOverviewApplicationAppUsageReqBuilder) Build() *DepartmentOverviewApplicationAppUsageReq {
	req := &DepartmentOverviewApplicationAppUsageReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.body
	return req
}

type DepartmentOverviewApplicationAppUsageReqBody struct {
	Date *string `json:"date,omitempty"` // 查询日期，格式为yyyy-mm-dd，若cycle_type为1，date可以为任何自然日；若cycle_type为2，则输入的date必须为周一； 若cycle_type为3，则输入的date必须为每月1号

	CycleType *int `json:"cycle_type,omitempty"` // 活跃周期的统计类型

	DepartmentId *string `json:"department_id,omitempty"` // 查询的部门id，获取方法可参考[部门ID概述](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/field-overview);-  若部门id为空，则返回当前租户的使用数据；若填写部门id，则返回当前部门的使用数据（包含子部门的用户） 以及多级子部门的使用数据。;-  若路径参数中department_id_type为空或者为open_department_id，则此处应该填写部门的 open_department_id；若路径参数中department_id_type为department_id，则此处应该填写部门的 department_id。;- 若不填写则返回整个租户的数据

	Recursion *int `json:"recursion,omitempty"` // 是否需要查询部门下多层子部门的数据。未设置或为0时，仅查询department_id对应的部门。设置为n时，查询department_id及其n级子部门的数据。仅在department_id参数传递时有效，最大值为4。

	PageSize *int `json:"page_size,omitempty"` // 分页大小，取值范围 1~20

	PageToken *string `json:"page_token,omitempty"` // 分页标记，第一次请求不填，表示从头开始遍历；当返回的has_more为true时，会返回新的page_token，再次调用接口，传入这个page_token，将获得下一页数据。
}

type DepartmentOverviewApplicationAppUsageReq struct {
	apiReq *larkcore.ApiReq
	Body   *DepartmentOverviewApplicationAppUsageReqBody `body:""`
}

type DepartmentOverviewApplicationAppUsageRespData struct {
	HasMore *bool `json:"has_more,omitempty"` // 分页查询时返回，代表是否还有更多数据

	PageToken *string `json:"page_token,omitempty"` // 分页标记，下一页分页的token

	Items []*ApplicationDepartmentAppUsage `json:"items,omitempty"` // 部门内员工使用应用的概览数据
}

type DepartmentOverviewApplicationAppUsageResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *DepartmentOverviewApplicationAppUsageRespData `json:"data"` // 业务数据
}

func (resp *DepartmentOverviewApplicationAppUsageResp) Success() bool {
	return resp.Code == 0
}

type MessagePushOverviewApplicationAppUsageReqBodyBuilder struct {
	date     string // 查询日期，若cycle_type为week，则输入的date必须为周一； 若cycle_type为month，则输入的date必须为每月1号
	dateFlag bool

	cycleType     int // 枚举值：day，week，month；week指自然周，返回当前日期所在周的数据；不满一周则从周一到当前日期算。month指自然月，返回当前日期所在月的数据。
	cycleTypeFlag bool

	departmentId     string // 需要查询的部门id，获取方法可参考[部门ID概述](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/field-overview);-  若部门id为空，则返回当前租户的使用数据；若填写部门id，则返回当前部门的使用数据（包含子部门的用户）； ;-  若路径参数中department_id_type为空或者为open_department_id，则此处应该填写部门的 open_department_id；若路径参数中department_id_type为department_id，则此处应该填写部门的 department_id。返回当前部门的使用数据； 若不填写，则返回当前租户的使用数据
	departmentIdFlag bool
}

func NewMessagePushOverviewApplicationAppUsageReqBodyBuilder() *MessagePushOverviewApplicationAppUsageReqBodyBuilder {
	builder := &MessagePushOverviewApplicationAppUsageReqBodyBuilder{}
	return builder
}

// 查询日期，若cycle_type为week，则输入的date必须为周一； 若cycle_type为month，则输入的date必须为每月1号
//
//示例值：2021-07-08
func (builder *MessagePushOverviewApplicationAppUsageReqBodyBuilder) Date(date string) *MessagePushOverviewApplicationAppUsageReqBodyBuilder {
	builder.date = date
	builder.dateFlag = true
	return builder
}

// 枚举值：day，week，month；week指自然周，返回当前日期所在周的数据；不满一周则从周一到当前日期算。month指自然月，返回当前日期所在月的数据。
//
//示例值：1
func (builder *MessagePushOverviewApplicationAppUsageReqBodyBuilder) CycleType(cycleType int) *MessagePushOverviewApplicationAppUsageReqBodyBuilder {
	builder.cycleType = cycleType
	builder.cycleTypeFlag = true
	return builder
}

// 需要查询的部门id，获取方法可参考[部门ID概述](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/field-overview);-  若部门id为空，则返回当前租户的使用数据；若填写部门id，则返回当前部门的使用数据（包含子部门的用户）； ;-  若路径参数中department_id_type为空或者为open_department_id，则此处应该填写部门的 open_department_id；若路径参数中department_id_type为department_id，则此处应该填写部门的 department_id。返回当前部门的使用数据； 若不填写，则返回当前租户的使用数据
//
//示例值：od-4e6ac4d14bcd5071a37a39de902c7141
func (builder *MessagePushOverviewApplicationAppUsageReqBodyBuilder) DepartmentId(departmentId string) *MessagePushOverviewApplicationAppUsageReqBodyBuilder {
	builder.departmentId = departmentId
	builder.departmentIdFlag = true
	return builder
}

func (builder *MessagePushOverviewApplicationAppUsageReqBodyBuilder) Build() *MessagePushOverviewApplicationAppUsageReqBody {
	req := &MessagePushOverviewApplicationAppUsageReqBody{}
	if builder.dateFlag {
		req.Date = &builder.date
	}
	if builder.cycleTypeFlag {
		req.CycleType = &builder.cycleType
	}
	if builder.departmentIdFlag {
		req.DepartmentId = &builder.departmentId
	}
	return req
}

type MessagePushOverviewApplicationAppUsagePathReqBodyBuilder struct {
	date             string
	dateFlag         bool
	cycleType        int
	cycleTypeFlag    bool
	departmentId     string
	departmentIdFlag bool
}

func NewMessagePushOverviewApplicationAppUsagePathReqBodyBuilder() *MessagePushOverviewApplicationAppUsagePathReqBodyBuilder {
	builder := &MessagePushOverviewApplicationAppUsagePathReqBodyBuilder{}
	return builder
}

// 查询日期，若cycle_type为week，则输入的date必须为周一； 若cycle_type为month，则输入的date必须为每月1号
//
// 示例值：2021-07-08
func (builder *MessagePushOverviewApplicationAppUsagePathReqBodyBuilder) Date(date string) *MessagePushOverviewApplicationAppUsagePathReqBodyBuilder {
	builder.date = date
	builder.dateFlag = true
	return builder
}

// 枚举值：day，week，month；week指自然周，返回当前日期所在周的数据；不满一周则从周一到当前日期算。month指自然月，返回当前日期所在月的数据。
//
// 示例值：1
func (builder *MessagePushOverviewApplicationAppUsagePathReqBodyBuilder) CycleType(cycleType int) *MessagePushOverviewApplicationAppUsagePathReqBodyBuilder {
	builder.cycleType = cycleType
	builder.cycleTypeFlag = true
	return builder
}

// 需要查询的部门id，获取方法可参考[部门ID概述](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/field-overview);-  若部门id为空，则返回当前租户的使用数据；若填写部门id，则返回当前部门的使用数据（包含子部门的用户）； ;-  若路径参数中department_id_type为空或者为open_department_id，则此处应该填写部门的 open_department_id；若路径参数中department_id_type为department_id，则此处应该填写部门的 department_id。返回当前部门的使用数据； 若不填写，则返回当前租户的使用数据
//
// 示例值：od-4e6ac4d14bcd5071a37a39de902c7141
func (builder *MessagePushOverviewApplicationAppUsagePathReqBodyBuilder) DepartmentId(departmentId string) *MessagePushOverviewApplicationAppUsagePathReqBodyBuilder {
	builder.departmentId = departmentId
	builder.departmentIdFlag = true
	return builder
}

func (builder *MessagePushOverviewApplicationAppUsagePathReqBodyBuilder) Build() (*MessagePushOverviewApplicationAppUsageReqBody, error) {
	req := &MessagePushOverviewApplicationAppUsageReqBody{}
	if builder.dateFlag {
		req.Date = &builder.date
	}
	if builder.cycleTypeFlag {
		req.CycleType = &builder.cycleType
	}
	if builder.departmentIdFlag {
		req.DepartmentId = &builder.departmentId
	}
	return req, nil
}

type MessagePushOverviewApplicationAppUsageReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *MessagePushOverviewApplicationAppUsageReqBody
}

func NewMessagePushOverviewApplicationAppUsageReqBuilder() *MessagePushOverviewApplicationAppUsageReqBuilder {
	builder := &MessagePushOverviewApplicationAppUsageReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 目标应用ID，支持自建应用
//
// 示例值：cli_9f115af860f7901b
func (builder *MessagePushOverviewApplicationAppUsageReqBuilder) AppId(appId string) *MessagePushOverviewApplicationAppUsageReqBuilder {
	builder.apiReq.PathParams.Set("app_id", fmt.Sprint(appId))
	return builder
}

// 调用中使用的部门ID的类型
//
// 示例值：open_department_id
func (builder *MessagePushOverviewApplicationAppUsageReqBuilder) DepartmentIdType(departmentIdType string) *MessagePushOverviewApplicationAppUsageReqBuilder {
	builder.apiReq.QueryParams.Set("department_id_type", fmt.Sprint(departmentIdType))
	return builder
}

// 目标：查看应用在某一天/某一周/某一个月的机器人消息推送数据，可以根据部门做筛选
func (builder *MessagePushOverviewApplicationAppUsageReqBuilder) Body(body *MessagePushOverviewApplicationAppUsageReqBody) *MessagePushOverviewApplicationAppUsageReqBuilder {
	builder.body = body
	return builder
}

func (builder *MessagePushOverviewApplicationAppUsageReqBuilder) Build() *MessagePushOverviewApplicationAppUsageReq {
	req := &MessagePushOverviewApplicationAppUsageReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.body
	return req
}

type MessagePushOverviewApplicationAppUsageReqBody struct {
	Date *string `json:"date,omitempty"` // 查询日期，若cycle_type为week，则输入的date必须为周一； 若cycle_type为month，则输入的date必须为每月1号

	CycleType *int `json:"cycle_type,omitempty"` // 枚举值：day，week，month；week指自然周，返回当前日期所在周的数据；不满一周则从周一到当前日期算。month指自然月，返回当前日期所在月的数据。

	DepartmentId *string `json:"department_id,omitempty"` // 需要查询的部门id，获取方法可参考[部门ID概述](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/field-overview);-  若部门id为空，则返回当前租户的使用数据；若填写部门id，则返回当前部门的使用数据（包含子部门的用户）； ;-  若路径参数中department_id_type为空或者为open_department_id，则此处应该填写部门的 open_department_id；若路径参数中department_id_type为department_id，则此处应该填写部门的 department_id。返回当前部门的使用数据； 若不填写，则返回当前租户的使用数据
}

type MessagePushOverviewApplicationAppUsageReq struct {
	apiReq *larkcore.ApiReq
	Body   *MessagePushOverviewApplicationAppUsageReqBody `body:""`
}

type MessagePushOverviewApplicationAppUsageRespData struct {
	Items []*ApplicationAppUsage `json:"items,omitempty"` // 消息推送情况，指标值包括：send_msg_count：消息推送数、send_user_count：消息触达人数、read_in_1h_count：消息1h阅读量、read_in_12h_count：消息12h阅读量
}

type MessagePushOverviewApplicationAppUsageResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *MessagePushOverviewApplicationAppUsageRespData `json:"data"` // 业务数据
}

func (resp *MessagePushOverviewApplicationAppUsageResp) Success() bool {
	return resp.Code == 0
}

type OverviewApplicationAppUsageReqBodyBuilder struct {
	date     string // 查询日期，格式为yyyy-mm-dd，若cycle_type为1，date可以为任何自然日；若cycle_type为2，则输入的date必须为周一； 若cycle_type为3，则输入的date必须为每月1号
	dateFlag bool

	cycleType     int // 活跃周期的统计类型
	cycleTypeFlag bool

	departmentId     string // 查询的部门id，获取方法可参考[部门ID概述](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/field-overview);-  若部门id为空，则返回当前租户的使用数据；若填写部门id，则返回当前部门的使用数据（包含子部门的用户）； ;-  若路径参数中department_id_type为空或者为open_department_id，则此处应该填写部门的 open_department_id；若路径参数中department_id_type为department_id，则此处应该填写部门的 department_id。
	departmentIdFlag bool

	ability     string // 能力类型，按能力类型进行筛选，返回对应能力的活跃数据
	abilityFlag bool
}

func NewOverviewApplicationAppUsageReqBodyBuilder() *OverviewApplicationAppUsageReqBodyBuilder {
	builder := &OverviewApplicationAppUsageReqBodyBuilder{}
	return builder
}

// 查询日期，格式为yyyy-mm-dd，若cycle_type为1，date可以为任何自然日；若cycle_type为2，则输入的date必须为周一； 若cycle_type为3，则输入的date必须为每月1号
//
//示例值：2021-07-08
func (builder *OverviewApplicationAppUsageReqBodyBuilder) Date(date string) *OverviewApplicationAppUsageReqBodyBuilder {
	builder.date = date
	builder.dateFlag = true
	return builder
}

// 活跃周期的统计类型
//
//示例值：1
func (builder *OverviewApplicationAppUsageReqBodyBuilder) CycleType(cycleType int) *OverviewApplicationAppUsageReqBodyBuilder {
	builder.cycleType = cycleType
	builder.cycleTypeFlag = true
	return builder
}

// 查询的部门id，获取方法可参考[部门ID概述](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/field-overview);-  若部门id为空，则返回当前租户的使用数据；若填写部门id，则返回当前部门的使用数据（包含子部门的用户）； ;-  若路径参数中department_id_type为空或者为open_department_id，则此处应该填写部门的 open_department_id；若路径参数中department_id_type为department_id，则此处应该填写部门的 department_id。
//
//示例值：od-4e6ac4d14bcd5071a37a39de902c7141
func (builder *OverviewApplicationAppUsageReqBodyBuilder) DepartmentId(departmentId string) *OverviewApplicationAppUsageReqBodyBuilder {
	builder.departmentId = departmentId
	builder.departmentIdFlag = true
	return builder
}

// 能力类型，按能力类型进行筛选，返回对应能力的活跃数据
//
//示例值：app
func (builder *OverviewApplicationAppUsageReqBodyBuilder) Ability(ability string) *OverviewApplicationAppUsageReqBodyBuilder {
	builder.ability = ability
	builder.abilityFlag = true
	return builder
}

func (builder *OverviewApplicationAppUsageReqBodyBuilder) Build() *OverviewApplicationAppUsageReqBody {
	req := &OverviewApplicationAppUsageReqBody{}
	if builder.dateFlag {
		req.Date = &builder.date
	}
	if builder.cycleTypeFlag {
		req.CycleType = &builder.cycleType
	}
	if builder.departmentIdFlag {
		req.DepartmentId = &builder.departmentId
	}
	if builder.abilityFlag {
		req.Ability = &builder.ability
	}
	return req
}

type OverviewApplicationAppUsagePathReqBodyBuilder struct {
	date             string
	dateFlag         bool
	cycleType        int
	cycleTypeFlag    bool
	departmentId     string
	departmentIdFlag bool
	ability          string
	abilityFlag      bool
}

func NewOverviewApplicationAppUsagePathReqBodyBuilder() *OverviewApplicationAppUsagePathReqBodyBuilder {
	builder := &OverviewApplicationAppUsagePathReqBodyBuilder{}
	return builder
}

// 查询日期，格式为yyyy-mm-dd，若cycle_type为1，date可以为任何自然日；若cycle_type为2，则输入的date必须为周一； 若cycle_type为3，则输入的date必须为每月1号
//
// 示例值：2021-07-08
func (builder *OverviewApplicationAppUsagePathReqBodyBuilder) Date(date string) *OverviewApplicationAppUsagePathReqBodyBuilder {
	builder.date = date
	builder.dateFlag = true
	return builder
}

// 活跃周期的统计类型
//
// 示例值：1
func (builder *OverviewApplicationAppUsagePathReqBodyBuilder) CycleType(cycleType int) *OverviewApplicationAppUsagePathReqBodyBuilder {
	builder.cycleType = cycleType
	builder.cycleTypeFlag = true
	return builder
}

// 查询的部门id，获取方法可参考[部门ID概述](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/field-overview);-  若部门id为空，则返回当前租户的使用数据；若填写部门id，则返回当前部门的使用数据（包含子部门的用户）； ;-  若路径参数中department_id_type为空或者为open_department_id，则此处应该填写部门的 open_department_id；若路径参数中department_id_type为department_id，则此处应该填写部门的 department_id。
//
// 示例值：od-4e6ac4d14bcd5071a37a39de902c7141
func (builder *OverviewApplicationAppUsagePathReqBodyBuilder) DepartmentId(departmentId string) *OverviewApplicationAppUsagePathReqBodyBuilder {
	builder.departmentId = departmentId
	builder.departmentIdFlag = true
	return builder
}

// 能力类型，按能力类型进行筛选，返回对应能力的活跃数据
//
// 示例值：app
func (builder *OverviewApplicationAppUsagePathReqBodyBuilder) Ability(ability string) *OverviewApplicationAppUsagePathReqBodyBuilder {
	builder.ability = ability
	builder.abilityFlag = true
	return builder
}

func (builder *OverviewApplicationAppUsagePathReqBodyBuilder) Build() (*OverviewApplicationAppUsageReqBody, error) {
	req := &OverviewApplicationAppUsageReqBody{}
	if builder.dateFlag {
		req.Date = &builder.date
	}
	if builder.cycleTypeFlag {
		req.CycleType = &builder.cycleType
	}
	if builder.departmentIdFlag {
		req.DepartmentId = &builder.departmentId
	}
	if builder.abilityFlag {
		req.Ability = &builder.ability
	}
	return req, nil
}

type OverviewApplicationAppUsageReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *OverviewApplicationAppUsageReqBody
}

func NewOverviewApplicationAppUsageReqBuilder() *OverviewApplicationAppUsageReqBuilder {
	builder := &OverviewApplicationAppUsageReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 目标应用 ID
//
// 示例值：cli_9f115af860f7901b
func (builder *OverviewApplicationAppUsageReqBuilder) AppId(appId string) *OverviewApplicationAppUsageReqBuilder {
	builder.apiReq.PathParams.Set("app_id", fmt.Sprint(appId))
	return builder
}

// 调用中使用的部门ID的类型
//
// 示例值：open_department_id
func (builder *OverviewApplicationAppUsageReqBuilder) DepartmentIdType(departmentIdType string) *OverviewApplicationAppUsageReqBuilder {
	builder.apiReq.QueryParams.Set("department_id_type", fmt.Sprint(departmentIdType))
	return builder
}

// 查看应用在某一天/某一周/某一个月的使用数据，可以查看租户整体对应用的使用情况，也可以分部门查看。
func (builder *OverviewApplicationAppUsageReqBuilder) Body(body *OverviewApplicationAppUsageReqBody) *OverviewApplicationAppUsageReqBuilder {
	builder.body = body
	return builder
}

func (builder *OverviewApplicationAppUsageReqBuilder) Build() *OverviewApplicationAppUsageReq {
	req := &OverviewApplicationAppUsageReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.body
	return req
}

type OverviewApplicationAppUsageReqBody struct {
	Date *string `json:"date,omitempty"` // 查询日期，格式为yyyy-mm-dd，若cycle_type为1，date可以为任何自然日；若cycle_type为2，则输入的date必须为周一； 若cycle_type为3，则输入的date必须为每月1号

	CycleType *int `json:"cycle_type,omitempty"` // 活跃周期的统计类型

	DepartmentId *string `json:"department_id,omitempty"` // 查询的部门id，获取方法可参考[部门ID概述](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/field-overview);-  若部门id为空，则返回当前租户的使用数据；若填写部门id，则返回当前部门的使用数据（包含子部门的用户）； ;-  若路径参数中department_id_type为空或者为open_department_id，则此处应该填写部门的 open_department_id；若路径参数中department_id_type为department_id，则此处应该填写部门的 department_id。

	Ability *string `json:"ability,omitempty"` // 能力类型，按能力类型进行筛选，返回对应能力的活跃数据
}

type OverviewApplicationAppUsageReq struct {
	apiReq *larkcore.ApiReq
	Body   *OverviewApplicationAppUsageReqBody `body:""`
}

type OverviewApplicationAppUsageRespData struct {
	Items []*ApplicationAppUsage `json:"items,omitempty"` // 员工使用应用概览数据
}

type OverviewApplicationAppUsageResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *OverviewApplicationAppUsageRespData `json:"data"` // 业务数据
}

func (resp *OverviewApplicationAppUsageResp) Success() bool {
	return resp.Code == 0
}

type ContactsRangeSuggestApplicationAppVersionReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewContactsRangeSuggestApplicationAppVersionReqBuilder() *ContactsRangeSuggestApplicationAppVersionReqBuilder {
	builder := &ContactsRangeSuggestApplicationAppVersionReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 应用 id
//
// 示例值：cli_9f3ca975326b501b
func (builder *ContactsRangeSuggestApplicationAppVersionReqBuilder) AppId(appId string) *ContactsRangeSuggestApplicationAppVersionReqBuilder {
	builder.apiReq.PathParams.Set("app_id", fmt.Sprint(appId))
	return builder
}

// 唯一标识应用版本的 ID
//
// 示例值：oav_d317f090b7258ad0372aa53963cda70d
func (builder *ContactsRangeSuggestApplicationAppVersionReqBuilder) VersionId(versionId string) *ContactsRangeSuggestApplicationAppVersionReqBuilder {
	builder.apiReq.PathParams.Set("version_id", fmt.Sprint(versionId))
	return builder
}

// 返回值的部门ID的类型
//
// 示例值：department_id
func (builder *ContactsRangeSuggestApplicationAppVersionReqBuilder) DepartmentIdType(departmentIdType string) *ContactsRangeSuggestApplicationAppVersionReqBuilder {
	builder.apiReq.QueryParams.Set("department_id_type", fmt.Sprint(departmentIdType))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *ContactsRangeSuggestApplicationAppVersionReqBuilder) UserIdType(userIdType string) *ContactsRangeSuggestApplicationAppVersionReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

func (builder *ContactsRangeSuggestApplicationAppVersionReqBuilder) Build() *ContactsRangeSuggestApplicationAppVersionReq {
	req := &ContactsRangeSuggestApplicationAppVersionReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type ContactsRangeSuggestApplicationAppVersionReq struct {
	apiReq *larkcore.ApiReq
}

type ContactsRangeSuggestApplicationAppVersionRespData struct {
	ContactsRange *ApplicationAppContactsRange `json:"contacts_range,omitempty"` //
}

type ContactsRangeSuggestApplicationAppVersionResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ContactsRangeSuggestApplicationAppVersionRespData `json:"data"` // 业务数据
}

func (resp *ContactsRangeSuggestApplicationAppVersionResp) Success() bool {
	return resp.Code == 0
}

type GetApplicationAppVersionReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewGetApplicationAppVersionReqBuilder() *GetApplicationAppVersionReqBuilder {
	builder := &GetApplicationAppVersionReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 应用的 app_id，需要查询其他应用版本信息时，必须申请[获取应用版本信息](https://open.feishu.cn/document/ukTMukTMukTM/uQjN3QjL0YzN04CN2cDN)权限，仅查询本应用版本信息时，可填入 "me" 或者应用自身 app_id
//
// 示例值：cli_9f3ca975326b501b
func (builder *GetApplicationAppVersionReqBuilder) AppId(appId string) *GetApplicationAppVersionReqBuilder {
	builder.apiReq.PathParams.Set("app_id", fmt.Sprint(appId))
	return builder
}

// 唯一标识应用版本的 ID
//
// 示例值：oav_d317f090b7258ad0372aa53963cda70d
func (builder *GetApplicationAppVersionReqBuilder) VersionId(versionId string) *GetApplicationAppVersionReqBuilder {
	builder.apiReq.PathParams.Set("version_id", fmt.Sprint(versionId))
	return builder
}

// 应用信息的语言版本
//
// 示例值：zh_cn
func (builder *GetApplicationAppVersionReqBuilder) Lang(lang string) *GetApplicationAppVersionReqBuilder {
	builder.apiReq.QueryParams.Set("lang", fmt.Sprint(lang))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *GetApplicationAppVersionReqBuilder) UserIdType(userIdType string) *GetApplicationAppVersionReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

func (builder *GetApplicationAppVersionReqBuilder) Build() *GetApplicationAppVersionReq {
	req := &GetApplicationAppVersionReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type GetApplicationAppVersionReq struct {
	apiReq *larkcore.ApiReq
}

type GetApplicationAppVersionRespData struct {
	AppVersion *ApplicationAppVersion `json:"app_version,omitempty"` // 应用版本信息
}

type GetApplicationAppVersionResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *GetApplicationAppVersionRespData `json:"data"` // 业务数据
}

func (resp *GetApplicationAppVersionResp) Success() bool {
	return resp.Code == 0
}

type ListApplicationAppVersionReqBuilder struct {
	apiReq *larkcore.ApiReq
	limit  int // 最大返回多少记录，当使用迭代器访问时才有效
}

func NewListApplicationAppVersionReqBuilder() *ListApplicationAppVersionReqBuilder {
	builder := &ListApplicationAppVersionReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 最大返回多少记录，当使用迭代器访问时才有效
func (builder *ListApplicationAppVersionReqBuilder) Limit(limit int) *ListApplicationAppVersionReqBuilder {
	builder.limit = limit
	return builder
}

// 应用的 app_id，需要查询其他应用版本信息时，必须申请[获取应用版本信息](https://open.feishu.cn/document/ukTMukTMukTM/uQjN3QjL0YzN04CN2cDN)权限，仅查询本应用版本信息时，可填入 "me" 或者应用自身 app_id
//
// 示例值：cli_9b445f5258795107
func (builder *ListApplicationAppVersionReqBuilder) AppId(appId string) *ListApplicationAppVersionReqBuilder {
	builder.apiReq.PathParams.Set("app_id", fmt.Sprint(appId))
	return builder
}

// 应用信息的语言版本
//
// 示例值：zh_cn
func (builder *ListApplicationAppVersionReqBuilder) Lang(lang string) *ListApplicationAppVersionReqBuilder {
	builder.apiReq.QueryParams.Set("lang", fmt.Sprint(lang))
	return builder
}

// 分页大小
//
// 示例值：10
func (builder *ListApplicationAppVersionReqBuilder) PageSize(pageSize int) *ListApplicationAppVersionReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 分页标记，第一次请求不填，表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该 page_token 获取查询结果
//
// 示例值：new-e3c5a0627cdf0c2e057da7257b90376a
func (builder *ListApplicationAppVersionReqBuilder) PageToken(pageToken string) *ListApplicationAppVersionReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

// 0：按照时间倒序 1：按照时间正序
//
// 示例值：0
func (builder *ListApplicationAppVersionReqBuilder) Order(order int) *ListApplicationAppVersionReqBuilder {
	builder.apiReq.QueryParams.Set("order", fmt.Sprint(order))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *ListApplicationAppVersionReqBuilder) UserIdType(userIdType string) *ListApplicationAppVersionReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

func (builder *ListApplicationAppVersionReqBuilder) Build() *ListApplicationAppVersionReq {
	req := &ListApplicationAppVersionReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.Limit = builder.limit
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type ListApplicationAppVersionReq struct {
	apiReq *larkcore.ApiReq
	Limit  int // 最多返回多少记录，只有在使用迭代器访问时，才有效

}

type ListApplicationAppVersionRespData struct {
	Items []*ApplicationAppVersion `json:"items,omitempty"` // 应用版本列表

	PageToken *string `json:"page_token,omitempty"` // 分页标记，当 has_more 为 true 时，会同时返回新的 page_token，否则不返回 page_token

	HasMore *bool `json:"has_more,omitempty"` // 是否还有更多项
}

type ListApplicationAppVersionResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ListApplicationAppVersionRespData `json:"data"` // 业务数据
}

func (resp *ListApplicationAppVersionResp) Success() bool {
	return resp.Code == 0
}

type PatchApplicationAppVersionReqBuilder struct {
	apiReq                *larkcore.ApiReq
	applicationAppVersion *ApplicationAppVersion
}

func NewPatchApplicationAppVersionReqBuilder() *PatchApplicationAppVersionReqBuilder {
	builder := &PatchApplicationAppVersionReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 应用 id
//
// 示例值：cli_9f3ca975326b501b
func (builder *PatchApplicationAppVersionReqBuilder) AppId(appId string) *PatchApplicationAppVersionReqBuilder {
	builder.apiReq.PathParams.Set("app_id", fmt.Sprint(appId))
	return builder
}

// 唯一标识应用版本的 ID
//
// 示例值：oav_d317f090b7258ad0372aa53963cda70d
func (builder *PatchApplicationAppVersionReqBuilder) VersionId(versionId string) *PatchApplicationAppVersionReqBuilder {
	builder.apiReq.PathParams.Set("version_id", fmt.Sprint(versionId))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *PatchApplicationAppVersionReqBuilder) UserIdType(userIdType string) *PatchApplicationAppVersionReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

// 操作者的 open_id
//
// 示例值：ou_4065981088f8ef67a504ba8bd6b24d85
func (builder *PatchApplicationAppVersionReqBuilder) OperatorId(operatorId string) *PatchApplicationAppVersionReqBuilder {
	builder.apiReq.QueryParams.Set("operator_id", fmt.Sprint(operatorId))
	return builder
}

// 当修改版本状态为被驳回时，这一项必填
//
// 示例值：拒绝理由
func (builder *PatchApplicationAppVersionReqBuilder) RejectReason(rejectReason string) *PatchApplicationAppVersionReqBuilder {
	builder.apiReq.QueryParams.Set("reject_reason", fmt.Sprint(rejectReason))
	return builder
}

// 通过接口来更新应用版本的审核结果：通过后应用可以直接上架；拒绝后则开发者可以看到拒绝理由，并在修改后再次申请发布。
func (builder *PatchApplicationAppVersionReqBuilder) ApplicationAppVersion(applicationAppVersion *ApplicationAppVersion) *PatchApplicationAppVersionReqBuilder {
	builder.applicationAppVersion = applicationAppVersion
	return builder
}

func (builder *PatchApplicationAppVersionReqBuilder) Build() *PatchApplicationAppVersionReq {
	req := &PatchApplicationAppVersionReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.applicationAppVersion
	return req
}

type PatchApplicationAppVersionReq struct {
	apiReq                *larkcore.ApiReq
	ApplicationAppVersion *ApplicationAppVersion `body:""`
}

type PatchApplicationAppVersionResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *PatchApplicationAppVersionResp) Success() bool {
	return resp.Code == 0
}

type GetApplicationCollaboratorsReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewGetApplicationCollaboratorsReqBuilder() *GetApplicationCollaboratorsReqBuilder {
	builder := &GetApplicationCollaboratorsReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 应用ID
//
// 示例值：cli_a5002df1b6f8d01c
func (builder *GetApplicationCollaboratorsReqBuilder) AppId(appId string) *GetApplicationCollaboratorsReqBuilder {
	builder.apiReq.PathParams.Set("app_id", fmt.Sprint(appId))
	return builder
}

// 用户 ID 类型
//
// 示例值：open_id
func (builder *GetApplicationCollaboratorsReqBuilder) UserIdType(userIdType string) *GetApplicationCollaboratorsReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

func (builder *GetApplicationCollaboratorsReqBuilder) Build() *GetApplicationCollaboratorsReq {
	req := &GetApplicationCollaboratorsReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type GetApplicationCollaboratorsReq struct {
	apiReq *larkcore.ApiReq
}

type GetApplicationCollaboratorsRespData struct {
	Collaborators []*AppCollaborator `json:"collaborators,omitempty"` // 协作者
}

type GetApplicationCollaboratorsResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *GetApplicationCollaboratorsRespData `json:"data"` // 业务数据
}

func (resp *GetApplicationCollaboratorsResp) Success() bool {
	return resp.Code == 0
}

type UpdateApplicationCollaboratorsReqBodyBuilder struct {
	adds     []*AppCollaborator // 添加人员
	addsFlag bool

	removes     []string // 移除人员
	removesFlag bool
}

func NewUpdateApplicationCollaboratorsReqBodyBuilder() *UpdateApplicationCollaboratorsReqBodyBuilder {
	builder := &UpdateApplicationCollaboratorsReqBodyBuilder{}
	return builder
}

// 添加人员
//
//示例值：
func (builder *UpdateApplicationCollaboratorsReqBodyBuilder) Adds(adds []*AppCollaborator) *UpdateApplicationCollaboratorsReqBodyBuilder {
	builder.adds = adds
	builder.addsFlag = true
	return builder
}

// 移除人员
//
//示例值：
func (builder *UpdateApplicationCollaboratorsReqBodyBuilder) Removes(removes []string) *UpdateApplicationCollaboratorsReqBodyBuilder {
	builder.removes = removes
	builder.removesFlag = true
	return builder
}

func (builder *UpdateApplicationCollaboratorsReqBodyBuilder) Build() *UpdateApplicationCollaboratorsReqBody {
	req := &UpdateApplicationCollaboratorsReqBody{}
	if builder.addsFlag {
		req.Adds = builder.adds
	}
	if builder.removesFlag {
		req.Removes = builder.removes
	}
	return req
}

type UpdateApplicationCollaboratorsPathReqBodyBuilder struct {
	adds        []*AppCollaborator
	addsFlag    bool
	removes     []string
	removesFlag bool
}

func NewUpdateApplicationCollaboratorsPathReqBodyBuilder() *UpdateApplicationCollaboratorsPathReqBodyBuilder {
	builder := &UpdateApplicationCollaboratorsPathReqBodyBuilder{}
	return builder
}

// 添加人员
//
// 示例值：
func (builder *UpdateApplicationCollaboratorsPathReqBodyBuilder) Adds(adds []*AppCollaborator) *UpdateApplicationCollaboratorsPathReqBodyBuilder {
	builder.adds = adds
	builder.addsFlag = true
	return builder
}

// 移除人员
//
// 示例值：
func (builder *UpdateApplicationCollaboratorsPathReqBodyBuilder) Removes(removes []string) *UpdateApplicationCollaboratorsPathReqBodyBuilder {
	builder.removes = removes
	builder.removesFlag = true
	return builder
}

func (builder *UpdateApplicationCollaboratorsPathReqBodyBuilder) Build() (*UpdateApplicationCollaboratorsReqBody, error) {
	req := &UpdateApplicationCollaboratorsReqBody{}
	if builder.addsFlag {
		req.Adds = builder.adds
	}
	if builder.removesFlag {
		req.Removes = builder.removes
	}
	return req, nil
}

type UpdateApplicationCollaboratorsReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *UpdateApplicationCollaboratorsReqBody
}

func NewUpdateApplicationCollaboratorsReqBuilder() *UpdateApplicationCollaboratorsReqBuilder {
	builder := &UpdateApplicationCollaboratorsReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 应用ID
//
// 示例值：cli_a5002df1b6f8d01c
func (builder *UpdateApplicationCollaboratorsReqBuilder) AppId(appId string) *UpdateApplicationCollaboratorsReqBuilder {
	builder.apiReq.PathParams.Set("app_id", fmt.Sprint(appId))
	return builder
}

// 用户 ID 类型
//
// 示例值：open_id
func (builder *UpdateApplicationCollaboratorsReqBuilder) UserIdType(userIdType string) *UpdateApplicationCollaboratorsReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

//
func (builder *UpdateApplicationCollaboratorsReqBuilder) Body(body *UpdateApplicationCollaboratorsReqBody) *UpdateApplicationCollaboratorsReqBuilder {
	builder.body = body
	return builder
}

func (builder *UpdateApplicationCollaboratorsReqBuilder) Build() *UpdateApplicationCollaboratorsReq {
	req := &UpdateApplicationCollaboratorsReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.body
	return req
}

type UpdateApplicationCollaboratorsReqBody struct {
	Adds []*AppCollaborator `json:"adds,omitempty"` // 添加人员

	Removes []string `json:"removes,omitempty"` // 移除人员
}

type UpdateApplicationCollaboratorsReq struct {
	apiReq *larkcore.ApiReq
	Body   *UpdateApplicationCollaboratorsReqBody `body:""`
}

type UpdateApplicationCollaboratorsResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *UpdateApplicationCollaboratorsResp) Success() bool {
	return resp.Code == 0
}

type PatchApplicationContactsRangeReqBodyBuilder struct {
	contactsRangeType     string // 更新范围方式
	contactsRangeTypeFlag bool

	addVisibleList     *AppContactsRangeIdList // 可见范围新增列表
	addVisibleListFlag bool

	delVisibleList     *AppContactsRangeIdList // 删除可用名单
	delVisibleListFlag bool
}

func NewPatchApplicationContactsRangeReqBodyBuilder() *PatchApplicationContactsRangeReqBodyBuilder {
	builder := &PatchApplicationContactsRangeReqBodyBuilder{}
	return builder
}

// 更新范围方式
//
//示例值：some
func (builder *PatchApplicationContactsRangeReqBodyBuilder) ContactsRangeType(contactsRangeType string) *PatchApplicationContactsRangeReqBodyBuilder {
	builder.contactsRangeType = contactsRangeType
	builder.contactsRangeTypeFlag = true
	return builder
}

// 可见范围新增列表
//
//示例值：
func (builder *PatchApplicationContactsRangeReqBodyBuilder) AddVisibleList(addVisibleList *AppContactsRangeIdList) *PatchApplicationContactsRangeReqBodyBuilder {
	builder.addVisibleList = addVisibleList
	builder.addVisibleListFlag = true
	return builder
}

// 删除可用名单
//
//示例值：
func (builder *PatchApplicationContactsRangeReqBodyBuilder) DelVisibleList(delVisibleList *AppContactsRangeIdList) *PatchApplicationContactsRangeReqBodyBuilder {
	builder.delVisibleList = delVisibleList
	builder.delVisibleListFlag = true
	return builder
}

func (builder *PatchApplicationContactsRangeReqBodyBuilder) Build() *PatchApplicationContactsRangeReqBody {
	req := &PatchApplicationContactsRangeReqBody{}
	if builder.contactsRangeTypeFlag {
		req.ContactsRangeType = &builder.contactsRangeType
	}
	if builder.addVisibleListFlag {
		req.AddVisibleList = builder.addVisibleList
	}
	if builder.delVisibleListFlag {
		req.DelVisibleList = builder.delVisibleList
	}
	return req
}

type PatchApplicationContactsRangePathReqBodyBuilder struct {
	contactsRangeType     string
	contactsRangeTypeFlag bool
	addVisibleList        *AppContactsRangeIdList
	addVisibleListFlag    bool
	delVisibleList        *AppContactsRangeIdList
	delVisibleListFlag    bool
}

func NewPatchApplicationContactsRangePathReqBodyBuilder() *PatchApplicationContactsRangePathReqBodyBuilder {
	builder := &PatchApplicationContactsRangePathReqBodyBuilder{}
	return builder
}

// 更新范围方式
//
// 示例值：some
func (builder *PatchApplicationContactsRangePathReqBodyBuilder) ContactsRangeType(contactsRangeType string) *PatchApplicationContactsRangePathReqBodyBuilder {
	builder.contactsRangeType = contactsRangeType
	builder.contactsRangeTypeFlag = true
	return builder
}

// 可见范围新增列表
//
// 示例值：
func (builder *PatchApplicationContactsRangePathReqBodyBuilder) AddVisibleList(addVisibleList *AppContactsRangeIdList) *PatchApplicationContactsRangePathReqBodyBuilder {
	builder.addVisibleList = addVisibleList
	builder.addVisibleListFlag = true
	return builder
}

// 删除可用名单
//
// 示例值：
func (builder *PatchApplicationContactsRangePathReqBodyBuilder) DelVisibleList(delVisibleList *AppContactsRangeIdList) *PatchApplicationContactsRangePathReqBodyBuilder {
	builder.delVisibleList = delVisibleList
	builder.delVisibleListFlag = true
	return builder
}

func (builder *PatchApplicationContactsRangePathReqBodyBuilder) Build() (*PatchApplicationContactsRangeReqBody, error) {
	req := &PatchApplicationContactsRangeReqBody{}
	if builder.contactsRangeTypeFlag {
		req.ContactsRangeType = &builder.contactsRangeType
	}
	if builder.addVisibleListFlag {
		req.AddVisibleList = builder.addVisibleList
	}
	if builder.delVisibleListFlag {
		req.DelVisibleList = builder.delVisibleList
	}
	return req, nil
}

type PatchApplicationContactsRangeReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *PatchApplicationContactsRangeReqBody
}

func NewPatchApplicationContactsRangeReqBuilder() *PatchApplicationContactsRangeReqBuilder {
	builder := &PatchApplicationContactsRangeReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 应用id
//
// 示例值：cli_dsfjksdfee1
func (builder *PatchApplicationContactsRangeReqBuilder) AppId(appId string) *PatchApplicationContactsRangeReqBuilder {
	builder.apiReq.PathParams.Set("app_id", fmt.Sprint(appId))
	return builder
}

// 成员id类型
//
// 示例值：open_id
func (builder *PatchApplicationContactsRangeReqBuilder) UserIdType(userIdType string) *PatchApplicationContactsRangeReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

// 部门id 类型
//
// 示例值：open_department_id
func (builder *PatchApplicationContactsRangeReqBuilder) DepartmentIdType(departmentIdType string) *PatchApplicationContactsRangeReqBuilder {
	builder.apiReq.QueryParams.Set("department_id_type", fmt.Sprint(departmentIdType))
	return builder
}

//
func (builder *PatchApplicationContactsRangeReqBuilder) Body(body *PatchApplicationContactsRangeReqBody) *PatchApplicationContactsRangeReqBuilder {
	builder.body = body
	return builder
}

func (builder *PatchApplicationContactsRangeReqBuilder) Build() *PatchApplicationContactsRangeReq {
	req := &PatchApplicationContactsRangeReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.body
	return req
}

type PatchApplicationContactsRangeReqBody struct {
	ContactsRangeType *string `json:"contacts_range_type,omitempty"` // 更新范围方式

	AddVisibleList *AppContactsRangeIdList `json:"add_visible_list,omitempty"` // 可见范围新增列表

	DelVisibleList *AppContactsRangeIdList `json:"del_visible_list,omitempty"` // 删除可用名单
}

type PatchApplicationContactsRangeReq struct {
	apiReq *larkcore.ApiReq
	Body   *PatchApplicationContactsRangeReqBody `body:""`
}

type PatchApplicationContactsRangeResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *PatchApplicationContactsRangeResp) Success() bool {
	return resp.Code == 0
}

type ListApplicationFeedbackReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewListApplicationFeedbackReqBuilder() *ListApplicationFeedbackReqBuilder {
	builder := &ListApplicationFeedbackReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 目标应用 ID（本租户创建的所有应用）
//
// 示例值：cli_9f115af860f7901b
func (builder *ListApplicationFeedbackReqBuilder) AppId(appId string) *ListApplicationFeedbackReqBuilder {
	builder.apiReq.PathParams.Set("app_id", fmt.Sprint(appId))
	return builder
}

// 查询的起始日期，格式为yyyy-mm-dd。不填则默认为当前日期减去180天。
//
// 示例值：2022-01-30
func (builder *ListApplicationFeedbackReqBuilder) FromDate(fromDate string) *ListApplicationFeedbackReqBuilder {
	builder.apiReq.QueryParams.Set("from_date", fmt.Sprint(fromDate))
	return builder
}

// 查询的结束日期，格式为yyyy-mm-dd。不填默认为当前日期。;只能查询 180 天内的数据。
//
// 示例值：2022-01-30
func (builder *ListApplicationFeedbackReqBuilder) ToDate(toDate string) *ListApplicationFeedbackReqBuilder {
	builder.apiReq.QueryParams.Set("to_date", fmt.Sprint(toDate))
	return builder
}

// 反馈类型，不填写则表示查询所有反馈类型。
//
// 示例值：1
func (builder *ListApplicationFeedbackReqBuilder) FeedbackType(feedbackType int) *ListApplicationFeedbackReqBuilder {
	builder.apiReq.QueryParams.Set("feedback_type", fmt.Sprint(feedbackType))
	return builder
}

// 反馈处理状态，不填写则表示查询所有处理类型。
//
// 示例值：0
func (builder *ListApplicationFeedbackReqBuilder) Status(status int) *ListApplicationFeedbackReqBuilder {
	builder.apiReq.QueryParams.Set("status", fmt.Sprint(status))
	return builder
}

//
//
// 示例值：open_id
func (builder *ListApplicationFeedbackReqBuilder) UserIdType(userIdType string) *ListApplicationFeedbackReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

// 分页拉取反馈列表起始位置标示，不填表示从头开始
//
// 示例值："7064688334618378259"
func (builder *ListApplicationFeedbackReqBuilder) PageToken(pageToken string) *ListApplicationFeedbackReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

// 本次拉取反馈列表最大个数
//
// 示例值：100
func (builder *ListApplicationFeedbackReqBuilder) PageSize(pageSize int) *ListApplicationFeedbackReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

func (builder *ListApplicationFeedbackReqBuilder) Build() *ListApplicationFeedbackReq {
	req := &ListApplicationFeedbackReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type ListApplicationFeedbackReq struct {
	apiReq *larkcore.ApiReq
}

type ListApplicationFeedbackRespData struct {
	FeedbackList []*ApplicationFeedback `json:"feedback_list,omitempty"` // 应用的反馈列表

	HasMore *bool `json:"has_more,omitempty"` // 是否还有更多用户反馈列表，true：是，false：否

	PageToken *string `json:"page_token,omitempty"` // 拉取下一页应用反馈列表时使用的 page_token
}

type ListApplicationFeedbackResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ListApplicationFeedbackRespData `json:"data"` // 业务数据
}

func (resp *ListApplicationFeedbackResp) Success() bool {
	return resp.Code == 0
}

type PatchApplicationFeedbackReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewPatchApplicationFeedbackReqBuilder() *PatchApplicationFeedbackReqBuilder {
	builder := &PatchApplicationFeedbackReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 目标应用 ID（本租户创建的所有应用）
//
// 示例值：cli_9f115af860f7901b
func (builder *PatchApplicationFeedbackReqBuilder) AppId(appId string) *PatchApplicationFeedbackReqBuilder {
	builder.apiReq.PathParams.Set("app_id", fmt.Sprint(appId))
	return builder
}

// 应用反馈记录id
//
// 示例值：7057888018203574291
func (builder *PatchApplicationFeedbackReqBuilder) FeedbackId(feedbackId string) *PatchApplicationFeedbackReqBuilder {
	builder.apiReq.PathParams.Set("feedback_id", fmt.Sprint(feedbackId))
	return builder
}

//
//
// 示例值：open_id
func (builder *PatchApplicationFeedbackReqBuilder) UserIdType(userIdType string) *PatchApplicationFeedbackReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

// 反馈处理状态
//
// 示例值：1
func (builder *PatchApplicationFeedbackReqBuilder) Status(status int) *PatchApplicationFeedbackReqBuilder {
	builder.apiReq.QueryParams.Set("status", fmt.Sprint(status))
	return builder
}

// 反馈处理人员id，租户内用户的唯一标识， ID值与查询参数中的user_id_type 对应
//
// 示例值：ou_9565b69967831233761cc2f11b4c089f
func (builder *PatchApplicationFeedbackReqBuilder) OperatorId(operatorId string) *PatchApplicationFeedbackReqBuilder {
	builder.apiReq.QueryParams.Set("operator_id", fmt.Sprint(operatorId))
	return builder
}

func (builder *PatchApplicationFeedbackReqBuilder) Build() *PatchApplicationFeedbackReq {
	req := &PatchApplicationFeedbackReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type PatchApplicationFeedbackReq struct {
	apiReq *larkcore.ApiReq
}

type PatchApplicationFeedbackResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *PatchApplicationFeedbackResp) Success() bool {
	return resp.Code == 0
}

type UpdateApplicationManagementReqBodyBuilder struct {
	enable     bool // 启用/停用应用
	enableFlag bool
}

func NewUpdateApplicationManagementReqBodyBuilder() *UpdateApplicationManagementReqBodyBuilder {
	builder := &UpdateApplicationManagementReqBodyBuilder{}
	return builder
}

// 启用/停用应用
//
//示例值：true
func (builder *UpdateApplicationManagementReqBodyBuilder) Enable(enable bool) *UpdateApplicationManagementReqBodyBuilder {
	builder.enable = enable
	builder.enableFlag = true
	return builder
}

func (builder *UpdateApplicationManagementReqBodyBuilder) Build() *UpdateApplicationManagementReqBody {
	req := &UpdateApplicationManagementReqBody{}
	if builder.enableFlag {
		req.Enable = &builder.enable
	}
	return req
}

type UpdateApplicationManagementPathReqBodyBuilder struct {
	enable     bool
	enableFlag bool
}

func NewUpdateApplicationManagementPathReqBodyBuilder() *UpdateApplicationManagementPathReqBodyBuilder {
	builder := &UpdateApplicationManagementPathReqBodyBuilder{}
	return builder
}

// 启用/停用应用
//
// 示例值：true
func (builder *UpdateApplicationManagementPathReqBodyBuilder) Enable(enable bool) *UpdateApplicationManagementPathReqBodyBuilder {
	builder.enable = enable
	builder.enableFlag = true
	return builder
}

func (builder *UpdateApplicationManagementPathReqBodyBuilder) Build() (*UpdateApplicationManagementReqBody, error) {
	req := &UpdateApplicationManagementReqBody{}
	if builder.enableFlag {
		req.Enable = &builder.enable
	}
	return req, nil
}

type UpdateApplicationManagementReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *UpdateApplicationManagementReqBody
}

func NewUpdateApplicationManagementReqBuilder() *UpdateApplicationManagementReqBuilder {
	builder := &UpdateApplicationManagementReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 应用ID
//
// 示例值：cli_a4517c8461f8100a
func (builder *UpdateApplicationManagementReqBuilder) AppId(appId string) *UpdateApplicationManagementReqBuilder {
	builder.apiReq.PathParams.Set("app_id", fmt.Sprint(appId))
	return builder
}

//
func (builder *UpdateApplicationManagementReqBuilder) Body(body *UpdateApplicationManagementReqBody) *UpdateApplicationManagementReqBuilder {
	builder.body = body
	return builder
}

func (builder *UpdateApplicationManagementReqBuilder) Build() *UpdateApplicationManagementReq {
	req := &UpdateApplicationManagementReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type UpdateApplicationManagementReqBody struct {
	Enable *bool `json:"enable,omitempty"` // 启用/停用应用
}

type UpdateApplicationManagementReq struct {
	apiReq *larkcore.ApiReq
	Body   *UpdateApplicationManagementReqBody `body:""`
}

type UpdateApplicationManagementResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *UpdateApplicationManagementResp) Success() bool {
	return resp.Code == 0
}

type UpdateApplicationOwnerReqBodyBuilder struct {
	ownerId     string // 新的拥有者用户ID，类型由查询参数中的user_id_type确定
	ownerIdFlag bool
}

func NewUpdateApplicationOwnerReqBodyBuilder() *UpdateApplicationOwnerReqBodyBuilder {
	builder := &UpdateApplicationOwnerReqBodyBuilder{}
	return builder
}

// 新的拥有者用户ID，类型由查询参数中的user_id_type确定
//
//示例值：ou_84aad35d084aa403a838cf73ee184670
func (builder *UpdateApplicationOwnerReqBodyBuilder) OwnerId(ownerId string) *UpdateApplicationOwnerReqBodyBuilder {
	builder.ownerId = ownerId
	builder.ownerIdFlag = true
	return builder
}

func (builder *UpdateApplicationOwnerReqBodyBuilder) Build() *UpdateApplicationOwnerReqBody {
	req := &UpdateApplicationOwnerReqBody{}
	if builder.ownerIdFlag {
		req.OwnerId = &builder.ownerId
	}
	return req
}

type UpdateApplicationOwnerPathReqBodyBuilder struct {
	ownerId     string
	ownerIdFlag bool
}

func NewUpdateApplicationOwnerPathReqBodyBuilder() *UpdateApplicationOwnerPathReqBodyBuilder {
	builder := &UpdateApplicationOwnerPathReqBodyBuilder{}
	return builder
}

// 新的拥有者用户ID，类型由查询参数中的user_id_type确定
//
// 示例值：ou_84aad35d084aa403a838cf73ee184670
func (builder *UpdateApplicationOwnerPathReqBodyBuilder) OwnerId(ownerId string) *UpdateApplicationOwnerPathReqBodyBuilder {
	builder.ownerId = ownerId
	builder.ownerIdFlag = true
	return builder
}

func (builder *UpdateApplicationOwnerPathReqBodyBuilder) Build() (*UpdateApplicationOwnerReqBody, error) {
	req := &UpdateApplicationOwnerReqBody{}
	if builder.ownerIdFlag {
		req.OwnerId = &builder.ownerId
	}
	return req, nil
}

type UpdateApplicationOwnerReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *UpdateApplicationOwnerReqBody
}

func NewUpdateApplicationOwnerReqBuilder() *UpdateApplicationOwnerReqBuilder {
	builder := &UpdateApplicationOwnerReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 应用ID
//
// 示例值：cli_a306c5476fb8d00c
func (builder *UpdateApplicationOwnerReqBuilder) AppId(appId string) *UpdateApplicationOwnerReqBuilder {
	builder.apiReq.PathParams.Set("app_id", fmt.Sprint(appId))
	return builder
}

// 用户ID类型
//
// 示例值：open_id
func (builder *UpdateApplicationOwnerReqBuilder) UserIdType(userIdType string) *UpdateApplicationOwnerReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

//
func (builder *UpdateApplicationOwnerReqBuilder) Body(body *UpdateApplicationOwnerReqBody) *UpdateApplicationOwnerReqBuilder {
	builder.body = body
	return builder
}

func (builder *UpdateApplicationOwnerReqBuilder) Build() *UpdateApplicationOwnerReq {
	req := &UpdateApplicationOwnerReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.body
	return req
}

type UpdateApplicationOwnerReqBody struct {
	OwnerId *string `json:"owner_id,omitempty"` // 新的拥有者用户ID，类型由查询参数中的user_id_type确定
}

type UpdateApplicationOwnerReq struct {
	apiReq *larkcore.ApiReq
	Body   *UpdateApplicationOwnerReqBody `body:""`
}

type UpdateApplicationOwnerResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *UpdateApplicationOwnerResp) Success() bool {
	return resp.Code == 0
}

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

	departmentIds     []string // 部门ID列表
	departmentIdsFlag bool

	groupIds     []string // 用户组ID列表
	groupIdsFlag bool
}

func NewCheckWhiteBlackListApplicationVisibilityReqBodyBuilder() *CheckWhiteBlackListApplicationVisibilityReqBodyBuilder {
	builder := &CheckWhiteBlackListApplicationVisibilityReqBodyBuilder{}
	return builder
}

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

// 部门ID列表
//
//示例值：
func (builder *CheckWhiteBlackListApplicationVisibilityReqBodyBuilder) DepartmentIds(departmentIds []string) *CheckWhiteBlackListApplicationVisibilityReqBodyBuilder {
	builder.departmentIds = departmentIds
	builder.departmentIdsFlag = true
	return builder
}

// 用户组ID列表
//
//示例值：
func (builder *CheckWhiteBlackListApplicationVisibilityReqBodyBuilder) GroupIds(groupIds []string) *CheckWhiteBlackListApplicationVisibilityReqBodyBuilder {
	builder.groupIds = groupIds
	builder.groupIdsFlag = true
	return builder
}

func (builder *CheckWhiteBlackListApplicationVisibilityReqBodyBuilder) Build() *CheckWhiteBlackListApplicationVisibilityReqBody {
	req := &CheckWhiteBlackListApplicationVisibilityReqBody{}
	if builder.userIdsFlag {
		req.UserIds = builder.userIds
	}
	if builder.departmentIdsFlag {
		req.DepartmentIds = builder.departmentIds
	}
	if builder.groupIdsFlag {
		req.GroupIds = builder.groupIds
	}
	return req
}

type CheckWhiteBlackListApplicationVisibilityPathReqBodyBuilder struct {
	userIds           []string
	userIdsFlag       bool
	departmentIds     []string
	departmentIdsFlag bool
	groupIds          []string
	groupIdsFlag      bool
}

func NewCheckWhiteBlackListApplicationVisibilityPathReqBodyBuilder() *CheckWhiteBlackListApplicationVisibilityPathReqBodyBuilder {
	builder := &CheckWhiteBlackListApplicationVisibilityPathReqBodyBuilder{}
	return builder
}

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

// 部门ID列表
//
// 示例值：
func (builder *CheckWhiteBlackListApplicationVisibilityPathReqBodyBuilder) DepartmentIds(departmentIds []string) *CheckWhiteBlackListApplicationVisibilityPathReqBodyBuilder {
	builder.departmentIds = departmentIds
	builder.departmentIdsFlag = true
	return builder
}

// 用户组ID列表
//
// 示例值：
func (builder *CheckWhiteBlackListApplicationVisibilityPathReqBodyBuilder) GroupIds(groupIds []string) *CheckWhiteBlackListApplicationVisibilityPathReqBodyBuilder {
	builder.groupIds = groupIds
	builder.groupIdsFlag = true
	return builder
}

func (builder *CheckWhiteBlackListApplicationVisibilityPathReqBodyBuilder) Build() (*CheckWhiteBlackListApplicationVisibilityReqBody, error) {
	req := &CheckWhiteBlackListApplicationVisibilityReqBody{}
	if builder.userIdsFlag {
		req.UserIds = builder.userIds
	}
	if builder.departmentIdsFlag {
		req.DepartmentIds = builder.departmentIds
	}
	if builder.groupIdsFlag {
		req.GroupIds = builder.groupIds
	}
	return req, nil
}

type CheckWhiteBlackListApplicationVisibilityReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *CheckWhiteBlackListApplicationVisibilityReqBody
}

func NewCheckWhiteBlackListApplicationVisibilityReqBuilder() *CheckWhiteBlackListApplicationVisibilityReqBuilder {
	builder := &CheckWhiteBlackListApplicationVisibilityReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 目标应用ID
//
// 示例值：cli_a3a3d00b40b8d01b
func (builder *CheckWhiteBlackListApplicationVisibilityReqBuilder) AppId(appId string) *CheckWhiteBlackListApplicationVisibilityReqBuilder {
	builder.apiReq.PathParams.Set("app_id", fmt.Sprint(appId))
	return builder
}

// 此次请求传参中的user_id的类型
//
// 示例值：user_id
func (builder *CheckWhiteBlackListApplicationVisibilityReqBuilder) UserIdType(userIdType string) *CheckWhiteBlackListApplicationVisibilityReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

// 此次请求传参中的department_id的类型
//
// 示例值：department_id
func (builder *CheckWhiteBlackListApplicationVisibilityReqBuilder) DepartmentIdType(departmentIdType string) *CheckWhiteBlackListApplicationVisibilityReqBuilder {
	builder.apiReq.QueryParams.Set("department_id_type", fmt.Sprint(departmentIdType))
	return builder
}

//
func (builder *CheckWhiteBlackListApplicationVisibilityReqBuilder) Body(body *CheckWhiteBlackListApplicationVisibilityReqBody) *CheckWhiteBlackListApplicationVisibilityReqBuilder {
	builder.body = body
	return builder
}

func (builder *CheckWhiteBlackListApplicationVisibilityReqBuilder) Build() *CheckWhiteBlackListApplicationVisibilityReq {
	req := &CheckWhiteBlackListApplicationVisibilityReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.body
	return req
}

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

	DepartmentIds []string `json:"department_ids,omitempty"` // 部门ID列表

	GroupIds []string `json:"group_ids,omitempty"` // 用户组ID列表
}

type CheckWhiteBlackListApplicationVisibilityReq struct {
	apiReq *larkcore.ApiReq
	Body   *CheckWhiteBlackListApplicationVisibilityReqBody `body:""`
}

type CheckWhiteBlackListApplicationVisibilityRespData struct {
	UserVisibilityList []*ApplicationVisibilityUserWhiteBlackInfo `json:"user_visibility_list,omitempty"` // 用户可见性信息列表

	DepartmentVisibilityList []*ApplicationVisibilityDepartmentWhiteBlackInfo `json:"department_visibility_list,omitempty"` // 部门可见性信息列表

	GroupVisibilityList []*ApplicationVisibilityGroupWhiteBlackInfo `json:"group_visibility_list,omitempty"` // 用户组可见性信息列表
}

type CheckWhiteBlackListApplicationVisibilityResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *CheckWhiteBlackListApplicationVisibilityRespData `json:"data"` // 业务数据
}

func (resp *CheckWhiteBlackListApplicationVisibilityResp) Success() bool {
	return resp.Code == 0
}

type PatchApplicationVisibilityReqBodyBuilder struct {
	addVisibleList     *AppVisibilityIdList // 添加可用人员名单
	addVisibleListFlag bool

	delVisibleList     *AppVisibilityIdList // 删除可用人员名单
	delVisibleListFlag bool

	addInvisibleList     *AppVisibilityIdList // 添加禁用人员名单
	addInvisibleListFlag bool

	delInvisibleList     *AppVisibilityIdList // 删除禁用人员名单
	delInvisibleListFlag bool

	isVisibleToAll     bool // 是否全员可见,false:否;true:是;不填:继续当前状态不改变.如果可见范围为全员后添加的可用人员则无效,禁用人员仍然有效
	isVisibleToAllFlag bool
}

func NewPatchApplicationVisibilityReqBodyBuilder() *PatchApplicationVisibilityReqBodyBuilder {
	builder := &PatchApplicationVisibilityReqBodyBuilder{}
	return builder
}

// 添加可用人员名单
//
//示例值：
func (builder *PatchApplicationVisibilityReqBodyBuilder) AddVisibleList(addVisibleList *AppVisibilityIdList) *PatchApplicationVisibilityReqBodyBuilder {
	builder.addVisibleList = addVisibleList
	builder.addVisibleListFlag = true
	return builder
}

// 删除可用人员名单
//
//示例值：
func (builder *PatchApplicationVisibilityReqBodyBuilder) DelVisibleList(delVisibleList *AppVisibilityIdList) *PatchApplicationVisibilityReqBodyBuilder {
	builder.delVisibleList = delVisibleList
	builder.delVisibleListFlag = true
	return builder
}

// 添加禁用人员名单
//
//示例值：
func (builder *PatchApplicationVisibilityReqBodyBuilder) AddInvisibleList(addInvisibleList *AppVisibilityIdList) *PatchApplicationVisibilityReqBodyBuilder {
	builder.addInvisibleList = addInvisibleList
	builder.addInvisibleListFlag = true
	return builder
}

// 删除禁用人员名单
//
//示例值：
func (builder *PatchApplicationVisibilityReqBodyBuilder) DelInvisibleList(delInvisibleList *AppVisibilityIdList) *PatchApplicationVisibilityReqBodyBuilder {
	builder.delInvisibleList = delInvisibleList
	builder.delInvisibleListFlag = true
	return builder
}

// 是否全员可见,false:否;true:是;不填:继续当前状态不改变.如果可见范围为全员后添加的可用人员则无效,禁用人员仍然有效
//
//示例值：false
func (builder *PatchApplicationVisibilityReqBodyBuilder) IsVisibleToAll(isVisibleToAll bool) *PatchApplicationVisibilityReqBodyBuilder {
	builder.isVisibleToAll = isVisibleToAll
	builder.isVisibleToAllFlag = true
	return builder
}

func (builder *PatchApplicationVisibilityReqBodyBuilder) Build() *PatchApplicationVisibilityReqBody {
	req := &PatchApplicationVisibilityReqBody{}
	if builder.addVisibleListFlag {
		req.AddVisibleList = builder.addVisibleList
	}
	if builder.delVisibleListFlag {
		req.DelVisibleList = builder.delVisibleList
	}
	if builder.addInvisibleListFlag {
		req.AddInvisibleList = builder.addInvisibleList
	}
	if builder.delInvisibleListFlag {
		req.DelInvisibleList = builder.delInvisibleList
	}
	if builder.isVisibleToAllFlag {
		req.IsVisibleToAll = &builder.isVisibleToAll
	}
	return req
}

type PatchApplicationVisibilityPathReqBodyBuilder struct {
	addVisibleList       *AppVisibilityIdList
	addVisibleListFlag   bool
	delVisibleList       *AppVisibilityIdList
	delVisibleListFlag   bool
	addInvisibleList     *AppVisibilityIdList
	addInvisibleListFlag bool
	delInvisibleList     *AppVisibilityIdList
	delInvisibleListFlag bool
	isVisibleToAll       bool
	isVisibleToAllFlag   bool
}

func NewPatchApplicationVisibilityPathReqBodyBuilder() *PatchApplicationVisibilityPathReqBodyBuilder {
	builder := &PatchApplicationVisibilityPathReqBodyBuilder{}
	return builder
}

// 添加可用人员名单
//
// 示例值：
func (builder *PatchApplicationVisibilityPathReqBodyBuilder) AddVisibleList(addVisibleList *AppVisibilityIdList) *PatchApplicationVisibilityPathReqBodyBuilder {
	builder.addVisibleList = addVisibleList
	builder.addVisibleListFlag = true
	return builder
}

// 删除可用人员名单
//
// 示例值：
func (builder *PatchApplicationVisibilityPathReqBodyBuilder) DelVisibleList(delVisibleList *AppVisibilityIdList) *PatchApplicationVisibilityPathReqBodyBuilder {
	builder.delVisibleList = delVisibleList
	builder.delVisibleListFlag = true
	return builder
}

// 添加禁用人员名单
//
// 示例值：
func (builder *PatchApplicationVisibilityPathReqBodyBuilder) AddInvisibleList(addInvisibleList *AppVisibilityIdList) *PatchApplicationVisibilityPathReqBodyBuilder {
	builder.addInvisibleList = addInvisibleList
	builder.addInvisibleListFlag = true
	return builder
}

// 删除禁用人员名单
//
// 示例值：
func (builder *PatchApplicationVisibilityPathReqBodyBuilder) DelInvisibleList(delInvisibleList *AppVisibilityIdList) *PatchApplicationVisibilityPathReqBodyBuilder {
	builder.delInvisibleList = delInvisibleList
	builder.delInvisibleListFlag = true
	return builder
}

// 是否全员可见,false:否;true:是;不填:继续当前状态不改变.如果可见范围为全员后添加的可用人员则无效,禁用人员仍然有效
//
// 示例值：false
func (builder *PatchApplicationVisibilityPathReqBodyBuilder) IsVisibleToAll(isVisibleToAll bool) *PatchApplicationVisibilityPathReqBodyBuilder {
	builder.isVisibleToAll = isVisibleToAll
	builder.isVisibleToAllFlag = true
	return builder
}

func (builder *PatchApplicationVisibilityPathReqBodyBuilder) Build() (*PatchApplicationVisibilityReqBody, error) {
	req := &PatchApplicationVisibilityReqBody{}
	if builder.addVisibleListFlag {
		req.AddVisibleList = builder.addVisibleList
	}
	if builder.delVisibleListFlag {
		req.DelVisibleList = builder.delVisibleList
	}
	if builder.addInvisibleListFlag {
		req.AddInvisibleList = builder.addInvisibleList
	}
	if builder.delInvisibleListFlag {
		req.DelInvisibleList = builder.delInvisibleList
	}
	if builder.isVisibleToAllFlag {
		req.IsVisibleToAll = &builder.isVisibleToAll
	}
	return req, nil
}

type PatchApplicationVisibilityReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *PatchApplicationVisibilityReqBody
}

func NewPatchApplicationVisibilityReqBuilder() *PatchApplicationVisibilityReqBuilder {
	builder := &PatchApplicationVisibilityReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 应用id
//
// 示例值：cli_9b445f5258795107
func (builder *PatchApplicationVisibilityReqBuilder) AppId(appId string) *PatchApplicationVisibilityReqBuilder {
	builder.apiReq.PathParams.Set("app_id", fmt.Sprint(appId))
	return builder
}

// 部门id 类型
//
// 示例值：open_department_id
func (builder *PatchApplicationVisibilityReqBuilder) DepartmentIdType(departmentIdType string) *PatchApplicationVisibilityReqBuilder {
	builder.apiReq.QueryParams.Set("department_id_type", fmt.Sprint(departmentIdType))
	return builder
}

// open_id 类型
//
// 示例值：open_id
func (builder *PatchApplicationVisibilityReqBuilder) UserIdType(userIdType string) *PatchApplicationVisibilityReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

//
func (builder *PatchApplicationVisibilityReqBuilder) Body(body *PatchApplicationVisibilityReqBody) *PatchApplicationVisibilityReqBuilder {
	builder.body = body
	return builder
}

func (builder *PatchApplicationVisibilityReqBuilder) Build() *PatchApplicationVisibilityReq {
	req := &PatchApplicationVisibilityReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.body
	return req
}

type PatchApplicationVisibilityReqBody struct {
	AddVisibleList *AppVisibilityIdList `json:"add_visible_list,omitempty"` // 添加可用人员名单

	DelVisibleList *AppVisibilityIdList `json:"del_visible_list,omitempty"` // 删除可用人员名单

	AddInvisibleList *AppVisibilityIdList `json:"add_invisible_list,omitempty"` // 添加禁用人员名单

	DelInvisibleList *AppVisibilityIdList `json:"del_invisible_list,omitempty"` // 删除禁用人员名单

	IsVisibleToAll *bool `json:"is_visible_to_all,omitempty"` // 是否全员可见,false:否;true:是;不填:继续当前状态不改变.如果可见范围为全员后添加的可用人员则无效,禁用人员仍然有效
}

type PatchApplicationVisibilityReq struct {
	apiReq *larkcore.ApiReq
	Body   *PatchApplicationVisibilityReqBody `body:""`
}

type PatchApplicationVisibilityResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *PatchApplicationVisibilityResp) Success() bool {
	return resp.Code == 0
}

type ApplyScopeResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *ApplyScopeResp) Success() bool {
	return resp.Code == 0
}

type ListScopeRespData struct {
	Scopes []*Scope `json:"scopes,omitempty"` //
}

type ListScopeResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ListScopeRespData `json:"data"` // 业务数据
}

func (resp *ListScopeResp) Success() bool {
	return resp.Code == 0
}

type P2ApplicationCreatedV6Data struct {
	OperatorId *UserId `json:"operator_id,omitempty"` // 用户 ID

	AppId *string `json:"app_id,omitempty"` // 应用 ID

	Name *string `json:"name,omitempty"` // 应用名称

	Description *string `json:"description,omitempty"` // 应用描述

	Avatar *string `json:"avatar,omitempty"` // 应用图标链接

	AppSceneType *int `json:"app_scene_type,omitempty"` // 应用类型，0: 自建应用，1: 应用商店应用

	PrimaryLanguage *string `json:"primary_language,omitempty"` // 应用主语言

	CreateSource *string `json:"create_source,omitempty"` // 应用创建来源
}

type P2ApplicationCreatedV6 struct {
	*larkevent.EventV2Base                             // 事件基础数据
	*larkevent.EventReq                                // 请求原生数据
	Event                  *P2ApplicationCreatedV6Data `json:"event"` // 事件内容
}

func (m *P2ApplicationCreatedV6) RawReq(req *larkevent.EventReq) {
	m.EventReq = req
}

type P2ApplicationAppVersionAuditV6Data struct {
	OperatorId *UserId `json:"operator_id,omitempty"` // 通过 / 拒绝应用审核的管理员 id

	VersionId *string `json:"version_id,omitempty"` // 被审核的应用版本 id

	CreatorId *UserId `json:"creator_id,omitempty"` // 应用创建者的 id

	AppId *string `json:"app_id,omitempty"` // 撤回应用的 id

	Operation *string `json:"operation,omitempty"` // 审核通过 / 拒绝

	Remark *string `json:"remark,omitempty"` // 审核信息，当审核拒绝时，管理员填写的拒绝理由

	AuditSource *string `json:"audit_source,omitempty"` // 应用审核的方式
}

type P2ApplicationAppVersionAuditV6 struct {
	*larkevent.EventV2Base                                     // 事件基础数据
	*larkevent.EventReq                                        // 请求原生数据
	Event                  *P2ApplicationAppVersionAuditV6Data `json:"event"` // 事件内容
}

func (m *P2ApplicationAppVersionAuditV6) RawReq(req *larkevent.EventReq) {
	m.EventReq = req
}

type P2ApplicationAppVersionPublishApplyV6Data struct {
	OperatorId *UserId `json:"operator_id,omitempty"` // 用户 ID

	OnlineVersion *ApplicationAppVersionEvent `json:"online_version,omitempty"` // 当前线上版本信息

	UnderAuditVersion *ApplicationAppVersionEvent `json:"under_audit_version,omitempty"` // 当前在审核的应用版本

	AppStatus *int `json:"app_status,omitempty"` // 应用状态
}

type P2ApplicationAppVersionPublishApplyV6 struct {
	*larkevent.EventV2Base                                            // 事件基础数据
	*larkevent.EventReq                                               // 请求原生数据
	Event                  *P2ApplicationAppVersionPublishApplyV6Data `json:"event"` // 事件内容
}

func (m *P2ApplicationAppVersionPublishApplyV6) RawReq(req *larkevent.EventReq) {
	m.EventReq = req
}

type P2ApplicationAppVersionPublishRevokeV6Data struct {
	OperatorId *UserId `json:"operator_id,omitempty"` // 用户 ID

	CreatorId *UserId `json:"creator_id,omitempty"` // 用户 ID

	AppId *string `json:"app_id,omitempty"` // 撤回应用的 id

	VersionId *string `json:"version_id,omitempty"` // 撤回应用的版本 id
}

type P2ApplicationAppVersionPublishRevokeV6 struct {
	*larkevent.EventV2Base                                             // 事件基础数据
	*larkevent.EventReq                                                // 请求原生数据
	Event                  *P2ApplicationAppVersionPublishRevokeV6Data `json:"event"` // 事件内容
}

func (m *P2ApplicationAppVersionPublishRevokeV6) RawReq(req *larkevent.EventReq) {
	m.EventReq = req
}

type P2ApplicationFeedbackCreatedV6Data struct {
	UserId *UserId `json:"user_id,omitempty"` // 用户 ID

	AppId *string `json:"app_id,omitempty"` // 被反馈应用 ID

	FeedbackTime *string `json:"feedback_time,omitempty"` // 反馈提交时间，格式为yyyy-mm-dd hh:mm:ss

	TenantName *string `json:"tenant_name,omitempty"` // 反馈用户的租户名

	FeedbackType *int `json:"feedback_type,omitempty"` // 反馈类型（枚举值，1：故障反馈，2：产品建议）

	FaultType []int `json:"fault_type,omitempty"` // 故障类型列表：1: 黑屏 2: 白屏 3: 无法打开小程序  4: 卡顿 5: 小程序闪退 6: 页面加载慢 7: 死机 8: 其他异常

	FaultTime *string `json:"fault_time,omitempty"` // 故障时间，格式为yyyy-mm-dd hh:mm:ss

	Source *int `json:"source,omitempty"` // 反馈来源：1： 小程序 2：网页应用 3：机器人 4：webSDK

	Contact *string `json:"contact,omitempty"` // 用户填写的联系方式

	Description *string `json:"description,omitempty"` // 反馈详情

	Images []string `json:"images,omitempty"` // 反馈图片url列表，url 过期时间三天

	FeedbackId *string `json:"feedback_id,omitempty"` // 应用反馈 ID，应用反馈记录唯一标识

	FeedbackPath *string `json:"feedback_path,omitempty"` // 反馈页面路径
}

type P2ApplicationFeedbackCreatedV6 struct {
	*larkevent.EventV2Base                                     // 事件基础数据
	*larkevent.EventReq                                        // 请求原生数据
	Event                  *P2ApplicationFeedbackCreatedV6Data `json:"event"` // 事件内容
}

func (m *P2ApplicationFeedbackCreatedV6) RawReq(req *larkevent.EventReq) {
	m.EventReq = req
}

type P2ApplicationFeedbackUpdatedV6Data struct {
	FeedbackIds []string `json:"feedback_ids,omitempty"` // 反馈id列表

	Status *int `json:"status,omitempty"` // 反馈处理状态（枚举值，0: 未处理  1: 已处理  2: 处理中 3: 已关闭）

	AppId *string `json:"app_id,omitempty"` // 应用的 app_id

	UpdateTime *string `json:"update_time,omitempty"` // 反馈处理时间，格式为yyyy-mm-dd hh:mm:ss

	OperatorId *UserId `json:"operator_id,omitempty"` // 操作者用户 ID
}

type P2ApplicationFeedbackUpdatedV6 struct {
	*larkevent.EventV2Base                                     // 事件基础数据
	*larkevent.EventReq                                        // 请求原生数据
	Event                  *P2ApplicationFeedbackUpdatedV6Data `json:"event"` // 事件内容
}

func (m *P2ApplicationFeedbackUpdatedV6) RawReq(req *larkevent.EventReq) {
	m.EventReq = req
}

type P2ApplicationVisibilityAddedV6Data struct {
	Users []*User `json:"users,omitempty"` //

	Source *int `json:"source,omitempty"` //
}

type P2ApplicationVisibilityAddedV6 struct {
	*larkevent.EventV2Base                                     // 事件基础数据
	*larkevent.EventReq                                        // 请求原生数据
	Event                  *P2ApplicationVisibilityAddedV6Data `json:"event"` // 事件内容
}

func (m *P2ApplicationVisibilityAddedV6) RawReq(req *larkevent.EventReq) {
	m.EventReq = req
}

type P2BotMenuV6Data struct {
	Operator *Operator `json:"operator,omitempty"` // 用户信息

	EventKey *string `json:"event_key,omitempty"` // 菜单事件的唯一标识

	Timestamp *int64 `json:"timestamp,omitempty"` // 用户点击菜单时间
}

type P2BotMenuV6 struct {
	*larkevent.EventV2Base                  // 事件基础数据
	*larkevent.EventReq                     // 请求原生数据
	Event                  *P2BotMenuV6Data `json:"event"` // 事件内容
}

func (m *P2BotMenuV6) RawReq(req *larkevent.EventReq) {
	m.EventReq = req
}

type ListAppRecommendRuleIterator struct {
	nextPageToken *string
	items         []*AppRecommendRule
	index         int
	limit         int
	ctx           context.Context
	req           *ListAppRecommendRuleReq
	listFunc      func(ctx context.Context, req *ListAppRecommendRuleReq, options ...larkcore.RequestOptionFunc) (*ListAppRecommendRuleResp, error)
	options       []larkcore.RequestOptionFunc
	curlNum       int
}

func (iterator *ListAppRecommendRuleIterator) Next() (bool, *AppRecommendRule, 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.Rules) == 0 {
			return false, nil, nil
		}

		iterator.nextPageToken = resp.Data.PageToken
		iterator.items = resp.Data.Rules
		iterator.index = 0
	}

	block := iterator.items[iterator.index]
	iterator.index++
	iterator.curlNum++
	return true, block, nil
}

func (iterator *ListAppRecommendRuleIterator) NextPageToken() *string {
	return iterator.nextPageToken
}

type ListApplicationIterator struct {
	nextPageToken *string
	items         []*Application
	index         int
	limit         int
	ctx           context.Context
	req           *ListApplicationReq
	listFunc      func(ctx context.Context, req *ListApplicationReq, options ...larkcore.RequestOptionFunc) (*ListApplicationResp, error)
	options       []larkcore.RequestOptionFunc
	curlNum       int
}

func (iterator *ListApplicationIterator) Next() (bool, *Application, 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.AppList) == 0 {
			return false, nil, nil
		}

		iterator.nextPageToken = resp.Data.PageToken
		iterator.items = resp.Data.AppList
		iterator.index = 0
	}

	block := iterator.items[iterator.index]
	iterator.index++
	iterator.curlNum++
	return true, block, nil
}

func (iterator *ListApplicationIterator) NextPageToken() *string {
	return iterator.nextPageToken
}

type UnderauditlistApplicationIterator struct {
	nextPageToken *string
	items         []*Application
	index         int
	limit         int
	ctx           context.Context
	req           *UnderauditlistApplicationReq
	listFunc      func(ctx context.Context, req *UnderauditlistApplicationReq, options ...larkcore.RequestOptionFunc) (*UnderauditlistApplicationResp, error)
	options       []larkcore.RequestOptionFunc
	curlNum       int
}

func (iterator *UnderauditlistApplicationIterator) Next() (bool, *Application, 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 *UnderauditlistApplicationIterator) NextPageToken() *string {
	return iterator.nextPageToken
}

type ListApplicationAppVersionIterator struct {
	nextPageToken *string
	items         []*ApplicationAppVersion
	index         int
	limit         int
	ctx           context.Context
	req           *ListApplicationAppVersionReq
	listFunc      func(ctx context.Context, req *ListApplicationAppVersionReq, options ...larkcore.RequestOptionFunc) (*ListApplicationAppVersionResp, error)
	options       []larkcore.RequestOptionFunc
	curlNum       int
}

func (iterator *ListApplicationAppVersionIterator) Next() (bool, *ApplicationAppVersion, 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 *ListApplicationAppVersionIterator) NextPageToken() *string {
	return iterator.nextPageToken
}
