// 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 (
	"fmt"

	"context"
	"errors"

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

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

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

const (
	UserIdTypeBatchDeleteFollowerTaskUserId  = "user_id"  // 以user_id来识别用户
	UserIdTypeBatchDeleteFollowerTaskUnionId = "union_id" // 以union_id来识别用户
	UserIdTypeBatchDeleteFollowerTaskOpenId  = "open_id"  // 以open_id来识别用户
)

const (
	UserIdTypeCreateTaskUserId  = "user_id"  // 以user_id来识别用户
	UserIdTypeCreateTaskUnionId = "union_id" // 以union_id来识别用户
	UserIdTypeCreateTaskOpenId  = "open_id"  // 以open_id来识别用户
)

const (
	UserIdTypeGetTaskUserId  = "user_id"  // 以user_id来识别用户
	UserIdTypeGetTaskUnionId = "union_id" // 以union_id来识别用户
	UserIdTypeGetTaskOpenId  = "open_id"  // 以open_id来识别用户
)

const (
	UserIdTypeListTaskUserId  = "user_id"  // 以user_id来识别用户
	UserIdTypeListTaskUnionId = "union_id" // 以union_id来识别用户
	UserIdTypeListTaskOpenId  = "open_id"  // 以open_id来识别用户
)

const (
	UserIdTypePatchTaskUserId  = "user_id"  // 以user_id来识别用户
	UserIdTypePatchTaskUnionId = "union_id" // 以union_id来识别用户
	UserIdTypePatchTaskOpenId  = "open_id"  // 以open_id来识别用户
)

const (
	UserIdTypeCreateTaskCollaboratorUserId  = "user_id"  // 以user_id来识别用户
	UserIdTypeCreateTaskCollaboratorUnionId = "union_id" // 以union_id来识别用户
	UserIdTypeCreateTaskCollaboratorOpenId  = "open_id"  // 以open_id来识别用户
)

const (
	UserIdTypeDeleteTaskCollaboratorUserId  = "user_id"  // 以user_id来识别用户
	UserIdTypeDeleteTaskCollaboratorUnionId = "union_id" // 以union_id来识别用户
	UserIdTypeDeleteTaskCollaboratorOpenId  = "open_id"  // 以open_id来识别用户
)

const (
	UserIdTypeListTaskCollaboratorUserId  = "user_id"  // 以user_id来识别用户
	UserIdTypeListTaskCollaboratorUnionId = "union_id" // 以union_id来识别用户
	UserIdTypeListTaskCollaboratorOpenId  = "open_id"  // 以open_id来识别用户
)

const (
	UserIdTypeCreateTaskCommentUserId  = "user_id"  // 以user_id来识别用户
	UserIdTypeCreateTaskCommentUnionId = "union_id" // 以union_id来识别用户
	UserIdTypeCreateTaskCommentOpenId  = "open_id"  // 以open_id来识别用户
)

const (
	UserIdTypeGetTaskCommentUserId  = "user_id"  // 以user_id来识别用户
	UserIdTypeGetTaskCommentUnionId = "union_id" // 以union_id来识别用户
	UserIdTypeGetTaskCommentOpenId  = "open_id"  // 以open_id来识别用户
)

const (
	ListDirectionDown = 0 // 按照回复时间从小到大查询
	ListDirectionUp   = 1 // 按照回复时间从大到小查询

)

const (
	UserIdTypeListTaskCommentUserId  = "user_id"  // 以user_id来识别用户
	UserIdTypeListTaskCommentUnionId = "union_id" // 以union_id来识别用户
	UserIdTypeListTaskCommentOpenId  = "open_id"  // 以open_id来识别用户
)

const (
	UserIdTypeUpdateTaskCommentUserId  = "user_id"  // 以user_id来识别用户
	UserIdTypeUpdateTaskCommentUnionId = "union_id" // 以union_id来识别用户
	UserIdTypeUpdateTaskCommentOpenId  = "open_id"  // 以open_id来识别用户
)

const (
	UserIdTypeCreateTaskFollowerUserId  = "user_id"  // 以user_id来识别用户
	UserIdTypeCreateTaskFollowerUnionId = "union_id" // 以union_id来识别用户
	UserIdTypeCreateTaskFollowerOpenId  = "open_id"  // 以open_id来识别用户
)

const (
	UserIdTypeDeleteTaskFollowerUserId  = "user_id"  // 以user_id来识别用户
	UserIdTypeDeleteTaskFollowerUnionId = "union_id" // 以union_id来识别用户
	UserIdTypeDeleteTaskFollowerOpenId  = "open_id"  // 以open_id来识别用户
)

const (
	UserIdTypeListTaskFollowerUserId  = "user_id"  // 以user_id来识别用户
	UserIdTypeListTaskFollowerUnionId = "union_id" // 以union_id来识别用户
	UserIdTypeListTaskFollowerOpenId  = "open_id"  // 以open_id来识别用户
)

type Attachment struct {
}

type AttachmentBuilder struct {
}

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

func (builder *AttachmentBuilder) Build() *Attachment {
	req := &Attachment{}
	return req
}

type Collaborator struct {
	Id *string `json:"id,omitempty"` // 任务执行者的 ID。;传入的值为 user_id 或 open_id，由user_id_type 决定。user_id和open_id的获取可见文档[如何获取相关id](https://open.feishu.cn/document/home/user-identity-introduction/how-to-get)。;<md-alert>;已经废弃，为了向前兼容早期只支持单次添加一个人的情况而保留，但不再推荐使用，建议使用id_list字段;</md-alert>

	IdList []string `json:"id_list,omitempty"` // 执行者的用户ID列表。;传入的值为 user_id 或 open_id，由user_id_type 决定。user_id和open_id的获取可见文档[如何获取相关id](https://open.feishu.cn/document/home/user-identity-introduction/how-to-get)。
}

type CollaboratorBuilder struct {
	id     string // 任务执行者的 ID。;传入的值为 user_id 或 open_id，由user_id_type 决定。user_id和open_id的获取可见文档[如何获取相关id](https://open.feishu.cn/document/home/user-identity-introduction/how-to-get)。;<md-alert>;已经废弃，为了向前兼容早期只支持单次添加一个人的情况而保留，但不再推荐使用，建议使用id_list字段;</md-alert>
	idFlag bool

	idList     []string // 执行者的用户ID列表。;传入的值为 user_id 或 open_id，由user_id_type 决定。user_id和open_id的获取可见文档[如何获取相关id](https://open.feishu.cn/document/home/user-identity-introduction/how-to-get)。
	idListFlag bool
}

func NewCollaboratorBuilder() *CollaboratorBuilder {
	builder := &CollaboratorBuilder{}
	return builder
}

// 任务执行者的 ID。;传入的值为 user_id 或 open_id，由user_id_type 决定。user_id和open_id的获取可见文档[如何获取相关id](https://open.feishu.cn/document/home/user-identity-introduction/how-to-get)。;<md-alert>;已经废弃，为了向前兼容早期只支持单次添加一个人的情况而保留，但不再推荐使用，建议使用id_list字段;</md-alert>
//
// 示例值：ou_99e1a581b36ecc4862cbfbce473f1234
func (builder *CollaboratorBuilder) Id(id string) *CollaboratorBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 执行者的用户ID列表。;传入的值为 user_id 或 open_id，由user_id_type 决定。user_id和open_id的获取可见文档[如何获取相关id](https://open.feishu.cn/document/home/user-identity-introduction/how-to-get)。
//
// 示例值：["ou_550cc75233d8b7b9fcbdad65f34433f4", "ou_d1e9d27cf3235b40ca9a67c67ef088b0"]
func (builder *CollaboratorBuilder) IdList(idList []string) *CollaboratorBuilder {
	builder.idList = idList
	builder.idListFlag = true
	return builder
}

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

	}
	if builder.idListFlag {
		req.IdList = builder.idList
	}
	return req
}

type Comment struct {
	Content *string `json:"content,omitempty"` // 评论内容。;<md-alert>;评论内容和富文本评论内容同时存在时只使用富文本评论内容。;</md-alert>

	ParentId *string `json:"parent_id,omitempty"` // 评论的父ID，创建评论时若不为空则为某条评论的回复，若为空则不是回复

	Id *string `json:"id,omitempty"` // 评论ID，由飞书服务器发号

	CreateMilliTime *string `json:"create_milli_time,omitempty"` // 评论创建的时间戳，单位为毫秒，用于展示，创建时不用填写

	RichContent *string `json:"rich_content,omitempty"` // 富文本评论内容。语法格式参见[Markdown模块](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/markdown-module)

	CreatorId *string `json:"creator_id,omitempty"` // 评论的创建者 ID。在创建评论时无需填充该字段
}

type CommentBuilder struct {
	content     string // 评论内容。;<md-alert>;评论内容和富文本评论内容同时存在时只使用富文本评论内容。;</md-alert>
	contentFlag bool

	parentId     string // 评论的父ID，创建评论时若不为空则为某条评论的回复，若为空则不是回复
	parentIdFlag bool

	id     string // 评论ID，由飞书服务器发号
	idFlag bool

	createMilliTime     string // 评论创建的时间戳，单位为毫秒，用于展示，创建时不用填写
	createMilliTimeFlag bool

	richContent     string // 富文本评论内容。语法格式参见[Markdown模块](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/markdown-module)
	richContentFlag bool

	creatorId     string // 评论的创建者 ID。在创建评论时无需填充该字段
	creatorIdFlag bool
}

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

// 评论内容。;<md-alert>;评论内容和富文本评论内容同时存在时只使用富文本评论内容。;</md-alert>
//
// 示例值：举杯邀明月，对影成三人
func (builder *CommentBuilder) Content(content string) *CommentBuilder {
	builder.content = content
	builder.contentFlag = true
	return builder
}

// 评论的父ID，创建评论时若不为空则为某条评论的回复，若为空则不是回复
//
// 示例值：6937231762296684564
func (builder *CommentBuilder) ParentId(parentId string) *CommentBuilder {
	builder.parentId = parentId
	builder.parentIdFlag = true
	return builder
}

// 评论ID，由飞书服务器发号
//
// 示例值：6937231762296684564
func (builder *CommentBuilder) Id(id string) *CommentBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 评论创建的时间戳，单位为毫秒，用于展示，创建时不用填写
//
// 示例值：1657075055135
func (builder *CommentBuilder) CreateMilliTime(createMilliTime string) *CommentBuilder {
	builder.createMilliTime = createMilliTime
	builder.createMilliTimeFlag = true
	return builder
}

// 富文本评论内容。语法格式参见[Markdown模块](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/markdown-module)
//
// 示例值：举杯邀明月，对影成三人<at id=7058204817822318612></at>
func (builder *CommentBuilder) RichContent(richContent string) *CommentBuilder {
	builder.richContent = richContent
	builder.richContentFlag = true
	return builder
}

// 评论的创建者 ID。在创建评论时无需填充该字段
//
// 示例值：ou_99e1a581b36ecc4862cbfbce473f346a
func (builder *CommentBuilder) CreatorId(creatorId string) *CommentBuilder {
	builder.creatorId = creatorId
	builder.creatorIdFlag = true
	return builder
}

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

	}
	if builder.parentIdFlag {
		req.ParentId = &builder.parentId

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

	}
	if builder.createMilliTimeFlag {
		req.CreateMilliTime = &builder.createMilliTime

	}
	if builder.richContentFlag {
		req.RichContent = &builder.richContent

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

	}
	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 Due struct {
	Time *string `json:"time,omitempty"` // 表示截止时间的Unix时间戳（单位为秒）。

	Timezone *string `json:"timezone,omitempty"` // 截止时间对应的时区。;传入值需要符合IANA Time Zone Database标准，规范见[Time Zone Database](https://www.iana.org/time-zones)。

	IsAllDay *bool `json:"is_all_day,omitempty"` // 标记任务是否为全天任务。;包括如下取值：;- true：表示是全天任务，全天任务的截止时间为当天 UTC 时间的 0 点。;- false：表示不是全天任务。
}

type DueBuilder struct {
	time     string // 表示截止时间的Unix时间戳（单位为秒）。
	timeFlag bool

	timezone     string // 截止时间对应的时区。;传入值需要符合IANA Time Zone Database标准，规范见[Time Zone Database](https://www.iana.org/time-zones)。
	timezoneFlag bool

	isAllDay     bool // 标记任务是否为全天任务。;包括如下取值：;- true：表示是全天任务，全天任务的截止时间为当天 UTC 时间的 0 点。;- false：表示不是全天任务。
	isAllDayFlag bool
}

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

// 表示截止时间的Unix时间戳（单位为秒）。
//
// 示例值：1623124318
func (builder *DueBuilder) Time(time string) *DueBuilder {
	builder.time = time
	builder.timeFlag = true
	return builder
}

// 截止时间对应的时区。;传入值需要符合IANA Time Zone Database标准，规范见[Time Zone Database](https://www.iana.org/time-zones)。
//
// 示例值：Asia/Shanghai
func (builder *DueBuilder) Timezone(timezone string) *DueBuilder {
	builder.timezone = timezone
	builder.timezoneFlag = true
	return builder
}

// 标记任务是否为全天任务。;包括如下取值：;- true：表示是全天任务，全天任务的截止时间为当天 UTC 时间的 0 点。;- false：表示不是全天任务。
//
// 示例值：false
func (builder *DueBuilder) IsAllDay(isAllDay bool) *DueBuilder {
	builder.isAllDay = isAllDay
	builder.isAllDayFlag = true
	return builder
}

func (builder *DueBuilder) Build() *Due {
	req := &Due{}
	if builder.timeFlag {
		req.Time = &builder.time

	}
	if builder.timezoneFlag {
		req.Timezone = &builder.timezone

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

	}
	return req
}

type Follower struct {
	Id *string `json:"id,omitempty"` // 任务关注人 ID

	IdList []string `json:"id_list,omitempty"` // 要删除的关注人ID列表
}

type FollowerBuilder struct {
	id     string // 任务关注人 ID
	idFlag bool

	idList     []string // 要删除的关注人ID列表
	idListFlag bool
}

func NewFollowerBuilder() *FollowerBuilder {
	builder := &FollowerBuilder{}
	return builder
}

// 任务关注人 ID
//
// 示例值：ou_99e1a581b36ecc4862cbfbce473f3123
func (builder *FollowerBuilder) Id(id string) *FollowerBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 要删除的关注人ID列表
//
// 示例值：[;  "ou_550cc75233d8b7b9fcbdad65f34433f4", "ou_d1e9d27cf3235b40ca9a67c67ef088b0";]
func (builder *FollowerBuilder) IdList(idList []string) *FollowerBuilder {
	builder.idList = idList
	builder.idListFlag = true
	return builder
}

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

	}
	if builder.idListFlag {
		req.IdList = builder.idList
	}
	return req
}

type Href struct {
	Url *string `json:"url,omitempty"` // 具体链接地址。;URL仅支持解析http、https。详细参见：[任务字段补充说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/Supplementary-directions-of-task-fields)

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

type HrefBuilder struct {
	url     string // 具体链接地址。;URL仅支持解析http、https。详细参见：[任务字段补充说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/Supplementary-directions-of-task-fields)
	urlFlag bool

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

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

// 具体链接地址。;URL仅支持解析http、https。详细参见：[任务字段补充说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/Supplementary-directions-of-task-fields)
//
// 示例值：https://support.feishu.com/internal/foo-bar
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 Origin struct {
	PlatformI18nName *string `json:"platform_i18n_name,omitempty"` // 任务来源的名称。;用于在任务中心详情页展示。需要提供一个字典，支持多种语言名称映射。应用在使用不同语言时，导入来源也将展示对应的内容。详细参见：[任务字段补充说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/Supplementary-directions-of-task-fields)

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

type OriginBuilder struct {
	platformI18nName     string // 任务来源的名称。;用于在任务中心详情页展示。需要提供一个字典，支持多种语言名称映射。应用在使用不同语言时，导入来源也将展示对应的内容。详细参见：[任务字段补充说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/Supplementary-directions-of-task-fields)
	platformI18nNameFlag bool

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

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

// 任务来源的名称。;用于在任务中心详情页展示。需要提供一个字典，支持多种语言名称映射。应用在使用不同语言时，导入来源也将展示对应的内容。详细参见：[任务字段补充说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/Supplementary-directions-of-task-fields)
//
// 示例值：{\"zh_cn\": \"IT 工作台\", \"en_us\": \"IT Workspace\"}
func (builder *OriginBuilder) PlatformI18nName(platformI18nName string) *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 分钟，则为 -30） 任务没有截止时间则为全天任务(截止时间为0)
}

type ReminderBuilder struct {
	id     string // 提醒时间设置的 ID（在删除时候需要使用这个）
	idFlag bool

	relativeFireMinute     int // 相对于截止时间的提醒时间（如提前 30 分钟，截止时间后 30 分钟，则为 -30） 任务没有截止时间则为全天任务(截止时间为0)
	relativeFireMinuteFlag bool
}

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

// 提醒时间设置的 ID（在删除时候需要使用这个）
//
// 示例值：1
func (builder *ReminderBuilder) Id(id string) *ReminderBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 相对于截止时间的提醒时间（如提前 30 分钟，截止时间后 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 Section struct {
}

type SectionBuilder struct {
}

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

func (builder *SectionBuilder) Build() *Section {
	req := &Section{}
	return req
}

type Task struct {
	Id *string `json:"id,omitempty"` // 任务的唯一ID，例如"83912691-2e43-47fc-94a4-d512e03984fa"

	Summary *string `json:"summary,omitempty"` // 任务的标题，类型为文本字符串。;如果要在任务标题中插入 URL 或者 @某个用户，请使用rich_summary字段。;创建任务时，任务标题(summary字段)和任务富文本标题(rich_summary字段)不能同时为空，需要至少填充其中一个字段。;<md-alert>;任务标题和任务富文本标题同时存在时只使用富文本标题。;</md-alert>

	Description *string `json:"description,omitempty"` // 任务的描述，类型为文本字符串。;如果要在任务描述中插入 URL 或者 @某个用户，请使用rich_description字段。;<md-alert>;任务备注和任务富文本备注同时存在时只使用富文本备注。;</md-alert>

	CompleteTime *string `json:"complete_time,omitempty"` // 任务的完成时间戳（单位为秒），完成时间为0则表示任务尚未完成。;不支持部分完成，只有整个任务完成，该字段才会有非0值。

	CreatorId *string `json:"creator_id,omitempty"` // 任务的创建者 ID。;其中查询字段 user_id_type 是用于控制返回体中 creator_id 的类型，不传时默认返回 open_id。;特别的，使用tenant_access_token 调用接口时，如果是user_id_type是openid，则返回代表该应用身份的openid；当user_id_type为user_id时，不返回creator_id。原因是user_id代表一个真实飞书用户的id，应用身份没有user_id。使用user_access_token调用接口正常返回创建者。

	Extra *string `json:"extra,omitempty"` // 附属信息。;接入方可以传入base64 编码后的自定义的数据。用户如果需要对当前任务备注信息，但对外不显示，可使用该字段进行存储。;该数据会在获取任务详情时，原样返回给用户。

	CreateTime *string `json:"create_time,omitempty"` // 任务的创建时间的Unix时间戳（单位为秒）

	UpdateTime *string `json:"update_time,omitempty"` // 任务的更新时间的Unix时间戳（单位为秒）;创建任务时update_time与create_time相同

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

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

	CanEdit *bool `json:"can_edit,omitempty"` // 此字段用于控制该任务在飞书任务中心是否可编辑，默认为false;<md-alert>;已经废弃，向前兼容故仍然保留，但不推荐使用;</md-alert>

	Custom *string `json:"custom,omitempty"` // 自定义完成配置。;此字段用于设置完成任务时的页面跳转，或展示提示语。详细参见：[任务字段补充说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/Supplementary-directions-of-task-fields)

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

	Followers []*Follower `json:"followers,omitempty"` // 任务的关注者

	Collaborators []*Collaborator `json:"collaborators,omitempty"` // 任务的执行者

	CollaboratorIds []string `json:"collaborator_ids,omitempty"` // 创建任务时添加的执行者用户id列表。;传入的值为 user_id 或 open_id ，由user_id_type 决定。user_id和open_id的获取可见文档：[如何获取相关id](https://open.feishu.cn/document/home/user-identity-introduction/how-to-get)。

	FollowerIds []string `json:"follower_ids,omitempty"` // 创建任务时添加的关注者用户id列表。;传入的值为 user_id 或 open_id ，由user_id_type 决定。user_id和open_id的获取可见文档：[如何获取相关id](https://open.feishu.cn/document/home/user-identity-introduction/how-to-get)。

	RepeatRule *string `json:"repeat_rule,omitempty"` // 重复任务的规则表达式。;语法格式参见[RRule语法规范](https://www.ietf.org/rfc/rfc2445.txt) 4.3.10小节

	RichSummary *string `json:"rich_summary,omitempty"` // 富文本任务标题。语法格式参见[Markdown模块](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/markdown-module);。创建任务时，任务标题(summary字段)和任务富文本标题(rich_summary字段)不能同时为空，需要至少填充其中一个字段。

	RichDescription *string `json:"rich_description,omitempty"` // 富文本任务备注。语法格式参见[Markdown模块](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/markdown-module)
}

type TaskBuilder struct {
	id     string // 任务的唯一ID，例如"83912691-2e43-47fc-94a4-d512e03984fa"
	idFlag bool

	summary     string // 任务的标题，类型为文本字符串。;如果要在任务标题中插入 URL 或者 @某个用户，请使用rich_summary字段。;创建任务时，任务标题(summary字段)和任务富文本标题(rich_summary字段)不能同时为空，需要至少填充其中一个字段。;<md-alert>;任务标题和任务富文本标题同时存在时只使用富文本标题。;</md-alert>
	summaryFlag bool

	description     string // 任务的描述，类型为文本字符串。;如果要在任务描述中插入 URL 或者 @某个用户，请使用rich_description字段。;<md-alert>;任务备注和任务富文本备注同时存在时只使用富文本备注。;</md-alert>
	descriptionFlag bool

	completeTime     string // 任务的完成时间戳（单位为秒），完成时间为0则表示任务尚未完成。;不支持部分完成，只有整个任务完成，该字段才会有非0值。
	completeTimeFlag bool

	creatorId     string // 任务的创建者 ID。;其中查询字段 user_id_type 是用于控制返回体中 creator_id 的类型，不传时默认返回 open_id。;特别的，使用tenant_access_token 调用接口时，如果是user_id_type是openid，则返回代表该应用身份的openid；当user_id_type为user_id时，不返回creator_id。原因是user_id代表一个真实飞书用户的id，应用身份没有user_id。使用user_access_token调用接口正常返回创建者。
	creatorIdFlag bool

	extra     string // 附属信息。;接入方可以传入base64 编码后的自定义的数据。用户如果需要对当前任务备注信息，但对外不显示，可使用该字段进行存储。;该数据会在获取任务详情时，原样返回给用户。
	extraFlag bool

	createTime     string // 任务的创建时间的Unix时间戳（单位为秒）
	createTimeFlag bool

	updateTime     string // 任务的更新时间的Unix时间戳（单位为秒）;创建任务时update_time与create_time相同
	updateTimeFlag bool

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

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

	canEdit     bool // 此字段用于控制该任务在飞书任务中心是否可编辑，默认为false;<md-alert>;已经废弃，向前兼容故仍然保留，但不推荐使用;</md-alert>
	canEditFlag bool

	custom     string // 自定义完成配置。;此字段用于设置完成任务时的页面跳转，或展示提示语。详细参见：[任务字段补充说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/Supplementary-directions-of-task-fields)
	customFlag bool

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

	followers     []*Follower // 任务的关注者
	followersFlag bool

	collaborators     []*Collaborator // 任务的执行者
	collaboratorsFlag bool

	collaboratorIds     []string // 创建任务时添加的执行者用户id列表。;传入的值为 user_id 或 open_id ，由user_id_type 决定。user_id和open_id的获取可见文档：[如何获取相关id](https://open.feishu.cn/document/home/user-identity-introduction/how-to-get)。
	collaboratorIdsFlag bool

	followerIds     []string // 创建任务时添加的关注者用户id列表。;传入的值为 user_id 或 open_id ，由user_id_type 决定。user_id和open_id的获取可见文档：[如何获取相关id](https://open.feishu.cn/document/home/user-identity-introduction/how-to-get)。
	followerIdsFlag bool

	repeatRule     string // 重复任务的规则表达式。;语法格式参见[RRule语法规范](https://www.ietf.org/rfc/rfc2445.txt) 4.3.10小节
	repeatRuleFlag bool

	richSummary     string // 富文本任务标题。语法格式参见[Markdown模块](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/markdown-module);。创建任务时，任务标题(summary字段)和任务富文本标题(rich_summary字段)不能同时为空，需要至少填充其中一个字段。
	richSummaryFlag bool

	richDescription     string // 富文本任务备注。语法格式参见[Markdown模块](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/markdown-module)
	richDescriptionFlag bool
}

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

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

// 任务的标题，类型为文本字符串。;如果要在任务标题中插入 URL 或者 @某个用户，请使用rich_summary字段。;创建任务时，任务标题(summary字段)和任务富文本标题(rich_summary字段)不能同时为空，需要至少填充其中一个字段。;<md-alert>;任务标题和任务富文本标题同时存在时只使用富文本标题。;</md-alert>
//
// 示例值：完成本季度OKR编写
func (builder *TaskBuilder) Summary(summary string) *TaskBuilder {
	builder.summary = summary
	builder.summaryFlag = true
	return builder
}

// 任务的描述，类型为文本字符串。;如果要在任务描述中插入 URL 或者 @某个用户，请使用rich_description字段。;<md-alert>;任务备注和任务富文本备注同时存在时只使用富文本备注。;</md-alert>
//
// 示例值：对本次会议内容复盘总结，编写更新本季度OKR
func (builder *TaskBuilder) Description(description string) *TaskBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 任务的完成时间戳（单位为秒），完成时间为0则表示任务尚未完成。;不支持部分完成，只有整个任务完成，该字段才会有非0值。
//
// 示例值：1623499200
func (builder *TaskBuilder) CompleteTime(completeTime string) *TaskBuilder {
	builder.completeTime = completeTime
	builder.completeTimeFlag = true
	return builder
}

// 任务的创建者 ID。;其中查询字段 user_id_type 是用于控制返回体中 creator_id 的类型，不传时默认返回 open_id。;特别的，使用tenant_access_token 调用接口时，如果是user_id_type是openid，则返回代表该应用身份的openid；当user_id_type为user_id时，不返回creator_id。原因是user_id代表一个真实飞书用户的id，应用身份没有user_id。使用user_access_token调用接口正常返回创建者。
//
// 示例值：ou_99e1a581b36ecc4862cbfbce473f346a
func (builder *TaskBuilder) CreatorId(creatorId string) *TaskBuilder {
	builder.creatorId = creatorId
	builder.creatorIdFlag = true
	return builder
}

// 附属信息。;接入方可以传入base64 编码后的自定义的数据。用户如果需要对当前任务备注信息，但对外不显示，可使用该字段进行存储。;该数据会在获取任务详情时，原样返回给用户。
//
// 示例值：dGVzdA==
func (builder *TaskBuilder) Extra(extra string) *TaskBuilder {
	builder.extra = extra
	builder.extraFlag = true
	return builder
}

// 任务的创建时间的Unix时间戳（单位为秒）
//
// 示例值：1623392486
func (builder *TaskBuilder) CreateTime(createTime string) *TaskBuilder {
	builder.createTime = createTime
	builder.createTimeFlag = true
	return builder
}

// 任务的更新时间的Unix时间戳（单位为秒）;创建任务时update_time与create_time相同
//
// 示例值：1623392486
func (builder *TaskBuilder) UpdateTime(updateTime string) *TaskBuilder {
	builder.updateTime = updateTime
	builder.updateTimeFlag = true
	return builder
}

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

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

// 此字段用于控制该任务在飞书任务中心是否可编辑，默认为false;<md-alert>;已经废弃，向前兼容故仍然保留，但不推荐使用;</md-alert>
//
// 示例值：true
func (builder *TaskBuilder) CanEdit(canEdit bool) *TaskBuilder {
	builder.canEdit = canEdit
	builder.canEditFlag = true
	return builder
}

// 自定义完成配置。;此字段用于设置完成任务时的页面跳转，或展示提示语。详细参见：[任务字段补充说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/Supplementary-directions-of-task-fields)
//
// 示例值：{\"custom_complete\":{\"android\":{\"href\":\"https://www.feishu.cn/\",\"tip\":{\"zh_cn\":\"你好\",\"en_us\":\"hello\"}},\"ios\":{\"href\":\"https://www.feishu.cn/\",\"tip\":{\"zh_cn\":\"你好\",\"en_us\":\"hello\"}},\"pc\":{\"href\":\"https://www.feishu.cn/\",\"tip\":{\"zh_cn\":\"你好\",\"en_us\":\"hello\"}}}}
func (builder *TaskBuilder) Custom(custom string) *TaskBuilder {
	builder.custom = custom
	builder.customFlag = true
	return builder
}

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

// 任务的关注者
//
// 示例值：ou_03c21c80caea2c816665f8056dc59027
func (builder *TaskBuilder) Followers(followers []*Follower) *TaskBuilder {
	builder.followers = followers
	builder.followersFlag = true
	return builder
}

// 任务的执行者
//
// 示例值：ou_558d4999baae26e32aa2fd9bb228660b
func (builder *TaskBuilder) Collaborators(collaborators []*Collaborator) *TaskBuilder {
	builder.collaborators = collaborators
	builder.collaboratorsFlag = true
	return builder
}

// 创建任务时添加的执行者用户id列表。;传入的值为 user_id 或 open_id ，由user_id_type 决定。user_id和open_id的获取可见文档：[如何获取相关id](https://open.feishu.cn/document/home/user-identity-introduction/how-to-get)。
//
// 示例值：["ou_1400208f15333e20e11339d39067844b", "ou_84ed6312949945c8ae6168f10829e9e6"]
func (builder *TaskBuilder) CollaboratorIds(collaboratorIds []string) *TaskBuilder {
	builder.collaboratorIds = collaboratorIds
	builder.collaboratorIdsFlag = true
	return builder
}

// 创建任务时添加的关注者用户id列表。;传入的值为 user_id 或 open_id ，由user_id_type 决定。user_id和open_id的获取可见文档：[如何获取相关id](https://open.feishu.cn/document/home/user-identity-introduction/how-to-get)。
//
// 示例值：["ou_1400208f15333e20e11339d39067844b", "ou_84ed6312949945c8ae6168f10829e9e6"]
func (builder *TaskBuilder) FollowerIds(followerIds []string) *TaskBuilder {
	builder.followerIds = followerIds
	builder.followerIdsFlag = true
	return builder
}

// 重复任务的规则表达式。;语法格式参见[RRule语法规范](https://www.ietf.org/rfc/rfc2445.txt) 4.3.10小节
//
// 示例值：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
}

// 富文本任务标题。语法格式参见[Markdown模块](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/markdown-module);。创建任务时，任务标题(summary字段)和任务富文本标题(rich_summary字段)不能同时为空，需要至少填充其中一个字段。
//
// 示例值：完成本季度OKR编写\[飞书开放平台](https://open.feishu.cn/)
func (builder *TaskBuilder) RichSummary(richSummary string) *TaskBuilder {
	builder.richSummary = richSummary
	builder.richSummaryFlag = true
	return builder
}

// 富文本任务备注。语法格式参见[Markdown模块](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/markdown-module)
//
// 示例值：对本次会议内容复盘总结，编写更新本季度OKR\[飞书开放平台](https://open.feishu.cn/)
func (builder *TaskBuilder) RichDescription(richDescription string) *TaskBuilder {
	builder.richDescription = richDescription
	builder.richDescriptionFlag = true
	return builder
}

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

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

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

	}
	if builder.completeTimeFlag {
		req.CompleteTime = &builder.completeTime

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

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

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

	}
	if builder.updateTimeFlag {
		req.UpdateTime = &builder.updateTime

	}
	if builder.dueFlag {
		req.Due = builder.due
	}
	if builder.originFlag {
		req.Origin = builder.origin
	}
	if builder.canEditFlag {
		req.CanEdit = &builder.canEdit

	}
	if builder.customFlag {
		req.Custom = &builder.custom

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

	}
	if builder.followersFlag {
		req.Followers = builder.followers
	}
	if builder.collaboratorsFlag {
		req.Collaborators = builder.collaborators
	}
	if builder.collaboratorIdsFlag {
		req.CollaboratorIds = builder.collaboratorIds
	}
	if builder.followerIdsFlag {
		req.FollowerIds = builder.followerIds
	}
	if builder.repeatRuleFlag {
		req.RepeatRule = &builder.repeatRule

	}
	if builder.richSummaryFlag {
		req.RichSummary = &builder.richSummary

	}
	if builder.richDescriptionFlag {
		req.RichDescription = &builder.richDescription

	}
	return req
}

type Tasklist struct {
}

type TasklistBuilder struct {
}

func NewTasklistBuilder() *TasklistBuilder {
	builder := &TasklistBuilder{}
	return builder
}

func (builder *TasklistBuilder) Build() *Tasklist {
	req := &Tasklist{}
	return req
}

type UserId struct {
	UserId *string `json:"user_id,omitempty"` //

	OpenId *string `json:"open_id,omitempty"` //

	UnionId *string `json:"union_id,omitempty"` //
}

type UserIdBuilder struct {
	userId     string //
	userIdFlag bool

	openId     string //
	openIdFlag bool

	unionId     string //
	unionIdFlag bool
}

func NewUserIdBuilder() *UserIdBuilder {
	builder := &UserIdBuilder{}
	return builder
}

//
//
// 示例值：
func (builder *UserIdBuilder) UserId(userId string) *UserIdBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

//
//
// 示例值：
func (builder *UserIdBuilder) OpenId(openId string) *UserIdBuilder {
	builder.openId = openId
	builder.openIdFlag = true
	return builder
}

//
//
// 示例值：
func (builder *UserIdBuilder) UnionId(unionId string) *UserIdBuilder {
	builder.unionId = unionId
	builder.unionIdFlag = true
	return builder
}

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

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

	}
	if builder.unionIdFlag {
		req.UnionId = &builder.unionId

	}
	return req
}

type UserIdList struct {
	UserIdList []*UserId `json:"user_id_list,omitempty"` // 用户 ID 列表
}

type UserIdListBuilder struct {
	userIdList     []*UserId // 用户 ID 列表
	userIdListFlag bool
}

func NewUserIdListBuilder() *UserIdListBuilder {
	builder := &UserIdListBuilder{}
	return builder
}

// 用户 ID 列表
//
// 示例值：
func (builder *UserIdListBuilder) UserIdList(userIdList []*UserId) *UserIdListBuilder {
	builder.userIdList = userIdList
	builder.userIdListFlag = true
	return builder
}

func (builder *UserIdListBuilder) Build() *UserIdList {
	req := &UserIdList{}
	if builder.userIdListFlag {
		req.UserIdList = builder.userIdList
	}
	return req
}

type BatchDeleteCollaboratorTaskReqBuilder struct {
	apiReq       *larkcore.ApiReq
	collaborator *Collaborator
}

func NewBatchDeleteCollaboratorTaskReqBuilder() *BatchDeleteCollaboratorTaskReqBuilder {
	builder := &BatchDeleteCollaboratorTaskReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 任务ID
//
// 示例值：83912691-2e43-47fc-94a4-d512e03984fa
func (builder *BatchDeleteCollaboratorTaskReqBuilder) TaskId(taskId string) *BatchDeleteCollaboratorTaskReqBuilder {
	builder.apiReq.PathParams.Set("task_id", fmt.Sprint(taskId))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *BatchDeleteCollaboratorTaskReqBuilder) UserIdType(userIdType string) *BatchDeleteCollaboratorTaskReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

// 该接口用于批量删除执行者
func (builder *BatchDeleteCollaboratorTaskReqBuilder) Collaborator(collaborator *Collaborator) *BatchDeleteCollaboratorTaskReqBuilder {
	builder.collaborator = collaborator
	return builder
}

func (builder *BatchDeleteCollaboratorTaskReqBuilder) Build() *BatchDeleteCollaboratorTaskReq {
	req := &BatchDeleteCollaboratorTaskReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.collaborator
	return req
}

type BatchDeleteCollaboratorTaskReq struct {
	apiReq       *larkcore.ApiReq
	Collaborator *Collaborator `body:""`
}

type BatchDeleteCollaboratorTaskRespData struct {
	Collaborators []string `json:"collaborators,omitempty"` // 实际删除的执行人用户ID列表
}

type BatchDeleteCollaboratorTaskResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *BatchDeleteCollaboratorTaskRespData `json:"data"` // 业务数据
}

func (resp *BatchDeleteCollaboratorTaskResp) Success() bool {
	return resp.Code == 0
}

type BatchDeleteFollowerTaskReqBuilder struct {
	apiReq   *larkcore.ApiReq
	follower *Follower
}

func NewBatchDeleteFollowerTaskReqBuilder() *BatchDeleteFollowerTaskReqBuilder {
	builder := &BatchDeleteFollowerTaskReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 任务ID
//
// 示例值：83912691-2e43-47fc-94a4-d512e03984fa
func (builder *BatchDeleteFollowerTaskReqBuilder) TaskId(taskId string) *BatchDeleteFollowerTaskReqBuilder {
	builder.apiReq.PathParams.Set("task_id", fmt.Sprint(taskId))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *BatchDeleteFollowerTaskReqBuilder) UserIdType(userIdType string) *BatchDeleteFollowerTaskReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

// 该接口用于批量删除关注人
func (builder *BatchDeleteFollowerTaskReqBuilder) Follower(follower *Follower) *BatchDeleteFollowerTaskReqBuilder {
	builder.follower = follower
	return builder
}

func (builder *BatchDeleteFollowerTaskReqBuilder) Build() *BatchDeleteFollowerTaskReq {
	req := &BatchDeleteFollowerTaskReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.follower
	return req
}

type BatchDeleteFollowerTaskReq struct {
	apiReq   *larkcore.ApiReq
	Follower *Follower `body:""`
}

type BatchDeleteFollowerTaskRespData struct {
	Followers []string `json:"followers,omitempty"` // 实际删除的关注人用户ID列表
}

type BatchDeleteFollowerTaskResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *BatchDeleteFollowerTaskRespData `json:"data"` // 业务数据
}

func (resp *BatchDeleteFollowerTaskResp) Success() bool {
	return resp.Code == 0
}

type CompleteTaskReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewCompleteTaskReqBuilder() *CompleteTaskReqBuilder {
	builder := &CompleteTaskReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 任务 ID，可通过[创建任务](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task/create)时响应体中的id字段获取
//
// 示例值：bb54ab99-d360-434f-bcaa-a4cc4c05840e
func (builder *CompleteTaskReqBuilder) TaskId(taskId string) *CompleteTaskReqBuilder {
	builder.apiReq.PathParams.Set("task_id", fmt.Sprint(taskId))
	return builder
}

func (builder *CompleteTaskReqBuilder) Build() *CompleteTaskReq {
	req := &CompleteTaskReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	return req
}

type CompleteTaskReq struct {
	apiReq *larkcore.ApiReq
}

type CompleteTaskResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *CompleteTaskResp) Success() bool {
	return resp.Code == 0
}

type CreateTaskReqBuilder struct {
	apiReq *larkcore.ApiReq
	task   *Task
}

func NewCreateTaskReqBuilder() *CreateTaskReqBuilder {
	builder := &CreateTaskReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *CreateTaskReqBuilder) UserIdType(userIdType string) *CreateTaskReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

// 该接口可以创建一个任务，支持填写任务的基本信息，包括任务的标题，描述及协作者等。;在此基础上，创建任务时可以设置截止时间和重复规则，将任务设置为定期执行的重复任务。通过添加协作者，则可以让其他用户协同完成该任务。;此外，接口也提供了一些支持自定义内容的字段，调用方可以实现定制化效果，如完成任务后跳转到指定结束界面。
func (builder *CreateTaskReqBuilder) Task(task *Task) *CreateTaskReqBuilder {
	builder.task = task
	return builder
}

func (builder *CreateTaskReqBuilder) Build() *CreateTaskReq {
	req := &CreateTaskReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.task
	return req
}

type CreateTaskReq struct {
	apiReq *larkcore.ApiReq
	Task   *Task `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
}

// 任务 ID
//
// 示例值：83912691-2e43-47fc-94a4-d512e03984fa
func (builder *DeleteTaskReqBuilder) TaskId(taskId string) *DeleteTaskReqBuilder {
	builder.apiReq.PathParams.Set("task_id", fmt.Sprint(taskId))
	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
}

// 任务 ID
//
// 示例值：83912691-2e43-47fc-94a4-d512e03984fa
func (builder *GetTaskReqBuilder) TaskId(taskId string) *GetTaskReqBuilder {
	builder.apiReq.PathParams.Set("task_id", fmt.Sprint(taskId))
	return builder
}

// 此次调用中使用的用户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
}

// 分页大小
//
// 示例值：10
func (builder *ListTaskReqBuilder) PageSize(pageSize int) *ListTaskReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 分页标记，第一次请求不填，表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该 page_token 获取查询结果
//
// 示例值：MTYzMTg3ODUxNQ==
func (builder *ListTaskReqBuilder) PageToken(pageToken string) *ListTaskReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

// 范围查询任务时，查询的起始时间。不填时默认起始时间为第一个任务的创建时间。
//
// 示例值：1652323331
func (builder *ListTaskReqBuilder) StartCreateTime(startCreateTime string) *ListTaskReqBuilder {
	builder.apiReq.QueryParams.Set("start_create_time", fmt.Sprint(startCreateTime))
	return builder
}

// 范围查询任务时，查询的结束时间。不填时默认结束时间为最后一个任务的创建时间。
//
// 示例值：1652323335
func (builder *ListTaskReqBuilder) EndCreateTime(endCreateTime string) *ListTaskReqBuilder {
	builder.apiReq.QueryParams.Set("end_create_time", fmt.Sprint(endCreateTime))
	return builder
}

// 可用于查询时过滤任务完成状态。true表示只返回已完成的任务，false表示只返回未完成的任务。不填时表示同时返回两种完成状态的任务。
//
// 示例值：false
func (builder *ListTaskReqBuilder) TaskCompleted(taskCompleted bool) *ListTaskReqBuilder {
	builder.apiReq.QueryParams.Set("task_completed", fmt.Sprint(taskCompleted))
	return builder
}

// 此次调用中使用的用户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"` // 分页标记，分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该 page_token 获取查询结果

	HasMore *bool `json:"has_more,omitempty"` // true
}

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     *Task // 被更新的任务实体基础信息
	taskFlag bool

	updateFields     []string // 指定需要更新的任务字段，否则服务端将不知道更新哪些字段
	updateFieldsFlag bool
}

func NewPatchTaskReqBodyBuilder() *PatchTaskReqBodyBuilder {
	builder := &PatchTaskReqBodyBuilder{}
	return builder
}

// 被更新的任务实体基础信息
//
//示例值：
func (builder *PatchTaskReqBodyBuilder) Task(task *Task) *PatchTaskReqBodyBuilder {
	builder.task = task
	builder.taskFlag = true
	return builder
}

// 指定需要更新的任务字段，否则服务端将不知道更新哪些字段
//
//示例值：["summary"]
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             *Task
	taskFlag         bool
	updateFields     []string
	updateFieldsFlag bool
}

func NewPatchTaskPathReqBodyBuilder() *PatchTaskPathReqBodyBuilder {
	builder := &PatchTaskPathReqBodyBuilder{}
	return builder
}

// 被更新的任务实体基础信息
//
// 示例值：
func (builder *PatchTaskPathReqBodyBuilder) Task(task *Task) *PatchTaskPathReqBodyBuilder {
	builder.task = task
	builder.taskFlag = true
	return builder
}

// 指定需要更新的任务字段，否则服务端将不知道更新哪些字段
//
// 示例值：["summary"]
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
//
// 示例值：83912691-2e43-47fc-94a4-d512e03984fa
func (builder *PatchTaskReqBuilder) TaskId(taskId string) *PatchTaskReqBuilder {
	builder.apiReq.PathParams.Set("task_id", fmt.Sprint(taskId))
	return builder
}

// 此次调用中使用的用户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 *Task `json:"task,omitempty"` // 被更新的任务实体基础信息

	UpdateFields []string `json:"update_fields,omitempty"` // 指定需要更新的任务字段，否则服务端将不知道更新哪些字段
}

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 UncompleteTaskReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewUncompleteTaskReqBuilder() *UncompleteTaskReqBuilder {
	builder := &UncompleteTaskReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 任务 ID
//
// 示例值：bb54ab99-d360-434f-bcaa-a4cc4c05840e
func (builder *UncompleteTaskReqBuilder) TaskId(taskId string) *UncompleteTaskReqBuilder {
	builder.apiReq.PathParams.Set("task_id", fmt.Sprint(taskId))
	return builder
}

func (builder *UncompleteTaskReqBuilder) Build() *UncompleteTaskReq {
	req := &UncompleteTaskReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	return req
}

type UncompleteTaskReq struct {
	apiReq *larkcore.ApiReq
}

type UncompleteTaskResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *UncompleteTaskResp) Success() bool {
	return resp.Code == 0
}

type CreateTaskCollaboratorReqBuilder struct {
	apiReq       *larkcore.ApiReq
	collaborator *Collaborator
}

func NewCreateTaskCollaboratorReqBuilder() *CreateTaskCollaboratorReqBuilder {
	builder := &CreateTaskCollaboratorReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 任务 ID，可通过[创建任务](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task/create)时响应体中的id字段获取
//
// 示例值：83912691-2e43-47fc-94a4-d512e03984fa
func (builder *CreateTaskCollaboratorReqBuilder) TaskId(taskId string) *CreateTaskCollaboratorReqBuilder {
	builder.apiReq.PathParams.Set("task_id", fmt.Sprint(taskId))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *CreateTaskCollaboratorReqBuilder) UserIdType(userIdType string) *CreateTaskCollaboratorReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

// 该接口用于新增任务执行者，一次性可以添加多个执行者。;只有任务的创建者和执行者才能添加执行者，关注人无权限添加。
func (builder *CreateTaskCollaboratorReqBuilder) Collaborator(collaborator *Collaborator) *CreateTaskCollaboratorReqBuilder {
	builder.collaborator = collaborator
	return builder
}

func (builder *CreateTaskCollaboratorReqBuilder) Build() *CreateTaskCollaboratorReq {
	req := &CreateTaskCollaboratorReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.collaborator
	return req
}

type CreateTaskCollaboratorReq struct {
	apiReq       *larkcore.ApiReq
	Collaborator *Collaborator `body:""`
}

type CreateTaskCollaboratorRespData struct {
	Collaborator *Collaborator `json:"collaborator,omitempty"` // 返回创建成功后的任务执行者列表
}

type CreateTaskCollaboratorResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *CreateTaskCollaboratorRespData `json:"data"` // 业务数据
}

func (resp *CreateTaskCollaboratorResp) Success() bool {
	return resp.Code == 0
}

type DeleteTaskCollaboratorReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewDeleteTaskCollaboratorReqBuilder() *DeleteTaskCollaboratorReqBuilder {
	builder := &DeleteTaskCollaboratorReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 任务 ID
//
// 示例值：83912691-2e43-47fc-94a4-d512e03984fa
func (builder *DeleteTaskCollaboratorReqBuilder) TaskId(taskId string) *DeleteTaskCollaboratorReqBuilder {
	builder.apiReq.PathParams.Set("task_id", fmt.Sprint(taskId))
	return builder
}

// 任务执行者 ID（Open ID或User ID，由user_id_type指定）
//
// 示例值：ou_99e1a581b36ecc4862cbfbce123f346a
func (builder *DeleteTaskCollaboratorReqBuilder) CollaboratorId(collaboratorId string) *DeleteTaskCollaboratorReqBuilder {
	builder.apiReq.PathParams.Set("collaborator_id", fmt.Sprint(collaboratorId))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *DeleteTaskCollaboratorReqBuilder) UserIdType(userIdType string) *DeleteTaskCollaboratorReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

func (builder *DeleteTaskCollaboratorReqBuilder) Build() *DeleteTaskCollaboratorReq {
	req := &DeleteTaskCollaboratorReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type DeleteTaskCollaboratorReq struct {
	apiReq *larkcore.ApiReq
}

type DeleteTaskCollaboratorResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *DeleteTaskCollaboratorResp) Success() bool {
	return resp.Code == 0
}

type ListTaskCollaboratorReqBuilder struct {
	apiReq *larkcore.ApiReq
	limit  int // 最大返回多少记录，当使用迭代器访问时才有效
}

func NewListTaskCollaboratorReqBuilder() *ListTaskCollaboratorReqBuilder {
	builder := &ListTaskCollaboratorReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 最大返回多少记录，当使用迭代器访问时才有效
func (builder *ListTaskCollaboratorReqBuilder) Limit(limit int) *ListTaskCollaboratorReqBuilder {
	builder.limit = limit
	return builder
}

// 任务 ID
//
// 示例值：0d38e26e-190a-49e9-93a2-35067763ed1f
func (builder *ListTaskCollaboratorReqBuilder) TaskId(taskId string) *ListTaskCollaboratorReqBuilder {
	builder.apiReq.PathParams.Set("task_id", fmt.Sprint(taskId))
	return builder
}

// 分页大小
//
// 示例值：50
func (builder *ListTaskCollaboratorReqBuilder) PageSize(pageSize int) *ListTaskCollaboratorReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 分页标记，第一次请求不填，表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该 page_token 获取查询结果
//
// 示例值：「上次返回的page_token」
func (builder *ListTaskCollaboratorReqBuilder) PageToken(pageToken string) *ListTaskCollaboratorReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *ListTaskCollaboratorReqBuilder) UserIdType(userIdType string) *ListTaskCollaboratorReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

func (builder *ListTaskCollaboratorReqBuilder) Build() *ListTaskCollaboratorReq {
	req := &ListTaskCollaboratorReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.Limit = builder.limit
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type ListTaskCollaboratorReq struct {
	apiReq *larkcore.ApiReq
	Limit  int // 最多返回多少记录，只有在使用迭代器访问时，才有效

}

type ListTaskCollaboratorRespData struct {
	Items []*Collaborator `json:"items,omitempty"` // 返回的执行者ID列表

	PageToken *string `json:"page_token,omitempty"` // 分页标记，分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该 page_token 获取查询结果

	HasMore *bool `json:"has_more,omitempty"` // 是否还有更多数据
}

type ListTaskCollaboratorResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ListTaskCollaboratorRespData `json:"data"` // 业务数据
}

func (resp *ListTaskCollaboratorResp) Success() bool {
	return resp.Code == 0
}

type CreateTaskCommentReqBuilder struct {
	apiReq  *larkcore.ApiReq
	comment *Comment
}

func NewCreateTaskCommentReqBuilder() *CreateTaskCommentReqBuilder {
	builder := &CreateTaskCommentReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 任务 ID
//
// 示例值：83912691-2e43-47fc-94a4-d512e03984fa
func (builder *CreateTaskCommentReqBuilder) TaskId(taskId string) *CreateTaskCommentReqBuilder {
	builder.apiReq.PathParams.Set("task_id", fmt.Sprint(taskId))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *CreateTaskCommentReqBuilder) UserIdType(userIdType string) *CreateTaskCommentReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

// 该接口用于创建和回复任务的评论。当parent_id字段为0时，为创建评论；当parent_id不为0时，为回复某条评论
func (builder *CreateTaskCommentReqBuilder) Comment(comment *Comment) *CreateTaskCommentReqBuilder {
	builder.comment = comment
	return builder
}

func (builder *CreateTaskCommentReqBuilder) Build() *CreateTaskCommentReq {
	req := &CreateTaskCommentReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.comment
	return req
}

type CreateTaskCommentReq struct {
	apiReq  *larkcore.ApiReq
	Comment *Comment `body:""`
}

type CreateTaskCommentRespData struct {
	Comment *Comment `json:"comment,omitempty"` // 返回创建好的任务评论
}

type CreateTaskCommentResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *CreateTaskCommentRespData `json:"data"` // 业务数据
}

func (resp *CreateTaskCommentResp) Success() bool {
	return resp.Code == 0
}

type DeleteTaskCommentReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewDeleteTaskCommentReqBuilder() *DeleteTaskCommentReqBuilder {
	builder := &DeleteTaskCommentReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 任务ID
//
// 示例值：83912691-2e43-47fc-94a4-d512e03984fa
func (builder *DeleteTaskCommentReqBuilder) TaskId(taskId string) *DeleteTaskCommentReqBuilder {
	builder.apiReq.PathParams.Set("task_id", fmt.Sprint(taskId))
	return builder
}

// 评论ID
//
// 示例值：6937231762296684564
func (builder *DeleteTaskCommentReqBuilder) CommentId(commentId string) *DeleteTaskCommentReqBuilder {
	builder.apiReq.PathParams.Set("comment_id", fmt.Sprint(commentId))
	return builder
}

func (builder *DeleteTaskCommentReqBuilder) Build() *DeleteTaskCommentReq {
	req := &DeleteTaskCommentReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	return req
}

type DeleteTaskCommentReq struct {
	apiReq *larkcore.ApiReq
}

type DeleteTaskCommentResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *DeleteTaskCommentResp) Success() bool {
	return resp.Code == 0
}

type GetTaskCommentReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewGetTaskCommentReqBuilder() *GetTaskCommentReqBuilder {
	builder := &GetTaskCommentReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 任务ID
//
// 示例值：83912691-2e43-47fc-94a4-d512e03984fa
func (builder *GetTaskCommentReqBuilder) TaskId(taskId string) *GetTaskCommentReqBuilder {
	builder.apiReq.PathParams.Set("task_id", fmt.Sprint(taskId))
	return builder
}

// 评论ID
//
// 示例值：6937231762296684564
func (builder *GetTaskCommentReqBuilder) CommentId(commentId string) *GetTaskCommentReqBuilder {
	builder.apiReq.PathParams.Set("comment_id", fmt.Sprint(commentId))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *GetTaskCommentReqBuilder) UserIdType(userIdType string) *GetTaskCommentReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

func (builder *GetTaskCommentReqBuilder) Build() *GetTaskCommentReq {
	req := &GetTaskCommentReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type GetTaskCommentReq struct {
	apiReq *larkcore.ApiReq
}

type GetTaskCommentRespData struct {
	Comment *Comment `json:"comment,omitempty"` // 返回新的任务评论详情
}

type GetTaskCommentResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *GetTaskCommentRespData `json:"data"` // 业务数据
}

func (resp *GetTaskCommentResp) Success() bool {
	return resp.Code == 0
}

type ListTaskCommentReqBuilder struct {
	apiReq *larkcore.ApiReq
	limit  int // 最大返回多少记录，当使用迭代器访问时才有效
}

func NewListTaskCommentReqBuilder() *ListTaskCommentReqBuilder {
	builder := &ListTaskCommentReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 最大返回多少记录，当使用迭代器访问时才有效
func (builder *ListTaskCommentReqBuilder) Limit(limit int) *ListTaskCommentReqBuilder {
	builder.limit = limit
	return builder
}

// 任务id
//
// 示例值："83912691-2e43-47fc-94a4-d512e03984fa"
func (builder *ListTaskCommentReqBuilder) TaskId(taskId string) *ListTaskCommentReqBuilder {
	builder.apiReq.PathParams.Set("task_id", fmt.Sprint(taskId))
	return builder
}

// 分页大小
//
// 示例值：10
func (builder *ListTaskCommentReqBuilder) PageSize(pageSize int) *ListTaskCommentReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 分页标记，第一次请求不填，表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该 page_token获取查询结果
//
// 示例值："MTYzMTg3ODUxNQ=="
func (builder *ListTaskCommentReqBuilder) PageToken(pageToken string) *ListTaskCommentReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

// 评论排序标记，可按照评论时间从小到大查询，或者评论时间从大到小查询，不填默认按照从小到大
//
// 示例值：0
func (builder *ListTaskCommentReqBuilder) ListDirection(listDirection int) *ListTaskCommentReqBuilder {
	builder.apiReq.QueryParams.Set("list_direction", fmt.Sprint(listDirection))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *ListTaskCommentReqBuilder) UserIdType(userIdType string) *ListTaskCommentReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

func (builder *ListTaskCommentReqBuilder) Build() *ListTaskCommentReq {
	req := &ListTaskCommentReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.Limit = builder.limit
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type ListTaskCommentReq struct {
	apiReq *larkcore.ApiReq
	Limit  int // 最多返回多少记录，只有在使用迭代器访问时，才有效

}

type ListTaskCommentRespData struct {
	Items []*Comment `json:"items,omitempty"` // 返回的评论列表

	PageToken *string `json:"page_token,omitempty"` // 分页标记，分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该 page_token 获取查询结果

	HasMore *bool `json:"has_more,omitempty"` // 是否还有更多数据
}

type ListTaskCommentResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ListTaskCommentRespData `json:"data"` // 业务数据
}

func (resp *ListTaskCommentResp) Success() bool {
	return resp.Code == 0
}

type UpdateTaskCommentReqBodyBuilder struct {
	content     string // 新的评论内容
	contentFlag bool

	richContent     string // 新的富文本评论内容（优先使用）
	richContentFlag bool
}

func NewUpdateTaskCommentReqBodyBuilder() *UpdateTaskCommentReqBodyBuilder {
	builder := &UpdateTaskCommentReqBodyBuilder{}
	return builder
}

// 新的评论内容
//
//示例值：飞流直下三千尺，疑是银河落九天
func (builder *UpdateTaskCommentReqBodyBuilder) Content(content string) *UpdateTaskCommentReqBodyBuilder {
	builder.content = content
	builder.contentFlag = true
	return builder
}

// 新的富文本评论内容（优先使用）
//
//示例值：飞流直下三千尺，疑是银河落九天<at id=7058204817822318612></at>
func (builder *UpdateTaskCommentReqBodyBuilder) RichContent(richContent string) *UpdateTaskCommentReqBodyBuilder {
	builder.richContent = richContent
	builder.richContentFlag = true
	return builder
}

func (builder *UpdateTaskCommentReqBodyBuilder) Build() *UpdateTaskCommentReqBody {
	req := &UpdateTaskCommentReqBody{}
	if builder.contentFlag {
		req.Content = &builder.content
	}
	if builder.richContentFlag {
		req.RichContent = &builder.richContent
	}
	return req
}

type UpdateTaskCommentPathReqBodyBuilder struct {
	content         string
	contentFlag     bool
	richContent     string
	richContentFlag bool
}

func NewUpdateTaskCommentPathReqBodyBuilder() *UpdateTaskCommentPathReqBodyBuilder {
	builder := &UpdateTaskCommentPathReqBodyBuilder{}
	return builder
}

// 新的评论内容
//
// 示例值：飞流直下三千尺，疑是银河落九天
func (builder *UpdateTaskCommentPathReqBodyBuilder) Content(content string) *UpdateTaskCommentPathReqBodyBuilder {
	builder.content = content
	builder.contentFlag = true
	return builder
}

// 新的富文本评论内容（优先使用）
//
// 示例值：飞流直下三千尺，疑是银河落九天<at id=7058204817822318612></at>
func (builder *UpdateTaskCommentPathReqBodyBuilder) RichContent(richContent string) *UpdateTaskCommentPathReqBodyBuilder {
	builder.richContent = richContent
	builder.richContentFlag = true
	return builder
}

func (builder *UpdateTaskCommentPathReqBodyBuilder) Build() (*UpdateTaskCommentReqBody, error) {
	req := &UpdateTaskCommentReqBody{}
	if builder.contentFlag {
		req.Content = &builder.content
	}
	if builder.richContentFlag {
		req.RichContent = &builder.richContent
	}
	return req, nil
}

type UpdateTaskCommentReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *UpdateTaskCommentReqBody
}

func NewUpdateTaskCommentReqBuilder() *UpdateTaskCommentReqBuilder {
	builder := &UpdateTaskCommentReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 任务ID
//
// 示例值：83912691-2e43-47fc-94a4-d512e03984fa
func (builder *UpdateTaskCommentReqBuilder) TaskId(taskId string) *UpdateTaskCommentReqBuilder {
	builder.apiReq.PathParams.Set("task_id", fmt.Sprint(taskId))
	return builder
}

// 评论 ID
//
// 示例值：6937231762296684564
func (builder *UpdateTaskCommentReqBuilder) CommentId(commentId string) *UpdateTaskCommentReqBuilder {
	builder.apiReq.PathParams.Set("comment_id", fmt.Sprint(commentId))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *UpdateTaskCommentReqBuilder) UserIdType(userIdType string) *UpdateTaskCommentReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

// 该接口用于更新评论内容
func (builder *UpdateTaskCommentReqBuilder) Body(body *UpdateTaskCommentReqBody) *UpdateTaskCommentReqBuilder {
	builder.body = body
	return builder
}

func (builder *UpdateTaskCommentReqBuilder) Build() *UpdateTaskCommentReq {
	req := &UpdateTaskCommentReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.body
	return req
}

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

	RichContent *string `json:"rich_content,omitempty"` // 新的富文本评论内容（优先使用）
}

type UpdateTaskCommentReq struct {
	apiReq *larkcore.ApiReq
	Body   *UpdateTaskCommentReqBody `body:""`
}

type UpdateTaskCommentRespData struct {
	Comment *Comment `json:"comment,omitempty"` // 返回修改后的任务评论详情
}

type UpdateTaskCommentResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *UpdateTaskCommentRespData `json:"data"` // 业务数据
}

func (resp *UpdateTaskCommentResp) Success() bool {
	return resp.Code == 0
}

type CreateTaskFollowerReqBuilder struct {
	apiReq   *larkcore.ApiReq
	follower *Follower
}

func NewCreateTaskFollowerReqBuilder() *CreateTaskFollowerReqBuilder {
	builder := &CreateTaskFollowerReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 任务 ID
//
// 示例值：83912691-2e43-47fc-94a4-d512e03984fa
func (builder *CreateTaskFollowerReqBuilder) TaskId(taskId string) *CreateTaskFollowerReqBuilder {
	builder.apiReq.PathParams.Set("task_id", fmt.Sprint(taskId))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *CreateTaskFollowerReqBuilder) UserIdType(userIdType string) *CreateTaskFollowerReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

// 该接口用于创建任务关注人。可以一次性添加多位关注人。关注人ID要使用表示用户的ID。
func (builder *CreateTaskFollowerReqBuilder) Follower(follower *Follower) *CreateTaskFollowerReqBuilder {
	builder.follower = follower
	return builder
}

func (builder *CreateTaskFollowerReqBuilder) Build() *CreateTaskFollowerReq {
	req := &CreateTaskFollowerReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.follower
	return req
}

type CreateTaskFollowerReq struct {
	apiReq   *larkcore.ApiReq
	Follower *Follower `body:""`
}

type CreateTaskFollowerRespData struct {
	Follower *Follower `json:"follower,omitempty"` // 创建后的任务关注者
}

type CreateTaskFollowerResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *CreateTaskFollowerRespData `json:"data"` // 业务数据
}

func (resp *CreateTaskFollowerResp) Success() bool {
	return resp.Code == 0
}

type DeleteTaskFollowerReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewDeleteTaskFollowerReqBuilder() *DeleteTaskFollowerReqBuilder {
	builder := &DeleteTaskFollowerReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 任务 ID
//
// 示例值：83912691-2e43-47fc-94a4-d512e03984fa
func (builder *DeleteTaskFollowerReqBuilder) TaskId(taskId string) *DeleteTaskFollowerReqBuilder {
	builder.apiReq.PathParams.Set("task_id", fmt.Sprint(taskId))
	return builder
}

// 任务关注人 ID（Open ID或User ID，由user_id_type指定）
//
// 示例值：ou_87e1a581b36ecc4862cbfbce473f346a
func (builder *DeleteTaskFollowerReqBuilder) FollowerId(followerId string) *DeleteTaskFollowerReqBuilder {
	builder.apiReq.PathParams.Set("follower_id", fmt.Sprint(followerId))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *DeleteTaskFollowerReqBuilder) UserIdType(userIdType string) *DeleteTaskFollowerReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

func (builder *DeleteTaskFollowerReqBuilder) Build() *DeleteTaskFollowerReq {
	req := &DeleteTaskFollowerReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type DeleteTaskFollowerReq struct {
	apiReq *larkcore.ApiReq
}

type DeleteTaskFollowerResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *DeleteTaskFollowerResp) Success() bool {
	return resp.Code == 0
}

type ListTaskFollowerReqBuilder struct {
	apiReq *larkcore.ApiReq
	limit  int // 最大返回多少记录，当使用迭代器访问时才有效
}

func NewListTaskFollowerReqBuilder() *ListTaskFollowerReqBuilder {
	builder := &ListTaskFollowerReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 最大返回多少记录，当使用迭代器访问时才有效
func (builder *ListTaskFollowerReqBuilder) Limit(limit int) *ListTaskFollowerReqBuilder {
	builder.limit = limit
	return builder
}

// 任务 ID
//
// 示例值：0d38e26e-190a-49e9-93a2-35067763ed1f
func (builder *ListTaskFollowerReqBuilder) TaskId(taskId string) *ListTaskFollowerReqBuilder {
	builder.apiReq.PathParams.Set("task_id", fmt.Sprint(taskId))
	return builder
}

// 分页大小
//
// 示例值：10
func (builder *ListTaskFollowerReqBuilder) PageSize(pageSize int) *ListTaskFollowerReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 分页标记，第一次请求不填，表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该 page_token 获取查询结果
//
// 示例值：「上次返回的page_token」
func (builder *ListTaskFollowerReqBuilder) PageToken(pageToken string) *ListTaskFollowerReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：
func (builder *ListTaskFollowerReqBuilder) UserIdType(userIdType string) *ListTaskFollowerReqBuilder {
	builder.apiReq.QueryParams.Set("user_id_type", fmt.Sprint(userIdType))
	return builder
}

func (builder *ListTaskFollowerReqBuilder) Build() *ListTaskFollowerReq {
	req := &ListTaskFollowerReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.Limit = builder.limit
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type ListTaskFollowerReq struct {
	apiReq *larkcore.ApiReq
	Limit  int // 最多返回多少记录，只有在使用迭代器访问时，才有效

}

type ListTaskFollowerRespData struct {
	Items []*Follower `json:"items,omitempty"` // 返回的关注人ID列表

	PageToken *string `json:"page_token,omitempty"` // 分页标记，分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该 page_token 获取查询结果

	HasMore *bool `json:"has_more,omitempty"` // 是否还有更多数据
}

type ListTaskFollowerResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ListTaskFollowerRespData `json:"data"` // 业务数据
}

func (resp *ListTaskFollowerResp) Success() bool {
	return resp.Code == 0
}

type CreateTaskReminderReqBuilder struct {
	apiReq   *larkcore.ApiReq
	reminder *Reminder
}

func NewCreateTaskReminderReqBuilder() *CreateTaskReminderReqBuilder {
	builder := &CreateTaskReminderReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 任务 ID
//
// 示例值：83912691-2e43-47fc-94a4-d512e03984fa
func (builder *CreateTaskReminderReqBuilder) TaskId(taskId string) *CreateTaskReminderReqBuilder {
	builder.apiReq.PathParams.Set("task_id", fmt.Sprint(taskId))
	return builder
}

// 该接口用于创建任务的提醒时间。提醒时间在截止时间基础上做偏移，但是偏移后的结果不能早于当前时间。
func (builder *CreateTaskReminderReqBuilder) Reminder(reminder *Reminder) *CreateTaskReminderReqBuilder {
	builder.reminder = reminder
	return builder
}

func (builder *CreateTaskReminderReqBuilder) Build() *CreateTaskReminderReq {
	req := &CreateTaskReminderReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.Body = builder.reminder
	return req
}

type CreateTaskReminderReq struct {
	apiReq   *larkcore.ApiReq
	Reminder *Reminder `body:""`
}

type CreateTaskReminderRespData struct {
	Reminder *Reminder `json:"reminder,omitempty"` // 返回创建成功的提醒时间
}

type CreateTaskReminderResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *CreateTaskReminderRespData `json:"data"` // 业务数据
}

func (resp *CreateTaskReminderResp) Success() bool {
	return resp.Code == 0
}

type DeleteTaskReminderReqBuilder struct {
	apiReq *larkcore.ApiReq
}

func NewDeleteTaskReminderReqBuilder() *DeleteTaskReminderReqBuilder {
	builder := &DeleteTaskReminderReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 任务 ID
//
// 示例值：83912691-2e43-47fc-94a4-d512e03984fa
func (builder *DeleteTaskReminderReqBuilder) TaskId(taskId string) *DeleteTaskReminderReqBuilder {
	builder.apiReq.PathParams.Set("task_id", fmt.Sprint(taskId))
	return builder
}

// 任务提醒时间设置的 ID（即 reminder.id）
//
// 示例值：1
func (builder *DeleteTaskReminderReqBuilder) ReminderId(reminderId string) *DeleteTaskReminderReqBuilder {
	builder.apiReq.PathParams.Set("reminder_id", fmt.Sprint(reminderId))
	return builder
}

func (builder *DeleteTaskReminderReqBuilder) Build() *DeleteTaskReminderReq {
	req := &DeleteTaskReminderReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	return req
}

type DeleteTaskReminderReq struct {
	apiReq *larkcore.ApiReq
}

type DeleteTaskReminderResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (resp *DeleteTaskReminderResp) Success() bool {
	return resp.Code == 0
}

type ListTaskReminderReqBuilder struct {
	apiReq *larkcore.ApiReq
	limit  int // 最大返回多少记录，当使用迭代器访问时才有效
}

func NewListTaskReminderReqBuilder() *ListTaskReminderReqBuilder {
	builder := &ListTaskReminderReqBuilder{}
	builder.apiReq = &larkcore.ApiReq{
		PathParams:  larkcore.PathParams{},
		QueryParams: larkcore.QueryParams{},
	}
	return builder
}

// 最大返回多少记录，当使用迭代器访问时才有效
func (builder *ListTaskReminderReqBuilder) Limit(limit int) *ListTaskReminderReqBuilder {
	builder.limit = limit
	return builder
}

// 任务 ID
//
// 示例值：0d38e26e-190a-49e9-93a2-35067763ed1f
func (builder *ListTaskReminderReqBuilder) TaskId(taskId string) *ListTaskReminderReqBuilder {
	builder.apiReq.PathParams.Set("task_id", fmt.Sprint(taskId))
	return builder
}

// 分页大小
//
// 示例值：50
func (builder *ListTaskReminderReqBuilder) PageSize(pageSize int) *ListTaskReminderReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 分页标记，第一次请求不填，表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该 page_token 获取查询结果
//
// 示例值：「填写上次返回的page_token」
func (builder *ListTaskReminderReqBuilder) PageToken(pageToken string) *ListTaskReminderReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

func (builder *ListTaskReminderReqBuilder) Build() *ListTaskReminderReq {
	req := &ListTaskReminderReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.Limit = builder.limit
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type ListTaskReminderReq struct {
	apiReq *larkcore.ApiReq
	Limit  int // 最多返回多少记录，只有在使用迭代器访问时，才有效

}

type ListTaskReminderRespData struct {
	Items []*Reminder `json:"items,omitempty"` // 返回提醒时间设置列表

	PageToken *string `json:"page_token,omitempty"` // 分页标记，分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该 page_token 获取查询结果

	HasMore *bool `json:"has_more,omitempty"` // 是否还有更多数据
}

type ListTaskReminderResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ListTaskReminderRespData `json:"data"` // 业务数据
}

func (resp *ListTaskReminderResp) Success() bool {
	return resp.Code == 0
}

type P2TaskUpdateTenantV1Data struct {
	UserIdList *UserIdList `json:"user_id_list,omitempty"` // 用户 ID 列表

	TaskId *string `json:"task_id,omitempty"` // 任务的id

	ObjectType *string `json:"object_type,omitempty"` // 变更的数据类型，可选值：;"task"，"collaborator"，"follower"

	EventType *string `json:"event_type,omitempty"` // 事件类型，可选值：;"create"，"delete"，"update"
}

type P2TaskUpdateTenantV1 struct {
	*larkevent.EventV2Base                           // 事件基础数据
	*larkevent.EventReq                              // 请求原生数据
	Event                  *P2TaskUpdateTenantV1Data `json:"event"` // 事件内容
}

func (m *P2TaskUpdateTenantV1) RawReq(req *larkevent.EventReq) {
	m.EventReq = req
}

type P2TaskUpdatedV1Data struct {
	TaskId *string `json:"task_id,omitempty"` // 任务ID

	ObjType *int `json:"obj_type,omitempty"` // 通知类型（1：任务详情发生变化，2：任务协作者发生变化，3：任务关注者发生变化，4：任务提醒时间发生变化，5：任务完成，6：任务取消完成，7：任务删除）
}

type P2TaskUpdatedV1 struct {
	*larkevent.EventV2Base                      // 事件基础数据
	*larkevent.EventReq                         // 请求原生数据
	Event                  *P2TaskUpdatedV1Data `json:"event"` // 事件内容
}

func (m *P2TaskUpdatedV1) RawReq(req *larkevent.EventReq) {
	m.EventReq = req
}

type P2TaskCommentUpdatedV1Data struct {
	TaskId *string `json:"task_id,omitempty"` // 任务ID

	CommentId *string `json:"comment_id,omitempty"` // 任务评论ID

	ParentId *string `json:"parent_id,omitempty"` // 任务评论父ID

	ObjType *int `json:"obj_type,omitempty"` // 通知类型（1：创建评论，2：回复评论，3：更新评论，4：删除评论）
}

type P2TaskCommentUpdatedV1 struct {
	*larkevent.EventV2Base                             // 事件基础数据
	*larkevent.EventReq                                // 请求原生数据
	Event                  *P2TaskCommentUpdatedV1Data `json:"event"` // 事件内容
}

func (m *P2TaskCommentUpdatedV1) RawReq(req *larkevent.EventReq) {
	m.EventReq = req
}

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 ListTaskCollaboratorIterator struct {
	nextPageToken *string
	items         []*Collaborator
	index         int
	limit         int
	ctx           context.Context
	req           *ListTaskCollaboratorReq
	listFunc      func(ctx context.Context, req *ListTaskCollaboratorReq, options ...larkcore.RequestOptionFunc) (*ListTaskCollaboratorResp, error)
	options       []larkcore.RequestOptionFunc
	curlNum       int
}

func (iterator *ListTaskCollaboratorIterator) Next() (bool, *Collaborator, 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 *ListTaskCollaboratorIterator) NextPageToken() *string {
	return iterator.nextPageToken
}

type ListTaskCommentIterator struct {
	nextPageToken *string
	items         []*Comment
	index         int
	limit         int
	ctx           context.Context
	req           *ListTaskCommentReq
	listFunc      func(ctx context.Context, req *ListTaskCommentReq, options ...larkcore.RequestOptionFunc) (*ListTaskCommentResp, error)
	options       []larkcore.RequestOptionFunc
	curlNum       int
}

func (iterator *ListTaskCommentIterator) 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 *ListTaskCommentIterator) NextPageToken() *string {
	return iterator.nextPageToken
}

type ListTaskFollowerIterator struct {
	nextPageToken *string
	items         []*Follower
	index         int
	limit         int
	ctx           context.Context
	req           *ListTaskFollowerReq
	listFunc      func(ctx context.Context, req *ListTaskFollowerReq, options ...larkcore.RequestOptionFunc) (*ListTaskFollowerResp, error)
	options       []larkcore.RequestOptionFunc
	curlNum       int
}

func (iterator *ListTaskFollowerIterator) Next() (bool, *Follower, 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 *ListTaskFollowerIterator) NextPageToken() *string {
	return iterator.nextPageToken
}

type ListTaskReminderIterator struct {
	nextPageToken *string
	items         []*Reminder
	index         int
	limit         int
	ctx           context.Context
	req           *ListTaskReminderReq
	listFunc      func(ctx context.Context, req *ListTaskReminderReq, options ...larkcore.RequestOptionFunc) (*ListTaskReminderResp, error)
	options       []larkcore.RequestOptionFunc
	curlNum       int
}

func (iterator *ListTaskReminderIterator) Next() (bool, *Reminder, 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 *ListTaskReminderIterator) NextPageToken() *string {
	return iterator.nextPageToken
}
