// Package directory 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 larkdirectory

import (
	"fmt"

	"context"
	"errors"

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

const (
	EmployeeIdTypeOpenId     = "open_id"     // 标识一个用户在某个应用中的身份
	EmployeeIdTypeUnionId    = "union_id"    // 标识一个用户在某个应用开发商下的身份
	EmployeeIdTypeEmployeeId = "employee_id" // 标识一个用户在某个租户内的身份
)

const (
	DepartmentIdTypeDepartmentId     = "department_id"      // 用来标识租户内一个唯一的部门
	DepartmentIdTypeOpenDepartmentId = "open_department_id" // 用来在具体某个应用中标识一个部门，同一个部门 在不同应用中的 open_department_id 不相同。
)

const (
	DepartmentIdTypeDeleteDepartmentDepartmentId     = "department_id"      // 用来标识租户内一个唯一的部门
	DepartmentIdTypeDeleteDepartmentOpenDepartmentId = "open_department_id" // 用来在具体某个应用中标识一个部门，同一个部门 在不同应用中的 open_department_id 不相同。
)

const (
	EmployeeIdTypeDeleteDepartmentOpenId     = "open_id"     // 标识一个用户在某个应用中的身份
	EmployeeIdTypeDeleteDepartmentEmployeeId = "employee_id" // 标识一个用户在某个租户内的身份
	EmployeeIdTypeDeleteDepartmentUnionId    = "union_id"    // 标识一个用户在某个应用开发商下的身份
)

const (
	EmployeeIdTypeFilterDepartmentOpenId     = "open_id"     // 标识一个用户在某个应用中的身份
	EmployeeIdTypeFilterDepartmentEmployeeId = "employee_id" // 标识一个用户在某个租户内的身份
	EmployeeIdTypeFilterDepartmentUnionId    = "union_id"    // 标识一个用户在某个应用开发商下的身份
)

const (
	DepartmentIdTypeFilterDepartmentOpenDepartmentId = "open_department_id" // 用来在具体某个应用中标识一个部门，同一个部门 在不同应用中的 open_department_id 相同。
	DepartmentIdTypeFilterDepartmentDepartmentId     = "department_id"      // 用来标识租户内一个唯一的部门
)

const (
	EmployeeIdTypeMgetDepartmentOpenId     = "open_id"     // 标识一个用户在某个应用中的身份。同一个用户在不同应用中的 Open ID 不同
	EmployeeIdTypeMgetDepartmentEmployeeId = "employee_id" // 标识一个用户在某个租户内的身份
	EmployeeIdTypeMgetDepartmentUnionId    = "union_id"    // 标识一个用户在某个应用开发商下的身份
)

const (
	DepartmentIdTypeMgetDepartmentDepartmentId     = "department_id"      // 用来标识租户内一个唯一的部门
	DepartmentIdTypeMgetDepartmentOpenDepartmentId = "open_department_id" // 用来在具体某个应用中标识一个部门，同一个部门 在不同应用中的 open_department_id 相同。
)

const (
	EmployeeIdTypePatchDepartmentOpenId     = "open_id"     // 标识一个用户在某个应用中的身份
	EmployeeIdTypePatchDepartmentUnionId    = "union_id"    // 标识一个用户在某个应用开发商下的身份
	EmployeeIdTypePatchDepartmentEmployeeId = "employee_id" // 标识一个用户在某个租户内的身份
)

const (
	DepartmentIdTypePatchDepartmentOpenDepartmentId = "open_department_id" // 用来在具体某个应用中标识一个部门，同一个部门 在不同应用中的 open_department_id 不相同。
	DepartmentIdTypePatchDepartmentDepartmentId     = "department_id"      // 用来标识租户内一个唯一的部门
)

const (
	EmployeeIdTypeSearchDepartmentOpenId     = "open_id"     // 标识一个用户在某个应用中的身份
	EmployeeIdTypeSearchDepartmentEmployeeId = "employee_id" // 标识一个用户在某个租户内的身份
	EmployeeIdTypeSearchDepartmentUnionId    = "union_id"    // 标识一个用户在某个应用开发商下的身份
)

const (
	DepartmentIdTypeSearchDepartmentOpenDepartmentId = "open_department_id" // 用来在具体某个应用中标识一个部门，同一个部门 在不同应用中的 open_department_id 不相同。
	DepartmentIdTypeSearchDepartmentDepartmentId     = "department_id"      // 用来标识租户内一个唯一的部门
)

const (
	EmployeeIdTypeCreateEmployeeOpenId     = "open_id"     // 标识一个用户在某个应用中的身份。同一个用户在不同应用中的 Open ID 不同
	EmployeeIdTypeCreateEmployeeEmployeeId = "employee_id" // 标识一个用户在某个租户内的身份
	EmployeeIdTypeCreateEmployeeUnionId    = "union_id"    // 标识一个用户在某个应用开发商下的身份
)

const (
	DepartmentIdTypeCreateEmployeeDepartmentId     = "department_id"      // 用来标识租户内一个唯一的部门
	DepartmentIdTypeCreateEmployeeOpenDepartmentId = "open_department_id" // 用来在具体某个应用中标识一个部门，同一个部门 在不同应用中的 open_department_id 相同。
)

const (
	EmployeeIdTypeDeleteEmployeeOpenId     = "open_id"     // 标识一个用户在某个应用中的身份
	EmployeeIdTypeDeleteEmployeeEmployeeId = "employee_id" // 标识一个用户在某个租户内的身份
	EmployeeIdTypeDeleteEmployeeUnionId    = "union_id"    // 标识一个用户在某个应用开发商下的身份
)

const (
	DepartmentIdTypeDeleteEmployeeDepartmentId     = "department_id"      // department_id
	DepartmentIdTypeDeleteEmployeeOpenDepartmentId = "open_department_id" // open_department_id
)

const (
	EmployeeIdTypeFilterEmployeeOpenId     = "open_id"     // 标识一个用户在某个应用中的身份。同一个用户在不同应用中的 Open ID 不同
	EmployeeIdTypeFilterEmployeeUnionId    = "union_id"    // 标识一个用户在某个应用开发商下的身份
	EmployeeIdTypeFilterEmployeeEmployeeId = "employee_id" // 标识一个用户在某个租户内的身份
)

const (
	DepartmentIdTypeFilterEmployeeDepartmentId     = "department_id"      // 用来标识租户内一个唯一的部门
	DepartmentIdTypeFilterEmployeeOpenDepartmentId = "open_department_id" // 用来在具体某个应用中标识一个部门，同一个部门 在不同应用中的 open_department_id 相同。
)

const (
	EmployeeIdTypeMgetEmployeeOpenId     = "open_id"     // 标识一个用户在某个应用中的身份
	EmployeeIdTypeMgetEmployeeEmployeeId = "employee_id" // 标识一个用户在某个租户内的身份
	EmployeeIdTypeMgetEmployeeUnionId    = "union_id"    // 标识一个用户在某个应用开发商下的身份
)

const (
	DepartmentIdTypeMgetEmployeeDepartmentId     = "department_id"      // 用来标识租户内一个唯一的部门
	DepartmentIdTypeMgetEmployeeOpenDepartmentId = "open_department_id" //  open_department_id：用来在具体某个应用中标识一个部门，同一个部门 在不同应用中的 open_department_id 不相同。
)

const (
	EmployeeIdTypePatchEmployeeOpenId     = "open_id"     // 标识一个用户在某个应用中的身份
	EmployeeIdTypePatchEmployeeUnionId    = "union_id"    // 标识一个用户在某个应用开发商下的身份
	EmployeeIdTypePatchEmployeeEmployeeId = "employee_id" // 标识一个用户在某个租户内的身份
)

const (
	DepartmentIdTypePatchEmployeeDepartmentId     = "department_id"      // department_id
	DepartmentIdTypePatchEmployeeOpenDepartmentId = "open_department_id" // open_department_id
)

const (
	EmployeeIdTypeRegularEmployeeOpenId     = "open_id"     // open_id
	EmployeeIdTypeRegularEmployeeUnionId    = "union_id"    // union_id
	EmployeeIdTypeRegularEmployeeEmployeeId = "employee_id" // employee_id
)

const (
	DepartmentIdTypeRegularEmployeeDepartmentId     = "department_id"      // department_id
	DepartmentIdTypeRegularEmployeeOpenDepartmentId = "open_department_id" // open_department_id
)

const (
	EmployeeIdTypeResurrectEmployeeOpenId     = "open_id"     // 标识一个用户在某个应用中的身份
	EmployeeIdTypeResurrectEmployeeEmployeeId = "employee_id" // 标识一个用户在某个租户内的身份
	EmployeeIdTypeResurrectEmployeeUnionId    = "union_id"    // 标识一个用户在某个应用开发商下的身份
)

const (
	DepartmentIdTypeResurrectEmployeeDepartmentId     = "department_id"      // department_id
	DepartmentIdTypeResurrectEmployeeOpenDepartmentId = "open_department_id" // open_department_id
)

const (
	EmployeeIdTypeSearchEmployeeOpenId     = "open_id"     // 标识一个用户在某个应用中的身份
	EmployeeIdTypeSearchEmployeeUnionId    = "union_id"    // 标识一个用户在某个应用开发商下的身份
	EmployeeIdTypeSearchEmployeeEmployeeId = "employee_id" // 标识一个用户在某个租户内的身份
)

const (
	DepartmentIdTypeSearchEmployeeOpenDepartmentId = "open_department_id" // 用来在具体某个应用中标识一个部门，同一个部门 在不同应用中的 open_department_id 不相同。
	DepartmentIdTypeSearchEmployeeDepartmentId     = "department_id"      // 用来标识租户内一个唯一的部门
)

const (
	EmployeeIdTypeToBeResignedEmployeeOpenId     = "open_id"     // open_id
	EmployeeIdTypeToBeResignedEmployeeUnionId    = "union_id"    // union_id
	EmployeeIdTypeToBeResignedEmployeeEmployeeId = "employee_id" // employee_id
)

const (
	DepartmentIdTypeToBeResignedEmployeeDepartmentId     = "department_id"      // department_id
	DepartmentIdTypeToBeResignedEmployeeOpenDepartmentId = "open_department_id" // open_department_id
)

type AbnormalRecord struct {
	Id *string `json:"id,omitempty"` // 异常ID

	RowError *int `json:"row_error,omitempty"` // 行级异常

	FieldErrors map[string]int `json:"field_errors,omitempty"` // 列级异常
}

type AbnormalRecordBuilder struct {
	id     string // 异常ID
	idFlag bool

	rowError     int // 行级异常
	rowErrorFlag bool

	fieldErrors     map[string]int // 列级异常
	fieldErrorsFlag bool
}

func NewAbnormalRecordBuilder() *AbnormalRecordBuilder {
	builder := &AbnormalRecordBuilder{}
	return builder
}

// 异常ID
//
// 示例值：eedasfwe
func (builder *AbnormalRecordBuilder) Id(id string) *AbnormalRecordBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 行级异常
//
// 示例值：
func (builder *AbnormalRecordBuilder) RowError(rowError int) *AbnormalRecordBuilder {
	builder.rowError = rowError
	builder.rowErrorFlag = true
	return builder
}

// 列级异常
//
// 示例值：
func (builder *AbnormalRecordBuilder) FieldErrors(fieldErrors map[string]int) *AbnormalRecordBuilder {
	builder.fieldErrors = fieldErrors
	builder.fieldErrorsFlag = true
	return builder
}

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

	}
	if builder.rowErrorFlag {
		req.RowError = &builder.rowError

	}
	if builder.fieldErrorsFlag {
		req.FieldErrors = builder.fieldErrors
	}
	return req
}

type AddCollaborationRule struct {
	Subjects *CollaborationRuleEntities `json:"subjects,omitempty"` // 实体数量之和需要小于100

	Objects *CollaborationRuleEntities `json:"objects,omitempty"` // 实体数量之和需要小于100
}

type AddCollaborationRuleBuilder struct {
	subjects     *CollaborationRuleEntities // 实体数量之和需要小于100
	subjectsFlag bool

	objects     *CollaborationRuleEntities // 实体数量之和需要小于100
	objectsFlag bool
}

func NewAddCollaborationRuleBuilder() *AddCollaborationRuleBuilder {
	builder := &AddCollaborationRuleBuilder{}
	return builder
}

// 实体数量之和需要小于100
//
// 示例值：
func (builder *AddCollaborationRuleBuilder) Subjects(subjects *CollaborationRuleEntities) *AddCollaborationRuleBuilder {
	builder.subjects = subjects
	builder.subjectsFlag = true
	return builder
}

// 实体数量之和需要小于100
//
// 示例值：
func (builder *AddCollaborationRuleBuilder) Objects(objects *CollaborationRuleEntities) *AddCollaborationRuleBuilder {
	builder.objects = objects
	builder.objectsFlag = true
	return builder
}

func (builder *AddCollaborationRuleBuilder) Build() *AddCollaborationRule {
	req := &AddCollaborationRule{}
	if builder.subjectsFlag {
		req.Subjects = builder.subjects
	}
	if builder.objectsFlag {
		req.Objects = builder.objects
	}
	return req
}

type AddVisibleAssistRule struct {
	AssistRuleType *int `json:"assist_rule_type,omitempty"` // 规则集类型

	Subjects []*EntityInfo `json:"subjects,omitempty"` // 规则主体

	Objects []*EntityInfo `json:"objects,omitempty"` // 规则客体，类型只能为部门、用户、单位。不能为用户组

	Effect *int `json:"effect,omitempty"` // 权限操作

	MatchCondition *int `json:"match_condition,omitempty"` // 匹配条件
}

type AddVisibleAssistRuleBuilder struct {
	assistRuleType     int // 规则集类型
	assistRuleTypeFlag bool

	subjects     []*EntityInfo // 规则主体
	subjectsFlag bool

	objects     []*EntityInfo // 规则客体，类型只能为部门、用户、单位。不能为用户组
	objectsFlag bool

	effect     int // 权限操作
	effectFlag bool

	matchCondition     int // 匹配条件
	matchConditionFlag bool
}

func NewAddVisibleAssistRuleBuilder() *AddVisibleAssistRuleBuilder {
	builder := &AddVisibleAssistRuleBuilder{}
	return builder
}

// 规则集类型
//
// 示例值：1
func (builder *AddVisibleAssistRuleBuilder) AssistRuleType(assistRuleType int) *AddVisibleAssistRuleBuilder {
	builder.assistRuleType = assistRuleType
	builder.assistRuleTypeFlag = true
	return builder
}

// 规则主体
//
// 示例值：
func (builder *AddVisibleAssistRuleBuilder) Subjects(subjects []*EntityInfo) *AddVisibleAssistRuleBuilder {
	builder.subjects = subjects
	builder.subjectsFlag = true
	return builder
}

// 规则客体，类型只能为部门、用户、单位。不能为用户组
//
// 示例值：
func (builder *AddVisibleAssistRuleBuilder) Objects(objects []*EntityInfo) *AddVisibleAssistRuleBuilder {
	builder.objects = objects
	builder.objectsFlag = true
	return builder
}

// 权限操作
//
// 示例值：1
func (builder *AddVisibleAssistRuleBuilder) Effect(effect int) *AddVisibleAssistRuleBuilder {
	builder.effect = effect
	builder.effectFlag = true
	return builder
}

// 匹配条件
//
// 示例值：
func (builder *AddVisibleAssistRuleBuilder) MatchCondition(matchCondition int) *AddVisibleAssistRuleBuilder {
	builder.matchCondition = matchCondition
	builder.matchConditionFlag = true
	return builder
}

func (builder *AddVisibleAssistRuleBuilder) Build() *AddVisibleAssistRule {
	req := &AddVisibleAssistRule{}
	if builder.assistRuleTypeFlag {
		req.AssistRuleType = &builder.assistRuleType

	}
	if builder.subjectsFlag {
		req.Subjects = builder.subjects
	}
	if builder.objectsFlag {
		req.Objects = builder.objects
	}
	if builder.effectFlag {
		req.Effect = &builder.effect

	}
	if builder.matchConditionFlag {
		req.MatchCondition = &builder.matchCondition

	}
	return req
}

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

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

	Name *I18nText `json:"name,omitempty"` // i18n文本

	IsEnabled *bool `json:"is_enabled,omitempty"` // 是否启用

	IsDeleted *bool `json:"is_deleted,omitempty"` // 是否删除

	PostCode *string `json:"post_code,omitempty"` // 邮编

	Country *string `json:"country,omitempty"` // 国家

	Province *string `json:"province,omitempty"` // 省份

	City *string `json:"city,omitempty"` // 省份

	County *string `json:"county,omitempty"` // 区县

	Types []string `json:"types,omitempty"` // 地址类型

	PlaceId *string `json:"place_id,omitempty"` // 地点

	IsMain *bool `json:"is_main,omitempty"` // 是否主要地址

	IsPublic *bool `json:"is_public,omitempty"` // 是否公开地址

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

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

	CreatorId *string `json:"creator_id,omitempty"` // 创建人

	UpdatorId *string `json:"updator_id,omitempty"` // 更新人

	ExternalId *string `json:"external_id,omitempty"` // 外部ID
}

type AddressBuilder struct {
	id     string // ID
	idFlag bool

	tenantId     string // 租户ID
	tenantIdFlag bool

	name     *I18nText // i18n文本
	nameFlag bool

	isEnabled     bool // 是否启用
	isEnabledFlag bool

	isDeleted     bool // 是否删除
	isDeletedFlag bool

	postCode     string // 邮编
	postCodeFlag bool

	country     string // 国家
	countryFlag bool

	province     string // 省份
	provinceFlag bool

	city     string // 省份
	cityFlag bool

	county     string // 区县
	countyFlag bool

	types     []string // 地址类型
	typesFlag bool

	placeId     string // 地点
	placeIdFlag bool

	isMain     bool // 是否主要地址
	isMainFlag bool

	isPublic     bool // 是否公开地址
	isPublicFlag bool

	createTime     string // 创建时间
	createTimeFlag bool

	updateTime     string // 更新时间
	updateTimeFlag bool

	creatorId     string // 创建人
	creatorIdFlag bool

	updatorId     string // 更新人
	updatorIdFlag bool

	externalId     string // 外部ID
	externalIdFlag bool
}

func NewAddressBuilder() *AddressBuilder {
	builder := &AddressBuilder{}
	return builder
}

// ID
//
// 示例值：123456
func (builder *AddressBuilder) Id(id string) *AddressBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

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

// i18n文本
//
// 示例值：
func (builder *AddressBuilder) Name(name *I18nText) *AddressBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 是否启用
//
// 示例值：
func (builder *AddressBuilder) IsEnabled(isEnabled bool) *AddressBuilder {
	builder.isEnabled = isEnabled
	builder.isEnabledFlag = true
	return builder
}

// 是否删除
//
// 示例值：
func (builder *AddressBuilder) IsDeleted(isDeleted bool) *AddressBuilder {
	builder.isDeleted = isDeleted
	builder.isDeletedFlag = true
	return builder
}

// 邮编
//
// 示例值：123456
func (builder *AddressBuilder) PostCode(postCode string) *AddressBuilder {
	builder.postCode = postCode
	builder.postCodeFlag = true
	return builder
}

// 国家
//
// 示例值：MDM_1233456
func (builder *AddressBuilder) Country(country string) *AddressBuilder {
	builder.country = country
	builder.countryFlag = true
	return builder
}

// 省份
//
// 示例值：MDM_1233456
func (builder *AddressBuilder) Province(province string) *AddressBuilder {
	builder.province = province
	builder.provinceFlag = true
	return builder
}

// 省份
//
// 示例值：MDM_1233456
func (builder *AddressBuilder) City(city string) *AddressBuilder {
	builder.city = city
	builder.cityFlag = true
	return builder
}

// 区县
//
// 示例值：MDM_1233456
func (builder *AddressBuilder) County(county string) *AddressBuilder {
	builder.county = county
	builder.countyFlag = true
	return builder
}

// 地址类型
//
// 示例值：
func (builder *AddressBuilder) Types(types []string) *AddressBuilder {
	builder.types = types
	builder.typesFlag = true
	return builder
}

// 地点
//
// 示例值：123456
func (builder *AddressBuilder) PlaceId(placeId string) *AddressBuilder {
	builder.placeId = placeId
	builder.placeIdFlag = true
	return builder
}

// 是否主要地址
//
// 示例值：
func (builder *AddressBuilder) IsMain(isMain bool) *AddressBuilder {
	builder.isMain = isMain
	builder.isMainFlag = true
	return builder
}

// 是否公开地址
//
// 示例值：
func (builder *AddressBuilder) IsPublic(isPublic bool) *AddressBuilder {
	builder.isPublic = isPublic
	builder.isPublicFlag = true
	return builder
}

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

// 更新时间
//
// 示例值：12345
func (builder *AddressBuilder) UpdateTime(updateTime string) *AddressBuilder {
	builder.updateTime = updateTime
	builder.updateTimeFlag = true
	return builder
}

// 创建人
//
// 示例值：12334455
func (builder *AddressBuilder) CreatorId(creatorId string) *AddressBuilder {
	builder.creatorId = creatorId
	builder.creatorIdFlag = true
	return builder
}

// 更新人
//
// 示例值：123123123
func (builder *AddressBuilder) UpdatorId(updatorId string) *AddressBuilder {
	builder.updatorId = updatorId
	builder.updatorIdFlag = true
	return builder
}

// 外部ID
//
// 示例值：123123123
func (builder *AddressBuilder) ExternalId(externalId string) *AddressBuilder {
	builder.externalId = externalId
	builder.externalIdFlag = true
	return builder
}

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

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

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.isEnabledFlag {
		req.IsEnabled = &builder.isEnabled

	}
	if builder.isDeletedFlag {
		req.IsDeleted = &builder.isDeleted

	}
	if builder.postCodeFlag {
		req.PostCode = &builder.postCode

	}
	if builder.countryFlag {
		req.Country = &builder.country

	}
	if builder.provinceFlag {
		req.Province = &builder.province

	}
	if builder.cityFlag {
		req.City = &builder.city

	}
	if builder.countyFlag {
		req.County = &builder.county

	}
	if builder.typesFlag {
		req.Types = builder.types
	}
	if builder.placeIdFlag {
		req.PlaceId = &builder.placeId

	}
	if builder.isMainFlag {
		req.IsMain = &builder.isMain

	}
	if builder.isPublicFlag {
		req.IsPublic = &builder.isPublic

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

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

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

	}
	if builder.updatorIdFlag {
		req.UpdatorId = &builder.updatorId

	}
	if builder.externalIdFlag {
		req.ExternalId = &builder.externalId

	}
	return req
}

type App struct {
	Id *string `json:"id,omitempty"` // 在MyAI场景下为开平应用ID,其他场景是IdentityID

	Description *I18nText `json:"description,omitempty"` // i18n文本

	Name *I18nText `json:"name,omitempty"` // i18n文本

	Avatar *string `json:"avatar,omitempty"` // 头像

	Usable *bool `json:"usable,omitempty"` // 租户下是否可用
}

type AppBuilder struct {
	id     string // 在MyAI场景下为开平应用ID,其他场景是IdentityID
	idFlag bool

	description     *I18nText // i18n文本
	descriptionFlag bool

	name     *I18nText // i18n文本
	nameFlag bool

	avatar     string // 头像
	avatarFlag bool

	usable     bool // 租户下是否可用
	usableFlag bool
}

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

// 在MyAI场景下为开平应用ID,其他场景是IdentityID
//
// 示例值：123
func (builder *AppBuilder) Id(id string) *AppBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *AppBuilder) Description(description *I18nText) *AppBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *AppBuilder) Name(name *I18nText) *AppBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 头像
//
// 示例值：sdfsdfsdf
func (builder *AppBuilder) Avatar(avatar string) *AppBuilder {
	builder.avatar = avatar
	builder.avatarFlag = true
	return builder
}

// 租户下是否可用
//
// 示例值：
func (builder *AppBuilder) Usable(usable bool) *AppBuilder {
	builder.usable = usable
	builder.usableFlag = true
	return builder
}

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

	}
	if builder.descriptionFlag {
		req.Description = builder.description
	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.avatarFlag {
		req.Avatar = &builder.avatar

	}
	if builder.usableFlag {
		req.Usable = &builder.usable

	}
	return req
}

type Attachment struct {
	Id *string `json:"id,omitempty"` // 下载文件所需token

	MimeType *string `json:"mime_type,omitempty"` // 文件类型

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

	Size *string `json:"size,omitempty"` // 文件大小
}

type AttachmentBuilder struct {
	id     string // 下载文件所需token
	idFlag bool

	mimeType     string // 文件类型
	mimeTypeFlag bool

	name     string // 文件名称
	nameFlag bool

	size     string // 文件大小
	sizeFlag bool
}

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

// 下载文件所需token
//
// 示例值：无
func (builder *AttachmentBuilder) Id(id string) *AttachmentBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 文件类型
//
// 示例值：无
func (builder *AttachmentBuilder) MimeType(mimeType string) *AttachmentBuilder {
	builder.mimeType = mimeType
	builder.mimeTypeFlag = true
	return builder
}

// 文件名称
//
// 示例值：无
func (builder *AttachmentBuilder) Name(name string) *AttachmentBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 文件大小
//
// 示例值：无
func (builder *AttachmentBuilder) Size(size string) *AttachmentBuilder {
	builder.size = size
	builder.sizeFlag = true
	return builder
}

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

	}
	if builder.mimeTypeFlag {
		req.MimeType = &builder.mimeType

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

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

	}
	return req
}

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

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

	AccountUserName *string `json:"account_user_name,omitempty"` // 开户人姓名

	AccountNumber *string `json:"account_number,omitempty"` // 银行卡号

	SubBankId *string `json:"sub_bank_id,omitempty"` // 支行ID

	BankCardType *string `json:"bank_card_type,omitempty"` // 银行卡类型

	Country *string `json:"country,omitempty"` // 国家/地区

	Currency *string `json:"currency,omitempty"` // 货币 https://md.bytedance.net/v1/main-data/currency 币种编码

	CheckCode *string `json:"check_code,omitempty"` // 校验码

	IsMain *bool `json:"is_main,omitempty"` // 是否主卡

	IsDeleted *bool `json:"is_deleted,omitempty"` // 是否删除

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

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

	CreatorId *string `json:"creator_id,omitempty"` // 创建人

	UpdatorId *string `json:"updator_id,omitempty"` // 更新人

	BankName *string `json:"bank_name,omitempty"` // 标准版兼容字段，后续会废弃，优先使用SubBankID

	CustomFieldValue map[string]*CustomFieldValue `json:"custom_field_value,omitempty"` // 自定义字段\n17: optional string CustomFieldValues,
}

type BankAccountBuilder struct {
	id     string // ID
	idFlag bool

	tenantId     string // 租户ID
	tenantIdFlag bool

	accountUserName     string // 开户人姓名
	accountUserNameFlag bool

	accountNumber     string // 银行卡号
	accountNumberFlag bool

	subBankId     string // 支行ID
	subBankIdFlag bool

	bankCardType     string // 银行卡类型
	bankCardTypeFlag bool

	country     string // 国家/地区
	countryFlag bool

	currency     string // 货币 https://md.bytedance.net/v1/main-data/currency 币种编码
	currencyFlag bool

	checkCode     string // 校验码
	checkCodeFlag bool

	isMain     bool // 是否主卡
	isMainFlag bool

	isDeleted     bool // 是否删除
	isDeletedFlag bool

	createTime     string // 创建时间
	createTimeFlag bool

	updateTime     string // 更新时间
	updateTimeFlag bool

	creatorId     string // 创建人
	creatorIdFlag bool

	updatorId     string // 更新人
	updatorIdFlag bool

	bankName     string // 标准版兼容字段，后续会废弃，优先使用SubBankID
	bankNameFlag bool

	customFieldValue     map[string]*CustomFieldValue // 自定义字段\n17: optional string CustomFieldValues,
	customFieldValueFlag bool
}

func NewBankAccountBuilder() *BankAccountBuilder {
	builder := &BankAccountBuilder{}
	return builder
}

// ID
//
// 示例值：1
func (builder *BankAccountBuilder) Id(id string) *BankAccountBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

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

// 开户人姓名
//
// 示例值：张三
func (builder *BankAccountBuilder) AccountUserName(accountUserName string) *BankAccountBuilder {
	builder.accountUserName = accountUserName
	builder.accountUserNameFlag = true
	return builder
}

// 银行卡号
//
// 示例值：6221049592039124232
func (builder *BankAccountBuilder) AccountNumber(accountNumber string) *BankAccountBuilder {
	builder.accountNumber = accountNumber
	builder.accountNumberFlag = true
	return builder
}

// 支行ID
//
// 示例值：无
func (builder *BankAccountBuilder) SubBankId(subBankId string) *BankAccountBuilder {
	builder.subBankId = subBankId
	builder.subBankIdFlag = true
	return builder
}

// 银行卡类型
//
// 示例值：无
func (builder *BankAccountBuilder) BankCardType(bankCardType string) *BankAccountBuilder {
	builder.bankCardType = bankCardType
	builder.bankCardTypeFlag = true
	return builder
}

// 国家/地区
//
// 示例值：无
func (builder *BankAccountBuilder) Country(country string) *BankAccountBuilder {
	builder.country = country
	builder.countryFlag = true
	return builder
}

// 货币 https://md.bytedance.net/v1/main-data/currency 币种编码
//
// 示例值：无
func (builder *BankAccountBuilder) Currency(currency string) *BankAccountBuilder {
	builder.currency = currency
	builder.currencyFlag = true
	return builder
}

// 校验码
//
// 示例值：无
func (builder *BankAccountBuilder) CheckCode(checkCode string) *BankAccountBuilder {
	builder.checkCode = checkCode
	builder.checkCodeFlag = true
	return builder
}

// 是否主卡
//
// 示例值：true
func (builder *BankAccountBuilder) IsMain(isMain bool) *BankAccountBuilder {
	builder.isMain = isMain
	builder.isMainFlag = true
	return builder
}

// 是否删除
//
// 示例值：true
func (builder *BankAccountBuilder) IsDeleted(isDeleted bool) *BankAccountBuilder {
	builder.isDeleted = isDeleted
	builder.isDeletedFlag = true
	return builder
}

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

// 更新时间
//
// 示例值：无
func (builder *BankAccountBuilder) UpdateTime(updateTime string) *BankAccountBuilder {
	builder.updateTime = updateTime
	builder.updateTimeFlag = true
	return builder
}

// 创建人
//
// 示例值：无
func (builder *BankAccountBuilder) CreatorId(creatorId string) *BankAccountBuilder {
	builder.creatorId = creatorId
	builder.creatorIdFlag = true
	return builder
}

// 更新人
//
// 示例值：无
func (builder *BankAccountBuilder) UpdatorId(updatorId string) *BankAccountBuilder {
	builder.updatorId = updatorId
	builder.updatorIdFlag = true
	return builder
}

// 标准版兼容字段，后续会废弃，优先使用SubBankID
//
// 示例值：无
func (builder *BankAccountBuilder) BankName(bankName string) *BankAccountBuilder {
	builder.bankName = bankName
	builder.bankNameFlag = true
	return builder
}

// 自定义字段\n17: optional string CustomFieldValues,
//
// 示例值：
func (builder *BankAccountBuilder) CustomFieldValue(customFieldValue map[string]*CustomFieldValue) *BankAccountBuilder {
	builder.customFieldValue = customFieldValue
	builder.customFieldValueFlag = true
	return builder
}

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

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

	}
	if builder.accountUserNameFlag {
		req.AccountUserName = &builder.accountUserName

	}
	if builder.accountNumberFlag {
		req.AccountNumber = &builder.accountNumber

	}
	if builder.subBankIdFlag {
		req.SubBankId = &builder.subBankId

	}
	if builder.bankCardTypeFlag {
		req.BankCardType = &builder.bankCardType

	}
	if builder.countryFlag {
		req.Country = &builder.country

	}
	if builder.currencyFlag {
		req.Currency = &builder.currency

	}
	if builder.checkCodeFlag {
		req.CheckCode = &builder.checkCode

	}
	if builder.isMainFlag {
		req.IsMain = &builder.isMain

	}
	if builder.isDeletedFlag {
		req.IsDeleted = &builder.isDeleted

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

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

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

	}
	if builder.updatorIdFlag {
		req.UpdatorId = &builder.updatorId

	}
	if builder.bankNameFlag {
		req.BankName = &builder.bankName

	}
	if builder.customFieldValueFlag {
		req.CustomFieldValue = builder.customFieldValue
	}
	return req
}

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

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

	CredentialNumber *string `json:"credential_number,omitempty"` // 证件号

	CredentialType *string `json:"credential_type,omitempty"` // 证件类型

	ExpiryDate *string `json:"expiry_date,omitempty"` // 到期日期 格式：2007-07-20， 无固定期限或者长期有效，使用PermanentDate常量

	IsDeleted *bool `json:"is_deleted,omitempty"` // 是否删除

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

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

	CreatorId *string `json:"creator_id,omitempty"` // 创建人

	UpdatorId *string `json:"updator_id,omitempty"` // 更新人
}

type CertificateBuilder struct {
	id     string // ID
	idFlag bool

	tenantId     string // 租户ID
	tenantIdFlag bool

	credentialNumber     string // 证件号
	credentialNumberFlag bool

	credentialType     string // 证件类型
	credentialTypeFlag bool

	expiryDate     string // 到期日期 格式：2007-07-20， 无固定期限或者长期有效，使用PermanentDate常量
	expiryDateFlag bool

	isDeleted     bool // 是否删除
	isDeletedFlag bool

	createTime     string // 创建时间
	createTimeFlag bool

	updateTime     string // 更新时间
	updateTimeFlag bool

	creatorId     string // 创建人
	creatorIdFlag bool

	updatorId     string // 更新人
	updatorIdFlag bool
}

func NewCertificateBuilder() *CertificateBuilder {
	builder := &CertificateBuilder{}
	return builder
}

// ID
//
// 示例值：7202465324939067395
func (builder *CertificateBuilder) Id(id string) *CertificateBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

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

// 证件号
//
// 示例值：FSA81241
func (builder *CertificateBuilder) CredentialNumber(credentialNumber string) *CertificateBuilder {
	builder.credentialNumber = credentialNumber
	builder.credentialNumberFlag = true
	return builder
}

// 证件类型
//
// 示例值：
func (builder *CertificateBuilder) CredentialType(credentialType string) *CertificateBuilder {
	builder.credentialType = credentialType
	builder.credentialTypeFlag = true
	return builder
}

// 到期日期 格式：2007-07-20， 无固定期限或者长期有效，使用PermanentDate常量
//
// 示例值：2007-07-20
func (builder *CertificateBuilder) ExpiryDate(expiryDate string) *CertificateBuilder {
	builder.expiryDate = expiryDate
	builder.expiryDateFlag = true
	return builder
}

// 是否删除
//
// 示例值：false
func (builder *CertificateBuilder) IsDeleted(isDeleted bool) *CertificateBuilder {
	builder.isDeleted = isDeleted
	builder.isDeletedFlag = true
	return builder
}

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

// 更新时间
//
// 示例值：1697083055
func (builder *CertificateBuilder) UpdateTime(updateTime string) *CertificateBuilder {
	builder.updateTime = updateTime
	builder.updateTimeFlag = true
	return builder
}

// 创建人
//
// 示例值：7202465324939067391
func (builder *CertificateBuilder) CreatorId(creatorId string) *CertificateBuilder {
	builder.creatorId = creatorId
	builder.creatorIdFlag = true
	return builder
}

// 更新人
//
// 示例值：7202465324939067391
func (builder *CertificateBuilder) UpdatorId(updatorId string) *CertificateBuilder {
	builder.updatorId = updatorId
	builder.updatorIdFlag = true
	return builder
}

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

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

	}
	if builder.credentialNumberFlag {
		req.CredentialNumber = &builder.credentialNumber

	}
	if builder.credentialTypeFlag {
		req.CredentialType = &builder.credentialType

	}
	if builder.expiryDateFlag {
		req.ExpiryDate = &builder.expiryDate

	}
	if builder.isDeletedFlag {
		req.IsDeleted = &builder.isDeleted

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

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

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

	}
	if builder.updatorIdFlag {
		req.UpdatorId = &builder.updatorId

	}
	return req
}

type CollaborationRule struct {
	RuleId *string `json:"rule_id,omitempty"` // 规则ID

	Subjects *CollaborationRuleEntities `json:"subjects,omitempty"` // 实体数量之和需要小于100

	SubjectIsValid *bool `json:"subject_is_valid,omitempty"` // 是否生效，如果规则主体超出了分享的范围，则is_valid为false，规则主体将不返回

	Objects *CollaborationRuleEntities `json:"objects,omitempty"` // 实体数量之和需要小于100

	ObjectIsValid *bool `json:"object_is_valid,omitempty"` // 是否生效，如果规则客体超出了分享的范围，则is_valid为false，规则客体将不返回
}

type CollaborationRuleBuilder struct {
	ruleId     string // 规则ID
	ruleIdFlag bool

	subjects     *CollaborationRuleEntities // 实体数量之和需要小于100
	subjectsFlag bool

	subjectIsValid     bool // 是否生效，如果规则主体超出了分享的范围，则is_valid为false，规则主体将不返回
	subjectIsValidFlag bool

	objects     *CollaborationRuleEntities // 实体数量之和需要小于100
	objectsFlag bool

	objectIsValid     bool // 是否生效，如果规则客体超出了分享的范围，则is_valid为false，规则客体将不返回
	objectIsValidFlag bool
}

func NewCollaborationRuleBuilder() *CollaborationRuleBuilder {
	builder := &CollaborationRuleBuilder{}
	return builder
}

// 规则ID
//
// 示例值：12121
func (builder *CollaborationRuleBuilder) RuleId(ruleId string) *CollaborationRuleBuilder {
	builder.ruleId = ruleId
	builder.ruleIdFlag = true
	return builder
}

// 实体数量之和需要小于100
//
// 示例值：
func (builder *CollaborationRuleBuilder) Subjects(subjects *CollaborationRuleEntities) *CollaborationRuleBuilder {
	builder.subjects = subjects
	builder.subjectsFlag = true
	return builder
}

// 是否生效，如果规则主体超出了分享的范围，则is_valid为false，规则主体将不返回
//
// 示例值：true
func (builder *CollaborationRuleBuilder) SubjectIsValid(subjectIsValid bool) *CollaborationRuleBuilder {
	builder.subjectIsValid = subjectIsValid
	builder.subjectIsValidFlag = true
	return builder
}

// 实体数量之和需要小于100
//
// 示例值：
func (builder *CollaborationRuleBuilder) Objects(objects *CollaborationRuleEntities) *CollaborationRuleBuilder {
	builder.objects = objects
	builder.objectsFlag = true
	return builder
}

// 是否生效，如果规则客体超出了分享的范围，则is_valid为false，规则客体将不返回
//
// 示例值：
func (builder *CollaborationRuleBuilder) ObjectIsValid(objectIsValid bool) *CollaborationRuleBuilder {
	builder.objectIsValid = objectIsValid
	builder.objectIsValidFlag = true
	return builder
}

func (builder *CollaborationRuleBuilder) Build() *CollaborationRule {
	req := &CollaborationRule{}
	if builder.ruleIdFlag {
		req.RuleId = &builder.ruleId

	}
	if builder.subjectsFlag {
		req.Subjects = builder.subjects
	}
	if builder.subjectIsValidFlag {
		req.SubjectIsValid = &builder.subjectIsValid

	}
	if builder.objectsFlag {
		req.Objects = builder.objects
	}
	if builder.objectIsValidFlag {
		req.ObjectIsValid = &builder.objectIsValid

	}
	return req
}

type CollaborationRuleEntities struct {
	OpenUserIds []string `json:"open_user_ids,omitempty"` // user open id

	OpenDepartmentIds []string `json:"open_department_ids,omitempty"` // department open id，0代表全部成员

	OpenGroupIds []string `json:"open_group_ids,omitempty"` // group open id
}

type CollaborationRuleEntitiesBuilder struct {
	openUserIds     []string // user open id
	openUserIdsFlag bool

	openDepartmentIds     []string // department open id，0代表全部成员
	openDepartmentIdsFlag bool

	openGroupIds     []string // group open id
	openGroupIdsFlag bool
}

func NewCollaborationRuleEntitiesBuilder() *CollaborationRuleEntitiesBuilder {
	builder := &CollaborationRuleEntitiesBuilder{}
	return builder
}

// user open id
//
// 示例值：
func (builder *CollaborationRuleEntitiesBuilder) OpenUserIds(openUserIds []string) *CollaborationRuleEntitiesBuilder {
	builder.openUserIds = openUserIds
	builder.openUserIdsFlag = true
	return builder
}

// department open id，0代表全部成员
//
// 示例值：
func (builder *CollaborationRuleEntitiesBuilder) OpenDepartmentIds(openDepartmentIds []string) *CollaborationRuleEntitiesBuilder {
	builder.openDepartmentIds = openDepartmentIds
	builder.openDepartmentIdsFlag = true
	return builder
}

// group open id
//
// 示例值：
func (builder *CollaborationRuleEntitiesBuilder) OpenGroupIds(openGroupIds []string) *CollaborationRuleEntitiesBuilder {
	builder.openGroupIds = openGroupIds
	builder.openGroupIdsFlag = true
	return builder
}

func (builder *CollaborationRuleEntitiesBuilder) Build() *CollaborationRuleEntities {
	req := &CollaborationRuleEntities{}
	if builder.openUserIdsFlag {
		req.OpenUserIds = builder.openUserIds
	}
	if builder.openDepartmentIdsFlag {
		req.OpenDepartmentIds = builder.openDepartmentIds
	}
	if builder.openGroupIdsFlag {
		req.OpenGroupIds = builder.openGroupIds
	}
	return req
}

type CollaborationTenant struct {
	TenantKey *string `json:"tenant_key,omitempty"` // 关联组织列表

	ConnectTime *int `json:"connect_time,omitempty"` // 建联时间

	Avatar *ImageLink `json:"avatar,omitempty"` // 租户头像

	Brand *string `json:"brand,omitempty"` // 租户品牌

	Name *I18nText `json:"name,omitempty"` // i18n文本

	ShortName *I18nText `json:"short_name,omitempty"` // i18n文本
}

type CollaborationTenantBuilder struct {
	tenantKey     string // 关联组织列表
	tenantKeyFlag bool

	connectTime     int // 建联时间
	connectTimeFlag bool

	avatar     *ImageLink // 租户头像
	avatarFlag bool

	brand     string // 租户品牌
	brandFlag bool

	name     *I18nText // i18n文本
	nameFlag bool

	shortName     *I18nText // i18n文本
	shortNameFlag bool
}

func NewCollaborationTenantBuilder() *CollaborationTenantBuilder {
	builder := &CollaborationTenantBuilder{}
	return builder
}

// 关联组织列表
//
// 示例值：121s121234df
func (builder *CollaborationTenantBuilder) TenantKey(tenantKey string) *CollaborationTenantBuilder {
	builder.tenantKey = tenantKey
	builder.tenantKeyFlag = true
	return builder
}

// 建联时间
//
// 示例值：1724296400
func (builder *CollaborationTenantBuilder) ConnectTime(connectTime int) *CollaborationTenantBuilder {
	builder.connectTime = connectTime
	builder.connectTimeFlag = true
	return builder
}

// 租户头像
//
// 示例值：
func (builder *CollaborationTenantBuilder) Avatar(avatar *ImageLink) *CollaborationTenantBuilder {
	builder.avatar = avatar
	builder.avatarFlag = true
	return builder
}

// 租户品牌
//
// 示例值：feishu
func (builder *CollaborationTenantBuilder) Brand(brand string) *CollaborationTenantBuilder {
	builder.brand = brand
	builder.brandFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *CollaborationTenantBuilder) Name(name *I18nText) *CollaborationTenantBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *CollaborationTenantBuilder) ShortName(shortName *I18nText) *CollaborationTenantBuilder {
	builder.shortName = shortName
	builder.shortNameFlag = true
	return builder
}

func (builder *CollaborationTenantBuilder) Build() *CollaborationTenant {
	req := &CollaborationTenant{}
	if builder.tenantKeyFlag {
		req.TenantKey = &builder.tenantKey

	}
	if builder.connectTimeFlag {
		req.ConnectTime = &builder.connectTime

	}
	if builder.avatarFlag {
		req.Avatar = builder.avatar
	}
	if builder.brandFlag {
		req.Brand = &builder.brand

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.shortNameFlag {
		req.ShortName = builder.shortName
	}
	return req
}

type Common struct {
	AppId *string `json:"app_id,omitempty"` // 应用ID，默认会从identity_ticket获取，获取不到的会从参数获取，取不到或认证失败会报错

	ScenarioId *string `json:"scenario_id,omitempty"` // 场景ID， 可选

	UserId *string `json:"user_id,omitempty"` // UserID，默认会从identity_ticket获取，获取不到的会从参数获取，取不到或认证失败会报错

	TenantId *string `json:"tenant_id,omitempty"` // 租户ID，默认会从identity_ticket获取，获取不到的会从参数获取，取不到或认证失败会报错

	UserType *string `json:"user_type,omitempty"` // 主体类型，默认会从identity_ticket获取，获取不到的会从参数获取，取不到或认证失败会报错

	IsAdminRole *bool `json:"is_admin_role,omitempty"` // adminRole鉴权

	AuthType *string `json:"auth_type,omitempty"` // 鉴权类型 网关注入，无需填写 TenantAccessToken、UserAccessToken
}

type CommonBuilder struct {
	appId     string // 应用ID，默认会从identity_ticket获取，获取不到的会从参数获取，取不到或认证失败会报错
	appIdFlag bool

	scenarioId     string // 场景ID， 可选
	scenarioIdFlag bool

	userId     string // UserID，默认会从identity_ticket获取，获取不到的会从参数获取，取不到或认证失败会报错
	userIdFlag bool

	tenantId     string // 租户ID，默认会从identity_ticket获取，获取不到的会从参数获取，取不到或认证失败会报错
	tenantIdFlag bool

	userType     string // 主体类型，默认会从identity_ticket获取，获取不到的会从参数获取，取不到或认证失败会报错
	userTypeFlag bool

	isAdminRole     bool // adminRole鉴权
	isAdminRoleFlag bool

	authType     string // 鉴权类型 网关注入，无需填写 TenantAccessToken、UserAccessToken
	authTypeFlag bool
}

func NewCommonBuilder() *CommonBuilder {
	builder := &CommonBuilder{}
	return builder
}

// 应用ID，默认会从identity_ticket获取，获取不到的会从参数获取，取不到或认证失败会报错
//
// 示例值：1
func (builder *CommonBuilder) AppId(appId string) *CommonBuilder {
	builder.appId = appId
	builder.appIdFlag = true
	return builder
}

// 场景ID， 可选
//
// 示例值：123
func (builder *CommonBuilder) ScenarioId(scenarioId string) *CommonBuilder {
	builder.scenarioId = scenarioId
	builder.scenarioIdFlag = true
	return builder
}

// UserID，默认会从identity_ticket获取，获取不到的会从参数获取，取不到或认证失败会报错
//
// 示例值：
func (builder *CommonBuilder) UserId(userId string) *CommonBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

// 租户ID，默认会从identity_ticket获取，获取不到的会从参数获取，取不到或认证失败会报错
//
// 示例值：1
func (builder *CommonBuilder) TenantId(tenantId string) *CommonBuilder {
	builder.tenantId = tenantId
	builder.tenantIdFlag = true
	return builder
}

// 主体类型，默认会从identity_ticket获取，获取不到的会从参数获取，取不到或认证失败会报错
//
// 示例值：123
func (builder *CommonBuilder) UserType(userType string) *CommonBuilder {
	builder.userType = userType
	builder.userTypeFlag = true
	return builder
}

// adminRole鉴权
//
// 示例值：
func (builder *CommonBuilder) IsAdminRole(isAdminRole bool) *CommonBuilder {
	builder.isAdminRole = isAdminRole
	builder.isAdminRoleFlag = true
	return builder
}

// 鉴权类型 网关注入，无需填写 TenantAccessToken、UserAccessToken
//
// 示例值：AccessToken
func (builder *CommonBuilder) AuthType(authType string) *CommonBuilder {
	builder.authType = authType
	builder.authTypeFlag = true
	return builder
}

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

	}
	if builder.scenarioIdFlag {
		req.ScenarioId = &builder.scenarioId

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

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

	}
	if builder.userTypeFlag {
		req.UserType = &builder.userType

	}
	if builder.isAdminRoleFlag {
		req.IsAdminRole = &builder.isAdminRole

	}
	if builder.authTypeFlag {
		req.AuthType = &builder.authType

	}
	return req
}

type Company struct {
	Id *string `json:"id,omitempty"` // 公司ID

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

	Name *I18nText `json:"name,omitempty"` // i18n文本

	IsEnabled *bool `json:"is_enabled,omitempty"` // 是否启用

	IsDeleted *bool `json:"is_deleted,omitempty"` // 是否删除

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

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

	CreatorId *string `json:"creator_id,omitempty"` // 创建人

	UpdatorId *string `json:"updator_id,omitempty"` // 更新人

	ExternalId *string `json:"external_id,omitempty"` // 外部ID
}

type CompanyBuilder struct {
	id     string // 公司ID
	idFlag bool

	tenantId     string // 租户ID
	tenantIdFlag bool

	name     *I18nText // i18n文本
	nameFlag bool

	isEnabled     bool // 是否启用
	isEnabledFlag bool

	isDeleted     bool // 是否删除
	isDeletedFlag bool

	createTime     string // 创建时间
	createTimeFlag bool

	updateTime     string // 更新时间
	updateTimeFlag bool

	creatorId     string // 创建人
	creatorIdFlag bool

	updatorId     string // 更新人
	updatorIdFlag bool

	externalId     string // 外部ID
	externalIdFlag bool
}

func NewCompanyBuilder() *CompanyBuilder {
	builder := &CompanyBuilder{}
	return builder
}

// 公司ID
//
// 示例值：od-4e6ac4d14bcd5071a37a39de902c7141
func (builder *CompanyBuilder) Id(id string) *CompanyBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

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

// i18n文本
//
// 示例值：北京科技有限责任公司
func (builder *CompanyBuilder) Name(name *I18nText) *CompanyBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 是否启用
//
// 示例值：false
func (builder *CompanyBuilder) IsEnabled(isEnabled bool) *CompanyBuilder {
	builder.isEnabled = isEnabled
	builder.isEnabledFlag = true
	return builder
}

// 是否删除
//
// 示例值：true
func (builder *CompanyBuilder) IsDeleted(isDeleted bool) *CompanyBuilder {
	builder.isDeleted = isDeleted
	builder.isDeletedFlag = true
	return builder
}

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

// 更新时间
//
// 示例值：无
func (builder *CompanyBuilder) UpdateTime(updateTime string) *CompanyBuilder {
	builder.updateTime = updateTime
	builder.updateTimeFlag = true
	return builder
}

// 创建人
//
// 示例值：无
func (builder *CompanyBuilder) CreatorId(creatorId string) *CompanyBuilder {
	builder.creatorId = creatorId
	builder.creatorIdFlag = true
	return builder
}

// 更新人
//
// 示例值：无
func (builder *CompanyBuilder) UpdatorId(updatorId string) *CompanyBuilder {
	builder.updatorId = updatorId
	builder.updatorIdFlag = true
	return builder
}

// 外部ID
//
// 示例值：1
func (builder *CompanyBuilder) ExternalId(externalId string) *CompanyBuilder {
	builder.externalId = externalId
	builder.externalIdFlag = true
	return builder
}

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

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

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.isEnabledFlag {
		req.IsEnabled = &builder.isEnabled

	}
	if builder.isDeletedFlag {
		req.IsDeleted = &builder.isDeleted

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

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

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

	}
	if builder.updatorIdFlag {
		req.UpdatorId = &builder.updatorId

	}
	if builder.externalIdFlag {
		req.ExternalId = &builder.externalId

	}
	return req
}

type ContactAddress struct {
	Country *string `json:"country,omitempty"` // 国家 国家/地区主数据统一编码

	Province *string `json:"province,omitempty"` // 省份 国家/地区主数据统一编码

	City *string `json:"city,omitempty"` // 城市 国家/地区主数据统一编码

	Address *string `json:"address,omitempty"` // 详细地址

	ContactAddressType *string `json:"contact_address_type,omitempty"` // 地址类型
}

type ContactAddressBuilder struct {
	country     string // 国家 国家/地区主数据统一编码
	countryFlag bool

	province     string // 省份 国家/地区主数据统一编码
	provinceFlag bool

	city     string // 城市 国家/地区主数据统一编码
	cityFlag bool

	address     string // 详细地址
	addressFlag bool

	contactAddressType     string // 地址类型
	contactAddressTypeFlag bool
}

func NewContactAddressBuilder() *ContactAddressBuilder {
	builder := &ContactAddressBuilder{}
	return builder
}

// 国家 国家/地区主数据统一编码
//
// 示例值：MDCT00000012
func (builder *ContactAddressBuilder) Country(country string) *ContactAddressBuilder {
	builder.country = country
	builder.countryFlag = true
	return builder
}

// 省份 国家/地区主数据统一编码
//
// 示例值：MDCT00000012
func (builder *ContactAddressBuilder) Province(province string) *ContactAddressBuilder {
	builder.province = province
	builder.provinceFlag = true
	return builder
}

// 城市 国家/地区主数据统一编码
//
// 示例值：MDCT00000012
func (builder *ContactAddressBuilder) City(city string) *ContactAddressBuilder {
	builder.city = city
	builder.cityFlag = true
	return builder
}

// 详细地址
//
// 示例值：北京市朝阳大街101号
func (builder *ContactAddressBuilder) Address(address string) *ContactAddressBuilder {
	builder.address = address
	builder.addressFlag = true
	return builder
}

// 地址类型
//
// 示例值：1
func (builder *ContactAddressBuilder) ContactAddressType(contactAddressType string) *ContactAddressBuilder {
	builder.contactAddressType = contactAddressType
	builder.contactAddressTypeFlag = true
	return builder
}

func (builder *ContactAddressBuilder) Build() *ContactAddress {
	req := &ContactAddress{}
	if builder.countryFlag {
		req.Country = &builder.country

	}
	if builder.provinceFlag {
		req.Province = &builder.province

	}
	if builder.cityFlag {
		req.City = &builder.city

	}
	if builder.addressFlag {
		req.Address = &builder.address

	}
	if builder.contactAddressTypeFlag {
		req.ContactAddressType = &builder.contactAddressType

	}
	return req
}

type CreateAddress struct {
	Name *I18nText `json:"name,omitempty"` // i18n文本

	IsEnabled *bool `json:"is_enabled,omitempty"` // 是否启用

	PostCode *string `json:"post_code,omitempty"` // 邮编

	Country *string `json:"country,omitempty"` // 国家

	Province *string `json:"province,omitempty"` // 省份

	City *string `json:"city,omitempty"` // 省份

	County *string `json:"county,omitempty"` // 区县

	Types []string `json:"types,omitempty"` // 地址类型

	PlaceId *string `json:"place_id,omitempty"` // 地点

	IsMain *bool `json:"is_main,omitempty"` // 是否主要地址

	IsPublic *bool `json:"is_public,omitempty"` // 是否公开地址

	ExternalId *string `json:"external_id,omitempty"` // 外部ID 未指定则自动生成
}

type CreateAddressBuilder struct {
	name     *I18nText // i18n文本
	nameFlag bool

	isEnabled     bool // 是否启用
	isEnabledFlag bool

	postCode     string // 邮编
	postCodeFlag bool

	country     string // 国家
	countryFlag bool

	province     string // 省份
	provinceFlag bool

	city     string // 省份
	cityFlag bool

	county     string // 区县
	countyFlag bool

	types     []string // 地址类型
	typesFlag bool

	placeId     string // 地点
	placeIdFlag bool

	isMain     bool // 是否主要地址
	isMainFlag bool

	isPublic     bool // 是否公开地址
	isPublicFlag bool

	externalId     string // 外部ID 未指定则自动生成
	externalIdFlag bool
}

func NewCreateAddressBuilder() *CreateAddressBuilder {
	builder := &CreateAddressBuilder{}
	return builder
}

// i18n文本
//
// 示例值：
func (builder *CreateAddressBuilder) Name(name *I18nText) *CreateAddressBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 是否启用
//
// 示例值：
func (builder *CreateAddressBuilder) IsEnabled(isEnabled bool) *CreateAddressBuilder {
	builder.isEnabled = isEnabled
	builder.isEnabledFlag = true
	return builder
}

// 邮编
//
// 示例值：123456
func (builder *CreateAddressBuilder) PostCode(postCode string) *CreateAddressBuilder {
	builder.postCode = postCode
	builder.postCodeFlag = true
	return builder
}

// 国家
//
// 示例值：MDCT00000256
func (builder *CreateAddressBuilder) Country(country string) *CreateAddressBuilder {
	builder.country = country
	builder.countryFlag = true
	return builder
}

// 省份
//
// 示例值：MDCT00000256
func (builder *CreateAddressBuilder) Province(province string) *CreateAddressBuilder {
	builder.province = province
	builder.provinceFlag = true
	return builder
}

// 省份
//
// 示例值：MDCT00000256
func (builder *CreateAddressBuilder) City(city string) *CreateAddressBuilder {
	builder.city = city
	builder.cityFlag = true
	return builder
}

// 区县
//
// 示例值：MDCT00000256
func (builder *CreateAddressBuilder) County(county string) *CreateAddressBuilder {
	builder.county = county
	builder.countyFlag = true
	return builder
}

// 地址类型
//
// 示例值：
func (builder *CreateAddressBuilder) Types(types []string) *CreateAddressBuilder {
	builder.types = types
	builder.typesFlag = true
	return builder
}

// 地点
//
// 示例值：6872549699048439828
func (builder *CreateAddressBuilder) PlaceId(placeId string) *CreateAddressBuilder {
	builder.placeId = placeId
	builder.placeIdFlag = true
	return builder
}

// 是否主要地址
//
// 示例值：
func (builder *CreateAddressBuilder) IsMain(isMain bool) *CreateAddressBuilder {
	builder.isMain = isMain
	builder.isMainFlag = true
	return builder
}

// 是否公开地址
//
// 示例值：
func (builder *CreateAddressBuilder) IsPublic(isPublic bool) *CreateAddressBuilder {
	builder.isPublic = isPublic
	builder.isPublicFlag = true
	return builder
}

// 外部ID 未指定则自动生成
//
// 示例值：custom_id
func (builder *CreateAddressBuilder) ExternalId(externalId string) *CreateAddressBuilder {
	builder.externalId = externalId
	builder.externalIdFlag = true
	return builder
}

func (builder *CreateAddressBuilder) Build() *CreateAddress {
	req := &CreateAddress{}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.isEnabledFlag {
		req.IsEnabled = &builder.isEnabled

	}
	if builder.postCodeFlag {
		req.PostCode = &builder.postCode

	}
	if builder.countryFlag {
		req.Country = &builder.country

	}
	if builder.provinceFlag {
		req.Province = &builder.province

	}
	if builder.cityFlag {
		req.City = &builder.city

	}
	if builder.countyFlag {
		req.County = &builder.county

	}
	if builder.typesFlag {
		req.Types = builder.types
	}
	if builder.placeIdFlag {
		req.PlaceId = &builder.placeId

	}
	if builder.isMainFlag {
		req.IsMain = &builder.isMain

	}
	if builder.isPublicFlag {
		req.IsPublic = &builder.isPublic

	}
	if builder.externalIdFlag {
		req.ExternalId = &builder.externalId

	}
	return req
}

type CreateAddressOptions struct {
	DataSource *int `json:"data_source,omitempty"` // 数据来源
}

type CreateAddressOptionsBuilder struct {
	dataSource     int // 数据来源
	dataSourceFlag bool
}

func NewCreateAddressOptionsBuilder() *CreateAddressOptionsBuilder {
	builder := &CreateAddressOptionsBuilder{}
	return builder
}

// 数据来源
//
// 示例值：
func (builder *CreateAddressOptionsBuilder) DataSource(dataSource int) *CreateAddressOptionsBuilder {
	builder.dataSource = dataSource
	builder.dataSourceFlag = true
	return builder
}

func (builder *CreateAddressOptionsBuilder) Build() *CreateAddressOptions {
	req := &CreateAddressOptions{}
	if builder.dataSourceFlag {
		req.DataSource = &builder.dataSource

	}
	return req
}

type CreateApp struct {
	Name *I18nText `json:"name,omitempty"` // i18n文本

	AvatarKey *string `json:"avatar_key,omitempty"` // 头像的文件key
}

type CreateAppBuilder struct {
	name     *I18nText // i18n文本
	nameFlag bool

	avatarKey     string // 头像的文件key
	avatarKeyFlag bool
}

func NewCreateAppBuilder() *CreateAppBuilder {
	builder := &CreateAppBuilder{}
	return builder
}

// i18n文本
//
// 示例值：
func (builder *CreateAppBuilder) Name(name *I18nText) *CreateAppBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 头像的文件key
//
// 示例值：da7a0018a447d8b665a
func (builder *CreateAppBuilder) AvatarKey(avatarKey string) *CreateAppBuilder {
	builder.avatarKey = avatarKey
	builder.avatarKeyFlag = true
	return builder
}

func (builder *CreateAppBuilder) Build() *CreateApp {
	req := &CreateApp{}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.avatarKeyFlag {
		req.AvatarKey = &builder.avatarKey

	}
	return req
}

type CreateAppOptions struct {
	GeoName *string `json:"geo_name,omitempty"` // appUser 指定geo/unit 不传则使用tenantGeo
}

type CreateAppOptionsBuilder struct {
	geoName     string // appUser 指定geo/unit 不传则使用tenantGeo
	geoNameFlag bool
}

func NewCreateAppOptionsBuilder() *CreateAppOptionsBuilder {
	builder := &CreateAppOptionsBuilder{}
	return builder
}

// appUser 指定geo/unit 不传则使用tenantGeo
//
// 示例值：cn
func (builder *CreateAppOptionsBuilder) GeoName(geoName string) *CreateAppOptionsBuilder {
	builder.geoName = geoName
	builder.geoNameFlag = true
	return builder
}

func (builder *CreateAppOptionsBuilder) Build() *CreateAppOptions {
	req := &CreateAppOptions{}
	if builder.geoNameFlag {
		req.GeoName = &builder.geoName

	}
	return req
}

type CreateBankAccount struct {
	AccountUserName *string `json:"account_user_name,omitempty"` // 开户人姓名

	AccountNumber *string `json:"account_number,omitempty"` // 银行卡号

	SubBankId *string `json:"sub_bank_id,omitempty"` // 支行ID

	BankCardType *string `json:"bank_card_type,omitempty"` // 银行卡类型

	Country *string `json:"country,omitempty"` // 国家/地区

	Currency *string `json:"currency,omitempty"` // 货币 https://md.bytedance.net/v1/main-data/currency 币种编码

	CheckCode *string `json:"check_code,omitempty"` // 校验码

	IsMain *bool `json:"is_main,omitempty"` // 是否主卡

	BankName *string `json:"bank_name,omitempty"` // 标准版兼容字段，后续会废弃，优先使用SubBankID
}

type CreateBankAccountBuilder struct {
	accountUserName     string // 开户人姓名
	accountUserNameFlag bool

	accountNumber     string // 银行卡号
	accountNumberFlag bool

	subBankId     string // 支行ID
	subBankIdFlag bool

	bankCardType     string // 银行卡类型
	bankCardTypeFlag bool

	country     string // 国家/地区
	countryFlag bool

	currency     string // 货币 https://md.bytedance.net/v1/main-data/currency 币种编码
	currencyFlag bool

	checkCode     string // 校验码
	checkCodeFlag bool

	isMain     bool // 是否主卡
	isMainFlag bool

	bankName     string // 标准版兼容字段，后续会废弃，优先使用SubBankID
	bankNameFlag bool
}

func NewCreateBankAccountBuilder() *CreateBankAccountBuilder {
	builder := &CreateBankAccountBuilder{}
	return builder
}

// 开户人姓名
//
// 示例值：test
func (builder *CreateBankAccountBuilder) AccountUserName(accountUserName string) *CreateBankAccountBuilder {
	builder.accountUserName = accountUserName
	builder.accountUserNameFlag = true
	return builder
}

// 银行卡号
//
// 示例值：123123123
func (builder *CreateBankAccountBuilder) AccountNumber(accountNumber string) *CreateBankAccountBuilder {
	builder.accountNumber = accountNumber
	builder.accountNumberFlag = true
	return builder
}

// 支行ID
//
// 示例值：123123123
func (builder *CreateBankAccountBuilder) SubBankId(subBankId string) *CreateBankAccountBuilder {
	builder.subBankId = subBankId
	builder.subBankIdFlag = true
	return builder
}

// 银行卡类型
//
// 示例值：
func (builder *CreateBankAccountBuilder) BankCardType(bankCardType string) *CreateBankAccountBuilder {
	builder.bankCardType = bankCardType
	builder.bankCardTypeFlag = true
	return builder
}

// 国家/地区
//
// 示例值：MDM_123
func (builder *CreateBankAccountBuilder) Country(country string) *CreateBankAccountBuilder {
	builder.country = country
	builder.countryFlag = true
	return builder
}

// 货币 https://md.bytedance.net/v1/main-data/currency 币种编码
//
// 示例值：MDM_123
func (builder *CreateBankAccountBuilder) Currency(currency string) *CreateBankAccountBuilder {
	builder.currency = currency
	builder.currencyFlag = true
	return builder
}

// 校验码
//
// 示例值：123412
func (builder *CreateBankAccountBuilder) CheckCode(checkCode string) *CreateBankAccountBuilder {
	builder.checkCode = checkCode
	builder.checkCodeFlag = true
	return builder
}

// 是否主卡
//
// 示例值：
func (builder *CreateBankAccountBuilder) IsMain(isMain bool) *CreateBankAccountBuilder {
	builder.isMain = isMain
	builder.isMainFlag = true
	return builder
}

// 标准版兼容字段，后续会废弃，优先使用SubBankID
//
// 示例值：test
func (builder *CreateBankAccountBuilder) BankName(bankName string) *CreateBankAccountBuilder {
	builder.bankName = bankName
	builder.bankNameFlag = true
	return builder
}

func (builder *CreateBankAccountBuilder) Build() *CreateBankAccount {
	req := &CreateBankAccount{}
	if builder.accountUserNameFlag {
		req.AccountUserName = &builder.accountUserName

	}
	if builder.accountNumberFlag {
		req.AccountNumber = &builder.accountNumber

	}
	if builder.subBankIdFlag {
		req.SubBankId = &builder.subBankId

	}
	if builder.bankCardTypeFlag {
		req.BankCardType = &builder.bankCardType

	}
	if builder.countryFlag {
		req.Country = &builder.country

	}
	if builder.currencyFlag {
		req.Currency = &builder.currency

	}
	if builder.checkCodeFlag {
		req.CheckCode = &builder.checkCode

	}
	if builder.isMainFlag {
		req.IsMain = &builder.isMain

	}
	if builder.bankNameFlag {
		req.BankName = &builder.bankName

	}
	return req
}

type CreateCertificate struct {
	CredentialNumber *string `json:"credential_number,omitempty"` // 证件号

	CredentialType *string `json:"credential_type,omitempty"` // 证件类型

	ExpiryDate *string `json:"expiry_date,omitempty"` // 到期日期 格式：2007-07-20， 无固定期限或者长期有效，使用PermanentDate常量
}

type CreateCertificateBuilder struct {
	credentialNumber     string // 证件号
	credentialNumberFlag bool

	credentialType     string // 证件类型
	credentialTypeFlag bool

	expiryDate     string // 到期日期 格式：2007-07-20， 无固定期限或者长期有效，使用PermanentDate常量
	expiryDateFlag bool
}

func NewCreateCertificateBuilder() *CreateCertificateBuilder {
	builder := &CreateCertificateBuilder{}
	return builder
}

// 证件号
//
// 示例值：18823123123123123123
func (builder *CreateCertificateBuilder) CredentialNumber(credentialNumber string) *CreateCertificateBuilder {
	builder.credentialNumber = credentialNumber
	builder.credentialNumberFlag = true
	return builder
}

// 证件类型
//
// 示例值：
func (builder *CreateCertificateBuilder) CredentialType(credentialType string) *CreateCertificateBuilder {
	builder.credentialType = credentialType
	builder.credentialTypeFlag = true
	return builder
}

// 到期日期 格式：2007-07-20， 无固定期限或者长期有效，使用PermanentDate常量
//
// 示例值：2022-01-01
func (builder *CreateCertificateBuilder) ExpiryDate(expiryDate string) *CreateCertificateBuilder {
	builder.expiryDate = expiryDate
	builder.expiryDateFlag = true
	return builder
}

func (builder *CreateCertificateBuilder) Build() *CreateCertificate {
	req := &CreateCertificate{}
	if builder.credentialNumberFlag {
		req.CredentialNumber = &builder.credentialNumber

	}
	if builder.credentialTypeFlag {
		req.CredentialType = &builder.credentialType

	}
	if builder.expiryDateFlag {
		req.ExpiryDate = &builder.expiryDate

	}
	return req
}

type CreateCompany struct {
	Name *I18nText `json:"name,omitempty"` // i18n文本

	IsEnabled *bool `json:"is_enabled,omitempty"` // 是否启用

	ExternalId *string `json:"external_id,omitempty"` // 外部ID 未指定则自动生成
}

type CreateCompanyBuilder struct {
	name     *I18nText // i18n文本
	nameFlag bool

	isEnabled     bool // 是否启用
	isEnabledFlag bool

	externalId     string // 外部ID 未指定则自动生成
	externalIdFlag bool
}

func NewCreateCompanyBuilder() *CreateCompanyBuilder {
	builder := &CreateCompanyBuilder{}
	return builder
}

// i18n文本
//
// 示例值：
func (builder *CreateCompanyBuilder) Name(name *I18nText) *CreateCompanyBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 是否启用
//
// 示例值：
func (builder *CreateCompanyBuilder) IsEnabled(isEnabled bool) *CreateCompanyBuilder {
	builder.isEnabled = isEnabled
	builder.isEnabledFlag = true
	return builder
}

// 外部ID 未指定则自动生成
//
// 示例值：SFWGDEFGDFD
func (builder *CreateCompanyBuilder) ExternalId(externalId string) *CreateCompanyBuilder {
	builder.externalId = externalId
	builder.externalIdFlag = true
	return builder
}

func (builder *CreateCompanyBuilder) Build() *CreateCompany {
	req := &CreateCompany{}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.isEnabledFlag {
		req.IsEnabled = &builder.isEnabled

	}
	if builder.externalIdFlag {
		req.ExternalId = &builder.externalId

	}
	return req
}

type CreateCompanyOptions struct {
	DataSource *int `json:"data_source,omitempty"` // 数据来源
}

type CreateCompanyOptionsBuilder struct {
	dataSource     int // 数据来源
	dataSourceFlag bool
}

func NewCreateCompanyOptionsBuilder() *CreateCompanyOptionsBuilder {
	builder := &CreateCompanyOptionsBuilder{}
	return builder
}

// 数据来源
//
// 示例值：
func (builder *CreateCompanyOptionsBuilder) DataSource(dataSource int) *CreateCompanyOptionsBuilder {
	builder.dataSource = dataSource
	builder.dataSourceFlag = true
	return builder
}

func (builder *CreateCompanyOptionsBuilder) Build() *CreateCompanyOptions {
	req := &CreateCompanyOptions{}
	if builder.dataSourceFlag {
		req.DataSource = &builder.dataSource

	}
	return req
}

type CreateCustomField struct {
	ExternalId *string `json:"external_id,omitempty"` // 外部自定义id

	FieldName *I18nText `json:"field_name,omitempty"` // i18n文本

	FieldType *string `json:"field_type,omitempty"` // 字段类型

	EntityType *string `json:"entity_type,omitempty"` // 所属实体类型

	Description *I18nText `json:"description,omitempty"` // i18n文本

	EnumMeta *CreateEnumMeta `json:"enum_meta,omitempty"` // 枚举值元数据

	IsEnabled *bool `json:"is_enabled,omitempty"` // 是否启用

	CreateSource *string `json:"create_source,omitempty"` // 创建来源

	OrgDimensionofDeptField *string `json:"org_dimensionof_dept_field,omitempty"` // 组织维度，仅当EntityType=Departments时生效
}

type CreateCustomFieldBuilder struct {
	externalId     string // 外部自定义id
	externalIdFlag bool

	fieldName     *I18nText // i18n文本
	fieldNameFlag bool

	fieldType     string // 字段类型
	fieldTypeFlag bool

	entityType     string // 所属实体类型
	entityTypeFlag bool

	description     *I18nText // i18n文本
	descriptionFlag bool

	enumMeta     *CreateEnumMeta // 枚举值元数据
	enumMetaFlag bool

	isEnabled     bool // 是否启用
	isEnabledFlag bool

	createSource     string // 创建来源
	createSourceFlag bool

	orgDimensionofDeptField     string // 组织维度，仅当EntityType=Departments时生效
	orgDimensionofDeptFieldFlag bool
}

func NewCreateCustomFieldBuilder() *CreateCustomFieldBuilder {
	builder := &CreateCustomFieldBuilder{}
	return builder
}

// 外部自定义id
//
// 示例值：custom_id
func (builder *CreateCustomFieldBuilder) ExternalId(externalId string) *CreateCustomFieldBuilder {
	builder.externalId = externalId
	builder.externalIdFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *CreateCustomFieldBuilder) FieldName(fieldName *I18nText) *CreateCustomFieldBuilder {
	builder.fieldName = fieldName
	builder.fieldNameFlag = true
	return builder
}

// 字段类型
//
// 示例值：
func (builder *CreateCustomFieldBuilder) FieldType(fieldType string) *CreateCustomFieldBuilder {
	builder.fieldType = fieldType
	builder.fieldTypeFlag = true
	return builder
}

// 所属实体类型
//
// 示例值：
func (builder *CreateCustomFieldBuilder) EntityType(entityType string) *CreateCustomFieldBuilder {
	builder.entityType = entityType
	builder.entityTypeFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *CreateCustomFieldBuilder) Description(description *I18nText) *CreateCustomFieldBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 枚举值元数据
//
// 示例值：
func (builder *CreateCustomFieldBuilder) EnumMeta(enumMeta *CreateEnumMeta) *CreateCustomFieldBuilder {
	builder.enumMeta = enumMeta
	builder.enumMetaFlag = true
	return builder
}

// 是否启用
//
// 示例值：
func (builder *CreateCustomFieldBuilder) IsEnabled(isEnabled bool) *CreateCustomFieldBuilder {
	builder.isEnabled = isEnabled
	builder.isEnabledFlag = true
	return builder
}

// 创建来源
//
// 示例值：
func (builder *CreateCustomFieldBuilder) CreateSource(createSource string) *CreateCustomFieldBuilder {
	builder.createSource = createSource
	builder.createSourceFlag = true
	return builder
}

// 组织维度，仅当EntityType=Departments时生效
//
// 示例值：f
func (builder *CreateCustomFieldBuilder) OrgDimensionofDeptField(orgDimensionofDeptField string) *CreateCustomFieldBuilder {
	builder.orgDimensionofDeptField = orgDimensionofDeptField
	builder.orgDimensionofDeptFieldFlag = true
	return builder
}

func (builder *CreateCustomFieldBuilder) Build() *CreateCustomField {
	req := &CreateCustomField{}
	if builder.externalIdFlag {
		req.ExternalId = &builder.externalId

	}
	if builder.fieldNameFlag {
		req.FieldName = builder.fieldName
	}
	if builder.fieldTypeFlag {
		req.FieldType = &builder.fieldType

	}
	if builder.entityTypeFlag {
		req.EntityType = &builder.entityType

	}
	if builder.descriptionFlag {
		req.Description = builder.description
	}
	if builder.enumMetaFlag {
		req.EnumMeta = builder.enumMeta
	}
	if builder.isEnabledFlag {
		req.IsEnabled = &builder.isEnabled

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

	}
	if builder.orgDimensionofDeptFieldFlag {
		req.OrgDimensionofDeptField = &builder.orgDimensionofDeptField

	}
	return req
}

type CreateDepartment struct {
	CustomDepartmentId *string `json:"custom_department_id,omitempty"` // 标识租户内一个唯一的部门，支持自定义，未自定义时系统自动生成。ID支持修改。详细说明参见 部门ID说明，获取department_id的方式：企业管理员在 管理后台 > 组织架构 > 成员与部门 页面，点击 部门详情，查询部门ID

	Name *I18nText `json:"name,omitempty"` // i18n文本

	ParentDepartmentId *string `json:"parent_department_id,omitempty"` // 父部门ID

	Leaders []*DepartmentLeader `json:"leaders,omitempty"` // 部门负责人

	Hrbps []string `json:"hrbps,omitempty"` // HRBP

	OrderWeight *string `json:"order_weight,omitempty"` // 在上级部门下的排序权重

	Description *I18nText `json:"description,omitempty"` // i18n文本

	DepartmentType *int `json:"department_type,omitempty"` // 部门类型

	EnabledStatus *bool `json:"enabled_status,omitempty"` // 是否启用

	CustomFieldValueMap map[string]*CustomFieldValue `json:"custom_field_value_map,omitempty"` // 自定义字段

	CustomFieldValues []*CustomFieldValue `json:"custom_field_values,omitempty"` // 自定义字段

	OrgDimension *string `json:"org_dimension,omitempty"` // 组织维度
}

type CreateDepartmentBuilder struct {
	customDepartmentId     string // 标识租户内一个唯一的部门，支持自定义，未自定义时系统自动生成。ID支持修改。详细说明参见 部门ID说明，获取department_id的方式：企业管理员在 管理后台 > 组织架构 > 成员与部门 页面，点击 部门详情，查询部门ID
	customDepartmentIdFlag bool

	name     *I18nText // i18n文本
	nameFlag bool

	parentDepartmentId     string // 父部门ID
	parentDepartmentIdFlag bool

	leaders     []*DepartmentLeader // 部门负责人
	leadersFlag bool

	hrbps     []string // HRBP
	hrbpsFlag bool

	orderWeight     string // 在上级部门下的排序权重
	orderWeightFlag bool

	description     *I18nText // i18n文本
	descriptionFlag bool

	departmentType     int // 部门类型
	departmentTypeFlag bool

	enabledStatus     bool // 是否启用
	enabledStatusFlag bool

	customFieldValueMap     map[string]*CustomFieldValue // 自定义字段
	customFieldValueMapFlag bool

	customFieldValues     []*CustomFieldValue // 自定义字段
	customFieldValuesFlag bool

	orgDimension     string // 组织维度
	orgDimensionFlag bool
}

func NewCreateDepartmentBuilder() *CreateDepartmentBuilder {
	builder := &CreateDepartmentBuilder{}
	return builder
}

// 标识租户内一个唯一的部门，支持自定义，未自定义时系统自动生成。ID支持修改。详细说明参见 部门ID说明，获取department_id的方式：企业管理员在 管理后台 > 组织架构 > 成员与部门 页面，点击 部门详情，查询部门ID
//
// 示例值：eersdf
func (builder *CreateDepartmentBuilder) CustomDepartmentId(customDepartmentId string) *CreateDepartmentBuilder {
	builder.customDepartmentId = customDepartmentId
	builder.customDepartmentIdFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *CreateDepartmentBuilder) Name(name *I18nText) *CreateDepartmentBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 父部门ID
//
// 示例值：h121900
func (builder *CreateDepartmentBuilder) ParentDepartmentId(parentDepartmentId string) *CreateDepartmentBuilder {
	builder.parentDepartmentId = parentDepartmentId
	builder.parentDepartmentIdFlag = true
	return builder
}

// 部门负责人
//
// 示例值：
func (builder *CreateDepartmentBuilder) Leaders(leaders []*DepartmentLeader) *CreateDepartmentBuilder {
	builder.leaders = leaders
	builder.leadersFlag = true
	return builder
}

// HRBP
//
// 示例值：
func (builder *CreateDepartmentBuilder) Hrbps(hrbps []string) *CreateDepartmentBuilder {
	builder.hrbps = hrbps
	builder.hrbpsFlag = true
	return builder
}

// 在上级部门下的排序权重
//
// 示例值：100
func (builder *CreateDepartmentBuilder) OrderWeight(orderWeight string) *CreateDepartmentBuilder {
	builder.orderWeight = orderWeight
	builder.orderWeightFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *CreateDepartmentBuilder) Description(description *I18nText) *CreateDepartmentBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 部门类型
//
// 示例值：
func (builder *CreateDepartmentBuilder) DepartmentType(departmentType int) *CreateDepartmentBuilder {
	builder.departmentType = departmentType
	builder.departmentTypeFlag = true
	return builder
}

// 是否启用
//
// 示例值：
func (builder *CreateDepartmentBuilder) EnabledStatus(enabledStatus bool) *CreateDepartmentBuilder {
	builder.enabledStatus = enabledStatus
	builder.enabledStatusFlag = true
	return builder
}

// 自定义字段
//
// 示例值：
func (builder *CreateDepartmentBuilder) CustomFieldValueMap(customFieldValueMap map[string]*CustomFieldValue) *CreateDepartmentBuilder {
	builder.customFieldValueMap = customFieldValueMap
	builder.customFieldValueMapFlag = true
	return builder
}

// 自定义字段
//
// 示例值：
func (builder *CreateDepartmentBuilder) CustomFieldValues(customFieldValues []*CustomFieldValue) *CreateDepartmentBuilder {
	builder.customFieldValues = customFieldValues
	builder.customFieldValuesFlag = true
	return builder
}

// 组织维度
//
// 示例值：3e3cf96b
func (builder *CreateDepartmentBuilder) OrgDimension(orgDimension string) *CreateDepartmentBuilder {
	builder.orgDimension = orgDimension
	builder.orgDimensionFlag = true
	return builder
}

func (builder *CreateDepartmentBuilder) Build() *CreateDepartment {
	req := &CreateDepartment{}
	if builder.customDepartmentIdFlag {
		req.CustomDepartmentId = &builder.customDepartmentId

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.parentDepartmentIdFlag {
		req.ParentDepartmentId = &builder.parentDepartmentId

	}
	if builder.leadersFlag {
		req.Leaders = builder.leaders
	}
	if builder.hrbpsFlag {
		req.Hrbps = builder.hrbps
	}
	if builder.orderWeightFlag {
		req.OrderWeight = &builder.orderWeight

	}
	if builder.descriptionFlag {
		req.Description = builder.description
	}
	if builder.departmentTypeFlag {
		req.DepartmentType = &builder.departmentType

	}
	if builder.enabledStatusFlag {
		req.EnabledStatus = &builder.enabledStatus

	}
	if builder.customFieldValueMapFlag {
		req.CustomFieldValueMap = builder.customFieldValueMap
	}
	if builder.customFieldValuesFlag {
		req.CustomFieldValues = builder.customFieldValues
	}
	if builder.orgDimensionFlag {
		req.OrgDimension = &builder.orgDimension

	}
	return req
}

type CreateDepartmentOptions struct {
	DataSource *int `json:"data_source,omitempty"` // 数据来源
}

type CreateDepartmentOptionsBuilder struct {
	dataSource     int // 数据来源
	dataSourceFlag bool
}

func NewCreateDepartmentOptionsBuilder() *CreateDepartmentOptionsBuilder {
	builder := &CreateDepartmentOptionsBuilder{}
	return builder
}

// 数据来源
//
// 示例值：
func (builder *CreateDepartmentOptionsBuilder) DataSource(dataSource int) *CreateDepartmentOptionsBuilder {
	builder.dataSource = dataSource
	builder.dataSourceFlag = true
	return builder
}

func (builder *CreateDepartmentOptionsBuilder) Build() *CreateDepartmentOptions {
	req := &CreateDepartmentOptions{}
	if builder.dataSourceFlag {
		req.DataSource = &builder.dataSource

	}
	return req
}

type CreateEmployee struct {
	Name *UpsertName `json:"name,omitempty"` // 姓名

	Mobile *string `json:"mobile,omitempty"` // 员工的联系手机号

	CustomEmployeeId *string `json:"custom_employee_id,omitempty"` // 用户的user_id

	AvatarKey *string `json:"avatar_key,omitempty"` // 头像的文件key

	Email *string `json:"email,omitempty"` // 员工的联系邮箱

	PersonalEmail *string `json:"personal_email,omitempty"` // 员工在人事系统中的联系邮箱

	EnterpriseEmail *string `json:"enterprise_email,omitempty"` // 员工的企业邮箱

	Gender *int `json:"gender,omitempty"` // 性别

	ResidentialAddress *string `json:"residential_address,omitempty"` // 现居住地址

	ContactAddresses []*ContactAddress `json:"contact_addresses,omitempty"` // 联系地址

	EmployeeOrderInDepartments []*UpsertUserDepartmentSortInfo `json:"employee_order_in_departments,omitempty"` // 部门排序

	LeaderId *string `json:"leader_id,omitempty"` // 员工直属上级的user_id

	DottedLineLeaderIds []string `json:"dotted_line_leader_ids,omitempty"` // 员工虚线上级的user_id

	WorkCountryOrRegion *string `json:"work_country_or_region,omitempty"` // 工作地国家/地区

	WorkPlaceId *string `json:"work_place_id,omitempty"` // 工作地点

	WorkStation *I18nText `json:"work_station,omitempty"` // i18n文本

	JobNumber *string `json:"job_number,omitempty"` // 工号

	ExtensionNumber *string `json:"extension_number,omitempty"` // 分机号

	JoinDate *string `json:"join_date,omitempty"` // 入职日期

	EmploymentType *int `json:"employment_type,omitempty"` // 员工类型

	StaffStatus *int `json:"staff_status,omitempty"` // 员工人事状态

	Positions []*Position `json:"positions,omitempty"` // 岗位信息

	JobTitleId *string `json:"job_title_id,omitempty"` // 职务ID

	JobLevelId *string `json:"job_level_id,omitempty"` // 职级ID

	JobFamilyId *string `json:"job_family_id,omitempty"` // 序列ID

	FirstWorkDate *string `json:"first_work_date,omitempty"` // 首次参加工作日期

	FirstJoinDate *string `json:"first_join_date,omitempty"` // 首次进入公司日期

	ProbationPeriod *string `json:"probation_period,omitempty"` // 试用期（月）

	RegularizationDate *string `json:"regularization_date,omitempty"` // 转正日期

	ConvertStatus *string `json:"convert_status,omitempty"` // 转正状态

	ContractSubject *string `json:"contract_subject,omitempty"` // 合同主体ID

	ResignDate *string `json:"resign_date,omitempty"` // 离职日期

	ResignReason *string `json:"resign_reason,omitempty"` // 离职原因

	ResignRemark *string `json:"resign_remark,omitempty"` // 离职备注信息

	ResignType *string `json:"resign_type,omitempty"` // 离职类型

	CancelledEntryType *string `json:"cancelled_entry_type,omitempty"` // 取消入职原因

	CancelledEntryRemark *string `json:"cancelled_entry_remark,omitempty"` // 取消入职备注信息

	Birthday *string `json:"birthday,omitempty"` // 出生日期

	Nationality *string `json:"nationality,omitempty"` // 国籍

	NativePlace *string `json:"native_place,omitempty"` // 籍贯

	Ethnicity *string `json:"ethnicity,omitempty"` // 民族/种族

	MaritalStatus *string `json:"marital_status,omitempty"` // 婚姻状态

	PoliticsStatus *string `json:"politics_status,omitempty"` // 政治面貌

	RegisteredResidenceType *string `json:"registered_residence_type,omitempty"` // 户口类型

	Location *string `json:"location,omitempty"` // 户口所在地地址

	SocialSecurityNumber *string `json:"social_security_number,omitempty"` // 社保账号

	ProvidentFundNumber *string `json:"provident_fund_number,omitempty"` // 公积金账号

	CustomFieldValueMap map[string]*CustomFieldValue `json:"custom_field_value_map,omitempty"` // 自定义字段

	CustomFieldValues []*CustomFieldValue `json:"custom_field_values,omitempty"` // 自定义字段

	VirtualOrgInfos []*UpsertUserVirtualOrgInfo `json:"virtual_org_infos,omitempty"` // 虚拟组织信息
}

type CreateEmployeeBuilder struct {
	name     *UpsertName // 姓名
	nameFlag bool

	mobile     string // 员工的联系手机号
	mobileFlag bool

	customEmployeeId     string // 用户的user_id
	customEmployeeIdFlag bool

	avatarKey     string // 头像的文件key
	avatarKeyFlag bool

	email     string // 员工的联系邮箱
	emailFlag bool

	personalEmail     string // 员工在人事系统中的联系邮箱
	personalEmailFlag bool

	enterpriseEmail     string // 员工的企业邮箱
	enterpriseEmailFlag bool

	gender     int // 性别
	genderFlag bool

	residentialAddress     string // 现居住地址
	residentialAddressFlag bool

	contactAddresses     []*ContactAddress // 联系地址
	contactAddressesFlag bool

	employeeOrderInDepartments     []*UpsertUserDepartmentSortInfo // 部门排序
	employeeOrderInDepartmentsFlag bool

	leaderId     string // 员工直属上级的user_id
	leaderIdFlag bool

	dottedLineLeaderIds     []string // 员工虚线上级的user_id
	dottedLineLeaderIdsFlag bool

	workCountryOrRegion     string // 工作地国家/地区
	workCountryOrRegionFlag bool

	workPlaceId     string // 工作地点
	workPlaceIdFlag bool

	workStation     *I18nText // i18n文本
	workStationFlag bool

	jobNumber     string // 工号
	jobNumberFlag bool

	extensionNumber     string // 分机号
	extensionNumberFlag bool

	joinDate     string // 入职日期
	joinDateFlag bool

	employmentType     int // 员工类型
	employmentTypeFlag bool

	staffStatus     int // 员工人事状态
	staffStatusFlag bool

	positions     []*Position // 岗位信息
	positionsFlag bool

	jobTitleId     string // 职务ID
	jobTitleIdFlag bool

	jobLevelId     string // 职级ID
	jobLevelIdFlag bool

	jobFamilyId     string // 序列ID
	jobFamilyIdFlag bool

	firstWorkDate     string // 首次参加工作日期
	firstWorkDateFlag bool

	firstJoinDate     string // 首次进入公司日期
	firstJoinDateFlag bool

	probationPeriod     string // 试用期（月）
	probationPeriodFlag bool

	regularizationDate     string // 转正日期
	regularizationDateFlag bool

	convertStatus     string // 转正状态
	convertStatusFlag bool

	contractSubject     string // 合同主体ID
	contractSubjectFlag bool

	resignDate     string // 离职日期
	resignDateFlag bool

	resignReason     string // 离职原因
	resignReasonFlag bool

	resignRemark     string // 离职备注信息
	resignRemarkFlag bool

	resignType     string // 离职类型
	resignTypeFlag bool

	cancelledEntryType     string // 取消入职原因
	cancelledEntryTypeFlag bool

	cancelledEntryRemark     string // 取消入职备注信息
	cancelledEntryRemarkFlag bool

	birthday     string // 出生日期
	birthdayFlag bool

	nationality     string // 国籍
	nationalityFlag bool

	nativePlace     string // 籍贯
	nativePlaceFlag bool

	ethnicity     string // 民族/种族
	ethnicityFlag bool

	maritalStatus     string // 婚姻状态
	maritalStatusFlag bool

	politicsStatus     string // 政治面貌
	politicsStatusFlag bool

	registeredResidenceType     string // 户口类型
	registeredResidenceTypeFlag bool

	location     string // 户口所在地地址
	locationFlag bool

	socialSecurityNumber     string // 社保账号
	socialSecurityNumberFlag bool

	providentFundNumber     string // 公积金账号
	providentFundNumberFlag bool

	customFieldValueMap     map[string]*CustomFieldValue // 自定义字段
	customFieldValueMapFlag bool

	customFieldValues     []*CustomFieldValue // 自定义字段
	customFieldValuesFlag bool

	virtualOrgInfos     []*UpsertUserVirtualOrgInfo // 虚拟组织信息
	virtualOrgInfosFlag bool
}

func NewCreateEmployeeBuilder() *CreateEmployeeBuilder {
	builder := &CreateEmployeeBuilder{}
	return builder
}

// 姓名
//
// 示例值：
func (builder *CreateEmployeeBuilder) Name(name *UpsertName) *CreateEmployeeBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 员工的联系手机号
//
// 示例值：13011111111" 或 "+8613011111111
func (builder *CreateEmployeeBuilder) Mobile(mobile string) *CreateEmployeeBuilder {
	builder.mobile = mobile
	builder.mobileFlag = true
	return builder
}

// 用户的user_id
//
// 示例值：u273y71
func (builder *CreateEmployeeBuilder) CustomEmployeeId(customEmployeeId string) *CreateEmployeeBuilder {
	builder.customEmployeeId = customEmployeeId
	builder.customEmployeeIdFlag = true
	return builder
}

// 头像的文件key
//
// 示例值：iimg_v2_8abc397a-9950-44ea-9302-e1d8fe00858g
func (builder *CreateEmployeeBuilder) AvatarKey(avatarKey string) *CreateEmployeeBuilder {
	builder.avatarKey = avatarKey
	builder.avatarKeyFlag = true
	return builder
}

// 员工的联系邮箱
//
// 示例值：zhangsan@gmail.com
func (builder *CreateEmployeeBuilder) Email(email string) *CreateEmployeeBuilder {
	builder.email = email
	builder.emailFlag = true
	return builder
}

// 员工在人事系统中的联系邮箱
//
// 示例值：zhangsan@gmail.com
func (builder *CreateEmployeeBuilder) PersonalEmail(personalEmail string) *CreateEmployeeBuilder {
	builder.personalEmail = personalEmail
	builder.personalEmailFlag = true
	return builder
}

// 员工的企业邮箱
//
// 示例值：zhangsan@gmail.com
func (builder *CreateEmployeeBuilder) EnterpriseEmail(enterpriseEmail string) *CreateEmployeeBuilder {
	builder.enterpriseEmail = enterpriseEmail
	builder.enterpriseEmailFlag = true
	return builder
}

// 性别
//
// 示例值：
func (builder *CreateEmployeeBuilder) Gender(gender int) *CreateEmployeeBuilder {
	builder.gender = gender
	builder.genderFlag = true
	return builder
}

// 现居住地址
//
// 示例值：北京市海淀区
func (builder *CreateEmployeeBuilder) ResidentialAddress(residentialAddress string) *CreateEmployeeBuilder {
	builder.residentialAddress = residentialAddress
	builder.residentialAddressFlag = true
	return builder
}

// 联系地址
//
// 示例值：
func (builder *CreateEmployeeBuilder) ContactAddresses(contactAddresses []*ContactAddress) *CreateEmployeeBuilder {
	builder.contactAddresses = contactAddresses
	builder.contactAddressesFlag = true
	return builder
}

// 部门排序
//
// 示例值：
func (builder *CreateEmployeeBuilder) EmployeeOrderInDepartments(employeeOrderInDepartments []*UpsertUserDepartmentSortInfo) *CreateEmployeeBuilder {
	builder.employeeOrderInDepartments = employeeOrderInDepartments
	builder.employeeOrderInDepartmentsFlag = true
	return builder
}

// 员工直属上级的user_id
//
// 示例值：eeasdqwwe
func (builder *CreateEmployeeBuilder) LeaderId(leaderId string) *CreateEmployeeBuilder {
	builder.leaderId = leaderId
	builder.leaderIdFlag = true
	return builder
}

// 员工虚线上级的user_id
//
// 示例值：
func (builder *CreateEmployeeBuilder) DottedLineLeaderIds(dottedLineLeaderIds []string) *CreateEmployeeBuilder {
	builder.dottedLineLeaderIds = dottedLineLeaderIds
	builder.dottedLineLeaderIdsFlag = true
	return builder
}

// 工作地国家/地区
//
// 示例值：MDM34234234
func (builder *CreateEmployeeBuilder) WorkCountryOrRegion(workCountryOrRegion string) *CreateEmployeeBuilder {
	builder.workCountryOrRegion = workCountryOrRegion
	builder.workCountryOrRegionFlag = true
	return builder
}

// 工作地点
//
// 示例值：eqwedas
func (builder *CreateEmployeeBuilder) WorkPlaceId(workPlaceId string) *CreateEmployeeBuilder {
	builder.workPlaceId = workPlaceId
	builder.workPlaceIdFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *CreateEmployeeBuilder) WorkStation(workStation *I18nText) *CreateEmployeeBuilder {
	builder.workStation = workStation
	builder.workStationFlag = true
	return builder
}

// 工号
//
// 示例值：2845435
func (builder *CreateEmployeeBuilder) JobNumber(jobNumber string) *CreateEmployeeBuilder {
	builder.jobNumber = jobNumber
	builder.jobNumberFlag = true
	return builder
}

// 分机号
//
// 示例值：2845435
func (builder *CreateEmployeeBuilder) ExtensionNumber(extensionNumber string) *CreateEmployeeBuilder {
	builder.extensionNumber = extensionNumber
	builder.extensionNumberFlag = true
	return builder
}

// 入职日期
//
// 示例值：2022-10-10
func (builder *CreateEmployeeBuilder) JoinDate(joinDate string) *CreateEmployeeBuilder {
	builder.joinDate = joinDate
	builder.joinDateFlag = true
	return builder
}

// 员工类型
//
// 示例值：
func (builder *CreateEmployeeBuilder) EmploymentType(employmentType int) *CreateEmployeeBuilder {
	builder.employmentType = employmentType
	builder.employmentTypeFlag = true
	return builder
}

// 员工人事状态
//
// 示例值：
func (builder *CreateEmployeeBuilder) StaffStatus(staffStatus int) *CreateEmployeeBuilder {
	builder.staffStatus = staffStatus
	builder.staffStatusFlag = true
	return builder
}

// 岗位信息
//
// 示例值：
func (builder *CreateEmployeeBuilder) Positions(positions []*Position) *CreateEmployeeBuilder {
	builder.positions = positions
	builder.positionsFlag = true
	return builder
}

// 职务ID
//
// 示例值：wqedsaqw
func (builder *CreateEmployeeBuilder) JobTitleId(jobTitleId string) *CreateEmployeeBuilder {
	builder.jobTitleId = jobTitleId
	builder.jobTitleIdFlag = true
	return builder
}

// 职级ID
//
// 示例值：qwedsad
func (builder *CreateEmployeeBuilder) JobLevelId(jobLevelId string) *CreateEmployeeBuilder {
	builder.jobLevelId = jobLevelId
	builder.jobLevelIdFlag = true
	return builder
}

// 序列ID
//
// 示例值：qweads
func (builder *CreateEmployeeBuilder) JobFamilyId(jobFamilyId string) *CreateEmployeeBuilder {
	builder.jobFamilyId = jobFamilyId
	builder.jobFamilyIdFlag = true
	return builder
}

// 首次参加工作日期
//
// 示例值：2022-01-01
func (builder *CreateEmployeeBuilder) FirstWorkDate(firstWorkDate string) *CreateEmployeeBuilder {
	builder.firstWorkDate = firstWorkDate
	builder.firstWorkDateFlag = true
	return builder
}

// 首次进入公司日期
//
// 示例值：2022-01-01
func (builder *CreateEmployeeBuilder) FirstJoinDate(firstJoinDate string) *CreateEmployeeBuilder {
	builder.firstJoinDate = firstJoinDate
	builder.firstJoinDateFlag = true
	return builder
}

// 试用期（月）
//
// 示例值：10
func (builder *CreateEmployeeBuilder) ProbationPeriod(probationPeriod string) *CreateEmployeeBuilder {
	builder.probationPeriod = probationPeriod
	builder.probationPeriodFlag = true
	return builder
}

// 转正日期
//
// 示例值：2022-01-01
func (builder *CreateEmployeeBuilder) RegularizationDate(regularizationDate string) *CreateEmployeeBuilder {
	builder.regularizationDate = regularizationDate
	builder.regularizationDateFlag = true
	return builder
}

// 转正状态
//
// 示例值：
func (builder *CreateEmployeeBuilder) ConvertStatus(convertStatus string) *CreateEmployeeBuilder {
	builder.convertStatus = convertStatus
	builder.convertStatusFlag = true
	return builder
}

// 合同主体ID
//
// 示例值：2dsweq
func (builder *CreateEmployeeBuilder) ContractSubject(contractSubject string) *CreateEmployeeBuilder {
	builder.contractSubject = contractSubject
	builder.contractSubjectFlag = true
	return builder
}

// 离职日期
//
// 示例值：2022-01-01
func (builder *CreateEmployeeBuilder) ResignDate(resignDate string) *CreateEmployeeBuilder {
	builder.resignDate = resignDate
	builder.resignDateFlag = true
	return builder
}

// 离职原因
//
// 示例值：
func (builder *CreateEmployeeBuilder) ResignReason(resignReason string) *CreateEmployeeBuilder {
	builder.resignReason = resignReason
	builder.resignReasonFlag = true
	return builder
}

// 离职备注信息
//
// 示例值：个人原因
func (builder *CreateEmployeeBuilder) ResignRemark(resignRemark string) *CreateEmployeeBuilder {
	builder.resignRemark = resignRemark
	builder.resignRemarkFlag = true
	return builder
}

// 离职类型
//
// 示例值：
func (builder *CreateEmployeeBuilder) ResignType(resignType string) *CreateEmployeeBuilder {
	builder.resignType = resignType
	builder.resignTypeFlag = true
	return builder
}

// 取消入职原因
//
// 示例值：
func (builder *CreateEmployeeBuilder) CancelledEntryType(cancelledEntryType string) *CreateEmployeeBuilder {
	builder.cancelledEntryType = cancelledEntryType
	builder.cancelledEntryTypeFlag = true
	return builder
}

// 取消入职备注信息
//
// 示例值：个人原因
func (builder *CreateEmployeeBuilder) CancelledEntryRemark(cancelledEntryRemark string) *CreateEmployeeBuilder {
	builder.cancelledEntryRemark = cancelledEntryRemark
	builder.cancelledEntryRemarkFlag = true
	return builder
}

// 出生日期
//
// 示例值：2022-01-01
func (builder *CreateEmployeeBuilder) Birthday(birthday string) *CreateEmployeeBuilder {
	builder.birthday = birthday
	builder.birthdayFlag = true
	return builder
}

// 国籍
//
// 示例值：cn
func (builder *CreateEmployeeBuilder) Nationality(nationality string) *CreateEmployeeBuilder {
	builder.nationality = nationality
	builder.nationalityFlag = true
	return builder
}

// 籍贯
//
// 示例值：1
func (builder *CreateEmployeeBuilder) NativePlace(nativePlace string) *CreateEmployeeBuilder {
	builder.nativePlace = nativePlace
	builder.nativePlaceFlag = true
	return builder
}

// 民族/种族
//
// 示例值：
func (builder *CreateEmployeeBuilder) Ethnicity(ethnicity string) *CreateEmployeeBuilder {
	builder.ethnicity = ethnicity
	builder.ethnicityFlag = true
	return builder
}

// 婚姻状态
//
// 示例值：
func (builder *CreateEmployeeBuilder) MaritalStatus(maritalStatus string) *CreateEmployeeBuilder {
	builder.maritalStatus = maritalStatus
	builder.maritalStatusFlag = true
	return builder
}

// 政治面貌
//
// 示例值：
func (builder *CreateEmployeeBuilder) PoliticsStatus(politicsStatus string) *CreateEmployeeBuilder {
	builder.politicsStatus = politicsStatus
	builder.politicsStatusFlag = true
	return builder
}

// 户口类型
//
// 示例值：
func (builder *CreateEmployeeBuilder) RegisteredResidenceType(registeredResidenceType string) *CreateEmployeeBuilder {
	builder.registeredResidenceType = registeredResidenceType
	builder.registeredResidenceTypeFlag = true
	return builder
}

// 户口所在地地址
//
// 示例值：cn
func (builder *CreateEmployeeBuilder) Location(location string) *CreateEmployeeBuilder {
	builder.location = location
	builder.locationFlag = true
	return builder
}

// 社保账号
//
// 示例值：1
func (builder *CreateEmployeeBuilder) SocialSecurityNumber(socialSecurityNumber string) *CreateEmployeeBuilder {
	builder.socialSecurityNumber = socialSecurityNumber
	builder.socialSecurityNumberFlag = true
	return builder
}

// 公积金账号
//
// 示例值：1
func (builder *CreateEmployeeBuilder) ProvidentFundNumber(providentFundNumber string) *CreateEmployeeBuilder {
	builder.providentFundNumber = providentFundNumber
	builder.providentFundNumberFlag = true
	return builder
}

// 自定义字段
//
// 示例值：
func (builder *CreateEmployeeBuilder) CustomFieldValueMap(customFieldValueMap map[string]*CustomFieldValue) *CreateEmployeeBuilder {
	builder.customFieldValueMap = customFieldValueMap
	builder.customFieldValueMapFlag = true
	return builder
}

// 自定义字段
//
// 示例值：
func (builder *CreateEmployeeBuilder) CustomFieldValues(customFieldValues []*CustomFieldValue) *CreateEmployeeBuilder {
	builder.customFieldValues = customFieldValues
	builder.customFieldValuesFlag = true
	return builder
}

// 虚拟组织信息
//
// 示例值：
func (builder *CreateEmployeeBuilder) VirtualOrgInfos(virtualOrgInfos []*UpsertUserVirtualOrgInfo) *CreateEmployeeBuilder {
	builder.virtualOrgInfos = virtualOrgInfos
	builder.virtualOrgInfosFlag = true
	return builder
}

func (builder *CreateEmployeeBuilder) Build() *CreateEmployee {
	req := &CreateEmployee{}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.mobileFlag {
		req.Mobile = &builder.mobile

	}
	if builder.customEmployeeIdFlag {
		req.CustomEmployeeId = &builder.customEmployeeId

	}
	if builder.avatarKeyFlag {
		req.AvatarKey = &builder.avatarKey

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

	}
	if builder.personalEmailFlag {
		req.PersonalEmail = &builder.personalEmail

	}
	if builder.enterpriseEmailFlag {
		req.EnterpriseEmail = &builder.enterpriseEmail

	}
	if builder.genderFlag {
		req.Gender = &builder.gender

	}
	if builder.residentialAddressFlag {
		req.ResidentialAddress = &builder.residentialAddress

	}
	if builder.contactAddressesFlag {
		req.ContactAddresses = builder.contactAddresses
	}
	if builder.employeeOrderInDepartmentsFlag {
		req.EmployeeOrderInDepartments = builder.employeeOrderInDepartments
	}
	if builder.leaderIdFlag {
		req.LeaderId = &builder.leaderId

	}
	if builder.dottedLineLeaderIdsFlag {
		req.DottedLineLeaderIds = builder.dottedLineLeaderIds
	}
	if builder.workCountryOrRegionFlag {
		req.WorkCountryOrRegion = &builder.workCountryOrRegion

	}
	if builder.workPlaceIdFlag {
		req.WorkPlaceId = &builder.workPlaceId

	}
	if builder.workStationFlag {
		req.WorkStation = builder.workStation
	}
	if builder.jobNumberFlag {
		req.JobNumber = &builder.jobNumber

	}
	if builder.extensionNumberFlag {
		req.ExtensionNumber = &builder.extensionNumber

	}
	if builder.joinDateFlag {
		req.JoinDate = &builder.joinDate

	}
	if builder.employmentTypeFlag {
		req.EmploymentType = &builder.employmentType

	}
	if builder.staffStatusFlag {
		req.StaffStatus = &builder.staffStatus

	}
	if builder.positionsFlag {
		req.Positions = builder.positions
	}
	if builder.jobTitleIdFlag {
		req.JobTitleId = &builder.jobTitleId

	}
	if builder.jobLevelIdFlag {
		req.JobLevelId = &builder.jobLevelId

	}
	if builder.jobFamilyIdFlag {
		req.JobFamilyId = &builder.jobFamilyId

	}
	if builder.firstWorkDateFlag {
		req.FirstWorkDate = &builder.firstWorkDate

	}
	if builder.firstJoinDateFlag {
		req.FirstJoinDate = &builder.firstJoinDate

	}
	if builder.probationPeriodFlag {
		req.ProbationPeriod = &builder.probationPeriod

	}
	if builder.regularizationDateFlag {
		req.RegularizationDate = &builder.regularizationDate

	}
	if builder.convertStatusFlag {
		req.ConvertStatus = &builder.convertStatus

	}
	if builder.contractSubjectFlag {
		req.ContractSubject = &builder.contractSubject

	}
	if builder.resignDateFlag {
		req.ResignDate = &builder.resignDate

	}
	if builder.resignReasonFlag {
		req.ResignReason = &builder.resignReason

	}
	if builder.resignRemarkFlag {
		req.ResignRemark = &builder.resignRemark

	}
	if builder.resignTypeFlag {
		req.ResignType = &builder.resignType

	}
	if builder.cancelledEntryTypeFlag {
		req.CancelledEntryType = &builder.cancelledEntryType

	}
	if builder.cancelledEntryRemarkFlag {
		req.CancelledEntryRemark = &builder.cancelledEntryRemark

	}
	if builder.birthdayFlag {
		req.Birthday = &builder.birthday

	}
	if builder.nationalityFlag {
		req.Nationality = &builder.nationality

	}
	if builder.nativePlaceFlag {
		req.NativePlace = &builder.nativePlace

	}
	if builder.ethnicityFlag {
		req.Ethnicity = &builder.ethnicity

	}
	if builder.maritalStatusFlag {
		req.MaritalStatus = &builder.maritalStatus

	}
	if builder.politicsStatusFlag {
		req.PoliticsStatus = &builder.politicsStatus

	}
	if builder.registeredResidenceTypeFlag {
		req.RegisteredResidenceType = &builder.registeredResidenceType

	}
	if builder.locationFlag {
		req.Location = &builder.location

	}
	if builder.socialSecurityNumberFlag {
		req.SocialSecurityNumber = &builder.socialSecurityNumber

	}
	if builder.providentFundNumberFlag {
		req.ProvidentFundNumber = &builder.providentFundNumber

	}
	if builder.customFieldValueMapFlag {
		req.CustomFieldValueMap = builder.customFieldValueMap
	}
	if builder.customFieldValuesFlag {
		req.CustomFieldValues = builder.customFieldValues
	}
	if builder.virtualOrgInfosFlag {
		req.VirtualOrgInfos = builder.virtualOrgInfos
	}
	return req
}

type CreateEmployeeBankAccountOption struct {
	DataSource *int `json:"data_source,omitempty"` // 数据来源
}

type CreateEmployeeBankAccountOptionBuilder struct {
	dataSource     int // 数据来源
	dataSourceFlag bool
}

func NewCreateEmployeeBankAccountOptionBuilder() *CreateEmployeeBankAccountOptionBuilder {
	builder := &CreateEmployeeBankAccountOptionBuilder{}
	return builder
}

// 数据来源
//
// 示例值：
func (builder *CreateEmployeeBankAccountOptionBuilder) DataSource(dataSource int) *CreateEmployeeBankAccountOptionBuilder {
	builder.dataSource = dataSource
	builder.dataSourceFlag = true
	return builder
}

func (builder *CreateEmployeeBankAccountOptionBuilder) Build() *CreateEmployeeBankAccountOption {
	req := &CreateEmployeeBankAccountOption{}
	if builder.dataSourceFlag {
		req.DataSource = &builder.dataSource

	}
	return req
}

type CreateEmployeeOptions struct {
	GeoName *string `json:"geo_name,omitempty"` // 用户指定geo/unit

	HomeUserId *string `json:"home_user_id,omitempty"` // shadow关联的UserID

	EmployeeTraceInfo *EmployeeTraceInfo `json:"employee_trace_info,omitempty"` // 用户追踪信息

	EnterpriseEmailPassword *string `json:"enterprise_email_password,omitempty"` // 用户企业邮箱登录时的密码

	DataSource *int `json:"data_source,omitempty"` // 数据来源

	SubscriptionIds []string `json:"subscription_ids,omitempty"` // 席位信息

	NeedSendNotification *SendNotification `json:"need_send_notification,omitempty"` // 发送通知
}

type CreateEmployeeOptionsBuilder struct {
	geoName     string // 用户指定geo/unit
	geoNameFlag bool

	homeUserId     string // shadow关联的UserID
	homeUserIdFlag bool

	employeeTraceInfo     *EmployeeTraceInfo // 用户追踪信息
	employeeTraceInfoFlag bool

	enterpriseEmailPassword     string // 用户企业邮箱登录时的密码
	enterpriseEmailPasswordFlag bool

	dataSource     int // 数据来源
	dataSourceFlag bool

	subscriptionIds     []string // 席位信息
	subscriptionIdsFlag bool

	needSendNotification     *SendNotification // 发送通知
	needSendNotificationFlag bool
}

func NewCreateEmployeeOptionsBuilder() *CreateEmployeeOptionsBuilder {
	builder := &CreateEmployeeOptionsBuilder{}
	return builder
}

// 用户指定geo/unit
//
// 示例值：cn
func (builder *CreateEmployeeOptionsBuilder) GeoName(geoName string) *CreateEmployeeOptionsBuilder {
	builder.geoName = geoName
	builder.geoNameFlag = true
	return builder
}

// shadow关联的UserID
//
// 示例值：asdqwed
func (builder *CreateEmployeeOptionsBuilder) HomeUserId(homeUserId string) *CreateEmployeeOptionsBuilder {
	builder.homeUserId = homeUserId
	builder.homeUserIdFlag = true
	return builder
}

// 用户追踪信息
//
// 示例值：
func (builder *CreateEmployeeOptionsBuilder) EmployeeTraceInfo(employeeTraceInfo *EmployeeTraceInfo) *CreateEmployeeOptionsBuilder {
	builder.employeeTraceInfo = employeeTraceInfo
	builder.employeeTraceInfoFlag = true
	return builder
}

// 用户企业邮箱登录时的密码
//
// 示例值：1
func (builder *CreateEmployeeOptionsBuilder) EnterpriseEmailPassword(enterpriseEmailPassword string) *CreateEmployeeOptionsBuilder {
	builder.enterpriseEmailPassword = enterpriseEmailPassword
	builder.enterpriseEmailPasswordFlag = true
	return builder
}

// 数据来源
//
// 示例值：
func (builder *CreateEmployeeOptionsBuilder) DataSource(dataSource int) *CreateEmployeeOptionsBuilder {
	builder.dataSource = dataSource
	builder.dataSourceFlag = true
	return builder
}

// 席位信息
//
// 示例值：
func (builder *CreateEmployeeOptionsBuilder) SubscriptionIds(subscriptionIds []string) *CreateEmployeeOptionsBuilder {
	builder.subscriptionIds = subscriptionIds
	builder.subscriptionIdsFlag = true
	return builder
}

// 发送通知
//
// 示例值：
func (builder *CreateEmployeeOptionsBuilder) NeedSendNotification(needSendNotification *SendNotification) *CreateEmployeeOptionsBuilder {
	builder.needSendNotification = needSendNotification
	builder.needSendNotificationFlag = true
	return builder
}

func (builder *CreateEmployeeOptionsBuilder) Build() *CreateEmployeeOptions {
	req := &CreateEmployeeOptions{}
	if builder.geoNameFlag {
		req.GeoName = &builder.geoName

	}
	if builder.homeUserIdFlag {
		req.HomeUserId = &builder.homeUserId

	}
	if builder.employeeTraceInfoFlag {
		req.EmployeeTraceInfo = builder.employeeTraceInfo
	}
	if builder.enterpriseEmailPasswordFlag {
		req.EnterpriseEmailPassword = &builder.enterpriseEmailPassword

	}
	if builder.dataSourceFlag {
		req.DataSource = &builder.dataSource

	}
	if builder.subscriptionIdsFlag {
		req.SubscriptionIds = builder.subscriptionIds
	}
	if builder.needSendNotificationFlag {
		req.NeedSendNotification = builder.needSendNotification
	}
	return req
}

type CreateEmployeeTypeEnum struct {
	Content *I18nText `json:"content,omitempty"` // i18n文本

	EnumStatus *string `json:"enum_status,omitempty"` // 枚举状态
}

type CreateEmployeeTypeEnumBuilder struct {
	content     *I18nText // i18n文本
	contentFlag bool

	enumStatus     string // 枚举状态
	enumStatusFlag bool
}

func NewCreateEmployeeTypeEnumBuilder() *CreateEmployeeTypeEnumBuilder {
	builder := &CreateEmployeeTypeEnumBuilder{}
	return builder
}

// i18n文本
//
// 示例值：
func (builder *CreateEmployeeTypeEnumBuilder) Content(content *I18nText) *CreateEmployeeTypeEnumBuilder {
	builder.content = content
	builder.contentFlag = true
	return builder
}

// 枚举状态
//
// 示例值：
func (builder *CreateEmployeeTypeEnumBuilder) EnumStatus(enumStatus string) *CreateEmployeeTypeEnumBuilder {
	builder.enumStatus = enumStatus
	builder.enumStatusFlag = true
	return builder
}

func (builder *CreateEmployeeTypeEnumBuilder) Build() *CreateEmployeeTypeEnum {
	req := &CreateEmployeeTypeEnum{}
	if builder.contentFlag {
		req.Content = builder.content
	}
	if builder.enumStatusFlag {
		req.EnumStatus = &builder.enumStatus

	}
	return req
}

type CreateEmployeeTypeEnumOptions struct {
	DataSource *int `json:"data_source,omitempty"` // 数据来源
}

type CreateEmployeeTypeEnumOptionsBuilder struct {
	dataSource     int // 数据来源
	dataSourceFlag bool
}

func NewCreateEmployeeTypeEnumOptionsBuilder() *CreateEmployeeTypeEnumOptionsBuilder {
	builder := &CreateEmployeeTypeEnumOptionsBuilder{}
	return builder
}

// 数据来源
//
// 示例值：
func (builder *CreateEmployeeTypeEnumOptionsBuilder) DataSource(dataSource int) *CreateEmployeeTypeEnumOptionsBuilder {
	builder.dataSource = dataSource
	builder.dataSourceFlag = true
	return builder
}

func (builder *CreateEmployeeTypeEnumOptionsBuilder) Build() *CreateEmployeeTypeEnumOptions {
	req := &CreateEmployeeTypeEnumOptions{}
	if builder.dataSourceFlag {
		req.DataSource = &builder.dataSource

	}
	return req
}

type CreateEnumMeta struct {
	Type *string `json:"type,omitempty"` // 枚举值类型

	OptionValues []*EnumOption `json:"option_values,omitempty"` // 枚举值选项
}

type CreateEnumMetaBuilder struct {
	type_    string // 枚举值类型
	typeFlag bool

	optionValues     []*EnumOption // 枚举值选项
	optionValuesFlag bool
}

func NewCreateEnumMetaBuilder() *CreateEnumMetaBuilder {
	builder := &CreateEnumMetaBuilder{}
	return builder
}

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

// 枚举值选项
//
// 示例值：
func (builder *CreateEnumMetaBuilder) OptionValues(optionValues []*EnumOption) *CreateEnumMetaBuilder {
	builder.optionValues = optionValues
	builder.optionValuesFlag = true
	return builder
}

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

	}
	if builder.optionValuesFlag {
		req.OptionValues = builder.optionValues
	}
	return req
}

type CreateGroupSet struct {
	ExternalId *string `json:"external_id,omitempty"` // 外部ID

	Name *I18nText `json:"name,omitempty"` // i18n文本

	Type *int `json:"type,omitempty"` // 用户组分组的类型

	Source *int `json:"source,omitempty"` // 用户组分组的来源
}

type CreateGroupSetBuilder struct {
	externalId     string // 外部ID
	externalIdFlag bool

	name     *I18nText // i18n文本
	nameFlag bool

	type_    int // 用户组分组的类型
	typeFlag bool

	source     int // 用户组分组的来源
	sourceFlag bool
}

func NewCreateGroupSetBuilder() *CreateGroupSetBuilder {
	builder := &CreateGroupSetBuilder{}
	return builder
}

// 外部ID
//
// 示例值：123456
func (builder *CreateGroupSetBuilder) ExternalId(externalId string) *CreateGroupSetBuilder {
	builder.externalId = externalId
	builder.externalIdFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *CreateGroupSetBuilder) Name(name *I18nText) *CreateGroupSetBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 用户组分组的类型
//
// 示例值：1
func (builder *CreateGroupSetBuilder) Type(type_ int) *CreateGroupSetBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// 用户组分组的来源
//
// 示例值：1
func (builder *CreateGroupSetBuilder) Source(source int) *CreateGroupSetBuilder {
	builder.source = source
	builder.sourceFlag = true
	return builder
}

func (builder *CreateGroupSetBuilder) Build() *CreateGroupSet {
	req := &CreateGroupSet{}
	if builder.externalIdFlag {
		req.ExternalId = &builder.externalId

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.typeFlag {
		req.Type = &builder.type_

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

	}
	return req
}

type CreateGuest struct {
	Name *UpsertGuestName `json:"name,omitempty"` // 姓名

	Mobile *string `json:"mobile,omitempty"` // 手机

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

	AvatarKey *string `json:"avatar_key,omitempty"` // 头像

	WorkCountryOrRegion *string `json:"work_country_or_region,omitempty"` // 国家地区
}

type CreateGuestBuilder struct {
	name     *UpsertGuestName // 姓名
	nameFlag bool

	mobile     string // 手机
	mobileFlag bool

	email     string // 邮箱
	emailFlag bool

	avatarKey     string // 头像
	avatarKeyFlag bool

	workCountryOrRegion     string // 国家地区
	workCountryOrRegionFlag bool
}

func NewCreateGuestBuilder() *CreateGuestBuilder {
	builder := &CreateGuestBuilder{}
	return builder
}

// 姓名
//
// 示例值：
func (builder *CreateGuestBuilder) Name(name *UpsertGuestName) *CreateGuestBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 手机
//
// 示例值：+8612345678901
func (builder *CreateGuestBuilder) Mobile(mobile string) *CreateGuestBuilder {
	builder.mobile = mobile
	builder.mobileFlag = true
	return builder
}

// 邮箱
//
// 示例值：abc@abc.com
func (builder *CreateGuestBuilder) Email(email string) *CreateGuestBuilder {
	builder.email = email
	builder.emailFlag = true
	return builder
}

// 头像
//
// 示例值：asdfaserwerweradsfasdf
func (builder *CreateGuestBuilder) AvatarKey(avatarKey string) *CreateGuestBuilder {
	builder.avatarKey = avatarKey
	builder.avatarKeyFlag = true
	return builder
}

// 国家地区
//
// 示例值：MDCT00000256
func (builder *CreateGuestBuilder) WorkCountryOrRegion(workCountryOrRegion string) *CreateGuestBuilder {
	builder.workCountryOrRegion = workCountryOrRegion
	builder.workCountryOrRegionFlag = true
	return builder
}

func (builder *CreateGuestBuilder) Build() *CreateGuest {
	req := &CreateGuest{}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.mobileFlag {
		req.Mobile = &builder.mobile

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

	}
	if builder.avatarKeyFlag {
		req.AvatarKey = &builder.avatarKey

	}
	if builder.workCountryOrRegionFlag {
		req.WorkCountryOrRegion = &builder.workCountryOrRegion

	}
	return req
}

type CreateGuestOptions struct {
	GeoName *string `json:"geo_name,omitempty"` // 指定geo/unit

	HomeUserId *string `json:"home_user_id,omitempty"` // shadow关联的UserID

	GuestTraceInfo *GuestTraceInfo `json:"guest_trace_info,omitempty"` // 访客追踪信息
}

type CreateGuestOptionsBuilder struct {
	geoName     string // 指定geo/unit
	geoNameFlag bool

	homeUserId     string // shadow关联的UserID
	homeUserIdFlag bool

	guestTraceInfo     *GuestTraceInfo // 访客追踪信息
	guestTraceInfoFlag bool
}

func NewCreateGuestOptionsBuilder() *CreateGuestOptionsBuilder {
	builder := &CreateGuestOptionsBuilder{}
	return builder
}

// 指定geo/unit
//
// 示例值：cn
func (builder *CreateGuestOptionsBuilder) GeoName(geoName string) *CreateGuestOptionsBuilder {
	builder.geoName = geoName
	builder.geoNameFlag = true
	return builder
}

// shadow关联的UserID
//
// 示例值：123123
func (builder *CreateGuestOptionsBuilder) HomeUserId(homeUserId string) *CreateGuestOptionsBuilder {
	builder.homeUserId = homeUserId
	builder.homeUserIdFlag = true
	return builder
}

// 访客追踪信息
//
// 示例值：
func (builder *CreateGuestOptionsBuilder) GuestTraceInfo(guestTraceInfo *GuestTraceInfo) *CreateGuestOptionsBuilder {
	builder.guestTraceInfo = guestTraceInfo
	builder.guestTraceInfoFlag = true
	return builder
}

func (builder *CreateGuestOptionsBuilder) Build() *CreateGuestOptions {
	req := &CreateGuestOptions{}
	if builder.geoNameFlag {
		req.GeoName = &builder.geoName

	}
	if builder.homeUserIdFlag {
		req.HomeUserId = &builder.homeUserId

	}
	if builder.guestTraceInfoFlag {
		req.GuestTraceInfo = builder.guestTraceInfo
	}
	return req
}

type CreateJobFamily struct {
	JobFamilyName *I18nText `json:"job_family_name,omitempty"` // i18n文本

	IsEnabled *bool `json:"is_enabled,omitempty"` // 是否启用

	ParentId *string `json:"parent_id,omitempty"` // 上级序列

	Description *I18nText `json:"description,omitempty"` // i18n文本

	ExternalId *string `json:"external_id,omitempty"` // 外部ID
}

type CreateJobFamilyBuilder struct {
	jobFamilyName     *I18nText // i18n文本
	jobFamilyNameFlag bool

	isEnabled     bool // 是否启用
	isEnabledFlag bool

	parentId     string // 上级序列
	parentIdFlag bool

	description     *I18nText // i18n文本
	descriptionFlag bool

	externalId     string // 外部ID
	externalIdFlag bool
}

func NewCreateJobFamilyBuilder() *CreateJobFamilyBuilder {
	builder := &CreateJobFamilyBuilder{}
	return builder
}

// i18n文本
//
// 示例值：
func (builder *CreateJobFamilyBuilder) JobFamilyName(jobFamilyName *I18nText) *CreateJobFamilyBuilder {
	builder.jobFamilyName = jobFamilyName
	builder.jobFamilyNameFlag = true
	return builder
}

// 是否启用
//
// 示例值：
func (builder *CreateJobFamilyBuilder) IsEnabled(isEnabled bool) *CreateJobFamilyBuilder {
	builder.isEnabled = isEnabled
	builder.isEnabledFlag = true
	return builder
}

// 上级序列
//
// 示例值：6872549699048439828
func (builder *CreateJobFamilyBuilder) ParentId(parentId string) *CreateJobFamilyBuilder {
	builder.parentId = parentId
	builder.parentIdFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *CreateJobFamilyBuilder) Description(description *I18nText) *CreateJobFamilyBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 外部ID
//
// 示例值：custom_id
func (builder *CreateJobFamilyBuilder) ExternalId(externalId string) *CreateJobFamilyBuilder {
	builder.externalId = externalId
	builder.externalIdFlag = true
	return builder
}

func (builder *CreateJobFamilyBuilder) Build() *CreateJobFamily {
	req := &CreateJobFamily{}
	if builder.jobFamilyNameFlag {
		req.JobFamilyName = builder.jobFamilyName
	}
	if builder.isEnabledFlag {
		req.IsEnabled = &builder.isEnabled

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

	}
	if builder.descriptionFlag {
		req.Description = builder.description
	}
	if builder.externalIdFlag {
		req.ExternalId = &builder.externalId

	}
	return req
}

type CreateJobFamilyOptions struct {
	DataSource *int `json:"data_source,omitempty"` // 数据来源
}

type CreateJobFamilyOptionsBuilder struct {
	dataSource     int // 数据来源
	dataSourceFlag bool
}

func NewCreateJobFamilyOptionsBuilder() *CreateJobFamilyOptionsBuilder {
	builder := &CreateJobFamilyOptionsBuilder{}
	return builder
}

// 数据来源
//
// 示例值：
func (builder *CreateJobFamilyOptionsBuilder) DataSource(dataSource int) *CreateJobFamilyOptionsBuilder {
	builder.dataSource = dataSource
	builder.dataSourceFlag = true
	return builder
}

func (builder *CreateJobFamilyOptionsBuilder) Build() *CreateJobFamilyOptions {
	req := &CreateJobFamilyOptions{}
	if builder.dataSourceFlag {
		req.DataSource = &builder.dataSource

	}
	return req
}

type CreateJobLevel struct {
	Name *I18nText `json:"name,omitempty"` // i18n文本

	IsEnabled *bool `json:"is_enabled,omitempty"` // 是否启用

	Order *string `json:"order,omitempty"` // 排序, 小的在前面

	Description *I18nText `json:"description,omitempty"` // i18n文本

	ExternalId *string `json:"external_id,omitempty"` // 外部ID
}

type CreateJobLevelBuilder struct {
	name     *I18nText // i18n文本
	nameFlag bool

	isEnabled     bool // 是否启用
	isEnabledFlag bool

	order     string // 排序, 小的在前面
	orderFlag bool

	description     *I18nText // i18n文本
	descriptionFlag bool

	externalId     string // 外部ID
	externalIdFlag bool
}

func NewCreateJobLevelBuilder() *CreateJobLevelBuilder {
	builder := &CreateJobLevelBuilder{}
	return builder
}

// i18n文本
//
// 示例值：
func (builder *CreateJobLevelBuilder) Name(name *I18nText) *CreateJobLevelBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 是否启用
//
// 示例值：
func (builder *CreateJobLevelBuilder) IsEnabled(isEnabled bool) *CreateJobLevelBuilder {
	builder.isEnabled = isEnabled
	builder.isEnabledFlag = true
	return builder
}

// 排序, 小的在前面
//
// 示例值：100
func (builder *CreateJobLevelBuilder) Order(order string) *CreateJobLevelBuilder {
	builder.order = order
	builder.orderFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *CreateJobLevelBuilder) Description(description *I18nText) *CreateJobLevelBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 外部ID
//
// 示例值：custom_id
func (builder *CreateJobLevelBuilder) ExternalId(externalId string) *CreateJobLevelBuilder {
	builder.externalId = externalId
	builder.externalIdFlag = true
	return builder
}

func (builder *CreateJobLevelBuilder) Build() *CreateJobLevel {
	req := &CreateJobLevel{}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.isEnabledFlag {
		req.IsEnabled = &builder.isEnabled

	}
	if builder.orderFlag {
		req.Order = &builder.order

	}
	if builder.descriptionFlag {
		req.Description = builder.description
	}
	if builder.externalIdFlag {
		req.ExternalId = &builder.externalId

	}
	return req
}

type CreateJobLevelOptions struct {
	DataSource *int `json:"data_source,omitempty"` // 数据来源
}

type CreateJobLevelOptionsBuilder struct {
	dataSource     int // 数据来源
	dataSourceFlag bool
}

func NewCreateJobLevelOptionsBuilder() *CreateJobLevelOptionsBuilder {
	builder := &CreateJobLevelOptionsBuilder{}
	return builder
}

// 数据来源
//
// 示例值：
func (builder *CreateJobLevelOptionsBuilder) DataSource(dataSource int) *CreateJobLevelOptionsBuilder {
	builder.dataSource = dataSource
	builder.dataSourceFlag = true
	return builder
}

func (builder *CreateJobLevelOptionsBuilder) Build() *CreateJobLevelOptions {
	req := &CreateJobLevelOptions{}
	if builder.dataSourceFlag {
		req.DataSource = &builder.dataSource

	}
	return req
}

type CreateJobTitle struct {
	JobTitleName *I18nText `json:"job_title_name,omitempty"` // i18n文本

	IsEnabled *bool `json:"is_enabled,omitempty"` // 是否启用

	Title *I18nText `json:"title,omitempty"` // i18n文本

	JobFamilyId *string `json:"job_family_id,omitempty"` // Deprecated 不再使用，换用JobFamilyIDs

	JobLevelId *string `json:"job_level_id,omitempty"` // Deprecated 不再使用，换用JobLevelIDs

	Description *I18nText `json:"description,omitempty"` // i18n文本

	JobFamilyIds []string `json:"job_family_ids,omitempty"` // 序列

	JobLevelIds []string `json:"job_level_ids,omitempty"` // 职级

	ExternalId *string `json:"external_id,omitempty"` // 外部ID 未指定则自动生成
}

type CreateJobTitleBuilder struct {
	jobTitleName     *I18nText // i18n文本
	jobTitleNameFlag bool

	isEnabled     bool // 是否启用
	isEnabledFlag bool

	title     *I18nText // i18n文本
	titleFlag bool

	jobFamilyId     string // Deprecated 不再使用，换用JobFamilyIDs
	jobFamilyIdFlag bool

	jobLevelId     string // Deprecated 不再使用，换用JobLevelIDs
	jobLevelIdFlag bool

	description     *I18nText // i18n文本
	descriptionFlag bool

	jobFamilyIds     []string // 序列
	jobFamilyIdsFlag bool

	jobLevelIds     []string // 职级
	jobLevelIdsFlag bool

	externalId     string // 外部ID 未指定则自动生成
	externalIdFlag bool
}

func NewCreateJobTitleBuilder() *CreateJobTitleBuilder {
	builder := &CreateJobTitleBuilder{}
	return builder
}

// i18n文本
//
// 示例值：
func (builder *CreateJobTitleBuilder) JobTitleName(jobTitleName *I18nText) *CreateJobTitleBuilder {
	builder.jobTitleName = jobTitleName
	builder.jobTitleNameFlag = true
	return builder
}

// 是否启用
//
// 示例值：
func (builder *CreateJobTitleBuilder) IsEnabled(isEnabled bool) *CreateJobTitleBuilder {
	builder.isEnabled = isEnabled
	builder.isEnabledFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *CreateJobTitleBuilder) Title(title *I18nText) *CreateJobTitleBuilder {
	builder.title = title
	builder.titleFlag = true
	return builder
}

// Deprecated 不再使用，换用JobFamilyIDs
//
// 示例值：6872549699048439828
func (builder *CreateJobTitleBuilder) JobFamilyId(jobFamilyId string) *CreateJobTitleBuilder {
	builder.jobFamilyId = jobFamilyId
	builder.jobFamilyIdFlag = true
	return builder
}

// Deprecated 不再使用，换用JobLevelIDs
//
// 示例值：6872549699048439828
func (builder *CreateJobTitleBuilder) JobLevelId(jobLevelId string) *CreateJobTitleBuilder {
	builder.jobLevelId = jobLevelId
	builder.jobLevelIdFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *CreateJobTitleBuilder) Description(description *I18nText) *CreateJobTitleBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 序列
//
// 示例值：
func (builder *CreateJobTitleBuilder) JobFamilyIds(jobFamilyIds []string) *CreateJobTitleBuilder {
	builder.jobFamilyIds = jobFamilyIds
	builder.jobFamilyIdsFlag = true
	return builder
}

// 职级
//
// 示例值：
func (builder *CreateJobTitleBuilder) JobLevelIds(jobLevelIds []string) *CreateJobTitleBuilder {
	builder.jobLevelIds = jobLevelIds
	builder.jobLevelIdsFlag = true
	return builder
}

// 外部ID 未指定则自动生成
//
// 示例值：custom_id
func (builder *CreateJobTitleBuilder) ExternalId(externalId string) *CreateJobTitleBuilder {
	builder.externalId = externalId
	builder.externalIdFlag = true
	return builder
}

func (builder *CreateJobTitleBuilder) Build() *CreateJobTitle {
	req := &CreateJobTitle{}
	if builder.jobTitleNameFlag {
		req.JobTitleName = builder.jobTitleName
	}
	if builder.isEnabledFlag {
		req.IsEnabled = &builder.isEnabled

	}
	if builder.titleFlag {
		req.Title = builder.title
	}
	if builder.jobFamilyIdFlag {
		req.JobFamilyId = &builder.jobFamilyId

	}
	if builder.jobLevelIdFlag {
		req.JobLevelId = &builder.jobLevelId

	}
	if builder.descriptionFlag {
		req.Description = builder.description
	}
	if builder.jobFamilyIdsFlag {
		req.JobFamilyIds = builder.jobFamilyIds
	}
	if builder.jobLevelIdsFlag {
		req.JobLevelIds = builder.jobLevelIds
	}
	if builder.externalIdFlag {
		req.ExternalId = &builder.externalId

	}
	return req
}

type CreateJobTitleOptions struct {
	DataSource *int `json:"data_source,omitempty"` // 数据来源
}

type CreateJobTitleOptionsBuilder struct {
	dataSource     int // 数据来源
	dataSourceFlag bool
}

func NewCreateJobTitleOptionsBuilder() *CreateJobTitleOptionsBuilder {
	builder := &CreateJobTitleOptionsBuilder{}
	return builder
}

// 数据来源
//
// 示例值：
func (builder *CreateJobTitleOptionsBuilder) DataSource(dataSource int) *CreateJobTitleOptionsBuilder {
	builder.dataSource = dataSource
	builder.dataSourceFlag = true
	return builder
}

func (builder *CreateJobTitleOptionsBuilder) Build() *CreateJobTitleOptions {
	req := &CreateJobTitleOptions{}
	if builder.dataSourceFlag {
		req.DataSource = &builder.dataSource

	}
	return req
}

type CreateOrgdimension struct {
	Name *I18nText `json:"name,omitempty"` // i18n文本

	IsEnable *bool `json:"is_enable,omitempty"` // 是否启用

	Order *string `json:"order,omitempty"` // 组织维度排序权重

	Description *I18nText `json:"description,omitempty"` // i18n文本
}

type CreateOrgdimensionBuilder struct {
	name     *I18nText // i18n文本
	nameFlag bool

	isEnable     bool // 是否启用
	isEnableFlag bool

	order     string // 组织维度排序权重
	orderFlag bool

	description     *I18nText // i18n文本
	descriptionFlag bool
}

func NewCreateOrgdimensionBuilder() *CreateOrgdimensionBuilder {
	builder := &CreateOrgdimensionBuilder{}
	return builder
}

// i18n文本
//
// 示例值：
func (builder *CreateOrgdimensionBuilder) Name(name *I18nText) *CreateOrgdimensionBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 是否启用
//
// 示例值：
func (builder *CreateOrgdimensionBuilder) IsEnable(isEnable bool) *CreateOrgdimensionBuilder {
	builder.isEnable = isEnable
	builder.isEnableFlag = true
	return builder
}

// 组织维度排序权重
//
// 示例值：100
func (builder *CreateOrgdimensionBuilder) Order(order string) *CreateOrgdimensionBuilder {
	builder.order = order
	builder.orderFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *CreateOrgdimensionBuilder) Description(description *I18nText) *CreateOrgdimensionBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

func (builder *CreateOrgdimensionBuilder) Build() *CreateOrgdimension {
	req := &CreateOrgdimension{}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.isEnableFlag {
		req.IsEnable = &builder.isEnable

	}
	if builder.orderFlag {
		req.Order = &builder.order

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

type CreatePlace struct {
	PlaceName *I18nText `json:"place_name,omitempty"` // i18n文本

	IsEnabled *bool `json:"is_enabled,omitempty"` // 是否启用

	Description *I18nText `json:"description,omitempty"` // i18n文本

	Usages []string `json:"usages,omitempty"` // 地点多用途

	ParentId *string `json:"parent_id,omitempty"` // 上级ID

	ExternalId *string `json:"external_id,omitempty"` // 外部ID
}

type CreatePlaceBuilder struct {
	placeName     *I18nText // i18n文本
	placeNameFlag bool

	isEnabled     bool // 是否启用
	isEnabledFlag bool

	description     *I18nText // i18n文本
	descriptionFlag bool

	usages     []string // 地点多用途
	usagesFlag bool

	parentId     string // 上级ID
	parentIdFlag bool

	externalId     string // 外部ID
	externalIdFlag bool
}

func NewCreatePlaceBuilder() *CreatePlaceBuilder {
	builder := &CreatePlaceBuilder{}
	return builder
}

// i18n文本
//
// 示例值：
func (builder *CreatePlaceBuilder) PlaceName(placeName *I18nText) *CreatePlaceBuilder {
	builder.placeName = placeName
	builder.placeNameFlag = true
	return builder
}

// 是否启用
//
// 示例值：
func (builder *CreatePlaceBuilder) IsEnabled(isEnabled bool) *CreatePlaceBuilder {
	builder.isEnabled = isEnabled
	builder.isEnabledFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *CreatePlaceBuilder) Description(description *I18nText) *CreatePlaceBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 地点多用途
//
// 示例值：
func (builder *CreatePlaceBuilder) Usages(usages []string) *CreatePlaceBuilder {
	builder.usages = usages
	builder.usagesFlag = true
	return builder
}

// 上级ID
//
// 示例值：6872549699048439828
func (builder *CreatePlaceBuilder) ParentId(parentId string) *CreatePlaceBuilder {
	builder.parentId = parentId
	builder.parentIdFlag = true
	return builder
}

// 外部ID
//
// 示例值：custom_id
func (builder *CreatePlaceBuilder) ExternalId(externalId string) *CreatePlaceBuilder {
	builder.externalId = externalId
	builder.externalIdFlag = true
	return builder
}

func (builder *CreatePlaceBuilder) Build() *CreatePlace {
	req := &CreatePlace{}
	if builder.placeNameFlag {
		req.PlaceName = builder.placeName
	}
	if builder.isEnabledFlag {
		req.IsEnabled = &builder.isEnabled

	}
	if builder.descriptionFlag {
		req.Description = builder.description
	}
	if builder.usagesFlag {
		req.Usages = builder.usages
	}
	if builder.parentIdFlag {
		req.ParentId = &builder.parentId

	}
	if builder.externalIdFlag {
		req.ExternalId = &builder.externalId

	}
	return req
}

type CreatePlaceOptions struct {
	DataSource *int `json:"data_source,omitempty"` // 数据来源
}

type CreatePlaceOptionsBuilder struct {
	dataSource     int // 数据来源
	dataSourceFlag bool
}

func NewCreatePlaceOptionsBuilder() *CreatePlaceOptionsBuilder {
	builder := &CreatePlaceOptionsBuilder{}
	return builder
}

// 数据来源
//
// 示例值：
func (builder *CreatePlaceOptionsBuilder) DataSource(dataSource int) *CreatePlaceOptionsBuilder {
	builder.dataSource = dataSource
	builder.dataSourceFlag = true
	return builder
}

func (builder *CreatePlaceOptionsBuilder) Build() *CreatePlaceOptions {
	req := &CreatePlaceOptions{}
	if builder.dataSourceFlag {
		req.DataSource = &builder.dataSource

	}
	return req
}

type CreateResignedEmployee struct {
	Name *UpsertName `json:"name,omitempty"` // 姓名

	Mobile *string `json:"mobile,omitempty"` // 员工的联系手机号

	CustomEmployeeId *string `json:"custom_employee_id,omitempty"` // 用户的user_id

	AvatarKey *string `json:"avatar_key,omitempty"` // 头像的文件key

	Email *string `json:"email,omitempty"` // 员工的联系邮箱

	PersonalEmail *string `json:"personal_email,omitempty"` // 员工在人事系统中的联系邮箱

	Gender *int `json:"gender,omitempty"` // 性别

	ResidentialAddress *string `json:"residential_address,omitempty"` // 现居住地址

	ContactAddresses []*ContactAddress `json:"contact_addresses,omitempty"` // 联系地址

	DepartmentIds []string `json:"department_ids,omitempty"` // 雇员离职前所属的部门ID列表

	LeaderId *string `json:"leader_id,omitempty"` // 员工直属上级的user_id

	DottedLineLeaderIds []string `json:"dotted_line_leader_ids,omitempty"` // 员工虚线上级的user_id

	WorkCountryOrRegion *string `json:"work_country_or_region,omitempty"` // 工作地国家/地区

	WorkPlaceId *string `json:"work_place_id,omitempty"` // 工作地点

	WorkStation *I18nText `json:"work_station,omitempty"` // i18n文本

	JobNumber *string `json:"job_number,omitempty"` // 工号

	JoinDate *string `json:"join_date,omitempty"` // 入职日期

	EmploymentType *int `json:"employment_type,omitempty"` // 员工类型

	Positions []*Position `json:"positions,omitempty"` // 岗位信息

	JobTitleId *string `json:"job_title_id,omitempty"` // 职务ID

	JobLevelId *string `json:"job_level_id,omitempty"` // 职级ID

	JobFamilyId *string `json:"job_family_id,omitempty"` // 序列ID

	FirstWorkDate *string `json:"first_work_date,omitempty"` // 首次参加工作日期

	FirstJoinDate *string `json:"first_join_date,omitempty"` // 首次进入公司日期

	ProbationPeriod *string `json:"probation_period,omitempty"` // 试用期（月）

	RegularizationDate *string `json:"regularization_date,omitempty"` // 转正日期

	ConvertStatus *string `json:"convert_status,omitempty"` // 转正状态

	ContractSubject *string `json:"contract_subject,omitempty"` // 合同主体ID

	ResignDate *string `json:"resign_date,omitempty"` // 离职日期

	ResignReason *string `json:"resign_reason,omitempty"` // 离职原因

	ResignRemark *string `json:"resign_remark,omitempty"` // 离职备注信息

	ResignType *string `json:"resign_type,omitempty"` // 离职类型

	CancelledEntryType *string `json:"cancelled_entry_type,omitempty"` // 取消入职原因

	CancelledEntryRemark *string `json:"cancelled_entry_remark,omitempty"` // 取消入职备注信息

	Birthday *string `json:"birthday,omitempty"` // 出生日期

	Nationality *string `json:"nationality,omitempty"` // 国籍

	NativePlace *string `json:"native_place,omitempty"` // 籍贯

	Ethnicity *string `json:"ethnicity,omitempty"` // 民族/种族

	MaritalStatus *string `json:"marital_status,omitempty"` // 婚姻状态

	PoliticsStatus *string `json:"politics_status,omitempty"` // 政治面貌

	RegisteredResidenceType *string `json:"registered_residence_type,omitempty"` // 户口类型

	Location *string `json:"location,omitempty"` // 户口所在地地址

	SocialSecurityNumber *string `json:"social_security_number,omitempty"` // 社保账号

	ProvidentFundNumber *string `json:"provident_fund_number,omitempty"` // 公积金账号
}

type CreateResignedEmployeeBuilder struct {
	name     *UpsertName // 姓名
	nameFlag bool

	mobile     string // 员工的联系手机号
	mobileFlag bool

	customEmployeeId     string // 用户的user_id
	customEmployeeIdFlag bool

	avatarKey     string // 头像的文件key
	avatarKeyFlag bool

	email     string // 员工的联系邮箱
	emailFlag bool

	personalEmail     string // 员工在人事系统中的联系邮箱
	personalEmailFlag bool

	gender     int // 性别
	genderFlag bool

	residentialAddress     string // 现居住地址
	residentialAddressFlag bool

	contactAddresses     []*ContactAddress // 联系地址
	contactAddressesFlag bool

	departmentIds     []string // 雇员离职前所属的部门ID列表
	departmentIdsFlag bool

	leaderId     string // 员工直属上级的user_id
	leaderIdFlag bool

	dottedLineLeaderIds     []string // 员工虚线上级的user_id
	dottedLineLeaderIdsFlag bool

	workCountryOrRegion     string // 工作地国家/地区
	workCountryOrRegionFlag bool

	workPlaceId     string // 工作地点
	workPlaceIdFlag bool

	workStation     *I18nText // i18n文本
	workStationFlag bool

	jobNumber     string // 工号
	jobNumberFlag bool

	joinDate     string // 入职日期
	joinDateFlag bool

	employmentType     int // 员工类型
	employmentTypeFlag bool

	positions     []*Position // 岗位信息
	positionsFlag bool

	jobTitleId     string // 职务ID
	jobTitleIdFlag bool

	jobLevelId     string // 职级ID
	jobLevelIdFlag bool

	jobFamilyId     string // 序列ID
	jobFamilyIdFlag bool

	firstWorkDate     string // 首次参加工作日期
	firstWorkDateFlag bool

	firstJoinDate     string // 首次进入公司日期
	firstJoinDateFlag bool

	probationPeriod     string // 试用期（月）
	probationPeriodFlag bool

	regularizationDate     string // 转正日期
	regularizationDateFlag bool

	convertStatus     string // 转正状态
	convertStatusFlag bool

	contractSubject     string // 合同主体ID
	contractSubjectFlag bool

	resignDate     string // 离职日期
	resignDateFlag bool

	resignReason     string // 离职原因
	resignReasonFlag bool

	resignRemark     string // 离职备注信息
	resignRemarkFlag bool

	resignType     string // 离职类型
	resignTypeFlag bool

	cancelledEntryType     string // 取消入职原因
	cancelledEntryTypeFlag bool

	cancelledEntryRemark     string // 取消入职备注信息
	cancelledEntryRemarkFlag bool

	birthday     string // 出生日期
	birthdayFlag bool

	nationality     string // 国籍
	nationalityFlag bool

	nativePlace     string // 籍贯
	nativePlaceFlag bool

	ethnicity     string // 民族/种族
	ethnicityFlag bool

	maritalStatus     string // 婚姻状态
	maritalStatusFlag bool

	politicsStatus     string // 政治面貌
	politicsStatusFlag bool

	registeredResidenceType     string // 户口类型
	registeredResidenceTypeFlag bool

	location     string // 户口所在地地址
	locationFlag bool

	socialSecurityNumber     string // 社保账号
	socialSecurityNumberFlag bool

	providentFundNumber     string // 公积金账号
	providentFundNumberFlag bool
}

func NewCreateResignedEmployeeBuilder() *CreateResignedEmployeeBuilder {
	builder := &CreateResignedEmployeeBuilder{}
	return builder
}

// 姓名
//
// 示例值：
func (builder *CreateResignedEmployeeBuilder) Name(name *UpsertName) *CreateResignedEmployeeBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 员工的联系手机号
//
// 示例值：13011111111" 或 "+8613011111111
func (builder *CreateResignedEmployeeBuilder) Mobile(mobile string) *CreateResignedEmployeeBuilder {
	builder.mobile = mobile
	builder.mobileFlag = true
	return builder
}

// 用户的user_id
//
// 示例值：u273y71
func (builder *CreateResignedEmployeeBuilder) CustomEmployeeId(customEmployeeId string) *CreateResignedEmployeeBuilder {
	builder.customEmployeeId = customEmployeeId
	builder.customEmployeeIdFlag = true
	return builder
}

// 头像的文件key
//
// 示例值：iimg_v2_8abc397a-9950-44ea-9302-e1d8fe00858g
func (builder *CreateResignedEmployeeBuilder) AvatarKey(avatarKey string) *CreateResignedEmployeeBuilder {
	builder.avatarKey = avatarKey
	builder.avatarKeyFlag = true
	return builder
}

// 员工的联系邮箱
//
// 示例值：zhangsan@gmail.com
func (builder *CreateResignedEmployeeBuilder) Email(email string) *CreateResignedEmployeeBuilder {
	builder.email = email
	builder.emailFlag = true
	return builder
}

// 员工在人事系统中的联系邮箱
//
// 示例值：zhangsan@gmail.com
func (builder *CreateResignedEmployeeBuilder) PersonalEmail(personalEmail string) *CreateResignedEmployeeBuilder {
	builder.personalEmail = personalEmail
	builder.personalEmailFlag = true
	return builder
}

// 性别
//
// 示例值：
func (builder *CreateResignedEmployeeBuilder) Gender(gender int) *CreateResignedEmployeeBuilder {
	builder.gender = gender
	builder.genderFlag = true
	return builder
}

// 现居住地址
//
// 示例值：北京市海淀区
func (builder *CreateResignedEmployeeBuilder) ResidentialAddress(residentialAddress string) *CreateResignedEmployeeBuilder {
	builder.residentialAddress = residentialAddress
	builder.residentialAddressFlag = true
	return builder
}

// 联系地址
//
// 示例值：
func (builder *CreateResignedEmployeeBuilder) ContactAddresses(contactAddresses []*ContactAddress) *CreateResignedEmployeeBuilder {
	builder.contactAddresses = contactAddresses
	builder.contactAddressesFlag = true
	return builder
}

// 雇员离职前所属的部门ID列表
//
// 示例值：
func (builder *CreateResignedEmployeeBuilder) DepartmentIds(departmentIds []string) *CreateResignedEmployeeBuilder {
	builder.departmentIds = departmentIds
	builder.departmentIdsFlag = true
	return builder
}

// 员工直属上级的user_id
//
// 示例值：eeasdqwwe
func (builder *CreateResignedEmployeeBuilder) LeaderId(leaderId string) *CreateResignedEmployeeBuilder {
	builder.leaderId = leaderId
	builder.leaderIdFlag = true
	return builder
}

// 员工虚线上级的user_id
//
// 示例值：
func (builder *CreateResignedEmployeeBuilder) DottedLineLeaderIds(dottedLineLeaderIds []string) *CreateResignedEmployeeBuilder {
	builder.dottedLineLeaderIds = dottedLineLeaderIds
	builder.dottedLineLeaderIdsFlag = true
	return builder
}

// 工作地国家/地区
//
// 示例值：MDM34234234
func (builder *CreateResignedEmployeeBuilder) WorkCountryOrRegion(workCountryOrRegion string) *CreateResignedEmployeeBuilder {
	builder.workCountryOrRegion = workCountryOrRegion
	builder.workCountryOrRegionFlag = true
	return builder
}

// 工作地点
//
// 示例值：eqwedas
func (builder *CreateResignedEmployeeBuilder) WorkPlaceId(workPlaceId string) *CreateResignedEmployeeBuilder {
	builder.workPlaceId = workPlaceId
	builder.workPlaceIdFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *CreateResignedEmployeeBuilder) WorkStation(workStation *I18nText) *CreateResignedEmployeeBuilder {
	builder.workStation = workStation
	builder.workStationFlag = true
	return builder
}

// 工号
//
// 示例值：123123
func (builder *CreateResignedEmployeeBuilder) JobNumber(jobNumber string) *CreateResignedEmployeeBuilder {
	builder.jobNumber = jobNumber
	builder.jobNumberFlag = true
	return builder
}

// 入职日期
//
// 示例值：2022-10-10
func (builder *CreateResignedEmployeeBuilder) JoinDate(joinDate string) *CreateResignedEmployeeBuilder {
	builder.joinDate = joinDate
	builder.joinDateFlag = true
	return builder
}

// 员工类型
//
// 示例值：
func (builder *CreateResignedEmployeeBuilder) EmploymentType(employmentType int) *CreateResignedEmployeeBuilder {
	builder.employmentType = employmentType
	builder.employmentTypeFlag = true
	return builder
}

// 岗位信息
//
// 示例值：
func (builder *CreateResignedEmployeeBuilder) Positions(positions []*Position) *CreateResignedEmployeeBuilder {
	builder.positions = positions
	builder.positionsFlag = true
	return builder
}

// 职务ID
//
// 示例值：wqedsaqw
func (builder *CreateResignedEmployeeBuilder) JobTitleId(jobTitleId string) *CreateResignedEmployeeBuilder {
	builder.jobTitleId = jobTitleId
	builder.jobTitleIdFlag = true
	return builder
}

// 职级ID
//
// 示例值：qwedsad
func (builder *CreateResignedEmployeeBuilder) JobLevelId(jobLevelId string) *CreateResignedEmployeeBuilder {
	builder.jobLevelId = jobLevelId
	builder.jobLevelIdFlag = true
	return builder
}

// 序列ID
//
// 示例值：qweads
func (builder *CreateResignedEmployeeBuilder) JobFamilyId(jobFamilyId string) *CreateResignedEmployeeBuilder {
	builder.jobFamilyId = jobFamilyId
	builder.jobFamilyIdFlag = true
	return builder
}

// 首次参加工作日期
//
// 示例值：2022-01-01
func (builder *CreateResignedEmployeeBuilder) FirstWorkDate(firstWorkDate string) *CreateResignedEmployeeBuilder {
	builder.firstWorkDate = firstWorkDate
	builder.firstWorkDateFlag = true
	return builder
}

// 首次进入公司日期
//
// 示例值：2022-01-01
func (builder *CreateResignedEmployeeBuilder) FirstJoinDate(firstJoinDate string) *CreateResignedEmployeeBuilder {
	builder.firstJoinDate = firstJoinDate
	builder.firstJoinDateFlag = true
	return builder
}

// 试用期（月）
//
// 示例值：10
func (builder *CreateResignedEmployeeBuilder) ProbationPeriod(probationPeriod string) *CreateResignedEmployeeBuilder {
	builder.probationPeriod = probationPeriod
	builder.probationPeriodFlag = true
	return builder
}

// 转正日期
//
// 示例值：2022-01-01
func (builder *CreateResignedEmployeeBuilder) RegularizationDate(regularizationDate string) *CreateResignedEmployeeBuilder {
	builder.regularizationDate = regularizationDate
	builder.regularizationDateFlag = true
	return builder
}

// 转正状态
//
// 示例值：
func (builder *CreateResignedEmployeeBuilder) ConvertStatus(convertStatus string) *CreateResignedEmployeeBuilder {
	builder.convertStatus = convertStatus
	builder.convertStatusFlag = true
	return builder
}

// 合同主体ID
//
// 示例值：2dsweq
func (builder *CreateResignedEmployeeBuilder) ContractSubject(contractSubject string) *CreateResignedEmployeeBuilder {
	builder.contractSubject = contractSubject
	builder.contractSubjectFlag = true
	return builder
}

// 离职日期
//
// 示例值：2022-01-01
func (builder *CreateResignedEmployeeBuilder) ResignDate(resignDate string) *CreateResignedEmployeeBuilder {
	builder.resignDate = resignDate
	builder.resignDateFlag = true
	return builder
}

// 离职原因
//
// 示例值：
func (builder *CreateResignedEmployeeBuilder) ResignReason(resignReason string) *CreateResignedEmployeeBuilder {
	builder.resignReason = resignReason
	builder.resignReasonFlag = true
	return builder
}

// 离职备注信息
//
// 示例值：个人原因
func (builder *CreateResignedEmployeeBuilder) ResignRemark(resignRemark string) *CreateResignedEmployeeBuilder {
	builder.resignRemark = resignRemark
	builder.resignRemarkFlag = true
	return builder
}

// 离职类型
//
// 示例值：
func (builder *CreateResignedEmployeeBuilder) ResignType(resignType string) *CreateResignedEmployeeBuilder {
	builder.resignType = resignType
	builder.resignTypeFlag = true
	return builder
}

// 取消入职原因
//
// 示例值：
func (builder *CreateResignedEmployeeBuilder) CancelledEntryType(cancelledEntryType string) *CreateResignedEmployeeBuilder {
	builder.cancelledEntryType = cancelledEntryType
	builder.cancelledEntryTypeFlag = true
	return builder
}

// 取消入职备注信息
//
// 示例值：个人原因
func (builder *CreateResignedEmployeeBuilder) CancelledEntryRemark(cancelledEntryRemark string) *CreateResignedEmployeeBuilder {
	builder.cancelledEntryRemark = cancelledEntryRemark
	builder.cancelledEntryRemarkFlag = true
	return builder
}

// 出生日期
//
// 示例值：2022-01-01
func (builder *CreateResignedEmployeeBuilder) Birthday(birthday string) *CreateResignedEmployeeBuilder {
	builder.birthday = birthday
	builder.birthdayFlag = true
	return builder
}

// 国籍
//
// 示例值：cn
func (builder *CreateResignedEmployeeBuilder) Nationality(nationality string) *CreateResignedEmployeeBuilder {
	builder.nationality = nationality
	builder.nationalityFlag = true
	return builder
}

// 籍贯
//
// 示例值：1
func (builder *CreateResignedEmployeeBuilder) NativePlace(nativePlace string) *CreateResignedEmployeeBuilder {
	builder.nativePlace = nativePlace
	builder.nativePlaceFlag = true
	return builder
}

// 民族/种族
//
// 示例值：
func (builder *CreateResignedEmployeeBuilder) Ethnicity(ethnicity string) *CreateResignedEmployeeBuilder {
	builder.ethnicity = ethnicity
	builder.ethnicityFlag = true
	return builder
}

// 婚姻状态
//
// 示例值：
func (builder *CreateResignedEmployeeBuilder) MaritalStatus(maritalStatus string) *CreateResignedEmployeeBuilder {
	builder.maritalStatus = maritalStatus
	builder.maritalStatusFlag = true
	return builder
}

// 政治面貌
//
// 示例值：
func (builder *CreateResignedEmployeeBuilder) PoliticsStatus(politicsStatus string) *CreateResignedEmployeeBuilder {
	builder.politicsStatus = politicsStatus
	builder.politicsStatusFlag = true
	return builder
}

// 户口类型
//
// 示例值：
func (builder *CreateResignedEmployeeBuilder) RegisteredResidenceType(registeredResidenceType string) *CreateResignedEmployeeBuilder {
	builder.registeredResidenceType = registeredResidenceType
	builder.registeredResidenceTypeFlag = true
	return builder
}

// 户口所在地地址
//
// 示例值：cn
func (builder *CreateResignedEmployeeBuilder) Location(location string) *CreateResignedEmployeeBuilder {
	builder.location = location
	builder.locationFlag = true
	return builder
}

// 社保账号
//
// 示例值：1
func (builder *CreateResignedEmployeeBuilder) SocialSecurityNumber(socialSecurityNumber string) *CreateResignedEmployeeBuilder {
	builder.socialSecurityNumber = socialSecurityNumber
	builder.socialSecurityNumberFlag = true
	return builder
}

// 公积金账号
//
// 示例值：1
func (builder *CreateResignedEmployeeBuilder) ProvidentFundNumber(providentFundNumber string) *CreateResignedEmployeeBuilder {
	builder.providentFundNumber = providentFundNumber
	builder.providentFundNumberFlag = true
	return builder
}

func (builder *CreateResignedEmployeeBuilder) Build() *CreateResignedEmployee {
	req := &CreateResignedEmployee{}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.mobileFlag {
		req.Mobile = &builder.mobile

	}
	if builder.customEmployeeIdFlag {
		req.CustomEmployeeId = &builder.customEmployeeId

	}
	if builder.avatarKeyFlag {
		req.AvatarKey = &builder.avatarKey

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

	}
	if builder.personalEmailFlag {
		req.PersonalEmail = &builder.personalEmail

	}
	if builder.genderFlag {
		req.Gender = &builder.gender

	}
	if builder.residentialAddressFlag {
		req.ResidentialAddress = &builder.residentialAddress

	}
	if builder.contactAddressesFlag {
		req.ContactAddresses = builder.contactAddresses
	}
	if builder.departmentIdsFlag {
		req.DepartmentIds = builder.departmentIds
	}
	if builder.leaderIdFlag {
		req.LeaderId = &builder.leaderId

	}
	if builder.dottedLineLeaderIdsFlag {
		req.DottedLineLeaderIds = builder.dottedLineLeaderIds
	}
	if builder.workCountryOrRegionFlag {
		req.WorkCountryOrRegion = &builder.workCountryOrRegion

	}
	if builder.workPlaceIdFlag {
		req.WorkPlaceId = &builder.workPlaceId

	}
	if builder.workStationFlag {
		req.WorkStation = builder.workStation
	}
	if builder.jobNumberFlag {
		req.JobNumber = &builder.jobNumber

	}
	if builder.joinDateFlag {
		req.JoinDate = &builder.joinDate

	}
	if builder.employmentTypeFlag {
		req.EmploymentType = &builder.employmentType

	}
	if builder.positionsFlag {
		req.Positions = builder.positions
	}
	if builder.jobTitleIdFlag {
		req.JobTitleId = &builder.jobTitleId

	}
	if builder.jobLevelIdFlag {
		req.JobLevelId = &builder.jobLevelId

	}
	if builder.jobFamilyIdFlag {
		req.JobFamilyId = &builder.jobFamilyId

	}
	if builder.firstWorkDateFlag {
		req.FirstWorkDate = &builder.firstWorkDate

	}
	if builder.firstJoinDateFlag {
		req.FirstJoinDate = &builder.firstJoinDate

	}
	if builder.probationPeriodFlag {
		req.ProbationPeriod = &builder.probationPeriod

	}
	if builder.regularizationDateFlag {
		req.RegularizationDate = &builder.regularizationDate

	}
	if builder.convertStatusFlag {
		req.ConvertStatus = &builder.convertStatus

	}
	if builder.contractSubjectFlag {
		req.ContractSubject = &builder.contractSubject

	}
	if builder.resignDateFlag {
		req.ResignDate = &builder.resignDate

	}
	if builder.resignReasonFlag {
		req.ResignReason = &builder.resignReason

	}
	if builder.resignRemarkFlag {
		req.ResignRemark = &builder.resignRemark

	}
	if builder.resignTypeFlag {
		req.ResignType = &builder.resignType

	}
	if builder.cancelledEntryTypeFlag {
		req.CancelledEntryType = &builder.cancelledEntryType

	}
	if builder.cancelledEntryRemarkFlag {
		req.CancelledEntryRemark = &builder.cancelledEntryRemark

	}
	if builder.birthdayFlag {
		req.Birthday = &builder.birthday

	}
	if builder.nationalityFlag {
		req.Nationality = &builder.nationality

	}
	if builder.nativePlaceFlag {
		req.NativePlace = &builder.nativePlace

	}
	if builder.ethnicityFlag {
		req.Ethnicity = &builder.ethnicity

	}
	if builder.maritalStatusFlag {
		req.MaritalStatus = &builder.maritalStatus

	}
	if builder.politicsStatusFlag {
		req.PoliticsStatus = &builder.politicsStatus

	}
	if builder.registeredResidenceTypeFlag {
		req.RegisteredResidenceType = &builder.registeredResidenceType

	}
	if builder.locationFlag {
		req.Location = &builder.location

	}
	if builder.socialSecurityNumberFlag {
		req.SocialSecurityNumber = &builder.socialSecurityNumber

	}
	if builder.providentFundNumberFlag {
		req.ProvidentFundNumber = &builder.providentFundNumber

	}
	return req
}

type CreateResignedEmployeeOptions struct {
	GeoName *string `json:"geo_name,omitempty"` // 离职用户指定geo/unit

	EmployeeTraceInfo *EmployeeTraceInfo `json:"employee_trace_info,omitempty"` // 用户追踪信息

	DataSource *int `json:"data_source,omitempty"` // 数据来源
}

type CreateResignedEmployeeOptionsBuilder struct {
	geoName     string // 离职用户指定geo/unit
	geoNameFlag bool

	employeeTraceInfo     *EmployeeTraceInfo // 用户追踪信息
	employeeTraceInfoFlag bool

	dataSource     int // 数据来源
	dataSourceFlag bool
}

func NewCreateResignedEmployeeOptionsBuilder() *CreateResignedEmployeeOptionsBuilder {
	builder := &CreateResignedEmployeeOptionsBuilder{}
	return builder
}

// 离职用户指定geo/unit
//
// 示例值：cn
func (builder *CreateResignedEmployeeOptionsBuilder) GeoName(geoName string) *CreateResignedEmployeeOptionsBuilder {
	builder.geoName = geoName
	builder.geoNameFlag = true
	return builder
}

// 用户追踪信息
//
// 示例值：
func (builder *CreateResignedEmployeeOptionsBuilder) EmployeeTraceInfo(employeeTraceInfo *EmployeeTraceInfo) *CreateResignedEmployeeOptionsBuilder {
	builder.employeeTraceInfo = employeeTraceInfo
	builder.employeeTraceInfoFlag = true
	return builder
}

// 数据来源
//
// 示例值：
func (builder *CreateResignedEmployeeOptionsBuilder) DataSource(dataSource int) *CreateResignedEmployeeOptionsBuilder {
	builder.dataSource = dataSource
	builder.dataSourceFlag = true
	return builder
}

func (builder *CreateResignedEmployeeOptionsBuilder) Build() *CreateResignedEmployeeOptions {
	req := &CreateResignedEmployeeOptions{}
	if builder.geoNameFlag {
		req.GeoName = &builder.geoName

	}
	if builder.employeeTraceInfoFlag {
		req.EmployeeTraceInfo = builder.employeeTraceInfo
	}
	if builder.dataSourceFlag {
		req.DataSource = &builder.dataSource

	}
	return req
}

type CreateSandboxTenant struct {
	CreatorHomeUserId *string `json:"creator_home_user_id,omitempty"` // 创建者在父租户中的UserID
}

type CreateSandboxTenantBuilder struct {
	creatorHomeUserId     string // 创建者在父租户中的UserID
	creatorHomeUserIdFlag bool
}

func NewCreateSandboxTenantBuilder() *CreateSandboxTenantBuilder {
	builder := &CreateSandboxTenantBuilder{}
	return builder
}

// 创建者在父租户中的UserID
//
// 示例值：7036181931599499700
func (builder *CreateSandboxTenantBuilder) CreatorHomeUserId(creatorHomeUserId string) *CreateSandboxTenantBuilder {
	builder.creatorHomeUserId = creatorHomeUserId
	builder.creatorHomeUserIdFlag = true
	return builder
}

func (builder *CreateSandboxTenantBuilder) Build() *CreateSandboxTenant {
	req := &CreateSandboxTenant{}
	if builder.creatorHomeUserIdFlag {
		req.CreatorHomeUserId = &builder.creatorHomeUserId

	}
	return req
}

type CreateTenant struct {
	Name *I18nText `json:"name,omitempty"` // i18n文本

	CreatorInfo *UserInfo `json:"creator_info,omitempty"` // 联系人信息

	ContactUserInfo *UserInfo `json:"contact_user_info,omitempty"` // 联系人信息

	SubDomain *string `json:"sub_domain,omitempty"` // 租户子域名

	Address *string `json:"address,omitempty"` // 联系地址

	PostCode *string `json:"post_code,omitempty"` // 邮编

	Telephone *string `json:"telephone,omitempty"` // 座机

	AvatarKey *string `json:"avatar_key,omitempty"` // 企业头像Key

	CountryCode *string `json:"country_code,omitempty"` // 国家代码

	Type *string `json:"type,omitempty"` // 租户类型

	Purpose *string `json:"purpose,omitempty"` // 租户用途

	Tag *string `json:"tag,omitempty"` // 个人租户/企业租户

	ParentId *string `json:"parent_id,omitempty"` // 父租户ID

	Industry *string `json:"industry,omitempty"` // 行业类型

	Scale *string `json:"scale,omitempty"` // 企业规模

	Description *I18nText `json:"description,omitempty"` // i18n文本

	TraceInfo *TenantTraceInfo `json:"trace_info,omitempty"` // 租户创建追溯信息
}

type CreateTenantBuilder struct {
	name     *I18nText // i18n文本
	nameFlag bool

	creatorInfo     *UserInfo // 联系人信息
	creatorInfoFlag bool

	contactUserInfo     *UserInfo // 联系人信息
	contactUserInfoFlag bool

	subDomain     string // 租户子域名
	subDomainFlag bool

	address     string // 联系地址
	addressFlag bool

	postCode     string // 邮编
	postCodeFlag bool

	telephone     string // 座机
	telephoneFlag bool

	avatarKey     string // 企业头像Key
	avatarKeyFlag bool

	countryCode     string // 国家代码
	countryCodeFlag bool

	type_    string // 租户类型
	typeFlag bool

	purpose     string // 租户用途
	purposeFlag bool

	tag     string // 个人租户/企业租户
	tagFlag bool

	parentId     string // 父租户ID
	parentIdFlag bool

	industry     string // 行业类型
	industryFlag bool

	scale     string // 企业规模
	scaleFlag bool

	description     *I18nText // i18n文本
	descriptionFlag bool

	traceInfo     *TenantTraceInfo // 租户创建追溯信息
	traceInfoFlag bool
}

func NewCreateTenantBuilder() *CreateTenantBuilder {
	builder := &CreateTenantBuilder{}
	return builder
}

// i18n文本
//
// 示例值：
func (builder *CreateTenantBuilder) Name(name *I18nText) *CreateTenantBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 联系人信息
//
// 示例值：
func (builder *CreateTenantBuilder) CreatorInfo(creatorInfo *UserInfo) *CreateTenantBuilder {
	builder.creatorInfo = creatorInfo
	builder.creatorInfoFlag = true
	return builder
}

// 联系人信息
//
// 示例值：
func (builder *CreateTenantBuilder) ContactUserInfo(contactUserInfo *UserInfo) *CreateTenantBuilder {
	builder.contactUserInfo = contactUserInfo
	builder.contactUserInfoFlag = true
	return builder
}

// 租户子域名
//
// 示例值：abcdefgh
func (builder *CreateTenantBuilder) SubDomain(subDomain string) *CreateTenantBuilder {
	builder.subDomain = subDomain
	builder.subDomainFlag = true
	return builder
}

// 联系地址
//
// 示例值：address
func (builder *CreateTenantBuilder) Address(address string) *CreateTenantBuilder {
	builder.address = address
	builder.addressFlag = true
	return builder
}

// 邮编
//
// 示例值：123345
func (builder *CreateTenantBuilder) PostCode(postCode string) *CreateTenantBuilder {
	builder.postCode = postCode
	builder.postCodeFlag = true
	return builder
}

// 座机
//
// 示例值：12345678
func (builder *CreateTenantBuilder) Telephone(telephone string) *CreateTenantBuilder {
	builder.telephone = telephone
	builder.telephoneFlag = true
	return builder
}

// 企业头像Key
//
// 示例值：asdfadsfadsfadsf
func (builder *CreateTenantBuilder) AvatarKey(avatarKey string) *CreateTenantBuilder {
	builder.avatarKey = avatarKey
	builder.avatarKeyFlag = true
	return builder
}

// 国家代码
//
// 示例值：CN
func (builder *CreateTenantBuilder) CountryCode(countryCode string) *CreateTenantBuilder {
	builder.countryCode = countryCode
	builder.countryCodeFlag = true
	return builder
}

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

// 租户用途
//
// 示例值：
func (builder *CreateTenantBuilder) Purpose(purpose string) *CreateTenantBuilder {
	builder.purpose = purpose
	builder.purposeFlag = true
	return builder
}

// 个人租户/企业租户
//
// 示例值：
func (builder *CreateTenantBuilder) Tag(tag string) *CreateTenantBuilder {
	builder.tag = tag
	builder.tagFlag = true
	return builder
}

// 父租户ID
//
// 示例值：7036181931599499700
func (builder *CreateTenantBuilder) ParentId(parentId string) *CreateTenantBuilder {
	builder.parentId = parentId
	builder.parentIdFlag = true
	return builder
}

// 行业类型
//
// 示例值：MDM1234
func (builder *CreateTenantBuilder) Industry(industry string) *CreateTenantBuilder {
	builder.industry = industry
	builder.industryFlag = true
	return builder
}

// 企业规模
//
// 示例值：MDM1234
func (builder *CreateTenantBuilder) Scale(scale string) *CreateTenantBuilder {
	builder.scale = scale
	builder.scaleFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *CreateTenantBuilder) Description(description *I18nText) *CreateTenantBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 租户创建追溯信息
//
// 示例值：
func (builder *CreateTenantBuilder) TraceInfo(traceInfo *TenantTraceInfo) *CreateTenantBuilder {
	builder.traceInfo = traceInfo
	builder.traceInfoFlag = true
	return builder
}

func (builder *CreateTenantBuilder) Build() *CreateTenant {
	req := &CreateTenant{}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.creatorInfoFlag {
		req.CreatorInfo = builder.creatorInfo
	}
	if builder.contactUserInfoFlag {
		req.ContactUserInfo = builder.contactUserInfo
	}
	if builder.subDomainFlag {
		req.SubDomain = &builder.subDomain

	}
	if builder.addressFlag {
		req.Address = &builder.address

	}
	if builder.postCodeFlag {
		req.PostCode = &builder.postCode

	}
	if builder.telephoneFlag {
		req.Telephone = &builder.telephone

	}
	if builder.avatarKeyFlag {
		req.AvatarKey = &builder.avatarKey

	}
	if builder.countryCodeFlag {
		req.CountryCode = &builder.countryCode

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

	}
	if builder.purposeFlag {
		req.Purpose = &builder.purpose

	}
	if builder.tagFlag {
		req.Tag = &builder.tag

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

	}
	if builder.industryFlag {
		req.Industry = &builder.industry

	}
	if builder.scaleFlag {
		req.Scale = &builder.scale

	}
	if builder.descriptionFlag {
		req.Description = builder.description
	}
	if builder.traceInfoFlag {
		req.TraceInfo = builder.traceInfo
	}
	return req
}

type CreateTenantOption struct {
	CreateSandboxTenant *CreateSandboxTenant `json:"create_sandbox_tenant,omitempty"` // CreateSandboxTenant

	GeoName *string `json:"geo_name,omitempty"` // 租户所在Geo

	DataSource *int `json:"data_source,omitempty"` // 数据来源
}

type CreateTenantOptionBuilder struct {
	createSandboxTenant     *CreateSandboxTenant // CreateSandboxTenant
	createSandboxTenantFlag bool

	geoName     string // 租户所在Geo
	geoNameFlag bool

	dataSource     int // 数据来源
	dataSourceFlag bool
}

func NewCreateTenantOptionBuilder() *CreateTenantOptionBuilder {
	builder := &CreateTenantOptionBuilder{}
	return builder
}

// CreateSandboxTenant
//
// 示例值：
func (builder *CreateTenantOptionBuilder) CreateSandboxTenant(createSandboxTenant *CreateSandboxTenant) *CreateTenantOptionBuilder {
	builder.createSandboxTenant = createSandboxTenant
	builder.createSandboxTenantFlag = true
	return builder
}

// 租户所在Geo
//
// 示例值：cn
func (builder *CreateTenantOptionBuilder) GeoName(geoName string) *CreateTenantOptionBuilder {
	builder.geoName = geoName
	builder.geoNameFlag = true
	return builder
}

// 数据来源
//
// 示例值：
func (builder *CreateTenantOptionBuilder) DataSource(dataSource int) *CreateTenantOptionBuilder {
	builder.dataSource = dataSource
	builder.dataSourceFlag = true
	return builder
}

func (builder *CreateTenantOptionBuilder) Build() *CreateTenantOption {
	req := &CreateTenantOption{}
	if builder.createSandboxTenantFlag {
		req.CreateSandboxTenant = builder.createSandboxTenant
	}
	if builder.geoNameFlag {
		req.GeoName = &builder.geoName

	}
	if builder.dataSourceFlag {
		req.DataSource = &builder.dataSource

	}
	return req
}

type CreateTenantResult struct {
	Id *string `json:"id,omitempty"` // 租户ID

	ExternalId *string `json:"external_id,omitempty"` // 企业编码

	CreatorId *string `json:"creator_id,omitempty"` // 创建人ID
}

type CreateTenantResultBuilder struct {
	id     string // 租户ID
	idFlag bool

	externalId     string // 企业编码
	externalIdFlag bool

	creatorId     string // 创建人ID
	creatorIdFlag bool
}

func NewCreateTenantResultBuilder() *CreateTenantResultBuilder {
	builder := &CreateTenantResultBuilder{}
	return builder
}

// 租户ID
//
// 示例值：7036181931599499700
func (builder *CreateTenantResultBuilder) Id(id string) *CreateTenantResultBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 企业编码
//
// 示例值：F12312312312
func (builder *CreateTenantResultBuilder) ExternalId(externalId string) *CreateTenantResultBuilder {
	builder.externalId = externalId
	builder.externalIdFlag = true
	return builder
}

// 创建人ID
//
// 示例值：7036181931599499700
func (builder *CreateTenantResultBuilder) CreatorId(creatorId string) *CreateTenantResultBuilder {
	builder.creatorId = creatorId
	builder.creatorIdFlag = true
	return builder
}

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

	}
	if builder.externalIdFlag {
		req.ExternalId = &builder.externalId

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

	}
	return req
}

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

	CredentialType *string `json:"credential_type,omitempty"` // 类型

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

type CredentialBuilder struct {
	id     string // ID
	idFlag bool

	credentialType     string // 类型
	credentialTypeFlag bool

	content     string // 内容
	contentFlag bool
}

func NewCredentialBuilder() *CredentialBuilder {
	builder := &CredentialBuilder{}
	return builder
}

// ID
//
// 示例值：123123
func (builder *CredentialBuilder) Id(id string) *CredentialBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 类型
//
// 示例值：
func (builder *CredentialBuilder) CredentialType(credentialType string) *CredentialBuilder {
	builder.credentialType = credentialType
	builder.credentialTypeFlag = true
	return builder
}

// 内容
//
// 示例值：123123123123
func (builder *CredentialBuilder) Content(content string) *CredentialBuilder {
	builder.content = content
	builder.contentFlag = true
	return builder
}

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

	}
	if builder.credentialTypeFlag {
		req.CredentialType = &builder.credentialType

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

	}
	return req
}

type CustomField struct {
	Id *string `json:"id,omitempty"` // 字段ID，内建字段此项无意义，仅自定义字段有效

	ExternalId *string `json:"external_id,omitempty"` // 外部自定义id

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

	FieldName *I18nText `json:"field_name,omitempty"` // i18n文本

	FieldKey *string `json:"field_key,omitempty"` // 字段key

	FieldType *string `json:"field_type,omitempty"` // 字段类型

	EnumMeta *EnumMeta `json:"enum_meta,omitempty"` // 枚举元信息

	EntityType *string `json:"entity_type,omitempty"` // 所属实体对象类型 orm的FieldBelong

	Description *I18nText `json:"description,omitempty"` // i18n文本

	IsEnabled *bool `json:"is_enabled,omitempty"` // 是否启用

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

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

	CreatorId *string `json:"creator_id,omitempty"` // 创建人

	UpdatorId *string `json:"updator_id,omitempty"` // 更新人

	CreateSource *string `json:"create_source,omitempty"` // 创建来源

	OrgDimensionofDeptField *string `json:"org_dimensionof_dept_field,omitempty"` // 组织维度
}

type CustomFieldBuilder struct {
	id     string // 字段ID，内建字段此项无意义，仅自定义字段有效
	idFlag bool

	externalId     string // 外部自定义id
	externalIdFlag bool

	tenantId     string // 租户ID
	tenantIdFlag bool

	fieldName     *I18nText // i18n文本
	fieldNameFlag bool

	fieldKey     string // 字段key
	fieldKeyFlag bool

	fieldType     string // 字段类型
	fieldTypeFlag bool

	enumMeta     *EnumMeta // 枚举元信息
	enumMetaFlag bool

	entityType     string // 所属实体对象类型 orm的FieldBelong
	entityTypeFlag bool

	description     *I18nText // i18n文本
	descriptionFlag bool

	isEnabled     bool // 是否启用
	isEnabledFlag bool

	createTime     string // 创建时间
	createTimeFlag bool

	updateTime     string // 更新时间
	updateTimeFlag bool

	creatorId     string // 创建人
	creatorIdFlag bool

	updatorId     string // 更新人
	updatorIdFlag bool

	createSource     string // 创建来源
	createSourceFlag bool

	orgDimensionofDeptField     string // 组织维度
	orgDimensionofDeptFieldFlag bool
}

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

// 字段ID，内建字段此项无意义，仅自定义字段有效
//
// 示例值：123456
func (builder *CustomFieldBuilder) Id(id string) *CustomFieldBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 外部自定义id
//
// 示例值：1234456
func (builder *CustomFieldBuilder) ExternalId(externalId string) *CustomFieldBuilder {
	builder.externalId = externalId
	builder.externalIdFlag = true
	return builder
}

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

// i18n文本
//
// 示例值：
func (builder *CustomFieldBuilder) FieldName(fieldName *I18nText) *CustomFieldBuilder {
	builder.fieldName = fieldName
	builder.fieldNameFlag = true
	return builder
}

// 字段key
//
// 示例值：
func (builder *CustomFieldBuilder) FieldKey(fieldKey string) *CustomFieldBuilder {
	builder.fieldKey = fieldKey
	builder.fieldKeyFlag = true
	return builder
}

// 字段类型
//
// 示例值：
func (builder *CustomFieldBuilder) FieldType(fieldType string) *CustomFieldBuilder {
	builder.fieldType = fieldType
	builder.fieldTypeFlag = true
	return builder
}

// 枚举元信息
//
// 示例值：
func (builder *CustomFieldBuilder) EnumMeta(enumMeta *EnumMeta) *CustomFieldBuilder {
	builder.enumMeta = enumMeta
	builder.enumMetaFlag = true
	return builder
}

// 所属实体对象类型 orm的FieldBelong
//
// 示例值：
func (builder *CustomFieldBuilder) EntityType(entityType string) *CustomFieldBuilder {
	builder.entityType = entityType
	builder.entityTypeFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *CustomFieldBuilder) Description(description *I18nText) *CustomFieldBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 是否启用
//
// 示例值：
func (builder *CustomFieldBuilder) IsEnabled(isEnabled bool) *CustomFieldBuilder {
	builder.isEnabled = isEnabled
	builder.isEnabledFlag = true
	return builder
}

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

// 更新时间
//
// 示例值：123
func (builder *CustomFieldBuilder) UpdateTime(updateTime string) *CustomFieldBuilder {
	builder.updateTime = updateTime
	builder.updateTimeFlag = true
	return builder
}

// 创建人
//
// 示例值：123
func (builder *CustomFieldBuilder) CreatorId(creatorId string) *CustomFieldBuilder {
	builder.creatorId = creatorId
	builder.creatorIdFlag = true
	return builder
}

// 更新人
//
// 示例值：123
func (builder *CustomFieldBuilder) UpdatorId(updatorId string) *CustomFieldBuilder {
	builder.updatorId = updatorId
	builder.updatorIdFlag = true
	return builder
}

// 创建来源
//
// 示例值：
func (builder *CustomFieldBuilder) CreateSource(createSource string) *CustomFieldBuilder {
	builder.createSource = createSource
	builder.createSourceFlag = true
	return builder
}

// 组织维度
//
// 示例值：{}
func (builder *CustomFieldBuilder) OrgDimensionofDeptField(orgDimensionofDeptField string) *CustomFieldBuilder {
	builder.orgDimensionofDeptField = orgDimensionofDeptField
	builder.orgDimensionofDeptFieldFlag = true
	return builder
}

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

	}
	if builder.externalIdFlag {
		req.ExternalId = &builder.externalId

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

	}
	if builder.fieldNameFlag {
		req.FieldName = builder.fieldName
	}
	if builder.fieldKeyFlag {
		req.FieldKey = &builder.fieldKey

	}
	if builder.fieldTypeFlag {
		req.FieldType = &builder.fieldType

	}
	if builder.enumMetaFlag {
		req.EnumMeta = builder.enumMeta
	}
	if builder.entityTypeFlag {
		req.EntityType = &builder.entityType

	}
	if builder.descriptionFlag {
		req.Description = builder.description
	}
	if builder.isEnabledFlag {
		req.IsEnabled = &builder.isEnabled

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

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

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

	}
	if builder.updatorIdFlag {
		req.UpdatorId = &builder.updatorId

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

	}
	if builder.orgDimensionofDeptFieldFlag {
		req.OrgDimensionofDeptField = &builder.orgDimensionofDeptField

	}
	return req
}

type CustomFieldValue struct {
	FieldType *string `json:"field_type,omitempty"` // 自定义字段类型

	TextValue *I18nText `json:"text_value,omitempty"` // i18n文本

	UrlValue *UrlValue `json:"url_value,omitempty"` // 网页链接字段值

	EnumValue *EnumValue `json:"enum_value,omitempty"` // 枚举

	UserValues []*UserValue `json:"user_values,omitempty"` // 人员字段值

	DateTimeValue *string `json:"date_time_value,omitempty"` // 时间戳字段值

	NumberValue *string `json:"number_value,omitempty"` // 数字字段值

	BooleanValue *bool `json:"boolean_value,omitempty"` // 布尔值字段值

	PhoneValue *PhoneValue `json:"phone_value,omitempty"` // 电话字段值

	FieldKey *string `json:"field_key,omitempty"` // 自定义字段key
}

type CustomFieldValueBuilder struct {
	fieldType     string // 自定义字段类型
	fieldTypeFlag bool

	textValue     *I18nText // i18n文本
	textValueFlag bool

	urlValue     *UrlValue // 网页链接字段值
	urlValueFlag bool

	enumValue     *EnumValue // 枚举
	enumValueFlag bool

	userValues     []*UserValue // 人员字段值
	userValuesFlag bool

	dateTimeValue     string // 时间戳字段值
	dateTimeValueFlag bool

	numberValue     string // 数字字段值
	numberValueFlag bool

	booleanValue     bool // 布尔值字段值
	booleanValueFlag bool

	phoneValue     *PhoneValue // 电话字段值
	phoneValueFlag bool

	fieldKey     string // 自定义字段key
	fieldKeyFlag bool
}

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

// 自定义字段类型
//
// 示例值：
func (builder *CustomFieldValueBuilder) FieldType(fieldType string) *CustomFieldValueBuilder {
	builder.fieldType = fieldType
	builder.fieldTypeFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *CustomFieldValueBuilder) TextValue(textValue *I18nText) *CustomFieldValueBuilder {
	builder.textValue = textValue
	builder.textValueFlag = true
	return builder
}

// 网页链接字段值
//
// 示例值：
func (builder *CustomFieldValueBuilder) UrlValue(urlValue *UrlValue) *CustomFieldValueBuilder {
	builder.urlValue = urlValue
	builder.urlValueFlag = true
	return builder
}

// 枚举
//
// 示例值：
func (builder *CustomFieldValueBuilder) EnumValue(enumValue *EnumValue) *CustomFieldValueBuilder {
	builder.enumValue = enumValue
	builder.enumValueFlag = true
	return builder
}

// 人员字段值
//
// 示例值：
func (builder *CustomFieldValueBuilder) UserValues(userValues []*UserValue) *CustomFieldValueBuilder {
	builder.userValues = userValues
	builder.userValuesFlag = true
	return builder
}

// 时间戳字段值
//
// 示例值：1
func (builder *CustomFieldValueBuilder) DateTimeValue(dateTimeValue string) *CustomFieldValueBuilder {
	builder.dateTimeValue = dateTimeValue
	builder.dateTimeValueFlag = true
	return builder
}

// 数字字段值
//
// 示例值：169
func (builder *CustomFieldValueBuilder) NumberValue(numberValue string) *CustomFieldValueBuilder {
	builder.numberValue = numberValue
	builder.numberValueFlag = true
	return builder
}

// 布尔值字段值
//
// 示例值：true
func (builder *CustomFieldValueBuilder) BooleanValue(booleanValue bool) *CustomFieldValueBuilder {
	builder.booleanValue = booleanValue
	builder.booleanValueFlag = true
	return builder
}

// 电话字段值
//
// 示例值：
func (builder *CustomFieldValueBuilder) PhoneValue(phoneValue *PhoneValue) *CustomFieldValueBuilder {
	builder.phoneValue = phoneValue
	builder.phoneValueFlag = true
	return builder
}

// 自定义字段key
//
// 示例值：C-1000001
func (builder *CustomFieldValueBuilder) FieldKey(fieldKey string) *CustomFieldValueBuilder {
	builder.fieldKey = fieldKey
	builder.fieldKeyFlag = true
	return builder
}

func (builder *CustomFieldValueBuilder) Build() *CustomFieldValue {
	req := &CustomFieldValue{}
	if builder.fieldTypeFlag {
		req.FieldType = &builder.fieldType

	}
	if builder.textValueFlag {
		req.TextValue = builder.textValue
	}
	if builder.urlValueFlag {
		req.UrlValue = builder.urlValue
	}
	if builder.enumValueFlag {
		req.EnumValue = builder.enumValue
	}
	if builder.userValuesFlag {
		req.UserValues = builder.userValues
	}
	if builder.dateTimeValueFlag {
		req.DateTimeValue = &builder.dateTimeValue

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

	}
	if builder.booleanValueFlag {
		req.BooleanValue = &builder.booleanValue

	}
	if builder.phoneValueFlag {
		req.PhoneValue = builder.phoneValue
	}
	if builder.fieldKeyFlag {
		req.FieldKey = &builder.fieldKey

	}
	return req
}

type DeleteEmployeeOptions struct {
	ResignedEmployeeResourceReceiver *ResignedUserResouceReceiver `json:"resigned_employee_resource_receiver,omitempty"` // 资源转移方式

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

type DeleteEmployeeOptionsBuilder struct {
	resignedEmployeeResourceReceiver     *ResignedUserResouceReceiver // 资源转移方式
	resignedEmployeeResourceReceiverFlag bool

	operator     *Operator // 操作人
	operatorFlag bool
}

func NewDeleteEmployeeOptionsBuilder() *DeleteEmployeeOptionsBuilder {
	builder := &DeleteEmployeeOptionsBuilder{}
	return builder
}

// 资源转移方式
//
// 示例值：
func (builder *DeleteEmployeeOptionsBuilder) ResignedEmployeeResourceReceiver(resignedEmployeeResourceReceiver *ResignedUserResouceReceiver) *DeleteEmployeeOptionsBuilder {
	builder.resignedEmployeeResourceReceiver = resignedEmployeeResourceReceiver
	builder.resignedEmployeeResourceReceiverFlag = true
	return builder
}

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

func (builder *DeleteEmployeeOptionsBuilder) Build() *DeleteEmployeeOptions {
	req := &DeleteEmployeeOptions{}
	if builder.resignedEmployeeResourceReceiverFlag {
		req.ResignedEmployeeResourceReceiver = builder.resignedEmployeeResourceReceiver
	}
	if builder.operatorFlag {
		req.Operator = builder.operator
	}
	return req
}

type DeleteEmployeeTypeEnumOptions struct {
	DataSource *int `json:"data_source,omitempty"` // 数据来源
}

type DeleteEmployeeTypeEnumOptionsBuilder struct {
	dataSource     int // 数据来源
	dataSourceFlag bool
}

func NewDeleteEmployeeTypeEnumOptionsBuilder() *DeleteEmployeeTypeEnumOptionsBuilder {
	builder := &DeleteEmployeeTypeEnumOptionsBuilder{}
	return builder
}

// 数据来源
//
// 示例值：
func (builder *DeleteEmployeeTypeEnumOptionsBuilder) DataSource(dataSource int) *DeleteEmployeeTypeEnumOptionsBuilder {
	builder.dataSource = dataSource
	builder.dataSourceFlag = true
	return builder
}

func (builder *DeleteEmployeeTypeEnumOptionsBuilder) Build() *DeleteEmployeeTypeEnumOptions {
	req := &DeleteEmployeeTypeEnumOptions{}
	if builder.dataSourceFlag {
		req.DataSource = &builder.dataSource

	}
	return req
}

type Department struct {
	DepartmentId *string `json:"department_id,omitempty"` // 部门ID

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

	ExternalId *string `json:"external_id,omitempty"` // 自定义部门ID

	EncryptedId *string `json:"encrypted_id,omitempty"` // 加密id

	DepartmentCount *DepartmentCount `json:"department_count,omitempty"` // 部门计数

	HasChild *bool `json:"has_child,omitempty"` // 是否有子部门

	Leaders []*DepartmentLeader `json:"leaders,omitempty"` // 部门负责人

	Hrbps []string `json:"hrbps,omitempty"` // HRBP

	ParentDepartmentId *string `json:"parent_department_id,omitempty"` // 父部门ID

	Name *I18nText `json:"name,omitempty"` // i18n文本

	DeleteStatus *int `json:"delete_status,omitempty"` // 部门状态

	EnabledStatus *bool `json:"enabled_status,omitempty"` // 是否启用

	OrderWeight *string `json:"order_weight,omitempty"` // 部门排序权重

	Type *int `json:"type,omitempty"` // 部门类型

	Description *I18nText `json:"description,omitempty"` // i18n文本

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

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

	CreatorId *string `json:"creator_id,omitempty"` // 创建人ID

	UpdatorId *string `json:"updator_id,omitempty"` // 更新人ID

	IsRoot *bool `json:"is_root,omitempty"` // 是否根部门

	CustomFieldValues []*CustomFieldValue `json:"custom_field_values,omitempty"` // 自定义字段

	DepartmentPaths []string `json:"department_paths,omitempty"` // 部门路径ID

	DepartmentPathInfos []*DepartmentBaseInfo `json:"department_path_infos,omitempty"` // 部门路径的基本信息, 与部门路径ID department_path 相比，本字段不含根部门信息

	DataSource *int `json:"data_source,omitempty"` // 数据来源

	OrgDimension *string `json:"org_dimension,omitempty"` // 组织维度
}

type DepartmentBuilder struct {
	departmentId     string // 部门ID
	departmentIdFlag bool

	tenantId     string // 租户ID
	tenantIdFlag bool

	externalId     string // 自定义部门ID
	externalIdFlag bool

	encryptedId     string // 加密id
	encryptedIdFlag bool

	departmentCount     *DepartmentCount // 部门计数
	departmentCountFlag bool

	hasChild     bool // 是否有子部门
	hasChildFlag bool

	leaders     []*DepartmentLeader // 部门负责人
	leadersFlag bool

	hrbps     []string // HRBP
	hrbpsFlag bool

	parentDepartmentId     string // 父部门ID
	parentDepartmentIdFlag bool

	name     *I18nText // i18n文本
	nameFlag bool

	deleteStatus     int // 部门状态
	deleteStatusFlag bool

	enabledStatus     bool // 是否启用
	enabledStatusFlag bool

	orderWeight     string // 部门排序权重
	orderWeightFlag bool

	type_    int // 部门类型
	typeFlag bool

	description     *I18nText // i18n文本
	descriptionFlag bool

	createTime     string // 创建时间
	createTimeFlag bool

	updateTime     string // 更新时间
	updateTimeFlag bool

	creatorId     string // 创建人ID
	creatorIdFlag bool

	updatorId     string // 更新人ID
	updatorIdFlag bool

	isRoot     bool // 是否根部门
	isRootFlag bool

	customFieldValues     []*CustomFieldValue // 自定义字段
	customFieldValuesFlag bool

	departmentPaths     []string // 部门路径ID
	departmentPathsFlag bool

	departmentPathInfos     []*DepartmentBaseInfo // 部门路径的基本信息, 与部门路径ID department_path 相比，本字段不含根部门信息
	departmentPathInfosFlag bool

	dataSource     int // 数据来源
	dataSourceFlag bool

	orgDimension     string // 组织维度
	orgDimensionFlag bool
}

func NewDepartmentBuilder() *DepartmentBuilder {
	builder := &DepartmentBuilder{}
	return builder
}

// 部门ID
//
// 示例值：h12921
func (builder *DepartmentBuilder) DepartmentId(departmentId string) *DepartmentBuilder {
	builder.departmentId = departmentId
	builder.departmentIdFlag = true
	return builder
}

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

// 自定义部门ID
//
// 示例值：deqfdsasd
func (builder *DepartmentBuilder) ExternalId(externalId string) *DepartmentBuilder {
	builder.externalId = externalId
	builder.externalIdFlag = true
	return builder
}

// 加密id
//
// 示例值：无
func (builder *DepartmentBuilder) EncryptedId(encryptedId string) *DepartmentBuilder {
	builder.encryptedId = encryptedId
	builder.encryptedIdFlag = true
	return builder
}

// 部门计数
//
// 示例值：
func (builder *DepartmentBuilder) DepartmentCount(departmentCount *DepartmentCount) *DepartmentBuilder {
	builder.departmentCount = departmentCount
	builder.departmentCountFlag = true
	return builder
}

// 是否有子部门
//
// 示例值：true
func (builder *DepartmentBuilder) HasChild(hasChild bool) *DepartmentBuilder {
	builder.hasChild = hasChild
	builder.hasChildFlag = true
	return builder
}

// 部门负责人
//
// 示例值：
func (builder *DepartmentBuilder) Leaders(leaders []*DepartmentLeader) *DepartmentBuilder {
	builder.leaders = leaders
	builder.leadersFlag = true
	return builder
}

// HRBP
//
// 示例值：
func (builder *DepartmentBuilder) Hrbps(hrbps []string) *DepartmentBuilder {
	builder.hrbps = hrbps
	builder.hrbpsFlag = true
	return builder
}

// 父部门ID
//
// 示例值：h12921
func (builder *DepartmentBuilder) ParentDepartmentId(parentDepartmentId string) *DepartmentBuilder {
	builder.parentDepartmentId = parentDepartmentId
	builder.parentDepartmentIdFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *DepartmentBuilder) Name(name *I18nText) *DepartmentBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 部门状态
//
// 示例值：无
func (builder *DepartmentBuilder) DeleteStatus(deleteStatus int) *DepartmentBuilder {
	builder.deleteStatus = deleteStatus
	builder.deleteStatusFlag = true
	return builder
}

// 是否启用
//
// 示例值：true
func (builder *DepartmentBuilder) EnabledStatus(enabledStatus bool) *DepartmentBuilder {
	builder.enabledStatus = enabledStatus
	builder.enabledStatusFlag = true
	return builder
}

// 部门排序权重
//
// 示例值：无
func (builder *DepartmentBuilder) OrderWeight(orderWeight string) *DepartmentBuilder {
	builder.orderWeight = orderWeight
	builder.orderWeightFlag = true
	return builder
}

// 部门类型
//
// 示例值：无
func (builder *DepartmentBuilder) Type(type_ int) *DepartmentBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// i18n文本
//
// 示例值：无
func (builder *DepartmentBuilder) Description(description *I18nText) *DepartmentBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

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

// 更新时间
//
// 示例值：无
func (builder *DepartmentBuilder) UpdateTime(updateTime string) *DepartmentBuilder {
	builder.updateTime = updateTime
	builder.updateTimeFlag = true
	return builder
}

// 创建人ID
//
// 示例值：无
func (builder *DepartmentBuilder) CreatorId(creatorId string) *DepartmentBuilder {
	builder.creatorId = creatorId
	builder.creatorIdFlag = true
	return builder
}

// 更新人ID
//
// 示例值：无
func (builder *DepartmentBuilder) UpdatorId(updatorId string) *DepartmentBuilder {
	builder.updatorId = updatorId
	builder.updatorIdFlag = true
	return builder
}

// 是否根部门
//
// 示例值：true
func (builder *DepartmentBuilder) IsRoot(isRoot bool) *DepartmentBuilder {
	builder.isRoot = isRoot
	builder.isRootFlag = true
	return builder
}

// 自定义字段
//
// 示例值：
func (builder *DepartmentBuilder) CustomFieldValues(customFieldValues []*CustomFieldValue) *DepartmentBuilder {
	builder.customFieldValues = customFieldValues
	builder.customFieldValuesFlag = true
	return builder
}

// 部门路径ID
//
// 示例值：
func (builder *DepartmentBuilder) DepartmentPaths(departmentPaths []string) *DepartmentBuilder {
	builder.departmentPaths = departmentPaths
	builder.departmentPathsFlag = true
	return builder
}

// 部门路径的基本信息, 与部门路径ID department_path 相比，本字段不含根部门信息
//
// 示例值：1
func (builder *DepartmentBuilder) DepartmentPathInfos(departmentPathInfos []*DepartmentBaseInfo) *DepartmentBuilder {
	builder.departmentPathInfos = departmentPathInfos
	builder.departmentPathInfosFlag = true
	return builder
}

// 数据来源
//
// 示例值：
func (builder *DepartmentBuilder) DataSource(dataSource int) *DepartmentBuilder {
	builder.dataSource = dataSource
	builder.dataSourceFlag = true
	return builder
}

// 组织维度
//
// 示例值：3e3cf96b
func (builder *DepartmentBuilder) OrgDimension(orgDimension string) *DepartmentBuilder {
	builder.orgDimension = orgDimension
	builder.orgDimensionFlag = true
	return builder
}

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

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

	}
	if builder.externalIdFlag {
		req.ExternalId = &builder.externalId

	}
	if builder.encryptedIdFlag {
		req.EncryptedId = &builder.encryptedId

	}
	if builder.departmentCountFlag {
		req.DepartmentCount = builder.departmentCount
	}
	if builder.hasChildFlag {
		req.HasChild = &builder.hasChild

	}
	if builder.leadersFlag {
		req.Leaders = builder.leaders
	}
	if builder.hrbpsFlag {
		req.Hrbps = builder.hrbps
	}
	if builder.parentDepartmentIdFlag {
		req.ParentDepartmentId = &builder.parentDepartmentId

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.deleteStatusFlag {
		req.DeleteStatus = &builder.deleteStatus

	}
	if builder.enabledStatusFlag {
		req.EnabledStatus = &builder.enabledStatus

	}
	if builder.orderWeightFlag {
		req.OrderWeight = &builder.orderWeight

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

	}
	if builder.descriptionFlag {
		req.Description = builder.description
	}
	if builder.createTimeFlag {
		req.CreateTime = &builder.createTime

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

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

	}
	if builder.updatorIdFlag {
		req.UpdatorId = &builder.updatorId

	}
	if builder.isRootFlag {
		req.IsRoot = &builder.isRoot

	}
	if builder.customFieldValuesFlag {
		req.CustomFieldValues = builder.customFieldValues
	}
	if builder.departmentPathsFlag {
		req.DepartmentPaths = builder.departmentPaths
	}
	if builder.departmentPathInfosFlag {
		req.DepartmentPathInfos = builder.departmentPathInfos
	}
	if builder.dataSourceFlag {
		req.DataSource = &builder.dataSource

	}
	if builder.orgDimensionFlag {
		req.OrgDimension = &builder.orgDimension

	}
	return req
}

type DepartmentBaseInfo struct {
	DepartmentId *string `json:"department_id,omitempty"` // 部门ID

	DepartmentName *I18nText `json:"department_name,omitempty"` // i18n文本
}

type DepartmentBaseInfoBuilder struct {
	departmentId     string // 部门ID
	departmentIdFlag bool

	departmentName     *I18nText // i18n文本
	departmentNameFlag bool
}

func NewDepartmentBaseInfoBuilder() *DepartmentBaseInfoBuilder {
	builder := &DepartmentBaseInfoBuilder{}
	return builder
}

// 部门ID
//
// 示例值：1
func (builder *DepartmentBaseInfoBuilder) DepartmentId(departmentId string) *DepartmentBaseInfoBuilder {
	builder.departmentId = departmentId
	builder.departmentIdFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *DepartmentBaseInfoBuilder) DepartmentName(departmentName *I18nText) *DepartmentBaseInfoBuilder {
	builder.departmentName = departmentName
	builder.departmentNameFlag = true
	return builder
}

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

	}
	if builder.departmentNameFlag {
		req.DepartmentName = builder.departmentName
	}
	return req
}

type DepartmentCount struct {
	RecursiveMembersCount *string `json:"recursive_members_count,omitempty"` // 递归成员数量

	DirectMembersCount *string `json:"direct_members_count,omitempty"` // 直属成员数量

	RecursiveMembersCountExcludeLeaders *string `json:"recursive_members_count_exclude_leaders,omitempty"` // 递归成员数量(不含leader)

	RecursiveDepartmentsCount *string `json:"recursive_departments_count,omitempty"` // 递归子部门数量

	DirectDepartmentsCount *string `json:"direct_departments_count,omitempty"` // 直属子部门数量
}

type DepartmentCountBuilder struct {
	recursiveMembersCount     string // 递归成员数量
	recursiveMembersCountFlag bool

	directMembersCount     string // 直属成员数量
	directMembersCountFlag bool

	recursiveMembersCountExcludeLeaders     string // 递归成员数量(不含leader)
	recursiveMembersCountExcludeLeadersFlag bool

	recursiveDepartmentsCount     string // 递归子部门数量
	recursiveDepartmentsCountFlag bool

	directDepartmentsCount     string // 直属子部门数量
	directDepartmentsCountFlag bool
}

func NewDepartmentCountBuilder() *DepartmentCountBuilder {
	builder := &DepartmentCountBuilder{}
	return builder
}

// 递归成员数量
//
// 示例值：100
func (builder *DepartmentCountBuilder) RecursiveMembersCount(recursiveMembersCount string) *DepartmentCountBuilder {
	builder.recursiveMembersCount = recursiveMembersCount
	builder.recursiveMembersCountFlag = true
	return builder
}

// 直属成员数量
//
// 示例值：100
func (builder *DepartmentCountBuilder) DirectMembersCount(directMembersCount string) *DepartmentCountBuilder {
	builder.directMembersCount = directMembersCount
	builder.directMembersCountFlag = true
	return builder
}

// 递归成员数量(不含leader)
//
// 示例值：100
func (builder *DepartmentCountBuilder) RecursiveMembersCountExcludeLeaders(recursiveMembersCountExcludeLeaders string) *DepartmentCountBuilder {
	builder.recursiveMembersCountExcludeLeaders = recursiveMembersCountExcludeLeaders
	builder.recursiveMembersCountExcludeLeadersFlag = true
	return builder
}

// 递归子部门数量
//
// 示例值：100
func (builder *DepartmentCountBuilder) RecursiveDepartmentsCount(recursiveDepartmentsCount string) *DepartmentCountBuilder {
	builder.recursiveDepartmentsCount = recursiveDepartmentsCount
	builder.recursiveDepartmentsCountFlag = true
	return builder
}

// 直属子部门数量
//
// 示例值：100
func (builder *DepartmentCountBuilder) DirectDepartmentsCount(directDepartmentsCount string) *DepartmentCountBuilder {
	builder.directDepartmentsCount = directDepartmentsCount
	builder.directDepartmentsCountFlag = true
	return builder
}

func (builder *DepartmentCountBuilder) Build() *DepartmentCount {
	req := &DepartmentCount{}
	if builder.recursiveMembersCountFlag {
		req.RecursiveMembersCount = &builder.recursiveMembersCount

	}
	if builder.directMembersCountFlag {
		req.DirectMembersCount = &builder.directMembersCount

	}
	if builder.recursiveMembersCountExcludeLeadersFlag {
		req.RecursiveMembersCountExcludeLeaders = &builder.recursiveMembersCountExcludeLeaders

	}
	if builder.recursiveDepartmentsCountFlag {
		req.RecursiveDepartmentsCount = &builder.recursiveDepartmentsCount

	}
	if builder.directDepartmentsCountFlag {
		req.DirectDepartmentsCount = &builder.directDepartmentsCount

	}
	return req
}

type DepartmentDisplayInfo struct {
	ProfileNodePathType *int `json:"profile_node_path_type,omitempty"` // profile类型

	ChatterNodePathType *int `json:"chatter_node_path_type,omitempty"` // 会话页类型
}

type DepartmentDisplayInfoBuilder struct {
	profileNodePathType     int // profile类型
	profileNodePathTypeFlag bool

	chatterNodePathType     int // 会话页类型
	chatterNodePathTypeFlag bool
}

func NewDepartmentDisplayInfoBuilder() *DepartmentDisplayInfoBuilder {
	builder := &DepartmentDisplayInfoBuilder{}
	return builder
}

// profile类型
//
// 示例值：
func (builder *DepartmentDisplayInfoBuilder) ProfileNodePathType(profileNodePathType int) *DepartmentDisplayInfoBuilder {
	builder.profileNodePathType = profileNodePathType
	builder.profileNodePathTypeFlag = true
	return builder
}

// 会话页类型
//
// 示例值：
func (builder *DepartmentDisplayInfoBuilder) ChatterNodePathType(chatterNodePathType int) *DepartmentDisplayInfoBuilder {
	builder.chatterNodePathType = chatterNodePathType
	builder.chatterNodePathTypeFlag = true
	return builder
}

func (builder *DepartmentDisplayInfoBuilder) Build() *DepartmentDisplayInfo {
	req := &DepartmentDisplayInfo{}
	if builder.profileNodePathTypeFlag {
		req.ProfileNodePathType = &builder.profileNodePathType

	}
	if builder.chatterNodePathTypeFlag {
		req.ChatterNodePathType = &builder.chatterNodePathType

	}
	return req
}

type DepartmentField struct {
	Ids []string `json:"ids,omitempty"` // 所在部门的ID

	Path map[string][]string `json:"path,omitempty"` // 部门路径ID

	PathName map[string]*I18nText `json:"path_name,omitempty"` // 用户部门路径名称
}

type DepartmentFieldBuilder struct {
	ids     []string // 所在部门的ID
	idsFlag bool

	path     map[string][]string // 部门路径ID
	pathFlag bool

	pathName     map[string]*I18nText // 用户部门路径名称
	pathNameFlag bool
}

func NewDepartmentFieldBuilder() *DepartmentFieldBuilder {
	builder := &DepartmentFieldBuilder{}
	return builder
}

// 所在部门的ID
//
// 示例值：
func (builder *DepartmentFieldBuilder) Ids(ids []string) *DepartmentFieldBuilder {
	builder.ids = ids
	builder.idsFlag = true
	return builder
}

// 部门路径ID
//
// 示例值：
func (builder *DepartmentFieldBuilder) Path(path map[string][]string) *DepartmentFieldBuilder {
	builder.path = path
	builder.pathFlag = true
	return builder
}

// 用户部门路径名称
//
// 示例值：
func (builder *DepartmentFieldBuilder) PathName(pathName map[string]*I18nText) *DepartmentFieldBuilder {
	builder.pathName = pathName
	builder.pathNameFlag = true
	return builder
}

func (builder *DepartmentFieldBuilder) Build() *DepartmentField {
	req := &DepartmentField{}
	if builder.idsFlag {
		req.Ids = builder.ids
	}
	if builder.pathFlag {
		req.Path = builder.path
	}
	if builder.pathNameFlag {
		req.PathName = builder.pathName
	}
	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 DepartmentIdConvertResult struct {
	Id *string `json:"id,omitempty"` // ID

	DepartmentId *string `json:"department_id,omitempty"` // 部门ID

	OpenDepartmentId *string `json:"open_department_id,omitempty"` // 部门OpenID
}

type DepartmentIdConvertResultBuilder struct {
	id     string // ID
	idFlag bool

	departmentId     string // 部门ID
	departmentIdFlag bool

	openDepartmentId     string // 部门OpenID
	openDepartmentIdFlag bool
}

func NewDepartmentIdConvertResultBuilder() *DepartmentIdConvertResultBuilder {
	builder := &DepartmentIdConvertResultBuilder{}
	return builder
}

// ID
//
// 示例值：ahjdsioad
func (builder *DepartmentIdConvertResultBuilder) Id(id string) *DepartmentIdConvertResultBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 部门ID
//
// 示例值：ahjdsioad
func (builder *DepartmentIdConvertResultBuilder) DepartmentId(departmentId string) *DepartmentIdConvertResultBuilder {
	builder.departmentId = departmentId
	builder.departmentIdFlag = true
	return builder
}

// 部门OpenID
//
// 示例值：od-9d2eae75a1789adawdaw112wae177bd60c1
func (builder *DepartmentIdConvertResultBuilder) OpenDepartmentId(openDepartmentId string) *DepartmentIdConvertResultBuilder {
	builder.openDepartmentId = openDepartmentId
	builder.openDepartmentIdFlag = true
	return builder
}

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

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

	}
	if builder.openDepartmentIdFlag {
		req.OpenDepartmentId = &builder.openDepartmentId

	}
	return req
}

type DepartmentLeader struct {
	LeaderType *int `json:"leader_type,omitempty"` // 部门负责人类型

	LeaderId *string `json:"leader_id,omitempty"` // 部门负责人ID
}

type DepartmentLeaderBuilder struct {
	leaderType     int // 部门负责人类型
	leaderTypeFlag bool

	leaderId     string // 部门负责人ID
	leaderIdFlag bool
}

func NewDepartmentLeaderBuilder() *DepartmentLeaderBuilder {
	builder := &DepartmentLeaderBuilder{}
	return builder
}

// 部门负责人类型
//
// 示例值：1
func (builder *DepartmentLeaderBuilder) LeaderType(leaderType int) *DepartmentLeaderBuilder {
	builder.leaderType = leaderType
	builder.leaderTypeFlag = true
	return builder
}

// 部门负责人ID
//
// 示例值：u273y71
func (builder *DepartmentLeaderBuilder) LeaderId(leaderId string) *DepartmentLeaderBuilder {
	builder.leaderId = leaderId
	builder.leaderIdFlag = true
	return builder
}

func (builder *DepartmentLeaderBuilder) Build() *DepartmentLeader {
	req := &DepartmentLeader{}
	if builder.leaderTypeFlag {
		req.LeaderType = &builder.leaderType

	}
	if builder.leaderIdFlag {
		req.LeaderId = &builder.leaderId

	}
	return req
}

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

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

	Relationship *string `json:"relationship,omitempty"` // 关系

	Gender *int `json:"gender,omitempty"` // 性别

	DateOfBirth *string `json:"date_of_birth,omitempty"` // 生日

	NationalityId *string `json:"nationality_id,omitempty"` // 国籍

	NationalIdList *string `json:"national_id_list,omitempty"` // 证件号码

	SpousesWorkingStatus *string `json:"spouses_working_status,omitempty"` // 配偶工作状态

	IsThisPersonCoveredByHealthInsurance *bool `json:"is_this_person_covered_by_health_insurance,omitempty"` // 包含家属医疗保险

	IsThisPersonAllowedForTaxDeduction *bool `json:"is_this_person_allowed_for_tax_deduction,omitempty"` // 允许家属抵扣税款
}

type DependentBuilder struct {
	id     string // ID
	idFlag bool

	name     string // 姓名
	nameFlag bool

	relationship     string // 关系
	relationshipFlag bool

	gender     int // 性别
	genderFlag bool

	dateOfBirth     string // 生日
	dateOfBirthFlag bool

	nationalityId     string // 国籍
	nationalityIdFlag bool

	nationalIdList     string // 证件号码
	nationalIdListFlag bool

	spousesWorkingStatus     string // 配偶工作状态
	spousesWorkingStatusFlag bool

	isThisPersonCoveredByHealthInsurance     bool // 包含家属医疗保险
	isThisPersonCoveredByHealthInsuranceFlag bool

	isThisPersonAllowedForTaxDeduction     bool // 允许家属抵扣税款
	isThisPersonAllowedForTaxDeductionFlag bool
}

func NewDependentBuilder() *DependentBuilder {
	builder := &DependentBuilder{}
	return builder
}

// ID
//
// 示例值：无
func (builder *DependentBuilder) Id(id string) *DependentBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

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

// 关系
//
// 示例值：无
func (builder *DependentBuilder) Relationship(relationship string) *DependentBuilder {
	builder.relationship = relationship
	builder.relationshipFlag = true
	return builder
}

// 性别
//
// 示例值：无
func (builder *DependentBuilder) Gender(gender int) *DependentBuilder {
	builder.gender = gender
	builder.genderFlag = true
	return builder
}

// 生日
//
// 示例值：无
func (builder *DependentBuilder) DateOfBirth(dateOfBirth string) *DependentBuilder {
	builder.dateOfBirth = dateOfBirth
	builder.dateOfBirthFlag = true
	return builder
}

// 国籍
//
// 示例值：无
func (builder *DependentBuilder) NationalityId(nationalityId string) *DependentBuilder {
	builder.nationalityId = nationalityId
	builder.nationalityIdFlag = true
	return builder
}

// 证件号码
//
// 示例值：无
func (builder *DependentBuilder) NationalIdList(nationalIdList string) *DependentBuilder {
	builder.nationalIdList = nationalIdList
	builder.nationalIdListFlag = true
	return builder
}

// 配偶工作状态
//
// 示例值：无
func (builder *DependentBuilder) SpousesWorkingStatus(spousesWorkingStatus string) *DependentBuilder {
	builder.spousesWorkingStatus = spousesWorkingStatus
	builder.spousesWorkingStatusFlag = true
	return builder
}

// 包含家属医疗保险
//
// 示例值：true
func (builder *DependentBuilder) IsThisPersonCoveredByHealthInsurance(isThisPersonCoveredByHealthInsurance bool) *DependentBuilder {
	builder.isThisPersonCoveredByHealthInsurance = isThisPersonCoveredByHealthInsurance
	builder.isThisPersonCoveredByHealthInsuranceFlag = true
	return builder
}

// 允许家属抵扣税款
//
// 示例值：true
func (builder *DependentBuilder) IsThisPersonAllowedForTaxDeduction(isThisPersonAllowedForTaxDeduction bool) *DependentBuilder {
	builder.isThisPersonAllowedForTaxDeduction = isThisPersonAllowedForTaxDeduction
	builder.isThisPersonAllowedForTaxDeductionFlag = true
	return builder
}

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

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

	}
	if builder.relationshipFlag {
		req.Relationship = &builder.relationship

	}
	if builder.genderFlag {
		req.Gender = &builder.gender

	}
	if builder.dateOfBirthFlag {
		req.DateOfBirth = &builder.dateOfBirth

	}
	if builder.nationalityIdFlag {
		req.NationalityId = &builder.nationalityId

	}
	if builder.nationalIdListFlag {
		req.NationalIdList = &builder.nationalIdList

	}
	if builder.spousesWorkingStatusFlag {
		req.SpousesWorkingStatus = &builder.spousesWorkingStatus

	}
	if builder.isThisPersonCoveredByHealthInsuranceFlag {
		req.IsThisPersonCoveredByHealthInsurance = &builder.isThisPersonCoveredByHealthInsurance

	}
	if builder.isThisPersonAllowedForTaxDeductionFlag {
		req.IsThisPersonAllowedForTaxDeduction = &builder.isThisPersonAllowedForTaxDeduction

	}
	return req
}

type Education struct {
	Id *string `json:"id,omitempty"` // ID -- 废弃

	School *I18nText `json:"school,omitempty"` // i18n文本

	LevelOfEducation *string `json:"level_of_education,omitempty"` // 学历

	StartDate *string `json:"start_date,omitempty"` // 开始日期

	EndDate *string `json:"end_date,omitempty"` // 结束日期

	ExpectedEndDate *string `json:"expected_end_date,omitempty"` // 预计结束日期

	FieldOfStudy *I18nText `json:"field_of_study,omitempty"` // i18n文本

	Degree *string `json:"degree,omitempty"` // 学位

	CountryRegionId *string `json:"country_region_id,omitempty"` // 国家地区ID

	EducationId *string `json:"education_id,omitempty"` // 教育背景ID = wk_id

	SchoolEnum *WuKongEnum `json:"school_enum,omitempty"` // wukong枚举

	FieldOfStudyEnum *WuKongEnum `json:"field_of_study_enum,omitempty"` // wukong枚举
}

type EducationBuilder struct {
	id     string // ID -- 废弃
	idFlag bool

	school     *I18nText // i18n文本
	schoolFlag bool

	levelOfEducation     string // 学历
	levelOfEducationFlag bool

	startDate     string // 开始日期
	startDateFlag bool

	endDate     string // 结束日期
	endDateFlag bool

	expectedEndDate     string // 预计结束日期
	expectedEndDateFlag bool

	fieldOfStudy     *I18nText // i18n文本
	fieldOfStudyFlag bool

	degree     string // 学位
	degreeFlag bool

	countryRegionId     string // 国家地区ID
	countryRegionIdFlag bool

	educationId     string // 教育背景ID = wk_id
	educationIdFlag bool

	schoolEnum     *WuKongEnum // wukong枚举
	schoolEnumFlag bool

	fieldOfStudyEnum     *WuKongEnum // wukong枚举
	fieldOfStudyEnumFlag bool
}

func NewEducationBuilder() *EducationBuilder {
	builder := &EducationBuilder{}
	return builder
}

// ID -- 废弃
//
// 示例值：1
func (builder *EducationBuilder) Id(id string) *EducationBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// i18n文本
//
// 示例值：无
func (builder *EducationBuilder) School(school *I18nText) *EducationBuilder {
	builder.school = school
	builder.schoolFlag = true
	return builder
}

// 学历
//
// 示例值：无
func (builder *EducationBuilder) LevelOfEducation(levelOfEducation string) *EducationBuilder {
	builder.levelOfEducation = levelOfEducation
	builder.levelOfEducationFlag = true
	return builder
}

// 开始日期
//
// 示例值：无
func (builder *EducationBuilder) StartDate(startDate string) *EducationBuilder {
	builder.startDate = startDate
	builder.startDateFlag = true
	return builder
}

// 结束日期
//
// 示例值：无
func (builder *EducationBuilder) EndDate(endDate string) *EducationBuilder {
	builder.endDate = endDate
	builder.endDateFlag = true
	return builder
}

// 预计结束日期
//
// 示例值：无
func (builder *EducationBuilder) ExpectedEndDate(expectedEndDate string) *EducationBuilder {
	builder.expectedEndDate = expectedEndDate
	builder.expectedEndDateFlag = true
	return builder
}

// i18n文本
//
// 示例值：无
func (builder *EducationBuilder) FieldOfStudy(fieldOfStudy *I18nText) *EducationBuilder {
	builder.fieldOfStudy = fieldOfStudy
	builder.fieldOfStudyFlag = true
	return builder
}

// 学位
//
// 示例值：无
func (builder *EducationBuilder) Degree(degree string) *EducationBuilder {
	builder.degree = degree
	builder.degreeFlag = true
	return builder
}

// 国家地区ID
//
// 示例值：无
func (builder *EducationBuilder) CountryRegionId(countryRegionId string) *EducationBuilder {
	builder.countryRegionId = countryRegionId
	builder.countryRegionIdFlag = true
	return builder
}

// 教育背景ID = wk_id
//
// 示例值：无
func (builder *EducationBuilder) EducationId(educationId string) *EducationBuilder {
	builder.educationId = educationId
	builder.educationIdFlag = true
	return builder
}

// wukong枚举
//
// 示例值：1
func (builder *EducationBuilder) SchoolEnum(schoolEnum *WuKongEnum) *EducationBuilder {
	builder.schoolEnum = schoolEnum
	builder.schoolEnumFlag = true
	return builder
}

// wukong枚举
//
// 示例值：1
func (builder *EducationBuilder) FieldOfStudyEnum(fieldOfStudyEnum *WuKongEnum) *EducationBuilder {
	builder.fieldOfStudyEnum = fieldOfStudyEnum
	builder.fieldOfStudyEnumFlag = true
	return builder
}

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

	}
	if builder.schoolFlag {
		req.School = builder.school
	}
	if builder.levelOfEducationFlag {
		req.LevelOfEducation = &builder.levelOfEducation

	}
	if builder.startDateFlag {
		req.StartDate = &builder.startDate

	}
	if builder.endDateFlag {
		req.EndDate = &builder.endDate

	}
	if builder.expectedEndDateFlag {
		req.ExpectedEndDate = &builder.expectedEndDate

	}
	if builder.fieldOfStudyFlag {
		req.FieldOfStudy = builder.fieldOfStudy
	}
	if builder.degreeFlag {
		req.Degree = &builder.degree

	}
	if builder.countryRegionIdFlag {
		req.CountryRegionId = &builder.countryRegionId

	}
	if builder.educationIdFlag {
		req.EducationId = &builder.educationId

	}
	if builder.schoolEnumFlag {
		req.SchoolEnum = builder.schoolEnum
	}
	if builder.fieldOfStudyEnumFlag {
		req.FieldOfStudyEnum = builder.fieldOfStudyEnum
	}
	return req
}

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

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

	Relationship *string `json:"relationship,omitempty"` // 关系

	Phone *string `json:"phone,omitempty"` // 电话

	IsPrimary *bool `json:"is_primary,omitempty"` // 是否主要联系人
}

type EmergencyContactBuilder struct {
	id     string // ID
	idFlag bool

	name     string // 姓名
	nameFlag bool

	relationship     string // 关系
	relationshipFlag bool

	phone     string // 电话
	phoneFlag bool

	isPrimary     bool // 是否主要联系人
	isPrimaryFlag bool
}

func NewEmergencyContactBuilder() *EmergencyContactBuilder {
	builder := &EmergencyContactBuilder{}
	return builder
}

// ID
//
// 示例值：无
func (builder *EmergencyContactBuilder) Id(id string) *EmergencyContactBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

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

// 关系
//
// 示例值：无
func (builder *EmergencyContactBuilder) Relationship(relationship string) *EmergencyContactBuilder {
	builder.relationship = relationship
	builder.relationshipFlag = true
	return builder
}

// 电话
//
// 示例值：无
func (builder *EmergencyContactBuilder) Phone(phone string) *EmergencyContactBuilder {
	builder.phone = phone
	builder.phoneFlag = true
	return builder
}

// 是否主要联系人
//
// 示例值：无
func (builder *EmergencyContactBuilder) IsPrimary(isPrimary bool) *EmergencyContactBuilder {
	builder.isPrimary = isPrimary
	builder.isPrimaryFlag = true
	return builder
}

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

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

	}
	if builder.relationshipFlag {
		req.Relationship = &builder.relationship

	}
	if builder.phoneFlag {
		req.Phone = &builder.phone

	}
	if builder.isPrimaryFlag {
		req.IsPrimary = &builder.isPrimary

	}
	return req
}

type EmployeeBaseEntity struct {
	EmployeeId *string `json:"employee_id,omitempty"` // EmployeeID 和UserID一致

	UserId *string `json:"user_id,omitempty"` // UserID

	ExternalId *string `json:"external_id,omitempty"` // 外部ID ORM的EmployeeID

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

	Mobile *string `json:"mobile,omitempty"` // 手机号

	Email *string `json:"email,omitempty"` // 登录邮箱

	PersonalEmail *string `json:"personal_email,omitempty"` // 个人邮箱

	EnterpriseEmail *string `json:"enterprise_email,omitempty"` // 企业邮箱

	Gender *int `json:"gender,omitempty"` // 性别

	ResidentialAddress *string `json:"residential_address,omitempty"` // 现居住地址

	ContactAddresses []*ContactAddress `json:"contact_addresses,omitempty"` // 联系地址

	Tenant *Tenant `json:"tenant,omitempty"` // 租户

	Departments []*Department `json:"departments,omitempty"` // 部门信息

	EmployeeOrderInDepartments []*UserDepartmentSortInfo `json:"employee_order_in_departments,omitempty"` // 用户在部门内的排序信息， 第一个部门为主部门

	UserDepartmentPath map[string][]string `json:"user_department_path,omitempty"` // 用户部门路径ID map<直属部门ID, 部门全路径ID集合且部门从大到小> 例如：{1, []int64{4,3,2,1}}

	UserDepartmentPathName map[string]*I18nText `json:"user_department_path_name,omitempty"` // 用户部门路径名称 map<直属部门ID, 部门全路径名称且部门从大到小并按照-分割> 例如：{1, 部门4-部门3-部门2-部门1}

	AvatarKey *Image `json:"avatar_key,omitempty"` // 图片信息

	BackgroundImageKey *string `json:"background_image_key,omitempty"` // 自定义背景图

	Description *string `json:"description,omitempty"` // 个人签名

	IsSetCustomBackgroundImage *bool `json:"is_set_custom_background_image,omitempty"` // 是否设置自定义背景图

	ActiveStatus *int `json:"active_status,omitempty"` // 用户活跃状态

	IsResigned *bool `json:"is_resigned,omitempty"` // 是否离职

	LeaderId *string `json:"leader_id,omitempty"` // 直属上级ID

	DottedLineLeaderIds []string `json:"dotted_line_leader_ids,omitempty"` // 虚线上级ID

	IsPrimaryAdmin *bool `json:"is_primary_admin,omitempty"` // 是否租户超级管理员

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

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

	EnterpriseEmailAliases []string `json:"enterprise_email_aliases,omitempty"` // 企业邮箱别名

	CustomFieldValues []*CustomFieldValue `json:"custom_field_values,omitempty"` // 自定义字段值

	DescriptionFlag *string `json:"description_flag,omitempty"` // 个性签名Flag

	WorkStatus *WorkStatus `json:"work_status,omitempty"` // 工作状态

	HasBeenResurrected *bool `json:"has_been_resurrected,omitempty"` // 是否已恢复过 该Employee存在从离职改为在职的记录，记录条数>=1

	DuringResignCoolingOffPeriod *bool `json:"during_resign_cooling_off_period,omitempty"` // 员工状态为离职 && 离职日期在30天内(含30天)，离职天数=（今天日期-离职日期）+1

	IsSetCustomAvatar *bool `json:"is_set_custom_avatar,omitempty"` // 是否设置自定义头像

	IsRegistered *bool `json:"is_registered,omitempty"` // 是否激活过

	DepartmentPathInfos [][]*DepartmentBaseInfo `json:"department_path_infos,omitempty"` // 员工部门全路径节点 本字段不含根部门信息，部门顺序为父部门->当前部门 例如：三级部门为员工当前部门[[DepartmentBaseInfo{1,一级部门},DepartmentBaseInfo{2,二级部门}, DepartmentBaseInfo{3,三级部门}]]

	ResignTime *string `json:"resign_time,omitempty"` // 离职时间 管理后台进行离职操作的时间，系统自动生成，无法写入

	ResignedUserDepartmentPath map[string][]string `json:"resigned_user_department_path,omitempty"` // 离职用户离职前部门路径ID map<直属部门ID, 部门全路径ID集合且部门从大到小> 例如：{1, []int64{4,3,2,1}}，部门已删除则不返回

	ResignedUserDepartmentPathName map[string]*I18nText `json:"resigned_user_department_path_name,omitempty"` // 离职用户离职前部门路径名称 map<直属部门ID, 部门全路径名称且部门从大到小并按照-分割> 例如：{1, 部门4-部门3-部门2-部门1}，部门已删除则不返回

	ResignedDepartments []*Department `json:"resigned_departments,omitempty"` // 离职用户离职前部门信息，部门可能已删除，如需过滤请通过查询DeleteStatus进行过滤

	Avatar *ImageLink `json:"avatar,omitempty"` // 头像url

	BackgroundImage *string `json:"background_image,omitempty"` // 自定义背景图 url

	IsAdmin *bool `json:"is_admin,omitempty"` // 是否租户普通管理员

	DataSource *int `json:"data_source,omitempty"` // 数据来源

	GeoName *string `json:"geo_name,omitempty"` // 员工Geo

	SubscriptionIds []string `json:"subscription_ids,omitempty"` // 员工license

	VirtualOrgInfos []*UserVirtualOrgInfo `json:"virtual_org_infos,omitempty"` // 虚拟组织信息

	IsForbiddenDeleteEmployee *bool `json:"is_forbidden_delete_employee,omitempty"` // 拦截离职
}

type EmployeeBaseEntityBuilder struct {
	employeeId     string // EmployeeID 和UserID一致
	employeeIdFlag bool

	userId     string // UserID
	userIdFlag bool

	externalId     string // 外部ID ORM的EmployeeID
	externalIdFlag bool

	name     *Name // 姓名
	nameFlag bool

	mobile     string // 手机号
	mobileFlag bool

	email     string // 登录邮箱
	emailFlag bool

	personalEmail     string // 个人邮箱
	personalEmailFlag bool

	enterpriseEmail     string // 企业邮箱
	enterpriseEmailFlag bool

	gender     int // 性别
	genderFlag bool

	residentialAddress     string // 现居住地址
	residentialAddressFlag bool

	contactAddresses     []*ContactAddress // 联系地址
	contactAddressesFlag bool

	tenant     *Tenant // 租户
	tenantFlag bool

	departments     []*Department // 部门信息
	departmentsFlag bool

	employeeOrderInDepartments     []*UserDepartmentSortInfo // 用户在部门内的排序信息， 第一个部门为主部门
	employeeOrderInDepartmentsFlag bool

	userDepartmentPath     map[string][]string // 用户部门路径ID map<直属部门ID, 部门全路径ID集合且部门从大到小> 例如：{1, []int64{4,3,2,1}}
	userDepartmentPathFlag bool

	userDepartmentPathName     map[string]*I18nText // 用户部门路径名称 map<直属部门ID, 部门全路径名称且部门从大到小并按照-分割> 例如：{1, 部门4-部门3-部门2-部门1}
	userDepartmentPathNameFlag bool

	avatarKey     *Image // 图片信息
	avatarKeyFlag bool

	backgroundImageKey     string // 自定义背景图
	backgroundImageKeyFlag bool

	description      string // 个人签名
	descriptionFlag_ bool

	isSetCustomBackgroundImage     bool // 是否设置自定义背景图
	isSetCustomBackgroundImageFlag bool

	activeStatus     int // 用户活跃状态
	activeStatusFlag bool

	isResigned     bool // 是否离职
	isResignedFlag bool

	leaderId     string // 直属上级ID
	leaderIdFlag bool

	dottedLineLeaderIds     []string // 虚线上级ID
	dottedLineLeaderIdsFlag bool

	isPrimaryAdmin     bool // 是否租户超级管理员
	isPrimaryAdminFlag bool

	createTime     string // 创建时间
	createTimeFlag bool

	updateTime     string // 更新时间
	updateTimeFlag bool

	enterpriseEmailAliases     []string // 企业邮箱别名
	enterpriseEmailAliasesFlag bool

	customFieldValues     []*CustomFieldValue // 自定义字段值
	customFieldValuesFlag bool

	descriptionFlag     string // 个性签名Flag
	descriptionFlagFlag bool

	workStatus     *WorkStatus // 工作状态
	workStatusFlag bool

	hasBeenResurrected     bool // 是否已恢复过 该Employee存在从离职改为在职的记录，记录条数>=1
	hasBeenResurrectedFlag bool

	duringResignCoolingOffPeriod     bool // 员工状态为离职 && 离职日期在30天内(含30天)，离职天数=（今天日期-离职日期）+1
	duringResignCoolingOffPeriodFlag bool

	isSetCustomAvatar     bool // 是否设置自定义头像
	isSetCustomAvatarFlag bool

	isRegistered     bool // 是否激活过
	isRegisteredFlag bool

	departmentPathInfos     [][]*DepartmentBaseInfo // 员工部门全路径节点 本字段不含根部门信息，部门顺序为父部门->当前部门 例如：三级部门为员工当前部门[[DepartmentBaseInfo{1,一级部门},DepartmentBaseInfo{2,二级部门}, DepartmentBaseInfo{3,三级部门}]]
	departmentPathInfosFlag bool

	resignTime     string // 离职时间 管理后台进行离职操作的时间，系统自动生成，无法写入
	resignTimeFlag bool

	resignedUserDepartmentPath     map[string][]string // 离职用户离职前部门路径ID map<直属部门ID, 部门全路径ID集合且部门从大到小> 例如：{1, []int64{4,3,2,1}}，部门已删除则不返回
	resignedUserDepartmentPathFlag bool

	resignedUserDepartmentPathName     map[string]*I18nText // 离职用户离职前部门路径名称 map<直属部门ID, 部门全路径名称且部门从大到小并按照-分割> 例如：{1, 部门4-部门3-部门2-部门1}，部门已删除则不返回
	resignedUserDepartmentPathNameFlag bool

	resignedDepartments     []*Department // 离职用户离职前部门信息，部门可能已删除，如需过滤请通过查询DeleteStatus进行过滤
	resignedDepartmentsFlag bool

	avatar     *ImageLink // 头像url
	avatarFlag bool

	backgroundImage     string // 自定义背景图 url
	backgroundImageFlag bool

	isAdmin     bool // 是否租户普通管理员
	isAdminFlag bool

	dataSource     int // 数据来源
	dataSourceFlag bool

	geoName     string // 员工Geo
	geoNameFlag bool

	subscriptionIds     []string // 员工license
	subscriptionIdsFlag bool

	virtualOrgInfos     []*UserVirtualOrgInfo // 虚拟组织信息
	virtualOrgInfosFlag bool

	isForbiddenDeleteEmployee     bool // 拦截离职
	isForbiddenDeleteEmployeeFlag bool
}

func NewEmployeeBaseEntityBuilder() *EmployeeBaseEntityBuilder {
	builder := &EmployeeBaseEntityBuilder{}
	return builder
}

// EmployeeID 和UserID一致
//
// 示例值：sddasdeqwe
func (builder *EmployeeBaseEntityBuilder) EmployeeId(employeeId string) *EmployeeBaseEntityBuilder {
	builder.employeeId = employeeId
	builder.employeeIdFlag = true
	return builder
}

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

// 外部ID ORM的EmployeeID
//
// 示例值：u273y71
func (builder *EmployeeBaseEntityBuilder) ExternalId(externalId string) *EmployeeBaseEntityBuilder {
	builder.externalId = externalId
	builder.externalIdFlag = true
	return builder
}

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

// 手机号
//
// 示例值：13011111111 或 +8613011111111
func (builder *EmployeeBaseEntityBuilder) Mobile(mobile string) *EmployeeBaseEntityBuilder {
	builder.mobile = mobile
	builder.mobileFlag = true
	return builder
}

// 登录邮箱
//
// 示例值：zhangsan@gmail.com
func (builder *EmployeeBaseEntityBuilder) Email(email string) *EmployeeBaseEntityBuilder {
	builder.email = email
	builder.emailFlag = true
	return builder
}

// 个人邮箱
//
// 示例值：zhangsan@gmail.com
func (builder *EmployeeBaseEntityBuilder) PersonalEmail(personalEmail string) *EmployeeBaseEntityBuilder {
	builder.personalEmail = personalEmail
	builder.personalEmailFlag = true
	return builder
}

// 企业邮箱
//
// 示例值：zhangsan@gmail.com
func (builder *EmployeeBaseEntityBuilder) EnterpriseEmail(enterpriseEmail string) *EmployeeBaseEntityBuilder {
	builder.enterpriseEmail = enterpriseEmail
	builder.enterpriseEmailFlag = true
	return builder
}

// 性别
//
// 示例值：1
func (builder *EmployeeBaseEntityBuilder) Gender(gender int) *EmployeeBaseEntityBuilder {
	builder.gender = gender
	builder.genderFlag = true
	return builder
}

// 现居住地址
//
// 示例值：北京市朝阳大街101号
func (builder *EmployeeBaseEntityBuilder) ResidentialAddress(residentialAddress string) *EmployeeBaseEntityBuilder {
	builder.residentialAddress = residentialAddress
	builder.residentialAddressFlag = true
	return builder
}

// 联系地址
//
// 示例值：
func (builder *EmployeeBaseEntityBuilder) ContactAddresses(contactAddresses []*ContactAddress) *EmployeeBaseEntityBuilder {
	builder.contactAddresses = contactAddresses
	builder.contactAddressesFlag = true
	return builder
}

// 租户
//
// 示例值：
func (builder *EmployeeBaseEntityBuilder) Tenant(tenant *Tenant) *EmployeeBaseEntityBuilder {
	builder.tenant = tenant
	builder.tenantFlag = true
	return builder
}

// 部门信息
//
// 示例值：
func (builder *EmployeeBaseEntityBuilder) Departments(departments []*Department) *EmployeeBaseEntityBuilder {
	builder.departments = departments
	builder.departmentsFlag = true
	return builder
}

// 用户在部门内的排序信息， 第一个部门为主部门
//
// 示例值：
func (builder *EmployeeBaseEntityBuilder) EmployeeOrderInDepartments(employeeOrderInDepartments []*UserDepartmentSortInfo) *EmployeeBaseEntityBuilder {
	builder.employeeOrderInDepartments = employeeOrderInDepartments
	builder.employeeOrderInDepartmentsFlag = true
	return builder
}

// 用户部门路径ID map<直属部门ID, 部门全路径ID集合且部门从大到小> 例如：{1, []int64{4,3,2,1}}
//
// 示例值：
func (builder *EmployeeBaseEntityBuilder) UserDepartmentPath(userDepartmentPath map[string][]string) *EmployeeBaseEntityBuilder {
	builder.userDepartmentPath = userDepartmentPath
	builder.userDepartmentPathFlag = true
	return builder
}

// 用户部门路径名称 map<直属部门ID, 部门全路径名称且部门从大到小并按照-分割> 例如：{1, 部门4-部门3-部门2-部门1}
//
// 示例值：
func (builder *EmployeeBaseEntityBuilder) UserDepartmentPathName(userDepartmentPathName map[string]*I18nText) *EmployeeBaseEntityBuilder {
	builder.userDepartmentPathName = userDepartmentPathName
	builder.userDepartmentPathNameFlag = true
	return builder
}

// 图片信息
//
// 示例值：
func (builder *EmployeeBaseEntityBuilder) AvatarKey(avatarKey *Image) *EmployeeBaseEntityBuilder {
	builder.avatarKey = avatarKey
	builder.avatarKeyFlag = true
	return builder
}

// 自定义背景图
//
// 示例值：img_v2_8abc397a-9950-44ea-9302-e1d8fe00858g
func (builder *EmployeeBaseEntityBuilder) BackgroundImageKey(backgroundImageKey string) *EmployeeBaseEntityBuilder {
	builder.backgroundImageKey = backgroundImageKey
	builder.backgroundImageKeyFlag = true
	return builder
}

// 个人签名
//
// 示例值：新成员请多关照
func (builder *EmployeeBaseEntityBuilder) Description(description string) *EmployeeBaseEntityBuilder {
	builder.description = description
	builder.descriptionFlag_ = true
	return builder
}

// 是否设置自定义背景图
//
// 示例值：true
func (builder *EmployeeBaseEntityBuilder) IsSetCustomBackgroundImage(isSetCustomBackgroundImage bool) *EmployeeBaseEntityBuilder {
	builder.isSetCustomBackgroundImage = isSetCustomBackgroundImage
	builder.isSetCustomBackgroundImageFlag = true
	return builder
}

// 用户活跃状态
//
// 示例值：1
func (builder *EmployeeBaseEntityBuilder) ActiveStatus(activeStatus int) *EmployeeBaseEntityBuilder {
	builder.activeStatus = activeStatus
	builder.activeStatusFlag = true
	return builder
}

// 是否离职
//
// 示例值：true
func (builder *EmployeeBaseEntityBuilder) IsResigned(isResigned bool) *EmployeeBaseEntityBuilder {
	builder.isResigned = isResigned
	builder.isResignedFlag = true
	return builder
}

// 直属上级ID
//
// 示例值：uyg77nx
func (builder *EmployeeBaseEntityBuilder) LeaderId(leaderId string) *EmployeeBaseEntityBuilder {
	builder.leaderId = leaderId
	builder.leaderIdFlag = true
	return builder
}

// 虚线上级ID
//
// 示例值：
func (builder *EmployeeBaseEntityBuilder) DottedLineLeaderIds(dottedLineLeaderIds []string) *EmployeeBaseEntityBuilder {
	builder.dottedLineLeaderIds = dottedLineLeaderIds
	builder.dottedLineLeaderIdsFlag = true
	return builder
}

// 是否租户超级管理员
//
// 示例值：true
func (builder *EmployeeBaseEntityBuilder) IsPrimaryAdmin(isPrimaryAdmin bool) *EmployeeBaseEntityBuilder {
	builder.isPrimaryAdmin = isPrimaryAdmin
	builder.isPrimaryAdminFlag = true
	return builder
}

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

// 更新时间
//
// 示例值：1
func (builder *EmployeeBaseEntityBuilder) UpdateTime(updateTime string) *EmployeeBaseEntityBuilder {
	builder.updateTime = updateTime
	builder.updateTimeFlag = true
	return builder
}

// 企业邮箱别名
//
// 示例值：
func (builder *EmployeeBaseEntityBuilder) EnterpriseEmailAliases(enterpriseEmailAliases []string) *EmployeeBaseEntityBuilder {
	builder.enterpriseEmailAliases = enterpriseEmailAliases
	builder.enterpriseEmailAliasesFlag = true
	return builder
}

// 自定义字段值
//
// 示例值：
func (builder *EmployeeBaseEntityBuilder) CustomFieldValues(customFieldValues []*CustomFieldValue) *EmployeeBaseEntityBuilder {
	builder.customFieldValues = customFieldValues
	builder.customFieldValuesFlag = true
	return builder
}

// 个性签名Flag
//
// 示例值：1
func (builder *EmployeeBaseEntityBuilder) DescriptionFlag(descriptionFlag string) *EmployeeBaseEntityBuilder {
	builder.descriptionFlag = descriptionFlag
	builder.descriptionFlagFlag = true
	return builder
}

// 工作状态
//
// 示例值：
func (builder *EmployeeBaseEntityBuilder) WorkStatus(workStatus *WorkStatus) *EmployeeBaseEntityBuilder {
	builder.workStatus = workStatus
	builder.workStatusFlag = true
	return builder
}

// 是否已恢复过 该Employee存在从离职改为在职的记录，记录条数>=1
//
// 示例值：true
func (builder *EmployeeBaseEntityBuilder) HasBeenResurrected(hasBeenResurrected bool) *EmployeeBaseEntityBuilder {
	builder.hasBeenResurrected = hasBeenResurrected
	builder.hasBeenResurrectedFlag = true
	return builder
}

// 员工状态为离职 && 离职日期在30天内(含30天)，离职天数=（今天日期-离职日期）+1
//
// 示例值：true
func (builder *EmployeeBaseEntityBuilder) DuringResignCoolingOffPeriod(duringResignCoolingOffPeriod bool) *EmployeeBaseEntityBuilder {
	builder.duringResignCoolingOffPeriod = duringResignCoolingOffPeriod
	builder.duringResignCoolingOffPeriodFlag = true
	return builder
}

// 是否设置自定义头像
//
// 示例值：true
func (builder *EmployeeBaseEntityBuilder) IsSetCustomAvatar(isSetCustomAvatar bool) *EmployeeBaseEntityBuilder {
	builder.isSetCustomAvatar = isSetCustomAvatar
	builder.isSetCustomAvatarFlag = true
	return builder
}

// 是否激活过
//
// 示例值：true
func (builder *EmployeeBaseEntityBuilder) IsRegistered(isRegistered bool) *EmployeeBaseEntityBuilder {
	builder.isRegistered = isRegistered
	builder.isRegisteredFlag = true
	return builder
}

// 员工部门全路径节点 本字段不含根部门信息，部门顺序为父部门->当前部门 例如：三级部门为员工当前部门[[DepartmentBaseInfo{1,一级部门},DepartmentBaseInfo{2,二级部门}, DepartmentBaseInfo{3,三级部门}]]
//
// 示例值：
func (builder *EmployeeBaseEntityBuilder) DepartmentPathInfos(departmentPathInfos [][]*DepartmentBaseInfo) *EmployeeBaseEntityBuilder {
	builder.departmentPathInfos = departmentPathInfos
	builder.departmentPathInfosFlag = true
	return builder
}

// 离职时间 管理后台进行离职操作的时间，系统自动生成，无法写入
//
// 示例值：1
func (builder *EmployeeBaseEntityBuilder) ResignTime(resignTime string) *EmployeeBaseEntityBuilder {
	builder.resignTime = resignTime
	builder.resignTimeFlag = true
	return builder
}

// 离职用户离职前部门路径ID map<直属部门ID, 部门全路径ID集合且部门从大到小> 例如：{1, []int64{4,3,2,1}}，部门已删除则不返回
//
// 示例值：
func (builder *EmployeeBaseEntityBuilder) ResignedUserDepartmentPath(resignedUserDepartmentPath map[string][]string) *EmployeeBaseEntityBuilder {
	builder.resignedUserDepartmentPath = resignedUserDepartmentPath
	builder.resignedUserDepartmentPathFlag = true
	return builder
}

// 离职用户离职前部门路径名称 map<直属部门ID, 部门全路径名称且部门从大到小并按照-分割> 例如：{1, 部门4-部门3-部门2-部门1}，部门已删除则不返回
//
// 示例值：
func (builder *EmployeeBaseEntityBuilder) ResignedUserDepartmentPathName(resignedUserDepartmentPathName map[string]*I18nText) *EmployeeBaseEntityBuilder {
	builder.resignedUserDepartmentPathName = resignedUserDepartmentPathName
	builder.resignedUserDepartmentPathNameFlag = true
	return builder
}

// 离职用户离职前部门信息，部门可能已删除，如需过滤请通过查询DeleteStatus进行过滤
//
// 示例值：
func (builder *EmployeeBaseEntityBuilder) ResignedDepartments(resignedDepartments []*Department) *EmployeeBaseEntityBuilder {
	builder.resignedDepartments = resignedDepartments
	builder.resignedDepartmentsFlag = true
	return builder
}

// 头像url
//
// 示例值：
func (builder *EmployeeBaseEntityBuilder) Avatar(avatar *ImageLink) *EmployeeBaseEntityBuilder {
	builder.avatar = avatar
	builder.avatarFlag = true
	return builder
}

// 自定义背景图 url
//
// 示例值：http://sadui.com
func (builder *EmployeeBaseEntityBuilder) BackgroundImage(backgroundImage string) *EmployeeBaseEntityBuilder {
	builder.backgroundImage = backgroundImage
	builder.backgroundImageFlag = true
	return builder
}

// 是否租户普通管理员
//
// 示例值：true
func (builder *EmployeeBaseEntityBuilder) IsAdmin(isAdmin bool) *EmployeeBaseEntityBuilder {
	builder.isAdmin = isAdmin
	builder.isAdminFlag = true
	return builder
}

// 数据来源
//
// 示例值：
func (builder *EmployeeBaseEntityBuilder) DataSource(dataSource int) *EmployeeBaseEntityBuilder {
	builder.dataSource = dataSource
	builder.dataSourceFlag = true
	return builder
}

// 员工Geo
//
// 示例值：boe
func (builder *EmployeeBaseEntityBuilder) GeoName(geoName string) *EmployeeBaseEntityBuilder {
	builder.geoName = geoName
	builder.geoNameFlag = true
	return builder
}

// 员工license
//
// 示例值：
func (builder *EmployeeBaseEntityBuilder) SubscriptionIds(subscriptionIds []string) *EmployeeBaseEntityBuilder {
	builder.subscriptionIds = subscriptionIds
	builder.subscriptionIdsFlag = true
	return builder
}

// 虚拟组织信息
//
// 示例值：
func (builder *EmployeeBaseEntityBuilder) VirtualOrgInfos(virtualOrgInfos []*UserVirtualOrgInfo) *EmployeeBaseEntityBuilder {
	builder.virtualOrgInfos = virtualOrgInfos
	builder.virtualOrgInfosFlag = true
	return builder
}

// 拦截离职
//
// 示例值：
func (builder *EmployeeBaseEntityBuilder) IsForbiddenDeleteEmployee(isForbiddenDeleteEmployee bool) *EmployeeBaseEntityBuilder {
	builder.isForbiddenDeleteEmployee = isForbiddenDeleteEmployee
	builder.isForbiddenDeleteEmployeeFlag = true
	return builder
}

func (builder *EmployeeBaseEntityBuilder) Build() *EmployeeBaseEntity {
	req := &EmployeeBaseEntity{}
	if builder.employeeIdFlag {
		req.EmployeeId = &builder.employeeId

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

	}
	if builder.externalIdFlag {
		req.ExternalId = &builder.externalId

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.mobileFlag {
		req.Mobile = &builder.mobile

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

	}
	if builder.personalEmailFlag {
		req.PersonalEmail = &builder.personalEmail

	}
	if builder.enterpriseEmailFlag {
		req.EnterpriseEmail = &builder.enterpriseEmail

	}
	if builder.genderFlag {
		req.Gender = &builder.gender

	}
	if builder.residentialAddressFlag {
		req.ResidentialAddress = &builder.residentialAddress

	}
	if builder.contactAddressesFlag {
		req.ContactAddresses = builder.contactAddresses
	}
	if builder.tenantFlag {
		req.Tenant = builder.tenant
	}
	if builder.departmentsFlag {
		req.Departments = builder.departments
	}
	if builder.employeeOrderInDepartmentsFlag {
		req.EmployeeOrderInDepartments = builder.employeeOrderInDepartments
	}
	if builder.userDepartmentPathFlag {
		req.UserDepartmentPath = builder.userDepartmentPath
	}
	if builder.userDepartmentPathNameFlag {
		req.UserDepartmentPathName = builder.userDepartmentPathName
	}
	if builder.avatarKeyFlag {
		req.AvatarKey = builder.avatarKey
	}
	if builder.backgroundImageKeyFlag {
		req.BackgroundImageKey = &builder.backgroundImageKey

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

	}
	if builder.isSetCustomBackgroundImageFlag {
		req.IsSetCustomBackgroundImage = &builder.isSetCustomBackgroundImage

	}
	if builder.activeStatusFlag {
		req.ActiveStatus = &builder.activeStatus

	}
	if builder.isResignedFlag {
		req.IsResigned = &builder.isResigned

	}
	if builder.leaderIdFlag {
		req.LeaderId = &builder.leaderId

	}
	if builder.dottedLineLeaderIdsFlag {
		req.DottedLineLeaderIds = builder.dottedLineLeaderIds
	}
	if builder.isPrimaryAdminFlag {
		req.IsPrimaryAdmin = &builder.isPrimaryAdmin

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

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

	}
	if builder.enterpriseEmailAliasesFlag {
		req.EnterpriseEmailAliases = builder.enterpriseEmailAliases
	}
	if builder.customFieldValuesFlag {
		req.CustomFieldValues = builder.customFieldValues
	}
	if builder.descriptionFlagFlag {
		req.DescriptionFlag = &builder.descriptionFlag

	}
	if builder.workStatusFlag {
		req.WorkStatus = builder.workStatus
	}
	if builder.hasBeenResurrectedFlag {
		req.HasBeenResurrected = &builder.hasBeenResurrected

	}
	if builder.duringResignCoolingOffPeriodFlag {
		req.DuringResignCoolingOffPeriod = &builder.duringResignCoolingOffPeriod

	}
	if builder.isSetCustomAvatarFlag {
		req.IsSetCustomAvatar = &builder.isSetCustomAvatar

	}
	if builder.isRegisteredFlag {
		req.IsRegistered = &builder.isRegistered

	}
	if builder.departmentPathInfosFlag {
		req.DepartmentPathInfos = builder.departmentPathInfos
	}
	if builder.resignTimeFlag {
		req.ResignTime = &builder.resignTime

	}
	if builder.resignedUserDepartmentPathFlag {
		req.ResignedUserDepartmentPath = builder.resignedUserDepartmentPath
	}
	if builder.resignedUserDepartmentPathNameFlag {
		req.ResignedUserDepartmentPathName = builder.resignedUserDepartmentPathName
	}
	if builder.resignedDepartmentsFlag {
		req.ResignedDepartments = builder.resignedDepartments
	}
	if builder.avatarFlag {
		req.Avatar = builder.avatar
	}
	if builder.backgroundImageFlag {
		req.BackgroundImage = &builder.backgroundImage

	}
	if builder.isAdminFlag {
		req.IsAdmin = &builder.isAdmin

	}
	if builder.dataSourceFlag {
		req.DataSource = &builder.dataSource

	}
	if builder.geoNameFlag {
		req.GeoName = &builder.geoName

	}
	if builder.subscriptionIdsFlag {
		req.SubscriptionIds = builder.subscriptionIds
	}
	if builder.virtualOrgInfosFlag {
		req.VirtualOrgInfos = builder.virtualOrgInfos
	}
	if builder.isForbiddenDeleteEmployeeFlag {
		req.IsForbiddenDeleteEmployee = &builder.isForbiddenDeleteEmployee

	}
	return req
}

type EmployeeEducationAndWorkExperienceEntity struct {
	Educations []*Education `json:"educations,omitempty"` // 最高学历 -- 废弃\n1: optional string HighestlevelofEducation (apimeta.scope="directory:employee.experience.education:read"),\n最高学位教育 -- 废弃\n2: optional string HighestDegreeofEducation (apimeta.scope="directory:employee.experience.education:read"),\n教育经历

	WorkExperiences []*WorkExperience `json:"work_experiences,omitempty"` // 工作经历

	FormerEmployer *string `json:"former_employer,omitempty"` // 前工作单位

	PersonalProfiles []*PersonalProfile `json:"personal_profiles,omitempty"` // 个人资料附件

	PhotoOfIdPortraitSide *Attachment `json:"photo_of_id_portrait_side,omitempty"` // 附件

	PhotoOfIdEmblemSide *Attachment `json:"photo_of_id_emblem_side,omitempty"` // 附件

	IdPhoto *Attachment `json:"id_photo,omitempty"` // 附件

	Diploma *Attachment `json:"diploma,omitempty"` // 附件

	GraduationCertificate *Attachment `json:"graduation_certificate,omitempty"` // 附件

	CertificateOfMerit *Attachment `json:"certificate_of_merit,omitempty"` // 附件

	OffboardingPaperwork *Attachment `json:"offboarding_paperwork,omitempty"` // 附件

	HighestLevelOfEducationEntity *Education `json:"highest_level_of_education_entity,omitempty"` // 教育背景

	HighestDegreeOfEducationEntity *Education `json:"highest_degree_of_education_entity,omitempty"` // 教育背景
}

type EmployeeEducationAndWorkExperienceEntityBuilder struct {
	educations     []*Education // 最高学历 -- 废弃\n1: optional string HighestlevelofEducation (apimeta.scope="directory:employee.experience.education:read"),\n最高学位教育 -- 废弃\n2: optional string HighestDegreeofEducation (apimeta.scope="directory:employee.experience.education:read"),\n教育经历
	educationsFlag bool

	workExperiences     []*WorkExperience // 工作经历
	workExperiencesFlag bool

	formerEmployer     string // 前工作单位
	formerEmployerFlag bool

	personalProfiles     []*PersonalProfile // 个人资料附件
	personalProfilesFlag bool

	photoOfIdPortraitSide     *Attachment // 附件
	photoOfIdPortraitSideFlag bool

	photoOfIdEmblemSide     *Attachment // 附件
	photoOfIdEmblemSideFlag bool

	idPhoto     *Attachment // 附件
	idPhotoFlag bool

	diploma     *Attachment // 附件
	diplomaFlag bool

	graduationCertificate     *Attachment // 附件
	graduationCertificateFlag bool

	certificateOfMerit     *Attachment // 附件
	certificateOfMeritFlag bool

	offboardingPaperwork     *Attachment // 附件
	offboardingPaperworkFlag bool

	highestLevelOfEducationEntity     *Education // 教育背景
	highestLevelOfEducationEntityFlag bool

	highestDegreeOfEducationEntity     *Education // 教育背景
	highestDegreeOfEducationEntityFlag bool
}

func NewEmployeeEducationAndWorkExperienceEntityBuilder() *EmployeeEducationAndWorkExperienceEntityBuilder {
	builder := &EmployeeEducationAndWorkExperienceEntityBuilder{}
	return builder
}

// 最高学历 -- 废弃\n1: optional string HighestlevelofEducation (apimeta.scope="directory:employee.experience.education:read"),\n最高学位教育 -- 废弃\n2: optional string HighestDegreeofEducation (apimeta.scope="directory:employee.experience.education:read"),\n教育经历
//
// 示例值：
func (builder *EmployeeEducationAndWorkExperienceEntityBuilder) Educations(educations []*Education) *EmployeeEducationAndWorkExperienceEntityBuilder {
	builder.educations = educations
	builder.educationsFlag = true
	return builder
}

// 工作经历
//
// 示例值：
func (builder *EmployeeEducationAndWorkExperienceEntityBuilder) WorkExperiences(workExperiences []*WorkExperience) *EmployeeEducationAndWorkExperienceEntityBuilder {
	builder.workExperiences = workExperiences
	builder.workExperiencesFlag = true
	return builder
}

// 前工作单位
//
// 示例值：暂无
func (builder *EmployeeEducationAndWorkExperienceEntityBuilder) FormerEmployer(formerEmployer string) *EmployeeEducationAndWorkExperienceEntityBuilder {
	builder.formerEmployer = formerEmployer
	builder.formerEmployerFlag = true
	return builder
}

// 个人资料附件
//
// 示例值：
func (builder *EmployeeEducationAndWorkExperienceEntityBuilder) PersonalProfiles(personalProfiles []*PersonalProfile) *EmployeeEducationAndWorkExperienceEntityBuilder {
	builder.personalProfiles = personalProfiles
	builder.personalProfilesFlag = true
	return builder
}

// 附件
//
// 示例值：
func (builder *EmployeeEducationAndWorkExperienceEntityBuilder) PhotoOfIdPortraitSide(photoOfIdPortraitSide *Attachment) *EmployeeEducationAndWorkExperienceEntityBuilder {
	builder.photoOfIdPortraitSide = photoOfIdPortraitSide
	builder.photoOfIdPortraitSideFlag = true
	return builder
}

// 附件
//
// 示例值：
func (builder *EmployeeEducationAndWorkExperienceEntityBuilder) PhotoOfIdEmblemSide(photoOfIdEmblemSide *Attachment) *EmployeeEducationAndWorkExperienceEntityBuilder {
	builder.photoOfIdEmblemSide = photoOfIdEmblemSide
	builder.photoOfIdEmblemSideFlag = true
	return builder
}

// 附件
//
// 示例值：
func (builder *EmployeeEducationAndWorkExperienceEntityBuilder) IdPhoto(idPhoto *Attachment) *EmployeeEducationAndWorkExperienceEntityBuilder {
	builder.idPhoto = idPhoto
	builder.idPhotoFlag = true
	return builder
}

// 附件
//
// 示例值：
func (builder *EmployeeEducationAndWorkExperienceEntityBuilder) Diploma(diploma *Attachment) *EmployeeEducationAndWorkExperienceEntityBuilder {
	builder.diploma = diploma
	builder.diplomaFlag = true
	return builder
}

// 附件
//
// 示例值：
func (builder *EmployeeEducationAndWorkExperienceEntityBuilder) GraduationCertificate(graduationCertificate *Attachment) *EmployeeEducationAndWorkExperienceEntityBuilder {
	builder.graduationCertificate = graduationCertificate
	builder.graduationCertificateFlag = true
	return builder
}

// 附件
//
// 示例值：
func (builder *EmployeeEducationAndWorkExperienceEntityBuilder) CertificateOfMerit(certificateOfMerit *Attachment) *EmployeeEducationAndWorkExperienceEntityBuilder {
	builder.certificateOfMerit = certificateOfMerit
	builder.certificateOfMeritFlag = true
	return builder
}

// 附件
//
// 示例值：
func (builder *EmployeeEducationAndWorkExperienceEntityBuilder) OffboardingPaperwork(offboardingPaperwork *Attachment) *EmployeeEducationAndWorkExperienceEntityBuilder {
	builder.offboardingPaperwork = offboardingPaperwork
	builder.offboardingPaperworkFlag = true
	return builder
}

// 教育背景
//
// 示例值：1
func (builder *EmployeeEducationAndWorkExperienceEntityBuilder) HighestLevelOfEducationEntity(highestLevelOfEducationEntity *Education) *EmployeeEducationAndWorkExperienceEntityBuilder {
	builder.highestLevelOfEducationEntity = highestLevelOfEducationEntity
	builder.highestLevelOfEducationEntityFlag = true
	return builder
}

// 教育背景
//
// 示例值：1
func (builder *EmployeeEducationAndWorkExperienceEntityBuilder) HighestDegreeOfEducationEntity(highestDegreeOfEducationEntity *Education) *EmployeeEducationAndWorkExperienceEntityBuilder {
	builder.highestDegreeOfEducationEntity = highestDegreeOfEducationEntity
	builder.highestDegreeOfEducationEntityFlag = true
	return builder
}

func (builder *EmployeeEducationAndWorkExperienceEntityBuilder) Build() *EmployeeEducationAndWorkExperienceEntity {
	req := &EmployeeEducationAndWorkExperienceEntity{}
	if builder.educationsFlag {
		req.Educations = builder.educations
	}
	if builder.workExperiencesFlag {
		req.WorkExperiences = builder.workExperiences
	}
	if builder.formerEmployerFlag {
		req.FormerEmployer = &builder.formerEmployer

	}
	if builder.personalProfilesFlag {
		req.PersonalProfiles = builder.personalProfiles
	}
	if builder.photoOfIdPortraitSideFlag {
		req.PhotoOfIdPortraitSide = builder.photoOfIdPortraitSide
	}
	if builder.photoOfIdEmblemSideFlag {
		req.PhotoOfIdEmblemSide = builder.photoOfIdEmblemSide
	}
	if builder.idPhotoFlag {
		req.IdPhoto = builder.idPhoto
	}
	if builder.diplomaFlag {
		req.Diploma = builder.diploma
	}
	if builder.graduationCertificateFlag {
		req.GraduationCertificate = builder.graduationCertificate
	}
	if builder.certificateOfMeritFlag {
		req.CertificateOfMerit = builder.certificateOfMerit
	}
	if builder.offboardingPaperworkFlag {
		req.OffboardingPaperwork = builder.offboardingPaperwork
	}
	if builder.highestLevelOfEducationEntityFlag {
		req.HighestLevelOfEducationEntity = builder.highestLevelOfEducationEntity
	}
	if builder.highestDegreeOfEducationEntityFlag {
		req.HighestDegreeOfEducationEntity = builder.highestDegreeOfEducationEntity
	}
	return req
}

type EmployeeEntity struct {
	BaseInfo *EmployeeBaseEntity `json:"base_info,omitempty"` // 员工基础信息

	WorkInfo *EmployeeWorkEntity `json:"work_info,omitempty"` // 员工工作信息

	PersonalAndSocialRelationship *EmployeePersonalAndSocialRelationshipEntity `json:"personal_and_social_relationship,omitempty"` // 员工个人和社会关系

	EducationAndWorkExperience *EmployeeEducationAndWorkExperienceEntity `json:"education_and_work_experience,omitempty"` // 员工教育和工作经历
}

type EmployeeEntityBuilder struct {
	baseInfo     *EmployeeBaseEntity // 员工基础信息
	baseInfoFlag bool

	workInfo     *EmployeeWorkEntity // 员工工作信息
	workInfoFlag bool

	personalAndSocialRelationship     *EmployeePersonalAndSocialRelationshipEntity // 员工个人和社会关系
	personalAndSocialRelationshipFlag bool

	educationAndWorkExperience     *EmployeeEducationAndWorkExperienceEntity // 员工教育和工作经历
	educationAndWorkExperienceFlag bool
}

func NewEmployeeEntityBuilder() *EmployeeEntityBuilder {
	builder := &EmployeeEntityBuilder{}
	return builder
}

// 员工基础信息
//
// 示例值：
func (builder *EmployeeEntityBuilder) BaseInfo(baseInfo *EmployeeBaseEntity) *EmployeeEntityBuilder {
	builder.baseInfo = baseInfo
	builder.baseInfoFlag = true
	return builder
}

// 员工工作信息
//
// 示例值：
func (builder *EmployeeEntityBuilder) WorkInfo(workInfo *EmployeeWorkEntity) *EmployeeEntityBuilder {
	builder.workInfo = workInfo
	builder.workInfoFlag = true
	return builder
}

// 员工个人和社会关系
//
// 示例值：
func (builder *EmployeeEntityBuilder) PersonalAndSocialRelationship(personalAndSocialRelationship *EmployeePersonalAndSocialRelationshipEntity) *EmployeeEntityBuilder {
	builder.personalAndSocialRelationship = personalAndSocialRelationship
	builder.personalAndSocialRelationshipFlag = true
	return builder
}

// 员工教育和工作经历
//
// 示例值：
func (builder *EmployeeEntityBuilder) EducationAndWorkExperience(educationAndWorkExperience *EmployeeEducationAndWorkExperienceEntity) *EmployeeEntityBuilder {
	builder.educationAndWorkExperience = educationAndWorkExperience
	builder.educationAndWorkExperienceFlag = true
	return builder
}

func (builder *EmployeeEntityBuilder) Build() *EmployeeEntity {
	req := &EmployeeEntity{}
	if builder.baseInfoFlag {
		req.BaseInfo = builder.baseInfo
	}
	if builder.workInfoFlag {
		req.WorkInfo = builder.workInfo
	}
	if builder.personalAndSocialRelationshipFlag {
		req.PersonalAndSocialRelationship = builder.personalAndSocialRelationship
	}
	if builder.educationAndWorkExperienceFlag {
		req.EducationAndWorkExperience = builder.educationAndWorkExperience
	}
	return req
}

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

	EmployeeId *string `json:"employee_id,omitempty"` // 员工ID

	OpenEmployeeId *string `json:"open_employee_id,omitempty"` // 员工OpenID

	UnionEmployeeId *string `json:"union_employee_id,omitempty"` // 员工UnionID
}

type EmployeeIdConvertResultBuilder struct {
	id     string // ID
	idFlag bool

	employeeId     string // 员工ID
	employeeIdFlag bool

	openEmployeeId     string // 员工OpenID
	openEmployeeIdFlag bool

	unionEmployeeId     string // 员工UnionID
	unionEmployeeIdFlag bool
}

func NewEmployeeIdConvertResultBuilder() *EmployeeIdConvertResultBuilder {
	builder := &EmployeeIdConvertResultBuilder{}
	return builder
}

// ID
//
// 示例值：ahjdsioad
func (builder *EmployeeIdConvertResultBuilder) Id(id string) *EmployeeIdConvertResultBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 员工ID
//
// 示例值：ahjdsioad
func (builder *EmployeeIdConvertResultBuilder) EmployeeId(employeeId string) *EmployeeIdConvertResultBuilder {
	builder.employeeId = employeeId
	builder.employeeIdFlag = true
	return builder
}

// 员工OpenID
//
// 示例值：ou_55432732133012310fb4390611231de61
func (builder *EmployeeIdConvertResultBuilder) OpenEmployeeId(openEmployeeId string) *EmployeeIdConvertResultBuilder {
	builder.openEmployeeId = openEmployeeId
	builder.openEmployeeIdFlag = true
	return builder
}

// 员工UnionID
//
// 示例值：on_b25e9058531123dawac4b379c2e257906
func (builder *EmployeeIdConvertResultBuilder) UnionEmployeeId(unionEmployeeId string) *EmployeeIdConvertResultBuilder {
	builder.unionEmployeeId = unionEmployeeId
	builder.unionEmployeeIdFlag = true
	return builder
}

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

	}
	if builder.employeeIdFlag {
		req.EmployeeId = &builder.employeeId

	}
	if builder.openEmployeeIdFlag {
		req.OpenEmployeeId = &builder.openEmployeeId

	}
	if builder.unionEmployeeIdFlag {
		req.UnionEmployeeId = &builder.unionEmployeeId

	}
	return req
}

type EmployeePersonalAndSocialRelationshipEntity struct {
	Birthday *string `json:"birthday,omitempty"` // 出生日期。2007-05-20

	Age *string `json:"age,omitempty"` // 年龄

	Nationality *string `json:"nationality,omitempty"` // 国籍

	NativePlace *string `json:"native_place,omitempty"` // 籍贯

	Ethnicity *string `json:"ethnicity,omitempty"` // 民族

	MaritalStatus *string `json:"marital_status,omitempty"` // 婚姻状态

	PoliticsStatus *string `json:"politics_status,omitempty"` // 政治面貌

	BankAccounts []*BankAccount `json:"bank_accounts,omitempty"` // 银行账户

	Certificates []*Certificate `json:"certificates,omitempty"` // 证件列表

	RegisteredResidenceType *string `json:"registered_residence_type,omitempty"` // 户口类型

	Location *string `json:"location,omitempty"` // 户口所在地

	SocialSecurityNumber *string `json:"social_security_number,omitempty"` // 社保账号

	ProvidentFundNumber *string `json:"provident_fund_number,omitempty"` // 公积金账号

	EmergencyContacts []*EmergencyContact `json:"emergency_contacts,omitempty"` // 紧急联系人

	Dependents []*Dependent `json:"dependents,omitempty"` // 亲属列表

	ResidentTaxs []string `json:"resident_taxs,omitempty"` // 纳税身份信息

	Religion *string `json:"religion,omitempty"` // 宗教
}

type EmployeePersonalAndSocialRelationshipEntityBuilder struct {
	birthday     string // 出生日期。2007-05-20
	birthdayFlag bool

	age     string // 年龄
	ageFlag bool

	nationality     string // 国籍
	nationalityFlag bool

	nativePlace     string // 籍贯
	nativePlaceFlag bool

	ethnicity     string // 民族
	ethnicityFlag bool

	maritalStatus     string // 婚姻状态
	maritalStatusFlag bool

	politicsStatus     string // 政治面貌
	politicsStatusFlag bool

	bankAccounts     []*BankAccount // 银行账户
	bankAccountsFlag bool

	certificates     []*Certificate // 证件列表
	certificatesFlag bool

	registeredResidenceType     string // 户口类型
	registeredResidenceTypeFlag bool

	location     string // 户口所在地
	locationFlag bool

	socialSecurityNumber     string // 社保账号
	socialSecurityNumberFlag bool

	providentFundNumber     string // 公积金账号
	providentFundNumberFlag bool

	emergencyContacts     []*EmergencyContact // 紧急联系人
	emergencyContactsFlag bool

	dependents     []*Dependent // 亲属列表
	dependentsFlag bool

	residentTaxs     []string // 纳税身份信息
	residentTaxsFlag bool

	religion     string // 宗教
	religionFlag bool
}

func NewEmployeePersonalAndSocialRelationshipEntityBuilder() *EmployeePersonalAndSocialRelationshipEntityBuilder {
	builder := &EmployeePersonalAndSocialRelationshipEntityBuilder{}
	return builder
}

// 出生日期。2007-05-20
//
// 示例值：2007-03-20
func (builder *EmployeePersonalAndSocialRelationshipEntityBuilder) Birthday(birthday string) *EmployeePersonalAndSocialRelationshipEntityBuilder {
	builder.birthday = birthday
	builder.birthdayFlag = true
	return builder
}

// 年龄
//
// 示例值：22
func (builder *EmployeePersonalAndSocialRelationshipEntityBuilder) Age(age string) *EmployeePersonalAndSocialRelationshipEntityBuilder {
	builder.age = age
	builder.ageFlag = true
	return builder
}

// 国籍
//
// 示例值：MDCT00000012
func (builder *EmployeePersonalAndSocialRelationshipEntityBuilder) Nationality(nationality string) *EmployeePersonalAndSocialRelationshipEntityBuilder {
	builder.nationality = nationality
	builder.nationalityFlag = true
	return builder
}

// 籍贯
//
// 示例值：MDCT00000012
func (builder *EmployeePersonalAndSocialRelationshipEntityBuilder) NativePlace(nativePlace string) *EmployeePersonalAndSocialRelationshipEntityBuilder {
	builder.nativePlace = nativePlace
	builder.nativePlaceFlag = true
	return builder
}

// 民族
//
// 示例值：1
func (builder *EmployeePersonalAndSocialRelationshipEntityBuilder) Ethnicity(ethnicity string) *EmployeePersonalAndSocialRelationshipEntityBuilder {
	builder.ethnicity = ethnicity
	builder.ethnicityFlag = true
	return builder
}

// 婚姻状态
//
// 示例值：1
func (builder *EmployeePersonalAndSocialRelationshipEntityBuilder) MaritalStatus(maritalStatus string) *EmployeePersonalAndSocialRelationshipEntityBuilder {
	builder.maritalStatus = maritalStatus
	builder.maritalStatusFlag = true
	return builder
}

// 政治面貌
//
// 示例值：1
func (builder *EmployeePersonalAndSocialRelationshipEntityBuilder) PoliticsStatus(politicsStatus string) *EmployeePersonalAndSocialRelationshipEntityBuilder {
	builder.politicsStatus = politicsStatus
	builder.politicsStatusFlag = true
	return builder
}

// 银行账户
//
// 示例值：
func (builder *EmployeePersonalAndSocialRelationshipEntityBuilder) BankAccounts(bankAccounts []*BankAccount) *EmployeePersonalAndSocialRelationshipEntityBuilder {
	builder.bankAccounts = bankAccounts
	builder.bankAccountsFlag = true
	return builder
}

// 证件列表
//
// 示例值：
func (builder *EmployeePersonalAndSocialRelationshipEntityBuilder) Certificates(certificates []*Certificate) *EmployeePersonalAndSocialRelationshipEntityBuilder {
	builder.certificates = certificates
	builder.certificatesFlag = true
	return builder
}

// 户口类型
//
// 示例值：
func (builder *EmployeePersonalAndSocialRelationshipEntityBuilder) RegisteredResidenceType(registeredResidenceType string) *EmployeePersonalAndSocialRelationshipEntityBuilder {
	builder.registeredResidenceType = registeredResidenceType
	builder.registeredResidenceTypeFlag = true
	return builder
}

// 户口所在地
//
// 示例值：cn
func (builder *EmployeePersonalAndSocialRelationshipEntityBuilder) Location(location string) *EmployeePersonalAndSocialRelationshipEntityBuilder {
	builder.location = location
	builder.locationFlag = true
	return builder
}

// 社保账号
//
// 示例值：32494854035302
func (builder *EmployeePersonalAndSocialRelationshipEntityBuilder) SocialSecurityNumber(socialSecurityNumber string) *EmployeePersonalAndSocialRelationshipEntityBuilder {
	builder.socialSecurityNumber = socialSecurityNumber
	builder.socialSecurityNumberFlag = true
	return builder
}

// 公积金账号
//
// 示例值：24835946402142
func (builder *EmployeePersonalAndSocialRelationshipEntityBuilder) ProvidentFundNumber(providentFundNumber string) *EmployeePersonalAndSocialRelationshipEntityBuilder {
	builder.providentFundNumber = providentFundNumber
	builder.providentFundNumberFlag = true
	return builder
}

// 紧急联系人
//
// 示例值：
func (builder *EmployeePersonalAndSocialRelationshipEntityBuilder) EmergencyContacts(emergencyContacts []*EmergencyContact) *EmployeePersonalAndSocialRelationshipEntityBuilder {
	builder.emergencyContacts = emergencyContacts
	builder.emergencyContactsFlag = true
	return builder
}

// 亲属列表
//
// 示例值：
func (builder *EmployeePersonalAndSocialRelationshipEntityBuilder) Dependents(dependents []*Dependent) *EmployeePersonalAndSocialRelationshipEntityBuilder {
	builder.dependents = dependents
	builder.dependentsFlag = true
	return builder
}

// 纳税身份信息
//
// 示例值：
func (builder *EmployeePersonalAndSocialRelationshipEntityBuilder) ResidentTaxs(residentTaxs []string) *EmployeePersonalAndSocialRelationshipEntityBuilder {
	builder.residentTaxs = residentTaxs
	builder.residentTaxsFlag = true
	return builder
}

// 宗教
//
// 示例值：buddism
func (builder *EmployeePersonalAndSocialRelationshipEntityBuilder) Religion(religion string) *EmployeePersonalAndSocialRelationshipEntityBuilder {
	builder.religion = religion
	builder.religionFlag = true
	return builder
}

func (builder *EmployeePersonalAndSocialRelationshipEntityBuilder) Build() *EmployeePersonalAndSocialRelationshipEntity {
	req := &EmployeePersonalAndSocialRelationshipEntity{}
	if builder.birthdayFlag {
		req.Birthday = &builder.birthday

	}
	if builder.ageFlag {
		req.Age = &builder.age

	}
	if builder.nationalityFlag {
		req.Nationality = &builder.nationality

	}
	if builder.nativePlaceFlag {
		req.NativePlace = &builder.nativePlace

	}
	if builder.ethnicityFlag {
		req.Ethnicity = &builder.ethnicity

	}
	if builder.maritalStatusFlag {
		req.MaritalStatus = &builder.maritalStatus

	}
	if builder.politicsStatusFlag {
		req.PoliticsStatus = &builder.politicsStatus

	}
	if builder.bankAccountsFlag {
		req.BankAccounts = builder.bankAccounts
	}
	if builder.certificatesFlag {
		req.Certificates = builder.certificates
	}
	if builder.registeredResidenceTypeFlag {
		req.RegisteredResidenceType = &builder.registeredResidenceType

	}
	if builder.locationFlag {
		req.Location = &builder.location

	}
	if builder.socialSecurityNumberFlag {
		req.SocialSecurityNumber = &builder.socialSecurityNumber

	}
	if builder.providentFundNumberFlag {
		req.ProvidentFundNumber = &builder.providentFundNumber

	}
	if builder.emergencyContactsFlag {
		req.EmergencyContacts = builder.emergencyContacts
	}
	if builder.dependentsFlag {
		req.Dependents = builder.dependents
	}
	if builder.residentTaxsFlag {
		req.ResidentTaxs = builder.residentTaxs
	}
	if builder.religionFlag {
		req.Religion = &builder.religion

	}
	return req
}

type EmployeeStatusFilter struct {
	StaffStatus *int `json:"staff_status,omitempty"` // 用户雇员状态

	ActiveStatus *int `json:"active_status,omitempty"` // 用户活跃状态
}

type EmployeeStatusFilterBuilder struct {
	staffStatus     int // 用户雇员状态
	staffStatusFlag bool

	activeStatus     int // 用户活跃状态
	activeStatusFlag bool
}

func NewEmployeeStatusFilterBuilder() *EmployeeStatusFilterBuilder {
	builder := &EmployeeStatusFilterBuilder{}
	return builder
}

// 用户雇员状态
//
// 示例值：
func (builder *EmployeeStatusFilterBuilder) StaffStatus(staffStatus int) *EmployeeStatusFilterBuilder {
	builder.staffStatus = staffStatus
	builder.staffStatusFlag = true
	return builder
}

// 用户活跃状态
//
// 示例值：
func (builder *EmployeeStatusFilterBuilder) ActiveStatus(activeStatus int) *EmployeeStatusFilterBuilder {
	builder.activeStatus = activeStatus
	builder.activeStatusFlag = true
	return builder
}

func (builder *EmployeeStatusFilterBuilder) Build() *EmployeeStatusFilter {
	req := &EmployeeStatusFilter{}
	if builder.staffStatusFlag {
		req.StaffStatus = &builder.staffStatus

	}
	if builder.activeStatusFlag {
		req.ActiveStatus = &builder.activeStatus

	}
	return req
}

type EmployeeTraceInfo struct {
	Source *int `json:"source,omitempty"` // 创建来源

	IsInvite *bool `json:"is_invite,omitempty"` // 是否邀请

	InviterId *string `json:"inviter_id,omitempty"` // 邀请人id

	InviteOption *InviteOption `json:"invite_option,omitempty"` // 邀请

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

type EmployeeTraceInfoBuilder struct {
	source     int // 创建来源
	sourceFlag bool

	isInvite     bool // 是否邀请
	isInviteFlag bool

	inviterId     string // 邀请人id
	inviterIdFlag bool

	inviteOption     *InviteOption // 邀请
	inviteOptionFlag bool

	clientIp     string // 用户客户端的IP */
	clientIpFlag bool
}

func NewEmployeeTraceInfoBuilder() *EmployeeTraceInfoBuilder {
	builder := &EmployeeTraceInfoBuilder{}
	return builder
}

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

// 是否邀请
//
// 示例值：
func (builder *EmployeeTraceInfoBuilder) IsInvite(isInvite bool) *EmployeeTraceInfoBuilder {
	builder.isInvite = isInvite
	builder.isInviteFlag = true
	return builder
}

// 邀请人id
//
// 示例值：1
func (builder *EmployeeTraceInfoBuilder) InviterId(inviterId string) *EmployeeTraceInfoBuilder {
	builder.inviterId = inviterId
	builder.inviterIdFlag = true
	return builder
}

// 邀请
//
// 示例值：
func (builder *EmployeeTraceInfoBuilder) InviteOption(inviteOption *InviteOption) *EmployeeTraceInfoBuilder {
	builder.inviteOption = inviteOption
	builder.inviteOptionFlag = true
	return builder
}

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

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

	}
	if builder.isInviteFlag {
		req.IsInvite = &builder.isInvite

	}
	if builder.inviterIdFlag {
		req.InviterId = &builder.inviterId

	}
	if builder.inviteOptionFlag {
		req.InviteOption = builder.inviteOption
	}
	if builder.clientIpFlag {
		req.ClientIp = &builder.clientIp

	}
	return req
}

type EmployeeTypeEnum struct {
	EnumId *string `json:"enum_id,omitempty"` // 枚举id

	Content *I18nText `json:"content,omitempty"` // i18n文本

	EnumValue *string `json:"enum_value,omitempty"` // 枚举值

	EnumType *string `json:"enum_type,omitempty"` // 类型

	EnumStatus *string `json:"enum_status,omitempty"` // 状态

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

type EmployeeTypeEnumBuilder struct {
	enumId     string // 枚举id
	enumIdFlag bool

	content     *I18nText // i18n文本
	contentFlag bool

	enumValue     string // 枚举值
	enumValueFlag bool

	enumType     string // 类型
	enumTypeFlag bool

	enumStatus     string // 状态
	enumStatusFlag bool

	isDefault     bool // 是否默认值
	isDefaultFlag bool
}

func NewEmployeeTypeEnumBuilder() *EmployeeTypeEnumBuilder {
	builder := &EmployeeTypeEnumBuilder{}
	return builder
}

// 枚举id
//
// 示例值：asdasd1234123
func (builder *EmployeeTypeEnumBuilder) EnumId(enumId string) *EmployeeTypeEnumBuilder {
	builder.enumId = enumId
	builder.enumIdFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *EmployeeTypeEnumBuilder) Content(content *I18nText) *EmployeeTypeEnumBuilder {
	builder.content = content
	builder.contentFlag = true
	return builder
}

// 枚举值
//
// 示例值：1
func (builder *EmployeeTypeEnumBuilder) EnumValue(enumValue string) *EmployeeTypeEnumBuilder {
	builder.enumValue = enumValue
	builder.enumValueFlag = true
	return builder
}

// 类型
//
// 示例值：
func (builder *EmployeeTypeEnumBuilder) EnumType(enumType string) *EmployeeTypeEnumBuilder {
	builder.enumType = enumType
	builder.enumTypeFlag = true
	return builder
}

// 状态
//
// 示例值：
func (builder *EmployeeTypeEnumBuilder) EnumStatus(enumStatus string) *EmployeeTypeEnumBuilder {
	builder.enumStatus = enumStatus
	builder.enumStatusFlag = true
	return builder
}

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

func (builder *EmployeeTypeEnumBuilder) Build() *EmployeeTypeEnum {
	req := &EmployeeTypeEnum{}
	if builder.enumIdFlag {
		req.EnumId = &builder.enumId

	}
	if builder.contentFlag {
		req.Content = builder.content
	}
	if builder.enumValueFlag {
		req.EnumValue = &builder.enumValue

	}
	if builder.enumTypeFlag {
		req.EnumType = &builder.enumType

	}
	if builder.enumStatusFlag {
		req.EnumStatus = &builder.enumStatus

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

	}
	return req
}

type EmployeeWorkEntity struct {
	WorkCountryOrRegion *string `json:"work_country_or_region,omitempty"` // 工作地国家/地区

	WorkPlace *Place `json:"work_place,omitempty"` // 地点

	WorkStation *I18nText `json:"work_station,omitempty"` // i18n文本

	JobNumber *string `json:"job_number,omitempty"` // 工号

	ExtensionNumber *string `json:"extension_number,omitempty"` // 分机号

	JoinDate *string `json:"join_date,omitempty"` // 入职日期 2007-03-20

	EmploymentType *int `json:"employment_type,omitempty"` // 员工类型

	StaffStatus *int `json:"staff_status,omitempty"` // 员工人事状态

	Positions []*Position `json:"positions,omitempty"` // 岗位信息

	JobTitle *JobTitle `json:"job_title,omitempty"` // 职务

	JobLevel *JobLevel `json:"job_level,omitempty"` // 职级

	JobFamily *JobFamily `json:"job_family,omitempty"` // 序列

	FirstWorkDate *string `json:"first_work_date,omitempty"` // 首次参加工作日期 2007-03-20

	FirstJoinDate *string `json:"first_join_date,omitempty"` // 首次进入公司日期 2007-03-20

	ProbationPeriod *string `json:"probation_period,omitempty"` // 试用期 （月）

	RegularizationDate *string `json:"regularization_date,omitempty"` // 转正日期 2007-03-20

	ApplicationLable *string `json:"application_lable,omitempty"` // 转正申请

	ConvertStatus *string `json:"convert_status,omitempty"` // 转正状态

	ContractSubject *Company `json:"contract_subject,omitempty"` // 公司

	ContractType *string `json:"contract_type,omitempty"` // 合同类型

	ContractStartDate *string `json:"contract_start_date,omitempty"` // 合同开始日期 2007-03-20

	ContractExpirationDate *string `json:"contract_expiration_date,omitempty"` // 合同到期日期 2007-03-20

	LaborContractSigningTimes *string `json:"labor_contract_signing_times,omitempty"` // 劳动合同签订次数

	ResignDate *string `json:"resign_date,omitempty"` // 离职日期 2007-03-20

	ResignReason *string `json:"resign_reason,omitempty"` // 离职原因

	ResignRemark *string `json:"resign_remark,omitempty"` // 离职备注

	ResignType *string `json:"resign_type,omitempty"` // 离职类型

	CancelledEntryType *string `json:"cancelled_entry_type,omitempty"` // 取消入职原因

	CancelledEntryRemark *string `json:"cancelled_entry_remark,omitempty"` // 取消入职备注

	RecruitmentType *string `json:"recruitment_type,omitempty"` // 招聘类型

	SeniorityDate *string `json:"seniority_date,omitempty"` // 司龄起算日期 格式为2007-05-20
}

type EmployeeWorkEntityBuilder struct {
	workCountryOrRegion     string // 工作地国家/地区
	workCountryOrRegionFlag bool

	workPlace     *Place // 地点
	workPlaceFlag bool

	workStation     *I18nText // i18n文本
	workStationFlag bool

	jobNumber     string // 工号
	jobNumberFlag bool

	extensionNumber     string // 分机号
	extensionNumberFlag bool

	joinDate     string // 入职日期 2007-03-20
	joinDateFlag bool

	employmentType     int // 员工类型
	employmentTypeFlag bool

	staffStatus     int // 员工人事状态
	staffStatusFlag bool

	positions     []*Position // 岗位信息
	positionsFlag bool

	jobTitle     *JobTitle // 职务
	jobTitleFlag bool

	jobLevel     *JobLevel // 职级
	jobLevelFlag bool

	jobFamily     *JobFamily // 序列
	jobFamilyFlag bool

	firstWorkDate     string // 首次参加工作日期 2007-03-20
	firstWorkDateFlag bool

	firstJoinDate     string // 首次进入公司日期 2007-03-20
	firstJoinDateFlag bool

	probationPeriod     string // 试用期 （月）
	probationPeriodFlag bool

	regularizationDate     string // 转正日期 2007-03-20
	regularizationDateFlag bool

	applicationLable     string // 转正申请
	applicationLableFlag bool

	convertStatus     string // 转正状态
	convertStatusFlag bool

	contractSubject     *Company // 公司
	contractSubjectFlag bool

	contractType     string // 合同类型
	contractTypeFlag bool

	contractStartDate     string // 合同开始日期 2007-03-20
	contractStartDateFlag bool

	contractExpirationDate     string // 合同到期日期 2007-03-20
	contractExpirationDateFlag bool

	laborContractSigningTimes     string // 劳动合同签订次数
	laborContractSigningTimesFlag bool

	resignDate     string // 离职日期 2007-03-20
	resignDateFlag bool

	resignReason     string // 离职原因
	resignReasonFlag bool

	resignRemark     string // 离职备注
	resignRemarkFlag bool

	resignType     string // 离职类型
	resignTypeFlag bool

	cancelledEntryType     string // 取消入职原因
	cancelledEntryTypeFlag bool

	cancelledEntryRemark     string // 取消入职备注
	cancelledEntryRemarkFlag bool

	recruitmentType     string // 招聘类型
	recruitmentTypeFlag bool

	seniorityDate     string // 司龄起算日期 格式为2007-05-20
	seniorityDateFlag bool
}

func NewEmployeeWorkEntityBuilder() *EmployeeWorkEntityBuilder {
	builder := &EmployeeWorkEntityBuilder{}
	return builder
}

// 工作地国家/地区
//
// 示例值：MDCT00000012
func (builder *EmployeeWorkEntityBuilder) WorkCountryOrRegion(workCountryOrRegion string) *EmployeeWorkEntityBuilder {
	builder.workCountryOrRegion = workCountryOrRegion
	builder.workCountryOrRegionFlag = true
	return builder
}

// 地点
//
// 示例值：
func (builder *EmployeeWorkEntityBuilder) WorkPlace(workPlace *Place) *EmployeeWorkEntityBuilder {
	builder.workPlace = workPlace
	builder.workPlaceFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *EmployeeWorkEntityBuilder) WorkStation(workStation *I18nText) *EmployeeWorkEntityBuilder {
	builder.workStation = workStation
	builder.workStationFlag = true
	return builder
}

// 工号
//
// 示例值：2845435
func (builder *EmployeeWorkEntityBuilder) JobNumber(jobNumber string) *EmployeeWorkEntityBuilder {
	builder.jobNumber = jobNumber
	builder.jobNumberFlag = true
	return builder
}

// 分机号
//
// 示例值：2845435
func (builder *EmployeeWorkEntityBuilder) ExtensionNumber(extensionNumber string) *EmployeeWorkEntityBuilder {
	builder.extensionNumber = extensionNumber
	builder.extensionNumberFlag = true
	return builder
}

// 入职日期 2007-03-20
//
// 示例值：2007-03-20
func (builder *EmployeeWorkEntityBuilder) JoinDate(joinDate string) *EmployeeWorkEntityBuilder {
	builder.joinDate = joinDate
	builder.joinDateFlag = true
	return builder
}

// 员工类型
//
// 示例值：
func (builder *EmployeeWorkEntityBuilder) EmploymentType(employmentType int) *EmployeeWorkEntityBuilder {
	builder.employmentType = employmentType
	builder.employmentTypeFlag = true
	return builder
}

// 员工人事状态
//
// 示例值：
func (builder *EmployeeWorkEntityBuilder) StaffStatus(staffStatus int) *EmployeeWorkEntityBuilder {
	builder.staffStatus = staffStatus
	builder.staffStatusFlag = true
	return builder
}

// 岗位信息
//
// 示例值：
func (builder *EmployeeWorkEntityBuilder) Positions(positions []*Position) *EmployeeWorkEntityBuilder {
	builder.positions = positions
	builder.positionsFlag = true
	return builder
}

// 职务
//
// 示例值：
func (builder *EmployeeWorkEntityBuilder) JobTitle(jobTitle *JobTitle) *EmployeeWorkEntityBuilder {
	builder.jobTitle = jobTitle
	builder.jobTitleFlag = true
	return builder
}

// 职级
//
// 示例值：
func (builder *EmployeeWorkEntityBuilder) JobLevel(jobLevel *JobLevel) *EmployeeWorkEntityBuilder {
	builder.jobLevel = jobLevel
	builder.jobLevelFlag = true
	return builder
}

// 序列
//
// 示例值：
func (builder *EmployeeWorkEntityBuilder) JobFamily(jobFamily *JobFamily) *EmployeeWorkEntityBuilder {
	builder.jobFamily = jobFamily
	builder.jobFamilyFlag = true
	return builder
}

// 首次参加工作日期 2007-03-20
//
// 示例值：2022-01-01
func (builder *EmployeeWorkEntityBuilder) FirstWorkDate(firstWorkDate string) *EmployeeWorkEntityBuilder {
	builder.firstWorkDate = firstWorkDate
	builder.firstWorkDateFlag = true
	return builder
}

// 首次进入公司日期 2007-03-20
//
// 示例值：2022-01-01
func (builder *EmployeeWorkEntityBuilder) FirstJoinDate(firstJoinDate string) *EmployeeWorkEntityBuilder {
	builder.firstJoinDate = firstJoinDate
	builder.firstJoinDateFlag = true
	return builder
}

// 试用期 （月）
//
// 示例值：1
func (builder *EmployeeWorkEntityBuilder) ProbationPeriod(probationPeriod string) *EmployeeWorkEntityBuilder {
	builder.probationPeriod = probationPeriod
	builder.probationPeriodFlag = true
	return builder
}

// 转正日期 2007-03-20
//
// 示例值：2022-01-01
func (builder *EmployeeWorkEntityBuilder) RegularizationDate(regularizationDate string) *EmployeeWorkEntityBuilder {
	builder.regularizationDate = regularizationDate
	builder.regularizationDateFlag = true
	return builder
}

// 转正申请
//
// 示例值：申请转正
func (builder *EmployeeWorkEntityBuilder) ApplicationLable(applicationLable string) *EmployeeWorkEntityBuilder {
	builder.applicationLable = applicationLable
	builder.applicationLableFlag = true
	return builder
}

// 转正状态
//
// 示例值：
func (builder *EmployeeWorkEntityBuilder) ConvertStatus(convertStatus string) *EmployeeWorkEntityBuilder {
	builder.convertStatus = convertStatus
	builder.convertStatusFlag = true
	return builder
}

// 公司
//
// 示例值：
func (builder *EmployeeWorkEntityBuilder) ContractSubject(contractSubject *Company) *EmployeeWorkEntityBuilder {
	builder.contractSubject = contractSubject
	builder.contractSubjectFlag = true
	return builder
}

// 合同类型
//
// 示例值：1
func (builder *EmployeeWorkEntityBuilder) ContractType(contractType string) *EmployeeWorkEntityBuilder {
	builder.contractType = contractType
	builder.contractTypeFlag = true
	return builder
}

// 合同开始日期 2007-03-20
//
// 示例值：2007-03-20
func (builder *EmployeeWorkEntityBuilder) ContractStartDate(contractStartDate string) *EmployeeWorkEntityBuilder {
	builder.contractStartDate = contractStartDate
	builder.contractStartDateFlag = true
	return builder
}

// 合同到期日期 2007-03-20
//
// 示例值：2007-03-20
func (builder *EmployeeWorkEntityBuilder) ContractExpirationDate(contractExpirationDate string) *EmployeeWorkEntityBuilder {
	builder.contractExpirationDate = contractExpirationDate
	builder.contractExpirationDateFlag = true
	return builder
}

// 劳动合同签订次数
//
// 示例值：1
func (builder *EmployeeWorkEntityBuilder) LaborContractSigningTimes(laborContractSigningTimes string) *EmployeeWorkEntityBuilder {
	builder.laborContractSigningTimes = laborContractSigningTimes
	builder.laborContractSigningTimesFlag = true
	return builder
}

// 离职日期 2007-03-20
//
// 示例值：2007-03-20
func (builder *EmployeeWorkEntityBuilder) ResignDate(resignDate string) *EmployeeWorkEntityBuilder {
	builder.resignDate = resignDate
	builder.resignDateFlag = true
	return builder
}

// 离职原因
//
// 示例值：
func (builder *EmployeeWorkEntityBuilder) ResignReason(resignReason string) *EmployeeWorkEntityBuilder {
	builder.resignReason = resignReason
	builder.resignReasonFlag = true
	return builder
}

// 离职备注
//
// 示例值：个人原因
func (builder *EmployeeWorkEntityBuilder) ResignRemark(resignRemark string) *EmployeeWorkEntityBuilder {
	builder.resignRemark = resignRemark
	builder.resignRemarkFlag = true
	return builder
}

// 离职类型
//
// 示例值：
func (builder *EmployeeWorkEntityBuilder) ResignType(resignType string) *EmployeeWorkEntityBuilder {
	builder.resignType = resignType
	builder.resignTypeFlag = true
	return builder
}

// 取消入职原因
//
// 示例值：
func (builder *EmployeeWorkEntityBuilder) CancelledEntryType(cancelledEntryType string) *EmployeeWorkEntityBuilder {
	builder.cancelledEntryType = cancelledEntryType
	builder.cancelledEntryTypeFlag = true
	return builder
}

// 取消入职备注
//
// 示例值：个人原因
func (builder *EmployeeWorkEntityBuilder) CancelledEntryRemark(cancelledEntryRemark string) *EmployeeWorkEntityBuilder {
	builder.cancelledEntryRemark = cancelledEntryRemark
	builder.cancelledEntryRemarkFlag = true
	return builder
}

// 招聘类型
//
// 示例值：1
func (builder *EmployeeWorkEntityBuilder) RecruitmentType(recruitmentType string) *EmployeeWorkEntityBuilder {
	builder.recruitmentType = recruitmentType
	builder.recruitmentTypeFlag = true
	return builder
}

// 司龄起算日期 格式为2007-05-20
//
// 示例值：1
func (builder *EmployeeWorkEntityBuilder) SeniorityDate(seniorityDate string) *EmployeeWorkEntityBuilder {
	builder.seniorityDate = seniorityDate
	builder.seniorityDateFlag = true
	return builder
}

func (builder *EmployeeWorkEntityBuilder) Build() *EmployeeWorkEntity {
	req := &EmployeeWorkEntity{}
	if builder.workCountryOrRegionFlag {
		req.WorkCountryOrRegion = &builder.workCountryOrRegion

	}
	if builder.workPlaceFlag {
		req.WorkPlace = builder.workPlace
	}
	if builder.workStationFlag {
		req.WorkStation = builder.workStation
	}
	if builder.jobNumberFlag {
		req.JobNumber = &builder.jobNumber

	}
	if builder.extensionNumberFlag {
		req.ExtensionNumber = &builder.extensionNumber

	}
	if builder.joinDateFlag {
		req.JoinDate = &builder.joinDate

	}
	if builder.employmentTypeFlag {
		req.EmploymentType = &builder.employmentType

	}
	if builder.staffStatusFlag {
		req.StaffStatus = &builder.staffStatus

	}
	if builder.positionsFlag {
		req.Positions = builder.positions
	}
	if builder.jobTitleFlag {
		req.JobTitle = builder.jobTitle
	}
	if builder.jobLevelFlag {
		req.JobLevel = builder.jobLevel
	}
	if builder.jobFamilyFlag {
		req.JobFamily = builder.jobFamily
	}
	if builder.firstWorkDateFlag {
		req.FirstWorkDate = &builder.firstWorkDate

	}
	if builder.firstJoinDateFlag {
		req.FirstJoinDate = &builder.firstJoinDate

	}
	if builder.probationPeriodFlag {
		req.ProbationPeriod = &builder.probationPeriod

	}
	if builder.regularizationDateFlag {
		req.RegularizationDate = &builder.regularizationDate

	}
	if builder.applicationLableFlag {
		req.ApplicationLable = &builder.applicationLable

	}
	if builder.convertStatusFlag {
		req.ConvertStatus = &builder.convertStatus

	}
	if builder.contractSubjectFlag {
		req.ContractSubject = builder.contractSubject
	}
	if builder.contractTypeFlag {
		req.ContractType = &builder.contractType

	}
	if builder.contractStartDateFlag {
		req.ContractStartDate = &builder.contractStartDate

	}
	if builder.contractExpirationDateFlag {
		req.ContractExpirationDate = &builder.contractExpirationDate

	}
	if builder.laborContractSigningTimesFlag {
		req.LaborContractSigningTimes = &builder.laborContractSigningTimes

	}
	if builder.resignDateFlag {
		req.ResignDate = &builder.resignDate

	}
	if builder.resignReasonFlag {
		req.ResignReason = &builder.resignReason

	}
	if builder.resignRemarkFlag {
		req.ResignRemark = &builder.resignRemark

	}
	if builder.resignTypeFlag {
		req.ResignType = &builder.resignType

	}
	if builder.cancelledEntryTypeFlag {
		req.CancelledEntryType = &builder.cancelledEntryType

	}
	if builder.cancelledEntryRemarkFlag {
		req.CancelledEntryRemark = &builder.cancelledEntryRemark

	}
	if builder.recruitmentTypeFlag {
		req.RecruitmentType = &builder.recruitmentType

	}
	if builder.seniorityDateFlag {
		req.SeniorityDate = &builder.seniorityDate

	}
	return req
}

type EntityInfo struct {
	Id *string `json:"id,omitempty"` // 实体ID

	EntityType *int `json:"entity_type,omitempty"` // 实体类型
}

type EntityInfoBuilder struct {
	id     string // 实体ID
	idFlag bool

	entityType     int // 实体类型
	entityTypeFlag bool
}

func NewEntityInfoBuilder() *EntityInfoBuilder {
	builder := &EntityInfoBuilder{}
	return builder
}

// 实体ID
//
// 示例值：7259644494420836371
func (builder *EntityInfoBuilder) Id(id string) *EntityInfoBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 实体类型
//
// 示例值：1
func (builder *EntityInfoBuilder) EntityType(entityType int) *EntityInfoBuilder {
	builder.entityType = entityType
	builder.entityTypeFlag = true
	return builder
}

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

	}
	if builder.entityTypeFlag {
		req.EntityType = &builder.entityType

	}
	return req
}

type EnumMeta struct {
	Type *string `json:"type,omitempty"` // 枚举类型

	OptionIds []string `json:"option_ids,omitempty"` // 选项id有序列表

	OptionValues map[string]*EnumOption `json:"option_values,omitempty"` // 选项值

	DefaultOptionId *string `json:"default_option_id,omitempty"` // 默认选项
}

type EnumMetaBuilder struct {
	type_    string // 枚举类型
	typeFlag bool

	optionIds     []string // 选项id有序列表
	optionIdsFlag bool

	optionValues     map[string]*EnumOption // 选项值
	optionValuesFlag bool

	defaultOptionId     string // 默认选项
	defaultOptionIdFlag bool
}

func NewEnumMetaBuilder() *EnumMetaBuilder {
	builder := &EnumMetaBuilder{}
	return builder
}

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

// 选项id有序列表
//
// 示例值：
func (builder *EnumMetaBuilder) OptionIds(optionIds []string) *EnumMetaBuilder {
	builder.optionIds = optionIds
	builder.optionIdsFlag = true
	return builder
}

// 选项值
//
// 示例值：
func (builder *EnumMetaBuilder) OptionValues(optionValues map[string]*EnumOption) *EnumMetaBuilder {
	builder.optionValues = optionValues
	builder.optionValuesFlag = true
	return builder
}

// 默认选项
//
// 示例值：C-123123123
func (builder *EnumMetaBuilder) DefaultOptionId(defaultOptionId string) *EnumMetaBuilder {
	builder.defaultOptionId = defaultOptionId
	builder.defaultOptionIdFlag = true
	return builder
}

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

	}
	if builder.optionIdsFlag {
		req.OptionIds = builder.optionIds
	}
	if builder.optionValuesFlag {
		req.OptionValues = builder.optionValues
	}
	if builder.defaultOptionIdFlag {
		req.DefaultOptionId = &builder.defaultOptionId

	}
	return req
}

type EnumOption struct {
	Id *string `json:"id,omitempty"` // 选项ID

	ExternalId *string `json:"external_id,omitempty"` // 选项自定义ID

	Name *I18nText `json:"name,omitempty"` // i18n文本

	Value *I18nText `json:"value,omitempty"` // i18n文本

	Description map[string]string `json:"description,omitempty"` // 枚举项国际化描述 仅限people admin兼容使用

	IsEnabled *bool `json:"is_enabled,omitempty"` // 是否启用
}

type EnumOptionBuilder struct {
	id     string // 选项ID
	idFlag bool

	externalId     string // 选项自定义ID
	externalIdFlag bool

	name     *I18nText // i18n文本
	nameFlag bool

	value     *I18nText // i18n文本
	valueFlag bool

	description     map[string]string // 枚举项国际化描述 仅限people admin兼容使用
	descriptionFlag bool

	isEnabled     bool // 是否启用
	isEnabledFlag bool
}

func NewEnumOptionBuilder() *EnumOptionBuilder {
	builder := &EnumOptionBuilder{}
	return builder
}

// 选项ID
//
// 示例值：123123
func (builder *EnumOptionBuilder) Id(id string) *EnumOptionBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 选项自定义ID
//
// 示例值：123123
func (builder *EnumOptionBuilder) ExternalId(externalId string) *EnumOptionBuilder {
	builder.externalId = externalId
	builder.externalIdFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *EnumOptionBuilder) Name(name *I18nText) *EnumOptionBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *EnumOptionBuilder) Value(value *I18nText) *EnumOptionBuilder {
	builder.value = value
	builder.valueFlag = true
	return builder
}

// 枚举项国际化描述 仅限people admin兼容使用
//
// 示例值：
func (builder *EnumOptionBuilder) Description(description map[string]string) *EnumOptionBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 是否启用
//
// 示例值：
func (builder *EnumOptionBuilder) IsEnabled(isEnabled bool) *EnumOptionBuilder {
	builder.isEnabled = isEnabled
	builder.isEnabledFlag = true
	return builder
}

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

	}
	if builder.externalIdFlag {
		req.ExternalId = &builder.externalId

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.valueFlag {
		req.Value = builder.value
	}
	if builder.descriptionFlag {
		req.Description = builder.description
	}
	if builder.isEnabledFlag {
		req.IsEnabled = &builder.isEnabled

	}
	return req
}

type EnumValue struct {
	EnumIds []string `json:"enum_ids,omitempty"` // 选项结果ID

	EnumName map[string]*OptionValue `json:"enum_name,omitempty"` // 选项结果名称\n没有用到且影响传参数 忽略

	EnumType *string `json:"enum_type,omitempty"` // 选项类型
}

type EnumValueBuilder struct {
	enumIds     []string // 选项结果ID
	enumIdsFlag bool

	enumName     map[string]*OptionValue // 选项结果名称\n没有用到且影响传参数 忽略
	enumNameFlag bool

	enumType     string // 选项类型
	enumTypeFlag bool
}

func NewEnumValueBuilder() *EnumValueBuilder {
	builder := &EnumValueBuilder{}
	return builder
}

// 选项结果ID
//
// 示例值：
func (builder *EnumValueBuilder) EnumIds(enumIds []string) *EnumValueBuilder {
	builder.enumIds = enumIds
	builder.enumIdsFlag = true
	return builder
}

// 选项结果名称\n没有用到且影响传参数 忽略
//
// 示例值：
func (builder *EnumValueBuilder) EnumName(enumName map[string]*OptionValue) *EnumValueBuilder {
	builder.enumName = enumName
	builder.enumNameFlag = true
	return builder
}

// 选项类型
//
// 示例值：
func (builder *EnumValueBuilder) EnumType(enumType string) *EnumValueBuilder {
	builder.enumType = enumType
	builder.enumTypeFlag = true
	return builder
}

func (builder *EnumValueBuilder) Build() *EnumValue {
	req := &EnumValue{}
	if builder.enumIdsFlag {
		req.EnumIds = builder.enumIds
	}
	if builder.enumNameFlag {
		req.EnumName = builder.enumName
	}
	if builder.enumTypeFlag {
		req.EnumType = &builder.enumType

	}
	return req
}

type FieldContentEntity struct {
	TextValue *I18nText `json:"text_value,omitempty"` // i18n文本

	UrlValue *UrlValue `json:"url_value,omitempty"` // 链接

	EnumValue *EnumValue `json:"enum_value,omitempty"` // 枚举

	UserValue *UserValue `json:"user_value,omitempty"` // 泛化用户类型的内容，接口设计允许实际允许Bot、Mail等非自然人用户，产品限制仅User

	DateTimeValue *string `json:"date_time_value,omitempty"` // 毫秒时间戳

	NumberValue *string `json:"number_value,omitempty"` // 数字

	BooleanValue *bool `json:"boolean_value,omitempty"` // 布尔值

	Department *DepartmentField `json:"department,omitempty"` // 部门字段

	Avator *Image `json:"avator,omitempty"` // 图片信息

	FieldType *int `json:"field_type,omitempty"` // 字段内容类型
}

type FieldContentEntityBuilder struct {
	textValue     *I18nText // i18n文本
	textValueFlag bool

	urlValue     *UrlValue // 链接
	urlValueFlag bool

	enumValue     *EnumValue // 枚举
	enumValueFlag bool

	userValue     *UserValue // 泛化用户类型的内容，接口设计允许实际允许Bot、Mail等非自然人用户，产品限制仅User
	userValueFlag bool

	dateTimeValue     string // 毫秒时间戳
	dateTimeValueFlag bool

	numberValue     string // 数字
	numberValueFlag bool

	booleanValue     bool // 布尔值
	booleanValueFlag bool

	department     *DepartmentField // 部门字段
	departmentFlag bool

	avator     *Image // 图片信息
	avatorFlag bool

	fieldType     int // 字段内容类型
	fieldTypeFlag bool
}

func NewFieldContentEntityBuilder() *FieldContentEntityBuilder {
	builder := &FieldContentEntityBuilder{}
	return builder
}

// i18n文本
//
// 示例值：
func (builder *FieldContentEntityBuilder) TextValue(textValue *I18nText) *FieldContentEntityBuilder {
	builder.textValue = textValue
	builder.textValueFlag = true
	return builder
}

// 链接
//
// 示例值：
func (builder *FieldContentEntityBuilder) UrlValue(urlValue *UrlValue) *FieldContentEntityBuilder {
	builder.urlValue = urlValue
	builder.urlValueFlag = true
	return builder
}

// 枚举
//
// 示例值：
func (builder *FieldContentEntityBuilder) EnumValue(enumValue *EnumValue) *FieldContentEntityBuilder {
	builder.enumValue = enumValue
	builder.enumValueFlag = true
	return builder
}

// 泛化用户类型的内容，接口设计允许实际允许Bot、Mail等非自然人用户，产品限制仅User
//
// 示例值：
func (builder *FieldContentEntityBuilder) UserValue(userValue *UserValue) *FieldContentEntityBuilder {
	builder.userValue = userValue
	builder.userValueFlag = true
	return builder
}

// 毫秒时间戳
//
// 示例值：1
func (builder *FieldContentEntityBuilder) DateTimeValue(dateTimeValue string) *FieldContentEntityBuilder {
	builder.dateTimeValue = dateTimeValue
	builder.dateTimeValueFlag = true
	return builder
}

// 数字
//
// 示例值：1
func (builder *FieldContentEntityBuilder) NumberValue(numberValue string) *FieldContentEntityBuilder {
	builder.numberValue = numberValue
	builder.numberValueFlag = true
	return builder
}

// 布尔值
//
// 示例值：
func (builder *FieldContentEntityBuilder) BooleanValue(booleanValue bool) *FieldContentEntityBuilder {
	builder.booleanValue = booleanValue
	builder.booleanValueFlag = true
	return builder
}

// 部门字段
//
// 示例值：
func (builder *FieldContentEntityBuilder) Department(department *DepartmentField) *FieldContentEntityBuilder {
	builder.department = department
	builder.departmentFlag = true
	return builder
}

// 图片信息
//
// 示例值：
func (builder *FieldContentEntityBuilder) Avator(avator *Image) *FieldContentEntityBuilder {
	builder.avator = avator
	builder.avatorFlag = true
	return builder
}

// 字段内容类型
//
// 示例值：
func (builder *FieldContentEntityBuilder) FieldType(fieldType int) *FieldContentEntityBuilder {
	builder.fieldType = fieldType
	builder.fieldTypeFlag = true
	return builder
}

func (builder *FieldContentEntityBuilder) Build() *FieldContentEntity {
	req := &FieldContentEntity{}
	if builder.textValueFlag {
		req.TextValue = builder.textValue
	}
	if builder.urlValueFlag {
		req.UrlValue = builder.urlValue
	}
	if builder.enumValueFlag {
		req.EnumValue = builder.enumValue
	}
	if builder.userValueFlag {
		req.UserValue = builder.userValue
	}
	if builder.dateTimeValueFlag {
		req.DateTimeValue = &builder.dateTimeValue

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

	}
	if builder.booleanValueFlag {
		req.BooleanValue = &builder.booleanValue

	}
	if builder.departmentFlag {
		req.Department = builder.department
	}
	if builder.avatorFlag {
		req.Avator = builder.avator
	}
	if builder.fieldTypeFlag {
		req.FieldType = &builder.fieldType

	}
	return req
}

type FilterCondition struct {
	Field *string `json:"field,omitempty"` // 筛选条件的左值，值为字段的参数名称。具体可填哪些字段请看 https://bytedance.larkoffice.com/wiki/Yyrgw6kLLiGxMIkrEZece1ZvnWg

	Operator *string `json:"operator,omitempty"` // 比较操作符。可选值有： - equal：等于，支持任何类型的左值 - in：属于任一

	Value *string `json:"value,omitempty"` // 筛选条件的右值。内容为左值字段类型及操作符组合下，对应的值类型。注意： 1. field为int类型，operator为in时，value应当为list<int>的json字符串   1. 示例值："[11,22]" 2. field为string类型，operator为in时，value应当为json序列化后的json字符串   1. 示例值："[\"正式\",\"实习\"]" 3. field为string类型，operator为eq时，value应当为json序列化后的string   1. 示例值："\正式\""
}

type FilterConditionBuilder struct {
	field     string // 筛选条件的左值，值为字段的参数名称。具体可填哪些字段请看 https://bytedance.larkoffice.com/wiki/Yyrgw6kLLiGxMIkrEZece1ZvnWg
	fieldFlag bool

	operator     string // 比较操作符。可选值有： - equal：等于，支持任何类型的左值 - in：属于任一
	operatorFlag bool

	value     string // 筛选条件的右值。内容为左值字段类型及操作符组合下，对应的值类型。注意： 1. field为int类型，operator为in时，value应当为list<int>的json字符串   1. 示例值："[11,22]" 2. field为string类型，operator为in时，value应当为json序列化后的json字符串   1. 示例值："[\"正式\",\"实习\"]" 3. field为string类型，operator为eq时，value应当为json序列化后的string   1. 示例值："\正式\""
	valueFlag bool
}

func NewFilterConditionBuilder() *FilterConditionBuilder {
	builder := &FilterConditionBuilder{}
	return builder
}

// 筛选条件的左值，值为字段的参数名称。具体可填哪些字段请看 https://bytedance.larkoffice.com/wiki/Yyrgw6kLLiGxMIkrEZece1ZvnWg
//
// 示例值：
func (builder *FilterConditionBuilder) Field(field string) *FilterConditionBuilder {
	builder.field = field
	builder.fieldFlag = true
	return builder
}

// 比较操作符。可选值有： - equal：等于，支持任何类型的左值 - in：属于任一
//
// 示例值：
func (builder *FilterConditionBuilder) Operator(operator string) *FilterConditionBuilder {
	builder.operator = operator
	builder.operatorFlag = true
	return builder
}

// 筛选条件的右值。内容为左值字段类型及操作符组合下，对应的值类型。注意： 1. field为int类型，operator为in时，value应当为list<int>的json字符串   1. 示例值："[11,22]" 2. field为string类型，operator为in时，value应当为json序列化后的json字符串   1. 示例值："[\"正式\",\"实习\"]" 3. field为string类型，operator为eq时，value应当为json序列化后的string   1. 示例值："\正式\""
//
// 示例值：1
func (builder *FilterConditionBuilder) Value(value string) *FilterConditionBuilder {
	builder.value = value
	builder.valueFlag = true
	return builder
}

func (builder *FilterConditionBuilder) Build() *FilterCondition {
	req := &FilterCondition{}
	if builder.fieldFlag {
		req.Field = &builder.field

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

	}
	if builder.valueFlag {
		req.Value = &builder.value

	}
	return req
}

type Group struct {
	Id *string `json:"id,omitempty"` // 用户组 ID

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

	Base *GroupBase `json:"base,omitempty"` // 用户组基础信息

	BizExtra map[string]string `json:"biz_extra,omitempty"` // 业务自定义扩展属性

	PrecedingGroupSets []string `json:"preceding_group_sets,omitempty"` // 用户组所属的分组 ID 列表
}

type GroupBuilder struct {
	id     string // 用户组 ID
	idFlag bool

	tenantId     string // 租户ID
	tenantIdFlag bool

	base     *GroupBase // 用户组基础信息
	baseFlag bool

	bizExtra     map[string]string // 业务自定义扩展属性
	bizExtraFlag bool

	precedingGroupSets     []string // 用户组所属的分组 ID 列表
	precedingGroupSetsFlag bool
}

func NewGroupBuilder() *GroupBuilder {
	builder := &GroupBuilder{}
	return builder
}

// 用户组 ID
//
// 示例值：42dg1f52bg1g17da
func (builder *GroupBuilder) Id(id string) *GroupBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

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

// 用户组基础信息
//
// 示例值：
func (builder *GroupBuilder) Base(base *GroupBase) *GroupBuilder {
	builder.base = base
	builder.baseFlag = true
	return builder
}

// 业务自定义扩展属性
//
// 示例值：
func (builder *GroupBuilder) BizExtra(bizExtra map[string]string) *GroupBuilder {
	builder.bizExtra = bizExtra
	builder.bizExtraFlag = true
	return builder
}

// 用户组所属的分组 ID 列表
//
// 示例值：
func (builder *GroupBuilder) PrecedingGroupSets(precedingGroupSets []string) *GroupBuilder {
	builder.precedingGroupSets = precedingGroupSets
	builder.precedingGroupSetsFlag = true
	return builder
}

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

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

	}
	if builder.baseFlag {
		req.Base = builder.base
	}
	if builder.bizExtraFlag {
		req.BizExtra = builder.bizExtra
	}
	if builder.precedingGroupSetsFlag {
		req.PrecedingGroupSets = builder.precedingGroupSets
	}
	return req
}

type GroupBase struct {
	Id *string `json:"id,omitempty"` // 用户组 ID

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

	Name *I18nText `json:"name,omitempty"` // i18n文本

	ExternalId *string `json:"external_id,omitempty"` // 用户组外部ID

	GroupType *int `json:"group_type,omitempty"` // 用户组类型，1 为普通用户组，2 为动态用户组

	MemberCount *int `json:"member_count,omitempty"` // 用户组内人员数量，包含用户组中部门下人员数量，不包含部门数量

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

	LastCalcTime *int `json:"last_calc_time,omitempty"` // 最近成员变更计算时间戳

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

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

	Description *string `json:"description,omitempty"` // 用户组描述

	CreatorId *string `json:"creator_id,omitempty"` // 创建人

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

	Namespace *string `json:"namespace,omitempty"` // 数据命名空间，默认返回
}

type GroupBaseBuilder struct {
	id     string // 用户组 ID
	idFlag bool

	tenantId     string // 租户ID
	tenantIdFlag bool

	name     *I18nText // i18n文本
	nameFlag bool

	externalId     string // 用户组外部ID
	externalIdFlag bool

	groupType     int // 用户组类型，1 为普通用户组，2 为动态用户组
	groupTypeFlag bool

	memberCount     int // 用户组内人员数量，包含用户组中部门下人员数量，不包含部门数量
	memberCountFlag bool

	status     int // 用户组状态
	statusFlag bool

	lastCalcTime     int // 最近成员变更计算时间戳
	lastCalcTimeFlag bool

	updateTime     int // 更新时间
	updateTimeFlag bool

	createTime     int // 创建时间
	createTimeFlag bool

	description     string // 用户组描述
	descriptionFlag bool

	creatorId     string // 创建人
	creatorIdFlag bool

	source     int // 数据来源
	sourceFlag bool

	namespace     string // 数据命名空间，默认返回
	namespaceFlag bool
}

func NewGroupBaseBuilder() *GroupBaseBuilder {
	builder := &GroupBaseBuilder{}
	return builder
}

// 用户组 ID
//
// 示例值：1727405594
func (builder *GroupBaseBuilder) Id(id string) *GroupBaseBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

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

// i18n文本
//
// 示例值：
func (builder *GroupBaseBuilder) Name(name *I18nText) *GroupBaseBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 用户组外部ID
//
// 示例值：1727405594
func (builder *GroupBaseBuilder) ExternalId(externalId string) *GroupBaseBuilder {
	builder.externalId = externalId
	builder.externalIdFlag = true
	return builder
}

// 用户组类型，1 为普通用户组，2 为动态用户组
//
// 示例值：
func (builder *GroupBaseBuilder) GroupType(groupType int) *GroupBaseBuilder {
	builder.groupType = groupType
	builder.groupTypeFlag = true
	return builder
}

// 用户组内人员数量，包含用户组中部门下人员数量，不包含部门数量
//
// 示例值：123
func (builder *GroupBaseBuilder) MemberCount(memberCount int) *GroupBaseBuilder {
	builder.memberCount = memberCount
	builder.memberCountFlag = true
	return builder
}

// 用户组状态
//
// 示例值：
func (builder *GroupBaseBuilder) Status(status int) *GroupBaseBuilder {
	builder.status = status
	builder.statusFlag = true
	return builder
}

// 最近成员变更计算时间戳
//
// 示例值：1727405812
func (builder *GroupBaseBuilder) LastCalcTime(lastCalcTime int) *GroupBaseBuilder {
	builder.lastCalcTime = lastCalcTime
	builder.lastCalcTimeFlag = true
	return builder
}

// 更新时间
//
// 示例值：1727405930817544000
func (builder *GroupBaseBuilder) UpdateTime(updateTime int) *GroupBaseBuilder {
	builder.updateTime = updateTime
	builder.updateTimeFlag = true
	return builder
}

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

// 用户组描述
//
// 示例值：用户组的描述
func (builder *GroupBaseBuilder) Description(description string) *GroupBaseBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 创建人
//
// 示例值：1
func (builder *GroupBaseBuilder) CreatorId(creatorId string) *GroupBaseBuilder {
	builder.creatorId = creatorId
	builder.creatorIdFlag = true
	return builder
}

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

// 数据命名空间，默认返回
//
// 示例值：admin
func (builder *GroupBaseBuilder) Namespace(namespace string) *GroupBaseBuilder {
	builder.namespace = namespace
	builder.namespaceFlag = true
	return builder
}

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

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

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.externalIdFlag {
		req.ExternalId = &builder.externalId

	}
	if builder.groupTypeFlag {
		req.GroupType = &builder.groupType

	}
	if builder.memberCountFlag {
		req.MemberCount = &builder.memberCount

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

	}
	if builder.lastCalcTimeFlag {
		req.LastCalcTime = &builder.lastCalcTime

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

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

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

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

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

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

	}
	return req
}

type GroupSet struct {
	Id *string `json:"id,omitempty"` // 用户组分组 ID

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

	Namespace *string `json:"namespace,omitempty"` // 命名空间

	ExternalId *string `json:"external_id,omitempty"` // 外部 ID，原 facade 那边的 CustomID 改名

	Name *I18nText `json:"name,omitempty"` // i18n文本

	Type *int `json:"type,omitempty"` // 用户组分组类型，1对应普通用户组的分组，2对应动态用户组的分组

	GroupCount *int `json:"group_count,omitempty"` // 用户组分组下的用户组数量

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

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

type GroupSetBuilder struct {
	id     string // 用户组分组 ID
	idFlag bool

	tenantId     string // 租户ID
	tenantIdFlag bool

	namespace     string // 命名空间
	namespaceFlag bool

	externalId     string // 外部 ID，原 facade 那边的 CustomID 改名
	externalIdFlag bool

	name     *I18nText // i18n文本
	nameFlag bool

	type_    int // 用户组分组类型，1对应普通用户组的分组，2对应动态用户组的分组
	typeFlag bool

	groupCount     int // 用户组分组下的用户组数量
	groupCountFlag bool

	createTime     string // 创建时间
	createTimeFlag bool

	updateTime     string // 更新时间
	updateTimeFlag bool
}

func NewGroupSetBuilder() *GroupSetBuilder {
	builder := &GroupSetBuilder{}
	return builder
}

// 用户组分组 ID
//
// 示例值：42dg1f52bg1g17da
func (builder *GroupSetBuilder) Id(id string) *GroupSetBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

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

// 命名空间
//
// 示例值：admin
func (builder *GroupSetBuilder) Namespace(namespace string) *GroupSetBuilder {
	builder.namespace = namespace
	builder.namespaceFlag = true
	return builder
}

// 外部 ID，原 facade 那边的 CustomID 改名
//
// 示例值：abcdefg
func (builder *GroupSetBuilder) ExternalId(externalId string) *GroupSetBuilder {
	builder.externalId = externalId
	builder.externalIdFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *GroupSetBuilder) Name(name *I18nText) *GroupSetBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 用户组分组类型，1对应普通用户组的分组，2对应动态用户组的分组
//
// 示例值：1
func (builder *GroupSetBuilder) Type(type_ int) *GroupSetBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// 用户组分组下的用户组数量
//
// 示例值：1
func (builder *GroupSetBuilder) GroupCount(groupCount int) *GroupSetBuilder {
	builder.groupCount = groupCount
	builder.groupCountFlag = true
	return builder
}

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

// 更新时间
//
// 示例值：1727577286660828000
func (builder *GroupSetBuilder) UpdateTime(updateTime string) *GroupSetBuilder {
	builder.updateTime = updateTime
	builder.updateTimeFlag = true
	return builder
}

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

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

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

	}
	if builder.externalIdFlag {
		req.ExternalId = &builder.externalId

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.typeFlag {
		req.Type = &builder.type_

	}
	if builder.groupCountFlag {
		req.GroupCount = &builder.groupCount

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

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

	}
	return req
}

type GroupSetMember struct {
	GroupSetId *string `json:"group_set_id,omitempty"` // 用户组分组 ID

	GroupId *string `json:"group_id,omitempty"` // 用户组 ID
}

type GroupSetMemberBuilder struct {
	groupSetId     string // 用户组分组 ID
	groupSetIdFlag bool

	groupId     string // 用户组 ID
	groupIdFlag bool
}

func NewGroupSetMemberBuilder() *GroupSetMemberBuilder {
	builder := &GroupSetMemberBuilder{}
	return builder
}

// 用户组分组 ID
//
// 示例值：42dg1f52bg1g17da
func (builder *GroupSetMemberBuilder) GroupSetId(groupSetId string) *GroupSetMemberBuilder {
	builder.groupSetId = groupSetId
	builder.groupSetIdFlag = true
	return builder
}

// 用户组 ID
//
// 示例值：31c22b8cfgbb41d6
func (builder *GroupSetMemberBuilder) GroupId(groupId string) *GroupSetMemberBuilder {
	builder.groupId = groupId
	builder.groupIdFlag = true
	return builder
}

func (builder *GroupSetMemberBuilder) Build() *GroupSetMember {
	req := &GroupSetMember{}
	if builder.groupSetIdFlag {
		req.GroupSetId = &builder.groupSetId

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

	}
	return req
}

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

	TenantId *string `json:"tenant_id,omitempty"` // TenantID

	Name *GuestName `json:"name,omitempty"` // 姓名

	Mobile *string `json:"mobile,omitempty"` // 手机

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

	AvatarKey *string `json:"avatar_key,omitempty"` // 头像

	WorkCountryOrRegion *string `json:"work_country_or_region,omitempty"` // 国家地区

	GuestActiveStatus *string `json:"guest_active_status,omitempty"` // 状态

	CreatorId *string `json:"creator_id,omitempty"` // 创建人

	UpdatorId *string `json:"updator_id,omitempty"` // 更新人

	CreateTime *string `json:"create_time,omitempty"` // 创建日期

	UpdateTime *string `json:"update_time,omitempty"` // 更新日期
}

type GuestBuilder struct {
	id     string // ID
	idFlag bool

	tenantId     string // TenantID
	tenantIdFlag bool

	name     *GuestName // 姓名
	nameFlag bool

	mobile     string // 手机
	mobileFlag bool

	email     string // 邮箱
	emailFlag bool

	avatarKey     string // 头像
	avatarKeyFlag bool

	workCountryOrRegion     string // 国家地区
	workCountryOrRegionFlag bool

	guestActiveStatus     string // 状态
	guestActiveStatusFlag bool

	creatorId     string // 创建人
	creatorIdFlag bool

	updatorId     string // 更新人
	updatorIdFlag bool

	createTime     string // 创建日期
	createTimeFlag bool

	updateTime     string // 更新日期
	updateTimeFlag bool
}

func NewGuestBuilder() *GuestBuilder {
	builder := &GuestBuilder{}
	return builder
}

// ID
//
// 示例值：123123
func (builder *GuestBuilder) Id(id string) *GuestBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// TenantID
//
// 示例值：1
func (builder *GuestBuilder) TenantId(tenantId string) *GuestBuilder {
	builder.tenantId = tenantId
	builder.tenantIdFlag = true
	return builder
}

// 姓名
//
// 示例值：
func (builder *GuestBuilder) Name(name *GuestName) *GuestBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 手机
//
// 示例值：123456789
func (builder *GuestBuilder) Mobile(mobile string) *GuestBuilder {
	builder.mobile = mobile
	builder.mobileFlag = true
	return builder
}

// 邮箱
//
// 示例值：a@q.com
func (builder *GuestBuilder) Email(email string) *GuestBuilder {
	builder.email = email
	builder.emailFlag = true
	return builder
}

// 头像
//
// 示例值：asdfadsfadsf
func (builder *GuestBuilder) AvatarKey(avatarKey string) *GuestBuilder {
	builder.avatarKey = avatarKey
	builder.avatarKeyFlag = true
	return builder
}

// 国家地区
//
// 示例值：MDM_123asd
func (builder *GuestBuilder) WorkCountryOrRegion(workCountryOrRegion string) *GuestBuilder {
	builder.workCountryOrRegion = workCountryOrRegion
	builder.workCountryOrRegionFlag = true
	return builder
}

// 状态
//
// 示例值：
func (builder *GuestBuilder) GuestActiveStatus(guestActiveStatus string) *GuestBuilder {
	builder.guestActiveStatus = guestActiveStatus
	builder.guestActiveStatusFlag = true
	return builder
}

// 创建人
//
// 示例值：123
func (builder *GuestBuilder) CreatorId(creatorId string) *GuestBuilder {
	builder.creatorId = creatorId
	builder.creatorIdFlag = true
	return builder
}

// 更新人
//
// 示例值：123
func (builder *GuestBuilder) UpdatorId(updatorId string) *GuestBuilder {
	builder.updatorId = updatorId
	builder.updatorIdFlag = true
	return builder
}

// 创建日期
//
// 示例值：123
func (builder *GuestBuilder) CreateTime(createTime string) *GuestBuilder {
	builder.createTime = createTime
	builder.createTimeFlag = true
	return builder
}

// 更新日期
//
// 示例值：123
func (builder *GuestBuilder) UpdateTime(updateTime string) *GuestBuilder {
	builder.updateTime = updateTime
	builder.updateTimeFlag = true
	return builder
}

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

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

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.mobileFlag {
		req.Mobile = &builder.mobile

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

	}
	if builder.avatarKeyFlag {
		req.AvatarKey = &builder.avatarKey

	}
	if builder.workCountryOrRegionFlag {
		req.WorkCountryOrRegion = &builder.workCountryOrRegion

	}
	if builder.guestActiveStatusFlag {
		req.GuestActiveStatus = &builder.guestActiveStatus

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

	}
	if builder.updatorIdFlag {
		req.UpdatorId = &builder.updatorId

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

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

	}
	return req
}

type GuestName struct {
	Name *I18nText `json:"name,omitempty"` // i18n文本

	NamePy *string `json:"name_py,omitempty"` // 姓名拼音
}

type GuestNameBuilder struct {
	name     *I18nText // i18n文本
	nameFlag bool

	namePy     string // 姓名拼音
	namePyFlag bool
}

func NewGuestNameBuilder() *GuestNameBuilder {
	builder := &GuestNameBuilder{}
	return builder
}

// i18n文本
//
// 示例值：
func (builder *GuestNameBuilder) Name(name *I18nText) *GuestNameBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 姓名拼音
//
// 示例值：pinyin
func (builder *GuestNameBuilder) NamePy(namePy string) *GuestNameBuilder {
	builder.namePy = namePy
	builder.namePyFlag = true
	return builder
}

func (builder *GuestNameBuilder) Build() *GuestName {
	req := &GuestName{}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.namePyFlag {
		req.NamePy = &builder.namePy

	}
	return req
}

type GuestTraceInfo struct {
	Source *int `json:"source,omitempty"` // 创建来源

	IsInvite *bool `json:"is_invite,omitempty"` // 是否邀请

	InviterId *string `json:"inviter_id,omitempty"` // 邀请人id

	InviteOption *InviteOption `json:"invite_option,omitempty"` // 邀请

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

type GuestTraceInfoBuilder struct {
	source     int // 创建来源
	sourceFlag bool

	isInvite     bool // 是否邀请
	isInviteFlag bool

	inviterId     string // 邀请人id
	inviterIdFlag bool

	inviteOption     *InviteOption // 邀请
	inviteOptionFlag bool

	clientIp     string // 客户端的IP */
	clientIpFlag bool
}

func NewGuestTraceInfoBuilder() *GuestTraceInfoBuilder {
	builder := &GuestTraceInfoBuilder{}
	return builder
}

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

// 是否邀请
//
// 示例值：
func (builder *GuestTraceInfoBuilder) IsInvite(isInvite bool) *GuestTraceInfoBuilder {
	builder.isInvite = isInvite
	builder.isInviteFlag = true
	return builder
}

// 邀请人id
//
// 示例值：123123123
func (builder *GuestTraceInfoBuilder) InviterId(inviterId string) *GuestTraceInfoBuilder {
	builder.inviterId = inviterId
	builder.inviterIdFlag = true
	return builder
}

// 邀请
//
// 示例值：
func (builder *GuestTraceInfoBuilder) InviteOption(inviteOption *InviteOption) *GuestTraceInfoBuilder {
	builder.inviteOption = inviteOption
	builder.inviteOptionFlag = true
	return builder
}

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

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

	}
	if builder.isInviteFlag {
		req.IsInvite = &builder.isInvite

	}
	if builder.inviterIdFlag {
		req.InviterId = &builder.inviterId

	}
	if builder.inviteOptionFlag {
		req.InviteOption = builder.inviteOption
	}
	if builder.clientIpFlag {
		req.ClientIp = &builder.clientIp

	}
	return req
}

type I18nText struct {
	DefaultValue *string `json:"default_value,omitempty"` // 默认值

	I18nValue map[string]string `json:"i18n_value,omitempty"` // 国际化值，key为zh_cn, ja_jp, en_us, value为对应的值

	DefaultLocale *string `json:"default_locale,omitempty"` // 默认语种, 取值包括zh_cn,ja_jp,en_us等
}

type I18nTextBuilder struct {
	defaultValue     string // 默认值
	defaultValueFlag bool

	i18nValue     map[string]string // 国际化值，key为zh_cn, ja_jp, en_us, value为对应的值
	i18nValueFlag bool

	defaultLocale     string // 默认语种, 取值包括zh_cn,ja_jp,en_us等
	defaultLocaleFlag bool
}

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

// 默认值
//
// 示例值：张三
func (builder *I18nTextBuilder) DefaultValue(defaultValue string) *I18nTextBuilder {
	builder.defaultValue = defaultValue
	builder.defaultValueFlag = true
	return builder
}

// 国际化值，key为zh_cn, ja_jp, en_us, value为对应的值
//
// 示例值：
func (builder *I18nTextBuilder) I18nValue(i18nValue map[string]string) *I18nTextBuilder {
	builder.i18nValue = i18nValue
	builder.i18nValueFlag = true
	return builder
}

// 默认语种, 取值包括zh_cn,ja_jp,en_us等
//
// 示例值：zh_cn
func (builder *I18nTextBuilder) DefaultLocale(defaultLocale string) *I18nTextBuilder {
	builder.defaultLocale = defaultLocale
	builder.defaultLocaleFlag = true
	return builder
}

func (builder *I18nTextBuilder) Build() *I18nText {
	req := &I18nText{}
	if builder.defaultValueFlag {
		req.DefaultValue = &builder.defaultValue

	}
	if builder.i18nValueFlag {
		req.I18nValue = builder.i18nValue
	}
	if builder.defaultLocaleFlag {
		req.DefaultLocale = &builder.defaultLocale

	}
	return req
}

type Image struct {
	Key *string `json:"key,omitempty"` // key

	FsUnit *string `json:"fs_unit,omitempty"` // fs unit
}

type ImageBuilder struct {
	key     string // key
	keyFlag bool

	fsUnit     string // fs unit
	fsUnitFlag bool
}

func NewImageBuilder() *ImageBuilder {
	builder := &ImageBuilder{}
	return builder
}

// key
//
// 示例值：img_v2_8abc397a-9950-44ea-9302-e1d8fe00858g
func (builder *ImageBuilder) Key(key string) *ImageBuilder {
	builder.key = key
	builder.keyFlag = true
	return builder
}

// fs unit
//
// 示例值：cn
func (builder *ImageBuilder) FsUnit(fsUnit string) *ImageBuilder {
	builder.fsUnit = fsUnit
	builder.fsUnitFlag = true
	return builder
}

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

	}
	if builder.fsUnitFlag {
		req.FsUnit = &builder.fsUnit

	}
	return req
}

type ImageLink struct {
	Avatar72 *string `json:"avatar_72,omitempty"` // 72*72像素头像链接

	Avatar240 *string `json:"avatar_240,omitempty"` // 240*240像素头像链接

	Avatar640 *string `json:"avatar_640,omitempty"` // 640*640像素头像链接

	AvatarOrigin *string `json:"avatar_origin,omitempty"` // 原始头像链接
}

type ImageLinkBuilder struct {
	avatar72     string // 72*72像素头像链接
	avatar72Flag bool

	avatar240     string // 240*240像素头像链接
	avatar240Flag bool

	avatar640     string // 640*640像素头像链接
	avatar640Flag bool

	avatarOrigin     string // 原始头像链接
	avatarOriginFlag bool
}

func NewImageLinkBuilder() *ImageLinkBuilder {
	builder := &ImageLinkBuilder{}
	return builder
}

// 72*72像素头像链接
//
// 示例值：http://qwed.com
func (builder *ImageLinkBuilder) Avatar72(avatar72 string) *ImageLinkBuilder {
	builder.avatar72 = avatar72
	builder.avatar72Flag = true
	return builder
}

// 240*240像素头像链接
//
// 示例值：http://wssd.com
func (builder *ImageLinkBuilder) Avatar240(avatar240 string) *ImageLinkBuilder {
	builder.avatar240 = avatar240
	builder.avatar240Flag = true
	return builder
}

// 640*640像素头像链接
//
// 示例值：http://wssd.com
func (builder *ImageLinkBuilder) Avatar640(avatar640 string) *ImageLinkBuilder {
	builder.avatar640 = avatar640
	builder.avatar640Flag = true
	return builder
}

// 原始头像链接
//
// 示例值：https:inernal-api/image
func (builder *ImageLinkBuilder) AvatarOrigin(avatarOrigin string) *ImageLinkBuilder {
	builder.avatarOrigin = avatarOrigin
	builder.avatarOriginFlag = true
	return builder
}

func (builder *ImageLinkBuilder) Build() *ImageLink {
	req := &ImageLink{}
	if builder.avatar72Flag {
		req.Avatar72 = &builder.avatar72

	}
	if builder.avatar240Flag {
		req.Avatar240 = &builder.avatar240

	}
	if builder.avatar640Flag {
		req.Avatar640 = &builder.avatar640

	}
	if builder.avatarOriginFlag {
		req.AvatarOrigin = &builder.avatarOrigin

	}
	return req
}

type InviteOption struct {
	InviteChannels []int `json:"invite_channels,omitempty"` // 邀请渠道

	InviteLanguage *int `json:"invite_language,omitempty"` // 邀请语言
}

type InviteOptionBuilder struct {
	inviteChannels     []int // 邀请渠道
	inviteChannelsFlag bool

	inviteLanguage     int // 邀请语言
	inviteLanguageFlag bool
}

func NewInviteOptionBuilder() *InviteOptionBuilder {
	builder := &InviteOptionBuilder{}
	return builder
}

// 邀请渠道
//
// 示例值：
func (builder *InviteOptionBuilder) InviteChannels(inviteChannels []int) *InviteOptionBuilder {
	builder.inviteChannels = inviteChannels
	builder.inviteChannelsFlag = true
	return builder
}

// 邀请语言
//
// 示例值：
func (builder *InviteOptionBuilder) InviteLanguage(inviteLanguage int) *InviteOptionBuilder {
	builder.inviteLanguage = inviteLanguage
	builder.inviteLanguageFlag = true
	return builder
}

func (builder *InviteOptionBuilder) Build() *InviteOption {
	req := &InviteOption{}
	if builder.inviteChannelsFlag {
		req.InviteChannels = builder.inviteChannels
	}
	if builder.inviteLanguageFlag {
		req.InviteLanguage = &builder.inviteLanguage

	}
	return req
}

type JobFamily struct {
	JobFamilyId *string `json:"job_family_id,omitempty"` // 序列ID

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

	JobFamilyName *I18nText `json:"job_family_name,omitempty"` // i18n文本

	IsEnabled *bool `json:"is_enabled,omitempty"` // 是否启用

	IsDeleted *bool `json:"is_deleted,omitempty"` // 是否删除

	ParentJobFamilyId *string `json:"parent_job_family_id,omitempty"` // 上级序列

	Description *I18nText `json:"description,omitempty"` // i18n文本

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

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

	CreatorId *string `json:"creator_id,omitempty"` // 创建人

	UpdatorId *string `json:"updator_id,omitempty"` // 更新人

	ExternalId *string `json:"external_id,omitempty"` // 外部ID
}

type JobFamilyBuilder struct {
	jobFamilyId     string // 序列ID
	jobFamilyIdFlag bool

	tenantId     string // 租户ID
	tenantIdFlag bool

	jobFamilyName     *I18nText // i18n文本
	jobFamilyNameFlag bool

	isEnabled     bool // 是否启用
	isEnabledFlag bool

	isDeleted     bool // 是否删除
	isDeletedFlag bool

	parentJobFamilyId     string // 上级序列
	parentJobFamilyIdFlag bool

	description     *I18nText // i18n文本
	descriptionFlag bool

	createTime     string // 创建时间
	createTimeFlag bool

	updateTime     string // 更新时间
	updateTimeFlag bool

	creatorId     string // 创建人
	creatorIdFlag bool

	updatorId     string // 更新人
	updatorIdFlag bool

	externalId     string // 外部ID
	externalIdFlag bool
}

func NewJobFamilyBuilder() *JobFamilyBuilder {
	builder := &JobFamilyBuilder{}
	return builder
}

// 序列ID
//
// 示例值：od-4e6ac4d14bcd5071a37a39de902c7141
func (builder *JobFamilyBuilder) JobFamilyId(jobFamilyId string) *JobFamilyBuilder {
	builder.jobFamilyId = jobFamilyId
	builder.jobFamilyIdFlag = true
	return builder
}

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

// i18n文本
//
// 示例值：
func (builder *JobFamilyBuilder) JobFamilyName(jobFamilyName *I18nText) *JobFamilyBuilder {
	builder.jobFamilyName = jobFamilyName
	builder.jobFamilyNameFlag = true
	return builder
}

// 是否启用
//
// 示例值：true
func (builder *JobFamilyBuilder) IsEnabled(isEnabled bool) *JobFamilyBuilder {
	builder.isEnabled = isEnabled
	builder.isEnabledFlag = true
	return builder
}

// 是否删除
//
// 示例值：true
func (builder *JobFamilyBuilder) IsDeleted(isDeleted bool) *JobFamilyBuilder {
	builder.isDeleted = isDeleted
	builder.isDeletedFlag = true
	return builder
}

// 上级序列
//
// 示例值：od-4e6ac4d14bcd5071a37a39de902c7141
func (builder *JobFamilyBuilder) ParentJobFamilyId(parentJobFamilyId string) *JobFamilyBuilder {
	builder.parentJobFamilyId = parentJobFamilyId
	builder.parentJobFamilyIdFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *JobFamilyBuilder) Description(description *I18nText) *JobFamilyBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

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

// 更新时间
//
// 示例值：1
func (builder *JobFamilyBuilder) UpdateTime(updateTime string) *JobFamilyBuilder {
	builder.updateTime = updateTime
	builder.updateTimeFlag = true
	return builder
}

// 创建人
//
// 示例值：1
func (builder *JobFamilyBuilder) CreatorId(creatorId string) *JobFamilyBuilder {
	builder.creatorId = creatorId
	builder.creatorIdFlag = true
	return builder
}

// 更新人
//
// 示例值：1
func (builder *JobFamilyBuilder) UpdatorId(updatorId string) *JobFamilyBuilder {
	builder.updatorId = updatorId
	builder.updatorIdFlag = true
	return builder
}

// 外部ID
//
// 示例值：erfsdfqw
func (builder *JobFamilyBuilder) ExternalId(externalId string) *JobFamilyBuilder {
	builder.externalId = externalId
	builder.externalIdFlag = true
	return builder
}

func (builder *JobFamilyBuilder) Build() *JobFamily {
	req := &JobFamily{}
	if builder.jobFamilyIdFlag {
		req.JobFamilyId = &builder.jobFamilyId

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

	}
	if builder.jobFamilyNameFlag {
		req.JobFamilyName = builder.jobFamilyName
	}
	if builder.isEnabledFlag {
		req.IsEnabled = &builder.isEnabled

	}
	if builder.isDeletedFlag {
		req.IsDeleted = &builder.isDeleted

	}
	if builder.parentJobFamilyIdFlag {
		req.ParentJobFamilyId = &builder.parentJobFamilyId

	}
	if builder.descriptionFlag {
		req.Description = builder.description
	}
	if builder.createTimeFlag {
		req.CreateTime = &builder.createTime

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

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

	}
	if builder.updatorIdFlag {
		req.UpdatorId = &builder.updatorId

	}
	if builder.externalIdFlag {
		req.ExternalId = &builder.externalId

	}
	return req
}

type JobLevel struct {
	JobLevelId *string `json:"job_level_id,omitempty"` // ID

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

	JobLevelName *I18nText `json:"job_level_name,omitempty"` // i18n文本

	IsEnabled *bool `json:"is_enabled,omitempty"` // 是否启用

	IsDeleted *bool `json:"is_deleted,omitempty"` // 是否删除

	Order *string `json:"order,omitempty"` // 排序, 小的在前面

	Description *I18nText `json:"description,omitempty"` // i18n文本

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

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

	CreatorId *string `json:"creator_id,omitempty"` // 创建人

	UpdatorId *string `json:"updator_id,omitempty"` // 更新人

	ExternalId *string `json:"external_id,omitempty"` // 外部ID
}

type JobLevelBuilder struct {
	jobLevelId     string // ID
	jobLevelIdFlag bool

	tenantId     string // 租户ID
	tenantIdFlag bool

	jobLevelName     *I18nText // i18n文本
	jobLevelNameFlag bool

	isEnabled     bool // 是否启用
	isEnabledFlag bool

	isDeleted     bool // 是否删除
	isDeletedFlag bool

	order     string // 排序, 小的在前面
	orderFlag bool

	description     *I18nText // i18n文本
	descriptionFlag bool

	createTime     string // 创建时间
	createTimeFlag bool

	updateTime     string // 更新时间
	updateTimeFlag bool

	creatorId     string // 创建人
	creatorIdFlag bool

	updatorId     string // 更新人
	updatorIdFlag bool

	externalId     string // 外部ID
	externalIdFlag bool
}

func NewJobLevelBuilder() *JobLevelBuilder {
	builder := &JobLevelBuilder{}
	return builder
}

// ID
//
// 示例值：od-4e6ac4d14bcd5071a37a39de902c7141
func (builder *JobLevelBuilder) JobLevelId(jobLevelId string) *JobLevelBuilder {
	builder.jobLevelId = jobLevelId
	builder.jobLevelIdFlag = true
	return builder
}

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

// i18n文本
//
// 示例值：
func (builder *JobLevelBuilder) JobLevelName(jobLevelName *I18nText) *JobLevelBuilder {
	builder.jobLevelName = jobLevelName
	builder.jobLevelNameFlag = true
	return builder
}

// 是否启用
//
// 示例值：true
func (builder *JobLevelBuilder) IsEnabled(isEnabled bool) *JobLevelBuilder {
	builder.isEnabled = isEnabled
	builder.isEnabledFlag = true
	return builder
}

// 是否删除
//
// 示例值：true
func (builder *JobLevelBuilder) IsDeleted(isDeleted bool) *JobLevelBuilder {
	builder.isDeleted = isDeleted
	builder.isDeletedFlag = true
	return builder
}

// 排序, 小的在前面
//
// 示例值：1
func (builder *JobLevelBuilder) Order(order string) *JobLevelBuilder {
	builder.order = order
	builder.orderFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *JobLevelBuilder) Description(description *I18nText) *JobLevelBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

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

// 更新时间
//
// 示例值：1
func (builder *JobLevelBuilder) UpdateTime(updateTime string) *JobLevelBuilder {
	builder.updateTime = updateTime
	builder.updateTimeFlag = true
	return builder
}

// 创建人
//
// 示例值：1
func (builder *JobLevelBuilder) CreatorId(creatorId string) *JobLevelBuilder {
	builder.creatorId = creatorId
	builder.creatorIdFlag = true
	return builder
}

// 更新人
//
// 示例值：1
func (builder *JobLevelBuilder) UpdatorId(updatorId string) *JobLevelBuilder {
	builder.updatorId = updatorId
	builder.updatorIdFlag = true
	return builder
}

// 外部ID
//
// 示例值：dqweasd
func (builder *JobLevelBuilder) ExternalId(externalId string) *JobLevelBuilder {
	builder.externalId = externalId
	builder.externalIdFlag = true
	return builder
}

func (builder *JobLevelBuilder) Build() *JobLevel {
	req := &JobLevel{}
	if builder.jobLevelIdFlag {
		req.JobLevelId = &builder.jobLevelId

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

	}
	if builder.jobLevelNameFlag {
		req.JobLevelName = builder.jobLevelName
	}
	if builder.isEnabledFlag {
		req.IsEnabled = &builder.isEnabled

	}
	if builder.isDeletedFlag {
		req.IsDeleted = &builder.isDeleted

	}
	if builder.orderFlag {
		req.Order = &builder.order

	}
	if builder.descriptionFlag {
		req.Description = builder.description
	}
	if builder.createTimeFlag {
		req.CreateTime = &builder.createTime

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

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

	}
	if builder.updatorIdFlag {
		req.UpdatorId = &builder.updatorId

	}
	if builder.externalIdFlag {
		req.ExternalId = &builder.externalId

	}
	return req
}

type JobTitle struct {
	JobTitleId *string `json:"job_title_id,omitempty"` // ID

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

	JobTitleName *I18nText `json:"job_title_name,omitempty"` // i18n文本

	IsEnabled *bool `json:"is_enabled,omitempty"` // 是否启用

	IsDeleted *bool `json:"is_deleted,omitempty"` // 是否删除

	Title *I18nText `json:"title,omitempty"` // i18n文本

	JobFamilyId *string `json:"job_family_id,omitempty"` // Deprecated 不再使用，换用JobFamilyIDs

	JobLevelId *string `json:"job_level_id,omitempty"` // Deprecated 不再使用，换用JobLevelIDs

	Description *I18nText `json:"description,omitempty"` // i18n文本

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

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

	CreatorId *string `json:"creator_id,omitempty"` // 创建人

	UpdatorId *string `json:"updator_id,omitempty"` // 更新人

	ExternalId *string `json:"external_id,omitempty"` // 外部ID

	JobFamilyIds []string `json:"job_family_ids,omitempty"` // 序列

	JobLevelIds []string `json:"job_level_ids,omitempty"` // 职级
}

type JobTitleBuilder struct {
	jobTitleId     string // ID
	jobTitleIdFlag bool

	tenantId     string // 租户ID
	tenantIdFlag bool

	jobTitleName     *I18nText // i18n文本
	jobTitleNameFlag bool

	isEnabled     bool // 是否启用
	isEnabledFlag bool

	isDeleted     bool // 是否删除
	isDeletedFlag bool

	title     *I18nText // i18n文本
	titleFlag bool

	jobFamilyId     string // Deprecated 不再使用，换用JobFamilyIDs
	jobFamilyIdFlag bool

	jobLevelId     string // Deprecated 不再使用，换用JobLevelIDs
	jobLevelIdFlag bool

	description     *I18nText // i18n文本
	descriptionFlag bool

	createTime     string // 创建时间
	createTimeFlag bool

	updateTime     string // 更新时间
	updateTimeFlag bool

	creatorId     string // 创建人
	creatorIdFlag bool

	updatorId     string // 更新人
	updatorIdFlag bool

	externalId     string // 外部ID
	externalIdFlag bool

	jobFamilyIds     []string // 序列
	jobFamilyIdsFlag bool

	jobLevelIds     []string // 职级
	jobLevelIdsFlag bool
}

func NewJobTitleBuilder() *JobTitleBuilder {
	builder := &JobTitleBuilder{}
	return builder
}

// ID
//
// 示例值：od-4e6ac4d14bcd5071a37a39de902c7141
func (builder *JobTitleBuilder) JobTitleId(jobTitleId string) *JobTitleBuilder {
	builder.jobTitleId = jobTitleId
	builder.jobTitleIdFlag = true
	return builder
}

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

// i18n文本
//
// 示例值：
func (builder *JobTitleBuilder) JobTitleName(jobTitleName *I18nText) *JobTitleBuilder {
	builder.jobTitleName = jobTitleName
	builder.jobTitleNameFlag = true
	return builder
}

// 是否启用
//
// 示例值：true
func (builder *JobTitleBuilder) IsEnabled(isEnabled bool) *JobTitleBuilder {
	builder.isEnabled = isEnabled
	builder.isEnabledFlag = true
	return builder
}

// 是否删除
//
// 示例值：true
func (builder *JobTitleBuilder) IsDeleted(isDeleted bool) *JobTitleBuilder {
	builder.isDeleted = isDeleted
	builder.isDeletedFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *JobTitleBuilder) Title(title *I18nText) *JobTitleBuilder {
	builder.title = title
	builder.titleFlag = true
	return builder
}

// Deprecated 不再使用，换用JobFamilyIDs
//
// 示例值：uhgy123jd
func (builder *JobTitleBuilder) JobFamilyId(jobFamilyId string) *JobTitleBuilder {
	builder.jobFamilyId = jobFamilyId
	builder.jobFamilyIdFlag = true
	return builder
}

// Deprecated 不再使用，换用JobLevelIDs
//
// 示例值：erhu88d
func (builder *JobTitleBuilder) JobLevelId(jobLevelId string) *JobTitleBuilder {
	builder.jobLevelId = jobLevelId
	builder.jobLevelIdFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *JobTitleBuilder) Description(description *I18nText) *JobTitleBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

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

// 更新时间
//
// 示例值：1
func (builder *JobTitleBuilder) UpdateTime(updateTime string) *JobTitleBuilder {
	builder.updateTime = updateTime
	builder.updateTimeFlag = true
	return builder
}

// 创建人
//
// 示例值：1
func (builder *JobTitleBuilder) CreatorId(creatorId string) *JobTitleBuilder {
	builder.creatorId = creatorId
	builder.creatorIdFlag = true
	return builder
}

// 更新人
//
// 示例值：1
func (builder *JobTitleBuilder) UpdatorId(updatorId string) *JobTitleBuilder {
	builder.updatorId = updatorId
	builder.updatorIdFlag = true
	return builder
}

// 外部ID
//
// 示例值：qwesaeq
func (builder *JobTitleBuilder) ExternalId(externalId string) *JobTitleBuilder {
	builder.externalId = externalId
	builder.externalIdFlag = true
	return builder
}

// 序列
//
// 示例值：
func (builder *JobTitleBuilder) JobFamilyIds(jobFamilyIds []string) *JobTitleBuilder {
	builder.jobFamilyIds = jobFamilyIds
	builder.jobFamilyIdsFlag = true
	return builder
}

// 职级
//
// 示例值：
func (builder *JobTitleBuilder) JobLevelIds(jobLevelIds []string) *JobTitleBuilder {
	builder.jobLevelIds = jobLevelIds
	builder.jobLevelIdsFlag = true
	return builder
}

func (builder *JobTitleBuilder) Build() *JobTitle {
	req := &JobTitle{}
	if builder.jobTitleIdFlag {
		req.JobTitleId = &builder.jobTitleId

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

	}
	if builder.jobTitleNameFlag {
		req.JobTitleName = builder.jobTitleName
	}
	if builder.isEnabledFlag {
		req.IsEnabled = &builder.isEnabled

	}
	if builder.isDeletedFlag {
		req.IsDeleted = &builder.isDeleted

	}
	if builder.titleFlag {
		req.Title = builder.title
	}
	if builder.jobFamilyIdFlag {
		req.JobFamilyId = &builder.jobFamilyId

	}
	if builder.jobLevelIdFlag {
		req.JobLevelId = &builder.jobLevelId

	}
	if builder.descriptionFlag {
		req.Description = builder.description
	}
	if builder.createTimeFlag {
		req.CreateTime = &builder.createTime

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

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

	}
	if builder.updatorIdFlag {
		req.UpdatorId = &builder.updatorId

	}
	if builder.externalIdFlag {
		req.ExternalId = &builder.externalId

	}
	if builder.jobFamilyIdsFlag {
		req.JobFamilyIds = builder.jobFamilyIds
	}
	if builder.jobLevelIdsFlag {
		req.JobLevelIds = builder.jobLevelIds
	}
	return req
}

type LarkIdaasDirectoryPageResponse struct {
	HasMore *bool `json:"has_more,omitempty"` // 是否还有后续结果

	Cursor *string `json:"cursor,omitempty"` // 下一次的游标，只在PageType=CURSOR 时有效

	Total *string `json:"total,omitempty"` // 总条数，只在PageType=Offset 时有效
}

type LarkIdaasDirectoryPageResponseBuilder struct {
	hasMore     bool // 是否还有后续结果
	hasMoreFlag bool

	cursor     string // 下一次的游标，只在PageType=CURSOR 时有效
	cursorFlag bool

	total     string // 总条数，只在PageType=Offset 时有效
	totalFlag bool
}

func NewLarkIdaasDirectoryPageResponseBuilder() *LarkIdaasDirectoryPageResponseBuilder {
	builder := &LarkIdaasDirectoryPageResponseBuilder{}
	return builder
}

// 是否还有后续结果
//
// 示例值：
func (builder *LarkIdaasDirectoryPageResponseBuilder) HasMore(hasMore bool) *LarkIdaasDirectoryPageResponseBuilder {
	builder.hasMore = hasMore
	builder.hasMoreFlag = true
	return builder
}

// 下一次的游标，只在PageType=CURSOR 时有效
//
// 示例值：asdfasdfasdf
func (builder *LarkIdaasDirectoryPageResponseBuilder) Cursor(cursor string) *LarkIdaasDirectoryPageResponseBuilder {
	builder.cursor = cursor
	builder.cursorFlag = true
	return builder
}

// 总条数，只在PageType=Offset 时有效
//
// 示例值：100
func (builder *LarkIdaasDirectoryPageResponseBuilder) Total(total string) *LarkIdaasDirectoryPageResponseBuilder {
	builder.total = total
	builder.totalFlag = true
	return builder
}

func (builder *LarkIdaasDirectoryPageResponseBuilder) Build() *LarkIdaasDirectoryPageResponse {
	req := &LarkIdaasDirectoryPageResponse{}
	if builder.hasMoreFlag {
		req.HasMore = &builder.hasMore

	}
	if builder.cursorFlag {
		req.Cursor = &builder.cursor

	}
	if builder.totalFlag {
		req.Total = &builder.total

	}
	return req
}

type ListEmployeeIdsOptions struct {
	NeedTotal *bool `json:"need_total,omitempty"` // 是否返回总数
}

type ListEmployeeIdsOptionsBuilder struct {
	needTotal     bool // 是否返回总数
	needTotalFlag bool
}

func NewListEmployeeIdsOptionsBuilder() *ListEmployeeIdsOptionsBuilder {
	builder := &ListEmployeeIdsOptionsBuilder{}
	return builder
}

// 是否返回总数
//
// 示例值：
func (builder *ListEmployeeIdsOptionsBuilder) NeedTotal(needTotal bool) *ListEmployeeIdsOptionsBuilder {
	builder.needTotal = needTotal
	builder.needTotalFlag = true
	return builder
}

func (builder *ListEmployeeIdsOptionsBuilder) Build() *ListEmployeeIdsOptions {
	req := &ListEmployeeIdsOptions{}
	if builder.needTotalFlag {
		req.NeedTotal = &builder.needTotal

	}
	return req
}

type MCreateCustomFieldOptions struct {
	DataSource *int `json:"data_source,omitempty"` // 数据来源
}

type MCreateCustomFieldOptionsBuilder struct {
	dataSource     int // 数据来源
	dataSourceFlag bool
}

func NewMCreateCustomFieldOptionsBuilder() *MCreateCustomFieldOptionsBuilder {
	builder := &MCreateCustomFieldOptionsBuilder{}
	return builder
}

// 数据来源
//
// 示例值：
func (builder *MCreateCustomFieldOptionsBuilder) DataSource(dataSource int) *MCreateCustomFieldOptionsBuilder {
	builder.dataSource = dataSource
	builder.dataSourceFlag = true
	return builder
}

func (builder *MCreateCustomFieldOptionsBuilder) Build() *MCreateCustomFieldOptions {
	req := &MCreateCustomFieldOptions{}
	if builder.dataSourceFlag {
		req.DataSource = &builder.dataSource

	}
	return req
}

type MGetUserEntityOptions struct {
	AuthExtra map[string]string `json:"auth_extra,omitempty"` // 透传给权限的额外字段
}

type MGetUserEntityOptionsBuilder struct {
	authExtra     map[string]string // 透传给权限的额外字段
	authExtraFlag bool
}

func NewMGetUserEntityOptionsBuilder() *MGetUserEntityOptionsBuilder {
	builder := &MGetUserEntityOptionsBuilder{}
	return builder
}

// 透传给权限的额外字段
//
// 示例值：
func (builder *MGetUserEntityOptionsBuilder) AuthExtra(authExtra map[string]string) *MGetUserEntityOptionsBuilder {
	builder.authExtra = authExtra
	builder.authExtraFlag = true
	return builder
}

func (builder *MGetUserEntityOptionsBuilder) Build() *MGetUserEntityOptions {
	req := &MGetUserEntityOptions{}
	if builder.authExtraFlag {
		req.AuthExtra = builder.authExtra
	}
	return req
}

type MGetUserVisibleFieldsOptions struct {
	NeedFieldData *bool `json:"need_field_data,omitempty"` // 为 True 时额外返回数据信息, 默认为False只返回鉴权信息\n需要返回数据信息时接口耗时会有一定增加
}

type MGetUserVisibleFieldsOptionsBuilder struct {
	needFieldData     bool // 为 True 时额外返回数据信息, 默认为False只返回鉴权信息\n需要返回数据信息时接口耗时会有一定增加
	needFieldDataFlag bool
}

func NewMGetUserVisibleFieldsOptionsBuilder() *MGetUserVisibleFieldsOptionsBuilder {
	builder := &MGetUserVisibleFieldsOptionsBuilder{}
	return builder
}

// 为 True 时额外返回数据信息, 默认为False只返回鉴权信息\n需要返回数据信息时接口耗时会有一定增加
//
// 示例值：
func (builder *MGetUserVisibleFieldsOptionsBuilder) NeedFieldData(needFieldData bool) *MGetUserVisibleFieldsOptionsBuilder {
	builder.needFieldData = needFieldData
	builder.needFieldDataFlag = true
	return builder
}

func (builder *MGetUserVisibleFieldsOptionsBuilder) Build() *MGetUserVisibleFieldsOptions {
	req := &MGetUserVisibleFieldsOptions{}
	if builder.needFieldDataFlag {
		req.NeedFieldData = &builder.needFieldData

	}
	return req
}

type MGetVisibleEmployeeIdsOptions struct {
	AuthExtra map[string]string `json:"auth_extra,omitempty"` // 透传给权限的额外字段
}

type MGetVisibleEmployeeIdsOptionsBuilder struct {
	authExtra     map[string]string // 透传给权限的额外字段
	authExtraFlag bool
}

func NewMGetVisibleEmployeeIdsOptionsBuilder() *MGetVisibleEmployeeIdsOptionsBuilder {
	builder := &MGetVisibleEmployeeIdsOptionsBuilder{}
	return builder
}

// 透传给权限的额外字段
//
// 示例值：
func (builder *MGetVisibleEmployeeIdsOptionsBuilder) AuthExtra(authExtra map[string]string) *MGetVisibleEmployeeIdsOptionsBuilder {
	builder.authExtra = authExtra
	builder.authExtraFlag = true
	return builder
}

func (builder *MGetVisibleEmployeeIdsOptionsBuilder) Build() *MGetVisibleEmployeeIdsOptions {
	req := &MGetVisibleEmployeeIdsOptions{}
	if builder.authExtraFlag {
		req.AuthExtra = builder.authExtra
	}
	return req
}

type MUpdateCustomFieldOptions struct {
	DataSource *int `json:"data_source,omitempty"` // 数据来源
}

type MUpdateCustomFieldOptionsBuilder struct {
	dataSource     int // 数据来源
	dataSourceFlag bool
}

func NewMUpdateCustomFieldOptionsBuilder() *MUpdateCustomFieldOptionsBuilder {
	builder := &MUpdateCustomFieldOptionsBuilder{}
	return builder
}

// 数据来源
//
// 示例值：
func (builder *MUpdateCustomFieldOptionsBuilder) DataSource(dataSource int) *MUpdateCustomFieldOptionsBuilder {
	builder.dataSource = dataSource
	builder.dataSourceFlag = true
	return builder
}

func (builder *MUpdateCustomFieldOptionsBuilder) Build() *MUpdateCustomFieldOptions {
	req := &MUpdateCustomFieldOptions{}
	if builder.dataSourceFlag {
		req.DataSource = &builder.dataSource

	}
	return req
}

type MigrateGeoOptions struct {
	TargetGeo *string `json:"target_geo,omitempty"` // 迁移的目标Geo

	TaskId *string `json:"task_id,omitempty"` // 迁移任务的id，不指定时自动生成
}

type MigrateGeoOptionsBuilder struct {
	targetGeo     string // 迁移的目标Geo
	targetGeoFlag bool

	taskId     string // 迁移任务的id，不指定时自动生成
	taskIdFlag bool
}

func NewMigrateGeoOptionsBuilder() *MigrateGeoOptionsBuilder {
	builder := &MigrateGeoOptionsBuilder{}
	return builder
}

// 迁移的目标Geo
//
// 示例值：cn
func (builder *MigrateGeoOptionsBuilder) TargetGeo(targetGeo string) *MigrateGeoOptionsBuilder {
	builder.targetGeo = targetGeo
	builder.targetGeoFlag = true
	return builder
}

// 迁移任务的id，不指定时自动生成
//
// 示例值：342123423
func (builder *MigrateGeoOptionsBuilder) TaskId(taskId string) *MigrateGeoOptionsBuilder {
	builder.taskId = taskId
	builder.taskIdFlag = true
	return builder
}

func (builder *MigrateGeoOptionsBuilder) Build() *MigrateGeoOptions {
	req := &MigrateGeoOptions{}
	if builder.targetGeoFlag {
		req.TargetGeo = &builder.targetGeo

	}
	if builder.taskIdFlag {
		req.TaskId = &builder.taskId

	}
	return req
}

type MultiFilterCondition struct {
	Expr *string `json:"expr,omitempty"` // 逻辑表达式，内容为比较表达式的关系\n 操作数：使用序号标识一个比较表达式 运算符：逻辑运算符当前仅支持and，可以使用括号来改变优先级，括号具有最高优先级。 相同优先级从左到右的顺序进行计算。取值举例：1 and 2 and (3 and 4)

	Conditions []*FilterCondition `json:"conditions,omitempty"` // 比较表达式列表，内容如 base_info.mobile eq "\"+8613000000001\""的比较条件，多个表达式之间的关系为且
}

type MultiFilterConditionBuilder struct {
	expr     string // 逻辑表达式，内容为比较表达式的关系\n 操作数：使用序号标识一个比较表达式 运算符：逻辑运算符当前仅支持and，可以使用括号来改变优先级，括号具有最高优先级。 相同优先级从左到右的顺序进行计算。取值举例：1 and 2 and (3 and 4)
	exprFlag bool

	conditions     []*FilterCondition // 比较表达式列表，内容如 base_info.mobile eq "\"+8613000000001\""的比较条件，多个表达式之间的关系为且
	conditionsFlag bool
}

func NewMultiFilterConditionBuilder() *MultiFilterConditionBuilder {
	builder := &MultiFilterConditionBuilder{}
	return builder
}

// 逻辑表达式，内容为比较表达式的关系\n 操作数：使用序号标识一个比较表达式 运算符：逻辑运算符当前仅支持and，可以使用括号来改变优先级，括号具有最高优先级。 相同优先级从左到右的顺序进行计算。取值举例：1 and 2 and (3 and 4)
//
// 示例值：
func (builder *MultiFilterConditionBuilder) Expr(expr string) *MultiFilterConditionBuilder {
	builder.expr = expr
	builder.exprFlag = true
	return builder
}

// 比较表达式列表，内容如 base_info.mobile eq "\"+8613000000001\""的比较条件，多个表达式之间的关系为且
//
// 示例值：
func (builder *MultiFilterConditionBuilder) Conditions(conditions []*FilterCondition) *MultiFilterConditionBuilder {
	builder.conditions = conditions
	builder.conditionsFlag = true
	return builder
}

func (builder *MultiFilterConditionBuilder) Build() *MultiFilterCondition {
	req := &MultiFilterCondition{}
	if builder.exprFlag {
		req.Expr = &builder.expr

	}
	if builder.conditionsFlag {
		req.Conditions = builder.conditions
	}
	return req
}

type Name struct {
	LastName *I18nText `json:"last_name,omitempty"` // i18n文本

	FirstName *I18nText `json:"first_name,omitempty"` // i18n文本

	MiddleName *I18nText `json:"middle_name,omitempty"` // i18n文本

	Name *I18nText `json:"name,omitempty"` // i18n文本

	NamePy *string `json:"name_py,omitempty"` // 姓名的拼音

	AnotherName *string `json:"another_name,omitempty"` // 别名

	LegalName *string `json:"legal_name,omitempty"` // 法定姓名

	DisplayName *I18nText `json:"display_name,omitempty"` // i18n文本
}

type NameBuilder struct {
	lastName     *I18nText // i18n文本
	lastNameFlag bool

	firstName     *I18nText // i18n文本
	firstNameFlag bool

	middleName     *I18nText // i18n文本
	middleNameFlag bool

	name     *I18nText // i18n文本
	nameFlag bool

	namePy     string // 姓名的拼音
	namePyFlag bool

	anotherName     string // 别名
	anotherNameFlag bool

	legalName     string // 法定姓名
	legalNameFlag bool

	displayName     *I18nText // i18n文本
	displayNameFlag bool
}

func NewNameBuilder() *NameBuilder {
	builder := &NameBuilder{}
	return builder
}

// i18n文本
//
// 示例值：
func (builder *NameBuilder) LastName(lastName *I18nText) *NameBuilder {
	builder.lastName = lastName
	builder.lastNameFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *NameBuilder) FirstName(firstName *I18nText) *NameBuilder {
	builder.firstName = firstName
	builder.firstNameFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *NameBuilder) MiddleName(middleName *I18nText) *NameBuilder {
	builder.middleName = middleName
	builder.middleNameFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *NameBuilder) Name(name *I18nText) *NameBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 姓名的拼音
//
// 示例值：zhangsan
func (builder *NameBuilder) NamePy(namePy string) *NameBuilder {
	builder.namePy = namePy
	builder.namePyFlag = true
	return builder
}

// 别名
//
// 示例值：张小明
func (builder *NameBuilder) AnotherName(anotherName string) *NameBuilder {
	builder.anotherName = anotherName
	builder.anotherNameFlag = true
	return builder
}

// 法定姓名
//
// 示例值：张三
func (builder *NameBuilder) LegalName(legalName string) *NameBuilder {
	builder.legalName = legalName
	builder.legalNameFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *NameBuilder) DisplayName(displayName *I18nText) *NameBuilder {
	builder.displayName = displayName
	builder.displayNameFlag = true
	return builder
}

func (builder *NameBuilder) Build() *Name {
	req := &Name{}
	if builder.lastNameFlag {
		req.LastName = builder.lastName
	}
	if builder.firstNameFlag {
		req.FirstName = builder.firstName
	}
	if builder.middleNameFlag {
		req.MiddleName = builder.middleName
	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.namePyFlag {
		req.NamePy = &builder.namePy

	}
	if builder.anotherNameFlag {
		req.AnotherName = &builder.anotherName

	}
	if builder.legalNameFlag {
		req.LegalName = &builder.legalName

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

type OpenapiOptions struct {
	EmployeeIdType *string `json:"employee_id_type,omitempty"` // 员工ID类型

	DepartmentIdType *string `json:"department_id_type,omitempty"` // 部门ID类型

	JobTitleIdType *string `json:"job_title_id_type,omitempty"` // 职务id类型

	WorkPlaceIdType *string `json:"work_place_id_type,omitempty"` // 工作城市id类型

	OrgDimensionIdType *string `json:"org_dimension_id_type,omitempty"` // 组织维度ID类型

	GroupIdType *string `json:"group_id_type,omitempty"` // 用户组ID类型

	GroupSetIdType *string `json:"group_set_id_type,omitempty"` // 用户组分组ID类型
}

type OpenapiOptionsBuilder struct {
	employeeIdType     string // 员工ID类型
	employeeIdTypeFlag bool

	departmentIdType     string // 部门ID类型
	departmentIdTypeFlag bool

	jobTitleIdType     string // 职务id类型
	jobTitleIdTypeFlag bool

	workPlaceIdType     string // 工作城市id类型
	workPlaceIdTypeFlag bool

	orgDimensionIdType     string // 组织维度ID类型
	orgDimensionIdTypeFlag bool

	groupIdType     string // 用户组ID类型
	groupIdTypeFlag bool

	groupSetIdType     string // 用户组分组ID类型
	groupSetIdTypeFlag bool
}

func NewOpenapiOptionsBuilder() *OpenapiOptionsBuilder {
	builder := &OpenapiOptionsBuilder{}
	return builder
}

// 员工ID类型
//
// 示例值：open_id
func (builder *OpenapiOptionsBuilder) EmployeeIdType(employeeIdType string) *OpenapiOptionsBuilder {
	builder.employeeIdType = employeeIdType
	builder.employeeIdTypeFlag = true
	return builder
}

// 部门ID类型
//
// 示例值：open_department_id
func (builder *OpenapiOptionsBuilder) DepartmentIdType(departmentIdType string) *OpenapiOptionsBuilder {
	builder.departmentIdType = departmentIdType
	builder.departmentIdTypeFlag = true
	return builder
}

// 职务id类型
//
// 示例值：job_title_id
func (builder *OpenapiOptionsBuilder) JobTitleIdType(jobTitleIdType string) *OpenapiOptionsBuilder {
	builder.jobTitleIdType = jobTitleIdType
	builder.jobTitleIdTypeFlag = true
	return builder
}

// 工作城市id类型
//
// 示例值：work_place_id
func (builder *OpenapiOptionsBuilder) WorkPlaceIdType(workPlaceIdType string) *OpenapiOptionsBuilder {
	builder.workPlaceIdType = workPlaceIdType
	builder.workPlaceIdTypeFlag = true
	return builder
}

// 组织维度ID类型
//
// 示例值：open_org_dimension_id
func (builder *OpenapiOptionsBuilder) OrgDimensionIdType(orgDimensionIdType string) *OpenapiOptionsBuilder {
	builder.orgDimensionIdType = orgDimensionIdType
	builder.orgDimensionIdTypeFlag = true
	return builder
}

// 用户组ID类型
//
// 示例值：open_group_id
func (builder *OpenapiOptionsBuilder) GroupIdType(groupIdType string) *OpenapiOptionsBuilder {
	builder.groupIdType = groupIdType
	builder.groupIdTypeFlag = true
	return builder
}

// 用户组分组ID类型
//
// 示例值：open_group_set_id
func (builder *OpenapiOptionsBuilder) GroupSetIdType(groupSetIdType string) *OpenapiOptionsBuilder {
	builder.groupSetIdType = groupSetIdType
	builder.groupSetIdTypeFlag = true
	return builder
}

func (builder *OpenapiOptionsBuilder) Build() *OpenapiOptions {
	req := &OpenapiOptions{}
	if builder.employeeIdTypeFlag {
		req.EmployeeIdType = &builder.employeeIdType

	}
	if builder.departmentIdTypeFlag {
		req.DepartmentIdType = &builder.departmentIdType

	}
	if builder.jobTitleIdTypeFlag {
		req.JobTitleIdType = &builder.jobTitleIdType

	}
	if builder.workPlaceIdTypeFlag {
		req.WorkPlaceIdType = &builder.workPlaceIdType

	}
	if builder.orgDimensionIdTypeFlag {
		req.OrgDimensionIdType = &builder.orgDimensionIdType

	}
	if builder.groupIdTypeFlag {
		req.GroupIdType = &builder.groupIdType

	}
	if builder.groupSetIdTypeFlag {
		req.GroupSetIdType = &builder.groupSetIdType

	}
	return req
}

type Operator struct {
	Id *string `json:"id,omitempty"` // 操作人id

	Type *int `json:"type,omitempty"` // 操作来源
}

type OperatorBuilder struct {
	id     string // 操作人id
	idFlag bool

	type_    int // 操作来源
	typeFlag bool
}

func NewOperatorBuilder() *OperatorBuilder {
	builder := &OperatorBuilder{}
	return builder
}

// 操作人id
//
// 示例值：eeasfds
func (builder *OperatorBuilder) Id(id string) *OperatorBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 操作来源
//
// 示例值：
func (builder *OperatorBuilder) Type(type_ int) *OperatorBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

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

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

	}
	return req
}

type OptionValue struct {
	Id *string `json:"id,omitempty"` // 选项ID

	OptionValue *I18nText `json:"option_value,omitempty"` // i18n文本

	Description *I18nText `json:"description,omitempty"` // i18n文本

	IsEnabled *bool `json:"is_enabled,omitempty"` // 是否启用

	IsDeleted *bool `json:"is_deleted,omitempty"` // 是否删除
}

type OptionValueBuilder struct {
	id     string // 选项ID
	idFlag bool

	optionValue     *I18nText // i18n文本
	optionValueFlag bool

	description     *I18nText // i18n文本
	descriptionFlag bool

	isEnabled     bool // 是否启用
	isEnabledFlag bool

	isDeleted     bool // 是否删除
	isDeletedFlag bool
}

func NewOptionValueBuilder() *OptionValueBuilder {
	builder := &OptionValueBuilder{}
	return builder
}

// 选项ID
//
// 示例值：124112
func (builder *OptionValueBuilder) Id(id string) *OptionValueBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *OptionValueBuilder) OptionValue(optionValue *I18nText) *OptionValueBuilder {
	builder.optionValue = optionValue
	builder.optionValueFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *OptionValueBuilder) Description(description *I18nText) *OptionValueBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 是否启用
//
// 示例值：true
func (builder *OptionValueBuilder) IsEnabled(isEnabled bool) *OptionValueBuilder {
	builder.isEnabled = isEnabled
	builder.isEnabledFlag = true
	return builder
}

// 是否删除
//
// 示例值：true
func (builder *OptionValueBuilder) IsDeleted(isDeleted bool) *OptionValueBuilder {
	builder.isDeleted = isDeleted
	builder.isDeletedFlag = true
	return builder
}

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

	}
	if builder.optionValueFlag {
		req.OptionValue = builder.optionValue
	}
	if builder.descriptionFlag {
		req.Description = builder.description
	}
	if builder.isEnabledFlag {
		req.IsEnabled = &builder.isEnabled

	}
	if builder.isDeletedFlag {
		req.IsDeleted = &builder.isDeleted

	}
	return req
}

type OrderField struct {
	Field *string `json:"field,omitempty"` // 字段名

	OrderType *int `json:"order_type,omitempty"` // 排序方式
}

type OrderFieldBuilder struct {
	field     string // 字段名
	fieldFlag bool

	orderType     int // 排序方式
	orderTypeFlag bool
}

func NewOrderFieldBuilder() *OrderFieldBuilder {
	builder := &OrderFieldBuilder{}
	return builder
}

// 字段名
//
// 示例值：test
func (builder *OrderFieldBuilder) Field(field string) *OrderFieldBuilder {
	builder.field = field
	builder.fieldFlag = true
	return builder
}

// 排序方式
//
// 示例值：
func (builder *OrderFieldBuilder) OrderType(orderType int) *OrderFieldBuilder {
	builder.orderType = orderType
	builder.orderTypeFlag = true
	return builder
}

func (builder *OrderFieldBuilder) Build() *OrderField {
	req := &OrderField{}
	if builder.fieldFlag {
		req.Field = &builder.field

	}
	if builder.orderTypeFlag {
		req.OrderType = &builder.orderType

	}
	return req
}

type OrgDimension struct {
	Id *string `json:"id,omitempty"` // 组织维度id

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

	Name *I18nText `json:"name,omitempty"` // i18n文本

	EnumType *int `json:"enum_type,omitempty"` // 组织维度类型(1.预置 2.自定义)

	IsEnable *bool `json:"is_enable,omitempty"` // 是否启用

	IsDeleted *bool `json:"is_deleted,omitempty"` // 是否删除

	Order *string `json:"order,omitempty"` // 组织维度排序权重

	Description *I18nText `json:"description,omitempty"` // i18n文本

	RootDepartmentId *string `json:"root_department_id,omitempty"` // 根部门id
}

type OrgDimensionBuilder struct {
	id     string // 组织维度id
	idFlag bool

	tenantId     string // 租户id
	tenantIdFlag bool

	name     *I18nText // i18n文本
	nameFlag bool

	enumType     int // 组织维度类型(1.预置 2.自定义)
	enumTypeFlag bool

	isEnable     bool // 是否启用
	isEnableFlag bool

	isDeleted     bool // 是否删除
	isDeletedFlag bool

	order     string // 组织维度排序权重
	orderFlag bool

	description     *I18nText // i18n文本
	descriptionFlag bool

	rootDepartmentId     string // 根部门id
	rootDepartmentIdFlag bool
}

func NewOrgDimensionBuilder() *OrgDimensionBuilder {
	builder := &OrgDimensionBuilder{}
	return builder
}

// 组织维度id
//
// 示例值：02c7141
func (builder *OrgDimensionBuilder) Id(id string) *OrgDimensionBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 租户id
//
// 示例值：u273y71
func (builder *OrgDimensionBuilder) TenantId(tenantId string) *OrgDimensionBuilder {
	builder.tenantId = tenantId
	builder.tenantIdFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *OrgDimensionBuilder) Name(name *I18nText) *OrgDimensionBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 组织维度类型(1.预置 2.自定义)
//
// 示例值：
func (builder *OrgDimensionBuilder) EnumType(enumType int) *OrgDimensionBuilder {
	builder.enumType = enumType
	builder.enumTypeFlag = true
	return builder
}

// 是否启用
//
// 示例值：
func (builder *OrgDimensionBuilder) IsEnable(isEnable bool) *OrgDimensionBuilder {
	builder.isEnable = isEnable
	builder.isEnableFlag = true
	return builder
}

// 是否删除
//
// 示例值：
func (builder *OrgDimensionBuilder) IsDeleted(isDeleted bool) *OrgDimensionBuilder {
	builder.isDeleted = isDeleted
	builder.isDeletedFlag = true
	return builder
}

// 组织维度排序权重
//
// 示例值：100
func (builder *OrgDimensionBuilder) Order(order string) *OrgDimensionBuilder {
	builder.order = order
	builder.orderFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *OrgDimensionBuilder) Description(description *I18nText) *OrgDimensionBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 根部门id
//
// 示例值：D12100
func (builder *OrgDimensionBuilder) RootDepartmentId(rootDepartmentId string) *OrgDimensionBuilder {
	builder.rootDepartmentId = rootDepartmentId
	builder.rootDepartmentIdFlag = true
	return builder
}

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

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

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.enumTypeFlag {
		req.EnumType = &builder.enumType

	}
	if builder.isEnableFlag {
		req.IsEnable = &builder.isEnable

	}
	if builder.isDeletedFlag {
		req.IsDeleted = &builder.isDeleted

	}
	if builder.orderFlag {
		req.Order = &builder.order

	}
	if builder.descriptionFlag {
		req.Description = builder.description
	}
	if builder.rootDepartmentIdFlag {
		req.RootDepartmentId = &builder.rootDepartmentId

	}
	return req
}

type OrgVisibility struct {
	MainRule *VisibleMainRule `json:"main_rule,omitempty"` // 主规则

	AssistRules []*VisibleAssistRule `json:"assist_rules,omitempty"` // 补充规则
}

type OrgVisibilityBuilder struct {
	mainRule     *VisibleMainRule // 主规则
	mainRuleFlag bool

	assistRules     []*VisibleAssistRule // 补充规则
	assistRulesFlag bool
}

func NewOrgVisibilityBuilder() *OrgVisibilityBuilder {
	builder := &OrgVisibilityBuilder{}
	return builder
}

// 主规则
//
// 示例值：
func (builder *OrgVisibilityBuilder) MainRule(mainRule *VisibleMainRule) *OrgVisibilityBuilder {
	builder.mainRule = mainRule
	builder.mainRuleFlag = true
	return builder
}

// 补充规则
//
// 示例值：
func (builder *OrgVisibilityBuilder) AssistRules(assistRules []*VisibleAssistRule) *OrgVisibilityBuilder {
	builder.assistRules = assistRules
	builder.assistRulesFlag = true
	return builder
}

func (builder *OrgVisibilityBuilder) Build() *OrgVisibility {
	req := &OrgVisibility{}
	if builder.mainRuleFlag {
		req.MainRule = builder.mainRule
	}
	if builder.assistRulesFlag {
		req.AssistRules = builder.assistRules
	}
	return req
}

type PageCondition struct {
	PageType *string `json:"page_type,omitempty"` // 本次请求条数，默认为cursor分页

	PageSize *int `json:"page_size,omitempty"` // 本次请求条数

	PageToken *string `json:"page_token,omitempty"` // 顺序分页查询，不能跳页查询，支持深分页，在需要遍历全部数据的场景只能使用该方式。第一次传空字符串或者不传，后面传上一次的返回值中的page_token

	Offset *int `json:"offset,omitempty"` // 偏移量，支持跳页查询
}

type PageConditionBuilder struct {
	pageType     string // 本次请求条数，默认为cursor分页
	pageTypeFlag bool

	pageSize     int // 本次请求条数
	pageSizeFlag bool

	pageToken     string // 顺序分页查询，不能跳页查询，支持深分页，在需要遍历全部数据的场景只能使用该方式。第一次传空字符串或者不传，后面传上一次的返回值中的page_token
	pageTokenFlag bool

	offset     int // 偏移量，支持跳页查询
	offsetFlag bool
}

func NewPageConditionBuilder() *PageConditionBuilder {
	builder := &PageConditionBuilder{}
	return builder
}

// 本次请求条数，默认为cursor分页
//
// 示例值：
func (builder *PageConditionBuilder) PageType(pageType string) *PageConditionBuilder {
	builder.pageType = pageType
	builder.pageTypeFlag = true
	return builder
}

// 本次请求条数
//
// 示例值：
func (builder *PageConditionBuilder) PageSize(pageSize int) *PageConditionBuilder {
	builder.pageSize = pageSize
	builder.pageSizeFlag = true
	return builder
}

// 顺序分页查询，不能跳页查询，支持深分页，在需要遍历全部数据的场景只能使用该方式。第一次传空字符串或者不传，后面传上一次的返回值中的page_token
//
// 示例值：
func (builder *PageConditionBuilder) PageToken(pageToken string) *PageConditionBuilder {
	builder.pageToken = pageToken
	builder.pageTokenFlag = true
	return builder
}

// 偏移量，支持跳页查询
//
// 示例值：1
func (builder *PageConditionBuilder) Offset(offset int) *PageConditionBuilder {
	builder.offset = offset
	builder.offsetFlag = true
	return builder
}

func (builder *PageConditionBuilder) Build() *PageCondition {
	req := &PageCondition{}
	if builder.pageTypeFlag {
		req.PageType = &builder.pageType

	}
	if builder.pageSizeFlag {
		req.PageSize = &builder.pageSize

	}
	if builder.pageTokenFlag {
		req.PageToken = &builder.pageToken

	}
	if builder.offsetFlag {
		req.Offset = &builder.offset

	}
	return req
}

type PageRequest struct {
	PageType *int `json:"page_type,omitempty"` // 分页方式，每次请求只能使用一种

	Limit *int `json:"limit,omitempty"` // 本次请求条数，不超过100，因为接口会经过权限过滤，所以该值是本次返回的最大值

	OrderType *int `json:"order_type,omitempty"` // 排序方式，每次请求只能使用一种

	Offset *int `json:"offset,omitempty"` // 当PageType=OFFSET 时有效\n从0开始，默认通过ID字段排序，升降序方式可以通过OrderType指定，也可以通过OrderFields指定排序字段和对应的排序方式\n请求方需要根据自己的场景算好offset，例如根据PageSize *  PageNum得出结果\n支持跳页查询，不支持深分页\n如果Offset + Limit > 10000 时默认返回空，这种场景要么细化筛选条件，要么使用CURSOR方式

	Cursor *string `json:"cursor,omitempty"` // 当PageType=CURSOR 时有效\n该方式默认通过ID字段排序，升降序方式可以通过OrderType指定，也可以通过CursorField指定排序字段\n只能顺序分页，不能跳页查询，支持深分页，在需要遍历全部数据的场景只能使用该方式\n第一次传空字符串或者不传，后面传上一次的返回值中的cursor

	OrderFields []*OrderField `json:"order_fields,omitempty"` // 暂不支持\n当PageType=OFFSET 时有效\n默认是按照实体ID排序，在ID排序无法满足需求的场景，可以自定义排序方式

	CursorField *string `json:"cursor_field,omitempty"` // 暂不支持\n当PageType=CURSOR 时有效\n默认是按照实体ID排序，在ID排序无法满足需求的场景，可以自定义排序字段，只能支持单一字段
}

type PageRequestBuilder struct {
	pageType     int // 分页方式，每次请求只能使用一种
	pageTypeFlag bool

	limit     int // 本次请求条数，不超过100，因为接口会经过权限过滤，所以该值是本次返回的最大值
	limitFlag bool

	orderType     int // 排序方式，每次请求只能使用一种
	orderTypeFlag bool

	offset     int // 当PageType=OFFSET 时有效\n从0开始，默认通过ID字段排序，升降序方式可以通过OrderType指定，也可以通过OrderFields指定排序字段和对应的排序方式\n请求方需要根据自己的场景算好offset，例如根据PageSize *  PageNum得出结果\n支持跳页查询，不支持深分页\n如果Offset + Limit > 10000 时默认返回空，这种场景要么细化筛选条件，要么使用CURSOR方式
	offsetFlag bool

	cursor     string // 当PageType=CURSOR 时有效\n该方式默认通过ID字段排序，升降序方式可以通过OrderType指定，也可以通过CursorField指定排序字段\n只能顺序分页，不能跳页查询，支持深分页，在需要遍历全部数据的场景只能使用该方式\n第一次传空字符串或者不传，后面传上一次的返回值中的cursor
	cursorFlag bool

	orderFields     []*OrderField // 暂不支持\n当PageType=OFFSET 时有效\n默认是按照实体ID排序，在ID排序无法满足需求的场景，可以自定义排序方式
	orderFieldsFlag bool

	cursorField     string // 暂不支持\n当PageType=CURSOR 时有效\n默认是按照实体ID排序，在ID排序无法满足需求的场景，可以自定义排序字段，只能支持单一字段
	cursorFieldFlag bool
}

func NewPageRequestBuilder() *PageRequestBuilder {
	builder := &PageRequestBuilder{}
	return builder
}

// 分页方式，每次请求只能使用一种
//
// 示例值：
func (builder *PageRequestBuilder) PageType(pageType int) *PageRequestBuilder {
	builder.pageType = pageType
	builder.pageTypeFlag = true
	return builder
}

// 本次请求条数，不超过100，因为接口会经过权限过滤，所以该值是本次返回的最大值
//
// 示例值：100
func (builder *PageRequestBuilder) Limit(limit int) *PageRequestBuilder {
	builder.limit = limit
	builder.limitFlag = true
	return builder
}

// 排序方式，每次请求只能使用一种
//
// 示例值：
func (builder *PageRequestBuilder) OrderType(orderType int) *PageRequestBuilder {
	builder.orderType = orderType
	builder.orderTypeFlag = true
	return builder
}

// 当PageType=OFFSET 时有效\n从0开始，默认通过ID字段排序，升降序方式可以通过OrderType指定，也可以通过OrderFields指定排序字段和对应的排序方式\n请求方需要根据自己的场景算好offset，例如根据PageSize *  PageNum得出结果\n支持跳页查询，不支持深分页\n如果Offset + Limit > 10000 时默认返回空，这种场景要么细化筛选条件，要么使用CURSOR方式
//
// 示例值：0
func (builder *PageRequestBuilder) Offset(offset int) *PageRequestBuilder {
	builder.offset = offset
	builder.offsetFlag = true
	return builder
}

// 当PageType=CURSOR 时有效\n该方式默认通过ID字段排序，升降序方式可以通过OrderType指定，也可以通过CursorField指定排序字段\n只能顺序分页，不能跳页查询，支持深分页，在需要遍历全部数据的场景只能使用该方式\n第一次传空字符串或者不传，后面传上一次的返回值中的cursor
//
// 示例值：sdfsdfsdf
func (builder *PageRequestBuilder) Cursor(cursor string) *PageRequestBuilder {
	builder.cursor = cursor
	builder.cursorFlag = true
	return builder
}

// 暂不支持\n当PageType=OFFSET 时有效\n默认是按照实体ID排序，在ID排序无法满足需求的场景，可以自定义排序方式
//
// 示例值：
func (builder *PageRequestBuilder) OrderFields(orderFields []*OrderField) *PageRequestBuilder {
	builder.orderFields = orderFields
	builder.orderFieldsFlag = true
	return builder
}

// 暂不支持\n当PageType=CURSOR 时有效\n默认是按照实体ID排序，在ID排序无法满足需求的场景，可以自定义排序字段，只能支持单一字段
//
// 示例值：sdfsdfsdf
func (builder *PageRequestBuilder) CursorField(cursorField string) *PageRequestBuilder {
	builder.cursorField = cursorField
	builder.cursorFieldFlag = true
	return builder
}

func (builder *PageRequestBuilder) Build() *PageRequest {
	req := &PageRequest{}
	if builder.pageTypeFlag {
		req.PageType = &builder.pageType

	}
	if builder.limitFlag {
		req.Limit = &builder.limit

	}
	if builder.orderTypeFlag {
		req.OrderType = &builder.orderType

	}
	if builder.offsetFlag {
		req.Offset = &builder.offset

	}
	if builder.cursorFlag {
		req.Cursor = &builder.cursor

	}
	if builder.orderFieldsFlag {
		req.OrderFields = builder.orderFields
	}
	if builder.cursorFieldFlag {
		req.CursorField = &builder.cursorField

	}
	return req
}

type PageResponse struct {
	HasMore *bool `json:"has_more,omitempty"` // 是否还有后续结果

	PageToken *string `json:"page_token,omitempty"` // 分页标记，当 has_more 为 true 时，会同时返回新的 page_token，否则不返回 page_token

	Count *int `json:"count,omitempty"` // 总记录数，只在page_type=offset 时返回
}

type PageResponseBuilder struct {
	hasMore     bool // 是否还有后续结果
	hasMoreFlag bool

	pageToken     string // 分页标记，当 has_more 为 true 时，会同时返回新的 page_token，否则不返回 page_token
	pageTokenFlag bool

	count     int // 总记录数，只在page_type=offset 时返回
	countFlag bool
}

func NewPageResponseBuilder() *PageResponseBuilder {
	builder := &PageResponseBuilder{}
	return builder
}

// 是否还有后续结果
//
// 示例值：
func (builder *PageResponseBuilder) HasMore(hasMore bool) *PageResponseBuilder {
	builder.hasMore = hasMore
	builder.hasMoreFlag = true
	return builder
}

// 分页标记，当 has_more 为 true 时，会同时返回新的 page_token，否则不返回 page_token
//
// 示例值：
func (builder *PageResponseBuilder) PageToken(pageToken string) *PageResponseBuilder {
	builder.pageToken = pageToken
	builder.pageTokenFlag = true
	return builder
}

// 总记录数，只在page_type=offset 时返回
//
// 示例值：10
func (builder *PageResponseBuilder) Count(count int) *PageResponseBuilder {
	builder.count = count
	builder.countFlag = true
	return builder
}

func (builder *PageResponseBuilder) Build() *PageResponse {
	req := &PageResponse{}
	if builder.hasMoreFlag {
		req.HasMore = &builder.hasMore

	}
	if builder.pageTokenFlag {
		req.PageToken = &builder.pageToken

	}
	if builder.countFlag {
		req.Count = &builder.count

	}
	return req
}

type PersonalProfile struct {
	Id *string `json:"id,omitempty"` // 个人资料

	Type *string `json:"type,omitempty"` // 个人资料类型

	Files []string `json:"files,omitempty"` // 个人资料列表
}

type PersonalProfileBuilder struct {
	id     string // 个人资料
	idFlag bool

	type_    string // 个人资料类型
	typeFlag bool

	files     []string // 个人资料列表
	filesFlag bool
}

func NewPersonalProfileBuilder() *PersonalProfileBuilder {
	builder := &PersonalProfileBuilder{}
	return builder
}

// 个人资料
//
// 示例值：无
func (builder *PersonalProfileBuilder) Id(id string) *PersonalProfileBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 个人资料类型
//
// 示例值：无
func (builder *PersonalProfileBuilder) Type(type_ string) *PersonalProfileBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// 个人资料列表
//
// 示例值：无
func (builder *PersonalProfileBuilder) Files(files []string) *PersonalProfileBuilder {
	builder.files = files
	builder.filesFlag = true
	return builder
}

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

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

	}
	if builder.filesFlag {
		req.Files = builder.files
	}
	return req
}

type PhoneValue struct {
	PhoneNumber *string `json:"phone_number,omitempty"` // 电话号

	ExtensionNumber *string `json:"extension_number,omitempty"` // 分机号
}

type PhoneValueBuilder struct {
	phoneNumber     string // 电话号
	phoneNumberFlag bool

	extensionNumber     string // 分机号
	extensionNumberFlag bool
}

func NewPhoneValueBuilder() *PhoneValueBuilder {
	builder := &PhoneValueBuilder{}
	return builder
}

// 电话号
//
// 示例值：18812345678
func (builder *PhoneValueBuilder) PhoneNumber(phoneNumber string) *PhoneValueBuilder {
	builder.phoneNumber = phoneNumber
	builder.phoneNumberFlag = true
	return builder
}

// 分机号
//
// 示例值：234234234
func (builder *PhoneValueBuilder) ExtensionNumber(extensionNumber string) *PhoneValueBuilder {
	builder.extensionNumber = extensionNumber
	builder.extensionNumberFlag = true
	return builder
}

func (builder *PhoneValueBuilder) Build() *PhoneValue {
	req := &PhoneValue{}
	if builder.phoneNumberFlag {
		req.PhoneNumber = &builder.phoneNumber

	}
	if builder.extensionNumberFlag {
		req.ExtensionNumber = &builder.extensionNumber

	}
	return req
}

type Place struct {
	PlaceId *string `json:"place_id,omitempty"` // ID

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

	PlaceName *I18nText `json:"place_name,omitempty"` // i18n文本

	IsEnabled *bool `json:"is_enabled,omitempty"` // 是否启用

	Description *I18nText `json:"description,omitempty"` // i18n文本

	Usages []string `json:"usages,omitempty"` // 地点多用途

	AddressIds []string `json:"address_ids,omitempty"` // 地址

	MainAddressId *string `json:"main_address_id,omitempty"` // 主要地址

	IsDeleted *bool `json:"is_deleted,omitempty"` // 是否删除

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

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

	CreatorId *string `json:"creator_id,omitempty"` // 创建人

	UpdatorId *string `json:"updator_id,omitempty"` // 更新人

	ExternalId *string `json:"external_id,omitempty"` // 外部ID

	ParentId *string `json:"parent_id,omitempty"` // 上级ID
}

type PlaceBuilder struct {
	placeId     string // ID
	placeIdFlag bool

	tenantId     string // 租户ID
	tenantIdFlag bool

	placeName     *I18nText // i18n文本
	placeNameFlag bool

	isEnabled     bool // 是否启用
	isEnabledFlag bool

	description     *I18nText // i18n文本
	descriptionFlag bool

	usages     []string // 地点多用途
	usagesFlag bool

	addressIds     []string // 地址
	addressIdsFlag bool

	mainAddressId     string // 主要地址
	mainAddressIdFlag bool

	isDeleted     bool // 是否删除
	isDeletedFlag bool

	createTime     string // 创建时间
	createTimeFlag bool

	updateTime     string // 更新时间
	updateTimeFlag bool

	creatorId     string // 创建人
	creatorIdFlag bool

	updatorId     string // 更新人
	updatorIdFlag bool

	externalId     string // 外部ID
	externalIdFlag bool

	parentId     string // 上级ID
	parentIdFlag bool
}

func NewPlaceBuilder() *PlaceBuilder {
	builder := &PlaceBuilder{}
	return builder
}

// ID
//
// 示例值：place100
func (builder *PlaceBuilder) PlaceId(placeId string) *PlaceBuilder {
	builder.placeId = placeId
	builder.placeIdFlag = true
	return builder
}

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

// i18n文本
//
// 示例值：
func (builder *PlaceBuilder) PlaceName(placeName *I18nText) *PlaceBuilder {
	builder.placeName = placeName
	builder.placeNameFlag = true
	return builder
}

// 是否启用
//
// 示例值：true
func (builder *PlaceBuilder) IsEnabled(isEnabled bool) *PlaceBuilder {
	builder.isEnabled = isEnabled
	builder.isEnabledFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *PlaceBuilder) Description(description *I18nText) *PlaceBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 地点多用途
//
// 示例值：
func (builder *PlaceBuilder) Usages(usages []string) *PlaceBuilder {
	builder.usages = usages
	builder.usagesFlag = true
	return builder
}

// 地址
//
// 示例值：
func (builder *PlaceBuilder) AddressIds(addressIds []string) *PlaceBuilder {
	builder.addressIds = addressIds
	builder.addressIdsFlag = true
	return builder
}

// 主要地址
//
// 示例值：dsadqwe
func (builder *PlaceBuilder) MainAddressId(mainAddressId string) *PlaceBuilder {
	builder.mainAddressId = mainAddressId
	builder.mainAddressIdFlag = true
	return builder
}

// 是否删除
//
// 示例值：true
func (builder *PlaceBuilder) IsDeleted(isDeleted bool) *PlaceBuilder {
	builder.isDeleted = isDeleted
	builder.isDeletedFlag = true
	return builder
}

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

// 更新时间
//
// 示例值：1
func (builder *PlaceBuilder) UpdateTime(updateTime string) *PlaceBuilder {
	builder.updateTime = updateTime
	builder.updateTimeFlag = true
	return builder
}

// 创建人
//
// 示例值：1
func (builder *PlaceBuilder) CreatorId(creatorId string) *PlaceBuilder {
	builder.creatorId = creatorId
	builder.creatorIdFlag = true
	return builder
}

// 更新人
//
// 示例值：1
func (builder *PlaceBuilder) UpdatorId(updatorId string) *PlaceBuilder {
	builder.updatorId = updatorId
	builder.updatorIdFlag = true
	return builder
}

// 外部ID
//
// 示例值：qwasdewrq
func (builder *PlaceBuilder) ExternalId(externalId string) *PlaceBuilder {
	builder.externalId = externalId
	builder.externalIdFlag = true
	return builder
}

// 上级ID
//
// 示例值：1
func (builder *PlaceBuilder) ParentId(parentId string) *PlaceBuilder {
	builder.parentId = parentId
	builder.parentIdFlag = true
	return builder
}

func (builder *PlaceBuilder) Build() *Place {
	req := &Place{}
	if builder.placeIdFlag {
		req.PlaceId = &builder.placeId

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

	}
	if builder.placeNameFlag {
		req.PlaceName = builder.placeName
	}
	if builder.isEnabledFlag {
		req.IsEnabled = &builder.isEnabled

	}
	if builder.descriptionFlag {
		req.Description = builder.description
	}
	if builder.usagesFlag {
		req.Usages = builder.usages
	}
	if builder.addressIdsFlag {
		req.AddressIds = builder.addressIds
	}
	if builder.mainAddressIdFlag {
		req.MainAddressId = &builder.mainAddressId

	}
	if builder.isDeletedFlag {
		req.IsDeleted = &builder.isDeleted

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

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

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

	}
	if builder.updatorIdFlag {
		req.UpdatorId = &builder.updatorId

	}
	if builder.externalIdFlag {
		req.ExternalId = &builder.externalId

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

	}
	return req
}

type Position struct {
	PositionCode *string `json:"position_code,omitempty"` // 岗位code

	PositionName *string `json:"position_name,omitempty"` // 岗位名称

	LeaderId *string `json:"leader_id,omitempty"` // 上级领导id，可以没有上级领导

	LeaderPositionCode *string `json:"leader_position_code,omitempty"` // 上级领导岗位code，可以没有上级领导

	IsMainPosition *bool `json:"is_main_position,omitempty"` // 是否主岗，只允许一个主岗

	DepartmentId *string `json:"department_id,omitempty"` // 岗位所属的部门id，需要在用户所属的部门集之内（user.departmentIds）

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

	EmployeeId *string `json:"employee_id,omitempty"` // 雇员id

	UpdateTime *string `json:"update_time,omitempty"` // 更新时间，单位微秒
}

type PositionBuilder struct {
	positionCode     string // 岗位code
	positionCodeFlag bool

	positionName     string // 岗位名称
	positionNameFlag bool

	leaderId     string // 上级领导id，可以没有上级领导
	leaderIdFlag bool

	leaderPositionCode     string // 上级领导岗位code，可以没有上级领导
	leaderPositionCodeFlag bool

	isMainPosition     bool // 是否主岗，只允许一个主岗
	isMainPositionFlag bool

	departmentId     string // 岗位所属的部门id，需要在用户所属的部门集之内（user.departmentIds）
	departmentIdFlag bool

	tenantId     string // 租户id
	tenantIdFlag bool

	employeeId     string // 雇员id
	employeeIdFlag bool

	updateTime     string // 更新时间，单位微秒
	updateTimeFlag bool
}

func NewPositionBuilder() *PositionBuilder {
	builder := &PositionBuilder{}
	return builder
}

// 岗位code
//
// 示例值：PO18890
func (builder *PositionBuilder) PositionCode(positionCode string) *PositionBuilder {
	builder.positionCode = positionCode
	builder.positionCodeFlag = true
	return builder
}

// 岗位名称
//
// 示例值：总经理
func (builder *PositionBuilder) PositionName(positionName string) *PositionBuilder {
	builder.positionName = positionName
	builder.positionNameFlag = true
	return builder
}

// 上级领导id，可以没有上级领导
//
// 示例值：2e1cf73b
func (builder *PositionBuilder) LeaderId(leaderId string) *PositionBuilder {
	builder.leaderId = leaderId
	builder.leaderIdFlag = true
	return builder
}

// 上级领导岗位code，可以没有上级领导
//
// 示例值：e71b94gb
func (builder *PositionBuilder) LeaderPositionCode(leaderPositionCode string) *PositionBuilder {
	builder.leaderPositionCode = leaderPositionCode
	builder.leaderPositionCodeFlag = true
	return builder
}

// 是否主岗，只允许一个主岗
//
// 示例值：true
func (builder *PositionBuilder) IsMainPosition(isMainPosition bool) *PositionBuilder {
	builder.isMainPosition = isMainPosition
	builder.isMainPositionFlag = true
	return builder
}

// 岗位所属的部门id，需要在用户所属的部门集之内（user.departmentIds）
//
// 示例值：D100
func (builder *PositionBuilder) DepartmentId(departmentId string) *PositionBuilder {
	builder.departmentId = departmentId
	builder.departmentIdFlag = true
	return builder
}

// 租户id
//
// 示例值：无
func (builder *PositionBuilder) TenantId(tenantId string) *PositionBuilder {
	builder.tenantId = tenantId
	builder.tenantIdFlag = true
	return builder
}

// 雇员id
//
// 示例值：无
func (builder *PositionBuilder) EmployeeId(employeeId string) *PositionBuilder {
	builder.employeeId = employeeId
	builder.employeeIdFlag = true
	return builder
}

// 更新时间，单位微秒
//
// 示例值：无
func (builder *PositionBuilder) UpdateTime(updateTime string) *PositionBuilder {
	builder.updateTime = updateTime
	builder.updateTimeFlag = true
	return builder
}

func (builder *PositionBuilder) Build() *Position {
	req := &Position{}
	if builder.positionCodeFlag {
		req.PositionCode = &builder.positionCode

	}
	if builder.positionNameFlag {
		req.PositionName = &builder.positionName

	}
	if builder.leaderIdFlag {
		req.LeaderId = &builder.leaderId

	}
	if builder.leaderPositionCodeFlag {
		req.LeaderPositionCode = &builder.leaderPositionCode

	}
	if builder.isMainPositionFlag {
		req.IsMainPosition = &builder.isMainPosition

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

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

	}
	if builder.employeeIdFlag {
		req.EmployeeId = &builder.employeeId

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

	}
	return req
}

type ProfileCard struct {
	Name *I18nText `json:"name,omitempty"` // i18n文本

	Contacts []*Credential `json:"contacts,omitempty"` // 联系方式

	AvatarKey *string `json:"avatar_key,omitempty"` // 头像

	IsCustomAvatar *bool `json:"is_custom_avatar,omitempty"` // 是否自定义头像

	Description *I18nText `json:"description,omitempty"` // i18n文本

	BackgroundImageKey *string `json:"background_image_key,omitempty"` // 背景图
}

type ProfileCardBuilder struct {
	name     *I18nText // i18n文本
	nameFlag bool

	contacts     []*Credential // 联系方式
	contactsFlag bool

	avatarKey     string // 头像
	avatarKeyFlag bool

	isCustomAvatar     bool // 是否自定义头像
	isCustomAvatarFlag bool

	description     *I18nText // i18n文本
	descriptionFlag bool

	backgroundImageKey     string // 背景图
	backgroundImageKeyFlag bool
}

func NewProfileCardBuilder() *ProfileCardBuilder {
	builder := &ProfileCardBuilder{}
	return builder
}

// i18n文本
//
// 示例值：
func (builder *ProfileCardBuilder) Name(name *I18nText) *ProfileCardBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 联系方式
//
// 示例值：
func (builder *ProfileCardBuilder) Contacts(contacts []*Credential) *ProfileCardBuilder {
	builder.contacts = contacts
	builder.contactsFlag = true
	return builder
}

// 头像
//
// 示例值：123123123
func (builder *ProfileCardBuilder) AvatarKey(avatarKey string) *ProfileCardBuilder {
	builder.avatarKey = avatarKey
	builder.avatarKeyFlag = true
	return builder
}

// 是否自定义头像
//
// 示例值：
func (builder *ProfileCardBuilder) IsCustomAvatar(isCustomAvatar bool) *ProfileCardBuilder {
	builder.isCustomAvatar = isCustomAvatar
	builder.isCustomAvatarFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *ProfileCardBuilder) Description(description *I18nText) *ProfileCardBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 背景图
//
// 示例值：12312123123
func (builder *ProfileCardBuilder) BackgroundImageKey(backgroundImageKey string) *ProfileCardBuilder {
	builder.backgroundImageKey = backgroundImageKey
	builder.backgroundImageKeyFlag = true
	return builder
}

func (builder *ProfileCardBuilder) Build() *ProfileCard {
	req := &ProfileCard{}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.contactsFlag {
		req.Contacts = builder.contacts
	}
	if builder.avatarKeyFlag {
		req.AvatarKey = &builder.avatarKey

	}
	if builder.isCustomAvatarFlag {
		req.IsCustomAvatar = &builder.isCustomAvatar

	}
	if builder.descriptionFlag {
		req.Description = builder.description
	}
	if builder.backgroundImageKeyFlag {
		req.BackgroundImageKey = &builder.backgroundImageKey

	}
	return req
}

type QueryOptions struct {
	IgnoreStatus *bool `json:"ignore_status,omitempty"` // 查询结果包含软删数据

	AuthExtra map[string]string `json:"auth_extra,omitempty"` // 透传给权限的额外字段
}

type QueryOptionsBuilder struct {
	ignoreStatus     bool // 查询结果包含软删数据
	ignoreStatusFlag bool

	authExtra     map[string]string // 透传给权限的额外字段
	authExtraFlag bool
}

func NewQueryOptionsBuilder() *QueryOptionsBuilder {
	builder := &QueryOptionsBuilder{}
	return builder
}

// 查询结果包含软删数据
//
// 示例值：true
func (builder *QueryOptionsBuilder) IgnoreStatus(ignoreStatus bool) *QueryOptionsBuilder {
	builder.ignoreStatus = ignoreStatus
	builder.ignoreStatusFlag = true
	return builder
}

// 透传给权限的额外字段
//
// 示例值：
func (builder *QueryOptionsBuilder) AuthExtra(authExtra map[string]string) *QueryOptionsBuilder {
	builder.authExtra = authExtra
	builder.authExtraFlag = true
	return builder
}

func (builder *QueryOptionsBuilder) Build() *QueryOptions {
	req := &QueryOptions{}
	if builder.ignoreStatusFlag {
		req.IgnoreStatus = &builder.ignoreStatus

	}
	if builder.authExtraFlag {
		req.AuthExtra = builder.authExtra
	}
	return req
}

type ReplaceEmployeeTypeEnum struct {
	EnumId *string `json:"enum_id,omitempty"` // 枚举ID

	Content *I18nText `json:"content,omitempty"` // i18n文本

	EnumStatus *string `json:"enum_status,omitempty"` // 枚举状态

	EnumValue *string `json:"enum_value,omitempty"` // 枚举值

	EnumType *string `json:"enum_type,omitempty"` // 枚举类型
}

type ReplaceEmployeeTypeEnumBuilder struct {
	enumId     string // 枚举ID
	enumIdFlag bool

	content     *I18nText // i18n文本
	contentFlag bool

	enumStatus     string // 枚举状态
	enumStatusFlag bool

	enumValue     string // 枚举值
	enumValueFlag bool

	enumType     string // 枚举类型
	enumTypeFlag bool
}

func NewReplaceEmployeeTypeEnumBuilder() *ReplaceEmployeeTypeEnumBuilder {
	builder := &ReplaceEmployeeTypeEnumBuilder{}
	return builder
}

// 枚举ID
//
// 示例值：SHFIENW
func (builder *ReplaceEmployeeTypeEnumBuilder) EnumId(enumId string) *ReplaceEmployeeTypeEnumBuilder {
	builder.enumId = enumId
	builder.enumIdFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *ReplaceEmployeeTypeEnumBuilder) Content(content *I18nText) *ReplaceEmployeeTypeEnumBuilder {
	builder.content = content
	builder.contentFlag = true
	return builder
}

// 枚举状态
//
// 示例值：
func (builder *ReplaceEmployeeTypeEnumBuilder) EnumStatus(enumStatus string) *ReplaceEmployeeTypeEnumBuilder {
	builder.enumStatus = enumStatus
	builder.enumStatusFlag = true
	return builder
}

// 枚举值
//
// 示例值：1
func (builder *ReplaceEmployeeTypeEnumBuilder) EnumValue(enumValue string) *ReplaceEmployeeTypeEnumBuilder {
	builder.enumValue = enumValue
	builder.enumValueFlag = true
	return builder
}

// 枚举类型
//
// 示例值：
func (builder *ReplaceEmployeeTypeEnumBuilder) EnumType(enumType string) *ReplaceEmployeeTypeEnumBuilder {
	builder.enumType = enumType
	builder.enumTypeFlag = true
	return builder
}

func (builder *ReplaceEmployeeTypeEnumBuilder) Build() *ReplaceEmployeeTypeEnum {
	req := &ReplaceEmployeeTypeEnum{}
	if builder.enumIdFlag {
		req.EnumId = &builder.enumId

	}
	if builder.contentFlag {
		req.Content = builder.content
	}
	if builder.enumStatusFlag {
		req.EnumStatus = &builder.enumStatus

	}
	if builder.enumValueFlag {
		req.EnumValue = &builder.enumValue

	}
	if builder.enumTypeFlag {
		req.EnumType = &builder.enumType

	}
	return req
}

type ReplaceTenantEmployeeTypeEnumOptions struct {
	DataSource *int `json:"data_source,omitempty"` // 数据来源
}

type ReplaceTenantEmployeeTypeEnumOptionsBuilder struct {
	dataSource     int // 数据来源
	dataSourceFlag bool
}

func NewReplaceTenantEmployeeTypeEnumOptionsBuilder() *ReplaceTenantEmployeeTypeEnumOptionsBuilder {
	builder := &ReplaceTenantEmployeeTypeEnumOptionsBuilder{}
	return builder
}

// 数据来源
//
// 示例值：
func (builder *ReplaceTenantEmployeeTypeEnumOptionsBuilder) DataSource(dataSource int) *ReplaceTenantEmployeeTypeEnumOptionsBuilder {
	builder.dataSource = dataSource
	builder.dataSourceFlag = true
	return builder
}

func (builder *ReplaceTenantEmployeeTypeEnumOptionsBuilder) Build() *ReplaceTenantEmployeeTypeEnumOptions {
	req := &ReplaceTenantEmployeeTypeEnumOptions{}
	if builder.dataSourceFlag {
		req.DataSource = &builder.dataSource

	}
	return req
}

type ResignedUserResouceReceiver struct {
	DepartmentChatAcceptorEmployeeId *string `json:"department_chat_acceptor_employee_id,omitempty"` // 部门群owner

	ExternalChatAcceptorEmployeeId *string `json:"external_chat_acceptor_employee_id,omitempty"` // 外部群owner

	DocsAcceptorEmployeeId *string `json:"docs_acceptor_employee_id,omitempty"` // 文档owner

	CalendarAcceptorEmployeeId *string `json:"calendar_acceptor_employee_id,omitempty"` // 日历owner

	ApplicationAcceptorEmployeeId *string `json:"application_acceptor_employee_id,omitempty"` // 开放平台应用owner

	HelpdeskAcceptorEmployeeId *string `json:"helpdesk_acceptor_employee_id,omitempty"` // 服务台owner

	ApprovalAcceptorEmployeeId *string `json:"approval_acceptor_employee_id,omitempty"` // 审批owner

	EmailAcceptorEmployeeId *string `json:"email_acceptor_employee_id,omitempty"` // 邮件owner

	AwemeOwner *string `json:"aweme_owner,omitempty"` // 抖音owner

	MinutesAcceptorEmployeeId *string `json:"minutes_acceptor_employee_id,omitempty"` // 妙记Owner

	SurveyAcceptorEmployeeId *string `json:"survey_acceptor_employee_id,omitempty"` // 飞书问卷Owner

	AnycrossAcceptorEmployeeId *string `json:"anycross_acceptor_employee_id,omitempty"` // 集成平台资源Owner
}

type ResignedUserResouceReceiverBuilder struct {
	departmentChatAcceptorEmployeeId     string // 部门群owner
	departmentChatAcceptorEmployeeIdFlag bool

	externalChatAcceptorEmployeeId     string // 外部群owner
	externalChatAcceptorEmployeeIdFlag bool

	docsAcceptorEmployeeId     string // 文档owner
	docsAcceptorEmployeeIdFlag bool

	calendarAcceptorEmployeeId     string // 日历owner
	calendarAcceptorEmployeeIdFlag bool

	applicationAcceptorEmployeeId     string // 开放平台应用owner
	applicationAcceptorEmployeeIdFlag bool

	helpdeskAcceptorEmployeeId     string // 服务台owner
	helpdeskAcceptorEmployeeIdFlag bool

	approvalAcceptorEmployeeId     string // 审批owner
	approvalAcceptorEmployeeIdFlag bool

	emailAcceptorEmployeeId     string // 邮件owner
	emailAcceptorEmployeeIdFlag bool

	awemeOwner     string // 抖音owner
	awemeOwnerFlag bool

	minutesAcceptorEmployeeId     string // 妙记Owner
	minutesAcceptorEmployeeIdFlag bool

	surveyAcceptorEmployeeId     string // 飞书问卷Owner
	surveyAcceptorEmployeeIdFlag bool

	anycrossAcceptorEmployeeId     string // 集成平台资源Owner
	anycrossAcceptorEmployeeIdFlag bool
}

func NewResignedUserResouceReceiverBuilder() *ResignedUserResouceReceiverBuilder {
	builder := &ResignedUserResouceReceiverBuilder{}
	return builder
}

// 部门群owner
//
// 示例值：eehsdna
func (builder *ResignedUserResouceReceiverBuilder) DepartmentChatAcceptorEmployeeId(departmentChatAcceptorEmployeeId string) *ResignedUserResouceReceiverBuilder {
	builder.departmentChatAcceptorEmployeeId = departmentChatAcceptorEmployeeId
	builder.departmentChatAcceptorEmployeeIdFlag = true
	return builder
}

// 外部群owner
//
// 示例值：eehsdna
func (builder *ResignedUserResouceReceiverBuilder) ExternalChatAcceptorEmployeeId(externalChatAcceptorEmployeeId string) *ResignedUserResouceReceiverBuilder {
	builder.externalChatAcceptorEmployeeId = externalChatAcceptorEmployeeId
	builder.externalChatAcceptorEmployeeIdFlag = true
	return builder
}

// 文档owner
//
// 示例值：eehsdna
func (builder *ResignedUserResouceReceiverBuilder) DocsAcceptorEmployeeId(docsAcceptorEmployeeId string) *ResignedUserResouceReceiverBuilder {
	builder.docsAcceptorEmployeeId = docsAcceptorEmployeeId
	builder.docsAcceptorEmployeeIdFlag = true
	return builder
}

// 日历owner
//
// 示例值：eehsdna
func (builder *ResignedUserResouceReceiverBuilder) CalendarAcceptorEmployeeId(calendarAcceptorEmployeeId string) *ResignedUserResouceReceiverBuilder {
	builder.calendarAcceptorEmployeeId = calendarAcceptorEmployeeId
	builder.calendarAcceptorEmployeeIdFlag = true
	return builder
}

// 开放平台应用owner
//
// 示例值：eehsdna
func (builder *ResignedUserResouceReceiverBuilder) ApplicationAcceptorEmployeeId(applicationAcceptorEmployeeId string) *ResignedUserResouceReceiverBuilder {
	builder.applicationAcceptorEmployeeId = applicationAcceptorEmployeeId
	builder.applicationAcceptorEmployeeIdFlag = true
	return builder
}

// 服务台owner
//
// 示例值：eehsdna
func (builder *ResignedUserResouceReceiverBuilder) HelpdeskAcceptorEmployeeId(helpdeskAcceptorEmployeeId string) *ResignedUserResouceReceiverBuilder {
	builder.helpdeskAcceptorEmployeeId = helpdeskAcceptorEmployeeId
	builder.helpdeskAcceptorEmployeeIdFlag = true
	return builder
}

// 审批owner
//
// 示例值：eehsdna
func (builder *ResignedUserResouceReceiverBuilder) ApprovalAcceptorEmployeeId(approvalAcceptorEmployeeId string) *ResignedUserResouceReceiverBuilder {
	builder.approvalAcceptorEmployeeId = approvalAcceptorEmployeeId
	builder.approvalAcceptorEmployeeIdFlag = true
	return builder
}

// 邮件owner
//
// 示例值：eehsdna
func (builder *ResignedUserResouceReceiverBuilder) EmailAcceptorEmployeeId(emailAcceptorEmployeeId string) *ResignedUserResouceReceiverBuilder {
	builder.emailAcceptorEmployeeId = emailAcceptorEmployeeId
	builder.emailAcceptorEmployeeIdFlag = true
	return builder
}

// 抖音owner
//
// 示例值：eehsdna
func (builder *ResignedUserResouceReceiverBuilder) AwemeOwner(awemeOwner string) *ResignedUserResouceReceiverBuilder {
	builder.awemeOwner = awemeOwner
	builder.awemeOwnerFlag = true
	return builder
}

// 妙记Owner
//
// 示例值：eehsdna
func (builder *ResignedUserResouceReceiverBuilder) MinutesAcceptorEmployeeId(minutesAcceptorEmployeeId string) *ResignedUserResouceReceiverBuilder {
	builder.minutesAcceptorEmployeeId = minutesAcceptorEmployeeId
	builder.minutesAcceptorEmployeeIdFlag = true
	return builder
}

// 飞书问卷Owner
//
// 示例值：eehsdna
func (builder *ResignedUserResouceReceiverBuilder) SurveyAcceptorEmployeeId(surveyAcceptorEmployeeId string) *ResignedUserResouceReceiverBuilder {
	builder.surveyAcceptorEmployeeId = surveyAcceptorEmployeeId
	builder.surveyAcceptorEmployeeIdFlag = true
	return builder
}

// 集成平台资源Owner
//
// 示例值：eehsdna
func (builder *ResignedUserResouceReceiverBuilder) AnycrossAcceptorEmployeeId(anycrossAcceptorEmployeeId string) *ResignedUserResouceReceiverBuilder {
	builder.anycrossAcceptorEmployeeId = anycrossAcceptorEmployeeId
	builder.anycrossAcceptorEmployeeIdFlag = true
	return builder
}

func (builder *ResignedUserResouceReceiverBuilder) Build() *ResignedUserResouceReceiver {
	req := &ResignedUserResouceReceiver{}
	if builder.departmentChatAcceptorEmployeeIdFlag {
		req.DepartmentChatAcceptorEmployeeId = &builder.departmentChatAcceptorEmployeeId

	}
	if builder.externalChatAcceptorEmployeeIdFlag {
		req.ExternalChatAcceptorEmployeeId = &builder.externalChatAcceptorEmployeeId

	}
	if builder.docsAcceptorEmployeeIdFlag {
		req.DocsAcceptorEmployeeId = &builder.docsAcceptorEmployeeId

	}
	if builder.calendarAcceptorEmployeeIdFlag {
		req.CalendarAcceptorEmployeeId = &builder.calendarAcceptorEmployeeId

	}
	if builder.applicationAcceptorEmployeeIdFlag {
		req.ApplicationAcceptorEmployeeId = &builder.applicationAcceptorEmployeeId

	}
	if builder.helpdeskAcceptorEmployeeIdFlag {
		req.HelpdeskAcceptorEmployeeId = &builder.helpdeskAcceptorEmployeeId

	}
	if builder.approvalAcceptorEmployeeIdFlag {
		req.ApprovalAcceptorEmployeeId = &builder.approvalAcceptorEmployeeId

	}
	if builder.emailAcceptorEmployeeIdFlag {
		req.EmailAcceptorEmployeeId = &builder.emailAcceptorEmployeeId

	}
	if builder.awemeOwnerFlag {
		req.AwemeOwner = &builder.awemeOwner

	}
	if builder.minutesAcceptorEmployeeIdFlag {
		req.MinutesAcceptorEmployeeId = &builder.minutesAcceptorEmployeeId

	}
	if builder.surveyAcceptorEmployeeIdFlag {
		req.SurveyAcceptorEmployeeId = &builder.surveyAcceptorEmployeeId

	}
	if builder.anycrossAcceptorEmployeeIdFlag {
		req.AnycrossAcceptorEmployeeId = &builder.anycrossAcceptorEmployeeId

	}
	return req
}

type ResurrectEmployeeOptions struct {
	SubscriptionIds []string `json:"subscription_ids,omitempty"` // License订阅ID
}

type ResurrectEmployeeOptionsBuilder struct {
	subscriptionIds     []string // License订阅ID
	subscriptionIdsFlag bool
}

func NewResurrectEmployeeOptionsBuilder() *ResurrectEmployeeOptionsBuilder {
	builder := &ResurrectEmployeeOptionsBuilder{}
	return builder
}

// License订阅ID
//
// 示例值：
func (builder *ResurrectEmployeeOptionsBuilder) SubscriptionIds(subscriptionIds []string) *ResurrectEmployeeOptionsBuilder {
	builder.subscriptionIds = subscriptionIds
	builder.subscriptionIdsFlag = true
	return builder
}

func (builder *ResurrectEmployeeOptionsBuilder) Build() *ResurrectEmployeeOptions {
	req := &ResurrectEmployeeOptions{}
	if builder.subscriptionIdsFlag {
		req.SubscriptionIds = builder.subscriptionIds
	}
	return req
}

type Scenario struct {
	ScenarioId *string `json:"scenario_id,omitempty"` // 场景名

	UserId *string `json:"user_id,omitempty"` // 操作人UserID

	TenantId *string `json:"tenant_id,omitempty"` // 操作人TenantID

	Appid *string `json:"appid,omitempty"` // 开平操作应用ID
}

type ScenarioBuilder struct {
	scenarioId     string // 场景名
	scenarioIdFlag bool

	userId     string // 操作人UserID
	userIdFlag bool

	tenantId     string // 操作人TenantID
	tenantIdFlag bool

	appid     string // 开平操作应用ID
	appidFlag bool
}

func NewScenarioBuilder() *ScenarioBuilder {
	builder := &ScenarioBuilder{}
	return builder
}

// 场景名
//
// 示例值：
func (builder *ScenarioBuilder) ScenarioId(scenarioId string) *ScenarioBuilder {
	builder.scenarioId = scenarioId
	builder.scenarioIdFlag = true
	return builder
}

// 操作人UserID
//
// 示例值：
func (builder *ScenarioBuilder) UserId(userId string) *ScenarioBuilder {
	builder.userId = userId
	builder.userIdFlag = true
	return builder
}

// 操作人TenantID
//
// 示例值：101
func (builder *ScenarioBuilder) TenantId(tenantId string) *ScenarioBuilder {
	builder.tenantId = tenantId
	builder.tenantIdFlag = true
	return builder
}

// 开平操作应用ID
//
// 示例值：1
func (builder *ScenarioBuilder) Appid(appid string) *ScenarioBuilder {
	builder.appid = appid
	builder.appidFlag = true
	return builder
}

func (builder *ScenarioBuilder) Build() *Scenario {
	req := &Scenario{}
	if builder.scenarioIdFlag {
		req.ScenarioId = &builder.scenarioId

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

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

	}
	if builder.appidFlag {
		req.Appid = &builder.appid

	}
	return req
}

type SearchDepartmentFilter struct {
	ExactlyMatchByName *bool `json:"exactly_match_by_name,omitempty"` // 根据部门名称精确匹配，默认不精确匹配

	Options *SearchOptions `json:"options,omitempty"` // 搜索接口拓展选项
}

type SearchDepartmentFilterBuilder struct {
	exactlyMatchByName     bool // 根据部门名称精确匹配，默认不精确匹配
	exactlyMatchByNameFlag bool

	options     *SearchOptions // 搜索接口拓展选项
	optionsFlag bool
}

func NewSearchDepartmentFilterBuilder() *SearchDepartmentFilterBuilder {
	builder := &SearchDepartmentFilterBuilder{}
	return builder
}

// 根据部门名称精确匹配，默认不精确匹配
//
// 示例值：
func (builder *SearchDepartmentFilterBuilder) ExactlyMatchByName(exactlyMatchByName bool) *SearchDepartmentFilterBuilder {
	builder.exactlyMatchByName = exactlyMatchByName
	builder.exactlyMatchByNameFlag = true
	return builder
}

// 搜索接口拓展选项
//
// 示例值：
func (builder *SearchDepartmentFilterBuilder) Options(options *SearchOptions) *SearchDepartmentFilterBuilder {
	builder.options = options
	builder.optionsFlag = true
	return builder
}

func (builder *SearchDepartmentFilterBuilder) Build() *SearchDepartmentFilter {
	req := &SearchDepartmentFilter{}
	if builder.exactlyMatchByNameFlag {
		req.ExactlyMatchByName = &builder.exactlyMatchByName

	}
	if builder.optionsFlag {
		req.Options = builder.options
	}
	return req
}

type SearchEmployeeFilter struct {
	ContainResignedEmployee *bool `json:"contain_resigned_employee,omitempty"` // 搜索结果包含离职成员，默认不包含

	Options *SearchOptions `json:"options,omitempty"` // 搜索接口拓展选项
}

type SearchEmployeeFilterBuilder struct {
	containResignedEmployee     bool // 搜索结果包含离职成员，默认不包含
	containResignedEmployeeFlag bool

	options     *SearchOptions // 搜索接口拓展选项
	optionsFlag bool
}

func NewSearchEmployeeFilterBuilder() *SearchEmployeeFilterBuilder {
	builder := &SearchEmployeeFilterBuilder{}
	return builder
}

// 搜索结果包含离职成员，默认不包含
//
// 示例值：
func (builder *SearchEmployeeFilterBuilder) ContainResignedEmployee(containResignedEmployee bool) *SearchEmployeeFilterBuilder {
	builder.containResignedEmployee = containResignedEmployee
	builder.containResignedEmployeeFlag = true
	return builder
}

// 搜索接口拓展选项
//
// 示例值：
func (builder *SearchEmployeeFilterBuilder) Options(options *SearchOptions) *SearchEmployeeFilterBuilder {
	builder.options = options
	builder.optionsFlag = true
	return builder
}

func (builder *SearchEmployeeFilterBuilder) Build() *SearchEmployeeFilter {
	req := &SearchEmployeeFilter{}
	if builder.containResignedEmployeeFlag {
		req.ContainResignedEmployee = &builder.containResignedEmployee

	}
	if builder.optionsFlag {
		req.Options = builder.options
	}
	return req
}

type SearchOptions struct {
	FilterPermissionResource *string `json:"filter_permission_resource,omitempty"` // 不传默认走end User身份，直接走大搜的默认权限过滤，走authz的默认101兜底列鉴权。\nadminRole身份，配合权限场景Scope做数据过滤，无列鉴权\nnone 不做数据过滤，不做列鉴权

	AdminRolePermissionScope *string `json:"admin_role_permission_scope,omitempty"` // 废弃参数

	AdminRolePermissionType *string `json:"admin_role_permission_type,omitempty"` // 以管理员身份查询，必须额外传的权限场景Type
}

type SearchOptionsBuilder struct {
	filterPermissionResource     string // 不传默认走end User身份，直接走大搜的默认权限过滤，走authz的默认101兜底列鉴权。\nadminRole身份，配合权限场景Scope做数据过滤，无列鉴权\nnone 不做数据过滤，不做列鉴权
	filterPermissionResourceFlag bool

	adminRolePermissionScope     string // 废弃参数
	adminRolePermissionScopeFlag bool

	adminRolePermissionType     string // 以管理员身份查询，必须额外传的权限场景Type
	adminRolePermissionTypeFlag bool
}

func NewSearchOptionsBuilder() *SearchOptionsBuilder {
	builder := &SearchOptionsBuilder{}
	return builder
}

// 不传默认走end User身份，直接走大搜的默认权限过滤，走authz的默认101兜底列鉴权。\nadminRole身份，配合权限场景Scope做数据过滤，无列鉴权\nnone 不做数据过滤，不做列鉴权
//
// 示例值：adminRole
func (builder *SearchOptionsBuilder) FilterPermissionResource(filterPermissionResource string) *SearchOptionsBuilder {
	builder.filterPermissionResource = filterPermissionResource
	builder.filterPermissionResourceFlag = true
	return builder
}

// 废弃参数
//
// 示例值：adminRole
func (builder *SearchOptionsBuilder) AdminRolePermissionScope(adminRolePermissionScope string) *SearchOptionsBuilder {
	builder.adminRolePermissionScope = adminRolePermissionScope
	builder.adminRolePermissionScopeFlag = true
	return builder
}

// 以管理员身份查询，必须额外传的权限场景Type
//
// 示例值：1
func (builder *SearchOptionsBuilder) AdminRolePermissionType(adminRolePermissionType string) *SearchOptionsBuilder {
	builder.adminRolePermissionType = adminRolePermissionType
	builder.adminRolePermissionTypeFlag = true
	return builder
}

func (builder *SearchOptionsBuilder) Build() *SearchOptions {
	req := &SearchOptions{}
	if builder.filterPermissionResourceFlag {
		req.FilterPermissionResource = &builder.filterPermissionResource

	}
	if builder.adminRolePermissionScopeFlag {
		req.AdminRolePermissionScope = &builder.adminRolePermissionScope

	}
	if builder.adminRolePermissionTypeFlag {
		req.AdminRolePermissionType = &builder.adminRolePermissionType

	}
	return req
}

type SendNotification struct {
	NeedSendNotification *bool `json:"need_send_notification,omitempty"` // 是否发送通知

	Language *int `json:"language,omitempty"` // 语言类型 可选值：zh-CN：中文 en-US：英文 ja-JP：日文
}

type SendNotificationBuilder struct {
	needSendNotification     bool // 是否发送通知
	needSendNotificationFlag bool

	language     int // 语言类型 可选值：zh-CN：中文 en-US：英文 ja-JP：日文
	languageFlag bool
}

func NewSendNotificationBuilder() *SendNotificationBuilder {
	builder := &SendNotificationBuilder{}
	return builder
}

// 是否发送通知
//
// 示例值：
func (builder *SendNotificationBuilder) NeedSendNotification(needSendNotification bool) *SendNotificationBuilder {
	builder.needSendNotification = needSendNotification
	builder.needSendNotificationFlag = true
	return builder
}

// 语言类型 可选值：zh-CN：中文 en-US：英文 ja-JP：日文
//
// 示例值：1
func (builder *SendNotificationBuilder) Language(language int) *SendNotificationBuilder {
	builder.language = language
	builder.languageFlag = true
	return builder
}

func (builder *SendNotificationBuilder) Build() *SendNotification {
	req := &SendNotification{}
	if builder.needSendNotificationFlag {
		req.NeedSendNotification = &builder.needSendNotification

	}
	if builder.languageFlag {
		req.Language = &builder.language

	}
	return req
}

type SetEmployeePreResigned struct {
	EmployeeId *string `json:"employee_id,omitempty"` // 员工ID

	ResignDate *string `json:"resign_date,omitempty"` // 离职日期

	ResignReason *string `json:"resign_reason,omitempty"` // 离职原因

	ResignType *string `json:"resign_type,omitempty"` // 离职类型

	ResignRemark *string `json:"resign_remark,omitempty"` // 离职备注
}

type SetEmployeePreResignedBuilder struct {
	employeeId     string // 员工ID
	employeeIdFlag bool

	resignDate     string // 离职日期
	resignDateFlag bool

	resignReason     string // 离职原因
	resignReasonFlag bool

	resignType     string // 离职类型
	resignTypeFlag bool

	resignRemark     string // 离职备注
	resignRemarkFlag bool
}

func NewSetEmployeePreResignedBuilder() *SetEmployeePreResignedBuilder {
	builder := &SetEmployeePreResignedBuilder{}
	return builder
}

// 员工ID
//
// 示例值：eehsdna
func (builder *SetEmployeePreResignedBuilder) EmployeeId(employeeId string) *SetEmployeePreResignedBuilder {
	builder.employeeId = employeeId
	builder.employeeIdFlag = true
	return builder
}

// 离职日期
//
// 示例值：2024-06-21
func (builder *SetEmployeePreResignedBuilder) ResignDate(resignDate string) *SetEmployeePreResignedBuilder {
	builder.resignDate = resignDate
	builder.resignDateFlag = true
	return builder
}

// 离职原因
//
// 示例值：
func (builder *SetEmployeePreResignedBuilder) ResignReason(resignReason string) *SetEmployeePreResignedBuilder {
	builder.resignReason = resignReason
	builder.resignReasonFlag = true
	return builder
}

// 离职类型
//
// 示例值：
func (builder *SetEmployeePreResignedBuilder) ResignType(resignType string) *SetEmployeePreResignedBuilder {
	builder.resignType = resignType
	builder.resignTypeFlag = true
	return builder
}

// 离职备注
//
// 示例值：留学深造
func (builder *SetEmployeePreResignedBuilder) ResignRemark(resignRemark string) *SetEmployeePreResignedBuilder {
	builder.resignRemark = resignRemark
	builder.resignRemarkFlag = true
	return builder
}

func (builder *SetEmployeePreResignedBuilder) Build() *SetEmployeePreResigned {
	req := &SetEmployeePreResigned{}
	if builder.employeeIdFlag {
		req.EmployeeId = &builder.employeeId

	}
	if builder.resignDateFlag {
		req.ResignDate = &builder.resignDate

	}
	if builder.resignReasonFlag {
		req.ResignReason = &builder.resignReason

	}
	if builder.resignTypeFlag {
		req.ResignType = &builder.resignType

	}
	if builder.resignRemarkFlag {
		req.ResignRemark = &builder.resignRemark

	}
	return req
}

type ShareDepartment struct {
	OpenDepartmentId *string `json:"open_department_id,omitempty"` // 部门open ID

	Name *I18nText `json:"name,omitempty"` // i18n文本
}

type ShareDepartmentBuilder struct {
	openDepartmentId     string // 部门open ID
	openDepartmentIdFlag bool

	name     *I18nText // i18n文本
	nameFlag bool
}

func NewShareDepartmentBuilder() *ShareDepartmentBuilder {
	builder := &ShareDepartmentBuilder{}
	return builder
}

// 部门open ID
//
// 示例值：
func (builder *ShareDepartmentBuilder) OpenDepartmentId(openDepartmentId string) *ShareDepartmentBuilder {
	builder.openDepartmentId = openDepartmentId
	builder.openDepartmentIdFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *ShareDepartmentBuilder) Name(name *I18nText) *ShareDepartmentBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

func (builder *ShareDepartmentBuilder) Build() *ShareDepartment {
	req := &ShareDepartment{}
	if builder.openDepartmentIdFlag {
		req.OpenDepartmentId = &builder.openDepartmentId

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

type ShareGroup struct {
	OpenGroupId *string `json:"open_group_id,omitempty"` // 用户组的open_id

	Name *I18nText `json:"name,omitempty"` // i18n文本
}

type ShareGroupBuilder struct {
	openGroupId     string // 用户组的open_id
	openGroupIdFlag bool

	name     *I18nText // i18n文本
	nameFlag bool
}

func NewShareGroupBuilder() *ShareGroupBuilder {
	builder := &ShareGroupBuilder{}
	return builder
}

// 用户组的open_id
//
// 示例值：ou-12121212
func (builder *ShareGroupBuilder) OpenGroupId(openGroupId string) *ShareGroupBuilder {
	builder.openGroupId = openGroupId
	builder.openGroupIdFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *ShareGroupBuilder) Name(name *I18nText) *ShareGroupBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

func (builder *ShareGroupBuilder) Build() *ShareGroup {
	req := &ShareGroup{}
	if builder.openGroupIdFlag {
		req.OpenGroupId = &builder.openGroupId

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

type ShareUser struct {
	OpenUserId *string `json:"open_user_id,omitempty"` // user open ID

	Name *I18nText `json:"name,omitempty"` // i18n文本

	Avatar *ImageLink `json:"avatar,omitempty"` // 用户的头像
}

type ShareUserBuilder struct {
	openUserId     string // user open ID
	openUserIdFlag bool

	name     *I18nText // i18n文本
	nameFlag bool

	avatar     *ImageLink // 用户的头像
	avatarFlag bool
}

func NewShareUserBuilder() *ShareUserBuilder {
	builder := &ShareUserBuilder{}
	return builder
}

// user open ID
//
// 示例值：ou-12121212
func (builder *ShareUserBuilder) OpenUserId(openUserId string) *ShareUserBuilder {
	builder.openUserId = openUserId
	builder.openUserIdFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *ShareUserBuilder) Name(name *I18nText) *ShareUserBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 用户的头像
//
// 示例值：
func (builder *ShareUserBuilder) Avatar(avatar *ImageLink) *ShareUserBuilder {
	builder.avatar = avatar
	builder.avatarFlag = true
	return builder
}

func (builder *ShareUserBuilder) Build() *ShareUser {
	req := &ShareUser{}
	if builder.openUserIdFlag {
		req.OpenUserId = &builder.openUserId

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.avatarFlag {
		req.Avatar = builder.avatar
	}
	return req
}

type Tenant struct {
	Id *string `json:"id,omitempty"` // 租户ID

	ExternalId *string `json:"external_id,omitempty"` // 企业编号

	EncryptedId *string `json:"encrypted_id,omitempty"` // 加密租户id -- 废弃

	Name *I18nText `json:"name,omitempty"` // i18n文本

	ContactUserInfo *UserInfo `json:"contact_user_info,omitempty"` // 联系人信息

	Address *string `json:"address,omitempty"` // 联系地址

	PostCode *string `json:"post_code,omitempty"` // 邮编

	Telephone *string `json:"telephone,omitempty"` // 备注 废弃\n10: optional string Remark (apimeta.scope="directory:tenant.base:read"),\n座机

	AvatarKey *string `json:"avatar_key,omitempty"` // 企业头像Key

	SubDomain *string `json:"sub_domain,omitempty"` // 企业域名子域名

	FullDomain *string `json:"full_domain,omitempty"` // 企业域名完整域名

	DomainModifyCount *string `json:"domain_modify_count,omitempty"` // 域名修改次数 废弃

	MultiGeoFullDomains map[string]string `json:"multi_geo_full_domains,omitempty"` // 全球化域名

	CountryCode *string `json:"country_code,omitempty"` // 国家代码

	Type *string `json:"type,omitempty"` // 租户类型

	Purpose *string `json:"purpose,omitempty"` // 租户用途

	ParentId *string `json:"parent_id,omitempty"` // 租户的父租户

	DissolveStatus *string `json:"dissolve_status,omitempty"` // 租户解散状态

	Tag *string `json:"tag,omitempty"` // 个人租户/企业租户

	Industry *string `json:"industry,omitempty"` // 行业类型 -- 废弃

	Scale *string `json:"scale,omitempty"` // 企业规模 -- 废弃

	Brand *string `json:"brand,omitempty"` // 品牌

	Description *I18nText `json:"description,omitempty"` // i18n文本

	UpdatorId *string `json:"updator_id,omitempty"` // 更新人ID

	CreatorId *string `json:"creator_id,omitempty"` // 创建人ID

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

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

	TraceInfo *TenantTraceInfo `json:"trace_info,omitempty"` // 租户创建追溯信息

	CanDomainBeModified *bool `json:"can_domain_be_modified,omitempty"` // 域名是否可修改

	IndustryType *string `json:"industry_type,omitempty"` // 行业类型 主数据编码 https://bytedance.larkoffice.com/wiki/Ntd1wlmT2i0xrokY2DNcWDw0nHc#share-HX7addBffo1s4cxrXWmc2Mlwnuc

	StaffSize *string `json:"staff_size,omitempty"` // 企业规模 主数据编码 https://bytedance.larkoffice.com/wiki/Ntd1wlmT2i0xrokY2DNcWDw0nHc#share-HX7addBffo1s4cxrXWmc2Mlwnuc
}

type TenantBuilder struct {
	id     string // 租户ID
	idFlag bool

	externalId     string // 企业编号
	externalIdFlag bool

	encryptedId     string // 加密租户id -- 废弃
	encryptedIdFlag bool

	name     *I18nText // i18n文本
	nameFlag bool

	contactUserInfo     *UserInfo // 联系人信息
	contactUserInfoFlag bool

	address     string // 联系地址
	addressFlag bool

	postCode     string // 邮编
	postCodeFlag bool

	telephone     string // 备注 废弃\n10: optional string Remark (apimeta.scope="directory:tenant.base:read"),\n座机
	telephoneFlag bool

	avatarKey     string // 企业头像Key
	avatarKeyFlag bool

	subDomain     string // 企业域名子域名
	subDomainFlag bool

	fullDomain     string // 企业域名完整域名
	fullDomainFlag bool

	domainModifyCount     string // 域名修改次数 废弃
	domainModifyCountFlag bool

	multiGeoFullDomains     map[string]string // 全球化域名
	multiGeoFullDomainsFlag bool

	countryCode     string // 国家代码
	countryCodeFlag bool

	type_    string // 租户类型
	typeFlag bool

	purpose     string // 租户用途
	purposeFlag bool

	parentId     string // 租户的父租户
	parentIdFlag bool

	dissolveStatus     string // 租户解散状态
	dissolveStatusFlag bool

	tag     string // 个人租户/企业租户
	tagFlag bool

	industry     string // 行业类型 -- 废弃
	industryFlag bool

	scale     string // 企业规模 -- 废弃
	scaleFlag bool

	brand     string // 品牌
	brandFlag bool

	description     *I18nText // i18n文本
	descriptionFlag bool

	updatorId     string // 更新人ID
	updatorIdFlag bool

	creatorId     string // 创建人ID
	creatorIdFlag bool

	createTime     string // 创建时间
	createTimeFlag bool

	updateTime     string // 更新时间
	updateTimeFlag bool

	traceInfo     *TenantTraceInfo // 租户创建追溯信息
	traceInfoFlag bool

	canDomainBeModified     bool // 域名是否可修改
	canDomainBeModifiedFlag bool

	industryType     string // 行业类型 主数据编码 https://bytedance.larkoffice.com/wiki/Ntd1wlmT2i0xrokY2DNcWDw0nHc#share-HX7addBffo1s4cxrXWmc2Mlwnuc
	industryTypeFlag bool

	staffSize     string // 企业规模 主数据编码 https://bytedance.larkoffice.com/wiki/Ntd1wlmT2i0xrokY2DNcWDw0nHc#share-HX7addBffo1s4cxrXWmc2Mlwnuc
	staffSizeFlag bool
}

func NewTenantBuilder() *TenantBuilder {
	builder := &TenantBuilder{}
	return builder
}

// 租户ID
//
// 示例值：7023251211654529043
func (builder *TenantBuilder) Id(id string) *TenantBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 企业编号
//
// 示例值：gdjspasibfgpetb
func (builder *TenantBuilder) ExternalId(externalId string) *TenantBuilder {
	builder.externalId = externalId
	builder.externalIdFlag = true
	return builder
}

// 加密租户id -- 废弃
//
// 示例值：KFCVME50
func (builder *TenantBuilder) EncryptedId(encryptedId string) *TenantBuilder {
	builder.encryptedId = encryptedId
	builder.encryptedIdFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *TenantBuilder) Name(name *I18nText) *TenantBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 联系人信息
//
// 示例值：
func (builder *TenantBuilder) ContactUserInfo(contactUserInfo *UserInfo) *TenantBuilder {
	builder.contactUserInfo = contactUserInfo
	builder.contactUserInfoFlag = true
	return builder
}

// 联系地址
//
// 示例值：北京市北三环西路43号院中航广场
func (builder *TenantBuilder) Address(address string) *TenantBuilder {
	builder.address = address
	builder.addressFlag = true
	return builder
}

// 邮编
//
// 示例值：100089
func (builder *TenantBuilder) PostCode(postCode string) *TenantBuilder {
	builder.postCode = postCode
	builder.postCodeFlag = true
	return builder
}

// 备注 废弃\n10: optional string Remark (apimeta.scope="directory:tenant.base:read"),\n座机
//
// 示例值：(010)58341888
func (builder *TenantBuilder) Telephone(telephone string) *TenantBuilder {
	builder.telephone = telephone
	builder.telephoneFlag = true
	return builder
}

// 企业头像Key
//
// 示例值：2500c7a9-5fff-4d9a-a2de-3d59614ae28g
func (builder *TenantBuilder) AvatarKey(avatarKey string) *TenantBuilder {
	builder.avatarKey = avatarKey
	builder.avatarKeyFlag = true
	return builder
}

// 企业域名子域名
//
// 示例值：tenant_a
func (builder *TenantBuilder) SubDomain(subDomain string) *TenantBuilder {
	builder.subDomain = subDomain
	builder.subDomainFlag = true
	return builder
}

// 企业域名完整域名
//
// 示例值：tenant_a.io
func (builder *TenantBuilder) FullDomain(fullDomain string) *TenantBuilder {
	builder.fullDomain = fullDomain
	builder.fullDomainFlag = true
	return builder
}

// 域名修改次数 废弃
//
// 示例值：1
func (builder *TenantBuilder) DomainModifyCount(domainModifyCount string) *TenantBuilder {
	builder.domainModifyCount = domainModifyCount
	builder.domainModifyCountFlag = true
	return builder
}

// 全球化域名
//
// 示例值：
func (builder *TenantBuilder) MultiGeoFullDomains(multiGeoFullDomains map[string]string) *TenantBuilder {
	builder.multiGeoFullDomains = multiGeoFullDomains
	builder.multiGeoFullDomainsFlag = true
	return builder
}

// 国家代码
//
// 示例值：无
func (builder *TenantBuilder) CountryCode(countryCode string) *TenantBuilder {
	builder.countryCode = countryCode
	builder.countryCodeFlag = true
	return builder
}

// 租户类型
//
// 示例值：0
func (builder *TenantBuilder) Type(type_ string) *TenantBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// 租户用途
//
// 示例值：0
func (builder *TenantBuilder) Purpose(purpose string) *TenantBuilder {
	builder.purpose = purpose
	builder.purposeFlag = true
	return builder
}

// 租户的父租户
//
// 示例值：7246224245317929700
func (builder *TenantBuilder) ParentId(parentId string) *TenantBuilder {
	builder.parentId = parentId
	builder.parentIdFlag = true
	return builder
}

// 租户解散状态
//
// 示例值：0
func (builder *TenantBuilder) DissolveStatus(dissolveStatus string) *TenantBuilder {
	builder.dissolveStatus = dissolveStatus
	builder.dissolveStatusFlag = true
	return builder
}

// 个人租户/企业租户
//
// 示例值：0
func (builder *TenantBuilder) Tag(tag string) *TenantBuilder {
	builder.tag = tag
	builder.tagFlag = true
	return builder
}

// 行业类型 -- 废弃
//
// 示例值：暂无
func (builder *TenantBuilder) Industry(industry string) *TenantBuilder {
	builder.industry = industry
	builder.industryFlag = true
	return builder
}

// 企业规模 -- 废弃
//
// 示例值：暂无
func (builder *TenantBuilder) Scale(scale string) *TenantBuilder {
	builder.scale = scale
	builder.scaleFlag = true
	return builder
}

// 品牌
//
// 示例值：
func (builder *TenantBuilder) Brand(brand string) *TenantBuilder {
	builder.brand = brand
	builder.brandFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *TenantBuilder) Description(description *I18nText) *TenantBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 更新人ID
//
// 示例值：暂无
func (builder *TenantBuilder) UpdatorId(updatorId string) *TenantBuilder {
	builder.updatorId = updatorId
	builder.updatorIdFlag = true
	return builder
}

// 创建人ID
//
// 示例值：7246224245317959701
func (builder *TenantBuilder) CreatorId(creatorId string) *TenantBuilder {
	builder.creatorId = creatorId
	builder.creatorIdFlag = true
	return builder
}

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

// 更新时间
//
// 示例值：暂无
func (builder *TenantBuilder) UpdateTime(updateTime string) *TenantBuilder {
	builder.updateTime = updateTime
	builder.updateTimeFlag = true
	return builder
}

// 租户创建追溯信息
//
// 示例值：
func (builder *TenantBuilder) TraceInfo(traceInfo *TenantTraceInfo) *TenantBuilder {
	builder.traceInfo = traceInfo
	builder.traceInfoFlag = true
	return builder
}

// 域名是否可修改
//
// 示例值：true
func (builder *TenantBuilder) CanDomainBeModified(canDomainBeModified bool) *TenantBuilder {
	builder.canDomainBeModified = canDomainBeModified
	builder.canDomainBeModifiedFlag = true
	return builder
}

// 行业类型 主数据编码 https://bytedance.larkoffice.com/wiki/Ntd1wlmT2i0xrokY2DNcWDw0nHc#share-HX7addBffo1s4cxrXWmc2Mlwnuc
//
// 示例值：1
func (builder *TenantBuilder) IndustryType(industryType string) *TenantBuilder {
	builder.industryType = industryType
	builder.industryTypeFlag = true
	return builder
}

// 企业规模 主数据编码 https://bytedance.larkoffice.com/wiki/Ntd1wlmT2i0xrokY2DNcWDw0nHc#share-HX7addBffo1s4cxrXWmc2Mlwnuc
//
// 示例值：1
func (builder *TenantBuilder) StaffSize(staffSize string) *TenantBuilder {
	builder.staffSize = staffSize
	builder.staffSizeFlag = true
	return builder
}

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

	}
	if builder.externalIdFlag {
		req.ExternalId = &builder.externalId

	}
	if builder.encryptedIdFlag {
		req.EncryptedId = &builder.encryptedId

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.contactUserInfoFlag {
		req.ContactUserInfo = builder.contactUserInfo
	}
	if builder.addressFlag {
		req.Address = &builder.address

	}
	if builder.postCodeFlag {
		req.PostCode = &builder.postCode

	}
	if builder.telephoneFlag {
		req.Telephone = &builder.telephone

	}
	if builder.avatarKeyFlag {
		req.AvatarKey = &builder.avatarKey

	}
	if builder.subDomainFlag {
		req.SubDomain = &builder.subDomain

	}
	if builder.fullDomainFlag {
		req.FullDomain = &builder.fullDomain

	}
	if builder.domainModifyCountFlag {
		req.DomainModifyCount = &builder.domainModifyCount

	}
	if builder.multiGeoFullDomainsFlag {
		req.MultiGeoFullDomains = builder.multiGeoFullDomains
	}
	if builder.countryCodeFlag {
		req.CountryCode = &builder.countryCode

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

	}
	if builder.purposeFlag {
		req.Purpose = &builder.purpose

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

	}
	if builder.dissolveStatusFlag {
		req.DissolveStatus = &builder.dissolveStatus

	}
	if builder.tagFlag {
		req.Tag = &builder.tag

	}
	if builder.industryFlag {
		req.Industry = &builder.industry

	}
	if builder.scaleFlag {
		req.Scale = &builder.scale

	}
	if builder.brandFlag {
		req.Brand = &builder.brand

	}
	if builder.descriptionFlag {
		req.Description = builder.description
	}
	if builder.updatorIdFlag {
		req.UpdatorId = &builder.updatorId

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

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

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

	}
	if builder.traceInfoFlag {
		req.TraceInfo = builder.traceInfo
	}
	if builder.canDomainBeModifiedFlag {
		req.CanDomainBeModified = &builder.canDomainBeModified

	}
	if builder.industryTypeFlag {
		req.IndustryType = &builder.industryType

	}
	if builder.staffSizeFlag {
		req.StaffSize = &builder.staffSize

	}
	return req
}

type TenantTraceInfo struct {
	CreateSource *string `json:"create_source,omitempty"` // 租户创建来源

	SalesforceId *string `json:"salesforce_id,omitempty"` // SalesforceID

	WebId *string `json:"web_id,omitempty"` // WebID

	SourceSystem *string `json:"source_system,omitempty"` // 创建来源系统

	SourcePage *string `json:"source_page,omitempty"` // 创建来源页

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

	Channel *string `json:"channel,omitempty"` // channel

	PlanId *string `json:"plan_id,omitempty"` // plan

	SubscribeEmail *bool `json:"subscribe_email,omitempty"` // 是否订阅邮箱

	TrackingCode *string `json:"tracking_code,omitempty"` // 追踪码

	InviterId *string `json:"inviter_id,omitempty"` // 邀请人ID

	InvitationToken *string `json:"invitation_token,omitempty"` // 邀请token

	CaptchaInfo *string `json:"captcha_info,omitempty"` // 验证码信息

	RegParams *string `json:"reg_params,omitempty"` // 透传参数

	TerminalType *string `json:"terminal_type,omitempty"` // 终端类型
}

type TenantTraceInfoBuilder struct {
	createSource     string // 租户创建来源
	createSourceFlag bool

	salesforceId     string // SalesforceID
	salesforceIdFlag bool

	webId     string // WebID
	webIdFlag bool

	sourceSystem     string // 创建来源系统
	sourceSystemFlag bool

	sourcePage     string // 创建来源页
	sourcePageFlag bool

	clientIp     string // 客户端IP
	clientIpFlag bool

	channel     string // channel
	channelFlag bool

	planId     string // plan
	planIdFlag bool

	subscribeEmail     bool // 是否订阅邮箱
	subscribeEmailFlag bool

	trackingCode     string // 追踪码
	trackingCodeFlag bool

	inviterId     string // 邀请人ID
	inviterIdFlag bool

	invitationToken     string // 邀请token
	invitationTokenFlag bool

	captchaInfo     string // 验证码信息
	captchaInfoFlag bool

	regParams     string // 透传参数
	regParamsFlag bool

	terminalType     string // 终端类型
	terminalTypeFlag bool
}

func NewTenantTraceInfoBuilder() *TenantTraceInfoBuilder {
	builder := &TenantTraceInfoBuilder{}
	return builder
}

// 租户创建来源
//
// 示例值：无
func (builder *TenantTraceInfoBuilder) CreateSource(createSource string) *TenantTraceInfoBuilder {
	builder.createSource = createSource
	builder.createSourceFlag = true
	return builder
}

// SalesforceID
//
// 示例值：无
func (builder *TenantTraceInfoBuilder) SalesforceId(salesforceId string) *TenantTraceInfoBuilder {
	builder.salesforceId = salesforceId
	builder.salesforceIdFlag = true
	return builder
}

// WebID
//
// 示例值：无
func (builder *TenantTraceInfoBuilder) WebId(webId string) *TenantTraceInfoBuilder {
	builder.webId = webId
	builder.webIdFlag = true
	return builder
}

// 创建来源系统
//
// 示例值：无
func (builder *TenantTraceInfoBuilder) SourceSystem(sourceSystem string) *TenantTraceInfoBuilder {
	builder.sourceSystem = sourceSystem
	builder.sourceSystemFlag = true
	return builder
}

// 创建来源页
//
// 示例值：无
func (builder *TenantTraceInfoBuilder) SourcePage(sourcePage string) *TenantTraceInfoBuilder {
	builder.sourcePage = sourcePage
	builder.sourcePageFlag = true
	return builder
}

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

// channel
//
// 示例值：无
func (builder *TenantTraceInfoBuilder) Channel(channel string) *TenantTraceInfoBuilder {
	builder.channel = channel
	builder.channelFlag = true
	return builder
}

// plan
//
// 示例值：无
func (builder *TenantTraceInfoBuilder) PlanId(planId string) *TenantTraceInfoBuilder {
	builder.planId = planId
	builder.planIdFlag = true
	return builder
}

// 是否订阅邮箱
//
// 示例值：true
func (builder *TenantTraceInfoBuilder) SubscribeEmail(subscribeEmail bool) *TenantTraceInfoBuilder {
	builder.subscribeEmail = subscribeEmail
	builder.subscribeEmailFlag = true
	return builder
}

// 追踪码
//
// 示例值：无
func (builder *TenantTraceInfoBuilder) TrackingCode(trackingCode string) *TenantTraceInfoBuilder {
	builder.trackingCode = trackingCode
	builder.trackingCodeFlag = true
	return builder
}

// 邀请人ID
//
// 示例值：无
func (builder *TenantTraceInfoBuilder) InviterId(inviterId string) *TenantTraceInfoBuilder {
	builder.inviterId = inviterId
	builder.inviterIdFlag = true
	return builder
}

// 邀请token
//
// 示例值：无
func (builder *TenantTraceInfoBuilder) InvitationToken(invitationToken string) *TenantTraceInfoBuilder {
	builder.invitationToken = invitationToken
	builder.invitationTokenFlag = true
	return builder
}

// 验证码信息
//
// 示例值：无
func (builder *TenantTraceInfoBuilder) CaptchaInfo(captchaInfo string) *TenantTraceInfoBuilder {
	builder.captchaInfo = captchaInfo
	builder.captchaInfoFlag = true
	return builder
}

// 透传参数
//
// 示例值：无
func (builder *TenantTraceInfoBuilder) RegParams(regParams string) *TenantTraceInfoBuilder {
	builder.regParams = regParams
	builder.regParamsFlag = true
	return builder
}

// 终端类型
//
// 示例值：无
func (builder *TenantTraceInfoBuilder) TerminalType(terminalType string) *TenantTraceInfoBuilder {
	builder.terminalType = terminalType
	builder.terminalTypeFlag = true
	return builder
}

func (builder *TenantTraceInfoBuilder) Build() *TenantTraceInfo {
	req := &TenantTraceInfo{}
	if builder.createSourceFlag {
		req.CreateSource = &builder.createSource

	}
	if builder.salesforceIdFlag {
		req.SalesforceId = &builder.salesforceId

	}
	if builder.webIdFlag {
		req.WebId = &builder.webId

	}
	if builder.sourceSystemFlag {
		req.SourceSystem = &builder.sourceSystem

	}
	if builder.sourcePageFlag {
		req.SourcePage = &builder.sourcePage

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

	}
	if builder.channelFlag {
		req.Channel = &builder.channel

	}
	if builder.planIdFlag {
		req.PlanId = &builder.planId

	}
	if builder.subscribeEmailFlag {
		req.SubscribeEmail = &builder.subscribeEmail

	}
	if builder.trackingCodeFlag {
		req.TrackingCode = &builder.trackingCode

	}
	if builder.inviterIdFlag {
		req.InviterId = &builder.inviterId

	}
	if builder.invitationTokenFlag {
		req.InvitationToken = &builder.invitationToken

	}
	if builder.captchaInfoFlag {
		req.CaptchaInfo = &builder.captchaInfo

	}
	if builder.regParamsFlag {
		req.RegParams = &builder.regParams

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

	}
	return req
}

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

	Name *I18nText `json:"name,omitempty"` // i18n文本

	IsEnabled *bool `json:"is_enabled,omitempty"` // 是否启用

	PostCode *string `json:"post_code,omitempty"` // 邮编

	Country *string `json:"country,omitempty"` // 国家 国家/地区主数据统一编码

	Province *string `json:"province,omitempty"` // 省份 省份主数据统一编码

	City *string `json:"city,omitempty"` // 城市 城市主数据统一编码

	County *string `json:"county,omitempty"` // 区县 区县主数据统一编码

	Types []string `json:"types,omitempty"` // 地址类型

	PlaceId *string `json:"place_id,omitempty"` // 地点，为0代表置空

	IsMain *bool `json:"is_main,omitempty"` // 是否主要地址

	IsPublic *bool `json:"is_public,omitempty"` // 是否公开地址

	ExternalId *string `json:"external_id,omitempty"` // 外部ID
}

type UpdateAddressBuilder struct {
	id     string // ID
	idFlag bool

	name     *I18nText // i18n文本
	nameFlag bool

	isEnabled     bool // 是否启用
	isEnabledFlag bool

	postCode     string // 邮编
	postCodeFlag bool

	country     string // 国家 国家/地区主数据统一编码
	countryFlag bool

	province     string // 省份 省份主数据统一编码
	provinceFlag bool

	city     string // 城市 城市主数据统一编码
	cityFlag bool

	county     string // 区县 区县主数据统一编码
	countyFlag bool

	types     []string // 地址类型
	typesFlag bool

	placeId     string // 地点，为0代表置空
	placeIdFlag bool

	isMain     bool // 是否主要地址
	isMainFlag bool

	isPublic     bool // 是否公开地址
	isPublicFlag bool

	externalId     string // 外部ID
	externalIdFlag bool
}

func NewUpdateAddressBuilder() *UpdateAddressBuilder {
	builder := &UpdateAddressBuilder{}
	return builder
}

// ID
//
// 示例值：6872549699048439828
func (builder *UpdateAddressBuilder) Id(id string) *UpdateAddressBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *UpdateAddressBuilder) Name(name *I18nText) *UpdateAddressBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 是否启用
//
// 示例值：
func (builder *UpdateAddressBuilder) IsEnabled(isEnabled bool) *UpdateAddressBuilder {
	builder.isEnabled = isEnabled
	builder.isEnabledFlag = true
	return builder
}

// 邮编
//
// 示例值：123456
func (builder *UpdateAddressBuilder) PostCode(postCode string) *UpdateAddressBuilder {
	builder.postCode = postCode
	builder.postCodeFlag = true
	return builder
}

// 国家 国家/地区主数据统一编码
//
// 示例值：MDCT00000256
func (builder *UpdateAddressBuilder) Country(country string) *UpdateAddressBuilder {
	builder.country = country
	builder.countryFlag = true
	return builder
}

// 省份 省份主数据统一编码
//
// 示例值：MDCT00000256
func (builder *UpdateAddressBuilder) Province(province string) *UpdateAddressBuilder {
	builder.province = province
	builder.provinceFlag = true
	return builder
}

// 城市 城市主数据统一编码
//
// 示例值：MDCT00000256
func (builder *UpdateAddressBuilder) City(city string) *UpdateAddressBuilder {
	builder.city = city
	builder.cityFlag = true
	return builder
}

// 区县 区县主数据统一编码
//
// 示例值：MDCT00000256
func (builder *UpdateAddressBuilder) County(county string) *UpdateAddressBuilder {
	builder.county = county
	builder.countyFlag = true
	return builder
}

// 地址类型
//
// 示例值：
func (builder *UpdateAddressBuilder) Types(types []string) *UpdateAddressBuilder {
	builder.types = types
	builder.typesFlag = true
	return builder
}

// 地点，为0代表置空
//
// 示例值：6872549699048439828
func (builder *UpdateAddressBuilder) PlaceId(placeId string) *UpdateAddressBuilder {
	builder.placeId = placeId
	builder.placeIdFlag = true
	return builder
}

// 是否主要地址
//
// 示例值：
func (builder *UpdateAddressBuilder) IsMain(isMain bool) *UpdateAddressBuilder {
	builder.isMain = isMain
	builder.isMainFlag = true
	return builder
}

// 是否公开地址
//
// 示例值：
func (builder *UpdateAddressBuilder) IsPublic(isPublic bool) *UpdateAddressBuilder {
	builder.isPublic = isPublic
	builder.isPublicFlag = true
	return builder
}

// 外部ID
//
// 示例值：custom_id
func (builder *UpdateAddressBuilder) ExternalId(externalId string) *UpdateAddressBuilder {
	builder.externalId = externalId
	builder.externalIdFlag = true
	return builder
}

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

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.isEnabledFlag {
		req.IsEnabled = &builder.isEnabled

	}
	if builder.postCodeFlag {
		req.PostCode = &builder.postCode

	}
	if builder.countryFlag {
		req.Country = &builder.country

	}
	if builder.provinceFlag {
		req.Province = &builder.province

	}
	if builder.cityFlag {
		req.City = &builder.city

	}
	if builder.countyFlag {
		req.County = &builder.county

	}
	if builder.typesFlag {
		req.Types = builder.types
	}
	if builder.placeIdFlag {
		req.PlaceId = &builder.placeId

	}
	if builder.isMainFlag {
		req.IsMain = &builder.isMain

	}
	if builder.isPublicFlag {
		req.IsPublic = &builder.isPublic

	}
	if builder.externalIdFlag {
		req.ExternalId = &builder.externalId

	}
	return req
}

type UpdateAddressOptions struct {
	DataSource *int `json:"data_source,omitempty"` // 数据来源
}

type UpdateAddressOptionsBuilder struct {
	dataSource     int // 数据来源
	dataSourceFlag bool
}

func NewUpdateAddressOptionsBuilder() *UpdateAddressOptionsBuilder {
	builder := &UpdateAddressOptionsBuilder{}
	return builder
}

// 数据来源
//
// 示例值：
func (builder *UpdateAddressOptionsBuilder) DataSource(dataSource int) *UpdateAddressOptionsBuilder {
	builder.dataSource = dataSource
	builder.dataSourceFlag = true
	return builder
}

func (builder *UpdateAddressOptionsBuilder) Build() *UpdateAddressOptions {
	req := &UpdateAddressOptions{}
	if builder.dataSourceFlag {
		req.DataSource = &builder.dataSource

	}
	return req
}

type UpdateApp struct {
	Id *string `json:"id,omitempty"` // AppUser ID

	Name *I18nText `json:"name,omitempty"` // i18n文本

	AvatarKey *string `json:"avatar_key,omitempty"` // 头像的文件key

	Usable *bool `json:"usable,omitempty"` // 租户下是否可用
}

type UpdateAppBuilder struct {
	id     string // AppUser ID
	idFlag bool

	name     *I18nText // i18n文本
	nameFlag bool

	avatarKey     string // 头像的文件key
	avatarKeyFlag bool

	usable     bool // 租户下是否可用
	usableFlag bool
}

func NewUpdateAppBuilder() *UpdateAppBuilder {
	builder := &UpdateAppBuilder{}
	return builder
}

// AppUser ID
//
// 示例值：7036181931599499700
func (builder *UpdateAppBuilder) Id(id string) *UpdateAppBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *UpdateAppBuilder) Name(name *I18nText) *UpdateAppBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 头像的文件key
//
// 示例值：asdfadsfasdfasdfadsf
func (builder *UpdateAppBuilder) AvatarKey(avatarKey string) *UpdateAppBuilder {
	builder.avatarKey = avatarKey
	builder.avatarKeyFlag = true
	return builder
}

// 租户下是否可用
//
// 示例值：
func (builder *UpdateAppBuilder) Usable(usable bool) *UpdateAppBuilder {
	builder.usable = usable
	builder.usableFlag = true
	return builder
}

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

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.avatarKeyFlag {
		req.AvatarKey = &builder.avatarKey

	}
	if builder.usableFlag {
		req.Usable = &builder.usable

	}
	return req
}

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

	AccountUserName *string `json:"account_user_name,omitempty"` // 开户人姓名

	AccountNumber *string `json:"account_number,omitempty"` // 银行卡号

	SubBankId *string `json:"sub_bank_id,omitempty"` // 支行ID

	BankCardType *string `json:"bank_card_type,omitempty"` // 银行卡类型

	Country *string `json:"country,omitempty"` // 国家/地区

	Currency *string `json:"currency,omitempty"` // 货币 https://md.bytedance.net/v1/main-data/currency 币种编码

	CheckCode *string `json:"check_code,omitempty"` // 校验码

	IsMain *bool `json:"is_main,omitempty"` // 是否主卡

	BankName *string `json:"bank_name,omitempty"` // 标准版兼容字段，后续会废弃，优先使用SubBankID
}

type UpdateBankAccountBuilder struct {
	id     string // ID
	idFlag bool

	accountUserName     string // 开户人姓名
	accountUserNameFlag bool

	accountNumber     string // 银行卡号
	accountNumberFlag bool

	subBankId     string // 支行ID
	subBankIdFlag bool

	bankCardType     string // 银行卡类型
	bankCardTypeFlag bool

	country     string // 国家/地区
	countryFlag bool

	currency     string // 货币 https://md.bytedance.net/v1/main-data/currency 币种编码
	currencyFlag bool

	checkCode     string // 校验码
	checkCodeFlag bool

	isMain     bool // 是否主卡
	isMainFlag bool

	bankName     string // 标准版兼容字段，后续会废弃，优先使用SubBankID
	bankNameFlag bool
}

func NewUpdateBankAccountBuilder() *UpdateBankAccountBuilder {
	builder := &UpdateBankAccountBuilder{}
	return builder
}

// ID
//
// 示例值：123123123
func (builder *UpdateBankAccountBuilder) Id(id string) *UpdateBankAccountBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 开户人姓名
//
// 示例值：rewasr
func (builder *UpdateBankAccountBuilder) AccountUserName(accountUserName string) *UpdateBankAccountBuilder {
	builder.accountUserName = accountUserName
	builder.accountUserNameFlag = true
	return builder
}

// 银行卡号
//
// 示例值：123123123
func (builder *UpdateBankAccountBuilder) AccountNumber(accountNumber string) *UpdateBankAccountBuilder {
	builder.accountNumber = accountNumber
	builder.accountNumberFlag = true
	return builder
}

// 支行ID
//
// 示例值：12312123312
func (builder *UpdateBankAccountBuilder) SubBankId(subBankId string) *UpdateBankAccountBuilder {
	builder.subBankId = subBankId
	builder.subBankIdFlag = true
	return builder
}

// 银行卡类型
//
// 示例值：
func (builder *UpdateBankAccountBuilder) BankCardType(bankCardType string) *UpdateBankAccountBuilder {
	builder.bankCardType = bankCardType
	builder.bankCardTypeFlag = true
	return builder
}

// 国家/地区
//
// 示例值：MDM_123123
func (builder *UpdateBankAccountBuilder) Country(country string) *UpdateBankAccountBuilder {
	builder.country = country
	builder.countryFlag = true
	return builder
}

// 货币 https://md.bytedance.net/v1/main-data/currency 币种编码
//
// 示例值：MDM_123123
func (builder *UpdateBankAccountBuilder) Currency(currency string) *UpdateBankAccountBuilder {
	builder.currency = currency
	builder.currencyFlag = true
	return builder
}

// 校验码
//
// 示例值：123123
func (builder *UpdateBankAccountBuilder) CheckCode(checkCode string) *UpdateBankAccountBuilder {
	builder.checkCode = checkCode
	builder.checkCodeFlag = true
	return builder
}

// 是否主卡
//
// 示例值：
func (builder *UpdateBankAccountBuilder) IsMain(isMain bool) *UpdateBankAccountBuilder {
	builder.isMain = isMain
	builder.isMainFlag = true
	return builder
}

// 标准版兼容字段，后续会废弃，优先使用SubBankID
//
// 示例值：test
func (builder *UpdateBankAccountBuilder) BankName(bankName string) *UpdateBankAccountBuilder {
	builder.bankName = bankName
	builder.bankNameFlag = true
	return builder
}

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

	}
	if builder.accountUserNameFlag {
		req.AccountUserName = &builder.accountUserName

	}
	if builder.accountNumberFlag {
		req.AccountNumber = &builder.accountNumber

	}
	if builder.subBankIdFlag {
		req.SubBankId = &builder.subBankId

	}
	if builder.bankCardTypeFlag {
		req.BankCardType = &builder.bankCardType

	}
	if builder.countryFlag {
		req.Country = &builder.country

	}
	if builder.currencyFlag {
		req.Currency = &builder.currency

	}
	if builder.checkCodeFlag {
		req.CheckCode = &builder.checkCode

	}
	if builder.isMainFlag {
		req.IsMain = &builder.isMain

	}
	if builder.bankNameFlag {
		req.BankName = &builder.bankName

	}
	return req
}

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

	CredentialNumber *string `json:"credential_number,omitempty"` // 证件号

	CredentialType *string `json:"credential_type,omitempty"` // 证件类型

	ExpiryDate *string `json:"expiry_date,omitempty"` // 到期日期 格式：2007-07-20， 无固定期限或者长期有效，使用PermanentDate常量
}

type UpdateCertificateBuilder struct {
	id     string // ID
	idFlag bool

	credentialNumber     string // 证件号
	credentialNumberFlag bool

	credentialType     string // 证件类型
	credentialTypeFlag bool

	expiryDate     string // 到期日期 格式：2007-07-20， 无固定期限或者长期有效，使用PermanentDate常量
	expiryDateFlag bool
}

func NewUpdateCertificateBuilder() *UpdateCertificateBuilder {
	builder := &UpdateCertificateBuilder{}
	return builder
}

// ID
//
// 示例值：12312312
func (builder *UpdateCertificateBuilder) Id(id string) *UpdateCertificateBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 证件号
//
// 示例值：1231231
func (builder *UpdateCertificateBuilder) CredentialNumber(credentialNumber string) *UpdateCertificateBuilder {
	builder.credentialNumber = credentialNumber
	builder.credentialNumberFlag = true
	return builder
}

// 证件类型
//
// 示例值：
func (builder *UpdateCertificateBuilder) CredentialType(credentialType string) *UpdateCertificateBuilder {
	builder.credentialType = credentialType
	builder.credentialTypeFlag = true
	return builder
}

// 到期日期 格式：2007-07-20， 无固定期限或者长期有效，使用PermanentDate常量
//
// 示例值：2022-02-02
func (builder *UpdateCertificateBuilder) ExpiryDate(expiryDate string) *UpdateCertificateBuilder {
	builder.expiryDate = expiryDate
	builder.expiryDateFlag = true
	return builder
}

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

	}
	if builder.credentialNumberFlag {
		req.CredentialNumber = &builder.credentialNumber

	}
	if builder.credentialTypeFlag {
		req.CredentialType = &builder.credentialType

	}
	if builder.expiryDateFlag {
		req.ExpiryDate = &builder.expiryDate

	}
	return req
}

type UpdateCompany struct {
	Id *string `json:"id,omitempty"` // 公司ID

	Name *I18nText `json:"name,omitempty"` // i18n文本

	IsEnabled *bool `json:"is_enabled,omitempty"` // 是否启用

	ExternalId *string `json:"external_id,omitempty"` // 外部ID 不可更新成空
}

type UpdateCompanyBuilder struct {
	id     string // 公司ID
	idFlag bool

	name     *I18nText // i18n文本
	nameFlag bool

	isEnabled     bool // 是否启用
	isEnabledFlag bool

	externalId     string // 外部ID 不可更新成空
	externalIdFlag bool
}

func NewUpdateCompanyBuilder() *UpdateCompanyBuilder {
	builder := &UpdateCompanyBuilder{}
	return builder
}

// 公司ID
//
// 示例值：7036181931599499700
func (builder *UpdateCompanyBuilder) Id(id string) *UpdateCompanyBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *UpdateCompanyBuilder) Name(name *I18nText) *UpdateCompanyBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 是否启用
//
// 示例值：
func (builder *UpdateCompanyBuilder) IsEnabled(isEnabled bool) *UpdateCompanyBuilder {
	builder.isEnabled = isEnabled
	builder.isEnabledFlag = true
	return builder
}

// 外部ID 不可更新成空
//
// 示例值：WQSADFFF
func (builder *UpdateCompanyBuilder) ExternalId(externalId string) *UpdateCompanyBuilder {
	builder.externalId = externalId
	builder.externalIdFlag = true
	return builder
}

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

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.isEnabledFlag {
		req.IsEnabled = &builder.isEnabled

	}
	if builder.externalIdFlag {
		req.ExternalId = &builder.externalId

	}
	return req
}

type UpdateCompanyoptions struct {
	DataSource *int `json:"data_source,omitempty"` // 数据来源
}

type UpdateCompanyoptionsBuilder struct {
	dataSource     int // 数据来源
	dataSourceFlag bool
}

func NewUpdateCompanyoptionsBuilder() *UpdateCompanyoptionsBuilder {
	builder := &UpdateCompanyoptionsBuilder{}
	return builder
}

// 数据来源
//
// 示例值：
func (builder *UpdateCompanyoptionsBuilder) DataSource(dataSource int) *UpdateCompanyoptionsBuilder {
	builder.dataSource = dataSource
	builder.dataSourceFlag = true
	return builder
}

func (builder *UpdateCompanyoptionsBuilder) Build() *UpdateCompanyoptions {
	req := &UpdateCompanyoptions{}
	if builder.dataSourceFlag {
		req.DataSource = &builder.dataSource

	}
	return req
}

type UpdateCustomField struct {
	Id *string `json:"id,omitempty"` // 字段id

	FieldName *I18nText `json:"field_name,omitempty"` // i18n文本

	Description *I18nText `json:"description,omitempty"` // i18n文本

	Options []*EnumOption `json:"options,omitempty"` // 枚举值有序列表，全量覆盖更新，更新的枚举项需要传选项ID，选项ID为空认为是创建新的枚举项，原枚举项中不在此列表中的直接删除

	IsEnabled *bool `json:"is_enabled,omitempty"` // 是否启用\n多语言名称
}

type UpdateCustomFieldBuilder struct {
	id     string // 字段id
	idFlag bool

	fieldName     *I18nText // i18n文本
	fieldNameFlag bool

	description     *I18nText // i18n文本
	descriptionFlag bool

	options     []*EnumOption // 枚举值有序列表，全量覆盖更新，更新的枚举项需要传选项ID，选项ID为空认为是创建新的枚举项，原枚举项中不在此列表中的直接删除
	optionsFlag bool

	isEnabled     bool // 是否启用\n多语言名称
	isEnabledFlag bool
}

func NewUpdateCustomFieldBuilder() *UpdateCustomFieldBuilder {
	builder := &UpdateCustomFieldBuilder{}
	return builder
}

// 字段id
//
// 示例值：7036181931599499700
func (builder *UpdateCustomFieldBuilder) Id(id string) *UpdateCustomFieldBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *UpdateCustomFieldBuilder) FieldName(fieldName *I18nText) *UpdateCustomFieldBuilder {
	builder.fieldName = fieldName
	builder.fieldNameFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *UpdateCustomFieldBuilder) Description(description *I18nText) *UpdateCustomFieldBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 枚举值有序列表，全量覆盖更新，更新的枚举项需要传选项ID，选项ID为空认为是创建新的枚举项，原枚举项中不在此列表中的直接删除
//
// 示例值：
func (builder *UpdateCustomFieldBuilder) Options(options []*EnumOption) *UpdateCustomFieldBuilder {
	builder.options = options
	builder.optionsFlag = true
	return builder
}

// 是否启用\n多语言名称
//
// 示例值：
func (builder *UpdateCustomFieldBuilder) IsEnabled(isEnabled bool) *UpdateCustomFieldBuilder {
	builder.isEnabled = isEnabled
	builder.isEnabledFlag = true
	return builder
}

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

	}
	if builder.fieldNameFlag {
		req.FieldName = builder.fieldName
	}
	if builder.descriptionFlag {
		req.Description = builder.description
	}
	if builder.optionsFlag {
		req.Options = builder.options
	}
	if builder.isEnabledFlag {
		req.IsEnabled = &builder.isEnabled

	}
	return req
}

type UpdateDepartment struct {
	DepartmentId *string `json:"department_id,omitempty"` // 部门ID

	CustomDepartmentId *string `json:"custom_department_id,omitempty"` // 自定义部门ID

	Name *I18nText `json:"name,omitempty"` // i18n文本

	ParentDepartmentId *string `json:"parent_department_id,omitempty"` // 父部门ID

	Leaders []*DepartmentLeader `json:"leaders,omitempty"` // 部门负责人

	Hrbps []string `json:"hrbps,omitempty"` // HRBP

	OrderWeight *string `json:"order_weight,omitempty"` // 在上级部门下的排序权重

	Description *I18nText `json:"description,omitempty"` // i18n文本

	DepartmentType *int `json:"department_type,omitempty"` // 部门类型

	EnabledStatus *bool `json:"enabled_status,omitempty"` // 是否启用

	CustomFieldValueMap map[string]*CustomFieldValue `json:"custom_field_value_map,omitempty"` // 自定义字段

	CustomFieldValues []*CustomFieldValue `json:"custom_field_values,omitempty"` // 自定义字段
}

type UpdateDepartmentBuilder struct {
	departmentId     string // 部门ID
	departmentIdFlag bool

	customDepartmentId     string // 自定义部门ID
	customDepartmentIdFlag bool

	name     *I18nText // i18n文本
	nameFlag bool

	parentDepartmentId     string // 父部门ID
	parentDepartmentIdFlag bool

	leaders     []*DepartmentLeader // 部门负责人
	leadersFlag bool

	hrbps     []string // HRBP
	hrbpsFlag bool

	orderWeight     string // 在上级部门下的排序权重
	orderWeightFlag bool

	description     *I18nText // i18n文本
	descriptionFlag bool

	departmentType     int // 部门类型
	departmentTypeFlag bool

	enabledStatus     bool // 是否启用
	enabledStatusFlag bool

	customFieldValueMap     map[string]*CustomFieldValue // 自定义字段
	customFieldValueMapFlag bool

	customFieldValues     []*CustomFieldValue // 自定义字段
	customFieldValuesFlag bool
}

func NewUpdateDepartmentBuilder() *UpdateDepartmentBuilder {
	builder := &UpdateDepartmentBuilder{}
	return builder
}

// 部门ID
//
// 示例值：
func (builder *UpdateDepartmentBuilder) DepartmentId(departmentId string) *UpdateDepartmentBuilder {
	builder.departmentId = departmentId
	builder.departmentIdFlag = true
	return builder
}

// 自定义部门ID
//
// 示例值：eedasqwA
func (builder *UpdateDepartmentBuilder) CustomDepartmentId(customDepartmentId string) *UpdateDepartmentBuilder {
	builder.customDepartmentId = customDepartmentId
	builder.customDepartmentIdFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *UpdateDepartmentBuilder) Name(name *I18nText) *UpdateDepartmentBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 父部门ID
//
// 示例值：100
func (builder *UpdateDepartmentBuilder) ParentDepartmentId(parentDepartmentId string) *UpdateDepartmentBuilder {
	builder.parentDepartmentId = parentDepartmentId
	builder.parentDepartmentIdFlag = true
	return builder
}

// 部门负责人
//
// 示例值：
func (builder *UpdateDepartmentBuilder) Leaders(leaders []*DepartmentLeader) *UpdateDepartmentBuilder {
	builder.leaders = leaders
	builder.leadersFlag = true
	return builder
}

// HRBP
//
// 示例值：
func (builder *UpdateDepartmentBuilder) Hrbps(hrbps []string) *UpdateDepartmentBuilder {
	builder.hrbps = hrbps
	builder.hrbpsFlag = true
	return builder
}

// 在上级部门下的排序权重
//
// 示例值：100
func (builder *UpdateDepartmentBuilder) OrderWeight(orderWeight string) *UpdateDepartmentBuilder {
	builder.orderWeight = orderWeight
	builder.orderWeightFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *UpdateDepartmentBuilder) Description(description *I18nText) *UpdateDepartmentBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 部门类型
//
// 示例值：
func (builder *UpdateDepartmentBuilder) DepartmentType(departmentType int) *UpdateDepartmentBuilder {
	builder.departmentType = departmentType
	builder.departmentTypeFlag = true
	return builder
}

// 是否启用
//
// 示例值：
func (builder *UpdateDepartmentBuilder) EnabledStatus(enabledStatus bool) *UpdateDepartmentBuilder {
	builder.enabledStatus = enabledStatus
	builder.enabledStatusFlag = true
	return builder
}

// 自定义字段
//
// 示例值：
func (builder *UpdateDepartmentBuilder) CustomFieldValueMap(customFieldValueMap map[string]*CustomFieldValue) *UpdateDepartmentBuilder {
	builder.customFieldValueMap = customFieldValueMap
	builder.customFieldValueMapFlag = true
	return builder
}

// 自定义字段
//
// 示例值：
func (builder *UpdateDepartmentBuilder) CustomFieldValues(customFieldValues []*CustomFieldValue) *UpdateDepartmentBuilder {
	builder.customFieldValues = customFieldValues
	builder.customFieldValuesFlag = true
	return builder
}

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

	}
	if builder.customDepartmentIdFlag {
		req.CustomDepartmentId = &builder.customDepartmentId

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.parentDepartmentIdFlag {
		req.ParentDepartmentId = &builder.parentDepartmentId

	}
	if builder.leadersFlag {
		req.Leaders = builder.leaders
	}
	if builder.hrbpsFlag {
		req.Hrbps = builder.hrbps
	}
	if builder.orderWeightFlag {
		req.OrderWeight = &builder.orderWeight

	}
	if builder.descriptionFlag {
		req.Description = builder.description
	}
	if builder.departmentTypeFlag {
		req.DepartmentType = &builder.departmentType

	}
	if builder.enabledStatusFlag {
		req.EnabledStatus = &builder.enabledStatus

	}
	if builder.customFieldValueMapFlag {
		req.CustomFieldValueMap = builder.customFieldValueMap
	}
	if builder.customFieldValuesFlag {
		req.CustomFieldValues = builder.customFieldValues
	}
	return req
}

type UpdateDepartmentOptions struct {
	DataSource *int `json:"data_source,omitempty"` // 数据来源
}

type UpdateDepartmentOptionsBuilder struct {
	dataSource     int // 数据来源
	dataSourceFlag bool
}

func NewUpdateDepartmentOptionsBuilder() *UpdateDepartmentOptionsBuilder {
	builder := &UpdateDepartmentOptionsBuilder{}
	return builder
}

// 数据来源
//
// 示例值：
func (builder *UpdateDepartmentOptionsBuilder) DataSource(dataSource int) *UpdateDepartmentOptionsBuilder {
	builder.dataSource = dataSource
	builder.dataSourceFlag = true
	return builder
}

func (builder *UpdateDepartmentOptionsBuilder) Build() *UpdateDepartmentOptions {
	req := &UpdateDepartmentOptions{}
	if builder.dataSourceFlag {
		req.DataSource = &builder.dataSource

	}
	return req
}

type UpdateEmployee struct {
	EmployeeId *string `json:"employee_id,omitempty"` // ID

	Name *UpsertName `json:"name,omitempty"` // 姓名

	Mobile *string `json:"mobile,omitempty"` // 员工的联系手机号

	CustomEmployeeId *string `json:"custom_employee_id,omitempty"` // 用户的user_id

	AvatarKey *string `json:"avatar_key,omitempty"` // 头像的文件key

	Email *string `json:"email,omitempty"` // 员工的联系邮箱

	PersonalEmail *string `json:"personal_email,omitempty"` // 员工在人事系统中的联系邮箱

	EnterpriseEmail *string `json:"enterprise_email,omitempty"` // 员工的企业邮箱

	Gender *int `json:"gender,omitempty"` // 性别

	ResidentialAddress *string `json:"residential_address,omitempty"` // 现居住地址

	ContactAddresses []*ContactAddress `json:"contact_addresses,omitempty"` // 联系地址

	EmployeeOrderInDepartments []*UpsertUserDepartmentSortInfo `json:"employee_order_in_departments,omitempty"` // 部门排序

	BackgroundImageKey *string `json:"background_image_key,omitempty"` // 背景图的key

	Description *string `json:"description,omitempty"` // 员工的个性签名

	LeaderId *string `json:"leader_id,omitempty"` // 员工直属上级的user_id

	DottedLineLeaderIds []string `json:"dotted_line_leader_ids,omitempty"` // 员工虚线上级的user_id

	WorkCountryOrRegion *string `json:"work_country_or_region,omitempty"` // 工作地国家/地区

	WorkPlaceId *string `json:"work_place_id,omitempty"` // 工作地点

	WorkStation *I18nText `json:"work_station,omitempty"` // i18n文本

	JobNumber *string `json:"job_number,omitempty"` // 工号

	ExtensionNumber *string `json:"extension_number,omitempty"` // 分机号

	JoinDate *string `json:"join_date,omitempty"` // 入职日期

	EmploymentType *int `json:"employment_type,omitempty"` // 员工类型

	StaffStatus *int `json:"staff_status,omitempty"` // 员工人事状态

	Positions []*Position `json:"positions,omitempty"` // 岗位信息

	JobTitleId *string `json:"job_title_id,omitempty"` // 职务ID

	JobLevelId *string `json:"job_level_id,omitempty"` // 职级ID

	JobFamilyId *string `json:"job_family_id,omitempty"` // 序列ID

	FirstWorkDate *string `json:"first_work_date,omitempty"` // 首次参加工作日期

	FirstJoinDate *string `json:"first_join_date,omitempty"` // 首次进入公司日期

	ProbationPeriod *string `json:"probation_period,omitempty"` // 试用期（月）

	RegularizationDate *string `json:"regularization_date,omitempty"` // 转正日期

	ConvertStatus *string `json:"convert_status,omitempty"` // 转正状态

	ContractSubject *string `json:"contract_subject,omitempty"` // 合同主体ID

	ResignDate *string `json:"resign_date,omitempty"` // 离职日期

	ResignReason *string `json:"resign_reason,omitempty"` // 离职原因

	ResignRemark *string `json:"resign_remark,omitempty"` // 离职备注信息

	ResignType *string `json:"resign_type,omitempty"` // 离职类型

	CancelledEntryType *string `json:"cancelled_entry_type,omitempty"` // 取消入职原因

	CancelledEntryRemark *string `json:"cancelled_entry_remark,omitempty"` // 取消入职备注信息

	Birthday *string `json:"birthday,omitempty"` // 出生日期

	Nationality *string `json:"nationality,omitempty"` // 国籍

	NativePlace *string `json:"native_place,omitempty"` // 籍贯

	Ethnicity *string `json:"ethnicity,omitempty"` // 民族/种族

	MaritalStatus *string `json:"marital_status,omitempty"` // 婚姻状态

	PoliticsStatus *string `json:"politics_status,omitempty"` // 政治面貌

	RegisteredResidenceType *string `json:"registered_residence_type,omitempty"` // 户口类型

	Location *string `json:"location,omitempty"` // 户口所在地地址

	SocialSecurityNumber *string `json:"social_security_number,omitempty"` // 社保账号

	ProvidentFundNumber *string `json:"provident_fund_number,omitempty"` // 公积金账号

	IsFrozen *bool `json:"is_frozen,omitempty"` // 暂停 true， false 恢复暂停

	FrozenReason *string `json:"frozen_reason,omitempty"` // 冻结原因

	CustomFieldValueMap map[string]*CustomFieldValue `json:"custom_field_value_map,omitempty"` // 自定义字段

	CustomFieldValues []*CustomFieldValue `json:"custom_field_values,omitempty"` // 自定义字段

	VirtualOrgInfos []*UpsertUserVirtualOrgInfo `json:"virtual_org_infos,omitempty"` // 虚拟组织信息
}

type UpdateEmployeeBuilder struct {
	employeeId     string // ID
	employeeIdFlag bool

	name     *UpsertName // 姓名
	nameFlag bool

	mobile     string // 员工的联系手机号
	mobileFlag bool

	customEmployeeId     string // 用户的user_id
	customEmployeeIdFlag bool

	avatarKey     string // 头像的文件key
	avatarKeyFlag bool

	email     string // 员工的联系邮箱
	emailFlag bool

	personalEmail     string // 员工在人事系统中的联系邮箱
	personalEmailFlag bool

	enterpriseEmail     string // 员工的企业邮箱
	enterpriseEmailFlag bool

	gender     int // 性别
	genderFlag bool

	residentialAddress     string // 现居住地址
	residentialAddressFlag bool

	contactAddresses     []*ContactAddress // 联系地址
	contactAddressesFlag bool

	employeeOrderInDepartments     []*UpsertUserDepartmentSortInfo // 部门排序
	employeeOrderInDepartmentsFlag bool

	backgroundImageKey     string // 背景图的key
	backgroundImageKeyFlag bool

	description     string // 员工的个性签名
	descriptionFlag bool

	leaderId     string // 员工直属上级的user_id
	leaderIdFlag bool

	dottedLineLeaderIds     []string // 员工虚线上级的user_id
	dottedLineLeaderIdsFlag bool

	workCountryOrRegion     string // 工作地国家/地区
	workCountryOrRegionFlag bool

	workPlaceId     string // 工作地点
	workPlaceIdFlag bool

	workStation     *I18nText // i18n文本
	workStationFlag bool

	jobNumber     string // 工号
	jobNumberFlag bool

	extensionNumber     string // 分机号
	extensionNumberFlag bool

	joinDate     string // 入职日期
	joinDateFlag bool

	employmentType     int // 员工类型
	employmentTypeFlag bool

	staffStatus     int // 员工人事状态
	staffStatusFlag bool

	positions     []*Position // 岗位信息
	positionsFlag bool

	jobTitleId     string // 职务ID
	jobTitleIdFlag bool

	jobLevelId     string // 职级ID
	jobLevelIdFlag bool

	jobFamilyId     string // 序列ID
	jobFamilyIdFlag bool

	firstWorkDate     string // 首次参加工作日期
	firstWorkDateFlag bool

	firstJoinDate     string // 首次进入公司日期
	firstJoinDateFlag bool

	probationPeriod     string // 试用期（月）
	probationPeriodFlag bool

	regularizationDate     string // 转正日期
	regularizationDateFlag bool

	convertStatus     string // 转正状态
	convertStatusFlag bool

	contractSubject     string // 合同主体ID
	contractSubjectFlag bool

	resignDate     string // 离职日期
	resignDateFlag bool

	resignReason     string // 离职原因
	resignReasonFlag bool

	resignRemark     string // 离职备注信息
	resignRemarkFlag bool

	resignType     string // 离职类型
	resignTypeFlag bool

	cancelledEntryType     string // 取消入职原因
	cancelledEntryTypeFlag bool

	cancelledEntryRemark     string // 取消入职备注信息
	cancelledEntryRemarkFlag bool

	birthday     string // 出生日期
	birthdayFlag bool

	nationality     string // 国籍
	nationalityFlag bool

	nativePlace     string // 籍贯
	nativePlaceFlag bool

	ethnicity     string // 民族/种族
	ethnicityFlag bool

	maritalStatus     string // 婚姻状态
	maritalStatusFlag bool

	politicsStatus     string // 政治面貌
	politicsStatusFlag bool

	registeredResidenceType     string // 户口类型
	registeredResidenceTypeFlag bool

	location     string // 户口所在地地址
	locationFlag bool

	socialSecurityNumber     string // 社保账号
	socialSecurityNumberFlag bool

	providentFundNumber     string // 公积金账号
	providentFundNumberFlag bool

	isFrozen     bool // 暂停 true， false 恢复暂停
	isFrozenFlag bool

	frozenReason     string // 冻结原因
	frozenReasonFlag bool

	customFieldValueMap     map[string]*CustomFieldValue // 自定义字段
	customFieldValueMapFlag bool

	customFieldValues     []*CustomFieldValue // 自定义字段
	customFieldValuesFlag bool

	virtualOrgInfos     []*UpsertUserVirtualOrgInfo // 虚拟组织信息
	virtualOrgInfosFlag bool
}

func NewUpdateEmployeeBuilder() *UpdateEmployeeBuilder {
	builder := &UpdateEmployeeBuilder{}
	return builder
}

// ID
//
// 示例值：eehsdna
func (builder *UpdateEmployeeBuilder) EmployeeId(employeeId string) *UpdateEmployeeBuilder {
	builder.employeeId = employeeId
	builder.employeeIdFlag = true
	return builder
}

// 姓名
//
// 示例值：
func (builder *UpdateEmployeeBuilder) Name(name *UpsertName) *UpdateEmployeeBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 员工的联系手机号
//
// 示例值：13011111111" 或 "+8613011111111
func (builder *UpdateEmployeeBuilder) Mobile(mobile string) *UpdateEmployeeBuilder {
	builder.mobile = mobile
	builder.mobileFlag = true
	return builder
}

// 用户的user_id
//
// 示例值：eesadeq
func (builder *UpdateEmployeeBuilder) CustomEmployeeId(customEmployeeId string) *UpdateEmployeeBuilder {
	builder.customEmployeeId = customEmployeeId
	builder.customEmployeeIdFlag = true
	return builder
}

// 头像的文件key
//
// 示例值：img_v2dadwqeqwdsa
func (builder *UpdateEmployeeBuilder) AvatarKey(avatarKey string) *UpdateEmployeeBuilder {
	builder.avatarKey = avatarKey
	builder.avatarKeyFlag = true
	return builder
}

// 员工的联系邮箱
//
// 示例值：zhangsan@163.com
func (builder *UpdateEmployeeBuilder) Email(email string) *UpdateEmployeeBuilder {
	builder.email = email
	builder.emailFlag = true
	return builder
}

// 员工在人事系统中的联系邮箱
//
// 示例值：zhangsan@163.com
func (builder *UpdateEmployeeBuilder) PersonalEmail(personalEmail string) *UpdateEmployeeBuilder {
	builder.personalEmail = personalEmail
	builder.personalEmailFlag = true
	return builder
}

// 员工的企业邮箱
//
// 示例值：zhangsan@163.com
func (builder *UpdateEmployeeBuilder) EnterpriseEmail(enterpriseEmail string) *UpdateEmployeeBuilder {
	builder.enterpriseEmail = enterpriseEmail
	builder.enterpriseEmailFlag = true
	return builder
}

// 性别
//
// 示例值：
func (builder *UpdateEmployeeBuilder) Gender(gender int) *UpdateEmployeeBuilder {
	builder.gender = gender
	builder.genderFlag = true
	return builder
}

// 现居住地址
//
// 示例值：张家界
func (builder *UpdateEmployeeBuilder) ResidentialAddress(residentialAddress string) *UpdateEmployeeBuilder {
	builder.residentialAddress = residentialAddress
	builder.residentialAddressFlag = true
	return builder
}

// 联系地址
//
// 示例值：
func (builder *UpdateEmployeeBuilder) ContactAddresses(contactAddresses []*ContactAddress) *UpdateEmployeeBuilder {
	builder.contactAddresses = contactAddresses
	builder.contactAddressesFlag = true
	return builder
}

// 部门排序
//
// 示例值：
func (builder *UpdateEmployeeBuilder) EmployeeOrderInDepartments(employeeOrderInDepartments []*UpsertUserDepartmentSortInfo) *UpdateEmployeeBuilder {
	builder.employeeOrderInDepartments = employeeOrderInDepartments
	builder.employeeOrderInDepartmentsFlag = true
	return builder
}

// 背景图的key
//
// 示例值：img_v2_qweasdqawqeq
func (builder *UpdateEmployeeBuilder) BackgroundImageKey(backgroundImageKey string) *UpdateEmployeeBuilder {
	builder.backgroundImageKey = backgroundImageKey
	builder.backgroundImageKeyFlag = true
	return builder
}

// 员工的个性签名
//
// 示例值：新员工入职
func (builder *UpdateEmployeeBuilder) Description(description string) *UpdateEmployeeBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 员工直属上级的user_id
//
// 示例值：eeshfosd
func (builder *UpdateEmployeeBuilder) LeaderId(leaderId string) *UpdateEmployeeBuilder {
	builder.leaderId = leaderId
	builder.leaderIdFlag = true
	return builder
}

// 员工虚线上级的user_id
//
// 示例值：
func (builder *UpdateEmployeeBuilder) DottedLineLeaderIds(dottedLineLeaderIds []string) *UpdateEmployeeBuilder {
	builder.dottedLineLeaderIds = dottedLineLeaderIds
	builder.dottedLineLeaderIdsFlag = true
	return builder
}

// 工作地国家/地区
//
// 示例值：MDM2312312
func (builder *UpdateEmployeeBuilder) WorkCountryOrRegion(workCountryOrRegion string) *UpdateEmployeeBuilder {
	builder.workCountryOrRegion = workCountryOrRegion
	builder.workCountryOrRegionFlag = true
	return builder
}

// 工作地点
//
// 示例值：1111sdda
func (builder *UpdateEmployeeBuilder) WorkPlaceId(workPlaceId string) *UpdateEmployeeBuilder {
	builder.workPlaceId = workPlaceId
	builder.workPlaceIdFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *UpdateEmployeeBuilder) WorkStation(workStation *I18nText) *UpdateEmployeeBuilder {
	builder.workStation = workStation
	builder.workStationFlag = true
	return builder
}

// 工号
//
// 示例值：28549233
func (builder *UpdateEmployeeBuilder) JobNumber(jobNumber string) *UpdateEmployeeBuilder {
	builder.jobNumber = jobNumber
	builder.jobNumberFlag = true
	return builder
}

// 分机号
//
// 示例值：2854923
func (builder *UpdateEmployeeBuilder) ExtensionNumber(extensionNumber string) *UpdateEmployeeBuilder {
	builder.extensionNumber = extensionNumber
	builder.extensionNumberFlag = true
	return builder
}

// 入职日期
//
// 示例值：2022-10-10
func (builder *UpdateEmployeeBuilder) JoinDate(joinDate string) *UpdateEmployeeBuilder {
	builder.joinDate = joinDate
	builder.joinDateFlag = true
	return builder
}

// 员工类型
//
// 示例值：
func (builder *UpdateEmployeeBuilder) EmploymentType(employmentType int) *UpdateEmployeeBuilder {
	builder.employmentType = employmentType
	builder.employmentTypeFlag = true
	return builder
}

// 员工人事状态
//
// 示例值：
func (builder *UpdateEmployeeBuilder) StaffStatus(staffStatus int) *UpdateEmployeeBuilder {
	builder.staffStatus = staffStatus
	builder.staffStatusFlag = true
	return builder
}

// 岗位信息
//
// 示例值：
func (builder *UpdateEmployeeBuilder) Positions(positions []*Position) *UpdateEmployeeBuilder {
	builder.positions = positions
	builder.positionsFlag = true
	return builder
}

// 职务ID
//
// 示例值：ewdjdssd
func (builder *UpdateEmployeeBuilder) JobTitleId(jobTitleId string) *UpdateEmployeeBuilder {
	builder.jobTitleId = jobTitleId
	builder.jobTitleIdFlag = true
	return builder
}

// 职级ID
//
// 示例值：eersdfa
func (builder *UpdateEmployeeBuilder) JobLevelId(jobLevelId string) *UpdateEmployeeBuilder {
	builder.jobLevelId = jobLevelId
	builder.jobLevelIdFlag = true
	return builder
}

// 序列ID
//
// 示例值：eersdfa
func (builder *UpdateEmployeeBuilder) JobFamilyId(jobFamilyId string) *UpdateEmployeeBuilder {
	builder.jobFamilyId = jobFamilyId
	builder.jobFamilyIdFlag = true
	return builder
}

// 首次参加工作日期
//
// 示例值：2022-10-10
func (builder *UpdateEmployeeBuilder) FirstWorkDate(firstWorkDate string) *UpdateEmployeeBuilder {
	builder.firstWorkDate = firstWorkDate
	builder.firstWorkDateFlag = true
	return builder
}

// 首次进入公司日期
//
// 示例值：2022-10-10
func (builder *UpdateEmployeeBuilder) FirstJoinDate(firstJoinDate string) *UpdateEmployeeBuilder {
	builder.firstJoinDate = firstJoinDate
	builder.firstJoinDateFlag = true
	return builder
}

// 试用期（月）
//
// 示例值：10
func (builder *UpdateEmployeeBuilder) ProbationPeriod(probationPeriod string) *UpdateEmployeeBuilder {
	builder.probationPeriod = probationPeriod
	builder.probationPeriodFlag = true
	return builder
}

// 转正日期
//
// 示例值：2022-10-10
func (builder *UpdateEmployeeBuilder) RegularizationDate(regularizationDate string) *UpdateEmployeeBuilder {
	builder.regularizationDate = regularizationDate
	builder.regularizationDateFlag = true
	return builder
}

// 转正状态
//
// 示例值：
func (builder *UpdateEmployeeBuilder) ConvertStatus(convertStatus string) *UpdateEmployeeBuilder {
	builder.convertStatus = convertStatus
	builder.convertStatusFlag = true
	return builder
}

// 合同主体ID
//
// 示例值：123dsqwe
func (builder *UpdateEmployeeBuilder) ContractSubject(contractSubject string) *UpdateEmployeeBuilder {
	builder.contractSubject = contractSubject
	builder.contractSubjectFlag = true
	return builder
}

// 离职日期
//
// 示例值：2022-10-10
func (builder *UpdateEmployeeBuilder) ResignDate(resignDate string) *UpdateEmployeeBuilder {
	builder.resignDate = resignDate
	builder.resignDateFlag = true
	return builder
}

// 离职原因
//
// 示例值：
func (builder *UpdateEmployeeBuilder) ResignReason(resignReason string) *UpdateEmployeeBuilder {
	builder.resignReason = resignReason
	builder.resignReasonFlag = true
	return builder
}

// 离职备注信息
//
// 示例值：个人原因
func (builder *UpdateEmployeeBuilder) ResignRemark(resignRemark string) *UpdateEmployeeBuilder {
	builder.resignRemark = resignRemark
	builder.resignRemarkFlag = true
	return builder
}

// 离职类型
//
// 示例值：
func (builder *UpdateEmployeeBuilder) ResignType(resignType string) *UpdateEmployeeBuilder {
	builder.resignType = resignType
	builder.resignTypeFlag = true
	return builder
}

// 取消入职原因
//
// 示例值：
func (builder *UpdateEmployeeBuilder) CancelledEntryType(cancelledEntryType string) *UpdateEmployeeBuilder {
	builder.cancelledEntryType = cancelledEntryType
	builder.cancelledEntryTypeFlag = true
	return builder
}

// 取消入职备注信息
//
// 示例值：个人原因
func (builder *UpdateEmployeeBuilder) CancelledEntryRemark(cancelledEntryRemark string) *UpdateEmployeeBuilder {
	builder.cancelledEntryRemark = cancelledEntryRemark
	builder.cancelledEntryRemarkFlag = true
	return builder
}

// 出生日期
//
// 示例值：2022-10-10
func (builder *UpdateEmployeeBuilder) Birthday(birthday string) *UpdateEmployeeBuilder {
	builder.birthday = birthday
	builder.birthdayFlag = true
	return builder
}

// 国籍
//
// 示例值：MDM123123
func (builder *UpdateEmployeeBuilder) Nationality(nationality string) *UpdateEmployeeBuilder {
	builder.nationality = nationality
	builder.nationalityFlag = true
	return builder
}

// 籍贯
//
// 示例值：北京
func (builder *UpdateEmployeeBuilder) NativePlace(nativePlace string) *UpdateEmployeeBuilder {
	builder.nativePlace = nativePlace
	builder.nativePlaceFlag = true
	return builder
}

// 民族/种族
//
// 示例值：
func (builder *UpdateEmployeeBuilder) Ethnicity(ethnicity string) *UpdateEmployeeBuilder {
	builder.ethnicity = ethnicity
	builder.ethnicityFlag = true
	return builder
}

// 婚姻状态
//
// 示例值：
func (builder *UpdateEmployeeBuilder) MaritalStatus(maritalStatus string) *UpdateEmployeeBuilder {
	builder.maritalStatus = maritalStatus
	builder.maritalStatusFlag = true
	return builder
}

// 政治面貌
//
// 示例值：
func (builder *UpdateEmployeeBuilder) PoliticsStatus(politicsStatus string) *UpdateEmployeeBuilder {
	builder.politicsStatus = politicsStatus
	builder.politicsStatusFlag = true
	return builder
}

// 户口类型
//
// 示例值：
func (builder *UpdateEmployeeBuilder) RegisteredResidenceType(registeredResidenceType string) *UpdateEmployeeBuilder {
	builder.registeredResidenceType = registeredResidenceType
	builder.registeredResidenceTypeFlag = true
	return builder
}

// 户口所在地地址
//
// 示例值：北京
func (builder *UpdateEmployeeBuilder) Location(location string) *UpdateEmployeeBuilder {
	builder.location = location
	builder.locationFlag = true
	return builder
}

// 社保账号
//
// 示例值：111111
func (builder *UpdateEmployeeBuilder) SocialSecurityNumber(socialSecurityNumber string) *UpdateEmployeeBuilder {
	builder.socialSecurityNumber = socialSecurityNumber
	builder.socialSecurityNumberFlag = true
	return builder
}

// 公积金账号
//
// 示例值：111111
func (builder *UpdateEmployeeBuilder) ProvidentFundNumber(providentFundNumber string) *UpdateEmployeeBuilder {
	builder.providentFundNumber = providentFundNumber
	builder.providentFundNumberFlag = true
	return builder
}

// 暂停 true， false 恢复暂停
//
// 示例值：
func (builder *UpdateEmployeeBuilder) IsFrozen(isFrozen bool) *UpdateEmployeeBuilder {
	builder.isFrozen = isFrozen
	builder.isFrozenFlag = true
	return builder
}

// 冻结原因
//
// 示例值：
func (builder *UpdateEmployeeBuilder) FrozenReason(frozenReason string) *UpdateEmployeeBuilder {
	builder.frozenReason = frozenReason
	builder.frozenReasonFlag = true
	return builder
}

// 自定义字段
//
// 示例值：
func (builder *UpdateEmployeeBuilder) CustomFieldValueMap(customFieldValueMap map[string]*CustomFieldValue) *UpdateEmployeeBuilder {
	builder.customFieldValueMap = customFieldValueMap
	builder.customFieldValueMapFlag = true
	return builder
}

// 自定义字段
//
// 示例值：
func (builder *UpdateEmployeeBuilder) CustomFieldValues(customFieldValues []*CustomFieldValue) *UpdateEmployeeBuilder {
	builder.customFieldValues = customFieldValues
	builder.customFieldValuesFlag = true
	return builder
}

// 虚拟组织信息
//
// 示例值：
func (builder *UpdateEmployeeBuilder) VirtualOrgInfos(virtualOrgInfos []*UpsertUserVirtualOrgInfo) *UpdateEmployeeBuilder {
	builder.virtualOrgInfos = virtualOrgInfos
	builder.virtualOrgInfosFlag = true
	return builder
}

func (builder *UpdateEmployeeBuilder) Build() *UpdateEmployee {
	req := &UpdateEmployee{}
	if builder.employeeIdFlag {
		req.EmployeeId = &builder.employeeId

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.mobileFlag {
		req.Mobile = &builder.mobile

	}
	if builder.customEmployeeIdFlag {
		req.CustomEmployeeId = &builder.customEmployeeId

	}
	if builder.avatarKeyFlag {
		req.AvatarKey = &builder.avatarKey

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

	}
	if builder.personalEmailFlag {
		req.PersonalEmail = &builder.personalEmail

	}
	if builder.enterpriseEmailFlag {
		req.EnterpriseEmail = &builder.enterpriseEmail

	}
	if builder.genderFlag {
		req.Gender = &builder.gender

	}
	if builder.residentialAddressFlag {
		req.ResidentialAddress = &builder.residentialAddress

	}
	if builder.contactAddressesFlag {
		req.ContactAddresses = builder.contactAddresses
	}
	if builder.employeeOrderInDepartmentsFlag {
		req.EmployeeOrderInDepartments = builder.employeeOrderInDepartments
	}
	if builder.backgroundImageKeyFlag {
		req.BackgroundImageKey = &builder.backgroundImageKey

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

	}
	if builder.leaderIdFlag {
		req.LeaderId = &builder.leaderId

	}
	if builder.dottedLineLeaderIdsFlag {
		req.DottedLineLeaderIds = builder.dottedLineLeaderIds
	}
	if builder.workCountryOrRegionFlag {
		req.WorkCountryOrRegion = &builder.workCountryOrRegion

	}
	if builder.workPlaceIdFlag {
		req.WorkPlaceId = &builder.workPlaceId

	}
	if builder.workStationFlag {
		req.WorkStation = builder.workStation
	}
	if builder.jobNumberFlag {
		req.JobNumber = &builder.jobNumber

	}
	if builder.extensionNumberFlag {
		req.ExtensionNumber = &builder.extensionNumber

	}
	if builder.joinDateFlag {
		req.JoinDate = &builder.joinDate

	}
	if builder.employmentTypeFlag {
		req.EmploymentType = &builder.employmentType

	}
	if builder.staffStatusFlag {
		req.StaffStatus = &builder.staffStatus

	}
	if builder.positionsFlag {
		req.Positions = builder.positions
	}
	if builder.jobTitleIdFlag {
		req.JobTitleId = &builder.jobTitleId

	}
	if builder.jobLevelIdFlag {
		req.JobLevelId = &builder.jobLevelId

	}
	if builder.jobFamilyIdFlag {
		req.JobFamilyId = &builder.jobFamilyId

	}
	if builder.firstWorkDateFlag {
		req.FirstWorkDate = &builder.firstWorkDate

	}
	if builder.firstJoinDateFlag {
		req.FirstJoinDate = &builder.firstJoinDate

	}
	if builder.probationPeriodFlag {
		req.ProbationPeriod = &builder.probationPeriod

	}
	if builder.regularizationDateFlag {
		req.RegularizationDate = &builder.regularizationDate

	}
	if builder.convertStatusFlag {
		req.ConvertStatus = &builder.convertStatus

	}
	if builder.contractSubjectFlag {
		req.ContractSubject = &builder.contractSubject

	}
	if builder.resignDateFlag {
		req.ResignDate = &builder.resignDate

	}
	if builder.resignReasonFlag {
		req.ResignReason = &builder.resignReason

	}
	if builder.resignRemarkFlag {
		req.ResignRemark = &builder.resignRemark

	}
	if builder.resignTypeFlag {
		req.ResignType = &builder.resignType

	}
	if builder.cancelledEntryTypeFlag {
		req.CancelledEntryType = &builder.cancelledEntryType

	}
	if builder.cancelledEntryRemarkFlag {
		req.CancelledEntryRemark = &builder.cancelledEntryRemark

	}
	if builder.birthdayFlag {
		req.Birthday = &builder.birthday

	}
	if builder.nationalityFlag {
		req.Nationality = &builder.nationality

	}
	if builder.nativePlaceFlag {
		req.NativePlace = &builder.nativePlace

	}
	if builder.ethnicityFlag {
		req.Ethnicity = &builder.ethnicity

	}
	if builder.maritalStatusFlag {
		req.MaritalStatus = &builder.maritalStatus

	}
	if builder.politicsStatusFlag {
		req.PoliticsStatus = &builder.politicsStatus

	}
	if builder.registeredResidenceTypeFlag {
		req.RegisteredResidenceType = &builder.registeredResidenceType

	}
	if builder.locationFlag {
		req.Location = &builder.location

	}
	if builder.socialSecurityNumberFlag {
		req.SocialSecurityNumber = &builder.socialSecurityNumber

	}
	if builder.providentFundNumberFlag {
		req.ProvidentFundNumber = &builder.providentFundNumber

	}
	if builder.isFrozenFlag {
		req.IsFrozen = &builder.isFrozen

	}
	if builder.frozenReasonFlag {
		req.FrozenReason = &builder.frozenReason

	}
	if builder.customFieldValueMapFlag {
		req.CustomFieldValueMap = builder.customFieldValueMap
	}
	if builder.customFieldValuesFlag {
		req.CustomFieldValues = builder.customFieldValues
	}
	if builder.virtualOrgInfosFlag {
		req.VirtualOrgInfos = builder.virtualOrgInfos
	}
	return req
}

type UpdateEmployeeBankAccountOption struct {
	DataSource *int `json:"data_source,omitempty"` // 数据来源
}

type UpdateEmployeeBankAccountOptionBuilder struct {
	dataSource     int // 数据来源
	dataSourceFlag bool
}

func NewUpdateEmployeeBankAccountOptionBuilder() *UpdateEmployeeBankAccountOptionBuilder {
	builder := &UpdateEmployeeBankAccountOptionBuilder{}
	return builder
}

// 数据来源
//
// 示例值：
func (builder *UpdateEmployeeBankAccountOptionBuilder) DataSource(dataSource int) *UpdateEmployeeBankAccountOptionBuilder {
	builder.dataSource = dataSource
	builder.dataSourceFlag = true
	return builder
}

func (builder *UpdateEmployeeBankAccountOptionBuilder) Build() *UpdateEmployeeBankAccountOption {
	req := &UpdateEmployeeBankAccountOption{}
	if builder.dataSourceFlag {
		req.DataSource = &builder.dataSource

	}
	return req
}

type UpdateEmployeeOptions struct {
	EnterpriseEmailPassword *string `json:"enterprise_email_password,omitempty"` // 用户企业邮箱登录时的密码

	ResignedUserResouceReceiver *ResignedUserResouceReceiver `json:"resigned_user_resouce_receiver,omitempty"` // 资源转移方式

	DataSource *int `json:"data_source,omitempty"` // 数据来源

	ResurrectEmployeeOptions *ResurrectEmployeeOptions `json:"resurrect_employee_options,omitempty"` // 恢复用户选项

	Scenario *Scenario `json:"scenario,omitempty"` // scenario 用于离职恢复记录来源、判断限流策略等

	MigrateGeoOptions *MigrateGeoOptions `json:"migrate_geo_options,omitempty"` // 迁移geo相关参数

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

type UpdateEmployeeOptionsBuilder struct {
	enterpriseEmailPassword     string // 用户企业邮箱登录时的密码
	enterpriseEmailPasswordFlag bool

	resignedUserResouceReceiver     *ResignedUserResouceReceiver // 资源转移方式
	resignedUserResouceReceiverFlag bool

	dataSource     int // 数据来源
	dataSourceFlag bool

	resurrectEmployeeOptions     *ResurrectEmployeeOptions // 恢复用户选项
	resurrectEmployeeOptionsFlag bool

	scenario     *Scenario // scenario 用于离职恢复记录来源、判断限流策略等
	scenarioFlag bool

	migrateGeoOptions     *MigrateGeoOptions // 迁移geo相关参数
	migrateGeoOptionsFlag bool

	operator     *Operator // 操作人
	operatorFlag bool
}

func NewUpdateEmployeeOptionsBuilder() *UpdateEmployeeOptionsBuilder {
	builder := &UpdateEmployeeOptionsBuilder{}
	return builder
}

// 用户企业邮箱登录时的密码
//
// 示例值：1
func (builder *UpdateEmployeeOptionsBuilder) EnterpriseEmailPassword(enterpriseEmailPassword string) *UpdateEmployeeOptionsBuilder {
	builder.enterpriseEmailPassword = enterpriseEmailPassword
	builder.enterpriseEmailPasswordFlag = true
	return builder
}

// 资源转移方式
//
// 示例值：
func (builder *UpdateEmployeeOptionsBuilder) ResignedUserResouceReceiver(resignedUserResouceReceiver *ResignedUserResouceReceiver) *UpdateEmployeeOptionsBuilder {
	builder.resignedUserResouceReceiver = resignedUserResouceReceiver
	builder.resignedUserResouceReceiverFlag = true
	return builder
}

// 数据来源
//
// 示例值：
func (builder *UpdateEmployeeOptionsBuilder) DataSource(dataSource int) *UpdateEmployeeOptionsBuilder {
	builder.dataSource = dataSource
	builder.dataSourceFlag = true
	return builder
}

// 恢复用户选项
//
// 示例值：
func (builder *UpdateEmployeeOptionsBuilder) ResurrectEmployeeOptions(resurrectEmployeeOptions *ResurrectEmployeeOptions) *UpdateEmployeeOptionsBuilder {
	builder.resurrectEmployeeOptions = resurrectEmployeeOptions
	builder.resurrectEmployeeOptionsFlag = true
	return builder
}

// scenario 用于离职恢复记录来源、判断限流策略等
//
// 示例值：
func (builder *UpdateEmployeeOptionsBuilder) Scenario(scenario *Scenario) *UpdateEmployeeOptionsBuilder {
	builder.scenario = scenario
	builder.scenarioFlag = true
	return builder
}

// 迁移geo相关参数
//
// 示例值：
func (builder *UpdateEmployeeOptionsBuilder) MigrateGeoOptions(migrateGeoOptions *MigrateGeoOptions) *UpdateEmployeeOptionsBuilder {
	builder.migrateGeoOptions = migrateGeoOptions
	builder.migrateGeoOptionsFlag = true
	return builder
}

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

func (builder *UpdateEmployeeOptionsBuilder) Build() *UpdateEmployeeOptions {
	req := &UpdateEmployeeOptions{}
	if builder.enterpriseEmailPasswordFlag {
		req.EnterpriseEmailPassword = &builder.enterpriseEmailPassword

	}
	if builder.resignedUserResouceReceiverFlag {
		req.ResignedUserResouceReceiver = builder.resignedUserResouceReceiver
	}
	if builder.dataSourceFlag {
		req.DataSource = &builder.dataSource

	}
	if builder.resurrectEmployeeOptionsFlag {
		req.ResurrectEmployeeOptions = builder.resurrectEmployeeOptions
	}
	if builder.scenarioFlag {
		req.Scenario = builder.scenario
	}
	if builder.migrateGeoOptionsFlag {
		req.MigrateGeoOptions = builder.migrateGeoOptions
	}
	if builder.operatorFlag {
		req.Operator = builder.operator
	}
	return req
}

type UpdateEmployeeTypeEnum struct {
	EnumId *string `json:"enum_id,omitempty"` // 枚举ID

	Content *I18nText `json:"content,omitempty"` // i18n文本

	EnumStatus *string `json:"enum_status,omitempty"` // 枚举状态
}

type UpdateEmployeeTypeEnumBuilder struct {
	enumId     string // 枚举ID
	enumIdFlag bool

	content     *I18nText // i18n文本
	contentFlag bool

	enumStatus     string // 枚举状态
	enumStatusFlag bool
}

func NewUpdateEmployeeTypeEnumBuilder() *UpdateEmployeeTypeEnumBuilder {
	builder := &UpdateEmployeeTypeEnumBuilder{}
	return builder
}

// 枚举ID
//
// 示例值：enum
func (builder *UpdateEmployeeTypeEnumBuilder) EnumId(enumId string) *UpdateEmployeeTypeEnumBuilder {
	builder.enumId = enumId
	builder.enumIdFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *UpdateEmployeeTypeEnumBuilder) Content(content *I18nText) *UpdateEmployeeTypeEnumBuilder {
	builder.content = content
	builder.contentFlag = true
	return builder
}

// 枚举状态
//
// 示例值：
func (builder *UpdateEmployeeTypeEnumBuilder) EnumStatus(enumStatus string) *UpdateEmployeeTypeEnumBuilder {
	builder.enumStatus = enumStatus
	builder.enumStatusFlag = true
	return builder
}

func (builder *UpdateEmployeeTypeEnumBuilder) Build() *UpdateEmployeeTypeEnum {
	req := &UpdateEmployeeTypeEnum{}
	if builder.enumIdFlag {
		req.EnumId = &builder.enumId

	}
	if builder.contentFlag {
		req.Content = builder.content
	}
	if builder.enumStatusFlag {
		req.EnumStatus = &builder.enumStatus

	}
	return req
}

type UpdateEmployeeTypeEnumOptions struct {
	DataSource *int `json:"data_source,omitempty"` // 数据来源
}

type UpdateEmployeeTypeEnumOptionsBuilder struct {
	dataSource     int // 数据来源
	dataSourceFlag bool
}

func NewUpdateEmployeeTypeEnumOptionsBuilder() *UpdateEmployeeTypeEnumOptionsBuilder {
	builder := &UpdateEmployeeTypeEnumOptionsBuilder{}
	return builder
}

// 数据来源
//
// 示例值：
func (builder *UpdateEmployeeTypeEnumOptionsBuilder) DataSource(dataSource int) *UpdateEmployeeTypeEnumOptionsBuilder {
	builder.dataSource = dataSource
	builder.dataSourceFlag = true
	return builder
}

func (builder *UpdateEmployeeTypeEnumOptionsBuilder) Build() *UpdateEmployeeTypeEnumOptions {
	req := &UpdateEmployeeTypeEnumOptions{}
	if builder.dataSourceFlag {
		req.DataSource = &builder.dataSource

	}
	return req
}

type UpdateGroupSet struct {
	GroupSetId *string `json:"group_set_id,omitempty"` // 用户组分组 ID

	Name *I18nText `json:"name,omitempty"` // i18n文本
}

type UpdateGroupSetBuilder struct {
	groupSetId     string // 用户组分组 ID
	groupSetIdFlag bool

	name     *I18nText // i18n文本
	nameFlag bool
}

func NewUpdateGroupSetBuilder() *UpdateGroupSetBuilder {
	builder := &UpdateGroupSetBuilder{}
	return builder
}

// 用户组分组 ID
//
// 示例值：123456
func (builder *UpdateGroupSetBuilder) GroupSetId(groupSetId string) *UpdateGroupSetBuilder {
	builder.groupSetId = groupSetId
	builder.groupSetIdFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *UpdateGroupSetBuilder) Name(name *I18nText) *UpdateGroupSetBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

func (builder *UpdateGroupSetBuilder) Build() *UpdateGroupSet {
	req := &UpdateGroupSet{}
	if builder.groupSetIdFlag {
		req.GroupSetId = &builder.groupSetId

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

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

	Name *UpsertGuestName `json:"name,omitempty"` // 姓名

	Mobile *string `json:"mobile,omitempty"` // 手机

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

	AvatarKey *string `json:"avatar_key,omitempty"` // 头像

	WorkCountryOrRegion *string `json:"work_country_or_region,omitempty"` // 国家地区

	ActiveGuestStatus *string `json:"active_guest_status,omitempty"` // 状态
}

type UpdateGuestBuilder struct {
	id     string // ID
	idFlag bool

	name     *UpsertGuestName // 姓名
	nameFlag bool

	mobile     string // 手机
	mobileFlag bool

	email     string // 邮箱
	emailFlag bool

	avatarKey     string // 头像
	avatarKeyFlag bool

	workCountryOrRegion     string // 国家地区
	workCountryOrRegionFlag bool

	activeGuestStatus     string // 状态
	activeGuestStatusFlag bool
}

func NewUpdateGuestBuilder() *UpdateGuestBuilder {
	builder := &UpdateGuestBuilder{}
	return builder
}

// ID
//
// 示例值：6872549699048439828
func (builder *UpdateGuestBuilder) Id(id string) *UpdateGuestBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 姓名
//
// 示例值：
func (builder *UpdateGuestBuilder) Name(name *UpsertGuestName) *UpdateGuestBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 手机
//
// 示例值：+8612345678901
func (builder *UpdateGuestBuilder) Mobile(mobile string) *UpdateGuestBuilder {
	builder.mobile = mobile
	builder.mobileFlag = true
	return builder
}

// 邮箱
//
// 示例值：abc@abc.com
func (builder *UpdateGuestBuilder) Email(email string) *UpdateGuestBuilder {
	builder.email = email
	builder.emailFlag = true
	return builder
}

// 头像
//
// 示例值：asdfasdfasdf2easdfasdf
func (builder *UpdateGuestBuilder) AvatarKey(avatarKey string) *UpdateGuestBuilder {
	builder.avatarKey = avatarKey
	builder.avatarKeyFlag = true
	return builder
}

// 国家地区
//
// 示例值：MDCT00000256
func (builder *UpdateGuestBuilder) WorkCountryOrRegion(workCountryOrRegion string) *UpdateGuestBuilder {
	builder.workCountryOrRegion = workCountryOrRegion
	builder.workCountryOrRegionFlag = true
	return builder
}

// 状态
//
// 示例值：
func (builder *UpdateGuestBuilder) ActiveGuestStatus(activeGuestStatus string) *UpdateGuestBuilder {
	builder.activeGuestStatus = activeGuestStatus
	builder.activeGuestStatusFlag = true
	return builder
}

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

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.mobileFlag {
		req.Mobile = &builder.mobile

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

	}
	if builder.avatarKeyFlag {
		req.AvatarKey = &builder.avatarKey

	}
	if builder.workCountryOrRegionFlag {
		req.WorkCountryOrRegion = &builder.workCountryOrRegion

	}
	if builder.activeGuestStatusFlag {
		req.ActiveGuestStatus = &builder.activeGuestStatus

	}
	return req
}

type UpdateJobFamily struct {
	JobFamilyId *string `json:"job_family_id,omitempty"` // 序列ID

	JobFamilyName *I18nText `json:"job_family_name,omitempty"` // i18n文本

	IsEnabled *bool `json:"is_enabled,omitempty"` // 是否启用

	ParentId *string `json:"parent_id,omitempty"` // 上级序列

	Description *I18nText `json:"description,omitempty"` // i18n文本

	ExternalId *string `json:"external_id,omitempty"` // 外部ID 不可更新成空
}

type UpdateJobFamilyBuilder struct {
	jobFamilyId     string // 序列ID
	jobFamilyIdFlag bool

	jobFamilyName     *I18nText // i18n文本
	jobFamilyNameFlag bool

	isEnabled     bool // 是否启用
	isEnabledFlag bool

	parentId     string // 上级序列
	parentIdFlag bool

	description     *I18nText // i18n文本
	descriptionFlag bool

	externalId     string // 外部ID 不可更新成空
	externalIdFlag bool
}

func NewUpdateJobFamilyBuilder() *UpdateJobFamilyBuilder {
	builder := &UpdateJobFamilyBuilder{}
	return builder
}

// 序列ID
//
// 示例值：6872549699048439828
func (builder *UpdateJobFamilyBuilder) JobFamilyId(jobFamilyId string) *UpdateJobFamilyBuilder {
	builder.jobFamilyId = jobFamilyId
	builder.jobFamilyIdFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *UpdateJobFamilyBuilder) JobFamilyName(jobFamilyName *I18nText) *UpdateJobFamilyBuilder {
	builder.jobFamilyName = jobFamilyName
	builder.jobFamilyNameFlag = true
	return builder
}

// 是否启用
//
// 示例值：
func (builder *UpdateJobFamilyBuilder) IsEnabled(isEnabled bool) *UpdateJobFamilyBuilder {
	builder.isEnabled = isEnabled
	builder.isEnabledFlag = true
	return builder
}

// 上级序列
//
// 示例值：6872549699048439828
func (builder *UpdateJobFamilyBuilder) ParentId(parentId string) *UpdateJobFamilyBuilder {
	builder.parentId = parentId
	builder.parentIdFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *UpdateJobFamilyBuilder) Description(description *I18nText) *UpdateJobFamilyBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 外部ID 不可更新成空
//
// 示例值：custom_id
func (builder *UpdateJobFamilyBuilder) ExternalId(externalId string) *UpdateJobFamilyBuilder {
	builder.externalId = externalId
	builder.externalIdFlag = true
	return builder
}

func (builder *UpdateJobFamilyBuilder) Build() *UpdateJobFamily {
	req := &UpdateJobFamily{}
	if builder.jobFamilyIdFlag {
		req.JobFamilyId = &builder.jobFamilyId

	}
	if builder.jobFamilyNameFlag {
		req.JobFamilyName = builder.jobFamilyName
	}
	if builder.isEnabledFlag {
		req.IsEnabled = &builder.isEnabled

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

	}
	if builder.descriptionFlag {
		req.Description = builder.description
	}
	if builder.externalIdFlag {
		req.ExternalId = &builder.externalId

	}
	return req
}

type UpdateJobFamilyOptions struct {
	DataSource *int `json:"data_source,omitempty"` // 数据来源
}

type UpdateJobFamilyOptionsBuilder struct {
	dataSource     int // 数据来源
	dataSourceFlag bool
}

func NewUpdateJobFamilyOptionsBuilder() *UpdateJobFamilyOptionsBuilder {
	builder := &UpdateJobFamilyOptionsBuilder{}
	return builder
}

// 数据来源
//
// 示例值：
func (builder *UpdateJobFamilyOptionsBuilder) DataSource(dataSource int) *UpdateJobFamilyOptionsBuilder {
	builder.dataSource = dataSource
	builder.dataSourceFlag = true
	return builder
}

func (builder *UpdateJobFamilyOptionsBuilder) Build() *UpdateJobFamilyOptions {
	req := &UpdateJobFamilyOptions{}
	if builder.dataSourceFlag {
		req.DataSource = &builder.dataSource

	}
	return req
}

type UpdateJobLevel struct {
	Id *string `json:"id,omitempty"` // 名称

	Name *I18nText `json:"name,omitempty"` // i18n文本

	IsEnabled *bool `json:"is_enabled,omitempty"` // 是否启用

	Order *string `json:"order,omitempty"` // 排序, 小的在前面

	Description *I18nText `json:"description,omitempty"` // i18n文本

	ExternalId *string `json:"external_id,omitempty"` // 外部ID 不可更新成空
}

type UpdateJobLevelBuilder struct {
	id     string // 名称
	idFlag bool

	name     *I18nText // i18n文本
	nameFlag bool

	isEnabled     bool // 是否启用
	isEnabledFlag bool

	order     string // 排序, 小的在前面
	orderFlag bool

	description     *I18nText // i18n文本
	descriptionFlag bool

	externalId     string // 外部ID 不可更新成空
	externalIdFlag bool
}

func NewUpdateJobLevelBuilder() *UpdateJobLevelBuilder {
	builder := &UpdateJobLevelBuilder{}
	return builder
}

// 名称
//
// 示例值：6872549699048439828
func (builder *UpdateJobLevelBuilder) Id(id string) *UpdateJobLevelBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *UpdateJobLevelBuilder) Name(name *I18nText) *UpdateJobLevelBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 是否启用
//
// 示例值：
func (builder *UpdateJobLevelBuilder) IsEnabled(isEnabled bool) *UpdateJobLevelBuilder {
	builder.isEnabled = isEnabled
	builder.isEnabledFlag = true
	return builder
}

// 排序, 小的在前面
//
// 示例值：100
func (builder *UpdateJobLevelBuilder) Order(order string) *UpdateJobLevelBuilder {
	builder.order = order
	builder.orderFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *UpdateJobLevelBuilder) Description(description *I18nText) *UpdateJobLevelBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 外部ID 不可更新成空
//
// 示例值：custom_id
func (builder *UpdateJobLevelBuilder) ExternalId(externalId string) *UpdateJobLevelBuilder {
	builder.externalId = externalId
	builder.externalIdFlag = true
	return builder
}

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

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.isEnabledFlag {
		req.IsEnabled = &builder.isEnabled

	}
	if builder.orderFlag {
		req.Order = &builder.order

	}
	if builder.descriptionFlag {
		req.Description = builder.description
	}
	if builder.externalIdFlag {
		req.ExternalId = &builder.externalId

	}
	return req
}

type UpdateJobLevelOptions struct {
	DataSource *int `json:"data_source,omitempty"` // 数据来源
}

type UpdateJobLevelOptionsBuilder struct {
	dataSource     int // 数据来源
	dataSourceFlag bool
}

func NewUpdateJobLevelOptionsBuilder() *UpdateJobLevelOptionsBuilder {
	builder := &UpdateJobLevelOptionsBuilder{}
	return builder
}

// 数据来源
//
// 示例值：
func (builder *UpdateJobLevelOptionsBuilder) DataSource(dataSource int) *UpdateJobLevelOptionsBuilder {
	builder.dataSource = dataSource
	builder.dataSourceFlag = true
	return builder
}

func (builder *UpdateJobLevelOptionsBuilder) Build() *UpdateJobLevelOptions {
	req := &UpdateJobLevelOptions{}
	if builder.dataSourceFlag {
		req.DataSource = &builder.dataSource

	}
	return req
}

type UpdateJobTitle struct {
	JobTitleId *string `json:"job_title_id,omitempty"` // ID

	JobTitleName *I18nText `json:"job_title_name,omitempty"` // i18n文本

	IsEnabled *bool `json:"is_enabled,omitempty"` // 是否启用

	Title *I18nText `json:"title,omitempty"` // i18n文本

	Description *I18nText `json:"description,omitempty"` // i18n文本

	JobFamilyIds []string `json:"job_family_ids,omitempty"` // 序列

	JobLevelIds []string `json:"job_level_ids,omitempty"` // 职级

	ExternalId *string `json:"external_id,omitempty"` // 外部ID 不可更新成空
}

type UpdateJobTitleBuilder struct {
	jobTitleId     string // ID
	jobTitleIdFlag bool

	jobTitleName     *I18nText // i18n文本
	jobTitleNameFlag bool

	isEnabled     bool // 是否启用
	isEnabledFlag bool

	title     *I18nText // i18n文本
	titleFlag bool

	description     *I18nText // i18n文本
	descriptionFlag bool

	jobFamilyIds     []string // 序列
	jobFamilyIdsFlag bool

	jobLevelIds     []string // 职级
	jobLevelIdsFlag bool

	externalId     string // 外部ID 不可更新成空
	externalIdFlag bool
}

func NewUpdateJobTitleBuilder() *UpdateJobTitleBuilder {
	builder := &UpdateJobTitleBuilder{}
	return builder
}

// ID
//
// 示例值：6872549699048439828
func (builder *UpdateJobTitleBuilder) JobTitleId(jobTitleId string) *UpdateJobTitleBuilder {
	builder.jobTitleId = jobTitleId
	builder.jobTitleIdFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *UpdateJobTitleBuilder) JobTitleName(jobTitleName *I18nText) *UpdateJobTitleBuilder {
	builder.jobTitleName = jobTitleName
	builder.jobTitleNameFlag = true
	return builder
}

// 是否启用
//
// 示例值：
func (builder *UpdateJobTitleBuilder) IsEnabled(isEnabled bool) *UpdateJobTitleBuilder {
	builder.isEnabled = isEnabled
	builder.isEnabledFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *UpdateJobTitleBuilder) Title(title *I18nText) *UpdateJobTitleBuilder {
	builder.title = title
	builder.titleFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *UpdateJobTitleBuilder) Description(description *I18nText) *UpdateJobTitleBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 序列
//
// 示例值：
func (builder *UpdateJobTitleBuilder) JobFamilyIds(jobFamilyIds []string) *UpdateJobTitleBuilder {
	builder.jobFamilyIds = jobFamilyIds
	builder.jobFamilyIdsFlag = true
	return builder
}

// 职级
//
// 示例值：
func (builder *UpdateJobTitleBuilder) JobLevelIds(jobLevelIds []string) *UpdateJobTitleBuilder {
	builder.jobLevelIds = jobLevelIds
	builder.jobLevelIdsFlag = true
	return builder
}

// 外部ID 不可更新成空
//
// 示例值：custom_id
func (builder *UpdateJobTitleBuilder) ExternalId(externalId string) *UpdateJobTitleBuilder {
	builder.externalId = externalId
	builder.externalIdFlag = true
	return builder
}

func (builder *UpdateJobTitleBuilder) Build() *UpdateJobTitle {
	req := &UpdateJobTitle{}
	if builder.jobTitleIdFlag {
		req.JobTitleId = &builder.jobTitleId

	}
	if builder.jobTitleNameFlag {
		req.JobTitleName = builder.jobTitleName
	}
	if builder.isEnabledFlag {
		req.IsEnabled = &builder.isEnabled

	}
	if builder.titleFlag {
		req.Title = builder.title
	}
	if builder.descriptionFlag {
		req.Description = builder.description
	}
	if builder.jobFamilyIdsFlag {
		req.JobFamilyIds = builder.jobFamilyIds
	}
	if builder.jobLevelIdsFlag {
		req.JobLevelIds = builder.jobLevelIds
	}
	if builder.externalIdFlag {
		req.ExternalId = &builder.externalId

	}
	return req
}

type UpdateJobTitleOptions struct {
	DataSource *int `json:"data_source,omitempty"` // 数据来源
}

type UpdateJobTitleOptionsBuilder struct {
	dataSource     int // 数据来源
	dataSourceFlag bool
}

func NewUpdateJobTitleOptionsBuilder() *UpdateJobTitleOptionsBuilder {
	builder := &UpdateJobTitleOptionsBuilder{}
	return builder
}

// 数据来源
//
// 示例值：
func (builder *UpdateJobTitleOptionsBuilder) DataSource(dataSource int) *UpdateJobTitleOptionsBuilder {
	builder.dataSource = dataSource
	builder.dataSourceFlag = true
	return builder
}

func (builder *UpdateJobTitleOptionsBuilder) Build() *UpdateJobTitleOptions {
	req := &UpdateJobTitleOptions{}
	if builder.dataSourceFlag {
		req.DataSource = &builder.dataSource

	}
	return req
}

type UpdateOrgdimension struct {
	Id *string `json:"id,omitempty"` // 虚拟组织id

	Name *I18nText `json:"name,omitempty"` // i18n文本

	IsEnable *bool `json:"is_enable,omitempty"` // 是否启用

	Order *string `json:"order,omitempty"` // 组织维度排序权重

	Description *I18nText `json:"description,omitempty"` // i18n文本
}

type UpdateOrgdimensionBuilder struct {
	id     string // 虚拟组织id
	idFlag bool

	name     *I18nText // i18n文本
	nameFlag bool

	isEnable     bool // 是否启用
	isEnableFlag bool

	order     string // 组织维度排序权重
	orderFlag bool

	description     *I18nText // i18n文本
	descriptionFlag bool
}

func NewUpdateOrgdimensionBuilder() *UpdateOrgdimensionBuilder {
	builder := &UpdateOrgdimensionBuilder{}
	return builder
}

// 虚拟组织id
//
// 示例值：3e3cf96b
func (builder *UpdateOrgdimensionBuilder) Id(id string) *UpdateOrgdimensionBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *UpdateOrgdimensionBuilder) Name(name *I18nText) *UpdateOrgdimensionBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 是否启用
//
// 示例值：
func (builder *UpdateOrgdimensionBuilder) IsEnable(isEnable bool) *UpdateOrgdimensionBuilder {
	builder.isEnable = isEnable
	builder.isEnableFlag = true
	return builder
}

// 组织维度排序权重
//
// 示例值：100
func (builder *UpdateOrgdimensionBuilder) Order(order string) *UpdateOrgdimensionBuilder {
	builder.order = order
	builder.orderFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *UpdateOrgdimensionBuilder) Description(description *I18nText) *UpdateOrgdimensionBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

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

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.isEnableFlag {
		req.IsEnable = &builder.isEnable

	}
	if builder.orderFlag {
		req.Order = &builder.order

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

type UpdatePlace struct {
	PlaceId *string `json:"place_id,omitempty"` // ID

	PlaceName *I18nText `json:"place_name,omitempty"` // i18n文本

	IsEnabled *bool `json:"is_enabled,omitempty"` // 是否启用

	Description *I18nText `json:"description,omitempty"` // i18n文本

	Usages []string `json:"usages,omitempty"` // 地点用途

	ParentId *string `json:"parent_id,omitempty"` // 上级ID

	ExternalId *string `json:"external_id,omitempty"` // 外部ID
}

type UpdatePlaceBuilder struct {
	placeId     string // ID
	placeIdFlag bool

	placeName     *I18nText // i18n文本
	placeNameFlag bool

	isEnabled     bool // 是否启用
	isEnabledFlag bool

	description     *I18nText // i18n文本
	descriptionFlag bool

	usages     []string // 地点用途
	usagesFlag bool

	parentId     string // 上级ID
	parentIdFlag bool

	externalId     string // 外部ID
	externalIdFlag bool
}

func NewUpdatePlaceBuilder() *UpdatePlaceBuilder {
	builder := &UpdatePlaceBuilder{}
	return builder
}

// ID
//
// 示例值：6872549699048439828
func (builder *UpdatePlaceBuilder) PlaceId(placeId string) *UpdatePlaceBuilder {
	builder.placeId = placeId
	builder.placeIdFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *UpdatePlaceBuilder) PlaceName(placeName *I18nText) *UpdatePlaceBuilder {
	builder.placeName = placeName
	builder.placeNameFlag = true
	return builder
}

// 是否启用
//
// 示例值：
func (builder *UpdatePlaceBuilder) IsEnabled(isEnabled bool) *UpdatePlaceBuilder {
	builder.isEnabled = isEnabled
	builder.isEnabledFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *UpdatePlaceBuilder) Description(description *I18nText) *UpdatePlaceBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 地点用途
//
// 示例值：
func (builder *UpdatePlaceBuilder) Usages(usages []string) *UpdatePlaceBuilder {
	builder.usages = usages
	builder.usagesFlag = true
	return builder
}

// 上级ID
//
// 示例值：6872549699048439828
func (builder *UpdatePlaceBuilder) ParentId(parentId string) *UpdatePlaceBuilder {
	builder.parentId = parentId
	builder.parentIdFlag = true
	return builder
}

// 外部ID
//
// 示例值：custom_id
func (builder *UpdatePlaceBuilder) ExternalId(externalId string) *UpdatePlaceBuilder {
	builder.externalId = externalId
	builder.externalIdFlag = true
	return builder
}

func (builder *UpdatePlaceBuilder) Build() *UpdatePlace {
	req := &UpdatePlace{}
	if builder.placeIdFlag {
		req.PlaceId = &builder.placeId

	}
	if builder.placeNameFlag {
		req.PlaceName = builder.placeName
	}
	if builder.isEnabledFlag {
		req.IsEnabled = &builder.isEnabled

	}
	if builder.descriptionFlag {
		req.Description = builder.description
	}
	if builder.usagesFlag {
		req.Usages = builder.usages
	}
	if builder.parentIdFlag {
		req.ParentId = &builder.parentId

	}
	if builder.externalIdFlag {
		req.ExternalId = &builder.externalId

	}
	return req
}

type UpdatePlaceOptions struct {
	DataSource *int `json:"data_source,omitempty"` // 数据来源
}

type UpdatePlaceOptionsBuilder struct {
	dataSource     int // 数据来源
	dataSourceFlag bool
}

func NewUpdatePlaceOptionsBuilder() *UpdatePlaceOptionsBuilder {
	builder := &UpdatePlaceOptionsBuilder{}
	return builder
}

// 数据来源
//
// 示例值：
func (builder *UpdatePlaceOptionsBuilder) DataSource(dataSource int) *UpdatePlaceOptionsBuilder {
	builder.dataSource = dataSource
	builder.dataSourceFlag = true
	return builder
}

func (builder *UpdatePlaceOptionsBuilder) Build() *UpdatePlaceOptions {
	req := &UpdatePlaceOptions{}
	if builder.dataSourceFlag {
		req.DataSource = &builder.dataSource

	}
	return req
}

type UpdateTenant struct {
	Id *string `json:"id,omitempty"` // 租户ID

	Name *I18nText `json:"name,omitempty"` // i18n文本

	ContactUserInfo *UserInfo `json:"contact_user_info,omitempty"` // 联系人信息

	SubDomain *string `json:"sub_domain,omitempty"` // 租户子域名

	CanDomainBeModified *bool `json:"can_domain_be_modified,omitempty"` // 域名是否可以被修改

	Address *string `json:"address,omitempty"` // 联系地址

	PostCode *string `json:"post_code,omitempty"` // 邮编

	Telephone *string `json:"telephone,omitempty"` // 座机

	AvatarKey *string `json:"avatar_key,omitempty"` // 企业头像Key

	CountryCode *string `json:"country_code,omitempty"` // 国家代码

	Type *string `json:"type,omitempty"` // 租户类型

	Purpose *string `json:"purpose,omitempty"` // 租户用途

	Tag *string `json:"tag,omitempty"` // 个人租户/企业租户

	Industry *string `json:"industry,omitempty"` // 行业类型 兼容历史枚举和主数据编码 https://bytedance.larkoffice.com/wiki/Ntd1wlmT2i0xrokY2DNcWDw0nHc#share-WOWldq8Uvow6g3xmIjlck9eYnof

	Scale *string `json:"scale,omitempty"` // 企业规模 兼容历史枚举和主数据编码 https://bytedance.larkoffice.com/wiki/Ntd1wlmT2i0xrokY2DNcWDw0nHc#share-WOWldq8Uvow6g3xmIjlck9eYnof

	Description *I18nText `json:"description,omitempty"` // i18n文本

	CreatorId *string `json:"creator_id,omitempty"` // 创建人ID
}

type UpdateTenantBuilder struct {
	id     string // 租户ID
	idFlag bool

	name     *I18nText // i18n文本
	nameFlag bool

	contactUserInfo     *UserInfo // 联系人信息
	contactUserInfoFlag bool

	subDomain     string // 租户子域名
	subDomainFlag bool

	canDomainBeModified     bool // 域名是否可以被修改
	canDomainBeModifiedFlag bool

	address     string // 联系地址
	addressFlag bool

	postCode     string // 邮编
	postCodeFlag bool

	telephone     string // 座机
	telephoneFlag bool

	avatarKey     string // 企业头像Key
	avatarKeyFlag bool

	countryCode     string // 国家代码
	countryCodeFlag bool

	type_    string // 租户类型
	typeFlag bool

	purpose     string // 租户用途
	purposeFlag bool

	tag     string // 个人租户/企业租户
	tagFlag bool

	industry     string // 行业类型 兼容历史枚举和主数据编码 https://bytedance.larkoffice.com/wiki/Ntd1wlmT2i0xrokY2DNcWDw0nHc#share-WOWldq8Uvow6g3xmIjlck9eYnof
	industryFlag bool

	scale     string // 企业规模 兼容历史枚举和主数据编码 https://bytedance.larkoffice.com/wiki/Ntd1wlmT2i0xrokY2DNcWDw0nHc#share-WOWldq8Uvow6g3xmIjlck9eYnof
	scaleFlag bool

	description     *I18nText // i18n文本
	descriptionFlag bool

	creatorId     string // 创建人ID
	creatorIdFlag bool
}

func NewUpdateTenantBuilder() *UpdateTenantBuilder {
	builder := &UpdateTenantBuilder{}
	return builder
}

// 租户ID
//
// 示例值：6872549699048439828
func (builder *UpdateTenantBuilder) Id(id string) *UpdateTenantBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *UpdateTenantBuilder) Name(name *I18nText) *UpdateTenantBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 联系人信息
//
// 示例值：
func (builder *UpdateTenantBuilder) ContactUserInfo(contactUserInfo *UserInfo) *UpdateTenantBuilder {
	builder.contactUserInfo = contactUserInfo
	builder.contactUserInfoFlag = true
	return builder
}

// 租户子域名
//
// 示例值：www
func (builder *UpdateTenantBuilder) SubDomain(subDomain string) *UpdateTenantBuilder {
	builder.subDomain = subDomain
	builder.subDomainFlag = true
	return builder
}

// 域名是否可以被修改
//
// 示例值：
func (builder *UpdateTenantBuilder) CanDomainBeModified(canDomainBeModified bool) *UpdateTenantBuilder {
	builder.canDomainBeModified = canDomainBeModified
	builder.canDomainBeModifiedFlag = true
	return builder
}

// 联系地址
//
// 示例值：address
func (builder *UpdateTenantBuilder) Address(address string) *UpdateTenantBuilder {
	builder.address = address
	builder.addressFlag = true
	return builder
}

// 邮编
//
// 示例值：123456
func (builder *UpdateTenantBuilder) PostCode(postCode string) *UpdateTenantBuilder {
	builder.postCode = postCode
	builder.postCodeFlag = true
	return builder
}

// 座机
//
// 示例值：123456
func (builder *UpdateTenantBuilder) Telephone(telephone string) *UpdateTenantBuilder {
	builder.telephone = telephone
	builder.telephoneFlag = true
	return builder
}

// 企业头像Key
//
// 示例值：asdfadfadsf
func (builder *UpdateTenantBuilder) AvatarKey(avatarKey string) *UpdateTenantBuilder {
	builder.avatarKey = avatarKey
	builder.avatarKeyFlag = true
	return builder
}

// 国家代码
//
// 示例值：cn
func (builder *UpdateTenantBuilder) CountryCode(countryCode string) *UpdateTenantBuilder {
	builder.countryCode = countryCode
	builder.countryCodeFlag = true
	return builder
}

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

// 租户用途
//
// 示例值：
func (builder *UpdateTenantBuilder) Purpose(purpose string) *UpdateTenantBuilder {
	builder.purpose = purpose
	builder.purposeFlag = true
	return builder
}

// 个人租户/企业租户
//
// 示例值：
func (builder *UpdateTenantBuilder) Tag(tag string) *UpdateTenantBuilder {
	builder.tag = tag
	builder.tagFlag = true
	return builder
}

// 行业类型 兼容历史枚举和主数据编码 https://bytedance.larkoffice.com/wiki/Ntd1wlmT2i0xrokY2DNcWDw0nHc#share-WOWldq8Uvow6g3xmIjlck9eYnof
//
// 示例值：MDCT00000256
func (builder *UpdateTenantBuilder) Industry(industry string) *UpdateTenantBuilder {
	builder.industry = industry
	builder.industryFlag = true
	return builder
}

// 企业规模 兼容历史枚举和主数据编码 https://bytedance.larkoffice.com/wiki/Ntd1wlmT2i0xrokY2DNcWDw0nHc#share-WOWldq8Uvow6g3xmIjlck9eYnof
//
// 示例值：MDCT00000256
func (builder *UpdateTenantBuilder) Scale(scale string) *UpdateTenantBuilder {
	builder.scale = scale
	builder.scaleFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *UpdateTenantBuilder) Description(description *I18nText) *UpdateTenantBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

// 创建人ID
//
// 示例值：6872549699048439828
func (builder *UpdateTenantBuilder) CreatorId(creatorId string) *UpdateTenantBuilder {
	builder.creatorId = creatorId
	builder.creatorIdFlag = true
	return builder
}

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

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.contactUserInfoFlag {
		req.ContactUserInfo = builder.contactUserInfo
	}
	if builder.subDomainFlag {
		req.SubDomain = &builder.subDomain

	}
	if builder.canDomainBeModifiedFlag {
		req.CanDomainBeModified = &builder.canDomainBeModified

	}
	if builder.addressFlag {
		req.Address = &builder.address

	}
	if builder.postCodeFlag {
		req.PostCode = &builder.postCode

	}
	if builder.telephoneFlag {
		req.Telephone = &builder.telephone

	}
	if builder.avatarKeyFlag {
		req.AvatarKey = &builder.avatarKey

	}
	if builder.countryCodeFlag {
		req.CountryCode = &builder.countryCode

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

	}
	if builder.purposeFlag {
		req.Purpose = &builder.purpose

	}
	if builder.tagFlag {
		req.Tag = &builder.tag

	}
	if builder.industryFlag {
		req.Industry = &builder.industry

	}
	if builder.scaleFlag {
		req.Scale = &builder.scale

	}
	if builder.descriptionFlag {
		req.Description = builder.description
	}
	if builder.creatorIdFlag {
		req.CreatorId = &builder.creatorId

	}
	return req
}

type UpdateTenantOption struct {
	IsSkipDomainCheck *bool `json:"is_skip_domain_check,omitempty"` // 跳过域名长度校验

	DataSource *int `json:"data_source,omitempty"` // 数据来源
}

type UpdateTenantOptionBuilder struct {
	isSkipDomainCheck     bool // 跳过域名长度校验
	isSkipDomainCheckFlag bool

	dataSource     int // 数据来源
	dataSourceFlag bool
}

func NewUpdateTenantOptionBuilder() *UpdateTenantOptionBuilder {
	builder := &UpdateTenantOptionBuilder{}
	return builder
}

// 跳过域名长度校验
//
// 示例值：
func (builder *UpdateTenantOptionBuilder) IsSkipDomainCheck(isSkipDomainCheck bool) *UpdateTenantOptionBuilder {
	builder.isSkipDomainCheck = isSkipDomainCheck
	builder.isSkipDomainCheckFlag = true
	return builder
}

// 数据来源
//
// 示例值：
func (builder *UpdateTenantOptionBuilder) DataSource(dataSource int) *UpdateTenantOptionBuilder {
	builder.dataSource = dataSource
	builder.dataSourceFlag = true
	return builder
}

func (builder *UpdateTenantOptionBuilder) Build() *UpdateTenantOption {
	req := &UpdateTenantOption{}
	if builder.isSkipDomainCheckFlag {
		req.IsSkipDomainCheck = &builder.isSkipDomainCheck

	}
	if builder.dataSourceFlag {
		req.DataSource = &builder.dataSource

	}
	return req
}

type UpdateVisibleAssistRule struct {
	RuleId *string `json:"rule_id,omitempty"` // 要更新的补充规则ID

	Subjects []*EntityInfo `json:"subjects,omitempty"` // 规则主体

	Objects []*EntityInfo `json:"objects,omitempty"` // 规则客体，类型只能为部门、用户、单位。不能为用户组

	Effect *int `json:"effect,omitempty"` // 权限操作

	MatchCondition *int `json:"match_condition,omitempty"` // 匹配条件
}

type UpdateVisibleAssistRuleBuilder struct {
	ruleId     string // 要更新的补充规则ID
	ruleIdFlag bool

	subjects     []*EntityInfo // 规则主体
	subjectsFlag bool

	objects     []*EntityInfo // 规则客体，类型只能为部门、用户、单位。不能为用户组
	objectsFlag bool

	effect     int // 权限操作
	effectFlag bool

	matchCondition     int // 匹配条件
	matchConditionFlag bool
}

func NewUpdateVisibleAssistRuleBuilder() *UpdateVisibleAssistRuleBuilder {
	builder := &UpdateVisibleAssistRuleBuilder{}
	return builder
}

// 要更新的补充规则ID
//
// 示例值：123212312
func (builder *UpdateVisibleAssistRuleBuilder) RuleId(ruleId string) *UpdateVisibleAssistRuleBuilder {
	builder.ruleId = ruleId
	builder.ruleIdFlag = true
	return builder
}

// 规则主体
//
// 示例值：
func (builder *UpdateVisibleAssistRuleBuilder) Subjects(subjects []*EntityInfo) *UpdateVisibleAssistRuleBuilder {
	builder.subjects = subjects
	builder.subjectsFlag = true
	return builder
}

// 规则客体，类型只能为部门、用户、单位。不能为用户组
//
// 示例值：
func (builder *UpdateVisibleAssistRuleBuilder) Objects(objects []*EntityInfo) *UpdateVisibleAssistRuleBuilder {
	builder.objects = objects
	builder.objectsFlag = true
	return builder
}

// 权限操作
//
// 示例值：1
func (builder *UpdateVisibleAssistRuleBuilder) Effect(effect int) *UpdateVisibleAssistRuleBuilder {
	builder.effect = effect
	builder.effectFlag = true
	return builder
}

// 匹配条件
//
// 示例值：
func (builder *UpdateVisibleAssistRuleBuilder) MatchCondition(matchCondition int) *UpdateVisibleAssistRuleBuilder {
	builder.matchCondition = matchCondition
	builder.matchConditionFlag = true
	return builder
}

func (builder *UpdateVisibleAssistRuleBuilder) Build() *UpdateVisibleAssistRule {
	req := &UpdateVisibleAssistRule{}
	if builder.ruleIdFlag {
		req.RuleId = &builder.ruleId

	}
	if builder.subjectsFlag {
		req.Subjects = builder.subjects
	}
	if builder.objectsFlag {
		req.Objects = builder.objects
	}
	if builder.effectFlag {
		req.Effect = &builder.effect

	}
	if builder.matchConditionFlag {
		req.MatchCondition = &builder.matchCondition

	}
	return req
}

type UpsertGuestName struct {
	Name *I18nText `json:"name,omitempty"` // i18n文本
}

type UpsertGuestNameBuilder struct {
	name     *I18nText // i18n文本
	nameFlag bool
}

func NewUpsertGuestNameBuilder() *UpsertGuestNameBuilder {
	builder := &UpsertGuestNameBuilder{}
	return builder
}

// i18n文本
//
// 示例值：
func (builder *UpsertGuestNameBuilder) Name(name *I18nText) *UpsertGuestNameBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

func (builder *UpsertGuestNameBuilder) Build() *UpsertGuestName {
	req := &UpsertGuestName{}
	if builder.nameFlag {
		req.Name = builder.name
	}
	return req
}

type UpsertName struct {
	LastName *I18nText `json:"last_name,omitempty"` // i18n文本

	FirstName *I18nText `json:"first_name,omitempty"` // i18n文本

	Name *I18nText `json:"name,omitempty"` // i18n文本

	AnotherName *string `json:"another_name,omitempty"` // 别名

	LegalName *string `json:"legal_name,omitempty"` // 法定姓名
}

type UpsertNameBuilder struct {
	lastName     *I18nText // i18n文本
	lastNameFlag bool

	firstName     *I18nText // i18n文本
	firstNameFlag bool

	name     *I18nText // i18n文本
	nameFlag bool

	anotherName     string // 别名
	anotherNameFlag bool

	legalName     string // 法定姓名
	legalNameFlag bool
}

func NewUpsertNameBuilder() *UpsertNameBuilder {
	builder := &UpsertNameBuilder{}
	return builder
}

// i18n文本
//
// 示例值：
func (builder *UpsertNameBuilder) LastName(lastName *I18nText) *UpsertNameBuilder {
	builder.lastName = lastName
	builder.lastNameFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *UpsertNameBuilder) FirstName(firstName *I18nText) *UpsertNameBuilder {
	builder.firstName = firstName
	builder.firstNameFlag = true
	return builder
}

// i18n文本
//
// 示例值：
func (builder *UpsertNameBuilder) Name(name *I18nText) *UpsertNameBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 别名
//
// 示例值：jack
func (builder *UpsertNameBuilder) AnotherName(anotherName string) *UpsertNameBuilder {
	builder.anotherName = anotherName
	builder.anotherNameFlag = true
	return builder
}

// 法定姓名
//
// 示例值：tony
func (builder *UpsertNameBuilder) LegalName(legalName string) *UpsertNameBuilder {
	builder.legalName = legalName
	builder.legalNameFlag = true
	return builder
}

func (builder *UpsertNameBuilder) Build() *UpsertName {
	req := &UpsertName{}
	if builder.lastNameFlag {
		req.LastName = builder.lastName
	}
	if builder.firstNameFlag {
		req.FirstName = builder.firstName
	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.anotherNameFlag {
		req.AnotherName = &builder.anotherName

	}
	if builder.legalNameFlag {
		req.LegalName = &builder.legalName

	}
	return req
}

type UpsertUserDepartmentSortInfo struct {
	DepartmentId *string `json:"department_id,omitempty"` // 部门id

	OrderWeightInDeparment *string `json:"order_weight_in_deparment,omitempty"` // 用户在部门内的排序权重

	OrderWeightAmongDeparments *string `json:"order_weight_among_deparments,omitempty"` // 用户多个部门间的排序权重

	IsMainDepartment *bool `json:"is_main_department,omitempty"` // 是否为用户的主部门（用户只能有一个主部门，且排序权重应最大，不填则默认使用排序第一的部门作为主部门)
}

type UpsertUserDepartmentSortInfoBuilder struct {
	departmentId     string // 部门id
	departmentIdFlag bool

	orderWeightInDeparment     string // 用户在部门内的排序权重
	orderWeightInDeparmentFlag bool

	orderWeightAmongDeparments     string // 用户多个部门间的排序权重
	orderWeightAmongDeparmentsFlag bool

	isMainDepartment     bool // 是否为用户的主部门（用户只能有一个主部门，且排序权重应最大，不填则默认使用排序第一的部门作为主部门)
	isMainDepartmentFlag bool
}

func NewUpsertUserDepartmentSortInfoBuilder() *UpsertUserDepartmentSortInfoBuilder {
	builder := &UpsertUserDepartmentSortInfoBuilder{}
	return builder
}

// 部门id
//
// 示例值：
func (builder *UpsertUserDepartmentSortInfoBuilder) DepartmentId(departmentId string) *UpsertUserDepartmentSortInfoBuilder {
	builder.departmentId = departmentId
	builder.departmentIdFlag = true
	return builder
}

// 用户在部门内的排序权重
//
// 示例值：100
func (builder *UpsertUserDepartmentSortInfoBuilder) OrderWeightInDeparment(orderWeightInDeparment string) *UpsertUserDepartmentSortInfoBuilder {
	builder.orderWeightInDeparment = orderWeightInDeparment
	builder.orderWeightInDeparmentFlag = true
	return builder
}

// 用户多个部门间的排序权重
//
// 示例值：20
func (builder *UpsertUserDepartmentSortInfoBuilder) OrderWeightAmongDeparments(orderWeightAmongDeparments string) *UpsertUserDepartmentSortInfoBuilder {
	builder.orderWeightAmongDeparments = orderWeightAmongDeparments
	builder.orderWeightAmongDeparmentsFlag = true
	return builder
}

// 是否为用户的主部门（用户只能有一个主部门，且排序权重应最大，不填则默认使用排序第一的部门作为主部门)
//
// 示例值：
func (builder *UpsertUserDepartmentSortInfoBuilder) IsMainDepartment(isMainDepartment bool) *UpsertUserDepartmentSortInfoBuilder {
	builder.isMainDepartment = isMainDepartment
	builder.isMainDepartmentFlag = true
	return builder
}

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

	}
	if builder.orderWeightInDeparmentFlag {
		req.OrderWeightInDeparment = &builder.orderWeightInDeparment

	}
	if builder.orderWeightAmongDeparmentsFlag {
		req.OrderWeightAmongDeparments = &builder.orderWeightAmongDeparments

	}
	if builder.isMainDepartmentFlag {
		req.IsMainDepartment = &builder.isMainDepartment

	}
	return req
}

type UpsertUserVirtualOrgInfo struct {
	Id *string `json:"id,omitempty"` // 虚拟组织维度id

	EmployeeOrderInDepartments []*UpsertUserDepartmentSortInfo `json:"employee_order_in_departments,omitempty"` // 用户在部门内的排序信息， 第一个部门为主部门

	Leaders []string `json:"leaders,omitempty"` // 虚拟上级
}

type UpsertUserVirtualOrgInfoBuilder struct {
	id     string // 虚拟组织维度id
	idFlag bool

	employeeOrderInDepartments     []*UpsertUserDepartmentSortInfo // 用户在部门内的排序信息， 第一个部门为主部门
	employeeOrderInDepartmentsFlag bool

	leaders     []string // 虚拟上级
	leadersFlag bool
}

func NewUpsertUserVirtualOrgInfoBuilder() *UpsertUserVirtualOrgInfoBuilder {
	builder := &UpsertUserVirtualOrgInfoBuilder{}
	return builder
}

// 虚拟组织维度id
//
// 示例值：3e3cf96b
func (builder *UpsertUserVirtualOrgInfoBuilder) Id(id string) *UpsertUserVirtualOrgInfoBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 用户在部门内的排序信息， 第一个部门为主部门
//
// 示例值：
func (builder *UpsertUserVirtualOrgInfoBuilder) EmployeeOrderInDepartments(employeeOrderInDepartments []*UpsertUserDepartmentSortInfo) *UpsertUserVirtualOrgInfoBuilder {
	builder.employeeOrderInDepartments = employeeOrderInDepartments
	builder.employeeOrderInDepartmentsFlag = true
	return builder
}

// 虚拟上级
//
// 示例值：
func (builder *UpsertUserVirtualOrgInfoBuilder) Leaders(leaders []string) *UpsertUserVirtualOrgInfoBuilder {
	builder.leaders = leaders
	builder.leadersFlag = true
	return builder
}

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

	}
	if builder.employeeOrderInDepartmentsFlag {
		req.EmployeeOrderInDepartments = builder.employeeOrderInDepartments
	}
	if builder.leadersFlag {
		req.Leaders = builder.leaders
	}
	return req
}

type UrlValue struct {
	LinkText *I18nText `json:"link_text,omitempty"` // i18n文本

	Url *string `json:"url,omitempty"` // 移动端网页链接

	Pcurl *string `json:"pcurl,omitempty"` // 桌面端网页链接
}

type UrlValueBuilder struct {
	linkText     *I18nText // i18n文本
	linkTextFlag bool

	url     string // 移动端网页链接
	urlFlag bool

	pcurl     string // 桌面端网页链接
	pcurlFlag bool
}

func NewUrlValueBuilder() *UrlValueBuilder {
	builder := &UrlValueBuilder{}
	return builder
}

// i18n文本
//
// 示例值：
func (builder *UrlValueBuilder) LinkText(linkText *I18nText) *UrlValueBuilder {
	builder.linkText = linkText
	builder.linkTextFlag = true
	return builder
}

// 移动端网页链接
//
// 示例值：https://m.bytedance.com/afnasjfna
func (builder *UrlValueBuilder) Url(url string) *UrlValueBuilder {
	builder.url = url
	builder.urlFlag = true
	return builder
}

// 桌面端网页链接
//
// 示例值：http://www.fs.cn
func (builder *UrlValueBuilder) Pcurl(pcurl string) *UrlValueBuilder {
	builder.pcurl = pcurl
	builder.pcurlFlag = true
	return builder
}

func (builder *UrlValueBuilder) Build() *UrlValue {
	req := &UrlValue{}
	if builder.linkTextFlag {
		req.LinkText = builder.linkText
	}
	if builder.urlFlag {
		req.Url = &builder.url

	}
	if builder.pcurlFlag {
		req.Pcurl = &builder.pcurl

	}
	return req
}

type UserDepartmentSortInfo struct {
	DepartmentId *string `json:"department_id,omitempty"` // 部门id

	OrderWeightInDeparment *string `json:"order_weight_in_deparment,omitempty"` // 用户在部门内的排序权重

	OrderWeightAmongDeparments *string `json:"order_weight_among_deparments,omitempty"` // 用户多个部门间的排序权重
}

type UserDepartmentSortInfoBuilder struct {
	departmentId     string // 部门id
	departmentIdFlag bool

	orderWeightInDeparment     string // 用户在部门内的排序权重
	orderWeightInDeparmentFlag bool

	orderWeightAmongDeparments     string // 用户多个部门间的排序权重
	orderWeightAmongDeparmentsFlag bool
}

func NewUserDepartmentSortInfoBuilder() *UserDepartmentSortInfoBuilder {
	builder := &UserDepartmentSortInfoBuilder{}
	return builder
}

// 部门id
//
// 示例值：h12921
func (builder *UserDepartmentSortInfoBuilder) DepartmentId(departmentId string) *UserDepartmentSortInfoBuilder {
	builder.departmentId = departmentId
	builder.departmentIdFlag = true
	return builder
}

// 用户在部门内的排序权重
//
// 示例值：100
func (builder *UserDepartmentSortInfoBuilder) OrderWeightInDeparment(orderWeightInDeparment string) *UserDepartmentSortInfoBuilder {
	builder.orderWeightInDeparment = orderWeightInDeparment
	builder.orderWeightInDeparmentFlag = true
	return builder
}

// 用户多个部门间的排序权重
//
// 示例值：100
func (builder *UserDepartmentSortInfoBuilder) OrderWeightAmongDeparments(orderWeightAmongDeparments string) *UserDepartmentSortInfoBuilder {
	builder.orderWeightAmongDeparments = orderWeightAmongDeparments
	builder.orderWeightAmongDeparmentsFlag = true
	return builder
}

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

	}
	if builder.orderWeightInDeparmentFlag {
		req.OrderWeightInDeparment = &builder.orderWeightInDeparment

	}
	if builder.orderWeightAmongDeparmentsFlag {
		req.OrderWeightAmongDeparments = &builder.orderWeightAmongDeparments

	}
	return req
}

type UserEntity struct {
	Id *string `json:"id,omitempty"` // 用户ID

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

	UserType *string `json:"user_type,omitempty"` // 匿名身份，雇员身份，设备身份，应用身份等

	IsActive *bool `json:"is_active,omitempty"` // 是否激活

	IsFrozen *bool `json:"is_frozen,omitempty"` // 是否冻结

	IsProvisioned *bool `json:"is_provisioned,omitempty"` // 是否可用

	IsPending *bool `json:"is_pending,omitempty"` // 是否暂停

	BizId *string `json:"biz_id,omitempty"` // 关联的 id, 例如应用身份的 AppID, 硬件身份的EquipmentID

	LastLoginTime *string `json:"last_login_time,omitempty"` // 上次登录时间

	HomeUserId *string `json:"home_user_id,omitempty"` // 作为shadow存在时，对应的home user id

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

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

	Credentials []*Credential `json:"credentials,omitempty"` // 登陆凭证

	ProfileCard *ProfileCard `json:"profile_card,omitempty"` // 个人名片

	Employee *EmployeeEntity `json:"employee,omitempty"` // 员工实体

	App *App `json:"app,omitempty"` // 应用

	Guest *Guest `json:"guest,omitempty"` // 访客
}

type UserEntityBuilder struct {
	id     string // 用户ID
	idFlag bool

	tenantId     string // 租户ID
	tenantIdFlag bool

	userType     string // 匿名身份，雇员身份，设备身份，应用身份等
	userTypeFlag bool

	isActive     bool // 是否激活
	isActiveFlag bool

	isFrozen     bool // 是否冻结
	isFrozenFlag bool

	isProvisioned     bool // 是否可用
	isProvisionedFlag bool

	isPending     bool // 是否暂停
	isPendingFlag bool

	bizId     string // 关联的 id, 例如应用身份的 AppID, 硬件身份的EquipmentID
	bizIdFlag bool

	lastLoginTime     string // 上次登录时间
	lastLoginTimeFlag bool

	homeUserId     string // 作为shadow存在时，对应的home user id
	homeUserIdFlag bool

	createTime     string // 创建时间
	createTimeFlag bool

	updateTime     string // 更新时间
	updateTimeFlag bool

	credentials     []*Credential // 登陆凭证
	credentialsFlag bool

	profileCard     *ProfileCard // 个人名片
	profileCardFlag bool

	employee     *EmployeeEntity // 员工实体
	employeeFlag bool

	app     *App // 应用
	appFlag bool

	guest     *Guest // 访客
	guestFlag bool
}

func NewUserEntityBuilder() *UserEntityBuilder {
	builder := &UserEntityBuilder{}
	return builder
}

// 用户ID
//
// 示例值：123123
func (builder *UserEntityBuilder) Id(id string) *UserEntityBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

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

// 匿名身份，雇员身份，设备身份，应用身份等
//
// 示例值：
func (builder *UserEntityBuilder) UserType(userType string) *UserEntityBuilder {
	builder.userType = userType
	builder.userTypeFlag = true
	return builder
}

// 是否激活
//
// 示例值：
func (builder *UserEntityBuilder) IsActive(isActive bool) *UserEntityBuilder {
	builder.isActive = isActive
	builder.isActiveFlag = true
	return builder
}

// 是否冻结
//
// 示例值：
func (builder *UserEntityBuilder) IsFrozen(isFrozen bool) *UserEntityBuilder {
	builder.isFrozen = isFrozen
	builder.isFrozenFlag = true
	return builder
}

// 是否可用
//
// 示例值：
func (builder *UserEntityBuilder) IsProvisioned(isProvisioned bool) *UserEntityBuilder {
	builder.isProvisioned = isProvisioned
	builder.isProvisionedFlag = true
	return builder
}

// 是否暂停
//
// 示例值：
func (builder *UserEntityBuilder) IsPending(isPending bool) *UserEntityBuilder {
	builder.isPending = isPending
	builder.isPendingFlag = true
	return builder
}

// 关联的 id, 例如应用身份的 AppID, 硬件身份的EquipmentID
//
// 示例值：1231231
func (builder *UserEntityBuilder) BizId(bizId string) *UserEntityBuilder {
	builder.bizId = bizId
	builder.bizIdFlag = true
	return builder
}

// 上次登录时间
//
// 示例值：123123
func (builder *UserEntityBuilder) LastLoginTime(lastLoginTime string) *UserEntityBuilder {
	builder.lastLoginTime = lastLoginTime
	builder.lastLoginTimeFlag = true
	return builder
}

// 作为shadow存在时，对应的home user id
//
// 示例值：123123
func (builder *UserEntityBuilder) HomeUserId(homeUserId string) *UserEntityBuilder {
	builder.homeUserId = homeUserId
	builder.homeUserIdFlag = true
	return builder
}

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

// 更新时间
//
// 示例值：123123
func (builder *UserEntityBuilder) UpdateTime(updateTime string) *UserEntityBuilder {
	builder.updateTime = updateTime
	builder.updateTimeFlag = true
	return builder
}

// 登陆凭证
//
// 示例值：
func (builder *UserEntityBuilder) Credentials(credentials []*Credential) *UserEntityBuilder {
	builder.credentials = credentials
	builder.credentialsFlag = true
	return builder
}

// 个人名片
//
// 示例值：
func (builder *UserEntityBuilder) ProfileCard(profileCard *ProfileCard) *UserEntityBuilder {
	builder.profileCard = profileCard
	builder.profileCardFlag = true
	return builder
}

// 员工实体
//
// 示例值：
func (builder *UserEntityBuilder) Employee(employee *EmployeeEntity) *UserEntityBuilder {
	builder.employee = employee
	builder.employeeFlag = true
	return builder
}

// 应用
//
// 示例值：
func (builder *UserEntityBuilder) App(app *App) *UserEntityBuilder {
	builder.app = app
	builder.appFlag = true
	return builder
}

// 访客
//
// 示例值：
func (builder *UserEntityBuilder) Guest(guest *Guest) *UserEntityBuilder {
	builder.guest = guest
	builder.guestFlag = true
	return builder
}

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

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

	}
	if builder.userTypeFlag {
		req.UserType = &builder.userType

	}
	if builder.isActiveFlag {
		req.IsActive = &builder.isActive

	}
	if builder.isFrozenFlag {
		req.IsFrozen = &builder.isFrozen

	}
	if builder.isProvisionedFlag {
		req.IsProvisioned = &builder.isProvisioned

	}
	if builder.isPendingFlag {
		req.IsPending = &builder.isPending

	}
	if builder.bizIdFlag {
		req.BizId = &builder.bizId

	}
	if builder.lastLoginTimeFlag {
		req.LastLoginTime = &builder.lastLoginTime

	}
	if builder.homeUserIdFlag {
		req.HomeUserId = &builder.homeUserId

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

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

	}
	if builder.credentialsFlag {
		req.Credentials = builder.credentials
	}
	if builder.profileCardFlag {
		req.ProfileCard = builder.profileCard
	}
	if builder.employeeFlag {
		req.Employee = builder.employee
	}
	if builder.appFlag {
		req.App = builder.app
	}
	if builder.guestFlag {
		req.Guest = builder.guest
	}
	return req
}

type UserFieldContent struct {
	FieldContent map[string]*FieldContentEntity `json:"field_content,omitempty"` // 字段内容

	VisibleField map[string]bool `json:"visible_field,omitempty"` // 字段可见性，仅包含可见字段

	UserFieldPosition *int `json:"user_field_position,omitempty"` // 应该从TenantView中选取的字段选取的字段 Position
}

type UserFieldContentBuilder struct {
	fieldContent     map[string]*FieldContentEntity // 字段内容
	fieldContentFlag bool

	visibleField     map[string]bool // 字段可见性，仅包含可见字段
	visibleFieldFlag bool

	userFieldPosition     int // 应该从TenantView中选取的字段选取的字段 Position
	userFieldPositionFlag bool
}

func NewUserFieldContentBuilder() *UserFieldContentBuilder {
	builder := &UserFieldContentBuilder{}
	return builder
}

// 字段内容
//
// 示例值：
func (builder *UserFieldContentBuilder) FieldContent(fieldContent map[string]*FieldContentEntity) *UserFieldContentBuilder {
	builder.fieldContent = fieldContent
	builder.fieldContentFlag = true
	return builder
}

// 字段可见性，仅包含可见字段
//
// 示例值：
func (builder *UserFieldContentBuilder) VisibleField(visibleField map[string]bool) *UserFieldContentBuilder {
	builder.visibleField = visibleField
	builder.visibleFieldFlag = true
	return builder
}

// 应该从TenantView中选取的字段选取的字段 Position
//
// 示例值：
func (builder *UserFieldContentBuilder) UserFieldPosition(userFieldPosition int) *UserFieldContentBuilder {
	builder.userFieldPosition = userFieldPosition
	builder.userFieldPositionFlag = true
	return builder
}

func (builder *UserFieldContentBuilder) Build() *UserFieldContent {
	req := &UserFieldContent{}
	if builder.fieldContentFlag {
		req.FieldContent = builder.fieldContent
	}
	if builder.visibleFieldFlag {
		req.VisibleField = builder.visibleField
	}
	if builder.userFieldPositionFlag {
		req.UserFieldPosition = &builder.userFieldPosition

	}
	return req
}

type UserFieldKeyContainer struct {
	UserFieldKey *string `json:"user_field_key,omitempty"` // 用户字段key

	Enabled *bool `json:"enabled,omitempty"` // 是否启用、允许

	Fixed *bool `json:"fixed,omitempty"` // 是否不允许修改，true代表固定值不允许修改
}

type UserFieldKeyContainerBuilder struct {
	userFieldKey     string // 用户字段key
	userFieldKeyFlag bool

	enabled     bool // 是否启用、允许
	enabledFlag bool

	fixed     bool // 是否不允许修改，true代表固定值不允许修改
	fixedFlag bool
}

func NewUserFieldKeyContainerBuilder() *UserFieldKeyContainerBuilder {
	builder := &UserFieldKeyContainerBuilder{}
	return builder
}

// 用户字段key
//
// 示例值：
func (builder *UserFieldKeyContainerBuilder) UserFieldKey(userFieldKey string) *UserFieldKeyContainerBuilder {
	builder.userFieldKey = userFieldKey
	builder.userFieldKeyFlag = true
	return builder
}

// 是否启用、允许
//
// 示例值：
func (builder *UserFieldKeyContainerBuilder) Enabled(enabled bool) *UserFieldKeyContainerBuilder {
	builder.enabled = enabled
	builder.enabledFlag = true
	return builder
}

// 是否不允许修改，true代表固定值不允许修改
//
// 示例值：
func (builder *UserFieldKeyContainerBuilder) Fixed(fixed bool) *UserFieldKeyContainerBuilder {
	builder.fixed = fixed
	builder.fixedFlag = true
	return builder
}

func (builder *UserFieldKeyContainerBuilder) Build() *UserFieldKeyContainer {
	req := &UserFieldKeyContainer{}
	if builder.userFieldKeyFlag {
		req.UserFieldKey = &builder.userFieldKey

	}
	if builder.enabledFlag {
		req.Enabled = &builder.enabled

	}
	if builder.fixedFlag {
		req.Fixed = &builder.fixed

	}
	return req
}

type UserInfo struct {
	Name *I18nText `json:"name,omitempty"` // i18n文本

	Mobile *string `json:"mobile,omitempty"` // 联系人手机

	Email *string `json:"email,omitempty"` // 联系人邮箱

	FirstName *I18nText `json:"first_name,omitempty"` // i18n文本

	LastName *I18nText `json:"last_name,omitempty"` // i18n文本
}

type UserInfoBuilder struct {
	name     *I18nText // i18n文本
	nameFlag bool

	mobile     string // 联系人手机
	mobileFlag bool

	email     string // 联系人邮箱
	emailFlag bool

	firstName     *I18nText // i18n文本
	firstNameFlag bool

	lastName     *I18nText // i18n文本
	lastNameFlag bool
}

func NewUserInfoBuilder() *UserInfoBuilder {
	builder := &UserInfoBuilder{}
	return builder
}

// i18n文本
//
// 示例值：
func (builder *UserInfoBuilder) Name(name *I18nText) *UserInfoBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 联系人手机
//
// 示例值：+86 12344445555
func (builder *UserInfoBuilder) Mobile(mobile string) *UserInfoBuilder {
	builder.mobile = mobile
	builder.mobileFlag = true
	return builder
}

// 联系人邮箱
//
// 示例值：admin@bytedance.com
func (builder *UserInfoBuilder) Email(email string) *UserInfoBuilder {
	builder.email = email
	builder.emailFlag = true
	return builder
}

// i18n文本
//
// 示例值：Albert
func (builder *UserInfoBuilder) FirstName(firstName *I18nText) *UserInfoBuilder {
	builder.firstName = firstName
	builder.firstNameFlag = true
	return builder
}

// i18n文本
//
// 示例值：Einstein
func (builder *UserInfoBuilder) LastName(lastName *I18nText) *UserInfoBuilder {
	builder.lastName = lastName
	builder.lastNameFlag = true
	return builder
}

func (builder *UserInfoBuilder) Build() *UserInfo {
	req := &UserInfo{}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.mobileFlag {
		req.Mobile = &builder.mobile

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

	}
	if builder.firstNameFlag {
		req.FirstName = builder.firstName
	}
	if builder.lastNameFlag {
		req.LastName = builder.lastName
	}
	return req
}

type UserValue struct {
	Ids []string `json:"ids,omitempty"` // 人员ID

	UserType *string `json:"user_type,omitempty"` // 人员类型
}

type UserValueBuilder struct {
	ids     []string // 人员ID
	idsFlag bool

	userType     string // 人员类型
	userTypeFlag bool
}

func NewUserValueBuilder() *UserValueBuilder {
	builder := &UserValueBuilder{}
	return builder
}

// 人员ID
//
// 示例值：
func (builder *UserValueBuilder) Ids(ids []string) *UserValueBuilder {
	builder.ids = ids
	builder.idsFlag = true
	return builder
}

// 人员类型
//
// 示例值：1
func (builder *UserValueBuilder) UserType(userType string) *UserValueBuilder {
	builder.userType = userType
	builder.userTypeFlag = true
	return builder
}

func (builder *UserValueBuilder) Build() *UserValue {
	req := &UserValue{}
	if builder.idsFlag {
		req.Ids = builder.ids
	}
	if builder.userTypeFlag {
		req.UserType = &builder.userType

	}
	return req
}

type UserVirtualOrgInfo struct {
	Id *string `json:"id,omitempty"` // 虚拟组织维度id

	Departments []*Department `json:"departments,omitempty"` // 虚拟组织下的部门信息

	DepartmentPathBaseInfos []*DepartmentBaseInfo `json:"department_path_base_infos,omitempty"` // 员工部门全路径节点 map<直属部门ID, list<部门基本信息>>;本字段不含根部门信息，部门顺序为父部门->当前部门\n例如：三级部门为员工当前部门，三级部门的父部门是二级部门，二级部门父部门是一级部门，一级部门的父部门是根部门\n返回 {3,[DepartmentBaseInfo{1,一级部门},DepartmentBaseInfo{2,二级部门}, DepartmentBaseInfo{3,三级部门}]}

	EmployeeOrderInDepartments []*UserDepartmentSortInfo `json:"employee_order_in_departments,omitempty"` // 用户在部门内的排序信息， 第一个部门为主部门

	Leaders []string `json:"leaders,omitempty"` // 虚拟上级
}

type UserVirtualOrgInfoBuilder struct {
	id     string // 虚拟组织维度id
	idFlag bool

	departments     []*Department // 虚拟组织下的部门信息
	departmentsFlag bool

	departmentPathBaseInfos     []*DepartmentBaseInfo // 员工部门全路径节点 map<直属部门ID, list<部门基本信息>>;本字段不含根部门信息，部门顺序为父部门->当前部门\n例如：三级部门为员工当前部门，三级部门的父部门是二级部门，二级部门父部门是一级部门，一级部门的父部门是根部门\n返回 {3,[DepartmentBaseInfo{1,一级部门},DepartmentBaseInfo{2,二级部门}, DepartmentBaseInfo{3,三级部门}]}
	departmentPathBaseInfosFlag bool

	employeeOrderInDepartments     []*UserDepartmentSortInfo // 用户在部门内的排序信息， 第一个部门为主部门
	employeeOrderInDepartmentsFlag bool

	leaders     []string // 虚拟上级
	leadersFlag bool
}

func NewUserVirtualOrgInfoBuilder() *UserVirtualOrgInfoBuilder {
	builder := &UserVirtualOrgInfoBuilder{}
	return builder
}

// 虚拟组织维度id
//
// 示例值：02c7141
func (builder *UserVirtualOrgInfoBuilder) Id(id string) *UserVirtualOrgInfoBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 虚拟组织下的部门信息
//
// 示例值：
func (builder *UserVirtualOrgInfoBuilder) Departments(departments []*Department) *UserVirtualOrgInfoBuilder {
	builder.departments = departments
	builder.departmentsFlag = true
	return builder
}

// 员工部门全路径节点 map<直属部门ID, list<部门基本信息>>;本字段不含根部门信息，部门顺序为父部门->当前部门\n例如：三级部门为员工当前部门，三级部门的父部门是二级部门，二级部门父部门是一级部门，一级部门的父部门是根部门\n返回 {3,[DepartmentBaseInfo{1,一级部门},DepartmentBaseInfo{2,二级部门}, DepartmentBaseInfo{3,三级部门}]}
//
// 示例值：
func (builder *UserVirtualOrgInfoBuilder) DepartmentPathBaseInfos(departmentPathBaseInfos []*DepartmentBaseInfo) *UserVirtualOrgInfoBuilder {
	builder.departmentPathBaseInfos = departmentPathBaseInfos
	builder.departmentPathBaseInfosFlag = true
	return builder
}

// 用户在部门内的排序信息， 第一个部门为主部门
//
// 示例值：
func (builder *UserVirtualOrgInfoBuilder) EmployeeOrderInDepartments(employeeOrderInDepartments []*UserDepartmentSortInfo) *UserVirtualOrgInfoBuilder {
	builder.employeeOrderInDepartments = employeeOrderInDepartments
	builder.employeeOrderInDepartmentsFlag = true
	return builder
}

// 虚拟上级
//
// 示例值：
func (builder *UserVirtualOrgInfoBuilder) Leaders(leaders []string) *UserVirtualOrgInfoBuilder {
	builder.leaders = leaders
	builder.leadersFlag = true
	return builder
}

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

	}
	if builder.departmentsFlag {
		req.Departments = builder.departments
	}
	if builder.departmentPathBaseInfosFlag {
		req.DepartmentPathBaseInfos = builder.departmentPathBaseInfos
	}
	if builder.employeeOrderInDepartmentsFlag {
		req.EmployeeOrderInDepartments = builder.employeeOrderInDepartments
	}
	if builder.leadersFlag {
		req.Leaders = builder.leaders
	}
	return req
}

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

	AssistRuleType *int `json:"assist_rule_type,omitempty"` // 规则集类型

	Subjects []*EntityInfo `json:"subjects,omitempty"` // 规则主体

	Objects []*EntityInfo `json:"objects,omitempty"` // 规则客体，类型只能为部门、用户、单位。不能为用户组

	Effect *int `json:"effect,omitempty"` // 权限操作

	MatchCondition *int `json:"match_condition,omitempty"` // 匹配条件
}

type VisibleAssistRuleBuilder struct {
	id     string // 规则ID
	idFlag bool

	assistRuleType     int // 规则集类型
	assistRuleTypeFlag bool

	subjects     []*EntityInfo // 规则主体
	subjectsFlag bool

	objects     []*EntityInfo // 规则客体，类型只能为部门、用户、单位。不能为用户组
	objectsFlag bool

	effect     int // 权限操作
	effectFlag bool

	matchCondition     int // 匹配条件
	matchConditionFlag bool
}

func NewVisibleAssistRuleBuilder() *VisibleAssistRuleBuilder {
	builder := &VisibleAssistRuleBuilder{}
	return builder
}

// 规则ID
//
// 示例值："7259644494420885523"
func (builder *VisibleAssistRuleBuilder) Id(id string) *VisibleAssistRuleBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 规则集类型
//
// 示例值：1
func (builder *VisibleAssistRuleBuilder) AssistRuleType(assistRuleType int) *VisibleAssistRuleBuilder {
	builder.assistRuleType = assistRuleType
	builder.assistRuleTypeFlag = true
	return builder
}

// 规则主体
//
// 示例值：
func (builder *VisibleAssistRuleBuilder) Subjects(subjects []*EntityInfo) *VisibleAssistRuleBuilder {
	builder.subjects = subjects
	builder.subjectsFlag = true
	return builder
}

// 规则客体，类型只能为部门、用户、单位。不能为用户组
//
// 示例值：
func (builder *VisibleAssistRuleBuilder) Objects(objects []*EntityInfo) *VisibleAssistRuleBuilder {
	builder.objects = objects
	builder.objectsFlag = true
	return builder
}

// 权限操作
//
// 示例值：1
func (builder *VisibleAssistRuleBuilder) Effect(effect int) *VisibleAssistRuleBuilder {
	builder.effect = effect
	builder.effectFlag = true
	return builder
}

// 匹配条件
//
// 示例值：
func (builder *VisibleAssistRuleBuilder) MatchCondition(matchCondition int) *VisibleAssistRuleBuilder {
	builder.matchCondition = matchCondition
	builder.matchConditionFlag = true
	return builder
}

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

	}
	if builder.assistRuleTypeFlag {
		req.AssistRuleType = &builder.assistRuleType

	}
	if builder.subjectsFlag {
		req.Subjects = builder.subjects
	}
	if builder.objectsFlag {
		req.Objects = builder.objects
	}
	if builder.effectFlag {
		req.Effect = &builder.effect

	}
	if builder.matchConditionFlag {
		req.MatchCondition = &builder.matchCondition

	}
	return req
}

type VisibleMainRule struct {
	MainRuleType *int `json:"main_rule_type,omitempty"` // 主规则类型

	UnitType *string `json:"unit_type,omitempty"` // 单位类型

	DeptLeaderVisibleTheDept *bool `json:"dept_leader_visible_the_dept,omitempty"` // 部门负责人可见自己负责的部门。仅在主规则类型为【成员不可见任何人】时可更改

	SubDeptsVisible *bool `json:"sub_depts_visible,omitempty"` // 是否可见子部门。只有在主规则类型为「成员可见本部门」时有效
}

type VisibleMainRuleBuilder struct {
	mainRuleType     int // 主规则类型
	mainRuleTypeFlag bool

	unitType     string // 单位类型
	unitTypeFlag bool

	deptLeaderVisibleTheDept     bool // 部门负责人可见自己负责的部门。仅在主规则类型为【成员不可见任何人】时可更改
	deptLeaderVisibleTheDeptFlag bool

	subDeptsVisible     bool // 是否可见子部门。只有在主规则类型为「成员可见本部门」时有效
	subDeptsVisibleFlag bool
}

func NewVisibleMainRuleBuilder() *VisibleMainRuleBuilder {
	builder := &VisibleMainRuleBuilder{}
	return builder
}

// 主规则类型
//
// 示例值：1
func (builder *VisibleMainRuleBuilder) MainRuleType(mainRuleType int) *VisibleMainRuleBuilder {
	builder.mainRuleType = mainRuleType
	builder.mainRuleTypeFlag = true
	return builder
}

// 单位类型
//
// 示例值：test
func (builder *VisibleMainRuleBuilder) UnitType(unitType string) *VisibleMainRuleBuilder {
	builder.unitType = unitType
	builder.unitTypeFlag = true
	return builder
}

// 部门负责人可见自己负责的部门。仅在主规则类型为【成员不可见任何人】时可更改
//
// 示例值：true
func (builder *VisibleMainRuleBuilder) DeptLeaderVisibleTheDept(deptLeaderVisibleTheDept bool) *VisibleMainRuleBuilder {
	builder.deptLeaderVisibleTheDept = deptLeaderVisibleTheDept
	builder.deptLeaderVisibleTheDeptFlag = true
	return builder
}

// 是否可见子部门。只有在主规则类型为「成员可见本部门」时有效
//
// 示例值：true
func (builder *VisibleMainRuleBuilder) SubDeptsVisible(subDeptsVisible bool) *VisibleMainRuleBuilder {
	builder.subDeptsVisible = subDeptsVisible
	builder.subDeptsVisibleFlag = true
	return builder
}

func (builder *VisibleMainRuleBuilder) Build() *VisibleMainRule {
	req := &VisibleMainRule{}
	if builder.mainRuleTypeFlag {
		req.MainRuleType = &builder.mainRuleType

	}
	if builder.unitTypeFlag {
		req.UnitType = &builder.unitType

	}
	if builder.deptLeaderVisibleTheDeptFlag {
		req.DeptLeaderVisibleTheDept = &builder.deptLeaderVisibleTheDept

	}
	if builder.subDeptsVisibleFlag {
		req.SubDeptsVisible = &builder.subDeptsVisible

	}
	return req
}

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

	CompanyOrganization *string `json:"company_organization,omitempty"` // 公司/组织

	Department *string `json:"department,omitempty"` // 部门

	Job *string `json:"job,omitempty"` // 岗位

	StartDate *string `json:"start_date,omitempty"` // 开始日期

	EndDate *string `json:"end_date,omitempty"` // 结束日期

	Description *string `json:"description,omitempty"` // 工作描述
}

type WorkExperienceBuilder struct {
	id     string // ID
	idFlag bool

	companyOrganization     string // 公司/组织
	companyOrganizationFlag bool

	department     string // 部门
	departmentFlag bool

	job     string // 岗位
	jobFlag bool

	startDate     string // 开始日期
	startDateFlag bool

	endDate     string // 结束日期
	endDateFlag bool

	description     string // 工作描述
	descriptionFlag bool
}

func NewWorkExperienceBuilder() *WorkExperienceBuilder {
	builder := &WorkExperienceBuilder{}
	return builder
}

// ID
//
// 示例值：7202465324939067391
func (builder *WorkExperienceBuilder) Id(id string) *WorkExperienceBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 公司/组织
//
// 示例值：暂无
func (builder *WorkExperienceBuilder) CompanyOrganization(companyOrganization string) *WorkExperienceBuilder {
	builder.companyOrganization = companyOrganization
	builder.companyOrganizationFlag = true
	return builder
}

// 部门
//
// 示例值：开发部
func (builder *WorkExperienceBuilder) Department(department string) *WorkExperienceBuilder {
	builder.department = department
	builder.departmentFlag = true
	return builder
}

// 岗位
//
// 示例值：测试工程师
func (builder *WorkExperienceBuilder) Job(job string) *WorkExperienceBuilder {
	builder.job = job
	builder.jobFlag = true
	return builder
}

// 开始日期
//
// 示例值：2007-07-20
func (builder *WorkExperienceBuilder) StartDate(startDate string) *WorkExperienceBuilder {
	builder.startDate = startDate
	builder.startDateFlag = true
	return builder
}

// 结束日期
//
// 示例值：2007-07-20
func (builder *WorkExperienceBuilder) EndDate(endDate string) *WorkExperienceBuilder {
	builder.endDate = endDate
	builder.endDateFlag = true
	return builder
}

// 工作描述
//
// 示例值：暂无
func (builder *WorkExperienceBuilder) Description(description string) *WorkExperienceBuilder {
	builder.description = description
	builder.descriptionFlag = true
	return builder
}

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

	}
	if builder.companyOrganizationFlag {
		req.CompanyOrganization = &builder.companyOrganization

	}
	if builder.departmentFlag {
		req.Department = &builder.department

	}
	if builder.jobFlag {
		req.Job = &builder.job

	}
	if builder.startDateFlag {
		req.StartDate = &builder.startDate

	}
	if builder.endDateFlag {
		req.EndDate = &builder.endDate

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

	}
	return req
}

type WorkStatus struct {
	Status *string `json:"status,omitempty"` // 工作状态

	DescriptionTemplates map[string]string `json:"description_templates,omitempty"` // 工作状态描述 "zh_cn"->"休假中"

	StartTime *string `json:"start_time,omitempty"` // 开始时间, 单位 秒

	EndTime *string `json:"end_time,omitempty"` // 结束时间, 单位 秒
}

type WorkStatusBuilder struct {
	status     string // 工作状态
	statusFlag bool

	descriptionTemplates     map[string]string // 工作状态描述 "zh_cn"->"休假中"
	descriptionTemplatesFlag bool

	startTime     string // 开始时间, 单位 秒
	startTimeFlag bool

	endTime     string // 结束时间, 单位 秒
	endTimeFlag bool
}

func NewWorkStatusBuilder() *WorkStatusBuilder {
	builder := &WorkStatusBuilder{}
	return builder
}

// 工作状态
//
// 示例值：无
func (builder *WorkStatusBuilder) Status(status string) *WorkStatusBuilder {
	builder.status = status
	builder.statusFlag = true
	return builder
}

// 工作状态描述 "zh_cn"->"休假中"
//
// 示例值：无
func (builder *WorkStatusBuilder) DescriptionTemplates(descriptionTemplates map[string]string) *WorkStatusBuilder {
	builder.descriptionTemplates = descriptionTemplates
	builder.descriptionTemplatesFlag = true
	return builder
}

// 开始时间, 单位 秒
//
// 示例值：无
func (builder *WorkStatusBuilder) StartTime(startTime string) *WorkStatusBuilder {
	builder.startTime = startTime
	builder.startTimeFlag = true
	return builder
}

// 结束时间, 单位 秒
//
// 示例值：无
func (builder *WorkStatusBuilder) EndTime(endTime string) *WorkStatusBuilder {
	builder.endTime = endTime
	builder.endTimeFlag = true
	return builder
}

func (builder *WorkStatusBuilder) Build() *WorkStatus {
	req := &WorkStatus{}
	if builder.statusFlag {
		req.Status = &builder.status

	}
	if builder.descriptionTemplatesFlag {
		req.DescriptionTemplates = builder.descriptionTemplates
	}
	if builder.startTimeFlag {
		req.StartTime = &builder.startTime

	}
	if builder.endTimeFlag {
		req.EndTime = &builder.endTime

	}
	return req
}

type WuKongEnum struct {
	Name *I18nText `json:"name,omitempty"` // i18n文本

	ApiName *string `json:"api_name,omitempty"` // 枚举名
}

type WuKongEnumBuilder struct {
	name     *I18nText // i18n文本
	nameFlag bool

	apiName     string // 枚举名
	apiNameFlag bool
}

func NewWuKongEnumBuilder() *WuKongEnumBuilder {
	builder := &WuKongEnumBuilder{}
	return builder
}

// i18n文本
//
// 示例值：
func (builder *WuKongEnumBuilder) Name(name *I18nText) *WuKongEnumBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 枚举名
//
// 示例值：Job
func (builder *WuKongEnumBuilder) ApiName(apiName string) *WuKongEnumBuilder {
	builder.apiName = apiName
	builder.apiNameFlag = true
	return builder
}

func (builder *WuKongEnumBuilder) Build() *WuKongEnum {
	req := &WuKongEnum{}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.apiNameFlag {
		req.ApiName = &builder.apiName

	}
	return req
}

type CreateCollaborationRuleReqBodyBuilder struct {
	subjects     *CollaborationRuleEntities // 实体数量之和需要小于100
	subjectsFlag bool

	objects     *CollaborationRuleEntities // 实体数量之和需要小于100
	objectsFlag bool
}

func NewCreateCollaborationRuleReqBodyBuilder() *CreateCollaborationRuleReqBodyBuilder {
	builder := &CreateCollaborationRuleReqBodyBuilder{}
	return builder
}

// 实体数量之和需要小于100
//
//示例值：
func (builder *CreateCollaborationRuleReqBodyBuilder) Subjects(subjects *CollaborationRuleEntities) *CreateCollaborationRuleReqBodyBuilder {
	builder.subjects = subjects
	builder.subjectsFlag = true
	return builder
}

// 实体数量之和需要小于100
//
//示例值：
func (builder *CreateCollaborationRuleReqBodyBuilder) Objects(objects *CollaborationRuleEntities) *CreateCollaborationRuleReqBodyBuilder {
	builder.objects = objects
	builder.objectsFlag = true
	return builder
}

func (builder *CreateCollaborationRuleReqBodyBuilder) Build() *CreateCollaborationRuleReqBody {
	req := &CreateCollaborationRuleReqBody{}
	if builder.subjectsFlag {
		req.Subjects = builder.subjects
	}
	if builder.objectsFlag {
		req.Objects = builder.objects
	}
	return req
}

type CreateCollaborationRulePathReqBodyBuilder struct {
	subjects     *CollaborationRuleEntities
	subjectsFlag bool
	objects      *CollaborationRuleEntities
	objectsFlag  bool
}

func NewCreateCollaborationRulePathReqBodyBuilder() *CreateCollaborationRulePathReqBodyBuilder {
	builder := &CreateCollaborationRulePathReqBodyBuilder{}
	return builder
}

// 实体数量之和需要小于100
//
// 示例值：
func (builder *CreateCollaborationRulePathReqBodyBuilder) Subjects(subjects *CollaborationRuleEntities) *CreateCollaborationRulePathReqBodyBuilder {
	builder.subjects = subjects
	builder.subjectsFlag = true
	return builder
}

// 实体数量之和需要小于100
//
// 示例值：
func (builder *CreateCollaborationRulePathReqBodyBuilder) Objects(objects *CollaborationRuleEntities) *CreateCollaborationRulePathReqBodyBuilder {
	builder.objects = objects
	builder.objectsFlag = true
	return builder
}

func (builder *CreateCollaborationRulePathReqBodyBuilder) Build() (*CreateCollaborationRuleReqBody, error) {
	req := &CreateCollaborationRuleReqBody{}
	if builder.subjectsFlag {
		req.Subjects = builder.subjects
	}
	if builder.objectsFlag {
		req.Objects = builder.objects
	}
	return req, nil
}

type CreateCollaborationRuleReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *CreateCollaborationRuleReqBody
}

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

// 对方租户的tenant key
//
// 示例值：test_key
func (builder *CreateCollaborationRuleReqBuilder) TargetTenantKey(targetTenantKey string) *CreateCollaborationRuleReqBuilder {
	builder.apiReq.QueryParams.Set("target_tenant_key", fmt.Sprint(targetTenantKey))
	return builder
}

// 租户ID，默认会从identity_ticket获取，获取不到的会从参数获取，取不到或认证失败会报错
//
// 示例值：1
func (builder *CreateCollaborationRuleReqBuilder) TenantId(tenantId string) *CreateCollaborationRuleReqBuilder {
	builder.apiReq.QueryParams.Set("tenant_id", fmt.Sprint(tenantId))
	return builder
}

// 创建关联组织规则
func (builder *CreateCollaborationRuleReqBuilder) Body(body *CreateCollaborationRuleReqBody) *CreateCollaborationRuleReqBuilder {
	builder.body = body
	return builder
}

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

type CreateCollaborationRuleReqBody struct {
	Subjects *CollaborationRuleEntities `json:"subjects,omitempty"` // 实体数量之和需要小于100

	Objects *CollaborationRuleEntities `json:"objects,omitempty"` // 实体数量之和需要小于100
}

type CreateCollaborationRuleReq struct {
	apiReq *larkcore.ApiReq
	Body   *CreateCollaborationRuleReqBody `body:""`
}

type CreateCollaborationRuleRespData struct {
	AddRuleId *string `json:"add_rule_id,omitempty"` // 添加的规则ID
}

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

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

type DeleteCollaborationRuleReqBuilder struct {
	apiReq *larkcore.ApiReq
}

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

// 规则ID
//
// 示例值：2121
func (builder *DeleteCollaborationRuleReqBuilder) CollaborationRuleId(collaborationRuleId string) *DeleteCollaborationRuleReqBuilder {
	builder.apiReq.PathParams.Set("collaboration_rule_id", fmt.Sprint(collaborationRuleId))
	return builder
}

// 对方租户的tenant key
//
// 示例值：test_key
func (builder *DeleteCollaborationRuleReqBuilder) TargetTenantKey(targetTenantKey string) *DeleteCollaborationRuleReqBuilder {
	builder.apiReq.QueryParams.Set("target_tenant_key", fmt.Sprint(targetTenantKey))
	return builder
}

// 租户ID，默认会从identity_ticket获取，获取不到的会从参数获取，取不到或认证失败会报错
//
// 示例值：1
func (builder *DeleteCollaborationRuleReqBuilder) TenantId(tenantId string) *DeleteCollaborationRuleReqBuilder {
	builder.apiReq.QueryParams.Set("tenant_id", fmt.Sprint(tenantId))
	return builder
}

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

type DeleteCollaborationRuleReq struct {
	apiReq *larkcore.ApiReq
}

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

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

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

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

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

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

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

// 对方租户的tenant key
//
// 示例值：test_key
func (builder *ListCollaborationRuleReqBuilder) TargetTenantKey(targetTenantKey string) *ListCollaborationRuleReqBuilder {
	builder.apiReq.QueryParams.Set("target_tenant_key", fmt.Sprint(targetTenantKey))
	return builder
}

// 租户ID，默认会从identity_ticket获取，获取不到的会从参数获取，取不到或认证失败会报错
//
// 示例值：1
func (builder *ListCollaborationRuleReqBuilder) TenantId(tenantId string) *ListCollaborationRuleReqBuilder {
	builder.apiReq.QueryParams.Set("tenant_id", fmt.Sprint(tenantId))
	return builder
}

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

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

}

type ListCollaborationRuleRespData struct {
	Items []*CollaborationRule `json:"items,omitempty"` // 规则列表

	PageToken *string `json:"page_token,omitempty"` // 分页标记，第一次请求不填，表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该 page_token 获取查询结果

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

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

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

type UpdateCollaborationRuleReqBodyBuilder struct {
	subjects     *CollaborationRuleEntities // 实体数量之和需要小于100
	subjectsFlag bool

	objects     *CollaborationRuleEntities // 实体数量之和需要小于100
	objectsFlag bool
}

func NewUpdateCollaborationRuleReqBodyBuilder() *UpdateCollaborationRuleReqBodyBuilder {
	builder := &UpdateCollaborationRuleReqBodyBuilder{}
	return builder
}

// 实体数量之和需要小于100
//
//示例值：
func (builder *UpdateCollaborationRuleReqBodyBuilder) Subjects(subjects *CollaborationRuleEntities) *UpdateCollaborationRuleReqBodyBuilder {
	builder.subjects = subjects
	builder.subjectsFlag = true
	return builder
}

// 实体数量之和需要小于100
//
//示例值：
func (builder *UpdateCollaborationRuleReqBodyBuilder) Objects(objects *CollaborationRuleEntities) *UpdateCollaborationRuleReqBodyBuilder {
	builder.objects = objects
	builder.objectsFlag = true
	return builder
}

func (builder *UpdateCollaborationRuleReqBodyBuilder) Build() *UpdateCollaborationRuleReqBody {
	req := &UpdateCollaborationRuleReqBody{}
	if builder.subjectsFlag {
		req.Subjects = builder.subjects
	}
	if builder.objectsFlag {
		req.Objects = builder.objects
	}
	return req
}

type UpdateCollaborationRulePathReqBodyBuilder struct {
	subjects     *CollaborationRuleEntities
	subjectsFlag bool
	objects      *CollaborationRuleEntities
	objectsFlag  bool
}

func NewUpdateCollaborationRulePathReqBodyBuilder() *UpdateCollaborationRulePathReqBodyBuilder {
	builder := &UpdateCollaborationRulePathReqBodyBuilder{}
	return builder
}

// 实体数量之和需要小于100
//
// 示例值：
func (builder *UpdateCollaborationRulePathReqBodyBuilder) Subjects(subjects *CollaborationRuleEntities) *UpdateCollaborationRulePathReqBodyBuilder {
	builder.subjects = subjects
	builder.subjectsFlag = true
	return builder
}

// 实体数量之和需要小于100
//
// 示例值：
func (builder *UpdateCollaborationRulePathReqBodyBuilder) Objects(objects *CollaborationRuleEntities) *UpdateCollaborationRulePathReqBodyBuilder {
	builder.objects = objects
	builder.objectsFlag = true
	return builder
}

func (builder *UpdateCollaborationRulePathReqBodyBuilder) Build() (*UpdateCollaborationRuleReqBody, error) {
	req := &UpdateCollaborationRuleReqBody{}
	if builder.subjectsFlag {
		req.Subjects = builder.subjects
	}
	if builder.objectsFlag {
		req.Objects = builder.objects
	}
	return req, nil
}

type UpdateCollaborationRuleReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *UpdateCollaborationRuleReqBody
}

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

// 规则ID
//
// 示例值：12121
func (builder *UpdateCollaborationRuleReqBuilder) CollaborationRuleId(collaborationRuleId string) *UpdateCollaborationRuleReqBuilder {
	builder.apiReq.PathParams.Set("collaboration_rule_id", fmt.Sprint(collaborationRuleId))
	return builder
}

// 对方租户的tenant key
//
// 示例值：test_key
func (builder *UpdateCollaborationRuleReqBuilder) TargetTenantKey(targetTenantKey string) *UpdateCollaborationRuleReqBuilder {
	builder.apiReq.QueryParams.Set("target_tenant_key", fmt.Sprint(targetTenantKey))
	return builder
}

// 租户ID，默认会从identity_ticket获取，获取不到的会从参数获取，取不到或认证失败会报错
//
// 示例值：1
func (builder *UpdateCollaborationRuleReqBuilder) TenantId(tenantId string) *UpdateCollaborationRuleReqBuilder {
	builder.apiReq.QueryParams.Set("tenant_id", fmt.Sprint(tenantId))
	return builder
}

// 更新关联组织规则
func (builder *UpdateCollaborationRuleReqBuilder) Body(body *UpdateCollaborationRuleReqBody) *UpdateCollaborationRuleReqBuilder {
	builder.body = body
	return builder
}

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

type UpdateCollaborationRuleReqBody struct {
	Subjects *CollaborationRuleEntities `json:"subjects,omitempty"` // 实体数量之和需要小于100

	Objects *CollaborationRuleEntities `json:"objects,omitempty"` // 实体数量之和需要小于100
}

type UpdateCollaborationRuleReq struct {
	apiReq *larkcore.ApiReq
	Body   *UpdateCollaborationRuleReqBody `body:""`
}

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

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

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

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

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

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

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

// 租户ID，默认会从identity_ticket获取，获取不到的会从参数获取，取不到或认证失败会报错
//
// 示例值：1
func (builder *ListCollaborationTenantReqBuilder) TenantId(tenantId string) *ListCollaborationTenantReqBuilder {
	builder.apiReq.QueryParams.Set("tenant_id", fmt.Sprint(tenantId))
	return builder
}

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

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

}

type ListCollaborationTenantRespData struct {
	Items []*CollaborationTenant `json:"items,omitempty"` // 对方的关联组织信息

	PageToken *string `json:"page_token,omitempty"` // 分页标记，第一次请求不填，表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该 page_token 获取查询结果

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

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

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

type ListCollborationShareEntityReqBuilder struct {
	apiReq *larkcore.ApiReq
}

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

// 对方租户的tenant key
//
// 示例值：test_key
func (builder *ListCollborationShareEntityReqBuilder) TargetTenantKey(targetTenantKey string) *ListCollborationShareEntityReqBuilder {
	builder.apiReq.QueryParams.Set("target_tenant_key", fmt.Sprint(targetTenantKey))
	return builder
}

// 不填写该参数为租户的分享范围，可填写该字段继续下钻查看指定部门下的子部门+成员。填写0分为两种情况，若租户分享的为全员则展示一级部门，否则展示分享的部门+成员。
//
// 示例值：test_key
func (builder *ListCollborationShareEntityReqBuilder) TargetDepartmentId(targetDepartmentId string) *ListCollborationShareEntityReqBuilder {
	builder.apiReq.QueryParams.Set("target_department_id", fmt.Sprint(targetDepartmentId))
	return builder
}

// 获取用户组下的成员，填写该值后忽略target_department_id
//
// 示例值：test_key
func (builder *ListCollborationShareEntityReqBuilder) TargetGroupId(targetGroupId string) *ListCollborationShareEntityReqBuilder {
	builder.apiReq.QueryParams.Set("target_group_id", fmt.Sprint(targetGroupId))
	return builder
}

// 是否主体租户分享范围，默认是客体租户的分享范围
//
// 示例值：
func (builder *ListCollborationShareEntityReqBuilder) IsSelectSubject(isSelectSubject bool) *ListCollborationShareEntityReqBuilder {
	builder.apiReq.QueryParams.Set("is_select_subject", fmt.Sprint(isSelectSubject))
	return builder
}

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

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

// 租户ID，默认会从identity_ticket获取，获取不到的会从参数获取，取不到或认证失败会报错
//
// 示例值：1
func (builder *ListCollborationShareEntityReqBuilder) TenantId(tenantId string) *ListCollborationShareEntityReqBuilder {
	builder.apiReq.QueryParams.Set("tenant_id", fmt.Sprint(tenantId))
	return builder
}

func (builder *ListCollborationShareEntityReqBuilder) Build() *ListCollborationShareEntityReq {
	req := &ListCollborationShareEntityReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type ListCollborationShareEntityReq struct {
	apiReq *larkcore.ApiReq
}

type ListCollborationShareEntityRespData struct {
	PageToken *string `json:"page_token,omitempty"` // 分页标记，第一次请求不填，表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该 page_token 获取查询结果

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

	ShareDepartments []*ShareDepartment `json:"share_departments,omitempty"` // 分享的部门信息

	ShareGroups []*ShareGroup `json:"share_groups,omitempty"` // 分享的用户组信息

	ShareUsers []*ShareUser `json:"share_users,omitempty"` // 分享的用户信息
}

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

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

type CreateDepartmentReqBodyBuilder struct {
	department     *CreateDepartment // 创建部门
	departmentFlag bool
}

func NewCreateDepartmentReqBodyBuilder() *CreateDepartmentReqBodyBuilder {
	builder := &CreateDepartmentReqBodyBuilder{}
	return builder
}

// 创建部门
//
//示例值：
func (builder *CreateDepartmentReqBodyBuilder) Department(department *CreateDepartment) *CreateDepartmentReqBodyBuilder {
	builder.department = department
	builder.departmentFlag = true
	return builder
}

func (builder *CreateDepartmentReqBodyBuilder) Build() *CreateDepartmentReqBody {
	req := &CreateDepartmentReqBody{}
	if builder.departmentFlag {
		req.Department = builder.department
	}
	return req
}

type CreateDepartmentPathReqBodyBuilder struct {
	department     *CreateDepartment
	departmentFlag bool
}

func NewCreateDepartmentPathReqBodyBuilder() *CreateDepartmentPathReqBodyBuilder {
	builder := &CreateDepartmentPathReqBodyBuilder{}
	return builder
}

// 创建部门
//
// 示例值：
func (builder *CreateDepartmentPathReqBodyBuilder) Department(department *CreateDepartment) *CreateDepartmentPathReqBodyBuilder {
	builder.department = department
	builder.departmentFlag = true
	return builder
}

func (builder *CreateDepartmentPathReqBodyBuilder) Build() (*CreateDepartmentReqBody, error) {
	req := &CreateDepartmentReqBody{}
	if builder.departmentFlag {
		req.Department = builder.department
	}
	return req, nil
}

type CreateDepartmentReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *CreateDepartmentReqBody
}

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

// 此次调用中使用的用户ID的类型
//
// 示例值：open_id
func (builder *CreateDepartmentReqBuilder) EmployeeIdType(employeeIdType string) *CreateDepartmentReqBuilder {
	builder.apiReq.QueryParams.Set("employee_id_type", fmt.Sprint(employeeIdType))
	return builder
}

// 此次调用中使用的部门ID的类型
//
// 示例值：open_department_id
func (builder *CreateDepartmentReqBuilder) DepartmentIdType(departmentIdType string) *CreateDepartmentReqBuilder {
	builder.apiReq.QueryParams.Set("department_id_type", fmt.Sprint(departmentIdType))
	return builder
}

// adminRole鉴权
//
// 示例值：
func (builder *CreateDepartmentReqBuilder) IsAdminRole(isAdminRole bool) *CreateDepartmentReqBuilder {
	builder.apiReq.QueryParams.Set("is_admin_role", fmt.Sprint(isAdminRole))
	return builder
}

// 租户ID
//
// 示例值：100
func (builder *CreateDepartmentReqBuilder) TenantId(tenantId string) *CreateDepartmentReqBuilder {
	builder.apiReq.QueryParams.Set("tenant_id", fmt.Sprint(tenantId))
	return builder
}

// 创建部门信息
func (builder *CreateDepartmentReqBuilder) Body(body *CreateDepartmentReqBody) *CreateDepartmentReqBuilder {
	builder.body = body
	return builder
}

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

type CreateDepartmentReqBody struct {
	Department *CreateDepartment `json:"department,omitempty"` // 创建部门
}

type CreateDepartmentReq struct {
	apiReq *larkcore.ApiReq
	Body   *CreateDepartmentReqBody `body:""`
}

type CreateDepartmentRespData struct {
	DepartmentId *string `json:"department_id,omitempty"` // 部门ID
}

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

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

type DeleteDepartmentReqBuilder struct {
	apiReq *larkcore.ApiReq
}

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

// 部门ID
//
// 示例值：weasdqwe
func (builder *DeleteDepartmentReqBuilder) DepartmentId(departmentId string) *DeleteDepartmentReqBuilder {
	builder.apiReq.PathParams.Set("department_id", fmt.Sprint(departmentId))
	return builder
}

// 此次调用中使用的部门ID的类型
//
// 示例值：open_department_id
func (builder *DeleteDepartmentReqBuilder) DepartmentIdType(departmentIdType string) *DeleteDepartmentReqBuilder {
	builder.apiReq.QueryParams.Set("department_id_type", fmt.Sprint(departmentIdType))
	return builder
}

// adminRole鉴权
//
// 示例值：
func (builder *DeleteDepartmentReqBuilder) IsAdminRole(isAdminRole bool) *DeleteDepartmentReqBuilder {
	builder.apiReq.QueryParams.Set("is_admin_role", fmt.Sprint(isAdminRole))
	return builder
}

// 员工ID类型
//
// 示例值：open_id
func (builder *DeleteDepartmentReqBuilder) EmployeeIdType(employeeIdType string) *DeleteDepartmentReqBuilder {
	builder.apiReq.QueryParams.Set("employee_id_type", fmt.Sprint(employeeIdType))
	return builder
}

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

type DeleteDepartmentReq struct {
	apiReq *larkcore.ApiReq
}

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

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

type FilterDepartmentReqBodyBuilder struct {
	filter     *MultiFilterCondition // 查询条件
	filterFlag bool

	requiredFields     []string // 需要查询的字段列表。将按照传递的字段列表返回有权限的行、列数据。不传则不会返回任何字段
	requiredFieldsFlag bool

	pageRequest     *PageCondition // 分页信息
	pageRequestFlag bool
}

func NewFilterDepartmentReqBodyBuilder() *FilterDepartmentReqBodyBuilder {
	builder := &FilterDepartmentReqBodyBuilder{}
	return builder
}

// 查询条件
//
//示例值：
func (builder *FilterDepartmentReqBodyBuilder) Filter(filter *MultiFilterCondition) *FilterDepartmentReqBodyBuilder {
	builder.filter = filter
	builder.filterFlag = true
	return builder
}

// 需要查询的字段列表。将按照传递的字段列表返回有权限的行、列数据。不传则不会返回任何字段
//
//示例值：
func (builder *FilterDepartmentReqBodyBuilder) RequiredFields(requiredFields []string) *FilterDepartmentReqBodyBuilder {
	builder.requiredFields = requiredFields
	builder.requiredFieldsFlag = true
	return builder
}

// 分页信息
//
//示例值：
func (builder *FilterDepartmentReqBodyBuilder) PageRequest(pageRequest *PageCondition) *FilterDepartmentReqBodyBuilder {
	builder.pageRequest = pageRequest
	builder.pageRequestFlag = true
	return builder
}

func (builder *FilterDepartmentReqBodyBuilder) Build() *FilterDepartmentReqBody {
	req := &FilterDepartmentReqBody{}
	if builder.filterFlag {
		req.Filter = builder.filter
	}
	if builder.requiredFieldsFlag {
		req.RequiredFields = builder.requiredFields
	}
	if builder.pageRequestFlag {
		req.PageRequest = builder.pageRequest
	}
	return req
}

type FilterDepartmentPathReqBodyBuilder struct {
	filter             *MultiFilterCondition
	filterFlag         bool
	requiredFields     []string
	requiredFieldsFlag bool
	pageRequest        *PageCondition
	pageRequestFlag    bool
}

func NewFilterDepartmentPathReqBodyBuilder() *FilterDepartmentPathReqBodyBuilder {
	builder := &FilterDepartmentPathReqBodyBuilder{}
	return builder
}

// 查询条件
//
// 示例值：
func (builder *FilterDepartmentPathReqBodyBuilder) Filter(filter *MultiFilterCondition) *FilterDepartmentPathReqBodyBuilder {
	builder.filter = filter
	builder.filterFlag = true
	return builder
}

// 需要查询的字段列表。将按照传递的字段列表返回有权限的行、列数据。不传则不会返回任何字段
//
// 示例值：
func (builder *FilterDepartmentPathReqBodyBuilder) RequiredFields(requiredFields []string) *FilterDepartmentPathReqBodyBuilder {
	builder.requiredFields = requiredFields
	builder.requiredFieldsFlag = true
	return builder
}

// 分页信息
//
// 示例值：
func (builder *FilterDepartmentPathReqBodyBuilder) PageRequest(pageRequest *PageCondition) *FilterDepartmentPathReqBodyBuilder {
	builder.pageRequest = pageRequest
	builder.pageRequestFlag = true
	return builder
}

func (builder *FilterDepartmentPathReqBodyBuilder) Build() (*FilterDepartmentReqBody, error) {
	req := &FilterDepartmentReqBody{}
	if builder.filterFlag {
		req.Filter = builder.filter
	}
	if builder.requiredFieldsFlag {
		req.RequiredFields = builder.requiredFields
	}
	if builder.pageRequestFlag {
		req.PageRequest = builder.pageRequest
	}
	return req, nil
}

type FilterDepartmentReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *FilterDepartmentReqBody
}

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

// 此次调用中使用的用户ID的类型
//
// 示例值：open_id
func (builder *FilterDepartmentReqBuilder) EmployeeIdType(employeeIdType string) *FilterDepartmentReqBuilder {
	builder.apiReq.QueryParams.Set("employee_id_type", fmt.Sprint(employeeIdType))
	return builder
}

// 此次调用中使用的部门ID的类型
//
// 示例值：open_department_id
func (builder *FilterDepartmentReqBuilder) DepartmentIdType(departmentIdType string) *FilterDepartmentReqBuilder {
	builder.apiReq.QueryParams.Set("department_id_type", fmt.Sprint(departmentIdType))
	return builder
}

// adminRole鉴权
//
// 示例值：
func (builder *FilterDepartmentReqBuilder) IsAdminRole(isAdminRole bool) *FilterDepartmentReqBuilder {
	builder.apiReq.QueryParams.Set("is_admin_role", fmt.Sprint(isAdminRole))
	return builder
}

// 租户ID
//
// 示例值：1
func (builder *FilterDepartmentReqBuilder) TenantId(tenantId string) *FilterDepartmentReqBuilder {
	builder.apiReq.QueryParams.Set("tenant_id", fmt.Sprint(tenantId))
	return builder
}

// 查询部门ID列表
func (builder *FilterDepartmentReqBuilder) Body(body *FilterDepartmentReqBody) *FilterDepartmentReqBuilder {
	builder.body = body
	return builder
}

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

type FilterDepartmentReqBody struct {
	Filter *MultiFilterCondition `json:"filter,omitempty"` // 查询条件

	RequiredFields []string `json:"required_fields,omitempty"` // 需要查询的字段列表。将按照传递的字段列表返回有权限的行、列数据。不传则不会返回任何字段

	PageRequest *PageCondition `json:"page_request,omitempty"` // 分页信息
}

type FilterDepartmentReq struct {
	apiReq *larkcore.ApiReq
	Body   *FilterDepartmentReqBody `body:""`
}

type FilterDepartmentRespData struct {
	Departments []*Department `json:"departments,omitempty"` // 部门信息

	PageResponse *PageResponse `json:"page_response,omitempty"` // 分页结果

	Abnormals []*AbnormalRecord `json:"abnormals,omitempty"` // 异常信息
}

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

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

type MgetDepartmentReqBodyBuilder struct {
	departmentIds     []string // 部门id
	departmentIdsFlag bool

	requiredFields     []string // 字段枚举
	requiredFieldsFlag bool
}

func NewMgetDepartmentReqBodyBuilder() *MgetDepartmentReqBodyBuilder {
	builder := &MgetDepartmentReqBodyBuilder{}
	return builder
}

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

// 字段枚举
//
//示例值：
func (builder *MgetDepartmentReqBodyBuilder) RequiredFields(requiredFields []string) *MgetDepartmentReqBodyBuilder {
	builder.requiredFields = requiredFields
	builder.requiredFieldsFlag = true
	return builder
}

func (builder *MgetDepartmentReqBodyBuilder) Build() *MgetDepartmentReqBody {
	req := &MgetDepartmentReqBody{}
	if builder.departmentIdsFlag {
		req.DepartmentIds = builder.departmentIds
	}
	if builder.requiredFieldsFlag {
		req.RequiredFields = builder.requiredFields
	}
	return req
}

type MgetDepartmentPathReqBodyBuilder struct {
	departmentIds      []string
	departmentIdsFlag  bool
	requiredFields     []string
	requiredFieldsFlag bool
}

func NewMgetDepartmentPathReqBodyBuilder() *MgetDepartmentPathReqBodyBuilder {
	builder := &MgetDepartmentPathReqBodyBuilder{}
	return builder
}

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

// 字段枚举
//
// 示例值：
func (builder *MgetDepartmentPathReqBodyBuilder) RequiredFields(requiredFields []string) *MgetDepartmentPathReqBodyBuilder {
	builder.requiredFields = requiredFields
	builder.requiredFieldsFlag = true
	return builder
}

func (builder *MgetDepartmentPathReqBodyBuilder) Build() (*MgetDepartmentReqBody, error) {
	req := &MgetDepartmentReqBody{}
	if builder.departmentIdsFlag {
		req.DepartmentIds = builder.departmentIds
	}
	if builder.requiredFieldsFlag {
		req.RequiredFields = builder.requiredFields
	}
	return req, nil
}

type MgetDepartmentReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *MgetDepartmentReqBody
}

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

// 此次调用中使用的用户ID的类型
//
// 示例值：user_id
func (builder *MgetDepartmentReqBuilder) EmployeeIdType(employeeIdType string) *MgetDepartmentReqBuilder {
	builder.apiReq.QueryParams.Set("employee_id_type", fmt.Sprint(employeeIdType))
	return builder
}

// 此次调用中使用的部门ID的类型
//
// 示例值：department_id
func (builder *MgetDepartmentReqBuilder) DepartmentIdType(departmentIdType string) *MgetDepartmentReqBuilder {
	builder.apiReq.QueryParams.Set("department_id_type", fmt.Sprint(departmentIdType))
	return builder
}

// adminRole鉴权
//
// 示例值：
func (builder *MgetDepartmentReqBuilder) IsAdminRole(isAdminRole bool) *MgetDepartmentReqBuilder {
	builder.apiReq.QueryParams.Set("is_admin_role", fmt.Sprint(isAdminRole))
	return builder
}

// 查询部门
func (builder *MgetDepartmentReqBuilder) Body(body *MgetDepartmentReqBody) *MgetDepartmentReqBuilder {
	builder.body = body
	return builder
}

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

type MgetDepartmentReqBody struct {
	DepartmentIds []string `json:"department_ids,omitempty"` // 部门id

	RequiredFields []string `json:"required_fields,omitempty"` // 字段枚举
}

type MgetDepartmentReq struct {
	apiReq *larkcore.ApiReq
	Body   *MgetDepartmentReqBody `body:""`
}

type MgetDepartmentRespData struct {
	Departments []*Department `json:"departments,omitempty"` // 部门信息

	Abnormals []*AbnormalRecord `json:"abnormals,omitempty"` // 字段异常信息
}

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

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

type PatchDepartmentReqBodyBuilder struct {
	department     *UpdateDepartment // 更新部门
	departmentFlag bool
}

func NewPatchDepartmentReqBodyBuilder() *PatchDepartmentReqBodyBuilder {
	builder := &PatchDepartmentReqBodyBuilder{}
	return builder
}

// 更新部门
//
//示例值：
func (builder *PatchDepartmentReqBodyBuilder) Department(department *UpdateDepartment) *PatchDepartmentReqBodyBuilder {
	builder.department = department
	builder.departmentFlag = true
	return builder
}

func (builder *PatchDepartmentReqBodyBuilder) Build() *PatchDepartmentReqBody {
	req := &PatchDepartmentReqBody{}
	if builder.departmentFlag {
		req.Department = builder.department
	}
	return req
}

type PatchDepartmentPathReqBodyBuilder struct {
	department     *UpdateDepartment
	departmentFlag bool
}

func NewPatchDepartmentPathReqBodyBuilder() *PatchDepartmentPathReqBodyBuilder {
	builder := &PatchDepartmentPathReqBodyBuilder{}
	return builder
}

// 更新部门
//
// 示例值：
func (builder *PatchDepartmentPathReqBodyBuilder) Department(department *UpdateDepartment) *PatchDepartmentPathReqBodyBuilder {
	builder.department = department
	builder.departmentFlag = true
	return builder
}

func (builder *PatchDepartmentPathReqBodyBuilder) Build() (*PatchDepartmentReqBody, error) {
	req := &PatchDepartmentReqBody{}
	if builder.departmentFlag {
		req.Department = builder.department
	}
	return req, nil
}

type PatchDepartmentReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *PatchDepartmentReqBody
}

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

// 部门ID
//
// 示例值：h12921
func (builder *PatchDepartmentReqBuilder) DepartmentId(departmentId string) *PatchDepartmentReqBuilder {
	builder.apiReq.PathParams.Set("department_id", fmt.Sprint(departmentId))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：open_id
func (builder *PatchDepartmentReqBuilder) EmployeeIdType(employeeIdType string) *PatchDepartmentReqBuilder {
	builder.apiReq.QueryParams.Set("employee_id_type", fmt.Sprint(employeeIdType))
	return builder
}

// 此次调用中使用的部门ID的类型
//
// 示例值：open_department_id
func (builder *PatchDepartmentReqBuilder) DepartmentIdType(departmentIdType string) *PatchDepartmentReqBuilder {
	builder.apiReq.QueryParams.Set("department_id_type", fmt.Sprint(departmentIdType))
	return builder
}

// adminRole鉴权
//
// 示例值：
func (builder *PatchDepartmentReqBuilder) IsAdminRole(isAdminRole bool) *PatchDepartmentReqBuilder {
	builder.apiReq.QueryParams.Set("is_admin_role", fmt.Sprint(isAdminRole))
	return builder
}

// 更新部门信息
func (builder *PatchDepartmentReqBuilder) Body(body *PatchDepartmentReqBody) *PatchDepartmentReqBuilder {
	builder.body = body
	return builder
}

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

type PatchDepartmentReqBody struct {
	Department *UpdateDepartment `json:"department,omitempty"` // 更新部门
}

type PatchDepartmentReq struct {
	apiReq *larkcore.ApiReq
	Body   *PatchDepartmentReqBody `body:""`
}

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

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

type SearchDepartmentReqBodyBuilder struct {
	query     string // 搜索关键词。支持部门名称的搜索
	queryFlag bool

	pageRequest     *PageCondition // 分页信息
	pageRequestFlag bool

	requiredFields     []string // 需要查询的字段列表。将按照传递的字段列表返回有权限的行、列数据。不传则不会返回任何字段
	requiredFieldsFlag bool

	filter     *SearchDepartmentFilter // 查询条件
	filterFlag bool
}

func NewSearchDepartmentReqBodyBuilder() *SearchDepartmentReqBodyBuilder {
	builder := &SearchDepartmentReqBodyBuilder{}
	return builder
}

// 搜索关键词。支持部门名称的搜索
//
//示例值：zhang
func (builder *SearchDepartmentReqBodyBuilder) Query(query string) *SearchDepartmentReqBodyBuilder {
	builder.query = query
	builder.queryFlag = true
	return builder
}

// 分页信息
//
//示例值：
func (builder *SearchDepartmentReqBodyBuilder) PageRequest(pageRequest *PageCondition) *SearchDepartmentReqBodyBuilder {
	builder.pageRequest = pageRequest
	builder.pageRequestFlag = true
	return builder
}

// 需要查询的字段列表。将按照传递的字段列表返回有权限的行、列数据。不传则不会返回任何字段
//
//示例值：
func (builder *SearchDepartmentReqBodyBuilder) RequiredFields(requiredFields []string) *SearchDepartmentReqBodyBuilder {
	builder.requiredFields = requiredFields
	builder.requiredFieldsFlag = true
	return builder
}

func (builder *SearchDepartmentReqBodyBuilder) Build() *SearchDepartmentReqBody {
	req := &SearchDepartmentReqBody{}
	if builder.queryFlag {
		req.Query = &builder.query
	}
	if builder.pageRequestFlag {
		req.PageRequest = builder.pageRequest
	}
	if builder.requiredFieldsFlag {
		req.RequiredFields = builder.requiredFields
	}
	return req
}

type SearchDepartmentPathReqBodyBuilder struct {
	query              string
	queryFlag          bool
	pageRequest        *PageCondition
	pageRequestFlag    bool
	requiredFields     []string
	requiredFieldsFlag bool
	filter             *SearchDepartmentFilter
	filterFlag         bool
}

func NewSearchDepartmentPathReqBodyBuilder() *SearchDepartmentPathReqBodyBuilder {
	builder := &SearchDepartmentPathReqBodyBuilder{}
	return builder
}

// 搜索关键词。支持部门名称的搜索
//
// 示例值：zhang
func (builder *SearchDepartmentPathReqBodyBuilder) Query(query string) *SearchDepartmentPathReqBodyBuilder {
	builder.query = query
	builder.queryFlag = true
	return builder
}

// 分页信息
//
// 示例值：
func (builder *SearchDepartmentPathReqBodyBuilder) PageRequest(pageRequest *PageCondition) *SearchDepartmentPathReqBodyBuilder {
	builder.pageRequest = pageRequest
	builder.pageRequestFlag = true
	return builder
}

// 需要查询的字段列表。将按照传递的字段列表返回有权限的行、列数据。不传则不会返回任何字段
//
// 示例值：
func (builder *SearchDepartmentPathReqBodyBuilder) RequiredFields(requiredFields []string) *SearchDepartmentPathReqBodyBuilder {
	builder.requiredFields = requiredFields
	builder.requiredFieldsFlag = true
	return builder
}

func (builder *SearchDepartmentPathReqBodyBuilder) Build() (*SearchDepartmentReqBody, error) {
	req := &SearchDepartmentReqBody{}
	if builder.queryFlag {
		req.Query = &builder.query
	}
	if builder.pageRequestFlag {
		req.PageRequest = builder.pageRequest
	}
	if builder.requiredFieldsFlag {
		req.RequiredFields = builder.requiredFields
	}
	return req, nil
}

type SearchDepartmentReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *SearchDepartmentReqBody
}

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

// 此次调用中使用的用户ID的类型
//
// 示例值：open_id
func (builder *SearchDepartmentReqBuilder) EmployeeIdType(employeeIdType string) *SearchDepartmentReqBuilder {
	builder.apiReq.QueryParams.Set("employee_id_type", fmt.Sprint(employeeIdType))
	return builder
}

// 此次调用中使用的部门ID的类型
//
// 示例值：open_department_id
func (builder *SearchDepartmentReqBuilder) DepartmentIdType(departmentIdType string) *SearchDepartmentReqBuilder {
	builder.apiReq.QueryParams.Set("department_id_type", fmt.Sprint(departmentIdType))
	return builder
}

// adminRole鉴权
//
// 示例值：
func (builder *SearchDepartmentReqBuilder) IsAdminRole(isAdminRole bool) *SearchDepartmentReqBuilder {
	builder.apiReq.QueryParams.Set("is_admin_role", fmt.Sprint(isAdminRole))
	return builder
}

// 租户ID
//
// 示例值：1
func (builder *SearchDepartmentReqBuilder) TenantId(tenantId string) *SearchDepartmentReqBuilder {
	builder.apiReq.QueryParams.Set("tenant_id", fmt.Sprint(tenantId))
	return builder
}

// 搜索租户内部门
func (builder *SearchDepartmentReqBuilder) Body(body *SearchDepartmentReqBody) *SearchDepartmentReqBuilder {
	builder.body = body
	return builder
}

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

type SearchDepartmentReqBody struct {
	Query *string `json:"query,omitempty"` // 搜索关键词。支持部门名称的搜索

	PageRequest *PageCondition `json:"page_request,omitempty"` // 分页信息

	RequiredFields []string `json:"required_fields,omitempty"` // 需要查询的字段列表。将按照传递的字段列表返回有权限的行、列数据。不传则不会返回任何字段

	Filter *SearchDepartmentFilter `json:"filter,omitempty"` // 查询条件
}

type SearchDepartmentReq struct {
	apiReq *larkcore.ApiReq
	Body   *SearchDepartmentReqBody `body:""`
}

type SearchDepartmentRespData struct {
	Departments []*Department `json:"departments,omitempty"` // 部门信息

	PageResponse *PageResponse `json:"page_response,omitempty"` // 分页结果

	Abnormals []*AbnormalRecord `json:"abnormals,omitempty"` // 字段异常信息
}

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

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

type CreateEmployeeReqBodyBuilder struct {
	employee     *CreateEmployee // 创建员工对象
	employeeFlag bool

	options     *CreateEmployeeOptions // 接口拓展选项
	optionsFlag bool
}

func NewCreateEmployeeReqBodyBuilder() *CreateEmployeeReqBodyBuilder {
	builder := &CreateEmployeeReqBodyBuilder{}
	return builder
}

// 创建员工对象
//
//示例值：
func (builder *CreateEmployeeReqBodyBuilder) Employee(employee *CreateEmployee) *CreateEmployeeReqBodyBuilder {
	builder.employee = employee
	builder.employeeFlag = true
	return builder
}

// 接口拓展选项
//
//示例值：
func (builder *CreateEmployeeReqBodyBuilder) Options(options *CreateEmployeeOptions) *CreateEmployeeReqBodyBuilder {
	builder.options = options
	builder.optionsFlag = true
	return builder
}

func (builder *CreateEmployeeReqBodyBuilder) Build() *CreateEmployeeReqBody {
	req := &CreateEmployeeReqBody{}
	if builder.employeeFlag {
		req.Employee = builder.employee
	}
	if builder.optionsFlag {
		req.Options = builder.options
	}
	return req
}

type CreateEmployeePathReqBodyBuilder struct {
	employee     *CreateEmployee
	employeeFlag bool
	options      *CreateEmployeeOptions
	optionsFlag  bool
}

func NewCreateEmployeePathReqBodyBuilder() *CreateEmployeePathReqBodyBuilder {
	builder := &CreateEmployeePathReqBodyBuilder{}
	return builder
}

// 创建员工对象
//
// 示例值：
func (builder *CreateEmployeePathReqBodyBuilder) Employee(employee *CreateEmployee) *CreateEmployeePathReqBodyBuilder {
	builder.employee = employee
	builder.employeeFlag = true
	return builder
}

// 接口拓展选项
//
// 示例值：
func (builder *CreateEmployeePathReqBodyBuilder) Options(options *CreateEmployeeOptions) *CreateEmployeePathReqBodyBuilder {
	builder.options = options
	builder.optionsFlag = true
	return builder
}

func (builder *CreateEmployeePathReqBodyBuilder) Build() (*CreateEmployeeReqBody, error) {
	req := &CreateEmployeeReqBody{}
	if builder.employeeFlag {
		req.Employee = builder.employee
	}
	if builder.optionsFlag {
		req.Options = builder.options
	}
	return req, nil
}

type CreateEmployeeReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *CreateEmployeeReqBody
}

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

// 此次调用中使用的用户ID的类型
//
// 示例值：open_id
func (builder *CreateEmployeeReqBuilder) EmployeeIdType(employeeIdType string) *CreateEmployeeReqBuilder {
	builder.apiReq.QueryParams.Set("employee_id_type", fmt.Sprint(employeeIdType))
	return builder
}

// 此次调用中使用的部门ID的类型
//
// 示例值：open_department_id
func (builder *CreateEmployeeReqBuilder) DepartmentIdType(departmentIdType string) *CreateEmployeeReqBuilder {
	builder.apiReq.QueryParams.Set("department_id_type", fmt.Sprint(departmentIdType))
	return builder
}

// adminRole鉴权
//
// 示例值：
func (builder *CreateEmployeeReqBuilder) IsAdminRole(isAdminRole bool) *CreateEmployeeReqBuilder {
	builder.apiReq.QueryParams.Set("is_admin_role", fmt.Sprint(isAdminRole))
	return builder
}

// 租户ID
//
// 示例值：100
func (builder *CreateEmployeeReqBuilder) TenantId(tenantId string) *CreateEmployeeReqBuilder {
	builder.apiReq.QueryParams.Set("tenant_id", fmt.Sprint(tenantId))
	return builder
}

// 创建员工信息
func (builder *CreateEmployeeReqBuilder) Body(body *CreateEmployeeReqBody) *CreateEmployeeReqBuilder {
	builder.body = body
	return builder
}

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

type CreateEmployeeReqBody struct {
	Employee *CreateEmployee `json:"employee,omitempty"` // 创建员工对象

	Options *CreateEmployeeOptions `json:"options,omitempty"` // 接口拓展选项
}

type CreateEmployeeReq struct {
	apiReq *larkcore.ApiReq
	Body   *CreateEmployeeReqBody `body:""`
}

type CreateEmployeeRespData struct {
	EmployeeId *string `json:"employee_id,omitempty"` // 员工ID
}

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

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

type DeleteEmployeeReqBodyBuilder struct {
	options     *DeleteEmployeeOptions // 接口拓展选项
	optionsFlag bool
}

func NewDeleteEmployeeReqBodyBuilder() *DeleteEmployeeReqBodyBuilder {
	builder := &DeleteEmployeeReqBodyBuilder{}
	return builder
}

// 接口拓展选项
//
//示例值：
func (builder *DeleteEmployeeReqBodyBuilder) Options(options *DeleteEmployeeOptions) *DeleteEmployeeReqBodyBuilder {
	builder.options = options
	builder.optionsFlag = true
	return builder
}

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

type DeleteEmployeePathReqBodyBuilder struct {
	options     *DeleteEmployeeOptions
	optionsFlag bool
}

func NewDeleteEmployeePathReqBodyBuilder() *DeleteEmployeePathReqBodyBuilder {
	builder := &DeleteEmployeePathReqBodyBuilder{}
	return builder
}

// 接口拓展选项
//
// 示例值：
func (builder *DeleteEmployeePathReqBodyBuilder) Options(options *DeleteEmployeeOptions) *DeleteEmployeePathReqBodyBuilder {
	builder.options = options
	builder.optionsFlag = true
	return builder
}

func (builder *DeleteEmployeePathReqBodyBuilder) Build() (*DeleteEmployeeReqBody, error) {
	req := &DeleteEmployeeReqBody{}
	if builder.optionsFlag {
		req.Options = builder.options
	}
	return req, nil
}

type DeleteEmployeeReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *DeleteEmployeeReqBody
}

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

// 员工ID
//
// 示例值：eesdasjd
func (builder *DeleteEmployeeReqBuilder) EmployeeId(employeeId string) *DeleteEmployeeReqBuilder {
	builder.apiReq.PathParams.Set("employee_id", fmt.Sprint(employeeId))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：open_id
func (builder *DeleteEmployeeReqBuilder) EmployeeIdType(employeeIdType string) *DeleteEmployeeReqBuilder {
	builder.apiReq.QueryParams.Set("employee_id_type", fmt.Sprint(employeeIdType))
	return builder
}

// adminRole鉴权
//
// 示例值：
func (builder *DeleteEmployeeReqBuilder) IsAdminRole(isAdminRole bool) *DeleteEmployeeReqBuilder {
	builder.apiReq.QueryParams.Set("is_admin_role", fmt.Sprint(isAdminRole))
	return builder
}

// 部门ID类型
//
// 示例值：open_department_id
func (builder *DeleteEmployeeReqBuilder) DepartmentIdType(departmentIdType string) *DeleteEmployeeReqBuilder {
	builder.apiReq.QueryParams.Set("department_id_type", fmt.Sprint(departmentIdType))
	return builder
}

// 离职员工信息
func (builder *DeleteEmployeeReqBuilder) Body(body *DeleteEmployeeReqBody) *DeleteEmployeeReqBuilder {
	builder.body = body
	return builder
}

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

type DeleteEmployeeReqBody struct {
	Options *DeleteEmployeeOptions `json:"options,omitempty"` // 接口拓展选项
}

type DeleteEmployeeReq struct {
	apiReq *larkcore.ApiReq
	Body   *DeleteEmployeeReqBody `body:""`
}

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

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

type FilterEmployeeReqBodyBuilder struct {
	filter     *MultiFilterCondition // 查询条件
	filterFlag bool

	requiredFields     []string // 需要查询的字段列表。将按照传递的字段列表返回有权限的行、列数据。不传则不会返回任何字段
	requiredFieldsFlag bool

	pageRequest     *PageCondition // 分页参数
	pageRequestFlag bool
}

func NewFilterEmployeeReqBodyBuilder() *FilterEmployeeReqBodyBuilder {
	builder := &FilterEmployeeReqBodyBuilder{}
	return builder
}

// 查询条件
//
//示例值：
func (builder *FilterEmployeeReqBodyBuilder) Filter(filter *MultiFilterCondition) *FilterEmployeeReqBodyBuilder {
	builder.filter = filter
	builder.filterFlag = true
	return builder
}

// 需要查询的字段列表。将按照传递的字段列表返回有权限的行、列数据。不传则不会返回任何字段
//
//示例值：
func (builder *FilterEmployeeReqBodyBuilder) RequiredFields(requiredFields []string) *FilterEmployeeReqBodyBuilder {
	builder.requiredFields = requiredFields
	builder.requiredFieldsFlag = true
	return builder
}

// 分页参数
//
//示例值：
func (builder *FilterEmployeeReqBodyBuilder) PageRequest(pageRequest *PageCondition) *FilterEmployeeReqBodyBuilder {
	builder.pageRequest = pageRequest
	builder.pageRequestFlag = true
	return builder
}

func (builder *FilterEmployeeReqBodyBuilder) Build() *FilterEmployeeReqBody {
	req := &FilterEmployeeReqBody{}
	if builder.filterFlag {
		req.Filter = builder.filter
	}
	if builder.requiredFieldsFlag {
		req.RequiredFields = builder.requiredFields
	}
	if builder.pageRequestFlag {
		req.PageRequest = builder.pageRequest
	}
	return req
}

type FilterEmployeePathReqBodyBuilder struct {
	filter             *MultiFilterCondition
	filterFlag         bool
	requiredFields     []string
	requiredFieldsFlag bool
	pageRequest        *PageCondition
	pageRequestFlag    bool
}

func NewFilterEmployeePathReqBodyBuilder() *FilterEmployeePathReqBodyBuilder {
	builder := &FilterEmployeePathReqBodyBuilder{}
	return builder
}

// 查询条件
//
// 示例值：
func (builder *FilterEmployeePathReqBodyBuilder) Filter(filter *MultiFilterCondition) *FilterEmployeePathReqBodyBuilder {
	builder.filter = filter
	builder.filterFlag = true
	return builder
}

// 需要查询的字段列表。将按照传递的字段列表返回有权限的行、列数据。不传则不会返回任何字段
//
// 示例值：
func (builder *FilterEmployeePathReqBodyBuilder) RequiredFields(requiredFields []string) *FilterEmployeePathReqBodyBuilder {
	builder.requiredFields = requiredFields
	builder.requiredFieldsFlag = true
	return builder
}

// 分页参数
//
// 示例值：
func (builder *FilterEmployeePathReqBodyBuilder) PageRequest(pageRequest *PageCondition) *FilterEmployeePathReqBodyBuilder {
	builder.pageRequest = pageRequest
	builder.pageRequestFlag = true
	return builder
}

func (builder *FilterEmployeePathReqBodyBuilder) Build() (*FilterEmployeeReqBody, error) {
	req := &FilterEmployeeReqBody{}
	if builder.filterFlag {
		req.Filter = builder.filter
	}
	if builder.requiredFieldsFlag {
		req.RequiredFields = builder.requiredFields
	}
	if builder.pageRequestFlag {
		req.PageRequest = builder.pageRequest
	}
	return req, nil
}

type FilterEmployeeReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *FilterEmployeeReqBody
}

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

// 此次调用中使用的用户ID的类型
//
// 示例值：open_id
func (builder *FilterEmployeeReqBuilder) EmployeeIdType(employeeIdType string) *FilterEmployeeReqBuilder {
	builder.apiReq.QueryParams.Set("employee_id_type", fmt.Sprint(employeeIdType))
	return builder
}

// 此次调用中使用的部门ID的类型
//
// 示例值：open_department_id
func (builder *FilterEmployeeReqBuilder) DepartmentIdType(departmentIdType string) *FilterEmployeeReqBuilder {
	builder.apiReq.QueryParams.Set("department_id_type", fmt.Sprint(departmentIdType))
	return builder
}

// adminRole鉴权
//
// 示例值：
func (builder *FilterEmployeeReqBuilder) IsAdminRole(isAdminRole bool) *FilterEmployeeReqBuilder {
	builder.apiReq.QueryParams.Set("is_admin_role", fmt.Sprint(isAdminRole))
	return builder
}

// 租户ID
//
// 示例值：1
func (builder *FilterEmployeeReqBuilder) TenantId(tenantId string) *FilterEmployeeReqBuilder {
	builder.apiReq.QueryParams.Set("tenant_id", fmt.Sprint(tenantId))
	return builder
}

// 查询员工ID列表
func (builder *FilterEmployeeReqBuilder) Body(body *FilterEmployeeReqBody) *FilterEmployeeReqBuilder {
	builder.body = body
	return builder
}

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

type FilterEmployeeReqBody struct {
	Filter *MultiFilterCondition `json:"filter,omitempty"` // 查询条件

	RequiredFields []string `json:"required_fields,omitempty"` // 需要查询的字段列表。将按照传递的字段列表返回有权限的行、列数据。不传则不会返回任何字段

	PageRequest *PageCondition `json:"page_request,omitempty"` // 分页参数
}

type FilterEmployeeReq struct {
	apiReq *larkcore.ApiReq
	Body   *FilterEmployeeReqBody `body:""`
}

type FilterEmployeeRespData struct {
	Employees []*EmployeeEntity `json:"employees,omitempty"` // 员工信息

	PageResponse *PageResponse `json:"page_response,omitempty"` // 分页结果

	Abnormals []*AbnormalRecord `json:"abnormals,omitempty"` // 异常信息
}

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

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

type MgetEmployeeReqBodyBuilder struct {
	employeeIds     []string // 员工id
	employeeIdsFlag bool

	requiredFields     []string // 字段枚举
	requiredFieldsFlag bool
}

func NewMgetEmployeeReqBodyBuilder() *MgetEmployeeReqBodyBuilder {
	builder := &MgetEmployeeReqBodyBuilder{}
	return builder
}

// 员工id
//
//示例值：
func (builder *MgetEmployeeReqBodyBuilder) EmployeeIds(employeeIds []string) *MgetEmployeeReqBodyBuilder {
	builder.employeeIds = employeeIds
	builder.employeeIdsFlag = true
	return builder
}

// 字段枚举
//
//示例值：
func (builder *MgetEmployeeReqBodyBuilder) RequiredFields(requiredFields []string) *MgetEmployeeReqBodyBuilder {
	builder.requiredFields = requiredFields
	builder.requiredFieldsFlag = true
	return builder
}

func (builder *MgetEmployeeReqBodyBuilder) Build() *MgetEmployeeReqBody {
	req := &MgetEmployeeReqBody{}
	if builder.employeeIdsFlag {
		req.EmployeeIds = builder.employeeIds
	}
	if builder.requiredFieldsFlag {
		req.RequiredFields = builder.requiredFields
	}
	return req
}

type MgetEmployeePathReqBodyBuilder struct {
	employeeIds        []string
	employeeIdsFlag    bool
	requiredFields     []string
	requiredFieldsFlag bool
}

func NewMgetEmployeePathReqBodyBuilder() *MgetEmployeePathReqBodyBuilder {
	builder := &MgetEmployeePathReqBodyBuilder{}
	return builder
}

// 员工id
//
// 示例值：
func (builder *MgetEmployeePathReqBodyBuilder) EmployeeIds(employeeIds []string) *MgetEmployeePathReqBodyBuilder {
	builder.employeeIds = employeeIds
	builder.employeeIdsFlag = true
	return builder
}

// 字段枚举
//
// 示例值：
func (builder *MgetEmployeePathReqBodyBuilder) RequiredFields(requiredFields []string) *MgetEmployeePathReqBodyBuilder {
	builder.requiredFields = requiredFields
	builder.requiredFieldsFlag = true
	return builder
}

func (builder *MgetEmployeePathReqBodyBuilder) Build() (*MgetEmployeeReqBody, error) {
	req := &MgetEmployeeReqBody{}
	if builder.employeeIdsFlag {
		req.EmployeeIds = builder.employeeIds
	}
	if builder.requiredFieldsFlag {
		req.RequiredFields = builder.requiredFields
	}
	return req, nil
}

type MgetEmployeeReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *MgetEmployeeReqBody
}

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

// adminRole鉴权
//
// 示例值：
func (builder *MgetEmployeeReqBuilder) IsAdminRole(isAdminRole bool) *MgetEmployeeReqBuilder {
	builder.apiReq.QueryParams.Set("is_admin_role", fmt.Sprint(isAdminRole))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：user_id
func (builder *MgetEmployeeReqBuilder) EmployeeIdType(employeeIdType string) *MgetEmployeeReqBuilder {
	builder.apiReq.QueryParams.Set("employee_id_type", fmt.Sprint(employeeIdType))
	return builder
}

// 此次调用中使用的部门ID的类型
//
// 示例值：department_id
func (builder *MgetEmployeeReqBuilder) DepartmentIdType(departmentIdType string) *MgetEmployeeReqBuilder {
	builder.apiReq.QueryParams.Set("department_id_type", fmt.Sprint(departmentIdType))
	return builder
}

// 批量获取员工数据
func (builder *MgetEmployeeReqBuilder) Body(body *MgetEmployeeReqBody) *MgetEmployeeReqBuilder {
	builder.body = body
	return builder
}

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

type MgetEmployeeReqBody struct {
	EmployeeIds []string `json:"employee_ids,omitempty"` // 员工id

	RequiredFields []string `json:"required_fields,omitempty"` // 字段枚举
}

type MgetEmployeeReq struct {
	apiReq *larkcore.ApiReq
	Body   *MgetEmployeeReqBody `body:""`
}

type MgetEmployeeRespData struct {
	Employees []*EmployeeEntity `json:"employees,omitempty"` // 员工信息

	Abnormals []*AbnormalRecord `json:"abnormals,omitempty"` // 字段异常信息
}

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

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

type PatchEmployeeReqBodyBuilder struct {
	employee     *UpdateEmployee // 更新员工对象
	employeeFlag bool
}

func NewPatchEmployeeReqBodyBuilder() *PatchEmployeeReqBodyBuilder {
	builder := &PatchEmployeeReqBodyBuilder{}
	return builder
}

// 更新员工对象
//
//示例值：
func (builder *PatchEmployeeReqBodyBuilder) Employee(employee *UpdateEmployee) *PatchEmployeeReqBodyBuilder {
	builder.employee = employee
	builder.employeeFlag = true
	return builder
}

func (builder *PatchEmployeeReqBodyBuilder) Build() *PatchEmployeeReqBody {
	req := &PatchEmployeeReqBody{}
	if builder.employeeFlag {
		req.Employee = builder.employee
	}
	return req
}

type PatchEmployeePathReqBodyBuilder struct {
	employee     *UpdateEmployee
	employeeFlag bool
}

func NewPatchEmployeePathReqBodyBuilder() *PatchEmployeePathReqBodyBuilder {
	builder := &PatchEmployeePathReqBodyBuilder{}
	return builder
}

// 更新员工对象
//
// 示例值：
func (builder *PatchEmployeePathReqBodyBuilder) Employee(employee *UpdateEmployee) *PatchEmployeePathReqBodyBuilder {
	builder.employee = employee
	builder.employeeFlag = true
	return builder
}

func (builder *PatchEmployeePathReqBodyBuilder) Build() (*PatchEmployeeReqBody, error) {
	req := &PatchEmployeeReqBody{}
	if builder.employeeFlag {
		req.Employee = builder.employee
	}
	return req, nil
}

type PatchEmployeeReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *PatchEmployeeReqBody
}

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

// 员工ID
//
// 示例值：eehsdna
func (builder *PatchEmployeeReqBuilder) EmployeeId(employeeId string) *PatchEmployeeReqBuilder {
	builder.apiReq.PathParams.Set("employee_id", fmt.Sprint(employeeId))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：open_id
func (builder *PatchEmployeeReqBuilder) EmployeeIdType(employeeIdType string) *PatchEmployeeReqBuilder {
	builder.apiReq.QueryParams.Set("employee_id_type", fmt.Sprint(employeeIdType))
	return builder
}

// adminRole鉴权
//
// 示例值：
func (builder *PatchEmployeeReqBuilder) IsAdminRole(isAdminRole bool) *PatchEmployeeReqBuilder {
	builder.apiReq.QueryParams.Set("is_admin_role", fmt.Sprint(isAdminRole))
	return builder
}

// 部门ID类型
//
// 示例值：open_department_id
func (builder *PatchEmployeeReqBuilder) DepartmentIdType(departmentIdType string) *PatchEmployeeReqBuilder {
	builder.apiReq.QueryParams.Set("department_id_type", fmt.Sprint(departmentIdType))
	return builder
}

// 更新员工信息
func (builder *PatchEmployeeReqBuilder) Body(body *PatchEmployeeReqBody) *PatchEmployeeReqBuilder {
	builder.body = body
	return builder
}

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

type PatchEmployeeReqBody struct {
	Employee *UpdateEmployee `json:"employee,omitempty"` // 更新员工对象
}

type PatchEmployeeReq struct {
	apiReq *larkcore.ApiReq
	Body   *PatchEmployeeReqBody `body:""`
}

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

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

type RegularEmployeeReqBodyBuilder struct {
	openapiOptions     *OpenapiOptions // 开平独有Options 无需填写
	openapiOptionsFlag bool
}

func NewRegularEmployeeReqBodyBuilder() *RegularEmployeeReqBodyBuilder {
	builder := &RegularEmployeeReqBodyBuilder{}
	return builder
}

func (builder *RegularEmployeeReqBodyBuilder) Build() *RegularEmployeeReqBody {
	req := &RegularEmployeeReqBody{}
	return req
}

type RegularEmployeePathReqBodyBuilder struct {
	openapiOptions     *OpenapiOptions
	openapiOptionsFlag bool
}

func NewRegularEmployeePathReqBodyBuilder() *RegularEmployeePathReqBodyBuilder {
	builder := &RegularEmployeePathReqBodyBuilder{}
	return builder
}

func (builder *RegularEmployeePathReqBodyBuilder) Build() (*RegularEmployeeReqBody, error) {
	req := &RegularEmployeeReqBody{}
	return req, nil
}

type RegularEmployeeReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *RegularEmployeeReqBody
}

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

// 雇员ID
//
// 示例值：d2e1jas
func (builder *RegularEmployeeReqBuilder) EmployeeId(employeeId string) *RegularEmployeeReqBuilder {
	builder.apiReq.PathParams.Set("employee_id", fmt.Sprint(employeeId))
	return builder
}

// adminRole鉴权
//
// 示例值：
func (builder *RegularEmployeeReqBuilder) IsAdminRole(isAdminRole bool) *RegularEmployeeReqBuilder {
	builder.apiReq.QueryParams.Set("is_admin_role", fmt.Sprint(isAdminRole))
	return builder
}

// 员工ID类型
//
// 示例值：open_id
func (builder *RegularEmployeeReqBuilder) EmployeeIdType(employeeIdType string) *RegularEmployeeReqBuilder {
	builder.apiReq.QueryParams.Set("employee_id_type", fmt.Sprint(employeeIdType))
	return builder
}

// 部门ID类型
//
// 示例值：open_department_id
func (builder *RegularEmployeeReqBuilder) DepartmentIdType(departmentIdType string) *RegularEmployeeReqBuilder {
	builder.apiReq.QueryParams.Set("department_id_type", fmt.Sprint(departmentIdType))
	return builder
}

// 待离职雇员恢复成在职状态
func (builder *RegularEmployeeReqBuilder) Body(body *RegularEmployeeReqBody) *RegularEmployeeReqBuilder {
	builder.body = body
	return builder
}

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

type RegularEmployeeReqBody struct {
	OpenapiOptions *OpenapiOptions `json:"openapi_options,omitempty"` // 开平独有Options 无需填写
}

type RegularEmployeeReq struct {
	apiReq *larkcore.ApiReq
	Body   *RegularEmployeeReqBody `body:""`
}

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

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

type ResurrectEmployeeReqBodyBuilder struct {
	employeeOrderInDepartments     []*UpsertUserDepartmentSortInfo // 部门信息
	employeeOrderInDepartmentsFlag bool

	options     *ResurrectEmployeeOptions // 选项
	optionsFlag bool
}

func NewResurrectEmployeeReqBodyBuilder() *ResurrectEmployeeReqBodyBuilder {
	builder := &ResurrectEmployeeReqBodyBuilder{}
	return builder
}

// 部门信息
//
//示例值：
func (builder *ResurrectEmployeeReqBodyBuilder) EmployeeOrderInDepartments(employeeOrderInDepartments []*UpsertUserDepartmentSortInfo) *ResurrectEmployeeReqBodyBuilder {
	builder.employeeOrderInDepartments = employeeOrderInDepartments
	builder.employeeOrderInDepartmentsFlag = true
	return builder
}

// 选项
//
//示例值：
func (builder *ResurrectEmployeeReqBodyBuilder) Options(options *ResurrectEmployeeOptions) *ResurrectEmployeeReqBodyBuilder {
	builder.options = options
	builder.optionsFlag = true
	return builder
}

func (builder *ResurrectEmployeeReqBodyBuilder) Build() *ResurrectEmployeeReqBody {
	req := &ResurrectEmployeeReqBody{}
	if builder.employeeOrderInDepartmentsFlag {
		req.EmployeeOrderInDepartments = builder.employeeOrderInDepartments
	}
	if builder.optionsFlag {
		req.Options = builder.options
	}
	return req
}

type ResurrectEmployeePathReqBodyBuilder struct {
	employeeOrderInDepartments     []*UpsertUserDepartmentSortInfo
	employeeOrderInDepartmentsFlag bool
	options                        *ResurrectEmployeeOptions
	optionsFlag                    bool
}

func NewResurrectEmployeePathReqBodyBuilder() *ResurrectEmployeePathReqBodyBuilder {
	builder := &ResurrectEmployeePathReqBodyBuilder{}
	return builder
}

// 部门信息
//
// 示例值：
func (builder *ResurrectEmployeePathReqBodyBuilder) EmployeeOrderInDepartments(employeeOrderInDepartments []*UpsertUserDepartmentSortInfo) *ResurrectEmployeePathReqBodyBuilder {
	builder.employeeOrderInDepartments = employeeOrderInDepartments
	builder.employeeOrderInDepartmentsFlag = true
	return builder
}

// 选项
//
// 示例值：
func (builder *ResurrectEmployeePathReqBodyBuilder) Options(options *ResurrectEmployeeOptions) *ResurrectEmployeePathReqBodyBuilder {
	builder.options = options
	builder.optionsFlag = true
	return builder
}

func (builder *ResurrectEmployeePathReqBodyBuilder) Build() (*ResurrectEmployeeReqBody, error) {
	req := &ResurrectEmployeeReqBody{}
	if builder.employeeOrderInDepartmentsFlag {
		req.EmployeeOrderInDepartments = builder.employeeOrderInDepartments
	}
	if builder.optionsFlag {
		req.Options = builder.options
	}
	return req, nil
}

type ResurrectEmployeeReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *ResurrectEmployeeReqBody
}

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

// 员工ID
//
// 示例值：eedasdas
func (builder *ResurrectEmployeeReqBuilder) EmployeeId(employeeId string) *ResurrectEmployeeReqBuilder {
	builder.apiReq.PathParams.Set("employee_id", fmt.Sprint(employeeId))
	return builder
}

// 此次调用中使用的用户ID的类型
//
// 示例值：open_id
func (builder *ResurrectEmployeeReqBuilder) EmployeeIdType(employeeIdType string) *ResurrectEmployeeReqBuilder {
	builder.apiReq.QueryParams.Set("employee_id_type", fmt.Sprint(employeeIdType))
	return builder
}

// adminRole鉴权
//
// 示例值：
func (builder *ResurrectEmployeeReqBuilder) IsAdminRole(isAdminRole bool) *ResurrectEmployeeReqBuilder {
	builder.apiReq.QueryParams.Set("is_admin_role", fmt.Sprint(isAdminRole))
	return builder
}

// 部门ID类型
//
// 示例值：open_department_id
func (builder *ResurrectEmployeeReqBuilder) DepartmentIdType(departmentIdType string) *ResurrectEmployeeReqBuilder {
	builder.apiReq.QueryParams.Set("department_id_type", fmt.Sprint(departmentIdType))
	return builder
}

// 恢复员工信息
func (builder *ResurrectEmployeeReqBuilder) Body(body *ResurrectEmployeeReqBody) *ResurrectEmployeeReqBuilder {
	builder.body = body
	return builder
}

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

type ResurrectEmployeeReqBody struct {
	EmployeeOrderInDepartments []*UpsertUserDepartmentSortInfo `json:"employee_order_in_departments,omitempty"` // 部门信息

	Options *ResurrectEmployeeOptions `json:"options,omitempty"` // 选项
}

type ResurrectEmployeeReq struct {
	apiReq *larkcore.ApiReq
	Body   *ResurrectEmployeeReqBody `body:""`
}

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

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

type SearchEmployeeReqBodyBuilder struct {
	query     string // 搜索关键词。支持员工ID、员工名称、员工手机号、员工邮箱的搜索。其中员工ID、员工手机号支持精确搜索，员工名称、员工邮箱支持模糊搜索，员工名称支持国际化名称的搜索。
	queryFlag bool

	pageRequest     *PageCondition // 分页信息
	pageRequestFlag bool

	requiredFields     []string // 需要查询的字段列表。将按照传递的字段列表返回有权限的行、列数据。不传则不会返回任何字段
	requiredFieldsFlag bool

	filter     *SearchEmployeeFilter // 查询条件
	filterFlag bool
}

func NewSearchEmployeeReqBodyBuilder() *SearchEmployeeReqBodyBuilder {
	builder := &SearchEmployeeReqBodyBuilder{}
	return builder
}

// 搜索关键词。支持员工ID、员工名称、员工手机号、员工邮箱的搜索。其中员工ID、员工手机号支持精确搜索，员工名称、员工邮箱支持模糊搜索，员工名称支持国际化名称的搜索。
//
//示例值：zhang
func (builder *SearchEmployeeReqBodyBuilder) Query(query string) *SearchEmployeeReqBodyBuilder {
	builder.query = query
	builder.queryFlag = true
	return builder
}

// 分页信息
//
//示例值：
func (builder *SearchEmployeeReqBodyBuilder) PageRequest(pageRequest *PageCondition) *SearchEmployeeReqBodyBuilder {
	builder.pageRequest = pageRequest
	builder.pageRequestFlag = true
	return builder
}

// 需要查询的字段列表。将按照传递的字段列表返回有权限的行、列数据。不传则不会返回任何字段
//
//示例值：
func (builder *SearchEmployeeReqBodyBuilder) RequiredFields(requiredFields []string) *SearchEmployeeReqBodyBuilder {
	builder.requiredFields = requiredFields
	builder.requiredFieldsFlag = true
	return builder
}

func (builder *SearchEmployeeReqBodyBuilder) Build() *SearchEmployeeReqBody {
	req := &SearchEmployeeReqBody{}
	if builder.queryFlag {
		req.Query = &builder.query
	}
	if builder.pageRequestFlag {
		req.PageRequest = builder.pageRequest
	}
	if builder.requiredFieldsFlag {
		req.RequiredFields = builder.requiredFields
	}
	return req
}

type SearchEmployeePathReqBodyBuilder struct {
	query              string
	queryFlag          bool
	pageRequest        *PageCondition
	pageRequestFlag    bool
	requiredFields     []string
	requiredFieldsFlag bool
	filter             *SearchEmployeeFilter
	filterFlag         bool
}

func NewSearchEmployeePathReqBodyBuilder() *SearchEmployeePathReqBodyBuilder {
	builder := &SearchEmployeePathReqBodyBuilder{}
	return builder
}

// 搜索关键词。支持员工ID、员工名称、员工手机号、员工邮箱的搜索。其中员工ID、员工手机号支持精确搜索，员工名称、员工邮箱支持模糊搜索，员工名称支持国际化名称的搜索。
//
// 示例值：zhang
func (builder *SearchEmployeePathReqBodyBuilder) Query(query string) *SearchEmployeePathReqBodyBuilder {
	builder.query = query
	builder.queryFlag = true
	return builder
}

// 分页信息
//
// 示例值：
func (builder *SearchEmployeePathReqBodyBuilder) PageRequest(pageRequest *PageCondition) *SearchEmployeePathReqBodyBuilder {
	builder.pageRequest = pageRequest
	builder.pageRequestFlag = true
	return builder
}

// 需要查询的字段列表。将按照传递的字段列表返回有权限的行、列数据。不传则不会返回任何字段
//
// 示例值：
func (builder *SearchEmployeePathReqBodyBuilder) RequiredFields(requiredFields []string) *SearchEmployeePathReqBodyBuilder {
	builder.requiredFields = requiredFields
	builder.requiredFieldsFlag = true
	return builder
}

func (builder *SearchEmployeePathReqBodyBuilder) Build() (*SearchEmployeeReqBody, error) {
	req := &SearchEmployeeReqBody{}
	if builder.queryFlag {
		req.Query = &builder.query
	}
	if builder.pageRequestFlag {
		req.PageRequest = builder.pageRequest
	}
	if builder.requiredFieldsFlag {
		req.RequiredFields = builder.requiredFields
	}
	return req, nil
}

type SearchEmployeeReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *SearchEmployeeReqBody
}

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

// 此次调用中使用的用户ID的类型
//
// 示例值：open_id
func (builder *SearchEmployeeReqBuilder) EmployeeIdType(employeeIdType string) *SearchEmployeeReqBuilder {
	builder.apiReq.QueryParams.Set("employee_id_type", fmt.Sprint(employeeIdType))
	return builder
}

// 此次调用中使用的部门ID的类型
//
// 示例值：open_department_id
func (builder *SearchEmployeeReqBuilder) DepartmentIdType(departmentIdType string) *SearchEmployeeReqBuilder {
	builder.apiReq.QueryParams.Set("department_id_type", fmt.Sprint(departmentIdType))
	return builder
}

// adminRole鉴权
//
// 示例值：
func (builder *SearchEmployeeReqBuilder) IsAdminRole(isAdminRole bool) *SearchEmployeeReqBuilder {
	builder.apiReq.QueryParams.Set("is_admin_role", fmt.Sprint(isAdminRole))
	return builder
}

// 租户ID
//
// 示例值：1
func (builder *SearchEmployeeReqBuilder) TenantId(tenantId string) *SearchEmployeeReqBuilder {
	builder.apiReq.QueryParams.Set("tenant_id", fmt.Sprint(tenantId))
	return builder
}

// 搜索租户内员工
func (builder *SearchEmployeeReqBuilder) Body(body *SearchEmployeeReqBody) *SearchEmployeeReqBuilder {
	builder.body = body
	return builder
}

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

type SearchEmployeeReqBody struct {
	Query *string `json:"query,omitempty"` // 搜索关键词。支持员工ID、员工名称、员工手机号、员工邮箱的搜索。其中员工ID、员工手机号支持精确搜索，员工名称、员工邮箱支持模糊搜索，员工名称支持国际化名称的搜索。

	PageRequest *PageCondition `json:"page_request,omitempty"` // 分页信息

	RequiredFields []string `json:"required_fields,omitempty"` // 需要查询的字段列表。将按照传递的字段列表返回有权限的行、列数据。不传则不会返回任何字段

	Filter *SearchEmployeeFilter `json:"filter,omitempty"` // 查询条件
}

type SearchEmployeeReq struct {
	apiReq *larkcore.ApiReq
	Body   *SearchEmployeeReqBody `body:""`
}

type SearchEmployeeRespData struct {
	Employees []*EmployeeEntity `json:"employees,omitempty"` // 员工信息

	PageResponse *PageResponse `json:"page_response,omitempty"` // 分页结果

	Abnormals []*AbnormalRecord `json:"abnormals,omitempty"` // 字段异常信息
}

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

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

type ToBeResignedEmployeeReqBodyBuilder struct {
	employee     *SetEmployeePreResigned // 在职员工流转到待离职
	employeeFlag bool
}

func NewToBeResignedEmployeeReqBodyBuilder() *ToBeResignedEmployeeReqBodyBuilder {
	builder := &ToBeResignedEmployeeReqBodyBuilder{}
	return builder
}

// 在职员工流转到待离职
//
//示例值：
func (builder *ToBeResignedEmployeeReqBodyBuilder) Employee(employee *SetEmployeePreResigned) *ToBeResignedEmployeeReqBodyBuilder {
	builder.employee = employee
	builder.employeeFlag = true
	return builder
}

func (builder *ToBeResignedEmployeeReqBodyBuilder) Build() *ToBeResignedEmployeeReqBody {
	req := &ToBeResignedEmployeeReqBody{}
	if builder.employeeFlag {
		req.Employee = builder.employee
	}
	return req
}

type ToBeResignedEmployeePathReqBodyBuilder struct {
	employee     *SetEmployeePreResigned
	employeeFlag bool
}

func NewToBeResignedEmployeePathReqBodyBuilder() *ToBeResignedEmployeePathReqBodyBuilder {
	builder := &ToBeResignedEmployeePathReqBodyBuilder{}
	return builder
}

// 在职员工流转到待离职
//
// 示例值：
func (builder *ToBeResignedEmployeePathReqBodyBuilder) Employee(employee *SetEmployeePreResigned) *ToBeResignedEmployeePathReqBodyBuilder {
	builder.employee = employee
	builder.employeeFlag = true
	return builder
}

func (builder *ToBeResignedEmployeePathReqBodyBuilder) Build() (*ToBeResignedEmployeeReqBody, error) {
	req := &ToBeResignedEmployeeReqBody{}
	if builder.employeeFlag {
		req.Employee = builder.employee
	}
	return req, nil
}

type ToBeResignedEmployeeReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *ToBeResignedEmployeeReqBody
}

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

// 员工ID
//
// 示例值：cad2cafa
func (builder *ToBeResignedEmployeeReqBuilder) EmployeeId(employeeId string) *ToBeResignedEmployeeReqBuilder {
	builder.apiReq.PathParams.Set("employee_id", fmt.Sprint(employeeId))
	return builder
}

// adminRole鉴权
//
// 示例值：
func (builder *ToBeResignedEmployeeReqBuilder) IsAdminRole(isAdminRole bool) *ToBeResignedEmployeeReqBuilder {
	builder.apiReq.QueryParams.Set("is_admin_role", fmt.Sprint(isAdminRole))
	return builder
}

// 员工ID类型
//
// 示例值：open_id
func (builder *ToBeResignedEmployeeReqBuilder) EmployeeIdType(employeeIdType string) *ToBeResignedEmployeeReqBuilder {
	builder.apiReq.QueryParams.Set("employee_id_type", fmt.Sprint(employeeIdType))
	return builder
}

// 部门ID类型
//
// 示例值：open_department_id
func (builder *ToBeResignedEmployeeReqBuilder) DepartmentIdType(departmentIdType string) *ToBeResignedEmployeeReqBuilder {
	builder.apiReq.QueryParams.Set("department_id_type", fmt.Sprint(departmentIdType))
	return builder
}

// 更新在职雇员到待离职状态
func (builder *ToBeResignedEmployeeReqBuilder) Body(body *ToBeResignedEmployeeReqBody) *ToBeResignedEmployeeReqBuilder {
	builder.body = body
	return builder
}

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

type ToBeResignedEmployeeReqBody struct {
	Employee *SetEmployeePreResigned `json:"employee,omitempty"` // 在职员工流转到待离职
}

type ToBeResignedEmployeeReq struct {
	apiReq *larkcore.ApiReq
	Body   *ToBeResignedEmployeeReqBody `body:""`
}

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

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

type ListCollaborationRuleIterator struct {
	nextPageToken *string
	items         []*CollaborationRule
	index         int
	limit         int
	ctx           context.Context
	req           *ListCollaborationRuleReq
	listFunc      func(ctx context.Context, req *ListCollaborationRuleReq, options ...larkcore.RequestOptionFunc) (*ListCollaborationRuleResp, error)
	options       []larkcore.RequestOptionFunc
	curlNum       int
}

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

type ListCollaborationTenantIterator struct {
	nextPageToken *string
	items         []*CollaborationTenant
	index         int
	limit         int
	ctx           context.Context
	req           *ListCollaborationTenantReq
	listFunc      func(ctx context.Context, req *ListCollaborationTenantReq, options ...larkcore.RequestOptionFunc) (*ListCollaborationTenantResp, error)
	options       []larkcore.RequestOptionFunc
	curlNum       int
}

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