// Package task 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 larktask

import (
	"io"

	"fmt"

	"context"
	"errors"

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

const (
	UserIdTypeOpenId  = "open_id"  // open id
	UserIdTypeUnionId = "union_id" // union id
	UserIdTypeUserId  = "user_id"  // user_id
)

const (
	DirectionAsc  = "asc"  // 评论发表时间升序
	DirectionDesc = "desc" // 评论发表时间降序
)

const (
	TypeNumber       = "number"        // 数字
	TypeDatetime     = "datetime"      // 日期
	TypeMember       = "member"        // 成员
	TypeSingleSelect = "single_select" // 单选
	TypeMultiSelect  = "multi_select"  // 多选
	TypeText         = "text"          // 文本
)

const (
	UserIdTypeCreateCustomFieldOpenId  = "open_id"  // open_id
	UserIdTypeCreateCustomFieldUserId  = "user_id"  // user_id
	UserIdTypeCreateCustomFieldUnionId = "union_id" // union_id
)

const (
	UserIdTypeGetCustomFieldOpenId  = "open_id"  // open_id
	UserIdTypeGetCustomFieldUserId  = "user_id"  // user_id
	UserIdTypeGetCustomFieldUnionId = "union_id" // union_id
)

const (
	UserIdTypeListCustomFieldOpenId  = "open_id"  // open_id
	UserIdTypeListCustomFieldUserId  = "user_id"  // user_id
	UserIdTypeListCustomFieldUnionId = "union_id" // union_id
)

const (
	UserIdTypePatchCustomFieldOpenId  = "open_id"  // open_id
	UserIdTypePatchCustomFieldUnionId = "union_id" // union_id
	UserIdTypePatchCustomFieldUserId  = "user_id"  // user_id
)

const (
	OriginOwnerToRoleEditor = "editor" // 原负责人变为可编辑角色的协作人
	OriginOwnerToRoleViewer = "viewer" // 原负责人变为可阅读角色的协作人
	OriginOwnerToRoleNone   = "none"   // 原负责人直接退出清单
)

const (
	UserIdTypeCreateTasklistActivitySubscriptionOpenId  = "open_id"  // open_id
	UserIdTypeCreateTasklistActivitySubscriptionUnionId = "union_id" // union_id
	UserIdTypeCreateTasklistActivitySubscriptionUserId  = "user_id"  // user_id
)

const (
	UserIdTypeGetTasklistActivitySubscriptionOpenId  = "open_id"  // open_id
	UserIdTypeGetTasklistActivitySubscriptionUnionId = "union_id" // union_id
	UserIdTypeGetTasklistActivitySubscriptionUserId  = "user_id"  // user_id
)

const (
	UserIdTypeListTasklistActivitySubscriptionOpenId  = "open_id"  // open_id
	UserIdTypeListTasklistActivitySubscriptionUnionId = "union_id" // union_id
	UserIdTypeListTasklistActivitySubscriptionUserId  = "user_id"  // user_id
)

const (
	UserIdTypePatchTasklistActivitySubscriptionOpenId  = "open_id"  // open_id
	UserIdTypePatchTasklistActivitySubscriptionUnionId = "union_id" // union_id
	UserIdTypePatchTasklistActivitySubscriptionUserId  = "user_id"  // user_id
)

type ActivityRecord struct {
	Key *int `json:"key,omitempty"` // 动态类型的key

	Content *string `json:"content,omitempty"` // 动态的内容

	CreatedAt *string `json:"created_at,omitempty"` // 动态的发生的时间戳(ms)

	OpUser *Member `json:"op_user,omitempty"` // 动态发起者

	KeyName *string `json:"key_name,omitempty"` // key对应的名称

	TargetTaskGuid *string `json:"target_task_guid,omitempty"` // 动态相关的任务的guid。当动态是一个任务的动态时有值。

	TargetTaskName *string `json:"target_task_name,omitempty"` // target_task_guid对应的任务的名称。当target_task_guid有值时会提供。
}

type ActivityRecordBuilder struct {
	key     int // 动态类型的key
	keyFlag bool

	content     string // 动态的内容
	contentFlag bool

	createdAt     string // 动态的发生的时间戳(ms)
	createdAtFlag bool

	opUser     *Member // 动态发起者
	opUserFlag bool

	keyName     string // key对应的名称
	keyNameFlag bool

	targetTaskGuid     string // 动态相关的任务的guid。当动态是一个任务的动态时有值。
	targetTaskGuidFlag bool

	targetTaskName     string // target_task_guid对应的任务的名称。当target_task_guid有值时会提供。
	targetTaskNameFlag bool
}

func NewActivityRecordBuilder() *ActivityRecordBuilder {
	builder := &ActivityRecordBuilder{}
	return builder
}

// 动态类型的key
//
// 示例值：138
func (builder *ActivityRecordBuilder) Key(key int) *ActivityRecordBuilder {
	builder.key = key
	builder.keyFlag = true
	return builder
}

// 动态的内容
//
// 示例值：@小明 完成了工作计划的任务
func (builder *ActivityRecordBuilder) Content(content string) *ActivityRecordBuilder {
	builder.content = content
	builder.contentFlag = true
	return builder
}

// 动态的发生的时间戳(ms)
//
// 示例值：1665469397000
func (builder *ActivityRecordBuilder) CreatedAt(createdAt string) *ActivityRecordBuilder {
	builder.createdAt = createdAt
	builder.createdAtFlag = true
	return builder
}

// 动态发起者
//
// 示例值：
func (builder *ActivityRecordBuilder) OpUser(opUser *Member) *ActivityRecordBuilder {
	builder.opUser = opUser
	builder.opUserFlag = true
	return builder
}

// key对应的名称
//
// 示例值："add task into tasklist"
func (builder *ActivityRecordBuilder) KeyName(keyName string) *ActivityRecordBuilder {
	builder.keyName = keyName
	builder.keyNameFlag = true
	return builder
}

// 动态相关的任务的guid。当动态是一个任务的动态时有值。
//
// 示例值：ead413d9-4027-490e-9089-b1b241d3b15d
func (builder *ActivityRecordBuilder) TargetTaskGuid(targetTaskGuid string) *ActivityRecordBuilder {
	builder.targetTaskGuid = targetTaskGuid
	builder.targetTaskGuidFlag = true
	return builder
}

// target_task_guid对应的任务的名称。当target_task_guid有值时会提供。
//
// 示例值：完成本周周报。
func (builder *ActivityRecordBuilder) TargetTaskName(targetTaskName string) *ActivityRecordBuilder {
	builder.targetTaskName = targetTaskName
	builder.targetTaskNameFlag = true
	return builder
}

func (builder *ActivityRecordBuilder) Build() *ActivityRecord {
	req := &ActivityRecord{}
	if builder.keyFlag {
		req.Key = &builder.key

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

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

	}
	if builder.opUserFlag {
		req.OpUser = builder.opUser
	}
	if builder.keyNameFlag {
		req.KeyName = &builder.keyName

	}
	if builder.targetTaskGuidFlag {
		req.TargetTaskGuid = &builder.targetTaskGuid

	}
	if builder.targetTaskNameFlag {
		req.TargetTaskName = &builder.targetTaskName

	}
	return req
}

type Attachment struct {
	Guid *string `json:"guid,omitempty"` // 附件guid

	FileToken *string `json:"file_token,omitempty"` // 附件在云文档系统中的token

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

	Size *int `json:"size,omitempty"` // 附件的字节大小

	Resource *Resource `json:"resource,omitempty"` // 附件归属的资源

	Uploader *Member `json:"uploader,omitempty"` // 附件上传者

	IsCover *bool `json:"is_cover,omitempty"` // 是否是封面图

	UploadedAt *string `json:"uploaded_at,omitempty"` // 上传时间戳(ms)

	Url *string `json:"url,omitempty"` // 附件的临时下载url，有效时间3分钟，且只允许调用3次进行附件下载。只有在获取附件时会动态生成。
}

type AttachmentBuilder struct {
	guid     string // 附件guid
	guidFlag bool

	fileToken     string // 附件在云文档系统中的token
	fileTokenFlag bool

	name     string // 附件名
	nameFlag bool

	size     int // 附件的字节大小
	sizeFlag bool

	resource     *Resource // 附件归属的资源
	resourceFlag bool

	uploader     *Member // 附件上传者
	uploaderFlag bool

	isCover     bool // 是否是封面图
	isCoverFlag bool

	uploadedAt     string // 上传时间戳(ms)
	uploadedAtFlag bool

	url     string // 附件的临时下载url，有效时间3分钟，且只允许调用3次进行附件下载。只有在获取附件时会动态生成。
	urlFlag bool
}

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

// 附件guid
//
// 示例值：f860de3e-6881-4ddd-9321-070f36d1af0b
func (builder *AttachmentBuilder) Guid(guid string) *AttachmentBuilder {
	builder.guid = guid
	builder.guidFlag = true
	return builder
}

// 附件在云文档系统中的token
//
// 示例值：boxcnTDqPaRA6JbYnzQsZ2doB2b
func (builder *AttachmentBuilder) FileToken(fileToken string) *AttachmentBuilder {
	builder.fileToken = fileToken
	builder.fileTokenFlag = true
	return builder
}

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

// 附件的字节大小
//
// 示例值：62232
func (builder *AttachmentBuilder) Size(size int) *AttachmentBuilder {
	builder.size = size
	builder.sizeFlag = true
	return builder
}

// 附件归属的资源
//
// 示例值：
func (builder *AttachmentBuilder) Resource(resource *Resource) *AttachmentBuilder {
	builder.resource = resource
	builder.resourceFlag = true
	return builder
}

// 附件上传者
//
// 示例值：
func (builder *AttachmentBuilder) Uploader(uploader *Member) *AttachmentBuilder {
	builder.uploader = uploader
	builder.uploaderFlag = true
	return builder
}

// 是否是封面图
//
// 示例值：false
func (builder *AttachmentBuilder) IsCover(isCover bool) *AttachmentBuilder {
	builder.isCover = isCover
	builder.isCoverFlag = true
	return builder
}

// 上传时间戳(ms)
//
// 示例值：1675742789470
func (builder *AttachmentBuilder) UploadedAt(uploadedAt string) *AttachmentBuilder {
	builder.uploadedAt = uploadedAt
	builder.uploadedAtFlag = true
	return builder
}

// 附件的临时下载url，有效时间3分钟，且只允许调用3次进行附件下载。只有在获取附件时会动态生成。
//
// 示例值：https://example.com/download/authcode/?code=OWMzNDlmMjJmZThkYzZkZGJlMjYwZTI0OTUxZTE2MDJfMDZmZmMwOWVj
func (builder *AttachmentBuilder) Url(url string) *AttachmentBuilder {
	builder.url = url
	builder.urlFlag = true
	return builder
}

func (builder *AttachmentBuilder) Build() *Attachment {
	req := &Attachment{}
	if builder.guidFlag {
		req.Guid = &builder.guid

	}
	if builder.fileTokenFlag {
		req.FileToken = &builder.fileToken

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

	}
	if builder.sizeFlag {
		req.Size = &builder.size

	}
	if builder.resourceFlag {
		req.Resource = builder.resource
	}
	if builder.uploaderFlag {
		req.Uploader = builder.uploader
	}
	if builder.isCoverFlag {
		req.IsCover = &builder.isCover

	}
	if builder.uploadedAtFlag {
		req.UploadedAt = &builder.uploadedAt

	}
	if builder.urlFlag {
		req.Url = &builder.url

	}
	return req
}

type Comment struct {
	Id *string `json:"id,omitempty"` // 评论id

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

	Creator *Member `json:"creator,omitempty"` // 评论创建人

	ReplyToCommentId *string `json:"reply_to_comment_id,omitempty"` // 被回复评论的id。如果不是回复评论，则为空。

	CreatedAt *string `json:"created_at,omitempty"` // 评论创建时间戳（ms)

	UpdatedAt *string `json:"updated_at,omitempty"` // 评论更新时间戳（ms）

	ResourceType *string `json:"resource_type,omitempty"` // 任务关联的资源类型

	ResourceId *string `json:"resource_id,omitempty"` // 任务关联的资源ID
}

type CommentBuilder struct {
	id     string // 评论id
	idFlag bool

	content     string // 评论内容
	contentFlag bool

	creator     *Member // 评论创建人
	creatorFlag bool

	replyToCommentId     string // 被回复评论的id。如果不是回复评论，则为空。
	replyToCommentIdFlag bool

	createdAt     string // 评论创建时间戳（ms)
	createdAtFlag bool

	updatedAt     string // 评论更新时间戳（ms）
	updatedAtFlag bool

	resourceType     string // 任务关联的资源类型
	resourceTypeFlag bool

	resourceId     string // 任务关联的资源ID
	resourceIdFlag bool
}

func NewCommentBuilder() *CommentBuilder {
	builder := &CommentBuilder{}
	return builder
}

// 评论id
//
// 示例值：7197020628442939411
func (builder *CommentBuilder) Id(id string) *CommentBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 评论内容
//
// 示例值：这是一条评论
func (builder *CommentBuilder) Content(content string) *CommentBuilder {
	builder.content = content
	builder.contentFlag = true
	return builder
}

// 评论创建人
//
// 示例值：
func (builder *CommentBuilder) Creator(creator *Member) *CommentBuilder {
	builder.creator = creator
	builder.creatorFlag = true
	return builder
}

// 被回复评论的id。如果不是回复评论，则为空。
//
// 示例值：7166825117308174356
func (builder *CommentBuilder) ReplyToCommentId(replyToCommentId string) *CommentBuilder {
	builder.replyToCommentId = replyToCommentId
	builder.replyToCommentIdFlag = true
	return builder
}

// 评论创建时间戳（ms)
//
// 示例值：1675742789470
func (builder *CommentBuilder) CreatedAt(createdAt string) *CommentBuilder {
	builder.createdAt = createdAt
	builder.createdAtFlag = true
	return builder
}

// 评论更新时间戳（ms）
//
// 示例值：1675742789470
func (builder *CommentBuilder) UpdatedAt(updatedAt string) *CommentBuilder {
	builder.updatedAt = updatedAt
	builder.updatedAtFlag = true
	return builder
}

// 任务关联的资源类型
//
// 示例值：task
func (builder *CommentBuilder) ResourceType(resourceType string) *CommentBuilder {
	builder.resourceType = resourceType
	builder.resourceTypeFlag = true
	return builder
}

// 任务关联的资源ID
//
// 示例值：ccb55625-95d2-2e80-655f-0e40bf67953f
func (builder *CommentBuilder) ResourceId(resourceId string) *CommentBuilder {
	builder.resourceId = resourceId
	builder.resourceIdFlag = true
	return builder
}

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

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

	}
	if builder.creatorFlag {
		req.Creator = builder.creator
	}
	if builder.replyToCommentIdFlag {
		req.ReplyToCommentId = &builder.replyToCommentId

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

	}
	if builder.updatedAtFlag {
		req.UpdatedAt = &builder.updatedAt

	}
	if builder.resourceTypeFlag {
		req.ResourceType = &builder.resourceType

	}
	if builder.resourceIdFlag {
		req.ResourceId = &builder.resourceId

	}
	return req
}

type CustomComplete struct {
	Pc *CustomCompleteItem `json:"pc,omitempty"` // pc客户端自定义完成配置（含mac和windows）

	Ios *CustomCompleteItem `json:"ios,omitempty"` // ios端的自定义完成配置

	Android *CustomCompleteItem `json:"android,omitempty"` // android端的自定义完成配置
}

type CustomCompleteBuilder struct {
	pc     *CustomCompleteItem // pc客户端自定义完成配置（含mac和windows）
	pcFlag bool

	ios     *CustomCompleteItem // ios端的自定义完成配置
	iosFlag bool

	android     *CustomCompleteItem // android端的自定义完成配置
	androidFlag bool
}

func NewCustomCompleteBuilder() *CustomCompleteBuilder {
	builder := &CustomCompleteBuilder{}
	return builder
}

// pc客户端自定义完成配置（含mac和windows）
//
// 示例值：
func (builder *CustomCompleteBuilder) Pc(pc *CustomCompleteItem) *CustomCompleteBuilder {
	builder.pc = pc
	builder.pcFlag = true
	return builder
}

// ios端的自定义完成配置
//
// 示例值：
func (builder *CustomCompleteBuilder) Ios(ios *CustomCompleteItem) *CustomCompleteBuilder {
	builder.ios = ios
	builder.iosFlag = true
	return builder
}

// android端的自定义完成配置
//
// 示例值：
func (builder *CustomCompleteBuilder) Android(android *CustomCompleteItem) *CustomCompleteBuilder {
	builder.android = android
	builder.androidFlag = true
	return builder
}

func (builder *CustomCompleteBuilder) Build() *CustomComplete {
	req := &CustomComplete{}
	if builder.pcFlag {
		req.Pc = builder.pc
	}
	if builder.iosFlag {
		req.Ios = builder.ios
	}
	if builder.androidFlag {
		req.Android = builder.android
	}
	return req
}

type CustomCompleteItem struct {
	Href *string `json:"href,omitempty"` // 自定义完成的跳转url

	Tip *I18nText `json:"tip,omitempty"` // 自定义完成的弹出提示为
}

type CustomCompleteItemBuilder struct {
	href     string // 自定义完成的跳转url
	hrefFlag bool

	tip     *I18nText // 自定义完成的弹出提示为
	tipFlag bool
}

func NewCustomCompleteItemBuilder() *CustomCompleteItemBuilder {
	builder := &CustomCompleteItemBuilder{}
	return builder
}

// 自定义完成的跳转url
//
// 示例值：https://www.example.com
func (builder *CustomCompleteItemBuilder) Href(href string) *CustomCompleteItemBuilder {
	builder.href = href
	builder.hrefFlag = true
	return builder
}

// 自定义完成的弹出提示为
//
// 示例值：
func (builder *CustomCompleteItemBuilder) Tip(tip *I18nText) *CustomCompleteItemBuilder {
	builder.tip = tip
	builder.tipFlag = true
	return builder
}

func (builder *CustomCompleteItemBuilder) Build() *CustomCompleteItem {
	req := &CustomCompleteItem{}
	if builder.hrefFlag {
		req.Href = &builder.href

	}
	if builder.tipFlag {
		req.Tip = builder.tip
	}
	return req
}

type CustomField struct {
	Guid *string `json:"guid,omitempty"` // 自定义字段的GUID

	Name *string `json:"name,omitempty"` // 自定义字段名称

	Type *string `json:"type,omitempty"` // 自定义字段类型

	NumberSetting *NumberSetting `json:"number_setting,omitempty"` // 数字类型的字段设置

	MemberSetting *MemberSetting `json:"member_setting,omitempty"` // 人员类型的字段设置

	DatetimeSetting *DatetimeSetting `json:"datetime_setting,omitempty"` // 时间日期类型的字段设置

	SingleSelectSetting *SelectSetting `json:"single_select_setting,omitempty"` // 单选类型的字段设置

	MultiSelectSetting *SelectSetting `json:"multi_select_setting,omitempty"` // 多选类型的字段设置

	Creator *Member `json:"creator,omitempty"` // 创建人

	CreatedAt *string `json:"created_at,omitempty"` // 自定义字段创建的时间戳(ms)

	UpdatedAt *string `json:"updated_at,omitempty"` // 自定义字段的更新时间戳(ms)

	TextSetting *TextSetting `json:"text_setting,omitempty"` // 文本字段配置
}

type CustomFieldBuilder struct {
	guid     string // 自定义字段的GUID
	guidFlag bool

	name     string // 自定义字段名称
	nameFlag bool

	type_    string // 自定义字段类型
	typeFlag bool

	numberSetting     *NumberSetting // 数字类型的字段设置
	numberSettingFlag bool

	memberSetting     *MemberSetting // 人员类型的字段设置
	memberSettingFlag bool

	datetimeSetting     *DatetimeSetting // 时间日期类型的字段设置
	datetimeSettingFlag bool

	singleSelectSetting     *SelectSetting // 单选类型的字段设置
	singleSelectSettingFlag bool

	multiSelectSetting     *SelectSetting // 多选类型的字段设置
	multiSelectSettingFlag bool

	creator     *Member // 创建人
	creatorFlag bool

	createdAt     string // 自定义字段创建的时间戳(ms)
	createdAtFlag bool

	updatedAt     string // 自定义字段的更新时间戳(ms)
	updatedAtFlag bool

	textSetting     *TextSetting // 文本字段配置
	textSettingFlag bool
}

func NewCustomFieldBuilder() *CustomFieldBuilder {
	builder := &CustomFieldBuilder{}
	return builder
}

// 自定义字段的GUID
//
// 示例值：34d4b29f-3d58-4bc5-b752-6be80fb687c8
func (builder *CustomFieldBuilder) Guid(guid string) *CustomFieldBuilder {
	builder.guid = guid
	builder.guidFlag = true
	return builder
}

// 自定义字段名称
//
// 示例值：优先级
func (builder *CustomFieldBuilder) Name(name string) *CustomFieldBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 自定义字段类型
//
// 示例值：number
func (builder *CustomFieldBuilder) Type(type_ string) *CustomFieldBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// 数字类型的字段设置
//
// 示例值：
func (builder *CustomFieldBuilder) NumberSetting(numberSetting *NumberSetting) *CustomFieldBuilder {
	builder.numberSetting = numberSetting
	builder.numberSettingFlag = true
	return builder
}

// 人员类型的字段设置
//
// 示例值：
func (builder *CustomFieldBuilder) MemberSetting(memberSetting *MemberSetting) *CustomFieldBuilder {
	builder.memberSetting = memberSetting
	builder.memberSettingFlag = true
	return builder
}

// 时间日期类型的字段设置
//
// 示例值：
func (builder *CustomFieldBuilder) DatetimeSetting(datetimeSetting *DatetimeSetting) *CustomFieldBuilder {
	builder.datetimeSetting = datetimeSetting
	builder.datetimeSettingFlag = true
	return builder
}

// 单选类型的字段设置
//
// 示例值：
func (builder *CustomFieldBuilder) SingleSelectSetting(singleSelectSetting *SelectSetting) *CustomFieldBuilder {
	builder.singleSelectSetting = singleSelectSetting
	builder.singleSelectSettingFlag = true
	return builder
}

// 多选类型的字段设置
//
// 示例值：
func (builder *CustomFieldBuilder) MultiSelectSetting(multiSelectSetting *SelectSetting) *CustomFieldBuilder {
	builder.multiSelectSetting = multiSelectSetting
	builder.multiSelectSettingFlag = true
	return builder
}

// 创建人
//
// 示例值：
func (builder *CustomFieldBuilder) Creator(creator *Member) *CustomFieldBuilder {
	builder.creator = creator
	builder.creatorFlag = true
	return builder
}

// 自定义字段创建的时间戳(ms)
//
// 示例值：1688196600000
func (builder *CustomFieldBuilder) CreatedAt(createdAt string) *CustomFieldBuilder {
	builder.createdAt = createdAt
	builder.createdAtFlag = true
	return builder
}

// 自定义字段的更新时间戳(ms)
//
// 示例值：1688196600000
func (builder *CustomFieldBuilder) UpdatedAt(updatedAt string) *CustomFieldBuilder {
	builder.updatedAt = updatedAt
	builder.updatedAtFlag = true
	return builder
}

// 文本字段配置
//
// 示例值：
func (builder *CustomFieldBuilder) TextSetting(textSetting *TextSetting) *CustomFieldBuilder {
	builder.textSetting = textSetting
	builder.textSettingFlag = true
	return builder
}

func (builder *CustomFieldBuilder) Build() *CustomField {
	req := &CustomField{}
	if builder.guidFlag {
		req.Guid = &builder.guid

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

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

	}
	if builder.numberSettingFlag {
		req.NumberSetting = builder.numberSetting
	}
	if builder.memberSettingFlag {
		req.MemberSetting = builder.memberSetting
	}
	if builder.datetimeSettingFlag {
		req.DatetimeSetting = builder.datetimeSetting
	}
	if builder.singleSelectSettingFlag {
		req.SingleSelectSetting = builder.singleSelectSetting
	}
	if builder.multiSelectSettingFlag {
		req.MultiSelectSetting = builder.multiSelectSetting
	}
	if builder.creatorFlag {
		req.Creator = builder.creator
	}
	if builder.createdAtFlag {
		req.CreatedAt = &builder.createdAt

	}
	if builder.updatedAtFlag {
		req.UpdatedAt = &builder.updatedAt

	}
	if builder.textSettingFlag {
		req.TextSetting = builder.textSetting
	}
	return req
}

type CustomFieldValue struct {
	Guid *string `json:"guid,omitempty"` // 字段GUID

	Type *string `json:"type,omitempty"` // 自定义字段类型，支持"member", "datetime", "number", "single_select", "multi_select"五种类型

	NumberValue *string `json:"number_value,omitempty"` // 数字类型的自定义字段值，填写一个合法数字的字符串表示，空字符串表示设为空。

	DatetimeValue *string `json:"datetime_value,omitempty"` // 日期类型自定义字段值。可以输入一个表示日期的以毫秒为单位的字符串。设为空字符串表示设为空。

	MemberValue []*Member `json:"member_value,omitempty"` // 人员类型的自定义字段值，可以设置1个或多个用户的id（遵循member格式，只支持user类型）。当该字段的设置为“不能多选”时只能输入一个值。设为空数组表示设为空。

	SingleSelectValue *string `json:"single_select_value,omitempty"` // 单选类型字段值，填写一个字段选项的option_guid。设置为空字符串表示设为空。

	MultiSelectValue []string `json:"multi_select_value,omitempty"` // 多选类型字段值，可以填写一个或多个本字段的option_guid。设为空数组表示设为空。

	Name *string `json:"name,omitempty"` // 自定义字段名

	TextValue *string `json:"text_value,omitempty"` // 文本类型字段值。可以输入一段文本。空字符串表示清空。
}

type CustomFieldValueBuilder struct {
	guid     string // 字段GUID
	guidFlag bool

	type_    string // 自定义字段类型，支持"member", "datetime", "number", "single_select", "multi_select"五种类型
	typeFlag bool

	numberValue     string // 数字类型的自定义字段值，填写一个合法数字的字符串表示，空字符串表示设为空。
	numberValueFlag bool

	datetimeValue     string // 日期类型自定义字段值。可以输入一个表示日期的以毫秒为单位的字符串。设为空字符串表示设为空。
	datetimeValueFlag bool

	memberValue     []*Member // 人员类型的自定义字段值，可以设置1个或多个用户的id（遵循member格式，只支持user类型）。当该字段的设置为“不能多选”时只能输入一个值。设为空数组表示设为空。
	memberValueFlag bool

	singleSelectValue     string // 单选类型字段值，填写一个字段选项的option_guid。设置为空字符串表示设为空。
	singleSelectValueFlag bool

	multiSelectValue     []string // 多选类型字段值，可以填写一个或多个本字段的option_guid。设为空数组表示设为空。
	multiSelectValueFlag bool

	name     string // 自定义字段名
	nameFlag bool

	textValue     string // 文本类型字段值。可以输入一段文本。空字符串表示清空。
	textValueFlag bool
}

func NewCustomFieldValueBuilder() *CustomFieldValueBuilder {
	builder := &CustomFieldValueBuilder{}
	return builder
}

// 字段GUID
//
// 示例值：a4f648d7-76ef-477f-bc8e-0601b5a60093
func (builder *CustomFieldValueBuilder) Guid(guid string) *CustomFieldValueBuilder {
	builder.guid = guid
	builder.guidFlag = true
	return builder
}

// 自定义字段类型，支持"member", "datetime", "number", "single_select", "multi_select"五种类型
//
// 示例值：number
func (builder *CustomFieldValueBuilder) Type(type_ string) *CustomFieldValueBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// 数字类型的自定义字段值，填写一个合法数字的字符串表示，空字符串表示设为空。
//
// 示例值：10.23
func (builder *CustomFieldValueBuilder) NumberValue(numberValue string) *CustomFieldValueBuilder {
	builder.numberValue = numberValue
	builder.numberValueFlag = true
	return builder
}

// 日期类型自定义字段值。可以输入一个表示日期的以毫秒为单位的字符串。设为空字符串表示设为空。
//
// 示例值：1687708260000
func (builder *CustomFieldValueBuilder) DatetimeValue(datetimeValue string) *CustomFieldValueBuilder {
	builder.datetimeValue = datetimeValue
	builder.datetimeValueFlag = true
	return builder
}

// 人员类型的自定义字段值，可以设置1个或多个用户的id（遵循member格式，只支持user类型）。当该字段的设置为“不能多选”时只能输入一个值。设为空数组表示设为空。
//
// 示例值：
func (builder *CustomFieldValueBuilder) MemberValue(memberValue []*Member) *CustomFieldValueBuilder {
	builder.memberValue = memberValue
	builder.memberValueFlag = true
	return builder
}

// 单选类型字段值，填写一个字段选项的option_guid。设置为空字符串表示设为空。
//
// 示例值：4216f79b-3fda-4dc6-a0c4-a16022e47152
func (builder *CustomFieldValueBuilder) SingleSelectValue(singleSelectValue string) *CustomFieldValueBuilder {
	builder.singleSelectValue = singleSelectValue
	builder.singleSelectValueFlag = true
	return builder
}

// 多选类型字段值，可以填写一个或多个本字段的option_guid。设为空数组表示设为空。
//
// 示例值：
func (builder *CustomFieldValueBuilder) MultiSelectValue(multiSelectValue []string) *CustomFieldValueBuilder {
	builder.multiSelectValue = multiSelectValue
	builder.multiSelectValueFlag = true
	return builder
}

// 自定义字段名
//
// 示例值：优先级
func (builder *CustomFieldValueBuilder) Name(name string) *CustomFieldValueBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 文本类型字段值。可以输入一段文本。空字符串表示清空。
//
// 示例值：这是一段文本介绍。
func (builder *CustomFieldValueBuilder) TextValue(textValue string) *CustomFieldValueBuilder {
	builder.textValue = textValue
	builder.textValueFlag = true
	return builder
}

func (builder *CustomFieldValueBuilder) Build() *CustomFieldValue {
	req := &CustomFieldValue{}
	if builder.guidFlag {
		req.Guid = &builder.guid

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

	}
	if builder.numberValueFlag {
		req.NumberValue = &builder.numberValue

	}
	if builder.datetimeValueFlag {
		req.DatetimeValue = &builder.datetimeValue

	}
	if builder.memberValueFlag {
		req.MemberValue = builder.memberValue
	}
	if builder.singleSelectValueFlag {
		req.SingleSelectValue = &builder.singleSelectValue

	}
	if builder.multiSelectValueFlag {
		req.MultiSelectValue = builder.multiSelectValue
	}
	if builder.nameFlag {
		req.Name = &builder.name

	}
	if builder.textValueFlag {
		req.TextValue = &builder.textValue

	}
	return req
}

type DatetimeSetting struct {
	Format *string `json:"format,omitempty"` // 日期显示格式
}

type DatetimeSettingBuilder struct {
	format     string // 日期显示格式
	formatFlag bool
}

func NewDatetimeSettingBuilder() *DatetimeSettingBuilder {
	builder := &DatetimeSettingBuilder{}
	return builder
}

// 日期显示格式
//
// 示例值：yyyy/mm/dd
func (builder *DatetimeSettingBuilder) Format(format string) *DatetimeSettingBuilder {
	builder.format = format
	builder.formatFlag = true
	return builder
}

func (builder *DatetimeSettingBuilder) Build() *DatetimeSetting {
	req := &DatetimeSetting{}
	if builder.formatFlag {
		req.Format = &builder.format

	}
	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 DocxSource struct {
	Token *string `json:"token,omitempty"` // 任务关联的文档token，要求：如果使用tenant_access_token请求，则请求机器人有文档编辑权限；如果使用user_access_token，则请求用户有文档的编辑权限

	BlockId *string `json:"block_id,omitempty"` // 任务关联的文档block_id，要求block_id存在于token对应文档中、且block_id没有绑定过其他的任务
}

type DocxSourceBuilder struct {
	token     string // 任务关联的文档token，要求：如果使用tenant_access_token请求，则请求机器人有文档编辑权限；如果使用user_access_token，则请求用户有文档的编辑权限
	tokenFlag bool

	blockId     string // 任务关联的文档block_id，要求block_id存在于token对应文档中、且block_id没有绑定过其他的任务
	blockIdFlag bool
}

func NewDocxSourceBuilder() *DocxSourceBuilder {
	builder := &DocxSourceBuilder{}
	return builder
}

// 任务关联的文档token，要求：如果使用tenant_access_token请求，则请求机器人有文档编辑权限；如果使用user_access_token，则请求用户有文档的编辑权限
//
// 示例值：SFZHdZLo2oXprexhDSrbtvmScHm
func (builder *DocxSourceBuilder) Token(token string) *DocxSourceBuilder {
	builder.token = token
	builder.tokenFlag = true
	return builder
}

// 任务关联的文档block_id，要求block_id存在于token对应文档中、且block_id没有绑定过其他的任务
//
// 示例值：O6wwd22uIoG8acxwxGtbljaUcfc
func (builder *DocxSourceBuilder) BlockId(blockId string) *DocxSourceBuilder {
	builder.blockId = blockId
	builder.blockIdFlag = true
	return builder
}

func (builder *DocxSourceBuilder) Build() *DocxSource {
	req := &DocxSource{}
	if builder.tokenFlag {
		req.Token = &builder.token

	}
	if builder.blockIdFlag {
		req.BlockId = &builder.blockId

	}
	return req
}

type Due struct {
	Timestamp *string `json:"timestamp,omitempty"` // 截止时间/日期的时间戳，距1970-01-01 00:00:00的毫秒数。如果截止时间是一个日期，需要把日期转换成时间戳，并设置 is_all_day=true

	IsAllDay *bool `json:"is_all_day,omitempty"` // 是否截止到一个日期。如果设为true，timestamp中只有日期的部分会被解析和存储。
}

type DueBuilder struct {
	timestamp     string // 截止时间/日期的时间戳，距1970-01-01 00:00:00的毫秒数。如果截止时间是一个日期，需要把日期转换成时间戳，并设置 is_all_day=true
	timestampFlag bool

	isAllDay     bool // 是否截止到一个日期。如果设为true，timestamp中只有日期的部分会被解析和存储。
	isAllDayFlag bool
}

func NewDueBuilder() *DueBuilder {
	builder := &DueBuilder{}
	return builder
}

// 截止时间/日期的时间戳，距1970-01-01 00:00:00的毫秒数。如果截止时间是一个日期，需要把日期转换成时间戳，并设置 is_all_day=true
//
// 示例值：1675454764000
func (builder *DueBuilder) Timestamp(timestamp string) *DueBuilder {
	builder.timestamp = timestamp
	builder.timestampFlag = true
	return builder
}

// 是否截止到一个日期。如果设为true，timestamp中只有日期的部分会被解析和存储。
//
// 示例值：true
func (builder *DueBuilder) IsAllDay(isAllDay bool) *DueBuilder {
	builder.isAllDay = isAllDay
	builder.isAllDayFlag = true
	return builder
}

func (builder *DueBuilder) Build() *Due {
	req := &Due{}
	if builder.timestampFlag {
		req.Timestamp = &builder.timestamp

	}
	if builder.isAllDayFlag {
		req.IsAllDay = &builder.isAllDay

	}
	return req
}

type Dummy struct {
	Foo *string `json:"foo,omitempty"` // amazing的api meta
}

type DummyBuilder struct {
	foo     string // amazing的api meta
	fooFlag bool
}

func NewDummyBuilder() *DummyBuilder {
	builder := &DummyBuilder{}
	return builder
}

// amazing的api meta
//
// 示例值：amazing the api meta haha
func (builder *DummyBuilder) Foo(foo string) *DummyBuilder {
	builder.foo = foo
	builder.fooFlag = true
	return builder
}

func (builder *DummyBuilder) Build() *Dummy {
	req := &Dummy{}
	if builder.fooFlag {
		req.Foo = &builder.foo

	}
	return req
}

type Href struct {
	Url *string `json:"url,omitempty"` // 链接对应的地址

	Title *string `json:"title,omitempty"` // 链接对应的标题
}

type HrefBuilder struct {
	url     string // 链接对应的地址
	urlFlag bool

	title     string // 链接对应的标题
	titleFlag bool
}

func NewHrefBuilder() *HrefBuilder {
	builder := &HrefBuilder{}
	return builder
}

// 链接对应的地址
//
// 示例值：https://www.example.com
func (builder *HrefBuilder) Url(url string) *HrefBuilder {
	builder.url = url
	builder.urlFlag = true
	return builder
}

// 链接对应的标题
//
// 示例值：反馈一个问题，需要协助排查
func (builder *HrefBuilder) Title(title string) *HrefBuilder {
	builder.title = title
	builder.titleFlag = true
	return builder
}

func (builder *HrefBuilder) Build() *Href {
	req := &Href{}
	if builder.urlFlag {
		req.Url = &builder.url

	}
	if builder.titleFlag {
		req.Title = &builder.title

	}
	return req
}

type I18nText struct {
	EnUs *string `json:"en_us,omitempty"` // 英文

	ZhCn *string `json:"zh_cn,omitempty"` // 中文

	ZhHk *string `json:"zh_hk,omitempty"` // 中文（香港地区）

	ZhTw *string `json:"zh_tw,omitempty"` // 中文（台湾地区）

	JaJp *string `json:"ja_jp,omitempty"` // 日语

	FrFr *string `json:"fr_fr,omitempty"` // 法语

	ItIt *string `json:"it_it,omitempty"` // 意大利语

	DeDe *string `json:"de_de,omitempty"` // 德语

	RuRu *string `json:"ru_ru,omitempty"` // 俄语

	ThTh *string `json:"th_th,omitempty"` // 泰语

	EsEs *string `json:"es_es,omitempty"` // 西班牙语

	KoKr *string `json:"ko_kr,omitempty"` // 韩语
}

type I18nTextBuilder struct {
	enUs     string // 英文
	enUsFlag bool

	zhCn     string // 中文
	zhCnFlag bool

	zhHk     string // 中文（香港地区）
	zhHkFlag bool

	zhTw     string // 中文（台湾地区）
	zhTwFlag bool

	jaJp     string // 日语
	jaJpFlag bool

	frFr     string // 法语
	frFrFlag bool

	itIt     string // 意大利语
	itItFlag bool

	deDe     string // 德语
	deDeFlag bool

	ruRu     string // 俄语
	ruRuFlag bool

	thTh     string // 泰语
	thThFlag bool

	esEs     string // 西班牙语
	esEsFlag bool

	koKr     string // 韩语
	koKrFlag bool
}

func NewI18nTextBuilder() *I18nTextBuilder {
	builder := &I18nTextBuilder{}
	return builder
}

// 英文
//
// 示例值：workbench
func (builder *I18nTextBuilder) EnUs(enUs string) *I18nTextBuilder {
	builder.enUs = enUs
	builder.enUsFlag = true
	return builder
}

// 中文
//
// 示例值：工作台
func (builder *I18nTextBuilder) ZhCn(zhCn string) *I18nTextBuilder {
	builder.zhCn = zhCn
	builder.zhCnFlag = true
	return builder
}

// 中文（香港地区）
//
// 示例值：工作臺
func (builder *I18nTextBuilder) ZhHk(zhHk string) *I18nTextBuilder {
	builder.zhHk = zhHk
	builder.zhHkFlag = true
	return builder
}

// 中文（台湾地区）
//
// 示例值：工作臺
func (builder *I18nTextBuilder) ZhTw(zhTw string) *I18nTextBuilder {
	builder.zhTw = zhTw
	builder.zhTwFlag = true
	return builder
}

// 日语
//
// 示例值：作業台
func (builder *I18nTextBuilder) JaJp(jaJp string) *I18nTextBuilder {
	builder.jaJp = jaJp
	builder.jaJpFlag = true
	return builder
}

// 法语
//
// 示例值：Table de travail
func (builder *I18nTextBuilder) FrFr(frFr string) *I18nTextBuilder {
	builder.frFr = frFr
	builder.frFrFlag = true
	return builder
}

// 意大利语
//
// 示例值：banco di lavoro
func (builder *I18nTextBuilder) ItIt(itIt string) *I18nTextBuilder {
	builder.itIt = itIt
	builder.itItFlag = true
	return builder
}

// 德语
//
// 示例值：Werkbank
func (builder *I18nTextBuilder) DeDe(deDe string) *I18nTextBuilder {
	builder.deDe = deDe
	builder.deDeFlag = true
	return builder
}

// 俄语
//
// 示例值：верстак
func (builder *I18nTextBuilder) RuRu(ruRu string) *I18nTextBuilder {
	builder.ruRu = ruRu
	builder.ruRuFlag = true
	return builder
}

// 泰语
//
// 示例值：โต๊ะทำงาน
func (builder *I18nTextBuilder) ThTh(thTh string) *I18nTextBuilder {
	builder.thTh = thTh
	builder.thThFlag = true
	return builder
}

// 西班牙语
//
// 示例值：banco de trabajo
func (builder *I18nTextBuilder) EsEs(esEs string) *I18nTextBuilder {
	builder.esEs = esEs
	builder.esEsFlag = true
	return builder
}

// 韩语
//
// 示例值：작업대
func (builder *I18nTextBuilder) KoKr(koKr string) *I18nTextBuilder {
	builder.koKr = koKr
	builder.koKrFlag = true
	return builder
}

func (builder *I18nTextBuilder) Build() *I18nText {
	req := &I18nText{}
	if builder.enUsFlag {
		req.EnUs = &builder.enUs

	}
	if builder.zhCnFlag {
		req.ZhCn = &builder.zhCn

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

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

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

	}
	if builder.frFrFlag {
		req.FrFr = &builder.frFr

	}
	if builder.itItFlag {
		req.ItIt = &builder.itIt

	}
	if builder.deDeFlag {
		req.DeDe = &builder.deDe

	}
	if builder.ruRuFlag {
		req.RuRu = &builder.ruRu

	}
	if builder.thThFlag {
		req.ThTh = &builder.thTh

	}
	if builder.esEsFlag {
		req.EsEs = &builder.esEs

	}
	if builder.koKrFlag {
		req.KoKr = &builder.koKr

	}
	return req
}

type InputAttachment struct {
	ResourceType *string `json:"resource_type,omitempty"` // 附件归属资源的类型

	ResourceId *string `json:"resource_id,omitempty"` // 附件要归属资源的id。例如，要给任务添加附件，这里要填入任务的全局唯一ID

	File io.Reader `json:"file,omitempty"` // 要上传的文件
}

type InputAttachmentBuilder struct {
	resourceType     string // 附件归属资源的类型
	resourceTypeFlag bool

	resourceId     string // 附件要归属资源的id。例如，要给任务添加附件，这里要填入任务的全局唯一ID
	resourceIdFlag bool

	file     io.Reader // 要上传的文件
	fileFlag bool
}

func NewInputAttachmentBuilder() *InputAttachmentBuilder {
	builder := &InputAttachmentBuilder{}
	return builder
}

// 附件归属资源的类型
//
// 示例值：task
func (builder *InputAttachmentBuilder) ResourceType(resourceType string) *InputAttachmentBuilder {
	builder.resourceType = resourceType
	builder.resourceTypeFlag = true
	return builder
}

// 附件要归属资源的id。例如，要给任务添加附件，这里要填入任务的全局唯一ID
//
// 示例值：fe96108d-b004-4a47-b2f8-6886e758b3a5
func (builder *InputAttachmentBuilder) ResourceId(resourceId string) *InputAttachmentBuilder {
	builder.resourceId = resourceId
	builder.resourceIdFlag = true
	return builder
}

// 要上传的文件
//
// 示例值：
func (builder *InputAttachmentBuilder) File(file io.Reader) *InputAttachmentBuilder {
	builder.file = file
	builder.fileFlag = true
	return builder
}

func (builder *InputAttachmentBuilder) Build() *InputAttachment {
	req := &InputAttachment{}
	if builder.resourceTypeFlag {
		req.ResourceType = &builder.resourceType

	}
	if builder.resourceIdFlag {
		req.ResourceId = &builder.resourceId

	}
	if builder.fileFlag {
		req.File = builder.file
	}
	return req
}

type InputComment struct {
	Content *string `json:"content,omitempty"` // 评论内容

	ReplyToCommentId *string `json:"reply_to_comment_id,omitempty"` // 回复给评论的id

	ResourceType *string `json:"resource_type,omitempty"` // 评论归属的资源类型

	ResourceId *string `json:"resource_id,omitempty"` // 评论归属的资源ID
}

type InputCommentBuilder struct {
	content     string // 评论内容
	contentFlag bool

	replyToCommentId     string // 回复给评论的id
	replyToCommentIdFlag bool

	resourceType     string // 评论归属的资源类型
	resourceTypeFlag bool

	resourceId     string // 评论归属的资源ID
	resourceIdFlag bool
}

func NewInputCommentBuilder() *InputCommentBuilder {
	builder := &InputCommentBuilder{}
	return builder
}

// 评论内容
//
// 示例值：举杯邀明月，对影成三人
func (builder *InputCommentBuilder) Content(content string) *InputCommentBuilder {
	builder.content = content
	builder.contentFlag = true
	return builder
}

// 回复给评论的id
//
// 示例值：6937231762296684564
func (builder *InputCommentBuilder) ReplyToCommentId(replyToCommentId string) *InputCommentBuilder {
	builder.replyToCommentId = replyToCommentId
	builder.replyToCommentIdFlag = true
	return builder
}

// 评论归属的资源类型
//
// 示例值：task
func (builder *InputCommentBuilder) ResourceType(resourceType string) *InputCommentBuilder {
	builder.resourceType = resourceType
	builder.resourceTypeFlag = true
	return builder
}

// 评论归属的资源ID
//
// 示例值：ccb55625-95d2-2e80-655f-0e40bf67953f
func (builder *InputCommentBuilder) ResourceId(resourceId string) *InputCommentBuilder {
	builder.resourceId = resourceId
	builder.resourceIdFlag = true
	return builder
}

func (builder *InputCommentBuilder) Build() *InputComment {
	req := &InputComment{}
	if builder.contentFlag {
		req.Content = &builder.content

	}
	if builder.replyToCommentIdFlag {
		req.ReplyToCommentId = &builder.replyToCommentId

	}
	if builder.resourceTypeFlag {
		req.ResourceType = &builder.resourceType

	}
	if builder.resourceIdFlag {
		req.ResourceId = &builder.resourceId

	}
	return req
}

type InputCustomField struct {
	ResourceType *string `json:"resource_type,omitempty"` // 自定义字段归属的资源类型

	ResourceId *string `json:"resource_id,omitempty"` // 自定义字段归属的资源id，目前必然是tasklist_guid

	Name *string `json:"name,omitempty"` // 字段名称

	Type *string `json:"type,omitempty"` // 字段类型

	NumberSetting *NumberSetting `json:"number_setting,omitempty"` // 数字类型的字段设置

	MemberSetting *MemberSetting `json:"member_setting,omitempty"` // 人员类型的字段设置

	DatetimeSetting *DatetimeSetting `json:"datetime_setting,omitempty"` // 时间日期类型的字段设置

	SingleSelectSetting *SelectSetting `json:"single_select_setting,omitempty"` // 单选类型的字段设置

	MultiSelectSetting *SelectSetting `json:"multi_select_setting,omitempty"` // 多选类型的字段设置

	TextSetting *TextSetting `json:"text_setting,omitempty"` // 文本类型
}

type InputCustomFieldBuilder struct {
	resourceType     string // 自定义字段归属的资源类型
	resourceTypeFlag bool

	resourceId     string // 自定义字段归属的资源id，目前必然是tasklist_guid
	resourceIdFlag bool

	name     string // 字段名称
	nameFlag bool

	type_    string // 字段类型
	typeFlag bool

	numberSetting     *NumberSetting // 数字类型的字段设置
	numberSettingFlag bool

	memberSetting     *MemberSetting // 人员类型的字段设置
	memberSettingFlag bool

	datetimeSetting     *DatetimeSetting // 时间日期类型的字段设置
	datetimeSettingFlag bool

	singleSelectSetting     *SelectSetting // 单选类型的字段设置
	singleSelectSettingFlag bool

	multiSelectSetting     *SelectSetting // 多选类型的字段设置
	multiSelectSettingFlag bool

	textSetting     *TextSetting // 文本类型
	textSettingFlag bool
}

func NewInputCustomFieldBuilder() *InputCustomFieldBuilder {
	builder := &InputCustomFieldBuilder{}
	return builder
}

// 自定义字段归属的资源类型
//
// 示例值：tasklist
func (builder *InputCustomFieldBuilder) ResourceType(resourceType string) *InputCustomFieldBuilder {
	builder.resourceType = resourceType
	builder.resourceTypeFlag = true
	return builder
}

// 自定义字段归属的资源id，目前必然是tasklist_guid
//
// 示例值：5ffbe0ca-6600-41e0-a634-2b38cbcf13b8
func (builder *InputCustomFieldBuilder) ResourceId(resourceId string) *InputCustomFieldBuilder {
	builder.resourceId = resourceId
	builder.resourceIdFlag = true
	return builder
}

// 字段名称
//
// 示例值：优先级
func (builder *InputCustomFieldBuilder) Name(name string) *InputCustomFieldBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 字段类型
//
// 示例值：number
func (builder *InputCustomFieldBuilder) Type(type_ string) *InputCustomFieldBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// 数字类型的字段设置
//
// 示例值：
func (builder *InputCustomFieldBuilder) NumberSetting(numberSetting *NumberSetting) *InputCustomFieldBuilder {
	builder.numberSetting = numberSetting
	builder.numberSettingFlag = true
	return builder
}

// 人员类型的字段设置
//
// 示例值：
func (builder *InputCustomFieldBuilder) MemberSetting(memberSetting *MemberSetting) *InputCustomFieldBuilder {
	builder.memberSetting = memberSetting
	builder.memberSettingFlag = true
	return builder
}

// 时间日期类型的字段设置
//
// 示例值：
func (builder *InputCustomFieldBuilder) DatetimeSetting(datetimeSetting *DatetimeSetting) *InputCustomFieldBuilder {
	builder.datetimeSetting = datetimeSetting
	builder.datetimeSettingFlag = true
	return builder
}

// 单选类型的字段设置
//
// 示例值：
func (builder *InputCustomFieldBuilder) SingleSelectSetting(singleSelectSetting *SelectSetting) *InputCustomFieldBuilder {
	builder.singleSelectSetting = singleSelectSetting
	builder.singleSelectSettingFlag = true
	return builder
}

// 多选类型的字段设置
//
// 示例值：
func (builder *InputCustomFieldBuilder) MultiSelectSetting(multiSelectSetting *SelectSetting) *InputCustomFieldBuilder {
	builder.multiSelectSetting = multiSelectSetting
	builder.multiSelectSettingFlag = true
	return builder
}

// 文本类型
//
// 示例值：
func (builder *InputCustomFieldBuilder) TextSetting(textSetting *TextSetting) *InputCustomFieldBuilder {
	builder.textSetting = textSetting
	builder.textSettingFlag = true
	return builder
}

func (builder *InputCustomFieldBuilder) Build() *InputCustomField {
	req := &InputCustomField{}
	if builder.resourceTypeFlag {
		req.ResourceType = &builder.resourceType

	}
	if builder.resourceIdFlag {
		req.ResourceId = &builder.resourceId

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

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

	}
	if builder.numberSettingFlag {
		req.NumberSetting = builder.numberSetting
	}
	if builder.memberSettingFlag {
		req.MemberSetting = builder.memberSetting
	}
	if builder.datetimeSettingFlag {
		req.DatetimeSetting = builder.datetimeSetting
	}
	if builder.singleSelectSettingFlag {
		req.SingleSelectSetting = builder.singleSelectSetting
	}
	if builder.multiSelectSettingFlag {
		req.MultiSelectSetting = builder.multiSelectSetting
	}
	if builder.textSettingFlag {
		req.TextSetting = builder.textSetting
	}
	return req
}

type InputCustomFieldValue struct {
	Guid *string `json:"guid,omitempty"` // 自定义字段guid

	NumberValue *string `json:"number_value,omitempty"` // 数字类型的自定义字段值，填写一个合法数字的字符串表示，空字符串表示设为空。

	MemberValue []*Member `json:"member_value,omitempty"` // 人员类型的自定义字段值。可以设置1个或多个用户的id（遵循member格式，只支持user类型）。当字段设为只不能多选时只能输入一个值。设为空数组表示设为空。

	DatetimeValue *string `json:"datetime_value,omitempty"` // 日期类型自定义字段值，可以输入一个表示日期的以毫秒为单位的字符串。设为空字符串表示设为空。

	SingleSelectValue *string `json:"single_select_value,omitempty"` // 单选类型字段值，填写一个字段选项的option_guid。设置为空字符串表示设为空。

	MultiSelectValue []string `json:"multi_select_value,omitempty"` // 多选类型字段值，可以填写一个或多个本字段的option_guid。设为空数组表示设为空。

	TextValue *string `json:"text_value,omitempty"` // 文本类型字段值。可以填写最多3000字符。使用空字符串表示设为空。
}

type InputCustomFieldValueBuilder struct {
	guid     string // 自定义字段guid
	guidFlag bool

	numberValue     string // 数字类型的自定义字段值，填写一个合法数字的字符串表示，空字符串表示设为空。
	numberValueFlag bool

	memberValue     []*Member // 人员类型的自定义字段值。可以设置1个或多个用户的id（遵循member格式，只支持user类型）。当字段设为只不能多选时只能输入一个值。设为空数组表示设为空。
	memberValueFlag bool

	datetimeValue     string // 日期类型自定义字段值，可以输入一个表示日期的以毫秒为单位的字符串。设为空字符串表示设为空。
	datetimeValueFlag bool

	singleSelectValue     string // 单选类型字段值，填写一个字段选项的option_guid。设置为空字符串表示设为空。
	singleSelectValueFlag bool

	multiSelectValue     []string // 多选类型字段值，可以填写一个或多个本字段的option_guid。设为空数组表示设为空。
	multiSelectValueFlag bool

	textValue     string // 文本类型字段值。可以填写最多3000字符。使用空字符串表示设为空。
	textValueFlag bool
}

func NewInputCustomFieldValueBuilder() *InputCustomFieldValueBuilder {
	builder := &InputCustomFieldValueBuilder{}
	return builder
}

// 自定义字段guid
//
// 示例值：73b21903-0041-4796-a11e-f8be919a7063
func (builder *InputCustomFieldValueBuilder) Guid(guid string) *InputCustomFieldValueBuilder {
	builder.guid = guid
	builder.guidFlag = true
	return builder
}

// 数字类型的自定义字段值，填写一个合法数字的字符串表示，空字符串表示设为空。
//
// 示例值：10.23
func (builder *InputCustomFieldValueBuilder) NumberValue(numberValue string) *InputCustomFieldValueBuilder {
	builder.numberValue = numberValue
	builder.numberValueFlag = true
	return builder
}

// 人员类型的自定义字段值。可以设置1个或多个用户的id（遵循member格式，只支持user类型）。当字段设为只不能多选时只能输入一个值。设为空数组表示设为空。
//
// 示例值：
func (builder *InputCustomFieldValueBuilder) MemberValue(memberValue []*Member) *InputCustomFieldValueBuilder {
	builder.memberValue = memberValue
	builder.memberValueFlag = true
	return builder
}

// 日期类型自定义字段值，可以输入一个表示日期的以毫秒为单位的字符串。设为空字符串表示设为空。
//
// 示例值：1698192000000
func (builder *InputCustomFieldValueBuilder) DatetimeValue(datetimeValue string) *InputCustomFieldValueBuilder {
	builder.datetimeValue = datetimeValue
	builder.datetimeValueFlag = true
	return builder
}

// 单选类型字段值，填写一个字段选项的option_guid。设置为空字符串表示设为空。
//
// 示例值：73b21903-0041-4796-a11e-f8be919a7063
func (builder *InputCustomFieldValueBuilder) SingleSelectValue(singleSelectValue string) *InputCustomFieldValueBuilder {
	builder.singleSelectValue = singleSelectValue
	builder.singleSelectValueFlag = true
	return builder
}

// 多选类型字段值，可以填写一个或多个本字段的option_guid。设为空数组表示设为空。
//
// 示例值：
func (builder *InputCustomFieldValueBuilder) MultiSelectValue(multiSelectValue []string) *InputCustomFieldValueBuilder {
	builder.multiSelectValue = multiSelectValue
	builder.multiSelectValueFlag = true
	return builder
}

// 文本类型字段值。可以填写最多3000字符。使用空字符串表示设为空。
//
// 示例值：文本类型字段值。可以输入一段文本。空字符串表示清空。
func (builder *InputCustomFieldValueBuilder) TextValue(textValue string) *InputCustomFieldValueBuilder {
	builder.textValue = textValue
	builder.textValueFlag = true
	return builder
}

func (builder *InputCustomFieldValueBuilder) Build() *InputCustomFieldValue {
	req := &InputCustomFieldValue{}
	if builder.guidFlag {
		req.Guid = &builder.guid

	}
	if builder.numberValueFlag {
		req.NumberValue = &builder.numberValue

	}
	if builder.memberValueFlag {
		req.MemberValue = builder.memberValue
	}
	if builder.datetimeValueFlag {
		req.DatetimeValue = &builder.datetimeValue

	}
	if builder.singleSelectValueFlag {
		req.SingleSelectValue = &builder.singleSelectValue

	}
	if builder.multiSelectValueFlag {
		req.MultiSelectValue = builder.multiSelectValue
	}
	if builder.textValueFlag {
		req.TextValue = &builder.textValue

	}
	return req
}

type InputOption struct {
	Name *string `json:"name,omitempty"` // 选项名称

	ColorIndex *int `json:"color_index,omitempty"` // 颜色索引值，支持0～54中的一个数字。如果不填写，则会随机选一个。

	InsertBefore *string `json:"insert_before,omitempty"` // 要放到某个option之前的option_guid

	InsertAfter *string `json:"insert_after,omitempty"` // 要放到某个option之后的option_guid

	IsHidden *bool `json:"is_hidden,omitempty"` // 是否隐藏
}

type InputOptionBuilder struct {
	name     string // 选项名称
	nameFlag bool

	colorIndex     int // 颜色索引值，支持0～54中的一个数字。如果不填写，则会随机选一个。
	colorIndexFlag bool

	insertBefore     string // 要放到某个option之前的option_guid
	insertBeforeFlag bool

	insertAfter     string // 要放到某个option之后的option_guid
	insertAfterFlag bool

	isHidden     bool // 是否隐藏
	isHiddenFlag bool
}

func NewInputOptionBuilder() *InputOptionBuilder {
	builder := &InputOptionBuilder{}
	return builder
}

// 选项名称
//
// 示例值：高优
func (builder *InputOptionBuilder) Name(name string) *InputOptionBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 颜色索引值，支持0～54中的一个数字。如果不填写，则会随机选一个。
//
// 示例值：10
func (builder *InputOptionBuilder) ColorIndex(colorIndex int) *InputOptionBuilder {
	builder.colorIndex = colorIndex
	builder.colorIndexFlag = true
	return builder
}

// 要放到某个option之前的option_guid
//
// 示例值：2bd905f8-ef38-408b-aa1f-2b2ad33b2913
func (builder *InputOptionBuilder) InsertBefore(insertBefore string) *InputOptionBuilder {
	builder.insertBefore = insertBefore
	builder.insertBeforeFlag = true
	return builder
}

// 要放到某个option之后的option_guid
//
// 示例值：b13adf3c-cad6-4e02-8929-550c112b5633
func (builder *InputOptionBuilder) InsertAfter(insertAfter string) *InputOptionBuilder {
	builder.insertAfter = insertAfter
	builder.insertAfterFlag = true
	return builder
}

// 是否隐藏
//
// 示例值：false
func (builder *InputOptionBuilder) IsHidden(isHidden bool) *InputOptionBuilder {
	builder.isHidden = isHidden
	builder.isHiddenFlag = true
	return builder
}

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

	}
	if builder.colorIndexFlag {
		req.ColorIndex = &builder.colorIndex

	}
	if builder.insertBeforeFlag {
		req.InsertBefore = &builder.insertBefore

	}
	if builder.insertAfterFlag {
		req.InsertAfter = &builder.insertAfter

	}
	if builder.isHiddenFlag {
		req.IsHidden = &builder.isHidden

	}
	return req
}

type InputSection struct {
	Name *string `json:"name,omitempty"` // 自定义分组名

	ResourceType *string `json:"resource_type,omitempty"` // 自定义分组的资源类型

	ResourceId *string `json:"resource_id,omitempty"` // 自定义分组要归属的资源id

	InsertBefore *string `json:"insert_before,omitempty"` // 要将新分组插入到自定义分分组的前面的目标分组的guid。insert_before/insert_after二选一。也可以都不设置。都不设置时表示将新分组查到对应容器的最前面。

	InsertAfter *string `json:"insert_after,omitempty"` // 要将新分组插入到自定义分分组的后面的目标分组的guid。insert_before/insert_after二选一。也可以都不设置。都不设置时表示将新分组查到对应容器的最前面。
}

type InputSectionBuilder struct {
	name     string // 自定义分组名
	nameFlag bool

	resourceType     string // 自定义分组的资源类型
	resourceTypeFlag bool

	resourceId     string // 自定义分组要归属的资源id
	resourceIdFlag bool

	insertBefore     string // 要将新分组插入到自定义分分组的前面的目标分组的guid。insert_before/insert_after二选一。也可以都不设置。都不设置时表示将新分组查到对应容器的最前面。
	insertBeforeFlag bool

	insertAfter     string // 要将新分组插入到自定义分分组的后面的目标分组的guid。insert_before/insert_after二选一。也可以都不设置。都不设置时表示将新分组查到对应容器的最前面。
	insertAfterFlag bool
}

func NewInputSectionBuilder() *InputSectionBuilder {
	builder := &InputSectionBuilder{}
	return builder
}

// 自定义分组名
//
// 示例值：已经审核过的任务
func (builder *InputSectionBuilder) Name(name string) *InputSectionBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 自定义分组的资源类型
//
// 示例值：tasklist
func (builder *InputSectionBuilder) ResourceType(resourceType string) *InputSectionBuilder {
	builder.resourceType = resourceType
	builder.resourceTypeFlag = true
	return builder
}

// 自定义分组要归属的资源id
//
// 示例值：cc371766-6584-cf50-a222-c22cd9055004
func (builder *InputSectionBuilder) ResourceId(resourceId string) *InputSectionBuilder {
	builder.resourceId = resourceId
	builder.resourceIdFlag = true
	return builder
}

// 要将新分组插入到自定义分分组的前面的目标分组的guid。insert_before/insert_after二选一。也可以都不设置。都不设置时表示将新分组查到对应容器的最前面。
//
// 示例值：e6e37dcc-f75a-5936-f589-12fb4b5c80c2
func (builder *InputSectionBuilder) InsertBefore(insertBefore string) *InputSectionBuilder {
	builder.insertBefore = insertBefore
	builder.insertBeforeFlag = true
	return builder
}

// 要将新分组插入到自定义分分组的后面的目标分组的guid。insert_before/insert_after二选一。也可以都不设置。都不设置时表示将新分组查到对应容器的最前面。
//
// 示例值：e6e37dcc-f75a-5936-f589-12fb4b5c80c2
func (builder *InputSectionBuilder) InsertAfter(insertAfter string) *InputSectionBuilder {
	builder.insertAfter = insertAfter
	builder.insertAfterFlag = true
	return builder
}

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

	}
	if builder.resourceTypeFlag {
		req.ResourceType = &builder.resourceType

	}
	if builder.resourceIdFlag {
		req.ResourceId = &builder.resourceId

	}
	if builder.insertBeforeFlag {
		req.InsertBefore = &builder.insertBefore

	}
	if builder.insertAfterFlag {
		req.InsertAfter = &builder.insertAfter

	}
	return req
}

type InputTask struct {
	Summary *string `json:"summary,omitempty"` // 任务标题

	Description *string `json:"description,omitempty"` // 任务描述

	Due *Due `json:"due,omitempty"` // 任务截止时间戳(ms)，截止时间戳和截止日期选择一个填写。

	Origin *Origin `json:"origin,omitempty"` // 任务关联的第三方平台来源信息

	Extra *string `json:"extra,omitempty"` // 调用者可以传入的任意附带到任务上的数据。在获取任务详情时会原样返回。

	CompletedAt *string `json:"completed_at,omitempty"` // 任务的完成时刻时间戳(ms)

	Members []*Member `json:"members,omitempty"` // 负责人ID列表

	RepeatRule *string `json:"repeat_rule,omitempty"` // 如果设置，则该任务为“重复任务”。该字段表示了重复任务的重复规则。

	CustomComplete *CustomComplete `json:"custom_complete,omitempty"` // 如果设置，则将任务设计为“自定义完成”。用户在任务中心点击“完成”时，不会直接完成任务，而是跳转到第三方配置好的地址或者现实自定义提示。

	Tasklists []*TaskInTasklistInfo `json:"tasklists,omitempty"` // 任务所在清单的信息

	ClientToken *string `json:"client_token,omitempty"` // 幂等token，如果填写则触发幂等行为。

	Start *Start `json:"start,omitempty"` // 任务的开始时间(ms)

	Reminders []*Reminder `json:"reminders,omitempty"` // 任务提醒

	Mode *int `json:"mode,omitempty"` // 任务的完成模式。1 - 会签任务；2 - 或签任务

	IsMilestone *bool `json:"is_milestone,omitempty"` // 是否是里程碑任务

	CustomFields []*InputCustomFieldValue `json:"custom_fields,omitempty"` // 自定义字段值

	DocxSource *DocxSource `json:"docx_source,omitempty"` // 任务的新版云文档来源

	PositiveReminders []*Reminder `json:"positive_reminders,omitempty"` // 正数协议每日提醒
}

type InputTaskBuilder struct {
	summary     string // 任务标题
	summaryFlag bool

	description     string // 任务描述
	descriptionFlag bool

	due     *Due // 任务截止时间戳(ms)，截止时间戳和截止日期选择一个填写。
	dueFlag bool

	origin     *Origin // 任务关联的第三方平台来源信息
	originFlag bool

	extra     string // 调用者可以传入的任意附带到任务上的数据。在获取任务详情时会原样返回。
	extraFlag bool

	completedAt     string // 任务的完成时刻时间戳(ms)
	completedAtFlag bool

	members     []*Member // 负责人ID列表
	membersFlag bool

	repeatRule     string // 如果设置，则该任务为“重复任务”。该字段表示了重复任务的重复规则。
	repeatRuleFlag bool

	customComplete     *CustomComplete // 如果设置，则将任务设计为“自定义完成”。用户在任务中心点击“完成”时，不会直接完成任务，而是跳转到第三方配置好的地址或者现实自定义提示。
	customCompleteFlag bool

	tasklists     []*TaskInTasklistInfo // 任务所在清单的信息
	tasklistsFlag bool

	clientToken     string // 幂等token，如果填写则触发幂等行为。
	clientTokenFlag bool

	start     *Start // 任务的开始时间(ms)
	startFlag bool

	reminders     []*Reminder // 任务提醒
	remindersFlag bool

	mode     int // 任务的完成模式。1 - 会签任务；2 - 或签任务
	modeFlag bool

	isMilestone     bool // 是否是里程碑任务
	isMilestoneFlag bool

	customFields     []*InputCustomFieldValue // 自定义字段值
	customFieldsFlag bool

	docxSource     *DocxSource // 任务的新版云文档来源
	docxSourceFlag bool

	positiveReminders     []*Reminder // 正数协议每日提醒
	positiveRemindersFlag bool
}

func NewInputTaskBuilder() *InputTaskBuilder {
	builder := &InputTaskBuilder{}
	return builder
}

// 任务标题
//
// 示例值：针对全年销售进行一次复盘
func (builder *InputTaskBuilder) Summary(summary string) *InputTaskBuilder {
	builder.summary = summary
	builder.summaryFlag = true
	return builder
}

// 任务描述
//
// 示例值：需要事先阅读复盘总结文档
func (builder *InputTaskBuilder) Description(description string) *InputTaskBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 任务截止时间戳(ms)，截止时间戳和截止日期选择一个填写。
//
// 示例值：1675742789470
func (builder *InputTaskBuilder) Due(due *Due) *InputTaskBuilder {
	builder.due = due
	builder.dueFlag = true
	return builder
}

// 任务关联的第三方平台来源信息
//
// 示例值：
func (builder *InputTaskBuilder) Origin(origin *Origin) *InputTaskBuilder {
	builder.origin = origin
	builder.originFlag = true
	return builder
}

// 调用者可以传入的任意附带到任务上的数据。在获取任务详情时会原样返回。
//
// 示例值：dGVzdA==
func (builder *InputTaskBuilder) Extra(extra string) *InputTaskBuilder {
	builder.extra = extra
	builder.extraFlag = true
	return builder
}

// 任务的完成时刻时间戳(ms)
//
// 示例值：1675742789470
func (builder *InputTaskBuilder) CompletedAt(completedAt string) *InputTaskBuilder {
	builder.completedAt = completedAt
	builder.completedAtFlag = true
	return builder
}

// 负责人ID列表
//
// 示例值：
func (builder *InputTaskBuilder) Members(members []*Member) *InputTaskBuilder {
	builder.members = members
	builder.membersFlag = true
	return builder
}

// 如果设置，则该任务为“重复任务”。该字段表示了重复任务的重复规则。
//
// 示例值：FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR
func (builder *InputTaskBuilder) RepeatRule(repeatRule string) *InputTaskBuilder {
	builder.repeatRule = repeatRule
	builder.repeatRuleFlag = true
	return builder
}

// 如果设置，则将任务设计为“自定义完成”。用户在任务中心点击“完成”时，不会直接完成任务，而是跳转到第三方配置好的地址或者现实自定义提示。
//
// 示例值：
func (builder *InputTaskBuilder) CustomComplete(customComplete *CustomComplete) *InputTaskBuilder {
	builder.customComplete = customComplete
	builder.customCompleteFlag = true
	return builder
}

// 任务所在清单的信息
//
// 示例值：
func (builder *InputTaskBuilder) Tasklists(tasklists []*TaskInTasklistInfo) *InputTaskBuilder {
	builder.tasklists = tasklists
	builder.tasklistsFlag = true
	return builder
}

// 幂等token，如果填写则触发幂等行为。
//
// 示例值：daa2237f-8310-4707-a83b-52c8a81e0fb7
func (builder *InputTaskBuilder) ClientToken(clientToken string) *InputTaskBuilder {
	builder.clientToken = clientToken
	builder.clientTokenFlag = true
	return builder
}

// 任务的开始时间(ms)
//
// 示例值：
func (builder *InputTaskBuilder) Start(start *Start) *InputTaskBuilder {
	builder.start = start
	builder.startFlag = true
	return builder
}

// 任务提醒
//
// 示例值：
func (builder *InputTaskBuilder) Reminders(reminders []*Reminder) *InputTaskBuilder {
	builder.reminders = reminders
	builder.remindersFlag = true
	return builder
}

// 任务的完成模式。1 - 会签任务；2 - 或签任务
//
// 示例值：2
func (builder *InputTaskBuilder) Mode(mode int) *InputTaskBuilder {
	builder.mode = mode
	builder.modeFlag = true
	return builder
}

// 是否是里程碑任务
//
// 示例值：false
func (builder *InputTaskBuilder) IsMilestone(isMilestone bool) *InputTaskBuilder {
	builder.isMilestone = isMilestone
	builder.isMilestoneFlag = true
	return builder
}

// 自定义字段值
//
// 示例值：
func (builder *InputTaskBuilder) CustomFields(customFields []*InputCustomFieldValue) *InputTaskBuilder {
	builder.customFields = customFields
	builder.customFieldsFlag = true
	return builder
}

// 任务的新版云文档来源
//
// 示例值：
func (builder *InputTaskBuilder) DocxSource(docxSource *DocxSource) *InputTaskBuilder {
	builder.docxSource = docxSource
	builder.docxSourceFlag = true
	return builder
}

// 正数协议每日提醒
//
// 示例值：
func (builder *InputTaskBuilder) PositiveReminders(positiveReminders []*Reminder) *InputTaskBuilder {
	builder.positiveReminders = positiveReminders
	builder.positiveRemindersFlag = true
	return builder
}

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

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

	}
	if builder.dueFlag {
		req.Due = builder.due
	}
	if builder.originFlag {
		req.Origin = builder.origin
	}
	if builder.extraFlag {
		req.Extra = &builder.extra

	}
	if builder.completedAtFlag {
		req.CompletedAt = &builder.completedAt

	}
	if builder.membersFlag {
		req.Members = builder.members
	}
	if builder.repeatRuleFlag {
		req.RepeatRule = &builder.repeatRule

	}
	if builder.customCompleteFlag {
		req.CustomComplete = builder.customComplete
	}
	if builder.tasklistsFlag {
		req.Tasklists = builder.tasklists
	}
	if builder.clientTokenFlag {
		req.ClientToken = &builder.clientToken

	}
	if builder.startFlag {
		req.Start = builder.start
	}
	if builder.remindersFlag {
		req.Reminders = builder.reminders
	}
	if builder.modeFlag {
		req.Mode = &builder.mode

	}
	if builder.isMilestoneFlag {
		req.IsMilestone = &builder.isMilestone

	}
	if builder.customFieldsFlag {
		req.CustomFields = builder.customFields
	}
	if builder.docxSourceFlag {
		req.DocxSource = builder.docxSource
	}
	if builder.positiveRemindersFlag {
		req.PositiveReminders = builder.positiveReminders
	}
	return req
}

type InputTasklist struct {
	Name *string `json:"name,omitempty"` // 清单名称

	ClientToken *string `json:"client_token,omitempty"` // 幂等token，如果提供则实现幂等行为

	Members []*Member `json:"members,omitempty"` // 清单的成员列表

	Owner *Member `json:"owner,omitempty"` // 清单所有者

	ArchiveTasklist *bool `json:"archive_tasklist,omitempty"` // 是否归档清单
}

type InputTasklistBuilder struct {
	name     string // 清单名称
	nameFlag bool

	clientToken     string // 幂等token，如果提供则实现幂等行为
	clientTokenFlag bool

	members     []*Member // 清单的成员列表
	membersFlag bool

	owner     *Member // 清单所有者
	ownerFlag bool

	archiveTasklist     bool // 是否归档清单
	archiveTasklistFlag bool
}

func NewInputTasklistBuilder() *InputTasklistBuilder {
	builder := &InputTasklistBuilder{}
	return builder
}

// 清单名称
//
// 示例值：年会工作任务清单
func (builder *InputTasklistBuilder) Name(name string) *InputTasklistBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 幂等token，如果提供则实现幂等行为
//
// 示例值：daa2237f-8310-4707-a83b-52c8a81e0fb7
func (builder *InputTasklistBuilder) ClientToken(clientToken string) *InputTasklistBuilder {
	builder.clientToken = clientToken
	builder.clientTokenFlag = true
	return builder
}

// 清单的成员列表
//
// 示例值：
func (builder *InputTasklistBuilder) Members(members []*Member) *InputTasklistBuilder {
	builder.members = members
	builder.membersFlag = true
	return builder
}

// 清单所有者
//
// 示例值：
func (builder *InputTasklistBuilder) Owner(owner *Member) *InputTasklistBuilder {
	builder.owner = owner
	builder.ownerFlag = true
	return builder
}

// 是否归档清单
//
// 示例值：
func (builder *InputTasklistBuilder) ArchiveTasklist(archiveTasklist bool) *InputTasklistBuilder {
	builder.archiveTasklist = archiveTasklist
	builder.archiveTasklistFlag = true
	return builder
}

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

	}
	if builder.clientTokenFlag {
		req.ClientToken = &builder.clientToken

	}
	if builder.membersFlag {
		req.Members = builder.members
	}
	if builder.ownerFlag {
		req.Owner = builder.owner
	}
	if builder.archiveTasklistFlag {
		req.ArchiveTasklist = &builder.archiveTasklist

	}
	return req
}

type Member struct {
	Id *string `json:"id,omitempty"` // 表示member的id

	Type *string `json:"type,omitempty"` // 成员的类型

	Role *string `json:"role,omitempty"` // 成员角色

	Name *string `json:"name,omitempty"` // 成员名称
}

type MemberBuilder struct {
	id     string // 表示member的id
	idFlag bool

	type_    string // 成员的类型
	typeFlag bool

	role     string // 成员角色
	roleFlag bool

	name     string // 成员名称
	nameFlag bool
}

func NewMemberBuilder() *MemberBuilder {
	builder := &MemberBuilder{}
	return builder
}

// 表示member的id
//
// 示例值：ou_2cefb2f014f8d0c6c2d2eb7bafb0e54f
func (builder *MemberBuilder) Id(id string) *MemberBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 成员的类型
//
// 示例值：user
func (builder *MemberBuilder) Type(type_ string) *MemberBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// 成员角色
//
// 示例值：editor
func (builder *MemberBuilder) Role(role string) *MemberBuilder {
	builder.role = role
	builder.roleFlag = true
	return builder
}

// 成员名称
//
// 示例值：张明德（明德）
func (builder *MemberBuilder) Name(name string) *MemberBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

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

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

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

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

	}
	return req
}

type MemberSetting struct {
	Multi *bool `json:"multi,omitempty"` // 是否支持多选
}

type MemberSettingBuilder struct {
	multi     bool // 是否支持多选
	multiFlag bool
}

func NewMemberSettingBuilder() *MemberSettingBuilder {
	builder := &MemberSettingBuilder{}
	return builder
}

// 是否支持多选
//
// 示例值：true
func (builder *MemberSettingBuilder) Multi(multi bool) *MemberSettingBuilder {
	builder.multi = multi
	builder.multiFlag = true
	return builder
}

func (builder *MemberSettingBuilder) Build() *MemberSetting {
	req := &MemberSetting{}
	if builder.multiFlag {
		req.Multi = &builder.multi

	}
	return req
}

type NumberSetting struct {
	Format *string `json:"format,omitempty"` // 数字展示的格式

	CustomSymbol *string `json:"custom_symbol,omitempty"` // 自定义符号。只有`format`设为custom时才会生效。

	CustomSymbolPosition *string `json:"custom_symbol_position,omitempty"` // 自定义符号显示的位置。

	Separator *string `json:"separator,omitempty"` // 分隔符样式

	DecimalCount *int `json:"decimal_count,omitempty"` // 保留小数位数。输入的数字值的小数位数如果比该设置多，多余的位数将被四舍五入后舍弃。如果`format`为"percentage"，表示变为百分数之后的小数位数。
}

type NumberSettingBuilder struct {
	format     string // 数字展示的格式
	formatFlag bool

	customSymbol     string // 自定义符号。只有`format`设为custom时才会生效。
	customSymbolFlag bool

	customSymbolPosition     string // 自定义符号显示的位置。
	customSymbolPositionFlag bool

	separator     string // 分隔符样式
	separatorFlag bool

	decimalCount     int // 保留小数位数。输入的数字值的小数位数如果比该设置多，多余的位数将被四舍五入后舍弃。如果`format`为"percentage"，表示变为百分数之后的小数位数。
	decimalCountFlag bool
}

func NewNumberSettingBuilder() *NumberSettingBuilder {
	builder := &NumberSettingBuilder{}
	return builder
}

// 数字展示的格式
//
// 示例值：normal
func (builder *NumberSettingBuilder) Format(format string) *NumberSettingBuilder {
	builder.format = format
	builder.formatFlag = true
	return builder
}

// 自定义符号。只有`format`设为custom时才会生效。
//
// 示例值：自定义符号
func (builder *NumberSettingBuilder) CustomSymbol(customSymbol string) *NumberSettingBuilder {
	builder.customSymbol = customSymbol
	builder.customSymbolFlag = true
	return builder
}

// 自定义符号显示的位置。
//
// 示例值：left
func (builder *NumberSettingBuilder) CustomSymbolPosition(customSymbolPosition string) *NumberSettingBuilder {
	builder.customSymbolPosition = customSymbolPosition
	builder.customSymbolPositionFlag = true
	return builder
}

// 分隔符样式
//
// 示例值：thousand
func (builder *NumberSettingBuilder) Separator(separator string) *NumberSettingBuilder {
	builder.separator = separator
	builder.separatorFlag = true
	return builder
}

// 保留小数位数。输入的数字值的小数位数如果比该设置多，多余的位数将被四舍五入后舍弃。如果`format`为"percentage"，表示变为百分数之后的小数位数。
//
// 示例值：2
func (builder *NumberSettingBuilder) DecimalCount(decimalCount int) *NumberSettingBuilder {
	builder.decimalCount = decimalCount
	builder.decimalCountFlag = true
	return builder
}

func (builder *NumberSettingBuilder) Build() *NumberSetting {
	req := &NumberSetting{}
	if builder.formatFlag {
		req.Format = &builder.format

	}
	if builder.customSymbolFlag {
		req.CustomSymbol = &builder.customSymbol

	}
	if builder.customSymbolPositionFlag {
		req.CustomSymbolPosition = &builder.customSymbolPosition

	}
	if builder.separatorFlag {
		req.Separator = &builder.separator

	}
	if builder.decimalCountFlag {
		req.DecimalCount = &builder.decimalCount

	}
	return req
}

type Option struct {
	Guid *string `json:"guid,omitempty"` // 选项的GUID

	Name *string `json:"name,omitempty"` // 选项名称，不能为空，最大50个字符

	ColorIndex *int `json:"color_index,omitempty"` // 选项的颜色索引值，可以是0～54中的一个数字。如果不填写则会随机选一个。

	IsHidden *bool `json:"is_hidden,omitempty"` // 选项是否隐藏。隐藏后的选项在界面不可见，也不可以再通过openapi将字段值设为该选项。
}

type OptionBuilder struct {
	guid     string // 选项的GUID
	guidFlag bool

	name     string // 选项名称，不能为空，最大50个字符
	nameFlag bool

	colorIndex     int // 选项的颜色索引值，可以是0～54中的一个数字。如果不填写则会随机选一个。
	colorIndexFlag bool

	isHidden     bool // 选项是否隐藏。隐藏后的选项在界面不可见，也不可以再通过openapi将字段值设为该选项。
	isHiddenFlag bool
}

func NewOptionBuilder() *OptionBuilder {
	builder := &OptionBuilder{}
	return builder
}

// 选项的GUID
//
// 示例值：4216f79b-3fda-4dc6-a0c4-a16022e47152
func (builder *OptionBuilder) Guid(guid string) *OptionBuilder {
	builder.guid = guid
	builder.guidFlag = true
	return builder
}

// 选项名称，不能为空，最大50个字符
//
// 示例值：高优
func (builder *OptionBuilder) Name(name string) *OptionBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 选项的颜色索引值，可以是0～54中的一个数字。如果不填写则会随机选一个。
//
// 示例值：1
func (builder *OptionBuilder) ColorIndex(colorIndex int) *OptionBuilder {
	builder.colorIndex = colorIndex
	builder.colorIndexFlag = true
	return builder
}

// 选项是否隐藏。隐藏后的选项在界面不可见，也不可以再通过openapi将字段值设为该选项。
//
// 示例值：false
func (builder *OptionBuilder) IsHidden(isHidden bool) *OptionBuilder {
	builder.isHidden = isHidden
	builder.isHiddenFlag = true
	return builder
}

func (builder *OptionBuilder) Build() *Option {
	req := &Option{}
	if builder.guidFlag {
		req.Guid = &builder.guid

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

	}
	if builder.colorIndexFlag {
		req.ColorIndex = &builder.colorIndex

	}
	if builder.isHiddenFlag {
		req.IsHidden = &builder.isHidden

	}
	return req
}

type Origin struct {
	PlatformI18nName *I18nText `json:"platform_i18n_name,omitempty"` // 任务导入来源的名称，用于在任务中心详情页展示。需提供多语言版本。

	Href *Href `json:"href,omitempty"` // 任务关联的来源平台详情页链接
}

type OriginBuilder struct {
	platformI18nName     *I18nText // 任务导入来源的名称，用于在任务中心详情页展示。需提供多语言版本。
	platformI18nNameFlag bool

	href     *Href // 任务关联的来源平台详情页链接
	hrefFlag bool
}

func NewOriginBuilder() *OriginBuilder {
	builder := &OriginBuilder{}
	return builder
}

// 任务导入来源的名称，用于在任务中心详情页展示。需提供多语言版本。
//
// 示例值：
func (builder *OriginBuilder) PlatformI18nName(platformI18nName *I18nText) *OriginBuilder {
	builder.platformI18nName = platformI18nName
	builder.platformI18nNameFlag = true
	return builder
}

// 任务关联的来源平台详情页链接
//
// 示例值：
func (builder *OriginBuilder) Href(href *Href) *OriginBuilder {
	builder.href = href
	builder.hrefFlag = true
	return builder
}

func (builder *OriginBuilder) Build() *Origin {
	req := &Origin{}
	if builder.platformI18nNameFlag {
		req.PlatformI18nName = builder.platformI18nName
	}
	if builder.hrefFlag {
		req.Href = builder.href
	}
	return req
}

type Reminder struct {
	Id *string `json:"id,omitempty"` // 提醒时间设置的 ID

	RelativeFireMinute *int `json:"relative_fire_minute,omitempty"` // 相对于截止时间的提醒时间分钟数。例如30表示截止时间前30分钟提醒；0表示截止时提醒。
}

type ReminderBuilder struct {
	id     string // 提醒时间设置的 ID
	idFlag bool

	relativeFireMinute     int // 相对于截止时间的提醒时间分钟数。例如30表示截止时间前30分钟提醒；0表示截止时提醒。
	relativeFireMinuteFlag bool
}

func NewReminderBuilder() *ReminderBuilder {
	builder := &ReminderBuilder{}
	return builder
}

// 提醒时间设置的 ID
//
// 示例值：10
func (builder *ReminderBuilder) Id(id string) *ReminderBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 相对于截止时间的提醒时间分钟数。例如30表示截止时间前30分钟提醒；0表示截止时提醒。
//
// 示例值：30
func (builder *ReminderBuilder) RelativeFireMinute(relativeFireMinute int) *ReminderBuilder {
	builder.relativeFireMinute = relativeFireMinute
	builder.relativeFireMinuteFlag = true
	return builder
}

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

	}
	if builder.relativeFireMinuteFlag {
		req.RelativeFireMinute = &builder.relativeFireMinute

	}
	return req
}

type Resource struct {
	Type *string `json:"type,omitempty"` // 资源类型

	Id *string `json:"id,omitempty"` // 资源ID
}

type ResourceBuilder struct {
	type_    string // 资源类型
	typeFlag bool

	id     string // 资源ID
	idFlag bool
}

func NewResourceBuilder() *ResourceBuilder {
	builder := &ResourceBuilder{}
	return builder
}

// 资源类型
//
// 示例值：task
func (builder *ResourceBuilder) Type(type_ string) *ResourceBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// 资源ID
//
// 示例值：e6e37dcc-f75a-5936-f589-12fb4b5c80c2
func (builder *ResourceBuilder) Id(id string) *ResourceBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

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

	}
	if builder.idFlag {
		req.Id = &builder.id

	}
	return req
}

type Section struct {
	Guid *string `json:"guid,omitempty"` // 自定义分组的guid

	Name *string `json:"name,omitempty"` // 自定义分组的名字

	ResourceType *string `json:"resource_type,omitempty"` // 资源类型

	IsDefault *bool `json:"is_default,omitempty"` // 分组是否为默认自定义分组

	Creator *Member `json:"creator,omitempty"` // 自定义分组的创建者

	Tasklist *TasklistSummary `json:"tasklist,omitempty"` // 如果该分组归属于清单，展示清单的简要信息

	CreatedAt *string `json:"created_at,omitempty"` // 自定义分组创建时间戳(ms)

	UpdatedAt *string `json:"updated_at,omitempty"` // 自定义分组最近一次更新时间戳(ms)
}

type SectionBuilder struct {
	guid     string // 自定义分组的guid
	guidFlag bool

	name     string // 自定义分组的名字
	nameFlag bool

	resourceType     string // 资源类型
	resourceTypeFlag bool

	isDefault     bool // 分组是否为默认自定义分组
	isDefaultFlag bool

	creator     *Member // 自定义分组的创建者
	creatorFlag bool

	tasklist     *TasklistSummary // 如果该分组归属于清单，展示清单的简要信息
	tasklistFlag bool

	createdAt     string // 自定义分组创建时间戳(ms)
	createdAtFlag bool

	updatedAt     string // 自定义分组最近一次更新时间戳(ms)
	updatedAtFlag bool
}

func NewSectionBuilder() *SectionBuilder {
	builder := &SectionBuilder{}
	return builder
}

// 自定义分组的guid
//
// 示例值：e6e37dcc-f75a-5936-f589-12fb4b5c80c2
func (builder *SectionBuilder) Guid(guid string) *SectionBuilder {
	builder.guid = guid
	builder.guidFlag = true
	return builder
}

// 自定义分组的名字
//
// 示例值：已经评审过的任务
func (builder *SectionBuilder) Name(name string) *SectionBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 资源类型
//
// 示例值：tasklist
func (builder *SectionBuilder) ResourceType(resourceType string) *SectionBuilder {
	builder.resourceType = resourceType
	builder.resourceTypeFlag = true
	return builder
}

// 分组是否为默认自定义分组
//
// 示例值：true
func (builder *SectionBuilder) IsDefault(isDefault bool) *SectionBuilder {
	builder.isDefault = isDefault
	builder.isDefaultFlag = true
	return builder
}

// 自定义分组的创建者
//
// 示例值：
func (builder *SectionBuilder) Creator(creator *Member) *SectionBuilder {
	builder.creator = creator
	builder.creatorFlag = true
	return builder
}

// 如果该分组归属于清单，展示清单的简要信息
//
// 示例值：
func (builder *SectionBuilder) Tasklist(tasklist *TasklistSummary) *SectionBuilder {
	builder.tasklist = tasklist
	builder.tasklistFlag = true
	return builder
}

// 自定义分组创建时间戳(ms)
//
// 示例值：1675742789470
func (builder *SectionBuilder) CreatedAt(createdAt string) *SectionBuilder {
	builder.createdAt = createdAt
	builder.createdAtFlag = true
	return builder
}

// 自定义分组最近一次更新时间戳(ms)
//
// 示例值：1675742789470
func (builder *SectionBuilder) UpdatedAt(updatedAt string) *SectionBuilder {
	builder.updatedAt = updatedAt
	builder.updatedAtFlag = true
	return builder
}

func (builder *SectionBuilder) Build() *Section {
	req := &Section{}
	if builder.guidFlag {
		req.Guid = &builder.guid

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

	}
	if builder.resourceTypeFlag {
		req.ResourceType = &builder.resourceType

	}
	if builder.isDefaultFlag {
		req.IsDefault = &builder.isDefault

	}
	if builder.creatorFlag {
		req.Creator = builder.creator
	}
	if builder.tasklistFlag {
		req.Tasklist = builder.tasklist
	}
	if builder.createdAtFlag {
		req.CreatedAt = &builder.createdAt

	}
	if builder.updatedAtFlag {
		req.UpdatedAt = &builder.updatedAt

	}
	return req
}

type SectionSummary struct {
	Guid *string `json:"guid,omitempty"` // 自定义分组的全局唯一ID

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

	IsDefault *bool `json:"is_default,omitempty"` // 是否是默认分组
}

type SectionSummaryBuilder struct {
	guid     string // 自定义分组的全局唯一ID
	guidFlag bool

	name     string // 自定义分组的名称
	nameFlag bool

	isDefault     bool // 是否是默认分组
	isDefaultFlag bool
}

func NewSectionSummaryBuilder() *SectionSummaryBuilder {
	builder := &SectionSummaryBuilder{}
	return builder
}

// 自定义分组的全局唯一ID
//
// 示例值：e6e37dcc-f75a-5936-f589-12fb4b5c80c2
func (builder *SectionSummaryBuilder) Guid(guid string) *SectionSummaryBuilder {
	builder.guid = guid
	builder.guidFlag = true
	return builder
}

// 自定义分组的名称
//
// 示例值：审核过的任务
func (builder *SectionSummaryBuilder) Name(name string) *SectionSummaryBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 是否是默认分组
//
// 示例值：true
func (builder *SectionSummaryBuilder) IsDefault(isDefault bool) *SectionSummaryBuilder {
	builder.isDefault = isDefault
	builder.isDefaultFlag = true
	return builder
}

func (builder *SectionSummaryBuilder) Build() *SectionSummary {
	req := &SectionSummary{}
	if builder.guidFlag {
		req.Guid = &builder.guid

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

	}
	if builder.isDefaultFlag {
		req.IsDefault = &builder.isDefault

	}
	return req
}

type SelectSetting struct {
	Options []*Option `json:"options,omitempty"` // 选项
}

type SelectSettingBuilder struct {
	options     []*Option // 选项
	optionsFlag bool
}

func NewSelectSettingBuilder() *SelectSettingBuilder {
	builder := &SelectSettingBuilder{}
	return builder
}

// 选项
//
// 示例值：
func (builder *SelectSettingBuilder) Options(options []*Option) *SelectSettingBuilder {
	builder.options = options
	builder.optionsFlag = true
	return builder
}

func (builder *SelectSettingBuilder) Build() *SelectSetting {
	req := &SelectSetting{}
	if builder.optionsFlag {
		req.Options = builder.options
	}
	return req
}

type Start struct {
	Timestamp *string `json:"timestamp,omitempty"` // 开始时间/日期的时间戳，距1970-01-01 00:00:00的毫秒数。如果开始时间是一个日期，需要把日期转换成时间戳，并设置 is_all_day=true

	IsAllDay *bool `json:"is_all_day,omitempty"` // 是否开始于一个日期。如果设为true，timestamp中只有日期的部分会被解析和存储。
}

type StartBuilder struct {
	timestamp     string // 开始时间/日期的时间戳，距1970-01-01 00:00:00的毫秒数。如果开始时间是一个日期，需要把日期转换成时间戳，并设置 is_all_day=true
	timestampFlag bool

	isAllDay     bool // 是否开始于一个日期。如果设为true，timestamp中只有日期的部分会被解析和存储。
	isAllDayFlag bool
}

func NewStartBuilder() *StartBuilder {
	builder := &StartBuilder{}
	return builder
}

// 开始时间/日期的时间戳，距1970-01-01 00:00:00的毫秒数。如果开始时间是一个日期，需要把日期转换成时间戳，并设置 is_all_day=true
//
// 示例值：1675454764000
func (builder *StartBuilder) Timestamp(timestamp string) *StartBuilder {
	builder.timestamp = timestamp
	builder.timestampFlag = true
	return builder
}

// 是否开始于一个日期。如果设为true，timestamp中只有日期的部分会被解析和存储。
//
// 示例值：true
func (builder *StartBuilder) IsAllDay(isAllDay bool) *StartBuilder {
	builder.isAllDay = isAllDay
	builder.isAllDayFlag = true
	return builder
}

func (builder *StartBuilder) Build() *Start {
	req := &Start{}
	if builder.timestampFlag {
		req.Timestamp = &builder.timestamp

	}
	if builder.isAllDayFlag {
		req.IsAllDay = &builder.isAllDay

	}
	return req
}

type Task struct {
	Guid *string `json:"guid,omitempty"` // 任务guid，任务的唯一ID

	Summary *string `json:"summary,omitempty"` // 任务标题

	Description *string `json:"description,omitempty"` // 任务描述

	Due *Due `json:"due,omitempty"` // 任务截止时间

	Reminders []*Reminder `json:"reminders,omitempty"` // 任务的提醒配置列表。目前每个任务最多有1个。

	Creator *Member `json:"creator,omitempty"` // 任务创建者

	Members []*Member `json:"members,omitempty"` // 任务成员列表

	CompletedAt *string `json:"completed_at,omitempty"` // 任务完成的时间戳(ms)

	Attachments []*Attachment `json:"attachments,omitempty"` // 任务的附件列表

	Origin *Origin `json:"origin,omitempty"` // 任务关联的第三方平台来源信息。创建是设置后就不可更改。

	Extra *string `json:"extra,omitempty"` // 任务附带的自定义数据。

	Tasklists []*TaskInTasklistInfo `json:"tasklists,omitempty"` // 任务所属清单的名字。调用者只能看到有权限访问的清单的列表。

	RepeatRule *string `json:"repeat_rule,omitempty"` // 如果任务为重复任务，返回重复任务的配置

	ParentTaskGuid *string `json:"parent_task_guid,omitempty"` // 如果当前任务为某个任务的子任务，返回父任务的guid

	Mode *int `json:"mode,omitempty"` // 任务的模式。1 - 会签任务；2 - 或签任务

	Source *int `json:"source,omitempty"` // 任务创建的来源

	CustomComplete *CustomComplete `json:"custom_complete,omitempty"` // 任务的自定义完成配置

	TaskId *string `json:"task_id,omitempty"` // 任务界面上的代码

	CreatedAt *string `json:"created_at,omitempty"` // 任务创建时间戳(ms)

	UpdatedAt *string `json:"updated_at,omitempty"` // 任务最后一次更新的时间戳(ms)

	Status *string `json:"status,omitempty"` // 任务的状态，支持"todo"和"done"两种状态

	Url *string `json:"url,omitempty"` // 任务的分享链接

	Start *Start `json:"start,omitempty"` // 任务的开始时间

	SubtaskCount *int `json:"subtask_count,omitempty"` // 该任务的子任务的个数。

	IsMilestone *bool `json:"is_milestone,omitempty"` // 是否是里程碑任务

	CustomFields []*CustomFieldValue `json:"custom_fields,omitempty"` // 任务的自定义字段值

	Dependencies []*TaskDependency `json:"dependencies,omitempty"` // 任务依赖

	AssigneeRelated []*TaskAssignee `json:"assignee_related,omitempty"` // 任务执行者相关信息，如会签任务各执行者完成时间等

	PositiveReminders []*Reminder `json:"positive_reminders,omitempty"` // 正数协议任务提醒
}

type TaskBuilder struct {
	guid     string // 任务guid，任务的唯一ID
	guidFlag bool

	summary     string // 任务标题
	summaryFlag bool

	description     string // 任务描述
	descriptionFlag bool

	due     *Due // 任务截止时间
	dueFlag bool

	reminders     []*Reminder // 任务的提醒配置列表。目前每个任务最多有1个。
	remindersFlag bool

	creator     *Member // 任务创建者
	creatorFlag bool

	members     []*Member // 任务成员列表
	membersFlag bool

	completedAt     string // 任务完成的时间戳(ms)
	completedAtFlag bool

	attachments     []*Attachment // 任务的附件列表
	attachmentsFlag bool

	origin     *Origin // 任务关联的第三方平台来源信息。创建是设置后就不可更改。
	originFlag bool

	extra     string // 任务附带的自定义数据。
	extraFlag bool

	tasklists     []*TaskInTasklistInfo // 任务所属清单的名字。调用者只能看到有权限访问的清单的列表。
	tasklistsFlag bool

	repeatRule     string // 如果任务为重复任务，返回重复任务的配置
	repeatRuleFlag bool

	parentTaskGuid     string // 如果当前任务为某个任务的子任务，返回父任务的guid
	parentTaskGuidFlag bool

	mode     int // 任务的模式。1 - 会签任务；2 - 或签任务
	modeFlag bool

	source     int // 任务创建的来源
	sourceFlag bool

	customComplete     *CustomComplete // 任务的自定义完成配置
	customCompleteFlag bool

	taskId     string // 任务界面上的代码
	taskIdFlag bool

	createdAt     string // 任务创建时间戳(ms)
	createdAtFlag bool

	updatedAt     string // 任务最后一次更新的时间戳(ms)
	updatedAtFlag bool

	status     string // 任务的状态，支持"todo"和"done"两种状态
	statusFlag bool

	url     string // 任务的分享链接
	urlFlag bool

	start     *Start // 任务的开始时间
	startFlag bool

	subtaskCount     int // 该任务的子任务的个数。
	subtaskCountFlag bool

	isMilestone     bool // 是否是里程碑任务
	isMilestoneFlag bool

	customFields     []*CustomFieldValue // 任务的自定义字段值
	customFieldsFlag bool

	dependencies     []*TaskDependency // 任务依赖
	dependenciesFlag bool

	assigneeRelated     []*TaskAssignee // 任务执行者相关信息，如会签任务各执行者完成时间等
	assigneeRelatedFlag bool

	positiveReminders     []*Reminder // 正数协议任务提醒
	positiveRemindersFlag bool
}

func NewTaskBuilder() *TaskBuilder {
	builder := &TaskBuilder{}
	return builder
}

// 任务guid，任务的唯一ID
//
// 示例值：83912691-2e43-47fc-94a4-d512e03984fa
func (builder *TaskBuilder) Guid(guid string) *TaskBuilder {
	builder.guid = guid
	builder.guidFlag = true
	return builder
}

// 任务标题
//
// 示例值：进行销售年中总结
func (builder *TaskBuilder) Summary(summary string) *TaskBuilder {
	builder.summary = summary
	builder.summaryFlag = true
	return builder
}

// 任务描述
//
// 示例值：进行销售年中总结
func (builder *TaskBuilder) Description(description string) *TaskBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 任务截止时间
//
// 示例值：1675742789470
func (builder *TaskBuilder) Due(due *Due) *TaskBuilder {
	builder.due = due
	builder.dueFlag = true
	return builder
}

// 任务的提醒配置列表。目前每个任务最多有1个。
//
// 示例值：
func (builder *TaskBuilder) Reminders(reminders []*Reminder) *TaskBuilder {
	builder.reminders = reminders
	builder.remindersFlag = true
	return builder
}

// 任务创建者
//
// 示例值：
func (builder *TaskBuilder) Creator(creator *Member) *TaskBuilder {
	builder.creator = creator
	builder.creatorFlag = true
	return builder
}

// 任务成员列表
//
// 示例值：
func (builder *TaskBuilder) Members(members []*Member) *TaskBuilder {
	builder.members = members
	builder.membersFlag = true
	return builder
}

// 任务完成的时间戳(ms)
//
// 示例值：1675742789470
func (builder *TaskBuilder) CompletedAt(completedAt string) *TaskBuilder {
	builder.completedAt = completedAt
	builder.completedAtFlag = true
	return builder
}

// 任务的附件列表
//
// 示例值：
func (builder *TaskBuilder) Attachments(attachments []*Attachment) *TaskBuilder {
	builder.attachments = attachments
	builder.attachmentsFlag = true
	return builder
}

// 任务关联的第三方平台来源信息。创建是设置后就不可更改。
//
// 示例值：
func (builder *TaskBuilder) Origin(origin *Origin) *TaskBuilder {
	builder.origin = origin
	builder.originFlag = true
	return builder
}

// 任务附带的自定义数据。
//
// 示例值：dGVzdA==
func (builder *TaskBuilder) Extra(extra string) *TaskBuilder {
	builder.extra = extra
	builder.extraFlag = true
	return builder
}

// 任务所属清单的名字。调用者只能看到有权限访问的清单的列表。
//
// 示例值：
func (builder *TaskBuilder) Tasklists(tasklists []*TaskInTasklistInfo) *TaskBuilder {
	builder.tasklists = tasklists
	builder.tasklistsFlag = true
	return builder
}

// 如果任务为重复任务，返回重复任务的配置
//
// 示例值：FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR
func (builder *TaskBuilder) RepeatRule(repeatRule string) *TaskBuilder {
	builder.repeatRule = repeatRule
	builder.repeatRuleFlag = true
	return builder
}

// 如果当前任务为某个任务的子任务，返回父任务的guid
//
// 示例值：e297ddff-06ca-4166-b917-4ce57cd3a7a0
func (builder *TaskBuilder) ParentTaskGuid(parentTaskGuid string) *TaskBuilder {
	builder.parentTaskGuid = parentTaskGuid
	builder.parentTaskGuidFlag = true
	return builder
}

// 任务的模式。1 - 会签任务；2 - 或签任务
//
// 示例值：2
func (builder *TaskBuilder) Mode(mode int) *TaskBuilder {
	builder.mode = mode
	builder.modeFlag = true
	return builder
}

// 任务创建的来源
//
// 示例值：6
func (builder *TaskBuilder) Source(source int) *TaskBuilder {
	builder.source = source
	builder.sourceFlag = true
	return builder
}

// 任务的自定义完成配置
//
// 示例值：
func (builder *TaskBuilder) CustomComplete(customComplete *CustomComplete) *TaskBuilder {
	builder.customComplete = customComplete
	builder.customCompleteFlag = true
	return builder
}

// 任务界面上的代码
//
// 示例值：t6272302
func (builder *TaskBuilder) TaskId(taskId string) *TaskBuilder {
	builder.taskId = taskId
	builder.taskIdFlag = true
	return builder
}

// 任务创建时间戳(ms)
//
// 示例值：1675742789470
func (builder *TaskBuilder) CreatedAt(createdAt string) *TaskBuilder {
	builder.createdAt = createdAt
	builder.createdAtFlag = true
	return builder
}

// 任务最后一次更新的时间戳(ms)
//
// 示例值：1675742789470
func (builder *TaskBuilder) UpdatedAt(updatedAt string) *TaskBuilder {
	builder.updatedAt = updatedAt
	builder.updatedAtFlag = true
	return builder
}

// 任务的状态，支持"todo"和"done"两种状态
//
// 示例值：todo
func (builder *TaskBuilder) Status(status string) *TaskBuilder {
	builder.status = status
	builder.statusFlag = true
	return builder
}

// 任务的分享链接
//
// 示例值：https://applink.feishu.cn/client/todo/detail?guid=70577c8f-91ab-4c91-b359-a21a751054e8&suite_entity_num=t192012
func (builder *TaskBuilder) Url(url string) *TaskBuilder {
	builder.url = url
	builder.urlFlag = true
	return builder
}

// 任务的开始时间
//
// 示例值：
func (builder *TaskBuilder) Start(start *Start) *TaskBuilder {
	builder.start = start
	builder.startFlag = true
	return builder
}

// 该任务的子任务的个数。
//
// 示例值：1
func (builder *TaskBuilder) SubtaskCount(subtaskCount int) *TaskBuilder {
	builder.subtaskCount = subtaskCount
	builder.subtaskCountFlag = true
	return builder
}

// 是否是里程碑任务
//
// 示例值：false
func (builder *TaskBuilder) IsMilestone(isMilestone bool) *TaskBuilder {
	builder.isMilestone = isMilestone
	builder.isMilestoneFlag = true
	return builder
}

// 任务的自定义字段值
//
// 示例值：
func (builder *TaskBuilder) CustomFields(customFields []*CustomFieldValue) *TaskBuilder {
	builder.customFields = customFields
	builder.customFieldsFlag = true
	return builder
}

// 任务依赖
//
// 示例值：
func (builder *TaskBuilder) Dependencies(dependencies []*TaskDependency) *TaskBuilder {
	builder.dependencies = dependencies
	builder.dependenciesFlag = true
	return builder
}

// 任务执行者相关信息，如会签任务各执行者完成时间等
//
// 示例值：
func (builder *TaskBuilder) AssigneeRelated(assigneeRelated []*TaskAssignee) *TaskBuilder {
	builder.assigneeRelated = assigneeRelated
	builder.assigneeRelatedFlag = true
	return builder
}

// 正数协议任务提醒
//
// 示例值：
func (builder *TaskBuilder) PositiveReminders(positiveReminders []*Reminder) *TaskBuilder {
	builder.positiveReminders = positiveReminders
	builder.positiveRemindersFlag = true
	return builder
}

func (builder *TaskBuilder) Build() *Task {
	req := &Task{}
	if builder.guidFlag {
		req.Guid = &builder.guid

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

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

	}
	if builder.dueFlag {
		req.Due = builder.due
	}
	if builder.remindersFlag {
		req.Reminders = builder.reminders
	}
	if builder.creatorFlag {
		req.Creator = builder.creator
	}
	if builder.membersFlag {
		req.Members = builder.members
	}
	if builder.completedAtFlag {
		req.CompletedAt = &builder.completedAt

	}
	if builder.attachmentsFlag {
		req.Attachments = builder.attachments
	}
	if builder.originFlag {
		req.Origin = builder.origin
	}
	if builder.extraFlag {
		req.Extra = &builder.extra

	}
	if builder.tasklistsFlag {
		req.Tasklists = builder.tasklists
	}
	if builder.repeatRuleFlag {
		req.RepeatRule = &builder.repeatRule

	}
	if builder.parentTaskGuidFlag {
		req.ParentTaskGuid = &builder.parentTaskGuid

	}
	if builder.modeFlag {
		req.Mode = &builder.mode

	}
	if builder.sourceFlag {
		req.Source = &builder.source

	}
	if builder.customCompleteFlag {
		req.CustomComplete = builder.customComplete
	}
	if builder.taskIdFlag {
		req.TaskId = &builder.taskId

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

	}
	if builder.updatedAtFlag {
		req.UpdatedAt = &builder.updatedAt

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

	}
	if builder.urlFlag {
		req.Url = &builder.url

	}
	if builder.startFlag {
		req.Start = builder.start
	}
	if builder.subtaskCountFlag {
		req.SubtaskCount = &builder.subtaskCount

	}
	if builder.isMilestoneFlag {
		req.IsMilestone = &builder.isMilestone

	}
	if builder.customFieldsFlag {
		req.CustomFields = builder.customFields
	}
	if builder.dependenciesFlag {
		req.Dependencies = builder.dependencies
	}
	if builder.assigneeRelatedFlag {
		req.AssigneeRelated = builder.assigneeRelated
	}
	if builder.positiveRemindersFlag {
		req.PositiveReminders = builder.positiveReminders
	}
	return req
}

type TaskSubtask struct {
}

type TaskSubtaskBuilder struct {
}

func NewTaskSubtaskBuilder() *TaskSubtaskBuilder {
	builder := &TaskSubtaskBuilder{}
	return builder
}

func (builder *TaskSubtaskBuilder) Build() *TaskSubtask {
	req := &TaskSubtask{}
	return req
}

type TaskAssignee struct {
	Id *string `json:"id,omitempty"` // 任务执行者的id

	CompletedAt *string `json:"completed_at,omitempty"` // 会签任务中执行者完成的时间戳(ms)
}

type TaskAssigneeBuilder struct {
	id     string // 任务执行者的id
	idFlag bool

	completedAt     string // 会签任务中执行者完成的时间戳(ms)
	completedAtFlag bool
}

func NewTaskAssigneeBuilder() *TaskAssigneeBuilder {
	builder := &TaskAssigneeBuilder{}
	return builder
}

// 任务执行者的id
//
// 示例值：ou_2cefb2f014f8d0c6c2d2eb7bafb0e54f
func (builder *TaskAssigneeBuilder) Id(id string) *TaskAssigneeBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 会签任务中执行者完成的时间戳(ms)
//
// 示例值：1675742789470
func (builder *TaskAssigneeBuilder) CompletedAt(completedAt string) *TaskAssigneeBuilder {
	builder.completedAt = completedAt
	builder.completedAtFlag = true
	return builder
}

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

	}
	if builder.completedAtFlag {
		req.CompletedAt = &builder.completedAt

	}
	return req
}

type TaskDependency struct {
	Type *string `json:"type,omitempty"` // 依赖类型

	TaskGuid *string `json:"task_guid,omitempty"` // 依赖任务的GUID
}

type TaskDependencyBuilder struct {
	type_    string // 依赖类型
	typeFlag bool

	taskGuid     string // 依赖任务的GUID
	taskGuidFlag bool
}

func NewTaskDependencyBuilder() *TaskDependencyBuilder {
	builder := &TaskDependencyBuilder{}
	return builder
}

// 依赖类型
//
// 示例值：next
func (builder *TaskDependencyBuilder) Type(type_ string) *TaskDependencyBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// 依赖任务的GUID
//
// 示例值：93b7bd05-35e6-4371-b3c9-6b7cbd7100c0
func (builder *TaskDependencyBuilder) TaskGuid(taskGuid string) *TaskDependencyBuilder {
	builder.taskGuid = taskGuid
	builder.taskGuidFlag = true
	return builder
}

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

	}
	if builder.taskGuidFlag {
		req.TaskGuid = &builder.taskGuid

	}
	return req
}

type TaskInTasklistInfo struct {
	TasklistGuid *string `json:"tasklist_guid,omitempty"` // 任务所在清单的guid

	SectionGuid *string `json:"section_guid,omitempty"` // 任务所在清单的自定义分组guid
}

type TaskInTasklistInfoBuilder struct {
	tasklistGuid     string // 任务所在清单的guid
	tasklistGuidFlag bool

	sectionGuid     string // 任务所在清单的自定义分组guid
	sectionGuidFlag bool
}

func NewTaskInTasklistInfoBuilder() *TaskInTasklistInfoBuilder {
	builder := &TaskInTasklistInfoBuilder{}
	return builder
}

// 任务所在清单的guid
//
// 示例值：cc371766-6584-cf50-a222-c22cd9055004
func (builder *TaskInTasklistInfoBuilder) TasklistGuid(tasklistGuid string) *TaskInTasklistInfoBuilder {
	builder.tasklistGuid = tasklistGuid
	builder.tasklistGuidFlag = true
	return builder
}

// 任务所在清单的自定义分组guid
//
// 示例值：e6e37dcc-f75a-5936-f589-12fb4b5c80c2
func (builder *TaskInTasklistInfoBuilder) SectionGuid(sectionGuid string) *TaskInTasklistInfoBuilder {
	builder.sectionGuid = sectionGuid
	builder.sectionGuidFlag = true
	return builder
}

func (builder *TaskInTasklistInfoBuilder) Build() *TaskInTasklistInfo {
	req := &TaskInTasklistInfo{}
	if builder.tasklistGuidFlag {
		req.TasklistGuid = &builder.tasklistGuid

	}
	if builder.sectionGuidFlag {
		req.SectionGuid = &builder.sectionGuid

	}
	return req
}

type TaskStatistics struct {
	TotalTasksCount *int `json:"total_tasks_count,omitempty"` // 任务总数

	TotalCompletedTasksCount *int `json:"total_completed_tasks_count,omitempty"` // 已完成任务的数量

	TotalUncompletedTasksCount *int `json:"total_uncompleted_tasks_count,omitempty"` // 未完成任务的数量
}

type TaskStatisticsBuilder struct {
	totalTasksCount     int // 任务总数
	totalTasksCountFlag bool

	totalCompletedTasksCount     int // 已完成任务的数量
	totalCompletedTasksCountFlag bool

	totalUncompletedTasksCount     int // 未完成任务的数量
	totalUncompletedTasksCountFlag bool
}

func NewTaskStatisticsBuilder() *TaskStatisticsBuilder {
	builder := &TaskStatisticsBuilder{}
	return builder
}

// 任务总数
//
// 示例值：12
func (builder *TaskStatisticsBuilder) TotalTasksCount(totalTasksCount int) *TaskStatisticsBuilder {
	builder.totalTasksCount = totalTasksCount
	builder.totalTasksCountFlag = true
	return builder
}

// 已完成任务的数量
//
// 示例值：5
func (builder *TaskStatisticsBuilder) TotalCompletedTasksCount(totalCompletedTasksCount int) *TaskStatisticsBuilder {
	builder.totalCompletedTasksCount = totalCompletedTasksCount
	builder.totalCompletedTasksCountFlag = true
	return builder
}

// 未完成任务的数量
//
// 示例值：7
func (builder *TaskStatisticsBuilder) TotalUncompletedTasksCount(totalUncompletedTasksCount int) *TaskStatisticsBuilder {
	builder.totalUncompletedTasksCount = totalUncompletedTasksCount
	builder.totalUncompletedTasksCountFlag = true
	return builder
}

func (builder *TaskStatisticsBuilder) Build() *TaskStatistics {
	req := &TaskStatistics{}
	if builder.totalTasksCountFlag {
		req.TotalTasksCount = &builder.totalTasksCount

	}
	if builder.totalCompletedTasksCountFlag {
		req.TotalCompletedTasksCount = &builder.totalCompletedTasksCount

	}
	if builder.totalUncompletedTasksCountFlag {
		req.TotalUncompletedTasksCount = &builder.totalUncompletedTasksCount

	}
	return req
}

type TaskSummary struct {
	Guid *string `json:"guid,omitempty"` // 任务GUID

	Summary *string `json:"summary,omitempty"` // 任务的标题

	CompletedAt *string `json:"completed_at,omitempty"` // 任务完成的时间戳(ms)，为0表示未完成

	Start *Start `json:"start,omitempty"` // 任务开始时间

	Due *Due `json:"due,omitempty"` // 任务截止时间

	Members []*Member `json:"members,omitempty"` // 任务成员列表

	SubtaskCount *int `json:"subtask_count,omitempty"` // 子任务的个数
}

type TaskSummaryBuilder struct {
	guid     string // 任务GUID
	guidFlag bool

	summary     string // 任务的标题
	summaryFlag bool

	completedAt     string // 任务完成的时间戳(ms)，为0表示未完成
	completedAtFlag bool

	start     *Start // 任务开始时间
	startFlag bool

	due     *Due // 任务截止时间
	dueFlag bool

	members     []*Member // 任务成员列表
	membersFlag bool

	subtaskCount     int // 子任务的个数
	subtaskCountFlag bool
}

func NewTaskSummaryBuilder() *TaskSummaryBuilder {
	builder := &TaskSummaryBuilder{}
	return builder
}

// 任务GUID
//
// 示例值：e297ddff-06ca-4166-b917-4ce57cd3a7a0
func (builder *TaskSummaryBuilder) Guid(guid string) *TaskSummaryBuilder {
	builder.guid = guid
	builder.guidFlag = true
	return builder
}

// 任务的标题
//
// 示例值：年终总结
func (builder *TaskSummaryBuilder) Summary(summary string) *TaskSummaryBuilder {
	builder.summary = summary
	builder.summaryFlag = true
	return builder
}

// 任务完成的时间戳(ms)，为0表示未完成
//
// 示例值：1675742789470
func (builder *TaskSummaryBuilder) CompletedAt(completedAt string) *TaskSummaryBuilder {
	builder.completedAt = completedAt
	builder.completedAtFlag = true
	return builder
}

// 任务开始时间
//
// 示例值：
func (builder *TaskSummaryBuilder) Start(start *Start) *TaskSummaryBuilder {
	builder.start = start
	builder.startFlag = true
	return builder
}

// 任务截止时间
//
// 示例值：
func (builder *TaskSummaryBuilder) Due(due *Due) *TaskSummaryBuilder {
	builder.due = due
	builder.dueFlag = true
	return builder
}

// 任务成员列表
//
// 示例值：
func (builder *TaskSummaryBuilder) Members(members []*Member) *TaskSummaryBuilder {
	builder.members = members
	builder.membersFlag = true
	return builder
}

// 子任务的个数
//
// 示例值：1
func (builder *TaskSummaryBuilder) SubtaskCount(subtaskCount int) *TaskSummaryBuilder {
	builder.subtaskCount = subtaskCount
	builder.subtaskCountFlag = true
	return builder
}

func (builder *TaskSummaryBuilder) Build() *TaskSummary {
	req := &TaskSummary{}
	if builder.guidFlag {
		req.Guid = &builder.guid

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

	}
	if builder.completedAtFlag {
		req.CompletedAt = &builder.completedAt

	}
	if builder.startFlag {
		req.Start = builder.start
	}
	if builder.dueFlag {
		req.Due = builder.due
	}
	if builder.membersFlag {
		req.Members = builder.members
	}
	if builder.subtaskCountFlag {
		req.SubtaskCount = &builder.subtaskCount

	}
	return req
}

type Tasklist struct {
	Guid *string `json:"guid,omitempty"` // 清单的全局唯一ID

	Name *string `json:"name,omitempty"` // 清单名

	Creator *Member `json:"creator,omitempty"` // 清单创建者

	Owner *Member `json:"owner,omitempty"` // 清单负责人

	Members []*Member `json:"members,omitempty"` // 清单协作人

	Url *string `json:"url,omitempty"` // 该清单分享的applink

	CreatedAt *string `json:"created_at,omitempty"` // 清单创建时间戳(ms)

	UpdatedAt *string `json:"updated_at,omitempty"` // 清单最后一次更新时间戳（ms)

	ArchiveMsec *string `json:"archive_msec,omitempty"` // 清单归档时间戳(ms)
}

type TasklistBuilder struct {
	guid     string // 清单的全局唯一ID
	guidFlag bool

	name     string // 清单名
	nameFlag bool

	creator     *Member // 清单创建者
	creatorFlag bool

	owner     *Member // 清单负责人
	ownerFlag bool

	members     []*Member // 清单协作人
	membersFlag bool

	url     string // 该清单分享的applink
	urlFlag bool

	createdAt     string // 清单创建时间戳(ms)
	createdAtFlag bool

	updatedAt     string // 清单最后一次更新时间戳（ms)
	updatedAtFlag bool

	archiveMsec     string // 清单归档时间戳(ms)
	archiveMsecFlag bool
}

func NewTasklistBuilder() *TasklistBuilder {
	builder := &TasklistBuilder{}
	return builder
}

// 清单的全局唯一ID
//
// 示例值：cc371766-6584-cf50-a222-c22cd9055004
func (builder *TasklistBuilder) Guid(guid string) *TasklistBuilder {
	builder.guid = guid
	builder.guidFlag = true
	return builder
}

// 清单名
//
// 示例值：年会总结工作任务清单
func (builder *TasklistBuilder) Name(name string) *TasklistBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 清单创建者
//
// 示例值：
func (builder *TasklistBuilder) Creator(creator *Member) *TasklistBuilder {
	builder.creator = creator
	builder.creatorFlag = true
	return builder
}

// 清单负责人
//
// 示例值：
func (builder *TasklistBuilder) Owner(owner *Member) *TasklistBuilder {
	builder.owner = owner
	builder.ownerFlag = true
	return builder
}

// 清单协作人
//
// 示例值：
func (builder *TasklistBuilder) Members(members []*Member) *TasklistBuilder {
	builder.members = members
	builder.membersFlag = true
	return builder
}

// 该清单分享的applink
//
// 示例值：https://applink.feishu.cn/client/todo/task_list?guid=b45b360f-1961-4058-b338-7f50c96e1b52
func (builder *TasklistBuilder) Url(url string) *TasklistBuilder {
	builder.url = url
	builder.urlFlag = true
	return builder
}

// 清单创建时间戳(ms)
//
// 示例值：1675742789470
func (builder *TasklistBuilder) CreatedAt(createdAt string) *TasklistBuilder {
	builder.createdAt = createdAt
	builder.createdAtFlag = true
	return builder
}

// 清单最后一次更新时间戳（ms)
//
// 示例值：1675742789470
func (builder *TasklistBuilder) UpdatedAt(updatedAt string) *TasklistBuilder {
	builder.updatedAt = updatedAt
	builder.updatedAtFlag = true
	return builder
}

// 清单归档时间戳(ms)
//
// 示例值：1675742789470
func (builder *TasklistBuilder) ArchiveMsec(archiveMsec string) *TasklistBuilder {
	builder.archiveMsec = archiveMsec
	builder.archiveMsecFlag = true
	return builder
}

func (builder *TasklistBuilder) Build() *Tasklist {
	req := &Tasklist{}
	if builder.guidFlag {
		req.Guid = &builder.guid

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

	}
	if builder.creatorFlag {
		req.Creator = builder.creator
	}
	if builder.ownerFlag {
		req.Owner = builder.owner
	}
	if builder.membersFlag {
		req.Members = builder.members
	}
	if builder.urlFlag {
		req.Url = &builder.url

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

	}
	if builder.updatedAtFlag {
		req.UpdatedAt = &builder.updatedAt

	}
	if builder.archiveMsecFlag {
		req.ArchiveMsec = &builder.archiveMsec

	}
	return req
}

type TasklistActivitySubscription struct {
	Guid *string `json:"guid,omitempty"` // 订阅guid

	Name *string `json:"name,omitempty"` // 订阅名称

	Subscribers []*Member `json:"subscribers,omitempty"` // 订阅者

	IncludeKeys []int `json:"include_keys,omitempty"` // 要订阅的清单动态类型

	Disabled *bool `json:"disabled,omitempty"` // 该订阅是否为停用
}

type TasklistActivitySubscriptionBuilder struct {
	guid     string // 订阅guid
	guidFlag bool

	name     string // 订阅名称
	nameFlag bool

	subscribers     []*Member // 订阅者
	subscribersFlag bool

	includeKeys     []int // 要订阅的清单动态类型
	includeKeysFlag bool

	disabled     bool // 该订阅是否为停用
	disabledFlag bool
}

func NewTasklistActivitySubscriptionBuilder() *TasklistActivitySubscriptionBuilder {
	builder := &TasklistActivitySubscriptionBuilder{}
	return builder
}

// 订阅guid
//
// 示例值：d19e3a2a-edc0-4e4e-b7cc-950e162b53ae
func (builder *TasklistActivitySubscriptionBuilder) Guid(guid string) *TasklistActivitySubscriptionBuilder {
	builder.guid = guid
	builder.guidFlag = true
	return builder
}

// 订阅名称
//
// 示例值：Roadmap订阅
func (builder *TasklistActivitySubscriptionBuilder) Name(name string) *TasklistActivitySubscriptionBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 订阅者
//
// 示例值：
func (builder *TasklistActivitySubscriptionBuilder) Subscribers(subscribers []*Member) *TasklistActivitySubscriptionBuilder {
	builder.subscribers = subscribers
	builder.subscribersFlag = true
	return builder
}

// 要订阅的清单动态类型
//
// 示例值：
func (builder *TasklistActivitySubscriptionBuilder) IncludeKeys(includeKeys []int) *TasklistActivitySubscriptionBuilder {
	builder.includeKeys = includeKeys
	builder.includeKeysFlag = true
	return builder
}

// 该订阅是否为停用
//
// 示例值：false
func (builder *TasklistActivitySubscriptionBuilder) Disabled(disabled bool) *TasklistActivitySubscriptionBuilder {
	builder.disabled = disabled
	builder.disabledFlag = true
	return builder
}

func (builder *TasklistActivitySubscriptionBuilder) Build() *TasklistActivitySubscription {
	req := &TasklistActivitySubscription{}
	if builder.guidFlag {
		req.Guid = &builder.guid

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

	}
	if builder.subscribersFlag {
		req.Subscribers = builder.subscribers
	}
	if builder.includeKeysFlag {
		req.IncludeKeys = builder.includeKeys
	}
	if builder.disabledFlag {
		req.Disabled = &builder.disabled

	}
	return req
}

type TasklistSummary struct {
	Guid *string `json:"guid,omitempty"` // 清单的全局唯一ID

	Name *string `json:"name,omitempty"` // 清单名字
}

type TasklistSummaryBuilder struct {
	guid     string // 清单的全局唯一ID
	guidFlag bool

	name     string // 清单名字
	nameFlag bool
}

func NewTasklistSummaryBuilder() *TasklistSummaryBuilder {
	builder := &TasklistSummaryBuilder{}
	return builder
}

// 清单的全局唯一ID
//
// 示例值：cc371766-6584-cf50-a222-c22cd9055004
func (builder *TasklistSummaryBuilder) Guid(guid string) *TasklistSummaryBuilder {
	builder.guid = guid
	builder.guidFlag = true
	return builder
}

// 清单名字
//
// 示例值：活动分工任务列表
func (builder *TasklistSummaryBuilder) Name(name string) *TasklistSummaryBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

func (builder *TasklistSummaryBuilder) Build() *TasklistSummary {
	req := &TasklistSummary{}
	if builder.guidFlag {
		req.Guid = &builder.guid

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

	}
	return req
}

type TextSetting struct {
}

type TextSettingBuilder struct {
}

func NewTextSettingBuilder() *TextSettingBuilder {
	builder := &TextSettingBuilder{}
	return builder
}

func (builder *TextSettingBuilder) Build() *TextSetting {
	req := &TextSetting{}
	return req
}

type DeleteAttachmentReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewDeleteAttachmentReqBuilder() *DeleteAttachmentReqBuilder {
	builder := &DeleteAttachmentReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 要删除附件的GUID
//
// 示例值：b59aa7a3-e98c-4830-8273-cbb29f89b837
func (builder *DeleteAttachmentReqBuilder) AttachmentGuid(attachmentGuid string) *DeleteAttachmentReqBuilder {
	builder.apiReq.PathParams.Set("attachment_guid", fmt.Sprint(attachmentGuid))
	return builder
}

func (builder *DeleteAttachmentReqBuilder) Build() *DeleteAttachmentReq {
	req := &DeleteAttachmentReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	return req
}

type DeleteAttachmentReq struct {
	apiReq *larkcore.ApiReq
}

type DeleteAttachmentResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *DeleteAttachmentResp) Success() bool {
	return resp.Code == 0
}

type GetAttachmentReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewGetAttachmentReqBuilder() *GetAttachmentReqBuilder {
	builder := &GetAttachmentReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 要获取附件详情的guid
//
// 示例值：b59aa7a3-e98c-4830-8273-cbb29f89b837
func (builder *GetAttachmentReqBuilder) AttachmentGuid(attachmentGuid string) *GetAttachmentReqBuilder {
	builder.apiReq.PathParams.Set("attachment_guid", fmt.Sprint(attachmentGuid))
	return builder
}

// 表示user的ID的类型，支持open_id, user_id, union_id
//
// 示例值：open_id
func (builder *GetAttachmentReqBuilder) UserIdType(userIdType string) *GetAttachmentReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

func (builder *GetAttachmentReqBuilder) Build() *GetAttachmentReq {
	req := &GetAttachmentReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type GetAttachmentReq struct {
	apiReq *larkcore.ApiReq
}

type GetAttachmentRespData struct {
	Attachment *Attachment `json:"attachment,omitempty"` // 附件详情
}

type GetAttachmentResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *GetAttachmentRespData `json:"data"` // 业务数据
}

func (resp *GetAttachmentResp) Success() bool {
	return resp.Code == 0
}

type ListAttachmentReqBuilder struct {
	apiReq *larkcore.ApiReq
	limit  int // 最大返回多少记录，当使用迭代器访问时才有效
}

func NewListAttachmentReqBuilder() *ListAttachmentReqBuilder {
	builder := &ListAttachmentReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 最大返回多少记录，当使用迭代器访问时才有效
func (builder *ListAttachmentReqBuilder) Limit(limit int) *ListAttachmentReqBuilder {
	builder.limit = limit
	return builder
}

// 分页大小
//
// 示例值：50
func (builder *ListAttachmentReqBuilder) PageSize(pageSize int) *ListAttachmentReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 分页标记，第一次请求不填，表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该 page_token 获取查询结果
//
// 示例值：aWQ9NzEwMjMzMjMxMDE=
func (builder *ListAttachmentReqBuilder) PageToken(pageToken string) *ListAttachmentReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

// 附件归属的资源类型
//
// 示例值：task
func (builder *ListAttachmentReqBuilder) ResourceType(resourceType string) *ListAttachmentReqBuilder {
	builder.apiReq.QueryParams.Set("resource_type", fmt.Sprint(resourceType))
	return builder
}

// 附件归属资源的id，配合resource_type使用。例如希望获取任务的附件，需要设置 resource_type为task， resource_id为任务的全局唯一ID
//
// 示例值：9842501a-9f47-4ff5-a622-d319eeecb97f
func (builder *ListAttachmentReqBuilder) ResourceId(resourceId string) *ListAttachmentReqBuilder {
	builder.apiReq.QueryParams.Set("resource_id", fmt.Sprint(resourceId))
	return builder
}

// 表示user的ID的类型，支持open_id, user_id, union_id
//
// 示例值：open_id
func (builder *ListAttachmentReqBuilder) UserIdType(userIdType string) *ListAttachmentReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

//	附件的最早上传时间
//
// 示例值：123
func (builder *ListAttachmentReqBuilder) UpdatedMesc(updatedMesc string) *ListAttachmentReqBuilder {
	builder.apiReq.QueryParams.Set("updated_mesc", fmt.Sprint(updatedMesc))
	return builder
}

func (builder *ListAttachmentReqBuilder) Build() *ListAttachmentReq {
	req := &ListAttachmentReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.Limit = builder.limit
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type ListAttachmentReq struct {
	apiReq *larkcore.ApiReq
	Limit  int // 最多返回多少记录，只有在使用迭代器访问时，才有效

}

type ListAttachmentRespData struct {
	Items []*Attachment `json:"items,omitempty"` // 附件列表

	PageToken *string `json:"page_token,omitempty"` // 获取下一页的分页标记，无更多数据时返回空

	HasMore *bool `json:"has_more,omitempty"` // 是否有更多数据
}

type ListAttachmentResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ListAttachmentRespData `json:"data"` // 业务数据
}

func (resp *ListAttachmentResp) Success() bool {
	return resp.Code == 0
}

type UploadAttachmentReqBuilder struct {
	apiReq          *larkcore.ApiReq
	inputAttachment *InputAttachment
}

func NewUploadAttachmentReqBuilder() *UploadAttachmentReqBuilder {
	builder := &UploadAttachmentReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 表示user的ID的类型，支持open_id, user_id, union_id
//
// 示例值：open_id
func (builder *UploadAttachmentReqBuilder) UserIdType(userIdType string) *UploadAttachmentReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

//
func (builder *UploadAttachmentReqBuilder) InputAttachment(inputAttachment *InputAttachment) *UploadAttachmentReqBuilder {
	builder.inputAttachment = inputAttachment
	return builder
}

func (builder *UploadAttachmentReqBuilder) Build() *UploadAttachmentReq {
	req := &UploadAttachmentReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.inputAttachment
	return req
}

type UploadAttachmentReq struct {
	apiReq          *larkcore.ApiReq
	InputAttachment *InputAttachment `body:""`
}

type UploadAttachmentRespData struct {
	Items []*Attachment `json:"items,omitempty"` // 上传的附件列表
}

type UploadAttachmentResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *UploadAttachmentRespData `json:"data"` // 业务数据
}

func (resp *UploadAttachmentResp) Success() bool {
	return resp.Code == 0
}

type CreateCommentReqBuilder struct {
	apiReq       *larkcore.ApiReq
	inputComment *InputComment
}

func NewCreateCommentReqBuilder() *CreateCommentReqBuilder {
	builder := &CreateCommentReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 表示user的ID的类型，支持open_id, user_id, union_id
//
// 示例值：open_id
func (builder *CreateCommentReqBuilder) UserIdType(userIdType string) *CreateCommentReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

//
func (builder *CreateCommentReqBuilder) InputComment(inputComment *InputComment) *CreateCommentReqBuilder {
	builder.inputComment = inputComment
	return builder
}

func (builder *CreateCommentReqBuilder) Build() *CreateCommentReq {
	req := &CreateCommentReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.inputComment
	return req
}

type CreateCommentReq struct {
	apiReq       *larkcore.ApiReq
	InputComment *InputComment `body:""`
}

type CreateCommentRespData struct {
	Comment *Comment `json:"comment,omitempty"` // 创建的评论详情
}

type CreateCommentResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *CreateCommentRespData `json:"data"` // 业务数据
}

func (resp *CreateCommentResp) Success() bool {
	return resp.Code == 0
}

type DeleteCommentReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewDeleteCommentReqBuilder() *DeleteCommentReqBuilder {
	builder := &DeleteCommentReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 要删除的评论id
//
// 示例值：7198104824246747156
func (builder *DeleteCommentReqBuilder) CommentId(commentId string) *DeleteCommentReqBuilder {
	builder.apiReq.PathParams.Set("comment_id", fmt.Sprint(commentId))
	return builder
}

func (builder *DeleteCommentReqBuilder) Build() *DeleteCommentReq {
	req := &DeleteCommentReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	return req
}

type DeleteCommentReq struct {
	apiReq *larkcore.ApiReq
}

type DeleteCommentResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *DeleteCommentResp) Success() bool {
	return resp.Code == 0
}

type GetCommentReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewGetCommentReqBuilder() *GetCommentReqBuilder {
	builder := &GetCommentReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 评论ID
//
// 示例值：7198104824246747156
func (builder *GetCommentReqBuilder) CommentId(commentId string) *GetCommentReqBuilder {
	builder.apiReq.PathParams.Set("comment_id", fmt.Sprint(commentId))
	return builder
}

// 表示user的ID的类型，支持open_id, user_id, union_id
//
// 示例值：open_id
func (builder *GetCommentReqBuilder) UserIdType(userIdType string) *GetCommentReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

func (builder *GetCommentReqBuilder) Build() *GetCommentReq {
	req := &GetCommentReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type GetCommentReq struct {
	apiReq *larkcore.ApiReq
}

type GetCommentRespData struct {
	Comment *Comment `json:"comment,omitempty"` // 评论详情
}

type GetCommentResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *GetCommentRespData `json:"data"` // 业务数据
}

func (resp *GetCommentResp) Success() bool {
	return resp.Code == 0
}

type ListCommentReqBuilder struct {
	apiReq *larkcore.ApiReq
	limit  int // 最大返回多少记录，当使用迭代器访问时才有效
}

func NewListCommentReqBuilder() *ListCommentReqBuilder {
	builder := &ListCommentReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 最大返回多少记录，当使用迭代器访问时才有效
func (builder *ListCommentReqBuilder) Limit(limit int) *ListCommentReqBuilder {
	builder.limit = limit
	return builder
}

// 分页大小
//
// 示例值：50
func (builder *ListCommentReqBuilder) PageSize(pageSize int) *ListCommentReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 分页标记，第一次请求不填，表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该 page_token 获取查询结果
//
// 示例值：aWQ9NzEwMjMzMjMxMDE=
func (builder *ListCommentReqBuilder) PageToken(pageToken string) *ListCommentReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

// 要获取评论列表的资源类型
//
// 示例值：task
func (builder *ListCommentReqBuilder) ResourceType(resourceType string) *ListCommentReqBuilder {
	builder.apiReq.QueryParams.Set("resource_type", fmt.Sprint(resourceType))
	return builder
}

// 要获取评论的资源ID。例如要获取任务的评论列表，此处应该填写任务全局唯一ID
//
// 示例值：d300a75f-c56a-4be9-80d1-e47653028ceb
func (builder *ListCommentReqBuilder) ResourceId(resourceId string) *ListCommentReqBuilder {
	builder.apiReq.QueryParams.Set("resource_id", fmt.Sprint(resourceId))
	return builder
}

// 返回数据的排序方式
//
// 示例值：asc
func (builder *ListCommentReqBuilder) Direction(direction string) *ListCommentReqBuilder {
	builder.apiReq.QueryParams.Set("direction", fmt.Sprint(direction))
	return builder
}

// 表示user的ID的类型，支持open_id, user_id, union_id
//
// 示例值：open_id
func (builder *ListCommentReqBuilder) UserIdType(userIdType string) *ListCommentReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

func (builder *ListCommentReqBuilder) Build() *ListCommentReq {
	req := &ListCommentReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.Limit = builder.limit
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type ListCommentReq struct {
	apiReq *larkcore.ApiReq
	Limit  int // 最多返回多少记录，只有在使用迭代器访问时，才有效

}

type ListCommentRespData struct {
	Items []*Comment `json:"items,omitempty"` // 评论列表数据

	PageToken *string `json:"page_token,omitempty"` // 用于获取下一页的分页标记，当has_more为false时为空

	HasMore *bool `json:"has_more,omitempty"` // 是否还有更多数据
}

type ListCommentResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ListCommentRespData `json:"data"` // 业务数据
}

func (resp *ListCommentResp) Success() bool {
	return resp.Code == 0
}

type PatchCommentReqBodyBuilder struct {
	comment     *InputComment // 要更新的评论数据，支持更新content, md_content
	commentFlag bool

	updateFields     []string // 要更新的字段
	updateFieldsFlag bool
}

func NewPatchCommentReqBodyBuilder() *PatchCommentReqBodyBuilder {
	builder := &PatchCommentReqBodyBuilder{}
	return builder
}

// 要更新的评论数据，支持更新content, md_content
//
//示例值：
func (builder *PatchCommentReqBodyBuilder) Comment(comment *InputComment) *PatchCommentReqBodyBuilder {
	builder.comment = comment
	builder.commentFlag = true
	return builder
}

// 要更新的字段
//
//示例值：
func (builder *PatchCommentReqBodyBuilder) UpdateFields(updateFields []string) *PatchCommentReqBodyBuilder {
	builder.updateFields = updateFields
	builder.updateFieldsFlag = true
	return builder
}

func (builder *PatchCommentReqBodyBuilder) Build() *PatchCommentReqBody {
	req := &PatchCommentReqBody{}
	if builder.commentFlag {
		req.Comment = builder.comment
	}
	if builder.updateFieldsFlag {
		req.UpdateFields = builder.updateFields
	}
	return req
}

type PatchCommentPathReqBodyBuilder struct {
	comment          *InputComment
	commentFlag      bool
	updateFields     []string
	updateFieldsFlag bool
}

func NewPatchCommentPathReqBodyBuilder() *PatchCommentPathReqBodyBuilder {
	builder := &PatchCommentPathReqBodyBuilder{}
	return builder
}

// 要更新的评论数据，支持更新content, md_content
//
// 示例值：
func (builder *PatchCommentPathReqBodyBuilder) Comment(comment *InputComment) *PatchCommentPathReqBodyBuilder {
	builder.comment = comment
	builder.commentFlag = true
	return builder
}

// 要更新的字段
//
// 示例值：
func (builder *PatchCommentPathReqBodyBuilder) UpdateFields(updateFields []string) *PatchCommentPathReqBodyBuilder {
	builder.updateFields = updateFields
	builder.updateFieldsFlag = true
	return builder
}

func (builder *PatchCommentPathReqBodyBuilder) Build() (*PatchCommentReqBody, error) {
	req := &PatchCommentReqBody{}
	if builder.commentFlag {
		req.Comment = builder.comment
	}
	if builder.updateFieldsFlag {
		req.UpdateFields = builder.updateFields
	}
	return req, nil
}

type PatchCommentReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *PatchCommentReqBody
}

func NewPatchCommentReqBuilder() *PatchCommentReqBuilder {
	builder := &PatchCommentReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 要更新的评论ID
//
// 示例值：7198104824246747156
func (builder *PatchCommentReqBuilder) CommentId(commentId string) *PatchCommentReqBuilder {
	builder.apiReq.PathParams.Set("comment_id", fmt.Sprint(commentId))
	return builder
}

// 表示user的ID的类型，支持open_id, user_id, union_id
//
// 示例值：open_id
func (builder *PatchCommentReqBuilder) UserIdType(userIdType string) *PatchCommentReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

//
func (builder *PatchCommentReqBuilder) Body(body *PatchCommentReqBody) *PatchCommentReqBuilder {
	builder.body = body
	return builder
}

func (builder *PatchCommentReqBuilder) Build() *PatchCommentReq {
	req := &PatchCommentReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.body
	return req
}

type PatchCommentReqBody struct {
	Comment *InputComment `json:"comment,omitempty"` // 要更新的评论数据，支持更新content, md_content

	UpdateFields []string `json:"update_fields,omitempty"` // 要更新的字段
}

type PatchCommentReq struct {
	apiReq *larkcore.ApiReq
	Body   *PatchCommentReqBody `body:""`
}

type PatchCommentRespData struct {
	Comment *Comment `json:"comment,omitempty"` // 更新后的评论
}

type PatchCommentResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *PatchCommentRespData `json:"data"` // 业务数据
}

func (resp *PatchCommentResp) Success() bool {
	return resp.Code == 0
}

type AddCustomFieldReqBodyBuilder struct {
	resourceType     string // 要将自定义字段添加到一个资源的资源类型。目前只支持tasklist
	resourceTypeFlag bool

	resourceId     string // 要将自定义字段添加到的资源id，目前只支持tasklist_guid
	resourceIdFlag bool
}

func NewAddCustomFieldReqBodyBuilder() *AddCustomFieldReqBodyBuilder {
	builder := &AddCustomFieldReqBodyBuilder{}
	return builder
}

// 要将自定义字段添加到一个资源的资源类型。目前只支持tasklist
//
//示例值：tasklist
func (builder *AddCustomFieldReqBodyBuilder) ResourceType(resourceType string) *AddCustomFieldReqBodyBuilder {
	builder.resourceType = resourceType
	builder.resourceTypeFlag = true
	return builder
}

// 要将自定义字段添加到的资源id，目前只支持tasklist_guid
//
//示例值：0110a4bd-f24b-4a93-8c1a-1732b94f9593
func (builder *AddCustomFieldReqBodyBuilder) ResourceId(resourceId string) *AddCustomFieldReqBodyBuilder {
	builder.resourceId = resourceId
	builder.resourceIdFlag = true
	return builder
}

func (builder *AddCustomFieldReqBodyBuilder) Build() *AddCustomFieldReqBody {
	req := &AddCustomFieldReqBody{}
	if builder.resourceTypeFlag {
		req.ResourceType = &builder.resourceType
	}
	if builder.resourceIdFlag {
		req.ResourceId = &builder.resourceId
	}
	return req
}

type AddCustomFieldPathReqBodyBuilder struct {
	resourceType     string
	resourceTypeFlag bool
	resourceId       string
	resourceIdFlag   bool
}

func NewAddCustomFieldPathReqBodyBuilder() *AddCustomFieldPathReqBodyBuilder {
	builder := &AddCustomFieldPathReqBodyBuilder{}
	return builder
}

// 要将自定义字段添加到一个资源的资源类型。目前只支持tasklist
//
// 示例值：tasklist
func (builder *AddCustomFieldPathReqBodyBuilder) ResourceType(resourceType string) *AddCustomFieldPathReqBodyBuilder {
	builder.resourceType = resourceType
	builder.resourceTypeFlag = true
	return builder
}

// 要将自定义字段添加到的资源id，目前只支持tasklist_guid
//
// 示例值：0110a4bd-f24b-4a93-8c1a-1732b94f9593
func (builder *AddCustomFieldPathReqBodyBuilder) ResourceId(resourceId string) *AddCustomFieldPathReqBodyBuilder {
	builder.resourceId = resourceId
	builder.resourceIdFlag = true
	return builder
}

func (builder *AddCustomFieldPathReqBodyBuilder) Build() (*AddCustomFieldReqBody, error) {
	req := &AddCustomFieldReqBody{}
	if builder.resourceTypeFlag {
		req.ResourceType = &builder.resourceType
	}
	if builder.resourceIdFlag {
		req.ResourceId = &builder.resourceId
	}
	return req, nil
}

type AddCustomFieldReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *AddCustomFieldReqBody
}

func NewAddCustomFieldReqBuilder() *AddCustomFieldReqBuilder {
	builder := &AddCustomFieldReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 自定义字段GUID
//
// 示例值：0110a4bd-f24b-4a93-8c1a-1732b94f9593
func (builder *AddCustomFieldReqBuilder) CustomFieldGuid(customFieldGuid string) *AddCustomFieldReqBuilder {
	builder.apiReq.PathParams.Set("custom_field_guid", fmt.Sprint(customFieldGuid))
	return builder
}

//
func (builder *AddCustomFieldReqBuilder) Body(body *AddCustomFieldReqBody) *AddCustomFieldReqBuilder {
	builder.body = body
	return builder
}

func (builder *AddCustomFieldReqBuilder) Build() *AddCustomFieldReq {
	req := &AddCustomFieldReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type AddCustomFieldReqBody struct {
	ResourceType *string `json:"resource_type,omitempty"` // 要将自定义字段添加到一个资源的资源类型。目前只支持tasklist

	ResourceId *string `json:"resource_id,omitempty"` // 要将自定义字段添加到的资源id，目前只支持tasklist_guid
}

type AddCustomFieldReq struct {
	apiReq *larkcore.ApiReq
	Body   *AddCustomFieldReqBody `body:""`
}

type AddCustomFieldResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *AddCustomFieldResp) Success() bool {
	return resp.Code == 0
}

type CreateCustomFieldReqBuilder struct {
	apiReq           *larkcore.ApiReq
	inputCustomField *InputCustomField
}

func NewCreateCustomFieldReqBuilder() *CreateCustomFieldReqBuilder {
	builder := &CreateCustomFieldReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 表示user的ID的类型，支持open_id, user_id, union_id
//
// 示例值：open_id
func (builder *CreateCustomFieldReqBuilder) UserIdType(userIdType string) *CreateCustomFieldReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

//
func (builder *CreateCustomFieldReqBuilder) InputCustomField(inputCustomField *InputCustomField) *CreateCustomFieldReqBuilder {
	builder.inputCustomField = inputCustomField
	return builder
}

func (builder *CreateCustomFieldReqBuilder) Build() *CreateCustomFieldReq {
	req := &CreateCustomFieldReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.inputCustomField
	return req
}

type CreateCustomFieldReq struct {
	apiReq           *larkcore.ApiReq
	InputCustomField *InputCustomField `body:""`
}

type CreateCustomFieldRespData struct {
	CustomField *CustomField `json:"custom_field,omitempty"` // 创建的自定义字段
}

type CreateCustomFieldResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *CreateCustomFieldRespData `json:"data"` // 业务数据
}

func (resp *CreateCustomFieldResp) Success() bool {
	return resp.Code == 0
}

type GetCustomFieldReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewGetCustomFieldReqBuilder() *GetCustomFieldReqBuilder {
	builder := &GetCustomFieldReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 自定义字段GUID
//
// 示例值：5ffbe0ca-6600-41e0-a634-2b38cbcf13b8
func (builder *GetCustomFieldReqBuilder) CustomFieldGuid(customFieldGuid string) *GetCustomFieldReqBuilder {
	builder.apiReq.PathParams.Set("custom_field_guid", fmt.Sprint(customFieldGuid))
	return builder
}

// 表示user的ID的类型，支持open_id, user_id, union_id
//
// 示例值：open_id
func (builder *GetCustomFieldReqBuilder) UserIdType(userIdType string) *GetCustomFieldReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

func (builder *GetCustomFieldReqBuilder) Build() *GetCustomFieldReq {
	req := &GetCustomFieldReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type GetCustomFieldReq struct {
	apiReq *larkcore.ApiReq
}

type GetCustomFieldRespData struct {
	CustomField *CustomField `json:"custom_field,omitempty"` // 获取的自定义字段数据
}

type GetCustomFieldResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *GetCustomFieldRespData `json:"data"` // 业务数据
}

func (resp *GetCustomFieldResp) Success() bool {
	return resp.Code == 0
}

type ListCustomFieldReqBuilder struct {
	apiReq *larkcore.ApiReq
	limit  int // 最大返回多少记录，当使用迭代器访问时才有效
}

func NewListCustomFieldReqBuilder() *ListCustomFieldReqBuilder {
	builder := &ListCustomFieldReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 最大返回多少记录，当使用迭代器访问时才有效
func (builder *ListCustomFieldReqBuilder) Limit(limit int) *ListCustomFieldReqBuilder {
	builder.limit = limit
	return builder
}

// 分页大小
//
// 示例值：50
func (builder *ListCustomFieldReqBuilder) PageSize(pageSize int) *ListCustomFieldReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 分页标记，第一次请求不填，表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该 page_token 获取查询结果
//
// 示例值：aWQ9NzEwMjMzMjMxMDE=
func (builder *ListCustomFieldReqBuilder) PageToken(pageToken string) *ListCustomFieldReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

// 用户ID格式，支持open_id, user_id, union_id
//
// 示例值：open_id
func (builder *ListCustomFieldReqBuilder) UserIdType(userIdType string) *ListCustomFieldReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

// 资源类型，如提供表示仅查询特定资源下的自定义字段。目前只支持tasklist。
//
// 示例值：tasklist
func (builder *ListCustomFieldReqBuilder) ResourceType(resourceType string) *ListCustomFieldReqBuilder {
	builder.apiReq.QueryParams.Set("resource_type", fmt.Sprint(resourceType))
	return builder
}

// 要查询自定义字段的归属resource_id
//
// 示例值：5ffbe0ca-6600-41e0-a634-2b38cbcf13b8
func (builder *ListCustomFieldReqBuilder) ResourceId(resourceId string) *ListCustomFieldReqBuilder {
	builder.apiReq.QueryParams.Set("resource_id", fmt.Sprint(resourceId))
	return builder
}

// 更新时间戳过滤条件(ms)
//
// 示例值：1
func (builder *ListCustomFieldReqBuilder) UpdateMsec(updateMsec string) *ListCustomFieldReqBuilder {
	builder.apiReq.QueryParams.Set("update_msec", fmt.Sprint(updateMsec))
	return builder
}

func (builder *ListCustomFieldReqBuilder) Build() *ListCustomFieldReq {
	req := &ListCustomFieldReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.Limit = builder.limit
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type ListCustomFieldReq struct {
	apiReq *larkcore.ApiReq
	Limit  int // 最多返回多少记录，只有在使用迭代器访问时，才有效

}

type ListCustomFieldRespData struct {
	Items []*CustomField `json:"items,omitempty"` // 返回的自定义字段列表

	PageToken *string `json:"page_token,omitempty"` // 用于获取下一页数据的page_token

	HasMore *bool `json:"has_more,omitempty"` // 是否有下一页的数据
}

type ListCustomFieldResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ListCustomFieldRespData `json:"data"` // 业务数据
}

func (resp *ListCustomFieldResp) Success() bool {
	return resp.Code == 0
}

type PatchCustomFieldReqBodyBuilder struct {
	customField     *InputCustomField // 要修改的自定义字段数据
	customFieldFlag bool

	updateFields     []string // 要修改的自定义字段类型，支持name, member_setting, number_setting, datetime_setting, single_select_setting, multi_select_setting
	updateFieldsFlag bool
}

func NewPatchCustomFieldReqBodyBuilder() *PatchCustomFieldReqBodyBuilder {
	builder := &PatchCustomFieldReqBodyBuilder{}
	return builder
}

// 要修改的自定义字段数据
//
//示例值：
func (builder *PatchCustomFieldReqBodyBuilder) CustomField(customField *InputCustomField) *PatchCustomFieldReqBodyBuilder {
	builder.customField = customField
	builder.customFieldFlag = true
	return builder
}

// 要修改的自定义字段类型，支持name, member_setting, number_setting, datetime_setting, single_select_setting, multi_select_setting
//
//示例值：
func (builder *PatchCustomFieldReqBodyBuilder) UpdateFields(updateFields []string) *PatchCustomFieldReqBodyBuilder {
	builder.updateFields = updateFields
	builder.updateFieldsFlag = true
	return builder
}

func (builder *PatchCustomFieldReqBodyBuilder) Build() *PatchCustomFieldReqBody {
	req := &PatchCustomFieldReqBody{}
	if builder.customFieldFlag {
		req.CustomField = builder.customField
	}
	if builder.updateFieldsFlag {
		req.UpdateFields = builder.updateFields
	}
	return req
}

type PatchCustomFieldPathReqBodyBuilder struct {
	customField      *InputCustomField
	customFieldFlag  bool
	updateFields     []string
	updateFieldsFlag bool
}

func NewPatchCustomFieldPathReqBodyBuilder() *PatchCustomFieldPathReqBodyBuilder {
	builder := &PatchCustomFieldPathReqBodyBuilder{}
	return builder
}

// 要修改的自定义字段数据
//
// 示例值：
func (builder *PatchCustomFieldPathReqBodyBuilder) CustomField(customField *InputCustomField) *PatchCustomFieldPathReqBodyBuilder {
	builder.customField = customField
	builder.customFieldFlag = true
	return builder
}

// 要修改的自定义字段类型，支持name, member_setting, number_setting, datetime_setting, single_select_setting, multi_select_setting
//
// 示例值：
func (builder *PatchCustomFieldPathReqBodyBuilder) UpdateFields(updateFields []string) *PatchCustomFieldPathReqBodyBuilder {
	builder.updateFields = updateFields
	builder.updateFieldsFlag = true
	return builder
}

func (builder *PatchCustomFieldPathReqBodyBuilder) Build() (*PatchCustomFieldReqBody, error) {
	req := &PatchCustomFieldReqBody{}
	if builder.customFieldFlag {
		req.CustomField = builder.customField
	}
	if builder.updateFieldsFlag {
		req.UpdateFields = builder.updateFields
	}
	return req, nil
}

type PatchCustomFieldReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *PatchCustomFieldReqBody
}

func NewPatchCustomFieldReqBuilder() *PatchCustomFieldReqBuilder {
	builder := &PatchCustomFieldReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 自定义字段GUID
//
// 示例值：5ffbe0ca-6600-41e0-a634-2b38cbcf13b8
func (builder *PatchCustomFieldReqBuilder) CustomFieldGuid(customFieldGuid string) *PatchCustomFieldReqBuilder {
	builder.apiReq.PathParams.Set("custom_field_guid", fmt.Sprint(customFieldGuid))
	return builder
}

// 用户ID格式
//
// 示例值：open_id
func (builder *PatchCustomFieldReqBuilder) UserIdType(userIdType string) *PatchCustomFieldReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

//
func (builder *PatchCustomFieldReqBuilder) Body(body *PatchCustomFieldReqBody) *PatchCustomFieldReqBuilder {
	builder.body = body
	return builder
}

func (builder *PatchCustomFieldReqBuilder) Build() *PatchCustomFieldReq {
	req := &PatchCustomFieldReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.body
	return req
}

type PatchCustomFieldReqBody struct {
	CustomField *InputCustomField `json:"custom_field,omitempty"` // 要修改的自定义字段数据

	UpdateFields []string `json:"update_fields,omitempty"` // 要修改的自定义字段类型，支持name, member_setting, number_setting, datetime_setting, single_select_setting, multi_select_setting
}

type PatchCustomFieldReq struct {
	apiReq *larkcore.ApiReq
	Body   *PatchCustomFieldReqBody `body:""`
}

type PatchCustomFieldRespData struct {
	CustomField *CustomField `json:"custom_field,omitempty"` // 修改后的自定义字段设置
}

type PatchCustomFieldResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *PatchCustomFieldRespData `json:"data"` // 业务数据
}

func (resp *PatchCustomFieldResp) Success() bool {
	return resp.Code == 0
}

type RemoveCustomFieldReqBodyBuilder struct {
	resourceType     string // 要从某个资源移除自定义字段的资源类型，目前只支持清单"tasklist"。
	resourceTypeFlag bool

	resourceId     string // 要从某个资源移除自定义字段的资源id，`resource_type`为"tasklist"时，需填写清单的GUID
	resourceIdFlag bool
}

func NewRemoveCustomFieldReqBodyBuilder() *RemoveCustomFieldReqBodyBuilder {
	builder := &RemoveCustomFieldReqBodyBuilder{}
	return builder
}

// 要从某个资源移除自定义字段的资源类型，目前只支持清单"tasklist"。
//
//示例值：tasklist
func (builder *RemoveCustomFieldReqBodyBuilder) ResourceType(resourceType string) *RemoveCustomFieldReqBodyBuilder {
	builder.resourceType = resourceType
	builder.resourceTypeFlag = true
	return builder
}

// 要从某个资源移除自定义字段的资源id，`resource_type`为"tasklist"时，需填写清单的GUID
//
//示例值：0110a4bd-f24b-4a93-8c1a-1732b94f9593
func (builder *RemoveCustomFieldReqBodyBuilder) ResourceId(resourceId string) *RemoveCustomFieldReqBodyBuilder {
	builder.resourceId = resourceId
	builder.resourceIdFlag = true
	return builder
}

func (builder *RemoveCustomFieldReqBodyBuilder) Build() *RemoveCustomFieldReqBody {
	req := &RemoveCustomFieldReqBody{}
	if builder.resourceTypeFlag {
		req.ResourceType = &builder.resourceType
	}
	if builder.resourceIdFlag {
		req.ResourceId = &builder.resourceId
	}
	return req
}

type RemoveCustomFieldPathReqBodyBuilder struct {
	resourceType     string
	resourceTypeFlag bool
	resourceId       string
	resourceIdFlag   bool
}

func NewRemoveCustomFieldPathReqBodyBuilder() *RemoveCustomFieldPathReqBodyBuilder {
	builder := &RemoveCustomFieldPathReqBodyBuilder{}
	return builder
}

// 要从某个资源移除自定义字段的资源类型，目前只支持清单"tasklist"。
//
// 示例值：tasklist
func (builder *RemoveCustomFieldPathReqBodyBuilder) ResourceType(resourceType string) *RemoveCustomFieldPathReqBodyBuilder {
	builder.resourceType = resourceType
	builder.resourceTypeFlag = true
	return builder
}

// 要从某个资源移除自定义字段的资源id，`resource_type`为"tasklist"时，需填写清单的GUID
//
// 示例值：0110a4bd-f24b-4a93-8c1a-1732b94f9593
func (builder *RemoveCustomFieldPathReqBodyBuilder) ResourceId(resourceId string) *RemoveCustomFieldPathReqBodyBuilder {
	builder.resourceId = resourceId
	builder.resourceIdFlag = true
	return builder
}

func (builder *RemoveCustomFieldPathReqBodyBuilder) Build() (*RemoveCustomFieldReqBody, error) {
	req := &RemoveCustomFieldReqBody{}
	if builder.resourceTypeFlag {
		req.ResourceType = &builder.resourceType
	}
	if builder.resourceIdFlag {
		req.ResourceId = &builder.resourceId
	}
	return req, nil
}

type RemoveCustomFieldReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *RemoveCustomFieldReqBody
}

func NewRemoveCustomFieldReqBuilder() *RemoveCustomFieldReqBuilder {
	builder := &RemoveCustomFieldReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 自定义字段GUID
//
// 示例值：0110a4bd-f24b-4a93-8c1a-1732b94f9593
func (builder *RemoveCustomFieldReqBuilder) CustomFieldGuid(customFieldGuid string) *RemoveCustomFieldReqBuilder {
	builder.apiReq.PathParams.Set("custom_field_guid", fmt.Sprint(customFieldGuid))
	return builder
}

//
func (builder *RemoveCustomFieldReqBuilder) Body(body *RemoveCustomFieldReqBody) *RemoveCustomFieldReqBuilder {
	builder.body = body
	return builder
}

func (builder *RemoveCustomFieldReqBuilder) Build() *RemoveCustomFieldReq {
	req := &RemoveCustomFieldReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type RemoveCustomFieldReqBody struct {
	ResourceType *string `json:"resource_type,omitempty"` // 要从某个资源移除自定义字段的资源类型，目前只支持清单"tasklist"。

	ResourceId *string `json:"resource_id,omitempty"` // 要从某个资源移除自定义字段的资源id，`resource_type`为"tasklist"时，需填写清单的GUID
}

type RemoveCustomFieldReq struct {
	apiReq *larkcore.ApiReq
	Body   *RemoveCustomFieldReqBody `body:""`
}

type RemoveCustomFieldResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *RemoveCustomFieldResp) Success() bool {
	return resp.Code == 0
}

type CreateCustomFieldOptionReqBuilder struct {
	apiReq      *larkcore.ApiReq
	inputOption *InputOption
}

func NewCreateCustomFieldOptionReqBuilder() *CreateCustomFieldOptionReqBuilder {
	builder := &CreateCustomFieldOptionReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 要添加选项的自定义字段GUID，该字段必须是
//
// 示例值：b13adf3c-cad6-4e02-8929-550c112b5633
func (builder *CreateCustomFieldOptionReqBuilder) CustomFieldGuid(customFieldGuid string) *CreateCustomFieldOptionReqBuilder {
	builder.apiReq.PathParams.Set("custom_field_guid", fmt.Sprint(customFieldGuid))
	return builder
}

//
func (builder *CreateCustomFieldOptionReqBuilder) InputOption(inputOption *InputOption) *CreateCustomFieldOptionReqBuilder {
	builder.inputOption = inputOption
	return builder
}

func (builder *CreateCustomFieldOptionReqBuilder) Build() *CreateCustomFieldOptionReq {
	req := &CreateCustomFieldOptionReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.inputOption
	return req
}

type CreateCustomFieldOptionReq struct {
	apiReq      *larkcore.ApiReq
	InputOption *InputOption `body:""`
}

type CreateCustomFieldOptionRespData struct {
	Option *Option `json:"option,omitempty"` // 创建的选项
}

type CreateCustomFieldOptionResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *CreateCustomFieldOptionRespData `json:"data"` // 业务数据
}

func (resp *CreateCustomFieldOptionResp) Success() bool {
	return resp.Code == 0
}

type PatchCustomFieldOptionReqBodyBuilder struct {
	option     *InputOption // 要更新的option数据
	optionFlag bool

	updateFields     []string // 要更新的字段名，支持name,color,is_hidden,insert_before,insert_after
	updateFieldsFlag bool
}

func NewPatchCustomFieldOptionReqBodyBuilder() *PatchCustomFieldOptionReqBodyBuilder {
	builder := &PatchCustomFieldOptionReqBodyBuilder{}
	return builder
}

// 要更新的option数据
//
//示例值：
func (builder *PatchCustomFieldOptionReqBodyBuilder) Option(option *InputOption) *PatchCustomFieldOptionReqBodyBuilder {
	builder.option = option
	builder.optionFlag = true
	return builder
}

// 要更新的字段名，支持name,color,is_hidden,insert_before,insert_after
//
//示例值：
func (builder *PatchCustomFieldOptionReqBodyBuilder) UpdateFields(updateFields []string) *PatchCustomFieldOptionReqBodyBuilder {
	builder.updateFields = updateFields
	builder.updateFieldsFlag = true
	return builder
}

func (builder *PatchCustomFieldOptionReqBodyBuilder) Build() *PatchCustomFieldOptionReqBody {
	req := &PatchCustomFieldOptionReqBody{}
	if builder.optionFlag {
		req.Option = builder.option
	}
	if builder.updateFieldsFlag {
		req.UpdateFields = builder.updateFields
	}
	return req
}

type PatchCustomFieldOptionPathReqBodyBuilder struct {
	option           *InputOption
	optionFlag       bool
	updateFields     []string
	updateFieldsFlag bool
}

func NewPatchCustomFieldOptionPathReqBodyBuilder() *PatchCustomFieldOptionPathReqBodyBuilder {
	builder := &PatchCustomFieldOptionPathReqBodyBuilder{}
	return builder
}

// 要更新的option数据
//
// 示例值：
func (builder *PatchCustomFieldOptionPathReqBodyBuilder) Option(option *InputOption) *PatchCustomFieldOptionPathReqBodyBuilder {
	builder.option = option
	builder.optionFlag = true
	return builder
}

// 要更新的字段名，支持name,color,is_hidden,insert_before,insert_after
//
// 示例值：
func (builder *PatchCustomFieldOptionPathReqBodyBuilder) UpdateFields(updateFields []string) *PatchCustomFieldOptionPathReqBodyBuilder {
	builder.updateFields = updateFields
	builder.updateFieldsFlag = true
	return builder
}

func (builder *PatchCustomFieldOptionPathReqBodyBuilder) Build() (*PatchCustomFieldOptionReqBody, error) {
	req := &PatchCustomFieldOptionReqBody{}
	if builder.optionFlag {
		req.Option = builder.option
	}
	if builder.updateFieldsFlag {
		req.UpdateFields = builder.updateFields
	}
	return req, nil
}

type PatchCustomFieldOptionReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *PatchCustomFieldOptionReqBody
}

func NewPatchCustomFieldOptionReqBuilder() *PatchCustomFieldOptionReqBuilder {
	builder := &PatchCustomFieldOptionReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 要更新的选项的自定义字段GUID
//
// 示例值：b13adf3c-cad6-4e02-8929-550c112b5633
func (builder *PatchCustomFieldOptionReqBuilder) CustomFieldGuid(customFieldGuid string) *PatchCustomFieldOptionReqBuilder {
	builder.apiReq.PathParams.Set("custom_field_guid", fmt.Sprint(customFieldGuid))
	return builder
}

// 要更新的选项的GUID
//
// 示例值：b13adf3c-cad6-4e02-8929-550c112b5633
func (builder *PatchCustomFieldOptionReqBuilder) OptionGuid(optionGuid string) *PatchCustomFieldOptionReqBuilder {
	builder.apiReq.PathParams.Set("option_guid", fmt.Sprint(optionGuid))
	return builder
}

//
func (builder *PatchCustomFieldOptionReqBuilder) Body(body *PatchCustomFieldOptionReqBody) *PatchCustomFieldOptionReqBuilder {
	builder.body = body
	return builder
}

func (builder *PatchCustomFieldOptionReqBuilder) Build() *PatchCustomFieldOptionReq {
	req := &PatchCustomFieldOptionReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type PatchCustomFieldOptionReqBody struct {
	Option *InputOption `json:"option,omitempty"` // 要更新的option数据

	UpdateFields []string `json:"update_fields,omitempty"` // 要更新的字段名，支持name,color,is_hidden,insert_before,insert_after
}

type PatchCustomFieldOptionReq struct {
	apiReq *larkcore.ApiReq
	Body   *PatchCustomFieldOptionReqBody `body:""`
}

type PatchCustomFieldOptionRespData struct {
	Option *Option `json:"option,omitempty"` // 更新后的option数据
}

type PatchCustomFieldOptionResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *PatchCustomFieldOptionRespData `json:"data"` // 业务数据
}

func (resp *PatchCustomFieldOptionResp) Success() bool {
	return resp.Code == 0
}

type CreateSectionReqBuilder struct {
	apiReq       *larkcore.ApiReq
	inputSection *InputSection
}

func NewCreateSectionReqBuilder() *CreateSectionReqBuilder {
	builder := &CreateSectionReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 表示user的ID的类型，支持open_id, user_id, union_id
//
// 示例值：open_id
func (builder *CreateSectionReqBuilder) UserIdType(userIdType string) *CreateSectionReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

//
func (builder *CreateSectionReqBuilder) InputSection(inputSection *InputSection) *CreateSectionReqBuilder {
	builder.inputSection = inputSection
	return builder
}

func (builder *CreateSectionReqBuilder) Build() *CreateSectionReq {
	req := &CreateSectionReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.inputSection
	return req
}

type CreateSectionReq struct {
	apiReq       *larkcore.ApiReq
	InputSection *InputSection `body:""`
}

type CreateSectionRespData struct {
	Section *Section `json:"section,omitempty"` // 创建的自定义分组数据
}

type CreateSectionResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *CreateSectionRespData `json:"data"` // 业务数据
}

func (resp *CreateSectionResp) Success() bool {
	return resp.Code == 0
}

type DeleteSectionReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewDeleteSectionReqBuilder() *DeleteSectionReqBuilder {
	builder := &DeleteSectionReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 要删除的自定义分组全局唯一ID
//
// 示例值：9842501a-9f47-4ff5-a622-d319eeecb97f
func (builder *DeleteSectionReqBuilder) SectionGuid(sectionGuid string) *DeleteSectionReqBuilder {
	builder.apiReq.PathParams.Set("section_guid", fmt.Sprint(sectionGuid))
	return builder
}

func (builder *DeleteSectionReqBuilder) Build() *DeleteSectionReq {
	req := &DeleteSectionReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	return req
}

type DeleteSectionReq struct {
	apiReq *larkcore.ApiReq
}

type DeleteSectionResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *DeleteSectionResp) Success() bool {
	return resp.Code == 0
}

type GetSectionReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewGetSectionReqBuilder() *GetSectionReqBuilder {
	builder := &GetSectionReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 要获取的自定义分组GUID
//
// 示例值：9842501a-9f47-4ff5-a622-d319eeecb97f
func (builder *GetSectionReqBuilder) SectionGuid(sectionGuid string) *GetSectionReqBuilder {
	builder.apiReq.PathParams.Set("section_guid", fmt.Sprint(sectionGuid))
	return builder
}

// 表示user的ID的类型，支持open_id, user_id, union_id
//
// 示例值：open_id
func (builder *GetSectionReqBuilder) UserIdType(userIdType string) *GetSectionReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

func (builder *GetSectionReqBuilder) Build() *GetSectionReq {
	req := &GetSectionReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type GetSectionReq struct {
	apiReq *larkcore.ApiReq
}

type GetSectionRespData struct {
	Section *Section `json:"section,omitempty"` // 获取的自定义分组详情
}

type GetSectionResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *GetSectionRespData `json:"data"` // 业务数据
}

func (resp *GetSectionResp) Success() bool {
	return resp.Code == 0
}

type ListSectionReqBuilder struct {
	apiReq *larkcore.ApiReq
	limit  int // 最大返回多少记录，当使用迭代器访问时才有效
}

func NewListSectionReqBuilder() *ListSectionReqBuilder {
	builder := &ListSectionReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 最大返回多少记录，当使用迭代器访问时才有效
func (builder *ListSectionReqBuilder) Limit(limit int) *ListSectionReqBuilder {
	builder.limit = limit
	return builder
}

// 分页大小
//
// 示例值：50
func (builder *ListSectionReqBuilder) PageSize(pageSize int) *ListSectionReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 分页标记，第一次请求不填，表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该 page_token 获取查询结果
//
// 示例值：aWQ9NzEwMjMzMjMxMDE=
func (builder *ListSectionReqBuilder) PageToken(pageToken string) *ListSectionReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

// 自定义分组所属的资源类型。支持"my_tasks"(我负责的）和"tasklist"（清单）。当使用"tasklist"时，需要用resource_id提供清单GUID。
//
// 示例值：tasklist
func (builder *ListSectionReqBuilder) ResourceType(resourceType string) *ListSectionReqBuilder {
	builder.apiReq.QueryParams.Set("resource_type", fmt.Sprint(resourceType))
	return builder
}

// 如`resource_type`为"tasklist"，这里需要填写要列取自定义分组的清单的GUID。
//
// 示例值：caef228f-2342-23c1-c36d-91186414dc64
func (builder *ListSectionReqBuilder) ResourceId(resourceId string) *ListSectionReqBuilder {
	builder.apiReq.QueryParams.Set("resource_id", fmt.Sprint(resourceId))
	return builder
}

// 表示user的ID的类型，支持open_id, user_id, union_id
//
// 示例值：open_id
func (builder *ListSectionReqBuilder) UserIdType(userIdType string) *ListSectionReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

// 更新时间戳过滤(ms)
//
// 示例值：1
func (builder *ListSectionReqBuilder) UpdateMsec(updateMsec string) *ListSectionReqBuilder {
	builder.apiReq.QueryParams.Set("update_msec", fmt.Sprint(updateMsec))
	return builder
}

func (builder *ListSectionReqBuilder) Build() *ListSectionReq {
	req := &ListSectionReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.Limit = builder.limit
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type ListSectionReq struct {
	apiReq *larkcore.ApiReq
	Limit  int // 最多返回多少记录，只有在使用迭代器访问时，才有效

}

type ListSectionRespData struct {
	Items []*SectionSummary `json:"items,omitempty"` // 自定义分组的摘要列表

	PageToken *string `json:"page_token,omitempty"` // 获取下一页数据的分页标记，没有更多数据时返回空

	HasMore *bool `json:"has_more,omitempty"` // 是否有更多数据
}

type ListSectionResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ListSectionRespData `json:"data"` // 业务数据
}

func (resp *ListSectionResp) Success() bool {
	return resp.Code == 0
}

type PatchSectionReqBodyBuilder struct {
	section     *InputSection // 要更新的自定义分组的数据，仅支持name, insert_after, insert_before
	sectionFlag bool

	updateFields     []string // 要更新的字段名
	updateFieldsFlag bool
}

func NewPatchSectionReqBodyBuilder() *PatchSectionReqBodyBuilder {
	builder := &PatchSectionReqBodyBuilder{}
	return builder
}

// 要更新的自定义分组的数据，仅支持name, insert_after, insert_before
//
//示例值：
func (builder *PatchSectionReqBodyBuilder) Section(section *InputSection) *PatchSectionReqBodyBuilder {
	builder.section = section
	builder.sectionFlag = true
	return builder
}

// 要更新的字段名
//
//示例值：
func (builder *PatchSectionReqBodyBuilder) UpdateFields(updateFields []string) *PatchSectionReqBodyBuilder {
	builder.updateFields = updateFields
	builder.updateFieldsFlag = true
	return builder
}

func (builder *PatchSectionReqBodyBuilder) Build() *PatchSectionReqBody {
	req := &PatchSectionReqBody{}
	if builder.sectionFlag {
		req.Section = builder.section
	}
	if builder.updateFieldsFlag {
		req.UpdateFields = builder.updateFields
	}
	return req
}

type PatchSectionPathReqBodyBuilder struct {
	section          *InputSection
	sectionFlag      bool
	updateFields     []string
	updateFieldsFlag bool
}

func NewPatchSectionPathReqBodyBuilder() *PatchSectionPathReqBodyBuilder {
	builder := &PatchSectionPathReqBodyBuilder{}
	return builder
}

// 要更新的自定义分组的数据，仅支持name, insert_after, insert_before
//
// 示例值：
func (builder *PatchSectionPathReqBodyBuilder) Section(section *InputSection) *PatchSectionPathReqBodyBuilder {
	builder.section = section
	builder.sectionFlag = true
	return builder
}

// 要更新的字段名
//
// 示例值：
func (builder *PatchSectionPathReqBodyBuilder) UpdateFields(updateFields []string) *PatchSectionPathReqBodyBuilder {
	builder.updateFields = updateFields
	builder.updateFieldsFlag = true
	return builder
}

func (builder *PatchSectionPathReqBodyBuilder) Build() (*PatchSectionReqBody, error) {
	req := &PatchSectionReqBody{}
	if builder.sectionFlag {
		req.Section = builder.section
	}
	if builder.updateFieldsFlag {
		req.UpdateFields = builder.updateFields
	}
	return req, nil
}

type PatchSectionReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *PatchSectionReqBody
}

func NewPatchSectionReqBuilder() *PatchSectionReqBuilder {
	builder := &PatchSectionReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 要更新的自定义分组GUID
//
// 示例值：9842501a-9f47-4ff5-a622-d319eeecb97f
func (builder *PatchSectionReqBuilder) SectionGuid(sectionGuid string) *PatchSectionReqBuilder {
	builder.apiReq.PathParams.Set("section_guid", fmt.Sprint(sectionGuid))
	return builder
}

// 表示user的ID的类型，支持open_id, user_id, union_id
//
// 示例值：open_id
func (builder *PatchSectionReqBuilder) UserIdType(userIdType string) *PatchSectionReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

//
func (builder *PatchSectionReqBuilder) Body(body *PatchSectionReqBody) *PatchSectionReqBuilder {
	builder.body = body
	return builder
}

func (builder *PatchSectionReqBuilder) Build() *PatchSectionReq {
	req := &PatchSectionReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.body
	return req
}

type PatchSectionReqBody struct {
	Section *InputSection `json:"section,omitempty"` // 要更新的自定义分组的数据，仅支持name, insert_after, insert_before

	UpdateFields []string `json:"update_fields,omitempty"` // 要更新的字段名
}

type PatchSectionReq struct {
	apiReq *larkcore.ApiReq
	Body   *PatchSectionReqBody `body:""`
}

type PatchSectionRespData struct {
	Section *Section `json:"section,omitempty"` // 更新后的自定义分组
}

type PatchSectionResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *PatchSectionRespData `json:"data"` // 业务数据
}

func (resp *PatchSectionResp) Success() bool {
	return resp.Code == 0
}

type TasksSectionReqBuilder struct {
	apiReq *larkcore.ApiReq
	limit  int // 最大返回多少记录，当使用迭代器访问时才有效
}

func NewTasksSectionReqBuilder() *TasksSectionReqBuilder {
	builder := &TasksSectionReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 最大返回多少记录，当使用迭代器访问时才有效
func (builder *TasksSectionReqBuilder) Limit(limit int) *TasksSectionReqBuilder {
	builder.limit = limit
	return builder
}

// 要获取任务的自定义分组全局唯一ID
//
// 示例值：9842501a-9f47-4ff5-a622-d319eeecb97f
func (builder *TasksSectionReqBuilder) SectionGuid(sectionGuid string) *TasksSectionReqBuilder {
	builder.apiReq.PathParams.Set("section_guid", fmt.Sprint(sectionGuid))
	return builder
}

// 分页大小
//
// 示例值：50
func (builder *TasksSectionReqBuilder) PageSize(pageSize int) *TasksSectionReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 分页标记
//
// 示例值：aWQ9NzEwMjMzMjMxMDE=
func (builder *TasksSectionReqBuilder) PageToken(pageToken string) *TasksSectionReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

// 按照任务状态过滤，如果不填写则表示不按完成状态过滤
//
// 示例值：true
func (builder *TasksSectionReqBuilder) Completed(completed bool) *TasksSectionReqBuilder {
	builder.apiReq.QueryParams.Set("completed", fmt.Sprint(completed))
	return builder
}

// 按照创建时间筛选的起始时间戳（ms)，如不填写则为首个任务的创建时刻
//
// 示例值：1675742789470
func (builder *TasksSectionReqBuilder) CreatedFrom(createdFrom string) *TasksSectionReqBuilder {
	builder.apiReq.QueryParams.Set("created_from", fmt.Sprint(createdFrom))
	return builder
}

// 按照创建时间筛选的起始时间戳（ms)，如不填写则为最后任务的创建时刻
//
// 示例值：1675742789470
func (builder *TasksSectionReqBuilder) CreatedTo(createdTo string) *TasksSectionReqBuilder {
	builder.apiReq.QueryParams.Set("created_to", fmt.Sprint(createdTo))
	return builder
}

// 表示user的ID的类型，支持open_id, user_id, union_id
//
// 示例值：open_id
func (builder *TasksSectionReqBuilder) UserIdType(userIdType string) *TasksSectionReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

func (builder *TasksSectionReqBuilder) Build() *TasksSectionReq {
	req := &TasksSectionReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.Limit = builder.limit
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type TasksSectionReq struct {
	apiReq *larkcore.ApiReq
	Limit  int // 最多返回多少记录，只有在使用迭代器访问时，才有效

}

type TasksSectionRespData struct {
	Items []*TaskSummary `json:"items,omitempty"` // 任务摘要信息

	PageToken *string `json:"page_token,omitempty"` // 获取下一页的分页标记，无更多数据时返回空

	HasMore *bool `json:"has_more,omitempty"` // 是否有更多数据
}

type TasksSectionResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *TasksSectionRespData `json:"data"` // 业务数据
}

func (resp *TasksSectionResp) Success() bool {
	return resp.Code == 0
}

type AddDependenciesTaskReqBodyBuilder struct {
	dependencies     []*TaskDependency // 要添加的依赖
	dependenciesFlag bool
}

func NewAddDependenciesTaskReqBodyBuilder() *AddDependenciesTaskReqBodyBuilder {
	builder := &AddDependenciesTaskReqBodyBuilder{}
	return builder
}

// 要添加的依赖
//
//示例值：
func (builder *AddDependenciesTaskReqBodyBuilder) Dependencies(dependencies []*TaskDependency) *AddDependenciesTaskReqBodyBuilder {
	builder.dependencies = dependencies
	builder.dependenciesFlag = true
	return builder
}

func (builder *AddDependenciesTaskReqBodyBuilder) Build() *AddDependenciesTaskReqBody {
	req := &AddDependenciesTaskReqBody{}
	if builder.dependenciesFlag {
		req.Dependencies = builder.dependencies
	}
	return req
}

type AddDependenciesTaskPathReqBodyBuilder struct {
	dependencies     []*TaskDependency
	dependenciesFlag bool
}

func NewAddDependenciesTaskPathReqBodyBuilder() *AddDependenciesTaskPathReqBodyBuilder {
	builder := &AddDependenciesTaskPathReqBodyBuilder{}
	return builder
}

// 要添加的依赖
//
// 示例值：
func (builder *AddDependenciesTaskPathReqBodyBuilder) Dependencies(dependencies []*TaskDependency) *AddDependenciesTaskPathReqBodyBuilder {
	builder.dependencies = dependencies
	builder.dependenciesFlag = true
	return builder
}

func (builder *AddDependenciesTaskPathReqBodyBuilder) Build() (*AddDependenciesTaskReqBody, error) {
	req := &AddDependenciesTaskReqBody{}
	if builder.dependenciesFlag {
		req.Dependencies = builder.dependencies
	}
	return req, nil
}

type AddDependenciesTaskReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *AddDependenciesTaskReqBody
}

func NewAddDependenciesTaskReqBuilder() *AddDependenciesTaskReqBuilder {
	builder := &AddDependenciesTaskReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 任务GUID
//
// 示例值：93b7bd05-35e6-4371-b3c9-6b7cbd7100c0
func (builder *AddDependenciesTaskReqBuilder) TaskGuid(taskGuid string) *AddDependenciesTaskReqBuilder {
	builder.apiReq.PathParams.Set("task_guid", fmt.Sprint(taskGuid))
	return builder
}

//
func (builder *AddDependenciesTaskReqBuilder) Body(body *AddDependenciesTaskReqBody) *AddDependenciesTaskReqBuilder {
	builder.body = body
	return builder
}

func (builder *AddDependenciesTaskReqBuilder) Build() *AddDependenciesTaskReq {
	req := &AddDependenciesTaskReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type AddDependenciesTaskReqBody struct {
	Dependencies []*TaskDependency `json:"dependencies,omitempty"` // 要添加的依赖
}

type AddDependenciesTaskReq struct {
	apiReq *larkcore.ApiReq
	Body   *AddDependenciesTaskReqBody `body:""`
}

type AddDependenciesTaskRespData struct {
	Dependencies []*TaskDependency `json:"dependencies,omitempty"` // 被添加后任务的所有依赖
}

type AddDependenciesTaskResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *AddDependenciesTaskRespData `json:"data"` // 业务数据
}

func (resp *AddDependenciesTaskResp) Success() bool {
	return resp.Code == 0
}

type AddMembersTaskReqBodyBuilder struct {
	members     []*Member // 要添加的members列表
	membersFlag bool

	clientToken     string // 幂等token，如果提供则实现幂等行为
	clientTokenFlag bool
}

func NewAddMembersTaskReqBodyBuilder() *AddMembersTaskReqBodyBuilder {
	builder := &AddMembersTaskReqBodyBuilder{}
	return builder
}

// 要添加的members列表
//
//示例值：
func (builder *AddMembersTaskReqBodyBuilder) Members(members []*Member) *AddMembersTaskReqBodyBuilder {
	builder.members = members
	builder.membersFlag = true
	return builder
}

// 幂等token，如果提供则实现幂等行为
//
//示例值：6d99f59c-4d7d-4452-98d6-3d0556393cf6
func (builder *AddMembersTaskReqBodyBuilder) ClientToken(clientToken string) *AddMembersTaskReqBodyBuilder {
	builder.clientToken = clientToken
	builder.clientTokenFlag = true
	return builder
}

func (builder *AddMembersTaskReqBodyBuilder) Build() *AddMembersTaskReqBody {
	req := &AddMembersTaskReqBody{}
	if builder.membersFlag {
		req.Members = builder.members
	}
	if builder.clientTokenFlag {
		req.ClientToken = &builder.clientToken
	}
	return req
}

type AddMembersTaskPathReqBodyBuilder struct {
	members         []*Member
	membersFlag     bool
	clientToken     string
	clientTokenFlag bool
}

func NewAddMembersTaskPathReqBodyBuilder() *AddMembersTaskPathReqBodyBuilder {
	builder := &AddMembersTaskPathReqBodyBuilder{}
	return builder
}

// 要添加的members列表
//
// 示例值：
func (builder *AddMembersTaskPathReqBodyBuilder) Members(members []*Member) *AddMembersTaskPathReqBodyBuilder {
	builder.members = members
	builder.membersFlag = true
	return builder
}

// 幂等token，如果提供则实现幂等行为
//
// 示例值：6d99f59c-4d7d-4452-98d6-3d0556393cf6
func (builder *AddMembersTaskPathReqBodyBuilder) ClientToken(clientToken string) *AddMembersTaskPathReqBodyBuilder {
	builder.clientToken = clientToken
	builder.clientTokenFlag = true
	return builder
}

func (builder *AddMembersTaskPathReqBodyBuilder) Build() (*AddMembersTaskReqBody, error) {
	req := &AddMembersTaskReqBody{}
	if builder.membersFlag {
		req.Members = builder.members
	}
	if builder.clientTokenFlag {
		req.ClientToken = &builder.clientToken
	}
	return req, nil
}

type AddMembersTaskReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *AddMembersTaskReqBody
}

func NewAddMembersTaskReqBuilder() *AddMembersTaskReqBuilder {
	builder := &AddMembersTaskReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 要添加负责人的任务全局唯一ID
//
// 示例值：d300a75f-c56a-4be9-80d1-e47653028ceb
func (builder *AddMembersTaskReqBuilder) TaskGuid(taskGuid string) *AddMembersTaskReqBuilder {
	builder.apiReq.PathParams.Set("task_guid", fmt.Sprint(taskGuid))
	return builder
}

// 表示user的ID的类型，支持open_id, user_id, union_id
//
// 示例值：open_id
func (builder *AddMembersTaskReqBuilder) UserIdType(userIdType string) *AddMembersTaskReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

//
func (builder *AddMembersTaskReqBuilder) Body(body *AddMembersTaskReqBody) *AddMembersTaskReqBuilder {
	builder.body = body
	return builder
}

func (builder *AddMembersTaskReqBuilder) Build() *AddMembersTaskReq {
	req := &AddMembersTaskReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.body
	return req
}

type AddMembersTaskReqBody struct {
	Members []*Member `json:"members,omitempty"` // 要添加的members列表

	ClientToken *string `json:"client_token,omitempty"` // 幂等token，如果提供则实现幂等行为
}

type AddMembersTaskReq struct {
	apiReq *larkcore.ApiReq
	Body   *AddMembersTaskReqBody `body:""`
}

type AddMembersTaskRespData struct {
	Task *Task `json:"task,omitempty"` // 更新完成后的任务实体数据
}

type AddMembersTaskResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *AddMembersTaskRespData `json:"data"` // 业务数据
}

func (resp *AddMembersTaskResp) Success() bool {
	return resp.Code == 0
}

type AddRemindersTaskReqBodyBuilder struct {
	reminders     []*Reminder // 要添加的reminder的列表
	remindersFlag bool
}

func NewAddRemindersTaskReqBodyBuilder() *AddRemindersTaskReqBodyBuilder {
	builder := &AddRemindersTaskReqBodyBuilder{}
	return builder
}

// 要添加的reminder的列表
//
//示例值：
func (builder *AddRemindersTaskReqBodyBuilder) Reminders(reminders []*Reminder) *AddRemindersTaskReqBodyBuilder {
	builder.reminders = reminders
	builder.remindersFlag = true
	return builder
}

func (builder *AddRemindersTaskReqBodyBuilder) Build() *AddRemindersTaskReqBody {
	req := &AddRemindersTaskReqBody{}
	if builder.remindersFlag {
		req.Reminders = builder.reminders
	}
	return req
}

type AddRemindersTaskPathReqBodyBuilder struct {
	reminders     []*Reminder
	remindersFlag bool
}

func NewAddRemindersTaskPathReqBodyBuilder() *AddRemindersTaskPathReqBodyBuilder {
	builder := &AddRemindersTaskPathReqBodyBuilder{}
	return builder
}

// 要添加的reminder的列表
//
// 示例值：
func (builder *AddRemindersTaskPathReqBodyBuilder) Reminders(reminders []*Reminder) *AddRemindersTaskPathReqBodyBuilder {
	builder.reminders = reminders
	builder.remindersFlag = true
	return builder
}

func (builder *AddRemindersTaskPathReqBodyBuilder) Build() (*AddRemindersTaskReqBody, error) {
	req := &AddRemindersTaskReqBody{}
	if builder.remindersFlag {
		req.Reminders = builder.reminders
	}
	return req, nil
}

type AddRemindersTaskReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *AddRemindersTaskReqBody
}

func NewAddRemindersTaskReqBuilder() *AddRemindersTaskReqBuilder {
	builder := &AddRemindersTaskReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 要添加负责人的任务全局唯一ID
//
// 示例值：d300a75f-c56a-4be9-80d1-e47653028ceb
func (builder *AddRemindersTaskReqBuilder) TaskGuid(taskGuid string) *AddRemindersTaskReqBuilder {
	builder.apiReq.PathParams.Set("task_guid", fmt.Sprint(taskGuid))
	return builder
}

// 表示user的ID的类型，支持open_id, user_id, union_id
//
// 示例值：open_id
func (builder *AddRemindersTaskReqBuilder) UserIdType(userIdType string) *AddRemindersTaskReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

//
func (builder *AddRemindersTaskReqBuilder) Body(body *AddRemindersTaskReqBody) *AddRemindersTaskReqBuilder {
	builder.body = body
	return builder
}

func (builder *AddRemindersTaskReqBuilder) Build() *AddRemindersTaskReq {
	req := &AddRemindersTaskReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.body
	return req
}

type AddRemindersTaskReqBody struct {
	Reminders []*Reminder `json:"reminders,omitempty"` // 要添加的reminder的列表
}

type AddRemindersTaskReq struct {
	apiReq *larkcore.ApiReq
	Body   *AddRemindersTaskReqBody `body:""`
}

type AddRemindersTaskRespData struct {
	Task *Task `json:"task,omitempty"` // 更新完成后的任务实体
}

type AddRemindersTaskResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *AddRemindersTaskRespData `json:"data"` // 业务数据
}

func (resp *AddRemindersTaskResp) Success() bool {
	return resp.Code == 0
}

type AddTasklistTaskReqBodyBuilder struct {
	tasklistGuid     string // 要添加到的清单的全局唯一ID
	tasklistGuidFlag bool

	sectionGuid     string // 要添加到清单的自定义分组全局唯一ID，如不填写表示添加到默认分组
	sectionGuidFlag bool
}

func NewAddTasklistTaskReqBodyBuilder() *AddTasklistTaskReqBodyBuilder {
	builder := &AddTasklistTaskReqBodyBuilder{}
	return builder
}

// 要添加到的清单的全局唯一ID
//
//示例值：d300a75f-c56a-4be9-80d1-e47653028ceb
func (builder *AddTasklistTaskReqBodyBuilder) TasklistGuid(tasklistGuid string) *AddTasklistTaskReqBodyBuilder {
	builder.tasklistGuid = tasklistGuid
	builder.tasklistGuidFlag = true
	return builder
}

// 要添加到清单的自定义分组全局唯一ID，如不填写表示添加到默认分组
//
//示例值：d300a75f-c56a-4be9-80d1-e47653028ceb
func (builder *AddTasklistTaskReqBodyBuilder) SectionGuid(sectionGuid string) *AddTasklistTaskReqBodyBuilder {
	builder.sectionGuid = sectionGuid
	builder.sectionGuidFlag = true
	return builder
}

func (builder *AddTasklistTaskReqBodyBuilder) Build() *AddTasklistTaskReqBody {
	req := &AddTasklistTaskReqBody{}
	if builder.tasklistGuidFlag {
		req.TasklistGuid = &builder.tasklistGuid
	}
	if builder.sectionGuidFlag {
		req.SectionGuid = &builder.sectionGuid
	}
	return req
}

type AddTasklistTaskPathReqBodyBuilder struct {
	tasklistGuid     string
	tasklistGuidFlag bool
	sectionGuid      string
	sectionGuidFlag  bool
}

func NewAddTasklistTaskPathReqBodyBuilder() *AddTasklistTaskPathReqBodyBuilder {
	builder := &AddTasklistTaskPathReqBodyBuilder{}
	return builder
}

// 要添加到的清单的全局唯一ID
//
// 示例值：d300a75f-c56a-4be9-80d1-e47653028ceb
func (builder *AddTasklistTaskPathReqBodyBuilder) TasklistGuid(tasklistGuid string) *AddTasklistTaskPathReqBodyBuilder {
	builder.tasklistGuid = tasklistGuid
	builder.tasklistGuidFlag = true
	return builder
}

// 要添加到清单的自定义分组全局唯一ID，如不填写表示添加到默认分组
//
// 示例值：d300a75f-c56a-4be9-80d1-e47653028ceb
func (builder *AddTasklistTaskPathReqBodyBuilder) SectionGuid(sectionGuid string) *AddTasklistTaskPathReqBodyBuilder {
	builder.sectionGuid = sectionGuid
	builder.sectionGuidFlag = true
	return builder
}

func (builder *AddTasklistTaskPathReqBodyBuilder) Build() (*AddTasklistTaskReqBody, error) {
	req := &AddTasklistTaskReqBody{}
	if builder.tasklistGuidFlag {
		req.TasklistGuid = &builder.tasklistGuid
	}
	if builder.sectionGuidFlag {
		req.SectionGuid = &builder.sectionGuid
	}
	return req, nil
}

type AddTasklistTaskReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *AddTasklistTaskReqBody
}

func NewAddTasklistTaskReqBuilder() *AddTasklistTaskReqBuilder {
	builder := &AddTasklistTaskReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 要添加到清单的任务的全局唯一ID
//
// 示例值：d300a75f-c56a-4be9-80d1-e47653028ceb
func (builder *AddTasklistTaskReqBuilder) TaskGuid(taskGuid string) *AddTasklistTaskReqBuilder {
	builder.apiReq.PathParams.Set("task_guid", fmt.Sprint(taskGuid))
	return builder
}

// 表示user的ID的类型，支持open_id, user_id, union_id
//
// 示例值：open_id
func (builder *AddTasklistTaskReqBuilder) UserIdType(userIdType string) *AddTasklistTaskReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

//
func (builder *AddTasklistTaskReqBuilder) Body(body *AddTasklistTaskReqBody) *AddTasklistTaskReqBuilder {
	builder.body = body
	return builder
}

func (builder *AddTasklistTaskReqBuilder) Build() *AddTasklistTaskReq {
	req := &AddTasklistTaskReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.body
	return req
}

type AddTasklistTaskReqBody struct {
	TasklistGuid *string `json:"tasklist_guid,omitempty"` // 要添加到的清单的全局唯一ID

	SectionGuid *string `json:"section_guid,omitempty"` // 要添加到清单的自定义分组全局唯一ID，如不填写表示添加到默认分组
}

type AddTasklistTaskReq struct {
	apiReq *larkcore.ApiReq
	Body   *AddTasklistTaskReqBody `body:""`
}

type AddTasklistTaskRespData struct {
	Task *Task `json:"task,omitempty"` // 添加后的任务详情
}

type AddTasklistTaskResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *AddTasklistTaskRespData `json:"data"` // 业务数据
}

func (resp *AddTasklistTaskResp) Success() bool {
	return resp.Code == 0
}

type CreateTaskReqBuilder struct {
	apiReq    *larkcore.ApiReq
	inputTask *InputTask
}

func NewCreateTaskReqBuilder() *CreateTaskReqBuilder {
	builder := &CreateTaskReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 表示user的ID的类型，支持open_id, user_id, union_id
//
// 示例值：open_id
func (builder *CreateTaskReqBuilder) UserIdType(userIdType string) *CreateTaskReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

//
func (builder *CreateTaskReqBuilder) InputTask(inputTask *InputTask) *CreateTaskReqBuilder {
	builder.inputTask = inputTask
	return builder
}

func (builder *CreateTaskReqBuilder) Build() *CreateTaskReq {
	req := &CreateTaskReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.inputTask
	return req
}

type CreateTaskReq struct {
	apiReq    *larkcore.ApiReq
	InputTask *InputTask `body:""`
}

type CreateTaskRespData struct {
	Task *Task `json:"task,omitempty"` // 产生的任务
}

type CreateTaskResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *CreateTaskRespData `json:"data"` // 业务数据
}

func (resp *CreateTaskResp) Success() bool {
	return resp.Code == 0
}

type DeleteTaskReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewDeleteTaskReqBuilder() *DeleteTaskReqBuilder {
	builder := &DeleteTaskReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 要删除的任务guid
//
// 示例值：e297ddff-06ca-4166-b917-4ce57cd3a7a0
func (builder *DeleteTaskReqBuilder) TaskGuid(taskGuid string) *DeleteTaskReqBuilder {
	builder.apiReq.PathParams.Set("task_guid", fmt.Sprint(taskGuid))
	return builder
}

func (builder *DeleteTaskReqBuilder) Build() *DeleteTaskReq {
	req := &DeleteTaskReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	return req
}

type DeleteTaskReq struct {
	apiReq *larkcore.ApiReq
}

type DeleteTaskResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *DeleteTaskResp) Success() bool {
	return resp.Code == 0
}

type GetTaskReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewGetTaskReqBuilder() *GetTaskReqBuilder {
	builder := &GetTaskReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 要获取的任务guid
//
// 示例值：e297ddff-06ca-4166-b917-4ce57cd3a7a0
func (builder *GetTaskReqBuilder) TaskGuid(taskGuid string) *GetTaskReqBuilder {
	builder.apiReq.PathParams.Set("task_guid", fmt.Sprint(taskGuid))
	return builder
}

// 表示user的ID的类型，支持open_id, user_id, union_id
//
// 示例值：open_id
func (builder *GetTaskReqBuilder) UserIdType(userIdType string) *GetTaskReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

func (builder *GetTaskReqBuilder) Build() *GetTaskReq {
	req := &GetTaskReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type GetTaskReq struct {
	apiReq *larkcore.ApiReq
}

type GetTaskRespData struct {
	Task *Task `json:"task,omitempty"` // 获得的任务实体
}

type GetTaskResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *GetTaskRespData `json:"data"` // 业务数据
}

func (resp *GetTaskResp) Success() bool {
	return resp.Code == 0
}

type ListTaskReqBuilder struct {
	apiReq *larkcore.ApiReq
	limit  int // 最大返回多少记录，当使用迭代器访问时才有效
}

func NewListTaskReqBuilder() *ListTaskReqBuilder {
	builder := &ListTaskReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 最大返回多少记录，当使用迭代器访问时才有效
func (builder *ListTaskReqBuilder) Limit(limit int) *ListTaskReqBuilder {
	builder.limit = limit
	return builder
}

// 每页的任务数量
//
// 示例值：50
func (builder *ListTaskReqBuilder) PageSize(pageSize int) *ListTaskReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 分页标记。第一次请求不填该参数，表示从头开始查询；查询结果若还有更多数据时会同时返回新的 page_token。使用page_token重新调用本接口可以获取下一页数据。
//
// 示例值：aWQ9NzEwMjMzMjMxMDE=
func (builder *ListTaskReqBuilder) PageToken(pageToken string) *ListTaskReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

// 是否按任务完成进行过滤。不填写表示不过滤。
//
// 示例值：true
func (builder *ListTaskReqBuilder) Completed(completed bool) *ListTaskReqBuilder {
	builder.apiReq.QueryParams.Set("completed", fmt.Sprint(completed))
	return builder
}

// 查询任务的范围
//
// 示例值：my_tasks
func (builder *ListTaskReqBuilder) Type(type_ string) *ListTaskReqBuilder {
	builder.apiReq.QueryParams.Set("type", fmt.Sprint(type_))
	return builder
}

// 表示user的ID的类型，支持open_id, user_id, union_id
//
// 示例值：open_id
func (builder *ListTaskReqBuilder) UserIdType(userIdType string) *ListTaskReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

func (builder *ListTaskReqBuilder) Build() *ListTaskReq {
	req := &ListTaskReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.Limit = builder.limit
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type ListTaskReq struct {
	apiReq *larkcore.ApiReq
	Limit  int // 最多返回多少记录，只有在使用迭代器访问时，才有效

}

type ListTaskRespData struct {
	Items []*Task `json:"items,omitempty"` // 返回的任务列表

	PageToken *string `json:"page_token,omitempty"` // 获取下一次分页的分页标记

	HasMore *bool `json:"has_more,omitempty"` // 是否有更多数据
}

type ListTaskResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ListTaskRespData `json:"data"` // 业务数据
}

func (resp *ListTaskResp) Success() bool {
	return resp.Code == 0
}

type PatchTaskReqBodyBuilder struct {
	task     *InputTask // 要更新的任务数据，只需要写明要更新的字段
	taskFlag bool

	updateFields     []string // 要更新的字段名称。支持summary, description, due, start, completed_at, extra, repeat_rule, custom_complete, mode, is_milestone, custom_fields。
	updateFieldsFlag bool
}

func NewPatchTaskReqBodyBuilder() *PatchTaskReqBodyBuilder {
	builder := &PatchTaskReqBodyBuilder{}
	return builder
}

// 要更新的任务数据，只需要写明要更新的字段
//
//示例值：
func (builder *PatchTaskReqBodyBuilder) Task(task *InputTask) *PatchTaskReqBodyBuilder {
	builder.task = task
	builder.taskFlag = true
	return builder
}

// 要更新的字段名称。支持summary, description, due, start, completed_at, extra, repeat_rule, custom_complete, mode, is_milestone, custom_fields。
//
//示例值：
func (builder *PatchTaskReqBodyBuilder) UpdateFields(updateFields []string) *PatchTaskReqBodyBuilder {
	builder.updateFields = updateFields
	builder.updateFieldsFlag = true
	return builder
}

func (builder *PatchTaskReqBodyBuilder) Build() *PatchTaskReqBody {
	req := &PatchTaskReqBody{}
	if builder.taskFlag {
		req.Task = builder.task
	}
	if builder.updateFieldsFlag {
		req.UpdateFields = builder.updateFields
	}
	return req
}

type PatchTaskPathReqBodyBuilder struct {
	task             *InputTask
	taskFlag         bool
	updateFields     []string
	updateFieldsFlag bool
}

func NewPatchTaskPathReqBodyBuilder() *PatchTaskPathReqBodyBuilder {
	builder := &PatchTaskPathReqBodyBuilder{}
	return builder
}

// 要更新的任务数据，只需要写明要更新的字段
//
// 示例值：
func (builder *PatchTaskPathReqBodyBuilder) Task(task *InputTask) *PatchTaskPathReqBodyBuilder {
	builder.task = task
	builder.taskFlag = true
	return builder
}

// 要更新的字段名称。支持summary, description, due, start, completed_at, extra, repeat_rule, custom_complete, mode, is_milestone, custom_fields。
//
// 示例值：
func (builder *PatchTaskPathReqBodyBuilder) UpdateFields(updateFields []string) *PatchTaskPathReqBodyBuilder {
	builder.updateFields = updateFields
	builder.updateFieldsFlag = true
	return builder
}

func (builder *PatchTaskPathReqBodyBuilder) Build() (*PatchTaskReqBody, error) {
	req := &PatchTaskReqBody{}
	if builder.taskFlag {
		req.Task = builder.task
	}
	if builder.updateFieldsFlag {
		req.UpdateFields = builder.updateFields
	}
	return req, nil
}

type PatchTaskReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *PatchTaskReqBody
}

func NewPatchTaskReqBuilder() *PatchTaskReqBuilder {
	builder := &PatchTaskReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 要更新的任务全局唯一ID
//
// 示例值：e297ddff-06ca-4166-b917-4ce57cd3a7a0
func (builder *PatchTaskReqBuilder) TaskGuid(taskGuid string) *PatchTaskReqBuilder {
	builder.apiReq.PathParams.Set("task_guid", fmt.Sprint(taskGuid))
	return builder
}

// 表示user的ID的类型，支持open_id, user_id, union_id
//
// 示例值：open_id
func (builder *PatchTaskReqBuilder) UserIdType(userIdType string) *PatchTaskReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

//
func (builder *PatchTaskReqBuilder) Body(body *PatchTaskReqBody) *PatchTaskReqBuilder {
	builder.body = body
	return builder
}

func (builder *PatchTaskReqBuilder) Build() *PatchTaskReq {
	req := &PatchTaskReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.body
	return req
}

type PatchTaskReqBody struct {
	Task *InputTask `json:"task,omitempty"` // 要更新的任务数据，只需要写明要更新的字段

	UpdateFields []string `json:"update_fields,omitempty"` // 要更新的字段名称。支持summary, description, due, start, completed_at, extra, repeat_rule, custom_complete, mode, is_milestone, custom_fields。
}

type PatchTaskReq struct {
	apiReq *larkcore.ApiReq
	Body   *PatchTaskReqBody `body:""`
}

type PatchTaskRespData struct {
	Task *Task `json:"task,omitempty"` // 更新后的任务
}

type PatchTaskResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *PatchTaskRespData `json:"data"` // 业务数据
}

func (resp *PatchTaskResp) Success() bool {
	return resp.Code == 0
}

type RemoveDependenciesTaskReqBodyBuilder struct {
	dependencies     []*TaskDependency // 要移除的依赖
	dependenciesFlag bool
}

func NewRemoveDependenciesTaskReqBodyBuilder() *RemoveDependenciesTaskReqBodyBuilder {
	builder := &RemoveDependenciesTaskReqBodyBuilder{}
	return builder
}

// 要移除的依赖
//
//示例值：
func (builder *RemoveDependenciesTaskReqBodyBuilder) Dependencies(dependencies []*TaskDependency) *RemoveDependenciesTaskReqBodyBuilder {
	builder.dependencies = dependencies
	builder.dependenciesFlag = true
	return builder
}

func (builder *RemoveDependenciesTaskReqBodyBuilder) Build() *RemoveDependenciesTaskReqBody {
	req := &RemoveDependenciesTaskReqBody{}
	if builder.dependenciesFlag {
		req.Dependencies = builder.dependencies
	}
	return req
}

type RemoveDependenciesTaskPathReqBodyBuilder struct {
	dependencies     []*TaskDependency
	dependenciesFlag bool
}

func NewRemoveDependenciesTaskPathReqBodyBuilder() *RemoveDependenciesTaskPathReqBodyBuilder {
	builder := &RemoveDependenciesTaskPathReqBodyBuilder{}
	return builder
}

// 要移除的依赖
//
// 示例值：
func (builder *RemoveDependenciesTaskPathReqBodyBuilder) Dependencies(dependencies []*TaskDependency) *RemoveDependenciesTaskPathReqBodyBuilder {
	builder.dependencies = dependencies
	builder.dependenciesFlag = true
	return builder
}

func (builder *RemoveDependenciesTaskPathReqBodyBuilder) Build() (*RemoveDependenciesTaskReqBody, error) {
	req := &RemoveDependenciesTaskReqBody{}
	if builder.dependenciesFlag {
		req.Dependencies = builder.dependencies
	}
	return req, nil
}

type RemoveDependenciesTaskReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *RemoveDependenciesTaskReqBody
}

func NewRemoveDependenciesTaskReqBuilder() *RemoveDependenciesTaskReqBuilder {
	builder := &RemoveDependenciesTaskReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 要移除依赖的任务GUID
//
// 示例值：93b7bd05-35e6-4371-b3c9-6b7cbd7100c0
func (builder *RemoveDependenciesTaskReqBuilder) TaskGuid(taskGuid string) *RemoveDependenciesTaskReqBuilder {
	builder.apiReq.PathParams.Set("task_guid", fmt.Sprint(taskGuid))
	return builder
}

//
func (builder *RemoveDependenciesTaskReqBuilder) Body(body *RemoveDependenciesTaskReqBody) *RemoveDependenciesTaskReqBuilder {
	builder.body = body
	return builder
}

func (builder *RemoveDependenciesTaskReqBuilder) Build() *RemoveDependenciesTaskReq {
	req := &RemoveDependenciesTaskReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.body
	return req
}

type RemoveDependenciesTaskReqBody struct {
	Dependencies []*TaskDependency `json:"dependencies,omitempty"` // 要移除的依赖
}

type RemoveDependenciesTaskReq struct {
	apiReq *larkcore.ApiReq
	Body   *RemoveDependenciesTaskReqBody `body:""`
}

type RemoveDependenciesTaskRespData struct {
	Dependencies []*TaskDependency `json:"dependencies,omitempty"` // 移除之后的任务GUID
}

type RemoveDependenciesTaskResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *RemoveDependenciesTaskRespData `json:"data"` // 业务数据
}

func (resp *RemoveDependenciesTaskResp) Success() bool {
	return resp.Code == 0
}

type RemoveMembersTaskReqBodyBuilder struct {
	members     []*Member // 要移除的member列表
	membersFlag bool
}

func NewRemoveMembersTaskReqBodyBuilder() *RemoveMembersTaskReqBodyBuilder {
	builder := &RemoveMembersTaskReqBodyBuilder{}
	return builder
}

// 要移除的member列表
//
//示例值：
func (builder *RemoveMembersTaskReqBodyBuilder) Members(members []*Member) *RemoveMembersTaskReqBodyBuilder {
	builder.members = members
	builder.membersFlag = true
	return builder
}

func (builder *RemoveMembersTaskReqBodyBuilder) Build() *RemoveMembersTaskReqBody {
	req := &RemoveMembersTaskReqBody{}
	if builder.membersFlag {
		req.Members = builder.members
	}
	return req
}

type RemoveMembersTaskPathReqBodyBuilder struct {
	members     []*Member
	membersFlag bool
}

func NewRemoveMembersTaskPathReqBodyBuilder() *RemoveMembersTaskPathReqBodyBuilder {
	builder := &RemoveMembersTaskPathReqBodyBuilder{}
	return builder
}

// 要移除的member列表
//
// 示例值：
func (builder *RemoveMembersTaskPathReqBodyBuilder) Members(members []*Member) *RemoveMembersTaskPathReqBodyBuilder {
	builder.members = members
	builder.membersFlag = true
	return builder
}

func (builder *RemoveMembersTaskPathReqBodyBuilder) Build() (*RemoveMembersTaskReqBody, error) {
	req := &RemoveMembersTaskReqBody{}
	if builder.membersFlag {
		req.Members = builder.members
	}
	return req, nil
}

type RemoveMembersTaskReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *RemoveMembersTaskReqBody
}

func NewRemoveMembersTaskReqBuilder() *RemoveMembersTaskReqBuilder {
	builder := &RemoveMembersTaskReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 要添加负责人的任务全局唯一ID
//
// 示例值：d300a75f-c56a-4be9-80d1-e47653028ceb
func (builder *RemoveMembersTaskReqBuilder) TaskGuid(taskGuid string) *RemoveMembersTaskReqBuilder {
	builder.apiReq.PathParams.Set("task_guid", fmt.Sprint(taskGuid))
	return builder
}

// 表示user的ID的类型，支持open_id, user_id, union_id
//
// 示例值：open_id
func (builder *RemoveMembersTaskReqBuilder) UserIdType(userIdType string) *RemoveMembersTaskReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

//
func (builder *RemoveMembersTaskReqBuilder) Body(body *RemoveMembersTaskReqBody) *RemoveMembersTaskReqBuilder {
	builder.body = body
	return builder
}

func (builder *RemoveMembersTaskReqBuilder) Build() *RemoveMembersTaskReq {
	req := &RemoveMembersTaskReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.body
	return req
}

type RemoveMembersTaskReqBody struct {
	Members []*Member `json:"members,omitempty"` // 要移除的member列表
}

type RemoveMembersTaskReq struct {
	apiReq *larkcore.ApiReq
	Body   *RemoveMembersTaskReqBody `body:""`
}

type RemoveMembersTaskRespData struct {
	Task *Task `json:"task,omitempty"` // 移除成员后的任务数据
}

type RemoveMembersTaskResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *RemoveMembersTaskRespData `json:"data"` // 业务数据
}

func (resp *RemoveMembersTaskResp) Success() bool {
	return resp.Code == 0
}

type RemoveRemindersTaskReqBodyBuilder struct {
	reminderIds     []string // 要移除的reminder的id列表
	reminderIdsFlag bool
}

func NewRemoveRemindersTaskReqBodyBuilder() *RemoveRemindersTaskReqBodyBuilder {
	builder := &RemoveRemindersTaskReqBodyBuilder{}
	return builder
}

// 要移除的reminder的id列表
//
//示例值：
func (builder *RemoveRemindersTaskReqBodyBuilder) ReminderIds(reminderIds []string) *RemoveRemindersTaskReqBodyBuilder {
	builder.reminderIds = reminderIds
	builder.reminderIdsFlag = true
	return builder
}

func (builder *RemoveRemindersTaskReqBodyBuilder) Build() *RemoveRemindersTaskReqBody {
	req := &RemoveRemindersTaskReqBody{}
	if builder.reminderIdsFlag {
		req.ReminderIds = builder.reminderIds
	}
	return req
}

type RemoveRemindersTaskPathReqBodyBuilder struct {
	reminderIds     []string
	reminderIdsFlag bool
}

func NewRemoveRemindersTaskPathReqBodyBuilder() *RemoveRemindersTaskPathReqBodyBuilder {
	builder := &RemoveRemindersTaskPathReqBodyBuilder{}
	return builder
}

// 要移除的reminder的id列表
//
// 示例值：
func (builder *RemoveRemindersTaskPathReqBodyBuilder) ReminderIds(reminderIds []string) *RemoveRemindersTaskPathReqBodyBuilder {
	builder.reminderIds = reminderIds
	builder.reminderIdsFlag = true
	return builder
}

func (builder *RemoveRemindersTaskPathReqBodyBuilder) Build() (*RemoveRemindersTaskReqBody, error) {
	req := &RemoveRemindersTaskReqBody{}
	if builder.reminderIdsFlag {
		req.ReminderIds = builder.reminderIds
	}
	return req, nil
}

type RemoveRemindersTaskReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *RemoveRemindersTaskReqBody
}

func NewRemoveRemindersTaskReqBuilder() *RemoveRemindersTaskReqBuilder {
	builder := &RemoveRemindersTaskReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 要添加负责人的任务全局唯一ID
//
// 示例值：d300a75f-c56a-4be9-80d1-e47653028ceb
func (builder *RemoveRemindersTaskReqBuilder) TaskGuid(taskGuid string) *RemoveRemindersTaskReqBuilder {
	builder.apiReq.PathParams.Set("task_guid", fmt.Sprint(taskGuid))
	return builder
}

// 表示user的ID的类型，支持open_id, user_id, union_id
//
// 示例值：open_id
func (builder *RemoveRemindersTaskReqBuilder) UserIdType(userIdType string) *RemoveRemindersTaskReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

//
func (builder *RemoveRemindersTaskReqBuilder) Body(body *RemoveRemindersTaskReqBody) *RemoveRemindersTaskReqBuilder {
	builder.body = body
	return builder
}

func (builder *RemoveRemindersTaskReqBuilder) Build() *RemoveRemindersTaskReq {
	req := &RemoveRemindersTaskReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.body
	return req
}

type RemoveRemindersTaskReqBody struct {
	ReminderIds []string `json:"reminder_ids,omitempty"` // 要移除的reminder的id列表
}

type RemoveRemindersTaskReq struct {
	apiReq *larkcore.ApiReq
	Body   *RemoveRemindersTaskReqBody `body:""`
}

type RemoveRemindersTaskRespData struct {
	Task *Task `json:"task,omitempty"` // 移除提醒后的任务详情
}

type RemoveRemindersTaskResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *RemoveRemindersTaskRespData `json:"data"` // 业务数据
}

func (resp *RemoveRemindersTaskResp) Success() bool {
	return resp.Code == 0
}

type RemoveTasklistTaskReqBodyBuilder struct {
	tasklistGuid     string // 要移除的清单的全局唯一ID
	tasklistGuidFlag bool
}

func NewRemoveTasklistTaskReqBodyBuilder() *RemoveTasklistTaskReqBodyBuilder {
	builder := &RemoveTasklistTaskReqBodyBuilder{}
	return builder
}

// 要移除的清单的全局唯一ID
//
//示例值：d300a75f-c56a-4be9-80d1-e47653028ceb
func (builder *RemoveTasklistTaskReqBodyBuilder) TasklistGuid(tasklistGuid string) *RemoveTasklistTaskReqBodyBuilder {
	builder.tasklistGuid = tasklistGuid
	builder.tasklistGuidFlag = true
	return builder
}

func (builder *RemoveTasklistTaskReqBodyBuilder) Build() *RemoveTasklistTaskReqBody {
	req := &RemoveTasklistTaskReqBody{}
	if builder.tasklistGuidFlag {
		req.TasklistGuid = &builder.tasklistGuid
	}
	return req
}

type RemoveTasklistTaskPathReqBodyBuilder struct {
	tasklistGuid     string
	tasklistGuidFlag bool
}

func NewRemoveTasklistTaskPathReqBodyBuilder() *RemoveTasklistTaskPathReqBodyBuilder {
	builder := &RemoveTasklistTaskPathReqBodyBuilder{}
	return builder
}

// 要移除的清单的全局唯一ID
//
// 示例值：d300a75f-c56a-4be9-80d1-e47653028ceb
func (builder *RemoveTasklistTaskPathReqBodyBuilder) TasklistGuid(tasklistGuid string) *RemoveTasklistTaskPathReqBodyBuilder {
	builder.tasklistGuid = tasklistGuid
	builder.tasklistGuidFlag = true
	return builder
}

func (builder *RemoveTasklistTaskPathReqBodyBuilder) Build() (*RemoveTasklistTaskReqBody, error) {
	req := &RemoveTasklistTaskReqBody{}
	if builder.tasklistGuidFlag {
		req.TasklistGuid = &builder.tasklistGuid
	}
	return req, nil
}

type RemoveTasklistTaskReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *RemoveTasklistTaskReqBody
}

func NewRemoveTasklistTaskReqBuilder() *RemoveTasklistTaskReqBuilder {
	builder := &RemoveTasklistTaskReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 要从清单移除的任务的全局唯一ID
//
// 示例值：d300a75f-c56a-4be9-80d1-e47653028ceb
func (builder *RemoveTasklistTaskReqBuilder) TaskGuid(taskGuid string) *RemoveTasklistTaskReqBuilder {
	builder.apiReq.PathParams.Set("task_guid", fmt.Sprint(taskGuid))
	return builder
}

// 表示user的ID的类型，支持open_id, user_id, union_id
//
// 示例值：open_id
func (builder *RemoveTasklistTaskReqBuilder) UserIdType(userIdType string) *RemoveTasklistTaskReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

//
func (builder *RemoveTasklistTaskReqBuilder) Body(body *RemoveTasklistTaskReqBody) *RemoveTasklistTaskReqBuilder {
	builder.body = body
	return builder
}

func (builder *RemoveTasklistTaskReqBuilder) Build() *RemoveTasklistTaskReq {
	req := &RemoveTasklistTaskReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.body
	return req
}

type RemoveTasklistTaskReqBody struct {
	TasklistGuid *string `json:"tasklist_guid,omitempty"` // 要移除的清单的全局唯一ID
}

type RemoveTasklistTaskReq struct {
	apiReq *larkcore.ApiReq
	Body   *RemoveTasklistTaskReqBody `body:""`
}

type RemoveTasklistTaskRespData struct {
	Task *Task `json:"task,omitempty"` // 添加后的任务详情
}

type RemoveTasklistTaskResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *RemoveTasklistTaskRespData `json:"data"` // 业务数据
}

func (resp *RemoveTasklistTaskResp) Success() bool {
	return resp.Code == 0
}

type TasklistsTaskReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewTasklistsTaskReqBuilder() *TasklistsTaskReqBuilder {
	builder := &TasklistsTaskReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 要获取清单列表的任务的全局唯一ID
//
// 示例值：d300a75f-c56a-4be9-80d1-e47653028ceb
func (builder *TasklistsTaskReqBuilder) TaskGuid(taskGuid string) *TasklistsTaskReqBuilder {
	builder.apiReq.PathParams.Set("task_guid", fmt.Sprint(taskGuid))
	return builder
}

func (builder *TasklistsTaskReqBuilder) Build() *TasklistsTaskReq {
	req := &TasklistsTaskReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	return req
}

type TasklistsTaskReq struct {
	apiReq *larkcore.ApiReq
}

type TasklistsTaskRespData struct {
	Tasklists []*TaskInTasklistInfo `json:"tasklists,omitempty"` // 任务所在清单的摘要信息
}

type TasklistsTaskResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *TasklistsTaskRespData `json:"data"` // 业务数据
}

func (resp *TasklistsTaskResp) Success() bool {
	return resp.Code == 0
}

type CreateTaskSubtaskReqBuilder struct {
	apiReq    *larkcore.ApiReq
	inputTask *InputTask
}

func NewCreateTaskSubtaskReqBuilder() *CreateTaskSubtaskReqBuilder {
	builder := &CreateTaskSubtaskReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 父任务GUID
//
// 示例值：e297ddff-06ca-4166-b917-4ce57cd3a7a0
func (builder *CreateTaskSubtaskReqBuilder) TaskGuid(taskGuid string) *CreateTaskSubtaskReqBuilder {
	builder.apiReq.PathParams.Set("task_guid", fmt.Sprint(taskGuid))
	return builder
}

// 表示user的ID的类型，支持open_id, user_id, union_id
//
// 示例值：open_id
func (builder *CreateTaskSubtaskReqBuilder) UserIdType(userIdType string) *CreateTaskSubtaskReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

//
func (builder *CreateTaskSubtaskReqBuilder) InputTask(inputTask *InputTask) *CreateTaskSubtaskReqBuilder {
	builder.inputTask = inputTask
	return builder
}

func (builder *CreateTaskSubtaskReqBuilder) Build() *CreateTaskSubtaskReq {
	req := &CreateTaskSubtaskReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.inputTask
	return req
}

type CreateTaskSubtaskReq struct {
	apiReq    *larkcore.ApiReq
	InputTask *InputTask `body:""`
}

type CreateTaskSubtaskRespData struct {
	Subtask *Task `json:"subtask,omitempty"` // 创建的任务
}

type CreateTaskSubtaskResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *CreateTaskSubtaskRespData `json:"data"` // 业务数据
}

func (resp *CreateTaskSubtaskResp) Success() bool {
	return resp.Code == 0
}

type ListTaskSubtaskReqBuilder struct {
	apiReq *larkcore.ApiReq
	limit  int // 最大返回多少记录，当使用迭代器访问时才有效
}

func NewListTaskSubtaskReqBuilder() *ListTaskSubtaskReqBuilder {
	builder := &ListTaskSubtaskReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 最大返回多少记录，当使用迭代器访问时才有效
func (builder *ListTaskSubtaskReqBuilder) Limit(limit int) *ListTaskSubtaskReqBuilder {
	builder.limit = limit
	return builder
}

// 父任务的全局唯一ID
//
// 示例值：d300a75f-c56a-4be9-80d1-e47653028ceb
func (builder *ListTaskSubtaskReqBuilder) TaskGuid(taskGuid string) *ListTaskSubtaskReqBuilder {
	builder.apiReq.PathParams.Set("task_guid", fmt.Sprint(taskGuid))
	return builder
}

// 分页大小
//
// 示例值：50
func (builder *ListTaskSubtaskReqBuilder) PageSize(pageSize int) *ListTaskSubtaskReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 分页标记，第一次请求不填，表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该 page_token 获取查询结果
//
// 示例值：aWQ9NzEwMjMzMjMxMDE=
func (builder *ListTaskSubtaskReqBuilder) PageToken(pageToken string) *ListTaskSubtaskReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

// 表示user的ID的类型，支持open_id, user_id, union_id
//
// 示例值：open_id
func (builder *ListTaskSubtaskReqBuilder) UserIdType(userIdType string) *ListTaskSubtaskReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

func (builder *ListTaskSubtaskReqBuilder) Build() *ListTaskSubtaskReq {
	req := &ListTaskSubtaskReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.Limit = builder.limit
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type ListTaskSubtaskReq struct {
	apiReq *larkcore.ApiReq
	Limit  int // 最多返回多少记录，只有在使用迭代器访问时，才有效

}

type ListTaskSubtaskRespData struct {
	Items []*Task `json:"items,omitempty"` // 子任务列表

	PageToken *string `json:"page_token,omitempty"` // 用于返回下一个分页的token

	HasMore *bool `json:"has_more,omitempty"` // 是否还有下一页数据。
}

type ListTaskSubtaskResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ListTaskSubtaskRespData `json:"data"` // 业务数据
}

func (resp *ListTaskSubtaskResp) Success() bool {
	return resp.Code == 0
}

type AddMembersTasklistReqBodyBuilder struct {
	members     []*Member // 要添加的成员列表
	membersFlag bool
}

func NewAddMembersTasklistReqBodyBuilder() *AddMembersTasklistReqBodyBuilder {
	builder := &AddMembersTasklistReqBodyBuilder{}
	return builder
}

// 要添加的成员列表
//
//示例值：
func (builder *AddMembersTasklistReqBodyBuilder) Members(members []*Member) *AddMembersTasklistReqBodyBuilder {
	builder.members = members
	builder.membersFlag = true
	return builder
}

func (builder *AddMembersTasklistReqBodyBuilder) Build() *AddMembersTasklistReqBody {
	req := &AddMembersTasklistReqBody{}
	if builder.membersFlag {
		req.Members = builder.members
	}
	return req
}

type AddMembersTasklistPathReqBodyBuilder struct {
	members     []*Member
	membersFlag bool
}

func NewAddMembersTasklistPathReqBodyBuilder() *AddMembersTasklistPathReqBodyBuilder {
	builder := &AddMembersTasklistPathReqBodyBuilder{}
	return builder
}

// 要添加的成员列表
//
// 示例值：
func (builder *AddMembersTasklistPathReqBodyBuilder) Members(members []*Member) *AddMembersTasklistPathReqBodyBuilder {
	builder.members = members
	builder.membersFlag = true
	return builder
}

func (builder *AddMembersTasklistPathReqBodyBuilder) Build() (*AddMembersTasklistReqBody, error) {
	req := &AddMembersTasklistReqBody{}
	if builder.membersFlag {
		req.Members = builder.members
	}
	return req, nil
}

type AddMembersTasklistReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *AddMembersTasklistReqBody
}

func NewAddMembersTasklistReqBuilder() *AddMembersTasklistReqBuilder {
	builder := &AddMembersTasklistReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 要添加协作人的清单的全局唯一ID
//
// 示例值：d300a75f-c56a-4be9-80d1-e47653028ceb
func (builder *AddMembersTasklistReqBuilder) TasklistGuid(tasklistGuid string) *AddMembersTasklistReqBuilder {
	builder.apiReq.PathParams.Set("tasklist_guid", fmt.Sprint(tasklistGuid))
	return builder
}

// 表示user的ID的类型，支持open_id, user_id, union_id
//
// 示例值：open_id
func (builder *AddMembersTasklistReqBuilder) UserIdType(userIdType string) *AddMembersTasklistReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

//
func (builder *AddMembersTasklistReqBuilder) Body(body *AddMembersTasklistReqBody) *AddMembersTasklistReqBuilder {
	builder.body = body
	return builder
}

func (builder *AddMembersTasklistReqBuilder) Build() *AddMembersTasklistReq {
	req := &AddMembersTasklistReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.body
	return req
}

type AddMembersTasklistReqBody struct {
	Members []*Member `json:"members,omitempty"` // 要添加的成员列表
}

type AddMembersTasklistReq struct {
	apiReq *larkcore.ApiReq
	Body   *AddMembersTasklistReqBody `body:""`
}

type AddMembersTasklistRespData struct {
	Tasklist *Tasklist `json:"tasklist,omitempty"` // 完成更新后的清单实体
}

type AddMembersTasklistResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *AddMembersTasklistRespData `json:"data"` // 业务数据
}

func (resp *AddMembersTasklistResp) Success() bool {
	return resp.Code == 0
}

type CreateTasklistReqBuilder struct {
	apiReq        *larkcore.ApiReq
	inputTasklist *InputTasklist
}

func NewCreateTasklistReqBuilder() *CreateTasklistReqBuilder {
	builder := &CreateTasklistReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 表示user的ID的类型，支持open_id, user_id, union_id
//
// 示例值：open_id
func (builder *CreateTasklistReqBuilder) UserIdType(userIdType string) *CreateTasklistReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

//
func (builder *CreateTasklistReqBuilder) InputTasklist(inputTasklist *InputTasklist) *CreateTasklistReqBuilder {
	builder.inputTasklist = inputTasklist
	return builder
}

func (builder *CreateTasklistReqBuilder) Build() *CreateTasklistReq {
	req := &CreateTasklistReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.inputTasklist
	return req
}

type CreateTasklistReq struct {
	apiReq        *larkcore.ApiReq
	InputTasklist *InputTasklist `body:""`
}

type CreateTasklistRespData struct {
	Tasklist *Tasklist `json:"tasklist,omitempty"` // 创建的清单数据
}

type CreateTasklistResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *CreateTasklistRespData `json:"data"` // 业务数据
}

func (resp *CreateTasklistResp) Success() bool {
	return resp.Code == 0
}

type DeleteTasklistReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewDeleteTasklistReqBuilder() *DeleteTasklistReqBuilder {
	builder := &DeleteTasklistReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 要删除的任务GUID
//
// 示例值：d300a75f-c56a-4be9-80d1-e47653028ceb
func (builder *DeleteTasklistReqBuilder) TasklistGuid(tasklistGuid string) *DeleteTasklistReqBuilder {
	builder.apiReq.PathParams.Set("tasklist_guid", fmt.Sprint(tasklistGuid))
	return builder
}

func (builder *DeleteTasklistReqBuilder) Build() *DeleteTasklistReq {
	req := &DeleteTasklistReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	return req
}

type DeleteTasklistReq struct {
	apiReq *larkcore.ApiReq
}

type DeleteTasklistResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *DeleteTasklistResp) Success() bool {
	return resp.Code == 0
}

type GetTasklistReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewGetTasklistReqBuilder() *GetTasklistReqBuilder {
	builder := &GetTasklistReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 清单全局唯一GUID
//
// 示例值：d300a75f-c56a-4be9-80d1-e47653028ceb
func (builder *GetTasklistReqBuilder) TasklistGuid(tasklistGuid string) *GetTasklistReqBuilder {
	builder.apiReq.PathParams.Set("tasklist_guid", fmt.Sprint(tasklistGuid))
	return builder
}

// 表示user的ID的类型，支持open_id, user_id, union_id
//
// 示例值：open_id
func (builder *GetTasklistReqBuilder) UserIdType(userIdType string) *GetTasklistReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

func (builder *GetTasklistReqBuilder) Build() *GetTasklistReq {
	req := &GetTasklistReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type GetTasklistReq struct {
	apiReq *larkcore.ApiReq
}

type GetTasklistRespData struct {
	Tasklist *Tasklist `json:"tasklist,omitempty"` // 清单详情
}

type GetTasklistResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *GetTasklistRespData `json:"data"` // 业务数据
}

func (resp *GetTasklistResp) Success() bool {
	return resp.Code == 0
}

type ListTasklistReqBuilder struct {
	apiReq *larkcore.ApiReq
	limit  int // 最大返回多少记录，当使用迭代器访问时才有效
}

func NewListTasklistReqBuilder() *ListTasklistReqBuilder {
	builder := &ListTasklistReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 最大返回多少记录，当使用迭代器访问时才有效
func (builder *ListTasklistReqBuilder) Limit(limit int) *ListTasklistReqBuilder {
	builder.limit = limit
	return builder
}

// 每页返回的清单数量
//
// 示例值：50
func (builder *ListTasklistReqBuilder) PageSize(pageSize int) *ListTasklistReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 分页标记。第一次请求不填该参数，表示从头开始查询；查询结果若还有更多数据时会同时返回新的 page_token。使用page_token重新调用本接口可以获取下一页数据。
//
// 示例值：aWQ9NzEwMjMzMjMxMDE=
func (builder *ListTasklistReqBuilder) PageToken(pageToken string) *ListTasklistReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

// 表示user的ID的类型，支持open_id, user_id, union_id
//
// 示例值：open_id
func (builder *ListTasklistReqBuilder) UserIdType(userIdType string) *ListTasklistReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

func (builder *ListTasklistReqBuilder) Build() *ListTasklistReq {
	req := &ListTasklistReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.Limit = builder.limit
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type ListTasklistReq struct {
	apiReq *larkcore.ApiReq
	Limit  int // 最多返回多少记录，只有在使用迭代器访问时，才有效

}

type ListTasklistRespData struct {
	Items []*Tasklist `json:"items,omitempty"` // 清单数据列表

	PageToken *string `json:"page_token,omitempty"` // 用于获取下一页的分页标记

	HasMore *bool `json:"has_more,omitempty"` // 是否有更多数据
}

type ListTasklistResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ListTasklistRespData `json:"data"` // 业务数据
}

func (resp *ListTasklistResp) Success() bool {
	return resp.Code == 0
}

type PatchTasklistReqBodyBuilder struct {
	tasklist     *InputTasklist // 要更新清单的数据
	tasklistFlag bool

	updateFields     []string // 要更新的字段名，只支持更新"owner", "name"两个字段
	updateFieldsFlag bool

	originOwnerToRole     string // 该字段表示如果更新了新的负责人，则将原负责人设为指定的协作人角色。仅在update_fields包含owner字段时生效。根据清单的角色设计方式，不允许提前为清单的负责人添加其他角色，但负责人更新后，原有负责人会无法访问该清单。该字段可以帮助避免原负责人彻底退出清单。
	originOwnerToRoleFlag bool
}

func NewPatchTasklistReqBodyBuilder() *PatchTasklistReqBodyBuilder {
	builder := &PatchTasklistReqBodyBuilder{}
	return builder
}

// 要更新清单的数据
//
//示例值：
func (builder *PatchTasklistReqBodyBuilder) Tasklist(tasklist *InputTasklist) *PatchTasklistReqBodyBuilder {
	builder.tasklist = tasklist
	builder.tasklistFlag = true
	return builder
}

// 要更新的字段名，只支持更新"owner", "name"两个字段
//
//示例值：
func (builder *PatchTasklistReqBodyBuilder) UpdateFields(updateFields []string) *PatchTasklistReqBodyBuilder {
	builder.updateFields = updateFields
	builder.updateFieldsFlag = true
	return builder
}

// 该字段表示如果更新了新的负责人，则将原负责人设为指定的协作人角色。仅在update_fields包含owner字段时生效。根据清单的角色设计方式，不允许提前为清单的负责人添加其他角色，但负责人更新后，原有负责人会无法访问该清单。该字段可以帮助避免原负责人彻底退出清单。
//
//示例值：editor
func (builder *PatchTasklistReqBodyBuilder) OriginOwnerToRole(originOwnerToRole string) *PatchTasklistReqBodyBuilder {
	builder.originOwnerToRole = originOwnerToRole
	builder.originOwnerToRoleFlag = true
	return builder
}

func (builder *PatchTasklistReqBodyBuilder) Build() *PatchTasklistReqBody {
	req := &PatchTasklistReqBody{}
	if builder.tasklistFlag {
		req.Tasklist = builder.tasklist
	}
	if builder.updateFieldsFlag {
		req.UpdateFields = builder.updateFields
	}
	if builder.originOwnerToRoleFlag {
		req.OriginOwnerToRole = &builder.originOwnerToRole
	}
	return req
}

type PatchTasklistPathReqBodyBuilder struct {
	tasklist              *InputTasklist
	tasklistFlag          bool
	updateFields          []string
	updateFieldsFlag      bool
	originOwnerToRole     string
	originOwnerToRoleFlag bool
}

func NewPatchTasklistPathReqBodyBuilder() *PatchTasklistPathReqBodyBuilder {
	builder := &PatchTasklistPathReqBodyBuilder{}
	return builder
}

// 要更新清单的数据
//
// 示例值：
func (builder *PatchTasklistPathReqBodyBuilder) Tasklist(tasklist *InputTasklist) *PatchTasklistPathReqBodyBuilder {
	builder.tasklist = tasklist
	builder.tasklistFlag = true
	return builder
}

// 要更新的字段名，只支持更新"owner", "name"两个字段
//
// 示例值：
func (builder *PatchTasklistPathReqBodyBuilder) UpdateFields(updateFields []string) *PatchTasklistPathReqBodyBuilder {
	builder.updateFields = updateFields
	builder.updateFieldsFlag = true
	return builder
}

// 该字段表示如果更新了新的负责人，则将原负责人设为指定的协作人角色。仅在update_fields包含owner字段时生效。根据清单的角色设计方式，不允许提前为清单的负责人添加其他角色，但负责人更新后，原有负责人会无法访问该清单。该字段可以帮助避免原负责人彻底退出清单。
//
// 示例值：editor
func (builder *PatchTasklistPathReqBodyBuilder) OriginOwnerToRole(originOwnerToRole string) *PatchTasklistPathReqBodyBuilder {
	builder.originOwnerToRole = originOwnerToRole
	builder.originOwnerToRoleFlag = true
	return builder
}

func (builder *PatchTasklistPathReqBodyBuilder) Build() (*PatchTasklistReqBody, error) {
	req := &PatchTasklistReqBody{}
	if builder.tasklistFlag {
		req.Tasklist = builder.tasklist
	}
	if builder.updateFieldsFlag {
		req.UpdateFields = builder.updateFields
	}
	if builder.originOwnerToRoleFlag {
		req.OriginOwnerToRole = &builder.originOwnerToRole
	}
	return req, nil
}

type PatchTasklistReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *PatchTasklistReqBody
}

func NewPatchTasklistReqBuilder() *PatchTasklistReqBuilder {
	builder := &PatchTasklistReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 要更新的清单的全局唯一GUID
//
// 示例值：d300a75f-c56a-4be9-80d1-e47653028ceb
func (builder *PatchTasklistReqBuilder) TasklistGuid(tasklistGuid string) *PatchTasklistReqBuilder {
	builder.apiReq.PathParams.Set("tasklist_guid", fmt.Sprint(tasklistGuid))
	return builder
}

// 表示user的ID的类型，支持open_id, user_id, union_id
//
// 示例值：open_id
func (builder *PatchTasklistReqBuilder) UserIdType(userIdType string) *PatchTasklistReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

//
func (builder *PatchTasklistReqBuilder) Body(body *PatchTasklistReqBody) *PatchTasklistReqBuilder {
	builder.body = body
	return builder
}

func (builder *PatchTasklistReqBuilder) Build() *PatchTasklistReq {
	req := &PatchTasklistReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.body
	return req
}

type PatchTasklistReqBody struct {
	Tasklist *InputTasklist `json:"tasklist,omitempty"` // 要更新清单的数据

	UpdateFields []string `json:"update_fields,omitempty"` // 要更新的字段名，只支持更新"owner", "name"两个字段

	OriginOwnerToRole *string `json:"origin_owner_to_role,omitempty"` // 该字段表示如果更新了新的负责人，则将原负责人设为指定的协作人角色。仅在update_fields包含owner字段时生效。根据清单的角色设计方式，不允许提前为清单的负责人添加其他角色，但负责人更新后，原有负责人会无法访问该清单。该字段可以帮助避免原负责人彻底退出清单。
}

type PatchTasklistReq struct {
	apiReq *larkcore.ApiReq
	Body   *PatchTasklistReqBody `body:""`
}

type PatchTasklistRespData struct {
	Tasklist *Tasklist `json:"tasklist,omitempty"` // 修改后的任务清单
}

type PatchTasklistResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *PatchTasklistRespData `json:"data"` // 业务数据
}

func (resp *PatchTasklistResp) Success() bool {
	return resp.Code == 0
}

type RemoveMembersTasklistReqBodyBuilder struct {
	members     []*Member // 要移除的member列表
	membersFlag bool
}

func NewRemoveMembersTasklistReqBodyBuilder() *RemoveMembersTasklistReqBodyBuilder {
	builder := &RemoveMembersTasklistReqBodyBuilder{}
	return builder
}

// 要移除的member列表
//
//示例值：
func (builder *RemoveMembersTasklistReqBodyBuilder) Members(members []*Member) *RemoveMembersTasklistReqBodyBuilder {
	builder.members = members
	builder.membersFlag = true
	return builder
}

func (builder *RemoveMembersTasklistReqBodyBuilder) Build() *RemoveMembersTasklistReqBody {
	req := &RemoveMembersTasklistReqBody{}
	if builder.membersFlag {
		req.Members = builder.members
	}
	return req
}

type RemoveMembersTasklistPathReqBodyBuilder struct {
	members     []*Member
	membersFlag bool
}

func NewRemoveMembersTasklistPathReqBodyBuilder() *RemoveMembersTasklistPathReqBodyBuilder {
	builder := &RemoveMembersTasklistPathReqBodyBuilder{}
	return builder
}

// 要移除的member列表
//
// 示例值：
func (builder *RemoveMembersTasklistPathReqBodyBuilder) Members(members []*Member) *RemoveMembersTasklistPathReqBodyBuilder {
	builder.members = members
	builder.membersFlag = true
	return builder
}

func (builder *RemoveMembersTasklistPathReqBodyBuilder) Build() (*RemoveMembersTasklistReqBody, error) {
	req := &RemoveMembersTasklistReqBody{}
	if builder.membersFlag {
		req.Members = builder.members
	}
	return req, nil
}

type RemoveMembersTasklistReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *RemoveMembersTasklistReqBody
}

func NewRemoveMembersTasklistReqBuilder() *RemoveMembersTasklistReqBuilder {
	builder := &RemoveMembersTasklistReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 要移除协作人的清单全局唯一ID
//
// 示例值：d300a75f-c56a-4be9-80d1-e47653028ceb
func (builder *RemoveMembersTasklistReqBuilder) TasklistGuid(tasklistGuid string) *RemoveMembersTasklistReqBuilder {
	builder.apiReq.PathParams.Set("tasklist_guid", fmt.Sprint(tasklistGuid))
	return builder
}

// 表示user的ID的类型，支持open_id, user_id, union_id
//
// 示例值：open_id
func (builder *RemoveMembersTasklistReqBuilder) UserIdType(userIdType string) *RemoveMembersTasklistReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

//
func (builder *RemoveMembersTasklistReqBuilder) Body(body *RemoveMembersTasklistReqBody) *RemoveMembersTasklistReqBuilder {
	builder.body = body
	return builder
}

func (builder *RemoveMembersTasklistReqBuilder) Build() *RemoveMembersTasklistReq {
	req := &RemoveMembersTasklistReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.body
	return req
}

type RemoveMembersTasklistReqBody struct {
	Members []*Member `json:"members,omitempty"` // 要移除的member列表
}

type RemoveMembersTasklistReq struct {
	apiReq *larkcore.ApiReq
	Body   *RemoveMembersTasklistReqBody `body:""`
}

type RemoveMembersTasklistRespData struct {
	Tasklist *Tasklist `json:"tasklist,omitempty"` // 修改完成后的清单实体
}

type RemoveMembersTasklistResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *RemoveMembersTasklistRespData `json:"data"` // 业务数据
}

func (resp *RemoveMembersTasklistResp) Success() bool {
	return resp.Code == 0
}

type TasksTasklistReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewTasksTasklistReqBuilder() *TasksTasklistReqBuilder {
	builder := &TasksTasklistReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 要获取任务的清单全局唯一ID
//
// 示例值：d300a75f-c56a-4be9-80d1-e47653028ceb
func (builder *TasksTasklistReqBuilder) TasklistGuid(tasklistGuid string) *TasksTasklistReqBuilder {
	builder.apiReq.PathParams.Set("tasklist_guid", fmt.Sprint(tasklistGuid))
	return builder
}

// 每页返回的任务数量
//
// 示例值：50
func (builder *TasksTasklistReqBuilder) PageSize(pageSize int) *TasksTasklistReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 分页标记。第一次请求不填该参数，表示从头开始查询；查询结果若还有更多数据时会同时返回新的 page_token。使用page_token重新调用本接口可以获取下一页数据。
//
// 示例值：aWQ9NzEwMjMzMjMxMDE=
func (builder *TasksTasklistReqBuilder) PageToken(pageToken string) *TasksTasklistReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

// 只查看特定完成状态的任务，不填写表示不按完成状态过滤
//
// 示例值：true
func (builder *TasksTasklistReqBuilder) Completed(completed bool) *TasksTasklistReqBuilder {
	builder.apiReq.QueryParams.Set("completed", fmt.Sprint(completed))
	return builder
}

// 任务创建的起始时间戳（ms），闭区间，不填写默认为首个任务的创建时间戳
//
// 示例值：1675742789470
func (builder *TasksTasklistReqBuilder) CreatedFrom(createdFrom string) *TasksTasklistReqBuilder {
	builder.apiReq.QueryParams.Set("created_from", fmt.Sprint(createdFrom))
	return builder
}

// 任务创建的结束时间戳（ms），闭区间，不填写默认为最后创建任务的创建时间戳
//
// 示例值：1675742789470
func (builder *TasksTasklistReqBuilder) CreatedTo(createdTo string) *TasksTasklistReqBuilder {
	builder.apiReq.QueryParams.Set("created_to", fmt.Sprint(createdTo))
	return builder
}

// 表示user的ID的类型，支持open_id, user_id, union_id
//
// 示例值：open_id
func (builder *TasksTasklistReqBuilder) UserIdType(userIdType string) *TasksTasklistReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

func (builder *TasksTasklistReqBuilder) Build() *TasksTasklistReq {
	req := &TasksTasklistReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type TasksTasklistReq struct {
	apiReq *larkcore.ApiReq
}

type TasksTasklistRespData struct {
	Items []*TaskSummary `json:"items,omitempty"` // 任务摘要数据

	PageToken *string `json:"page_token,omitempty"` // 用于获取下一页的分页标记，最后一页时发返回空

	HasMore *bool `json:"has_more,omitempty"` // 是否有更多数据
}

type TasksTasklistResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *TasksTasklistRespData `json:"data"` // 业务数据
}

func (resp *TasksTasklistResp) Success() bool {
	return resp.Code == 0
}

type CreateTasklistActivitySubscriptionReqBuilder struct {
	apiReq                       *larkcore.ApiReq
	tasklistActivitySubscription *TasklistActivitySubscription
}

func NewCreateTasklistActivitySubscriptionReqBuilder() *CreateTasklistActivitySubscriptionReqBuilder {
	builder := &CreateTasklistActivitySubscriptionReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 清单GUID
//
// 示例值：d19e3a2a-edc0-4e4e-b7cc-950e162b53ae
func (builder *CreateTasklistActivitySubscriptionReqBuilder) TasklistGuid(tasklistGuid string) *CreateTasklistActivitySubscriptionReqBuilder {
	builder.apiReq.PathParams.Set("tasklist_guid", fmt.Sprint(tasklistGuid))
	return builder
}

// 用户ID类型
//
// 示例值：open_id
func (builder *CreateTasklistActivitySubscriptionReqBuilder) UserIdType(userIdType string) *CreateTasklistActivitySubscriptionReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

//
func (builder *CreateTasklistActivitySubscriptionReqBuilder) TasklistActivitySubscription(tasklistActivitySubscription *TasklistActivitySubscription) *CreateTasklistActivitySubscriptionReqBuilder {
	builder.tasklistActivitySubscription = tasklistActivitySubscription
	return builder
}

func (builder *CreateTasklistActivitySubscriptionReqBuilder) Build() *CreateTasklistActivitySubscriptionReq {
	req := &CreateTasklistActivitySubscriptionReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.tasklistActivitySubscription
	return req
}

type CreateTasklistActivitySubscriptionReq struct {
	apiReq                       *larkcore.ApiReq
	TasklistActivitySubscription *TasklistActivitySubscription `body:""`
}

type CreateTasklistActivitySubscriptionRespData struct {
	ActivitySubscription *TasklistActivitySubscription `json:"activity_subscription,omitempty"` // 清单动态订阅
}

type CreateTasklistActivitySubscriptionResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *CreateTasklistActivitySubscriptionRespData `json:"data"` // 业务数据
}

func (resp *CreateTasklistActivitySubscriptionResp) Success() bool {
	return resp.Code == 0
}

type DeleteTasklistActivitySubscriptionReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewDeleteTasklistActivitySubscriptionReqBuilder() *DeleteTasklistActivitySubscriptionReqBuilder {
	builder := &DeleteTasklistActivitySubscriptionReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 清单GUID
//
// 示例值：f5ca6747-5ac3-422e-a97e-972c1b2c24f3
func (builder *DeleteTasklistActivitySubscriptionReqBuilder) TasklistGuid(tasklistGuid string) *DeleteTasklistActivitySubscriptionReqBuilder {
	builder.apiReq.PathParams.Set("tasklist_guid", fmt.Sprint(tasklistGuid))
	return builder
}

// 要删除的订阅GUID
//
// 示例值：d19e3a2a-edc0-4e4e-b7cc-950e162b53ae
func (builder *DeleteTasklistActivitySubscriptionReqBuilder) ActivitySubscriptionGuid(activitySubscriptionGuid string) *DeleteTasklistActivitySubscriptionReqBuilder {
	builder.apiReq.PathParams.Set("activity_subscription_guid", fmt.Sprint(activitySubscriptionGuid))
	return builder
}

func (builder *DeleteTasklistActivitySubscriptionReqBuilder) Build() *DeleteTasklistActivitySubscriptionReq {
	req := &DeleteTasklistActivitySubscriptionReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	return req
}

type DeleteTasklistActivitySubscriptionReq struct {
	apiReq *larkcore.ApiReq
}

type DeleteTasklistActivitySubscriptionResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *DeleteTasklistActivitySubscriptionResp) Success() bool {
	return resp.Code == 0
}

type GetTasklistActivitySubscriptionReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewGetTasklistActivitySubscriptionReqBuilder() *GetTasklistActivitySubscriptionReqBuilder {
	builder := &GetTasklistActivitySubscriptionReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 清单GUID
//
// 示例值：33991879-704f-444f-81d7-55a6aa7be80c
func (builder *GetTasklistActivitySubscriptionReqBuilder) TasklistGuid(tasklistGuid string) *GetTasklistActivitySubscriptionReqBuilder {
	builder.apiReq.PathParams.Set("tasklist_guid", fmt.Sprint(tasklistGuid))
	return builder
}

// 订阅GUID
//
// 示例值：33991879-704f-444f-81d7-55a6aa7be80c
func (builder *GetTasklistActivitySubscriptionReqBuilder) ActivitySubscriptionGuid(activitySubscriptionGuid string) *GetTasklistActivitySubscriptionReqBuilder {
	builder.apiReq.PathParams.Set("activity_subscription_guid", fmt.Sprint(activitySubscriptionGuid))
	return builder
}

// 用户ID类型
//
// 示例值：open_id
func (builder *GetTasklistActivitySubscriptionReqBuilder) UserIdType(userIdType string) *GetTasklistActivitySubscriptionReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

func (builder *GetTasklistActivitySubscriptionReqBuilder) Build() *GetTasklistActivitySubscriptionReq {
	req := &GetTasklistActivitySubscriptionReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type GetTasklistActivitySubscriptionReq struct {
	apiReq *larkcore.ApiReq
}

type GetTasklistActivitySubscriptionRespData struct {
	ActivitySubscription *TasklistActivitySubscription `json:"activity_subscription,omitempty"` // 订阅详情
}

type GetTasklistActivitySubscriptionResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *GetTasklistActivitySubscriptionRespData `json:"data"` // 业务数据
}

func (resp *GetTasklistActivitySubscriptionResp) Success() bool {
	return resp.Code == 0
}

type ListTasklistActivitySubscriptionReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewListTasklistActivitySubscriptionReqBuilder() *ListTasklistActivitySubscriptionReqBuilder {
	builder := &ListTasklistActivitySubscriptionReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 清单GUID
//
// 示例值：d19e3a2a-edc0-4e4e-b7cc-950e162b53ae
func (builder *ListTasklistActivitySubscriptionReqBuilder) TasklistGuid(tasklistGuid string) *ListTasklistActivitySubscriptionReqBuilder {
	builder.apiReq.PathParams.Set("tasklist_guid", fmt.Sprint(tasklistGuid))
	return builder
}

// 返回结果的最大数量
//
// 示例值：50
func (builder *ListTasklistActivitySubscriptionReqBuilder) Limit(limit int) *ListTasklistActivitySubscriptionReqBuilder {
	builder.apiReq.QueryParams.Set("limit", fmt.Sprint(limit))
	return builder
}

// 用户ID类型
//
// 示例值：open_id
func (builder *ListTasklistActivitySubscriptionReqBuilder) UserIdType(userIdType string) *ListTasklistActivitySubscriptionReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

func (builder *ListTasklistActivitySubscriptionReqBuilder) Build() *ListTasklistActivitySubscriptionReq {
	req := &ListTasklistActivitySubscriptionReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type ListTasklistActivitySubscriptionReq struct {
	apiReq *larkcore.ApiReq
}

type ListTasklistActivitySubscriptionRespData struct {
	Items []*TasklistActivitySubscription `json:"items,omitempty"` // 清单的动态订阅数据
}

type ListTasklistActivitySubscriptionResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ListTasklistActivitySubscriptionRespData `json:"data"` // 业务数据
}

func (resp *ListTasklistActivitySubscriptionResp) Success() bool {
	return resp.Code == 0
}

type PatchTasklistActivitySubscriptionReqBodyBuilder struct {
	activitySubscription     *TasklistActivitySubscription // 要更新的订阅数据
	activitySubscriptionFlag bool

	updateFields     []string // 要更新的字段
	updateFieldsFlag bool
}

func NewPatchTasklistActivitySubscriptionReqBodyBuilder() *PatchTasklistActivitySubscriptionReqBodyBuilder {
	builder := &PatchTasklistActivitySubscriptionReqBodyBuilder{}
	return builder
}

// 要更新的订阅数据
//
//示例值：
func (builder *PatchTasklistActivitySubscriptionReqBodyBuilder) ActivitySubscription(activitySubscription *TasklistActivitySubscription) *PatchTasklistActivitySubscriptionReqBodyBuilder {
	builder.activitySubscription = activitySubscription
	builder.activitySubscriptionFlag = true
	return builder
}

// 要更新的字段
//
//示例值：
func (builder *PatchTasklistActivitySubscriptionReqBodyBuilder) UpdateFields(updateFields []string) *PatchTasklistActivitySubscriptionReqBodyBuilder {
	builder.updateFields = updateFields
	builder.updateFieldsFlag = true
	return builder
}

func (builder *PatchTasklistActivitySubscriptionReqBodyBuilder) Build() *PatchTasklistActivitySubscriptionReqBody {
	req := &PatchTasklistActivitySubscriptionReqBody{}
	if builder.activitySubscriptionFlag {
		req.ActivitySubscription = builder.activitySubscription
	}
	if builder.updateFieldsFlag {
		req.UpdateFields = builder.updateFields
	}
	return req
}

type PatchTasklistActivitySubscriptionPathReqBodyBuilder struct {
	activitySubscription     *TasklistActivitySubscription
	activitySubscriptionFlag bool
	updateFields             []string
	updateFieldsFlag         bool
}

func NewPatchTasklistActivitySubscriptionPathReqBodyBuilder() *PatchTasklistActivitySubscriptionPathReqBodyBuilder {
	builder := &PatchTasklistActivitySubscriptionPathReqBodyBuilder{}
	return builder
}

// 要更新的订阅数据
//
// 示例值：
func (builder *PatchTasklistActivitySubscriptionPathReqBodyBuilder) ActivitySubscription(activitySubscription *TasklistActivitySubscription) *PatchTasklistActivitySubscriptionPathReqBodyBuilder {
	builder.activitySubscription = activitySubscription
	builder.activitySubscriptionFlag = true
	return builder
}

// 要更新的字段
//
// 示例值：
func (builder *PatchTasklistActivitySubscriptionPathReqBodyBuilder) UpdateFields(updateFields []string) *PatchTasklistActivitySubscriptionPathReqBodyBuilder {
	builder.updateFields = updateFields
	builder.updateFieldsFlag = true
	return builder
}

func (builder *PatchTasklistActivitySubscriptionPathReqBodyBuilder) Build() (*PatchTasklistActivitySubscriptionReqBody, error) {
	req := &PatchTasklistActivitySubscriptionReqBody{}
	if builder.activitySubscriptionFlag {
		req.ActivitySubscription = builder.activitySubscription
	}
	if builder.updateFieldsFlag {
		req.UpdateFields = builder.updateFields
	}
	return req, nil
}

type PatchTasklistActivitySubscriptionReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *PatchTasklistActivitySubscriptionReqBody
}

func NewPatchTasklistActivitySubscriptionReqBuilder() *PatchTasklistActivitySubscriptionReqBuilder {
	builder := &PatchTasklistActivitySubscriptionReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 清单GUID
//
// 示例值：33991879-704f-444f-81d7-55a6aa7be80c
func (builder *PatchTasklistActivitySubscriptionReqBuilder) TasklistGuid(tasklistGuid string) *PatchTasklistActivitySubscriptionReqBuilder {
	builder.apiReq.PathParams.Set("tasklist_guid", fmt.Sprint(tasklistGuid))
	return builder
}

// 要更新的动态订阅GUID
//
// 示例值：f5ca6747-5ac3-422e-a97e-972c1b2c24f3
func (builder *PatchTasklistActivitySubscriptionReqBuilder) ActivitySubscriptionGuid(activitySubscriptionGuid string) *PatchTasklistActivitySubscriptionReqBuilder {
	builder.apiReq.PathParams.Set("activity_subscription_guid", fmt.Sprint(activitySubscriptionGuid))
	return builder
}

// 用户ID类型
//
// 示例值：open_id
func (builder *PatchTasklistActivitySubscriptionReqBuilder) UserIdType(userIdType string) *PatchTasklistActivitySubscriptionReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

//
func (builder *PatchTasklistActivitySubscriptionReqBuilder) Body(body *PatchTasklistActivitySubscriptionReqBody) *PatchTasklistActivitySubscriptionReqBuilder {
	builder.body = body
	return builder
}

func (builder *PatchTasklistActivitySubscriptionReqBuilder) Build() *PatchTasklistActivitySubscriptionReq {
	req := &PatchTasklistActivitySubscriptionReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.body
	return req
}

type PatchTasklistActivitySubscriptionReqBody struct {
	ActivitySubscription *TasklistActivitySubscription `json:"activity_subscription,omitempty"` // 要更新的订阅数据

	UpdateFields []string `json:"update_fields,omitempty"` // 要更新的字段
}

type PatchTasklistActivitySubscriptionReq struct {
	apiReq *larkcore.ApiReq
	Body   *PatchTasklistActivitySubscriptionReqBody `body:""`
}

type PatchTasklistActivitySubscriptionRespData struct {
	ActivitySubscription *TasklistActivitySubscription `json:"activity_subscription,omitempty"` // 更新后的订阅
}

type PatchTasklistActivitySubscriptionResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *PatchTasklistActivitySubscriptionRespData `json:"data"` // 业务数据
}

func (resp *PatchTasklistActivitySubscriptionResp) Success() bool {
	return resp.Code == 0
}

type ListAttachmentIterator struct {
	nextPageToken *string
	items         []*Attachment
	index         int
	limit         int
	ctx           context.Context
	req           *ListAttachmentReq
	listFunc      func(ctx context.Context, req *ListAttachmentReq, options ...larkcore.RequestOptionFunc) (*ListAttachmentResp, error)
	options       []larkcore.RequestOptionFunc
	curlNum       int
}

func (iterator *ListAttachmentIterator) Next() (bool, *Attachment, 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 *ListAttachmentIterator) NextPageToken() *string {
	return iterator.nextPageToken
}

type ListCommentIterator struct {
	nextPageToken *string
	items         []*Comment
	index         int
	limit         int
	ctx           context.Context
	req           *ListCommentReq
	listFunc      func(ctx context.Context, req *ListCommentReq, options ...larkcore.RequestOptionFunc) (*ListCommentResp, error)
	options       []larkcore.RequestOptionFunc
	curlNum       int
}

func (iterator *ListCommentIterator) Next() (bool, *Comment, 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 *ListCommentIterator) NextPageToken() *string {
	return iterator.nextPageToken
}

type ListCustomFieldIterator struct {
	nextPageToken *string
	items         []*CustomField
	index         int
	limit         int
	ctx           context.Context
	req           *ListCustomFieldReq
	listFunc      func(ctx context.Context, req *ListCustomFieldReq, options ...larkcore.RequestOptionFunc) (*ListCustomFieldResp, error)
	options       []larkcore.RequestOptionFunc
	curlNum       int
}

func (iterator *ListCustomFieldIterator) Next() (bool, *CustomField, 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 *ListCustomFieldIterator) NextPageToken() *string {
	return iterator.nextPageToken
}

type ListSectionIterator struct {
	nextPageToken *string
	items         []*SectionSummary
	index         int
	limit         int
	ctx           context.Context
	req           *ListSectionReq
	listFunc      func(ctx context.Context, req *ListSectionReq, options ...larkcore.RequestOptionFunc) (*ListSectionResp, error)
	options       []larkcore.RequestOptionFunc
	curlNum       int
}

func (iterator *ListSectionIterator) Next() (bool, *SectionSummary, 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 *ListSectionIterator) NextPageToken() *string {
	return iterator.nextPageToken
}

type TasksSectionIterator struct {
	nextPageToken *string
	items         []*TaskSummary
	index         int
	limit         int
	ctx           context.Context
	req           *TasksSectionReq
	listFunc      func(ctx context.Context, req *TasksSectionReq, options ...larkcore.RequestOptionFunc) (*TasksSectionResp, error)
	options       []larkcore.RequestOptionFunc
	curlNum       int
}

func (iterator *TasksSectionIterator) Next() (bool, *TaskSummary, 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 *TasksSectionIterator) NextPageToken() *string {
	return iterator.nextPageToken
}

type ListTaskIterator struct {
	nextPageToken *string
	items         []*Task
	index         int
	limit         int
	ctx           context.Context
	req           *ListTaskReq
	listFunc      func(ctx context.Context, req *ListTaskReq, options ...larkcore.RequestOptionFunc) (*ListTaskResp, error)
	options       []larkcore.RequestOptionFunc
	curlNum       int
}

func (iterator *ListTaskIterator) Next() (bool, *Task, 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 *ListTaskIterator) NextPageToken() *string {
	return iterator.nextPageToken
}

type ListTaskSubtaskIterator struct {
	nextPageToken *string
	items         []*Task
	index         int
	limit         int
	ctx           context.Context
	req           *ListTaskSubtaskReq
	listFunc      func(ctx context.Context, req *ListTaskSubtaskReq, options ...larkcore.RequestOptionFunc) (*ListTaskSubtaskResp, error)
	options       []larkcore.RequestOptionFunc
	curlNum       int
}

func (iterator *ListTaskSubtaskIterator) Next() (bool, *Task, 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 *ListTaskSubtaskIterator) NextPageToken() *string {
	return iterator.nextPageToken
}

type ListTasklistIterator struct {
	nextPageToken *string
	items         []*Tasklist
	index         int
	limit         int
	ctx           context.Context
	req           *ListTasklistReq
	listFunc      func(ctx context.Context, req *ListTasklistReq, options ...larkcore.RequestOptionFunc) (*ListTasklistResp, error)
	options       []larkcore.RequestOptionFunc
	curlNum       int
}

func (iterator *ListTasklistIterator) Next() (bool, *Tasklist, 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 *ListTasklistIterator) NextPageToken() *string {
	return iterator.nextPageToken
}
