// Package apaas 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 larkapaas

import (
	"fmt"
	"io"

	"context"
	"errors"

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

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

const (
	MetadataOptionMetadataOptionLabel        = "Label"        // 只返回 Label
	MetadataOptionMetadataOptionSearchLayout = "SearchLayout" // 返回搜索布局信息
)

const (
	SeatTypePerUser       = "per_user"         // 平台席位
	SeatTypePerUserPerApp = "per_user_per_app" // 应用席位
)

const (
	SeatTypeListSeatAssignmentPerUser       = "per_user"         // 平台席位
	SeatTypeListSeatAssignmentPerUserPerApp = "per_user_per_app" // 应用访问席位
)

type AllowedRollbaclkTaskItemType struct {
	Id *string `json:"id,omitempty"` // 任务ID

	ActivityLabel []*I18n `json:"activity_label,omitempty"` // 任务对应的活动名称

	IsStart *bool `json:"is_start,omitempty"` // 是否开始节点
}

type AllowedRollbaclkTaskItemTypeBuilder struct {
	id     string // 任务ID
	idFlag bool

	activityLabel     []*I18n // 任务对应的活动名称
	activityLabelFlag bool

	isStart     bool // 是否开始节点
	isStartFlag bool
}

func NewAllowedRollbaclkTaskItemTypeBuilder() *AllowedRollbaclkTaskItemTypeBuilder {
	builder := &AllowedRollbaclkTaskItemTypeBuilder{}
	return builder
}

// 任务ID
//
// 示例值：1234
func (builder *AllowedRollbaclkTaskItemTypeBuilder) Id(id string) *AllowedRollbaclkTaskItemTypeBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 任务对应的活动名称
//
// 示例值：
func (builder *AllowedRollbaclkTaskItemTypeBuilder) ActivityLabel(activityLabel []*I18n) *AllowedRollbaclkTaskItemTypeBuilder {
	builder.activityLabel = activityLabel
	builder.activityLabelFlag = true
	return builder
}

// 是否开始节点
//
// 示例值：
func (builder *AllowedRollbaclkTaskItemTypeBuilder) IsStart(isStart bool) *AllowedRollbaclkTaskItemTypeBuilder {
	builder.isStart = isStart
	builder.isStartFlag = true
	return builder
}

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

	}
	if builder.activityLabelFlag {
		req.ActivityLabel = builder.activityLabel
	}
	if builder.isStartFlag {
		req.IsStart = &builder.isStart

	}
	return req
}

type App struct {
	Name []*I18n `json:"name,omitempty"` //   aPaaS 产品应用的名称

	Namespace *string `json:"namespace,omitempty"` // aPaaS 产品应用的命名空间

	CreatedAt *int `json:"created_at,omitempty"` // aPaaS 产品应用的创建时间

	Creator *int `json:"creator,omitempty"` // aPaaS 产品应用的创建者

	Owner *int `json:"owner,omitempty"` // aPaaS 产品应用的所有者

	Status *string `json:"status,omitempty"` // aPaaS 产品应用的状态

	AppRolesInfo *AppRolesInfo `json:"app_roles_info,omitempty"` // aPaaS 产品应用的成员管理信息

	Icon *string `json:"icon,omitempty"` // aPaaS 产品应用的图标

	Description []*I18n `json:"description,omitempty"` // aPaaS 产品应用的描述

	Type *string `json:"type,omitempty"` // aPaaS 产品应用的类型

	EnableStatus *string `json:"enable_status,omitempty"` // aPaaS 产品应用的启用状态

	ReleaseStatus *string `json:"release_status,omitempty"` // aPaaS 产品应用的发布状态

	ServiceStatus *string `json:"service_status,omitempty"` // aPaaS 产品应用的服务状态

	ServiceUnavailableReason *string `json:"service_unavailable_reason,omitempty"` // aPaaS 产品应用的停服原因

	FeatureSet *string `json:"feature_set,omitempty"` // aPaaS 产品应用的版本

	ChargeMode *string `json:"charge_mode,omitempty"` // aPaaS 产品应用的计费方式

	IsvTenant *ClientIsvTenant `json:"isv_tenant,omitempty"` // aPaaS 产品应用的服务商信息
}

type AppBuilder struct {
	name     []*I18n //   aPaaS 产品应用的名称
	nameFlag bool

	namespace     string // aPaaS 产品应用的命名空间
	namespaceFlag bool

	createdAt     int // aPaaS 产品应用的创建时间
	createdAtFlag bool

	creator     int // aPaaS 产品应用的创建者
	creatorFlag bool

	owner     int // aPaaS 产品应用的所有者
	ownerFlag bool

	status     string // aPaaS 产品应用的状态
	statusFlag bool

	appRolesInfo     *AppRolesInfo // aPaaS 产品应用的成员管理信息
	appRolesInfoFlag bool

	icon     string // aPaaS 产品应用的图标
	iconFlag bool

	description     []*I18n // aPaaS 产品应用的描述
	descriptionFlag bool

	type_    string // aPaaS 产品应用的类型
	typeFlag bool

	enableStatus     string // aPaaS 产品应用的启用状态
	enableStatusFlag bool

	releaseStatus     string // aPaaS 产品应用的发布状态
	releaseStatusFlag bool

	serviceStatus     string // aPaaS 产品应用的服务状态
	serviceStatusFlag bool

	serviceUnavailableReason     string // aPaaS 产品应用的停服原因
	serviceUnavailableReasonFlag bool

	featureSet     string // aPaaS 产品应用的版本
	featureSetFlag bool

	chargeMode     string // aPaaS 产品应用的计费方式
	chargeModeFlag bool

	isvTenant     *ClientIsvTenant // aPaaS 产品应用的服务商信息
	isvTenantFlag bool
}

func NewAppBuilder() *AppBuilder {
	builder := &AppBuilder{}
	return builder
}

//   aPaaS 产品应用的名称
//
// 示例值：
func (builder *AppBuilder) Name(name []*I18n) *AppBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// aPaaS 产品应用的命名空间
//
// 示例值：package_35f605__c
func (builder *AppBuilder) Namespace(namespace string) *AppBuilder {
	builder.namespace = namespace
	builder.namespaceFlag = true
	return builder
}

// aPaaS 产品应用的创建时间
//
// 示例值：1736480945563
func (builder *AppBuilder) CreatedAt(createdAt int) *AppBuilder {
	builder.createdAt = createdAt
	builder.createdAtFlag = true
	return builder
}

// aPaaS 产品应用的创建者
//
// 示例值：1818624575806604
func (builder *AppBuilder) Creator(creator int) *AppBuilder {
	builder.creator = creator
	builder.creatorFlag = true
	return builder
}

// aPaaS 产品应用的所有者
//
// 示例值：1818624575806604
func (builder *AppBuilder) Owner(owner int) *AppBuilder {
	builder.owner = owner
	builder.ownerFlag = true
	return builder
}

// aPaaS 产品应用的状态
//
// 示例值：enabled
func (builder *AppBuilder) Status(status string) *AppBuilder {
	builder.status = status
	builder.statusFlag = true
	return builder
}

// aPaaS 产品应用的成员管理信息
//
// 示例值：
func (builder *AppBuilder) AppRolesInfo(appRolesInfo *AppRolesInfo) *AppBuilder {
	builder.appRolesInfo = appRolesInfo
	builder.appRolesInfoFlag = true
	return builder
}

// aPaaS 产品应用的图标
//
// 示例值：https://ae.feishu.cn/img/namespaces/_global/download/namespace_8aed421832fa4586968596f70e6eaebd_p.jpg
func (builder *AppBuilder) Icon(icon string) *AppBuilder {
	builder.icon = icon
	builder.iconFlag = true
	return builder
}

// aPaaS 产品应用的描述
//
// 示例值：
func (builder *AppBuilder) Description(description []*I18n) *AppBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// aPaaS 产品应用的类型
//
// 示例值：custom
func (builder *AppBuilder) Type(type_ string) *AppBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// aPaaS 产品应用的启用状态
//
// 示例值：enabled
func (builder *AppBuilder) EnableStatus(enableStatus string) *AppBuilder {
	builder.enableStatus = enableStatus
	builder.enableStatusFlag = true
	return builder
}

// aPaaS 产品应用的发布状态
//
// 示例值：released
func (builder *AppBuilder) ReleaseStatus(releaseStatus string) *AppBuilder {
	builder.releaseStatus = releaseStatus
	builder.releaseStatusFlag = true
	return builder
}

// aPaaS 产品应用的服务状态
//
// 示例值：available
func (builder *AppBuilder) ServiceStatus(serviceStatus string) *AppBuilder {
	builder.serviceStatus = serviceStatus
	builder.serviceStatusFlag = true
	return builder
}

// aPaaS 产品应用的停服原因
//
// 示例值：entitlement_expire
func (builder *AppBuilder) ServiceUnavailableReason(serviceUnavailableReason string) *AppBuilder {
	builder.serviceUnavailableReason = serviceUnavailableReason
	builder.serviceUnavailableReasonFlag = true
	return builder
}

// aPaaS 产品应用的版本
//
// 示例值：paid
func (builder *AppBuilder) FeatureSet(featureSet string) *AppBuilder {
	builder.featureSet = featureSet
	builder.featureSetFlag = true
	return builder
}

// aPaaS 产品应用的计费方式
//
// 示例值：per_user_per_app
func (builder *AppBuilder) ChargeMode(chargeMode string) *AppBuilder {
	builder.chargeMode = chargeMode
	builder.chargeModeFlag = true
	return builder
}

// aPaaS 产品应用的服务商信息
//
// 示例值：
func (builder *AppBuilder) IsvTenant(isvTenant *ClientIsvTenant) *AppBuilder {
	builder.isvTenant = isvTenant
	builder.isvTenantFlag = true
	return builder
}

func (builder *AppBuilder) Build() *App {
	req := &App{}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.namespaceFlag {
		req.Namespace = &builder.namespace

	}
	if builder.createdAtFlag {
		req.CreatedAt = &builder.createdAt

	}
	if builder.creatorFlag {
		req.Creator = &builder.creator

	}
	if builder.ownerFlag {
		req.Owner = &builder.owner

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

	}
	if builder.appRolesInfoFlag {
		req.AppRolesInfo = builder.appRolesInfo
	}
	if builder.iconFlag {
		req.Icon = &builder.icon

	}
	if builder.descriptionFlag {
		req.Description = builder.description
	}
	if builder.typeFlag {
		req.Type = &builder.type_

	}
	if builder.enableStatusFlag {
		req.EnableStatus = &builder.enableStatus

	}
	if builder.releaseStatusFlag {
		req.ReleaseStatus = &builder.releaseStatus

	}
	if builder.serviceStatusFlag {
		req.ServiceStatus = &builder.serviceStatus

	}
	if builder.serviceUnavailableReasonFlag {
		req.ServiceUnavailableReason = &builder.serviceUnavailableReason

	}
	if builder.featureSetFlag {
		req.FeatureSet = &builder.featureSet

	}
	if builder.chargeModeFlag {
		req.ChargeMode = &builder.chargeMode

	}
	if builder.isvTenantFlag {
		req.IsvTenant = builder.isvTenant
	}
	return req
}

type AppEnv struct {
	DevId *string `json:"dev_id,omitempty"` // 开发环境ID

	TestId *string `json:"test_id,omitempty"` // 测试环境ID

	ProdId *string `json:"prod_id,omitempty"` // 生产环境ID
}

type AppEnvBuilder struct {
	devId     string // 开发环境ID
	devIdFlag bool

	testId     string // 测试环境ID
	testIdFlag bool

	prodId     string // 生产环境ID
	prodIdFlag bool
}

func NewAppEnvBuilder() *AppEnvBuilder {
	builder := &AppEnvBuilder{}
	return builder
}

// 开发环境ID
//
// 示例值：environment_dev123
func (builder *AppEnvBuilder) DevId(devId string) *AppEnvBuilder {
	builder.devId = devId
	builder.devIdFlag = true
	return builder
}

// 测试环境ID
//
// 示例值：environment_test12
func (builder *AppEnvBuilder) TestId(testId string) *AppEnvBuilder {
	builder.testId = testId
	builder.testIdFlag = true
	return builder
}

// 生产环境ID
//
// 示例值：environment_prod12
func (builder *AppEnvBuilder) ProdId(prodId string) *AppEnvBuilder {
	builder.prodId = prodId
	builder.prodIdFlag = true
	return builder
}

func (builder *AppEnvBuilder) Build() *AppEnv {
	req := &AppEnv{}
	if builder.devIdFlag {
		req.DevId = &builder.devId

	}
	if builder.testIdFlag {
		req.TestId = &builder.testId

	}
	if builder.prodIdFlag {
		req.ProdId = &builder.prodId

	}
	return req
}

type AppRolesInfo struct {
	Admins []int `json:"admins,omitempty"` //   aPaaS 产品应用管理员的 ID

	Developers []int `json:"developers,omitempty"` //   aPaaS 产品应用开发者的 ID

	TestUsers []int `json:"test_users,omitempty"` // aPaaS 产品应用测试人员的 ID

	DataAdmins []int `json:"data_admins,omitempty"` // aPaaS 产品应用数据管理员的 ID
}

type AppRolesInfoBuilder struct {
	admins     []int //   aPaaS 产品应用管理员的 ID
	adminsFlag bool

	developers     []int //   aPaaS 产品应用开发者的 ID
	developersFlag bool

	testUsers     []int // aPaaS 产品应用测试人员的 ID
	testUsersFlag bool

	dataAdmins     []int // aPaaS 产品应用数据管理员的 ID
	dataAdminsFlag bool
}

func NewAppRolesInfoBuilder() *AppRolesInfoBuilder {
	builder := &AppRolesInfoBuilder{}
	return builder
}

//   aPaaS 产品应用管理员的 ID
//
// 示例值：
func (builder *AppRolesInfoBuilder) Admins(admins []int) *AppRolesInfoBuilder {
	builder.admins = admins
	builder.adminsFlag = true
	return builder
}

//   aPaaS 产品应用开发者的 ID
//
// 示例值：
func (builder *AppRolesInfoBuilder) Developers(developers []int) *AppRolesInfoBuilder {
	builder.developers = developers
	builder.developersFlag = true
	return builder
}

// aPaaS 产品应用测试人员的 ID
//
// 示例值：
func (builder *AppRolesInfoBuilder) TestUsers(testUsers []int) *AppRolesInfoBuilder {
	builder.testUsers = testUsers
	builder.testUsersFlag = true
	return builder
}

// aPaaS 产品应用数据管理员的 ID
//
// 示例值：
func (builder *AppRolesInfoBuilder) DataAdmins(dataAdmins []int) *AppRolesInfoBuilder {
	builder.dataAdmins = dataAdmins
	builder.dataAdminsFlag = true
	return builder
}

func (builder *AppRolesInfoBuilder) Build() *AppRolesInfo {
	req := &AppRolesInfo{}
	if builder.adminsFlag {
		req.Admins = builder.admins
	}
	if builder.developersFlag {
		req.Developers = builder.developers
	}
	if builder.testUsersFlag {
		req.TestUsers = builder.testUsers
	}
	if builder.dataAdminsFlag {
		req.DataAdmins = builder.dataAdmins
	}
	return req
}

type ApprovalComment struct {
	Id *string `json:"id,omitempty"` // 审批评论ID

	Commenter *string `json:"commenter,omitempty"` // 审批人

	Content *string `json:"content,omitempty"` // 评论内容

	CreateAt *string `json:"create_at,omitempty"` // 评论创建时间

	UpdateAt *string `json:"update_at,omitempty"` // 评论更新时间
}

type ApprovalCommentBuilder struct {
	id     string // 审批评论ID
	idFlag bool

	commenter     string // 审批人
	commenterFlag bool

	content     string // 评论内容
	contentFlag bool

	createAt     string // 评论创建时间
	createAtFlag bool

	updateAt     string // 评论更新时间
	updateAtFlag bool
}

func NewApprovalCommentBuilder() *ApprovalCommentBuilder {
	builder := &ApprovalCommentBuilder{}
	return builder
}

// 审批评论ID
//
// 示例值：1740167780951095
func (builder *ApprovalCommentBuilder) Id(id string) *ApprovalCommentBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 审批人
//
// 示例值：1740200388911118
func (builder *ApprovalCommentBuilder) Commenter(commenter string) *ApprovalCommentBuilder {
	builder.commenter = commenter
	builder.commenterFlag = true
	return builder
}

// 评论内容
//
// 示例值：{"imgs":[],"html":"<div data-zone-id=\"0\" data-line-index=\"0\" data-line=\"true\" style=\"white-space: pre;\">q\n</div>"}
func (builder *ApprovalCommentBuilder) Content(content string) *ApprovalCommentBuilder {
	builder.content = content
	builder.contentFlag = true
	return builder
}

// 评论创建时间
//
// 示例值：1659600754592
func (builder *ApprovalCommentBuilder) CreateAt(createAt string) *ApprovalCommentBuilder {
	builder.createAt = createAt
	builder.createAtFlag = true
	return builder
}

// 评论更新时间
//
// 示例值：1659600754592
func (builder *ApprovalCommentBuilder) UpdateAt(updateAt string) *ApprovalCommentBuilder {
	builder.updateAt = updateAt
	builder.updateAtFlag = true
	return builder
}

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

	}
	if builder.commenterFlag {
		req.Commenter = &builder.commenter

	}
	if builder.contentFlag {
		req.Content = &builder.content

	}
	if builder.createAtFlag {
		req.CreateAt = &builder.createAt

	}
	if builder.updateAtFlag {
		req.UpdateAt = &builder.updateAt

	}
	return req
}

type ApprovalInstance struct {
	Id *string `json:"id,omitempty"` // 审批实例id

	Label map[string]string `json:"label,omitempty"` // 审批流程名

	Initiator *string `json:"initiator,omitempty"` // 审批发起人

	InstanceStartTime *string `json:"instance_start_time,omitempty"` // 审批创建时间

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

	Tasks []*ApprovalTask `json:"tasks,omitempty"` // 审批任务列表

	Comments []*ApprovalComment `json:"comments,omitempty"` // 评论列表

	ApiId *string `json:"api_id,omitempty"` // Api id
}

type ApprovalInstanceBuilder struct {
	id     string // 审批实例id
	idFlag bool

	label     map[string]string // 审批流程名
	labelFlag bool

	initiator     string // 审批发起人
	initiatorFlag bool

	instanceStartTime     string // 审批创建时间
	instanceStartTimeFlag bool

	status     string // 流程状态
	statusFlag bool

	tasks     []*ApprovalTask // 审批任务列表
	tasksFlag bool

	comments     []*ApprovalComment // 评论列表
	commentsFlag bool

	apiId     string // Api id
	apiIdFlag bool
}

func NewApprovalInstanceBuilder() *ApprovalInstanceBuilder {
	builder := &ApprovalInstanceBuilder{}
	return builder
}

// 审批实例id
//
// 示例值：1642460702045203
func (builder *ApprovalInstanceBuilder) Id(id string) *ApprovalInstanceBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 审批流程名
//
// 示例值：
func (builder *ApprovalInstanceBuilder) Label(label map[string]string) *ApprovalInstanceBuilder {
	builder.label = label
	builder.labelFlag = true
	return builder
}

// 审批发起人
//
// 示例值：1637300992976924
func (builder *ApprovalInstanceBuilder) Initiator(initiator string) *ApprovalInstanceBuilder {
	builder.initiator = initiator
	builder.initiatorFlag = true
	return builder
}

// 审批创建时间
//
// 示例值：1566378665835
func (builder *ApprovalInstanceBuilder) InstanceStartTime(instanceStartTime string) *ApprovalInstanceBuilder {
	builder.instanceStartTime = instanceStartTime
	builder.instanceStartTimeFlag = true
	return builder
}

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

// 审批任务列表
//
// 示例值：
func (builder *ApprovalInstanceBuilder) Tasks(tasks []*ApprovalTask) *ApprovalInstanceBuilder {
	builder.tasks = tasks
	builder.tasksFlag = true
	return builder
}

// 评论列表
//
// 示例值：
func (builder *ApprovalInstanceBuilder) Comments(comments []*ApprovalComment) *ApprovalInstanceBuilder {
	builder.comments = comments
	builder.commentsFlag = true
	return builder
}

// Api id
//
// 示例值：package_b40c28__c__action_aadfv6lfu6kai
func (builder *ApprovalInstanceBuilder) ApiId(apiId string) *ApprovalInstanceBuilder {
	builder.apiId = apiId
	builder.apiIdFlag = true
	return builder
}

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

	}
	if builder.labelFlag {
		req.Label = builder.label
	}
	if builder.initiatorFlag {
		req.Initiator = &builder.initiator

	}
	if builder.instanceStartTimeFlag {
		req.InstanceStartTime = &builder.instanceStartTime

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

	}
	if builder.tasksFlag {
		req.Tasks = builder.tasks
	}
	if builder.commentsFlag {
		req.Comments = builder.comments
	}
	if builder.apiIdFlag {
		req.ApiId = &builder.apiId

	}
	return req
}

type ApprovalTask struct {
	Id *string `json:"id,omitempty"` // 审批任务ID

	TaskStatus *string `json:"task_status,omitempty"` // 审批任务状态

	TaskStartTime *string `json:"task_start_time,omitempty"` // 任务开始时间

	TaskEndTime *string `json:"task_end_time,omitempty"` // 任务结束时间

	FormData *string `json:"form_data,omitempty"` // 任务表单数据，默认不传递，除非请求的 include 参数中包含 ApprovalTask_FormData

	ApprovalLogic *string `json:"approval_logic,omitempty"` // 任务类型

	Approvers []string `json:"approvers,omitempty"` // 任务已办人

	Assigners []string `json:"assigners,omitempty"` // 任务指派人

	TaskUrl *string `json:"task_url,omitempty"` // 审批任务链接

	TaskType *string `json:"task_type,omitempty"` // 任务类型

	FreeCcRecord *string `json:"free_cc_record,omitempty"` // 自由抄送记录

	AddAssigneeRecord *string `json:"add_assignee_record,omitempty"` // 加签记录
}

type ApprovalTaskBuilder struct {
	id     string // 审批任务ID
	idFlag bool

	taskStatus     string // 审批任务状态
	taskStatusFlag bool

	taskStartTime     string // 任务开始时间
	taskStartTimeFlag bool

	taskEndTime     string // 任务结束时间
	taskEndTimeFlag bool

	formData     string // 任务表单数据，默认不传递，除非请求的 include 参数中包含 ApprovalTask_FormData
	formDataFlag bool

	approvalLogic     string // 任务类型
	approvalLogicFlag bool

	approvers     []string // 任务已办人
	approversFlag bool

	assigners     []string // 任务指派人
	assignersFlag bool

	taskUrl     string // 审批任务链接
	taskUrlFlag bool

	taskType     string // 任务类型
	taskTypeFlag bool

	freeCcRecord     string // 自由抄送记录
	freeCcRecordFlag bool

	addAssigneeRecord     string // 加签记录
	addAssigneeRecordFlag bool
}

func NewApprovalTaskBuilder() *ApprovalTaskBuilder {
	builder := &ApprovalTaskBuilder{}
	return builder
}

// 审批任务ID
//
// 示例值：1642460701966344
func (builder *ApprovalTaskBuilder) Id(id string) *ApprovalTaskBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 审批任务状态
//
// 示例值：agreed
func (builder *ApprovalTaskBuilder) TaskStatus(taskStatus string) *ApprovalTaskBuilder {
	builder.taskStatus = taskStatus
	builder.taskStatusFlag = true
	return builder
}

// 任务开始时间
//
// 示例值：1566378665835
func (builder *ApprovalTaskBuilder) TaskStartTime(taskStartTime string) *ApprovalTaskBuilder {
	builder.taskStartTime = taskStartTime
	builder.taskStartTimeFlag = true
	return builder
}

// 任务结束时间
//
// 示例值：1566379388905
func (builder *ApprovalTaskBuilder) TaskEndTime(taskEndTime string) *ApprovalTaskBuilder {
	builder.taskEndTime = taskEndTime
	builder.taskEndTimeFlag = true
	return builder
}

// 任务表单数据，默认不传递，除非请求的 include 参数中包含 ApprovalTask_FormData
//
// 示例值：{"_initialRecord":{"data1":"2019-08-27","dateTime1":1566921600000,"lookup1":null}}
func (builder *ApprovalTaskBuilder) FormData(formData string) *ApprovalTaskBuilder {
	builder.formData = formData
	builder.formDataFlag = true
	return builder
}

// 任务类型
//
// 示例值：all
func (builder *ApprovalTaskBuilder) ApprovalLogic(approvalLogic string) *ApprovalTaskBuilder {
	builder.approvalLogic = approvalLogic
	builder.approvalLogicFlag = true
	return builder
}

// 任务已办人
//
// 示例值：
func (builder *ApprovalTaskBuilder) Approvers(approvers []string) *ApprovalTaskBuilder {
	builder.approvers = approvers
	builder.approversFlag = true
	return builder
}

// 任务指派人
//
// 示例值：
func (builder *ApprovalTaskBuilder) Assigners(assigners []string) *ApprovalTaskBuilder {
	builder.assigners = assigners
	builder.assignersFlag = true
	return builder
}

// 审批任务链接
//
// 示例值：https://xuzhaoning-dev702.aedev.feishuapp.bytedance.net/ae/automation/inbox?taskId=1783249953599668
func (builder *ApprovalTaskBuilder) TaskUrl(taskUrl string) *ApprovalTaskBuilder {
	builder.taskUrl = taskUrl
	builder.taskUrlFlag = true
	return builder
}

// 任务类型
//
// 示例值：approval
func (builder *ApprovalTaskBuilder) TaskType(taskType string) *ApprovalTaskBuilder {
	builder.taskType = taskType
	builder.taskTypeFlag = true
	return builder
}

// 自由抄送记录
//
// 示例值：[{"assignees":[1807760353382444],"operator":1805479940407305,"addCCTime":1731294960855}]
func (builder *ApprovalTaskBuilder) FreeCcRecord(freeCcRecord string) *ApprovalTaskBuilder {
	builder.freeCcRecord = freeCcRecord
	builder.freeCcRecordFlag = true
	return builder
}

// 加签记录
//
// 示例值：{"fromTaskId":0,"addAssignee":[{"approvers":[1807760353382444],"operator":1805479940407305,"addAssigneeType":"currentAndAddAssign","addAssigneeTime":1731295024203,"reason":null,"inherit":false},{"approvers":[1815350297373803],"operator":1805479940407305,"addAssigneeType":"afterAndAddAssign","addAssigneeTime":1731295066066,"reason":[{"language_code":2052,"text":"ddd"}],"inherit":false}]}
func (builder *ApprovalTaskBuilder) AddAssigneeRecord(addAssigneeRecord string) *ApprovalTaskBuilder {
	builder.addAssigneeRecord = addAssigneeRecord
	builder.addAssigneeRecordFlag = true
	return builder
}

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

	}
	if builder.taskStatusFlag {
		req.TaskStatus = &builder.taskStatus

	}
	if builder.taskStartTimeFlag {
		req.TaskStartTime = &builder.taskStartTime

	}
	if builder.taskEndTimeFlag {
		req.TaskEndTime = &builder.taskEndTime

	}
	if builder.formDataFlag {
		req.FormData = &builder.formData

	}
	if builder.approvalLogicFlag {
		req.ApprovalLogic = &builder.approvalLogic

	}
	if builder.approversFlag {
		req.Approvers = builder.approvers
	}
	if builder.assignersFlag {
		req.Assigners = builder.assigners
	}
	if builder.taskUrlFlag {
		req.TaskUrl = &builder.taskUrl

	}
	if builder.taskTypeFlag {
		req.TaskType = &builder.taskType

	}
	if builder.freeCcRecordFlag {
		req.FreeCcRecord = &builder.freeCcRecord

	}
	if builder.addAssigneeRecordFlag {
		req.AddAssigneeRecord = &builder.addAssigneeRecord

	}
	return req
}

type Attachment struct {
	FileId *string `json:"file_id,omitempty"` // 文件的唯一标识，用于给字段赋值或下载文件
}

type AttachmentBuilder struct {
	fileId     string // 文件的唯一标识，用于给字段赋值或下载文件
	fileIdFlag bool
}

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

// 文件的唯一标识，用于给字段赋值或下载文件
//
// 示例值：e85a1edeae2240f5b89ae67e481f8788
func (builder *AttachmentBuilder) FileId(fileId string) *AttachmentBuilder {
	builder.fileId = fileId
	builder.fileIdFlag = true
	return builder
}

func (builder *AttachmentBuilder) Build() *Attachment {
	req := &Attachment{}
	if builder.fileIdFlag {
		req.FileId = &builder.fileId

	}
	return req
}

type AuditLogDetail struct {
	LogId *string `json:"log_id,omitempty"` // 审计日志ID

	BasicInfo *BasicInfo `json:"basic_info,omitempty"` // 日志基础信息

	OpInfo *AuditLogOpInfo `json:"op_info,omitempty"` // 审计日志操作信息

	LoginInfo *AuditLogLoginInfo `json:"login_info,omitempty"` // 登录类型信息

	DeviceInfo *AuditLogDeviceInfo `json:"device_info,omitempty"` // 设备信息

	NetInfo *AuditLogNetInfo `json:"net_info,omitempty"` // 网络信息
}

type AuditLogDetailBuilder struct {
	logId     string // 审计日志ID
	logIdFlag bool

	basicInfo     *BasicInfo // 日志基础信息
	basicInfoFlag bool

	opInfo     *AuditLogOpInfo // 审计日志操作信息
	opInfoFlag bool

	loginInfo     *AuditLogLoginInfo // 登录类型信息
	loginInfoFlag bool

	deviceInfo     *AuditLogDeviceInfo // 设备信息
	deviceInfoFlag bool

	netInfo     *AuditLogNetInfo // 网络信息
	netInfoFlag bool
}

func NewAuditLogDetailBuilder() *AuditLogDetailBuilder {
	builder := &AuditLogDetailBuilder{}
	return builder
}

// 审计日志ID
//
// 示例值：7376574450886557740
func (builder *AuditLogDetailBuilder) LogId(logId string) *AuditLogDetailBuilder {
	builder.logId = logId
	builder.logIdFlag = true
	return builder
}

// 日志基础信息
//
// 示例值：
func (builder *AuditLogDetailBuilder) BasicInfo(basicInfo *BasicInfo) *AuditLogDetailBuilder {
	builder.basicInfo = basicInfo
	builder.basicInfoFlag = true
	return builder
}

// 审计日志操作信息
//
// 示例值：
func (builder *AuditLogDetailBuilder) OpInfo(opInfo *AuditLogOpInfo) *AuditLogDetailBuilder {
	builder.opInfo = opInfo
	builder.opInfoFlag = true
	return builder
}

// 登录类型信息
//
// 示例值：
func (builder *AuditLogDetailBuilder) LoginInfo(loginInfo *AuditLogLoginInfo) *AuditLogDetailBuilder {
	builder.loginInfo = loginInfo
	builder.loginInfoFlag = true
	return builder
}

// 设备信息
//
// 示例值：
func (builder *AuditLogDetailBuilder) DeviceInfo(deviceInfo *AuditLogDeviceInfo) *AuditLogDetailBuilder {
	builder.deviceInfo = deviceInfo
	builder.deviceInfoFlag = true
	return builder
}

// 网络信息
//
// 示例值：
func (builder *AuditLogDetailBuilder) NetInfo(netInfo *AuditLogNetInfo) *AuditLogDetailBuilder {
	builder.netInfo = netInfo
	builder.netInfoFlag = true
	return builder
}

func (builder *AuditLogDetailBuilder) Build() *AuditLogDetail {
	req := &AuditLogDetail{}
	if builder.logIdFlag {
		req.LogId = &builder.logId

	}
	if builder.basicInfoFlag {
		req.BasicInfo = builder.basicInfo
	}
	if builder.opInfoFlag {
		req.OpInfo = builder.opInfo
	}
	if builder.loginInfoFlag {
		req.LoginInfo = builder.loginInfo
	}
	if builder.deviceInfoFlag {
		req.DeviceInfo = builder.deviceInfo
	}
	if builder.netInfoFlag {
		req.NetInfo = builder.netInfo
	}
	return req
}

type AuditLogDeviceInfo struct {
	DeviceId *string `json:"device_id,omitempty"` // 设备ID

	WebDeviceId *string `json:"web_device_id,omitempty"` // web端设备ID

	TerminalType *string `json:"terminal_type,omitempty"` // 终端类型：13002-PC类型；13003-Web类型

	OsType *string `json:"os_type,omitempty"` // 系统类型：14002-window；14001-未知

	OsVersion *string `json:"os_version,omitempty"` // 系统版本
}

type AuditLogDeviceInfoBuilder struct {
	deviceId     string // 设备ID
	deviceIdFlag bool

	webDeviceId     string // web端设备ID
	webDeviceIdFlag bool

	terminalType     string // 终端类型：13002-PC类型；13003-Web类型
	terminalTypeFlag bool

	osType     string // 系统类型：14002-window；14001-未知
	osTypeFlag bool

	osVersion     string // 系统版本
	osVersionFlag bool
}

func NewAuditLogDeviceInfoBuilder() *AuditLogDeviceInfoBuilder {
	builder := &AuditLogDeviceInfoBuilder{}
	return builder
}

// 设备ID
//
// 示例值：device_1234
func (builder *AuditLogDeviceInfoBuilder) DeviceId(deviceId string) *AuditLogDeviceInfoBuilder {
	builder.deviceId = deviceId
	builder.deviceIdFlag = true
	return builder
}

// web端设备ID
//
// 示例值：webDevice_1234
func (builder *AuditLogDeviceInfoBuilder) WebDeviceId(webDeviceId string) *AuditLogDeviceInfoBuilder {
	builder.webDeviceId = webDeviceId
	builder.webDeviceIdFlag = true
	return builder
}

// 终端类型：13002-PC类型；13003-Web类型
//
// 示例值：2
func (builder *AuditLogDeviceInfoBuilder) TerminalType(terminalType string) *AuditLogDeviceInfoBuilder {
	builder.terminalType = terminalType
	builder.terminalTypeFlag = true
	return builder
}

// 系统类型：14002-window；14001-未知
//
// 示例值：14002
func (builder *AuditLogDeviceInfoBuilder) OsType(osType string) *AuditLogDeviceInfoBuilder {
	builder.osType = osType
	builder.osTypeFlag = true
	return builder
}

// 系统版本
//
// 示例值：14.6
func (builder *AuditLogDeviceInfoBuilder) OsVersion(osVersion string) *AuditLogDeviceInfoBuilder {
	builder.osVersion = osVersion
	builder.osVersionFlag = true
	return builder
}

func (builder *AuditLogDeviceInfoBuilder) Build() *AuditLogDeviceInfo {
	req := &AuditLogDeviceInfo{}
	if builder.deviceIdFlag {
		req.DeviceId = &builder.deviceId

	}
	if builder.webDeviceIdFlag {
		req.WebDeviceId = &builder.webDeviceId

	}
	if builder.terminalTypeFlag {
		req.TerminalType = &builder.terminalType

	}
	if builder.osTypeFlag {
		req.OsType = &builder.osType

	}
	if builder.osVersionFlag {
		req.OsVersion = &builder.osVersion

	}
	return req
}

type AuditLogEsField struct {
	LogId *string `json:"log_id,omitempty"` // 审计日志ID

	OpTime *string `json:"op_time,omitempty"` // 操作时间

	LogType *string `json:"log_type,omitempty"` // 日志类型:10000-全部类型;10001-企业管理; 10002-登录日志;10003-应用管理

	Operator *LookupWithAvatar `json:"operator,omitempty"` // 操作人

	Outsider *bool `json:"outsider,omitempty"` // 是否为外部用户,true代表是外部用户

	LoginType *string `json:"login_type,omitempty"` // 登录类型:11001-飞书登录;11003-账号密码登录

	LarkTenantId *string `json:"lark_tenant_id,omitempty"` // 飞书租户ID

	ApaasTenantId *string `json:"apaas_tenant_id,omitempty"` // apaas租户ID

	UserGeo *string `json:"user_geo,omitempty"` // 用户地理信息

	ClientIp *string `json:"client_ip,omitempty"` // 客户端IP

	IpLoc *string `json:"ip_loc,omitempty"` // IP位置

	IpProvider *string `json:"ip_provider,omitempty"` // IP提供商

	Referer *string `json:"referer,omitempty"` // 引用页面

	Origin *string `json:"origin,omitempty"` // 源页面

	ApiPath *string `json:"api_path,omitempty"` // 路由路径

	FullPath *string `json:"full_path,omitempty"` // 网关路径

	UserAgent *string `json:"user_agent,omitempty"` // 用户代理

	DeviceId *string `json:"device_id,omitempty"` // 设备ID

	WebDeviceId *string `json:"web_device_id,omitempty"` // web端设备ID

	TerminalType *string `json:"terminal_type,omitempty"` // 终端类型:13002-PC类型;13003-Web类型

	OsType *string `json:"os_type,omitempty"` // 系统类型:14002-window;14001-未知

	OsVersion *string `json:"os_version,omitempty"` // 系统版本

	Module *string `json:"module,omitempty"` // 功能模块

	DataObject *string `json:"data_object,omitempty"` // 数据对象

	AuditScope *string `json:"audit_scope,omitempty"` // 审计域:15001-企业管理后台;15002-应用管理后 台;15003-应用开发平台

	TenantId *string `json:"tenant_id,omitempty"` // 租户ID

	Namespace *string `json:"namespace,omitempty"` // 应用唯一标识

	EnvType *string `json:"env_type,omitempty"` // 环境类型:16001-沙箱环境;16003-线上环境

	OpType *string `json:"op_type,omitempty"` // 事件类型

	OpDetail map[string]string `json:"op_detail,omitempty"` // 操作详情内容

	OpSource *string `json:"op_source,omitempty"` // 操作源:20001-前端;20004-openapi

	Status *string `json:"status,omitempty"` // 操作状态:18001-成功;18002-失败

	FailedReasonI18n map[string]string `json:"failed_reason_i18n,omitempty"` // 失败原因

	DataChanges []string `json:"data_changes,omitempty"` // 数据变化(旧值和新值)

	AppName map[string]string `json:"app_name,omitempty"` // 应用名称

	KeywordFieldAppVersion *string `json:"keyword_field_app_version,omitempty"` // 应用版本号

	KeywordFieldFunctionalSubModule *string `json:"keyword_field_functional_sub_module,omitempty"` // 审计日志事件子模块
}

type AuditLogEsFieldBuilder struct {
	logId     string // 审计日志ID
	logIdFlag bool

	opTime     string // 操作时间
	opTimeFlag bool

	logType     string // 日志类型:10000-全部类型;10001-企业管理; 10002-登录日志;10003-应用管理
	logTypeFlag bool

	operator     *LookupWithAvatar // 操作人
	operatorFlag bool

	outsider     bool // 是否为外部用户,true代表是外部用户
	outsiderFlag bool

	loginType     string // 登录类型:11001-飞书登录;11003-账号密码登录
	loginTypeFlag bool

	larkTenantId     string // 飞书租户ID
	larkTenantIdFlag bool

	apaasTenantId     string // apaas租户ID
	apaasTenantIdFlag bool

	userGeo     string // 用户地理信息
	userGeoFlag bool

	clientIp     string // 客户端IP
	clientIpFlag bool

	ipLoc     string // IP位置
	ipLocFlag bool

	ipProvider     string // IP提供商
	ipProviderFlag bool

	referer     string // 引用页面
	refererFlag bool

	origin     string // 源页面
	originFlag bool

	apiPath     string // 路由路径
	apiPathFlag bool

	fullPath     string // 网关路径
	fullPathFlag bool

	userAgent     string // 用户代理
	userAgentFlag bool

	deviceId     string // 设备ID
	deviceIdFlag bool

	webDeviceId     string // web端设备ID
	webDeviceIdFlag bool

	terminalType     string // 终端类型:13002-PC类型;13003-Web类型
	terminalTypeFlag bool

	osType     string // 系统类型:14002-window;14001-未知
	osTypeFlag bool

	osVersion     string // 系统版本
	osVersionFlag bool

	module     string // 功能模块
	moduleFlag bool

	dataObject     string // 数据对象
	dataObjectFlag bool

	auditScope     string // 审计域:15001-企业管理后台;15002-应用管理后 台;15003-应用开发平台
	auditScopeFlag bool

	tenantId     string // 租户ID
	tenantIdFlag bool

	namespace     string // 应用唯一标识
	namespaceFlag bool

	envType     string // 环境类型:16001-沙箱环境;16003-线上环境
	envTypeFlag bool

	opType     string // 事件类型
	opTypeFlag bool

	opDetail     map[string]string // 操作详情内容
	opDetailFlag bool

	opSource     string // 操作源:20001-前端;20004-openapi
	opSourceFlag bool

	status     string // 操作状态:18001-成功;18002-失败
	statusFlag bool

	failedReasonI18n     map[string]string // 失败原因
	failedReasonI18nFlag bool

	dataChanges     []string // 数据变化(旧值和新值)
	dataChangesFlag bool

	appName     map[string]string // 应用名称
	appNameFlag bool

	keywordFieldAppVersion     string // 应用版本号
	keywordFieldAppVersionFlag bool

	keywordFieldFunctionalSubModule     string // 审计日志事件子模块
	keywordFieldFunctionalSubModuleFlag bool
}

func NewAuditLogEsFieldBuilder() *AuditLogEsFieldBuilder {
	builder := &AuditLogEsFieldBuilder{}
	return builder
}

// 审计日志ID
//
// 示例值：7376574450886557740
func (builder *AuditLogEsFieldBuilder) LogId(logId string) *AuditLogEsFieldBuilder {
	builder.logId = logId
	builder.logIdFlag = true
	return builder
}

// 操作时间
//
// 示例值：1723634726874
func (builder *AuditLogEsFieldBuilder) OpTime(opTime string) *AuditLogEsFieldBuilder {
	builder.opTime = opTime
	builder.opTimeFlag = true
	return builder
}

// 日志类型:10000-全部类型;10001-企业管理; 10002-登录日志;10003-应用管理
//
// 示例值：10000
func (builder *AuditLogEsFieldBuilder) LogType(logType string) *AuditLogEsFieldBuilder {
	builder.logType = logType
	builder.logTypeFlag = true
	return builder
}

// 操作人
//
// 示例值：
func (builder *AuditLogEsFieldBuilder) Operator(operator *LookupWithAvatar) *AuditLogEsFieldBuilder {
	builder.operator = operator
	builder.operatorFlag = true
	return builder
}

// 是否为外部用户,true代表是外部用户
//
// 示例值：
func (builder *AuditLogEsFieldBuilder) Outsider(outsider bool) *AuditLogEsFieldBuilder {
	builder.outsider = outsider
	builder.outsiderFlag = true
	return builder
}

// 登录类型:11001-飞书登录;11003-账号密码登录
//
// 示例值：11001
func (builder *AuditLogEsFieldBuilder) LoginType(loginType string) *AuditLogEsFieldBuilder {
	builder.loginType = loginType
	builder.loginTypeFlag = true
	return builder
}

// 飞书租户ID
//
// 示例值：123
func (builder *AuditLogEsFieldBuilder) LarkTenantId(larkTenantId string) *AuditLogEsFieldBuilder {
	builder.larkTenantId = larkTenantId
	builder.larkTenantIdFlag = true
	return builder
}

// apaas租户ID
//
// 示例值：23333
func (builder *AuditLogEsFieldBuilder) ApaasTenantId(apaasTenantId string) *AuditLogEsFieldBuilder {
	builder.apaasTenantId = apaasTenantId
	builder.apaasTenantIdFlag = true
	return builder
}

// 用户地理信息
//
// 示例值：America/Chicago
func (builder *AuditLogEsFieldBuilder) UserGeo(userGeo string) *AuditLogEsFieldBuilder {
	builder.userGeo = userGeo
	builder.userGeoFlag = true
	return builder
}

// 客户端IP
//
// 示例值：192.168.1.1
func (builder *AuditLogEsFieldBuilder) ClientIp(clientIp string) *AuditLogEsFieldBuilder {
	builder.clientIp = clientIp
	builder.clientIpFlag = true
	return builder
}

// IP位置
//
// 示例值：中国北京
func (builder *AuditLogEsFieldBuilder) IpLoc(ipLoc string) *AuditLogEsFieldBuilder {
	builder.ipLoc = ipLoc
	builder.ipLocFlag = true
	return builder
}

// IP提供商
//
// 示例值：ISP_com
func (builder *AuditLogEsFieldBuilder) IpProvider(ipProvider string) *AuditLogEsFieldBuilder {
	builder.ipProvider = ipProvider
	builder.ipProviderFlag = true
	return builder
}

// 引用页面
//
// 示例值：https://example.com/referer
func (builder *AuditLogEsFieldBuilder) Referer(referer string) *AuditLogEsFieldBuilder {
	builder.referer = referer
	builder.refererFlag = true
	return builder
}

// 源页面
//
// 示例值：https://example.com/origin
func (builder *AuditLogEsFieldBuilder) Origin(origin string) *AuditLogEsFieldBuilder {
	builder.origin = origin
	builder.originFlag = true
	return builder
}

// 路由路径
//
// 示例值：/api/xxx
func (builder *AuditLogEsFieldBuilder) ApiPath(apiPath string) *AuditLogEsFieldBuilder {
	builder.apiPath = apiPath
	builder.apiPathFlag = true
	return builder
}

// 网关路径
//
// 示例值：/api/xxx
func (builder *AuditLogEsFieldBuilder) FullPath(fullPath string) *AuditLogEsFieldBuilder {
	builder.fullPath = fullPath
	builder.fullPathFlag = true
	return builder
}

// 用户代理
//
// 示例值：Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148
func (builder *AuditLogEsFieldBuilder) UserAgent(userAgent string) *AuditLogEsFieldBuilder {
	builder.userAgent = userAgent
	builder.userAgentFlag = true
	return builder
}

// 设备ID
//
// 示例值：device_1234
func (builder *AuditLogEsFieldBuilder) DeviceId(deviceId string) *AuditLogEsFieldBuilder {
	builder.deviceId = deviceId
	builder.deviceIdFlag = true
	return builder
}

// web端设备ID
//
// 示例值：webDevice_1234
func (builder *AuditLogEsFieldBuilder) WebDeviceId(webDeviceId string) *AuditLogEsFieldBuilder {
	builder.webDeviceId = webDeviceId
	builder.webDeviceIdFlag = true
	return builder
}

// 终端类型:13002-PC类型;13003-Web类型
//
// 示例值：2
func (builder *AuditLogEsFieldBuilder) TerminalType(terminalType string) *AuditLogEsFieldBuilder {
	builder.terminalType = terminalType
	builder.terminalTypeFlag = true
	return builder
}

// 系统类型:14002-window;14001-未知
//
// 示例值：14002
func (builder *AuditLogEsFieldBuilder) OsType(osType string) *AuditLogEsFieldBuilder {
	builder.osType = osType
	builder.osTypeFlag = true
	return builder
}

// 系统版本
//
// 示例值：14.6
func (builder *AuditLogEsFieldBuilder) OsVersion(osVersion string) *AuditLogEsFieldBuilder {
	builder.osVersion = osVersion
	builder.osVersionFlag = true
	return builder
}

// 功能模块
//
// 示例值：17001
func (builder *AuditLogEsFieldBuilder) Module(module string) *AuditLogEsFieldBuilder {
	builder.module = module
	builder.moduleFlag = true
	return builder
}

// 数据对象
//
// 示例值：object_api_aaa
func (builder *AuditLogEsFieldBuilder) DataObject(dataObject string) *AuditLogEsFieldBuilder {
	builder.dataObject = dataObject
	builder.dataObjectFlag = true
	return builder
}

// 审计域:15001-企业管理后台;15002-应用管理后 台;15003-应用开发平台
//
// 示例值：15001
func (builder *AuditLogEsFieldBuilder) AuditScope(auditScope string) *AuditLogEsFieldBuilder {
	builder.auditScope = auditScope
	builder.auditScopeFlag = true
	return builder
}

// 租户ID
//
// 示例值：23335
func (builder *AuditLogEsFieldBuilder) TenantId(tenantId string) *AuditLogEsFieldBuilder {
	builder.tenantId = tenantId
	builder.tenantIdFlag = true
	return builder
}

// 应用唯一标识
//
// 示例值：package_aacc
func (builder *AuditLogEsFieldBuilder) Namespace(namespace string) *AuditLogEsFieldBuilder {
	builder.namespace = namespace
	builder.namespaceFlag = true
	return builder
}

// 环境类型:16001-沙箱环境;16003-线上环境
//
// 示例值：16003
func (builder *AuditLogEsFieldBuilder) EnvType(envType string) *AuditLogEsFieldBuilder {
	builder.envType = envType
	builder.envTypeFlag = true
	return builder
}

// 事件类型
//
// 示例值：19001
func (builder *AuditLogEsFieldBuilder) OpType(opType string) *AuditLogEsFieldBuilder {
	builder.opType = opType
	builder.opTypeFlag = true
	return builder
}

// 操作详情内容
//
// 示例值：
func (builder *AuditLogEsFieldBuilder) OpDetail(opDetail map[string]string) *AuditLogEsFieldBuilder {
	builder.opDetail = opDetail
	builder.opDetailFlag = true
	return builder
}

// 操作源:20001-前端;20004-openapi
//
// 示例值：20001
func (builder *AuditLogEsFieldBuilder) OpSource(opSource string) *AuditLogEsFieldBuilder {
	builder.opSource = opSource
	builder.opSourceFlag = true
	return builder
}

// 操作状态:18001-成功;18002-失败
//
// 示例值：18001
func (builder *AuditLogEsFieldBuilder) Status(status string) *AuditLogEsFieldBuilder {
	builder.status = status
	builder.statusFlag = true
	return builder
}

// 失败原因
//
// 示例值：
func (builder *AuditLogEsFieldBuilder) FailedReasonI18n(failedReasonI18n map[string]string) *AuditLogEsFieldBuilder {
	builder.failedReasonI18n = failedReasonI18n
	builder.failedReasonI18nFlag = true
	return builder
}

// 数据变化(旧值和新值)
//
// 示例值：
func (builder *AuditLogEsFieldBuilder) DataChanges(dataChanges []string) *AuditLogEsFieldBuilder {
	builder.dataChanges = dataChanges
	builder.dataChangesFlag = true
	return builder
}

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

// 应用版本号
//
// 示例值：v1.2.3
func (builder *AuditLogEsFieldBuilder) KeywordFieldAppVersion(keywordFieldAppVersion string) *AuditLogEsFieldBuilder {
	builder.keywordFieldAppVersion = keywordFieldAppVersion
	builder.keywordFieldAppVersionFlag = true
	return builder
}

// 审计日志事件子模块
//
// 示例值：223
func (builder *AuditLogEsFieldBuilder) KeywordFieldFunctionalSubModule(keywordFieldFunctionalSubModule string) *AuditLogEsFieldBuilder {
	builder.keywordFieldFunctionalSubModule = keywordFieldFunctionalSubModule
	builder.keywordFieldFunctionalSubModuleFlag = true
	return builder
}

func (builder *AuditLogEsFieldBuilder) Build() *AuditLogEsField {
	req := &AuditLogEsField{}
	if builder.logIdFlag {
		req.LogId = &builder.logId

	}
	if builder.opTimeFlag {
		req.OpTime = &builder.opTime

	}
	if builder.logTypeFlag {
		req.LogType = &builder.logType

	}
	if builder.operatorFlag {
		req.Operator = builder.operator
	}
	if builder.outsiderFlag {
		req.Outsider = &builder.outsider

	}
	if builder.loginTypeFlag {
		req.LoginType = &builder.loginType

	}
	if builder.larkTenantIdFlag {
		req.LarkTenantId = &builder.larkTenantId

	}
	if builder.apaasTenantIdFlag {
		req.ApaasTenantId = &builder.apaasTenantId

	}
	if builder.userGeoFlag {
		req.UserGeo = &builder.userGeo

	}
	if builder.clientIpFlag {
		req.ClientIp = &builder.clientIp

	}
	if builder.ipLocFlag {
		req.IpLoc = &builder.ipLoc

	}
	if builder.ipProviderFlag {
		req.IpProvider = &builder.ipProvider

	}
	if builder.refererFlag {
		req.Referer = &builder.referer

	}
	if builder.originFlag {
		req.Origin = &builder.origin

	}
	if builder.apiPathFlag {
		req.ApiPath = &builder.apiPath

	}
	if builder.fullPathFlag {
		req.FullPath = &builder.fullPath

	}
	if builder.userAgentFlag {
		req.UserAgent = &builder.userAgent

	}
	if builder.deviceIdFlag {
		req.DeviceId = &builder.deviceId

	}
	if builder.webDeviceIdFlag {
		req.WebDeviceId = &builder.webDeviceId

	}
	if builder.terminalTypeFlag {
		req.TerminalType = &builder.terminalType

	}
	if builder.osTypeFlag {
		req.OsType = &builder.osType

	}
	if builder.osVersionFlag {
		req.OsVersion = &builder.osVersion

	}
	if builder.moduleFlag {
		req.Module = &builder.module

	}
	if builder.dataObjectFlag {
		req.DataObject = &builder.dataObject

	}
	if builder.auditScopeFlag {
		req.AuditScope = &builder.auditScope

	}
	if builder.tenantIdFlag {
		req.TenantId = &builder.tenantId

	}
	if builder.namespaceFlag {
		req.Namespace = &builder.namespace

	}
	if builder.envTypeFlag {
		req.EnvType = &builder.envType

	}
	if builder.opTypeFlag {
		req.OpType = &builder.opType

	}
	if builder.opDetailFlag {
		req.OpDetail = builder.opDetail
	}
	if builder.opSourceFlag {
		req.OpSource = &builder.opSource

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

	}
	if builder.failedReasonI18nFlag {
		req.FailedReasonI18n = builder.failedReasonI18n
	}
	if builder.dataChangesFlag {
		req.DataChanges = builder.dataChanges
	}
	if builder.appNameFlag {
		req.AppName = builder.appName
	}
	if builder.keywordFieldAppVersionFlag {
		req.KeywordFieldAppVersion = &builder.keywordFieldAppVersion

	}
	if builder.keywordFieldFunctionalSubModuleFlag {
		req.KeywordFieldFunctionalSubModule = &builder.keywordFieldFunctionalSubModule

	}
	return req
}

type AuditLogLoginInfo struct {
	LoginType *string `json:"login_type,omitempty"` // 登录类型：11001-飞书登录；11003-账号密码登录
}

type AuditLogLoginInfoBuilder struct {
	loginType     string // 登录类型：11001-飞书登录；11003-账号密码登录
	loginTypeFlag bool
}

func NewAuditLogLoginInfoBuilder() *AuditLogLoginInfoBuilder {
	builder := &AuditLogLoginInfoBuilder{}
	return builder
}

// 登录类型：11001-飞书登录；11003-账号密码登录
//
// 示例值：11001
func (builder *AuditLogLoginInfoBuilder) LoginType(loginType string) *AuditLogLoginInfoBuilder {
	builder.loginType = loginType
	builder.loginTypeFlag = true
	return builder
}

func (builder *AuditLogLoginInfoBuilder) Build() *AuditLogLoginInfo {
	req := &AuditLogLoginInfo{}
	if builder.loginTypeFlag {
		req.LoginType = &builder.loginType

	}
	return req
}

type AuditLogNetInfo struct {
	ClientIp *string `json:"client_ip,omitempty"` // 客户端IP

	IpLoc *string `json:"ip_loc,omitempty"` // IP位置

	IpProvider *string `json:"ip_provider,omitempty"` // IP提供商

	Referer *string `json:"referer,omitempty"` // 引用页面

	Origin *string `json:"origin,omitempty"` // 源页面

	UserAgent *string `json:"user_agent,omitempty"` // 用户代理
}

type AuditLogNetInfoBuilder struct {
	clientIp     string // 客户端IP
	clientIpFlag bool

	ipLoc     string // IP位置
	ipLocFlag bool

	ipProvider     string // IP提供商
	ipProviderFlag bool

	referer     string // 引用页面
	refererFlag bool

	origin     string // 源页面
	originFlag bool

	userAgent     string // 用户代理
	userAgentFlag bool
}

func NewAuditLogNetInfoBuilder() *AuditLogNetInfoBuilder {
	builder := &AuditLogNetInfoBuilder{}
	return builder
}

// 客户端IP
//
// 示例值：192.168.1.1
func (builder *AuditLogNetInfoBuilder) ClientIp(clientIp string) *AuditLogNetInfoBuilder {
	builder.clientIp = clientIp
	builder.clientIpFlag = true
	return builder
}

// IP位置
//
// 示例值：中国北京
func (builder *AuditLogNetInfoBuilder) IpLoc(ipLoc string) *AuditLogNetInfoBuilder {
	builder.ipLoc = ipLoc
	builder.ipLocFlag = true
	return builder
}

// IP提供商
//
// 示例值：ISP_com
func (builder *AuditLogNetInfoBuilder) IpProvider(ipProvider string) *AuditLogNetInfoBuilder {
	builder.ipProvider = ipProvider
	builder.ipProviderFlag = true
	return builder
}

// 引用页面
//
// 示例值：https://example.com/referer
func (builder *AuditLogNetInfoBuilder) Referer(referer string) *AuditLogNetInfoBuilder {
	builder.referer = referer
	builder.refererFlag = true
	return builder
}

// 源页面
//
// 示例值：https://example.com/origin
func (builder *AuditLogNetInfoBuilder) Origin(origin string) *AuditLogNetInfoBuilder {
	builder.origin = origin
	builder.originFlag = true
	return builder
}

// 用户代理
//
// 示例值：Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148
func (builder *AuditLogNetInfoBuilder) UserAgent(userAgent string) *AuditLogNetInfoBuilder {
	builder.userAgent = userAgent
	builder.userAgentFlag = true
	return builder
}

func (builder *AuditLogNetInfoBuilder) Build() *AuditLogNetInfo {
	req := &AuditLogNetInfo{}
	if builder.clientIpFlag {
		req.ClientIp = &builder.clientIp

	}
	if builder.ipLocFlag {
		req.IpLoc = &builder.ipLoc

	}
	if builder.ipProviderFlag {
		req.IpProvider = &builder.ipProvider

	}
	if builder.refererFlag {
		req.Referer = &builder.referer

	}
	if builder.originFlag {
		req.Origin = &builder.origin

	}
	if builder.userAgentFlag {
		req.UserAgent = &builder.userAgent

	}
	return req
}

type AuditLogOpInfo struct {
	Operator *LookupWithAvatar `json:"operator,omitempty"` // 操作人

	Outsider *bool `json:"outsider,omitempty"` // 是否为外部用户，true代表是外部用户

	OpDetail map[string]string `json:"op_detail,omitempty"` // 操作详情内容

	Status *string `json:"status,omitempty"` // 操作状态：18001-成功；18002-失败

	FailedReason *string `json:"failed_reason,omitempty"` // 失败原因

	FailedReasonI18n map[string]string `json:"failed_reason_i18n,omitempty"` // 多语类型失败原因

	OpTime *string `json:"op_time,omitempty"` // 操作时间

	DataObject *string `json:"data_object,omitempty"` // 数据对象

	OpSource *string `json:"op_source,omitempty"` // 操作源：20001-前端；20004-openapi

	DataChanges []string `json:"data_changes,omitempty"` // 数据变化(旧值和新值)
}

type AuditLogOpInfoBuilder struct {
	operator     *LookupWithAvatar // 操作人
	operatorFlag bool

	outsider     bool // 是否为外部用户，true代表是外部用户
	outsiderFlag bool

	opDetail     map[string]string // 操作详情内容
	opDetailFlag bool

	status     string // 操作状态：18001-成功；18002-失败
	statusFlag bool

	failedReason     string // 失败原因
	failedReasonFlag bool

	failedReasonI18n     map[string]string // 多语类型失败原因
	failedReasonI18nFlag bool

	opTime     string // 操作时间
	opTimeFlag bool

	dataObject     string // 数据对象
	dataObjectFlag bool

	opSource     string // 操作源：20001-前端；20004-openapi
	opSourceFlag bool

	dataChanges     []string // 数据变化(旧值和新值)
	dataChangesFlag bool
}

func NewAuditLogOpInfoBuilder() *AuditLogOpInfoBuilder {
	builder := &AuditLogOpInfoBuilder{}
	return builder
}

// 操作人
//
// 示例值：
func (builder *AuditLogOpInfoBuilder) Operator(operator *LookupWithAvatar) *AuditLogOpInfoBuilder {
	builder.operator = operator
	builder.operatorFlag = true
	return builder
}

// 是否为外部用户，true代表是外部用户
//
// 示例值：true
func (builder *AuditLogOpInfoBuilder) Outsider(outsider bool) *AuditLogOpInfoBuilder {
	builder.outsider = outsider
	builder.outsiderFlag = true
	return builder
}

// 操作详情内容
//
// 示例值：
func (builder *AuditLogOpInfoBuilder) OpDetail(opDetail map[string]string) *AuditLogOpInfoBuilder {
	builder.opDetail = opDetail
	builder.opDetailFlag = true
	return builder
}

// 操作状态：18001-成功；18002-失败
//
// 示例值：18001
func (builder *AuditLogOpInfoBuilder) Status(status string) *AuditLogOpInfoBuilder {
	builder.status = status
	builder.statusFlag = true
	return builder
}

// 失败原因
//
// 示例值：登录失败
func (builder *AuditLogOpInfoBuilder) FailedReason(failedReason string) *AuditLogOpInfoBuilder {
	builder.failedReason = failedReason
	builder.failedReasonFlag = true
	return builder
}

// 多语类型失败原因
//
// 示例值：
func (builder *AuditLogOpInfoBuilder) FailedReasonI18n(failedReasonI18n map[string]string) *AuditLogOpInfoBuilder {
	builder.failedReasonI18n = failedReasonI18n
	builder.failedReasonI18nFlag = true
	return builder
}

// 操作时间
//
// 示例值：1723634726874
func (builder *AuditLogOpInfoBuilder) OpTime(opTime string) *AuditLogOpInfoBuilder {
	builder.opTime = opTime
	builder.opTimeFlag = true
	return builder
}

// 数据对象
//
// 示例值：object_api_aaa
func (builder *AuditLogOpInfoBuilder) DataObject(dataObject string) *AuditLogOpInfoBuilder {
	builder.dataObject = dataObject
	builder.dataObjectFlag = true
	return builder
}

// 操作源：20001-前端；20004-openapi
//
// 示例值：20001
func (builder *AuditLogOpInfoBuilder) OpSource(opSource string) *AuditLogOpInfoBuilder {
	builder.opSource = opSource
	builder.opSourceFlag = true
	return builder
}

// 数据变化(旧值和新值)
//
// 示例值：
func (builder *AuditLogOpInfoBuilder) DataChanges(dataChanges []string) *AuditLogOpInfoBuilder {
	builder.dataChanges = dataChanges
	builder.dataChangesFlag = true
	return builder
}

func (builder *AuditLogOpInfoBuilder) Build() *AuditLogOpInfo {
	req := &AuditLogOpInfo{}
	if builder.operatorFlag {
		req.Operator = builder.operator
	}
	if builder.outsiderFlag {
		req.Outsider = &builder.outsider

	}
	if builder.opDetailFlag {
		req.OpDetail = builder.opDetail
	}
	if builder.statusFlag {
		req.Status = &builder.status

	}
	if builder.failedReasonFlag {
		req.FailedReason = &builder.failedReason

	}
	if builder.failedReasonI18nFlag {
		req.FailedReasonI18n = builder.failedReasonI18n
	}
	if builder.opTimeFlag {
		req.OpTime = &builder.opTime

	}
	if builder.dataObjectFlag {
		req.DataObject = &builder.dataObject

	}
	if builder.opSourceFlag {
		req.OpSource = &builder.opSource

	}
	if builder.dataChangesFlag {
		req.DataChanges = builder.dataChanges
	}
	return req
}

type Avatar struct {
	Source *string `json:"source,omitempty"` // -

	Color *string `json:"color,omitempty"` // -

	Contents []*I18n `json:"contents,omitempty"` // -

	ColorId *string `json:"color_id,omitempty"` // -
}

type AvatarBuilder struct {
	source     string // -
	sourceFlag bool

	color     string // -
	colorFlag bool

	contents     []*I18n // -
	contentsFlag bool

	colorId     string // -
	colorIdFlag bool
}

func NewAvatarBuilder() *AvatarBuilder {
	builder := &AvatarBuilder{}
	return builder
}

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

// -
//
// 示例值：-
func (builder *AvatarBuilder) Color(color string) *AvatarBuilder {
	builder.color = color
	builder.colorFlag = true
	return builder
}

// -
//
// 示例值：
func (builder *AvatarBuilder) Contents(contents []*I18n) *AvatarBuilder {
	builder.contents = contents
	builder.contentsFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *AvatarBuilder) ColorId(colorId string) *AvatarBuilder {
	builder.colorId = colorId
	builder.colorIdFlag = true
	return builder
}

func (builder *AvatarBuilder) Build() *Avatar {
	req := &Avatar{}
	if builder.sourceFlag {
		req.Source = &builder.source

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

	}
	if builder.contentsFlag {
		req.Contents = builder.contents
	}
	if builder.colorIdFlag {
		req.ColorId = &builder.colorId

	}
	return req
}

type BasicInfo struct {
	LogType *string `json:"log_type,omitempty"` // 日志类型：10000-全部类型；10001-企业管理；10002-登录日志；10003-应用管理

	AuditScope *string `json:"audit_scope,omitempty"` // 审计域：15001-企业管理后台；15002-应用管理后台；15003-应用开发平台

	EnvType *string `json:"env_type,omitempty"` // 环境类型：16001-沙箱环境；16003-线上环境

	AppId *string `json:"app_id,omitempty"` // 应用id

	Module *string `json:"module,omitempty"` // 审计日志功能模块

	OpType *string `json:"op_type,omitempty"` // 事件类型

	AppName map[string]string `json:"app_name,omitempty"` // 应用名称
}

type BasicInfoBuilder struct {
	logType     string // 日志类型：10000-全部类型；10001-企业管理；10002-登录日志；10003-应用管理
	logTypeFlag bool

	auditScope     string // 审计域：15001-企业管理后台；15002-应用管理后台；15003-应用开发平台
	auditScopeFlag bool

	envType     string // 环境类型：16001-沙箱环境；16003-线上环境
	envTypeFlag bool

	appId     string // 应用id
	appIdFlag bool

	module     string // 审计日志功能模块
	moduleFlag bool

	opType     string // 事件类型
	opTypeFlag bool

	appName     map[string]string // 应用名称
	appNameFlag bool
}

func NewBasicInfoBuilder() *BasicInfoBuilder {
	builder := &BasicInfoBuilder{}
	return builder
}

// 日志类型：10000-全部类型；10001-企业管理；10002-登录日志；10003-应用管理
//
// 示例值：10000
func (builder *BasicInfoBuilder) LogType(logType string) *BasicInfoBuilder {
	builder.logType = logType
	builder.logTypeFlag = true
	return builder
}

// 审计域：15001-企业管理后台；15002-应用管理后台；15003-应用开发平台
//
// 示例值：15001
func (builder *BasicInfoBuilder) AuditScope(auditScope string) *BasicInfoBuilder {
	builder.auditScope = auditScope
	builder.auditScopeFlag = true
	return builder
}

// 环境类型：16001-沙箱环境；16003-线上环境
//
// 示例值：16003
func (builder *BasicInfoBuilder) EnvType(envType string) *BasicInfoBuilder {
	builder.envType = envType
	builder.envTypeFlag = true
	return builder
}

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

// 审计日志功能模块
//
// 示例值：17001
func (builder *BasicInfoBuilder) Module(module string) *BasicInfoBuilder {
	builder.module = module
	builder.moduleFlag = true
	return builder
}

// 事件类型
//
// 示例值：19001
func (builder *BasicInfoBuilder) OpType(opType string) *BasicInfoBuilder {
	builder.opType = opType
	builder.opTypeFlag = true
	return builder
}

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

func (builder *BasicInfoBuilder) Build() *BasicInfo {
	req := &BasicInfo{}
	if builder.logTypeFlag {
		req.LogType = &builder.logType

	}
	if builder.auditScopeFlag {
		req.AuditScope = &builder.auditScope

	}
	if builder.envTypeFlag {
		req.EnvType = &builder.envType

	}
	if builder.appIdFlag {
		req.AppId = &builder.appId

	}
	if builder.moduleFlag {
		req.Module = &builder.module

	}
	if builder.opTypeFlag {
		req.OpType = &builder.opType

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

type ClientIsvTenant struct {
	Id *string `json:"id,omitempty"` // 服务商ID

	Name *string `json:"name,omitempty"` // 服务商名称
}

type ClientIsvTenantBuilder struct {
	id     string // 服务商ID
	idFlag bool

	name     string // 服务商名称
	nameFlag bool
}

func NewClientIsvTenantBuilder() *ClientIsvTenantBuilder {
	builder := &ClientIsvTenantBuilder{}
	return builder
}

// 服务商ID
//
// 示例值：798456
func (builder *ClientIsvTenantBuilder) Id(id string) *ClientIsvTenantBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 服务商名称
//
// 示例值：北京飞书科技有限公司
func (builder *ClientIsvTenantBuilder) Name(name string) *ClientIsvTenantBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

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

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

	}
	return req
}

type ComponentLibBasic struct {
	LibId *string `json:"lib_id,omitempty"` // -

	Namespace *string `json:"namespace,omitempty"` // -

	Names []*I18n `json:"names,omitempty"` // -

	Descriptions []*I18n `json:"descriptions,omitempty"` // -

	Logo *Icon `json:"logo,omitempty"` // -

	LibType *string `json:"lib_type,omitempty"` // -

	Owner *LookupWithAvatar `json:"owner,omitempty"` // -

	InstallTaskInfo *TaskInfo `json:"install_task_info,omitempty"` // -

	SandboxTenantName *string `json:"sandbox_tenant_name,omitempty"` // -

	Status *string `json:"status,omitempty"` // -

	ISVMarketVersion *string `json:"i_s_v_market_version,omitempty"` // -

	ISVCustomerCount *string `json:"i_s_v_customer_count,omitempty"` // -

	CreatedAt *string `json:"created_at,omitempty"` // -

	CreatedBy *LookupWithAvatar `json:"created_by,omitempty"` // -

	UpdatedAt *string `json:"updated_at,omitempty"` // -

	UpdatedBy *LookupWithAvatar `json:"updated_by,omitempty"` // -

	LibStatus *string `json:"lib_status,omitempty"` // -

	OnTop *bool `json:"on_top,omitempty"` // -
}

type ComponentLibBasicBuilder struct {
	libId     string // -
	libIdFlag bool

	namespace     string // -
	namespaceFlag bool

	names     []*I18n // -
	namesFlag bool

	descriptions     []*I18n // -
	descriptionsFlag bool

	logo     *Icon // -
	logoFlag bool

	libType     string // -
	libTypeFlag bool

	owner     *LookupWithAvatar // -
	ownerFlag bool

	installTaskInfo     *TaskInfo // -
	installTaskInfoFlag bool

	sandboxTenantName     string // -
	sandboxTenantNameFlag bool

	status     string // -
	statusFlag bool

	iSVMarketVersion     string // -
	iSVMarketVersionFlag bool

	iSVCustomerCount     string // -
	iSVCustomerCountFlag bool

	createdAt     string // -
	createdAtFlag bool

	createdBy     *LookupWithAvatar // -
	createdByFlag bool

	updatedAt     string // -
	updatedAtFlag bool

	updatedBy     *LookupWithAvatar // -
	updatedByFlag bool

	libStatus     string // -
	libStatusFlag bool

	onTop     bool // -
	onTopFlag bool
}

func NewComponentLibBasicBuilder() *ComponentLibBasicBuilder {
	builder := &ComponentLibBasicBuilder{}
	return builder
}

// -
//
// 示例值：-
func (builder *ComponentLibBasicBuilder) LibId(libId string) *ComponentLibBasicBuilder {
	builder.libId = libId
	builder.libIdFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *ComponentLibBasicBuilder) Namespace(namespace string) *ComponentLibBasicBuilder {
	builder.namespace = namespace
	builder.namespaceFlag = true
	return builder
}

// -
//
// 示例值：
func (builder *ComponentLibBasicBuilder) Names(names []*I18n) *ComponentLibBasicBuilder {
	builder.names = names
	builder.namesFlag = true
	return builder
}

// -
//
// 示例值：
func (builder *ComponentLibBasicBuilder) Descriptions(descriptions []*I18n) *ComponentLibBasicBuilder {
	builder.descriptions = descriptions
	builder.descriptionsFlag = true
	return builder
}

// -
//
// 示例值：
func (builder *ComponentLibBasicBuilder) Logo(logo *Icon) *ComponentLibBasicBuilder {
	builder.logo = logo
	builder.logoFlag = true
	return builder
}

// -
//
// 示例值：
func (builder *ComponentLibBasicBuilder) LibType(libType string) *ComponentLibBasicBuilder {
	builder.libType = libType
	builder.libTypeFlag = true
	return builder
}

// -
//
// 示例值：
func (builder *ComponentLibBasicBuilder) Owner(owner *LookupWithAvatar) *ComponentLibBasicBuilder {
	builder.owner = owner
	builder.ownerFlag = true
	return builder
}

// -
//
// 示例值：
func (builder *ComponentLibBasicBuilder) InstallTaskInfo(installTaskInfo *TaskInfo) *ComponentLibBasicBuilder {
	builder.installTaskInfo = installTaskInfo
	builder.installTaskInfoFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *ComponentLibBasicBuilder) SandboxTenantName(sandboxTenantName string) *ComponentLibBasicBuilder {
	builder.sandboxTenantName = sandboxTenantName
	builder.sandboxTenantNameFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *ComponentLibBasicBuilder) Status(status string) *ComponentLibBasicBuilder {
	builder.status = status
	builder.statusFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *ComponentLibBasicBuilder) ISVMarketVersion(iSVMarketVersion string) *ComponentLibBasicBuilder {
	builder.iSVMarketVersion = iSVMarketVersion
	builder.iSVMarketVersionFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *ComponentLibBasicBuilder) ISVCustomerCount(iSVCustomerCount string) *ComponentLibBasicBuilder {
	builder.iSVCustomerCount = iSVCustomerCount
	builder.iSVCustomerCountFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *ComponentLibBasicBuilder) CreatedAt(createdAt string) *ComponentLibBasicBuilder {
	builder.createdAt = createdAt
	builder.createdAtFlag = true
	return builder
}

// -
//
// 示例值：
func (builder *ComponentLibBasicBuilder) CreatedBy(createdBy *LookupWithAvatar) *ComponentLibBasicBuilder {
	builder.createdBy = createdBy
	builder.createdByFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *ComponentLibBasicBuilder) UpdatedAt(updatedAt string) *ComponentLibBasicBuilder {
	builder.updatedAt = updatedAt
	builder.updatedAtFlag = true
	return builder
}

// -
//
// 示例值：
func (builder *ComponentLibBasicBuilder) UpdatedBy(updatedBy *LookupWithAvatar) *ComponentLibBasicBuilder {
	builder.updatedBy = updatedBy
	builder.updatedByFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *ComponentLibBasicBuilder) LibStatus(libStatus string) *ComponentLibBasicBuilder {
	builder.libStatus = libStatus
	builder.libStatusFlag = true
	return builder
}

// -
//
// 示例值：
func (builder *ComponentLibBasicBuilder) OnTop(onTop bool) *ComponentLibBasicBuilder {
	builder.onTop = onTop
	builder.onTopFlag = true
	return builder
}

func (builder *ComponentLibBasicBuilder) Build() *ComponentLibBasic {
	req := &ComponentLibBasic{}
	if builder.libIdFlag {
		req.LibId = &builder.libId

	}
	if builder.namespaceFlag {
		req.Namespace = &builder.namespace

	}
	if builder.namesFlag {
		req.Names = builder.names
	}
	if builder.descriptionsFlag {
		req.Descriptions = builder.descriptions
	}
	if builder.logoFlag {
		req.Logo = builder.logo
	}
	if builder.libTypeFlag {
		req.LibType = &builder.libType

	}
	if builder.ownerFlag {
		req.Owner = builder.owner
	}
	if builder.installTaskInfoFlag {
		req.InstallTaskInfo = builder.installTaskInfo
	}
	if builder.sandboxTenantNameFlag {
		req.SandboxTenantName = &builder.sandboxTenantName

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

	}
	if builder.iSVMarketVersionFlag {
		req.ISVMarketVersion = &builder.iSVMarketVersion

	}
	if builder.iSVCustomerCountFlag {
		req.ISVCustomerCount = &builder.iSVCustomerCount

	}
	if builder.createdAtFlag {
		req.CreatedAt = &builder.createdAt

	}
	if builder.createdByFlag {
		req.CreatedBy = builder.createdBy
	}
	if builder.updatedAtFlag {
		req.UpdatedAt = &builder.updatedAt

	}
	if builder.updatedByFlag {
		req.UpdatedBy = builder.updatedBy
	}
	if builder.libStatusFlag {
		req.LibStatus = &builder.libStatus

	}
	if builder.onTopFlag {
		req.OnTop = &builder.onTop

	}
	return req
}

type ComponentLibRef struct {
	BasicInfo *ComponentLibBasic `json:"basic_info,omitempty"` // -

	VersionNumber *string `json:"version_number,omitempty"` // -

	CanUpgrade *bool `json:"can_upgrade,omitempty"` // -

	VersionId *string `json:"version_id,omitempty"` // -

	CompsCount *string `json:"comps_count,omitempty"` // -

	OperatingTaskInfo *TaskInfo `json:"operating_task_info,omitempty"` // -

	OperatingType *string `json:"operating_type,omitempty"` // -

	LatestVersionNumber *string `json:"latest_version_number,omitempty"` // -

	InstalledAt *string `json:"installed_at,omitempty"` // -

	InstalledBy *LookupWithAvatar `json:"installed_by,omitempty"` // -

	UpdatedAt *string `json:"updated_at,omitempty"` // -

	UpdatedBy *LookupWithAvatar `json:"updated_by,omitempty"` // -

	DeveloperNames []*I18n `json:"developer_names,omitempty"` // -
}

type ComponentLibRefBuilder struct {
	basicInfo     *ComponentLibBasic // -
	basicInfoFlag bool

	versionNumber     string // -
	versionNumberFlag bool

	canUpgrade     bool // -
	canUpgradeFlag bool

	versionId     string // -
	versionIdFlag bool

	compsCount     string // -
	compsCountFlag bool

	operatingTaskInfo     *TaskInfo // -
	operatingTaskInfoFlag bool

	operatingType     string // -
	operatingTypeFlag bool

	latestVersionNumber     string // -
	latestVersionNumberFlag bool

	installedAt     string // -
	installedAtFlag bool

	installedBy     *LookupWithAvatar // -
	installedByFlag bool

	updatedAt     string // -
	updatedAtFlag bool

	updatedBy     *LookupWithAvatar // -
	updatedByFlag bool

	developerNames     []*I18n // -
	developerNamesFlag bool
}

func NewComponentLibRefBuilder() *ComponentLibRefBuilder {
	builder := &ComponentLibRefBuilder{}
	return builder
}

// -
//
// 示例值：
func (builder *ComponentLibRefBuilder) BasicInfo(basicInfo *ComponentLibBasic) *ComponentLibRefBuilder {
	builder.basicInfo = basicInfo
	builder.basicInfoFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *ComponentLibRefBuilder) VersionNumber(versionNumber string) *ComponentLibRefBuilder {
	builder.versionNumber = versionNumber
	builder.versionNumberFlag = true
	return builder
}

// -
//
// 示例值：true
func (builder *ComponentLibRefBuilder) CanUpgrade(canUpgrade bool) *ComponentLibRefBuilder {
	builder.canUpgrade = canUpgrade
	builder.canUpgradeFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *ComponentLibRefBuilder) VersionId(versionId string) *ComponentLibRefBuilder {
	builder.versionId = versionId
	builder.versionIdFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *ComponentLibRefBuilder) CompsCount(compsCount string) *ComponentLibRefBuilder {
	builder.compsCount = compsCount
	builder.compsCountFlag = true
	return builder
}

// -
//
// 示例值：
func (builder *ComponentLibRefBuilder) OperatingTaskInfo(operatingTaskInfo *TaskInfo) *ComponentLibRefBuilder {
	builder.operatingTaskInfo = operatingTaskInfo
	builder.operatingTaskInfoFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *ComponentLibRefBuilder) OperatingType(operatingType string) *ComponentLibRefBuilder {
	builder.operatingType = operatingType
	builder.operatingTypeFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *ComponentLibRefBuilder) LatestVersionNumber(latestVersionNumber string) *ComponentLibRefBuilder {
	builder.latestVersionNumber = latestVersionNumber
	builder.latestVersionNumberFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *ComponentLibRefBuilder) InstalledAt(installedAt string) *ComponentLibRefBuilder {
	builder.installedAt = installedAt
	builder.installedAtFlag = true
	return builder
}

// -
//
// 示例值：
func (builder *ComponentLibRefBuilder) InstalledBy(installedBy *LookupWithAvatar) *ComponentLibRefBuilder {
	builder.installedBy = installedBy
	builder.installedByFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *ComponentLibRefBuilder) UpdatedAt(updatedAt string) *ComponentLibRefBuilder {
	builder.updatedAt = updatedAt
	builder.updatedAtFlag = true
	return builder
}

// -
//
// 示例值：
func (builder *ComponentLibRefBuilder) UpdatedBy(updatedBy *LookupWithAvatar) *ComponentLibRefBuilder {
	builder.updatedBy = updatedBy
	builder.updatedByFlag = true
	return builder
}

// -
//
// 示例值：
func (builder *ComponentLibRefBuilder) DeveloperNames(developerNames []*I18n) *ComponentLibRefBuilder {
	builder.developerNames = developerNames
	builder.developerNamesFlag = true
	return builder
}

func (builder *ComponentLibRefBuilder) Build() *ComponentLibRef {
	req := &ComponentLibRef{}
	if builder.basicInfoFlag {
		req.BasicInfo = builder.basicInfo
	}
	if builder.versionNumberFlag {
		req.VersionNumber = &builder.versionNumber

	}
	if builder.canUpgradeFlag {
		req.CanUpgrade = &builder.canUpgrade

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

	}
	if builder.compsCountFlag {
		req.CompsCount = &builder.compsCount

	}
	if builder.operatingTaskInfoFlag {
		req.OperatingTaskInfo = builder.operatingTaskInfo
	}
	if builder.operatingTypeFlag {
		req.OperatingType = &builder.operatingType

	}
	if builder.latestVersionNumberFlag {
		req.LatestVersionNumber = &builder.latestVersionNumber

	}
	if builder.installedAtFlag {
		req.InstalledAt = &builder.installedAt

	}
	if builder.installedByFlag {
		req.InstalledBy = builder.installedBy
	}
	if builder.updatedAtFlag {
		req.UpdatedAt = &builder.updatedAt

	}
	if builder.updatedByFlag {
		req.UpdatedBy = builder.updatedBy
	}
	if builder.developerNamesFlag {
		req.DeveloperNames = builder.developerNames
	}
	return req
}

type ComponentLibVersion struct {
	VersionNumber *string `json:"version_number,omitempty"` // -

	Directions []*I18n `json:"directions,omitempty"` // -

	Status *int `json:"status,omitempty"` // -

	IsLatest *bool `json:"is_latest,omitempty"` // -

	Settings *string `json:"settings,omitempty"` // -

	IsvLink *string `json:"isv_link,omitempty"` // -

	IsIsvMarketVersion *bool `json:"is_isv_market_version,omitempty"` // -

	Link *string `json:"link,omitempty"` // -

	IsMarketVersion *bool `json:"is_market_version,omitempty"` // -

	CreatedAt *string `json:"created_at,omitempty"` // -

	CreatedBy *LookupWithAvatar `json:"created_by,omitempty"` // -

	AppliedAt *string `json:"applied_at,omitempty"` // -
}

type ComponentLibVersionBuilder struct {
	versionNumber     string // -
	versionNumberFlag bool

	directions     []*I18n // -
	directionsFlag bool

	status     int // -
	statusFlag bool

	isLatest     bool // -
	isLatestFlag bool

	settings     string // -
	settingsFlag bool

	isvLink     string // -
	isvLinkFlag bool

	isIsvMarketVersion     bool // -
	isIsvMarketVersionFlag bool

	link     string // -
	linkFlag bool

	isMarketVersion     bool // -
	isMarketVersionFlag bool

	createdAt     string // -
	createdAtFlag bool

	createdBy     *LookupWithAvatar // -
	createdByFlag bool

	appliedAt     string // -
	appliedAtFlag bool
}

func NewComponentLibVersionBuilder() *ComponentLibVersionBuilder {
	builder := &ComponentLibVersionBuilder{}
	return builder
}

// -
//
// 示例值：-
func (builder *ComponentLibVersionBuilder) VersionNumber(versionNumber string) *ComponentLibVersionBuilder {
	builder.versionNumber = versionNumber
	builder.versionNumberFlag = true
	return builder
}

// -
//
// 示例值：
func (builder *ComponentLibVersionBuilder) Directions(directions []*I18n) *ComponentLibVersionBuilder {
	builder.directions = directions
	builder.directionsFlag = true
	return builder
}

// -
//
// 示例值：1
func (builder *ComponentLibVersionBuilder) Status(status int) *ComponentLibVersionBuilder {
	builder.status = status
	builder.statusFlag = true
	return builder
}

// -
//
// 示例值：false
func (builder *ComponentLibVersionBuilder) IsLatest(isLatest bool) *ComponentLibVersionBuilder {
	builder.isLatest = isLatest
	builder.isLatestFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *ComponentLibVersionBuilder) Settings(settings string) *ComponentLibVersionBuilder {
	builder.settings = settings
	builder.settingsFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *ComponentLibVersionBuilder) IsvLink(isvLink string) *ComponentLibVersionBuilder {
	builder.isvLink = isvLink
	builder.isvLinkFlag = true
	return builder
}

// -
//
// 示例值：false
func (builder *ComponentLibVersionBuilder) IsIsvMarketVersion(isIsvMarketVersion bool) *ComponentLibVersionBuilder {
	builder.isIsvMarketVersion = isIsvMarketVersion
	builder.isIsvMarketVersionFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *ComponentLibVersionBuilder) Link(link string) *ComponentLibVersionBuilder {
	builder.link = link
	builder.linkFlag = true
	return builder
}

// -
//
// 示例值：false
func (builder *ComponentLibVersionBuilder) IsMarketVersion(isMarketVersion bool) *ComponentLibVersionBuilder {
	builder.isMarketVersion = isMarketVersion
	builder.isMarketVersionFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *ComponentLibVersionBuilder) CreatedAt(createdAt string) *ComponentLibVersionBuilder {
	builder.createdAt = createdAt
	builder.createdAtFlag = true
	return builder
}

// -
//
// 示例值：
func (builder *ComponentLibVersionBuilder) CreatedBy(createdBy *LookupWithAvatar) *ComponentLibVersionBuilder {
	builder.createdBy = createdBy
	builder.createdByFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *ComponentLibVersionBuilder) AppliedAt(appliedAt string) *ComponentLibVersionBuilder {
	builder.appliedAt = appliedAt
	builder.appliedAtFlag = true
	return builder
}

func (builder *ComponentLibVersionBuilder) Build() *ComponentLibVersion {
	req := &ComponentLibVersion{}
	if builder.versionNumberFlag {
		req.VersionNumber = &builder.versionNumber

	}
	if builder.directionsFlag {
		req.Directions = builder.directions
	}
	if builder.statusFlag {
		req.Status = &builder.status

	}
	if builder.isLatestFlag {
		req.IsLatest = &builder.isLatest

	}
	if builder.settingsFlag {
		req.Settings = &builder.settings

	}
	if builder.isvLinkFlag {
		req.IsvLink = &builder.isvLink

	}
	if builder.isIsvMarketVersionFlag {
		req.IsIsvMarketVersion = &builder.isIsvMarketVersion

	}
	if builder.linkFlag {
		req.Link = &builder.link

	}
	if builder.isMarketVersionFlag {
		req.IsMarketVersion = &builder.isMarketVersion

	}
	if builder.createdAtFlag {
		req.CreatedAt = &builder.createdAt

	}
	if builder.createdByFlag {
		req.CreatedBy = builder.createdBy
	}
	if builder.appliedAtFlag {
		req.AppliedAt = &builder.appliedAt

	}
	return req
}

type Condition struct {
	Index *string `json:"index,omitempty"` // 序号

	Left *ConditionValue `json:"left,omitempty"` // 左值

	Right *ConditionValue `json:"right,omitempty"` // 右值

	Operator *string `json:"operator,omitempty"` // 操作符
}

type ConditionBuilder struct {
	index     string // 序号
	indexFlag bool

	left     *ConditionValue // 左值
	leftFlag bool

	right     *ConditionValue // 右值
	rightFlag bool

	operator     string // 操作符
	operatorFlag bool
}

func NewConditionBuilder() *ConditionBuilder {
	builder := &ConditionBuilder{}
	return builder
}

// 序号
//
// 示例值：1
func (builder *ConditionBuilder) Index(index string) *ConditionBuilder {
	builder.index = index
	builder.indexFlag = true
	return builder
}

// 左值
//
// 示例值：
func (builder *ConditionBuilder) Left(left *ConditionValue) *ConditionBuilder {
	builder.left = left
	builder.leftFlag = true
	return builder
}

// 右值
//
// 示例值：
func (builder *ConditionBuilder) Right(right *ConditionValue) *ConditionBuilder {
	builder.right = right
	builder.rightFlag = true
	return builder
}

// 操作符
//
// 示例值：equal
func (builder *ConditionBuilder) Operator(operator string) *ConditionBuilder {
	builder.operator = operator
	builder.operatorFlag = true
	return builder
}

func (builder *ConditionBuilder) Build() *Condition {
	req := &Condition{}
	if builder.indexFlag {
		req.Index = &builder.index

	}
	if builder.leftFlag {
		req.Left = builder.left
	}
	if builder.rightFlag {
		req.Right = builder.right
	}
	if builder.operatorFlag {
		req.Operator = &builder.operator

	}
	return req
}

type ConditionValue struct {
	Type *string `json:"type,omitempty"` // 类型

	Settings *string `json:"settings,omitempty"` // 设置值

	DisplayNames []string `json:"display_names,omitempty"` // 左值/右值的展示名称
}

type ConditionValueBuilder struct {
	type_    string // 类型
	typeFlag bool

	settings     string // 设置值
	settingsFlag bool

	displayNames     []string // 左值/右值的展示名称
	displayNamesFlag bool
}

func NewConditionValueBuilder() *ConditionValueBuilder {
	builder := &ConditionValueBuilder{}
	return builder
}

// 类型
//
// 示例值：metadataVariable
func (builder *ConditionValueBuilder) Type(type_ string) *ConditionValueBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// 设置值
//
// 示例值：{\"fieldPath\":[{\"fieldApiName\": \"_id\",\"objectApiName\": \"_user\"}]}
func (builder *ConditionValueBuilder) Settings(settings string) *ConditionValueBuilder {
	builder.settings = settings
	builder.settingsFlag = true
	return builder
}

// 左值/右值的展示名称
//
// 示例值：
func (builder *ConditionValueBuilder) DisplayNames(displayNames []string) *ConditionValueBuilder {
	builder.displayNames = displayNames
	builder.displayNamesFlag = true
	return builder
}

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

	}
	if builder.settingsFlag {
		req.Settings = &builder.settings

	}
	if builder.displayNamesFlag {
		req.DisplayNames = builder.displayNames
	}
	return req
}

type ConnectorInstance struct {
	ApiId *string `json:"api_id,omitempty"` // 连接器实例ID

	ApiName *string `json:"api_name,omitempty"` // 连接器实例APIName

	Label map[string]string `json:"label,omitempty"` // 连接器实例标题

	Desc map[string]string `json:"desc,omitempty"` // 连接器实例描述

	OutBizType *string `json:"out_biz_type,omitempty"` // 连接器业务类型

	OutBizId *string `json:"out_biz_id,omitempty"` // 连接器业务ID

	Definition *ConnectorInstanceDefinition `json:"definition,omitempty"` // 连接器实例定义
}

type ConnectorInstanceBuilder struct {
	apiId     string // 连接器实例ID
	apiIdFlag bool

	apiName     string // 连接器实例APIName
	apiNameFlag bool

	label     map[string]string // 连接器实例标题
	labelFlag bool

	desc     map[string]string // 连接器实例描述
	descFlag bool

	outBizType     string // 连接器业务类型
	outBizTypeFlag bool

	outBizId     string // 连接器业务ID
	outBizIdFlag bool

	definition     *ConnectorInstanceDefinition // 连接器实例定义
	definitionFlag bool
}

func NewConnectorInstanceBuilder() *ConnectorInstanceBuilder {
	builder := &ConnectorInstanceBuilder{}
	return builder
}

// 连接器实例ID
//
// 示例值：test1
func (builder *ConnectorInstanceBuilder) ApiId(apiId string) *ConnectorInstanceBuilder {
	builder.apiId = apiId
	builder.apiIdFlag = true
	return builder
}

// 连接器实例APIName
//
// 示例值：test_apiname
func (builder *ConnectorInstanceBuilder) ApiName(apiName string) *ConnectorInstanceBuilder {
	builder.apiName = apiName
	builder.apiNameFlag = true
	return builder
}

// 连接器实例标题
//
// 示例值：test_label
func (builder *ConnectorInstanceBuilder) Label(label map[string]string) *ConnectorInstanceBuilder {
	builder.label = label
	builder.labelFlag = true
	return builder
}

// 连接器实例描述
//
// 示例值：test_desc
func (builder *ConnectorInstanceBuilder) Desc(desc map[string]string) *ConnectorInstanceBuilder {
	builder.desc = desc
	builder.descFlag = true
	return builder
}

// 连接器业务类型
//
// 示例值：test_outBizType
func (builder *ConnectorInstanceBuilder) OutBizType(outBizType string) *ConnectorInstanceBuilder {
	builder.outBizType = outBizType
	builder.outBizTypeFlag = true
	return builder
}

// 连接器业务ID
//
// 示例值：test_out_biz_id
func (builder *ConnectorInstanceBuilder) OutBizId(outBizId string) *ConnectorInstanceBuilder {
	builder.outBizId = outBizId
	builder.outBizIdFlag = true
	return builder
}

// 连接器实例定义
//
// 示例值：test_definition
func (builder *ConnectorInstanceBuilder) Definition(definition *ConnectorInstanceDefinition) *ConnectorInstanceBuilder {
	builder.definition = definition
	builder.definitionFlag = true
	return builder
}

func (builder *ConnectorInstanceBuilder) Build() *ConnectorInstance {
	req := &ConnectorInstance{}
	if builder.apiIdFlag {
		req.ApiId = &builder.apiId

	}
	if builder.apiNameFlag {
		req.ApiName = &builder.apiName

	}
	if builder.labelFlag {
		req.Label = builder.label
	}
	if builder.descFlag {
		req.Desc = builder.desc
	}
	if builder.outBizTypeFlag {
		req.OutBizType = &builder.outBizType

	}
	if builder.outBizIdFlag {
		req.OutBizId = &builder.outBizId

	}
	if builder.definitionFlag {
		req.Definition = builder.definition
	}
	return req
}

type ConnectorInstanceDefinition struct {
	ConnectorSourceType *string `json:"connector_source_type,omitempty"` // 连接器源类型

	ConnectorApiName *string `json:"connector_api_name,omitempty"` // 连接器APIName

	ActionApiName *string `json:"action_api_name,omitempty"` // 连接器Action APIName

	ConnectionApiName *string `json:"connection_api_name,omitempty"` // 连接APIName

	InputData *string `json:"input_data,omitempty"` // 输入参数

	OutputDataSchema *string `json:"output_data_schema,omitempty"` // 输出数据schema
}

type ConnectorInstanceDefinitionBuilder struct {
	connectorSourceType     string // 连接器源类型
	connectorSourceTypeFlag bool

	connectorApiName     string // 连接器APIName
	connectorApiNameFlag bool

	actionApiName     string // 连接器Action APIName
	actionApiNameFlag bool

	connectionApiName     string // 连接APIName
	connectionApiNameFlag bool

	inputData     string // 输入参数
	inputDataFlag bool

	outputDataSchema     string // 输出数据schema
	outputDataSchemaFlag bool
}

func NewConnectorInstanceDefinitionBuilder() *ConnectorInstanceDefinitionBuilder {
	builder := &ConnectorInstanceDefinitionBuilder{}
	return builder
}

// 连接器源类型
//
// 示例值：connector
func (builder *ConnectorInstanceDefinitionBuilder) ConnectorSourceType(connectorSourceType string) *ConnectorInstanceDefinitionBuilder {
	builder.connectorSourceType = connectorSourceType
	builder.connectorSourceTypeFlag = true
	return builder
}

// 连接器APIName
//
// 示例值：test_connector
func (builder *ConnectorInstanceDefinitionBuilder) ConnectorApiName(connectorApiName string) *ConnectorInstanceDefinitionBuilder {
	builder.connectorApiName = connectorApiName
	builder.connectorApiNameFlag = true
	return builder
}

// 连接器Action APIName
//
// 示例值：test_action
func (builder *ConnectorInstanceDefinitionBuilder) ActionApiName(actionApiName string) *ConnectorInstanceDefinitionBuilder {
	builder.actionApiName = actionApiName
	builder.actionApiNameFlag = true
	return builder
}

// 连接APIName
//
// 示例值：test_connection
func (builder *ConnectorInstanceDefinitionBuilder) ConnectionApiName(connectionApiName string) *ConnectorInstanceDefinitionBuilder {
	builder.connectionApiName = connectionApiName
	builder.connectionApiNameFlag = true
	return builder
}

// 输入参数
//
// 示例值：\{\}
func (builder *ConnectorInstanceDefinitionBuilder) InputData(inputData string) *ConnectorInstanceDefinitionBuilder {
	builder.inputData = inputData
	builder.inputDataFlag = true
	return builder
}

// 输出数据schema
//
// 示例值：\{\}
func (builder *ConnectorInstanceDefinitionBuilder) OutputDataSchema(outputDataSchema string) *ConnectorInstanceDefinitionBuilder {
	builder.outputDataSchema = outputDataSchema
	builder.outputDataSchemaFlag = true
	return builder
}

func (builder *ConnectorInstanceDefinitionBuilder) Build() *ConnectorInstanceDefinition {
	req := &ConnectorInstanceDefinition{}
	if builder.connectorSourceTypeFlag {
		req.ConnectorSourceType = &builder.connectorSourceType

	}
	if builder.connectorApiNameFlag {
		req.ConnectorApiName = &builder.connectorApiName

	}
	if builder.actionApiNameFlag {
		req.ActionApiName = &builder.actionApiName

	}
	if builder.connectionApiNameFlag {
		req.ConnectionApiName = &builder.connectionApiName

	}
	if builder.inputDataFlag {
		req.InputData = &builder.inputData

	}
	if builder.outputDataSchemaFlag {
		req.OutputDataSchema = &builder.outputDataSchema

	}
	return req
}

type ConnectorInstanceRefInfo struct {
	SourceApiName *string `json:"source_api_name,omitempty"` // 连接器SourceAPIname

	SourceType *string `json:"source_type,omitempty"` // 连接器SourceType

	Extra map[string]string `json:"extra,omitempty"` // 连接器Extra
}

type ConnectorInstanceRefInfoBuilder struct {
	sourceApiName     string // 连接器SourceAPIname
	sourceApiNameFlag bool

	sourceType     string // 连接器SourceType
	sourceTypeFlag bool

	extra     map[string]string // 连接器Extra
	extraFlag bool
}

func NewConnectorInstanceRefInfoBuilder() *ConnectorInstanceRefInfoBuilder {
	builder := &ConnectorInstanceRefInfoBuilder{}
	return builder
}

// 连接器SourceAPIname
//
// 示例值：test_1
func (builder *ConnectorInstanceRefInfoBuilder) SourceApiName(sourceApiName string) *ConnectorInstanceRefInfoBuilder {
	builder.sourceApiName = sourceApiName
	builder.sourceApiNameFlag = true
	return builder
}

// 连接器SourceType
//
// 示例值：connector
func (builder *ConnectorInstanceRefInfoBuilder) SourceType(sourceType string) *ConnectorInstanceRefInfoBuilder {
	builder.sourceType = sourceType
	builder.sourceTypeFlag = true
	return builder
}

// 连接器Extra
//
// 示例值：extra
func (builder *ConnectorInstanceRefInfoBuilder) Extra(extra map[string]string) *ConnectorInstanceRefInfoBuilder {
	builder.extra = extra
	builder.extraFlag = true
	return builder
}

func (builder *ConnectorInstanceRefInfoBuilder) Build() *ConnectorInstanceRefInfo {
	req := &ConnectorInstanceRefInfo{}
	if builder.sourceApiNameFlag {
		req.SourceApiName = &builder.sourceApiName

	}
	if builder.sourceTypeFlag {
		req.SourceType = &builder.sourceType

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

type Criterion struct {
	Conditions []*Condition `json:"conditions,omitempty"` // 查询条件

	LogicExpression *string `json:"logic_expression,omitempty"` // 逻辑关系
}

type CriterionBuilder struct {
	conditions     []*Condition // 查询条件
	conditionsFlag bool

	logicExpression     string // 逻辑关系
	logicExpressionFlag bool
}

func NewCriterionBuilder() *CriterionBuilder {
	builder := &CriterionBuilder{}
	return builder
}

// 查询条件
//
// 示例值：
func (builder *CriterionBuilder) Conditions(conditions []*Condition) *CriterionBuilder {
	builder.conditions = conditions
	builder.conditionsFlag = true
	return builder
}

// 逻辑关系
//
// 示例值：1 and 2
func (builder *CriterionBuilder) LogicExpression(logicExpression string) *CriterionBuilder {
	builder.logicExpression = logicExpression
	builder.logicExpressionFlag = true
	return builder
}

func (builder *CriterionBuilder) Build() *Criterion {
	req := &Criterion{}
	if builder.conditionsFlag {
		req.Conditions = builder.conditions
	}
	if builder.logicExpressionFlag {
		req.LogicExpression = &builder.logicExpression

	}
	return req
}

type Data struct {
	Workspace *string `json:"workspace,omitempty"` // workspace信息

	App *string `json:"app,omitempty"` // app id

	Table *string `json:"table,omitempty"` // 发生数据记录变更的数据表

	Type *string `json:"type,omitempty"` // 变更类型

	Operator *string `json:"operator,omitempty"` // 变更人

	Before *string `json:"before,omitempty"` // 变更前的数据记录

	After *string `json:"after,omitempty"` // 变更后的数据记录
}

type DataBuilder struct {
	workspace     string // workspace信息
	workspaceFlag bool

	app     string // app id
	appFlag bool

	table     string // 发生数据记录变更的数据表
	tableFlag bool

	type_    string // 变更类型
	typeFlag bool

	operator     string // 变更人
	operatorFlag bool

	before     string // 变更前的数据记录
	beforeFlag bool

	after     string // 变更后的数据记录
	afterFlag bool
}

func NewDataBuilder() *DataBuilder {
	builder := &DataBuilder{}
	return builder
}

// workspace信息
//
// 示例值：workspace_aadiyljodleqw
func (builder *DataBuilder) Workspace(workspace string) *DataBuilder {
	builder.workspace = workspace
	builder.workspaceFlag = true
	return builder
}

// app id
//
// 示例值：app_xxxx
func (builder *DataBuilder) App(app string) *DataBuilder {
	builder.app = app
	builder.appFlag = true
	return builder
}

// 发生数据记录变更的数据表
//
// 示例值：t1
func (builder *DataBuilder) Table(table string) *DataBuilder {
	builder.table = table
	builder.tableFlag = true
	return builder
}

// 变更类型
//
// 示例值：
func (builder *DataBuilder) Type(type_ string) *DataBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// 变更人
//
// 示例值：(1801755886986304)
func (builder *DataBuilder) Operator(operator string) *DataBuilder {
	builder.operator = operator
	builder.operatorFlag = true
	return builder
}

// 变更前的数据记录
//
// 示例值：{		   "_created_at": "2025-10-30 22:32:56.90873+08",			 "_created_by": "(1801755886986304)",			 "_id": "6ca55db2-503f-4490-ae6b-76834f9e6d15",			 "_updated_at": "2025-10-30 22:32:56.90873+08",			 "_updated_by": "(1801755886986304)",			 "custom_col_1": 123,			 "custom_col_2": 000,			 "custom_col_3": "xxx",			 "custom_col_5": "yyy" }
func (builder *DataBuilder) Before(before string) *DataBuilder {
	builder.before = before
	builder.beforeFlag = true
	return builder
}

// 变更后的数据记录
//
// 示例值："{	 "_updated_at": "2025-10-14 18:18:26.509353+08",	 "_updated_by": "(1801755886986304)",	 "custom_col_1": 456 }"
func (builder *DataBuilder) After(after string) *DataBuilder {
	builder.after = after
	builder.afterFlag = true
	return builder
}

func (builder *DataBuilder) Build() *Data {
	req := &Data{}
	if builder.workspaceFlag {
		req.Workspace = &builder.workspace

	}
	if builder.appFlag {
		req.App = &builder.app

	}
	if builder.tableFlag {
		req.Table = &builder.table

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

	}
	if builder.operatorFlag {
		req.Operator = &builder.operator

	}
	if builder.beforeFlag {
		req.Before = &builder.before

	}
	if builder.afterFlag {
		req.After = &builder.after

	}
	return req
}

type DataModelPermissionAccess struct {
	ApiId *string `json:"api_id,omitempty"` // 对象的api_id

	ApiName *string `json:"api_name,omitempty"` // 对象的api_name

	AllowedAccess []int `json:"allowed_access,omitempty"` // 权限列表

	Fields []*FieldPermissionAccess `json:"fields,omitempty"` // 字段信息

	DataModelType *string `json:"data_model_type,omitempty"` // 对象模型类型

	DisplayName map[string]string `json:"display_name,omitempty"` // 对象的展示名称
}

type DataModelPermissionAccessBuilder struct {
	apiId     string // 对象的api_id
	apiIdFlag bool

	apiName     string // 对象的api_name
	apiNameFlag bool

	allowedAccess     []int // 权限列表
	allowedAccessFlag bool

	fields     []*FieldPermissionAccess // 字段信息
	fieldsFlag bool

	dataModelType     string // 对象模型类型
	dataModelTypeFlag bool

	displayName     map[string]string // 对象的展示名称
	displayNameFlag bool
}

func NewDataModelPermissionAccessBuilder() *DataModelPermissionAccessBuilder {
	builder := &DataModelPermissionAccessBuilder{}
	return builder
}

// 对象的api_id
//
// 示例值：api_id
func (builder *DataModelPermissionAccessBuilder) ApiId(apiId string) *DataModelPermissionAccessBuilder {
	builder.apiId = apiId
	builder.apiIdFlag = true
	return builder
}

// 对象的api_name
//
// 示例值：api_name
func (builder *DataModelPermissionAccessBuilder) ApiName(apiName string) *DataModelPermissionAccessBuilder {
	builder.apiName = apiName
	builder.apiNameFlag = true
	return builder
}

// 权限列表
//
// 示例值：
func (builder *DataModelPermissionAccessBuilder) AllowedAccess(allowedAccess []int) *DataModelPermissionAccessBuilder {
	builder.allowedAccess = allowedAccess
	builder.allowedAccessFlag = true
	return builder
}

// 字段信息
//
// 示例值：
func (builder *DataModelPermissionAccessBuilder) Fields(fields []*FieldPermissionAccess) *DataModelPermissionAccessBuilder {
	builder.fields = fields
	builder.fieldsFlag = true
	return builder
}

// 对象模型类型
//
// 示例值：data
func (builder *DataModelPermissionAccessBuilder) DataModelType(dataModelType string) *DataModelPermissionAccessBuilder {
	builder.dataModelType = dataModelType
	builder.dataModelTypeFlag = true
	return builder
}

// 对象的展示名称
//
// 示例值：
func (builder *DataModelPermissionAccessBuilder) DisplayName(displayName map[string]string) *DataModelPermissionAccessBuilder {
	builder.displayName = displayName
	builder.displayNameFlag = true
	return builder
}

func (builder *DataModelPermissionAccessBuilder) Build() *DataModelPermissionAccess {
	req := &DataModelPermissionAccess{}
	if builder.apiIdFlag {
		req.ApiId = &builder.apiId

	}
	if builder.apiNameFlag {
		req.ApiName = &builder.apiName

	}
	if builder.allowedAccessFlag {
		req.AllowedAccess = builder.allowedAccess
	}
	if builder.fieldsFlag {
		req.Fields = builder.fields
	}
	if builder.dataModelTypeFlag {
		req.DataModelType = &builder.dataModelType

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

type DataModelPermissionV2 struct {
	RoleApiName *string `json:"role_api_name,omitempty"` // 所属角色 apiName

	DataModelApiName *string `json:"data_model_api_name,omitempty"` // 关联数据模型 apiName

	DataModelType *string `json:"data_model_type,omitempty"` // 关联数据模型 类型对象/数据集

	AccessPermissions []int `json:"access_permissions,omitempty"` // 对象的权限列表

	FieldPermissionConfig *FieldPermissionConfigV2 `json:"field_permission_config,omitempty"` // 字段权限

	DataModelName map[string]string `json:"data_model_name,omitempty"` // 数据模型名称
}

type DataModelPermissionV2Builder struct {
	roleApiName     string // 所属角色 apiName
	roleApiNameFlag bool

	dataModelApiName     string // 关联数据模型 apiName
	dataModelApiNameFlag bool

	dataModelType     string // 关联数据模型 类型对象/数据集
	dataModelTypeFlag bool

	accessPermissions     []int // 对象的权限列表
	accessPermissionsFlag bool

	fieldPermissionConfig     *FieldPermissionConfigV2 // 字段权限
	fieldPermissionConfigFlag bool

	dataModelName     map[string]string // 数据模型名称
	dataModelNameFlag bool
}

func NewDataModelPermissionV2Builder() *DataModelPermissionV2Builder {
	builder := &DataModelPermissionV2Builder{}
	return builder
}

// 所属角色 apiName
//
// 示例值：role_65445dff6ed
func (builder *DataModelPermissionV2Builder) RoleApiName(roleApiName string) *DataModelPermissionV2Builder {
	builder.roleApiName = roleApiName
	builder.roleApiNameFlag = true
	return builder
}

// 关联数据模型 apiName
//
// 示例值：data_model_65445dff6ed
func (builder *DataModelPermissionV2Builder) DataModelApiName(dataModelApiName string) *DataModelPermissionV2Builder {
	builder.dataModelApiName = dataModelApiName
	builder.dataModelApiNameFlag = true
	return builder
}

// 关联数据模型 类型对象/数据集
//
// 示例值：object
func (builder *DataModelPermissionV2Builder) DataModelType(dataModelType string) *DataModelPermissionV2Builder {
	builder.dataModelType = dataModelType
	builder.dataModelTypeFlag = true
	return builder
}

// 对象的权限列表
//
// 示例值：
func (builder *DataModelPermissionV2Builder) AccessPermissions(accessPermissions []int) *DataModelPermissionV2Builder {
	builder.accessPermissions = accessPermissions
	builder.accessPermissionsFlag = true
	return builder
}

// 字段权限
//
// 示例值：
func (builder *DataModelPermissionV2Builder) FieldPermissionConfig(fieldPermissionConfig *FieldPermissionConfigV2) *DataModelPermissionV2Builder {
	builder.fieldPermissionConfig = fieldPermissionConfig
	builder.fieldPermissionConfigFlag = true
	return builder
}

// 数据模型名称
//
// 示例值：
func (builder *DataModelPermissionV2Builder) DataModelName(dataModelName map[string]string) *DataModelPermissionV2Builder {
	builder.dataModelName = dataModelName
	builder.dataModelNameFlag = true
	return builder
}

func (builder *DataModelPermissionV2Builder) Build() *DataModelPermissionV2 {
	req := &DataModelPermissionV2{}
	if builder.roleApiNameFlag {
		req.RoleApiName = &builder.roleApiName

	}
	if builder.dataModelApiNameFlag {
		req.DataModelApiName = &builder.dataModelApiName

	}
	if builder.dataModelTypeFlag {
		req.DataModelType = &builder.dataModelType

	}
	if builder.accessPermissionsFlag {
		req.AccessPermissions = builder.accessPermissions
	}
	if builder.fieldPermissionConfigFlag {
		req.FieldPermissionConfig = builder.fieldPermissionConfig
	}
	if builder.dataModelNameFlag {
		req.DataModelName = builder.dataModelName
	}
	return req
}

type Dataset struct {
	Namespace *string `json:"namespace,omitempty"` // 应用的命名空间

	ApiId *string `json:"api_id,omitempty"` // 数据集 API ID

	ApiName *string `json:"api_name,omitempty"` // 数据集的 API 名称

	Label map[string]string `json:"label,omitempty"` // 数据集的名称

	Source *DatasetSource `json:"source,omitempty"` // 数据来源

	Fields []*DatasetField `json:"fields,omitempty"` // 数据集字段

	DataRefreshTime *int `json:"data_refresh_time,omitempty"` // 数据最近更新时间（毫秒时间戳）

	CreateTime *int `json:"create_time,omitempty"` // 创建时间（毫秒时间戳）

	CreatedBy *DatasetLookupUser `json:"created_by,omitempty"` // 创建人

	UpdateTime *int `json:"update_time,omitempty"` // 更新时间（毫秒时间戳）

	UpdatedBy *DatasetLookupUser `json:"updated_by,omitempty"` // 更新人
}

type DatasetBuilder struct {
	namespace     string // 应用的命名空间
	namespaceFlag bool

	apiId     string // 数据集 API ID
	apiIdFlag bool

	apiName     string // 数据集的 API 名称
	apiNameFlag bool

	label     map[string]string // 数据集的名称
	labelFlag bool

	source     *DatasetSource // 数据来源
	sourceFlag bool

	fields     []*DatasetField // 数据集字段
	fieldsFlag bool

	dataRefreshTime     int // 数据最近更新时间（毫秒时间戳）
	dataRefreshTimeFlag bool

	createTime     int // 创建时间（毫秒时间戳）
	createTimeFlag bool

	createdBy     *DatasetLookupUser // 创建人
	createdByFlag bool

	updateTime     int // 更新时间（毫秒时间戳）
	updateTimeFlag bool

	updatedBy     *DatasetLookupUser // 更新人
	updatedByFlag bool
}

func NewDatasetBuilder() *DatasetBuilder {
	builder := &DatasetBuilder{}
	return builder
}

// 应用的命名空间
//
// 示例值：package_test__c
func (builder *DatasetBuilder) Namespace(namespace string) *DatasetBuilder {
	builder.namespace = namespace
	builder.namespaceFlag = true
	return builder
}

// 数据集 API ID
//
// 示例值：package_test__c_dataset_adefa
func (builder *DatasetBuilder) ApiId(apiId string) *DatasetBuilder {
	builder.apiId = apiId
	builder.apiIdFlag = true
	return builder
}

// 数据集的 API 名称
//
// 示例值：myDataset
func (builder *DatasetBuilder) ApiName(apiName string) *DatasetBuilder {
	builder.apiName = apiName
	builder.apiNameFlag = true
	return builder
}

// 数据集的名称
//
// 示例值：
func (builder *DatasetBuilder) Label(label map[string]string) *DatasetBuilder {
	builder.label = label
	builder.labelFlag = true
	return builder
}

// 数据来源
//
// 示例值：
func (builder *DatasetBuilder) Source(source *DatasetSource) *DatasetBuilder {
	builder.source = source
	builder.sourceFlag = true
	return builder
}

// 数据集字段
//
// 示例值：
func (builder *DatasetBuilder) Fields(fields []*DatasetField) *DatasetBuilder {
	builder.fields = fields
	builder.fieldsFlag = true
	return builder
}

// 数据最近更新时间（毫秒时间戳）
//
// 示例值：1681876208309
func (builder *DatasetBuilder) DataRefreshTime(dataRefreshTime int) *DatasetBuilder {
	builder.dataRefreshTime = dataRefreshTime
	builder.dataRefreshTimeFlag = true
	return builder
}

// 创建时间（毫秒时间戳）
//
// 示例值：1681876208313
func (builder *DatasetBuilder) CreateTime(createTime int) *DatasetBuilder {
	builder.createTime = createTime
	builder.createTimeFlag = true
	return builder
}

// 创建人
//
// 示例值：
func (builder *DatasetBuilder) CreatedBy(createdBy *DatasetLookupUser) *DatasetBuilder {
	builder.createdBy = createdBy
	builder.createdByFlag = true
	return builder
}

// 更新时间（毫秒时间戳）
//
// 示例值：1681876208313
func (builder *DatasetBuilder) UpdateTime(updateTime int) *DatasetBuilder {
	builder.updateTime = updateTime
	builder.updateTimeFlag = true
	return builder
}

// 更新人
//
// 示例值：
func (builder *DatasetBuilder) UpdatedBy(updatedBy *DatasetLookupUser) *DatasetBuilder {
	builder.updatedBy = updatedBy
	builder.updatedByFlag = true
	return builder
}

func (builder *DatasetBuilder) Build() *Dataset {
	req := &Dataset{}
	if builder.namespaceFlag {
		req.Namespace = &builder.namespace

	}
	if builder.apiIdFlag {
		req.ApiId = &builder.apiId

	}
	if builder.apiNameFlag {
		req.ApiName = &builder.apiName

	}
	if builder.labelFlag {
		req.Label = builder.label
	}
	if builder.sourceFlag {
		req.Source = builder.source
	}
	if builder.fieldsFlag {
		req.Fields = builder.fields
	}
	if builder.dataRefreshTimeFlag {
		req.DataRefreshTime = &builder.dataRefreshTime

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

	}
	if builder.createdByFlag {
		req.CreatedBy = builder.createdBy
	}
	if builder.updateTimeFlag {
		req.UpdateTime = &builder.updateTime

	}
	if builder.updatedByFlag {
		req.UpdatedBy = builder.updatedBy
	}
	return req
}

type DatasetField struct {
	ApiId *string `json:"api_id,omitempty"` // 数据集字段的 API ID

	ApiName *string `json:"api_name,omitempty"` // 数据集字段的 API 名称

	Label map[string]string `json:"label,omitempty"` //

	DatasetApiId *string `json:"dataset_api_id,omitempty"` // 数据集 API ID

	DatasetApiName *string `json:"dataset_api_name,omitempty"` //  数据集 API 名称

	Type *DatasetFieldType `json:"type,omitempty"` // 字段类型及设置

	EncryptType *string `json:"encrypt_type,omitempty"` // 加密类型。包含以下选项： 1. none 不加密 2. rand 非确定性加密 3. fix 固定加密 4. ope 保序加密

	CreateTime *int `json:"create_time,omitempty"` // 创建时间（毫秒时间戳）

	CreatedBy *DatasetLookupUser `json:"created_by,omitempty"` // 创建人

	UpdateTime *int `json:"update_time,omitempty"` // 更新时间（毫秒时间戳）

	UpdatedBy *DatasetLookupUser `json:"updated_by,omitempty"` // 更新人
}

type DatasetFieldBuilder struct {
	apiId     string // 数据集字段的 API ID
	apiIdFlag bool

	apiName     string // 数据集字段的 API 名称
	apiNameFlag bool

	label     map[string]string //
	labelFlag bool

	datasetApiId     string // 数据集 API ID
	datasetApiIdFlag bool

	datasetApiName     string //  数据集 API 名称
	datasetApiNameFlag bool

	type_    *DatasetFieldType // 字段类型及设置
	typeFlag bool

	encryptType     string // 加密类型。包含以下选项： 1. none 不加密 2. rand 非确定性加密 3. fix 固定加密 4. ope 保序加密
	encryptTypeFlag bool

	createTime     int // 创建时间（毫秒时间戳）
	createTimeFlag bool

	createdBy     *DatasetLookupUser // 创建人
	createdByFlag bool

	updateTime     int // 更新时间（毫秒时间戳）
	updateTimeFlag bool

	updatedBy     *DatasetLookupUser // 更新人
	updatedByFlag bool
}

func NewDatasetFieldBuilder() *DatasetFieldBuilder {
	builder := &DatasetFieldBuilder{}
	return builder
}

// 数据集字段的 API ID
//
// 示例值：package_test__c_dataset_aba
func (builder *DatasetFieldBuilder) ApiId(apiId string) *DatasetFieldBuilder {
	builder.apiId = apiId
	builder.apiIdFlag = true
	return builder
}

// 数据集字段的 API 名称
//
// 示例值：myDatasetField
func (builder *DatasetFieldBuilder) ApiName(apiName string) *DatasetFieldBuilder {
	builder.apiName = apiName
	builder.apiNameFlag = true
	return builder
}

//
//
// 示例值：
func (builder *DatasetFieldBuilder) Label(label map[string]string) *DatasetFieldBuilder {
	builder.label = label
	builder.labelFlag = true
	return builder
}

// 数据集 API ID
//
// 示例值：package_test__c_dataset_adabfa
func (builder *DatasetFieldBuilder) DatasetApiId(datasetApiId string) *DatasetFieldBuilder {
	builder.datasetApiId = datasetApiId
	builder.datasetApiIdFlag = true
	return builder
}

//  数据集 API 名称
//
// 示例值：myDataset
func (builder *DatasetFieldBuilder) DatasetApiName(datasetApiName string) *DatasetFieldBuilder {
	builder.datasetApiName = datasetApiName
	builder.datasetApiNameFlag = true
	return builder
}

// 字段类型及设置
//
// 示例值：
func (builder *DatasetFieldBuilder) Type(type_ *DatasetFieldType) *DatasetFieldBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// 加密类型。包含以下选项： 1. none 不加密 2. rand 非确定性加密 3. fix 固定加密 4. ope 保序加密
//
// 示例值：rand
func (builder *DatasetFieldBuilder) EncryptType(encryptType string) *DatasetFieldBuilder {
	builder.encryptType = encryptType
	builder.encryptTypeFlag = true
	return builder
}

// 创建时间（毫秒时间戳）
//
// 示例值：1681876208313
func (builder *DatasetFieldBuilder) CreateTime(createTime int) *DatasetFieldBuilder {
	builder.createTime = createTime
	builder.createTimeFlag = true
	return builder
}

// 创建人
//
// 示例值：
func (builder *DatasetFieldBuilder) CreatedBy(createdBy *DatasetLookupUser) *DatasetFieldBuilder {
	builder.createdBy = createdBy
	builder.createdByFlag = true
	return builder
}

// 更新时间（毫秒时间戳）
//
// 示例值：1681876208313
func (builder *DatasetFieldBuilder) UpdateTime(updateTime int) *DatasetFieldBuilder {
	builder.updateTime = updateTime
	builder.updateTimeFlag = true
	return builder
}

// 更新人
//
// 示例值：
func (builder *DatasetFieldBuilder) UpdatedBy(updatedBy *DatasetLookupUser) *DatasetFieldBuilder {
	builder.updatedBy = updatedBy
	builder.updatedByFlag = true
	return builder
}

func (builder *DatasetFieldBuilder) Build() *DatasetField {
	req := &DatasetField{}
	if builder.apiIdFlag {
		req.ApiId = &builder.apiId

	}
	if builder.apiNameFlag {
		req.ApiName = &builder.apiName

	}
	if builder.labelFlag {
		req.Label = builder.label
	}
	if builder.datasetApiIdFlag {
		req.DatasetApiId = &builder.datasetApiId

	}
	if builder.datasetApiNameFlag {
		req.DatasetApiName = &builder.datasetApiName

	}
	if builder.typeFlag {
		req.Type = builder.type_
	}
	if builder.encryptTypeFlag {
		req.EncryptType = &builder.encryptType

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

	}
	if builder.createdByFlag {
		req.CreatedBy = builder.createdBy
	}
	if builder.updateTimeFlag {
		req.UpdateTime = &builder.updateTime

	}
	if builder.updatedByFlag {
		req.UpdatedBy = builder.updatedBy
	}
	return req
}

type DatasetFieldType struct {
	Name *string `json:"name,omitempty"` // 类型名称

	Settings *string `json:"settings,omitempty"` // 字段的 Settings 定义
}

type DatasetFieldTypeBuilder struct {
	name     string // 类型名称
	nameFlag bool

	settings     string // 字段的 Settings 定义
	settingsFlag bool
}

func NewDatasetFieldTypeBuilder() *DatasetFieldTypeBuilder {
	builder := &DatasetFieldTypeBuilder{}
	return builder
}

// 类型名称
//
// 示例值：text
func (builder *DatasetFieldTypeBuilder) Name(name string) *DatasetFieldTypeBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 字段的 Settings 定义
//
// 示例值：{	   "max_length": 100,					// 最大长度	   "multiline": false,				   // 是否开启多行文本	   "regexp_verify": true,				// 是否开启正则校验	   "regexp_expression": "[a-zA-Z]",	  // 正则表达式，规定用户输入的字段值格式		"regexp_err_msg": [				   // 格式错误提示，当用户输入的字段值未通过格式校验时展示的错误信息		 {		   "language_code": 2052,		   "text": "只匹配字母"		 }	   ],	   "text_version": 1					 // 文本字段版本，历史版本为 0	 }
func (builder *DatasetFieldTypeBuilder) Settings(settings string) *DatasetFieldTypeBuilder {
	builder.settings = settings
	builder.settingsFlag = true
	return builder
}

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

	}
	if builder.settingsFlag {
		req.Settings = &builder.settings

	}
	return req
}

type DatasetLookupUser struct {
	Id *string `json:"id,omitempty"` // 唯一标识

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

	IsDeleted *bool `json:"is_deleted,omitempty"` // 是否已删除
}

type DatasetLookupUserBuilder struct {
	id     string // 唯一标识
	idFlag bool

	name     string // 名称
	nameFlag bool

	isDeleted     bool // 是否已删除
	isDeletedFlag bool
}

func NewDatasetLookupUserBuilder() *DatasetLookupUserBuilder {
	builder := &DatasetLookupUserBuilder{}
	return builder
}

// 唯一标识
//
// 示例值：1763666400112647
func (builder *DatasetLookupUserBuilder) Id(id string) *DatasetLookupUserBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 名称
//
// 示例值：张三
func (builder *DatasetLookupUserBuilder) Name(name string) *DatasetLookupUserBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

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

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

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

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

	}
	return req
}

type DatasetSource struct {
	Type *string `json:"type,omitempty"` // 类型：目前只支持 dataflow

	Settings *DatasetSourceSetting `json:"settings,omitempty"` // 数据来源信息
}

type DatasetSourceBuilder struct {
	type_    string // 类型：目前只支持 dataflow
	typeFlag bool

	settings     *DatasetSourceSetting // 数据来源信息
	settingsFlag bool
}

func NewDatasetSourceBuilder() *DatasetSourceBuilder {
	builder := &DatasetSourceBuilder{}
	return builder
}

// 类型：目前只支持 dataflow
//
// 示例值：dataflow
func (builder *DatasetSourceBuilder) Type(type_ string) *DatasetSourceBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// 数据来源信息
//
// 示例值：
func (builder *DatasetSourceBuilder) Settings(settings *DatasetSourceSetting) *DatasetSourceBuilder {
	builder.settings = settings
	builder.settingsFlag = true
	return builder
}

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

	}
	if builder.settingsFlag {
		req.Settings = builder.settings
	}
	return req
}

type DatasetSourceSetting struct {
	ApiId *string `json:"api_id,omitempty"` // 数据流的 API ID

	ApiName *string `json:"api_name,omitempty"` // 数据流的 API 名称

	Label map[string]string `json:"label,omitempty"` // 数据流的名称
}

type DatasetSourceSettingBuilder struct {
	apiId     string // 数据流的 API ID
	apiIdFlag bool

	apiName     string // 数据流的 API 名称
	apiNameFlag bool

	label     map[string]string // 数据流的名称
	labelFlag bool
}

func NewDatasetSourceSettingBuilder() *DatasetSourceSettingBuilder {
	builder := &DatasetSourceSettingBuilder{}
	return builder
}

// 数据流的 API ID
//
// 示例值：package_test__c_dataflow_aaaf
func (builder *DatasetSourceSettingBuilder) ApiId(apiId string) *DatasetSourceSettingBuilder {
	builder.apiId = apiId
	builder.apiIdFlag = true
	return builder
}

// 数据流的 API 名称
//
// 示例值：myDataflow
func (builder *DatasetSourceSettingBuilder) ApiName(apiName string) *DatasetSourceSettingBuilder {
	builder.apiName = apiName
	builder.apiNameFlag = true
	return builder
}

// 数据流的名称
//
// 示例值：
func (builder *DatasetSourceSettingBuilder) Label(label map[string]string) *DatasetSourceSettingBuilder {
	builder.label = label
	builder.labelFlag = true
	return builder
}

func (builder *DatasetSourceSettingBuilder) Build() *DatasetSourceSetting {
	req := &DatasetSourceSetting{}
	if builder.apiIdFlag {
		req.ApiId = &builder.apiId

	}
	if builder.apiNameFlag {
		req.ApiName = &builder.apiName

	}
	if builder.labelFlag {
		req.Label = builder.label
	}
	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 EnvironmentVariable struct {
	ApiName *string `json:"api_name,omitempty"` // 环境变量 API 名称

	Label *Label `json:"label,omitempty"` // 环境变量的名称

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

	Value *string `json:"value,omitempty"` // 返回 json marshal 后的字符串。 isEncrypted 为 「true」时，依然可以获取返回值。

	IsEncrypted *bool `json:"is_encrypted,omitempty"` // 是否加密，「type 」取值为 text, float 时才有效

	ObjectApiName *string `json:"object_api_name,omitempty"` // 对象的 API 名称，「type 」取值为 lookup, lookup_multi 时才有效

	ObjectLabel *Label `json:"object_label,omitempty"` // 对象的名称，「type 」取值为 lookup, lookup_multi 时才有效

	CreatedAt *int `json:"created_at,omitempty"` // 「创建时间」，日期时间字段。 使用 Unix 时间戳

	UpdatedAt *int `json:"updated_at,omitempty"` // 「更新时间」，日期时间字段。 使用 Unix 时间戳

	Type *string `json:"type,omitempty"` // 环境变量的类型，可取值范围有：lookup, lookup_multi
}

type EnvironmentVariableBuilder struct {
	apiName     string // 环境变量 API 名称
	apiNameFlag bool

	label     *Label // 环境变量的名称
	labelFlag bool

	description     string // 描述
	descriptionFlag bool

	value     string // 返回 json marshal 后的字符串。 isEncrypted 为 「true」时，依然可以获取返回值。
	valueFlag bool

	isEncrypted     bool // 是否加密，「type 」取值为 text, float 时才有效
	isEncryptedFlag bool

	objectApiName     string // 对象的 API 名称，「type 」取值为 lookup, lookup_multi 时才有效
	objectApiNameFlag bool

	objectLabel     *Label // 对象的名称，「type 」取值为 lookup, lookup_multi 时才有效
	objectLabelFlag bool

	createdAt     int // 「创建时间」，日期时间字段。 使用 Unix 时间戳
	createdAtFlag bool

	updatedAt     int // 「更新时间」，日期时间字段。 使用 Unix 时间戳
	updatedAtFlag bool

	type_    string // 环境变量的类型，可取值范围有：lookup, lookup_multi
	typeFlag bool
}

func NewEnvironmentVariableBuilder() *EnvironmentVariableBuilder {
	builder := &EnvironmentVariableBuilder{}
	return builder
}

// 环境变量 API 名称
//
// 示例值：globalParam_0b410b17704
func (builder *EnvironmentVariableBuilder) ApiName(apiName string) *EnvironmentVariableBuilder {
	builder.apiName = apiName
	builder.apiNameFlag = true
	return builder
}

// 环境变量的名称
//
// 示例值：
func (builder *EnvironmentVariableBuilder) Label(label *Label) *EnvironmentVariableBuilder {
	builder.label = label
	builder.labelFlag = true
	return builder
}

// 描述
//
// 示例值：Sample text
func (builder *EnvironmentVariableBuilder) Description(description string) *EnvironmentVariableBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 返回 json marshal 后的字符串。 isEncrypted 为 「true」时，依然可以获取返回值。
//
// 示例值：[1757083131077684,1757085362739239,1757083720703032]
func (builder *EnvironmentVariableBuilder) Value(value string) *EnvironmentVariableBuilder {
	builder.value = value
	builder.valueFlag = true
	return builder
}

// 是否加密，「type 」取值为 text, float 时才有效
//
// 示例值：false
func (builder *EnvironmentVariableBuilder) IsEncrypted(isEncrypted bool) *EnvironmentVariableBuilder {
	builder.isEncrypted = isEncrypted
	builder.isEncryptedFlag = true
	return builder
}

// 对象的 API 名称，「type 」取值为 lookup, lookup_multi 时才有效
//
// 示例值：_user
func (builder *EnvironmentVariableBuilder) ObjectApiName(objectApiName string) *EnvironmentVariableBuilder {
	builder.objectApiName = objectApiName
	builder.objectApiNameFlag = true
	return builder
}

// 对象的名称，「type 」取值为 lookup, lookup_multi 时才有效
//
// 示例值：
func (builder *EnvironmentVariableBuilder) ObjectLabel(objectLabel *Label) *EnvironmentVariableBuilder {
	builder.objectLabel = objectLabel
	builder.objectLabelFlag = true
	return builder
}

// 「创建时间」，日期时间字段。 使用 Unix 时间戳
//
// 示例值：1718350902019
func (builder *EnvironmentVariableBuilder) CreatedAt(createdAt int) *EnvironmentVariableBuilder {
	builder.createdAt = createdAt
	builder.createdAtFlag = true
	return builder
}

// 「更新时间」，日期时间字段。 使用 Unix 时间戳
//
// 示例值：1718350902019
func (builder *EnvironmentVariableBuilder) UpdatedAt(updatedAt int) *EnvironmentVariableBuilder {
	builder.updatedAt = updatedAt
	builder.updatedAtFlag = true
	return builder
}

// 环境变量的类型，可取值范围有：lookup, lookup_multi
//
// 示例值：lookup
func (builder *EnvironmentVariableBuilder) Type(type_ string) *EnvironmentVariableBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

func (builder *EnvironmentVariableBuilder) Build() *EnvironmentVariable {
	req := &EnvironmentVariable{}
	if builder.apiNameFlag {
		req.ApiName = &builder.apiName

	}
	if builder.labelFlag {
		req.Label = builder.label
	}
	if builder.descriptionFlag {
		req.Description = &builder.description

	}
	if builder.valueFlag {
		req.Value = &builder.value

	}
	if builder.isEncryptedFlag {
		req.IsEncrypted = &builder.isEncrypted

	}
	if builder.objectApiNameFlag {
		req.ObjectApiName = &builder.objectApiName

	}
	if builder.objectLabelFlag {
		req.ObjectLabel = builder.objectLabel
	}
	if builder.createdAtFlag {
		req.CreatedAt = &builder.createdAt

	}
	if builder.updatedAtFlag {
		req.UpdatedAt = &builder.updatedAt

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

	}
	return req
}

type EnvironmentVariableFilter struct {
	QuickQuery *string `json:"quick_query,omitempty"` // 模糊查询关键词
}

type EnvironmentVariableFilterBuilder struct {
	quickQuery     string // 模糊查询关键词
	quickQueryFlag bool
}

func NewEnvironmentVariableFilterBuilder() *EnvironmentVariableFilterBuilder {
	builder := &EnvironmentVariableFilterBuilder{}
	return builder
}

// 模糊查询关键词
//
// 示例值：Sample Text
func (builder *EnvironmentVariableFilterBuilder) QuickQuery(quickQuery string) *EnvironmentVariableFilterBuilder {
	builder.quickQuery = quickQuery
	builder.quickQueryFlag = true
	return builder
}

func (builder *EnvironmentVariableFilterBuilder) Build() *EnvironmentVariableFilter {
	req := &EnvironmentVariableFilter{}
	if builder.quickQueryFlag {
		req.QuickQuery = &builder.quickQuery

	}
	return req
}

type Event struct {
	Id *string `json:"id,omitempty"` // 事件ID

	Type *string `json:"type,omitempty"` // 事件类型

	StartTimestamp *int `json:"start_timestamp,omitempty"` // 事件开始时间

	EndTimestamp *int `json:"end_timestamp,omitempty"` // 可选，事件的结束时间

	IsFinished *bool `json:"is_finished,omitempty"` // 事件是否已结束

	TraceId *string `json:"trace_id,omitempty"` // trace id

	Detail *string `json:"detail,omitempty"` // 事件详情，json 格式

	Attributes *string `json:"attributes,omitempty"` // 附加属性，json 格式，包括应用相关属性（如 tenant_id, namespace）等
}

type EventBuilder struct {
	id     string // 事件ID
	idFlag bool

	type_    string // 事件类型
	typeFlag bool

	startTimestamp     int // 事件开始时间
	startTimestampFlag bool

	endTimestamp     int // 可选，事件的结束时间
	endTimestampFlag bool

	isFinished     bool // 事件是否已结束
	isFinishedFlag bool

	traceId     string // trace id
	traceIdFlag bool

	detail     string // 事件详情，json 格式
	detailFlag bool

	attributes     string // 附加属性，json 格式，包括应用相关属性（如 tenant_id, namespace）等
	attributesFlag bool
}

func NewEventBuilder() *EventBuilder {
	builder := &EventBuilder{}
	return builder
}

// 事件ID
//
// 示例值：invoke_workflow_event-12345678
func (builder *EventBuilder) Id(id string) *EventBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 事件类型
//
// 示例值：invoke_function_event
func (builder *EventBuilder) Type(type_ string) *EventBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// 事件开始时间
//
// 示例值：1741249747824
func (builder *EventBuilder) StartTimestamp(startTimestamp int) *EventBuilder {
	builder.startTimestamp = startTimestamp
	builder.startTimestampFlag = true
	return builder
}

// 可选，事件的结束时间
//
// 示例值：1741249747824
func (builder *EventBuilder) EndTimestamp(endTimestamp int) *EventBuilder {
	builder.endTimestamp = endTimestamp
	builder.endTimestampFlag = true
	return builder
}

// 事件是否已结束
//
// 示例值：true
func (builder *EventBuilder) IsFinished(isFinished bool) *EventBuilder {
	builder.isFinished = isFinished
	builder.isFinishedFlag = true
	return builder
}

// trace id
//
// 示例值：edf45bdf-9f3f-4aad-b260-9287ab09e0de
func (builder *EventBuilder) TraceId(traceId string) *EventBuilder {
	builder.traceId = traceId
	builder.traceIdFlag = true
	return builder
}

// 事件详情，json 格式
//
// 示例值：{"foo":"bar"}
func (builder *EventBuilder) Detail(detail string) *EventBuilder {
	builder.detail = detail
	builder.detailFlag = true
	return builder
}

// 附加属性，json 格式，包括应用相关属性（如 tenant_id, namespace）等
//
// 示例值：{"tenant_id": "123"}
func (builder *EventBuilder) Attributes(attributes string) *EventBuilder {
	builder.attributes = attributes
	builder.attributesFlag = true
	return builder
}

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

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

	}
	if builder.startTimestampFlag {
		req.StartTimestamp = &builder.startTimestamp

	}
	if builder.endTimestampFlag {
		req.EndTimestamp = &builder.endTimestamp

	}
	if builder.isFinishedFlag {
		req.IsFinished = &builder.isFinished

	}
	if builder.traceIdFlag {
		req.TraceId = &builder.traceId

	}
	if builder.detailFlag {
		req.Detail = &builder.detail

	}
	if builder.attributesFlag {
		req.Attributes = &builder.attributes

	}
	return req
}

type EventSubscribeRule struct {
	Namespace *string `json:"namespace,omitempty"` // 应用的命名空间

	EventType *string `json:"event_type,omitempty"` // 订阅事件类型

	Creator *string `json:"creator,omitempty"` // 创建人

	CreateTime *string `json:"create_time,omitempty"` // 创建时间

	Id *string `json:"id,omitempty"` // 事件规则ID

	CreatedBy *LookupWithAvatar `json:"created_by,omitempty"` // 事件规则的创建者
}

type EventSubscribeRuleBuilder struct {
	namespace     string // 应用的命名空间
	namespaceFlag bool

	eventType     string // 订阅事件类型
	eventTypeFlag bool

	creator     string // 创建人
	creatorFlag bool

	createTime     string // 创建时间
	createTimeFlag bool

	id     string // 事件规则ID
	idFlag bool

	createdBy     *LookupWithAvatar // 事件规则的创建者
	createdByFlag bool
}

func NewEventSubscribeRuleBuilder() *EventSubscribeRuleBuilder {
	builder := &EventSubscribeRuleBuilder{}
	return builder
}

// 应用的命名空间
//
// 示例值：package_ba55ff__c
func (builder *EventSubscribeRuleBuilder) Namespace(namespace string) *EventSubscribeRuleBuilder {
	builder.namespace = namespace
	builder.namespaceFlag = true
	return builder
}

// 订阅事件类型
//
// 示例值：sandbox_publish
func (builder *EventSubscribeRuleBuilder) EventType(eventType string) *EventSubscribeRuleBuilder {
	builder.eventType = eventType
	builder.eventTypeFlag = true
	return builder
}

// 创建人
//
// 示例值：1768491480010814
func (builder *EventSubscribeRuleBuilder) Creator(creator string) *EventSubscribeRuleBuilder {
	builder.creator = creator
	builder.creatorFlag = true
	return builder
}

// 创建时间
//
// 示例值：1699930800
func (builder *EventSubscribeRuleBuilder) CreateTime(createTime string) *EventSubscribeRuleBuilder {
	builder.createTime = createTime
	builder.createTimeFlag = true
	return builder
}

// 事件规则ID
//
// 示例值：123
func (builder *EventSubscribeRuleBuilder) Id(id string) *EventSubscribeRuleBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 事件规则的创建者
//
// 示例值：
func (builder *EventSubscribeRuleBuilder) CreatedBy(createdBy *LookupWithAvatar) *EventSubscribeRuleBuilder {
	builder.createdBy = createdBy
	builder.createdByFlag = true
	return builder
}

func (builder *EventSubscribeRuleBuilder) Build() *EventSubscribeRule {
	req := &EventSubscribeRule{}
	if builder.namespaceFlag {
		req.Namespace = &builder.namespace

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

	}
	if builder.creatorFlag {
		req.Creator = &builder.creator

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

	}
	if builder.idFlag {
		req.Id = &builder.id

	}
	if builder.createdByFlag {
		req.CreatedBy = builder.createdBy
	}
	return req
}

type EventSubscriber struct {
	Namespace *string `json:"namespace,omitempty"` // 应用的命名空间

	AuthType *string `json:"auth_type,omitempty"` // 事件订阅Webhook的授权类型

	Token *string `json:"token,omitempty"` // token，当选择静态token授权时，需要填写此字段

	TokenClientId *string `json:"token_client_id,omitempty"` // clientID，当选择动态token授权时，需填写此字段

	TokenUrl *string `json:"token_url,omitempty"` // 获取动态token的URL，当选择动态token授权时，需填写此字段

	TokenClientSecret *string `json:"token_client_secret,omitempty"` // clientSecret，当选择动态token授权时，需填写此字段

	WebhookUrl *string `json:"webhook_url,omitempty"` //  webook URL，当有事件发生时，会向此URL发送事件信息

	Id *string `json:"id,omitempty"` // 事件订阅器的ID
}

type EventSubscriberBuilder struct {
	namespace     string // 应用的命名空间
	namespaceFlag bool

	authType     string // 事件订阅Webhook的授权类型
	authTypeFlag bool

	token     string // token，当选择静态token授权时，需要填写此字段
	tokenFlag bool

	tokenClientId     string // clientID，当选择动态token授权时，需填写此字段
	tokenClientIdFlag bool

	tokenUrl     string // 获取动态token的URL，当选择动态token授权时，需填写此字段
	tokenUrlFlag bool

	tokenClientSecret     string // clientSecret，当选择动态token授权时，需填写此字段
	tokenClientSecretFlag bool

	webhookUrl     string //  webook URL，当有事件发生时，会向此URL发送事件信息
	webhookUrlFlag bool

	id     string // 事件订阅器的ID
	idFlag bool
}

func NewEventSubscriberBuilder() *EventSubscriberBuilder {
	builder := &EventSubscriberBuilder{}
	return builder
}

// 应用的命名空间
//
// 示例值：package_ba55ff__c
func (builder *EventSubscriberBuilder) Namespace(namespace string) *EventSubscriberBuilder {
	builder.namespace = namespace
	builder.namespaceFlag = true
	return builder
}

// 事件订阅Webhook的授权类型
//
// 示例值：no_auth
func (builder *EventSubscriberBuilder) AuthType(authType string) *EventSubscriberBuilder {
	builder.authType = authType
	builder.authTypeFlag = true
	return builder
}

// token，当选择静态token授权时，需要填写此字段
//
// 示例值：your_static_token
func (builder *EventSubscriberBuilder) Token(token string) *EventSubscriberBuilder {
	builder.token = token
	builder.tokenFlag = true
	return builder
}

// clientID，当选择动态token授权时，需填写此字段
//
// 示例值：your_client_id
func (builder *EventSubscriberBuilder) TokenClientId(tokenClientId string) *EventSubscriberBuilder {
	builder.tokenClientId = tokenClientId
	builder.tokenClientIdFlag = true
	return builder
}

// 获取动态token的URL，当选择动态token授权时，需填写此字段
//
// 示例值：https://your_domian/your_url
func (builder *EventSubscriberBuilder) TokenUrl(tokenUrl string) *EventSubscriberBuilder {
	builder.tokenUrl = tokenUrl
	builder.tokenUrlFlag = true
	return builder
}

// clientSecret，当选择动态token授权时，需填写此字段
//
// 示例值：your_client_secret
func (builder *EventSubscriberBuilder) TokenClientSecret(tokenClientSecret string) *EventSubscriberBuilder {
	builder.tokenClientSecret = tokenClientSecret
	builder.tokenClientSecretFlag = true
	return builder
}

//  webook URL，当有事件发生时，会向此URL发送事件信息
//
// 示例值：http://your_domain/your_webhook_url
func (builder *EventSubscriberBuilder) WebhookUrl(webhookUrl string) *EventSubscriberBuilder {
	builder.webhookUrl = webhookUrl
	builder.webhookUrlFlag = true
	return builder
}

// 事件订阅器的ID
//
// 示例值：123
func (builder *EventSubscriberBuilder) Id(id string) *EventSubscriberBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

func (builder *EventSubscriberBuilder) Build() *EventSubscriber {
	req := &EventSubscriber{}
	if builder.namespaceFlag {
		req.Namespace = &builder.namespace

	}
	if builder.authTypeFlag {
		req.AuthType = &builder.authType

	}
	if builder.tokenFlag {
		req.Token = &builder.token

	}
	if builder.tokenClientIdFlag {
		req.TokenClientId = &builder.tokenClientId

	}
	if builder.tokenUrlFlag {
		req.TokenUrl = &builder.tokenUrl

	}
	if builder.tokenClientSecretFlag {
		req.TokenClientSecret = &builder.tokenClientSecret

	}
	if builder.webhookUrlFlag {
		req.WebhookUrl = &builder.webhookUrl

	}
	if builder.idFlag {
		req.Id = &builder.id

	}
	return req
}

type ExternalUser struct {
	UserId *string `json:"user_id,omitempty"` //
}

type ExternalUserBuilder struct {
	userId     string //
	userIdFlag bool
}

func NewExternalUserBuilder() *ExternalUserBuilder {
	builder := &ExternalUserBuilder{}
	return builder
}

//
//
// 示例值：
func (builder *ExternalUserBuilder) UserId(userId string) *ExternalUserBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

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

	}
	return req
}

type FieldApiNameSimpleInfo struct {
	ApiName *string `json:"api_name,omitempty"` // 字段的api_name

	Name map[string]string `json:"name,omitempty"` // 字段的名称
}

type FieldApiNameSimpleInfoBuilder struct {
	apiName     string // 字段的api_name
	apiNameFlag bool

	name     map[string]string // 字段的名称
	nameFlag bool
}

func NewFieldApiNameSimpleInfoBuilder() *FieldApiNameSimpleInfoBuilder {
	builder := &FieldApiNameSimpleInfoBuilder{}
	return builder
}

// 字段的api_name
//
// 示例值：field_api_name
func (builder *FieldApiNameSimpleInfoBuilder) ApiName(apiName string) *FieldApiNameSimpleInfoBuilder {
	builder.apiName = apiName
	builder.apiNameFlag = true
	return builder
}

// 字段的名称
//
// 示例值：
func (builder *FieldApiNameSimpleInfoBuilder) Name(name map[string]string) *FieldApiNameSimpleInfoBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

func (builder *FieldApiNameSimpleInfoBuilder) Build() *FieldApiNameSimpleInfo {
	req := &FieldApiNameSimpleInfo{}
	if builder.apiNameFlag {
		req.ApiName = &builder.apiName

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

type FieldPermissionAccess struct {
	ApiId *string `json:"api_id,omitempty"` // 页面的api_id

	ApiName *string `json:"api_name,omitempty"` // 页面的api_name

	AllowedAccess []int `json:"allowed_access,omitempty"` // 允许的权限列

	DisplayName map[string]string `json:"display_name,omitempty"` // 页面的展示名称
}

type FieldPermissionAccessBuilder struct {
	apiId     string // 页面的api_id
	apiIdFlag bool

	apiName     string // 页面的api_name
	apiNameFlag bool

	allowedAccess     []int // 允许的权限列
	allowedAccessFlag bool

	displayName     map[string]string // 页面的展示名称
	displayNameFlag bool
}

func NewFieldPermissionAccessBuilder() *FieldPermissionAccessBuilder {
	builder := &FieldPermissionAccessBuilder{}
	return builder
}

// 页面的api_id
//
// 示例值：api_id
func (builder *FieldPermissionAccessBuilder) ApiId(apiId string) *FieldPermissionAccessBuilder {
	builder.apiId = apiId
	builder.apiIdFlag = true
	return builder
}

// 页面的api_name
//
// 示例值：api_name
func (builder *FieldPermissionAccessBuilder) ApiName(apiName string) *FieldPermissionAccessBuilder {
	builder.apiName = apiName
	builder.apiNameFlag = true
	return builder
}

// 允许的权限列
//
// 示例值：
func (builder *FieldPermissionAccessBuilder) AllowedAccess(allowedAccess []int) *FieldPermissionAccessBuilder {
	builder.allowedAccess = allowedAccess
	builder.allowedAccessFlag = true
	return builder
}

// 页面的展示名称
//
// 示例值：
func (builder *FieldPermissionAccessBuilder) DisplayName(displayName map[string]string) *FieldPermissionAccessBuilder {
	builder.displayName = displayName
	builder.displayNameFlag = true
	return builder
}

func (builder *FieldPermissionAccessBuilder) Build() *FieldPermissionAccess {
	req := &FieldPermissionAccess{}
	if builder.apiIdFlag {
		req.ApiId = &builder.apiId

	}
	if builder.apiNameFlag {
		req.ApiName = &builder.apiName

	}
	if builder.allowedAccessFlag {
		req.AllowedAccess = builder.allowedAccess
	}
	if builder.displayNameFlag {
		req.DisplayName = builder.displayName
	}
	return req
}

type FieldPermissionConfigV2 struct {
	FieldConfigMode *string `json:"field_config_mode,omitempty"` // 字段权限配置模式

	CustomFieldPermissions []*FieldPermissionV2 `json:"custom_field_permissions,omitempty"` // 自定义字段配置
}

type FieldPermissionConfigV2Builder struct {
	fieldConfigMode     string // 字段权限配置模式
	fieldConfigModeFlag bool

	customFieldPermissions     []*FieldPermissionV2 // 自定义字段配置
	customFieldPermissionsFlag bool
}

func NewFieldPermissionConfigV2Builder() *FieldPermissionConfigV2Builder {
	builder := &FieldPermissionConfigV2Builder{}
	return builder
}

// 字段权限配置模式
//
// 示例值：all
func (builder *FieldPermissionConfigV2Builder) FieldConfigMode(fieldConfigMode string) *FieldPermissionConfigV2Builder {
	builder.fieldConfigMode = fieldConfigMode
	builder.fieldConfigModeFlag = true
	return builder
}

// 自定义字段配置
//
// 示例值：
func (builder *FieldPermissionConfigV2Builder) CustomFieldPermissions(customFieldPermissions []*FieldPermissionV2) *FieldPermissionConfigV2Builder {
	builder.customFieldPermissions = customFieldPermissions
	builder.customFieldPermissionsFlag = true
	return builder
}

func (builder *FieldPermissionConfigV2Builder) Build() *FieldPermissionConfigV2 {
	req := &FieldPermissionConfigV2{}
	if builder.fieldConfigModeFlag {
		req.FieldConfigMode = &builder.fieldConfigMode

	}
	if builder.customFieldPermissionsFlag {
		req.CustomFieldPermissions = builder.customFieldPermissions
	}
	return req
}

type FieldPermissionV2 struct {
	FieldApiName *string `json:"field_api_name,omitempty"` // 字段的APIName

	FieldPermissions []int `json:"field_permissions,omitempty"` // 字段的权限列表

	IsSubObjectField *bool `json:"is_sub_object_field,omitempty"` // 是否是子对象的字段

	SubObjectApiName *string `json:"sub_object_api_name,omitempty"` // 子对象 APIName

	SubObjectName map[string]string `json:"sub_object_name,omitempty"` // 子对象的名称

	FieldName map[string]string `json:"field_name,omitempty"` // 字段的名称
}

type FieldPermissionV2Builder struct {
	fieldApiName     string // 字段的APIName
	fieldApiNameFlag bool

	fieldPermissions     []int // 字段的权限列表
	fieldPermissionsFlag bool

	isSubObjectField     bool // 是否是子对象的字段
	isSubObjectFieldFlag bool

	subObjectApiName     string // 子对象 APIName
	subObjectApiNameFlag bool

	subObjectName     map[string]string // 子对象的名称
	subObjectNameFlag bool

	fieldName     map[string]string // 字段的名称
	fieldNameFlag bool
}

func NewFieldPermissionV2Builder() *FieldPermissionV2Builder {
	builder := &FieldPermissionV2Builder{}
	return builder
}

// 字段的APIName
//
// 示例值：field_asdfjio
func (builder *FieldPermissionV2Builder) FieldApiName(fieldApiName string) *FieldPermissionV2Builder {
	builder.fieldApiName = fieldApiName
	builder.fieldApiNameFlag = true
	return builder
}

// 字段的权限列表
//
// 示例值：
func (builder *FieldPermissionV2Builder) FieldPermissions(fieldPermissions []int) *FieldPermissionV2Builder {
	builder.fieldPermissions = fieldPermissions
	builder.fieldPermissionsFlag = true
	return builder
}

// 是否是子对象的字段
//
// 示例值：
func (builder *FieldPermissionV2Builder) IsSubObjectField(isSubObjectField bool) *FieldPermissionV2Builder {
	builder.isSubObjectField = isSubObjectField
	builder.isSubObjectFieldFlag = true
	return builder
}

// 子对象 APIName
//
// 示例值：sub_obj_123nanwk
func (builder *FieldPermissionV2Builder) SubObjectApiName(subObjectApiName string) *FieldPermissionV2Builder {
	builder.subObjectApiName = subObjectApiName
	builder.subObjectApiNameFlag = true
	return builder
}

// 子对象的名称
//
// 示例值：
func (builder *FieldPermissionV2Builder) SubObjectName(subObjectName map[string]string) *FieldPermissionV2Builder {
	builder.subObjectName = subObjectName
	builder.subObjectNameFlag = true
	return builder
}

// 字段的名称
//
// 示例值：
func (builder *FieldPermissionV2Builder) FieldName(fieldName map[string]string) *FieldPermissionV2Builder {
	builder.fieldName = fieldName
	builder.fieldNameFlag = true
	return builder
}

func (builder *FieldPermissionV2Builder) Build() *FieldPermissionV2 {
	req := &FieldPermissionV2{}
	if builder.fieldApiNameFlag {
		req.FieldApiName = &builder.fieldApiName

	}
	if builder.fieldPermissionsFlag {
		req.FieldPermissions = builder.fieldPermissions
	}
	if builder.isSubObjectFieldFlag {
		req.IsSubObjectField = &builder.isSubObjectField

	}
	if builder.subObjectApiNameFlag {
		req.SubObjectApiName = &builder.subObjectApiName

	}
	if builder.subObjectNameFlag {
		req.SubObjectName = builder.subObjectName
	}
	if builder.fieldNameFlag {
		req.FieldName = builder.fieldName
	}
	return req
}

type File struct {
	Name *string `json:"Name,omitempty"` //

	Content io.Reader `json:"Content,omitempty"` //
}

type FileBuilder struct {
	name     string //
	nameFlag bool

	content     io.Reader //
	contentFlag bool
}

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

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

//
//
// 示例值：
func (builder *FileBuilder) Content(content io.Reader) *FileBuilder {
	builder.content = content
	builder.contentFlag = true
	return builder
}

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

	}
	if builder.contentFlag {
		req.Content = builder.content
	}
	return req
}

type Flow struct {
	ApiId *string `json:"api_id,omitempty"` // api id

	ApiName *string `json:"api_name,omitempty"` // api name
}

type FlowBuilder struct {
	apiId     string // api id
	apiIdFlag bool

	apiName     string // api name
	apiNameFlag bool
}

func NewFlowBuilder() *FlowBuilder {
	builder := &FlowBuilder{}
	return builder
}

// api id
//
// 示例值：123
func (builder *FlowBuilder) ApiId(apiId string) *FlowBuilder {
	builder.apiId = apiId
	builder.apiIdFlag = true
	return builder
}

// api name
//
// 示例值：123
func (builder *FlowBuilder) ApiName(apiName string) *FlowBuilder {
	builder.apiName = apiName
	builder.apiNameFlag = true
	return builder
}

func (builder *FlowBuilder) Build() *Flow {
	req := &Flow{}
	if builder.apiIdFlag {
		req.ApiId = &builder.apiId

	}
	if builder.apiNameFlag {
		req.ApiName = &builder.apiName

	}
	return req
}

type Function struct {
	ApiName *string `json:"api_name,omitempty"` // 函数 API 名称
}

type FunctionBuilder struct {
	apiName     string // 函数 API 名称
	apiNameFlag bool
}

func NewFunctionBuilder() *FunctionBuilder {
	builder := &FunctionBuilder{}
	return builder
}

// 函数 API 名称
//
// 示例值：demoFunction
func (builder *FunctionBuilder) ApiName(apiName string) *FunctionBuilder {
	builder.apiName = apiName
	builder.apiNameFlag = true
	return builder
}

func (builder *FunctionBuilder) Build() *Function {
	req := &Function{}
	if builder.apiNameFlag {
		req.ApiName = &builder.apiName

	}
	return req
}

type GlobalOption struct {
	ApiName *string `json:"api_name,omitempty"` // 全局选项 API 名称

	Label *GlobalOptionLabel `json:"label,omitempty"` // 全局选项名称

	Options []*GlobalOptionElement `json:"options,omitempty"` // 选项列表

	CreatedAt *int `json:"created_at,omitempty"` // 创建时间

	UpdatedAt *int `json:"updated_at,omitempty"` // 更新时间
}

type GlobalOptionBuilder struct {
	apiName     string // 全局选项 API 名称
	apiNameFlag bool

	label     *GlobalOptionLabel // 全局选项名称
	labelFlag bool

	options     []*GlobalOptionElement // 选项列表
	optionsFlag bool

	createdAt     int // 创建时间
	createdAtFlag bool

	updatedAt     int // 更新时间
	updatedAtFlag bool
}

func NewGlobalOptionBuilder() *GlobalOptionBuilder {
	builder := &GlobalOptionBuilder{}
	return builder
}

// 全局选项 API 名称
//
// 示例值：option_12adea
func (builder *GlobalOptionBuilder) ApiName(apiName string) *GlobalOptionBuilder {
	builder.apiName = apiName
	builder.apiNameFlag = true
	return builder
}

// 全局选项名称
//
// 示例值：
func (builder *GlobalOptionBuilder) Label(label *GlobalOptionLabel) *GlobalOptionBuilder {
	builder.label = label
	builder.labelFlag = true
	return builder
}

// 选项列表
//
// 示例值：
func (builder *GlobalOptionBuilder) Options(options []*GlobalOptionElement) *GlobalOptionBuilder {
	builder.options = options
	builder.optionsFlag = true
	return builder
}

// 创建时间
//
// 示例值：1727431743472
func (builder *GlobalOptionBuilder) CreatedAt(createdAt int) *GlobalOptionBuilder {
	builder.createdAt = createdAt
	builder.createdAtFlag = true
	return builder
}

// 更新时间
//
// 示例值：1727431743472
func (builder *GlobalOptionBuilder) UpdatedAt(updatedAt int) *GlobalOptionBuilder {
	builder.updatedAt = updatedAt
	builder.updatedAtFlag = true
	return builder
}

func (builder *GlobalOptionBuilder) Build() *GlobalOption {
	req := &GlobalOption{}
	if builder.apiNameFlag {
		req.ApiName = &builder.apiName

	}
	if builder.labelFlag {
		req.Label = builder.label
	}
	if builder.optionsFlag {
		req.Options = builder.options
	}
	if builder.createdAtFlag {
		req.CreatedAt = &builder.createdAt

	}
	if builder.updatedAtFlag {
		req.UpdatedAt = &builder.updatedAt

	}
	return req
}

type GlobalOptionElement struct {
	ApiName *string `json:"api_name,omitempty"` // 选项API 名称

	Label *GlobalOptionLabel `json:"label,omitempty"` // 选项描述

	Active *bool `json:"active,omitempty"` // 是否启用
}

type GlobalOptionElementBuilder struct {
	apiName     string // 选项API 名称
	apiNameFlag bool

	label     *GlobalOptionLabel // 选项描述
	labelFlag bool

	active     bool // 是否启用
	activeFlag bool
}

func NewGlobalOptionElementBuilder() *GlobalOptionElementBuilder {
	builder := &GlobalOptionElementBuilder{}
	return builder
}

// 选项API 名称
//
// 示例值：option_text
func (builder *GlobalOptionElementBuilder) ApiName(apiName string) *GlobalOptionElementBuilder {
	builder.apiName = apiName
	builder.apiNameFlag = true
	return builder
}

// 选项描述
//
// 示例值：
func (builder *GlobalOptionElementBuilder) Label(label *GlobalOptionLabel) *GlobalOptionElementBuilder {
	builder.label = label
	builder.labelFlag = true
	return builder
}

// 是否启用
//
// 示例值：true
func (builder *GlobalOptionElementBuilder) Active(active bool) *GlobalOptionElementBuilder {
	builder.active = active
	builder.activeFlag = true
	return builder
}

func (builder *GlobalOptionElementBuilder) Build() *GlobalOptionElement {
	req := &GlobalOptionElement{}
	if builder.apiNameFlag {
		req.ApiName = &builder.apiName

	}
	if builder.labelFlag {
		req.Label = builder.label
	}
	if builder.activeFlag {
		req.Active = &builder.active

	}
	return req
}

type GlobalOptionFilter struct {
	QuickQuery *string `json:"quick_query,omitempty"` // 模糊匹配 GlobalOption.Label 字段
}

type GlobalOptionFilterBuilder struct {
	quickQuery     string // 模糊匹配 GlobalOption.Label 字段
	quickQueryFlag bool
}

func NewGlobalOptionFilterBuilder() *GlobalOptionFilterBuilder {
	builder := &GlobalOptionFilterBuilder{}
	return builder
}

// 模糊匹配 GlobalOption.Label 字段
//
// 示例值：option_xx
func (builder *GlobalOptionFilterBuilder) QuickQuery(quickQuery string) *GlobalOptionFilterBuilder {
	builder.quickQuery = quickQuery
	builder.quickQueryFlag = true
	return builder
}

func (builder *GlobalOptionFilterBuilder) Build() *GlobalOptionFilter {
	req := &GlobalOptionFilter{}
	if builder.quickQueryFlag {
		req.QuickQuery = &builder.quickQuery

	}
	return req
}

type GlobalOptionLabel struct {
	ZhCn *string `json:"zh_cn,omitempty"` // 中文名称

	EnUs *string `json:"en_us,omitempty"` // 英文名称
}

type GlobalOptionLabelBuilder struct {
	zhCn     string // 中文名称
	zhCnFlag bool

	enUs     string // 英文名称
	enUsFlag bool
}

func NewGlobalOptionLabelBuilder() *GlobalOptionLabelBuilder {
	builder := &GlobalOptionLabelBuilder{}
	return builder
}

// 中文名称
//
// 示例值：文本
func (builder *GlobalOptionLabelBuilder) ZhCn(zhCn string) *GlobalOptionLabelBuilder {
	builder.zhCn = zhCn
	builder.zhCnFlag = true
	return builder
}

// 英文名称
//
// 示例值：Text
func (builder *GlobalOptionLabelBuilder) EnUs(enUs string) *GlobalOptionLabelBuilder {
	builder.enUs = enUs
	builder.enUsFlag = true
	return builder
}

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

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

	}
	return req
}

type I18n struct {
	LanguageCode *string `json:"language_code,omitempty"` // -

	Text *string `json:"text,omitempty"` // -
}

type I18nBuilder struct {
	languageCode     string // -
	languageCodeFlag bool

	text     string // -
	textFlag bool
}

func NewI18nBuilder() *I18nBuilder {
	builder := &I18nBuilder{}
	return builder
}

// -
//
// 示例值：-
func (builder *I18nBuilder) LanguageCode(languageCode string) *I18nBuilder {
	builder.languageCode = languageCode
	builder.languageCodeFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *I18nBuilder) Text(text string) *I18nBuilder {
	builder.text = text
	builder.textFlag = true
	return builder
}

func (builder *I18nBuilder) Build() *I18n {
	req := &I18n{}
	if builder.languageCodeFlag {
		req.LanguageCode = &builder.languageCode

	}
	if builder.textFlag {
		req.Text = &builder.text

	}
	return req
}

type Icon struct {
	Source *string `json:"source,omitempty"` // -

	Color *string `json:"color,omitempty"` // -

	ColorId *string `json:"color_id,omitempty"` // -

	Icon *string `json:"icon,omitempty"` // -
}

type IconBuilder struct {
	source     string // -
	sourceFlag bool

	color     string // -
	colorFlag bool

	colorId     string // -
	colorIdFlag bool

	icon     string // -
	iconFlag bool
}

func NewIconBuilder() *IconBuilder {
	builder := &IconBuilder{}
	return builder
}

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

// -
//
// 示例值：-
func (builder *IconBuilder) Color(color string) *IconBuilder {
	builder.color = color
	builder.colorFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *IconBuilder) ColorId(colorId string) *IconBuilder {
	builder.colorId = colorId
	builder.colorIdFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *IconBuilder) Icon(icon string) *IconBuilder {
	builder.icon = icon
	builder.iconFlag = true
	return builder
}

func (builder *IconBuilder) Build() *Icon {
	req := &Icon{}
	if builder.sourceFlag {
		req.Source = &builder.source

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

	}
	if builder.colorIdFlag {
		req.ColorId = &builder.colorId

	}
	if builder.iconFlag {
		req.Icon = &builder.icon

	}
	return req
}

type Kctx struct {
	TenantId *string `json:"tenant_id,omitempty"` //

	UserId *string `json:"user_id,omitempty"` //

	TenantDomainName *string `json:"tenant_domain_name,omitempty"` //

	UserSetting *string `json:"user_setting,omitempty"` //

	LangId *int `json:"lang_id,omitempty"` //

	RequestId *string `json:"request_id,omitempty"` //

	Host *string `json:"host,omitempty"` //

	TenantResourceRouteKey *string `json:"tenantResourceRouteKey,omitempty"` //

	Namespace *string `json:"namespace,omitempty"` //

	TenantType *string `json:"tenant_type,omitempty"` //

	TransactionId *string `json:"transaction_id,omitempty"` //

	ConsistencyRetryType *string `json:"consistency_retry_type,omitempty"` //

	PsmLink *string `json:"psm_link,omitempty"` //

	BreakoutRetryPsm *string `json:"breakout_retry_psm,omitempty"` //

	CredentialId *string `json:"credential_id,omitempty"` //

	AuthenticationType *string `json:"authentication_type,omitempty"` //
}

type KctxBuilder struct {
	tenantId     string //
	tenantIdFlag bool

	userId     string //
	userIdFlag bool

	tenantDomainName     string //
	tenantDomainNameFlag bool

	userSetting     string //
	userSettingFlag bool

	langId     int //
	langIdFlag bool

	requestId     string //
	requestIdFlag bool

	host     string //
	hostFlag bool

	tenantResourceRouteKey     string //
	tenantResourceRouteKeyFlag bool

	namespace     string //
	namespaceFlag bool

	tenantType     string //
	tenantTypeFlag bool

	transactionId     string //
	transactionIdFlag bool

	consistencyRetryType     string //
	consistencyRetryTypeFlag bool

	psmLink     string //
	psmLinkFlag bool

	breakoutRetryPsm     string //
	breakoutRetryPsmFlag bool

	credentialId     string //
	credentialIdFlag bool

	authenticationType     string //
	authenticationTypeFlag bool
}

func NewKctxBuilder() *KctxBuilder {
	builder := &KctxBuilder{}
	return builder
}

//
//
// 示例值：
func (builder *KctxBuilder) TenantId(tenantId string) *KctxBuilder {
	builder.tenantId = tenantId
	builder.tenantIdFlag = true
	return builder
}

//
//
// 示例值：
func (builder *KctxBuilder) UserId(userId string) *KctxBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

//
//
// 示例值：
func (builder *KctxBuilder) TenantDomainName(tenantDomainName string) *KctxBuilder {
	builder.tenantDomainName = tenantDomainName
	builder.tenantDomainNameFlag = true
	return builder
}

//
//
// 示例值：
func (builder *KctxBuilder) UserSetting(userSetting string) *KctxBuilder {
	builder.userSetting = userSetting
	builder.userSettingFlag = true
	return builder
}

//
//
// 示例值：
func (builder *KctxBuilder) LangId(langId int) *KctxBuilder {
	builder.langId = langId
	builder.langIdFlag = true
	return builder
}

//
//
// 示例值：
func (builder *KctxBuilder) RequestId(requestId string) *KctxBuilder {
	builder.requestId = requestId
	builder.requestIdFlag = true
	return builder
}

//
//
// 示例值：
func (builder *KctxBuilder) Host(host string) *KctxBuilder {
	builder.host = host
	builder.hostFlag = true
	return builder
}

//
//
// 示例值：
func (builder *KctxBuilder) TenantResourceRouteKey(tenantResourceRouteKey string) *KctxBuilder {
	builder.tenantResourceRouteKey = tenantResourceRouteKey
	builder.tenantResourceRouteKeyFlag = true
	return builder
}

//
//
// 示例值：
func (builder *KctxBuilder) Namespace(namespace string) *KctxBuilder {
	builder.namespace = namespace
	builder.namespaceFlag = true
	return builder
}

//
//
// 示例值：
func (builder *KctxBuilder) TenantType(tenantType string) *KctxBuilder {
	builder.tenantType = tenantType
	builder.tenantTypeFlag = true
	return builder
}

//
//
// 示例值：
func (builder *KctxBuilder) TransactionId(transactionId string) *KctxBuilder {
	builder.transactionId = transactionId
	builder.transactionIdFlag = true
	return builder
}

//
//
// 示例值：
func (builder *KctxBuilder) ConsistencyRetryType(consistencyRetryType string) *KctxBuilder {
	builder.consistencyRetryType = consistencyRetryType
	builder.consistencyRetryTypeFlag = true
	return builder
}

//
//
// 示例值：
func (builder *KctxBuilder) PsmLink(psmLink string) *KctxBuilder {
	builder.psmLink = psmLink
	builder.psmLinkFlag = true
	return builder
}

//
//
// 示例值：
func (builder *KctxBuilder) BreakoutRetryPsm(breakoutRetryPsm string) *KctxBuilder {
	builder.breakoutRetryPsm = breakoutRetryPsm
	builder.breakoutRetryPsmFlag = true
	return builder
}

//
//
// 示例值：
func (builder *KctxBuilder) CredentialId(credentialId string) *KctxBuilder {
	builder.credentialId = credentialId
	builder.credentialIdFlag = true
	return builder
}

//
//
// 示例值：
func (builder *KctxBuilder) AuthenticationType(authenticationType string) *KctxBuilder {
	builder.authenticationType = authenticationType
	builder.authenticationTypeFlag = true
	return builder
}

func (builder *KctxBuilder) Build() *Kctx {
	req := &Kctx{}
	if builder.tenantIdFlag {
		req.TenantId = &builder.tenantId

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

	}
	if builder.tenantDomainNameFlag {
		req.TenantDomainName = &builder.tenantDomainName

	}
	if builder.userSettingFlag {
		req.UserSetting = &builder.userSetting

	}
	if builder.langIdFlag {
		req.LangId = &builder.langId

	}
	if builder.requestIdFlag {
		req.RequestId = &builder.requestId

	}
	if builder.hostFlag {
		req.Host = &builder.host

	}
	if builder.tenantResourceRouteKeyFlag {
		req.TenantResourceRouteKey = &builder.tenantResourceRouteKey

	}
	if builder.namespaceFlag {
		req.Namespace = &builder.namespace

	}
	if builder.tenantTypeFlag {
		req.TenantType = &builder.tenantType

	}
	if builder.transactionIdFlag {
		req.TransactionId = &builder.transactionId

	}
	if builder.consistencyRetryTypeFlag {
		req.ConsistencyRetryType = &builder.consistencyRetryType

	}
	if builder.psmLinkFlag {
		req.PsmLink = &builder.psmLink

	}
	if builder.breakoutRetryPsmFlag {
		req.BreakoutRetryPsm = &builder.breakoutRetryPsm

	}
	if builder.credentialIdFlag {
		req.CredentialId = &builder.credentialId

	}
	if builder.authenticationTypeFlag {
		req.AuthenticationType = &builder.authenticationType

	}
	return req
}

type Label struct {
	ZhCn *string `json:"zh_cn,omitempty"` // 中文内容

	EnUs *string `json:"en_us,omitempty"` // 英文内容
}

type LabelBuilder struct {
	zhCn     string // 中文内容
	zhCnFlag bool

	enUs     string // 英文内容
	enUsFlag bool
}

func NewLabelBuilder() *LabelBuilder {
	builder := &LabelBuilder{}
	return builder
}

// 中文内容
//
// 示例值：示例文本
func (builder *LabelBuilder) ZhCn(zhCn string) *LabelBuilder {
	builder.zhCn = zhCn
	builder.zhCnFlag = true
	return builder
}

// 英文内容
//
// 示例值：Text
func (builder *LabelBuilder) EnUs(enUs string) *LabelBuilder {
	builder.enUs = enUs
	builder.enUsFlag = true
	return builder
}

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

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

	}
	return req
}

type Log struct {
	Content *string `json:"content,omitempty"` // 日志内容

	Level *string `json:"level,omitempty"` // 日志级别

	Timestamp *int `json:"timestamp,omitempty"` // 日志时间戳

	Event *Event `json:"event,omitempty"` // 与日志关联的事件类型

	TraceId *string `json:"trace_id,omitempty"` // trace id

	Attributes *string `json:"attributes,omitempty"` // 附加属性，包括应用相关属性（如 tenant_id, namespace），日志所属模块相关属性（如函数日志的 function_api_name）等
}

type LogBuilder struct {
	content     string // 日志内容
	contentFlag bool

	level     string // 日志级别
	levelFlag bool

	timestamp     int // 日志时间戳
	timestampFlag bool

	event     *Event // 与日志关联的事件类型
	eventFlag bool

	traceId     string // trace id
	traceIdFlag bool

	attributes     string // 附加属性，包括应用相关属性（如 tenant_id, namespace），日志所属模块相关属性（如函数日志的 function_api_name）等
	attributesFlag bool
}

func NewLogBuilder() *LogBuilder {
	builder := &LogBuilder{}
	return builder
}

// 日志内容
//
// 示例值：log
func (builder *LogBuilder) Content(content string) *LogBuilder {
	builder.content = content
	builder.contentFlag = true
	return builder
}

// 日志级别
//
// 示例值：info
func (builder *LogBuilder) Level(level string) *LogBuilder {
	builder.level = level
	builder.levelFlag = true
	return builder
}

// 日志时间戳
//
// 示例值：1741249747824
func (builder *LogBuilder) Timestamp(timestamp int) *LogBuilder {
	builder.timestamp = timestamp
	builder.timestampFlag = true
	return builder
}

// 与日志关联的事件类型
//
// 示例值：
func (builder *LogBuilder) Event(event *Event) *LogBuilder {
	builder.event = event
	builder.eventFlag = true
	return builder
}

// trace id
//
// 示例值：edf45bdf-9f3f-4aad-b260-9287ab09e0de
func (builder *LogBuilder) TraceId(traceId string) *LogBuilder {
	builder.traceId = traceId
	builder.traceIdFlag = true
	return builder
}

// 附加属性，包括应用相关属性（如 tenant_id, namespace），日志所属模块相关属性（如函数日志的 function_api_name）等
//
// 示例值：{"tenant_id": "123"}
func (builder *LogBuilder) Attributes(attributes string) *LogBuilder {
	builder.attributes = attributes
	builder.attributesFlag = true
	return builder
}

func (builder *LogBuilder) Build() *Log {
	req := &Log{}
	if builder.contentFlag {
		req.Content = &builder.content

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

	}
	if builder.timestampFlag {
		req.Timestamp = &builder.timestamp

	}
	if builder.eventFlag {
		req.Event = builder.event
	}
	if builder.traceIdFlag {
		req.TraceId = &builder.traceId

	}
	if builder.attributesFlag {
		req.Attributes = &builder.attributes

	}
	return req
}

type LookupWithAvatar struct {
	Id *string `json:"id,omitempty"` // 用户ID

	Name *string `json:"name,omitempty"` // 用户名称

	TenantId *string `json:"tenant_id,omitempty"` // 租户ID

	Email *string `json:"email,omitempty"` // 用户邮箱
}

type LookupWithAvatarBuilder struct {
	id     string // 用户ID
	idFlag bool

	name     string // 用户名称
	nameFlag bool

	tenantId     string // 租户ID
	tenantIdFlag bool

	email     string // 用户邮箱
	emailFlag bool
}

func NewLookupWithAvatarBuilder() *LookupWithAvatarBuilder {
	builder := &LookupWithAvatarBuilder{}
	return builder
}

// 用户ID
//
// 示例值：1768491480010814
func (builder *LookupWithAvatarBuilder) Id(id string) *LookupWithAvatarBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 用户名称
//
// 示例值：郭晋
func (builder *LookupWithAvatarBuilder) Name(name string) *LookupWithAvatarBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 租户ID
//
// 示例值：79844
func (builder *LookupWithAvatarBuilder) TenantId(tenantId string) *LookupWithAvatarBuilder {
	builder.tenantId = tenantId
	builder.tenantIdFlag = true
	return builder
}

// 用户邮箱
//
// 示例值：guojin.jim@bytedance.com
func (builder *LookupWithAvatarBuilder) Email(email string) *LookupWithAvatarBuilder {
	builder.email = email
	builder.emailFlag = true
	return builder
}

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

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

	}
	if builder.tenantIdFlag {
		req.TenantId = &builder.tenantId

	}
	if builder.emailFlag {
		req.Email = &builder.email

	}
	return req
}

type Metric struct {
	Name *string `json:"name,omitempty"` // 指标名称

	Type *string `json:"type,omitempty"` // 指标类型

	Value *float64 `json:"value,omitempty"` // 指标值

	Attributes *string `json:"attributes,omitempty"` // 指标属性，json 格式

	Timestamp *int `json:"timestamp,omitempty"` // 时间戳
}

type MetricBuilder struct {
	name     string // 指标名称
	nameFlag bool

	type_    string // 指标类型
	typeFlag bool

	value     float64 // 指标值
	valueFlag bool

	attributes     string // 指标属性，json 格式
	attributesFlag bool

	timestamp     int // 时间戳
	timestampFlag bool
}

func NewMetricBuilder() *MetricBuilder {
	builder := &MetricBuilder{}
	return builder
}

// 指标名称
//
// 示例值：function_exec_total
func (builder *MetricBuilder) Name(name string) *MetricBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 指标类型
//
// 示例值：counter
func (builder *MetricBuilder) Type(type_ string) *MetricBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// 指标值
//
// 示例值：1
func (builder *MetricBuilder) Value(value float64) *MetricBuilder {
	builder.value = value
	builder.valueFlag = true
	return builder
}

// 指标属性，json 格式
//
// 示例值：{"tenant_id": 390}
func (builder *MetricBuilder) Attributes(attributes string) *MetricBuilder {
	builder.attributes = attributes
	builder.attributesFlag = true
	return builder
}

// 时间戳
//
// 示例值：1729503987342
func (builder *MetricBuilder) Timestamp(timestamp int) *MetricBuilder {
	builder.timestamp = timestamp
	builder.timestampFlag = true
	return builder
}

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

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

	}
	if builder.valueFlag {
		req.Value = &builder.value

	}
	if builder.attributesFlag {
		req.Attributes = &builder.attributes

	}
	if builder.timestampFlag {
		req.Timestamp = &builder.timestamp

	}
	return req
}

type Object struct {
	Id *int `json:"id,omitempty"` // 对象 ID

	ApiName *string `json:"api_name,omitempty"` // 对象 API 名称

	Label map[string]string `json:"label,omitempty"` // 对象名称

	Settings *ObjectSettings `json:"settings,omitempty"` // 对象配置
}

type ObjectBuilder struct {
	id     int // 对象 ID
	idFlag bool

	apiName     string // 对象 API 名称
	apiNameFlag bool

	label     map[string]string // 对象名称
	labelFlag bool

	settings     *ObjectSettings // 对象配置
	settingsFlag bool
}

func NewObjectBuilder() *ObjectBuilder {
	builder := &ObjectBuilder{}
	return builder
}

// 对象 ID
//
// 示例值：1764024447556775
func (builder *ObjectBuilder) Id(id int) *ObjectBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 对象 API 名称
//
// 示例值：user
func (builder *ObjectBuilder) ApiName(apiName string) *ObjectBuilder {
	builder.apiName = apiName
	builder.apiNameFlag = true
	return builder
}

// 对象名称
//
// 示例值：
func (builder *ObjectBuilder) Label(label map[string]string) *ObjectBuilder {
	builder.label = label
	builder.labelFlag = true
	return builder
}

// 对象配置
//
// 示例值：
func (builder *ObjectBuilder) Settings(settings *ObjectSettings) *ObjectBuilder {
	builder.settings = settings
	builder.settingsFlag = true
	return builder
}

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

	}
	if builder.apiNameFlag {
		req.ApiName = &builder.apiName

	}
	if builder.labelFlag {
		req.Label = builder.label
	}
	if builder.settingsFlag {
		req.Settings = builder.settings
	}
	return req
}

type ObjectField struct {
	Id *int `json:"id,omitempty"` // 字段 id

	ApiName *string `json:"api_name,omitempty"` // API 名称

	Type *string `json:"type,omitempty"` // 字段类型

	Label map[string]string `json:"label,omitempty"` // 字段名称
}

type ObjectFieldBuilder struct {
	id     int // 字段 id
	idFlag bool

	apiName     string // API 名称
	apiNameFlag bool

	type_    string // 字段类型
	typeFlag bool

	label     map[string]string // 字段名称
	labelFlag bool
}

func NewObjectFieldBuilder() *ObjectFieldBuilder {
	builder := &ObjectFieldBuilder{}
	return builder
}

// 字段 id
//
// 示例值：1764024447525960
func (builder *ObjectFieldBuilder) Id(id int) *ObjectFieldBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// API 名称
//
// 示例值：user
func (builder *ObjectFieldBuilder) ApiName(apiName string) *ObjectFieldBuilder {
	builder.apiName = apiName
	builder.apiNameFlag = true
	return builder
}

// 字段类型
//
// 示例值：string
func (builder *ObjectFieldBuilder) Type(type_ string) *ObjectFieldBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// 字段名称
//
// 示例值：
func (builder *ObjectFieldBuilder) Label(label map[string]string) *ObjectFieldBuilder {
	builder.label = label
	builder.labelFlag = true
	return builder
}

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

	}
	if builder.apiNameFlag {
		req.ApiName = &builder.apiName

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

	}
	if builder.labelFlag {
		req.Label = builder.label
	}
	return req
}

type ObjectFieldTypeForQuery struct {
	Name *string `json:"name,omitempty"` // 字段类型

	Settings *string `json:"settings,omitempty"` // 字段配置
}

type ObjectFieldTypeForQueryBuilder struct {
	name     string // 字段类型
	nameFlag bool

	settings     string // 字段配置
	settingsFlag bool
}

func NewObjectFieldTypeForQueryBuilder() *ObjectFieldTypeForQueryBuilder {
	builder := &ObjectFieldTypeForQueryBuilder{}
	return builder
}

// 字段类型
//
// 示例值：text
func (builder *ObjectFieldTypeForQueryBuilder) Name(name string) *ObjectFieldTypeForQueryBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 字段配置
//
// 示例值：{}
func (builder *ObjectFieldTypeForQueryBuilder) Settings(settings string) *ObjectFieldTypeForQueryBuilder {
	builder.settings = settings
	builder.settingsFlag = true
	return builder
}

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

	}
	if builder.settingsFlag {
		req.Settings = &builder.settings

	}
	return req
}

type ObjectFieldsForQuery struct {
	ApiName *string `json:"api_name,omitempty"` // API 名称

	Label *Label `json:"label,omitempty"` // 字段名称

	Type *ObjectFieldTypeForQuery `json:"type,omitempty"` // 字段类型

	CreatedAt *int `json:"created_at,omitempty"` // 创建时间

	UpdatedAt *int `json:"updated_at,omitempty"` // 更新时间
}

type ObjectFieldsForQueryBuilder struct {
	apiName     string // API 名称
	apiNameFlag bool

	label     *Label // 字段名称
	labelFlag bool

	type_    *ObjectFieldTypeForQuery // 字段类型
	typeFlag bool

	createdAt     int // 创建时间
	createdAtFlag bool

	updatedAt     int // 更新时间
	updatedAtFlag bool
}

func NewObjectFieldsForQueryBuilder() *ObjectFieldsForQueryBuilder {
	builder := &ObjectFieldsForQueryBuilder{}
	return builder
}

// API 名称
//
// 示例值：_createBy
func (builder *ObjectFieldsForQueryBuilder) ApiName(apiName string) *ObjectFieldsForQueryBuilder {
	builder.apiName = apiName
	builder.apiNameFlag = true
	return builder
}

// 字段名称
//
// 示例值：
func (builder *ObjectFieldsForQueryBuilder) Label(label *Label) *ObjectFieldsForQueryBuilder {
	builder.label = label
	builder.labelFlag = true
	return builder
}

// 字段类型
//
// 示例值：
func (builder *ObjectFieldsForQueryBuilder) Type(type_ *ObjectFieldTypeForQuery) *ObjectFieldsForQueryBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// 创建时间
//
// 示例值：1727431743472
func (builder *ObjectFieldsForQueryBuilder) CreatedAt(createdAt int) *ObjectFieldsForQueryBuilder {
	builder.createdAt = createdAt
	builder.createdAtFlag = true
	return builder
}

// 更新时间
//
// 示例值：1727431743472
func (builder *ObjectFieldsForQueryBuilder) UpdatedAt(updatedAt int) *ObjectFieldsForQueryBuilder {
	builder.updatedAt = updatedAt
	builder.updatedAtFlag = true
	return builder
}

func (builder *ObjectFieldsForQueryBuilder) Build() *ObjectFieldsForQuery {
	req := &ObjectFieldsForQuery{}
	if builder.apiNameFlag {
		req.ApiName = &builder.apiName

	}
	if builder.labelFlag {
		req.Label = builder.label
	}
	if builder.typeFlag {
		req.Type = builder.type_
	}
	if builder.createdAtFlag {
		req.CreatedAt = &builder.createdAt

	}
	if builder.updatedAtFlag {
		req.UpdatedAt = &builder.updatedAt

	}
	return req
}

type ObjectFilter struct {
	QuickQuery *string `json:"quick_query,omitempty"` // 模糊查询关键词

	Type *string `json:"type,omitempty"` // 对象类型
}

type ObjectFilterBuilder struct {
	quickQuery     string // 模糊查询关键词
	quickQueryFlag bool

	type_    string // 对象类型
	typeFlag bool
}

func NewObjectFilterBuilder() *ObjectFilterBuilder {
	builder := &ObjectFilterBuilder{}
	return builder
}

// 模糊查询关键词
//
// 示例值：示例文本
func (builder *ObjectFilterBuilder) QuickQuery(quickQuery string) *ObjectFilterBuilder {
	builder.quickQuery = quickQuery
	builder.quickQueryFlag = true
	return builder
}

// 对象类型
//
// 示例值：custom
func (builder *ObjectFilterBuilder) Type(type_ string) *ObjectFilterBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

func (builder *ObjectFilterBuilder) Build() *ObjectFilter {
	req := &ObjectFilter{}
	if builder.quickQueryFlag {
		req.QuickQuery = &builder.quickQuery

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

	}
	return req
}

type ObjectForQuery struct {
	ApiName *string `json:"api_name,omitempty"` // API名称

	Label *Label `json:"label,omitempty"` // 对象名称

	Type *string `json:"type,omitempty"` // 对象类型

	Settings *ObjectSettingsForQuery `json:"settings,omitempty"` // 对象配置

	Fields []*ObjectFieldsForQuery `json:"fields,omitempty"` // 对象字段信息

	CreatedAt *int `json:"created_at,omitempty"` // 创建时间

	UpdatedAt *int `json:"updated_at,omitempty"` // 更新时间
}

type ObjectForQueryBuilder struct {
	apiName     string // API名称
	apiNameFlag bool

	label     *Label // 对象名称
	labelFlag bool

	type_    string // 对象类型
	typeFlag bool

	settings     *ObjectSettingsForQuery // 对象配置
	settingsFlag bool

	fields     []*ObjectFieldsForQuery // 对象字段信息
	fieldsFlag bool

	createdAt     int // 创建时间
	createdAtFlag bool

	updatedAt     int // 更新时间
	updatedAtFlag bool
}

func NewObjectForQueryBuilder() *ObjectForQueryBuilder {
	builder := &ObjectForQueryBuilder{}
	return builder
}

// API名称
//
// 示例值：_user
func (builder *ObjectForQueryBuilder) ApiName(apiName string) *ObjectForQueryBuilder {
	builder.apiName = apiName
	builder.apiNameFlag = true
	return builder
}

// 对象名称
//
// 示例值：
func (builder *ObjectForQueryBuilder) Label(label *Label) *ObjectForQueryBuilder {
	builder.label = label
	builder.labelFlag = true
	return builder
}

// 对象类型
//
// 示例值：common
func (builder *ObjectForQueryBuilder) Type(type_ string) *ObjectForQueryBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// 对象配置
//
// 示例值：
func (builder *ObjectForQueryBuilder) Settings(settings *ObjectSettingsForQuery) *ObjectForQueryBuilder {
	builder.settings = settings
	builder.settingsFlag = true
	return builder
}

// 对象字段信息
//
// 示例值：
func (builder *ObjectForQueryBuilder) Fields(fields []*ObjectFieldsForQuery) *ObjectForQueryBuilder {
	builder.fields = fields
	builder.fieldsFlag = true
	return builder
}

// 创建时间
//
// 示例值：1727431743472
func (builder *ObjectForQueryBuilder) CreatedAt(createdAt int) *ObjectForQueryBuilder {
	builder.createdAt = createdAt
	builder.createdAtFlag = true
	return builder
}

// 更新时间
//
// 示例值：1727431743472
func (builder *ObjectForQueryBuilder) UpdatedAt(updatedAt int) *ObjectForQueryBuilder {
	builder.updatedAt = updatedAt
	builder.updatedAtFlag = true
	return builder
}

func (builder *ObjectForQueryBuilder) Build() *ObjectForQuery {
	req := &ObjectForQuery{}
	if builder.apiNameFlag {
		req.ApiName = &builder.apiName

	}
	if builder.labelFlag {
		req.Label = builder.label
	}
	if builder.typeFlag {
		req.Type = &builder.type_

	}
	if builder.settingsFlag {
		req.Settings = builder.settings
	}
	if builder.fieldsFlag {
		req.Fields = builder.fields
	}
	if builder.createdAtFlag {
		req.CreatedAt = &builder.createdAt

	}
	if builder.updatedAtFlag {
		req.UpdatedAt = &builder.updatedAt

	}
	return req
}

type ObjectMeta struct {
	Object *Object `json:"object,omitempty"` // 对象信息

	Fields []*ObjectField `json:"fields,omitempty"` // 字段信息
}

type ObjectMetaBuilder struct {
	object     *Object // 对象信息
	objectFlag bool

	fields     []*ObjectField // 字段信息
	fieldsFlag bool
}

func NewObjectMetaBuilder() *ObjectMetaBuilder {
	builder := &ObjectMetaBuilder{}
	return builder
}

// 对象信息
//
// 示例值：
func (builder *ObjectMetaBuilder) Object(object *Object) *ObjectMetaBuilder {
	builder.object = object
	builder.objectFlag = true
	return builder
}

// 字段信息
//
// 示例值：
func (builder *ObjectMetaBuilder) Fields(fields []*ObjectField) *ObjectMetaBuilder {
	builder.fields = fields
	builder.fieldsFlag = true
	return builder
}

func (builder *ObjectMetaBuilder) Build() *ObjectMeta {
	req := &ObjectMeta{}
	if builder.objectFlag {
		req.Object = builder.object
	}
	if builder.fieldsFlag {
		req.Fields = builder.fields
	}
	return req
}

type ObjectSearchLayout struct {
	DisplayFields []string `json:"display_fields,omitempty"` // 展示字段
}

type ObjectSearchLayoutBuilder struct {
	displayFields     []string // 展示字段
	displayFieldsFlag bool
}

func NewObjectSearchLayoutBuilder() *ObjectSearchLayoutBuilder {
	builder := &ObjectSearchLayoutBuilder{}
	return builder
}

// 展示字段
//
// 示例值：
func (builder *ObjectSearchLayoutBuilder) DisplayFields(displayFields []string) *ObjectSearchLayoutBuilder {
	builder.displayFields = displayFields
	builder.displayFieldsFlag = true
	return builder
}

func (builder *ObjectSearchLayoutBuilder) Build() *ObjectSearchLayout {
	req := &ObjectSearchLayout{}
	if builder.displayFieldsFlag {
		req.DisplayFields = builder.displayFields
	}
	return req
}

type ObjectSettings struct {
	DisplayName *string `json:"display_name,omitempty"` // 展示名称

	AllowSearchFields []string `json:"allow_search_fields,omitempty"` // 允许搜索字段

	SearchLayout *ObjectSearchLayout `json:"search_layout,omitempty"` // 展示字段
}

type ObjectSettingsBuilder struct {
	displayName     string // 展示名称
	displayNameFlag bool

	allowSearchFields     []string // 允许搜索字段
	allowSearchFieldsFlag bool

	searchLayout     *ObjectSearchLayout // 展示字段
	searchLayoutFlag bool
}

func NewObjectSettingsBuilder() *ObjectSettingsBuilder {
	builder := &ObjectSettingsBuilder{}
	return builder
}

// 展示名称
//
// 示例值：_id
func (builder *ObjectSettingsBuilder) DisplayName(displayName string) *ObjectSettingsBuilder {
	builder.displayName = displayName
	builder.displayNameFlag = true
	return builder
}

// 允许搜索字段
//
// 示例值：
func (builder *ObjectSettingsBuilder) AllowSearchFields(allowSearchFields []string) *ObjectSettingsBuilder {
	builder.allowSearchFields = allowSearchFields
	builder.allowSearchFieldsFlag = true
	return builder
}

// 展示字段
//
// 示例值：
func (builder *ObjectSettingsBuilder) SearchLayout(searchLayout *ObjectSearchLayout) *ObjectSettingsBuilder {
	builder.searchLayout = searchLayout
	builder.searchLayoutFlag = true
	return builder
}

func (builder *ObjectSettingsBuilder) Build() *ObjectSettings {
	req := &ObjectSettings{}
	if builder.displayNameFlag {
		req.DisplayName = &builder.displayName

	}
	if builder.allowSearchFieldsFlag {
		req.AllowSearchFields = builder.allowSearchFields
	}
	if builder.searchLayoutFlag {
		req.SearchLayout = builder.searchLayout
	}
	return req
}

type ObjectSettingsForQuery struct {
	DisplayName *string `json:"display_name,omitempty"` // 展示名称

	AllowSearchFields []string `json:"allow_search_fields,omitempty"` // 允许搜索字段

	SearchLayouts []string `json:"search_layouts,omitempty"` // 展示字段
}

type ObjectSettingsForQueryBuilder struct {
	displayName     string // 展示名称
	displayNameFlag bool

	allowSearchFields     []string // 允许搜索字段
	allowSearchFieldsFlag bool

	searchLayouts     []string // 展示字段
	searchLayoutsFlag bool
}

func NewObjectSettingsForQueryBuilder() *ObjectSettingsForQueryBuilder {
	builder := &ObjectSettingsForQueryBuilder{}
	return builder
}

// 展示名称
//
// 示例值：_id
func (builder *ObjectSettingsForQueryBuilder) DisplayName(displayName string) *ObjectSettingsForQueryBuilder {
	builder.displayName = displayName
	builder.displayNameFlag = true
	return builder
}

// 允许搜索字段
//
// 示例值：
func (builder *ObjectSettingsForQueryBuilder) AllowSearchFields(allowSearchFields []string) *ObjectSettingsForQueryBuilder {
	builder.allowSearchFields = allowSearchFields
	builder.allowSearchFieldsFlag = true
	return builder
}

// 展示字段
//
// 示例值：
func (builder *ObjectSettingsForQueryBuilder) SearchLayouts(searchLayouts []string) *ObjectSettingsForQueryBuilder {
	builder.searchLayouts = searchLayouts
	builder.searchLayoutsFlag = true
	return builder
}

func (builder *ObjectSettingsForQueryBuilder) Build() *ObjectSettingsForQuery {
	req := &ObjectSettingsForQuery{}
	if builder.displayNameFlag {
		req.DisplayName = &builder.displayName

	}
	if builder.allowSearchFieldsFlag {
		req.AllowSearchFields = builder.allowSearchFields
	}
	if builder.searchLayoutsFlag {
		req.SearchLayouts = builder.searchLayouts
	}
	return req
}

type OperationPermissionAccess struct {
	ApiId *string `json:"api_id,omitempty"` // 运算的api_id

	ApiName *string `json:"api_name,omitempty"` // 运算的api_name

	OperationType *string `json:"operation_type,omitempty"` // 运算类型

	DisplayName map[string]string `json:"display_name,omitempty"` // 展示名称
}

type OperationPermissionAccessBuilder struct {
	apiId     string // 运算的api_id
	apiIdFlag bool

	apiName     string // 运算的api_name
	apiNameFlag bool

	operationType     string // 运算类型
	operationTypeFlag bool

	displayName     map[string]string // 展示名称
	displayNameFlag bool
}

func NewOperationPermissionAccessBuilder() *OperationPermissionAccessBuilder {
	builder := &OperationPermissionAccessBuilder{}
	return builder
}

// 运算的api_id
//
// 示例值：api_id
func (builder *OperationPermissionAccessBuilder) ApiId(apiId string) *OperationPermissionAccessBuilder {
	builder.apiId = apiId
	builder.apiIdFlag = true
	return builder
}

// 运算的api_name
//
// 示例值：api_name
func (builder *OperationPermissionAccessBuilder) ApiName(apiName string) *OperationPermissionAccessBuilder {
	builder.apiName = apiName
	builder.apiNameFlag = true
	return builder
}

// 运算类型
//
// 示例值：automation
func (builder *OperationPermissionAccessBuilder) OperationType(operationType string) *OperationPermissionAccessBuilder {
	builder.operationType = operationType
	builder.operationTypeFlag = true
	return builder
}

// 展示名称
//
// 示例值：
func (builder *OperationPermissionAccessBuilder) DisplayName(displayName map[string]string) *OperationPermissionAccessBuilder {
	builder.displayName = displayName
	builder.displayNameFlag = true
	return builder
}

func (builder *OperationPermissionAccessBuilder) Build() *OperationPermissionAccess {
	req := &OperationPermissionAccess{}
	if builder.apiIdFlag {
		req.ApiId = &builder.apiId

	}
	if builder.apiNameFlag {
		req.ApiName = &builder.apiName

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

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

type OperationPermissionV2 struct {
	RoleApiName *string `json:"role_api_name,omitempty"` // 角色的apiName

	OperationApiName *string `json:"operation_api_name,omitempty"` // 关联对象或数据集的apiName

	OperationType *string `json:"operation_type,omitempty"` // 关联对象或数据集的类型

	OperationName map[string]string `json:"operation_name,omitempty"` // 关联对象或数据集的名称
}

type OperationPermissionV2Builder struct {
	roleApiName     string // 角色的apiName
	roleApiNameFlag bool

	operationApiName     string // 关联对象或数据集的apiName
	operationApiNameFlag bool

	operationType     string // 关联对象或数据集的类型
	operationTypeFlag bool

	operationName     map[string]string // 关联对象或数据集的名称
	operationNameFlag bool
}

func NewOperationPermissionV2Builder() *OperationPermissionV2Builder {
	builder := &OperationPermissionV2Builder{}
	return builder
}

// 角色的apiName
//
// 示例值：role_65445dff6ed
func (builder *OperationPermissionV2Builder) RoleApiName(roleApiName string) *OperationPermissionV2Builder {
	builder.roleApiName = roleApiName
	builder.roleApiNameFlag = true
	return builder
}

// 关联对象或数据集的apiName
//
// 示例值：automation_adfjion
func (builder *OperationPermissionV2Builder) OperationApiName(operationApiName string) *OperationPermissionV2Builder {
	builder.operationApiName = operationApiName
	builder.operationApiNameFlag = true
	return builder
}

// 关联对象或数据集的类型
//
// 示例值：automation
func (builder *OperationPermissionV2Builder) OperationType(operationType string) *OperationPermissionV2Builder {
	builder.operationType = operationType
	builder.operationTypeFlag = true
	return builder
}

// 关联对象或数据集的名称
//
// 示例值：
func (builder *OperationPermissionV2Builder) OperationName(operationName map[string]string) *OperationPermissionV2Builder {
	builder.operationName = operationName
	builder.operationNameFlag = true
	return builder
}

func (builder *OperationPermissionV2Builder) Build() *OperationPermissionV2 {
	req := &OperationPermissionV2{}
	if builder.roleApiNameFlag {
		req.RoleApiName = &builder.roleApiName

	}
	if builder.operationApiNameFlag {
		req.OperationApiName = &builder.operationApiName

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

	}
	if builder.operationNameFlag {
		req.OperationName = builder.operationName
	}
	return req
}

type OrderCondition struct {
	Field *string `json:"field,omitempty"` // 字段名

	OrderType *string `json:"order_type,omitempty"` // 排序方式
}

type OrderConditionBuilder struct {
	field     string // 字段名
	fieldFlag bool

	orderType     string // 排序方式
	orderTypeFlag bool
}

func NewOrderConditionBuilder() *OrderConditionBuilder {
	builder := &OrderConditionBuilder{}
	return builder
}

// 字段名
//
// 示例值：_id
func (builder *OrderConditionBuilder) Field(field string) *OrderConditionBuilder {
	builder.field = field
	builder.fieldFlag = true
	return builder
}

// 排序方式
//
// 示例值：asc
func (builder *OrderConditionBuilder) OrderType(orderType string) *OrderConditionBuilder {
	builder.orderType = orderType
	builder.orderTypeFlag = true
	return builder
}

func (builder *OrderConditionBuilder) Build() *OrderCondition {
	req := &OrderCondition{}
	if builder.fieldFlag {
		req.Field = &builder.field

	}
	if builder.orderTypeFlag {
		req.OrderType = &builder.orderType

	}
	return req
}

type PagePermissionAccess struct {
	ApiId *string `json:"api_id,omitempty"` // 页面的api_id

	ApiName *string `json:"api_name,omitempty"` // 页面的api_name

	SubPages []*SubPageSimpleInfo `json:"sub_pages,omitempty"` // 子页面信息

	DisplayName map[string]string `json:"display_name,omitempty"` // 页面的展示名称
}

type PagePermissionAccessBuilder struct {
	apiId     string // 页面的api_id
	apiIdFlag bool

	apiName     string // 页面的api_name
	apiNameFlag bool

	subPages     []*SubPageSimpleInfo // 子页面信息
	subPagesFlag bool

	displayName     map[string]string // 页面的展示名称
	displayNameFlag bool
}

func NewPagePermissionAccessBuilder() *PagePermissionAccessBuilder {
	builder := &PagePermissionAccessBuilder{}
	return builder
}

// 页面的api_id
//
// 示例值：api_id
func (builder *PagePermissionAccessBuilder) ApiId(apiId string) *PagePermissionAccessBuilder {
	builder.apiId = apiId
	builder.apiIdFlag = true
	return builder
}

// 页面的api_name
//
// 示例值：api_name
func (builder *PagePermissionAccessBuilder) ApiName(apiName string) *PagePermissionAccessBuilder {
	builder.apiName = apiName
	builder.apiNameFlag = true
	return builder
}

// 子页面信息
//
// 示例值：
func (builder *PagePermissionAccessBuilder) SubPages(subPages []*SubPageSimpleInfo) *PagePermissionAccessBuilder {
	builder.subPages = subPages
	builder.subPagesFlag = true
	return builder
}

// 页面的展示名称
//
// 示例值：
func (builder *PagePermissionAccessBuilder) DisplayName(displayName map[string]string) *PagePermissionAccessBuilder {
	builder.displayName = displayName
	builder.displayNameFlag = true
	return builder
}

func (builder *PagePermissionAccessBuilder) Build() *PagePermissionAccess {
	req := &PagePermissionAccess{}
	if builder.apiIdFlag {
		req.ApiId = &builder.apiId

	}
	if builder.apiNameFlag {
		req.ApiName = &builder.apiName

	}
	if builder.subPagesFlag {
		req.SubPages = builder.subPages
	}
	if builder.displayNameFlag {
		req.DisplayName = builder.displayName
	}
	return req
}

type PagePermissionV2 struct {
	RoleApiName *string `json:"role_api_name,omitempty"` // 所属角色的apiname

	PageApiName *string `json:"page_api_name,omitempty"` // 关联页面 apiName

	SubTabPages []string `json:"sub_tab_pages,omitempty"` // 有权限的子页面标签页

	PageName map[string]string `json:"page_name,omitempty"` // 页面名称

	SubTabPageDisplayInfos []*SubPageSimpleInfoV2 `json:"sub_tab_page_display_infos,omitempty"` // 子页面的信息
}

type PagePermissionV2Builder struct {
	roleApiName     string // 所属角色的apiname
	roleApiNameFlag bool

	pageApiName     string // 关联页面 apiName
	pageApiNameFlag bool

	subTabPages     []string // 有权限的子页面标签页
	subTabPagesFlag bool

	pageName     map[string]string // 页面名称
	pageNameFlag bool

	subTabPageDisplayInfos     []*SubPageSimpleInfoV2 // 子页面的信息
	subTabPageDisplayInfosFlag bool
}

func NewPagePermissionV2Builder() *PagePermissionV2Builder {
	builder := &PagePermissionV2Builder{}
	return builder
}

// 所属角色的apiname
//
// 示例值：role_api_name
func (builder *PagePermissionV2Builder) RoleApiName(roleApiName string) *PagePermissionV2Builder {
	builder.roleApiName = roleApiName
	builder.roleApiNameFlag = true
	return builder
}

// 关联页面 apiName
//
// 示例值：page_api_name
func (builder *PagePermissionV2Builder) PageApiName(pageApiName string) *PagePermissionV2Builder {
	builder.pageApiName = pageApiName
	builder.pageApiNameFlag = true
	return builder
}

// 有权限的子页面标签页
//
// 示例值：
func (builder *PagePermissionV2Builder) SubTabPages(subTabPages []string) *PagePermissionV2Builder {
	builder.subTabPages = subTabPages
	builder.subTabPagesFlag = true
	return builder
}

// 页面名称
//
// 示例值：
func (builder *PagePermissionV2Builder) PageName(pageName map[string]string) *PagePermissionV2Builder {
	builder.pageName = pageName
	builder.pageNameFlag = true
	return builder
}

// 子页面的信息
//
// 示例值：
func (builder *PagePermissionV2Builder) SubTabPageDisplayInfos(subTabPageDisplayInfos []*SubPageSimpleInfoV2) *PagePermissionV2Builder {
	builder.subTabPageDisplayInfos = subTabPageDisplayInfos
	builder.subTabPageDisplayInfosFlag = true
	return builder
}

func (builder *PagePermissionV2Builder) Build() *PagePermissionV2 {
	req := &PagePermissionV2{}
	if builder.roleApiNameFlag {
		req.RoleApiName = &builder.roleApiName

	}
	if builder.pageApiNameFlag {
		req.PageApiName = &builder.pageApiName

	}
	if builder.subTabPagesFlag {
		req.SubTabPages = builder.subTabPages
	}
	if builder.pageNameFlag {
		req.PageName = builder.pageName
	}
	if builder.subTabPageDisplayInfosFlag {
		req.SubTabPageDisplayInfos = builder.subTabPageDisplayInfos
	}
	return req
}

type PermissionNameInfo struct {
	Id *string `json:"id,omitempty"` // id

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

type PermissionNameInfoBuilder struct {
	id     string // id
	idFlag bool

	name     string // 名称
	nameFlag bool
}

func NewPermissionNameInfoBuilder() *PermissionNameInfoBuilder {
	builder := &PermissionNameInfoBuilder{}
	return builder
}

// id
//
// 示例值：1802412778084426
func (builder *PermissionNameInfoBuilder) Id(id string) *PermissionNameInfoBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 名称
//
// 示例值：张三
func (builder *PermissionNameInfoBuilder) Name(name string) *PermissionNameInfoBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

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

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

	}
	return req
}

type Record struct {
	Id *string `json:"id,omitempty"` // 记录 id
}

type RecordBuilder struct {
	id     string // 记录 id
	idFlag bool
}

func NewRecordBuilder() *RecordBuilder {
	builder := &RecordBuilder{}
	return builder
}

// 记录 id
//
// 示例值：1764024447525960
func (builder *RecordBuilder) Id(id string) *RecordBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

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

	}
	return req
}

type RecordGroupByItem struct {
	Field *string `json:"field,omitempty"` // 字段唯一标识
}

type RecordGroupByItemBuilder struct {
	field     string // 字段唯一标识
	fieldFlag bool
}

func NewRecordGroupByItemBuilder() *RecordGroupByItemBuilder {
	builder := &RecordGroupByItemBuilder{}
	return builder
}

// 字段唯一标识
//
// 示例值：_id
func (builder *RecordGroupByItemBuilder) Field(field string) *RecordGroupByItemBuilder {
	builder.field = field
	builder.fieldFlag = true
	return builder
}

func (builder *RecordGroupByItemBuilder) Build() *RecordGroupByItem {
	req := &RecordGroupByItem{}
	if builder.fieldFlag {
		req.Field = &builder.field

	}
	return req
}

type RecordPermission struct {
	ApiId *string `json:"api_id,omitempty"` // APIID

	ApiName *string `json:"api_name,omitempty"` // API 名称
}

type RecordPermissionBuilder struct {
	apiId     string // APIID
	apiIdFlag bool

	apiName     string // API 名称
	apiNameFlag bool
}

func NewRecordPermissionBuilder() *RecordPermissionBuilder {
	builder := &RecordPermissionBuilder{}
	return builder
}

// APIID
//
// 示例值：apiID
func (builder *RecordPermissionBuilder) ApiId(apiId string) *RecordPermissionBuilder {
	builder.apiId = apiId
	builder.apiIdFlag = true
	return builder
}

// API 名称
//
// 示例值：adminRecordPermission
func (builder *RecordPermissionBuilder) ApiName(apiName string) *RecordPermissionBuilder {
	builder.apiName = apiName
	builder.apiNameFlag = true
	return builder
}

func (builder *RecordPermissionBuilder) Build() *RecordPermission {
	req := &RecordPermission{}
	if builder.apiIdFlag {
		req.ApiId = &builder.apiId

	}
	if builder.apiNameFlag {
		req.ApiName = &builder.apiName

	}
	return req
}

type RecordPermissionV2 struct {
	ApiName *string `json:"api_name,omitempty"` // 记录权限的apiName

	Name map[string]string `json:"name,omitempty"` // 记录权限的名称

	AccessPermissions []int `json:"access_permissions,omitempty"` // 具体所拥有的权限列表

	RecordScope *RecordScopeV2 `json:"record_scope,omitempty"` // 记录权限的范围

	UserScope *UserScopeV2 `json:"user_scope,omitempty"` // 用户或角色范围

	DataModelApiName *string `json:"data_model_api_name,omitempty"` // 数据对象的api_name

	DataModelType *string `json:"data_model_type,omitempty"` // 数据对象的类型，object 或 dataset

	CreatedBy *string `json:"created_by,omitempty"` // 创建人

	CreatedAt *int `json:"created_at,omitempty"` // 创建时间

	UpdatedBy *string `json:"updated_by,omitempty"` // 更新人

	UpdatedAt *int `json:"updated_at,omitempty"` // 更新时间

	Disabled *bool `json:"disabled,omitempty"` // 是否停用
}

type RecordPermissionV2Builder struct {
	apiName     string // 记录权限的apiName
	apiNameFlag bool

	name     map[string]string // 记录权限的名称
	nameFlag bool

	accessPermissions     []int // 具体所拥有的权限列表
	accessPermissionsFlag bool

	recordScope     *RecordScopeV2 // 记录权限的范围
	recordScopeFlag bool

	userScope     *UserScopeV2 // 用户或角色范围
	userScopeFlag bool

	dataModelApiName     string // 数据对象的api_name
	dataModelApiNameFlag bool

	dataModelType     string // 数据对象的类型，object 或 dataset
	dataModelTypeFlag bool

	createdBy     string // 创建人
	createdByFlag bool

	createdAt     int // 创建时间
	createdAtFlag bool

	updatedBy     string // 更新人
	updatedByFlag bool

	updatedAt     int // 更新时间
	updatedAtFlag bool

	disabled     bool // 是否停用
	disabledFlag bool
}

func NewRecordPermissionV2Builder() *RecordPermissionV2Builder {
	builder := &RecordPermissionV2Builder{}
	return builder
}

// 记录权限的apiName
//
// 示例值：record_api_name
func (builder *RecordPermissionV2Builder) ApiName(apiName string) *RecordPermissionV2Builder {
	builder.apiName = apiName
	builder.apiNameFlag = true
	return builder
}

// 记录权限的名称
//
// 示例值：
func (builder *RecordPermissionV2Builder) Name(name map[string]string) *RecordPermissionV2Builder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 具体所拥有的权限列表
//
// 示例值：
func (builder *RecordPermissionV2Builder) AccessPermissions(accessPermissions []int) *RecordPermissionV2Builder {
	builder.accessPermissions = accessPermissions
	builder.accessPermissionsFlag = true
	return builder
}

// 记录权限的范围
//
// 示例值：
func (builder *RecordPermissionV2Builder) RecordScope(recordScope *RecordScopeV2) *RecordPermissionV2Builder {
	builder.recordScope = recordScope
	builder.recordScopeFlag = true
	return builder
}

// 用户或角色范围
//
// 示例值：
func (builder *RecordPermissionV2Builder) UserScope(userScope *UserScopeV2) *RecordPermissionV2Builder {
	builder.userScope = userScope
	builder.userScopeFlag = true
	return builder
}

// 数据对象的api_name
//
// 示例值：data_api_name
func (builder *RecordPermissionV2Builder) DataModelApiName(dataModelApiName string) *RecordPermissionV2Builder {
	builder.dataModelApiName = dataModelApiName
	builder.dataModelApiNameFlag = true
	return builder
}

// 数据对象的类型，object 或 dataset
//
// 示例值：object
func (builder *RecordPermissionV2Builder) DataModelType(dataModelType string) *RecordPermissionV2Builder {
	builder.dataModelType = dataModelType
	builder.dataModelTypeFlag = true
	return builder
}

// 创建人
//
// 示例值：123890741274
func (builder *RecordPermissionV2Builder) CreatedBy(createdBy string) *RecordPermissionV2Builder {
	builder.createdBy = createdBy
	builder.createdByFlag = true
	return builder
}

// 创建时间
//
// 示例值：1757845063
func (builder *RecordPermissionV2Builder) CreatedAt(createdAt int) *RecordPermissionV2Builder {
	builder.createdAt = createdAt
	builder.createdAtFlag = true
	return builder
}

// 更新人
//
// 示例值：182961296491
func (builder *RecordPermissionV2Builder) UpdatedBy(updatedBy string) *RecordPermissionV2Builder {
	builder.updatedBy = updatedBy
	builder.updatedByFlag = true
	return builder
}

// 更新时间
//
// 示例值：1757845063
func (builder *RecordPermissionV2Builder) UpdatedAt(updatedAt int) *RecordPermissionV2Builder {
	builder.updatedAt = updatedAt
	builder.updatedAtFlag = true
	return builder
}

// 是否停用
//
// 示例值：
func (builder *RecordPermissionV2Builder) Disabled(disabled bool) *RecordPermissionV2Builder {
	builder.disabled = disabled
	builder.disabledFlag = true
	return builder
}

func (builder *RecordPermissionV2Builder) Build() *RecordPermissionV2 {
	req := &RecordPermissionV2{}
	if builder.apiNameFlag {
		req.ApiName = &builder.apiName

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.accessPermissionsFlag {
		req.AccessPermissions = builder.accessPermissions
	}
	if builder.recordScopeFlag {
		req.RecordScope = builder.recordScope
	}
	if builder.userScopeFlag {
		req.UserScope = builder.userScope
	}
	if builder.dataModelApiNameFlag {
		req.DataModelApiName = &builder.dataModelApiName

	}
	if builder.dataModelTypeFlag {
		req.DataModelType = &builder.dataModelType

	}
	if builder.createdByFlag {
		req.CreatedBy = &builder.createdBy

	}
	if builder.createdAtFlag {
		req.CreatedAt = &builder.createdAt

	}
	if builder.updatedByFlag {
		req.UpdatedBy = &builder.updatedBy

	}
	if builder.updatedAtFlag {
		req.UpdatedAt = &builder.updatedAt

	}
	if builder.disabledFlag {
		req.Disabled = &builder.disabled

	}
	return req
}

type RecordResult struct {
	Success *bool `json:"success,omitempty"` // 是否成功

	Id *string `json:"id,omitempty"` // 记录 ID

	Errors []*RecordResultError `json:"errors,omitempty"` // 权限错误时的细分 code
}

type RecordResultBuilder struct {
	success     bool // 是否成功
	successFlag bool

	id     string // 记录 ID
	idFlag bool

	errors     []*RecordResultError // 权限错误时的细分 code
	errorsFlag bool
}

func NewRecordResultBuilder() *RecordResultBuilder {
	builder := &RecordResultBuilder{}
	return builder
}

// 是否成功
//
// 示例值：true
func (builder *RecordResultBuilder) Success(success bool) *RecordResultBuilder {
	builder.success = success
	builder.successFlag = true
	return builder
}

// 记录 ID
//
// 示例值：1801464965461024
func (builder *RecordResultBuilder) Id(id string) *RecordResultBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 权限错误时的细分 code
//
// 示例值：
func (builder *RecordResultBuilder) Errors(errors []*RecordResultError) *RecordResultBuilder {
	builder.errors = errors
	builder.errorsFlag = true
	return builder
}

func (builder *RecordResultBuilder) Build() *RecordResult {
	req := &RecordResult{}
	if builder.successFlag {
		req.Success = &builder.success

	}
	if builder.idFlag {
		req.Id = &builder.id

	}
	if builder.errorsFlag {
		req.Errors = builder.errors
	}
	return req
}

type RecordResultError struct {
	Code *string `json:"code,omitempty"` // 错误码

	Message *string `json:"message,omitempty"` // success

	SubCode *string `json:"sub_code,omitempty"` // 权限错误时的细分 code

	Fields []string `json:"fields,omitempty"` // 权限错误时的涉及的字段 APIID 集合
}

type RecordResultErrorBuilder struct {
	code     string // 错误码
	codeFlag bool

	message     string // success
	messageFlag bool

	subCode     string // 权限错误时的细分 code
	subCodeFlag bool

	fields     []string // 权限错误时的涉及的字段 APIID 集合
	fieldsFlag bool
}

func NewRecordResultErrorBuilder() *RecordResultErrorBuilder {
	builder := &RecordResultErrorBuilder{}
	return builder
}

// 错误码
//
// 示例值：0
func (builder *RecordResultErrorBuilder) Code(code string) *RecordResultErrorBuilder {
	builder.code = code
	builder.codeFlag = true
	return builder
}

// success
//
// 示例值：success
func (builder *RecordResultErrorBuilder) Message(message string) *RecordResultErrorBuilder {
	builder.message = message
	builder.messageFlag = true
	return builder
}

// 权限错误时的细分 code
//
// 示例值：k_ec_00001
func (builder *RecordResultErrorBuilder) SubCode(subCode string) *RecordResultErrorBuilder {
	builder.subCode = subCode
	builder.subCodeFlag = true
	return builder
}

// 权限错误时的涉及的字段 APIID 集合
//
// 示例值：
func (builder *RecordResultErrorBuilder) Fields(fields []string) *RecordResultErrorBuilder {
	builder.fields = fields
	builder.fieldsFlag = true
	return builder
}

func (builder *RecordResultErrorBuilder) Build() *RecordResultError {
	req := &RecordResultError{}
	if builder.codeFlag {
		req.Code = &builder.code

	}
	if builder.messageFlag {
		req.Message = &builder.message

	}
	if builder.subCodeFlag {
		req.SubCode = &builder.subCode

	}
	if builder.fieldsFlag {
		req.Fields = builder.fields
	}
	return req
}

type RecordScopeV2 struct {
	RecordScopeMode *string `json:"record_scope_mode,omitempty"` // 记录权限的模式

	Fields []*FieldApiNameSimpleInfo `json:"fields,omitempty"` // 字段信息，如果选择的record_scope_mode是"currentAndSubordinates"或"currentUser"，需要给出是根据"创建人"还是"更新人"字段判断
}

type RecordScopeV2Builder struct {
	recordScopeMode     string // 记录权限的模式
	recordScopeModeFlag bool

	fields     []*FieldApiNameSimpleInfo // 字段信息，如果选择的record_scope_mode是"currentAndSubordinates"或"currentUser"，需要给出是根据"创建人"还是"更新人"字段判断
	fieldsFlag bool
}

func NewRecordScopeV2Builder() *RecordScopeV2Builder {
	builder := &RecordScopeV2Builder{}
	return builder
}

// 记录权限的模式
//
// 示例值：
func (builder *RecordScopeV2Builder) RecordScopeMode(recordScopeMode string) *RecordScopeV2Builder {
	builder.recordScopeMode = recordScopeMode
	builder.recordScopeModeFlag = true
	return builder
}

// 字段信息，如果选择的record_scope_mode是"currentAndSubordinates"或"currentUser"，需要给出是根据"创建人"还是"更新人"字段判断
//
// 示例值：
func (builder *RecordScopeV2Builder) Fields(fields []*FieldApiNameSimpleInfo) *RecordScopeV2Builder {
	builder.fields = fields
	builder.fieldsFlag = true
	return builder
}

func (builder *RecordScopeV2Builder) Build() *RecordScopeV2 {
	req := &RecordScopeV2{}
	if builder.recordScopeModeFlag {
		req.RecordScopeMode = &builder.recordScopeMode

	}
	if builder.fieldsFlag {
		req.Fields = builder.fields
	}
	return req
}

type Role struct {
	ApiId *string `json:"api_id,omitempty"` // 唯一 ID，系统自动生成

	ApiName *string `json:"api_name,omitempty"` // API名称，用户自定义
}

type RoleBuilder struct {
	apiId     string // 唯一 ID，系统自动生成
	apiIdFlag bool

	apiName     string // API名称，用户自定义
	apiNameFlag bool
}

func NewRoleBuilder() *RoleBuilder {
	builder := &RoleBuilder{}
	return builder
}

// 唯一 ID，系统自动生成
//
// 示例值：package_test__rolePermission_aade7fgwajsgi
func (builder *RoleBuilder) ApiId(apiId string) *RoleBuilder {
	builder.apiId = apiId
	builder.apiIdFlag = true
	return builder
}

// API名称，用户自定义
//
// 示例值：adminRole
func (builder *RoleBuilder) ApiName(apiName string) *RoleBuilder {
	builder.apiName = apiName
	builder.apiNameFlag = true
	return builder
}

func (builder *RoleBuilder) Build() *Role {
	req := &Role{}
	if builder.apiIdFlag {
		req.ApiId = &builder.apiId

	}
	if builder.apiNameFlag {
		req.ApiName = &builder.apiName

	}
	return req
}

type RoleApiNameSimpleInfo struct {
	ApiName *string `json:"api_name,omitempty"` // 角色的apiName

	Name map[string]string `json:"name,omitempty"` // 角色的名称
}

type RoleApiNameSimpleInfoBuilder struct {
	apiName     string // 角色的apiName
	apiNameFlag bool

	name     map[string]string // 角色的名称
	nameFlag bool
}

func NewRoleApiNameSimpleInfoBuilder() *RoleApiNameSimpleInfoBuilder {
	builder := &RoleApiNameSimpleInfoBuilder{}
	return builder
}

// 角色的apiName
//
// 示例值：role_api_name
func (builder *RoleApiNameSimpleInfoBuilder) ApiName(apiName string) *RoleApiNameSimpleInfoBuilder {
	builder.apiName = apiName
	builder.apiNameFlag = true
	return builder
}

// 角色的名称
//
// 示例值：
func (builder *RoleApiNameSimpleInfoBuilder) Name(name map[string]string) *RoleApiNameSimpleInfoBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

func (builder *RoleApiNameSimpleInfoBuilder) Build() *RoleApiNameSimpleInfo {
	req := &RoleApiNameSimpleInfo{}
	if builder.apiNameFlag {
		req.ApiName = &builder.apiName

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

type RoleBasic struct {
	ApiId *string `json:"api_id,omitempty"` // 角色的apiId

	ApiName *string `json:"api_name,omitempty"` // 角色的API名称

	Name map[string]string `json:"name,omitempty"` // 角色名称

	Description map[string]string `json:"description,omitempty"` // 角色描述

	Enabled *bool `json:"enabled,omitempty"` // 是否启用

	CreatedBy *string `json:"created_by,omitempty"` // 创建人

	CreatedAt *int `json:"created_at,omitempty"` // 创建时间

	UpdatedBy *string `json:"updated_by,omitempty"` // 更新人

	UpdatedAt *int `json:"updated_at,omitempty"` // 更新时间

	CreatedEnv *string `json:"created_env,omitempty"` // 创建环境

	CreatedWay *string `json:"created_way,omitempty"` // 创建方式
}

type RoleBasicBuilder struct {
	apiId     string // 角色的apiId
	apiIdFlag bool

	apiName     string // 角色的API名称
	apiNameFlag bool

	name     map[string]string // 角色名称
	nameFlag bool

	description     map[string]string // 角色描述
	descriptionFlag bool

	enabled     bool // 是否启用
	enabledFlag bool

	createdBy     string // 创建人
	createdByFlag bool

	createdAt     int // 创建时间
	createdAtFlag bool

	updatedBy     string // 更新人
	updatedByFlag bool

	updatedAt     int // 更新时间
	updatedAtFlag bool

	createdEnv     string // 创建环境
	createdEnvFlag bool

	createdWay     string // 创建方式
	createdWayFlag bool
}

func NewRoleBasicBuilder() *RoleBasicBuilder {
	builder := &RoleBasicBuilder{}
	return builder
}

// 角色的apiId
//
// 示例值：package_99d11a__c__rolePermission_aadismvk2cocs
func (builder *RoleBasicBuilder) ApiId(apiId string) *RoleBasicBuilder {
	builder.apiId = apiId
	builder.apiIdFlag = true
	return builder
}

// 角色的API名称
//
// 示例值：role_7f60dacb16e
func (builder *RoleBasicBuilder) ApiName(apiName string) *RoleBasicBuilder {
	builder.apiName = apiName
	builder.apiNameFlag = true
	return builder
}

// 角色名称
//
// 示例值：
func (builder *RoleBasicBuilder) Name(name map[string]string) *RoleBasicBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 角色描述
//
// 示例值：
func (builder *RoleBasicBuilder) Description(description map[string]string) *RoleBasicBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 是否启用
//
// 示例值：
func (builder *RoleBasicBuilder) Enabled(enabled bool) *RoleBasicBuilder {
	builder.enabled = enabled
	builder.enabledFlag = true
	return builder
}

// 创建人
//
// 示例值：1290381290389
func (builder *RoleBasicBuilder) CreatedBy(createdBy string) *RoleBasicBuilder {
	builder.createdBy = createdBy
	builder.createdByFlag = true
	return builder
}

// 创建时间
//
// 示例值：1682503024586
func (builder *RoleBasicBuilder) CreatedAt(createdAt int) *RoleBasicBuilder {
	builder.createdAt = createdAt
	builder.createdAtFlag = true
	return builder
}

// 更新人
//
// 示例值：17728391812
func (builder *RoleBasicBuilder) UpdatedBy(updatedBy string) *RoleBasicBuilder {
	builder.updatedBy = updatedBy
	builder.updatedByFlag = true
	return builder
}

// 更新时间
//
// 示例值：1682503024586
func (builder *RoleBasicBuilder) UpdatedAt(updatedAt int) *RoleBasicBuilder {
	builder.updatedAt = updatedAt
	builder.updatedAtFlag = true
	return builder
}

// 创建环境
//
// 示例值：sandbox
func (builder *RoleBasicBuilder) CreatedEnv(createdEnv string) *RoleBasicBuilder {
	builder.createdEnv = createdEnv
	builder.createdEnvFlag = true
	return builder
}

// 创建方式
//
// 示例值：page
func (builder *RoleBasicBuilder) CreatedWay(createdWay string) *RoleBasicBuilder {
	builder.createdWay = createdWay
	builder.createdWayFlag = true
	return builder
}

func (builder *RoleBasicBuilder) Build() *RoleBasic {
	req := &RoleBasic{}
	if builder.apiIdFlag {
		req.ApiId = &builder.apiId

	}
	if builder.apiNameFlag {
		req.ApiName = &builder.apiName

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.descriptionFlag {
		req.Description = builder.description
	}
	if builder.enabledFlag {
		req.Enabled = &builder.enabled

	}
	if builder.createdByFlag {
		req.CreatedBy = &builder.createdBy

	}
	if builder.createdAtFlag {
		req.CreatedAt = &builder.createdAt

	}
	if builder.updatedByFlag {
		req.UpdatedBy = &builder.updatedBy

	}
	if builder.updatedAtFlag {
		req.UpdatedAt = &builder.updatedAt

	}
	if builder.createdEnvFlag {
		req.CreatedEnv = &builder.createdEnv

	}
	if builder.createdWayFlag {
		req.CreatedWay = &builder.createdWay

	}
	return req
}

type RoleBasicMask struct {
	ApiName *string `json:"api_name,omitempty"` // 角色的API名称

	Name map[string]string `json:"name,omitempty"` // 角色名称

	Description map[string]string `json:"description,omitempty"` // 角色描述
}

type RoleBasicMaskBuilder struct {
	apiName     string // 角色的API名称
	apiNameFlag bool

	name     map[string]string // 角色名称
	nameFlag bool

	description     map[string]string // 角色描述
	descriptionFlag bool
}

func NewRoleBasicMaskBuilder() *RoleBasicMaskBuilder {
	builder := &RoleBasicMaskBuilder{}
	return builder
}

// 角色的API名称
//
// 示例值：role_7f60dacb16e
func (builder *RoleBasicMaskBuilder) ApiName(apiName string) *RoleBasicMaskBuilder {
	builder.apiName = apiName
	builder.apiNameFlag = true
	return builder
}

// 角色名称
//
// 示例值：
func (builder *RoleBasicMaskBuilder) Name(name map[string]string) *RoleBasicMaskBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 角色描述
//
// 示例值：
func (builder *RoleBasicMaskBuilder) Description(description map[string]string) *RoleBasicMaskBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

func (builder *RoleBasicMaskBuilder) Build() *RoleBasicMask {
	req := &RoleBasicMask{}
	if builder.apiNameFlag {
		req.ApiName = &builder.apiName

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.descriptionFlag {
		req.Description = builder.description
	}
	return req
}

type RoleMember struct {
	RoleApiId *string `json:"role_api_id,omitempty"` // 角色唯一 ID，系统自动生成

	RoleApiName *string `json:"role_api_name,omitempty"` // 角色 API 名称

	Users []string `json:"users,omitempty"` // 授权用户 ID 列表

	Departments []string `json:"departments,omitempty"` // 授权部门 ID 列表

	UserFilter *Criterion `json:"user_filter,omitempty"` // 自定义授权用户规则

	UserDisplayInfos []*PermissionNameInfo `json:"user_display_infos,omitempty"` // 授权用户姓名列表，入参 need_display_name = true时返回

	DepartmentDisplayInfos []*PermissionNameInfo `json:"department_display_infos,omitempty"` // 授权部门名称列表，入参 need_display_name = true时返回

	Type *string `json:"type,omitempty"` // 角色成员模式

	UpdatedBy *string `json:"updated_by,omitempty"` // 更新人 ID

	UpdatedAt *int `json:"updated_at,omitempty"` // 更新时间
}

type RoleMemberBuilder struct {
	roleApiId     string // 角色唯一 ID，系统自动生成
	roleApiIdFlag bool

	roleApiName     string // 角色 API 名称
	roleApiNameFlag bool

	users     []string // 授权用户 ID 列表
	usersFlag bool

	departments     []string // 授权部门 ID 列表
	departmentsFlag bool

	userFilter     *Criterion // 自定义授权用户规则
	userFilterFlag bool

	userDisplayInfos     []*PermissionNameInfo // 授权用户姓名列表，入参 need_display_name = true时返回
	userDisplayInfosFlag bool

	departmentDisplayInfos     []*PermissionNameInfo // 授权部门名称列表，入参 need_display_name = true时返回
	departmentDisplayInfosFlag bool

	type_    string // 角色成员模式
	typeFlag bool

	updatedBy     string // 更新人 ID
	updatedByFlag bool

	updatedAt     int // 更新时间
	updatedAtFlag bool
}

func NewRoleMemberBuilder() *RoleMemberBuilder {
	builder := &RoleMemberBuilder{}
	return builder
}

// 角色唯一 ID，系统自动生成
//
// 示例值：role_api_id
func (builder *RoleMemberBuilder) RoleApiId(roleApiId string) *RoleMemberBuilder {
	builder.roleApiId = roleApiId
	builder.roleApiIdFlag = true
	return builder
}

// 角色 API 名称
//
// 示例值：adminRole
func (builder *RoleMemberBuilder) RoleApiName(roleApiName string) *RoleMemberBuilder {
	builder.roleApiName = roleApiName
	builder.roleApiNameFlag = true
	return builder
}

// 授权用户 ID 列表
//
// 示例值：
func (builder *RoleMemberBuilder) Users(users []string) *RoleMemberBuilder {
	builder.users = users
	builder.usersFlag = true
	return builder
}

// 授权部门 ID 列表
//
// 示例值：
func (builder *RoleMemberBuilder) Departments(departments []string) *RoleMemberBuilder {
	builder.departments = departments
	builder.departmentsFlag = true
	return builder
}

// 自定义授权用户规则
//
// 示例值：
func (builder *RoleMemberBuilder) UserFilter(userFilter *Criterion) *RoleMemberBuilder {
	builder.userFilter = userFilter
	builder.userFilterFlag = true
	return builder
}

// 授权用户姓名列表，入参 need_display_name = true时返回
//
// 示例值：
func (builder *RoleMemberBuilder) UserDisplayInfos(userDisplayInfos []*PermissionNameInfo) *RoleMemberBuilder {
	builder.userDisplayInfos = userDisplayInfos
	builder.userDisplayInfosFlag = true
	return builder
}

// 授权部门名称列表，入参 need_display_name = true时返回
//
// 示例值：
func (builder *RoleMemberBuilder) DepartmentDisplayInfos(departmentDisplayInfos []*PermissionNameInfo) *RoleMemberBuilder {
	builder.departmentDisplayInfos = departmentDisplayInfos
	builder.departmentDisplayInfosFlag = true
	return builder
}

// 角色成员模式
//
// 示例值：custom
func (builder *RoleMemberBuilder) Type(type_ string) *RoleMemberBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// 更新人 ID
//
// 示例值：1802412778084426
func (builder *RoleMemberBuilder) UpdatedBy(updatedBy string) *RoleMemberBuilder {
	builder.updatedBy = updatedBy
	builder.updatedByFlag = true
	return builder
}

// 更新时间
//
// 示例值：1702546522477
func (builder *RoleMemberBuilder) UpdatedAt(updatedAt int) *RoleMemberBuilder {
	builder.updatedAt = updatedAt
	builder.updatedAtFlag = true
	return builder
}

func (builder *RoleMemberBuilder) Build() *RoleMember {
	req := &RoleMember{}
	if builder.roleApiIdFlag {
		req.RoleApiId = &builder.roleApiId

	}
	if builder.roleApiNameFlag {
		req.RoleApiName = &builder.roleApiName

	}
	if builder.usersFlag {
		req.Users = builder.users
	}
	if builder.departmentsFlag {
		req.Departments = builder.departments
	}
	if builder.userFilterFlag {
		req.UserFilter = builder.userFilter
	}
	if builder.userDisplayInfosFlag {
		req.UserDisplayInfos = builder.userDisplayInfos
	}
	if builder.departmentDisplayInfosFlag {
		req.DepartmentDisplayInfos = builder.departmentDisplayInfos
	}
	if builder.typeFlag {
		req.Type = &builder.type_

	}
	if builder.updatedByFlag {
		req.UpdatedBy = &builder.updatedBy

	}
	if builder.updatedAtFlag {
		req.UpdatedAt = &builder.updatedAt

	}
	return req
}

type RuntimeLog struct {
	Title *string `json:"title,omitempty"` // -

	Level *string `json:"level,omitempty"` // -

	Tags []*RuntimeLogTag `json:"tags,omitempty"` // -

	Timestamp *string `json:"timestamp,omitempty"` // -

	NodeApiName *string `json:"node_api_name,omitempty"` // -

	BasicLog *string `json:"basic_log,omitempty"` // -

	BasicLogToShow *string `json:"basic_log_to_show,omitempty"` // -

	JsonLog *string `json:"json_log,omitempty"` // -

	JsonLogToShow *string `json:"json_log_to_show,omitempty"` // -

	Uri *string `json:"uri,omitempty"` // -

	UriLabels []*I18n `json:"uri_labels,omitempty"` // -
}

type RuntimeLogBuilder struct {
	title     string // -
	titleFlag bool

	level     string // -
	levelFlag bool

	tags     []*RuntimeLogTag // -
	tagsFlag bool

	timestamp     string // -
	timestampFlag bool

	nodeApiName     string // -
	nodeApiNameFlag bool

	basicLog     string // -
	basicLogFlag bool

	basicLogToShow     string // -
	basicLogToShowFlag bool

	jsonLog     string // -
	jsonLogFlag bool

	jsonLogToShow     string // -
	jsonLogToShowFlag bool

	uri     string // -
	uriFlag bool

	uriLabels     []*I18n // -
	uriLabelsFlag bool
}

func NewRuntimeLogBuilder() *RuntimeLogBuilder {
	builder := &RuntimeLogBuilder{}
	return builder
}

// -
//
// 示例值：-
func (builder *RuntimeLogBuilder) Title(title string) *RuntimeLogBuilder {
	builder.title = title
	builder.titleFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *RuntimeLogBuilder) Level(level string) *RuntimeLogBuilder {
	builder.level = level
	builder.levelFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *RuntimeLogBuilder) Tags(tags []*RuntimeLogTag) *RuntimeLogBuilder {
	builder.tags = tags
	builder.tagsFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *RuntimeLogBuilder) Timestamp(timestamp string) *RuntimeLogBuilder {
	builder.timestamp = timestamp
	builder.timestampFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *RuntimeLogBuilder) NodeApiName(nodeApiName string) *RuntimeLogBuilder {
	builder.nodeApiName = nodeApiName
	builder.nodeApiNameFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *RuntimeLogBuilder) BasicLog(basicLog string) *RuntimeLogBuilder {
	builder.basicLog = basicLog
	builder.basicLogFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *RuntimeLogBuilder) BasicLogToShow(basicLogToShow string) *RuntimeLogBuilder {
	builder.basicLogToShow = basicLogToShow
	builder.basicLogToShowFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *RuntimeLogBuilder) JsonLog(jsonLog string) *RuntimeLogBuilder {
	builder.jsonLog = jsonLog
	builder.jsonLogFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *RuntimeLogBuilder) JsonLogToShow(jsonLogToShow string) *RuntimeLogBuilder {
	builder.jsonLogToShow = jsonLogToShow
	builder.jsonLogToShowFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *RuntimeLogBuilder) Uri(uri string) *RuntimeLogBuilder {
	builder.uri = uri
	builder.uriFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *RuntimeLogBuilder) UriLabels(uriLabels []*I18n) *RuntimeLogBuilder {
	builder.uriLabels = uriLabels
	builder.uriLabelsFlag = true
	return builder
}

func (builder *RuntimeLogBuilder) Build() *RuntimeLog {
	req := &RuntimeLog{}
	if builder.titleFlag {
		req.Title = &builder.title

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

	}
	if builder.tagsFlag {
		req.Tags = builder.tags
	}
	if builder.timestampFlag {
		req.Timestamp = &builder.timestamp

	}
	if builder.nodeApiNameFlag {
		req.NodeApiName = &builder.nodeApiName

	}
	if builder.basicLogFlag {
		req.BasicLog = &builder.basicLog

	}
	if builder.basicLogToShowFlag {
		req.BasicLogToShow = &builder.basicLogToShow

	}
	if builder.jsonLogFlag {
		req.JsonLog = &builder.jsonLog

	}
	if builder.jsonLogToShowFlag {
		req.JsonLogToShow = &builder.jsonLogToShow

	}
	if builder.uriFlag {
		req.Uri = &builder.uri

	}
	if builder.uriLabelsFlag {
		req.UriLabels = builder.uriLabels
	}
	return req
}

type RuntimeLogTag struct {
	Key *string `json:"key,omitempty"` // -

	Value *string `json:"value,omitempty"` // -

	ValueType *string `json:"value_type,omitempty"` // -

	Uri *string `json:"uri,omitempty"` // -

	Attachs map[string]string `json:"attachs,omitempty"` // -
}

type RuntimeLogTagBuilder struct {
	key     string // -
	keyFlag bool

	value     string // -
	valueFlag bool

	valueType     string // -
	valueTypeFlag bool

	uri     string // -
	uriFlag bool

	attachs     map[string]string // -
	attachsFlag bool
}

func NewRuntimeLogTagBuilder() *RuntimeLogTagBuilder {
	builder := &RuntimeLogTagBuilder{}
	return builder
}

// -
//
// 示例值：-
func (builder *RuntimeLogTagBuilder) Key(key string) *RuntimeLogTagBuilder {
	builder.key = key
	builder.keyFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *RuntimeLogTagBuilder) Value(value string) *RuntimeLogTagBuilder {
	builder.value = value
	builder.valueFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *RuntimeLogTagBuilder) ValueType(valueType string) *RuntimeLogTagBuilder {
	builder.valueType = valueType
	builder.valueTypeFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *RuntimeLogTagBuilder) Uri(uri string) *RuntimeLogTagBuilder {
	builder.uri = uri
	builder.uriFlag = true
	return builder
}

// -
//
// 示例值：
func (builder *RuntimeLogTagBuilder) Attachs(attachs map[string]string) *RuntimeLogTagBuilder {
	builder.attachs = attachs
	builder.attachsFlag = true
	return builder
}

func (builder *RuntimeLogTagBuilder) Build() *RuntimeLogTag {
	req := &RuntimeLogTag{}
	if builder.keyFlag {
		req.Key = &builder.key

	}
	if builder.valueFlag {
		req.Value = &builder.value

	}
	if builder.valueTypeFlag {
		req.ValueType = &builder.valueType

	}
	if builder.uriFlag {
		req.Uri = &builder.uri

	}
	if builder.attachsFlag {
		req.Attachs = builder.attachs
	}
	return req
}

type SandboxTenant struct {
	TenantId *string `json:"tenant_id,omitempty"` // 租户ID

	TenantName *string `json:"tenant_name,omitempty"` // 租户名称
}

type SandboxTenantBuilder struct {
	tenantId     string // 租户ID
	tenantIdFlag bool

	tenantName     string // 租户名称
	tenantNameFlag bool
}

func NewSandboxTenantBuilder() *SandboxTenantBuilder {
	builder := &SandboxTenantBuilder{}
	return builder
}

// 租户ID
//
// 示例值：74894
func (builder *SandboxTenantBuilder) TenantId(tenantId string) *SandboxTenantBuilder {
	builder.tenantId = tenantId
	builder.tenantIdFlag = true
	return builder
}

// 租户名称
//
// 示例值：apaas
func (builder *SandboxTenantBuilder) TenantName(tenantName string) *SandboxTenantBuilder {
	builder.tenantName = tenantName
	builder.tenantNameFlag = true
	return builder
}

func (builder *SandboxTenantBuilder) Build() *SandboxTenant {
	req := &SandboxTenant{}
	if builder.tenantIdFlag {
		req.TenantId = &builder.tenantId

	}
	if builder.tenantNameFlag {
		req.TenantName = &builder.tenantName

	}
	return req
}

type SearchObjectParam struct {
	ApiName *string `json:"api_name,omitempty"` // 对象 APIName

	SearchFields []string `json:"search_fields,omitempty"` // 搜索字段 SearchFields 列表

	Select []string `json:"select,omitempty"` // 召回字段 APIID/APIName 列表

	Filter *Criterion `json:"filter,omitempty"` // 过滤条件，序列化的结果{"filter": "「标准Criterion」"}

	OrderBy *OrderCondition `json:"order_by,omitempty"` // 排序条件
}

type SearchObjectParamBuilder struct {
	apiName     string // 对象 APIName
	apiNameFlag bool

	searchFields     []string // 搜索字段 SearchFields 列表
	searchFieldsFlag bool

	select_    []string // 召回字段 APIID/APIName 列表
	selectFlag bool

	filter     *Criterion // 过滤条件，序列化的结果{"filter": "「标准Criterion」"}
	filterFlag bool

	orderBy     *OrderCondition // 排序条件
	orderByFlag bool
}

func NewSearchObjectParamBuilder() *SearchObjectParamBuilder {
	builder := &SearchObjectParamBuilder{}
	return builder
}

// 对象 APIName
//
// 示例值：_user
func (builder *SearchObjectParamBuilder) ApiName(apiName string) *SearchObjectParamBuilder {
	builder.apiName = apiName
	builder.apiNameFlag = true
	return builder
}

// 搜索字段 SearchFields 列表
//
// 示例值：
func (builder *SearchObjectParamBuilder) SearchFields(searchFields []string) *SearchObjectParamBuilder {
	builder.searchFields = searchFields
	builder.searchFieldsFlag = true
	return builder
}

// 召回字段 APIID/APIName 列表
//
// 示例值：
func (builder *SearchObjectParamBuilder) Select(select_ []string) *SearchObjectParamBuilder {
	builder.select_ = select_
	builder.selectFlag = true
	return builder
}

// 过滤条件，序列化的结果{"filter": "「标准Criterion」"}
//
// 示例值：
func (builder *SearchObjectParamBuilder) Filter(filter *Criterion) *SearchObjectParamBuilder {
	builder.filter = filter
	builder.filterFlag = true
	return builder
}

// 排序条件
//
// 示例值：
func (builder *SearchObjectParamBuilder) OrderBy(orderBy *OrderCondition) *SearchObjectParamBuilder {
	builder.orderBy = orderBy
	builder.orderByFlag = true
	return builder
}

func (builder *SearchObjectParamBuilder) Build() *SearchObjectParam {
	req := &SearchObjectParam{}
	if builder.apiNameFlag {
		req.ApiName = &builder.apiName

	}
	if builder.searchFieldsFlag {
		req.SearchFields = builder.searchFields
	}
	if builder.selectFlag {
		req.Select = builder.select_
	}
	if builder.filterFlag {
		req.Filter = builder.filter
	}
	if builder.orderByFlag {
		req.OrderBy = builder.orderBy
	}
	return req
}

type SeatActivity struct {
	UserId *int `json:"user_id,omitempty"` // aPaaS 产品用户的 ID

	Namespace *string `json:"namespace,omitempty"` // aPaaS 产品应用的 namespace

	Status *string `json:"status,omitempty"` // 席位状态，枚举值：1. in_use 2. released

	ActiveTime *int `json:"active_time,omitempty"` // 用户使用席位访问应用且席位验证通过时，记录或更新的时间
}

type SeatActivityBuilder struct {
	userId     int // aPaaS 产品用户的 ID
	userIdFlag bool

	namespace     string // aPaaS 产品应用的 namespace
	namespaceFlag bool

	status     string // 席位状态，枚举值：1. in_use 2. released
	statusFlag bool

	activeTime     int // 用户使用席位访问应用且席位验证通过时，记录或更新的时间
	activeTimeFlag bool
}

func NewSeatActivityBuilder() *SeatActivityBuilder {
	builder := &SeatActivityBuilder{}
	return builder
}

// aPaaS 产品用户的 ID
//
// 示例值：1803710089388154
func (builder *SeatActivityBuilder) UserId(userId int) *SeatActivityBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

// aPaaS 产品应用的 namespace
//
// 示例值：package_35f605__c
func (builder *SeatActivityBuilder) Namespace(namespace string) *SeatActivityBuilder {
	builder.namespace = namespace
	builder.namespaceFlag = true
	return builder
}

// 席位状态，枚举值：1. in_use 2. released
//
// 示例值：in_use
func (builder *SeatActivityBuilder) Status(status string) *SeatActivityBuilder {
	builder.status = status
	builder.statusFlag = true
	return builder
}

// 用户使用席位访问应用且席位验证通过时，记录或更新的时间
//
// 示例值：1727199298656
func (builder *SeatActivityBuilder) ActiveTime(activeTime int) *SeatActivityBuilder {
	builder.activeTime = activeTime
	builder.activeTimeFlag = true
	return builder
}

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

	}
	if builder.namespaceFlag {
		req.Namespace = &builder.namespace

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

	}
	if builder.activeTimeFlag {
		req.ActiveTime = &builder.activeTime

	}
	return req
}

type SeatAssignment struct {
	UserId *int `json:"user_id,omitempty"` // aPaaS 产品用户的 ID

	Namespace *string `json:"namespace,omitempty"` // aPaaS 产品应用的 namespace

	Status *string `json:"status,omitempty"` // 席位状态，枚举值：1. in_use 2. released
}

type SeatAssignmentBuilder struct {
	userId     int // aPaaS 产品用户的 ID
	userIdFlag bool

	namespace     string // aPaaS 产品应用的 namespace
	namespaceFlag bool

	status     string // 席位状态，枚举值：1. in_use 2. released
	statusFlag bool
}

func NewSeatAssignmentBuilder() *SeatAssignmentBuilder {
	builder := &SeatAssignmentBuilder{}
	return builder
}

// aPaaS 产品用户的 ID
//
// 示例值：1803710089388154
func (builder *SeatAssignmentBuilder) UserId(userId int) *SeatAssignmentBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

// aPaaS 产品应用的 namespace
//
// 示例值：package_35f605__c
func (builder *SeatAssignmentBuilder) Namespace(namespace string) *SeatAssignmentBuilder {
	builder.namespace = namespace
	builder.namespaceFlag = true
	return builder
}

// 席位状态，枚举值：1. in_use 2. released
//
// 示例值：in_use
func (builder *SeatAssignmentBuilder) Status(status string) *SeatAssignmentBuilder {
	builder.status = status
	builder.statusFlag = true
	return builder
}

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

	}
	if builder.namespaceFlag {
		req.Namespace = &builder.namespace

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

	}
	return req
}

type Sort struct {
	Field *string `json:"field,omitempty"` // 字段唯一标识

	Direction *string `json:"direction,omitempty"` // 排序方向，值为 "ASC" 或者 "DESC"，代表升序和降序
}

type SortBuilder struct {
	field     string // 字段唯一标识
	fieldFlag bool

	direction     string // 排序方向，值为 "ASC" 或者 "DESC"，代表升序和降序
	directionFlag bool
}

func NewSortBuilder() *SortBuilder {
	builder := &SortBuilder{}
	return builder
}

// 字段唯一标识
//
// 示例值：_id
func (builder *SortBuilder) Field(field string) *SortBuilder {
	builder.field = field
	builder.fieldFlag = true
	return builder
}

// 排序方向，值为 "ASC" 或者 "DESC"，代表升序和降序
//
// 示例值：ASC
func (builder *SortBuilder) Direction(direction string) *SortBuilder {
	builder.direction = direction
	builder.directionFlag = true
	return builder
}

func (builder *SortBuilder) Build() *Sort {
	req := &Sort{}
	if builder.fieldFlag {
		req.Field = &builder.field

	}
	if builder.directionFlag {
		req.Direction = &builder.direction

	}
	return req
}

type SubPageSimpleInfo struct {
	SubPageKey *string `json:"sub_page_key,omitempty"` // 子页面的key

	DisplayName map[string]string `json:"display_name,omitempty"` // 子页面的描述

	SubPageApiName *string `json:"sub_page_api_name,omitempty"` // 子页面的apiName
}

type SubPageSimpleInfoBuilder struct {
	subPageKey     string // 子页面的key
	subPageKeyFlag bool

	displayName     map[string]string // 子页面的描述
	displayNameFlag bool

	subPageApiName     string // 子页面的apiName
	subPageApiNameFlag bool
}

func NewSubPageSimpleInfoBuilder() *SubPageSimpleInfoBuilder {
	builder := &SubPageSimpleInfoBuilder{}
	return builder
}

// 子页面的key
//
// 示例值：sub_page_test01
func (builder *SubPageSimpleInfoBuilder) SubPageKey(subPageKey string) *SubPageSimpleInfoBuilder {
	builder.subPageKey = subPageKey
	builder.subPageKeyFlag = true
	return builder
}

// 子页面的描述
//
// 示例值：
func (builder *SubPageSimpleInfoBuilder) DisplayName(displayName map[string]string) *SubPageSimpleInfoBuilder {
	builder.displayName = displayName
	builder.displayNameFlag = true
	return builder
}

// 子页面的apiName
//
// 示例值：aadikuwdc7mju
func (builder *SubPageSimpleInfoBuilder) SubPageApiName(subPageApiName string) *SubPageSimpleInfoBuilder {
	builder.subPageApiName = subPageApiName
	builder.subPageApiNameFlag = true
	return builder
}

func (builder *SubPageSimpleInfoBuilder) Build() *SubPageSimpleInfo {
	req := &SubPageSimpleInfo{}
	if builder.subPageKeyFlag {
		req.SubPageKey = &builder.subPageKey

	}
	if builder.displayNameFlag {
		req.DisplayName = builder.displayName
	}
	if builder.subPageApiNameFlag {
		req.SubPageApiName = &builder.subPageApiName

	}
	return req
}

type SubPageSimpleInfoV2 struct {
	SubPageKey *string `json:"sub_page_key,omitempty"` // 子页面的key

	Name map[string]string `json:"name,omitempty"` // 子页面的名称
}

type SubPageSimpleInfoV2Builder struct {
	subPageKey     string // 子页面的key
	subPageKeyFlag bool

	name     map[string]string // 子页面的名称
	nameFlag bool
}

func NewSubPageSimpleInfoV2Builder() *SubPageSimpleInfoV2Builder {
	builder := &SubPageSimpleInfoV2Builder{}
	return builder
}

// 子页面的key
//
// 示例值：sub_page_key
func (builder *SubPageSimpleInfoV2Builder) SubPageKey(subPageKey string) *SubPageSimpleInfoV2Builder {
	builder.subPageKey = subPageKey
	builder.subPageKeyFlag = true
	return builder
}

// 子页面的名称
//
// 示例值：
func (builder *SubPageSimpleInfoV2Builder) Name(name map[string]string) *SubPageSimpleInfoV2Builder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

func (builder *SubPageSimpleInfoV2Builder) Build() *SubPageSimpleInfoV2 {
	req := &SubPageSimpleInfoV2{}
	if builder.subPageKeyFlag {
		req.SubPageKey = &builder.subPageKey

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

type TaskInfo struct {
	TaskId *string `json:"task_id,omitempty"` // -

	TaskProgress *string `json:"task_progress,omitempty"` // -

	TaskStatus *string `json:"task_status,omitempty"` // -
}

type TaskInfoBuilder struct {
	taskId     string // -
	taskIdFlag bool

	taskProgress     string // -
	taskProgressFlag bool

	taskStatus     string // -
	taskStatusFlag bool
}

func NewTaskInfoBuilder() *TaskInfoBuilder {
	builder := &TaskInfoBuilder{}
	return builder
}

// -
//
// 示例值：-
func (builder *TaskInfoBuilder) TaskId(taskId string) *TaskInfoBuilder {
	builder.taskId = taskId
	builder.taskIdFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *TaskInfoBuilder) TaskProgress(taskProgress string) *TaskInfoBuilder {
	builder.taskProgress = taskProgress
	builder.taskProgressFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *TaskInfoBuilder) TaskStatus(taskStatus string) *TaskInfoBuilder {
	builder.taskStatus = taskStatus
	builder.taskStatusFlag = true
	return builder
}

func (builder *TaskInfoBuilder) Build() *TaskInfo {
	req := &TaskInfo{}
	if builder.taskIdFlag {
		req.TaskId = &builder.taskId

	}
	if builder.taskProgressFlag {
		req.TaskProgress = &builder.taskProgress

	}
	if builder.taskStatusFlag {
		req.TaskStatus = &builder.taskStatus

	}
	return req
}

type Tenant struct {
	TenantId *string `json:"tenant_id,omitempty"` // 租户ID

	TenantName *string `json:"tenant_name,omitempty"` // 租户名称

	Domain *string `json:"domain,omitempty"` // 租户域名

	Type *string `json:"type,omitempty"` // 租户类型
}

type TenantBuilder struct {
	tenantId     string // 租户ID
	tenantIdFlag bool

	tenantName     string // 租户名称
	tenantNameFlag bool

	domain     string // 租户域名
	domainFlag bool

	type_    string // 租户类型
	typeFlag bool
}

func NewTenantBuilder() *TenantBuilder {
	builder := &TenantBuilder{}
	return builder
}

// 租户ID
//
// 示例值：74894
func (builder *TenantBuilder) TenantId(tenantId string) *TenantBuilder {
	builder.tenantId = tenantId
	builder.tenantIdFlag = true
	return builder
}

// 租户名称
//
// 示例值：apaas
func (builder *TenantBuilder) TenantName(tenantName string) *TenantBuilder {
	builder.tenantName = tenantName
	builder.tenantNameFlag = true
	return builder
}

// 租户域名
//
// 示例值：apaas
func (builder *TenantBuilder) Domain(domain string) *TenantBuilder {
	builder.domain = domain
	builder.domainFlag = true
	return builder
}

// 租户类型
//
// 示例值：-
func (builder *TenantBuilder) Type(type_ string) *TenantBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

func (builder *TenantBuilder) Build() *Tenant {
	req := &Tenant{}
	if builder.tenantIdFlag {
		req.TenantId = &builder.tenantId

	}
	if builder.tenantNameFlag {
		req.TenantName = &builder.tenantName

	}
	if builder.domainFlag {
		req.Domain = &builder.domain

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

	}
	return req
}

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

	Name *string `json:"name,omitempty"` // 用户名称
}

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

	name     string // 用户名称
	nameFlag bool
}

func NewUserBuilder() *UserBuilder {
	builder := &UserBuilder{}
	return builder
}

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

// 用户名称
//
// 示例值：yijie
func (builder *UserBuilder) Name(name string) *UserBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

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

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

	}
	return req
}

type UserScopeV2 struct {
	UserScopeMode *string `json:"user_scope_mode,omitempty"` // 生效范围模式

	UserList []*UserSimpleInfo `json:"user_list,omitempty"` // 如果模式选的是user，则需要提供用户信息

	RoleList []*RoleApiNameSimpleInfo `json:"role_list,omitempty"` // 如果模式选的是role，则需要提供角色信息，角色目前只支持一个角色
}

type UserScopeV2Builder struct {
	userScopeMode     string // 生效范围模式
	userScopeModeFlag bool

	userList     []*UserSimpleInfo // 如果模式选的是user，则需要提供用户信息
	userListFlag bool

	roleList     []*RoleApiNameSimpleInfo // 如果模式选的是role，则需要提供角色信息，角色目前只支持一个角色
	roleListFlag bool
}

func NewUserScopeV2Builder() *UserScopeV2Builder {
	builder := &UserScopeV2Builder{}
	return builder
}

// 生效范围模式
//
// 示例值：
func (builder *UserScopeV2Builder) UserScopeMode(userScopeMode string) *UserScopeV2Builder {
	builder.userScopeMode = userScopeMode
	builder.userScopeModeFlag = true
	return builder
}

// 如果模式选的是user，则需要提供用户信息
//
// 示例值：
func (builder *UserScopeV2Builder) UserList(userList []*UserSimpleInfo) *UserScopeV2Builder {
	builder.userList = userList
	builder.userListFlag = true
	return builder
}

// 如果模式选的是role，则需要提供角色信息，角色目前只支持一个角色
//
// 示例值：
func (builder *UserScopeV2Builder) RoleList(roleList []*RoleApiNameSimpleInfo) *UserScopeV2Builder {
	builder.roleList = roleList
	builder.roleListFlag = true
	return builder
}

func (builder *UserScopeV2Builder) Build() *UserScopeV2 {
	req := &UserScopeV2{}
	if builder.userScopeModeFlag {
		req.UserScopeMode = &builder.userScopeMode

	}
	if builder.userListFlag {
		req.UserList = builder.userList
	}
	if builder.roleListFlag {
		req.RoleList = builder.roleList
	}
	return req
}

type UserSimpleInfo struct {
	Id *int `json:"id,omitempty"` // 用户的id

	Name *string `json:"name,omitempty"` // 用户的名称
}

type UserSimpleInfoBuilder struct {
	id     int // 用户的id
	idFlag bool

	name     string // 用户的名称
	nameFlag bool
}

func NewUserSimpleInfoBuilder() *UserSimpleInfoBuilder {
	builder := &UserSimpleInfoBuilder{}
	return builder
}

// 用户的id
//
// 示例值：184625381123
func (builder *UserSimpleInfoBuilder) Id(id int) *UserSimpleInfoBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 用户的名称
//
// 示例值：user_name
func (builder *UserSimpleInfoBuilder) Name(name string) *UserSimpleInfoBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

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

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

	}
	return req
}

type UserTask struct {
	TaskId *string `json:"task_id,omitempty"` // 任务ID

	TaskStartTime *string `json:"task_start_time,omitempty"` // 任务开始时间

	WorkflowInstance *UserTaskWfInstanceType `json:"workflow_instance,omitempty"` // 流程实例

	Initiator *User `json:"initiator,omitempty"` // 发起人

	Summarys []*UserTaskSummaryType `json:"summarys,omitempty"` // 摘要信息
}

type UserTaskBuilder struct {
	taskId     string // 任务ID
	taskIdFlag bool

	taskStartTime     string // 任务开始时间
	taskStartTimeFlag bool

	workflowInstance     *UserTaskWfInstanceType // 流程实例
	workflowInstanceFlag bool

	initiator     *User // 发起人
	initiatorFlag bool

	summarys     []*UserTaskSummaryType // 摘要信息
	summarysFlag bool
}

func NewUserTaskBuilder() *UserTaskBuilder {
	builder := &UserTaskBuilder{}
	return builder
}

// 任务ID
//
// 示例值：1234
func (builder *UserTaskBuilder) TaskId(taskId string) *UserTaskBuilder {
	builder.taskId = taskId
	builder.taskIdFlag = true
	return builder
}

// 任务开始时间
//
// 示例值：1234
func (builder *UserTaskBuilder) TaskStartTime(taskStartTime string) *UserTaskBuilder {
	builder.taskStartTime = taskStartTime
	builder.taskStartTimeFlag = true
	return builder
}

// 流程实例
//
// 示例值：
func (builder *UserTaskBuilder) WorkflowInstance(workflowInstance *UserTaskWfInstanceType) *UserTaskBuilder {
	builder.workflowInstance = workflowInstance
	builder.workflowInstanceFlag = true
	return builder
}

// 发起人
//
// 示例值：
func (builder *UserTaskBuilder) Initiator(initiator *User) *UserTaskBuilder {
	builder.initiator = initiator
	builder.initiatorFlag = true
	return builder
}

// 摘要信息
//
// 示例值：
func (builder *UserTaskBuilder) Summarys(summarys []*UserTaskSummaryType) *UserTaskBuilder {
	builder.summarys = summarys
	builder.summarysFlag = true
	return builder
}

func (builder *UserTaskBuilder) Build() *UserTask {
	req := &UserTask{}
	if builder.taskIdFlag {
		req.TaskId = &builder.taskId

	}
	if builder.taskStartTimeFlag {
		req.TaskStartTime = &builder.taskStartTime

	}
	if builder.workflowInstanceFlag {
		req.WorkflowInstance = builder.workflowInstance
	}
	if builder.initiatorFlag {
		req.Initiator = builder.initiator
	}
	if builder.summarysFlag {
		req.Summarys = builder.summarys
	}
	return req
}

type UserTaskOpinion struct {
	Content *string `json:"content,omitempty"` // 审批常用语文本
}

type UserTaskOpinionBuilder struct {
	content     string // 审批常用语文本
	contentFlag bool
}

func NewUserTaskOpinionBuilder() *UserTaskOpinionBuilder {
	builder := &UserTaskOpinionBuilder{}
	return builder
}

// 审批常用语文本
//
// 示例值：审批通过
func (builder *UserTaskOpinionBuilder) Content(content string) *UserTaskOpinionBuilder {
	builder.content = content
	builder.contentFlag = true
	return builder
}

func (builder *UserTaskOpinionBuilder) Build() *UserTaskOpinion {
	req := &UserTaskOpinion{}
	if builder.contentFlag {
		req.Content = &builder.content

	}
	return req
}

type UserTaskSummaryType struct {
	FileKey *I18n `json:"file_key,omitempty"` // 摘要名称（多语）

	FileValue []*I18n `json:"file_value,omitempty"` // 摘要值（多语）
}

type UserTaskSummaryTypeBuilder struct {
	fileKey     *I18n // 摘要名称（多语）
	fileKeyFlag bool

	fileValue     []*I18n // 摘要值（多语）
	fileValueFlag bool
}

func NewUserTaskSummaryTypeBuilder() *UserTaskSummaryTypeBuilder {
	builder := &UserTaskSummaryTypeBuilder{}
	return builder
}

// 摘要名称（多语）
//
// 示例值：
func (builder *UserTaskSummaryTypeBuilder) FileKey(fileKey *I18n) *UserTaskSummaryTypeBuilder {
	builder.fileKey = fileKey
	builder.fileKeyFlag = true
	return builder
}

// 摘要值（多语）
//
// 示例值：
func (builder *UserTaskSummaryTypeBuilder) FileValue(fileValue []*I18n) *UserTaskSummaryTypeBuilder {
	builder.fileValue = fileValue
	builder.fileValueFlag = true
	return builder
}

func (builder *UserTaskSummaryTypeBuilder) Build() *UserTaskSummaryType {
	req := &UserTaskSummaryType{}
	if builder.fileKeyFlag {
		req.FileKey = builder.fileKey
	}
	if builder.fileValueFlag {
		req.FileValue = builder.fileValue
	}
	return req
}

type UserTaskWfInstanceType struct {
	Id *string `json:"id,omitempty"` // 流程实例ID

	Label []*I18n `json:"label,omitempty"` // 流程对应的任务名称

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

type UserTaskWfInstanceTypeBuilder struct {
	id     string // 流程实例ID
	idFlag bool

	label     []*I18n // 流程对应的任务名称
	labelFlag bool

	status     string // 流程状态
	statusFlag bool
}

func NewUserTaskWfInstanceTypeBuilder() *UserTaskWfInstanceTypeBuilder {
	builder := &UserTaskWfInstanceTypeBuilder{}
	return builder
}

// 流程实例ID
//
// 示例值：1234
func (builder *UserTaskWfInstanceTypeBuilder) Id(id string) *UserTaskWfInstanceTypeBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 流程对应的任务名称
//
// 示例值：
func (builder *UserTaskWfInstanceTypeBuilder) Label(label []*I18n) *UserTaskWfInstanceTypeBuilder {
	builder.label = label
	builder.labelFlag = true
	return builder
}

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

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

	}
	if builder.labelFlag {
		req.Label = builder.label
	}
	if builder.statusFlag {
		req.Status = &builder.status

	}
	return req
}

type UserWithAvatar struct {
	Id *string `json:"id,omitempty"` // 用户kunlunID

	Name *string `json:"name,omitempty"` // 用户名称

	IsDeleted *bool `json:"is_deleted,omitempty"` // 用户状态

	I18nName []*I18n `json:"i18n_name,omitempty"` // 用户多语名称

	Avatar *Avatar `json:"avatar,omitempty"` // 用户头像
}

type UserWithAvatarBuilder struct {
	id     string // 用户kunlunID
	idFlag bool

	name     string // 用户名称
	nameFlag bool

	isDeleted     bool // 用户状态
	isDeletedFlag bool

	i18nName     []*I18n // 用户多语名称
	i18nNameFlag bool

	avatar     *Avatar // 用户头像
	avatarFlag bool
}

func NewUserWithAvatarBuilder() *UserWithAvatarBuilder {
	builder := &UserWithAvatarBuilder{}
	return builder
}

// 用户kunlunID
//
// 示例值：1234
func (builder *UserWithAvatarBuilder) Id(id string) *UserWithAvatarBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 用户名称
//
// 示例值：admin
func (builder *UserWithAvatarBuilder) Name(name string) *UserWithAvatarBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 用户状态
//
// 示例值：false
func (builder *UserWithAvatarBuilder) IsDeleted(isDeleted bool) *UserWithAvatarBuilder {
	builder.isDeleted = isDeleted
	builder.isDeletedFlag = true
	return builder
}

// 用户多语名称
//
// 示例值：
func (builder *UserWithAvatarBuilder) I18nName(i18nName []*I18n) *UserWithAvatarBuilder {
	builder.i18nName = i18nName
	builder.i18nNameFlag = true
	return builder
}

// 用户头像
//
// 示例值：
func (builder *UserWithAvatarBuilder) Avatar(avatar *Avatar) *UserWithAvatarBuilder {
	builder.avatar = avatar
	builder.avatarFlag = true
	return builder
}

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

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

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

	}
	if builder.i18nNameFlag {
		req.I18nName = builder.i18nName
	}
	if builder.avatarFlag {
		req.Avatar = builder.avatar
	}
	return req
}

type WorkflowInstanceLog struct {
	Total *string `json:"total,omitempty"` // 总数

	Logs []*RuntimeLog `json:"logs,omitempty"` // 日志内容

	NextKeywordOffset *string `json:"next_keyword_offset,omitempty"` // 页数游标

	TotalKeyword *string `json:"total_keyword,omitempty"` // -

	HasReadAuth *bool `json:"has_read_auth,omitempty"` // -
}

type WorkflowInstanceLogBuilder struct {
	total     string // 总数
	totalFlag bool

	logs     []*RuntimeLog // 日志内容
	logsFlag bool

	nextKeywordOffset     string // 页数游标
	nextKeywordOffsetFlag bool

	totalKeyword     string // -
	totalKeywordFlag bool

	hasReadAuth     bool // -
	hasReadAuthFlag bool
}

func NewWorkflowInstanceLogBuilder() *WorkflowInstanceLogBuilder {
	builder := &WorkflowInstanceLogBuilder{}
	return builder
}

// 总数
//
// 示例值：-
func (builder *WorkflowInstanceLogBuilder) Total(total string) *WorkflowInstanceLogBuilder {
	builder.total = total
	builder.totalFlag = true
	return builder
}

// 日志内容
//
// 示例值：-
func (builder *WorkflowInstanceLogBuilder) Logs(logs []*RuntimeLog) *WorkflowInstanceLogBuilder {
	builder.logs = logs
	builder.logsFlag = true
	return builder
}

// 页数游标
//
// 示例值：10
func (builder *WorkflowInstanceLogBuilder) NextKeywordOffset(nextKeywordOffset string) *WorkflowInstanceLogBuilder {
	builder.nextKeywordOffset = nextKeywordOffset
	builder.nextKeywordOffsetFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *WorkflowInstanceLogBuilder) TotalKeyword(totalKeyword string) *WorkflowInstanceLogBuilder {
	builder.totalKeyword = totalKeyword
	builder.totalKeywordFlag = true
	return builder
}

// -
//
// 示例值：-
func (builder *WorkflowInstanceLogBuilder) HasReadAuth(hasReadAuth bool) *WorkflowInstanceLogBuilder {
	builder.hasReadAuth = hasReadAuth
	builder.hasReadAuthFlag = true
	return builder
}

func (builder *WorkflowInstanceLogBuilder) Build() *WorkflowInstanceLog {
	req := &WorkflowInstanceLog{}
	if builder.totalFlag {
		req.Total = &builder.total

	}
	if builder.logsFlag {
		req.Logs = builder.logs
	}
	if builder.nextKeywordOffsetFlag {
		req.NextKeywordOffset = &builder.nextKeywordOffset

	}
	if builder.totalKeywordFlag {
		req.TotalKeyword = &builder.totalKeyword

	}
	if builder.hasReadAuthFlag {
		req.HasReadAuth = &builder.hasReadAuth

	}
	return req
}

type WorkspaceDataTable struct {
	Name *string `json:"name,omitempty"` // 数据表名，如 student

	Description *string `json:"description,omitempty"` // 数据表描述

	Columns []*WorkspaceDataTableColumnInfo `json:"columns,omitempty"` // 数据表列
}

type WorkspaceDataTableBuilder struct {
	name     string // 数据表名，如 student
	nameFlag bool

	description     string // 数据表描述
	descriptionFlag bool

	columns     []*WorkspaceDataTableColumnInfo // 数据表列
	columnsFlag bool
}

func NewWorkspaceDataTableBuilder() *WorkspaceDataTableBuilder {
	builder := &WorkspaceDataTableBuilder{}
	return builder
}

// 数据表名，如 student
//
// 示例值：student
func (builder *WorkspaceDataTableBuilder) Name(name string) *WorkspaceDataTableBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 数据表描述
//
// 示例值：studect数据表
func (builder *WorkspaceDataTableBuilder) Description(description string) *WorkspaceDataTableBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 数据表列
//
// 示例值：
func (builder *WorkspaceDataTableBuilder) Columns(columns []*WorkspaceDataTableColumnInfo) *WorkspaceDataTableBuilder {
	builder.columns = columns
	builder.columnsFlag = true
	return builder
}

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

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

	}
	if builder.columnsFlag {
		req.Columns = builder.columns
	}
	return req
}

type WorkspaceDataTableColumnInfo struct {
	Name *string `json:"name,omitempty"` // 列名

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

	DataType *string `json:"data_type,omitempty"` // 数据库数据类型

	IsPrimaryKey *bool `json:"is_primary_key,omitempty"` // 是否是主键

	IsUnique *bool `json:"is_unique,omitempty"` // 是否唯一

	IsAutoIncrement *bool `json:"is_auto_increment,omitempty"` // 是否是自增

	IsArray *bool `json:"is_array,omitempty"` // 是否是数组类型

	IsAllowNull *bool `json:"is_allow_null,omitempty"` // 是否允许为空

	DefaultValue *string `json:"default_value,omitempty"` // 默认值
}

type WorkspaceDataTableColumnInfoBuilder struct {
	name     string // 列名
	nameFlag bool

	description     string // 列描述
	descriptionFlag bool

	dataType     string // 数据库数据类型
	dataTypeFlag bool

	isPrimaryKey     bool // 是否是主键
	isPrimaryKeyFlag bool

	isUnique     bool // 是否唯一
	isUniqueFlag bool

	isAutoIncrement     bool // 是否是自增
	isAutoIncrementFlag bool

	isArray     bool // 是否是数组类型
	isArrayFlag bool

	isAllowNull     bool // 是否允许为空
	isAllowNullFlag bool

	defaultValue     string // 默认值
	defaultValueFlag bool
}

func NewWorkspaceDataTableColumnInfoBuilder() *WorkspaceDataTableColumnInfoBuilder {
	builder := &WorkspaceDataTableColumnInfoBuilder{}
	return builder
}

// 列名
//
// 示例值：column_name
func (builder *WorkspaceDataTableColumnInfoBuilder) Name(name string) *WorkspaceDataTableColumnInfoBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 列描述
//
// 示例值：column_name的描述
func (builder *WorkspaceDataTableColumnInfoBuilder) Description(description string) *WorkspaceDataTableColumnInfoBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 数据库数据类型
//
// 示例值：varchar
func (builder *WorkspaceDataTableColumnInfoBuilder) DataType(dataType string) *WorkspaceDataTableColumnInfoBuilder {
	builder.dataType = dataType
	builder.dataTypeFlag = true
	return builder
}

// 是否是主键
//
// 示例值：false
func (builder *WorkspaceDataTableColumnInfoBuilder) IsPrimaryKey(isPrimaryKey bool) *WorkspaceDataTableColumnInfoBuilder {
	builder.isPrimaryKey = isPrimaryKey
	builder.isPrimaryKeyFlag = true
	return builder
}

// 是否唯一
//
// 示例值：false
func (builder *WorkspaceDataTableColumnInfoBuilder) IsUnique(isUnique bool) *WorkspaceDataTableColumnInfoBuilder {
	builder.isUnique = isUnique
	builder.isUniqueFlag = true
	return builder
}

// 是否是自增
//
// 示例值：false
func (builder *WorkspaceDataTableColumnInfoBuilder) IsAutoIncrement(isAutoIncrement bool) *WorkspaceDataTableColumnInfoBuilder {
	builder.isAutoIncrement = isAutoIncrement
	builder.isAutoIncrementFlag = true
	return builder
}

// 是否是数组类型
//
// 示例值：false
func (builder *WorkspaceDataTableColumnInfoBuilder) IsArray(isArray bool) *WorkspaceDataTableColumnInfoBuilder {
	builder.isArray = isArray
	builder.isArrayFlag = true
	return builder
}

// 是否允许为空
//
// 示例值：false
func (builder *WorkspaceDataTableColumnInfoBuilder) IsAllowNull(isAllowNull bool) *WorkspaceDataTableColumnInfoBuilder {
	builder.isAllowNull = isAllowNull
	builder.isAllowNullFlag = true
	return builder
}

// 默认值
//
// 示例值：
func (builder *WorkspaceDataTableColumnInfoBuilder) DefaultValue(defaultValue string) *WorkspaceDataTableColumnInfoBuilder {
	builder.defaultValue = defaultValue
	builder.defaultValueFlag = true
	return builder
}

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

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

	}
	if builder.dataTypeFlag {
		req.DataType = &builder.dataType

	}
	if builder.isPrimaryKeyFlag {
		req.IsPrimaryKey = &builder.isPrimaryKey

	}
	if builder.isUniqueFlag {
		req.IsUnique = &builder.isUnique

	}
	if builder.isAutoIncrementFlag {
		req.IsAutoIncrement = &builder.isAutoIncrement

	}
	if builder.isArrayFlag {
		req.IsArray = &builder.isArray

	}
	if builder.isAllowNullFlag {
		req.IsAllowNull = &builder.isAllowNull

	}
	if builder.defaultValueFlag {
		req.DefaultValue = &builder.defaultValue

	}
	return req
}

type WorkspaceEnum struct {
	Name *string `json:"name,omitempty"` // 枚举名称

	Description *string `json:"description,omitempty"` // 枚举描述

	Options []string `json:"options,omitempty"` // 枚举值列表

	CreatedAt *int `json:"created_at,omitempty"` // 创建时间，毫秒时间戳

	CreatedBy *WorkspaceUserInfo `json:"created_by,omitempty"` // 创建人
}

type WorkspaceEnumBuilder struct {
	name     string // 枚举名称
	nameFlag bool

	description     string // 枚举描述
	descriptionFlag bool

	options     []string // 枚举值列表
	optionsFlag bool

	createdAt     int // 创建时间，毫秒时间戳
	createdAtFlag bool

	createdBy     *WorkspaceUserInfo // 创建人
	createdByFlag bool
}

func NewWorkspaceEnumBuilder() *WorkspaceEnumBuilder {
	builder := &WorkspaceEnumBuilder{}
	return builder
}

// 枚举名称
//
// 示例值：enum_demo
func (builder *WorkspaceEnumBuilder) Name(name string) *WorkspaceEnumBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 枚举描述
//
// 示例值：enum_demo的描述
func (builder *WorkspaceEnumBuilder) Description(description string) *WorkspaceEnumBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 枚举值列表
//
// 示例值：
func (builder *WorkspaceEnumBuilder) Options(options []string) *WorkspaceEnumBuilder {
	builder.options = options
	builder.optionsFlag = true
	return builder
}

// 创建时间，毫秒时间戳
//
// 示例值：1765524810744
func (builder *WorkspaceEnumBuilder) CreatedAt(createdAt int) *WorkspaceEnumBuilder {
	builder.createdAt = createdAt
	builder.createdAtFlag = true
	return builder
}

// 创建人
//
// 示例值：
func (builder *WorkspaceEnumBuilder) CreatedBy(createdBy *WorkspaceUserInfo) *WorkspaceEnumBuilder {
	builder.createdBy = createdBy
	builder.createdByFlag = true
	return builder
}

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

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

	}
	if builder.optionsFlag {
		req.Options = builder.options
	}
	if builder.createdAtFlag {
		req.CreatedAt = &builder.createdAt

	}
	if builder.createdByFlag {
		req.CreatedBy = builder.createdBy
	}
	return req
}

type WorkspaceUserInfo struct {
	Id *string `json:"id,omitempty"` // 用户 id，如 1693861178143800

	Name *string `json:"name,omitempty"` // 用户姓名，如王小小

	Avatar *string `json:"avatar,omitempty"` // 用户头像 URL
}

type WorkspaceUserInfoBuilder struct {
	id     string // 用户 id，如 1693861178143800
	idFlag bool

	name     string // 用户姓名，如王小小
	nameFlag bool

	avatar     string // 用户头像 URL
	avatarFlag bool
}

func NewWorkspaceUserInfoBuilder() *WorkspaceUserInfoBuilder {
	builder := &WorkspaceUserInfoBuilder{}
	return builder
}

// 用户 id，如 1693861178143800
//
// 示例值：1693861178143800
func (builder *WorkspaceUserInfoBuilder) Id(id string) *WorkspaceUserInfoBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 用户姓名，如王小小
//
// 示例值：王小小
func (builder *WorkspaceUserInfoBuilder) Name(name string) *WorkspaceUserInfoBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 用户头像 URL
//
// 示例值：https://xxx.image_url.com
func (builder *WorkspaceUserInfoBuilder) Avatar(avatar string) *WorkspaceUserInfoBuilder {
	builder.avatar = avatar
	builder.avatarFlag = true
	return builder
}

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

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

	}
	if builder.avatarFlag {
		req.Avatar = &builder.avatar

	}
	return req
}

type ListAppReqBuilder struct {
	apiReq *larkcore.ApiReq
	limit  int // 最大返回多少记录，当使用迭代器访问时才有效
}

func NewListAppReqBuilder() *ListAppReqBuilder {
	builder := &ListAppReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 最大返回多少记录，当使用迭代器访问时才有效
func (builder *ListAppReqBuilder) Limit(limit int) *ListAppReqBuilder {
	builder.limit = limit
	return builder
}

// 分页大小，必填，范围：【0，500】
//
// 示例值：10
func (builder *ListAppReqBuilder) PageSize(pageSize string) *ListAppReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 分页标记，第一次请求不填，表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该 page_token 获取查询结果
//
// 示例值：eVQrYzJBNDNONlk4VFZBZVlSdzlKdFJ4bVVHVExENDNKVHoxaVdiVnViQT0
func (builder *ListAppReqBuilder) PageToken(pageToken string) *ListAppReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

func (builder *ListAppReqBuilder) Build() *ListAppReq {
	req := &ListAppReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.Limit = builder.limit
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type ListAppReq struct {
	apiReq *larkcore.ApiReq
	Limit  int // 最多返回多少记录，只有在使用迭代器访问时，才有效

}

type ListAppRespData struct {
	Items []*App `json:"items,omitempty"` // 应用基本信息列表

	PageToken *string `json:"page_token,omitempty"` // 分页标记，当 has_more 为 true 时，会同时返回新的 page_token，否则不返回 page_token

	HasMore *bool `json:"has_more,omitempty"` // 是否还有更多项
}

type ListAppResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ListAppRespData `json:"data"` // 业务数据
}

func (resp *ListAppResp) Success() bool {
	return resp.Code == 0
}

type AuditLogListApplicationAuditLogReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewAuditLogListApplicationAuditLogReqBuilder() *AuditLogListApplicationAuditLogReqBuilder {
	builder := &AuditLogListApplicationAuditLogReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 应用命名空间
//
// 示例值：package_aa_bb
func (builder *AuditLogListApplicationAuditLogReqBuilder) Namespace(namespace string) *AuditLogListApplicationAuditLogReqBuilder {
	builder.apiReq.PathParams.Set("namespace", fmt.Sprint(namespace))
	return builder
}

// 分页大小
//
// 示例值：10
func (builder *AuditLogListApplicationAuditLogReqBuilder) PageSize(pageSize string) *AuditLogListApplicationAuditLogReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 翻页数量
//
// 示例值：0
func (builder *AuditLogListApplicationAuditLogReqBuilder) Offset(offset string) *AuditLogListApplicationAuditLogReqBuilder {
	builder.apiReq.QueryParams.Set("offset", fmt.Sprint(offset))
	return builder
}

// 模糊查询
//
// 示例值：Intel Mac OS
func (builder *AuditLogListApplicationAuditLogReqBuilder) QuickQuery(quickQuery string) *AuditLogListApplicationAuditLogReqBuilder {
	builder.apiReq.QueryParams.Set("quick_query", fmt.Sprint(quickQuery))
	return builder
}

// 查询时间范围：开始时间
//
// 示例值：1723691857002
func (builder *AuditLogListApplicationAuditLogReqBuilder) From(from string) *AuditLogListApplicationAuditLogReqBuilder {
	builder.apiReq.QueryParams.Set("from", fmt.Sprint(from))
	return builder
}

// 查询时间范围：结束时间
//
// 示例值：1724296657002
func (builder *AuditLogListApplicationAuditLogReqBuilder) To(to string) *AuditLogListApplicationAuditLogReqBuilder {
	builder.apiReq.QueryParams.Set("to", fmt.Sprint(to))
	return builder
}

// 日志类型：10001-企业管理日志，10003-应用管理日志，10002-登录日志
//
// 示例值：10000
func (builder *AuditLogListApplicationAuditLogReqBuilder) LogType(logType string) *AuditLogListApplicationAuditLogReqBuilder {
	builder.apiReq.QueryParams.Set("log_type", fmt.Sprint(logType))
	return builder
}

// 日志查询：筛选能力
//
// 示例值：{"items":[{"left":"eventName","operator":"=","right":[19001]}]}
func (builder *AuditLogListApplicationAuditLogReqBuilder) Filter(filter string) *AuditLogListApplicationAuditLogReqBuilder {
	builder.apiReq.QueryParams.Set("filter", fmt.Sprint(filter))
	return builder
}

// 日志列表：选择展示行信息，例如["opTime","appName","eventName","clientIP","operator","status"]
//
// 示例值：
func (builder *AuditLogListApplicationAuditLogReqBuilder) Columns(columns []string) *AuditLogListApplicationAuditLogReqBuilder {
	for _, v := range columns {
		builder.apiReq.QueryParams.Add("columns", fmt.Sprint(v))
	}
	return builder
}

// 查询排序字段：可选项为操作时间（opTime）
//
// 示例值：opTime
func (builder *AuditLogListApplicationAuditLogReqBuilder) SortBy(sortBy string) *AuditLogListApplicationAuditLogReqBuilder {
	builder.apiReq.QueryParams.Set("sort_by", fmt.Sprint(sortBy))
	return builder
}

// 查询排序：按时间从小到大使用 asc
//
// 示例值：asc
func (builder *AuditLogListApplicationAuditLogReqBuilder) SortOrder(sortOrder string) *AuditLogListApplicationAuditLogReqBuilder {
	builder.apiReq.QueryParams.Set("sort_order", fmt.Sprint(sortOrder))
	return builder
}

// 应用类型，0为apaas类型，1为aily类型
//
// 示例值：0
func (builder *AuditLogListApplicationAuditLogReqBuilder) AppType(appType string) *AuditLogListApplicationAuditLogReqBuilder {
	builder.apiReq.QueryParams.Set("app_type", fmt.Sprint(appType))
	return builder
}

func (builder *AuditLogListApplicationAuditLogReqBuilder) Build() *AuditLogListApplicationAuditLogReq {
	req := &AuditLogListApplicationAuditLogReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type AuditLogListApplicationAuditLogReq struct {
	apiReq *larkcore.ApiReq
}

type AuditLogListApplicationAuditLogRespData struct {
	Items []*AuditLogEsField `json:"items,omitempty"` // 审计日志查询结果列表详情信息

	Total *string `json:"total,omitempty"` // 审计日志查询总条数
}

type AuditLogListApplicationAuditLogResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *AuditLogListApplicationAuditLogRespData `json:"data"` // 业务数据
}

func (resp *AuditLogListApplicationAuditLogResp) Success() bool {
	return resp.Code == 0
}

type DataChangeLogDetailApplicationAuditLogReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewDataChangeLogDetailApplicationAuditLogReqBuilder() *DataChangeLogDetailApplicationAuditLogReqBuilder {
	builder := &DataChangeLogDetailApplicationAuditLogReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 应用
//
// 示例值：package_aaa
func (builder *DataChangeLogDetailApplicationAuditLogReqBuilder) Namespace(namespace string) *DataChangeLogDetailApplicationAuditLogReqBuilder {
	builder.apiReq.PathParams.Set("namespace", fmt.Sprint(namespace))
	return builder
}

// 数据变更日志ID信息
//
// 示例值：7405456257290600492
func (builder *DataChangeLogDetailApplicationAuditLogReqBuilder) LogId(logId string) *DataChangeLogDetailApplicationAuditLogReqBuilder {
	builder.apiReq.QueryParams.Set("log_id", fmt.Sprint(logId))
	return builder
}

func (builder *DataChangeLogDetailApplicationAuditLogReqBuilder) Build() *DataChangeLogDetailApplicationAuditLogReq {
	req := &DataChangeLogDetailApplicationAuditLogReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type DataChangeLogDetailApplicationAuditLogReq struct {
	apiReq *larkcore.ApiReq
}

type DataChangeLogDetailApplicationAuditLogRespData struct {
	Data *AuditLogDetail `json:"data,omitempty"` // 数据变更日志详情信息
}

type DataChangeLogDetailApplicationAuditLogResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *DataChangeLogDetailApplicationAuditLogRespData `json:"data"` // 业务数据
}

func (resp *DataChangeLogDetailApplicationAuditLogResp) Success() bool {
	return resp.Code == 0
}

type DataChangeLogsListApplicationAuditLogReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewDataChangeLogsListApplicationAuditLogReqBuilder() *DataChangeLogsListApplicationAuditLogReqBuilder {
	builder := &DataChangeLogsListApplicationAuditLogReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 应用命名空间
//
// 示例值：package_aa_bb
func (builder *DataChangeLogsListApplicationAuditLogReqBuilder) Namespace(namespace string) *DataChangeLogsListApplicationAuditLogReqBuilder {
	builder.apiReq.PathParams.Set("namespace", fmt.Sprint(namespace))
	return builder
}

// 模糊查询
//
// 示例值：Intel Mac OS
func (builder *DataChangeLogsListApplicationAuditLogReqBuilder) QuickQuery(quickQuery string) *DataChangeLogsListApplicationAuditLogReqBuilder {
	builder.apiReq.QueryParams.Set("quick_query", fmt.Sprint(quickQuery))
	return builder
}

// 分页大小
//
// 示例值：0
func (builder *DataChangeLogsListApplicationAuditLogReqBuilder) PageSize(pageSize string) *DataChangeLogsListApplicationAuditLogReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 翻页数量
//
// 示例值：0
func (builder *DataChangeLogsListApplicationAuditLogReqBuilder) Offset(offset string) *DataChangeLogsListApplicationAuditLogReqBuilder {
	builder.apiReq.QueryParams.Set("offset", fmt.Sprint(offset))
	return builder
}

// 查询时间范围：开始时间
//
// 示例值：1723691857002
func (builder *DataChangeLogsListApplicationAuditLogReqBuilder) From(from string) *DataChangeLogsListApplicationAuditLogReqBuilder {
	builder.apiReq.QueryParams.Set("from", fmt.Sprint(from))
	return builder
}

// 查询时间范围：结束时间
//
// 示例值：1724296657002
func (builder *DataChangeLogsListApplicationAuditLogReqBuilder) To(to string) *DataChangeLogsListApplicationAuditLogReqBuilder {
	builder.apiReq.QueryParams.Set("to", fmt.Sprint(to))
	return builder
}

// 日志类型：10007-数据变更日志
//
// 示例值：10007
func (builder *DataChangeLogsListApplicationAuditLogReqBuilder) LogType(logType string) *DataChangeLogsListApplicationAuditLogReqBuilder {
	builder.apiReq.QueryParams.Set("log_type", fmt.Sprint(logType))
	return builder
}

// 日志查询：筛选能力
//
// 示例值：{"items":[{"left":"eventName","operator":"=","right":[19001]}]}
func (builder *DataChangeLogsListApplicationAuditLogReqBuilder) Filter(filter string) *DataChangeLogsListApplicationAuditLogReqBuilder {
	builder.apiReq.QueryParams.Set("filter", fmt.Sprint(filter))
	return builder
}

// 日志列表：选择展示行信息，例如["opTime","appName","eventName","clientIP","operator","status"]
//
// 示例值：
func (builder *DataChangeLogsListApplicationAuditLogReqBuilder) Columns(columns []string) *DataChangeLogsListApplicationAuditLogReqBuilder {
	for _, v := range columns {
		builder.apiReq.QueryParams.Add("columns", fmt.Sprint(v))
	}
	return builder
}

// 查询排序字段：可选项为操作时间（opTime）
//
// 示例值：opTime
func (builder *DataChangeLogsListApplicationAuditLogReqBuilder) SortBy(sortBy string) *DataChangeLogsListApplicationAuditLogReqBuilder {
	builder.apiReq.QueryParams.Set("sort_by", fmt.Sprint(sortBy))
	return builder
}

// 查询排序：按时间从小到大使用 asc
//
// 示例值：asc
func (builder *DataChangeLogsListApplicationAuditLogReqBuilder) SortOrder(sortOrder string) *DataChangeLogsListApplicationAuditLogReqBuilder {
	builder.apiReq.QueryParams.Set("sort_order", fmt.Sprint(sortOrder))
	return builder
}

// 应用类型，0为apaas类型，1为aily类型
//
// 示例值：0
func (builder *DataChangeLogsListApplicationAuditLogReqBuilder) AppType(appType string) *DataChangeLogsListApplicationAuditLogReqBuilder {
	builder.apiReq.QueryParams.Set("app_type", fmt.Sprint(appType))
	return builder
}

func (builder *DataChangeLogsListApplicationAuditLogReqBuilder) Build() *DataChangeLogsListApplicationAuditLogReq {
	req := &DataChangeLogsListApplicationAuditLogReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type DataChangeLogsListApplicationAuditLogReq struct {
	apiReq *larkcore.ApiReq
}

type DataChangeLogsListApplicationAuditLogRespData struct {
	Items []*AuditLogEsField `json:"items,omitempty"` // 数据变更日志查询结果列表详情信息

	Total *string `json:"total,omitempty"` // 数据变更日志查询总条数
}

type DataChangeLogsListApplicationAuditLogResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *DataChangeLogsListApplicationAuditLogRespData `json:"data"` // 业务数据
}

func (resp *DataChangeLogsListApplicationAuditLogResp) Success() bool {
	return resp.Code == 0
}

type GetApplicationAuditLogReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewGetApplicationAuditLogReqBuilder() *GetApplicationAuditLogReqBuilder {
	builder := &GetApplicationAuditLogReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 应用
//
// 示例值：package_aaa
func (builder *GetApplicationAuditLogReqBuilder) Namespace(namespace string) *GetApplicationAuditLogReqBuilder {
	builder.apiReq.PathParams.Set("namespace", fmt.Sprint(namespace))
	return builder
}

// 审计日志ID信息
//
// 示例值：7405456257290600492
func (builder *GetApplicationAuditLogReqBuilder) LogId(logId string) *GetApplicationAuditLogReqBuilder {
	builder.apiReq.QueryParams.Set("log_id", fmt.Sprint(logId))
	return builder
}

func (builder *GetApplicationAuditLogReqBuilder) Build() *GetApplicationAuditLogReq {
	req := &GetApplicationAuditLogReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type GetApplicationAuditLogReq struct {
	apiReq *larkcore.ApiReq
}

type GetApplicationAuditLogRespData struct {
	Data *AuditLogDetail `json:"data,omitempty"` // 审计日志详情信息
}

type GetApplicationAuditLogResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *GetApplicationAuditLogRespData `json:"data"` // 业务数据
}

func (resp *GetApplicationAuditLogResp) Success() bool {
	return resp.Code == 0
}

type GetApplicationEnvironmentVariableReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewGetApplicationEnvironmentVariableReqBuilder() *GetApplicationEnvironmentVariableReqBuilder {
	builder := &GetApplicationEnvironmentVariableReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 应用命名空间
//
// 示例值：package_test__c
func (builder *GetApplicationEnvironmentVariableReqBuilder) Namespace(namespace string) *GetApplicationEnvironmentVariableReqBuilder {
	builder.apiReq.PathParams.Set("namespace", fmt.Sprint(namespace))
	return builder
}

// 环境变量 API 名称
//
// 示例值：globalParam_0b410b17704
func (builder *GetApplicationEnvironmentVariableReqBuilder) EnvironmentVariableApiName(environmentVariableApiName string) *GetApplicationEnvironmentVariableReqBuilder {
	builder.apiReq.PathParams.Set("environment_variable_api_name", fmt.Sprint(environmentVariableApiName))
	return builder
}

func (builder *GetApplicationEnvironmentVariableReqBuilder) Build() *GetApplicationEnvironmentVariableReq {
	req := &GetApplicationEnvironmentVariableReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	return req
}

type GetApplicationEnvironmentVariableReq struct {
	apiReq *larkcore.ApiReq
}

type GetApplicationEnvironmentVariableRespData struct {
	Item *EnvironmentVariable `json:"item,omitempty"` // 环境变量详情
}

type GetApplicationEnvironmentVariableResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *GetApplicationEnvironmentVariableRespData `json:"data"` // 业务数据
}

func (resp *GetApplicationEnvironmentVariableResp) Success() bool {
	return resp.Code == 0
}

type QueryApplicationEnvironmentVariableReqBodyBuilder struct {
	filter     *EnvironmentVariableFilter // 过滤条件
	filterFlag bool

	limit     int // 限制的条数，默认为 500，不可超过 500
	limitFlag bool

	offset     int // 返回记录的偏移量，默认为 0，即从查询到的第一个记录开始返回
	offsetFlag bool
}

func NewQueryApplicationEnvironmentVariableReqBodyBuilder() *QueryApplicationEnvironmentVariableReqBodyBuilder {
	builder := &QueryApplicationEnvironmentVariableReqBodyBuilder{}
	return builder
}

// 过滤条件
//
//示例值：
func (builder *QueryApplicationEnvironmentVariableReqBodyBuilder) Filter(filter *EnvironmentVariableFilter) *QueryApplicationEnvironmentVariableReqBodyBuilder {
	builder.filter = filter
	builder.filterFlag = true
	return builder
}

// 限制的条数，默认为 500，不可超过 500
//
//示例值：10
func (builder *QueryApplicationEnvironmentVariableReqBodyBuilder) Limit(limit int) *QueryApplicationEnvironmentVariableReqBodyBuilder {
	builder.limit = limit
	builder.limitFlag = true
	return builder
}

// 返回记录的偏移量，默认为 0，即从查询到的第一个记录开始返回
//
//示例值：0
func (builder *QueryApplicationEnvironmentVariableReqBodyBuilder) Offset(offset int) *QueryApplicationEnvironmentVariableReqBodyBuilder {
	builder.offset = offset
	builder.offsetFlag = true
	return builder
}

func (builder *QueryApplicationEnvironmentVariableReqBodyBuilder) Build() *QueryApplicationEnvironmentVariableReqBody {
	req := &QueryApplicationEnvironmentVariableReqBody{}
	if builder.filterFlag {
		req.Filter = builder.filter
	}
	if builder.limitFlag {
		req.Limit = &builder.limit
	}
	if builder.offsetFlag {
		req.Offset = &builder.offset
	}
	return req
}

type QueryApplicationEnvironmentVariablePathReqBodyBuilder struct {
	filter     *EnvironmentVariableFilter
	filterFlag bool
	limit      int
	limitFlag  bool
	offset     int
	offsetFlag bool
}

func NewQueryApplicationEnvironmentVariablePathReqBodyBuilder() *QueryApplicationEnvironmentVariablePathReqBodyBuilder {
	builder := &QueryApplicationEnvironmentVariablePathReqBodyBuilder{}
	return builder
}

// 过滤条件
//
// 示例值：
func (builder *QueryApplicationEnvironmentVariablePathReqBodyBuilder) Filter(filter *EnvironmentVariableFilter) *QueryApplicationEnvironmentVariablePathReqBodyBuilder {
	builder.filter = filter
	builder.filterFlag = true
	return builder
}

// 限制的条数，默认为 500，不可超过 500
//
// 示例值：10
func (builder *QueryApplicationEnvironmentVariablePathReqBodyBuilder) Limit(limit int) *QueryApplicationEnvironmentVariablePathReqBodyBuilder {
	builder.limit = limit
	builder.limitFlag = true
	return builder
}

// 返回记录的偏移量，默认为 0，即从查询到的第一个记录开始返回
//
// 示例值：0
func (builder *QueryApplicationEnvironmentVariablePathReqBodyBuilder) Offset(offset int) *QueryApplicationEnvironmentVariablePathReqBodyBuilder {
	builder.offset = offset
	builder.offsetFlag = true
	return builder
}

func (builder *QueryApplicationEnvironmentVariablePathReqBodyBuilder) Build() (*QueryApplicationEnvironmentVariableReqBody, error) {
	req := &QueryApplicationEnvironmentVariableReqBody{}
	if builder.filterFlag {
		req.Filter = builder.filter
	}
	if builder.limitFlag {
		req.Limit = &builder.limit
	}
	if builder.offsetFlag {
		req.Offset = &builder.offset
	}
	return req, nil
}

type QueryApplicationEnvironmentVariableReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *QueryApplicationEnvironmentVariableReqBody
}

func NewQueryApplicationEnvironmentVariableReqBuilder() *QueryApplicationEnvironmentVariableReqBuilder {
	builder := &QueryApplicationEnvironmentVariableReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 应用命名空间
//
// 示例值：1
func (builder *QueryApplicationEnvironmentVariableReqBuilder) Namespace(namespace string) *QueryApplicationEnvironmentVariableReqBuilder {
	builder.apiReq.PathParams.Set("namespace", fmt.Sprint(namespace))
	return builder
}

// 查询环境变量列表
func (builder *QueryApplicationEnvironmentVariableReqBuilder) Body(body *QueryApplicationEnvironmentVariableReqBody) *QueryApplicationEnvironmentVariableReqBuilder {
	builder.body = body
	return builder
}

func (builder *QueryApplicationEnvironmentVariableReqBuilder) Build() *QueryApplicationEnvironmentVariableReq {
	req := &QueryApplicationEnvironmentVariableReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type QueryApplicationEnvironmentVariableReqBody struct {
	Filter *EnvironmentVariableFilter `json:"filter,omitempty"` // 过滤条件

	Limit *int `json:"limit,omitempty"` // 限制的条数，默认为 500，不可超过 500

	Offset *int `json:"offset,omitempty"` // 返回记录的偏移量，默认为 0，即从查询到的第一个记录开始返回
}

type QueryApplicationEnvironmentVariableReq struct {
	apiReq *larkcore.ApiReq
	Body   *QueryApplicationEnvironmentVariableReqBody `body:""`
}

type QueryApplicationEnvironmentVariableRespData struct {
	Items []*EnvironmentVariable `json:"items,omitempty"` // 环境变量列表

	Total *int `json:"total,omitempty"` // 符合查询条件的环境变量的总数
}

type QueryApplicationEnvironmentVariableResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *QueryApplicationEnvironmentVariableRespData `json:"data"` // 业务数据
}

func (resp *QueryApplicationEnvironmentVariableResp) Success() bool {
	return resp.Code == 0
}

type ExecuteApplicationFlowReqBodyBuilder struct {
	isAsync     bool // 是否异步执行
	isAsyncFlag bool

	idempotentKey     string // 幂等信息
	idempotentKeyFlag bool

	loopMasks     []string // 循环信息
	loopMasksFlag bool

	params     string // 流程入参
	paramsFlag bool

	operator     string // 操作人
	operatorFlag bool
}

func NewExecuteApplicationFlowReqBodyBuilder() *ExecuteApplicationFlowReqBodyBuilder {
	builder := &ExecuteApplicationFlowReqBodyBuilder{}
	return builder
}

// 是否异步执行
//
//示例值：true
func (builder *ExecuteApplicationFlowReqBodyBuilder) IsAsync(isAsync bool) *ExecuteApplicationFlowReqBodyBuilder {
	builder.isAsync = isAsync
	builder.isAsyncFlag = true
	return builder
}

// 幂等信息
//
//示例值：123
func (builder *ExecuteApplicationFlowReqBodyBuilder) IdempotentKey(idempotentKey string) *ExecuteApplicationFlowReqBodyBuilder {
	builder.idempotentKey = idempotentKey
	builder.idempotentKeyFlag = true
	return builder
}

// 循环信息
//
//示例值：
func (builder *ExecuteApplicationFlowReqBodyBuilder) LoopMasks(loopMasks []string) *ExecuteApplicationFlowReqBodyBuilder {
	builder.loopMasks = loopMasks
	builder.loopMasksFlag = true
	return builder
}

// 流程入参
//
//示例值：123
func (builder *ExecuteApplicationFlowReqBodyBuilder) Params(params string) *ExecuteApplicationFlowReqBodyBuilder {
	builder.params = params
	builder.paramsFlag = true
	return builder
}

// 操作人
//
//示例值：123
func (builder *ExecuteApplicationFlowReqBodyBuilder) Operator(operator string) *ExecuteApplicationFlowReqBodyBuilder {
	builder.operator = operator
	builder.operatorFlag = true
	return builder
}

func (builder *ExecuteApplicationFlowReqBodyBuilder) Build() *ExecuteApplicationFlowReqBody {
	req := &ExecuteApplicationFlowReqBody{}
	if builder.isAsyncFlag {
		req.IsAsync = &builder.isAsync
	}
	if builder.idempotentKeyFlag {
		req.IdempotentKey = &builder.idempotentKey
	}
	if builder.loopMasksFlag {
		req.LoopMasks = builder.loopMasks
	}
	if builder.paramsFlag {
		req.Params = &builder.params
	}
	if builder.operatorFlag {
		req.Operator = &builder.operator
	}
	return req
}

type ExecuteApplicationFlowPathReqBodyBuilder struct {
	isAsync           bool
	isAsyncFlag       bool
	idempotentKey     string
	idempotentKeyFlag bool
	loopMasks         []string
	loopMasksFlag     bool
	params            string
	paramsFlag        bool
	operator          string
	operatorFlag      bool
}

func NewExecuteApplicationFlowPathReqBodyBuilder() *ExecuteApplicationFlowPathReqBodyBuilder {
	builder := &ExecuteApplicationFlowPathReqBodyBuilder{}
	return builder
}

// 是否异步执行
//
// 示例值：true
func (builder *ExecuteApplicationFlowPathReqBodyBuilder) IsAsync(isAsync bool) *ExecuteApplicationFlowPathReqBodyBuilder {
	builder.isAsync = isAsync
	builder.isAsyncFlag = true
	return builder
}

// 幂等信息
//
// 示例值：123
func (builder *ExecuteApplicationFlowPathReqBodyBuilder) IdempotentKey(idempotentKey string) *ExecuteApplicationFlowPathReqBodyBuilder {
	builder.idempotentKey = idempotentKey
	builder.idempotentKeyFlag = true
	return builder
}

// 循环信息
//
// 示例值：
func (builder *ExecuteApplicationFlowPathReqBodyBuilder) LoopMasks(loopMasks []string) *ExecuteApplicationFlowPathReqBodyBuilder {
	builder.loopMasks = loopMasks
	builder.loopMasksFlag = true
	return builder
}

// 流程入参
//
// 示例值：123
func (builder *ExecuteApplicationFlowPathReqBodyBuilder) Params(params string) *ExecuteApplicationFlowPathReqBodyBuilder {
	builder.params = params
	builder.paramsFlag = true
	return builder
}

// 操作人
//
// 示例值：123
func (builder *ExecuteApplicationFlowPathReqBodyBuilder) Operator(operator string) *ExecuteApplicationFlowPathReqBodyBuilder {
	builder.operator = operator
	builder.operatorFlag = true
	return builder
}

func (builder *ExecuteApplicationFlowPathReqBodyBuilder) Build() (*ExecuteApplicationFlowReqBody, error) {
	req := &ExecuteApplicationFlowReqBody{}
	if builder.isAsyncFlag {
		req.IsAsync = &builder.isAsync
	}
	if builder.idempotentKeyFlag {
		req.IdempotentKey = &builder.idempotentKey
	}
	if builder.loopMasksFlag {
		req.LoopMasks = builder.loopMasks
	}
	if builder.paramsFlag {
		req.Params = &builder.params
	}
	if builder.operatorFlag {
		req.Operator = &builder.operator
	}
	return req, nil
}

type ExecuteApplicationFlowReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *ExecuteApplicationFlowReqBody
}

func NewExecuteApplicationFlowReqBuilder() *ExecuteApplicationFlowReqBuilder {
	builder := &ExecuteApplicationFlowReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 应用id
//
// 示例值：123
func (builder *ExecuteApplicationFlowReqBuilder) Namespace(namespace string) *ExecuteApplicationFlowReqBuilder {
	builder.apiReq.PathParams.Set("namespace", fmt.Sprint(namespace))
	return builder
}

// 流程api name
//
// 示例值：deleteObject_99c0b74799f
func (builder *ExecuteApplicationFlowReqBuilder) FlowId(flowId string) *ExecuteApplicationFlowReqBuilder {
	builder.apiReq.PathParams.Set("flow_id", fmt.Sprint(flowId))
	return builder
}

// 流程执行接口
func (builder *ExecuteApplicationFlowReqBuilder) Body(body *ExecuteApplicationFlowReqBody) *ExecuteApplicationFlowReqBuilder {
	builder.body = body
	return builder
}

func (builder *ExecuteApplicationFlowReqBuilder) Build() *ExecuteApplicationFlowReq {
	req := &ExecuteApplicationFlowReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type ExecuteApplicationFlowReqBody struct {
	IsAsync *bool `json:"is_async,omitempty"` // 是否异步执行

	IdempotentKey *string `json:"idempotent_key,omitempty"` // 幂等信息

	LoopMasks []string `json:"loop_masks,omitempty"` // 循环信息

	Params *string `json:"params,omitempty"` // 流程入参

	Operator *string `json:"operator,omitempty"` // 操作人
}

type ExecuteApplicationFlowReq struct {
	apiReq *larkcore.ApiReq
	Body   *ExecuteApplicationFlowReqBody `body:""`
}

type ExecuteApplicationFlowRespData struct {
	Status *string `json:"status,omitempty"` // 状态

	OutParams *string `json:"out_params,omitempty"` // 输出参数

	ExecutionId *string `json:"execution_id,omitempty"` // 执行id

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

	Code *string `json:"code,omitempty"` // code
}

type ExecuteApplicationFlowResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ExecuteApplicationFlowRespData `json:"data"` // 业务数据
}

func (resp *ExecuteApplicationFlowResp) Success() bool {
	return resp.Code == 0
}

type InvokeApplicationFunctionReqBodyBuilder struct {
	params     string // 函数输入参数（JSON 序列化后的字符串）
	paramsFlag bool
}

func NewInvokeApplicationFunctionReqBodyBuilder() *InvokeApplicationFunctionReqBodyBuilder {
	builder := &InvokeApplicationFunctionReqBodyBuilder{}
	return builder
}

// 函数输入参数（JSON 序列化后的字符串）
//
//示例值：{\"key1\":\"value1\",\"key2\":\"value2\",\"key3\":1718313981794}
func (builder *InvokeApplicationFunctionReqBodyBuilder) Params(params string) *InvokeApplicationFunctionReqBodyBuilder {
	builder.params = params
	builder.paramsFlag = true
	return builder
}

func (builder *InvokeApplicationFunctionReqBodyBuilder) Build() *InvokeApplicationFunctionReqBody {
	req := &InvokeApplicationFunctionReqBody{}
	if builder.paramsFlag {
		req.Params = &builder.params
	}
	return req
}

type InvokeApplicationFunctionPathReqBodyBuilder struct {
	params     string
	paramsFlag bool
}

func NewInvokeApplicationFunctionPathReqBodyBuilder() *InvokeApplicationFunctionPathReqBodyBuilder {
	builder := &InvokeApplicationFunctionPathReqBodyBuilder{}
	return builder
}

// 函数输入参数（JSON 序列化后的字符串）
//
// 示例值：{\"key1\":\"value1\",\"key2\":\"value2\",\"key3\":1718313981794}
func (builder *InvokeApplicationFunctionPathReqBodyBuilder) Params(params string) *InvokeApplicationFunctionPathReqBodyBuilder {
	builder.params = params
	builder.paramsFlag = true
	return builder
}

func (builder *InvokeApplicationFunctionPathReqBodyBuilder) Build() (*InvokeApplicationFunctionReqBody, error) {
	req := &InvokeApplicationFunctionReqBody{}
	if builder.paramsFlag {
		req.Params = &builder.params
	}
	return req, nil
}

type InvokeApplicationFunctionReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *InvokeApplicationFunctionReqBody
}

func NewInvokeApplicationFunctionReqBuilder() *InvokeApplicationFunctionReqBuilder {
	builder := &InvokeApplicationFunctionReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 应用命名空间
//
// 示例值：package_test__c
func (builder *InvokeApplicationFunctionReqBuilder) Namespace(namespace string) *InvokeApplicationFunctionReqBuilder {
	builder.apiReq.PathParams.Set("namespace", fmt.Sprint(namespace))
	return builder
}

// 函数 API 名称
//
// 示例值：printParam
func (builder *InvokeApplicationFunctionReqBuilder) FunctionApiName(functionApiName string) *InvokeApplicationFunctionReqBuilder {
	builder.apiReq.PathParams.Set("function_api_name", fmt.Sprint(functionApiName))
	return builder
}

// 执行函数
func (builder *InvokeApplicationFunctionReqBuilder) Body(body *InvokeApplicationFunctionReqBody) *InvokeApplicationFunctionReqBuilder {
	builder.body = body
	return builder
}

func (builder *InvokeApplicationFunctionReqBuilder) Build() *InvokeApplicationFunctionReq {
	req := &InvokeApplicationFunctionReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type InvokeApplicationFunctionReqBody struct {
	Params *string `json:"params,omitempty"` // 函数输入参数（JSON 序列化后的字符串）
}

type InvokeApplicationFunctionReq struct {
	apiReq *larkcore.ApiReq
	Body   *InvokeApplicationFunctionReqBody `body:""`
}

type InvokeApplicationFunctionRespData struct {
	Result *string `json:"result,omitempty"` // 函数执行的返回结果（JSON 序列化后的字符串）
}

type InvokeApplicationFunctionResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *InvokeApplicationFunctionRespData `json:"data"` // 业务数据
}

func (resp *InvokeApplicationFunctionResp) Success() bool {
	return resp.Code == 0
}

type OqlQueryApplicationObjectReqBodyBuilder struct {
	query     string // 待执行的 OQL 语句（关于支持的关键词及操作符，详见查看）
	queryFlag bool

	args     string // 用于指定 OQL 语句中匿名参数的具体值
	argsFlag bool

	namedArgs     string // 用于指定 OQL 语句中具名参数的具体值
	namedArgsFlag bool
}

func NewOqlQueryApplicationObjectReqBodyBuilder() *OqlQueryApplicationObjectReqBodyBuilder {
	builder := &OqlQueryApplicationObjectReqBodyBuilder{}
	return builder
}

// 待执行的 OQL 语句（关于支持的关键词及操作符，详见查看）
//
//示例值：SELECT _id, _name FROM _user WHERE _type = $1 AND _accountStatus = $user_status LIMIT 10
func (builder *OqlQueryApplicationObjectReqBodyBuilder) Query(query string) *OqlQueryApplicationObjectReqBodyBuilder {
	builder.query = query
	builder.queryFlag = true
	return builder
}

// 用于指定 OQL 语句中匿名参数的具体值
//
//示例值：[\"_employee\"]
func (builder *OqlQueryApplicationObjectReqBodyBuilder) Args(args string) *OqlQueryApplicationObjectReqBodyBuilder {
	builder.args = args
	builder.argsFlag = true
	return builder
}

// 用于指定 OQL 语句中具名参数的具体值
//
//示例值：{\"user_status\" : \"_used\"}
func (builder *OqlQueryApplicationObjectReqBodyBuilder) NamedArgs(namedArgs string) *OqlQueryApplicationObjectReqBodyBuilder {
	builder.namedArgs = namedArgs
	builder.namedArgsFlag = true
	return builder
}

func (builder *OqlQueryApplicationObjectReqBodyBuilder) Build() *OqlQueryApplicationObjectReqBody {
	req := &OqlQueryApplicationObjectReqBody{}
	if builder.queryFlag {
		req.Query = &builder.query
	}
	if builder.argsFlag {
		req.Args = &builder.args
	}
	if builder.namedArgsFlag {
		req.NamedArgs = &builder.namedArgs
	}
	return req
}

type OqlQueryApplicationObjectPathReqBodyBuilder struct {
	query         string
	queryFlag     bool
	args          string
	argsFlag      bool
	namedArgs     string
	namedArgsFlag bool
}

func NewOqlQueryApplicationObjectPathReqBodyBuilder() *OqlQueryApplicationObjectPathReqBodyBuilder {
	builder := &OqlQueryApplicationObjectPathReqBodyBuilder{}
	return builder
}

// 待执行的 OQL 语句（关于支持的关键词及操作符，详见查看）
//
// 示例值：SELECT _id, _name FROM _user WHERE _type = $1 AND _accountStatus = $user_status LIMIT 10
func (builder *OqlQueryApplicationObjectPathReqBodyBuilder) Query(query string) *OqlQueryApplicationObjectPathReqBodyBuilder {
	builder.query = query
	builder.queryFlag = true
	return builder
}

// 用于指定 OQL 语句中匿名参数的具体值
//
// 示例值：[\"_employee\"]
func (builder *OqlQueryApplicationObjectPathReqBodyBuilder) Args(args string) *OqlQueryApplicationObjectPathReqBodyBuilder {
	builder.args = args
	builder.argsFlag = true
	return builder
}

// 用于指定 OQL 语句中具名参数的具体值
//
// 示例值：{\"user_status\" : \"_used\"}
func (builder *OqlQueryApplicationObjectPathReqBodyBuilder) NamedArgs(namedArgs string) *OqlQueryApplicationObjectPathReqBodyBuilder {
	builder.namedArgs = namedArgs
	builder.namedArgsFlag = true
	return builder
}

func (builder *OqlQueryApplicationObjectPathReqBodyBuilder) Build() (*OqlQueryApplicationObjectReqBody, error) {
	req := &OqlQueryApplicationObjectReqBody{}
	if builder.queryFlag {
		req.Query = &builder.query
	}
	if builder.argsFlag {
		req.Args = &builder.args
	}
	if builder.namedArgsFlag {
		req.NamedArgs = &builder.namedArgs
	}
	return req, nil
}

type OqlQueryApplicationObjectReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *OqlQueryApplicationObjectReqBody
}

func NewOqlQueryApplicationObjectReqBuilder() *OqlQueryApplicationObjectReqBuilder {
	builder := &OqlQueryApplicationObjectReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 应用命名空间
//
// 示例值：package_test__c
func (builder *OqlQueryApplicationObjectReqBuilder) Namespace(namespace string) *OqlQueryApplicationObjectReqBuilder {
	builder.apiReq.PathParams.Set("namespace", fmt.Sprint(namespace))
	return builder
}

// 执行 OQL
func (builder *OqlQueryApplicationObjectReqBuilder) Body(body *OqlQueryApplicationObjectReqBody) *OqlQueryApplicationObjectReqBuilder {
	builder.body = body
	return builder
}

func (builder *OqlQueryApplicationObjectReqBuilder) Build() *OqlQueryApplicationObjectReq {
	req := &OqlQueryApplicationObjectReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type OqlQueryApplicationObjectReqBody struct {
	Query *string `json:"query,omitempty"` // 待执行的 OQL 语句（关于支持的关键词及操作符，详见查看）

	Args *string `json:"args,omitempty"` // 用于指定 OQL 语句中匿名参数的具体值

	NamedArgs *string `json:"named_args,omitempty"` // 用于指定 OQL 语句中具名参数的具体值
}

type OqlQueryApplicationObjectReq struct {
	apiReq *larkcore.ApiReq
	Body   *OqlQueryApplicationObjectReqBody `body:""`
}

type OqlQueryApplicationObjectRespData struct {
	Columns []string `json:"columns,omitempty"` // 每一列的标题

	Rows *string `json:"rows,omitempty"` // 每一行的值，以「key-value」的形式返回
}

type OqlQueryApplicationObjectResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *OqlQueryApplicationObjectRespData `json:"data"` // 业务数据
}

func (resp *OqlQueryApplicationObjectResp) Success() bool {
	return resp.Code == 0
}

type SearchApplicationObjectReqBodyBuilder struct {
	q     string // 搜索词
	qFlag bool

	searchObjects     []*SearchObjectParam // 搜索对象范围
	searchObjectsFlag bool

	pageToken     string // 分页参数，第一次搜索时为空，需要分页查询时使用 SearchRecordsResponse 中的结果
	pageTokenFlag bool

	pageSize     string // 返回数量，默认为50，最大不超过2000
	pageSizeFlag bool

	metadata     string // 返回元数据枚举值
	metadataFlag bool
}

func NewSearchApplicationObjectReqBodyBuilder() *SearchApplicationObjectReqBodyBuilder {
	builder := &SearchApplicationObjectReqBodyBuilder{}
	return builder
}

// 搜索词
//
//示例值：搜索关键字
func (builder *SearchApplicationObjectReqBodyBuilder) Q(q string) *SearchApplicationObjectReqBodyBuilder {
	builder.q = q
	builder.qFlag = true
	return builder
}

// 搜索对象范围
//
//示例值：
func (builder *SearchApplicationObjectReqBodyBuilder) SearchObjects(searchObjects []*SearchObjectParam) *SearchApplicationObjectReqBodyBuilder {
	builder.searchObjects = searchObjects
	builder.searchObjectsFlag = true
	return builder
}

// 分页参数，第一次搜索时为空，需要分页查询时使用 SearchRecordsResponse 中的结果
//
//示例值：eyJvYmplY3RzX3BhZ2VfdG9rZW4iOlt7Im9ial9pZCI6MTc2OTI4NzM5M
func (builder *SearchApplicationObjectReqBodyBuilder) PageToken(pageToken string) *SearchApplicationObjectReqBodyBuilder {
	builder.pageToken = pageToken
	builder.pageTokenFlag = true
	return builder
}

// 返回数量，默认为50，最大不超过2000
//
//示例值：100
func (builder *SearchApplicationObjectReqBodyBuilder) PageSize(pageSize string) *SearchApplicationObjectReqBodyBuilder {
	builder.pageSize = pageSize
	builder.pageSizeFlag = true
	return builder
}

// 返回元数据枚举值
//
//示例值：Label
func (builder *SearchApplicationObjectReqBodyBuilder) Metadata(metadata string) *SearchApplicationObjectReqBodyBuilder {
	builder.metadata = metadata
	builder.metadataFlag = true
	return builder
}

func (builder *SearchApplicationObjectReqBodyBuilder) Build() *SearchApplicationObjectReqBody {
	req := &SearchApplicationObjectReqBody{}
	if builder.qFlag {
		req.Q = &builder.q
	}
	if builder.searchObjectsFlag {
		req.SearchObjects = builder.searchObjects
	}
	if builder.pageTokenFlag {
		req.PageToken = &builder.pageToken
	}
	if builder.pageSizeFlag {
		req.PageSize = &builder.pageSize
	}
	if builder.metadataFlag {
		req.Metadata = &builder.metadata
	}
	return req
}

type SearchApplicationObjectPathReqBodyBuilder struct {
	q                 string
	qFlag             bool
	searchObjects     []*SearchObjectParam
	searchObjectsFlag bool
	pageToken         string
	pageTokenFlag     bool
	pageSize          string
	pageSizeFlag      bool
	metadata          string
	metadataFlag      bool
}

func NewSearchApplicationObjectPathReqBodyBuilder() *SearchApplicationObjectPathReqBodyBuilder {
	builder := &SearchApplicationObjectPathReqBodyBuilder{}
	return builder
}

// 搜索词
//
// 示例值：搜索关键字
func (builder *SearchApplicationObjectPathReqBodyBuilder) Q(q string) *SearchApplicationObjectPathReqBodyBuilder {
	builder.q = q
	builder.qFlag = true
	return builder
}

// 搜索对象范围
//
// 示例值：
func (builder *SearchApplicationObjectPathReqBodyBuilder) SearchObjects(searchObjects []*SearchObjectParam) *SearchApplicationObjectPathReqBodyBuilder {
	builder.searchObjects = searchObjects
	builder.searchObjectsFlag = true
	return builder
}

// 分页参数，第一次搜索时为空，需要分页查询时使用 SearchRecordsResponse 中的结果
//
// 示例值：eyJvYmplY3RzX3BhZ2VfdG9rZW4iOlt7Im9ial9pZCI6MTc2OTI4NzM5M
func (builder *SearchApplicationObjectPathReqBodyBuilder) PageToken(pageToken string) *SearchApplicationObjectPathReqBodyBuilder {
	builder.pageToken = pageToken
	builder.pageTokenFlag = true
	return builder
}

// 返回数量，默认为50，最大不超过2000
//
// 示例值：100
func (builder *SearchApplicationObjectPathReqBodyBuilder) PageSize(pageSize string) *SearchApplicationObjectPathReqBodyBuilder {
	builder.pageSize = pageSize
	builder.pageSizeFlag = true
	return builder
}

// 返回元数据枚举值
//
// 示例值：Label
func (builder *SearchApplicationObjectPathReqBodyBuilder) Metadata(metadata string) *SearchApplicationObjectPathReqBodyBuilder {
	builder.metadata = metadata
	builder.metadataFlag = true
	return builder
}

func (builder *SearchApplicationObjectPathReqBodyBuilder) Build() (*SearchApplicationObjectReqBody, error) {
	req := &SearchApplicationObjectReqBody{}
	if builder.qFlag {
		req.Q = &builder.q
	}
	if builder.searchObjectsFlag {
		req.SearchObjects = builder.searchObjects
	}
	if builder.pageTokenFlag {
		req.PageToken = &builder.pageToken
	}
	if builder.pageSizeFlag {
		req.PageSize = &builder.pageSize
	}
	if builder.metadataFlag {
		req.Metadata = &builder.metadata
	}
	return req, nil
}

type SearchApplicationObjectReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *SearchApplicationObjectReqBody
}

func NewSearchApplicationObjectReqBuilder() *SearchApplicationObjectReqBuilder {
	builder := &SearchApplicationObjectReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 应用命名空间
//
// 示例值：package_test__c
func (builder *SearchApplicationObjectReqBuilder) Namespace(namespace string) *SearchApplicationObjectReqBuilder {
	builder.apiReq.PathParams.Set("namespace", fmt.Sprint(namespace))
	return builder
}

// 搜索记录
func (builder *SearchApplicationObjectReqBuilder) Body(body *SearchApplicationObjectReqBody) *SearchApplicationObjectReqBuilder {
	builder.body = body
	return builder
}

func (builder *SearchApplicationObjectReqBuilder) Build() *SearchApplicationObjectReq {
	req := &SearchApplicationObjectReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type SearchApplicationObjectReqBody struct {
	Q *string `json:"q,omitempty"` // 搜索词

	SearchObjects []*SearchObjectParam `json:"search_objects,omitempty"` // 搜索对象范围

	PageToken *string `json:"page_token,omitempty"` // 分页参数，第一次搜索时为空，需要分页查询时使用 SearchRecordsResponse 中的结果

	PageSize *string `json:"page_size,omitempty"` // 返回数量，默认为50，最大不超过2000

	Metadata *string `json:"metadata,omitempty"` // 返回元数据枚举值
}

type SearchApplicationObjectReq struct {
	apiReq *larkcore.ApiReq
	Body   *SearchApplicationObjectReqBody `body:""`
}

type SearchApplicationObjectRespData struct {
	Records *string `json:"records,omitempty"` // 搜索结果列表

	HasMore *bool `json:"has_more,omitempty"` // 是否还有更多数据

	NextPageToken *string `json:"next_page_token,omitempty"` // 分页标记，当 HasMore 为 true 时，会同时返回新的 NextPageToken

	Objects []*ObjectMeta `json:"objects,omitempty"` // 对象信息
}

type SearchApplicationObjectResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *SearchApplicationObjectRespData `json:"data"` // 业务数据
}

func (resp *SearchApplicationObjectResp) Success() bool {
	return resp.Code == 0
}

type BatchCreateApplicationObjectRecordReqBodyBuilder struct {
	records     string // 记录详情列表，格式为 List<Map<string, ANY>>，操作记录数上限为 500 条
	recordsFlag bool
}

func NewBatchCreateApplicationObjectRecordReqBodyBuilder() *BatchCreateApplicationObjectRecordReqBodyBuilder {
	builder := &BatchCreateApplicationObjectRecordReqBodyBuilder{}
	return builder
}

// 记录详情列表，格式为 List<Map<string, ANY>>，操作记录数上限为 500 条
//
//示例值：[{\"book_name\":\"name21\",\"book_count\":2}]
func (builder *BatchCreateApplicationObjectRecordReqBodyBuilder) Records(records string) *BatchCreateApplicationObjectRecordReqBodyBuilder {
	builder.records = records
	builder.recordsFlag = true
	return builder
}

func (builder *BatchCreateApplicationObjectRecordReqBodyBuilder) Build() *BatchCreateApplicationObjectRecordReqBody {
	req := &BatchCreateApplicationObjectRecordReqBody{}
	if builder.recordsFlag {
		req.Records = &builder.records
	}
	return req
}

type BatchCreateApplicationObjectRecordPathReqBodyBuilder struct {
	records     string
	recordsFlag bool
}

func NewBatchCreateApplicationObjectRecordPathReqBodyBuilder() *BatchCreateApplicationObjectRecordPathReqBodyBuilder {
	builder := &BatchCreateApplicationObjectRecordPathReqBodyBuilder{}
	return builder
}

// 记录详情列表，格式为 List<Map<string, ANY>>，操作记录数上限为 500 条
//
// 示例值：[{\"book_name\":\"name21\",\"book_count\":2}]
func (builder *BatchCreateApplicationObjectRecordPathReqBodyBuilder) Records(records string) *BatchCreateApplicationObjectRecordPathReqBodyBuilder {
	builder.records = records
	builder.recordsFlag = true
	return builder
}

func (builder *BatchCreateApplicationObjectRecordPathReqBodyBuilder) Build() (*BatchCreateApplicationObjectRecordReqBody, error) {
	req := &BatchCreateApplicationObjectRecordReqBody{}
	if builder.recordsFlag {
		req.Records = &builder.records
	}
	return req, nil
}

type BatchCreateApplicationObjectRecordReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *BatchCreateApplicationObjectRecordReqBody
}

func NewBatchCreateApplicationObjectRecordReqBuilder() *BatchCreateApplicationObjectRecordReqBuilder {
	builder := &BatchCreateApplicationObjectRecordReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 应用命名空间
//
// 示例值：package_test__c
func (builder *BatchCreateApplicationObjectRecordReqBuilder) Namespace(namespace string) *BatchCreateApplicationObjectRecordReqBuilder {
	builder.apiReq.PathParams.Set("namespace", fmt.Sprint(namespace))
	return builder
}

// 对象唯一标识
//
// 示例值：user
func (builder *BatchCreateApplicationObjectRecordReqBuilder) ObjectApiName(objectApiName string) *BatchCreateApplicationObjectRecordReqBuilder {
	builder.apiReq.PathParams.Set("object_api_name", fmt.Sprint(objectApiName))
	return builder
}

// 记录批量创建
func (builder *BatchCreateApplicationObjectRecordReqBuilder) Body(body *BatchCreateApplicationObjectRecordReqBody) *BatchCreateApplicationObjectRecordReqBuilder {
	builder.body = body
	return builder
}

func (builder *BatchCreateApplicationObjectRecordReqBuilder) Build() *BatchCreateApplicationObjectRecordReq {
	req := &BatchCreateApplicationObjectRecordReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type BatchCreateApplicationObjectRecordReqBody struct {
	Records *string `json:"records,omitempty"` // 记录详情列表，格式为 List<Map<string, ANY>>，操作记录数上限为 500 条
}

type BatchCreateApplicationObjectRecordReq struct {
	apiReq *larkcore.ApiReq
	Body   *BatchCreateApplicationObjectRecordReqBody `body:""`
}

type BatchCreateApplicationObjectRecordRespData struct {
	Items []*RecordResult `json:"items,omitempty"` // 处理结果
}

type BatchCreateApplicationObjectRecordResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *BatchCreateApplicationObjectRecordRespData `json:"data"` // 业务数据
}

func (resp *BatchCreateApplicationObjectRecordResp) Success() bool {
	return resp.Code == 0
}

type BatchDeleteApplicationObjectRecordReqBodyBuilder struct {
	ids     []string // 记录 ID 列表，操作记录数上限为 500
	idsFlag bool
}

func NewBatchDeleteApplicationObjectRecordReqBodyBuilder() *BatchDeleteApplicationObjectRecordReqBodyBuilder {
	builder := &BatchDeleteApplicationObjectRecordReqBodyBuilder{}
	return builder
}

// 记录 ID 列表，操作记录数上限为 500
//
//示例值：
func (builder *BatchDeleteApplicationObjectRecordReqBodyBuilder) Ids(ids []string) *BatchDeleteApplicationObjectRecordReqBodyBuilder {
	builder.ids = ids
	builder.idsFlag = true
	return builder
}

func (builder *BatchDeleteApplicationObjectRecordReqBodyBuilder) Build() *BatchDeleteApplicationObjectRecordReqBody {
	req := &BatchDeleteApplicationObjectRecordReqBody{}
	if builder.idsFlag {
		req.Ids = builder.ids
	}
	return req
}

type BatchDeleteApplicationObjectRecordPathReqBodyBuilder struct {
	ids     []string
	idsFlag bool
}

func NewBatchDeleteApplicationObjectRecordPathReqBodyBuilder() *BatchDeleteApplicationObjectRecordPathReqBodyBuilder {
	builder := &BatchDeleteApplicationObjectRecordPathReqBodyBuilder{}
	return builder
}

// 记录 ID 列表，操作记录数上限为 500
//
// 示例值：
func (builder *BatchDeleteApplicationObjectRecordPathReqBodyBuilder) Ids(ids []string) *BatchDeleteApplicationObjectRecordPathReqBodyBuilder {
	builder.ids = ids
	builder.idsFlag = true
	return builder
}

func (builder *BatchDeleteApplicationObjectRecordPathReqBodyBuilder) Build() (*BatchDeleteApplicationObjectRecordReqBody, error) {
	req := &BatchDeleteApplicationObjectRecordReqBody{}
	if builder.idsFlag {
		req.Ids = builder.ids
	}
	return req, nil
}

type BatchDeleteApplicationObjectRecordReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *BatchDeleteApplicationObjectRecordReqBody
}

func NewBatchDeleteApplicationObjectRecordReqBuilder() *BatchDeleteApplicationObjectRecordReqBuilder {
	builder := &BatchDeleteApplicationObjectRecordReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 应用命名空间
//
// 示例值：package_test__c
func (builder *BatchDeleteApplicationObjectRecordReqBuilder) Namespace(namespace string) *BatchDeleteApplicationObjectRecordReqBuilder {
	builder.apiReq.PathParams.Set("namespace", fmt.Sprint(namespace))
	return builder
}

// 对象唯一标识
//
// 示例值：user
func (builder *BatchDeleteApplicationObjectRecordReqBuilder) ObjectApiName(objectApiName string) *BatchDeleteApplicationObjectRecordReqBuilder {
	builder.apiReq.PathParams.Set("object_api_name", fmt.Sprint(objectApiName))
	return builder
}

// 记录批量删除
func (builder *BatchDeleteApplicationObjectRecordReqBuilder) Body(body *BatchDeleteApplicationObjectRecordReqBody) *BatchDeleteApplicationObjectRecordReqBuilder {
	builder.body = body
	return builder
}

func (builder *BatchDeleteApplicationObjectRecordReqBuilder) Build() *BatchDeleteApplicationObjectRecordReq {
	req := &BatchDeleteApplicationObjectRecordReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type BatchDeleteApplicationObjectRecordReqBody struct {
	Ids []string `json:"ids,omitempty"` // 记录 ID 列表，操作记录数上限为 500
}

type BatchDeleteApplicationObjectRecordReq struct {
	apiReq *larkcore.ApiReq
	Body   *BatchDeleteApplicationObjectRecordReqBody `body:""`
}

type BatchDeleteApplicationObjectRecordRespData struct {
	Items []*RecordResult `json:"items,omitempty"` // 处理结果
}

type BatchDeleteApplicationObjectRecordResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *BatchDeleteApplicationObjectRecordRespData `json:"data"` // 业务数据
}

func (resp *BatchDeleteApplicationObjectRecordResp) Success() bool {
	return resp.Code == 0
}

type BatchQueryApplicationObjectRecordReqBodyBuilder struct {
	select_    []string // 需要获取的字段，使用字段唯一标识符进行查询，关联字段可使用「.」进行下钻
	selectFlag bool

	filter     *Criterion // 筛选条件，通过 JSON 格式指定条件
	filterFlag bool

	orderBy     []*Sort // 排序参数，通过 JSON 格式指定条件。其中， field 为参与排序字段，direction 为排序方向，多个条件按其在数组中的顺序生效。
	orderByFlag bool

	groupBy     []*RecordGroupByItem // 聚合参数，通过 JSON 格式指定条件。其中， field 为参与聚合的字段。
	groupByFlag bool

	pageToken     string // 分页的 Token 值，由服务端生成，可从 Response 中的 next_page_token 参数中获取。注意：第一页需填写空字符串 ""，且不能与 OFFSET 一起使用。
	pageTokenFlag bool

	usePageToken     bool // 是否使用 page_token 功能。为 True 时将使用 page_token 的值作为起始位置查询记录，并且会在 Response 中返回 next_page_token 。默认为 False 。
	usePageTokenFlag bool

	pageSize     int // 期望服务端返回的记录条数，上限 500 条。不填则取默认值，默认值为 500。
	pageSizeFlag bool

	offset     int // 返回记录的偏移量，默认为 0 ，即从查询到的第一条记录开始返回。offset 较大时查询性能较差，可能引起接口响应超时，拉取全部记录时建议使用 ID 游标分页，具体见 ID 游标分页说明
	offsetFlag bool

	needTotalCount     bool // 是否返回符合条件的记录总数（Total）。默认为 False，不返回记录总数。
	needTotalCountFlag bool
}

func NewBatchQueryApplicationObjectRecordReqBodyBuilder() *BatchQueryApplicationObjectRecordReqBodyBuilder {
	builder := &BatchQueryApplicationObjectRecordReqBodyBuilder{}
	return builder
}

// 需要获取的字段，使用字段唯一标识符进行查询，关联字段可使用「.」进行下钻
//
//示例值：
func (builder *BatchQueryApplicationObjectRecordReqBodyBuilder) Select(select_ []string) *BatchQueryApplicationObjectRecordReqBodyBuilder {
	builder.select_ = select_
	builder.selectFlag = true
	return builder
}

// 筛选条件，通过 JSON 格式指定条件
//
//示例值：
func (builder *BatchQueryApplicationObjectRecordReqBodyBuilder) Filter(filter *Criterion) *BatchQueryApplicationObjectRecordReqBodyBuilder {
	builder.filter = filter
	builder.filterFlag = true
	return builder
}

// 排序参数，通过 JSON 格式指定条件。其中， field 为参与排序字段，direction 为排序方向，多个条件按其在数组中的顺序生效。
//
//示例值：
func (builder *BatchQueryApplicationObjectRecordReqBodyBuilder) OrderBy(orderBy []*Sort) *BatchQueryApplicationObjectRecordReqBodyBuilder {
	builder.orderBy = orderBy
	builder.orderByFlag = true
	return builder
}

// 聚合参数，通过 JSON 格式指定条件。其中， field 为参与聚合的字段。
//
//示例值：
func (builder *BatchQueryApplicationObjectRecordReqBodyBuilder) GroupBy(groupBy []*RecordGroupByItem) *BatchQueryApplicationObjectRecordReqBodyBuilder {
	builder.groupBy = groupBy
	builder.groupByFlag = true
	return builder
}

// 分页的 Token 值，由服务端生成，可从 Response 中的 next_page_token 参数中获取。注意：第一页需填写空字符串 ""，且不能与 OFFSET 一起使用。
//
//示例值：
func (builder *BatchQueryApplicationObjectRecordReqBodyBuilder) PageToken(pageToken string) *BatchQueryApplicationObjectRecordReqBodyBuilder {
	builder.pageToken = pageToken
	builder.pageTokenFlag = true
	return builder
}

// 是否使用 page_token 功能。为 True 时将使用 page_token 的值作为起始位置查询记录，并且会在 Response 中返回 next_page_token 。默认为 False 。
//
//示例值：false
func (builder *BatchQueryApplicationObjectRecordReqBodyBuilder) UsePageToken(usePageToken bool) *BatchQueryApplicationObjectRecordReqBodyBuilder {
	builder.usePageToken = usePageToken
	builder.usePageTokenFlag = true
	return builder
}

// 期望服务端返回的记录条数，上限 500 条。不填则取默认值，默认值为 500。
//
//示例值：100
func (builder *BatchQueryApplicationObjectRecordReqBodyBuilder) PageSize(pageSize int) *BatchQueryApplicationObjectRecordReqBodyBuilder {
	builder.pageSize = pageSize
	builder.pageSizeFlag = true
	return builder
}

// 返回记录的偏移量，默认为 0 ，即从查询到的第一条记录开始返回。offset 较大时查询性能较差，可能引起接口响应超时，拉取全部记录时建议使用 ID 游标分页，具体见 ID 游标分页说明
//
//示例值：0
func (builder *BatchQueryApplicationObjectRecordReqBodyBuilder) Offset(offset int) *BatchQueryApplicationObjectRecordReqBodyBuilder {
	builder.offset = offset
	builder.offsetFlag = true
	return builder
}

// 是否返回符合条件的记录总数（Total）。默认为 False，不返回记录总数。
//
//示例值：true
func (builder *BatchQueryApplicationObjectRecordReqBodyBuilder) NeedTotalCount(needTotalCount bool) *BatchQueryApplicationObjectRecordReqBodyBuilder {
	builder.needTotalCount = needTotalCount
	builder.needTotalCountFlag = true
	return builder
}

func (builder *BatchQueryApplicationObjectRecordReqBodyBuilder) Build() *BatchQueryApplicationObjectRecordReqBody {
	req := &BatchQueryApplicationObjectRecordReqBody{}
	if builder.selectFlag {
		req.Select = builder.select_
	}
	if builder.filterFlag {
		req.Filter = builder.filter
	}
	if builder.orderByFlag {
		req.OrderBy = builder.orderBy
	}
	if builder.groupByFlag {
		req.GroupBy = builder.groupBy
	}
	if builder.pageTokenFlag {
		req.PageToken = &builder.pageToken
	}
	if builder.usePageTokenFlag {
		req.UsePageToken = &builder.usePageToken
	}
	if builder.pageSizeFlag {
		req.PageSize = &builder.pageSize
	}
	if builder.offsetFlag {
		req.Offset = &builder.offset
	}
	if builder.needTotalCountFlag {
		req.NeedTotalCount = &builder.needTotalCount
	}
	return req
}

type BatchQueryApplicationObjectRecordPathReqBodyBuilder struct {
	select_            []string
	selectFlag         bool
	filter             *Criterion
	filterFlag         bool
	orderBy            []*Sort
	orderByFlag        bool
	groupBy            []*RecordGroupByItem
	groupByFlag        bool
	pageToken          string
	pageTokenFlag      bool
	usePageToken       bool
	usePageTokenFlag   bool
	pageSize           int
	pageSizeFlag       bool
	offset             int
	offsetFlag         bool
	needTotalCount     bool
	needTotalCountFlag bool
}

func NewBatchQueryApplicationObjectRecordPathReqBodyBuilder() *BatchQueryApplicationObjectRecordPathReqBodyBuilder {
	builder := &BatchQueryApplicationObjectRecordPathReqBodyBuilder{}
	return builder
}

// 需要获取的字段，使用字段唯一标识符进行查询，关联字段可使用「.」进行下钻
//
// 示例值：
func (builder *BatchQueryApplicationObjectRecordPathReqBodyBuilder) Select(select_ []string) *BatchQueryApplicationObjectRecordPathReqBodyBuilder {
	builder.select_ = select_
	builder.selectFlag = true
	return builder
}

// 筛选条件，通过 JSON 格式指定条件
//
// 示例值：
func (builder *BatchQueryApplicationObjectRecordPathReqBodyBuilder) Filter(filter *Criterion) *BatchQueryApplicationObjectRecordPathReqBodyBuilder {
	builder.filter = filter
	builder.filterFlag = true
	return builder
}

// 排序参数，通过 JSON 格式指定条件。其中， field 为参与排序字段，direction 为排序方向，多个条件按其在数组中的顺序生效。
//
// 示例值：
func (builder *BatchQueryApplicationObjectRecordPathReqBodyBuilder) OrderBy(orderBy []*Sort) *BatchQueryApplicationObjectRecordPathReqBodyBuilder {
	builder.orderBy = orderBy
	builder.orderByFlag = true
	return builder
}

// 聚合参数，通过 JSON 格式指定条件。其中， field 为参与聚合的字段。
//
// 示例值：
func (builder *BatchQueryApplicationObjectRecordPathReqBodyBuilder) GroupBy(groupBy []*RecordGroupByItem) *BatchQueryApplicationObjectRecordPathReqBodyBuilder {
	builder.groupBy = groupBy
	builder.groupByFlag = true
	return builder
}

// 分页的 Token 值，由服务端生成，可从 Response 中的 next_page_token 参数中获取。注意：第一页需填写空字符串 ""，且不能与 OFFSET 一起使用。
//
// 示例值：
func (builder *BatchQueryApplicationObjectRecordPathReqBodyBuilder) PageToken(pageToken string) *BatchQueryApplicationObjectRecordPathReqBodyBuilder {
	builder.pageToken = pageToken
	builder.pageTokenFlag = true
	return builder
}

// 是否使用 page_token 功能。为 True 时将使用 page_token 的值作为起始位置查询记录，并且会在 Response 中返回 next_page_token 。默认为 False 。
//
// 示例值：false
func (builder *BatchQueryApplicationObjectRecordPathReqBodyBuilder) UsePageToken(usePageToken bool) *BatchQueryApplicationObjectRecordPathReqBodyBuilder {
	builder.usePageToken = usePageToken
	builder.usePageTokenFlag = true
	return builder
}

// 期望服务端返回的记录条数，上限 500 条。不填则取默认值，默认值为 500。
//
// 示例值：100
func (builder *BatchQueryApplicationObjectRecordPathReqBodyBuilder) PageSize(pageSize int) *BatchQueryApplicationObjectRecordPathReqBodyBuilder {
	builder.pageSize = pageSize
	builder.pageSizeFlag = true
	return builder
}

// 返回记录的偏移量，默认为 0 ，即从查询到的第一条记录开始返回。offset 较大时查询性能较差，可能引起接口响应超时，拉取全部记录时建议使用 ID 游标分页，具体见 ID 游标分页说明
//
// 示例值：0
func (builder *BatchQueryApplicationObjectRecordPathReqBodyBuilder) Offset(offset int) *BatchQueryApplicationObjectRecordPathReqBodyBuilder {
	builder.offset = offset
	builder.offsetFlag = true
	return builder
}

// 是否返回符合条件的记录总数（Total）。默认为 False，不返回记录总数。
//
// 示例值：true
func (builder *BatchQueryApplicationObjectRecordPathReqBodyBuilder) NeedTotalCount(needTotalCount bool) *BatchQueryApplicationObjectRecordPathReqBodyBuilder {
	builder.needTotalCount = needTotalCount
	builder.needTotalCountFlag = true
	return builder
}

func (builder *BatchQueryApplicationObjectRecordPathReqBodyBuilder) Build() (*BatchQueryApplicationObjectRecordReqBody, error) {
	req := &BatchQueryApplicationObjectRecordReqBody{}
	if builder.selectFlag {
		req.Select = builder.select_
	}
	if builder.filterFlag {
		req.Filter = builder.filter
	}
	if builder.orderByFlag {
		req.OrderBy = builder.orderBy
	}
	if builder.groupByFlag {
		req.GroupBy = builder.groupBy
	}
	if builder.pageTokenFlag {
		req.PageToken = &builder.pageToken
	}
	if builder.usePageTokenFlag {
		req.UsePageToken = &builder.usePageToken
	}
	if builder.pageSizeFlag {
		req.PageSize = &builder.pageSize
	}
	if builder.offsetFlag {
		req.Offset = &builder.offset
	}
	if builder.needTotalCountFlag {
		req.NeedTotalCount = &builder.needTotalCount
	}
	return req, nil
}

type BatchQueryApplicationObjectRecordReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *BatchQueryApplicationObjectRecordReqBody
}

func NewBatchQueryApplicationObjectRecordReqBuilder() *BatchQueryApplicationObjectRecordReqBuilder {
	builder := &BatchQueryApplicationObjectRecordReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 命名空间
//
// 示例值：package_test__c
func (builder *BatchQueryApplicationObjectRecordReqBuilder) Namespace(namespace string) *BatchQueryApplicationObjectRecordReqBuilder {
	builder.apiReq.PathParams.Set("namespace", fmt.Sprint(namespace))
	return builder
}

// 目标对象的唯一标识符
//
// 示例值：_user
func (builder *BatchQueryApplicationObjectRecordReqBuilder) ObjectApiName(objectApiName string) *BatchQueryApplicationObjectRecordReqBuilder {
	builder.apiReq.PathParams.Set("object_api_name", fmt.Sprint(objectApiName))
	return builder
}

// 批量查询对象记录
func (builder *BatchQueryApplicationObjectRecordReqBuilder) Body(body *BatchQueryApplicationObjectRecordReqBody) *BatchQueryApplicationObjectRecordReqBuilder {
	builder.body = body
	return builder
}

func (builder *BatchQueryApplicationObjectRecordReqBuilder) Build() *BatchQueryApplicationObjectRecordReq {
	req := &BatchQueryApplicationObjectRecordReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type BatchQueryApplicationObjectRecordReqBody struct {
	Select []string `json:"select,omitempty"` // 需要获取的字段，使用字段唯一标识符进行查询，关联字段可使用「.」进行下钻

	Filter *Criterion `json:"filter,omitempty"` // 筛选条件，通过 JSON 格式指定条件

	OrderBy []*Sort `json:"order_by,omitempty"` // 排序参数，通过 JSON 格式指定条件。其中， field 为参与排序字段，direction 为排序方向，多个条件按其在数组中的顺序生效。

	GroupBy []*RecordGroupByItem `json:"group_by,omitempty"` // 聚合参数，通过 JSON 格式指定条件。其中， field 为参与聚合的字段。

	PageToken *string `json:"page_token,omitempty"` // 分页的 Token 值，由服务端生成，可从 Response 中的 next_page_token 参数中获取。注意：第一页需填写空字符串 ""，且不能与 OFFSET 一起使用。

	UsePageToken *bool `json:"use_page_token,omitempty"` // 是否使用 page_token 功能。为 True 时将使用 page_token 的值作为起始位置查询记录，并且会在 Response 中返回 next_page_token 。默认为 False 。

	PageSize *int `json:"page_size,omitempty"` // 期望服务端返回的记录条数，上限 500 条。不填则取默认值，默认值为 500。

	Offset *int `json:"offset,omitempty"` // 返回记录的偏移量，默认为 0 ，即从查询到的第一条记录开始返回。offset 较大时查询性能较差，可能引起接口响应超时，拉取全部记录时建议使用 ID 游标分页，具体见 ID 游标分页说明

	NeedTotalCount *bool `json:"need_total_count,omitempty"` // 是否返回符合条件的记录总数（Total）。默认为 False，不返回记录总数。
}

type BatchQueryApplicationObjectRecordReq struct {
	apiReq *larkcore.ApiReq
	Body   *BatchQueryApplicationObjectRecordReqBody `body:""`
}

type BatchQueryApplicationObjectRecordRespData struct {
	Items *string `json:"items,omitempty"` // 符合条件的记录列表

	Total *int `json:"total,omitempty"` // 符合条件的记录数

	NextPageToken *string `json:"next_page_token,omitempty"` // 下一页的起始位置 Token ，访问至末尾时不返回

	HasMore *bool `json:"has_more,omitempty"` // 是否还有数据
}

type BatchQueryApplicationObjectRecordResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *BatchQueryApplicationObjectRecordRespData `json:"data"` // 业务数据
}

func (resp *BatchQueryApplicationObjectRecordResp) Success() bool {
	return resp.Code == 0
}

type BatchUpdateApplicationObjectRecordReqBodyBuilder struct {
	records     string // 记录详情列表，格式为 List<Map<string, ANY>>，操作记录数上限为 500 条
	recordsFlag bool
}

func NewBatchUpdateApplicationObjectRecordReqBodyBuilder() *BatchUpdateApplicationObjectRecordReqBodyBuilder {
	builder := &BatchUpdateApplicationObjectRecordReqBodyBuilder{}
	return builder
}

// 记录详情列表，格式为 List<Map<string, ANY>>，操作记录数上限为 500 条
//
//示例值：[{\"_id\":\"1798681438085228\",\"book_count\":\"5\",\"book_name\":\"name4\"}]
func (builder *BatchUpdateApplicationObjectRecordReqBodyBuilder) Records(records string) *BatchUpdateApplicationObjectRecordReqBodyBuilder {
	builder.records = records
	builder.recordsFlag = true
	return builder
}

func (builder *BatchUpdateApplicationObjectRecordReqBodyBuilder) Build() *BatchUpdateApplicationObjectRecordReqBody {
	req := &BatchUpdateApplicationObjectRecordReqBody{}
	if builder.recordsFlag {
		req.Records = &builder.records
	}
	return req
}

type BatchUpdateApplicationObjectRecordPathReqBodyBuilder struct {
	records     string
	recordsFlag bool
}

func NewBatchUpdateApplicationObjectRecordPathReqBodyBuilder() *BatchUpdateApplicationObjectRecordPathReqBodyBuilder {
	builder := &BatchUpdateApplicationObjectRecordPathReqBodyBuilder{}
	return builder
}

// 记录详情列表，格式为 List<Map<string, ANY>>，操作记录数上限为 500 条
//
// 示例值：[{\"_id\":\"1798681438085228\",\"book_count\":\"5\",\"book_name\":\"name4\"}]
func (builder *BatchUpdateApplicationObjectRecordPathReqBodyBuilder) Records(records string) *BatchUpdateApplicationObjectRecordPathReqBodyBuilder {
	builder.records = records
	builder.recordsFlag = true
	return builder
}

func (builder *BatchUpdateApplicationObjectRecordPathReqBodyBuilder) Build() (*BatchUpdateApplicationObjectRecordReqBody, error) {
	req := &BatchUpdateApplicationObjectRecordReqBody{}
	if builder.recordsFlag {
		req.Records = &builder.records
	}
	return req, nil
}

type BatchUpdateApplicationObjectRecordReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *BatchUpdateApplicationObjectRecordReqBody
}

func NewBatchUpdateApplicationObjectRecordReqBuilder() *BatchUpdateApplicationObjectRecordReqBuilder {
	builder := &BatchUpdateApplicationObjectRecordReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 应用命名空间
//
// 示例值：package_test__c
func (builder *BatchUpdateApplicationObjectRecordReqBuilder) Namespace(namespace string) *BatchUpdateApplicationObjectRecordReqBuilder {
	builder.apiReq.PathParams.Set("namespace", fmt.Sprint(namespace))
	return builder
}

// 对象唯一标识
//
// 示例值：user
func (builder *BatchUpdateApplicationObjectRecordReqBuilder) ObjectApiName(objectApiName string) *BatchUpdateApplicationObjectRecordReqBuilder {
	builder.apiReq.PathParams.Set("object_api_name", fmt.Sprint(objectApiName))
	return builder
}

// 记录批量更新
func (builder *BatchUpdateApplicationObjectRecordReqBuilder) Body(body *BatchUpdateApplicationObjectRecordReqBody) *BatchUpdateApplicationObjectRecordReqBuilder {
	builder.body = body
	return builder
}

func (builder *BatchUpdateApplicationObjectRecordReqBuilder) Build() *BatchUpdateApplicationObjectRecordReq {
	req := &BatchUpdateApplicationObjectRecordReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type BatchUpdateApplicationObjectRecordReqBody struct {
	Records *string `json:"records,omitempty"` // 记录详情列表，格式为 List<Map<string, ANY>>，操作记录数上限为 500 条
}

type BatchUpdateApplicationObjectRecordReq struct {
	apiReq *larkcore.ApiReq
	Body   *BatchUpdateApplicationObjectRecordReqBody `body:""`
}

type BatchUpdateApplicationObjectRecordRespData struct {
	Items []*RecordResult `json:"items,omitempty"` // 处理结果
}

type BatchUpdateApplicationObjectRecordResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *BatchUpdateApplicationObjectRecordRespData `json:"data"` // 业务数据
}

func (resp *BatchUpdateApplicationObjectRecordResp) Success() bool {
	return resp.Code == 0
}

type CreateApplicationObjectRecordReqBodyBuilder struct {
	record     string // 创建对象使用的数据，键为字段 API 名称，值为字段值，格式可参考字段值格式
	recordFlag bool
}

func NewCreateApplicationObjectRecordReqBodyBuilder() *CreateApplicationObjectRecordReqBodyBuilder {
	builder := &CreateApplicationObjectRecordReqBodyBuilder{}
	return builder
}

// 创建对象使用的数据，键为字段 API 名称，值为字段值，格式可参考字段值格式
//
//示例值：{\"book_name\":\"test\"}
func (builder *CreateApplicationObjectRecordReqBodyBuilder) Record(record string) *CreateApplicationObjectRecordReqBodyBuilder {
	builder.record = record
	builder.recordFlag = true
	return builder
}

func (builder *CreateApplicationObjectRecordReqBodyBuilder) Build() *CreateApplicationObjectRecordReqBody {
	req := &CreateApplicationObjectRecordReqBody{}
	if builder.recordFlag {
		req.Record = &builder.record
	}
	return req
}

type CreateApplicationObjectRecordPathReqBodyBuilder struct {
	record     string
	recordFlag bool
}

func NewCreateApplicationObjectRecordPathReqBodyBuilder() *CreateApplicationObjectRecordPathReqBodyBuilder {
	builder := &CreateApplicationObjectRecordPathReqBodyBuilder{}
	return builder
}

// 创建对象使用的数据，键为字段 API 名称，值为字段值，格式可参考字段值格式
//
// 示例值：{\"book_name\":\"test\"}
func (builder *CreateApplicationObjectRecordPathReqBodyBuilder) Record(record string) *CreateApplicationObjectRecordPathReqBodyBuilder {
	builder.record = record
	builder.recordFlag = true
	return builder
}

func (builder *CreateApplicationObjectRecordPathReqBodyBuilder) Build() (*CreateApplicationObjectRecordReqBody, error) {
	req := &CreateApplicationObjectRecordReqBody{}
	if builder.recordFlag {
		req.Record = &builder.record
	}
	return req, nil
}

type CreateApplicationObjectRecordReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *CreateApplicationObjectRecordReqBody
}

func NewCreateApplicationObjectRecordReqBuilder() *CreateApplicationObjectRecordReqBuilder {
	builder := &CreateApplicationObjectRecordReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 应用命名空间
//
// 示例值：package_test__c
func (builder *CreateApplicationObjectRecordReqBuilder) Namespace(namespace string) *CreateApplicationObjectRecordReqBuilder {
	builder.apiReq.PathParams.Set("namespace", fmt.Sprint(namespace))
	return builder
}

// 对象唯一标识
//
// 示例值：user
func (builder *CreateApplicationObjectRecordReqBuilder) ObjectApiName(objectApiName string) *CreateApplicationObjectRecordReqBuilder {
	builder.apiReq.PathParams.Set("object_api_name", fmt.Sprint(objectApiName))
	return builder
}

// 创建记录
func (builder *CreateApplicationObjectRecordReqBuilder) Body(body *CreateApplicationObjectRecordReqBody) *CreateApplicationObjectRecordReqBuilder {
	builder.body = body
	return builder
}

func (builder *CreateApplicationObjectRecordReqBuilder) Build() *CreateApplicationObjectRecordReq {
	req := &CreateApplicationObjectRecordReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type CreateApplicationObjectRecordReqBody struct {
	Record *string `json:"record,omitempty"` // 创建对象使用的数据，键为字段 API 名称，值为字段值，格式可参考字段值格式
}

type CreateApplicationObjectRecordReq struct {
	apiReq *larkcore.ApiReq
	Body   *CreateApplicationObjectRecordReqBody `body:""`
}

type CreateApplicationObjectRecordRespData struct {
	Id *string `json:"id,omitempty"` // 记录 ID
}

type CreateApplicationObjectRecordResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *CreateApplicationObjectRecordRespData `json:"data"` // 业务数据
}

func (resp *CreateApplicationObjectRecordResp) Success() bool {
	return resp.Code == 0
}

type DeleteApplicationObjectRecordReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewDeleteApplicationObjectRecordReqBuilder() *DeleteApplicationObjectRecordReqBuilder {
	builder := &DeleteApplicationObjectRecordReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 应用命名空间
//
// 示例值：package_test__c
func (builder *DeleteApplicationObjectRecordReqBuilder) Namespace(namespace string) *DeleteApplicationObjectRecordReqBuilder {
	builder.apiReq.PathParams.Set("namespace", fmt.Sprint(namespace))
	return builder
}

// 对象唯一标识
//
// 示例值：user
func (builder *DeleteApplicationObjectRecordReqBuilder) ObjectApiName(objectApiName string) *DeleteApplicationObjectRecordReqBuilder {
	builder.apiReq.PathParams.Set("object_api_name", fmt.Sprint(objectApiName))
	return builder
}

// 记录ID
//
// 示例值：1764024447556775
func (builder *DeleteApplicationObjectRecordReqBuilder) Id(id string) *DeleteApplicationObjectRecordReqBuilder {
	builder.apiReq.PathParams.Set("id", fmt.Sprint(id))
	return builder
}

func (builder *DeleteApplicationObjectRecordReqBuilder) Build() *DeleteApplicationObjectRecordReq {
	req := &DeleteApplicationObjectRecordReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	return req
}

type DeleteApplicationObjectRecordReq struct {
	apiReq *larkcore.ApiReq
}

type DeleteApplicationObjectRecordResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *DeleteApplicationObjectRecordResp) Success() bool {
	return resp.Code == 0
}

type PatchApplicationObjectRecordReqBodyBuilder struct {
	record     string // 创建对象使用的数据，键为字段 API 名称，值为字段值，格式可参考字段值格式
	recordFlag bool
}

func NewPatchApplicationObjectRecordReqBodyBuilder() *PatchApplicationObjectRecordReqBodyBuilder {
	builder := &PatchApplicationObjectRecordReqBodyBuilder{}
	return builder
}

// 创建对象使用的数据，键为字段 API 名称，值为字段值，格式可参考字段值格式
//
//示例值：{\"_id\":\"1798681438085228\",\"book_count\":\"3\",\"book_name\":\"showcase2\"}
func (builder *PatchApplicationObjectRecordReqBodyBuilder) Record(record string) *PatchApplicationObjectRecordReqBodyBuilder {
	builder.record = record
	builder.recordFlag = true
	return builder
}

func (builder *PatchApplicationObjectRecordReqBodyBuilder) Build() *PatchApplicationObjectRecordReqBody {
	req := &PatchApplicationObjectRecordReqBody{}
	if builder.recordFlag {
		req.Record = &builder.record
	}
	return req
}

type PatchApplicationObjectRecordPathReqBodyBuilder struct {
	record     string
	recordFlag bool
}

func NewPatchApplicationObjectRecordPathReqBodyBuilder() *PatchApplicationObjectRecordPathReqBodyBuilder {
	builder := &PatchApplicationObjectRecordPathReqBodyBuilder{}
	return builder
}

// 创建对象使用的数据，键为字段 API 名称，值为字段值，格式可参考字段值格式
//
// 示例值：{\"_id\":\"1798681438085228\",\"book_count\":\"3\",\"book_name\":\"showcase2\"}
func (builder *PatchApplicationObjectRecordPathReqBodyBuilder) Record(record string) *PatchApplicationObjectRecordPathReqBodyBuilder {
	builder.record = record
	builder.recordFlag = true
	return builder
}

func (builder *PatchApplicationObjectRecordPathReqBodyBuilder) Build() (*PatchApplicationObjectRecordReqBody, error) {
	req := &PatchApplicationObjectRecordReqBody{}
	if builder.recordFlag {
		req.Record = &builder.record
	}
	return req, nil
}

type PatchApplicationObjectRecordReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *PatchApplicationObjectRecordReqBody
}

func NewPatchApplicationObjectRecordReqBuilder() *PatchApplicationObjectRecordReqBuilder {
	builder := &PatchApplicationObjectRecordReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 应用命名空间
//
// 示例值：package_test__c
func (builder *PatchApplicationObjectRecordReqBuilder) Namespace(namespace string) *PatchApplicationObjectRecordReqBuilder {
	builder.apiReq.PathParams.Set("namespace", fmt.Sprint(namespace))
	return builder
}

// 对象唯一标识
//
// 示例值：user
func (builder *PatchApplicationObjectRecordReqBuilder) ObjectApiName(objectApiName string) *PatchApplicationObjectRecordReqBuilder {
	builder.apiReq.PathParams.Set("object_api_name", fmt.Sprint(objectApiName))
	return builder
}

// 记录ID
//
// 示例值：1764024447556775
func (builder *PatchApplicationObjectRecordReqBuilder) Id(id string) *PatchApplicationObjectRecordReqBuilder {
	builder.apiReq.PathParams.Set("id", fmt.Sprint(id))
	return builder
}

// 更新记录
func (builder *PatchApplicationObjectRecordReqBuilder) Body(body *PatchApplicationObjectRecordReqBody) *PatchApplicationObjectRecordReqBuilder {
	builder.body = body
	return builder
}

func (builder *PatchApplicationObjectRecordReqBuilder) Build() *PatchApplicationObjectRecordReq {
	req := &PatchApplicationObjectRecordReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type PatchApplicationObjectRecordReqBody struct {
	Record *string `json:"record,omitempty"` // 创建对象使用的数据，键为字段 API 名称，值为字段值，格式可参考字段值格式
}

type PatchApplicationObjectRecordReq struct {
	apiReq *larkcore.ApiReq
	Body   *PatchApplicationObjectRecordReqBody `body:""`
}

type PatchApplicationObjectRecordResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *PatchApplicationObjectRecordResp) Success() bool {
	return resp.Code == 0
}

type QueryApplicationObjectRecordReqBodyBuilder struct {
	select_    []string // 需要获取的字段，使用字段唯一标识符进行查询，关联字段可使用 . 进行下钻
	selectFlag bool
}

func NewQueryApplicationObjectRecordReqBodyBuilder() *QueryApplicationObjectRecordReqBodyBuilder {
	builder := &QueryApplicationObjectRecordReqBodyBuilder{}
	return builder
}

// 需要获取的字段，使用字段唯一标识符进行查询，关联字段可使用 . 进行下钻
//
//示例值：
func (builder *QueryApplicationObjectRecordReqBodyBuilder) Select(select_ []string) *QueryApplicationObjectRecordReqBodyBuilder {
	builder.select_ = select_
	builder.selectFlag = true
	return builder
}

func (builder *QueryApplicationObjectRecordReqBodyBuilder) Build() *QueryApplicationObjectRecordReqBody {
	req := &QueryApplicationObjectRecordReqBody{}
	if builder.selectFlag {
		req.Select = builder.select_
	}
	return req
}

type QueryApplicationObjectRecordPathReqBodyBuilder struct {
	select_    []string
	selectFlag bool
}

func NewQueryApplicationObjectRecordPathReqBodyBuilder() *QueryApplicationObjectRecordPathReqBodyBuilder {
	builder := &QueryApplicationObjectRecordPathReqBodyBuilder{}
	return builder
}

// 需要获取的字段，使用字段唯一标识符进行查询，关联字段可使用 . 进行下钻
//
// 示例值：
func (builder *QueryApplicationObjectRecordPathReqBodyBuilder) Select(select_ []string) *QueryApplicationObjectRecordPathReqBodyBuilder {
	builder.select_ = select_
	builder.selectFlag = true
	return builder
}

func (builder *QueryApplicationObjectRecordPathReqBodyBuilder) Build() (*QueryApplicationObjectRecordReqBody, error) {
	req := &QueryApplicationObjectRecordReqBody{}
	if builder.selectFlag {
		req.Select = builder.select_
	}
	return req, nil
}

type QueryApplicationObjectRecordReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *QueryApplicationObjectRecordReqBody
}

func NewQueryApplicationObjectRecordReqBuilder() *QueryApplicationObjectRecordReqBuilder {
	builder := &QueryApplicationObjectRecordReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 应用命名空间
//
// 示例值：package_test__c
func (builder *QueryApplicationObjectRecordReqBuilder) Namespace(namespace string) *QueryApplicationObjectRecordReqBuilder {
	builder.apiReq.PathParams.Set("namespace", fmt.Sprint(namespace))
	return builder
}

// 对象唯一标识
//
// 示例值：user
func (builder *QueryApplicationObjectRecordReqBuilder) ObjectApiName(objectApiName string) *QueryApplicationObjectRecordReqBuilder {
	builder.apiReq.PathParams.Set("object_api_name", fmt.Sprint(objectApiName))
	return builder
}

// 记录ID
//
// 示例值：1764024447556775
func (builder *QueryApplicationObjectRecordReqBuilder) Id(id string) *QueryApplicationObjectRecordReqBuilder {
	builder.apiReq.PathParams.Set("id", fmt.Sprint(id))
	return builder
}

// 获取记录
func (builder *QueryApplicationObjectRecordReqBuilder) Body(body *QueryApplicationObjectRecordReqBody) *QueryApplicationObjectRecordReqBuilder {
	builder.body = body
	return builder
}

func (builder *QueryApplicationObjectRecordReqBuilder) Build() *QueryApplicationObjectRecordReq {
	req := &QueryApplicationObjectRecordReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type QueryApplicationObjectRecordReqBody struct {
	Select []string `json:"select,omitempty"` // 需要获取的字段，使用字段唯一标识符进行查询，关联字段可使用 . 进行下钻
}

type QueryApplicationObjectRecordReq struct {
	apiReq *larkcore.ApiReq
	Body   *QueryApplicationObjectRecordReqBody `body:""`
}

type QueryApplicationObjectRecordRespData struct {
	Item *string `json:"item,omitempty"` // 记录详情,格式为 Map<string, ANY>
}

type QueryApplicationObjectRecordResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *QueryApplicationObjectRecordRespData `json:"data"` // 业务数据
}

func (resp *QueryApplicationObjectRecordResp) Success() bool {
	return resp.Code == 0
}

type BatchCreateAuthorizationApplicationRecordPermissionMemberReqBodyBuilder struct {
	userIds     []string // 需要新增的用户 ID 列表
	userIdsFlag bool
}

func NewBatchCreateAuthorizationApplicationRecordPermissionMemberReqBodyBuilder() *BatchCreateAuthorizationApplicationRecordPermissionMemberReqBodyBuilder {
	builder := &BatchCreateAuthorizationApplicationRecordPermissionMemberReqBodyBuilder{}
	return builder
}

// 需要新增的用户 ID 列表
//
//示例值：
func (builder *BatchCreateAuthorizationApplicationRecordPermissionMemberReqBodyBuilder) UserIds(userIds []string) *BatchCreateAuthorizationApplicationRecordPermissionMemberReqBodyBuilder {
	builder.userIds = userIds
	builder.userIdsFlag = true
	return builder
}

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

type BatchCreateAuthorizationApplicationRecordPermissionMemberPathReqBodyBuilder struct {
	userIds     []string
	userIdsFlag bool
}

func NewBatchCreateAuthorizationApplicationRecordPermissionMemberPathReqBodyBuilder() *BatchCreateAuthorizationApplicationRecordPermissionMemberPathReqBodyBuilder {
	builder := &BatchCreateAuthorizationApplicationRecordPermissionMemberPathReqBodyBuilder{}
	return builder
}

// 需要新增的用户 ID 列表
//
// 示例值：
func (builder *BatchCreateAuthorizationApplicationRecordPermissionMemberPathReqBodyBuilder) UserIds(userIds []string) *BatchCreateAuthorizationApplicationRecordPermissionMemberPathReqBodyBuilder {
	builder.userIds = userIds
	builder.userIdsFlag = true
	return builder
}

func (builder *BatchCreateAuthorizationApplicationRecordPermissionMemberPathReqBodyBuilder) Build() (*BatchCreateAuthorizationApplicationRecordPermissionMemberReqBody, error) {
	req := &BatchCreateAuthorizationApplicationRecordPermissionMemberReqBody{}
	if builder.userIdsFlag {
		req.UserIds = builder.userIds
	}
	return req, nil
}

type BatchCreateAuthorizationApplicationRecordPermissionMemberReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *BatchCreateAuthorizationApplicationRecordPermissionMemberReqBody
}

func NewBatchCreateAuthorizationApplicationRecordPermissionMemberReqBuilder() *BatchCreateAuthorizationApplicationRecordPermissionMemberReqBuilder {
	builder := &BatchCreateAuthorizationApplicationRecordPermissionMemberReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 应用命名空间
//
// 示例值：package_test__c
func (builder *BatchCreateAuthorizationApplicationRecordPermissionMemberReqBuilder) Namespace(namespace string) *BatchCreateAuthorizationApplicationRecordPermissionMemberReqBuilder {
	builder.apiReq.PathParams.Set("namespace", fmt.Sprint(namespace))
	return builder
}

// 记录权限 API 名称
//
// 示例值：adminRecordPermission
func (builder *BatchCreateAuthorizationApplicationRecordPermissionMemberReqBuilder) RecordPermissionApiName(recordPermissionApiName string) *BatchCreateAuthorizationApplicationRecordPermissionMemberReqBuilder {
	builder.apiReq.PathParams.Set("record_permission_api_name", fmt.Sprint(recordPermissionApiName))
	return builder
}

//
func (builder *BatchCreateAuthorizationApplicationRecordPermissionMemberReqBuilder) Body(body *BatchCreateAuthorizationApplicationRecordPermissionMemberReqBody) *BatchCreateAuthorizationApplicationRecordPermissionMemberReqBuilder {
	builder.body = body
	return builder
}

func (builder *BatchCreateAuthorizationApplicationRecordPermissionMemberReqBuilder) Build() *BatchCreateAuthorizationApplicationRecordPermissionMemberReq {
	req := &BatchCreateAuthorizationApplicationRecordPermissionMemberReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type BatchCreateAuthorizationApplicationRecordPermissionMemberReqBody struct {
	UserIds []string `json:"user_ids,omitempty"` // 需要新增的用户 ID 列表
}

type BatchCreateAuthorizationApplicationRecordPermissionMemberReq struct {
	apiReq *larkcore.ApiReq
	Body   *BatchCreateAuthorizationApplicationRecordPermissionMemberReqBody `body:""`
}

type BatchCreateAuthorizationApplicationRecordPermissionMemberResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *BatchCreateAuthorizationApplicationRecordPermissionMemberResp) Success() bool {
	return resp.Code == 0
}

type BatchRemoveAuthorizationApplicationRecordPermissionMemberReqBodyBuilder struct {
	userIds     []string // 需要删除的用户 ID 列表
	userIdsFlag bool
}

func NewBatchRemoveAuthorizationApplicationRecordPermissionMemberReqBodyBuilder() *BatchRemoveAuthorizationApplicationRecordPermissionMemberReqBodyBuilder {
	builder := &BatchRemoveAuthorizationApplicationRecordPermissionMemberReqBodyBuilder{}
	return builder
}

// 需要删除的用户 ID 列表
//
//示例值：
func (builder *BatchRemoveAuthorizationApplicationRecordPermissionMemberReqBodyBuilder) UserIds(userIds []string) *BatchRemoveAuthorizationApplicationRecordPermissionMemberReqBodyBuilder {
	builder.userIds = userIds
	builder.userIdsFlag = true
	return builder
}

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

type BatchRemoveAuthorizationApplicationRecordPermissionMemberPathReqBodyBuilder struct {
	userIds     []string
	userIdsFlag bool
}

func NewBatchRemoveAuthorizationApplicationRecordPermissionMemberPathReqBodyBuilder() *BatchRemoveAuthorizationApplicationRecordPermissionMemberPathReqBodyBuilder {
	builder := &BatchRemoveAuthorizationApplicationRecordPermissionMemberPathReqBodyBuilder{}
	return builder
}

// 需要删除的用户 ID 列表
//
// 示例值：
func (builder *BatchRemoveAuthorizationApplicationRecordPermissionMemberPathReqBodyBuilder) UserIds(userIds []string) *BatchRemoveAuthorizationApplicationRecordPermissionMemberPathReqBodyBuilder {
	builder.userIds = userIds
	builder.userIdsFlag = true
	return builder
}

func (builder *BatchRemoveAuthorizationApplicationRecordPermissionMemberPathReqBodyBuilder) Build() (*BatchRemoveAuthorizationApplicationRecordPermissionMemberReqBody, error) {
	req := &BatchRemoveAuthorizationApplicationRecordPermissionMemberReqBody{}
	if builder.userIdsFlag {
		req.UserIds = builder.userIds
	}
	return req, nil
}

type BatchRemoveAuthorizationApplicationRecordPermissionMemberReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *BatchRemoveAuthorizationApplicationRecordPermissionMemberReqBody
}

func NewBatchRemoveAuthorizationApplicationRecordPermissionMemberReqBuilder() *BatchRemoveAuthorizationApplicationRecordPermissionMemberReqBuilder {
	builder := &BatchRemoveAuthorizationApplicationRecordPermissionMemberReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 应用命名空间
//
// 示例值：package_test__c
func (builder *BatchRemoveAuthorizationApplicationRecordPermissionMemberReqBuilder) Namespace(namespace string) *BatchRemoveAuthorizationApplicationRecordPermissionMemberReqBuilder {
	builder.apiReq.PathParams.Set("namespace", fmt.Sprint(namespace))
	return builder
}

// 记录权限 API 名称
//
// 示例值：adminRecordPermission
func (builder *BatchRemoveAuthorizationApplicationRecordPermissionMemberReqBuilder) RecordPermissionApiName(recordPermissionApiName string) *BatchRemoveAuthorizationApplicationRecordPermissionMemberReqBuilder {
	builder.apiReq.PathParams.Set("record_permission_api_name", fmt.Sprint(recordPermissionApiName))
	return builder
}

//
func (builder *BatchRemoveAuthorizationApplicationRecordPermissionMemberReqBuilder) Body(body *BatchRemoveAuthorizationApplicationRecordPermissionMemberReqBody) *BatchRemoveAuthorizationApplicationRecordPermissionMemberReqBuilder {
	builder.body = body
	return builder
}

func (builder *BatchRemoveAuthorizationApplicationRecordPermissionMemberReqBuilder) Build() *BatchRemoveAuthorizationApplicationRecordPermissionMemberReq {
	req := &BatchRemoveAuthorizationApplicationRecordPermissionMemberReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type BatchRemoveAuthorizationApplicationRecordPermissionMemberReqBody struct {
	UserIds []string `json:"user_ids,omitempty"` // 需要删除的用户 ID 列表
}

type BatchRemoveAuthorizationApplicationRecordPermissionMemberReq struct {
	apiReq *larkcore.ApiReq
	Body   *BatchRemoveAuthorizationApplicationRecordPermissionMemberReqBody `body:""`
}

type BatchRemoveAuthorizationApplicationRecordPermissionMemberResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *BatchRemoveAuthorizationApplicationRecordPermissionMemberResp) Success() bool {
	return resp.Code == 0
}

type BatchCreateAuthorizationApplicationRoleMemberReqBodyBuilder struct {
	userIds     []string // 需要新增的用户 ID 列表
	userIdsFlag bool

	departmentIds     []string // 需要新增的部门 ID 列表
	departmentIdsFlag bool
}

func NewBatchCreateAuthorizationApplicationRoleMemberReqBodyBuilder() *BatchCreateAuthorizationApplicationRoleMemberReqBodyBuilder {
	builder := &BatchCreateAuthorizationApplicationRoleMemberReqBodyBuilder{}
	return builder
}

// 需要新增的用户 ID 列表
//
//示例值：
func (builder *BatchCreateAuthorizationApplicationRoleMemberReqBodyBuilder) UserIds(userIds []string) *BatchCreateAuthorizationApplicationRoleMemberReqBodyBuilder {
	builder.userIds = userIds
	builder.userIdsFlag = true
	return builder
}

// 需要新增的部门 ID 列表
//
//示例值：
func (builder *BatchCreateAuthorizationApplicationRoleMemberReqBodyBuilder) DepartmentIds(departmentIds []string) *BatchCreateAuthorizationApplicationRoleMemberReqBodyBuilder {
	builder.departmentIds = departmentIds
	builder.departmentIdsFlag = true
	return builder
}

func (builder *BatchCreateAuthorizationApplicationRoleMemberReqBodyBuilder) Build() *BatchCreateAuthorizationApplicationRoleMemberReqBody {
	req := &BatchCreateAuthorizationApplicationRoleMemberReqBody{}
	if builder.userIdsFlag {
		req.UserIds = builder.userIds
	}
	if builder.departmentIdsFlag {
		req.DepartmentIds = builder.departmentIds
	}
	return req
}

type BatchCreateAuthorizationApplicationRoleMemberPathReqBodyBuilder struct {
	userIds           []string
	userIdsFlag       bool
	departmentIds     []string
	departmentIdsFlag bool
}

func NewBatchCreateAuthorizationApplicationRoleMemberPathReqBodyBuilder() *BatchCreateAuthorizationApplicationRoleMemberPathReqBodyBuilder {
	builder := &BatchCreateAuthorizationApplicationRoleMemberPathReqBodyBuilder{}
	return builder
}

// 需要新增的用户 ID 列表
//
// 示例值：
func (builder *BatchCreateAuthorizationApplicationRoleMemberPathReqBodyBuilder) UserIds(userIds []string) *BatchCreateAuthorizationApplicationRoleMemberPathReqBodyBuilder {
	builder.userIds = userIds
	builder.userIdsFlag = true
	return builder
}

// 需要新增的部门 ID 列表
//
// 示例值：
func (builder *BatchCreateAuthorizationApplicationRoleMemberPathReqBodyBuilder) DepartmentIds(departmentIds []string) *BatchCreateAuthorizationApplicationRoleMemberPathReqBodyBuilder {
	builder.departmentIds = departmentIds
	builder.departmentIdsFlag = true
	return builder
}

func (builder *BatchCreateAuthorizationApplicationRoleMemberPathReqBodyBuilder) Build() (*BatchCreateAuthorizationApplicationRoleMemberReqBody, error) {
	req := &BatchCreateAuthorizationApplicationRoleMemberReqBody{}
	if builder.userIdsFlag {
		req.UserIds = builder.userIds
	}
	if builder.departmentIdsFlag {
		req.DepartmentIds = builder.departmentIds
	}
	return req, nil
}

type BatchCreateAuthorizationApplicationRoleMemberReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *BatchCreateAuthorizationApplicationRoleMemberReqBody
}

func NewBatchCreateAuthorizationApplicationRoleMemberReqBuilder() *BatchCreateAuthorizationApplicationRoleMemberReqBuilder {
	builder := &BatchCreateAuthorizationApplicationRoleMemberReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 应用命名空间
//
// 示例值：package_test__c
func (builder *BatchCreateAuthorizationApplicationRoleMemberReqBuilder) Namespace(namespace string) *BatchCreateAuthorizationApplicationRoleMemberReqBuilder {
	builder.apiReq.PathParams.Set("namespace", fmt.Sprint(namespace))
	return builder
}

// 角色 API 名称
//
// 示例值：adminRole
func (builder *BatchCreateAuthorizationApplicationRoleMemberReqBuilder) RoleApiName(roleApiName string) *BatchCreateAuthorizationApplicationRoleMemberReqBuilder {
	builder.apiReq.PathParams.Set("role_api_name", fmt.Sprint(roleApiName))
	return builder
}

// 批量添加角色成员用户和部门
func (builder *BatchCreateAuthorizationApplicationRoleMemberReqBuilder) Body(body *BatchCreateAuthorizationApplicationRoleMemberReqBody) *BatchCreateAuthorizationApplicationRoleMemberReqBuilder {
	builder.body = body
	return builder
}

func (builder *BatchCreateAuthorizationApplicationRoleMemberReqBuilder) Build() *BatchCreateAuthorizationApplicationRoleMemberReq {
	req := &BatchCreateAuthorizationApplicationRoleMemberReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type BatchCreateAuthorizationApplicationRoleMemberReqBody struct {
	UserIds []string `json:"user_ids,omitempty"` // 需要新增的用户 ID 列表

	DepartmentIds []string `json:"department_ids,omitempty"` // 需要新增的部门 ID 列表
}

type BatchCreateAuthorizationApplicationRoleMemberReq struct {
	apiReq *larkcore.ApiReq
	Body   *BatchCreateAuthorizationApplicationRoleMemberReqBody `body:""`
}

type BatchCreateAuthorizationApplicationRoleMemberResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *BatchCreateAuthorizationApplicationRoleMemberResp) Success() bool {
	return resp.Code == 0
}

type BatchRemoveAuthorizationApplicationRoleMemberReqBodyBuilder struct {
	userIds     []string // 需要删除的用户 ID 列表
	userIdsFlag bool

	departmentIds     []string // 需要删除的部门 ID 列表
	departmentIdsFlag bool
}

func NewBatchRemoveAuthorizationApplicationRoleMemberReqBodyBuilder() *BatchRemoveAuthorizationApplicationRoleMemberReqBodyBuilder {
	builder := &BatchRemoveAuthorizationApplicationRoleMemberReqBodyBuilder{}
	return builder
}

// 需要删除的用户 ID 列表
//
//示例值：
func (builder *BatchRemoveAuthorizationApplicationRoleMemberReqBodyBuilder) UserIds(userIds []string) *BatchRemoveAuthorizationApplicationRoleMemberReqBodyBuilder {
	builder.userIds = userIds
	builder.userIdsFlag = true
	return builder
}

// 需要删除的部门 ID 列表
//
//示例值：
func (builder *BatchRemoveAuthorizationApplicationRoleMemberReqBodyBuilder) DepartmentIds(departmentIds []string) *BatchRemoveAuthorizationApplicationRoleMemberReqBodyBuilder {
	builder.departmentIds = departmentIds
	builder.departmentIdsFlag = true
	return builder
}

func (builder *BatchRemoveAuthorizationApplicationRoleMemberReqBodyBuilder) Build() *BatchRemoveAuthorizationApplicationRoleMemberReqBody {
	req := &BatchRemoveAuthorizationApplicationRoleMemberReqBody{}
	if builder.userIdsFlag {
		req.UserIds = builder.userIds
	}
	if builder.departmentIdsFlag {
		req.DepartmentIds = builder.departmentIds
	}
	return req
}

type BatchRemoveAuthorizationApplicationRoleMemberPathReqBodyBuilder struct {
	userIds           []string
	userIdsFlag       bool
	departmentIds     []string
	departmentIdsFlag bool
}

func NewBatchRemoveAuthorizationApplicationRoleMemberPathReqBodyBuilder() *BatchRemoveAuthorizationApplicationRoleMemberPathReqBodyBuilder {
	builder := &BatchRemoveAuthorizationApplicationRoleMemberPathReqBodyBuilder{}
	return builder
}

// 需要删除的用户 ID 列表
//
// 示例值：
func (builder *BatchRemoveAuthorizationApplicationRoleMemberPathReqBodyBuilder) UserIds(userIds []string) *BatchRemoveAuthorizationApplicationRoleMemberPathReqBodyBuilder {
	builder.userIds = userIds
	builder.userIdsFlag = true
	return builder
}

// 需要删除的部门 ID 列表
//
// 示例值：
func (builder *BatchRemoveAuthorizationApplicationRoleMemberPathReqBodyBuilder) DepartmentIds(departmentIds []string) *BatchRemoveAuthorizationApplicationRoleMemberPathReqBodyBuilder {
	builder.departmentIds = departmentIds
	builder.departmentIdsFlag = true
	return builder
}

func (builder *BatchRemoveAuthorizationApplicationRoleMemberPathReqBodyBuilder) Build() (*BatchRemoveAuthorizationApplicationRoleMemberReqBody, error) {
	req := &BatchRemoveAuthorizationApplicationRoleMemberReqBody{}
	if builder.userIdsFlag {
		req.UserIds = builder.userIds
	}
	if builder.departmentIdsFlag {
		req.DepartmentIds = builder.departmentIds
	}
	return req, nil
}

type BatchRemoveAuthorizationApplicationRoleMemberReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *BatchRemoveAuthorizationApplicationRoleMemberReqBody
}

func NewBatchRemoveAuthorizationApplicationRoleMemberReqBuilder() *BatchRemoveAuthorizationApplicationRoleMemberReqBuilder {
	builder := &BatchRemoveAuthorizationApplicationRoleMemberReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 应用命名空间
//
// 示例值：package_test__c
func (builder *BatchRemoveAuthorizationApplicationRoleMemberReqBuilder) Namespace(namespace string) *BatchRemoveAuthorizationApplicationRoleMemberReqBuilder {
	builder.apiReq.PathParams.Set("namespace", fmt.Sprint(namespace))
	return builder
}

// 角色 API 名称
//
// 示例值：adminRole
func (builder *BatchRemoveAuthorizationApplicationRoleMemberReqBuilder) RoleApiName(roleApiName string) *BatchRemoveAuthorizationApplicationRoleMemberReqBuilder {
	builder.apiReq.PathParams.Set("role_api_name", fmt.Sprint(roleApiName))
	return builder
}

// 批量删除角色成员用户和部门
func (builder *BatchRemoveAuthorizationApplicationRoleMemberReqBuilder) Body(body *BatchRemoveAuthorizationApplicationRoleMemberReqBody) *BatchRemoveAuthorizationApplicationRoleMemberReqBuilder {
	builder.body = body
	return builder
}

func (builder *BatchRemoveAuthorizationApplicationRoleMemberReqBuilder) Build() *BatchRemoveAuthorizationApplicationRoleMemberReq {
	req := &BatchRemoveAuthorizationApplicationRoleMemberReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type BatchRemoveAuthorizationApplicationRoleMemberReqBody struct {
	UserIds []string `json:"user_ids,omitempty"` // 需要删除的用户 ID 列表

	DepartmentIds []string `json:"department_ids,omitempty"` // 需要删除的部门 ID 列表
}

type BatchRemoveAuthorizationApplicationRoleMemberReq struct {
	apiReq *larkcore.ApiReq
	Body   *BatchRemoveAuthorizationApplicationRoleMemberReqBody `body:""`
}

type BatchRemoveAuthorizationApplicationRoleMemberResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *BatchRemoveAuthorizationApplicationRoleMemberResp) Success() bool {
	return resp.Code == 0
}

type GetApplicationRoleMemberReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewGetApplicationRoleMemberReqBuilder() *GetApplicationRoleMemberReqBuilder {
	builder := &GetApplicationRoleMemberReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 应用命名空间
//
// 示例值：package_test__c
func (builder *GetApplicationRoleMemberReqBuilder) Namespace(namespace string) *GetApplicationRoleMemberReqBuilder {
	builder.apiReq.PathParams.Set("namespace", fmt.Sprint(namespace))
	return builder
}

// 角色 API 名称
//
// 示例值：adminRole
func (builder *GetApplicationRoleMemberReqBuilder) RoleApiName(roleApiName string) *GetApplicationRoleMemberReqBuilder {
	builder.apiReq.PathParams.Set("role_api_name", fmt.Sprint(roleApiName))
	return builder
}

// 是否需要公式的展示名称，便于前端展示
//
// 示例值：
func (builder *GetApplicationRoleMemberReqBuilder) NeedDisplayName(needDisplayName bool) *GetApplicationRoleMemberReqBuilder {
	builder.apiReq.QueryParams.Set("need_display_name", fmt.Sprint(needDisplayName))
	return builder
}

// 是否使用 APIID字段作为出入参，默认值为 false
//
// 示例值：false
func (builder *GetApplicationRoleMemberReqBuilder) UseApiId(useApiId bool) *GetApplicationRoleMemberReqBuilder {
	builder.apiReq.QueryParams.Set("use_api_id", fmt.Sprint(useApiId))
	return builder
}

func (builder *GetApplicationRoleMemberReqBuilder) Build() *GetApplicationRoleMemberReq {
	req := &GetApplicationRoleMemberReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type GetApplicationRoleMemberReq struct {
	apiReq *larkcore.ApiReq
}

type GetApplicationRoleMemberRespData struct {
	RoleMember *RoleMember `json:"role_member,omitempty"` // 角色成员
}

type GetApplicationRoleMemberResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *GetApplicationRoleMemberRespData `json:"data"` // 业务数据
}

func (resp *GetApplicationRoleMemberResp) Success() bool {
	return resp.Code == 0
}

type CancelApprovalInstanceReqBodyBuilder struct {
	userId     string // 操作用户id
	userIdFlag bool

	opinion     string // 撤销原因
	opinionFlag bool
}

func NewCancelApprovalInstanceReqBodyBuilder() *CancelApprovalInstanceReqBodyBuilder {
	builder := &CancelApprovalInstanceReqBodyBuilder{}
	return builder
}

// 操作用户id
//
//示例值：
func (builder *CancelApprovalInstanceReqBodyBuilder) UserId(userId string) *CancelApprovalInstanceReqBodyBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

// 撤销原因
//
//示例值：撤销了
func (builder *CancelApprovalInstanceReqBodyBuilder) Opinion(opinion string) *CancelApprovalInstanceReqBodyBuilder {
	builder.opinion = opinion
	builder.opinionFlag = true
	return builder
}

func (builder *CancelApprovalInstanceReqBodyBuilder) Build() *CancelApprovalInstanceReqBody {
	req := &CancelApprovalInstanceReqBody{}
	if builder.userIdFlag {
		req.UserId = &builder.userId
	}
	if builder.opinionFlag {
		req.Opinion = &builder.opinion
	}
	return req
}

type CancelApprovalInstancePathReqBodyBuilder struct {
	userId      string
	userIdFlag  bool
	opinion     string
	opinionFlag bool
}

func NewCancelApprovalInstancePathReqBodyBuilder() *CancelApprovalInstancePathReqBodyBuilder {
	builder := &CancelApprovalInstancePathReqBodyBuilder{}
	return builder
}

// 操作用户id
//
// 示例值：
func (builder *CancelApprovalInstancePathReqBodyBuilder) UserId(userId string) *CancelApprovalInstancePathReqBodyBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

// 撤销原因
//
// 示例值：撤销了
func (builder *CancelApprovalInstancePathReqBodyBuilder) Opinion(opinion string) *CancelApprovalInstancePathReqBodyBuilder {
	builder.opinion = opinion
	builder.opinionFlag = true
	return builder
}

func (builder *CancelApprovalInstancePathReqBodyBuilder) Build() (*CancelApprovalInstanceReqBody, error) {
	req := &CancelApprovalInstanceReqBody{}
	if builder.userIdFlag {
		req.UserId = &builder.userId
	}
	if builder.opinionFlag {
		req.Opinion = &builder.opinion
	}
	return req, nil
}

type CancelApprovalInstanceReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *CancelApprovalInstanceReqBody
}

func NewCancelApprovalInstanceReqBuilder() *CancelApprovalInstanceReqBuilder {
	builder := &CancelApprovalInstanceReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 审批实例id
//
// 示例值：1788173550023689
func (builder *CancelApprovalInstanceReqBuilder) ApprovalInstanceId(approvalInstanceId string) *CancelApprovalInstanceReqBuilder {
	builder.apiReq.PathParams.Set("approval_instance_id", fmt.Sprint(approvalInstanceId))
	return builder
}

//
func (builder *CancelApprovalInstanceReqBuilder) Body(body *CancelApprovalInstanceReqBody) *CancelApprovalInstanceReqBuilder {
	builder.body = body
	return builder
}

func (builder *CancelApprovalInstanceReqBuilder) Build() *CancelApprovalInstanceReq {
	req := &CancelApprovalInstanceReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type CancelApprovalInstanceReqBody struct {
	UserId *string `json:"user_id,omitempty"` // 操作用户id

	Opinion *string `json:"opinion,omitempty"` // 撤销原因
}

type CancelApprovalInstanceReq struct {
	apiReq *larkcore.ApiReq
	Body   *CancelApprovalInstanceReqBody `body:""`
}

type CancelApprovalInstanceResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *CancelApprovalInstanceResp) Success() bool {
	return resp.Code == 0
}

type AddAssigneeApprovalTaskReqBodyBuilder struct {
	userId     string // 操作人id
	userIdFlag bool

	approvers     []string // 审批人列表
	approversFlag bool

	addAssigneeType     string // 加签类型
	addAssigneeTypeFlag bool

	opinion     string // 加签原因
	opinionFlag bool
}

func NewAddAssigneeApprovalTaskReqBodyBuilder() *AddAssigneeApprovalTaskReqBodyBuilder {
	builder := &AddAssigneeApprovalTaskReqBodyBuilder{}
	return builder
}

// 操作人id
//
//示例值：
func (builder *AddAssigneeApprovalTaskReqBodyBuilder) UserId(userId string) *AddAssigneeApprovalTaskReqBodyBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

// 审批人列表
//
//示例值：
func (builder *AddAssigneeApprovalTaskReqBodyBuilder) Approvers(approvers []string) *AddAssigneeApprovalTaskReqBodyBuilder {
	builder.approvers = approvers
	builder.approversFlag = true
	return builder
}

// 加签类型
//
//示例值：currentAndAddAssign
func (builder *AddAssigneeApprovalTaskReqBodyBuilder) AddAssigneeType(addAssigneeType string) *AddAssigneeApprovalTaskReqBodyBuilder {
	builder.addAssigneeType = addAssigneeType
	builder.addAssigneeTypeFlag = true
	return builder
}

// 加签原因
//
//示例值：加签
func (builder *AddAssigneeApprovalTaskReqBodyBuilder) Opinion(opinion string) *AddAssigneeApprovalTaskReqBodyBuilder {
	builder.opinion = opinion
	builder.opinionFlag = true
	return builder
}

func (builder *AddAssigneeApprovalTaskReqBodyBuilder) Build() *AddAssigneeApprovalTaskReqBody {
	req := &AddAssigneeApprovalTaskReqBody{}
	if builder.userIdFlag {
		req.UserId = &builder.userId
	}
	if builder.approversFlag {
		req.Approvers = builder.approvers
	}
	if builder.addAssigneeTypeFlag {
		req.AddAssigneeType = &builder.addAssigneeType
	}
	if builder.opinionFlag {
		req.Opinion = &builder.opinion
	}
	return req
}

type AddAssigneeApprovalTaskPathReqBodyBuilder struct {
	userId              string
	userIdFlag          bool
	approvers           []string
	approversFlag       bool
	addAssigneeType     string
	addAssigneeTypeFlag bool
	opinion             string
	opinionFlag         bool
}

func NewAddAssigneeApprovalTaskPathReqBodyBuilder() *AddAssigneeApprovalTaskPathReqBodyBuilder {
	builder := &AddAssigneeApprovalTaskPathReqBodyBuilder{}
	return builder
}

// 操作人id
//
// 示例值：
func (builder *AddAssigneeApprovalTaskPathReqBodyBuilder) UserId(userId string) *AddAssigneeApprovalTaskPathReqBodyBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

// 审批人列表
//
// 示例值：
func (builder *AddAssigneeApprovalTaskPathReqBodyBuilder) Approvers(approvers []string) *AddAssigneeApprovalTaskPathReqBodyBuilder {
	builder.approvers = approvers
	builder.approversFlag = true
	return builder
}

// 加签类型
//
// 示例值：currentAndAddAssign
func (builder *AddAssigneeApprovalTaskPathReqBodyBuilder) AddAssigneeType(addAssigneeType string) *AddAssigneeApprovalTaskPathReqBodyBuilder {
	builder.addAssigneeType = addAssigneeType
	builder.addAssigneeTypeFlag = true
	return builder
}

// 加签原因
//
// 示例值：加签
func (builder *AddAssigneeApprovalTaskPathReqBodyBuilder) Opinion(opinion string) *AddAssigneeApprovalTaskPathReqBodyBuilder {
	builder.opinion = opinion
	builder.opinionFlag = true
	return builder
}

func (builder *AddAssigneeApprovalTaskPathReqBodyBuilder) Build() (*AddAssigneeApprovalTaskReqBody, error) {
	req := &AddAssigneeApprovalTaskReqBody{}
	if builder.userIdFlag {
		req.UserId = &builder.userId
	}
	if builder.approversFlag {
		req.Approvers = builder.approvers
	}
	if builder.addAssigneeTypeFlag {
		req.AddAssigneeType = &builder.addAssigneeType
	}
	if builder.opinionFlag {
		req.Opinion = &builder.opinion
	}
	return req, nil
}

type AddAssigneeApprovalTaskReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *AddAssigneeApprovalTaskReqBody
}

func NewAddAssigneeApprovalTaskReqBuilder() *AddAssigneeApprovalTaskReqBuilder {
	builder := &AddAssigneeApprovalTaskReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 审批任务id
//
// 示例值：1785771068261436
func (builder *AddAssigneeApprovalTaskReqBuilder) ApprovalTaskId(approvalTaskId string) *AddAssigneeApprovalTaskReqBuilder {
	builder.apiReq.PathParams.Set("approval_task_id", fmt.Sprint(approvalTaskId))
	return builder
}

//
func (builder *AddAssigneeApprovalTaskReqBuilder) Body(body *AddAssigneeApprovalTaskReqBody) *AddAssigneeApprovalTaskReqBuilder {
	builder.body = body
	return builder
}

func (builder *AddAssigneeApprovalTaskReqBuilder) Build() *AddAssigneeApprovalTaskReq {
	req := &AddAssigneeApprovalTaskReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type AddAssigneeApprovalTaskReqBody struct {
	UserId *string `json:"user_id,omitempty"` // 操作人id

	Approvers []string `json:"approvers,omitempty"` // 审批人列表

	AddAssigneeType *string `json:"add_assignee_type,omitempty"` // 加签类型

	Opinion *string `json:"opinion,omitempty"` // 加签原因
}

type AddAssigneeApprovalTaskReq struct {
	apiReq *larkcore.ApiReq
	Body   *AddAssigneeApprovalTaskReqBody `body:""`
}

type AddAssigneeApprovalTaskResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *AddAssigneeApprovalTaskResp) Success() bool {
	return resp.Code == 0
}

type AgreeApprovalTaskReqBodyBuilder struct {
	userId     string // 操作人id
	userIdFlag bool

	opinion     string // 审批意见
	opinionFlag bool
}

func NewAgreeApprovalTaskReqBodyBuilder() *AgreeApprovalTaskReqBodyBuilder {
	builder := &AgreeApprovalTaskReqBodyBuilder{}
	return builder
}

// 操作人id
//
//示例值：
func (builder *AgreeApprovalTaskReqBodyBuilder) UserId(userId string) *AgreeApprovalTaskReqBodyBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

// 审批意见
//
//示例值：同意
func (builder *AgreeApprovalTaskReqBodyBuilder) Opinion(opinion string) *AgreeApprovalTaskReqBodyBuilder {
	builder.opinion = opinion
	builder.opinionFlag = true
	return builder
}

func (builder *AgreeApprovalTaskReqBodyBuilder) Build() *AgreeApprovalTaskReqBody {
	req := &AgreeApprovalTaskReqBody{}
	if builder.userIdFlag {
		req.UserId = &builder.userId
	}
	if builder.opinionFlag {
		req.Opinion = &builder.opinion
	}
	return req
}

type AgreeApprovalTaskPathReqBodyBuilder struct {
	userId      string
	userIdFlag  bool
	opinion     string
	opinionFlag bool
}

func NewAgreeApprovalTaskPathReqBodyBuilder() *AgreeApprovalTaskPathReqBodyBuilder {
	builder := &AgreeApprovalTaskPathReqBodyBuilder{}
	return builder
}

// 操作人id
//
// 示例值：
func (builder *AgreeApprovalTaskPathReqBodyBuilder) UserId(userId string) *AgreeApprovalTaskPathReqBodyBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

// 审批意见
//
// 示例值：同意
func (builder *AgreeApprovalTaskPathReqBodyBuilder) Opinion(opinion string) *AgreeApprovalTaskPathReqBodyBuilder {
	builder.opinion = opinion
	builder.opinionFlag = true
	return builder
}

func (builder *AgreeApprovalTaskPathReqBodyBuilder) Build() (*AgreeApprovalTaskReqBody, error) {
	req := &AgreeApprovalTaskReqBody{}
	if builder.userIdFlag {
		req.UserId = &builder.userId
	}
	if builder.opinionFlag {
		req.Opinion = &builder.opinion
	}
	return req, nil
}

type AgreeApprovalTaskReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *AgreeApprovalTaskReqBody
}

func NewAgreeApprovalTaskReqBuilder() *AgreeApprovalTaskReqBuilder {
	builder := &AgreeApprovalTaskReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 审批任务id
//
// 示例值：1785996265147395
func (builder *AgreeApprovalTaskReqBuilder) ApprovalTaskId(approvalTaskId string) *AgreeApprovalTaskReqBuilder {
	builder.apiReq.PathParams.Set("approval_task_id", fmt.Sprint(approvalTaskId))
	return builder
}

//
func (builder *AgreeApprovalTaskReqBuilder) Body(body *AgreeApprovalTaskReqBody) *AgreeApprovalTaskReqBuilder {
	builder.body = body
	return builder
}

func (builder *AgreeApprovalTaskReqBuilder) Build() *AgreeApprovalTaskReq {
	req := &AgreeApprovalTaskReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type AgreeApprovalTaskReqBody struct {
	UserId *string `json:"user_id,omitempty"` // 操作人id

	Opinion *string `json:"opinion,omitempty"` // 审批意见
}

type AgreeApprovalTaskReq struct {
	apiReq *larkcore.ApiReq
	Body   *AgreeApprovalTaskReqBody `body:""`
}

type AgreeApprovalTaskResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *AgreeApprovalTaskResp) Success() bool {
	return resp.Code == 0
}

type RejectApprovalTaskReqBodyBuilder struct {
	userId     string // 操作用户id
	userIdFlag bool

	opinion     string // 审批意见
	opinionFlag bool
}

func NewRejectApprovalTaskReqBodyBuilder() *RejectApprovalTaskReqBodyBuilder {
	builder := &RejectApprovalTaskReqBodyBuilder{}
	return builder
}

// 操作用户id
//
//示例值：
func (builder *RejectApprovalTaskReqBodyBuilder) UserId(userId string) *RejectApprovalTaskReqBodyBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

// 审批意见
//
//示例值：拒绝
func (builder *RejectApprovalTaskReqBodyBuilder) Opinion(opinion string) *RejectApprovalTaskReqBodyBuilder {
	builder.opinion = opinion
	builder.opinionFlag = true
	return builder
}

func (builder *RejectApprovalTaskReqBodyBuilder) Build() *RejectApprovalTaskReqBody {
	req := &RejectApprovalTaskReqBody{}
	if builder.userIdFlag {
		req.UserId = &builder.userId
	}
	if builder.opinionFlag {
		req.Opinion = &builder.opinion
	}
	return req
}

type RejectApprovalTaskPathReqBodyBuilder struct {
	userId      string
	userIdFlag  bool
	opinion     string
	opinionFlag bool
}

func NewRejectApprovalTaskPathReqBodyBuilder() *RejectApprovalTaskPathReqBodyBuilder {
	builder := &RejectApprovalTaskPathReqBodyBuilder{}
	return builder
}

// 操作用户id
//
// 示例值：
func (builder *RejectApprovalTaskPathReqBodyBuilder) UserId(userId string) *RejectApprovalTaskPathReqBodyBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

// 审批意见
//
// 示例值：拒绝
func (builder *RejectApprovalTaskPathReqBodyBuilder) Opinion(opinion string) *RejectApprovalTaskPathReqBodyBuilder {
	builder.opinion = opinion
	builder.opinionFlag = true
	return builder
}

func (builder *RejectApprovalTaskPathReqBodyBuilder) Build() (*RejectApprovalTaskReqBody, error) {
	req := &RejectApprovalTaskReqBody{}
	if builder.userIdFlag {
		req.UserId = &builder.userId
	}
	if builder.opinionFlag {
		req.Opinion = &builder.opinion
	}
	return req, nil
}

type RejectApprovalTaskReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *RejectApprovalTaskReqBody
}

func NewRejectApprovalTaskReqBuilder() *RejectApprovalTaskReqBuilder {
	builder := &RejectApprovalTaskReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 审批任务id
//
// 示例值：1785996265147395
func (builder *RejectApprovalTaskReqBuilder) ApprovalTaskId(approvalTaskId string) *RejectApprovalTaskReqBuilder {
	builder.apiReq.PathParams.Set("approval_task_id", fmt.Sprint(approvalTaskId))
	return builder
}

//
func (builder *RejectApprovalTaskReqBuilder) Body(body *RejectApprovalTaskReqBody) *RejectApprovalTaskReqBuilder {
	builder.body = body
	return builder
}

func (builder *RejectApprovalTaskReqBuilder) Build() *RejectApprovalTaskReq {
	req := &RejectApprovalTaskReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type RejectApprovalTaskReqBody struct {
	UserId *string `json:"user_id,omitempty"` // 操作用户id

	Opinion *string `json:"opinion,omitempty"` // 审批意见
}

type RejectApprovalTaskReq struct {
	apiReq *larkcore.ApiReq
	Body   *RejectApprovalTaskReqBody `body:""`
}

type RejectApprovalTaskResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *RejectApprovalTaskResp) Success() bool {
	return resp.Code == 0
}

type TransferApprovalTaskReqBodyBuilder struct {
	userId     string // 操作人id
	userIdFlag bool

	fromUserIds     []string // 原审批人id
	fromUserIdsFlag bool

	toUserIds     []string // 新审批人id
	toUserIdsFlag bool

	opinion     string // 审批意见
	opinionFlag bool
}

func NewTransferApprovalTaskReqBodyBuilder() *TransferApprovalTaskReqBodyBuilder {
	builder := &TransferApprovalTaskReqBodyBuilder{}
	return builder
}

// 操作人id
//
//示例值：
func (builder *TransferApprovalTaskReqBodyBuilder) UserId(userId string) *TransferApprovalTaskReqBodyBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

// 原审批人id
//
//示例值：
func (builder *TransferApprovalTaskReqBodyBuilder) FromUserIds(fromUserIds []string) *TransferApprovalTaskReqBodyBuilder {
	builder.fromUserIds = fromUserIds
	builder.fromUserIdsFlag = true
	return builder
}

// 新审批人id
//
//示例值：
func (builder *TransferApprovalTaskReqBodyBuilder) ToUserIds(toUserIds []string) *TransferApprovalTaskReqBodyBuilder {
	builder.toUserIds = toUserIds
	builder.toUserIdsFlag = true
	return builder
}

// 审批意见
//
//示例值：转交
func (builder *TransferApprovalTaskReqBodyBuilder) Opinion(opinion string) *TransferApprovalTaskReqBodyBuilder {
	builder.opinion = opinion
	builder.opinionFlag = true
	return builder
}

func (builder *TransferApprovalTaskReqBodyBuilder) Build() *TransferApprovalTaskReqBody {
	req := &TransferApprovalTaskReqBody{}
	if builder.userIdFlag {
		req.UserId = &builder.userId
	}
	if builder.fromUserIdsFlag {
		req.FromUserIds = builder.fromUserIds
	}
	if builder.toUserIdsFlag {
		req.ToUserIds = builder.toUserIds
	}
	if builder.opinionFlag {
		req.Opinion = &builder.opinion
	}
	return req
}

type TransferApprovalTaskPathReqBodyBuilder struct {
	userId          string
	userIdFlag      bool
	fromUserIds     []string
	fromUserIdsFlag bool
	toUserIds       []string
	toUserIdsFlag   bool
	opinion         string
	opinionFlag     bool
}

func NewTransferApprovalTaskPathReqBodyBuilder() *TransferApprovalTaskPathReqBodyBuilder {
	builder := &TransferApprovalTaskPathReqBodyBuilder{}
	return builder
}

// 操作人id
//
// 示例值：
func (builder *TransferApprovalTaskPathReqBodyBuilder) UserId(userId string) *TransferApprovalTaskPathReqBodyBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

// 原审批人id
//
// 示例值：
func (builder *TransferApprovalTaskPathReqBodyBuilder) FromUserIds(fromUserIds []string) *TransferApprovalTaskPathReqBodyBuilder {
	builder.fromUserIds = fromUserIds
	builder.fromUserIdsFlag = true
	return builder
}

// 新审批人id
//
// 示例值：
func (builder *TransferApprovalTaskPathReqBodyBuilder) ToUserIds(toUserIds []string) *TransferApprovalTaskPathReqBodyBuilder {
	builder.toUserIds = toUserIds
	builder.toUserIdsFlag = true
	return builder
}

// 审批意见
//
// 示例值：转交
func (builder *TransferApprovalTaskPathReqBodyBuilder) Opinion(opinion string) *TransferApprovalTaskPathReqBodyBuilder {
	builder.opinion = opinion
	builder.opinionFlag = true
	return builder
}

func (builder *TransferApprovalTaskPathReqBodyBuilder) Build() (*TransferApprovalTaskReqBody, error) {
	req := &TransferApprovalTaskReqBody{}
	if builder.userIdFlag {
		req.UserId = &builder.userId
	}
	if builder.fromUserIdsFlag {
		req.FromUserIds = builder.fromUserIds
	}
	if builder.toUserIdsFlag {
		req.ToUserIds = builder.toUserIds
	}
	if builder.opinionFlag {
		req.Opinion = &builder.opinion
	}
	return req, nil
}

type TransferApprovalTaskReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *TransferApprovalTaskReqBody
}

func NewTransferApprovalTaskReqBuilder() *TransferApprovalTaskReqBuilder {
	builder := &TransferApprovalTaskReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 审批任务id
//
// 示例值：1785996265147395
func (builder *TransferApprovalTaskReqBuilder) ApprovalTaskId(approvalTaskId string) *TransferApprovalTaskReqBuilder {
	builder.apiReq.PathParams.Set("approval_task_id", fmt.Sprint(approvalTaskId))
	return builder
}

//
func (builder *TransferApprovalTaskReqBuilder) Body(body *TransferApprovalTaskReqBody) *TransferApprovalTaskReqBuilder {
	builder.body = body
	return builder
}

func (builder *TransferApprovalTaskReqBuilder) Build() *TransferApprovalTaskReq {
	req := &TransferApprovalTaskReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type TransferApprovalTaskReqBody struct {
	UserId *string `json:"user_id,omitempty"` // 操作人id

	FromUserIds []string `json:"from_user_ids,omitempty"` // 原审批人id

	ToUserIds []string `json:"to_user_ids,omitempty"` // 新审批人id

	Opinion *string `json:"opinion,omitempty"` // 审批意见
}

type TransferApprovalTaskReq struct {
	apiReq *larkcore.ApiReq
	Body   *TransferApprovalTaskReqBody `body:""`
}

type TransferApprovalTaskResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *TransferApprovalTaskResp) Success() bool {
	return resp.Code == 0
}

type ListSeatActivityReqBuilder struct {
	apiReq *larkcore.ApiReq
	limit  int // 最大返回多少记录，当使用迭代器访问时才有效
}

func NewListSeatActivityReqBuilder() *ListSeatActivityReqBuilder {
	builder := &ListSeatActivityReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 最大返回多少记录，当使用迭代器访问时才有效
func (builder *ListSeatActivityReqBuilder) Limit(limit int) *ListSeatActivityReqBuilder {
	builder.limit = limit
	return builder
}

// 席位类型，枚举值：1. 平台席位2. 应用席位
//
// 示例值：per_user
func (builder *ListSeatActivityReqBuilder) SeatType(seatType string) *ListSeatActivityReqBuilder {
	builder.apiReq.QueryParams.Set("seat_type", fmt.Sprint(seatType))
	return builder
}

// 分页大小，必填，范围：【0，500】
//
// 示例值：10
func (builder *ListSeatActivityReqBuilder) PageSize(pageSize string) *ListSeatActivityReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 分页标记，第一次请求不填，表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该 page_token 获取查询结果
//
// 示例值：eVQrYzJBNDNONlk4VFZBZVlSdzlKdFJ4bVVHVExENDNKVHoxaVdiVnViQT0
func (builder *ListSeatActivityReqBuilder) PageToken(pageToken string) *ListSeatActivityReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

func (builder *ListSeatActivityReqBuilder) Build() *ListSeatActivityReq {
	req := &ListSeatActivityReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.Limit = builder.limit
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type ListSeatActivityReq struct {
	apiReq *larkcore.ApiReq
	Limit  int // 最多返回多少记录，只有在使用迭代器访问时，才有效

}

type ListSeatActivityRespData struct {
	Items []*SeatActivity `json:"items,omitempty"` // 席位活跃情况列表

	PageToken *string `json:"page_token,omitempty"` // 分页标记，当 has_more 为 true 时，会同时返回新的 page_token，否则不返回 page_token

	HasMore *bool `json:"has_more,omitempty"` // 是否还有更多项
}

type ListSeatActivityResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ListSeatActivityRespData `json:"data"` // 业务数据
}

func (resp *ListSeatActivityResp) Success() bool {
	return resp.Code == 0
}

type ListSeatAssignmentReqBuilder struct {
	apiReq *larkcore.ApiReq
	limit  int // 最大返回多少记录，当使用迭代器访问时才有效
}

func NewListSeatAssignmentReqBuilder() *ListSeatAssignmentReqBuilder {
	builder := &ListSeatAssignmentReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 最大返回多少记录，当使用迭代器访问时才有效
func (builder *ListSeatAssignmentReqBuilder) Limit(limit int) *ListSeatAssignmentReqBuilder {
	builder.limit = limit
	return builder
}

// 席位类型，枚举值：1.平台席位 2. 应用访问席位
//
// 示例值：per_user
func (builder *ListSeatAssignmentReqBuilder) SeatType(seatType string) *ListSeatAssignmentReqBuilder {
	builder.apiReq.QueryParams.Set("seat_type", fmt.Sprint(seatType))
	return builder
}

// 分页大小，范围：【0，500】
//
// 示例值：10
func (builder *ListSeatAssignmentReqBuilder) PageSize(pageSize string) *ListSeatAssignmentReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 分页标记，第一次请求不填，表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该 page_token 获取查询结果
//
// 示例值：eVQrYzJBNDNONlk4VFZBZVlSdzlKdFJ4bVVHVExENDNKVHoxaVdiVnViQT0
func (builder *ListSeatAssignmentReqBuilder) PageToken(pageToken string) *ListSeatAssignmentReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

func (builder *ListSeatAssignmentReqBuilder) Build() *ListSeatAssignmentReq {
	req := &ListSeatAssignmentReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.Limit = builder.limit
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type ListSeatAssignmentReq struct {
	apiReq *larkcore.ApiReq
	Limit  int // 最多返回多少记录，只有在使用迭代器访问时，才有效

}

type ListSeatAssignmentRespData struct {
	Items []*SeatAssignment `json:"items,omitempty"` // 席位分配情况列表

	PageToken *string `json:"page_token,omitempty"` // 分页标记，当 has_more 为 true 时，会同时返回新的 page_token，否则不返回 page_token

	HasMore *bool `json:"has_more,omitempty"` // 是否还有更多项
}

type ListSeatAssignmentResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ListSeatAssignmentRespData `json:"data"` // 业务数据
}

func (resp *ListSeatAssignmentResp) Success() bool {
	return resp.Code == 0
}

type CcUserTaskReqBodyBuilder struct {
	ccUserIds     []string // 抄送人的kunlunID列表
	ccUserIdsFlag bool

	operatorUserId     string // 操作人kunlunUserID
	operatorUserIdFlag bool
}

func NewCcUserTaskReqBodyBuilder() *CcUserTaskReqBodyBuilder {
	builder := &CcUserTaskReqBodyBuilder{}
	return builder
}

// 抄送人的kunlunID列表
//
//示例值：
func (builder *CcUserTaskReqBodyBuilder) CcUserIds(ccUserIds []string) *CcUserTaskReqBodyBuilder {
	builder.ccUserIds = ccUserIds
	builder.ccUserIdsFlag = true
	return builder
}

// 操作人kunlunUserID
//
//示例值：1234
func (builder *CcUserTaskReqBodyBuilder) OperatorUserId(operatorUserId string) *CcUserTaskReqBodyBuilder {
	builder.operatorUserId = operatorUserId
	builder.operatorUserIdFlag = true
	return builder
}

func (builder *CcUserTaskReqBodyBuilder) Build() *CcUserTaskReqBody {
	req := &CcUserTaskReqBody{}
	if builder.ccUserIdsFlag {
		req.CcUserIds = builder.ccUserIds
	}
	if builder.operatorUserIdFlag {
		req.OperatorUserId = &builder.operatorUserId
	}
	return req
}

type CcUserTaskPathReqBodyBuilder struct {
	ccUserIds          []string
	ccUserIdsFlag      bool
	operatorUserId     string
	operatorUserIdFlag bool
}

func NewCcUserTaskPathReqBodyBuilder() *CcUserTaskPathReqBodyBuilder {
	builder := &CcUserTaskPathReqBodyBuilder{}
	return builder
}

// 抄送人的kunlunID列表
//
// 示例值：
func (builder *CcUserTaskPathReqBodyBuilder) CcUserIds(ccUserIds []string) *CcUserTaskPathReqBodyBuilder {
	builder.ccUserIds = ccUserIds
	builder.ccUserIdsFlag = true
	return builder
}

// 操作人kunlunUserID
//
// 示例值：1234
func (builder *CcUserTaskPathReqBodyBuilder) OperatorUserId(operatorUserId string) *CcUserTaskPathReqBodyBuilder {
	builder.operatorUserId = operatorUserId
	builder.operatorUserIdFlag = true
	return builder
}

func (builder *CcUserTaskPathReqBodyBuilder) Build() (*CcUserTaskReqBody, error) {
	req := &CcUserTaskReqBody{}
	if builder.ccUserIdsFlag {
		req.CcUserIds = builder.ccUserIds
	}
	if builder.operatorUserIdFlag {
		req.OperatorUserId = &builder.operatorUserId
	}
	return req, nil
}

type CcUserTaskReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *CcUserTaskReqBody
}

func NewCcUserTaskReqBuilder() *CcUserTaskReqBuilder {
	builder := &CcUserTaskReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 任务ID
//
// 示例值：1234
func (builder *CcUserTaskReqBuilder) TaskId(taskId string) *CcUserTaskReqBuilder {
	builder.apiReq.PathParams.Set("task_id", fmt.Sprint(taskId))
	return builder
}

//
func (builder *CcUserTaskReqBuilder) Body(body *CcUserTaskReqBody) *CcUserTaskReqBuilder {
	builder.body = body
	return builder
}

func (builder *CcUserTaskReqBuilder) Build() *CcUserTaskReq {
	req := &CcUserTaskReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type CcUserTaskReqBody struct {
	CcUserIds []string `json:"cc_user_ids,omitempty"` // 抄送人的kunlunID列表

	OperatorUserId *string `json:"operator_user_id,omitempty"` // 操作人kunlunUserID
}

type CcUserTaskReq struct {
	apiReq *larkcore.ApiReq
	Body   *CcUserTaskReqBody `body:""`
}

type CcUserTaskResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *CcUserTaskResp) Success() bool {
	return resp.Code == 0
}

type ChatGroupUserTaskReqBodyBuilder struct {
	operatorUserId     string // 操作人kunlunUserID
	operatorUserIdFlag bool

	inviteUserIds     []string // 要邀请进群用户ID列表
	inviteUserIdsFlag bool

	chatId     string // 要拉入的群ID，为空则新建群
	chatIdFlag bool

	chatName     string // 要加入的群名称，当chat_id为空时用该名称创建群聊;
	chatNameFlag bool
}

func NewChatGroupUserTaskReqBodyBuilder() *ChatGroupUserTaskReqBodyBuilder {
	builder := &ChatGroupUserTaskReqBodyBuilder{}
	return builder
}

// 操作人kunlunUserID
//
//示例值：1234
func (builder *ChatGroupUserTaskReqBodyBuilder) OperatorUserId(operatorUserId string) *ChatGroupUserTaskReqBodyBuilder {
	builder.operatorUserId = operatorUserId
	builder.operatorUserIdFlag = true
	return builder
}

// 要邀请进群用户ID列表
//
//示例值：
func (builder *ChatGroupUserTaskReqBodyBuilder) InviteUserIds(inviteUserIds []string) *ChatGroupUserTaskReqBodyBuilder {
	builder.inviteUserIds = inviteUserIds
	builder.inviteUserIdsFlag = true
	return builder
}

// 要拉入的群ID，为空则新建群
//
//示例值：oc_1234
func (builder *ChatGroupUserTaskReqBodyBuilder) ChatId(chatId string) *ChatGroupUserTaskReqBodyBuilder {
	builder.chatId = chatId
	builder.chatIdFlag = true
	return builder
}

// 要加入的群名称，当chat_id为空时用该名称创建群聊;
//
//示例值：群名称
func (builder *ChatGroupUserTaskReqBodyBuilder) ChatName(chatName string) *ChatGroupUserTaskReqBodyBuilder {
	builder.chatName = chatName
	builder.chatNameFlag = true
	return builder
}

func (builder *ChatGroupUserTaskReqBodyBuilder) Build() *ChatGroupUserTaskReqBody {
	req := &ChatGroupUserTaskReqBody{}
	if builder.operatorUserIdFlag {
		req.OperatorUserId = &builder.operatorUserId
	}
	if builder.inviteUserIdsFlag {
		req.InviteUserIds = builder.inviteUserIds
	}
	if builder.chatIdFlag {
		req.ChatId = &builder.chatId
	}
	if builder.chatNameFlag {
		req.ChatName = &builder.chatName
	}
	return req
}

type ChatGroupUserTaskPathReqBodyBuilder struct {
	operatorUserId     string
	operatorUserIdFlag bool
	inviteUserIds      []string
	inviteUserIdsFlag  bool
	chatId             string
	chatIdFlag         bool
	chatName           string
	chatNameFlag       bool
}

func NewChatGroupUserTaskPathReqBodyBuilder() *ChatGroupUserTaskPathReqBodyBuilder {
	builder := &ChatGroupUserTaskPathReqBodyBuilder{}
	return builder
}

// 操作人kunlunUserID
//
// 示例值：1234
func (builder *ChatGroupUserTaskPathReqBodyBuilder) OperatorUserId(operatorUserId string) *ChatGroupUserTaskPathReqBodyBuilder {
	builder.operatorUserId = operatorUserId
	builder.operatorUserIdFlag = true
	return builder
}

// 要邀请进群用户ID列表
//
// 示例值：
func (builder *ChatGroupUserTaskPathReqBodyBuilder) InviteUserIds(inviteUserIds []string) *ChatGroupUserTaskPathReqBodyBuilder {
	builder.inviteUserIds = inviteUserIds
	builder.inviteUserIdsFlag = true
	return builder
}

// 要拉入的群ID，为空则新建群
//
// 示例值：oc_1234
func (builder *ChatGroupUserTaskPathReqBodyBuilder) ChatId(chatId string) *ChatGroupUserTaskPathReqBodyBuilder {
	builder.chatId = chatId
	builder.chatIdFlag = true
	return builder
}

// 要加入的群名称，当chat_id为空时用该名称创建群聊;
//
// 示例值：群名称
func (builder *ChatGroupUserTaskPathReqBodyBuilder) ChatName(chatName string) *ChatGroupUserTaskPathReqBodyBuilder {
	builder.chatName = chatName
	builder.chatNameFlag = true
	return builder
}

func (builder *ChatGroupUserTaskPathReqBodyBuilder) Build() (*ChatGroupUserTaskReqBody, error) {
	req := &ChatGroupUserTaskReqBody{}
	if builder.operatorUserIdFlag {
		req.OperatorUserId = &builder.operatorUserId
	}
	if builder.inviteUserIdsFlag {
		req.InviteUserIds = builder.inviteUserIds
	}
	if builder.chatIdFlag {
		req.ChatId = &builder.chatId
	}
	if builder.chatNameFlag {
		req.ChatName = &builder.chatName
	}
	return req, nil
}

type ChatGroupUserTaskReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *ChatGroupUserTaskReqBody
}

func NewChatGroupUserTaskReqBuilder() *ChatGroupUserTaskReqBuilder {
	builder := &ChatGroupUserTaskReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 任务ID
//
// 示例值：1234
func (builder *ChatGroupUserTaskReqBuilder) TaskId(taskId string) *ChatGroupUserTaskReqBuilder {
	builder.apiReq.PathParams.Set("task_id", fmt.Sprint(taskId))
	return builder
}

//
func (builder *ChatGroupUserTaskReqBuilder) Body(body *ChatGroupUserTaskReqBody) *ChatGroupUserTaskReqBuilder {
	builder.body = body
	return builder
}

func (builder *ChatGroupUserTaskReqBuilder) Build() *ChatGroupUserTaskReq {
	req := &ChatGroupUserTaskReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type ChatGroupUserTaskReqBody struct {
	OperatorUserId *string `json:"operator_user_id,omitempty"` // 操作人kunlunUserID

	InviteUserIds []string `json:"invite_user_ids,omitempty"` // 要邀请进群用户ID列表

	ChatId *string `json:"chat_id,omitempty"` // 要拉入的群ID，为空则新建群

	ChatName *string `json:"chat_name,omitempty"` // 要加入的群名称，当chat_id为空时用该名称创建群聊;
}

type ChatGroupUserTaskReq struct {
	apiReq *larkcore.ApiReq
	Body   *ChatGroupUserTaskReqBody `body:""`
}

type ChatGroupUserTaskRespData struct {
	ChatId *string `json:"chat_id,omitempty"` // 创建的群聊ID
}

type ChatGroupUserTaskResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ChatGroupUserTaskRespData `json:"data"` // 业务数据
}

func (resp *ChatGroupUserTaskResp) Success() bool {
	return resp.Code == 0
}

type ExpeditingUserTaskReqBodyBuilder struct {
	operatorUserId     string // 操作人kunlunUserID
	operatorUserIdFlag bool

	expeditingUserIds     []string // 催办人的kunlunID列表
	expeditingUserIdsFlag bool

	opinion     string // 催办理由
	opinionFlag bool
}

func NewExpeditingUserTaskReqBodyBuilder() *ExpeditingUserTaskReqBodyBuilder {
	builder := &ExpeditingUserTaskReqBodyBuilder{}
	return builder
}

// 操作人kunlunUserID
//
//示例值：123
func (builder *ExpeditingUserTaskReqBodyBuilder) OperatorUserId(operatorUserId string) *ExpeditingUserTaskReqBodyBuilder {
	builder.operatorUserId = operatorUserId
	builder.operatorUserIdFlag = true
	return builder
}

// 催办人的kunlunID列表
//
//示例值：
func (builder *ExpeditingUserTaskReqBodyBuilder) ExpeditingUserIds(expeditingUserIds []string) *ExpeditingUserTaskReqBodyBuilder {
	builder.expeditingUserIds = expeditingUserIds
	builder.expeditingUserIdsFlag = true
	return builder
}

// 催办理由
//
//示例值：催办理由
func (builder *ExpeditingUserTaskReqBodyBuilder) Opinion(opinion string) *ExpeditingUserTaskReqBodyBuilder {
	builder.opinion = opinion
	builder.opinionFlag = true
	return builder
}

func (builder *ExpeditingUserTaskReqBodyBuilder) Build() *ExpeditingUserTaskReqBody {
	req := &ExpeditingUserTaskReqBody{}
	if builder.operatorUserIdFlag {
		req.OperatorUserId = &builder.operatorUserId
	}
	if builder.expeditingUserIdsFlag {
		req.ExpeditingUserIds = builder.expeditingUserIds
	}
	if builder.opinionFlag {
		req.Opinion = &builder.opinion
	}
	return req
}

type ExpeditingUserTaskPathReqBodyBuilder struct {
	operatorUserId        string
	operatorUserIdFlag    bool
	expeditingUserIds     []string
	expeditingUserIdsFlag bool
	opinion               string
	opinionFlag           bool
}

func NewExpeditingUserTaskPathReqBodyBuilder() *ExpeditingUserTaskPathReqBodyBuilder {
	builder := &ExpeditingUserTaskPathReqBodyBuilder{}
	return builder
}

// 操作人kunlunUserID
//
// 示例值：123
func (builder *ExpeditingUserTaskPathReqBodyBuilder) OperatorUserId(operatorUserId string) *ExpeditingUserTaskPathReqBodyBuilder {
	builder.operatorUserId = operatorUserId
	builder.operatorUserIdFlag = true
	return builder
}

// 催办人的kunlunID列表
//
// 示例值：
func (builder *ExpeditingUserTaskPathReqBodyBuilder) ExpeditingUserIds(expeditingUserIds []string) *ExpeditingUserTaskPathReqBodyBuilder {
	builder.expeditingUserIds = expeditingUserIds
	builder.expeditingUserIdsFlag = true
	return builder
}

// 催办理由
//
// 示例值：催办理由
func (builder *ExpeditingUserTaskPathReqBodyBuilder) Opinion(opinion string) *ExpeditingUserTaskPathReqBodyBuilder {
	builder.opinion = opinion
	builder.opinionFlag = true
	return builder
}

func (builder *ExpeditingUserTaskPathReqBodyBuilder) Build() (*ExpeditingUserTaskReqBody, error) {
	req := &ExpeditingUserTaskReqBody{}
	if builder.operatorUserIdFlag {
		req.OperatorUserId = &builder.operatorUserId
	}
	if builder.expeditingUserIdsFlag {
		req.ExpeditingUserIds = builder.expeditingUserIds
	}
	if builder.opinionFlag {
		req.Opinion = &builder.opinion
	}
	return req, nil
}

type ExpeditingUserTaskReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *ExpeditingUserTaskReqBody
}

func NewExpeditingUserTaskReqBuilder() *ExpeditingUserTaskReqBuilder {
	builder := &ExpeditingUserTaskReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 任务ID
//
// 示例值：1234
func (builder *ExpeditingUserTaskReqBuilder) TaskId(taskId string) *ExpeditingUserTaskReqBuilder {
	builder.apiReq.PathParams.Set("task_id", fmt.Sprint(taskId))
	return builder
}

//
func (builder *ExpeditingUserTaskReqBuilder) Body(body *ExpeditingUserTaskReqBody) *ExpeditingUserTaskReqBuilder {
	builder.body = body
	return builder
}

func (builder *ExpeditingUserTaskReqBuilder) Build() *ExpeditingUserTaskReq {
	req := &ExpeditingUserTaskReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type ExpeditingUserTaskReqBody struct {
	OperatorUserId *string `json:"operator_user_id,omitempty"` // 操作人kunlunUserID

	ExpeditingUserIds []string `json:"expediting_user_ids,omitempty"` // 催办人的kunlunID列表

	Opinion *string `json:"opinion,omitempty"` // 催办理由
}

type ExpeditingUserTaskReq struct {
	apiReq *larkcore.ApiReq
	Body   *ExpeditingUserTaskReqBody `body:""`
}

type ExpeditingUserTaskResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *ExpeditingUserTaskResp) Success() bool {
	return resp.Code == 0
}

type QueryUserTaskReqBodyBuilder struct {
	type_    string // 类型
	typeFlag bool

	source     string // 来源
	sourceFlag bool

	limit     string // 获取条数
	limitFlag bool

	offset     string // 起始位置
	offsetFlag bool

	startTime     string // 开始时间
	startTimeFlag bool

	endTime     string // 结束时间
	endTimeFlag bool

	apiIds     []string // 流程apiid列表
	apiIdsFlag bool

	kunlunUserId     string // kunlunUserID;
	kunlunUserIdFlag bool
}

func NewQueryUserTaskReqBodyBuilder() *QueryUserTaskReqBodyBuilder {
	builder := &QueryUserTaskReqBodyBuilder{}
	return builder
}

// 类型
//
//示例值：pending
func (builder *QueryUserTaskReqBodyBuilder) Type(type_ string) *QueryUserTaskReqBodyBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// 来源
//
//示例值：assignMe
func (builder *QueryUserTaskReqBodyBuilder) Source(source string) *QueryUserTaskReqBodyBuilder {
	builder.source = source
	builder.sourceFlag = true
	return builder
}

// 获取条数
//
//示例值：10
func (builder *QueryUserTaskReqBodyBuilder) Limit(limit string) *QueryUserTaskReqBodyBuilder {
	builder.limit = limit
	builder.limitFlag = true
	return builder
}

// 起始位置
//
//示例值：0
func (builder *QueryUserTaskReqBodyBuilder) Offset(offset string) *QueryUserTaskReqBodyBuilder {
	builder.offset = offset
	builder.offsetFlag = true
	return builder
}

// 开始时间
//
//示例值：1730208758000
func (builder *QueryUserTaskReqBodyBuilder) StartTime(startTime string) *QueryUserTaskReqBodyBuilder {
	builder.startTime = startTime
	builder.startTimeFlag = true
	return builder
}

// 结束时间
//
//示例值：1730208758000
func (builder *QueryUserTaskReqBodyBuilder) EndTime(endTime string) *QueryUserTaskReqBodyBuilder {
	builder.endTime = endTime
	builder.endTimeFlag = true
	return builder
}

// 流程apiid列表
//
//示例值：
func (builder *QueryUserTaskReqBodyBuilder) ApiIds(apiIds []string) *QueryUserTaskReqBodyBuilder {
	builder.apiIds = apiIds
	builder.apiIdsFlag = true
	return builder
}

// kunlunUserID;
//
//示例值：1234
func (builder *QueryUserTaskReqBodyBuilder) KunlunUserId(kunlunUserId string) *QueryUserTaskReqBodyBuilder {
	builder.kunlunUserId = kunlunUserId
	builder.kunlunUserIdFlag = true
	return builder
}

func (builder *QueryUserTaskReqBodyBuilder) Build() *QueryUserTaskReqBody {
	req := &QueryUserTaskReqBody{}
	if builder.typeFlag {
		req.Type = &builder.type_
	}
	if builder.sourceFlag {
		req.Source = &builder.source
	}
	if builder.limitFlag {
		req.Limit = &builder.limit
	}
	if builder.offsetFlag {
		req.Offset = &builder.offset
	}
	if builder.startTimeFlag {
		req.StartTime = &builder.startTime
	}
	if builder.endTimeFlag {
		req.EndTime = &builder.endTime
	}
	if builder.apiIdsFlag {
		req.ApiIds = builder.apiIds
	}
	if builder.kunlunUserIdFlag {
		req.KunlunUserId = &builder.kunlunUserId
	}
	return req
}

type QueryUserTaskPathReqBodyBuilder struct {
	type_            string
	typeFlag         bool
	source           string
	sourceFlag       bool
	limit            string
	limitFlag        bool
	offset           string
	offsetFlag       bool
	startTime        string
	startTimeFlag    bool
	endTime          string
	endTimeFlag      bool
	apiIds           []string
	apiIdsFlag       bool
	kunlunUserId     string
	kunlunUserIdFlag bool
}

func NewQueryUserTaskPathReqBodyBuilder() *QueryUserTaskPathReqBodyBuilder {
	builder := &QueryUserTaskPathReqBodyBuilder{}
	return builder
}

// 类型
//
// 示例值：pending
func (builder *QueryUserTaskPathReqBodyBuilder) Type(type_ string) *QueryUserTaskPathReqBodyBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// 来源
//
// 示例值：assignMe
func (builder *QueryUserTaskPathReqBodyBuilder) Source(source string) *QueryUserTaskPathReqBodyBuilder {
	builder.source = source
	builder.sourceFlag = true
	return builder
}

// 获取条数
//
// 示例值：10
func (builder *QueryUserTaskPathReqBodyBuilder) Limit(limit string) *QueryUserTaskPathReqBodyBuilder {
	builder.limit = limit
	builder.limitFlag = true
	return builder
}

// 起始位置
//
// 示例值：0
func (builder *QueryUserTaskPathReqBodyBuilder) Offset(offset string) *QueryUserTaskPathReqBodyBuilder {
	builder.offset = offset
	builder.offsetFlag = true
	return builder
}

// 开始时间
//
// 示例值：1730208758000
func (builder *QueryUserTaskPathReqBodyBuilder) StartTime(startTime string) *QueryUserTaskPathReqBodyBuilder {
	builder.startTime = startTime
	builder.startTimeFlag = true
	return builder
}

// 结束时间
//
// 示例值：1730208758000
func (builder *QueryUserTaskPathReqBodyBuilder) EndTime(endTime string) *QueryUserTaskPathReqBodyBuilder {
	builder.endTime = endTime
	builder.endTimeFlag = true
	return builder
}

// 流程apiid列表
//
// 示例值：
func (builder *QueryUserTaskPathReqBodyBuilder) ApiIds(apiIds []string) *QueryUserTaskPathReqBodyBuilder {
	builder.apiIds = apiIds
	builder.apiIdsFlag = true
	return builder
}

// kunlunUserID;
//
// 示例值：1234
func (builder *QueryUserTaskPathReqBodyBuilder) KunlunUserId(kunlunUserId string) *QueryUserTaskPathReqBodyBuilder {
	builder.kunlunUserId = kunlunUserId
	builder.kunlunUserIdFlag = true
	return builder
}

func (builder *QueryUserTaskPathReqBodyBuilder) Build() (*QueryUserTaskReqBody, error) {
	req := &QueryUserTaskReqBody{}
	if builder.typeFlag {
		req.Type = &builder.type_
	}
	if builder.sourceFlag {
		req.Source = &builder.source
	}
	if builder.limitFlag {
		req.Limit = &builder.limit
	}
	if builder.offsetFlag {
		req.Offset = &builder.offset
	}
	if builder.startTimeFlag {
		req.StartTime = &builder.startTime
	}
	if builder.endTimeFlag {
		req.EndTime = &builder.endTime
	}
	if builder.apiIdsFlag {
		req.ApiIds = builder.apiIds
	}
	if builder.kunlunUserIdFlag {
		req.KunlunUserId = &builder.kunlunUserId
	}
	return req, nil
}

type QueryUserTaskReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *QueryUserTaskReqBody
}

func NewQueryUserTaskReqBuilder() *QueryUserTaskReqBuilder {
	builder := &QueryUserTaskReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 获取任务列表
func (builder *QueryUserTaskReqBuilder) Body(body *QueryUserTaskReqBody) *QueryUserTaskReqBuilder {
	builder.body = body
	return builder
}

func (builder *QueryUserTaskReqBuilder) Build() *QueryUserTaskReq {
	req := &QueryUserTaskReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.Body = builder.body
	return req
}

type QueryUserTaskReqBody struct {
	Type *string `json:"type,omitempty"` // 类型

	Source *string `json:"source,omitempty"` // 来源

	Limit *string `json:"limit,omitempty"` // 获取条数

	Offset *string `json:"offset,omitempty"` // 起始位置

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

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

	ApiIds []string `json:"api_ids,omitempty"` // 流程apiid列表

	KunlunUserId *string `json:"kunlun_user_id,omitempty"` // kunlunUserID;
}

type QueryUserTaskReq struct {
	apiReq *larkcore.ApiReq
	Body   *QueryUserTaskReqBody `body:""`
}

type QueryUserTaskRespData struct {
	Count *string `json:"count,omitempty"` // 总任务条数;

	Tasks []*UserTask `json:"tasks,omitempty"` // 任务信息
}

type QueryUserTaskResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *QueryUserTaskRespData `json:"data"` // 业务数据
}

func (resp *QueryUserTaskResp) Success() bool {
	return resp.Code == 0
}

type RollbackUserTaskReqBodyBuilder struct {
	operatorUserId     string // 操作人kunlunUserID
	operatorUserIdFlag bool

	toTaskId     string // 退回到的任务ID
	toTaskIdFlag bool

	opinion     string // 退回原因
	opinionFlag bool
}

func NewRollbackUserTaskReqBodyBuilder() *RollbackUserTaskReqBodyBuilder {
	builder := &RollbackUserTaskReqBodyBuilder{}
	return builder
}

// 操作人kunlunUserID
//
//示例值：1234
func (builder *RollbackUserTaskReqBodyBuilder) OperatorUserId(operatorUserId string) *RollbackUserTaskReqBodyBuilder {
	builder.operatorUserId = operatorUserId
	builder.operatorUserIdFlag = true
	return builder
}

// 退回到的任务ID
//
//示例值：1234
func (builder *RollbackUserTaskReqBodyBuilder) ToTaskId(toTaskId string) *RollbackUserTaskReqBodyBuilder {
	builder.toTaskId = toTaskId
	builder.toTaskIdFlag = true
	return builder
}

// 退回原因
//
//示例值：退回原因
func (builder *RollbackUserTaskReqBodyBuilder) Opinion(opinion string) *RollbackUserTaskReqBodyBuilder {
	builder.opinion = opinion
	builder.opinionFlag = true
	return builder
}

func (builder *RollbackUserTaskReqBodyBuilder) Build() *RollbackUserTaskReqBody {
	req := &RollbackUserTaskReqBody{}
	if builder.operatorUserIdFlag {
		req.OperatorUserId = &builder.operatorUserId
	}
	if builder.toTaskIdFlag {
		req.ToTaskId = &builder.toTaskId
	}
	if builder.opinionFlag {
		req.Opinion = &builder.opinion
	}
	return req
}

type RollbackUserTaskPathReqBodyBuilder struct {
	operatorUserId     string
	operatorUserIdFlag bool
	toTaskId           string
	toTaskIdFlag       bool
	opinion            string
	opinionFlag        bool
}

func NewRollbackUserTaskPathReqBodyBuilder() *RollbackUserTaskPathReqBodyBuilder {
	builder := &RollbackUserTaskPathReqBodyBuilder{}
	return builder
}

// 操作人kunlunUserID
//
// 示例值：1234
func (builder *RollbackUserTaskPathReqBodyBuilder) OperatorUserId(operatorUserId string) *RollbackUserTaskPathReqBodyBuilder {
	builder.operatorUserId = operatorUserId
	builder.operatorUserIdFlag = true
	return builder
}

// 退回到的任务ID
//
// 示例值：1234
func (builder *RollbackUserTaskPathReqBodyBuilder) ToTaskId(toTaskId string) *RollbackUserTaskPathReqBodyBuilder {
	builder.toTaskId = toTaskId
	builder.toTaskIdFlag = true
	return builder
}

// 退回原因
//
// 示例值：退回原因
func (builder *RollbackUserTaskPathReqBodyBuilder) Opinion(opinion string) *RollbackUserTaskPathReqBodyBuilder {
	builder.opinion = opinion
	builder.opinionFlag = true
	return builder
}

func (builder *RollbackUserTaskPathReqBodyBuilder) Build() (*RollbackUserTaskReqBody, error) {
	req := &RollbackUserTaskReqBody{}
	if builder.operatorUserIdFlag {
		req.OperatorUserId = &builder.operatorUserId
	}
	if builder.toTaskIdFlag {
		req.ToTaskId = &builder.toTaskId
	}
	if builder.opinionFlag {
		req.Opinion = &builder.opinion
	}
	return req, nil
}

type RollbackUserTaskReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *RollbackUserTaskReqBody
}

func NewRollbackUserTaskReqBuilder() *RollbackUserTaskReqBuilder {
	builder := &RollbackUserTaskReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 任务ID
//
// 示例值：1234
func (builder *RollbackUserTaskReqBuilder) TaskId(taskId string) *RollbackUserTaskReqBuilder {
	builder.apiReq.PathParams.Set("task_id", fmt.Sprint(taskId))
	return builder
}

//
func (builder *RollbackUserTaskReqBuilder) Body(body *RollbackUserTaskReqBody) *RollbackUserTaskReqBuilder {
	builder.body = body
	return builder
}

func (builder *RollbackUserTaskReqBuilder) Build() *RollbackUserTaskReq {
	req := &RollbackUserTaskReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type RollbackUserTaskReqBody struct {
	OperatorUserId *string `json:"operator_user_id,omitempty"` // 操作人kunlunUserID

	ToTaskId *string `json:"to_task_id,omitempty"` // 退回到的任务ID

	Opinion *string `json:"opinion,omitempty"` // 退回原因
}

type RollbackUserTaskReq struct {
	apiReq *larkcore.ApiReq
	Body   *RollbackUserTaskReqBody `body:""`
}

type RollbackUserTaskResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *RollbackUserTaskResp) Success() bool {
	return resp.Code == 0
}

type RollbackPointsUserTaskReqBodyBuilder struct {
	operatorUserId     string // 操作人kunlunUserID;
	operatorUserIdFlag bool
}

func NewRollbackPointsUserTaskReqBodyBuilder() *RollbackPointsUserTaskReqBodyBuilder {
	builder := &RollbackPointsUserTaskReqBodyBuilder{}
	return builder
}

// 操作人kunlunUserID;
//
//示例值：1234
func (builder *RollbackPointsUserTaskReqBodyBuilder) OperatorUserId(operatorUserId string) *RollbackPointsUserTaskReqBodyBuilder {
	builder.operatorUserId = operatorUserId
	builder.operatorUserIdFlag = true
	return builder
}

func (builder *RollbackPointsUserTaskReqBodyBuilder) Build() *RollbackPointsUserTaskReqBody {
	req := &RollbackPointsUserTaskReqBody{}
	if builder.operatorUserIdFlag {
		req.OperatorUserId = &builder.operatorUserId
	}
	return req
}

type RollbackPointsUserTaskPathReqBodyBuilder struct {
	operatorUserId     string
	operatorUserIdFlag bool
}

func NewRollbackPointsUserTaskPathReqBodyBuilder() *RollbackPointsUserTaskPathReqBodyBuilder {
	builder := &RollbackPointsUserTaskPathReqBodyBuilder{}
	return builder
}

// 操作人kunlunUserID;
//
// 示例值：1234
func (builder *RollbackPointsUserTaskPathReqBodyBuilder) OperatorUserId(operatorUserId string) *RollbackPointsUserTaskPathReqBodyBuilder {
	builder.operatorUserId = operatorUserId
	builder.operatorUserIdFlag = true
	return builder
}

func (builder *RollbackPointsUserTaskPathReqBodyBuilder) Build() (*RollbackPointsUserTaskReqBody, error) {
	req := &RollbackPointsUserTaskReqBody{}
	if builder.operatorUserIdFlag {
		req.OperatorUserId = &builder.operatorUserId
	}
	return req, nil
}

type RollbackPointsUserTaskReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *RollbackPointsUserTaskReqBody
}

func NewRollbackPointsUserTaskReqBuilder() *RollbackPointsUserTaskReqBuilder {
	builder := &RollbackPointsUserTaskReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 任务ID
//
// 示例值：1234
func (builder *RollbackPointsUserTaskReqBuilder) TaskId(taskId string) *RollbackPointsUserTaskReqBuilder {
	builder.apiReq.PathParams.Set("task_id", fmt.Sprint(taskId))
	return builder
}

//
func (builder *RollbackPointsUserTaskReqBuilder) Body(body *RollbackPointsUserTaskReqBody) *RollbackPointsUserTaskReqBuilder {
	builder.body = body
	return builder
}

func (builder *RollbackPointsUserTaskReqBuilder) Build() *RollbackPointsUserTaskReq {
	req := &RollbackPointsUserTaskReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type RollbackPointsUserTaskReqBody struct {
	OperatorUserId *string `json:"operator_user_id,omitempty"` // 操作人kunlunUserID;
}

type RollbackPointsUserTaskReq struct {
	apiReq *larkcore.ApiReq
	Body   *RollbackPointsUserTaskReqBody `body:""`
}

type RollbackPointsUserTaskRespData struct {
	Tasks []*AllowedRollbaclkTaskItemType `json:"tasks,omitempty"` // 任务列表
}

type RollbackPointsUserTaskResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *RollbackPointsUserTaskRespData `json:"data"` // 业务数据
}

func (resp *RollbackPointsUserTaskResp) Success() bool {
	return resp.Code == 0
}

type SqlCommandsWorkspaceReqBodyBuilder struct {
	sql     string // 要执行的 SQL 语句
	sqlFlag bool
}

func NewSqlCommandsWorkspaceReqBodyBuilder() *SqlCommandsWorkspaceReqBodyBuilder {
	builder := &SqlCommandsWorkspaceReqBodyBuilder{}
	return builder
}

// 要执行的 SQL 语句
//
//示例值：SELECT name FROM student
func (builder *SqlCommandsWorkspaceReqBodyBuilder) Sql(sql string) *SqlCommandsWorkspaceReqBodyBuilder {
	builder.sql = sql
	builder.sqlFlag = true
	return builder
}

func (builder *SqlCommandsWorkspaceReqBodyBuilder) Build() *SqlCommandsWorkspaceReqBody {
	req := &SqlCommandsWorkspaceReqBody{}
	if builder.sqlFlag {
		req.Sql = &builder.sql
	}
	return req
}

type SqlCommandsWorkspacePathReqBodyBuilder struct {
	sql     string
	sqlFlag bool
}

func NewSqlCommandsWorkspacePathReqBodyBuilder() *SqlCommandsWorkspacePathReqBodyBuilder {
	builder := &SqlCommandsWorkspacePathReqBodyBuilder{}
	return builder
}

// 要执行的 SQL 语句
//
// 示例值：SELECT name FROM student
func (builder *SqlCommandsWorkspacePathReqBodyBuilder) Sql(sql string) *SqlCommandsWorkspacePathReqBodyBuilder {
	builder.sql = sql
	builder.sqlFlag = true
	return builder
}

func (builder *SqlCommandsWorkspacePathReqBodyBuilder) Build() (*SqlCommandsWorkspaceReqBody, error) {
	req := &SqlCommandsWorkspaceReqBody{}
	if builder.sqlFlag {
		req.Sql = &builder.sql
	}
	return req, nil
}

type SqlCommandsWorkspaceReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *SqlCommandsWorkspaceReqBody
}

func NewSqlCommandsWorkspaceReqBuilder() *SqlCommandsWorkspaceReqBuilder {
	builder := &SqlCommandsWorkspaceReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 工作空间id
//
// 示例值：workspace_abc
func (builder *SqlCommandsWorkspaceReqBuilder) WorkspaceId(workspaceId string) *SqlCommandsWorkspaceReqBuilder {
	builder.apiReq.PathParams.Set("workspace_id", fmt.Sprint(workspaceId))
	return builder
}

// 执行 SQL
func (builder *SqlCommandsWorkspaceReqBuilder) Body(body *SqlCommandsWorkspaceReqBody) *SqlCommandsWorkspaceReqBuilder {
	builder.body = body
	return builder
}

func (builder *SqlCommandsWorkspaceReqBuilder) Build() *SqlCommandsWorkspaceReq {
	req := &SqlCommandsWorkspaceReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type SqlCommandsWorkspaceReqBody struct {
	Sql *string `json:"sql,omitempty"` // 要执行的 SQL 语句
}

type SqlCommandsWorkspaceReq struct {
	apiReq *larkcore.ApiReq
	Body   *SqlCommandsWorkspaceReqBody `body:""`
}

type SqlCommandsWorkspaceRespData struct {
	Result *string `json:"result,omitempty"` // 如果是 SELECT 命令，返回的是查询结果的 JSON 序列化字符串。如果是其他无返回的命令，如 DELETE 等，result 为空。
}

type SqlCommandsWorkspaceResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *SqlCommandsWorkspaceRespData `json:"data"` // 业务数据
}

func (resp *SqlCommandsWorkspaceResp) Success() bool {
	return resp.Code == 0
}

type EnumGetWorkspaceEnumReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewEnumGetWorkspaceEnumReqBuilder() *EnumGetWorkspaceEnumReqBuilder {
	builder := &EnumGetWorkspaceEnumReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 工作空间 id
//
// 示例值：workspace_abc
func (builder *EnumGetWorkspaceEnumReqBuilder) WorkspaceId(workspaceId string) *EnumGetWorkspaceEnumReqBuilder {
	builder.apiReq.PathParams.Set("workspace_id", fmt.Sprint(workspaceId))
	return builder
}

// 枚举名称
//
// 示例值：enum_demo_1
func (builder *EnumGetWorkspaceEnumReqBuilder) EnumName(enumName string) *EnumGetWorkspaceEnumReqBuilder {
	builder.apiReq.PathParams.Set("enum_name", fmt.Sprint(enumName))
	return builder
}

func (builder *EnumGetWorkspaceEnumReqBuilder) Build() *EnumGetWorkspaceEnumReq {
	req := &EnumGetWorkspaceEnumReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	return req
}

type EnumGetWorkspaceEnumReq struct {
	apiReq *larkcore.ApiReq
}

type EnumGetWorkspaceEnumRespData struct {
	Name *string `json:"name,omitempty"` // 枚举名称

	Description *string `json:"description,omitempty"` // 枚举描述

	Options []string `json:"options,omitempty"` // 枚举值列表

	CreatedAt *string `json:"created_at,omitempty"` // 创建时间，毫秒时间戳

	CreatedBy *WorkspaceUserInfo `json:"created_by,omitempty"` // 创建人
}

type EnumGetWorkspaceEnumResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *EnumGetWorkspaceEnumRespData `json:"data"` // 业务数据
}

func (resp *EnumGetWorkspaceEnumResp) Success() bool {
	return resp.Code == 0
}

type ListWorkspaceEnumReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewListWorkspaceEnumReqBuilder() *ListWorkspaceEnumReqBuilder {
	builder := &ListWorkspaceEnumReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 工作空间 id
//
// 示例值：workspace_abc
func (builder *ListWorkspaceEnumReqBuilder) WorkspaceId(workspaceId string) *ListWorkspaceEnumReqBuilder {
	builder.apiReq.PathParams.Set("workspace_id", fmt.Sprint(workspaceId))
	return builder
}

// 分页大小，用于限制一次请求所返回的数据条目数
//
// 示例值：10
func (builder *ListWorkspaceEnumReqBuilder) PageSize(pageSize int) *ListWorkspaceEnumReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 分页标记，第一次请求不填，表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该 page_token 获取查询结果
//
// 示例值：AQD9/Rn9eij9Pm39ED40/RD/cIFmu77WxpxPB/2oHfQLZ+G8JG6tK7+ZnHiT7COhD2hMSICh/eBl7cpzU6JEC3J7COKNe4jrQ8ExwBCR
func (builder *ListWorkspaceEnumReqBuilder) PageToken(pageToken string) *ListWorkspaceEnumReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

func (builder *ListWorkspaceEnumReqBuilder) Build() *ListWorkspaceEnumReq {
	req := &ListWorkspaceEnumReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type ListWorkspaceEnumReq struct {
	apiReq *larkcore.ApiReq
}

type ListWorkspaceEnumRespData struct {
	HasMore *bool `json:"has_more,omitempty"` // 是否还有更多项

	PageToken *string `json:"page_token,omitempty"` // 分页标记，当 has_more 为 true 时，会同时返回新的 page_token，否则不返回 page_token

	Items []*WorkspaceEnum `json:"items,omitempty"` // 枚举列表
}

type ListWorkspaceEnumResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ListWorkspaceEnumRespData `json:"data"` // 业务数据
}

func (resp *ListWorkspaceEnumResp) Success() bool {
	return resp.Code == 0
}

type ListWorkspaceTableReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewListWorkspaceTableReqBuilder() *ListWorkspaceTableReqBuilder {
	builder := &ListWorkspaceTableReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 工作空间 id
//
// 示例值：worksapce_abc
func (builder *ListWorkspaceTableReqBuilder) WorkspaceId(workspaceId string) *ListWorkspaceTableReqBuilder {
	builder.apiReq.PathParams.Set("workspace_id", fmt.Sprint(workspaceId))
	return builder
}

// 分页大小，用于限制一次请求所返回的数据条目数。默认10，最大500。
//
// 示例值：10
func (builder *ListWorkspaceTableReqBuilder) PageSize(pageSize int) *ListWorkspaceTableReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 分页标记，第一次请求不填，表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该 page_token 获取查询结果。
//
// 示例值：
func (builder *ListWorkspaceTableReqBuilder) PageToken(pageToken string) *ListWorkspaceTableReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

func (builder *ListWorkspaceTableReqBuilder) Build() *ListWorkspaceTableReq {
	req := &ListWorkspaceTableReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type ListWorkspaceTableReq struct {
	apiReq *larkcore.ApiReq
}

type ListWorkspaceTableRespData struct {
	HasMore *bool `json:"has_more,omitempty"` // 是否还有更多项

	PageToken *string `json:"page_token,omitempty"` // 分页标记，当 has_more 为 true 时，会同时返回新的 page_token，否则不返回 page_token

	Items []*WorkspaceDataTable `json:"items,omitempty"` // 数据表列表
}

type ListWorkspaceTableResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ListWorkspaceTableRespData `json:"data"` // 业务数据
}

func (resp *ListWorkspaceTableResp) Success() bool {
	return resp.Code == 0
}

type RecordsBatchUpdateWorkspaceTableReqBodyBuilder struct {
	records     string // 要更新的数据记录列表，单次支持最多 500条，每行 record 都必须包含主键 _id，且不同行要更新的字段需保持一致
	recordsFlag bool
}

func NewRecordsBatchUpdateWorkspaceTableReqBodyBuilder() *RecordsBatchUpdateWorkspaceTableReqBodyBuilder {
	builder := &RecordsBatchUpdateWorkspaceTableReqBodyBuilder{}
	return builder
}

// 要更新的数据记录列表，单次支持最多 500条，每行 record 都必须包含主键 _id，且不同行要更新的字段需保持一致
//
//示例值：[{\"_id\":\"657fade8-394d-4d86-aa35-0129e3bd7614\",\"age\":10}]
func (builder *RecordsBatchUpdateWorkspaceTableReqBodyBuilder) Records(records string) *RecordsBatchUpdateWorkspaceTableReqBodyBuilder {
	builder.records = records
	builder.recordsFlag = true
	return builder
}

func (builder *RecordsBatchUpdateWorkspaceTableReqBodyBuilder) Build() *RecordsBatchUpdateWorkspaceTableReqBody {
	req := &RecordsBatchUpdateWorkspaceTableReqBody{}
	if builder.recordsFlag {
		req.Records = &builder.records
	}
	return req
}

type RecordsBatchUpdateWorkspaceTablePathReqBodyBuilder struct {
	records     string
	recordsFlag bool
}

func NewRecordsBatchUpdateWorkspaceTablePathReqBodyBuilder() *RecordsBatchUpdateWorkspaceTablePathReqBodyBuilder {
	builder := &RecordsBatchUpdateWorkspaceTablePathReqBodyBuilder{}
	return builder
}

// 要更新的数据记录列表，单次支持最多 500条，每行 record 都必须包含主键 _id，且不同行要更新的字段需保持一致
//
// 示例值：[{\"_id\":\"657fade8-394d-4d86-aa35-0129e3bd7614\",\"age\":10}]
func (builder *RecordsBatchUpdateWorkspaceTablePathReqBodyBuilder) Records(records string) *RecordsBatchUpdateWorkspaceTablePathReqBodyBuilder {
	builder.records = records
	builder.recordsFlag = true
	return builder
}

func (builder *RecordsBatchUpdateWorkspaceTablePathReqBodyBuilder) Build() (*RecordsBatchUpdateWorkspaceTableReqBody, error) {
	req := &RecordsBatchUpdateWorkspaceTableReqBody{}
	if builder.recordsFlag {
		req.Records = &builder.records
	}
	return req, nil
}

type RecordsBatchUpdateWorkspaceTableReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *RecordsBatchUpdateWorkspaceTableReqBody
}

func NewRecordsBatchUpdateWorkspaceTableReqBuilder() *RecordsBatchUpdateWorkspaceTableReqBuilder {
	builder := &RecordsBatchUpdateWorkspaceTableReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 工作空间id
//
// 示例值：workspace_abc
func (builder *RecordsBatchUpdateWorkspaceTableReqBuilder) WorkspaceId(workspaceId string) *RecordsBatchUpdateWorkspaceTableReqBuilder {
	builder.apiReq.PathParams.Set("workspace_id", fmt.Sprint(workspaceId))
	return builder
}

// 数据表表名
//
// 示例值：table_name_1
func (builder *RecordsBatchUpdateWorkspaceTableReqBuilder) TableName(tableName string) *RecordsBatchUpdateWorkspaceTableReqBuilder {
	builder.apiReq.PathParams.Set("table_name", fmt.Sprint(tableName))
	return builder
}

// 批量更新数据表中的记录
func (builder *RecordsBatchUpdateWorkspaceTableReqBuilder) Body(body *RecordsBatchUpdateWorkspaceTableReqBody) *RecordsBatchUpdateWorkspaceTableReqBuilder {
	builder.body = body
	return builder
}

func (builder *RecordsBatchUpdateWorkspaceTableReqBuilder) Build() *RecordsBatchUpdateWorkspaceTableReq {
	req := &RecordsBatchUpdateWorkspaceTableReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type RecordsBatchUpdateWorkspaceTableReqBody struct {
	Records *string `json:"records,omitempty"` // 要更新的数据记录列表，单次支持最多 500条，每行 record 都必须包含主键 _id，且不同行要更新的字段需保持一致
}

type RecordsBatchUpdateWorkspaceTableReq struct {
	apiReq *larkcore.ApiReq
	Body   *RecordsBatchUpdateWorkspaceTableReqBody `body:""`
}

type RecordsBatchUpdateWorkspaceTableRespData struct {
	RecordIds []string `json:"record_ids,omitempty"` // 更新的记录唯一ID列表
}

type RecordsBatchUpdateWorkspaceTableResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *RecordsBatchUpdateWorkspaceTableRespData `json:"data"` // 业务数据
}

func (resp *RecordsBatchUpdateWorkspaceTableResp) Success() bool {
	return resp.Code == 0
}

type RecordsDeleteWorkspaceTableReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewRecordsDeleteWorkspaceTableReqBuilder() *RecordsDeleteWorkspaceTableReqBuilder {
	builder := &RecordsDeleteWorkspaceTableReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 工作空间id
//
// 示例值：workspace_abc
func (builder *RecordsDeleteWorkspaceTableReqBuilder) WorkspaceId(workspaceId string) *RecordsDeleteWorkspaceTableReqBuilder {
	builder.apiReq.PathParams.Set("workspace_id", fmt.Sprint(workspaceId))
	return builder
}

// 数据表表名
//
// 示例值：table_name_1
func (builder *RecordsDeleteWorkspaceTableReqBuilder) TableName(tableName string) *RecordsDeleteWorkspaceTableReqBuilder {
	builder.apiReq.PathParams.Set("table_name", fmt.Sprint(tableName))
	return builder
}

// 筛选条件，尊许 PostgREST 语法，详情可查看 https://docs.postgrest.org/en/v13/references/api/tables_views.html#horizontal-filtering;此处用法和查询数据记录一致
//
// 示例值：age=gt.10
func (builder *RecordsDeleteWorkspaceTableReqBuilder) Filter(filter string) *RecordsDeleteWorkspaceTableReqBuilder {
	builder.apiReq.QueryParams.Set("filter", fmt.Sprint(filter))
	return builder
}

func (builder *RecordsDeleteWorkspaceTableReqBuilder) Build() *RecordsDeleteWorkspaceTableReq {
	req := &RecordsDeleteWorkspaceTableReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type RecordsDeleteWorkspaceTableReq struct {
	apiReq *larkcore.ApiReq
}

type RecordsDeleteWorkspaceTableResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *RecordsDeleteWorkspaceTableResp) Success() bool {
	return resp.Code == 0
}

type RecordsGetWorkspaceTableReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewRecordsGetWorkspaceTableReqBuilder() *RecordsGetWorkspaceTableReqBuilder {
	builder := &RecordsGetWorkspaceTableReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 工作空间id
//
// 示例值：workspace_abc
func (builder *RecordsGetWorkspaceTableReqBuilder) WorkspaceId(workspaceId string) *RecordsGetWorkspaceTableReqBuilder {
	builder.apiReq.PathParams.Set("workspace_id", fmt.Sprint(workspaceId))
	return builder
}

// 数据表表名
//
// 示例值：table_name_1
func (builder *RecordsGetWorkspaceTableReqBuilder) TableName(tableName string) *RecordsGetWorkspaceTableReqBuilder {
	builder.apiReq.PathParams.Set("table_name", fmt.Sprint(tableName))
	return builder
}

// 分页大小，用于限制一次请求所返回的数据条目数。默认10，最大500
//
// 示例值：10
func (builder *RecordsGetWorkspaceTableReqBuilder) PageSize(pageSize int) *RecordsGetWorkspaceTableReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 分页标记，第一次请求不填，表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该 page_token 获取查询结果
//
// 示例值：
func (builder *RecordsGetWorkspaceTableReqBuilder) PageToken(pageToken string) *RecordsGetWorkspaceTableReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

// 返回的列，默认为 *，即返回所有列。;遵循 PostgREST 语法，详情可查看 https://docs.postgrest.org/en/v13/references/api/tables_views.html#vertical-filtering
//
// 示例值：_id,_created_at,name
func (builder *RecordsGetWorkspaceTableReqBuilder) Select(select_ string) *RecordsGetWorkspaceTableReqBuilder {
	builder.apiReq.QueryParams.Set("select", fmt.Sprint(select_))
	return builder
}

// 筛选条件，尊许 PostgREST 语法，详情可查看 https://docs.postgrest.org/en/v13/references/api/tables_views.html#horizontal-filtering
//
// 示例值：age=gt.10
func (builder *RecordsGetWorkspaceTableReqBuilder) Filter(filter string) *RecordsGetWorkspaceTableReqBuilder {
	builder.apiReq.QueryParams.Set("filter", fmt.Sprint(filter))
	return builder
}

// 排序条件，如果没指定 asc/desc，默认为 asc，null 值可排在最前或最后。;尊许 PostgREST 语法，详情可查看;https://docs.postgrest.org/en/v13/references/api/tables_views.html#ordering
//
// 示例值：age.desc,score.asc
func (builder *RecordsGetWorkspaceTableReqBuilder) Order(order string) *RecordsGetWorkspaceTableReqBuilder {
	builder.apiReq.QueryParams.Set("order", fmt.Sprint(order))
	return builder
}

func (builder *RecordsGetWorkspaceTableReqBuilder) Build() *RecordsGetWorkspaceTableReq {
	req := &RecordsGetWorkspaceTableReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type RecordsGetWorkspaceTableReq struct {
	apiReq *larkcore.ApiReq
}

type RecordsGetWorkspaceTableRespData struct {
	HasMore *bool `json:"has_more,omitempty"` // 是否还有更多项

	PageToken *string `json:"page_token,omitempty"` // 分页标记，当 has_more 为 true 时，会同时返回新的 page_token，否则不返回 page_token

	Total *int `json:"total,omitempty"` // 符合条件的记录总数

	Items *string `json:"items,omitempty"` // 数据记录列表，格式为数组序列化后的 JSONString
}

type RecordsGetWorkspaceTableResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *RecordsGetWorkspaceTableRespData `json:"data"` // 业务数据
}

func (resp *RecordsGetWorkspaceTableResp) Success() bool {
	return resp.Code == 0
}

type RecordsPatchWorkspaceTableReqBodyBuilder struct {
	record     string // 要更新的数据记录信息
	recordFlag bool
}

func NewRecordsPatchWorkspaceTableReqBodyBuilder() *RecordsPatchWorkspaceTableReqBodyBuilder {
	builder := &RecordsPatchWorkspaceTableReqBodyBuilder{}
	return builder
}

// 要更新的数据记录信息
//
//示例值：{\"age\":10}
func (builder *RecordsPatchWorkspaceTableReqBodyBuilder) Record(record string) *RecordsPatchWorkspaceTableReqBodyBuilder {
	builder.record = record
	builder.recordFlag = true
	return builder
}

func (builder *RecordsPatchWorkspaceTableReqBodyBuilder) Build() *RecordsPatchWorkspaceTableReqBody {
	req := &RecordsPatchWorkspaceTableReqBody{}
	if builder.recordFlag {
		req.Record = &builder.record
	}
	return req
}

type RecordsPatchWorkspaceTablePathReqBodyBuilder struct {
	record     string
	recordFlag bool
}

func NewRecordsPatchWorkspaceTablePathReqBodyBuilder() *RecordsPatchWorkspaceTablePathReqBodyBuilder {
	builder := &RecordsPatchWorkspaceTablePathReqBodyBuilder{}
	return builder
}

// 要更新的数据记录信息
//
// 示例值：{\"age\":10}
func (builder *RecordsPatchWorkspaceTablePathReqBodyBuilder) Record(record string) *RecordsPatchWorkspaceTablePathReqBodyBuilder {
	builder.record = record
	builder.recordFlag = true
	return builder
}

func (builder *RecordsPatchWorkspaceTablePathReqBodyBuilder) Build() (*RecordsPatchWorkspaceTableReqBody, error) {
	req := &RecordsPatchWorkspaceTableReqBody{}
	if builder.recordFlag {
		req.Record = &builder.record
	}
	return req, nil
}

type RecordsPatchWorkspaceTableReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *RecordsPatchWorkspaceTableReqBody
}

func NewRecordsPatchWorkspaceTableReqBuilder() *RecordsPatchWorkspaceTableReqBuilder {
	builder := &RecordsPatchWorkspaceTableReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 工作空间id
//
// 示例值：workspace_abc
func (builder *RecordsPatchWorkspaceTableReqBuilder) WorkspaceId(workspaceId string) *RecordsPatchWorkspaceTableReqBuilder {
	builder.apiReq.PathParams.Set("workspace_id", fmt.Sprint(workspaceId))
	return builder
}

// 数据表表名
//
// 示例值：table_name_1
func (builder *RecordsPatchWorkspaceTableReqBuilder) TableName(tableName string) *RecordsPatchWorkspaceTableReqBuilder {
	builder.apiReq.PathParams.Set("table_name", fmt.Sprint(tableName))
	return builder
}

// 筛选条件，尊许 PostgREST 语法，详情可查看 https://docs.postgrest.org/en/v13/references/api/tables_views.html#horizontal-filtering
//
// 示例值：age=gt.10
func (builder *RecordsPatchWorkspaceTableReqBuilder) Filter(filter string) *RecordsPatchWorkspaceTableReqBuilder {
	builder.apiReq.QueryParams.Set("filter", fmt.Sprint(filter))
	return builder
}

// 按条件更新数据表中的记录
func (builder *RecordsPatchWorkspaceTableReqBuilder) Body(body *RecordsPatchWorkspaceTableReqBody) *RecordsPatchWorkspaceTableReqBuilder {
	builder.body = body
	return builder
}

func (builder *RecordsPatchWorkspaceTableReqBuilder) Build() *RecordsPatchWorkspaceTableReq {
	req := &RecordsPatchWorkspaceTableReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.body
	return req
}

type RecordsPatchWorkspaceTableReqBody struct {
	Record *string `json:"record,omitempty"` // 要更新的数据记录信息
}

type RecordsPatchWorkspaceTableReq struct {
	apiReq *larkcore.ApiReq
	Body   *RecordsPatchWorkspaceTableReqBody `body:""`
}

type RecordsPatchWorkspaceTableRespData struct {
	RecordIds []string `json:"record_ids,omitempty"` // 更新的记录唯一ID列表
}

type RecordsPatchWorkspaceTableResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *RecordsPatchWorkspaceTableRespData `json:"data"` // 业务数据
}

func (resp *RecordsPatchWorkspaceTableResp) Success() bool {
	return resp.Code == 0
}

type RecordsPostWorkspaceTableReqBodyBuilder struct {
	records     string // 要插入的数据记录列表，单次支持最多 500 条
	recordsFlag bool
}

func NewRecordsPostWorkspaceTableReqBodyBuilder() *RecordsPostWorkspaceTableReqBodyBuilder {
	builder := &RecordsPostWorkspaceTableReqBodyBuilder{}
	return builder
}

// 要插入的数据记录列表，单次支持最多 500 条
//
//示例值：[{\"name\":\"王一一\",\"gender\":\"male\",\"age\":10},{\"name\":\"王二二\",\"gender\":\"female\",\"age\":10}]
func (builder *RecordsPostWorkspaceTableReqBodyBuilder) Records(records string) *RecordsPostWorkspaceTableReqBodyBuilder {
	builder.records = records
	builder.recordsFlag = true
	return builder
}

func (builder *RecordsPostWorkspaceTableReqBodyBuilder) Build() *RecordsPostWorkspaceTableReqBody {
	req := &RecordsPostWorkspaceTableReqBody{}
	if builder.recordsFlag {
		req.Records = &builder.records
	}
	return req
}

type RecordsPostWorkspaceTablePathReqBodyBuilder struct {
	records     string
	recordsFlag bool
}

func NewRecordsPostWorkspaceTablePathReqBodyBuilder() *RecordsPostWorkspaceTablePathReqBodyBuilder {
	builder := &RecordsPostWorkspaceTablePathReqBodyBuilder{}
	return builder
}

// 要插入的数据记录列表，单次支持最多 500 条
//
// 示例值：[{\"name\":\"王一一\",\"gender\":\"male\",\"age\":10},{\"name\":\"王二二\",\"gender\":\"female\",\"age\":10}]
func (builder *RecordsPostWorkspaceTablePathReqBodyBuilder) Records(records string) *RecordsPostWorkspaceTablePathReqBodyBuilder {
	builder.records = records
	builder.recordsFlag = true
	return builder
}

func (builder *RecordsPostWorkspaceTablePathReqBodyBuilder) Build() (*RecordsPostWorkspaceTableReqBody, error) {
	req := &RecordsPostWorkspaceTableReqBody{}
	if builder.recordsFlag {
		req.Records = &builder.records
	}
	return req, nil
}

type RecordsPostWorkspaceTableReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *RecordsPostWorkspaceTableReqBody
}

func NewRecordsPostWorkspaceTableReqBuilder() *RecordsPostWorkspaceTableReqBuilder {
	builder := &RecordsPostWorkspaceTableReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 工作空间id
//
// 示例值：workspace_abc
func (builder *RecordsPostWorkspaceTableReqBuilder) WorkspaceId(workspaceId string) *RecordsPostWorkspaceTableReqBuilder {
	builder.apiReq.PathParams.Set("workspace_id", fmt.Sprint(workspaceId))
	return builder
}

// 数据表表名
//
// 示例值：table_name_1
func (builder *RecordsPostWorkspaceTableReqBuilder) TableName(tableName string) *RecordsPostWorkspaceTableReqBuilder {
	builder.apiReq.PathParams.Set("table_name", fmt.Sprint(tableName))
	return builder
}

// UPSERT 时使用，指定列，多列英文逗号拼接
//
// 示例值：name,age
func (builder *RecordsPostWorkspaceTableReqBuilder) Columns(columns string) *RecordsPostWorkspaceTableReqBuilder {
	builder.apiReq.QueryParams.Set("columns", fmt.Sprint(columns))
	return builder
}

// UPSERT 时使用，指定使用哪一个或多个具有唯一约束的字段作为冲突判断依据，默认为表主键。;假设 user_products 表有一个由 user_id 和 product_id 组成的复合唯一约束。
//
// 示例值：user_id,product_id
func (builder *RecordsPostWorkspaceTableReqBuilder) OnConflict(onConflict string) *RecordsPostWorkspaceTableReqBuilder {
	builder.apiReq.QueryParams.Set("on_conflict", fmt.Sprint(onConflict))
	return builder
}

// 向数据表中添加或更新记录
func (builder *RecordsPostWorkspaceTableReqBuilder) Body(body *RecordsPostWorkspaceTableReqBody) *RecordsPostWorkspaceTableReqBuilder {
	builder.body = body
	return builder
}

func (builder *RecordsPostWorkspaceTableReqBuilder) Build() *RecordsPostWorkspaceTableReq {
	req := &RecordsPostWorkspaceTableReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.body
	return req
}

type RecordsPostWorkspaceTableReqBody struct {
	Records *string `json:"records,omitempty"` // 要插入的数据记录列表，单次支持最多 500 条
}

type RecordsPostWorkspaceTableReq struct {
	apiReq *larkcore.ApiReq
	Body   *RecordsPostWorkspaceTableReqBody `body:""`
}

type RecordsPostWorkspaceTableRespData struct {
	RecordIds []string `json:"record_ids,omitempty"` // 按照记录顺序创建或更新的记录 ID 列表
}

type RecordsPostWorkspaceTableResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *RecordsPostWorkspaceTableRespData `json:"data"` // 业务数据
}

func (resp *RecordsPostWorkspaceTableResp) Success() bool {
	return resp.Code == 0
}

type TableGetWorkspaceTableReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewTableGetWorkspaceTableReqBuilder() *TableGetWorkspaceTableReqBuilder {
	builder := &TableGetWorkspaceTableReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 工作空间 id
//
// 示例值：workspace_abc
func (builder *TableGetWorkspaceTableReqBuilder) WorkspaceId(workspaceId string) *TableGetWorkspaceTableReqBuilder {
	builder.apiReq.PathParams.Set("workspace_id", fmt.Sprint(workspaceId))
	return builder
}

// 数据表表名
//
// 示例值：table_name_1
func (builder *TableGetWorkspaceTableReqBuilder) TableName(tableName string) *TableGetWorkspaceTableReqBuilder {
	builder.apiReq.PathParams.Set("table_name", fmt.Sprint(tableName))
	return builder
}

func (builder *TableGetWorkspaceTableReqBuilder) Build() *TableGetWorkspaceTableReq {
	req := &TableGetWorkspaceTableReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	return req
}

type TableGetWorkspaceTableReq struct {
	apiReq *larkcore.ApiReq
}

type TableGetWorkspaceTableRespData struct {
	Name *string `json:"name,omitempty"` // 数据表名，如 student

	Description *string `json:"description,omitempty"` // 数据表描述

	Columns []*WorkspaceDataTableColumnInfo `json:"columns,omitempty"` // 数据表列
}

type TableGetWorkspaceTableResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *TableGetWorkspaceTableRespData `json:"data"` // 业务数据
}

func (resp *TableGetWorkspaceTableResp) Success() bool {
	return resp.Code == 0
}

type ViewsGetWorkspaceViewReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewViewsGetWorkspaceViewReqBuilder() *ViewsGetWorkspaceViewReqBuilder {
	builder := &ViewsGetWorkspaceViewReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 工作空间id
//
// 示例值：workspace_abc
func (builder *ViewsGetWorkspaceViewReqBuilder) WorkspaceId(workspaceId string) *ViewsGetWorkspaceViewReqBuilder {
	builder.apiReq.PathParams.Set("workspace_id", fmt.Sprint(workspaceId))
	return builder
}

// 视图名称
//
// 示例值：view_name_1
func (builder *ViewsGetWorkspaceViewReqBuilder) ViewName(viewName string) *ViewsGetWorkspaceViewReqBuilder {
	builder.apiReq.PathParams.Set("view_name", fmt.Sprint(viewName))
	return builder
}

// 分页大小，用于限制一次请求所返回的数据条目数。默认10，最大500
//
// 示例值：10
func (builder *ViewsGetWorkspaceViewReqBuilder) PageSize(pageSize int) *ViewsGetWorkspaceViewReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 分页标记，第一次请求不填，表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该 page_token 获取查询结果
//
// 示例值：
func (builder *ViewsGetWorkspaceViewReqBuilder) PageToken(pageToken string) *ViewsGetWorkspaceViewReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

// 返回的列，默认为 *，即返回所有列。;遵循 PostgREST 语法，详情可查看 https://docs.postgrest.org/en/v13/references/api/tables_views.html#vertical-filtering
//
// 示例值：_id,_created_at,name
func (builder *ViewsGetWorkspaceViewReqBuilder) Select(select_ string) *ViewsGetWorkspaceViewReqBuilder {
	builder.apiReq.QueryParams.Set("select", fmt.Sprint(select_))
	return builder
}

// 筛选条件，尊许 PostgREST 语法，详情可查看 https://docs.postgrest.org/en/v13/references/api/tables_views.html#horizontal-filtering
//
// 示例值：age=gt.10
func (builder *ViewsGetWorkspaceViewReqBuilder) Filter(filter string) *ViewsGetWorkspaceViewReqBuilder {
	builder.apiReq.QueryParams.Set("filter", fmt.Sprint(filter))
	return builder
}

// 排序条件，如果没指定 asc/desc，默认为 asc，null 值可排在最前或最后。;尊许 PostgREST 语法，详情可查看;https://docs.postgrest.org/en/v13/references/api/tables_views.html#ordering
//
// 示例值：age.desc,score.asc
func (builder *ViewsGetWorkspaceViewReqBuilder) Order(order string) *ViewsGetWorkspaceViewReqBuilder {
	builder.apiReq.QueryParams.Set("order", fmt.Sprint(order))
	return builder
}

func (builder *ViewsGetWorkspaceViewReqBuilder) Build() *ViewsGetWorkspaceViewReq {
	req := &ViewsGetWorkspaceViewReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type ViewsGetWorkspaceViewReq struct {
	apiReq *larkcore.ApiReq
}

type ViewsGetWorkspaceViewRespData struct {
	HasMore *bool `json:"has_more,omitempty"` // 是否还有更多项

	PageToken *string `json:"page_token,omitempty"` // 分页标记，当 has_more 为 true 时，会同时返回新的 page_token，否则不返回 page_token

	Total *int `json:"total,omitempty"` // 符合条件的记录总数

	Items *string `json:"items,omitempty"` // 数据记录列表，格式为数组序列化后的 JSONString
}

type ViewsGetWorkspaceViewResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ViewsGetWorkspaceViewRespData `json:"data"` // 业务数据
}

func (resp *ViewsGetWorkspaceViewResp) Success() bool {
	return resp.Code == 0
}

type P2WorkspaceRecordChangeV1Data struct {
	Workspace *string `json:"workspace,omitempty"` // 记录所属的数据平台 workspace 信息

	App *string `json:"app,omitempty"` // 妙搭或 apaas 的 app id

	Table *string `json:"table,omitempty"` // 发生数据记录变更的数据表

	Type *string `json:"type,omitempty"` // 变更类型，枚举值：INSERT / UPDATE / DELETE

	Operator *string `json:"operator,omitempty"` // 变更人

	Before *string `json:"before,omitempty"` // 变更前的记录数据（INSERT 为 NULL，DELETE 包含全部字段）

	After *string `json:"after,omitempty"` // 变更后数据，仅含变更字段（INSERT 包含全部字段，DELETE 为 NULL）
}

type P2WorkspaceRecordChangeV1 struct {
	*larkevent.EventV2Base                                // 事件基础数据
	*larkevent.EventReq                                   // 请求原生数据
	Event                  *P2WorkspaceRecordChangeV1Data `json:"event"` // 事件内容
}

func (m *P2WorkspaceRecordChangeV1) RawReq(req *larkevent.EventReq) {
	m.EventReq = req
}

type ListAppIterator struct {
	nextPageToken *string
	items         []*App
	index         int
	limit         int
	ctx           context.Context
	req           *ListAppReq
	listFunc      func(ctx context.Context, req *ListAppReq, options ...larkcore.RequestOptionFunc) (*ListAppResp, error)
	options       []larkcore.RequestOptionFunc
	curlNum       int
}

func (iterator *ListAppIterator) Next() (bool, *App, 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 *ListAppIterator) NextPageToken() *string {
	return iterator.nextPageToken
}

type ListSeatActivityIterator struct {
	nextPageToken *string
	items         []*SeatActivity
	index         int
	limit         int
	ctx           context.Context
	req           *ListSeatActivityReq
	listFunc      func(ctx context.Context, req *ListSeatActivityReq, options ...larkcore.RequestOptionFunc) (*ListSeatActivityResp, error)
	options       []larkcore.RequestOptionFunc
	curlNum       int
}

func (iterator *ListSeatActivityIterator) Next() (bool, *SeatActivity, 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 *ListSeatActivityIterator) NextPageToken() *string {
	return iterator.nextPageToken
}

type ListSeatAssignmentIterator struct {
	nextPageToken *string
	items         []*SeatAssignment
	index         int
	limit         int
	ctx           context.Context
	req           *ListSeatAssignmentReq
	listFunc      func(ctx context.Context, req *ListSeatAssignmentReq, options ...larkcore.RequestOptionFunc) (*ListSeatAssignmentResp, error)
	options       []larkcore.RequestOptionFunc
	curlNum       int
}

func (iterator *ListSeatAssignmentIterator) Next() (bool, *SeatAssignment, 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 *ListSeatAssignmentIterator) NextPageToken() *string {
	return iterator.nextPageToken
}
