// Package mdm 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 larkmdm

import (
	"fmt"

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

type Common struct {
	TenantId *string `json:"tenant_id,omitempty"` // 租户id

	Languages []string `json:"languages,omitempty"` // 语言集

	CustomExecutors map[string]string `json:"custom_executors,omitempty"` // 自定义执行器
}

type CommonBuilder struct {
	tenantId     string // 租户id
	tenantIdFlag bool

	languages     []string // 语言集
	languagesFlag bool

	customExecutors     map[string]string // 自定义执行器
	customExecutorsFlag bool
}

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

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

// 语言集
//
// 示例值：
func (builder *CommonBuilder) Languages(languages []string) *CommonBuilder {
	builder.languages = languages
	builder.languagesFlag = true
	return builder
}

// 自定义执行器
//
// 示例值：
func (builder *CommonBuilder) CustomExecutors(customExecutors map[string]string) *CommonBuilder {
	builder.customExecutors = customExecutors
	builder.customExecutorsFlag = true
	return builder
}

func (builder *CommonBuilder) Build() *Common {
	req := &Common{}
	if builder.tenantIdFlag {
		req.TenantId = &builder.tenantId

	}
	if builder.languagesFlag {
		req.Languages = builder.languages
	}
	if builder.customExecutorsFlag {
		req.CustomExecutors = builder.customExecutors
	}
	return req
}

type CountryRegion struct {
	Id *string `json:"id,omitempty"` // 自增id（业务无需关心）

	UpdateBy *string `json:"update_by,omitempty"` // 更新人

	CreateBy *string `json:"create_by,omitempty"` // 创建人

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

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

	Alpha3Code *string `json:"alpha_3_code,omitempty"` // 三位字母代码

	Alpha2Code *string `json:"alpha_2_code,omitempty"` // 两位字母代码

	NumericCode *string `json:"numeric_code,omitempty"` // 数字代码

	Name *I18nString `json:"name,omitempty"` // 名称

	LocalScript *string `json:"local_script,omitempty"` // 本地文字通常为mdmCode

	WesternScript *string `json:"western_script,omitempty"` // 西方文字通常为mdmCode

	MdmCode *string `json:"mdm_code,omitempty"` // 主数据编码（系统生成的唯一永久代码，格式为“MDCT+8位数字”）

	FullName *I18nString `json:"full_name,omitempty"` // 国家/地区全称（国家/地区行政全称，对应EA的full_name，多语行级数据映射到多语map，wukong模型新增字段）

	GlobalCode *string `json:"global_code,omitempty"` // 国际电话区号（国际电话区号，对应EA模型中的globalCode，wukong模型新增字段）

	TimeZone []string `json:"time_zone,omitempty"` // 时区（lookup对象time_zone，行级数据映射关系须人工整理）通常为mdmCode

	Overseas *string `json:"overseas,omitempty"` // 是否海外（EA中特有字段，字节定制使用，为了区分中国大陆和其他所有国家/地区）

	Level *string `json:"level,omitempty"` // 层级

	Remark *string `json:"remark,omitempty"` // 备注

	UpdateReason *string `json:"update_reason,omitempty"` // 更新原因

	Status *string `json:"status,omitempty"` // 是否生效

	Continents *Enum `json:"continents,omitempty"` // 所属大洲（EA系统中用数字枚举，升级为常量集，常量的API Name对应以下数字：1-亚洲，2-欧洲，3-非洲，4-北美洲，5-南美洲，6-大洋洲，7-南极洲）

	MdLocalScript *Language `json:"md_local_script,omitempty"` // 语言

	MdWesternScript *Language `json:"md_western_script,omitempty"` // 语言

	MdTimeZone []*TimeZone `json:"md_time_zone,omitempty"` // 时区（lookup对象time_zone，行级数据映射关系须人工整理）
}

type CountryRegionBuilder struct {
	id     string // 自增id（业务无需关心）
	idFlag bool

	updateBy     string // 更新人
	updateByFlag bool

	createBy     string // 创建人
	createByFlag bool

	updateTime     string // 更新时间
	updateTimeFlag bool

	createTime     string // 创建时间
	createTimeFlag bool

	alpha3Code     string // 三位字母代码
	alpha3CodeFlag bool

	alpha2Code     string // 两位字母代码
	alpha2CodeFlag bool

	numericCode     string // 数字代码
	numericCodeFlag bool

	name     *I18nString // 名称
	nameFlag bool

	localScript     string // 本地文字通常为mdmCode
	localScriptFlag bool

	westernScript     string // 西方文字通常为mdmCode
	westernScriptFlag bool

	mdmCode     string // 主数据编码（系统生成的唯一永久代码，格式为“MDCT+8位数字”）
	mdmCodeFlag bool

	fullName     *I18nString // 国家/地区全称（国家/地区行政全称，对应EA的full_name，多语行级数据映射到多语map，wukong模型新增字段）
	fullNameFlag bool

	globalCode     string // 国际电话区号（国际电话区号，对应EA模型中的globalCode，wukong模型新增字段）
	globalCodeFlag bool

	timeZone     []string // 时区（lookup对象time_zone，行级数据映射关系须人工整理）通常为mdmCode
	timeZoneFlag bool

	overseas     string // 是否海外（EA中特有字段，字节定制使用，为了区分中国大陆和其他所有国家/地区）
	overseasFlag bool

	level     string // 层级
	levelFlag bool

	remark     string // 备注
	remarkFlag bool

	updateReason     string // 更新原因
	updateReasonFlag bool

	status     string // 是否生效
	statusFlag bool

	continents     *Enum // 所属大洲（EA系统中用数字枚举，升级为常量集，常量的API Name对应以下数字：1-亚洲，2-欧洲，3-非洲，4-北美洲，5-南美洲，6-大洋洲，7-南极洲）
	continentsFlag bool

	mdLocalScript     *Language // 语言
	mdLocalScriptFlag bool

	mdWesternScript     *Language // 语言
	mdWesternScriptFlag bool

	mdTimeZone     []*TimeZone // 时区（lookup对象time_zone，行级数据映射关系须人工整理）
	mdTimeZoneFlag bool
}

func NewCountryRegionBuilder() *CountryRegionBuilder {
	builder := &CountryRegionBuilder{}
	return builder
}

// 自增id（业务无需关心）
//
// 示例值：-
func (builder *CountryRegionBuilder) Id(id string) *CountryRegionBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 更新人
//
// 示例值：-
func (builder *CountryRegionBuilder) UpdateBy(updateBy string) *CountryRegionBuilder {
	builder.updateBy = updateBy
	builder.updateByFlag = true
	return builder
}

// 创建人
//
// 示例值：-
func (builder *CountryRegionBuilder) CreateBy(createBy string) *CountryRegionBuilder {
	builder.createBy = createBy
	builder.createByFlag = true
	return builder
}

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

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

// 三位字母代码
//
// 示例值：-
func (builder *CountryRegionBuilder) Alpha3Code(alpha3Code string) *CountryRegionBuilder {
	builder.alpha3Code = alpha3Code
	builder.alpha3CodeFlag = true
	return builder
}

// 两位字母代码
//
// 示例值：-
func (builder *CountryRegionBuilder) Alpha2Code(alpha2Code string) *CountryRegionBuilder {
	builder.alpha2Code = alpha2Code
	builder.alpha2CodeFlag = true
	return builder
}

// 数字代码
//
// 示例值：-
func (builder *CountryRegionBuilder) NumericCode(numericCode string) *CountryRegionBuilder {
	builder.numericCode = numericCode
	builder.numericCodeFlag = true
	return builder
}

// 名称
//
// 示例值：
func (builder *CountryRegionBuilder) Name(name *I18nString) *CountryRegionBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 本地文字通常为mdmCode
//
// 示例值：-
func (builder *CountryRegionBuilder) LocalScript(localScript string) *CountryRegionBuilder {
	builder.localScript = localScript
	builder.localScriptFlag = true
	return builder
}

// 西方文字通常为mdmCode
//
// 示例值：-
func (builder *CountryRegionBuilder) WesternScript(westernScript string) *CountryRegionBuilder {
	builder.westernScript = westernScript
	builder.westernScriptFlag = true
	return builder
}

// 主数据编码（系统生成的唯一永久代码，格式为“MDCT+8位数字”）
//
// 示例值：-
func (builder *CountryRegionBuilder) MdmCode(mdmCode string) *CountryRegionBuilder {
	builder.mdmCode = mdmCode
	builder.mdmCodeFlag = true
	return builder
}

// 国家/地区全称（国家/地区行政全称，对应EA的full_name，多语行级数据映射到多语map，wukong模型新增字段）
//
// 示例值：
func (builder *CountryRegionBuilder) FullName(fullName *I18nString) *CountryRegionBuilder {
	builder.fullName = fullName
	builder.fullNameFlag = true
	return builder
}

// 国际电话区号（国际电话区号，对应EA模型中的globalCode，wukong模型新增字段）
//
// 示例值：-
func (builder *CountryRegionBuilder) GlobalCode(globalCode string) *CountryRegionBuilder {
	builder.globalCode = globalCode
	builder.globalCodeFlag = true
	return builder
}

// 时区（lookup对象time_zone，行级数据映射关系须人工整理）通常为mdmCode
//
// 示例值：
func (builder *CountryRegionBuilder) TimeZone(timeZone []string) *CountryRegionBuilder {
	builder.timeZone = timeZone
	builder.timeZoneFlag = true
	return builder
}

// 是否海外（EA中特有字段，字节定制使用，为了区分中国大陆和其他所有国家/地区）
//
// 示例值：-
func (builder *CountryRegionBuilder) Overseas(overseas string) *CountryRegionBuilder {
	builder.overseas = overseas
	builder.overseasFlag = true
	return builder
}

// 层级
//
// 示例值：-
func (builder *CountryRegionBuilder) Level(level string) *CountryRegionBuilder {
	builder.level = level
	builder.levelFlag = true
	return builder
}

// 备注
//
// 示例值：-
func (builder *CountryRegionBuilder) Remark(remark string) *CountryRegionBuilder {
	builder.remark = remark
	builder.remarkFlag = true
	return builder
}

// 更新原因
//
// 示例值：-
func (builder *CountryRegionBuilder) UpdateReason(updateReason string) *CountryRegionBuilder {
	builder.updateReason = updateReason
	builder.updateReasonFlag = true
	return builder
}

// 是否生效
//
// 示例值：-
func (builder *CountryRegionBuilder) Status(status string) *CountryRegionBuilder {
	builder.status = status
	builder.statusFlag = true
	return builder
}

// 所属大洲（EA系统中用数字枚举，升级为常量集，常量的API Name对应以下数字：1-亚洲，2-欧洲，3-非洲，4-北美洲，5-南美洲，6-大洋洲，7-南极洲）
//
// 示例值：
func (builder *CountryRegionBuilder) Continents(continents *Enum) *CountryRegionBuilder {
	builder.continents = continents
	builder.continentsFlag = true
	return builder
}

// 语言
//
// 示例值：
func (builder *CountryRegionBuilder) MdLocalScript(mdLocalScript *Language) *CountryRegionBuilder {
	builder.mdLocalScript = mdLocalScript
	builder.mdLocalScriptFlag = true
	return builder
}

// 语言
//
// 示例值：
func (builder *CountryRegionBuilder) MdWesternScript(mdWesternScript *Language) *CountryRegionBuilder {
	builder.mdWesternScript = mdWesternScript
	builder.mdWesternScriptFlag = true
	return builder
}

// 时区（lookup对象time_zone，行级数据映射关系须人工整理）
//
// 示例值：
func (builder *CountryRegionBuilder) MdTimeZone(mdTimeZone []*TimeZone) *CountryRegionBuilder {
	builder.mdTimeZone = mdTimeZone
	builder.mdTimeZoneFlag = true
	return builder
}

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

	}
	if builder.updateByFlag {
		req.UpdateBy = &builder.updateBy

	}
	if builder.createByFlag {
		req.CreateBy = &builder.createBy

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

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

	}
	if builder.alpha3CodeFlag {
		req.Alpha3Code = &builder.alpha3Code

	}
	if builder.alpha2CodeFlag {
		req.Alpha2Code = &builder.alpha2Code

	}
	if builder.numericCodeFlag {
		req.NumericCode = &builder.numericCode

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.localScriptFlag {
		req.LocalScript = &builder.localScript

	}
	if builder.westernScriptFlag {
		req.WesternScript = &builder.westernScript

	}
	if builder.mdmCodeFlag {
		req.MdmCode = &builder.mdmCode

	}
	if builder.fullNameFlag {
		req.FullName = builder.fullName
	}
	if builder.globalCodeFlag {
		req.GlobalCode = &builder.globalCode

	}
	if builder.timeZoneFlag {
		req.TimeZone = builder.timeZone
	}
	if builder.overseasFlag {
		req.Overseas = &builder.overseas

	}
	if builder.levelFlag {
		req.Level = &builder.level

	}
	if builder.remarkFlag {
		req.Remark = &builder.remark

	}
	if builder.updateReasonFlag {
		req.UpdateReason = &builder.updateReason

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

	}
	if builder.continentsFlag {
		req.Continents = builder.continents
	}
	if builder.mdLocalScriptFlag {
		req.MdLocalScript = builder.mdLocalScript
	}
	if builder.mdWesternScriptFlag {
		req.MdWesternScript = builder.mdWesternScript
	}
	if builder.mdTimeZoneFlag {
		req.MdTimeZone = builder.mdTimeZone
	}
	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 Enum struct {
	Value *string `json:"value,omitempty"` // 枚举值

	MultilingualName map[string]string `json:"multilingual_name,omitempty"` // 多语言枚举名，结构：{"zh-CN":"中文", "en-US": "english"}
}

type EnumBuilder struct {
	value     string // 枚举值
	valueFlag bool

	multilingualName     map[string]string // 多语言枚举名，结构：{"zh-CN":"中文", "en-US": "english"}
	multilingualNameFlag bool
}

func NewEnumBuilder() *EnumBuilder {
	builder := &EnumBuilder{}
	return builder
}

// 枚举值
//
// 示例值：-
func (builder *EnumBuilder) Value(value string) *EnumBuilder {
	builder.value = value
	builder.valueFlag = true
	return builder
}

// 多语言枚举名，结构：{"zh-CN":"中文", "en-US": "english"}
//
// 示例值：
func (builder *EnumBuilder) MultilingualName(multilingualName map[string]string) *EnumBuilder {
	builder.multilingualName = multilingualName
	builder.multilingualNameFlag = true
	return builder
}

func (builder *EnumBuilder) Build() *Enum {
	req := &Enum{}
	if builder.valueFlag {
		req.Value = &builder.value

	}
	if builder.multilingualNameFlag {
		req.MultilingualName = builder.multilingualName
	}
	return req
}

type Expression struct {
	Field *string `json:"field,omitempty"` // 字段名

	Operator *string `json:"operator,omitempty"` // 运算符

	Value *Value `json:"value,omitempty"` // 字段值
}

type ExpressionBuilder struct {
	field     string // 字段名
	fieldFlag bool

	operator     string // 运算符
	operatorFlag bool

	value     *Value // 字段值
	valueFlag bool
}

func NewExpressionBuilder() *ExpressionBuilder {
	builder := &ExpressionBuilder{}
	return builder
}

// 字段名
//
// 示例值：
func (builder *ExpressionBuilder) Field(field string) *ExpressionBuilder {
	builder.field = field
	builder.fieldFlag = true
	return builder
}

// 运算符
//
// 示例值：
func (builder *ExpressionBuilder) Operator(operator string) *ExpressionBuilder {
	builder.operator = operator
	builder.operatorFlag = true
	return builder
}

// 字段值
//
// 示例值：
func (builder *ExpressionBuilder) Value(value *Value) *ExpressionBuilder {
	builder.value = value
	builder.valueFlag = true
	return builder
}

func (builder *ExpressionBuilder) Build() *Expression {
	req := &Expression{}
	if builder.fieldFlag {
		req.Field = &builder.field

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

	}
	if builder.valueFlag {
		req.Value = builder.value
	}
	return req
}

type Filter struct {
	Logic *string `json:"logic,omitempty"` // 与、或条件

	Expressions []*Expression `json:"expressions,omitempty"` // 过滤条件
}

type FilterBuilder struct {
	logic     string // 与、或条件
	logicFlag bool

	expressions     []*Expression // 过滤条件
	expressionsFlag bool
}

func NewFilterBuilder() *FilterBuilder {
	builder := &FilterBuilder{}
	return builder
}

// 与、或条件
//
// 示例值：
func (builder *FilterBuilder) Logic(logic string) *FilterBuilder {
	builder.logic = logic
	builder.logicFlag = true
	return builder
}

// 过滤条件
//
// 示例值：
func (builder *FilterBuilder) Expressions(expressions []*Expression) *FilterBuilder {
	builder.expressions = expressions
	builder.expressionsFlag = true
	return builder
}

func (builder *FilterBuilder) Build() *Filter {
	req := &Filter{}
	if builder.logicFlag {
		req.Logic = &builder.logic

	}
	if builder.expressionsFlag {
		req.Expressions = builder.expressions
	}
	return req
}

type I18nString struct {
	Value *string `json:"value,omitempty"` // 字符串值

	MultilingualValue map[string]string `json:"multilingual_value,omitempty"` // 多语言字符串

	ReturnLanguage *string `json:"return_language,omitempty"` // 语言
}

type I18nStringBuilder struct {
	value     string // 字符串值
	valueFlag bool

	multilingualValue     map[string]string // 多语言字符串
	multilingualValueFlag bool

	returnLanguage     string // 语言
	returnLanguageFlag bool
}

func NewI18nStringBuilder() *I18nStringBuilder {
	builder := &I18nStringBuilder{}
	return builder
}

// 字符串值
//
// 示例值：zh-name
func (builder *I18nStringBuilder) Value(value string) *I18nStringBuilder {
	builder.value = value
	builder.valueFlag = true
	return builder
}

// 多语言字符串
//
// 示例值：
func (builder *I18nStringBuilder) MultilingualValue(multilingualValue map[string]string) *I18nStringBuilder {
	builder.multilingualValue = multilingualValue
	builder.multilingualValueFlag = true
	return builder
}

// 语言
//
// 示例值：zh-CN
func (builder *I18nStringBuilder) ReturnLanguage(returnLanguage string) *I18nStringBuilder {
	builder.returnLanguage = returnLanguage
	builder.returnLanguageFlag = true
	return builder
}

func (builder *I18nStringBuilder) Build() *I18nString {
	req := &I18nString{}
	if builder.valueFlag {
		req.Value = &builder.value

	}
	if builder.multilingualValueFlag {
		req.MultilingualValue = builder.multilingualValue
	}
	if builder.returnLanguageFlag {
		req.ReturnLanguage = &builder.returnLanguage

	}
	return req
}

type Language struct {
	Id *string `json:"id,omitempty"` // 自增id（业务无需关心）

	UpdateBy *string `json:"update_by,omitempty"` // 更新人

	CreateBy *string `json:"create_by,omitempty"` // 创建人

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

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

	IetfLanguageTag *string `json:"ietf_language_tag,omitempty"` // IETF 编码

	Name *I18nString `json:"name,omitempty"` // 名称

	Enable *bool `json:"enable,omitempty"` // 启用

	MdmCode *string `json:"mdm_code,omitempty"` // 主数据编码

	Status *string `json:"status,omitempty"` // 是否生效

	SystemStatus *string `json:"system_status,omitempty"` // 展示状态

	Remark *string `json:"remark,omitempty"` // 备注

	UpdateReason *string `json:"update_reason,omitempty"` // 更新原因
}

type LanguageBuilder struct {
	id     string // 自增id（业务无需关心）
	idFlag bool

	updateBy     string // 更新人
	updateByFlag bool

	createBy     string // 创建人
	createByFlag bool

	updateTime     string // 更新时间
	updateTimeFlag bool

	createTime     string // 创建时间
	createTimeFlag bool

	ietfLanguageTag     string // IETF 编码
	ietfLanguageTagFlag bool

	name     *I18nString // 名称
	nameFlag bool

	enable     bool // 启用
	enableFlag bool

	mdmCode     string // 主数据编码
	mdmCodeFlag bool

	status     string // 是否生效
	statusFlag bool

	systemStatus     string // 展示状态
	systemStatusFlag bool

	remark     string // 备注
	remarkFlag bool

	updateReason     string // 更新原因
	updateReasonFlag bool
}

func NewLanguageBuilder() *LanguageBuilder {
	builder := &LanguageBuilder{}
	return builder
}

// 自增id（业务无需关心）
//
// 示例值：0
func (builder *LanguageBuilder) Id(id string) *LanguageBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 更新人
//
// 示例值：-
func (builder *LanguageBuilder) UpdateBy(updateBy string) *LanguageBuilder {
	builder.updateBy = updateBy
	builder.updateByFlag = true
	return builder
}

// 创建人
//
// 示例值：-
func (builder *LanguageBuilder) CreateBy(createBy string) *LanguageBuilder {
	builder.createBy = createBy
	builder.createByFlag = true
	return builder
}

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

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

// IETF 编码
//
// 示例值：-
func (builder *LanguageBuilder) IetfLanguageTag(ietfLanguageTag string) *LanguageBuilder {
	builder.ietfLanguageTag = ietfLanguageTag
	builder.ietfLanguageTagFlag = true
	return builder
}

// 名称
//
// 示例值：
func (builder *LanguageBuilder) Name(name *I18nString) *LanguageBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 启用
//
// 示例值：
func (builder *LanguageBuilder) Enable(enable bool) *LanguageBuilder {
	builder.enable = enable
	builder.enableFlag = true
	return builder
}

// 主数据编码
//
// 示例值：-
func (builder *LanguageBuilder) MdmCode(mdmCode string) *LanguageBuilder {
	builder.mdmCode = mdmCode
	builder.mdmCodeFlag = true
	return builder
}

// 是否生效
//
// 示例值：-
func (builder *LanguageBuilder) Status(status string) *LanguageBuilder {
	builder.status = status
	builder.statusFlag = true
	return builder
}

// 展示状态
//
// 示例值：-
func (builder *LanguageBuilder) SystemStatus(systemStatus string) *LanguageBuilder {
	builder.systemStatus = systemStatus
	builder.systemStatusFlag = true
	return builder
}

// 备注
//
// 示例值：-
func (builder *LanguageBuilder) Remark(remark string) *LanguageBuilder {
	builder.remark = remark
	builder.remarkFlag = true
	return builder
}

// 更新原因
//
// 示例值：-
func (builder *LanguageBuilder) UpdateReason(updateReason string) *LanguageBuilder {
	builder.updateReason = updateReason
	builder.updateReasonFlag = true
	return builder
}

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

	}
	if builder.updateByFlag {
		req.UpdateBy = &builder.updateBy

	}
	if builder.createByFlag {
		req.CreateBy = &builder.createBy

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

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

	}
	if builder.ietfLanguageTagFlag {
		req.IetfLanguageTag = &builder.ietfLanguageTag

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.enableFlag {
		req.Enable = &builder.enable

	}
	if builder.mdmCodeFlag {
		req.MdmCode = &builder.mdmCode

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

	}
	if builder.systemStatusFlag {
		req.SystemStatus = &builder.systemStatus

	}
	if builder.remarkFlag {
		req.Remark = &builder.remark

	}
	if builder.updateReasonFlag {
		req.UpdateReason = &builder.updateReason

	}
	return req
}

type Major struct {
	MdmCode *string `json:"mdm_code,omitempty"` // 主数据编码

	Name *I18nString `json:"name,omitempty"` // 名称

	SuperiorMajor *string `json:"superior_major,omitempty"` // 父级专业

	Degree *string `json:"degree,omitempty"` // 学历

	Level *string `json:"level,omitempty"` // 层级

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

	Remark *string `json:"remark,omitempty"` // 备注

	OrderCode *string `json:"order_code,omitempty"` // 排序码
}

type MajorBuilder struct {
	mdmCode     string // 主数据编码
	mdmCodeFlag bool

	name     *I18nString // 名称
	nameFlag bool

	superiorMajor     string // 父级专业
	superiorMajorFlag bool

	degree     string // 学历
	degreeFlag bool

	level     string // 层级
	levelFlag bool

	status     string // 状态
	statusFlag bool

	remark     string // 备注
	remarkFlag bool

	orderCode     string // 排序码
	orderCodeFlag bool
}

func NewMajorBuilder() *MajorBuilder {
	builder := &MajorBuilder{}
	return builder
}

// 主数据编码
//
// 示例值：MDMJ00000001
func (builder *MajorBuilder) MdmCode(mdmCode string) *MajorBuilder {
	builder.mdmCode = mdmCode
	builder.mdmCodeFlag = true
	return builder
}

// 名称
//
// 示例值：name
func (builder *MajorBuilder) Name(name *I18nString) *MajorBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 父级专业
//
// 示例值：superior_major
func (builder *MajorBuilder) SuperiorMajor(superiorMajor string) *MajorBuilder {
	builder.superiorMajor = superiorMajor
	builder.superiorMajorFlag = true
	return builder
}

// 学历
//
// 示例值：1
func (builder *MajorBuilder) Degree(degree string) *MajorBuilder {
	builder.degree = degree
	builder.degreeFlag = true
	return builder
}

// 层级
//
// 示例值：1
func (builder *MajorBuilder) Level(level string) *MajorBuilder {
	builder.level = level
	builder.levelFlag = true
	return builder
}

// 状态
//
// 示例值：1
func (builder *MajorBuilder) Status(status string) *MajorBuilder {
	builder.status = status
	builder.statusFlag = true
	return builder
}

// 备注
//
// 示例值：remark
func (builder *MajorBuilder) Remark(remark string) *MajorBuilder {
	builder.remark = remark
	builder.remarkFlag = true
	return builder
}

// 排序码
//
// 示例值：1
func (builder *MajorBuilder) OrderCode(orderCode string) *MajorBuilder {
	builder.orderCode = orderCode
	builder.orderCodeFlag = true
	return builder
}

func (builder *MajorBuilder) Build() *Major {
	req := &Major{}
	if builder.mdmCodeFlag {
		req.MdmCode = &builder.mdmCode

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.superiorMajorFlag {
		req.SuperiorMajor = &builder.superiorMajor

	}
	if builder.degreeFlag {
		req.Degree = &builder.degree

	}
	if builder.levelFlag {
		req.Level = &builder.level

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

	}
	if builder.remarkFlag {
		req.Remark = &builder.remark

	}
	if builder.orderCodeFlag {
		req.OrderCode = &builder.orderCode

	}
	return req
}

type Sort struct {
	Field *string `json:"field,omitempty"` // 字段名

	Desc *bool `json:"desc,omitempty"` // 是否倒序
}

type SortBuilder struct {
	field     string // 字段名
	fieldFlag bool

	desc     bool // 是否倒序
	descFlag bool
}

func NewSortBuilder() *SortBuilder {
	builder := &SortBuilder{}
	return builder
}

// 字段名
//
// 示例值：
func (builder *SortBuilder) Field(field string) *SortBuilder {
	builder.field = field
	builder.fieldFlag = true
	return builder
}

// 是否倒序
//
// 示例值：
func (builder *SortBuilder) Desc(desc bool) *SortBuilder {
	builder.desc = desc
	builder.descFlag = true
	return builder
}

func (builder *SortBuilder) Build() *Sort {
	req := &Sort{}
	if builder.fieldFlag {
		req.Field = &builder.field

	}
	if builder.descFlag {
		req.Desc = &builder.desc

	}
	return req
}

type TimeZone struct {
	UpdateBy *string `json:"update_by,omitempty"` // 更新人

	CreateBy *string `json:"create_by,omitempty"` // 创建人

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

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

	TimeZoneId *string `json:"time_zone_id,omitempty"` // 编码

	Name *Common `json:"name,omitempty"` // 名称

	UtcOffset *string `json:"utc_offset,omitempty"` // UTC 时区偏移量

	MdmCode *string `json:"mdm_code,omitempty"` // 主数据编码（系统生成的唯一永久代码，格式为“MDTZ+8位数字”）

	Remark *string `json:"remark,omitempty"` // 备注

	UpdateReason *string `json:"update_reason,omitempty"` // 更新原因

	Status *string `json:"status,omitempty"` // 是否生效
}

type TimeZoneBuilder struct {
	updateBy     string // 更新人
	updateByFlag bool

	createBy     string // 创建人
	createByFlag bool

	updateTime     string // 更新时间
	updateTimeFlag bool

	createTime     string // 创建时间
	createTimeFlag bool

	timeZoneId     string // 编码
	timeZoneIdFlag bool

	name     *Common // 名称
	nameFlag bool

	utcOffset     string // UTC 时区偏移量
	utcOffsetFlag bool

	mdmCode     string // 主数据编码（系统生成的唯一永久代码，格式为“MDTZ+8位数字”）
	mdmCodeFlag bool

	remark     string // 备注
	remarkFlag bool

	updateReason     string // 更新原因
	updateReasonFlag bool

	status     string // 是否生效
	statusFlag bool
}

func NewTimeZoneBuilder() *TimeZoneBuilder {
	builder := &TimeZoneBuilder{}
	return builder
}

// 更新人
//
// 示例值：-
func (builder *TimeZoneBuilder) UpdateBy(updateBy string) *TimeZoneBuilder {
	builder.updateBy = updateBy
	builder.updateByFlag = true
	return builder
}

// 创建人
//
// 示例值：-
func (builder *TimeZoneBuilder) CreateBy(createBy string) *TimeZoneBuilder {
	builder.createBy = createBy
	builder.createByFlag = true
	return builder
}

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

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

// 编码
//
// 示例值：-
func (builder *TimeZoneBuilder) TimeZoneId(timeZoneId string) *TimeZoneBuilder {
	builder.timeZoneId = timeZoneId
	builder.timeZoneIdFlag = true
	return builder
}

// 名称
//
// 示例值：
func (builder *TimeZoneBuilder) Name(name *Common) *TimeZoneBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// UTC 时区偏移量
//
// 示例值：-
func (builder *TimeZoneBuilder) UtcOffset(utcOffset string) *TimeZoneBuilder {
	builder.utcOffset = utcOffset
	builder.utcOffsetFlag = true
	return builder
}

// 主数据编码（系统生成的唯一永久代码，格式为“MDTZ+8位数字”）
//
// 示例值：-
func (builder *TimeZoneBuilder) MdmCode(mdmCode string) *TimeZoneBuilder {
	builder.mdmCode = mdmCode
	builder.mdmCodeFlag = true
	return builder
}

// 备注
//
// 示例值：-
func (builder *TimeZoneBuilder) Remark(remark string) *TimeZoneBuilder {
	builder.remark = remark
	builder.remarkFlag = true
	return builder
}

// 更新原因
//
// 示例值：-
func (builder *TimeZoneBuilder) UpdateReason(updateReason string) *TimeZoneBuilder {
	builder.updateReason = updateReason
	builder.updateReasonFlag = true
	return builder
}

// 是否生效
//
// 示例值：-
func (builder *TimeZoneBuilder) Status(status string) *TimeZoneBuilder {
	builder.status = status
	builder.statusFlag = true
	return builder
}

func (builder *TimeZoneBuilder) Build() *TimeZone {
	req := &TimeZone{}
	if builder.updateByFlag {
		req.UpdateBy = &builder.updateBy

	}
	if builder.createByFlag {
		req.CreateBy = &builder.createBy

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

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

	}
	if builder.timeZoneIdFlag {
		req.TimeZoneId = &builder.timeZoneId

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.utcOffsetFlag {
		req.UtcOffset = &builder.utcOffset

	}
	if builder.mdmCodeFlag {
		req.MdmCode = &builder.mdmCode

	}
	if builder.remarkFlag {
		req.Remark = &builder.remark

	}
	if builder.updateReasonFlag {
		req.UpdateReason = &builder.updateReason

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

	}
	return req
}

type Value struct {
	StringValue *string `json:"string_value,omitempty"` // 字符串值

	BoolValue *bool `json:"bool_value,omitempty"` // 布尔值

	IntValue *string `json:"int_value,omitempty"` // 整形值

	StringListValue []string `json:"string_list_value,omitempty"` // 字符串列表值

	IntListValue []string `json:"int_list_value,omitempty"` // 整形列表值
}

type ValueBuilder struct {
	stringValue     string // 字符串值
	stringValueFlag bool

	boolValue     bool // 布尔值
	boolValueFlag bool

	intValue     string // 整形值
	intValueFlag bool

	stringListValue     []string // 字符串列表值
	stringListValueFlag bool

	intListValue     []string // 整形列表值
	intListValueFlag bool
}

func NewValueBuilder() *ValueBuilder {
	builder := &ValueBuilder{}
	return builder
}

// 字符串值
//
// 示例值：
func (builder *ValueBuilder) StringValue(stringValue string) *ValueBuilder {
	builder.stringValue = stringValue
	builder.stringValueFlag = true
	return builder
}

// 布尔值
//
// 示例值：
func (builder *ValueBuilder) BoolValue(boolValue bool) *ValueBuilder {
	builder.boolValue = boolValue
	builder.boolValueFlag = true
	return builder
}

// 整形值
//
// 示例值：
func (builder *ValueBuilder) IntValue(intValue string) *ValueBuilder {
	builder.intValue = intValue
	builder.intValueFlag = true
	return builder
}

// 字符串列表值
//
// 示例值：
func (builder *ValueBuilder) StringListValue(stringListValue []string) *ValueBuilder {
	builder.stringListValue = stringListValue
	builder.stringListValueFlag = true
	return builder
}

// 整形列表值
//
// 示例值：
func (builder *ValueBuilder) IntListValue(intListValue []string) *ValueBuilder {
	builder.intListValue = intListValue
	builder.intListValueFlag = true
	return builder
}

func (builder *ValueBuilder) Build() *Value {
	req := &Value{}
	if builder.stringValueFlag {
		req.StringValue = &builder.stringValue

	}
	if builder.boolValueFlag {
		req.BoolValue = &builder.boolValue

	}
	if builder.intValueFlag {
		req.IntValue = &builder.intValue

	}
	if builder.stringListValueFlag {
		req.StringListValue = builder.stringListValue
	}
	if builder.intListValueFlag {
		req.IntListValue = builder.intListValue
	}
	return req
}

type GetBatchCountryRegionReqBodyBuilder struct {
	common     *Common // common
	commonFlag bool
}

func NewGetBatchCountryRegionReqBodyBuilder() *GetBatchCountryRegionReqBodyBuilder {
	builder := &GetBatchCountryRegionReqBodyBuilder{}
	return builder
}

func (builder *GetBatchCountryRegionReqBodyBuilder) Build() *GetBatchCountryRegionReqBody {
	req := &GetBatchCountryRegionReqBody{}
	return req
}

type GetBatchCountryRegionPathReqBodyBuilder struct {
	common     *Common
	commonFlag bool
}

func NewGetBatchCountryRegionPathReqBodyBuilder() *GetBatchCountryRegionPathReqBodyBuilder {
	builder := &GetBatchCountryRegionPathReqBodyBuilder{}
	return builder
}

func (builder *GetBatchCountryRegionPathReqBodyBuilder) Build() (*GetBatchCountryRegionReqBody, error) {
	req := &GetBatchCountryRegionReqBody{}
	return req, nil
}

type GetBatchCountryRegionReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *GetBatchCountryRegionReqBody
}

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

// 需要的查询字段集
//
// 示例值：
func (builder *GetBatchCountryRegionReqBuilder) Fields(fields []string) *GetBatchCountryRegionReqBuilder {
	for _, v := range fields {
		builder.apiReq.QueryParams.Add("fields", fmt.Sprint(v))
	}
	return builder
}

// 主数据编码集
//
// 示例值：
func (builder *GetBatchCountryRegionReqBuilder) Ids(ids []string) *GetBatchCountryRegionReqBuilder {
	for _, v := range ids {
		builder.apiReq.QueryParams.Add("ids", fmt.Sprint(v))
	}
	return builder
}

// 语言集
//
// 示例值：
func (builder *GetBatchCountryRegionReqBuilder) Languages(languages []string) *GetBatchCountryRegionReqBuilder {
	for _, v := range languages {
		builder.apiReq.QueryParams.Add("languages", fmt.Sprint(v))
	}
	return builder
}

// 查询国家 / 地区
func (builder *GetBatchCountryRegionReqBuilder) Body(body *GetBatchCountryRegionReqBody) *GetBatchCountryRegionReqBuilder {
	builder.body = body
	return builder
}

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

type GetBatchCountryRegionReqBody struct {
	Common *Common `json:"common,omitempty"` // common
}

type GetBatchCountryRegionReq struct {
	apiReq *larkcore.ApiReq
	Body   *GetBatchCountryRegionReqBody `body:""`
}

type GetBatchCountryRegionRespData struct {
	Data []*CountryRegion `json:"data,omitempty"` // 国家/地区目录列表
}

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

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

type ListCountryRegionReqBodyBuilder struct {
	filter     *Filter // filter
	filterFlag bool

	common     *Common // common
	commonFlag bool
}

func NewListCountryRegionReqBodyBuilder() *ListCountryRegionReqBodyBuilder {
	builder := &ListCountryRegionReqBodyBuilder{}
	return builder
}

// filter
//
//示例值：
func (builder *ListCountryRegionReqBodyBuilder) Filter(filter *Filter) *ListCountryRegionReqBodyBuilder {
	builder.filter = filter
	builder.filterFlag = true
	return builder
}

func (builder *ListCountryRegionReqBodyBuilder) Build() *ListCountryRegionReqBody {
	req := &ListCountryRegionReqBody{}
	if builder.filterFlag {
		req.Filter = builder.filter
	}
	return req
}

type ListCountryRegionPathReqBodyBuilder struct {
	filter     *Filter
	filterFlag bool
	common     *Common
	commonFlag bool
}

func NewListCountryRegionPathReqBodyBuilder() *ListCountryRegionPathReqBodyBuilder {
	builder := &ListCountryRegionPathReqBodyBuilder{}
	return builder
}

// filter
//
// 示例值：
func (builder *ListCountryRegionPathReqBodyBuilder) Filter(filter *Filter) *ListCountryRegionPathReqBodyBuilder {
	builder.filter = filter
	builder.filterFlag = true
	return builder
}

func (builder *ListCountryRegionPathReqBodyBuilder) Build() (*ListCountryRegionReqBody, error) {
	req := &ListCountryRegionReqBody{}
	if builder.filterFlag {
		req.Filter = builder.filter
	}
	return req, nil
}

type ListCountryRegionReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *ListCountryRegionReqBody
}

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

// 语言集
//
// 示例值：
func (builder *ListCountryRegionReqBuilder) Languages(languages []string) *ListCountryRegionReqBuilder {
	for _, v := range languages {
		builder.apiReq.QueryParams.Add("languages", fmt.Sprint(v))
	}
	return builder
}

// 需要的查询字段集
//
// 示例值：
func (builder *ListCountryRegionReqBuilder) Fields(fields []string) *ListCountryRegionReqBuilder {
	for _, v := range fields {
		builder.apiReq.QueryParams.Add("fields", fmt.Sprint(v))
	}
	return builder
}

// 查询页大小
//
// 示例值：10
func (builder *ListCountryRegionReqBuilder) Limit(limit int) *ListCountryRegionReqBuilder {
	builder.apiReq.QueryParams.Set("limit", fmt.Sprint(limit))
	return builder
}

// 查询起始位置
//
// 示例值：0
func (builder *ListCountryRegionReqBuilder) Offset(offset int) *ListCountryRegionReqBuilder {
	builder.apiReq.QueryParams.Set("offset", fmt.Sprint(offset))
	return builder
}

// 是否返回总数
//
// 示例值：
func (builder *ListCountryRegionReqBuilder) ReturnCount(returnCount bool) *ListCountryRegionReqBuilder {
	builder.apiReq.QueryParams.Set("return_count", fmt.Sprint(returnCount))
	return builder
}

//
//
// 示例值：
func (builder *ListCountryRegionReqBuilder) PageToken(pageToken string) *ListCountryRegionReqBuilder {
	builder.apiReq.QueryParams.Set("page_token", fmt.Sprint(pageToken))
	return builder
}

// 搜索国家 / 地区
func (builder *ListCountryRegionReqBuilder) Body(body *ListCountryRegionReqBody) *ListCountryRegionReqBuilder {
	builder.body = body
	return builder
}

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

type ListCountryRegionReqBody struct {
	Filter *Filter `json:"filter,omitempty"` // filter

	Common *Common `json:"common,omitempty"` // common
}

type ListCountryRegionReq struct {
	apiReq *larkcore.ApiReq
	Body   *ListCountryRegionReqBody `body:""`
}

type ListCountryRegionRespData struct {
	Data []*CountryRegion `json:"data,omitempty"` // 国家/地区目录列表

	Total *string `json:"total,omitempty"` // 总数

	NextPageToken *string `json:"next_page_token,omitempty"` // 下一次分页参数
}

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

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