// Package security_and_compliance 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 larksecurity_and_compliance

import (
	"fmt"

	"context"
	"errors"

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

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

const (
	DeviceSystemWindows     = 1 // Windows
	DeviceSystemMacOS       = 2 // macOS
	DeviceSystemLinux       = 3 // Linux
	DeviceSystemAndroid     = 4 // Android
	DeviceSystemIOS         = 5 // iOS
	DeviceSystemOpenHarmony = 6 // OpenHarmony

)

const (
	DeviceOwnershipUnknown  = 0 // 未知设备
	DeviceOwnershipPersonal = 1 // 个人设备
	DeviceOwnershipCompany  = 2 // 企业设备

)

const (
	DeviceStatusUnknown   = 0 // 未知状态
	DeviceStatusTrusted   = 1 // 信任设备
	DeviceStatusUntrusted = 2 // 非信任设备

)

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

const (
	OpenAPIGetDeviceRecordUserIDTypeUserId  = "user_id"  // 以user_id来识别用户
	OpenAPIGetDeviceRecordUserIDTypeUnionId = "union_id" // 以union_id来识别用户
	OpenAPIGetDeviceRecordUserIDTypeOpenId  = "open_id"  // 以open_id来识别用户
)

const (
	UserIDTypeOpenId  = "open_id"  // 以open_id来识别用户
	UserIDTypeUnionId = "union_id" // 以union_id来识别用户
	UserIDTypeUserId  = "user_id"  // 以user_id来识别用户
)

const (
	DeviceOwnershipListDeviceRecordUnknown  = 0 // 未知设备
	DeviceOwnershipListDeviceRecordPersonal = 1 // 个人设备
	DeviceOwnershipListDeviceRecordCompany  = 2 // 企业设备

)

const (
	DeviceStatusListDeviceRecordUnknown   = 0 // 未知状态
	DeviceStatusListDeviceRecordTrusted   = 1 // 信任设备
	DeviceStatusListDeviceRecordUntrusted = 2 // 非信任设备

)

const (
	DeviceTerminalTypeUnknown = 0 // 未知
	DeviceTerminalTypeMobile  = 1 // 移动端
	DeviceTerminalTypePC      = 2 // 桌面端

)

const (
	OsUnknown     = 0 // 未知
	OsWindows     = 1 // Windows
	OsMacOS       = 2 // macOS
	OsLinux       = 3 // Linux
	OsAndroid     = 4 // Android
	OsIOS         = 5 // iOS
	OsOpenHarmony = 6 // 鸿蒙

)

const (
	DeviceOwnershipUpdateDeviceRecordUnknown  = 0 // 未知设备
	DeviceOwnershipUpdateDeviceRecordPersonal = 1 // 个人设备
	DeviceOwnershipUpdateDeviceRecordCompany  = 2 // 企业设备

)

const (
	DeviceStatusUpdateDeviceRecordUnknown   = 0 // 未知状态
	DeviceStatusUpdateDeviceRecordTrusted   = 1 // 信任设备
	DeviceStatusUpdateDeviceRecordUntrusted = 2 // 非信任设备

)

const (
	UserIdTypeUpdateDeviceRecordUserId  = "user_id"  // 以user_id来识别用户
	UserIdTypeUpdateDeviceRecordUnionId = "union_id" // 以union_id来识别用户
	UserIdTypeUpdateDeviceRecordOpenId  = "open_id"  // 以open_id来识别用户
)

type BitableAppToken struct {
	AppToken *string `json:"app_token,omitempty"` // 多维表格唯一标识符

	ObjectType *string `json:"object_type,omitempty"` // 文档类型
}

type BitableAppTokenBuilder struct {
	appToken     string // 多维表格唯一标识符
	appTokenFlag bool

	objectType     string // 文档类型
	objectTypeFlag bool
}

func NewBitableAppTokenBuilder() *BitableAppTokenBuilder {
	builder := &BitableAppTokenBuilder{}
	return builder
}

// 多维表格唯一标识符
//
// 示例值：appbcbWCzen6D8dezhoCH2RpMAh
func (builder *BitableAppTokenBuilder) AppToken(appToken string) *BitableAppTokenBuilder {
	builder.appToken = appToken
	builder.appTokenFlag = true
	return builder
}

// 文档类型
//
// 示例值：bitable
func (builder *BitableAppTokenBuilder) ObjectType(objectType string) *BitableAppTokenBuilder {
	builder.objectType = objectType
	builder.objectTypeFlag = true
	return builder
}

func (builder *BitableAppTokenBuilder) Build() *BitableAppToken {
	req := &BitableAppToken{}
	if builder.appTokenFlag {
		req.AppToken = &builder.appToken

	}
	if builder.objectTypeFlag {
		req.ObjectType = &builder.objectType

	}
	return req
}

type Chat struct {
	ChatMeta *ChatMeta `json:"chat_meta,omitempty"` // 会话基本信息

	ChatMember *ChatMember `json:"chat_member,omitempty"` // 会话成员
}

type ChatBuilder struct {
	chatMeta     *ChatMeta // 会话基本信息
	chatMetaFlag bool

	chatMember     *ChatMember // 会话成员
	chatMemberFlag bool
}

func NewChatBuilder() *ChatBuilder {
	builder := &ChatBuilder{}
	return builder
}

// 会话基本信息
//
// 示例值：
func (builder *ChatBuilder) ChatMeta(chatMeta *ChatMeta) *ChatBuilder {
	builder.chatMeta = chatMeta
	builder.chatMetaFlag = true
	return builder
}

// 会话成员
//
// 示例值：
func (builder *ChatBuilder) ChatMember(chatMember *ChatMember) *ChatBuilder {
	builder.chatMember = chatMember
	builder.chatMemberFlag = true
	return builder
}

func (builder *ChatBuilder) Build() *Chat {
	req := &Chat{}
	if builder.chatMetaFlag {
		req.ChatMeta = builder.chatMeta
	}
	if builder.chatMemberFlag {
		req.ChatMember = builder.chatMember
	}
	return req
}

type ChatMember struct {
	Members []*User `json:"members,omitempty"` // 会话成员

	OwnerId *string `json:"owner_id,omitempty"` // 所有人

	AdminUserIds []string `json:"admin_user_ids,omitempty"` // 管理员
}

type ChatMemberBuilder struct {
	members     []*User // 会话成员
	membersFlag bool

	ownerId     string // 所有人
	ownerIdFlag bool

	adminUserIds     []string // 管理员
	adminUserIdsFlag bool
}

func NewChatMemberBuilder() *ChatMemberBuilder {
	builder := &ChatMemberBuilder{}
	return builder
}

// 会话成员
//
// 示例值：
func (builder *ChatMemberBuilder) Members(members []*User) *ChatMemberBuilder {
	builder.members = members
	builder.membersFlag = true
	return builder
}

// 所有人
//
// 示例值：
func (builder *ChatMemberBuilder) OwnerId(ownerId string) *ChatMemberBuilder {
	builder.ownerId = ownerId
	builder.ownerIdFlag = true
	return builder
}

// 管理员
//
// 示例值：
func (builder *ChatMemberBuilder) AdminUserIds(adminUserIds []string) *ChatMemberBuilder {
	builder.adminUserIds = adminUserIds
	builder.adminUserIdsFlag = true
	return builder
}

func (builder *ChatMemberBuilder) Build() *ChatMember {
	req := &ChatMember{}
	if builder.membersFlag {
		req.Members = builder.members
	}
	if builder.ownerIdFlag {
		req.OwnerId = &builder.ownerId

	}
	if builder.adminUserIdsFlag {
		req.AdminUserIds = builder.adminUserIds
	}
	return req
}

type ChatMeta struct {
	ChatId *string `json:"chat_id,omitempty"` // 会话ID

	ChatType *int `json:"chat_type,omitempty"` // 会话类型

	ChatName *string `json:"chat_name,omitempty"` // 会话名称

	CreateTime *string `json:"create_time,omitempty"` // 创建时间

	IsExternal *bool `json:"is_external,omitempty"` // 是否为外部会话
}

type ChatMetaBuilder struct {
	chatId     string // 会话ID
	chatIdFlag bool

	chatType     int // 会话类型
	chatTypeFlag bool

	chatName     string // 会话名称
	chatNameFlag bool

	createTime     string // 创建时间
	createTimeFlag bool

	isExternal     bool // 是否为外部会话
	isExternalFlag bool
}

func NewChatMetaBuilder() *ChatMetaBuilder {
	builder := &ChatMetaBuilder{}
	return builder
}

// 会话ID
//
// 示例值：
func (builder *ChatMetaBuilder) ChatId(chatId string) *ChatMetaBuilder {
	builder.chatId = chatId
	builder.chatIdFlag = true
	return builder
}

// 会话类型
//
// 示例值：
func (builder *ChatMetaBuilder) ChatType(chatType int) *ChatMetaBuilder {
	builder.chatType = chatType
	builder.chatTypeFlag = true
	return builder
}

// 会话名称
//
// 示例值：
func (builder *ChatMetaBuilder) ChatName(chatName string) *ChatMetaBuilder {
	builder.chatName = chatName
	builder.chatNameFlag = true
	return builder
}

// 创建时间
//
// 示例值：
func (builder *ChatMetaBuilder) CreateTime(createTime string) *ChatMetaBuilder {
	builder.createTime = createTime
	builder.createTimeFlag = true
	return builder
}

// 是否为外部会话
//
// 示例值：
func (builder *ChatMetaBuilder) IsExternal(isExternal bool) *ChatMetaBuilder {
	builder.isExternal = isExternal
	builder.isExternalFlag = true
	return builder
}

func (builder *ChatMetaBuilder) Build() *ChatMeta {
	req := &ChatMeta{}
	if builder.chatIdFlag {
		req.ChatId = &builder.chatId

	}
	if builder.chatTypeFlag {
		req.ChatType = &builder.chatType

	}
	if builder.chatNameFlag {
		req.ChatName = &builder.chatName

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

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

	}
	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 DeviceApplyRecord struct {
	DeviceApplyRecordId *string `json:"device_apply_record_id,omitempty"` // 设备申报记录ID

	DeviceRecord *DeviceRecord `json:"device_record,omitempty"` // 设备记录

	ApplyTime *string `json:"apply_time,omitempty"` // 申报时间

	ApplyStatus *int `json:"apply_status,omitempty"` // 申报状态

	Operator *string `json:"operator,omitempty"` // 审批人ID

	ApplyDeviceOwnership *int `json:"apply_device_ownership,omitempty"` // 申报设备归属
}

type DeviceApplyRecordBuilder struct {
	deviceApplyRecordId     string // 设备申报记录ID
	deviceApplyRecordIdFlag bool

	deviceRecord     *DeviceRecord // 设备记录
	deviceRecordFlag bool

	applyTime     string // 申报时间
	applyTimeFlag bool

	applyStatus     int // 申报状态
	applyStatusFlag bool

	operator     string // 审批人ID
	operatorFlag bool

	applyDeviceOwnership     int // 申报设备归属
	applyDeviceOwnershipFlag bool
}

func NewDeviceApplyRecordBuilder() *DeviceApplyRecordBuilder {
	builder := &DeviceApplyRecordBuilder{}
	return builder
}

// 设备申报记录ID
//
// 示例值：7088763625288187923
func (builder *DeviceApplyRecordBuilder) DeviceApplyRecordId(deviceApplyRecordId string) *DeviceApplyRecordBuilder {
	builder.deviceApplyRecordId = deviceApplyRecordId
	builder.deviceApplyRecordIdFlag = true
	return builder
}

// 设备记录
//
// 示例值：
func (builder *DeviceApplyRecordBuilder) DeviceRecord(deviceRecord *DeviceRecord) *DeviceApplyRecordBuilder {
	builder.deviceRecord = deviceRecord
	builder.deviceRecordFlag = true
	return builder
}

// 申报时间
//
// 示例值：2022-11-28 17:21:26
func (builder *DeviceApplyRecordBuilder) ApplyTime(applyTime string) *DeviceApplyRecordBuilder {
	builder.applyTime = applyTime
	builder.applyTimeFlag = true
	return builder
}

// 申报状态
//
// 示例值：0
func (builder *DeviceApplyRecordBuilder) ApplyStatus(applyStatus int) *DeviceApplyRecordBuilder {
	builder.applyStatus = applyStatus
	builder.applyStatusFlag = true
	return builder
}

// 审批人ID
//
// 示例值：ou_b25e90585ef8c1adac4b379c2e257906
func (builder *DeviceApplyRecordBuilder) Operator(operator string) *DeviceApplyRecordBuilder {
	builder.operator = operator
	builder.operatorFlag = true
	return builder
}

// 申报设备归属
//
// 示例值：0
func (builder *DeviceApplyRecordBuilder) ApplyDeviceOwnership(applyDeviceOwnership int) *DeviceApplyRecordBuilder {
	builder.applyDeviceOwnership = applyDeviceOwnership
	builder.applyDeviceOwnershipFlag = true
	return builder
}

func (builder *DeviceApplyRecordBuilder) Build() *DeviceApplyRecord {
	req := &DeviceApplyRecord{}
	if builder.deviceApplyRecordIdFlag {
		req.DeviceApplyRecordId = &builder.deviceApplyRecordId

	}
	if builder.deviceRecordFlag {
		req.DeviceRecord = builder.deviceRecord
	}
	if builder.applyTimeFlag {
		req.ApplyTime = &builder.applyTime

	}
	if builder.applyStatusFlag {
		req.ApplyStatus = &builder.applyStatus

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

	}
	if builder.applyDeviceOwnershipFlag {
		req.ApplyDeviceOwnership = &builder.applyDeviceOwnership

	}
	return req
}

type DeviceApplyRecordEvent struct {
	DeviceApplyRecordId *string `json:"device_apply_record_id,omitempty"` // 设备申报记录ID

	DeviceRecord *DeviceRecordEvent `json:"device_record,omitempty"` // 设备记录

	ApplyTime *string `json:"apply_time,omitempty"` // 申报时间

	ApplyStatus *int `json:"apply_status,omitempty"` // 申报状态

	Operator *UserId `json:"operator,omitempty"` // 申报人ID

	ApplyDeviceOwnership *int `json:"apply_device_ownership,omitempty"` // 申报设备归属
}

type DeviceApplyRecordEventBuilder struct {
	deviceApplyRecordId     string // 设备申报记录ID
	deviceApplyRecordIdFlag bool

	deviceRecord     *DeviceRecordEvent // 设备记录
	deviceRecordFlag bool

	applyTime     string // 申报时间
	applyTimeFlag bool

	applyStatus     int // 申报状态
	applyStatusFlag bool

	operator     *UserId // 申报人ID
	operatorFlag bool

	applyDeviceOwnership     int // 申报设备归属
	applyDeviceOwnershipFlag bool
}

func NewDeviceApplyRecordEventBuilder() *DeviceApplyRecordEventBuilder {
	builder := &DeviceApplyRecordEventBuilder{}
	return builder
}

// 设备申报记录ID
//
// 示例值：7088763625288187923
func (builder *DeviceApplyRecordEventBuilder) DeviceApplyRecordId(deviceApplyRecordId string) *DeviceApplyRecordEventBuilder {
	builder.deviceApplyRecordId = deviceApplyRecordId
	builder.deviceApplyRecordIdFlag = true
	return builder
}

// 设备记录
//
// 示例值：
func (builder *DeviceApplyRecordEventBuilder) DeviceRecord(deviceRecord *DeviceRecordEvent) *DeviceApplyRecordEventBuilder {
	builder.deviceRecord = deviceRecord
	builder.deviceRecordFlag = true
	return builder
}

// 申报时间
//
// 示例值：2022-11-28 17:21:26
func (builder *DeviceApplyRecordEventBuilder) ApplyTime(applyTime string) *DeviceApplyRecordEventBuilder {
	builder.applyTime = applyTime
	builder.applyTimeFlag = true
	return builder
}

// 申报状态
//
// 示例值：0
func (builder *DeviceApplyRecordEventBuilder) ApplyStatus(applyStatus int) *DeviceApplyRecordEventBuilder {
	builder.applyStatus = applyStatus
	builder.applyStatusFlag = true
	return builder
}

// 申报人ID
//
// 示例值：
func (builder *DeviceApplyRecordEventBuilder) Operator(operator *UserId) *DeviceApplyRecordEventBuilder {
	builder.operator = operator
	builder.operatorFlag = true
	return builder
}

// 申报设备归属
//
// 示例值：0
func (builder *DeviceApplyRecordEventBuilder) ApplyDeviceOwnership(applyDeviceOwnership int) *DeviceApplyRecordEventBuilder {
	builder.applyDeviceOwnership = applyDeviceOwnership
	builder.applyDeviceOwnershipFlag = true
	return builder
}

func (builder *DeviceApplyRecordEventBuilder) Build() *DeviceApplyRecordEvent {
	req := &DeviceApplyRecordEvent{}
	if builder.deviceApplyRecordIdFlag {
		req.DeviceApplyRecordId = &builder.deviceApplyRecordId

	}
	if builder.deviceRecordFlag {
		req.DeviceRecord = builder.deviceRecord
	}
	if builder.applyTimeFlag {
		req.ApplyTime = &builder.applyTime

	}
	if builder.applyStatusFlag {
		req.ApplyStatus = &builder.applyStatus

	}
	if builder.operatorFlag {
		req.Operator = builder.operator
	}
	if builder.applyDeviceOwnershipFlag {
		req.ApplyDeviceOwnership = &builder.applyDeviceOwnership

	}
	return req
}

type DeviceChangeEvent struct {
	DeviceRecordId *string `json:"device_record_id,omitempty"` // 设备认证编码

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

	CurrentUserId *UserId `json:"current_user_id,omitempty"` // 当前登录用户ID

	DeviceName *string `json:"device_name,omitempty"` // 设备名称

	Model *string `json:"model,omitempty"` // 设备型号

	DeviceSystem *int `json:"device_system,omitempty"` // 操作系统

	SerialNumber *string `json:"serial_number,omitempty"` // 生产序列号

	DiskSerialNumber *string `json:"disk_serial_number,omitempty"` // 硬盘序列号

	Uuid *string `json:"uuid,omitempty"` // 主板UUID

	MacAddress *string `json:"mac_address,omitempty"` // MAC地址

	AndroidId *string `json:"android_id,omitempty"` // Android标识符

	Idfv *string `json:"idfv,omitempty"` // iOS供应商标识符

	Aaid *string `json:"aaid,omitempty"` // Harmony供应商标识符

	DeviceOwnership *int `json:"device_ownership,omitempty"` // 设备归属

	DeviceStatus *int `json:"device_status,omitempty"` // 可信状态

	CertificationLevel *int `json:"certification_level,omitempty"` // 认证方式

	DeviceTerminalType *int `json:"device_terminal_type,omitempty"` // 设备类型

	IsManaged *bool `json:"is_managed,omitempty"` // 是否为受管控设备

	MdmDeviceId *string `json:"mdm_device_id,omitempty"` // MDM设备ID

	MdmProviderName *string `json:"mdm_provider_name,omitempty"` // MDM厂商名称
}

type DeviceChangeEventBuilder struct {
	deviceRecordId     string // 设备认证编码
	deviceRecordIdFlag bool

	version     string // 版本号
	versionFlag bool

	currentUserId     *UserId // 当前登录用户ID
	currentUserIdFlag bool

	deviceName     string // 设备名称
	deviceNameFlag bool

	model     string // 设备型号
	modelFlag bool

	deviceSystem     int // 操作系统
	deviceSystemFlag bool

	serialNumber     string // 生产序列号
	serialNumberFlag bool

	diskSerialNumber     string // 硬盘序列号
	diskSerialNumberFlag bool

	uuid     string // 主板UUID
	uuidFlag bool

	macAddress     string // MAC地址
	macAddressFlag bool

	androidId     string // Android标识符
	androidIdFlag bool

	idfv     string // iOS供应商标识符
	idfvFlag bool

	aaid     string // Harmony供应商标识符
	aaidFlag bool

	deviceOwnership     int // 设备归属
	deviceOwnershipFlag bool

	deviceStatus     int // 可信状态
	deviceStatusFlag bool

	certificationLevel     int // 认证方式
	certificationLevelFlag bool

	deviceTerminalType     int // 设备类型
	deviceTerminalTypeFlag bool

	isManaged     bool // 是否为受管控设备
	isManagedFlag bool

	mdmDeviceId     string // MDM设备ID
	mdmDeviceIdFlag bool

	mdmProviderName     string // MDM厂商名称
	mdmProviderNameFlag bool
}

func NewDeviceChangeEventBuilder() *DeviceChangeEventBuilder {
	builder := &DeviceChangeEventBuilder{}
	return builder
}

// 设备认证编码
//
// 示例值：7089353870308032531
func (builder *DeviceChangeEventBuilder) DeviceRecordId(deviceRecordId string) *DeviceChangeEventBuilder {
	builder.deviceRecordId = deviceRecordId
	builder.deviceRecordIdFlag = true
	return builder
}

// 版本号
//
// 示例值：0
func (builder *DeviceChangeEventBuilder) Version(version string) *DeviceChangeEventBuilder {
	builder.version = version
	builder.versionFlag = true
	return builder
}

// 当前登录用户ID
//
// 示例值：
func (builder *DeviceChangeEventBuilder) CurrentUserId(currentUserId *UserId) *DeviceChangeEventBuilder {
	builder.currentUserId = currentUserId
	builder.currentUserIdFlag = true
	return builder
}

// 设备名称
//
// 示例值：Q9C6RYMFDK
func (builder *DeviceChangeEventBuilder) DeviceName(deviceName string) *DeviceChangeEventBuilder {
	builder.deviceName = deviceName
	builder.deviceNameFlag = true
	return builder
}

// 设备型号
//
// 示例值：iPhone13,2
func (builder *DeviceChangeEventBuilder) Model(model string) *DeviceChangeEventBuilder {
	builder.model = model
	builder.modelFlag = true
	return builder
}

// 操作系统
//
// 示例值：0
func (builder *DeviceChangeEventBuilder) DeviceSystem(deviceSystem int) *DeviceChangeEventBuilder {
	builder.deviceSystem = deviceSystem
	builder.deviceSystemFlag = true
	return builder
}

// 生产序列号
//
// 示例值：C02DTHRMML7H
func (builder *DeviceChangeEventBuilder) SerialNumber(serialNumber string) *DeviceChangeEventBuilder {
	builder.serialNumber = serialNumber
	builder.serialNumberFlag = true
	return builder
}

// 硬盘序列号
//
// 示例值：CC344362-5990-5A68-8DDD-64A23C99FA0C
func (builder *DeviceChangeEventBuilder) DiskSerialNumber(diskSerialNumber string) *DeviceChangeEventBuilder {
	builder.diskSerialNumber = diskSerialNumber
	builder.diskSerialNumberFlag = true
	return builder
}

// 主板UUID
//
// 示例值：621CDFF0-13D0-5AB1-9ADC-5F560095F6ED
func (builder *DeviceChangeEventBuilder) Uuid(uuid string) *DeviceChangeEventBuilder {
	builder.uuid = uuid
	builder.uuidFlag = true
	return builder
}

// MAC地址
//
// 示例值：ac:de:48:00:11:21
func (builder *DeviceChangeEventBuilder) MacAddress(macAddress string) *DeviceChangeEventBuilder {
	builder.macAddress = macAddress
	builder.macAddressFlag = true
	return builder
}

// Android标识符
//
// 示例值：02a11ac4a83b918e
func (builder *DeviceChangeEventBuilder) AndroidId(androidId string) *DeviceChangeEventBuilder {
	builder.androidId = androidId
	builder.androidIdFlag = true
	return builder
}

// iOS供应商标识符
//
// 示例值：968F0E5C-C297-4122-ACB6-102494DEFD9A
func (builder *DeviceChangeEventBuilder) Idfv(idfv string) *DeviceChangeEventBuilder {
	builder.idfv = idfv
	builder.idfvFlag = true
	return builder
}

// Harmony供应商标识符
//
// 示例值：ff3c2237-cd76-4331-9d72-0a4470854567
func (builder *DeviceChangeEventBuilder) Aaid(aaid string) *DeviceChangeEventBuilder {
	builder.aaid = aaid
	builder.aaidFlag = true
	return builder
}

// 设备归属
//
// 示例值：0
func (builder *DeviceChangeEventBuilder) DeviceOwnership(deviceOwnership int) *DeviceChangeEventBuilder {
	builder.deviceOwnership = deviceOwnership
	builder.deviceOwnershipFlag = true
	return builder
}

// 可信状态
//
// 示例值：0
func (builder *DeviceChangeEventBuilder) DeviceStatus(deviceStatus int) *DeviceChangeEventBuilder {
	builder.deviceStatus = deviceStatus
	builder.deviceStatusFlag = true
	return builder
}

// 认证方式
//
// 示例值：0
func (builder *DeviceChangeEventBuilder) CertificationLevel(certificationLevel int) *DeviceChangeEventBuilder {
	builder.certificationLevel = certificationLevel
	builder.certificationLevelFlag = true
	return builder
}

// 设备类型
//
// 示例值：0
func (builder *DeviceChangeEventBuilder) DeviceTerminalType(deviceTerminalType int) *DeviceChangeEventBuilder {
	builder.deviceTerminalType = deviceTerminalType
	builder.deviceTerminalTypeFlag = true
	return builder
}

// 是否为受管控设备
//
// 示例值：
func (builder *DeviceChangeEventBuilder) IsManaged(isManaged bool) *DeviceChangeEventBuilder {
	builder.isManaged = isManaged
	builder.isManagedFlag = true
	return builder
}

// MDM设备ID
//
// 示例值：123abc
func (builder *DeviceChangeEventBuilder) MdmDeviceId(mdmDeviceId string) *DeviceChangeEventBuilder {
	builder.mdmDeviceId = mdmDeviceId
	builder.mdmDeviceIdFlag = true
	return builder
}

// MDM厂商名称
//
// 示例值：Workspace_ONE
func (builder *DeviceChangeEventBuilder) MdmProviderName(mdmProviderName string) *DeviceChangeEventBuilder {
	builder.mdmProviderName = mdmProviderName
	builder.mdmProviderNameFlag = true
	return builder
}

func (builder *DeviceChangeEventBuilder) Build() *DeviceChangeEvent {
	req := &DeviceChangeEvent{}
	if builder.deviceRecordIdFlag {
		req.DeviceRecordId = &builder.deviceRecordId

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

	}
	if builder.currentUserIdFlag {
		req.CurrentUserId = builder.currentUserId
	}
	if builder.deviceNameFlag {
		req.DeviceName = &builder.deviceName

	}
	if builder.modelFlag {
		req.Model = &builder.model

	}
	if builder.deviceSystemFlag {
		req.DeviceSystem = &builder.deviceSystem

	}
	if builder.serialNumberFlag {
		req.SerialNumber = &builder.serialNumber

	}
	if builder.diskSerialNumberFlag {
		req.DiskSerialNumber = &builder.diskSerialNumber

	}
	if builder.uuidFlag {
		req.Uuid = &builder.uuid

	}
	if builder.macAddressFlag {
		req.MacAddress = &builder.macAddress

	}
	if builder.androidIdFlag {
		req.AndroidId = &builder.androidId

	}
	if builder.idfvFlag {
		req.Idfv = &builder.idfv

	}
	if builder.aaidFlag {
		req.Aaid = &builder.aaid

	}
	if builder.deviceOwnershipFlag {
		req.DeviceOwnership = &builder.deviceOwnership

	}
	if builder.deviceStatusFlag {
		req.DeviceStatus = &builder.deviceStatus

	}
	if builder.certificationLevelFlag {
		req.CertificationLevel = &builder.certificationLevel

	}
	if builder.deviceTerminalTypeFlag {
		req.DeviceTerminalType = &builder.deviceTerminalType

	}
	if builder.isManagedFlag {
		req.IsManaged = &builder.isManaged

	}
	if builder.mdmDeviceIdFlag {
		req.MdmDeviceId = &builder.mdmDeviceId

	}
	if builder.mdmProviderNameFlag {
		req.MdmProviderName = &builder.mdmProviderName

	}
	return req
}

type DeviceRecord struct {
	DeviceRecordId *string `json:"device_record_id,omitempty"` // 设备认证编码

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

	CurrentUserId *string `json:"current_user_id,omitempty"` // 当前登录用户ID

	DeviceName *string `json:"device_name,omitempty"` // 设备名称

	Model *string `json:"model,omitempty"` // 设备型号

	DeviceSystem *int `json:"device_system,omitempty"` // 操作系统

	SerialNumber *string `json:"serial_number,omitempty"` // 生产序列号

	DiskSerialNumber *string `json:"disk_serial_number,omitempty"` // 硬盘序列号

	Uuid *string `json:"uuid,omitempty"` // 主板UUID

	MacAddress *string `json:"mac_address,omitempty"` // MAC地址

	AndroidId *string `json:"android_id,omitempty"` // Android标识符

	Idfv *string `json:"idfv,omitempty"` // iOS供应商标识符

	Aaid *string `json:"aaid,omitempty"` // Harmony供应商标识符

	DeviceOwnership *int `json:"device_ownership,omitempty"` // 设备归属

	DeviceStatus *int `json:"device_status,omitempty"` // 可信状态

	CertificationLevel *int `json:"certification_level,omitempty"` // 认证方式

	DeviceTerminalType *int `json:"device_terminal_type,omitempty"` // 设备类型

	LatestUserId *string `json:"latest_user_id,omitempty"` // 最近登录用户ID

	Dids []string `json:"dids,omitempty"` // 设备指纹列表

	IsManaged *bool `json:"is_managed,omitempty"` // 是否为受管控设备

	MdmDeviceId *string `json:"mdm_device_id,omitempty"` // MDM设备ID

	MdmProviderName *string `json:"mdm_provider_name,omitempty"` // MDM厂商名称
}

type DeviceRecordBuilder struct {
	deviceRecordId     string // 设备认证编码
	deviceRecordIdFlag bool

	version     string // 版本号
	versionFlag bool

	currentUserId     string // 当前登录用户ID
	currentUserIdFlag bool

	deviceName     string // 设备名称
	deviceNameFlag bool

	model     string // 设备型号
	modelFlag bool

	deviceSystem     int // 操作系统
	deviceSystemFlag bool

	serialNumber     string // 生产序列号
	serialNumberFlag bool

	diskSerialNumber     string // 硬盘序列号
	diskSerialNumberFlag bool

	uuid     string // 主板UUID
	uuidFlag bool

	macAddress     string // MAC地址
	macAddressFlag bool

	androidId     string // Android标识符
	androidIdFlag bool

	idfv     string // iOS供应商标识符
	idfvFlag bool

	aaid     string // Harmony供应商标识符
	aaidFlag bool

	deviceOwnership     int // 设备归属
	deviceOwnershipFlag bool

	deviceStatus     int // 可信状态
	deviceStatusFlag bool

	certificationLevel     int // 认证方式
	certificationLevelFlag bool

	deviceTerminalType     int // 设备类型
	deviceTerminalTypeFlag bool

	latestUserId     string // 最近登录用户ID
	latestUserIdFlag bool

	dids     []string // 设备指纹列表
	didsFlag bool

	isManaged     bool // 是否为受管控设备
	isManagedFlag bool

	mdmDeviceId     string // MDM设备ID
	mdmDeviceIdFlag bool

	mdmProviderName     string // MDM厂商名称
	mdmProviderNameFlag bool
}

func NewDeviceRecordBuilder() *DeviceRecordBuilder {
	builder := &DeviceRecordBuilder{}
	return builder
}

// 设备认证编码
//
// 示例值：7089353870308032531
func (builder *DeviceRecordBuilder) DeviceRecordId(deviceRecordId string) *DeviceRecordBuilder {
	builder.deviceRecordId = deviceRecordId
	builder.deviceRecordIdFlag = true
	return builder
}

// 版本号
//
// 示例值：0
func (builder *DeviceRecordBuilder) Version(version string) *DeviceRecordBuilder {
	builder.version = version
	builder.versionFlag = true
	return builder
}

// 当前登录用户ID
//
// 示例值：ou_b25e90585ef8c1adac4b379c2e257906
func (builder *DeviceRecordBuilder) CurrentUserId(currentUserId string) *DeviceRecordBuilder {
	builder.currentUserId = currentUserId
	builder.currentUserIdFlag = true
	return builder
}

// 设备名称
//
// 示例值：Q9C6RYMFDK
func (builder *DeviceRecordBuilder) DeviceName(deviceName string) *DeviceRecordBuilder {
	builder.deviceName = deviceName
	builder.deviceNameFlag = true
	return builder
}

// 设备型号
//
// 示例值：iPhone13,2
func (builder *DeviceRecordBuilder) Model(model string) *DeviceRecordBuilder {
	builder.model = model
	builder.modelFlag = true
	return builder
}

// 操作系统
//
// 示例值：0
func (builder *DeviceRecordBuilder) DeviceSystem(deviceSystem int) *DeviceRecordBuilder {
	builder.deviceSystem = deviceSystem
	builder.deviceSystemFlag = true
	return builder
}

// 生产序列号
//
// 示例值：C02DTHRMML7H
func (builder *DeviceRecordBuilder) SerialNumber(serialNumber string) *DeviceRecordBuilder {
	builder.serialNumber = serialNumber
	builder.serialNumberFlag = true
	return builder
}

// 硬盘序列号
//
// 示例值：CC344362-5990-5A68-8DDD-64A23C99FA0C
func (builder *DeviceRecordBuilder) DiskSerialNumber(diskSerialNumber string) *DeviceRecordBuilder {
	builder.diskSerialNumber = diskSerialNumber
	builder.diskSerialNumberFlag = true
	return builder
}

// 主板UUID
//
// 示例值：621CDFF0-13D0-5AB1-9ADC-5F560095F6ED
func (builder *DeviceRecordBuilder) Uuid(uuid string) *DeviceRecordBuilder {
	builder.uuid = uuid
	builder.uuidFlag = true
	return builder
}

// MAC地址
//
// 示例值：ac:de:48:00:11:21
func (builder *DeviceRecordBuilder) MacAddress(macAddress string) *DeviceRecordBuilder {
	builder.macAddress = macAddress
	builder.macAddressFlag = true
	return builder
}

// Android标识符
//
// 示例值：02a11ac4a83b918e
func (builder *DeviceRecordBuilder) AndroidId(androidId string) *DeviceRecordBuilder {
	builder.androidId = androidId
	builder.androidIdFlag = true
	return builder
}

// iOS供应商标识符
//
// 示例值：968F0E5C-C297-4122-ACB6-102494DEFD9A
func (builder *DeviceRecordBuilder) Idfv(idfv string) *DeviceRecordBuilder {
	builder.idfv = idfv
	builder.idfvFlag = true
	return builder
}

// Harmony供应商标识符
//
// 示例值：ff3c2237-cd76-4331-9d72-0a4470854567
func (builder *DeviceRecordBuilder) Aaid(aaid string) *DeviceRecordBuilder {
	builder.aaid = aaid
	builder.aaidFlag = true
	return builder
}

// 设备归属
//
// 示例值：0
func (builder *DeviceRecordBuilder) DeviceOwnership(deviceOwnership int) *DeviceRecordBuilder {
	builder.deviceOwnership = deviceOwnership
	builder.deviceOwnershipFlag = true
	return builder
}

// 可信状态
//
// 示例值：0
func (builder *DeviceRecordBuilder) DeviceStatus(deviceStatus int) *DeviceRecordBuilder {
	builder.deviceStatus = deviceStatus
	builder.deviceStatusFlag = true
	return builder
}

// 认证方式
//
// 示例值：0
func (builder *DeviceRecordBuilder) CertificationLevel(certificationLevel int) *DeviceRecordBuilder {
	builder.certificationLevel = certificationLevel
	builder.certificationLevelFlag = true
	return builder
}

// 设备类型
//
// 示例值：0
func (builder *DeviceRecordBuilder) DeviceTerminalType(deviceTerminalType int) *DeviceRecordBuilder {
	builder.deviceTerminalType = deviceTerminalType
	builder.deviceTerminalTypeFlag = true
	return builder
}

// 最近登录用户ID
//
// 示例值：ou_b25e90585ef8c1adac4b379c2e257906
func (builder *DeviceRecordBuilder) LatestUserId(latestUserId string) *DeviceRecordBuilder {
	builder.latestUserId = latestUserId
	builder.latestUserIdFlag = true
	return builder
}

// 设备指纹列表
//
// 示例值：
func (builder *DeviceRecordBuilder) Dids(dids []string) *DeviceRecordBuilder {
	builder.dids = dids
	builder.didsFlag = true
	return builder
}

// 是否为受管控设备
//
// 示例值：
func (builder *DeviceRecordBuilder) IsManaged(isManaged bool) *DeviceRecordBuilder {
	builder.isManaged = isManaged
	builder.isManagedFlag = true
	return builder
}

// MDM设备ID
//
// 示例值：123abc
func (builder *DeviceRecordBuilder) MdmDeviceId(mdmDeviceId string) *DeviceRecordBuilder {
	builder.mdmDeviceId = mdmDeviceId
	builder.mdmDeviceIdFlag = true
	return builder
}

// MDM厂商名称
//
// 示例值：Workspace_ONE
func (builder *DeviceRecordBuilder) MdmProviderName(mdmProviderName string) *DeviceRecordBuilder {
	builder.mdmProviderName = mdmProviderName
	builder.mdmProviderNameFlag = true
	return builder
}

func (builder *DeviceRecordBuilder) Build() *DeviceRecord {
	req := &DeviceRecord{}
	if builder.deviceRecordIdFlag {
		req.DeviceRecordId = &builder.deviceRecordId

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

	}
	if builder.currentUserIdFlag {
		req.CurrentUserId = &builder.currentUserId

	}
	if builder.deviceNameFlag {
		req.DeviceName = &builder.deviceName

	}
	if builder.modelFlag {
		req.Model = &builder.model

	}
	if builder.deviceSystemFlag {
		req.DeviceSystem = &builder.deviceSystem

	}
	if builder.serialNumberFlag {
		req.SerialNumber = &builder.serialNumber

	}
	if builder.diskSerialNumberFlag {
		req.DiskSerialNumber = &builder.diskSerialNumber

	}
	if builder.uuidFlag {
		req.Uuid = &builder.uuid

	}
	if builder.macAddressFlag {
		req.MacAddress = &builder.macAddress

	}
	if builder.androidIdFlag {
		req.AndroidId = &builder.androidId

	}
	if builder.idfvFlag {
		req.Idfv = &builder.idfv

	}
	if builder.aaidFlag {
		req.Aaid = &builder.aaid

	}
	if builder.deviceOwnershipFlag {
		req.DeviceOwnership = &builder.deviceOwnership

	}
	if builder.deviceStatusFlag {
		req.DeviceStatus = &builder.deviceStatus

	}
	if builder.certificationLevelFlag {
		req.CertificationLevel = &builder.certificationLevel

	}
	if builder.deviceTerminalTypeFlag {
		req.DeviceTerminalType = &builder.deviceTerminalType

	}
	if builder.latestUserIdFlag {
		req.LatestUserId = &builder.latestUserId

	}
	if builder.didsFlag {
		req.Dids = builder.dids
	}
	if builder.isManagedFlag {
		req.IsManaged = &builder.isManaged

	}
	if builder.mdmDeviceIdFlag {
		req.MdmDeviceId = &builder.mdmDeviceId

	}
	if builder.mdmProviderNameFlag {
		req.MdmProviderName = &builder.mdmProviderName

	}
	return req
}

type DeviceRecordEvent struct {
	DeviceRecordId *string `json:"device_record_id,omitempty"` // 设备认证编码

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

	CurrentUserId *UserId `json:"current_user_id,omitempty"` // 当前登录用户ID

	DeviceName *string `json:"device_name,omitempty"` // 设备名称

	Model *string `json:"model,omitempty"` // 设备型号

	DeviceSystem *int `json:"device_system,omitempty"` // 操作系统

	SerialNumber *string `json:"serial_number,omitempty"` // 生产序列号

	DiskSerialNumber *string `json:"disk_serial_number,omitempty"` // 硬盘序列号

	Uuid *string `json:"uuid,omitempty"` // 主板UUID

	MacAddress *string `json:"mac_address,omitempty"` // MAC地址

	AndroidId *string `json:"android_id,omitempty"` // Android标识符

	Idfv *string `json:"idfv,omitempty"` // iOS供应商标识符

	Aaid *string `json:"aaid,omitempty"` // Harmony供应商标识符

	DeviceOwnership *int `json:"device_ownership,omitempty"` // 设备归属

	DeviceStatus *int `json:"device_status,omitempty"` // 可信状态

	CertificationLevel *int `json:"certification_level,omitempty"` // 认证方式

	DeviceTerminalType *int `json:"device_terminal_type,omitempty"` // 设备类型
}

type DeviceRecordEventBuilder struct {
	deviceRecordId     string // 设备认证编码
	deviceRecordIdFlag bool

	version     string // 版本号
	versionFlag bool

	currentUserId     *UserId // 当前登录用户ID
	currentUserIdFlag bool

	deviceName     string // 设备名称
	deviceNameFlag bool

	model     string // 设备型号
	modelFlag bool

	deviceSystem     int // 操作系统
	deviceSystemFlag bool

	serialNumber     string // 生产序列号
	serialNumberFlag bool

	diskSerialNumber     string // 硬盘序列号
	diskSerialNumberFlag bool

	uuid     string // 主板UUID
	uuidFlag bool

	macAddress     string // MAC地址
	macAddressFlag bool

	androidId     string // Android标识符
	androidIdFlag bool

	idfv     string // iOS供应商标识符
	idfvFlag bool

	aaid     string // Harmony供应商标识符
	aaidFlag bool

	deviceOwnership     int // 设备归属
	deviceOwnershipFlag bool

	deviceStatus     int // 可信状态
	deviceStatusFlag bool

	certificationLevel     int // 认证方式
	certificationLevelFlag bool

	deviceTerminalType     int // 设备类型
	deviceTerminalTypeFlag bool
}

func NewDeviceRecordEventBuilder() *DeviceRecordEventBuilder {
	builder := &DeviceRecordEventBuilder{}
	return builder
}

// 设备认证编码
//
// 示例值：7089353870308032531
func (builder *DeviceRecordEventBuilder) DeviceRecordId(deviceRecordId string) *DeviceRecordEventBuilder {
	builder.deviceRecordId = deviceRecordId
	builder.deviceRecordIdFlag = true
	return builder
}

// 版本号
//
// 示例值：0
func (builder *DeviceRecordEventBuilder) Version(version string) *DeviceRecordEventBuilder {
	builder.version = version
	builder.versionFlag = true
	return builder
}

// 当前登录用户ID
//
// 示例值：
func (builder *DeviceRecordEventBuilder) CurrentUserId(currentUserId *UserId) *DeviceRecordEventBuilder {
	builder.currentUserId = currentUserId
	builder.currentUserIdFlag = true
	return builder
}

// 设备名称
//
// 示例值：Q9C6RYMFDK
func (builder *DeviceRecordEventBuilder) DeviceName(deviceName string) *DeviceRecordEventBuilder {
	builder.deviceName = deviceName
	builder.deviceNameFlag = true
	return builder
}

// 设备型号
//
// 示例值：iPhone13,2
func (builder *DeviceRecordEventBuilder) Model(model string) *DeviceRecordEventBuilder {
	builder.model = model
	builder.modelFlag = true
	return builder
}

// 操作系统
//
// 示例值：0
func (builder *DeviceRecordEventBuilder) DeviceSystem(deviceSystem int) *DeviceRecordEventBuilder {
	builder.deviceSystem = deviceSystem
	builder.deviceSystemFlag = true
	return builder
}

// 生产序列号
//
// 示例值：C02DTHRMML7H
func (builder *DeviceRecordEventBuilder) SerialNumber(serialNumber string) *DeviceRecordEventBuilder {
	builder.serialNumber = serialNumber
	builder.serialNumberFlag = true
	return builder
}

// 硬盘序列号
//
// 示例值：CC344362-5990-5A68-8DDD-64A23C99FA0C
func (builder *DeviceRecordEventBuilder) DiskSerialNumber(diskSerialNumber string) *DeviceRecordEventBuilder {
	builder.diskSerialNumber = diskSerialNumber
	builder.diskSerialNumberFlag = true
	return builder
}

// 主板UUID
//
// 示例值：621CDFF0-13D0-5AB1-9ADC-5F560095F6ED
func (builder *DeviceRecordEventBuilder) Uuid(uuid string) *DeviceRecordEventBuilder {
	builder.uuid = uuid
	builder.uuidFlag = true
	return builder
}

// MAC地址
//
// 示例值：ac:de:48:00:11:21
func (builder *DeviceRecordEventBuilder) MacAddress(macAddress string) *DeviceRecordEventBuilder {
	builder.macAddress = macAddress
	builder.macAddressFlag = true
	return builder
}

// Android标识符
//
// 示例值：02a11ac4a83b918e
func (builder *DeviceRecordEventBuilder) AndroidId(androidId string) *DeviceRecordEventBuilder {
	builder.androidId = androidId
	builder.androidIdFlag = true
	return builder
}

// iOS供应商标识符
//
// 示例值：968F0E5C-C297-4122-ACB6-102494DEFD9A
func (builder *DeviceRecordEventBuilder) Idfv(idfv string) *DeviceRecordEventBuilder {
	builder.idfv = idfv
	builder.idfvFlag = true
	return builder
}

// Harmony供应商标识符
//
// 示例值：ff3c2237-cd76-4331-9d72-0a4470854567
func (builder *DeviceRecordEventBuilder) Aaid(aaid string) *DeviceRecordEventBuilder {
	builder.aaid = aaid
	builder.aaidFlag = true
	return builder
}

// 设备归属
//
// 示例值：0
func (builder *DeviceRecordEventBuilder) DeviceOwnership(deviceOwnership int) *DeviceRecordEventBuilder {
	builder.deviceOwnership = deviceOwnership
	builder.deviceOwnershipFlag = true
	return builder
}

// 可信状态
//
// 示例值：0
func (builder *DeviceRecordEventBuilder) DeviceStatus(deviceStatus int) *DeviceRecordEventBuilder {
	builder.deviceStatus = deviceStatus
	builder.deviceStatusFlag = true
	return builder
}

// 认证方式
//
// 示例值：0
func (builder *DeviceRecordEventBuilder) CertificationLevel(certificationLevel int) *DeviceRecordEventBuilder {
	builder.certificationLevel = certificationLevel
	builder.certificationLevelFlag = true
	return builder
}

// 设备类型
//
// 示例值：0
func (builder *DeviceRecordEventBuilder) DeviceTerminalType(deviceTerminalType int) *DeviceRecordEventBuilder {
	builder.deviceTerminalType = deviceTerminalType
	builder.deviceTerminalTypeFlag = true
	return builder
}

func (builder *DeviceRecordEventBuilder) Build() *DeviceRecordEvent {
	req := &DeviceRecordEvent{}
	if builder.deviceRecordIdFlag {
		req.DeviceRecordId = &builder.deviceRecordId

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

	}
	if builder.currentUserIdFlag {
		req.CurrentUserId = builder.currentUserId
	}
	if builder.deviceNameFlag {
		req.DeviceName = &builder.deviceName

	}
	if builder.modelFlag {
		req.Model = &builder.model

	}
	if builder.deviceSystemFlag {
		req.DeviceSystem = &builder.deviceSystem

	}
	if builder.serialNumberFlag {
		req.SerialNumber = &builder.serialNumber

	}
	if builder.diskSerialNumberFlag {
		req.DiskSerialNumber = &builder.diskSerialNumber

	}
	if builder.uuidFlag {
		req.Uuid = &builder.uuid

	}
	if builder.macAddressFlag {
		req.MacAddress = &builder.macAddress

	}
	if builder.androidIdFlag {
		req.AndroidId = &builder.androidId

	}
	if builder.idfvFlag {
		req.Idfv = &builder.idfv

	}
	if builder.aaidFlag {
		req.Aaid = &builder.aaid

	}
	if builder.deviceOwnershipFlag {
		req.DeviceOwnership = &builder.deviceOwnership

	}
	if builder.deviceStatusFlag {
		req.DeviceStatus = &builder.deviceStatus

	}
	if builder.certificationLevelFlag {
		req.CertificationLevel = &builder.certificationLevel

	}
	if builder.deviceTerminalTypeFlag {
		req.DeviceTerminalType = &builder.deviceTerminalType

	}
	return req
}

type DocToken struct {
	DocToken *string `json:"doc_token,omitempty"` // 云文档token

	ObjectType *string `json:"object_type,omitempty"` // 文档类型
}

type DocTokenBuilder struct {
	docToken     string // 云文档token
	docTokenFlag bool

	objectType     string // 文档类型
	objectTypeFlag bool
}

func NewDocTokenBuilder() *DocTokenBuilder {
	builder := &DocTokenBuilder{}
	return builder
}

// 云文档token
//
// 示例值：doxcnePuYufKa49ISjhD8Ih0ikh
func (builder *DocTokenBuilder) DocToken(docToken string) *DocTokenBuilder {
	builder.docToken = docToken
	builder.docTokenFlag = true
	return builder
}

// 文档类型
//
// 示例值：doc
func (builder *DocTokenBuilder) ObjectType(objectType string) *DocTokenBuilder {
	builder.objectType = objectType
	builder.objectTypeFlag = true
	return builder
}

func (builder *DocTokenBuilder) Build() *DocToken {
	req := &DocToken{}
	if builder.docTokenFlag {
		req.DocToken = &builder.docToken

	}
	if builder.objectTypeFlag {
		req.ObjectType = &builder.objectType

	}
	return req
}

type Docs struct {
	ObjToken *string `json:"obj_token,omitempty"` //

	ObjType *int `json:"obj_type,omitempty"` //

	ObjStatus *int `json:"obj_status,omitempty"` //

	CreateTime *string `json:"create_time,omitempty"` //

	EditTime *string `json:"edit_time,omitempty"` //

	Owner *User `json:"owner,omitempty"` //
}

type DocsBuilder struct {
	objToken     string //
	objTokenFlag bool

	objType     int //
	objTypeFlag bool

	objStatus     int //
	objStatusFlag bool

	createTime     string //
	createTimeFlag bool

	editTime     string //
	editTimeFlag bool

	owner     *User //
	ownerFlag bool
}

func NewDocsBuilder() *DocsBuilder {
	builder := &DocsBuilder{}
	return builder
}

//
//
// 示例值：
func (builder *DocsBuilder) ObjToken(objToken string) *DocsBuilder {
	builder.objToken = objToken
	builder.objTokenFlag = true
	return builder
}

//
//
// 示例值：
func (builder *DocsBuilder) ObjType(objType int) *DocsBuilder {
	builder.objType = objType
	builder.objTypeFlag = true
	return builder
}

//
//
// 示例值：
func (builder *DocsBuilder) ObjStatus(objStatus int) *DocsBuilder {
	builder.objStatus = objStatus
	builder.objStatusFlag = true
	return builder
}

//
//
// 示例值：
func (builder *DocsBuilder) CreateTime(createTime string) *DocsBuilder {
	builder.createTime = createTime
	builder.createTimeFlag = true
	return builder
}

//
//
// 示例值：
func (builder *DocsBuilder) EditTime(editTime string) *DocsBuilder {
	builder.editTime = editTime
	builder.editTimeFlag = true
	return builder
}

//
//
// 示例值：
func (builder *DocsBuilder) Owner(owner *User) *DocsBuilder {
	builder.owner = owner
	builder.ownerFlag = true
	return builder
}

func (builder *DocsBuilder) Build() *Docs {
	req := &Docs{}
	if builder.objTokenFlag {
		req.ObjToken = &builder.objToken

	}
	if builder.objTypeFlag {
		req.ObjType = &builder.objType

	}
	if builder.objStatusFlag {
		req.ObjStatus = &builder.objStatus

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

	}
	if builder.editTimeFlag {
		req.EditTime = &builder.editTime

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

type DocumentToken struct {
	Token *string `json:"token,omitempty"` // 对象Token

	Type *int `json:"type,omitempty"` // 对象类型
}

type DocumentTokenBuilder struct {
	token     string // 对象Token
	tokenFlag bool

	type_    int // 对象类型
	typeFlag bool
}

func NewDocumentTokenBuilder() *DocumentTokenBuilder {
	builder := &DocumentTokenBuilder{}
	return builder
}

// 对象Token
//
// 示例值：
func (builder *DocumentTokenBuilder) Token(token string) *DocumentTokenBuilder {
	builder.token = token
	builder.tokenFlag = true
	return builder
}

// 对象类型
//
// 示例值：
func (builder *DocumentTokenBuilder) Type(type_ int) *DocumentTokenBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

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

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

	}
	return req
}

type DownloadInfo struct {
	Type *string `json:"type,omitempty"` // 下载信息的类型

	ResourceKey *string `json:"resource_key,omitempty"` // 资源Key

	DownloadUrl *string `json:"download_url,omitempty"` // 下载链接
}

type DownloadInfoBuilder struct {
	type_    string // 下载信息的类型
	typeFlag bool

	resourceKey     string // 资源Key
	resourceKeyFlag bool

	downloadUrl     string // 下载链接
	downloadUrlFlag bool
}

func NewDownloadInfoBuilder() *DownloadInfoBuilder {
	builder := &DownloadInfoBuilder{}
	return builder
}

// 下载信息的类型
//
// 示例值：
func (builder *DownloadInfoBuilder) Type(type_ string) *DownloadInfoBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// 资源Key
//
// 示例值：
func (builder *DownloadInfoBuilder) ResourceKey(resourceKey string) *DownloadInfoBuilder {
	builder.resourceKey = resourceKey
	builder.resourceKeyFlag = true
	return builder
}

// 下载链接
//
// 示例值：
func (builder *DownloadInfoBuilder) DownloadUrl(downloadUrl string) *DownloadInfoBuilder {
	builder.downloadUrl = downloadUrl
	builder.downloadUrlFlag = true
	return builder
}

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

	}
	if builder.resourceKeyFlag {
		req.ResourceKey = &builder.resourceKey

	}
	if builder.downloadUrlFlag {
		req.DownloadUrl = &builder.downloadUrl

	}
	return req
}

type Mail struct {
	Id *string `json:"id,omitempty"` // email ID

	Title *string `json:"title,omitempty"` // email 标题

	OwnerType *int `json:"owner_type,omitempty"` // email owner类型

	CreateTime *string `json:"create_time,omitempty"` // email 创建时间

	OwnerUserId *string `json:"owner_user_id,omitempty"` // 企业用户ID

	OwnerAddress *string `json:"owner_address,omitempty"` // 公共邮箱地址
}

type MailBuilder struct {
	id     string // email ID
	idFlag bool

	title     string // email 标题
	titleFlag bool

	ownerType     int // email owner类型
	ownerTypeFlag bool

	createTime     string // email 创建时间
	createTimeFlag bool

	ownerUserId     string // 企业用户ID
	ownerUserIdFlag bool

	ownerAddress     string // 公共邮箱地址
	ownerAddressFlag bool
}

func NewMailBuilder() *MailBuilder {
	builder := &MailBuilder{}
	return builder
}

// email ID
//
// 示例值：5e1d0913ea6770d309fd18778fb45a15a1e69857.8fb8a4da.a4fd.4d48.baa0.2396bf70c04d@staging.feishu.cn
func (builder *MailBuilder) Id(id string) *MailBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// email 标题
//
// 示例值：mail title
func (builder *MailBuilder) Title(title string) *MailBuilder {
	builder.title = title
	builder.titleFlag = true
	return builder
}

// email owner类型
//
// 示例值：1
func (builder *MailBuilder) OwnerType(ownerType int) *MailBuilder {
	builder.ownerType = ownerType
	builder.ownerTypeFlag = true
	return builder
}

// email 创建时间
//
// 示例值：2022-11-01T00:00:00+08:00
func (builder *MailBuilder) CreateTime(createTime string) *MailBuilder {
	builder.createTime = createTime
	builder.createTimeFlag = true
	return builder
}

// 企业用户ID
//
// 示例值：ou_7636758725e268a4c67dc7457d27719d
func (builder *MailBuilder) OwnerUserId(ownerUserId string) *MailBuilder {
	builder.ownerUserId = ownerUserId
	builder.ownerUserIdFlag = true
	return builder
}

// 公共邮箱地址
//
// 示例值：test@bytedance.com
func (builder *MailBuilder) OwnerAddress(ownerAddress string) *MailBuilder {
	builder.ownerAddress = ownerAddress
	builder.ownerAddressFlag = true
	return builder
}

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

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

	}
	if builder.ownerTypeFlag {
		req.OwnerType = &builder.ownerType

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

	}
	if builder.ownerUserIdFlag {
		req.OwnerUserId = &builder.ownerUserId

	}
	if builder.ownerAddressFlag {
		req.OwnerAddress = &builder.ownerAddress

	}
	return req
}

type MailId struct {
	MailId *string `json:"mail_id,omitempty"` // 邮件 id

	MailboxId *string `json:"mailbox_id,omitempty"` // 邮件 owner 邮箱地址
}

type MailIdBuilder struct {
	mailId     string // 邮件 id
	mailIdFlag bool

	mailboxId     string // 邮件 owner 邮箱地址
	mailboxIdFlag bool
}

func NewMailIdBuilder() *MailIdBuilder {
	builder := &MailIdBuilder{}
	return builder
}

// 邮件 id
//
// 示例值：aaaaaaaa
func (builder *MailIdBuilder) MailId(mailId string) *MailIdBuilder {
	builder.mailId = mailId
	builder.mailIdFlag = true
	return builder
}

// 邮件 owner 邮箱地址
//
// 示例值：user@xxx.xx
func (builder *MailIdBuilder) MailboxId(mailboxId string) *MailIdBuilder {
	builder.mailboxId = mailboxId
	builder.mailboxIdFlag = true
	return builder
}

func (builder *MailIdBuilder) Build() *MailId {
	req := &MailId{}
	if builder.mailIdFlag {
		req.MailId = &builder.mailId

	}
	if builder.mailboxIdFlag {
		req.MailboxId = &builder.mailboxId

	}
	return req
}

type Message struct {
	MessageMeta *MessageMeta `json:"message_meta,omitempty"` // 消息ID

	MessageContent *MessageContent `json:"message_content,omitempty"` // 消息内容
}

type MessageBuilder struct {
	messageMeta     *MessageMeta // 消息ID
	messageMetaFlag bool

	messageContent     *MessageContent // 消息内容
	messageContentFlag bool
}

func NewMessageBuilder() *MessageBuilder {
	builder := &MessageBuilder{}
	return builder
}

// 消息ID
//
// 示例值：
func (builder *MessageBuilder) MessageMeta(messageMeta *MessageMeta) *MessageBuilder {
	builder.messageMeta = messageMeta
	builder.messageMetaFlag = true
	return builder
}

// 消息内容
//
// 示例值：
func (builder *MessageBuilder) MessageContent(messageContent *MessageContent) *MessageBuilder {
	builder.messageContent = messageContent
	builder.messageContentFlag = true
	return builder
}

func (builder *MessageBuilder) Build() *Message {
	req := &Message{}
	if builder.messageMetaFlag {
		req.MessageMeta = builder.messageMeta
	}
	if builder.messageContentFlag {
		req.MessageContent = builder.messageContent
	}
	return req
}

type MessageAttachment struct {
	AttachmentId *string `json:"attachment_id,omitempty"` //

	DownloadUrl *string `json:"download_url,omitempty"` // 下载链接
}

type MessageAttachmentBuilder struct {
	attachmentId     string //
	attachmentIdFlag bool

	downloadUrl     string // 下载链接
	downloadUrlFlag bool
}

func NewMessageAttachmentBuilder() *MessageAttachmentBuilder {
	builder := &MessageAttachmentBuilder{}
	return builder
}

//
//
// 示例值：
func (builder *MessageAttachmentBuilder) AttachmentId(attachmentId string) *MessageAttachmentBuilder {
	builder.attachmentId = attachmentId
	builder.attachmentIdFlag = true
	return builder
}

// 下载链接
//
// 示例值：
func (builder *MessageAttachmentBuilder) DownloadUrl(downloadUrl string) *MessageAttachmentBuilder {
	builder.downloadUrl = downloadUrl
	builder.downloadUrlFlag = true
	return builder
}

func (builder *MessageAttachmentBuilder) Build() *MessageAttachment {
	req := &MessageAttachment{}
	if builder.attachmentIdFlag {
		req.AttachmentId = &builder.attachmentId

	}
	if builder.downloadUrlFlag {
		req.DownloadUrl = &builder.downloadUrl

	}
	return req
}

type MessageAudioContent struct {
	AudioKey *string `json:"audio_key,omitempty"` // 视频链接
}

type MessageAudioContentBuilder struct {
	audioKey     string // 视频链接
	audioKeyFlag bool
}

func NewMessageAudioContentBuilder() *MessageAudioContentBuilder {
	builder := &MessageAudioContentBuilder{}
	return builder
}

// 视频链接
//
// 示例值：
func (builder *MessageAudioContentBuilder) AudioKey(audioKey string) *MessageAudioContentBuilder {
	builder.audioKey = audioKey
	builder.audioKeyFlag = true
	return builder
}

func (builder *MessageAudioContentBuilder) Build() *MessageAudioContent {
	req := &MessageAudioContent{}
	if builder.audioKeyFlag {
		req.AudioKey = &builder.audioKey

	}
	return req
}

type MessageCalendarContent struct {
	Summary *string `json:"summary,omitempty"` // 概要
}

type MessageCalendarContentBuilder struct {
	summary     string // 概要
	summaryFlag bool
}

func NewMessageCalendarContentBuilder() *MessageCalendarContentBuilder {
	builder := &MessageCalendarContentBuilder{}
	return builder
}

// 概要
//
// 示例值：
func (builder *MessageCalendarContentBuilder) Summary(summary string) *MessageCalendarContentBuilder {
	builder.summary = summary
	builder.summaryFlag = true
	return builder
}

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

	}
	return req
}

type MessageCardContent struct {
	Title *string `json:"title,omitempty"` // 卡片标题
}

type MessageCardContentBuilder struct {
	title     string // 卡片标题
	titleFlag bool
}

func NewMessageCardContentBuilder() *MessageCardContentBuilder {
	builder := &MessageCardContentBuilder{}
	return builder
}

// 卡片标题
//
// 示例值：
func (builder *MessageCardContentBuilder) Title(title string) *MessageCardContentBuilder {
	builder.title = title
	builder.titleFlag = true
	return builder
}

func (builder *MessageCardContentBuilder) Build() *MessageCardContent {
	req := &MessageCardContent{}
	if builder.titleFlag {
		req.Title = &builder.title

	}
	return req
}

type MessageContent struct {
	TextContent *MessageTextContent `json:"text_content,omitempty"` // 文本内容

	PostContent *MessagePostContent `json:"post_content,omitempty"` // 富文本

	MergeForwardContent *MessageMergeForwardContent `json:"merge_forward_content,omitempty"` // 合并的转发消息

	SystemContent *MessageSystemContent `json:"system_content,omitempty"` // 系统消息内容

	LocationContent *MessageLocationContent `json:"location_content,omitempty"` // 位置

	ShareGroupChatContent *MessageShareGroupChatContent `json:"share_group_chat_content,omitempty"` // 分享会话

	ShareUserCardContent *MessageShareUserCardContent `json:"share_user_card_content,omitempty"` // 分享用户卡片

	StickerContent *MessageStickerContent `json:"sticker_content,omitempty"` // sticker

	CardContent *MessageCardContent `json:"card_content,omitempty"` // 卡片

	VideoChatContent *MessageVideoChatContent `json:"video_chat_content,omitempty"` // 视频

	ToDoContent *MessageTodoContent `json:"to_do_content,omitempty"` // todo

	HongBaoContent *MessageHongBaoContent `json:"hong_bao_content,omitempty"` // 红包

	CalendarContent *MessageCalendarContent `json:"calendar_content,omitempty"` // 日历

	FileContent *MessageFileContent `json:"file_content,omitempty"` // 文件

	ImageContent *MessageImageContent `json:"image_content,omitempty"` // 图片

	AudioContent *MessageAudioContent `json:"audio_content,omitempty"` // 视频

	MediaContent *MessageMediaContent `json:"media_content,omitempty"` // 媒体

	ShareCalendarEventContent *MessageShareCalendarEventContent `json:"share_calendar_event_content,omitempty"` // 分享日历事件

	GeneralCalendarContent *MessageGeneralCalendarContent `json:"general_calendar_content,omitempty"` // 普通日历
}

type MessageContentBuilder struct {
	textContent     *MessageTextContent // 文本内容
	textContentFlag bool

	postContent     *MessagePostContent // 富文本
	postContentFlag bool

	mergeForwardContent     *MessageMergeForwardContent // 合并的转发消息
	mergeForwardContentFlag bool

	systemContent     *MessageSystemContent // 系统消息内容
	systemContentFlag bool

	locationContent     *MessageLocationContent // 位置
	locationContentFlag bool

	shareGroupChatContent     *MessageShareGroupChatContent // 分享会话
	shareGroupChatContentFlag bool

	shareUserCardContent     *MessageShareUserCardContent // 分享用户卡片
	shareUserCardContentFlag bool

	stickerContent     *MessageStickerContent // sticker
	stickerContentFlag bool

	cardContent     *MessageCardContent // 卡片
	cardContentFlag bool

	videoChatContent     *MessageVideoChatContent // 视频
	videoChatContentFlag bool

	toDoContent     *MessageTodoContent // todo
	toDoContentFlag bool

	hongBaoContent     *MessageHongBaoContent // 红包
	hongBaoContentFlag bool

	calendarContent     *MessageCalendarContent // 日历
	calendarContentFlag bool

	fileContent     *MessageFileContent // 文件
	fileContentFlag bool

	imageContent     *MessageImageContent // 图片
	imageContentFlag bool

	audioContent     *MessageAudioContent // 视频
	audioContentFlag bool

	mediaContent     *MessageMediaContent // 媒体
	mediaContentFlag bool

	shareCalendarEventContent     *MessageShareCalendarEventContent // 分享日历事件
	shareCalendarEventContentFlag bool

	generalCalendarContent     *MessageGeneralCalendarContent // 普通日历
	generalCalendarContentFlag bool
}

func NewMessageContentBuilder() *MessageContentBuilder {
	builder := &MessageContentBuilder{}
	return builder
}

// 文本内容
//
// 示例值：
func (builder *MessageContentBuilder) TextContent(textContent *MessageTextContent) *MessageContentBuilder {
	builder.textContent = textContent
	builder.textContentFlag = true
	return builder
}

// 富文本
//
// 示例值：
func (builder *MessageContentBuilder) PostContent(postContent *MessagePostContent) *MessageContentBuilder {
	builder.postContent = postContent
	builder.postContentFlag = true
	return builder
}

// 合并的转发消息
//
// 示例值：
func (builder *MessageContentBuilder) MergeForwardContent(mergeForwardContent *MessageMergeForwardContent) *MessageContentBuilder {
	builder.mergeForwardContent = mergeForwardContent
	builder.mergeForwardContentFlag = true
	return builder
}

// 系统消息内容
//
// 示例值：
func (builder *MessageContentBuilder) SystemContent(systemContent *MessageSystemContent) *MessageContentBuilder {
	builder.systemContent = systemContent
	builder.systemContentFlag = true
	return builder
}

// 位置
//
// 示例值：
func (builder *MessageContentBuilder) LocationContent(locationContent *MessageLocationContent) *MessageContentBuilder {
	builder.locationContent = locationContent
	builder.locationContentFlag = true
	return builder
}

// 分享会话
//
// 示例值：
func (builder *MessageContentBuilder) ShareGroupChatContent(shareGroupChatContent *MessageShareGroupChatContent) *MessageContentBuilder {
	builder.shareGroupChatContent = shareGroupChatContent
	builder.shareGroupChatContentFlag = true
	return builder
}

// 分享用户卡片
//
// 示例值：
func (builder *MessageContentBuilder) ShareUserCardContent(shareUserCardContent *MessageShareUserCardContent) *MessageContentBuilder {
	builder.shareUserCardContent = shareUserCardContent
	builder.shareUserCardContentFlag = true
	return builder
}

// sticker
//
// 示例值：
func (builder *MessageContentBuilder) StickerContent(stickerContent *MessageStickerContent) *MessageContentBuilder {
	builder.stickerContent = stickerContent
	builder.stickerContentFlag = true
	return builder
}

// 卡片
//
// 示例值：
func (builder *MessageContentBuilder) CardContent(cardContent *MessageCardContent) *MessageContentBuilder {
	builder.cardContent = cardContent
	builder.cardContentFlag = true
	return builder
}

// 视频
//
// 示例值：
func (builder *MessageContentBuilder) VideoChatContent(videoChatContent *MessageVideoChatContent) *MessageContentBuilder {
	builder.videoChatContent = videoChatContent
	builder.videoChatContentFlag = true
	return builder
}

// todo
//
// 示例值：
func (builder *MessageContentBuilder) ToDoContent(toDoContent *MessageTodoContent) *MessageContentBuilder {
	builder.toDoContent = toDoContent
	builder.toDoContentFlag = true
	return builder
}

// 红包
//
// 示例值：
func (builder *MessageContentBuilder) HongBaoContent(hongBaoContent *MessageHongBaoContent) *MessageContentBuilder {
	builder.hongBaoContent = hongBaoContent
	builder.hongBaoContentFlag = true
	return builder
}

// 日历
//
// 示例值：
func (builder *MessageContentBuilder) CalendarContent(calendarContent *MessageCalendarContent) *MessageContentBuilder {
	builder.calendarContent = calendarContent
	builder.calendarContentFlag = true
	return builder
}

// 文件
//
// 示例值：
func (builder *MessageContentBuilder) FileContent(fileContent *MessageFileContent) *MessageContentBuilder {
	builder.fileContent = fileContent
	builder.fileContentFlag = true
	return builder
}

// 图片
//
// 示例值：
func (builder *MessageContentBuilder) ImageContent(imageContent *MessageImageContent) *MessageContentBuilder {
	builder.imageContent = imageContent
	builder.imageContentFlag = true
	return builder
}

// 视频
//
// 示例值：
func (builder *MessageContentBuilder) AudioContent(audioContent *MessageAudioContent) *MessageContentBuilder {
	builder.audioContent = audioContent
	builder.audioContentFlag = true
	return builder
}

// 媒体
//
// 示例值：
func (builder *MessageContentBuilder) MediaContent(mediaContent *MessageMediaContent) *MessageContentBuilder {
	builder.mediaContent = mediaContent
	builder.mediaContentFlag = true
	return builder
}

// 分享日历事件
//
// 示例值：
func (builder *MessageContentBuilder) ShareCalendarEventContent(shareCalendarEventContent *MessageShareCalendarEventContent) *MessageContentBuilder {
	builder.shareCalendarEventContent = shareCalendarEventContent
	builder.shareCalendarEventContentFlag = true
	return builder
}

// 普通日历
//
// 示例值：
func (builder *MessageContentBuilder) GeneralCalendarContent(generalCalendarContent *MessageGeneralCalendarContent) *MessageContentBuilder {
	builder.generalCalendarContent = generalCalendarContent
	builder.generalCalendarContentFlag = true
	return builder
}

func (builder *MessageContentBuilder) Build() *MessageContent {
	req := &MessageContent{}
	if builder.textContentFlag {
		req.TextContent = builder.textContent
	}
	if builder.postContentFlag {
		req.PostContent = builder.postContent
	}
	if builder.mergeForwardContentFlag {
		req.MergeForwardContent = builder.mergeForwardContent
	}
	if builder.systemContentFlag {
		req.SystemContent = builder.systemContent
	}
	if builder.locationContentFlag {
		req.LocationContent = builder.locationContent
	}
	if builder.shareGroupChatContentFlag {
		req.ShareGroupChatContent = builder.shareGroupChatContent
	}
	if builder.shareUserCardContentFlag {
		req.ShareUserCardContent = builder.shareUserCardContent
	}
	if builder.stickerContentFlag {
		req.StickerContent = builder.stickerContent
	}
	if builder.cardContentFlag {
		req.CardContent = builder.cardContent
	}
	if builder.videoChatContentFlag {
		req.VideoChatContent = builder.videoChatContent
	}
	if builder.toDoContentFlag {
		req.ToDoContent = builder.toDoContent
	}
	if builder.hongBaoContentFlag {
		req.HongBaoContent = builder.hongBaoContent
	}
	if builder.calendarContentFlag {
		req.CalendarContent = builder.calendarContent
	}
	if builder.fileContentFlag {
		req.FileContent = builder.fileContent
	}
	if builder.imageContentFlag {
		req.ImageContent = builder.imageContent
	}
	if builder.audioContentFlag {
		req.AudioContent = builder.audioContent
	}
	if builder.mediaContentFlag {
		req.MediaContent = builder.mediaContent
	}
	if builder.shareCalendarEventContentFlag {
		req.ShareCalendarEventContent = builder.shareCalendarEventContent
	}
	if builder.generalCalendarContentFlag {
		req.GeneralCalendarContent = builder.generalCalendarContent
	}
	return req
}

type MessageFileContent struct {
	FileKey *string `json:"file_key,omitempty"` // 文件链接
}

type MessageFileContentBuilder struct {
	fileKey     string // 文件链接
	fileKeyFlag bool
}

func NewMessageFileContentBuilder() *MessageFileContentBuilder {
	builder := &MessageFileContentBuilder{}
	return builder
}

// 文件链接
//
// 示例值：
func (builder *MessageFileContentBuilder) FileKey(fileKey string) *MessageFileContentBuilder {
	builder.fileKey = fileKey
	builder.fileKeyFlag = true
	return builder
}

func (builder *MessageFileContentBuilder) Build() *MessageFileContent {
	req := &MessageFileContent{}
	if builder.fileKeyFlag {
		req.FileKey = &builder.fileKey

	}
	return req
}

type MessageGeneralCalendarContent struct {
	Summary *string `json:"summary,omitempty"` // 概要
}

type MessageGeneralCalendarContentBuilder struct {
	summary     string // 概要
	summaryFlag bool
}

func NewMessageGeneralCalendarContentBuilder() *MessageGeneralCalendarContentBuilder {
	builder := &MessageGeneralCalendarContentBuilder{}
	return builder
}

// 概要
//
// 示例值：
func (builder *MessageGeneralCalendarContentBuilder) Summary(summary string) *MessageGeneralCalendarContentBuilder {
	builder.summary = summary
	builder.summaryFlag = true
	return builder
}

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

	}
	return req
}

type MessageHongBaoContent struct {
}

type MessageHongBaoContentBuilder struct {
}

func NewMessageHongBaoContentBuilder() *MessageHongBaoContentBuilder {
	builder := &MessageHongBaoContentBuilder{}
	return builder
}

func (builder *MessageHongBaoContentBuilder) Build() *MessageHongBaoContent {
	req := &MessageHongBaoContent{}
	return req
}

type MessageId struct {
	MessageId *string `json:"message_id,omitempty"` // 消息 ID
}

type MessageIdBuilder struct {
	messageId     string // 消息 ID
	messageIdFlag bool
}

func NewMessageIdBuilder() *MessageIdBuilder {
	builder := &MessageIdBuilder{}
	return builder
}

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

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

	}
	return req
}

type MessageImageContent struct {
	ImageKey *string `json:"image_key,omitempty"` // 图片链接
}

type MessageImageContentBuilder struct {
	imageKey     string // 图片链接
	imageKeyFlag bool
}

func NewMessageImageContentBuilder() *MessageImageContentBuilder {
	builder := &MessageImageContentBuilder{}
	return builder
}

// 图片链接
//
// 示例值：
func (builder *MessageImageContentBuilder) ImageKey(imageKey string) *MessageImageContentBuilder {
	builder.imageKey = imageKey
	builder.imageKeyFlag = true
	return builder
}

func (builder *MessageImageContentBuilder) Build() *MessageImageContent {
	req := &MessageImageContent{}
	if builder.imageKeyFlag {
		req.ImageKey = &builder.imageKey

	}
	return req
}

type MessageLocationContent struct {
}

type MessageLocationContentBuilder struct {
}

func NewMessageLocationContentBuilder() *MessageLocationContentBuilder {
	builder := &MessageLocationContentBuilder{}
	return builder
}

func (builder *MessageLocationContentBuilder) Build() *MessageLocationContent {
	req := &MessageLocationContent{}
	return req
}

type MessageMediaContent struct {
	MediaKey *string `json:"media_key,omitempty"` // 媒体链接
}

type MessageMediaContentBuilder struct {
	mediaKey     string // 媒体链接
	mediaKeyFlag bool
}

func NewMessageMediaContentBuilder() *MessageMediaContentBuilder {
	builder := &MessageMediaContentBuilder{}
	return builder
}

// 媒体链接
//
// 示例值：
func (builder *MessageMediaContentBuilder) MediaKey(mediaKey string) *MessageMediaContentBuilder {
	builder.mediaKey = mediaKey
	builder.mediaKeyFlag = true
	return builder
}

func (builder *MessageMediaContentBuilder) Build() *MessageMediaContent {
	req := &MessageMediaContent{}
	if builder.mediaKeyFlag {
		req.MediaKey = &builder.mediaKey

	}
	return req
}

type MessageMergeForwardContent struct {
	MessageIdList []string `json:"message_id_list,omitempty"` // 被转发的消息ID
}

type MessageMergeForwardContentBuilder struct {
	messageIdList     []string // 被转发的消息ID
	messageIdListFlag bool
}

func NewMessageMergeForwardContentBuilder() *MessageMergeForwardContentBuilder {
	builder := &MessageMergeForwardContentBuilder{}
	return builder
}

// 被转发的消息ID
//
// 示例值：
func (builder *MessageMergeForwardContentBuilder) MessageIdList(messageIdList []string) *MessageMergeForwardContentBuilder {
	builder.messageIdList = messageIdList
	builder.messageIdListFlag = true
	return builder
}

func (builder *MessageMergeForwardContentBuilder) Build() *MessageMergeForwardContent {
	req := &MessageMergeForwardContent{}
	if builder.messageIdListFlag {
		req.MessageIdList = builder.messageIdList
	}
	return req
}

type MessageMeta struct {
	MessageId *string `json:"message_id,omitempty"` // 消息ID

	MessageType *int `json:"message_type,omitempty"` // 消息类型

	ChatMeta *ChatMeta `json:"chat_meta,omitempty"` // 会话元信息

	Sender *User `json:"sender,omitempty"` // 消息发送人

	SendTime *string `json:"send_time,omitempty"` // 发送时间; 时间格式: RFC3339

	ReplyMessageId *string `json:"reply_message_id,omitempty"` // 回复消息的ID

	TransmitParentMessageId *string `json:"transmit_parent_message_id,omitempty"` // 转发的父消息ID

	SenderType *int `json:"sender_type,omitempty"` // 发送消息者类型

	MessageStatus *int `json:"message_status,omitempty"` // 消息状态
}

type MessageMetaBuilder struct {
	messageId     string // 消息ID
	messageIdFlag bool

	messageType     int // 消息类型
	messageTypeFlag bool

	chatMeta     *ChatMeta // 会话元信息
	chatMetaFlag bool

	sender     *User // 消息发送人
	senderFlag bool

	sendTime     string // 发送时间; 时间格式: RFC3339
	sendTimeFlag bool

	replyMessageId     string // 回复消息的ID
	replyMessageIdFlag bool

	transmitParentMessageId     string // 转发的父消息ID
	transmitParentMessageIdFlag bool

	senderType     int // 发送消息者类型
	senderTypeFlag bool

	messageStatus     int // 消息状态
	messageStatusFlag bool
}

func NewMessageMetaBuilder() *MessageMetaBuilder {
	builder := &MessageMetaBuilder{}
	return builder
}

// 消息ID
//
// 示例值：
func (builder *MessageMetaBuilder) MessageId(messageId string) *MessageMetaBuilder {
	builder.messageId = messageId
	builder.messageIdFlag = true
	return builder
}

// 消息类型
//
// 示例值：
func (builder *MessageMetaBuilder) MessageType(messageType int) *MessageMetaBuilder {
	builder.messageType = messageType
	builder.messageTypeFlag = true
	return builder
}

// 会话元信息
//
// 示例值：
func (builder *MessageMetaBuilder) ChatMeta(chatMeta *ChatMeta) *MessageMetaBuilder {
	builder.chatMeta = chatMeta
	builder.chatMetaFlag = true
	return builder
}

// 消息发送人
//
// 示例值：
func (builder *MessageMetaBuilder) Sender(sender *User) *MessageMetaBuilder {
	builder.sender = sender
	builder.senderFlag = true
	return builder
}

// 发送时间; 时间格式: RFC3339
//
// 示例值：
func (builder *MessageMetaBuilder) SendTime(sendTime string) *MessageMetaBuilder {
	builder.sendTime = sendTime
	builder.sendTimeFlag = true
	return builder
}

// 回复消息的ID
//
// 示例值：
func (builder *MessageMetaBuilder) ReplyMessageId(replyMessageId string) *MessageMetaBuilder {
	builder.replyMessageId = replyMessageId
	builder.replyMessageIdFlag = true
	return builder
}

// 转发的父消息ID
//
// 示例值：
func (builder *MessageMetaBuilder) TransmitParentMessageId(transmitParentMessageId string) *MessageMetaBuilder {
	builder.transmitParentMessageId = transmitParentMessageId
	builder.transmitParentMessageIdFlag = true
	return builder
}

// 发送消息者类型
//
// 示例值：
func (builder *MessageMetaBuilder) SenderType(senderType int) *MessageMetaBuilder {
	builder.senderType = senderType
	builder.senderTypeFlag = true
	return builder
}

// 消息状态
//
// 示例值：
func (builder *MessageMetaBuilder) MessageStatus(messageStatus int) *MessageMetaBuilder {
	builder.messageStatus = messageStatus
	builder.messageStatusFlag = true
	return builder
}

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

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

	}
	if builder.chatMetaFlag {
		req.ChatMeta = builder.chatMeta
	}
	if builder.senderFlag {
		req.Sender = builder.sender
	}
	if builder.sendTimeFlag {
		req.SendTime = &builder.sendTime

	}
	if builder.replyMessageIdFlag {
		req.ReplyMessageId = &builder.replyMessageId

	}
	if builder.transmitParentMessageIdFlag {
		req.TransmitParentMessageId = &builder.transmitParentMessageId

	}
	if builder.senderTypeFlag {
		req.SenderType = &builder.senderType

	}
	if builder.messageStatusFlag {
		req.MessageStatus = &builder.messageStatus

	}
	return req
}

type MessagePostContent struct {
	Title *string `json:"title,omitempty"` // 标题

	Text *string `json:"text,omitempty"` // 文本

	ImageKeyList []string `json:"image_key_list,omitempty"` // 图片链接

	MediaKeyList []string `json:"media_key_list,omitempty"` // 媒体链接
}

type MessagePostContentBuilder struct {
	title     string // 标题
	titleFlag bool

	text     string // 文本
	textFlag bool

	imageKeyList     []string // 图片链接
	imageKeyListFlag bool

	mediaKeyList     []string // 媒体链接
	mediaKeyListFlag bool
}

func NewMessagePostContentBuilder() *MessagePostContentBuilder {
	builder := &MessagePostContentBuilder{}
	return builder
}

// 标题
//
// 示例值：
func (builder *MessagePostContentBuilder) Title(title string) *MessagePostContentBuilder {
	builder.title = title
	builder.titleFlag = true
	return builder
}

// 文本
//
// 示例值：
func (builder *MessagePostContentBuilder) Text(text string) *MessagePostContentBuilder {
	builder.text = text
	builder.textFlag = true
	return builder
}

// 图片链接
//
// 示例值：
func (builder *MessagePostContentBuilder) ImageKeyList(imageKeyList []string) *MessagePostContentBuilder {
	builder.imageKeyList = imageKeyList
	builder.imageKeyListFlag = true
	return builder
}

// 媒体链接
//
// 示例值：
func (builder *MessagePostContentBuilder) MediaKeyList(mediaKeyList []string) *MessagePostContentBuilder {
	builder.mediaKeyList = mediaKeyList
	builder.mediaKeyListFlag = true
	return builder
}

func (builder *MessagePostContentBuilder) Build() *MessagePostContent {
	req := &MessagePostContent{}
	if builder.titleFlag {
		req.Title = &builder.title

	}
	if builder.textFlag {
		req.Text = &builder.text

	}
	if builder.imageKeyListFlag {
		req.ImageKeyList = builder.imageKeyList
	}
	if builder.mediaKeyListFlag {
		req.MediaKeyList = builder.mediaKeyList
	}
	return req
}

type MessageShareCalendarEventContent struct {
	Summary *string `json:"summary,omitempty"` // 概要
}

type MessageShareCalendarEventContentBuilder struct {
	summary     string // 概要
	summaryFlag bool
}

func NewMessageShareCalendarEventContentBuilder() *MessageShareCalendarEventContentBuilder {
	builder := &MessageShareCalendarEventContentBuilder{}
	return builder
}

// 概要
//
// 示例值：
func (builder *MessageShareCalendarEventContentBuilder) Summary(summary string) *MessageShareCalendarEventContentBuilder {
	builder.summary = summary
	builder.summaryFlag = true
	return builder
}

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

	}
	return req
}

type MessageShareGroupChatContent struct {
}

type MessageShareGroupChatContentBuilder struct {
}

func NewMessageShareGroupChatContentBuilder() *MessageShareGroupChatContentBuilder {
	builder := &MessageShareGroupChatContentBuilder{}
	return builder
}

func (builder *MessageShareGroupChatContentBuilder) Build() *MessageShareGroupChatContent {
	req := &MessageShareGroupChatContent{}
	return req
}

type MessageShareUserCardContent struct {
}

type MessageShareUserCardContentBuilder struct {
}

func NewMessageShareUserCardContentBuilder() *MessageShareUserCardContentBuilder {
	builder := &MessageShareUserCardContentBuilder{}
	return builder
}

func (builder *MessageShareUserCardContentBuilder) Build() *MessageShareUserCardContent {
	req := &MessageShareUserCardContent{}
	return req
}

type MessageStickerContent struct {
}

type MessageStickerContentBuilder struct {
}

func NewMessageStickerContentBuilder() *MessageStickerContentBuilder {
	builder := &MessageStickerContentBuilder{}
	return builder
}

func (builder *MessageStickerContentBuilder) Build() *MessageStickerContent {
	req := &MessageStickerContent{}
	return req
}

type MessageSystemContent struct {
}

type MessageSystemContentBuilder struct {
}

func NewMessageSystemContentBuilder() *MessageSystemContentBuilder {
	builder := &MessageSystemContentBuilder{}
	return builder
}

func (builder *MessageSystemContentBuilder) Build() *MessageSystemContent {
	req := &MessageSystemContent{}
	return req
}

type MessageTextContent struct {
	Text *string `json:"text,omitempty"` // 消息文本
}

type MessageTextContentBuilder struct {
	text     string // 消息文本
	textFlag bool
}

func NewMessageTextContentBuilder() *MessageTextContentBuilder {
	builder := &MessageTextContentBuilder{}
	return builder
}

// 消息文本
//
// 示例值：
func (builder *MessageTextContentBuilder) Text(text string) *MessageTextContentBuilder {
	builder.text = text
	builder.textFlag = true
	return builder
}

func (builder *MessageTextContentBuilder) Build() *MessageTextContent {
	req := &MessageTextContent{}
	if builder.textFlag {
		req.Text = &builder.text

	}
	return req
}

type MessageTodoContent struct {
	Id *string `json:"id,omitempty"` // 唯一标识

	Summary *string `json:"summary,omitempty"` // 概要
}

type MessageTodoContentBuilder struct {
	id     string // 唯一标识
	idFlag bool

	summary     string // 概要
	summaryFlag bool
}

func NewMessageTodoContentBuilder() *MessageTodoContentBuilder {
	builder := &MessageTodoContentBuilder{}
	return builder
}

// 唯一标识
//
// 示例值：
func (builder *MessageTodoContentBuilder) Id(id string) *MessageTodoContentBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 概要
//
// 示例值：
func (builder *MessageTodoContentBuilder) Summary(summary string) *MessageTodoContentBuilder {
	builder.summary = summary
	builder.summaryFlag = true
	return builder
}

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

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

	}
	return req
}

type MessageVideoChatContent struct {
	Topic *string `json:"topic,omitempty"` // 主题
}

type MessageVideoChatContentBuilder struct {
	topic     string // 主题
	topicFlag bool
}

func NewMessageVideoChatContentBuilder() *MessageVideoChatContentBuilder {
	builder := &MessageVideoChatContentBuilder{}
	return builder
}

// 主题
//
// 示例值：
func (builder *MessageVideoChatContentBuilder) Topic(topic string) *MessageVideoChatContentBuilder {
	builder.topic = topic
	builder.topicFlag = true
	return builder
}

func (builder *MessageVideoChatContentBuilder) Build() *MessageVideoChatContent {
	req := &MessageVideoChatContent{}
	if builder.topicFlag {
		req.Topic = &builder.topic

	}
	return req
}

type MinutesToken struct {
	MinutesToken *string `json:"minutes_token,omitempty"` // 妙记唯一标识
}

type MinutesTokenBuilder struct {
	minutesToken     string // 妙记唯一标识
	minutesTokenFlag bool
}

func NewMinutesTokenBuilder() *MinutesTokenBuilder {
	builder := &MinutesTokenBuilder{}
	return builder
}

// 妙记唯一标识
//
// 示例值：obcnq3b9jl72l83w4f14xxxx
func (builder *MinutesTokenBuilder) MinutesToken(minutesToken string) *MinutesTokenBuilder {
	builder.minutesToken = minutesToken
	builder.minutesTokenFlag = true
	return builder
}

func (builder *MinutesTokenBuilder) Build() *MinutesToken {
	req := &MinutesToken{}
	if builder.minutesTokenFlag {
		req.MinutesToken = &builder.minutesToken

	}
	return req
}

type ParamDocsExport struct {
	WithDocPermission *bool `json:"with_doc_permission,omitempty"` // 导出文档权限信息

	WithCommentJson *bool `json:"with_comment_json,omitempty"` // 导出文档评论信息
}

type ParamDocsExportBuilder struct {
	withDocPermission     bool // 导出文档权限信息
	withDocPermissionFlag bool

	withCommentJson     bool // 导出文档评论信息
	withCommentJsonFlag bool
}

func NewParamDocsExportBuilder() *ParamDocsExportBuilder {
	builder := &ParamDocsExportBuilder{}
	return builder
}

// 导出文档权限信息
//
// 示例值：
func (builder *ParamDocsExportBuilder) WithDocPermission(withDocPermission bool) *ParamDocsExportBuilder {
	builder.withDocPermission = withDocPermission
	builder.withDocPermissionFlag = true
	return builder
}

// 导出文档评论信息
//
// 示例值：
func (builder *ParamDocsExportBuilder) WithCommentJson(withCommentJson bool) *ParamDocsExportBuilder {
	builder.withCommentJson = withCommentJson
	builder.withCommentJsonFlag = true
	return builder
}

func (builder *ParamDocsExportBuilder) Build() *ParamDocsExport {
	req := &ParamDocsExport{}
	if builder.withDocPermissionFlag {
		req.WithDocPermission = &builder.withDocPermission

	}
	if builder.withCommentJsonFlag {
		req.WithCommentJson = &builder.withCommentJson

	}
	return req
}

type ParamDocsSearch struct {
	OwnerIds []string `json:"owner_ids,omitempty"` // 用户列表

	DocStatus []int `json:"doc_status,omitempty"` // 文档所处状态

	DocType []int `json:"doc_type,omitempty"` // 文档所属类型

	DocTokens []string `json:"doc_tokens,omitempty"` // 文档token

	CreateTimeRange *TimeRange `json:"create_time_range,omitempty"` // 文档创建时间范围

	UpdateTimeRange *TimeRange `json:"update_time_range,omitempty"` // 文档更新时间范围

	Query *string `json:"query,omitempty"` // 搜索语句
}

type ParamDocsSearchBuilder struct {
	ownerIds     []string // 用户列表
	ownerIdsFlag bool

	docStatus     []int // 文档所处状态
	docStatusFlag bool

	docType     []int // 文档所属类型
	docTypeFlag bool

	docTokens     []string // 文档token
	docTokensFlag bool

	createTimeRange     *TimeRange // 文档创建时间范围
	createTimeRangeFlag bool

	updateTimeRange     *TimeRange // 文档更新时间范围
	updateTimeRangeFlag bool

	query     string // 搜索语句
	queryFlag bool
}

func NewParamDocsSearchBuilder() *ParamDocsSearchBuilder {
	builder := &ParamDocsSearchBuilder{}
	return builder
}

// 用户列表
//
// 示例值：
func (builder *ParamDocsSearchBuilder) OwnerIds(ownerIds []string) *ParamDocsSearchBuilder {
	builder.ownerIds = ownerIds
	builder.ownerIdsFlag = true
	return builder
}

// 文档所处状态
//
// 示例值：
func (builder *ParamDocsSearchBuilder) DocStatus(docStatus []int) *ParamDocsSearchBuilder {
	builder.docStatus = docStatus
	builder.docStatusFlag = true
	return builder
}

// 文档所属类型
//
// 示例值：
func (builder *ParamDocsSearchBuilder) DocType(docType []int) *ParamDocsSearchBuilder {
	builder.docType = docType
	builder.docTypeFlag = true
	return builder
}

// 文档token
//
// 示例值：
func (builder *ParamDocsSearchBuilder) DocTokens(docTokens []string) *ParamDocsSearchBuilder {
	builder.docTokens = docTokens
	builder.docTokensFlag = true
	return builder
}

// 文档创建时间范围
//
// 示例值：
func (builder *ParamDocsSearchBuilder) CreateTimeRange(createTimeRange *TimeRange) *ParamDocsSearchBuilder {
	builder.createTimeRange = createTimeRange
	builder.createTimeRangeFlag = true
	return builder
}

// 文档更新时间范围
//
// 示例值：
func (builder *ParamDocsSearchBuilder) UpdateTimeRange(updateTimeRange *TimeRange) *ParamDocsSearchBuilder {
	builder.updateTimeRange = updateTimeRange
	builder.updateTimeRangeFlag = true
	return builder
}

// 搜索语句
//
// 示例值：test
func (builder *ParamDocsSearchBuilder) Query(query string) *ParamDocsSearchBuilder {
	builder.query = query
	builder.queryFlag = true
	return builder
}

func (builder *ParamDocsSearchBuilder) Build() *ParamDocsSearch {
	req := &ParamDocsSearch{}
	if builder.ownerIdsFlag {
		req.OwnerIds = builder.ownerIds
	}
	if builder.docStatusFlag {
		req.DocStatus = builder.docStatus
	}
	if builder.docTypeFlag {
		req.DocType = builder.docType
	}
	if builder.docTokensFlag {
		req.DocTokens = builder.docTokens
	}
	if builder.createTimeRangeFlag {
		req.CreateTimeRange = builder.createTimeRange
	}
	if builder.updateTimeRangeFlag {
		req.UpdateTimeRange = builder.updateTimeRange
	}
	if builder.queryFlag {
		req.Query = &builder.query

	}
	return req
}

type ParamDocsUrl struct {
	Urls []string `json:"urls,omitempty"` // 文档URL
}

type ParamDocsUrlBuilder struct {
	urls     []string // 文档URL
	urlsFlag bool
}

func NewParamDocsUrlBuilder() *ParamDocsUrlBuilder {
	builder := &ParamDocsUrlBuilder{}
	return builder
}

// 文档URL
//
// 示例值：
func (builder *ParamDocsUrlBuilder) Urls(urls []string) *ParamDocsUrlBuilder {
	builder.urls = urls
	builder.urlsFlag = true
	return builder
}

func (builder *ParamDocsUrlBuilder) Build() *ParamDocsUrl {
	req := &ParamDocsUrl{}
	if builder.urlsFlag {
		req.Urls = builder.urls
	}
	return req
}

type ParamMailId struct {
	MailIds []string `json:"mail_ids,omitempty"` // 邮件ID列表
}

type ParamMailIdBuilder struct {
	mailIds     []string // 邮件ID列表
	mailIdsFlag bool
}

func NewParamMailIdBuilder() *ParamMailIdBuilder {
	builder := &ParamMailIdBuilder{}
	return builder
}

// 邮件ID列表
//
// 示例值：
func (builder *ParamMailIdBuilder) MailIds(mailIds []string) *ParamMailIdBuilder {
	builder.mailIds = mailIds
	builder.mailIdsFlag = true
	return builder
}

func (builder *ParamMailIdBuilder) Build() *ParamMailId {
	req := &ParamMailId{}
	if builder.mailIdsFlag {
		req.MailIds = builder.mailIds
	}
	return req
}

type ParamMailPublicMail struct {
	MailBox []string `json:"mail_box,omitempty"` // 公共邮箱列表

	MailId *string `json:"mail_id,omitempty"` // 邮件id
}

type ParamMailPublicMailBuilder struct {
	mailBox     []string // 公共邮箱列表
	mailBoxFlag bool

	mailId     string // 邮件id
	mailIdFlag bool
}

func NewParamMailPublicMailBuilder() *ParamMailPublicMailBuilder {
	builder := &ParamMailPublicMailBuilder{}
	return builder
}

// 公共邮箱列表
//
// 示例值：
func (builder *ParamMailPublicMailBuilder) MailBox(mailBox []string) *ParamMailPublicMailBuilder {
	builder.mailBox = mailBox
	builder.mailBoxFlag = true
	return builder
}

// 邮件id
//
// 示例值：7ed2741f931c1d2bb56385aff27697c7e287f40e.053204ce.b7c2.4518.b762.2802a8888741@test.feishu.cn
func (builder *ParamMailPublicMailBuilder) MailId(mailId string) *ParamMailPublicMailBuilder {
	builder.mailId = mailId
	builder.mailIdFlag = true
	return builder
}

func (builder *ParamMailPublicMailBuilder) Build() *ParamMailPublicMail {
	req := &ParamMailPublicMail{}
	if builder.mailBoxFlag {
		req.MailBox = builder.mailBox
	}
	if builder.mailIdFlag {
		req.MailId = &builder.mailId

	}
	return req
}

type ParamMailUser struct {
	OwnerIds []string `json:"owner_ids,omitempty"` // Owner的UserID

	Senders []string `json:"senders,omitempty"` // senders的邮箱

	Receivers []string `json:"receivers,omitempty"` // receivers的邮箱

	MailId *string `json:"mail_id,omitempty"` // 邮件id
}

type ParamMailUserBuilder struct {
	ownerIds     []string // Owner的UserID
	ownerIdsFlag bool

	senders     []string // senders的邮箱
	sendersFlag bool

	receivers     []string // receivers的邮箱
	receiversFlag bool

	mailId     string // 邮件id
	mailIdFlag bool
}

func NewParamMailUserBuilder() *ParamMailUserBuilder {
	builder := &ParamMailUserBuilder{}
	return builder
}

// Owner的UserID
//
// 示例值：
func (builder *ParamMailUserBuilder) OwnerIds(ownerIds []string) *ParamMailUserBuilder {
	builder.ownerIds = ownerIds
	builder.ownerIdsFlag = true
	return builder
}

// senders的邮箱
//
// 示例值：
func (builder *ParamMailUserBuilder) Senders(senders []string) *ParamMailUserBuilder {
	builder.senders = senders
	builder.sendersFlag = true
	return builder
}

// receivers的邮箱
//
// 示例值：
func (builder *ParamMailUserBuilder) Receivers(receivers []string) *ParamMailUserBuilder {
	builder.receivers = receivers
	builder.receiversFlag = true
	return builder
}

// 邮件id
//
// 示例值：7ed2741f931c1d2bb56385aff27697c7e287f40e.053204ce.b7c2.4518.b762.2802a8888741@test.feishu.cn
func (builder *ParamMailUserBuilder) MailId(mailId string) *ParamMailUserBuilder {
	builder.mailId = mailId
	builder.mailIdFlag = true
	return builder
}

func (builder *ParamMailUserBuilder) Build() *ParamMailUser {
	req := &ParamMailUser{}
	if builder.ownerIdsFlag {
		req.OwnerIds = builder.ownerIds
	}
	if builder.sendersFlag {
		req.Senders = builder.senders
	}
	if builder.receiversFlag {
		req.Receivers = builder.receivers
	}
	if builder.mailIdFlag {
		req.MailId = &builder.mailId

	}
	return req
}

type ParamMessageChat struct {
	CreateTimeRange *TimeRange `json:"create_time_range,omitempty"` // 消息创建时间范围

	ChatIds []string `json:"chat_ids,omitempty"` // 会话ID
}

type ParamMessageChatBuilder struct {
	createTimeRange     *TimeRange // 消息创建时间范围
	createTimeRangeFlag bool

	chatIds     []string // 会话ID
	chatIdsFlag bool
}

func NewParamMessageChatBuilder() *ParamMessageChatBuilder {
	builder := &ParamMessageChatBuilder{}
	return builder
}

// 消息创建时间范围
//
// 示例值：
func (builder *ParamMessageChatBuilder) CreateTimeRange(createTimeRange *TimeRange) *ParamMessageChatBuilder {
	builder.createTimeRange = createTimeRange
	builder.createTimeRangeFlag = true
	return builder
}

// 会话ID
//
// 示例值：
func (builder *ParamMessageChatBuilder) ChatIds(chatIds []string) *ParamMessageChatBuilder {
	builder.chatIds = chatIds
	builder.chatIdsFlag = true
	return builder
}

func (builder *ParamMessageChatBuilder) Build() *ParamMessageChat {
	req := &ParamMessageChat{}
	if builder.createTimeRangeFlag {
		req.CreateTimeRange = builder.createTimeRange
	}
	if builder.chatIdsFlag {
		req.ChatIds = builder.chatIds
	}
	return req
}

type ParamMessageContext struct {
	OwnerIds []string `json:"owner_ids,omitempty"` // 用户列表

	CreateTimeRange *TimeRange `json:"create_time_range,omitempty"` // 消息创建时间范围(30天内)

	ChatType []int `json:"chat_type,omitempty"` // 会话类型

	ChatIds []string `json:"chat_ids,omitempty"` // 会话ID

	Query *string `json:"query,omitempty"` // 消息查询条件

	MessageContextRadius *int `json:"message_context_radius,omitempty"` // 场景上下文个数
}

type ParamMessageContextBuilder struct {
	ownerIds     []string // 用户列表
	ownerIdsFlag bool

	createTimeRange     *TimeRange // 消息创建时间范围(30天内)
	createTimeRangeFlag bool

	chatType     []int // 会话类型
	chatTypeFlag bool

	chatIds     []string // 会话ID
	chatIdsFlag bool

	query     string // 消息查询条件
	queryFlag bool

	messageContextRadius     int // 场景上下文个数
	messageContextRadiusFlag bool
}

func NewParamMessageContextBuilder() *ParamMessageContextBuilder {
	builder := &ParamMessageContextBuilder{}
	return builder
}

// 用户列表
//
// 示例值：
func (builder *ParamMessageContextBuilder) OwnerIds(ownerIds []string) *ParamMessageContextBuilder {
	builder.ownerIds = ownerIds
	builder.ownerIdsFlag = true
	return builder
}

// 消息创建时间范围(30天内)
//
// 示例值：
func (builder *ParamMessageContextBuilder) CreateTimeRange(createTimeRange *TimeRange) *ParamMessageContextBuilder {
	builder.createTimeRange = createTimeRange
	builder.createTimeRangeFlag = true
	return builder
}

// 会话类型
//
// 示例值：
func (builder *ParamMessageContextBuilder) ChatType(chatType []int) *ParamMessageContextBuilder {
	builder.chatType = chatType
	builder.chatTypeFlag = true
	return builder
}

// 会话ID
//
// 示例值：
func (builder *ParamMessageContextBuilder) ChatIds(chatIds []string) *ParamMessageContextBuilder {
	builder.chatIds = chatIds
	builder.chatIdsFlag = true
	return builder
}

// 消息查询条件
//
// 示例值：test
func (builder *ParamMessageContextBuilder) Query(query string) *ParamMessageContextBuilder {
	builder.query = query
	builder.queryFlag = true
	return builder
}

// 场景上下文个数
//
// 示例值：30
func (builder *ParamMessageContextBuilder) MessageContextRadius(messageContextRadius int) *ParamMessageContextBuilder {
	builder.messageContextRadius = messageContextRadius
	builder.messageContextRadiusFlag = true
	return builder
}

func (builder *ParamMessageContextBuilder) Build() *ParamMessageContext {
	req := &ParamMessageContext{}
	if builder.ownerIdsFlag {
		req.OwnerIds = builder.ownerIds
	}
	if builder.createTimeRangeFlag {
		req.CreateTimeRange = builder.createTimeRange
	}
	if builder.chatTypeFlag {
		req.ChatType = builder.chatType
	}
	if builder.chatIdsFlag {
		req.ChatIds = builder.chatIds
	}
	if builder.queryFlag {
		req.Query = &builder.query

	}
	if builder.messageContextRadiusFlag {
		req.MessageContextRadius = &builder.messageContextRadius

	}
	return req
}

type ParamMessageFilter struct {
	OwnerIds []string `json:"owner_ids,omitempty"` // 用户列表

	CreateTimeRange *TimeRange `json:"create_time_range,omitempty"` // 消息创建时间范围

	ChatType []int `json:"chat_type,omitempty"` // 会话类型

	ChatIds []string `json:"chat_ids,omitempty"` // 会话ID
}

type ParamMessageFilterBuilder struct {
	ownerIds     []string // 用户列表
	ownerIdsFlag bool

	createTimeRange     *TimeRange // 消息创建时间范围
	createTimeRangeFlag bool

	chatType     []int // 会话类型
	chatTypeFlag bool

	chatIds     []string // 会话ID
	chatIdsFlag bool
}

func NewParamMessageFilterBuilder() *ParamMessageFilterBuilder {
	builder := &ParamMessageFilterBuilder{}
	return builder
}

// 用户列表
//
// 示例值：
func (builder *ParamMessageFilterBuilder) OwnerIds(ownerIds []string) *ParamMessageFilterBuilder {
	builder.ownerIds = ownerIds
	builder.ownerIdsFlag = true
	return builder
}

// 消息创建时间范围
//
// 示例值：
func (builder *ParamMessageFilterBuilder) CreateTimeRange(createTimeRange *TimeRange) *ParamMessageFilterBuilder {
	builder.createTimeRange = createTimeRange
	builder.createTimeRangeFlag = true
	return builder
}

// 会话类型
//
// 示例值：
func (builder *ParamMessageFilterBuilder) ChatType(chatType []int) *ParamMessageFilterBuilder {
	builder.chatType = chatType
	builder.chatTypeFlag = true
	return builder
}

// 会话ID
//
// 示例值：
func (builder *ParamMessageFilterBuilder) ChatIds(chatIds []string) *ParamMessageFilterBuilder {
	builder.chatIds = chatIds
	builder.chatIdsFlag = true
	return builder
}

func (builder *ParamMessageFilterBuilder) Build() *ParamMessageFilter {
	req := &ParamMessageFilter{}
	if builder.ownerIdsFlag {
		req.OwnerIds = builder.ownerIds
	}
	if builder.createTimeRangeFlag {
		req.CreateTimeRange = builder.createTimeRange
	}
	if builder.chatTypeFlag {
		req.ChatType = builder.chatType
	}
	if builder.chatIdsFlag {
		req.ChatIds = builder.chatIds
	}
	return req
}

type ParamMessageSearch struct {
	OwnerIds []string `json:"owner_ids,omitempty"` // 用户列表

	CreateTimeRange *TimeRange `json:"create_time_range,omitempty"` // 消息创建时间范围

	ChatType []int `json:"chat_type,omitempty"` // 会话类型

	ChatIds []string `json:"chat_ids,omitempty"` // 会话ID

	Query *string `json:"query,omitempty"` // 消息查询条件

	MessageContextRadius *int `json:"message_context_radius,omitempty"` // 场景上下文个数
}

type ParamMessageSearchBuilder struct {
	ownerIds     []string // 用户列表
	ownerIdsFlag bool

	createTimeRange     *TimeRange // 消息创建时间范围
	createTimeRangeFlag bool

	chatType     []int // 会话类型
	chatTypeFlag bool

	chatIds     []string // 会话ID
	chatIdsFlag bool

	query     string // 消息查询条件
	queryFlag bool

	messageContextRadius     int // 场景上下文个数
	messageContextRadiusFlag bool
}

func NewParamMessageSearchBuilder() *ParamMessageSearchBuilder {
	builder := &ParamMessageSearchBuilder{}
	return builder
}

// 用户列表
//
// 示例值：
func (builder *ParamMessageSearchBuilder) OwnerIds(ownerIds []string) *ParamMessageSearchBuilder {
	builder.ownerIds = ownerIds
	builder.ownerIdsFlag = true
	return builder
}

// 消息创建时间范围
//
// 示例值：
func (builder *ParamMessageSearchBuilder) CreateTimeRange(createTimeRange *TimeRange) *ParamMessageSearchBuilder {
	builder.createTimeRange = createTimeRange
	builder.createTimeRangeFlag = true
	return builder
}

// 会话类型
//
// 示例值：
func (builder *ParamMessageSearchBuilder) ChatType(chatType []int) *ParamMessageSearchBuilder {
	builder.chatType = chatType
	builder.chatTypeFlag = true
	return builder
}

// 会话ID
//
// 示例值：
func (builder *ParamMessageSearchBuilder) ChatIds(chatIds []string) *ParamMessageSearchBuilder {
	builder.chatIds = chatIds
	builder.chatIdsFlag = true
	return builder
}

// 消息查询条件
//
// 示例值：test
func (builder *ParamMessageSearchBuilder) Query(query string) *ParamMessageSearchBuilder {
	builder.query = query
	builder.queryFlag = true
	return builder
}

// 场景上下文个数
//
// 示例值：30
func (builder *ParamMessageSearchBuilder) MessageContextRadius(messageContextRadius int) *ParamMessageSearchBuilder {
	builder.messageContextRadius = messageContextRadius
	builder.messageContextRadiusFlag = true
	return builder
}

func (builder *ParamMessageSearchBuilder) Build() *ParamMessageSearch {
	req := &ParamMessageSearch{}
	if builder.ownerIdsFlag {
		req.OwnerIds = builder.ownerIds
	}
	if builder.createTimeRangeFlag {
		req.CreateTimeRange = builder.createTimeRange
	}
	if builder.chatTypeFlag {
		req.ChatType = builder.chatType
	}
	if builder.chatIdsFlag {
		req.ChatIds = builder.chatIds
	}
	if builder.queryFlag {
		req.Query = &builder.query

	}
	if builder.messageContextRadiusFlag {
		req.MessageContextRadius = &builder.messageContextRadius

	}
	return req
}

type ParamMinutesExport struct {
	DetailLevel *string `json:"detail_level,omitempty"` // 细节级别
}

type ParamMinutesExportBuilder struct {
	detailLevel     string // 细节级别
	detailLevelFlag bool
}

func NewParamMinutesExportBuilder() *ParamMinutesExportBuilder {
	builder := &ParamMinutesExportBuilder{}
	return builder
}

// 细节级别
//
// 示例值：
func (builder *ParamMinutesExportBuilder) DetailLevel(detailLevel string) *ParamMinutesExportBuilder {
	builder.detailLevel = detailLevel
	builder.detailLevelFlag = true
	return builder
}

func (builder *ParamMinutesExportBuilder) Build() *ParamMinutesExport {
	req := &ParamMinutesExport{}
	if builder.detailLevelFlag {
		req.DetailLevel = &builder.detailLevel

	}
	return req
}

type ParamMinutesSearch struct {
	OwnerIds []string `json:"owner_ids,omitempty"` // 过滤所有者

	StartTimeGte *string `json:"start_time_gte,omitempty"` // 创建时间晚于(包含); 时间格式: RFC3339

	StartTimeLt *string `json:"start_time_lt,omitempty"` // 创建时间早于(不包含); 时间格式: RFC3339

	UpdateTimeGte *string `json:"update_time_gte,omitempty"` // 更新时间晚于(包含); 时间格式: RFC3339

	UpdateTimeLt *string `json:"update_time_lt,omitempty"` // 更新时间早于(不包含); 时间格式: RFC3339

	ParticipantIds []string `json:"participant_ids,omitempty"` // 过滤参会者

	Query *string `json:"query,omitempty"` // 搜索语句
}

type ParamMinutesSearchBuilder struct {
	ownerIds     []string // 过滤所有者
	ownerIdsFlag bool

	startTimeGte     string // 创建时间晚于(包含); 时间格式: RFC3339
	startTimeGteFlag bool

	startTimeLt     string // 创建时间早于(不包含); 时间格式: RFC3339
	startTimeLtFlag bool

	updateTimeGte     string // 更新时间晚于(包含); 时间格式: RFC3339
	updateTimeGteFlag bool

	updateTimeLt     string // 更新时间早于(不包含); 时间格式: RFC3339
	updateTimeLtFlag bool

	participantIds     []string // 过滤参会者
	participantIdsFlag bool

	query     string // 搜索语句
	queryFlag bool
}

func NewParamMinutesSearchBuilder() *ParamMinutesSearchBuilder {
	builder := &ParamMinutesSearchBuilder{}
	return builder
}

// 过滤所有者
//
// 示例值：
func (builder *ParamMinutesSearchBuilder) OwnerIds(ownerIds []string) *ParamMinutesSearchBuilder {
	builder.ownerIds = ownerIds
	builder.ownerIdsFlag = true
	return builder
}

// 创建时间晚于(包含); 时间格式: RFC3339
//
// 示例值：2022-10-01T00:00:00+08:00
func (builder *ParamMinutesSearchBuilder) StartTimeGte(startTimeGte string) *ParamMinutesSearchBuilder {
	builder.startTimeGte = startTimeGte
	builder.startTimeGteFlag = true
	return builder
}

// 创建时间早于(不包含); 时间格式: RFC3339
//
// 示例值：2022-10-01T00:00:00+08:00
func (builder *ParamMinutesSearchBuilder) StartTimeLt(startTimeLt string) *ParamMinutesSearchBuilder {
	builder.startTimeLt = startTimeLt
	builder.startTimeLtFlag = true
	return builder
}

// 更新时间晚于(包含); 时间格式: RFC3339
//
// 示例值：2022-10-01T00:00:00+08:00
func (builder *ParamMinutesSearchBuilder) UpdateTimeGte(updateTimeGte string) *ParamMinutesSearchBuilder {
	builder.updateTimeGte = updateTimeGte
	builder.updateTimeGteFlag = true
	return builder
}

// 更新时间早于(不包含); 时间格式: RFC3339
//
// 示例值：2022-10-01T00:00:00+08:00
func (builder *ParamMinutesSearchBuilder) UpdateTimeLt(updateTimeLt string) *ParamMinutesSearchBuilder {
	builder.updateTimeLt = updateTimeLt
	builder.updateTimeLtFlag = true
	return builder
}

// 过滤参会者
//
// 示例值：
func (builder *ParamMinutesSearchBuilder) ParticipantIds(participantIds []string) *ParamMinutesSearchBuilder {
	builder.participantIds = participantIds
	builder.participantIdsFlag = true
	return builder
}

// 搜索语句
//
// 示例值：test
func (builder *ParamMinutesSearchBuilder) Query(query string) *ParamMinutesSearchBuilder {
	builder.query = query
	builder.queryFlag = true
	return builder
}

func (builder *ParamMinutesSearchBuilder) Build() *ParamMinutesSearch {
	req := &ParamMinutesSearch{}
	if builder.ownerIdsFlag {
		req.OwnerIds = builder.ownerIds
	}
	if builder.startTimeGteFlag {
		req.StartTimeGte = &builder.startTimeGte

	}
	if builder.startTimeLtFlag {
		req.StartTimeLt = &builder.startTimeLt

	}
	if builder.updateTimeGteFlag {
		req.UpdateTimeGte = &builder.updateTimeGte

	}
	if builder.updateTimeLtFlag {
		req.UpdateTimeLt = &builder.updateTimeLt

	}
	if builder.participantIdsFlag {
		req.ParticipantIds = builder.participantIds
	}
	if builder.queryFlag {
		req.Query = &builder.query

	}
	return req
}

type TenantRestrictionDeviceAllowListPolicy struct {
	SelfOnly *bool `json:"self_only,omitempty"` // 只能登录本企业账号

	AllowTenants []string `json:"allow_tenants,omitempty"` // 除本企业外，允许登录的其他企业租户编码

	ObserveMode *bool `json:"observe_mode,omitempty"` // 限制登录租户范围策略，是否仅验证
}

type TenantRestrictionDeviceAllowListPolicyBuilder struct {
	selfOnly     bool // 只能登录本企业账号
	selfOnlyFlag bool

	allowTenants     []string // 除本企业外，允许登录的其他企业租户编码
	allowTenantsFlag bool

	observeMode     bool // 限制登录租户范围策略，是否仅验证
	observeModeFlag bool
}

func NewTenantRestrictionDeviceAllowListPolicyBuilder() *TenantRestrictionDeviceAllowListPolicyBuilder {
	builder := &TenantRestrictionDeviceAllowListPolicyBuilder{}
	return builder
}

// 只能登录本企业账号
//
// 示例值：true
func (builder *TenantRestrictionDeviceAllowListPolicyBuilder) SelfOnly(selfOnly bool) *TenantRestrictionDeviceAllowListPolicyBuilder {
	builder.selfOnly = selfOnly
	builder.selfOnlyFlag = true
	return builder
}

// 除本企业外，允许登录的其他企业租户编码
//
// 示例值：
func (builder *TenantRestrictionDeviceAllowListPolicyBuilder) AllowTenants(allowTenants []string) *TenantRestrictionDeviceAllowListPolicyBuilder {
	builder.allowTenants = allowTenants
	builder.allowTenantsFlag = true
	return builder
}

// 限制登录租户范围策略，是否仅验证
//
// 示例值：false
func (builder *TenantRestrictionDeviceAllowListPolicyBuilder) ObserveMode(observeMode bool) *TenantRestrictionDeviceAllowListPolicyBuilder {
	builder.observeMode = observeMode
	builder.observeModeFlag = true
	return builder
}

func (builder *TenantRestrictionDeviceAllowListPolicyBuilder) Build() *TenantRestrictionDeviceAllowListPolicy {
	req := &TenantRestrictionDeviceAllowListPolicy{}
	if builder.selfOnlyFlag {
		req.SelfOnly = &builder.selfOnly

	}
	if builder.allowTenantsFlag {
		req.AllowTenants = builder.allowTenants
	}
	if builder.observeModeFlag {
		req.ObserveMode = &builder.observeMode

	}
	return req
}

type TenantRestrictionDevicePolicy struct {
	Enabled *bool `json:"enabled,omitempty"` // 策略启用状态

	AllowListPolicy *TenantRestrictionDeviceAllowListPolicy `json:"allow_list_policy,omitempty"` // 限制登录租户范围策略
}

type TenantRestrictionDevicePolicyBuilder struct {
	enabled     bool // 策略启用状态
	enabledFlag bool

	allowListPolicy     *TenantRestrictionDeviceAllowListPolicy // 限制登录租户范围策略
	allowListPolicyFlag bool
}

func NewTenantRestrictionDevicePolicyBuilder() *TenantRestrictionDevicePolicyBuilder {
	builder := &TenantRestrictionDevicePolicyBuilder{}
	return builder
}

// 策略启用状态
//
// 示例值：true
func (builder *TenantRestrictionDevicePolicyBuilder) Enabled(enabled bool) *TenantRestrictionDevicePolicyBuilder {
	builder.enabled = enabled
	builder.enabledFlag = true
	return builder
}

// 限制登录租户范围策略
//
// 示例值：
func (builder *TenantRestrictionDevicePolicyBuilder) AllowListPolicy(allowListPolicy *TenantRestrictionDeviceAllowListPolicy) *TenantRestrictionDevicePolicyBuilder {
	builder.allowListPolicy = allowListPolicy
	builder.allowListPolicyFlag = true
	return builder
}

func (builder *TenantRestrictionDevicePolicyBuilder) Build() *TenantRestrictionDevicePolicy {
	req := &TenantRestrictionDevicePolicy{}
	if builder.enabledFlag {
		req.Enabled = &builder.enabled

	}
	if builder.allowListPolicyFlag {
		req.AllowListPolicy = builder.allowListPolicy
	}
	return req
}

type TenantRestrictionNetworkAllowListPolicy struct {
	SelfOnly *bool `json:"self_only,omitempty"` // 只能登录本企业账号

	AllowTenants []string `json:"allow_tenants,omitempty"` // 除本企业外，允许登录的其他企业租户编码

	ObserveMode *bool `json:"observe_mode,omitempty"` // 限制登录租户范围策略，是否仅验证
}

type TenantRestrictionNetworkAllowListPolicyBuilder struct {
	selfOnly     bool // 只能登录本企业账号
	selfOnlyFlag bool

	allowTenants     []string // 除本企业外，允许登录的其他企业租户编码
	allowTenantsFlag bool

	observeMode     bool // 限制登录租户范围策略，是否仅验证
	observeModeFlag bool
}

func NewTenantRestrictionNetworkAllowListPolicyBuilder() *TenantRestrictionNetworkAllowListPolicyBuilder {
	builder := &TenantRestrictionNetworkAllowListPolicyBuilder{}
	return builder
}

// 只能登录本企业账号
//
// 示例值：true
func (builder *TenantRestrictionNetworkAllowListPolicyBuilder) SelfOnly(selfOnly bool) *TenantRestrictionNetworkAllowListPolicyBuilder {
	builder.selfOnly = selfOnly
	builder.selfOnlyFlag = true
	return builder
}

// 除本企业外，允许登录的其他企业租户编码
//
// 示例值：
func (builder *TenantRestrictionNetworkAllowListPolicyBuilder) AllowTenants(allowTenants []string) *TenantRestrictionNetworkAllowListPolicyBuilder {
	builder.allowTenants = allowTenants
	builder.allowTenantsFlag = true
	return builder
}

// 限制登录租户范围策略，是否仅验证
//
// 示例值：false
func (builder *TenantRestrictionNetworkAllowListPolicyBuilder) ObserveMode(observeMode bool) *TenantRestrictionNetworkAllowListPolicyBuilder {
	builder.observeMode = observeMode
	builder.observeModeFlag = true
	return builder
}

func (builder *TenantRestrictionNetworkAllowListPolicyBuilder) Build() *TenantRestrictionNetworkAllowListPolicy {
	req := &TenantRestrictionNetworkAllowListPolicy{}
	if builder.selfOnlyFlag {
		req.SelfOnly = &builder.selfOnly

	}
	if builder.allowTenantsFlag {
		req.AllowTenants = builder.allowTenants
	}
	if builder.observeModeFlag {
		req.ObserveMode = &builder.observeMode

	}
	return req
}

type TenantRestrictionNetworkPolicy struct {
	Enabled *bool `json:"enabled,omitempty"` // 策略启用状态

	AllowListPolicy *TenantRestrictionNetworkAllowListPolicy `json:"allow_list_policy,omitempty"` // 限制登录租户范围策略
}

type TenantRestrictionNetworkPolicyBuilder struct {
	enabled     bool // 策略启用状态
	enabledFlag bool

	allowListPolicy     *TenantRestrictionNetworkAllowListPolicy // 限制登录租户范围策略
	allowListPolicyFlag bool
}

func NewTenantRestrictionNetworkPolicyBuilder() *TenantRestrictionNetworkPolicyBuilder {
	builder := &TenantRestrictionNetworkPolicyBuilder{}
	return builder
}

// 策略启用状态
//
// 示例值：true
func (builder *TenantRestrictionNetworkPolicyBuilder) Enabled(enabled bool) *TenantRestrictionNetworkPolicyBuilder {
	builder.enabled = enabled
	builder.enabledFlag = true
	return builder
}

// 限制登录租户范围策略
//
// 示例值：
func (builder *TenantRestrictionNetworkPolicyBuilder) AllowListPolicy(allowListPolicy *TenantRestrictionNetworkAllowListPolicy) *TenantRestrictionNetworkPolicyBuilder {
	builder.allowListPolicy = allowListPolicy
	builder.allowListPolicyFlag = true
	return builder
}

func (builder *TenantRestrictionNetworkPolicyBuilder) Build() *TenantRestrictionNetworkPolicy {
	req := &TenantRestrictionNetworkPolicy{}
	if builder.enabledFlag {
		req.Enabled = &builder.enabled

	}
	if builder.allowListPolicyFlag {
		req.AllowListPolicy = builder.allowListPolicy
	}
	return req
}

type TimeRange struct {
	Start *string `json:"start,omitempty"` // 开始时间(RFC3339)

	End *string `json:"end,omitempty"` // 结束时间(RFC3339)
}

type TimeRangeBuilder struct {
	start     string // 开始时间(RFC3339)
	startFlag bool

	end     string // 结束时间(RFC3339)
	endFlag bool
}

func NewTimeRangeBuilder() *TimeRangeBuilder {
	builder := &TimeRangeBuilder{}
	return builder
}

// 开始时间(RFC3339)
//
// 示例值：
func (builder *TimeRangeBuilder) Start(start string) *TimeRangeBuilder {
	builder.start = start
	builder.startFlag = true
	return builder
}

// 结束时间(RFC3339)
//
// 示例值：
func (builder *TimeRangeBuilder) End(end string) *TimeRangeBuilder {
	builder.end = end
	builder.endFlag = true
	return builder
}

func (builder *TimeRangeBuilder) Build() *TimeRange {
	req := &TimeRange{}
	if builder.startFlag {
		req.Start = &builder.start

	}
	if builder.endFlag {
		req.End = &builder.end

	}
	return req
}

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

	Name *string `json:"name,omitempty"` // 用户姓名

	Email *string `json:"email,omitempty"` // 邮箱地址
}

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

	name     string // 用户姓名
	nameFlag bool

	email     string // 邮箱地址
	emailFlag bool
}

func NewUserBuilder() *UserBuilder {
	builder := &UserBuilder{}
	return builder
}

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

// 用户姓名
//
// 示例值：
func (builder *UserBuilder) Name(name string) *UserBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 邮箱地址
//
// 示例值：
func (builder *UserBuilder) Email(email string) *UserBuilder {
	builder.email = email
	builder.emailFlag = true
	return builder
}

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

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

	}
	if builder.emailFlag {
		req.Email = &builder.email

	}
	return req
}

type UserCommentDocsRecord struct {
	Docs *Docs `json:"docs,omitempty"` //

	LatestCommentTime *string `json:"latest_comment_time,omitempty"` //
}

type UserCommentDocsRecordBuilder struct {
	docs     *Docs //
	docsFlag bool

	latestCommentTime     string //
	latestCommentTimeFlag bool
}

func NewUserCommentDocsRecordBuilder() *UserCommentDocsRecordBuilder {
	builder := &UserCommentDocsRecordBuilder{}
	return builder
}

//
//
// 示例值：
func (builder *UserCommentDocsRecordBuilder) Docs(docs *Docs) *UserCommentDocsRecordBuilder {
	builder.docs = docs
	builder.docsFlag = true
	return builder
}

//
//
// 示例值：
func (builder *UserCommentDocsRecordBuilder) LatestCommentTime(latestCommentTime string) *UserCommentDocsRecordBuilder {
	builder.latestCommentTime = latestCommentTime
	builder.latestCommentTimeFlag = true
	return builder
}

func (builder *UserCommentDocsRecordBuilder) Build() *UserCommentDocsRecord {
	req := &UserCommentDocsRecord{}
	if builder.docsFlag {
		req.Docs = builder.docs
	}
	if builder.latestCommentTimeFlag {
		req.LatestCommentTime = &builder.latestCommentTime

	}
	return req
}

type UserEditDocsRecord struct {
	Docs *Docs `json:"docs,omitempty"` //

	LatestEditTime *string `json:"latest_edit_time,omitempty"` //
}

type UserEditDocsRecordBuilder struct {
	docs     *Docs //
	docsFlag bool

	latestEditTime     string //
	latestEditTimeFlag bool
}

func NewUserEditDocsRecordBuilder() *UserEditDocsRecordBuilder {
	builder := &UserEditDocsRecordBuilder{}
	return builder
}

//
//
// 示例值：
func (builder *UserEditDocsRecordBuilder) Docs(docs *Docs) *UserEditDocsRecordBuilder {
	builder.docs = docs
	builder.docsFlag = true
	return builder
}

//
//
// 示例值：
func (builder *UserEditDocsRecordBuilder) LatestEditTime(latestEditTime string) *UserEditDocsRecordBuilder {
	builder.latestEditTime = latestEditTime
	builder.latestEditTimeFlag = true
	return builder
}

func (builder *UserEditDocsRecordBuilder) Build() *UserEditDocsRecord {
	req := &UserEditDocsRecord{}
	if builder.docsFlag {
		req.Docs = builder.docs
	}
	if builder.latestEditTimeFlag {
		req.LatestEditTime = &builder.latestEditTime

	}
	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 VaultTask struct {
	TaskId *string `json:"task_id,omitempty"` // 任务id

	Name *string `json:"name,omitempty"` // 任务名

	CreateTime *string `json:"create_time,omitempty"` // 创建时间

	UpdateTime *string `json:"update_time,omitempty"` // 更新时间

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

	FailReason *string `json:"fail_reason,omitempty"` //

	ExpireTime *string `json:"expire_time,omitempty"` //

	ExtractKey *string `json:"extract_key,omitempty"` // 压缩包解压密码

	Files []*VaultTaskFile `json:"files,omitempty"` //

	Creator *User `json:"creator,omitempty"` //
}

type VaultTaskBuilder struct {
	taskId     string // 任务id
	taskIdFlag bool

	name     string // 任务名
	nameFlag bool

	createTime     string // 创建时间
	createTimeFlag bool

	updateTime     string // 更新时间
	updateTimeFlag bool

	status     string //
	statusFlag bool

	failReason     string //
	failReasonFlag bool

	expireTime     string //
	expireTimeFlag bool

	extractKey     string // 压缩包解压密码
	extractKeyFlag bool

	files     []*VaultTaskFile //
	filesFlag bool

	creator     *User //
	creatorFlag bool
}

func NewVaultTaskBuilder() *VaultTaskBuilder {
	builder := &VaultTaskBuilder{}
	return builder
}

// 任务id
//
// 示例值：
func (builder *VaultTaskBuilder) TaskId(taskId string) *VaultTaskBuilder {
	builder.taskId = taskId
	builder.taskIdFlag = true
	return builder
}

// 任务名
//
// 示例值：
func (builder *VaultTaskBuilder) Name(name string) *VaultTaskBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 创建时间
//
// 示例值：
func (builder *VaultTaskBuilder) CreateTime(createTime string) *VaultTaskBuilder {
	builder.createTime = createTime
	builder.createTimeFlag = true
	return builder
}

// 更新时间
//
// 示例值：
func (builder *VaultTaskBuilder) UpdateTime(updateTime string) *VaultTaskBuilder {
	builder.updateTime = updateTime
	builder.updateTimeFlag = true
	return builder
}

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

//
//
// 示例值：
func (builder *VaultTaskBuilder) FailReason(failReason string) *VaultTaskBuilder {
	builder.failReason = failReason
	builder.failReasonFlag = true
	return builder
}

//
//
// 示例值：
func (builder *VaultTaskBuilder) ExpireTime(expireTime string) *VaultTaskBuilder {
	builder.expireTime = expireTime
	builder.expireTimeFlag = true
	return builder
}

// 压缩包解压密码
//
// 示例值：
func (builder *VaultTaskBuilder) ExtractKey(extractKey string) *VaultTaskBuilder {
	builder.extractKey = extractKey
	builder.extractKeyFlag = true
	return builder
}

//
//
// 示例值：
func (builder *VaultTaskBuilder) Files(files []*VaultTaskFile) *VaultTaskBuilder {
	builder.files = files
	builder.filesFlag = true
	return builder
}

//
//
// 示例值：
func (builder *VaultTaskBuilder) Creator(creator *User) *VaultTaskBuilder {
	builder.creator = creator
	builder.creatorFlag = true
	return builder
}

func (builder *VaultTaskBuilder) Build() *VaultTask {
	req := &VaultTask{}
	if builder.taskIdFlag {
		req.TaskId = &builder.taskId

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

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

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

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

	}
	if builder.failReasonFlag {
		req.FailReason = &builder.failReason

	}
	if builder.expireTimeFlag {
		req.ExpireTime = &builder.expireTime

	}
	if builder.extractKeyFlag {
		req.ExtractKey = &builder.extractKey

	}
	if builder.filesFlag {
		req.Files = builder.files
	}
	if builder.creatorFlag {
		req.Creator = builder.creator
	}
	return req
}

type VaultTaskFile struct {
	Name *string `json:"name,omitempty"` // 文件名

	Size *string `json:"size,omitempty"` // 文件大小

	DownloadUrl *string `json:"download_url,omitempty"` // 下载链接(临时)
}

type VaultTaskFileBuilder struct {
	name     string // 文件名
	nameFlag bool

	size     string // 文件大小
	sizeFlag bool

	downloadUrl     string // 下载链接(临时)
	downloadUrlFlag bool
}

func NewVaultTaskFileBuilder() *VaultTaskFileBuilder {
	builder := &VaultTaskFileBuilder{}
	return builder
}

// 文件名
//
// 示例值：
func (builder *VaultTaskFileBuilder) Name(name string) *VaultTaskFileBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 文件大小
//
// 示例值：
func (builder *VaultTaskFileBuilder) Size(size string) *VaultTaskFileBuilder {
	builder.size = size
	builder.sizeFlag = true
	return builder
}

// 下载链接(临时)
//
// 示例值：
func (builder *VaultTaskFileBuilder) DownloadUrl(downloadUrl string) *VaultTaskFileBuilder {
	builder.downloadUrl = downloadUrl
	builder.downloadUrlFlag = true
	return builder
}

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

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

	}
	if builder.downloadUrlFlag {
		req.DownloadUrl = &builder.downloadUrl

	}
	return req
}

type UpdateDeviceApplyRecordReqBodyBuilder struct {
	isApproved     bool // 是否审批通过
	isApprovedFlag bool
}

func NewUpdateDeviceApplyRecordReqBodyBuilder() *UpdateDeviceApplyRecordReqBodyBuilder {
	builder := &UpdateDeviceApplyRecordReqBodyBuilder{}
	return builder
}

// 是否审批通过
//
//示例值：true
func (builder *UpdateDeviceApplyRecordReqBodyBuilder) IsApproved(isApproved bool) *UpdateDeviceApplyRecordReqBodyBuilder {
	builder.isApproved = isApproved
	builder.isApprovedFlag = true
	return builder
}

func (builder *UpdateDeviceApplyRecordReqBodyBuilder) Build() *UpdateDeviceApplyRecordReqBody {
	req := &UpdateDeviceApplyRecordReqBody{}
	if builder.isApprovedFlag {
		req.IsApproved = &builder.isApproved
	}
	return req
}

type UpdateDeviceApplyRecordPathReqBodyBuilder struct {
	isApproved     bool
	isApprovedFlag bool
}

func NewUpdateDeviceApplyRecordPathReqBodyBuilder() *UpdateDeviceApplyRecordPathReqBodyBuilder {
	builder := &UpdateDeviceApplyRecordPathReqBodyBuilder{}
	return builder
}

// 是否审批通过
//
// 示例值：true
func (builder *UpdateDeviceApplyRecordPathReqBodyBuilder) IsApproved(isApproved bool) *UpdateDeviceApplyRecordPathReqBodyBuilder {
	builder.isApproved = isApproved
	builder.isApprovedFlag = true
	return builder
}

func (builder *UpdateDeviceApplyRecordPathReqBodyBuilder) Build() (*UpdateDeviceApplyRecordReqBody, error) {
	req := &UpdateDeviceApplyRecordReqBody{}
	if builder.isApprovedFlag {
		req.IsApproved = &builder.isApproved
	}
	return req, nil
}

type UpdateDeviceApplyRecordReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *UpdateDeviceApplyRecordReqBody
}

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

// 设备申报记录ID
//
// 示例值：7088763625288187923
func (builder *UpdateDeviceApplyRecordReqBuilder) DeviceApplyRecordId(deviceApplyRecordId string) *UpdateDeviceApplyRecordReqBuilder {
	builder.apiReq.PathParams.Set("device_apply_record_id", fmt.Sprint(deviceApplyRecordId))
	return builder
}

//
func (builder *UpdateDeviceApplyRecordReqBuilder) Body(body *UpdateDeviceApplyRecordReqBody) *UpdateDeviceApplyRecordReqBuilder {
	builder.body = body
	return builder
}

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

type UpdateDeviceApplyRecordReqBody struct {
	IsApproved *bool `json:"is_approved,omitempty"` // 是否审批通过
}

type UpdateDeviceApplyRecordReq struct {
	apiReq *larkcore.ApiReq
	Body   *UpdateDeviceApplyRecordReqBody `body:""`
}

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

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

type CreateDeviceRecordReqBuilder struct {
	apiReq       *larkcore.ApiReq
	deviceRecord *DeviceRecord
}

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

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

//
func (builder *CreateDeviceRecordReqBuilder) DeviceRecord(deviceRecord *DeviceRecord) *CreateDeviceRecordReqBuilder {
	builder.deviceRecord = deviceRecord
	return builder
}

func (builder *CreateDeviceRecordReqBuilder) Build() *CreateDeviceRecordReq {
	req := &CreateDeviceRecordReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.deviceRecord
	return req
}

type CreateDeviceRecordReq struct {
	apiReq       *larkcore.ApiReq
	DeviceRecord *DeviceRecord `body:""`
}

type CreateDeviceRecordRespData struct {
	DeviceRecordId *string `json:"device_record_id,omitempty"` // 设备认证编码
}

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

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

type DeleteDeviceRecordReqBuilder struct {
	apiReq *larkcore.ApiReq
}

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

// 设备认证编码
//
// 示例值：7089353870308032531
func (builder *DeleteDeviceRecordReqBuilder) DeviceRecordId(deviceRecordId string) *DeleteDeviceRecordReqBuilder {
	builder.apiReq.PathParams.Set("device_record_id", fmt.Sprint(deviceRecordId))
	return builder
}

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

type DeleteDeviceRecordReq struct {
	apiReq *larkcore.ApiReq
}

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

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

type GetDeviceRecordReqBuilder struct {
	apiReq *larkcore.ApiReq
}

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

// 设备认证编码
//
// 示例值：7089353870308032531
func (builder *GetDeviceRecordReqBuilder) DeviceRecordId(deviceRecordId string) *GetDeviceRecordReqBuilder {
	builder.apiReq.PathParams.Set("device_record_id", fmt.Sprint(deviceRecordId))
	return builder
}

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

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

type GetDeviceRecordReq struct {
	apiReq *larkcore.ApiReq
}

type GetDeviceRecordRespData struct {
	DeviceRecord *DeviceRecord `json:"device_record,omitempty"` // 设备记录
}

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

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

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

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

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

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

// 分页游标
//
// 示例值：7394463407091023892
func (builder *ListDeviceRecordReqBuilder) PageToken(pageToken string) *ListDeviceRecordReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

// 设备认证编码
//
// 示例值：7089353870308032531
func (builder *ListDeviceRecordReqBuilder) DeviceRecordId(deviceRecordId string) *ListDeviceRecordReqBuilder {
	builder.apiReq.QueryParams.Set("device_record_id", fmt.Sprint(deviceRecordId))
	return builder
}

// 当前登录用户ID
//
// 示例值：ou_b25e90585ef8c1adac4b379c2e257906
func (builder *ListDeviceRecordReqBuilder) CurrentUserId(currentUserId string) *ListDeviceRecordReqBuilder {
	builder.apiReq.QueryParams.Set("current_user_id", fmt.Sprint(currentUserId))
	return builder
}

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

// 设备名称
//
// 示例值：Q9C6RYMFDK
func (builder *ListDeviceRecordReqBuilder) DeviceName(deviceName string) *ListDeviceRecordReqBuilder {
	builder.apiReq.QueryParams.Set("device_name", fmt.Sprint(deviceName))
	return builder
}

// 生产序列号
//
// 示例值：C02DTHRMML7H
func (builder *ListDeviceRecordReqBuilder) SerialNumber(serialNumber string) *ListDeviceRecordReqBuilder {
	builder.apiReq.QueryParams.Set("serial_number", fmt.Sprint(serialNumber))
	return builder
}

// 硬盘序列号
//
// 示例值：CC344362-5990-5A68-8DDD-64A23C99FA0C
func (builder *ListDeviceRecordReqBuilder) DiskSerialNumber(diskSerialNumber string) *ListDeviceRecordReqBuilder {
	builder.apiReq.QueryParams.Set("disk_serial_number", fmt.Sprint(diskSerialNumber))
	return builder
}

// MAC地址
//
// 示例值：ac:de:48:00:11:21
func (builder *ListDeviceRecordReqBuilder) MacAddress(macAddress string) *ListDeviceRecordReqBuilder {
	builder.apiReq.QueryParams.Set("mac_address", fmt.Sprint(macAddress))
	return builder
}

// Android标识符
//
// 示例值：02a11ac4a83b918e
func (builder *ListDeviceRecordReqBuilder) AndroidId(androidId string) *ListDeviceRecordReqBuilder {
	builder.apiReq.QueryParams.Set("android_id", fmt.Sprint(androidId))
	return builder
}

// 主板UUID
//
// 示例值：4C4C4544-0052-5A10-804E-B6C04F324433
func (builder *ListDeviceRecordReqBuilder) Uuid(uuid string) *ListDeviceRecordReqBuilder {
	builder.apiReq.QueryParams.Set("uuid", fmt.Sprint(uuid))
	return builder
}

// iOS供应商标识符
//
// 示例值：968F0E5C-C297-4122-ACB6-102494DEFD9A
func (builder *ListDeviceRecordReqBuilder) Idfv(idfv string) *ListDeviceRecordReqBuilder {
	builder.apiReq.QueryParams.Set("idfv", fmt.Sprint(idfv))
	return builder
}

// Harmony供应商标识符
//
// 示例值：ff3c2237-cd76-4331-9d72-0a4470854567
func (builder *ListDeviceRecordReqBuilder) Aaid(aaid string) *ListDeviceRecordReqBuilder {
	builder.apiReq.QueryParams.Set("aaid", fmt.Sprint(aaid))
	return builder
}

// 设备归属
//
// 示例值：0
func (builder *ListDeviceRecordReqBuilder) DeviceOwnership(deviceOwnership int) *ListDeviceRecordReqBuilder {
	builder.apiReq.QueryParams.Set("device_ownership", fmt.Sprint(deviceOwnership))
	return builder
}

// 可信状态
//
// 示例值：0
func (builder *ListDeviceRecordReqBuilder) DeviceStatus(deviceStatus int) *ListDeviceRecordReqBuilder {
	builder.apiReq.QueryParams.Set("device_status", fmt.Sprint(deviceStatus))
	return builder
}

// 设备类型
//
// 示例值：0
func (builder *ListDeviceRecordReqBuilder) DeviceTerminalType(deviceTerminalType int) *ListDeviceRecordReqBuilder {
	builder.apiReq.QueryParams.Set("device_terminal_type", fmt.Sprint(deviceTerminalType))
	return builder
}

// 设备操作系统
//
// 示例值：0
func (builder *ListDeviceRecordReqBuilder) Os(os int) *ListDeviceRecordReqBuilder {
	builder.apiReq.QueryParams.Set("os", fmt.Sprint(os))
	return builder
}

// 最近登录用户ID
//
// 示例值：ou_b25e90585ef8c1adac4b379c2e257906
func (builder *ListDeviceRecordReqBuilder) LatestUserId(latestUserId string) *ListDeviceRecordReqBuilder {
	builder.apiReq.QueryParams.Set("latest_user_id", fmt.Sprint(latestUserId))
	return builder
}

// 设备指纹
//
// 示例值：7089353870308032531
func (builder *ListDeviceRecordReqBuilder) Did(did string) *ListDeviceRecordReqBuilder {
	builder.apiReq.QueryParams.Set("did", fmt.Sprint(did))
	return builder
}

// 是否为受管控设备
//
// 示例值：
func (builder *ListDeviceRecordReqBuilder) IsManaged(isManaged bool) *ListDeviceRecordReqBuilder {
	builder.apiReq.QueryParams.Set("is_managed", fmt.Sprint(isManaged))
	return builder
}

// MDM设备ID
//
// 示例值：123abc
func (builder *ListDeviceRecordReqBuilder) MdmDeviceId(mdmDeviceId string) *ListDeviceRecordReqBuilder {
	builder.apiReq.QueryParams.Set("mdm_device_id", fmt.Sprint(mdmDeviceId))
	return builder
}

// MDM厂商名称
//
// 示例值：Workspace_ONE
func (builder *ListDeviceRecordReqBuilder) MdmProviderName(mdmProviderName string) *ListDeviceRecordReqBuilder {
	builder.apiReq.QueryParams.Set("mdm_provider_name", fmt.Sprint(mdmProviderName))
	return builder
}

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

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

}

type ListDeviceRecordRespData struct {
	Items []*DeviceRecord `json:"items,omitempty"` // 设备列表

	PageToken *string `json:"page_token,omitempty"` // 分页游标

	HasMore *bool `json:"has_more,omitempty"` // 是否存在更多结果
}

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

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

type MineDeviceRecordRespData struct {
	DeviceRecordId *string `json:"device_record_id,omitempty"` // 设备认证编码

	DeviceOwnership *int `json:"device_ownership,omitempty"` // 设备归属

	DeviceStatus *int `json:"device_status,omitempty"` // 可信状态
}

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

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

type UpdateDeviceRecordReqBuilder struct {
	apiReq       *larkcore.ApiReq
	deviceRecord *DeviceRecord
}

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

// 设备认证编码
//
// 示例值：7089353870308032531
func (builder *UpdateDeviceRecordReqBuilder) DeviceRecordId(deviceRecordId string) *UpdateDeviceRecordReqBuilder {
	builder.apiReq.PathParams.Set("device_record_id", fmt.Sprint(deviceRecordId))
	return builder
}

// 版本号
//
// 示例值：0
func (builder *UpdateDeviceRecordReqBuilder) Version(version string) *UpdateDeviceRecordReqBuilder {
	builder.apiReq.QueryParams.Set("version", fmt.Sprint(version))
	return builder
}

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

//
func (builder *UpdateDeviceRecordReqBuilder) DeviceRecord(deviceRecord *DeviceRecord) *UpdateDeviceRecordReqBuilder {
	builder.deviceRecord = deviceRecord
	return builder
}

func (builder *UpdateDeviceRecordReqBuilder) Build() *UpdateDeviceRecordReq {
	req := &UpdateDeviceRecordReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.PathParams = builder.apiReq.PathParams
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.deviceRecord
	return req
}

type UpdateDeviceRecordReq struct {
	apiReq       *larkcore.ApiReq
	DeviceRecord *DeviceRecord `body:""`
}

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

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

type P2DeviceApplyRecordDeviceApplyEventV2Data struct {
	DeviceApplyRecordId *string `json:"device_apply_record_id,omitempty"` // 设备申报记录ID

	DeviceRecord *DeviceRecordEvent `json:"device_record,omitempty"` // 设备记录

	ApplyTime *string `json:"apply_time,omitempty"` // 申报时间

	ApplyStatus *int `json:"apply_status,omitempty"` // 申报状态

	Operator *UserId `json:"operator,omitempty"` // 申报人ID

	ApplyDeviceOwnership *int `json:"apply_device_ownership,omitempty"` // 申报设备归属
}

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

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

type P2DeviceRecordDeviceChangeEventV2Data struct {
	DeviceRecordId *string `json:"device_record_id,omitempty"` // 设备认证编码

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

	ChangeType *int `json:"change_type,omitempty"` // 变更类型

	Before *DeviceChangeEvent `json:"before,omitempty"` // 变更前数据

	After *DeviceChangeEvent `json:"after,omitempty"` // 变更后数据
}

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

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

type ListDeviceRecordIterator struct {
	nextPageToken *string
	items         []*DeviceRecord
	index         int
	limit         int
	ctx           context.Context
	req           *ListDeviceRecordReq
	listFunc      func(ctx context.Context, req *ListDeviceRecordReq, options ...larkcore.RequestOptionFunc) (*ListDeviceRecordResp, error)
	options       []larkcore.RequestOptionFunc
	curlNum       int
}

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