// Package payroll 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 larkpayroll

import (
	"fmt"

	"context"
	"errors"

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

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

const (
	ReportTypeDefault = 0 // 默认
	ReportTypeAccrued = 1 // 计提
	ReportTypePaid    = 2 // 实发

)

const (
	ReportTypeListCostAllocationReportDefault = 0 // 默认
	ReportTypeListCostAllocationReportAccrued = 1 // 计提
	ReportTypeListCostAllocationReportPaid    = 2 // 实发

)

type AccountingItemValue struct {
	OriginalValue *string `json:"original_value,omitempty"` // 算薪项数据原始值，当发薪明细的数据来源为「人工导入」时，如果当前算薪项类型为引用类型，那么算薪项原始值可能为空。

	ReferenceValues []*I18nContent `json:"reference_values,omitempty"` // 引用类型算薪项展示值
}

type AccountingItemValueBuilder struct {
	originalValue     string // 算薪项数据原始值，当发薪明细的数据来源为「人工导入」时，如果当前算薪项类型为引用类型，那么算薪项原始值可能为空。
	originalValueFlag bool

	referenceValues     []*I18nContent // 引用类型算薪项展示值
	referenceValuesFlag bool
}

func NewAccountingItemValueBuilder() *AccountingItemValueBuilder {
	builder := &AccountingItemValueBuilder{}
	return builder
}

// 算薪项数据原始值，当发薪明细的数据来源为「人工导入」时，如果当前算薪项类型为引用类型，那么算薪项原始值可能为空。
//
// 示例值：100
func (builder *AccountingItemValueBuilder) OriginalValue(originalValue string) *AccountingItemValueBuilder {
	builder.originalValue = originalValue
	builder.originalValueFlag = true
	return builder
}

// 引用类型算薪项展示值
//
// 示例值：
func (builder *AccountingItemValueBuilder) ReferenceValues(referenceValues []*I18nContent) *AccountingItemValueBuilder {
	builder.referenceValues = referenceValues
	builder.referenceValuesFlag = true
	return builder
}

func (builder *AccountingItemValueBuilder) Build() *AccountingItemValue {
	req := &AccountingItemValue{}
	if builder.originalValueFlag {
		req.OriginalValue = &builder.originalValue

	}
	if builder.referenceValuesFlag {
		req.ReferenceValues = builder.referenceValues
	}
	return req
}

type AcctItem struct {
	Id *string `json:"id,omitempty"` // 算薪项ID

	I18nNames []*I18nContent `json:"i18n_names,omitempty"` // 算薪项名称

	CategoryId *string `json:"category_id,omitempty"` // 算薪项分类ID

	DataType *int `json:"data_type,omitempty"` // 算薪项数据类型

	DecimalPlaces *int `json:"decimal_places,omitempty"` // 小数位数

	ActiveStatus *int `json:"active_status,omitempty"` // 启用状态
}

type AcctItemBuilder struct {
	id     string // 算薪项ID
	idFlag bool

	i18nNames     []*I18nContent // 算薪项名称
	i18nNamesFlag bool

	categoryId     string // 算薪项分类ID
	categoryIdFlag bool

	dataType     int // 算薪项数据类型
	dataTypeFlag bool

	decimalPlaces     int // 小数位数
	decimalPlacesFlag bool

	activeStatus     int // 启用状态
	activeStatusFlag bool
}

func NewAcctItemBuilder() *AcctItemBuilder {
	builder := &AcctItemBuilder{}
	return builder
}

// 算薪项ID
//
// 示例值：7169773973790425132
func (builder *AcctItemBuilder) Id(id string) *AcctItemBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 算薪项名称
//
// 示例值：
func (builder *AcctItemBuilder) I18nNames(i18nNames []*I18nContent) *AcctItemBuilder {
	builder.i18nNames = i18nNames
	builder.i18nNamesFlag = true
	return builder
}

// 算薪项分类ID
//
// 示例值：7169773973790425132
func (builder *AcctItemBuilder) CategoryId(categoryId string) *AcctItemBuilder {
	builder.categoryId = categoryId
	builder.categoryIdFlag = true
	return builder
}

// 算薪项数据类型
//
// 示例值：1
func (builder *AcctItemBuilder) DataType(dataType int) *AcctItemBuilder {
	builder.dataType = dataType
	builder.dataTypeFlag = true
	return builder
}

// 小数位数
//
// 示例值：2
func (builder *AcctItemBuilder) DecimalPlaces(decimalPlaces int) *AcctItemBuilder {
	builder.decimalPlaces = decimalPlaces
	builder.decimalPlacesFlag = true
	return builder
}

// 启用状态
//
// 示例值：1
func (builder *AcctItemBuilder) ActiveStatus(activeStatus int) *AcctItemBuilder {
	builder.activeStatus = activeStatus
	builder.activeStatusFlag = true
	return builder
}

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

	}
	if builder.i18nNamesFlag {
		req.I18nNames = builder.i18nNames
	}
	if builder.categoryIdFlag {
		req.CategoryId = &builder.categoryId

	}
	if builder.dataTypeFlag {
		req.DataType = &builder.dataType

	}
	if builder.decimalPlacesFlag {
		req.DecimalPlaces = &builder.decimalPlaces

	}
	if builder.activeStatusFlag {
		req.ActiveStatus = &builder.activeStatus

	}
	return req
}

type CalculationActivity struct {
	CalculationActivityId *string `json:"calculation_activity_id,omitempty"` // 算薪活动唯一标识

	CalculationActivityNames []*I18nContent `json:"calculation_activity_names,omitempty"` // 算薪活动名称
}

type CalculationActivityBuilder struct {
	calculationActivityId     string // 算薪活动唯一标识
	calculationActivityIdFlag bool

	calculationActivityNames     []*I18nContent // 算薪活动名称
	calculationActivityNamesFlag bool
}

func NewCalculationActivityBuilder() *CalculationActivityBuilder {
	builder := &CalculationActivityBuilder{}
	return builder
}

// 算薪活动唯一标识
//
// 示例值：7371828319837012009
func (builder *CalculationActivityBuilder) CalculationActivityId(calculationActivityId string) *CalculationActivityBuilder {
	builder.calculationActivityId = calculationActivityId
	builder.calculationActivityIdFlag = true
	return builder
}

// 算薪活动名称
//
// 示例值：
func (builder *CalculationActivityBuilder) CalculationActivityNames(calculationActivityNames []*I18nContent) *CalculationActivityBuilder {
	builder.calculationActivityNames = calculationActivityNames
	builder.calculationActivityNamesFlag = true
	return builder
}

func (builder *CalculationActivityBuilder) Build() *CalculationActivity {
	req := &CalculationActivity{}
	if builder.calculationActivityIdFlag {
		req.CalculationActivityId = &builder.calculationActivityId

	}
	if builder.calculationActivityNamesFlag {
		req.CalculationActivityNames = builder.calculationActivityNames
	}
	return req
}

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

	Names []*I18nContent `json:"names,omitempty"` // 名称

	Region *string `json:"region,omitempty"` // 国家地区ID

	WorkCalendar *string `json:"work_calendar,omitempty"` // 工作日历ID

	TimeZone *string `json:"time_zone,omitempty"` // 时区ID

	PayrollCycle *int `json:"payroll_cycle,omitempty"` // 算薪周期： 1-周，2-双周，3-月，4-双月，5-季度，6-年

	Status *int `json:"status,omitempty"` // 状态：1-启用，2-停用

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

	CreateTime *string `json:"create_time,omitempty"` // 创建时间，格式：yyyy-MM-dd HH:mm:ss utc+8

	EffectiveDate *string `json:"effective_date,omitempty"` // 生效时间，格式：yyyy-MM-dd

	PeriodYears []string `json:"period_years,omitempty"` // 日历期间年份列表
}

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

	names     []*I18nContent // 名称
	namesFlag bool

	region     string // 国家地区ID
	regionFlag bool

	workCalendar     string // 工作日历ID
	workCalendarFlag bool

	timeZone     string // 时区ID
	timeZoneFlag bool

	payrollCycle     int // 算薪周期： 1-周，2-双周，3-月，4-双月，5-季度，6-年
	payrollCycleFlag bool

	status     int // 状态：1-启用，2-停用
	statusFlag bool

	creatorId     string // 创建者saas_user_id
	creatorIdFlag bool

	createTime     string // 创建时间，格式：yyyy-MM-dd HH:mm:ss utc+8
	createTimeFlag bool

	effectiveDate     string // 生效时间，格式：yyyy-MM-dd
	effectiveDateFlag bool

	periodYears     []string // 日历期间年份列表
	periodYearsFlag bool
}

func NewCalendarBuilder() *CalendarBuilder {
	builder := &CalendarBuilder{}
	return builder
}

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

// 名称
//
// 示例值：
func (builder *CalendarBuilder) Names(names []*I18nContent) *CalendarBuilder {
	builder.names = names
	builder.namesFlag = true
	return builder
}

// 国家地区ID
//
// 示例值：6823630319749580302
func (builder *CalendarBuilder) Region(region string) *CalendarBuilder {
	builder.region = region
	builder.regionFlag = true
	return builder
}

// 工作日历ID
//
// 示例值：6823630319749580303
func (builder *CalendarBuilder) WorkCalendar(workCalendar string) *CalendarBuilder {
	builder.workCalendar = workCalendar
	builder.workCalendarFlag = true
	return builder
}

// 时区ID
//
// 示例值：6823630319749580303
func (builder *CalendarBuilder) TimeZone(timeZone string) *CalendarBuilder {
	builder.timeZone = timeZone
	builder.timeZoneFlag = true
	return builder
}

// 算薪周期： 1-周，2-双周，3-月，4-双月，5-季度，6-年
//
// 示例值：1
func (builder *CalendarBuilder) PayrollCycle(payrollCycle int) *CalendarBuilder {
	builder.payrollCycle = payrollCycle
	builder.payrollCycleFlag = true
	return builder
}

// 状态：1-启用，2-停用
//
// 示例值：1
func (builder *CalendarBuilder) Status(status int) *CalendarBuilder {
	builder.status = status
	builder.statusFlag = true
	return builder
}

// 创建者saas_user_id
//
// 示例值：6823630319749580303
func (builder *CalendarBuilder) CreatorId(creatorId string) *CalendarBuilder {
	builder.creatorId = creatorId
	builder.creatorIdFlag = true
	return builder
}

// 创建时间，格式：yyyy-MM-dd HH:mm:ss utc+8
//
// 示例值：2022-11-23 12:33:09
func (builder *CalendarBuilder) CreateTime(createTime string) *CalendarBuilder {
	builder.createTime = createTime
	builder.createTimeFlag = true
	return builder
}

// 生效时间，格式：yyyy-MM-dd
//
// 示例值：2022-01-01
func (builder *CalendarBuilder) EffectiveDate(effectiveDate string) *CalendarBuilder {
	builder.effectiveDate = effectiveDate
	builder.effectiveDateFlag = true
	return builder
}

// 日历期间年份列表
//
// 示例值：
func (builder *CalendarBuilder) PeriodYears(periodYears []string) *CalendarBuilder {
	builder.periodYears = periodYears
	builder.periodYearsFlag = true
	return builder
}

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

	}
	if builder.namesFlag {
		req.Names = builder.names
	}
	if builder.regionFlag {
		req.Region = &builder.region

	}
	if builder.workCalendarFlag {
		req.WorkCalendar = &builder.workCalendar

	}
	if builder.timeZoneFlag {
		req.TimeZone = &builder.timeZone

	}
	if builder.payrollCycleFlag {
		req.PayrollCycle = &builder.payrollCycle

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

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

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

	}
	if builder.effectiveDateFlag {
		req.EffectiveDate = &builder.effectiveDate

	}
	if builder.periodYearsFlag {
		req.PeriodYears = builder.periodYears
	}
	return req
}

type CalendarFailItem struct {
	Id *string `json:"id,omitempty"` // 日历ID

	FailReason *string `json:"fail_reason,omitempty"` // 失败原因
}

type CalendarFailItemBuilder struct {
	id     string // 日历ID
	idFlag bool

	failReason     string // 失败原因
	failReasonFlag bool
}

func NewCalendarFailItemBuilder() *CalendarFailItemBuilder {
	builder := &CalendarFailItemBuilder{}
	return builder
}

// 日历ID
//
// 示例值：6823630319749580301
func (builder *CalendarFailItemBuilder) Id(id string) *CalendarFailItemBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 失败原因
//
// 示例值：calendar not found
func (builder *CalendarFailItemBuilder) FailReason(failReason string) *CalendarFailItemBuilder {
	builder.failReason = failReason
	builder.failReasonFlag = true
	return builder
}

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

	}
	if builder.failReasonFlag {
		req.FailReason = &builder.failReason

	}
	return req
}

type CalendarPeriod struct {
	PeriodStartDate *string `json:"period_start_date,omitempty"` // 计薪周期开始日期

	PeriodEndDate *string `json:"period_end_date,omitempty"` // 计薪周期结束日期

	PeriodKey *string `json:"period_key,omitempty"` // 计薪周期key

	PeriodName *I18n `json:"period_name,omitempty"` // 计薪周期名称

	PayrollCycle *int `json:"payroll_cycle,omitempty"` // 计薪周期类型

	TimeZone *string `json:"time_zone,omitempty"` // 时区

	PayDate *string `json:"pay_date,omitempty"` // 发放日期

	PayrollCalendarId *string `json:"payroll_calendar_id,omitempty"` // 关联的算薪日历ID

	CutOffDate *string `json:"cut_off_date,omitempty"` // 截止日期

	TaxablePeriod *string `json:"taxable_period,omitempty"` // 税款所属年月

	ManualModified *bool `json:"manual_modified,omitempty"` // 是否手动修改过

	AttendanceStartDate *string `json:"attendance_start_date,omitempty"` // 考勤开始日期

	AttendanceEndDate *string `json:"attendance_end_date,omitempty"` // 考勤结束日期

	CutOffDateForPaylist *string `json:"cut_off_date_for_paylist,omitempty"` // 名单收集截止日
}

type CalendarPeriodBuilder struct {
	periodStartDate     string // 计薪周期开始日期
	periodStartDateFlag bool

	periodEndDate     string // 计薪周期结束日期
	periodEndDateFlag bool

	periodKey     string // 计薪周期key
	periodKeyFlag bool

	periodName     *I18n // 计薪周期名称
	periodNameFlag bool

	payrollCycle     int // 计薪周期类型
	payrollCycleFlag bool

	timeZone     string // 时区
	timeZoneFlag bool

	payDate     string // 发放日期
	payDateFlag bool

	payrollCalendarId     string // 关联的算薪日历ID
	payrollCalendarIdFlag bool

	cutOffDate     string // 截止日期
	cutOffDateFlag bool

	taxablePeriod     string // 税款所属年月
	taxablePeriodFlag bool

	manualModified     bool // 是否手动修改过
	manualModifiedFlag bool

	attendanceStartDate     string // 考勤开始日期
	attendanceStartDateFlag bool

	attendanceEndDate     string // 考勤结束日期
	attendanceEndDateFlag bool

	cutOffDateForPaylist     string // 名单收集截止日
	cutOffDateForPaylistFlag bool
}

func NewCalendarPeriodBuilder() *CalendarPeriodBuilder {
	builder := &CalendarPeriodBuilder{}
	return builder
}

// 计薪周期开始日期
//
// 示例值：2022-01-01
func (builder *CalendarPeriodBuilder) PeriodStartDate(periodStartDate string) *CalendarPeriodBuilder {
	builder.periodStartDate = periodStartDate
	builder.periodStartDateFlag = true
	return builder
}

// 计薪周期结束日期
//
// 示例值：2022-01-01
func (builder *CalendarPeriodBuilder) PeriodEndDate(periodEndDate string) *CalendarPeriodBuilder {
	builder.periodEndDate = periodEndDate
	builder.periodEndDateFlag = true
	return builder
}

// 计薪周期key
//
// 示例值：2022-01
func (builder *CalendarPeriodBuilder) PeriodKey(periodKey string) *CalendarPeriodBuilder {
	builder.periodKey = periodKey
	builder.periodKeyFlag = true
	return builder
}

// 计薪周期名称
//
// 示例值：
func (builder *CalendarPeriodBuilder) PeriodName(periodName *I18n) *CalendarPeriodBuilder {
	builder.periodName = periodName
	builder.periodNameFlag = true
	return builder
}

// 计薪周期类型
//
// 示例值：1
func (builder *CalendarPeriodBuilder) PayrollCycle(payrollCycle int) *CalendarPeriodBuilder {
	builder.payrollCycle = payrollCycle
	builder.payrollCycleFlag = true
	return builder
}

// 时区
//
// 示例值：(GMT+08:00) 中国标准时间 - 上海
func (builder *CalendarPeriodBuilder) TimeZone(timeZone string) *CalendarPeriodBuilder {
	builder.timeZone = timeZone
	builder.timeZoneFlag = true
	return builder
}

// 发放日期
//
// 示例值：2022-01-01
func (builder *CalendarPeriodBuilder) PayDate(payDate string) *CalendarPeriodBuilder {
	builder.payDate = payDate
	builder.payDateFlag = true
	return builder
}

// 关联的算薪日历ID
//
// 示例值：7374707723663867948
func (builder *CalendarPeriodBuilder) PayrollCalendarId(payrollCalendarId string) *CalendarPeriodBuilder {
	builder.payrollCalendarId = payrollCalendarId
	builder.payrollCalendarIdFlag = true
	return builder
}

// 截止日期
//
// 示例值：2022-01-01
func (builder *CalendarPeriodBuilder) CutOffDate(cutOffDate string) *CalendarPeriodBuilder {
	builder.cutOffDate = cutOffDate
	builder.cutOffDateFlag = true
	return builder
}

// 税款所属年月
//
// 示例值：2023-10
func (builder *CalendarPeriodBuilder) TaxablePeriod(taxablePeriod string) *CalendarPeriodBuilder {
	builder.taxablePeriod = taxablePeriod
	builder.taxablePeriodFlag = true
	return builder
}

// 是否手动修改过
//
// 示例值：
func (builder *CalendarPeriodBuilder) ManualModified(manualModified bool) *CalendarPeriodBuilder {
	builder.manualModified = manualModified
	builder.manualModifiedFlag = true
	return builder
}

// 考勤开始日期
//
// 示例值：2024-01-01
func (builder *CalendarPeriodBuilder) AttendanceStartDate(attendanceStartDate string) *CalendarPeriodBuilder {
	builder.attendanceStartDate = attendanceStartDate
	builder.attendanceStartDateFlag = true
	return builder
}

// 考勤结束日期
//
// 示例值：2024-01-31
func (builder *CalendarPeriodBuilder) AttendanceEndDate(attendanceEndDate string) *CalendarPeriodBuilder {
	builder.attendanceEndDate = attendanceEndDate
	builder.attendanceEndDateFlag = true
	return builder
}

// 名单收集截止日
//
// 示例值：2024-01-26
func (builder *CalendarPeriodBuilder) CutOffDateForPaylist(cutOffDateForPaylist string) *CalendarPeriodBuilder {
	builder.cutOffDateForPaylist = cutOffDateForPaylist
	builder.cutOffDateForPaylistFlag = true
	return builder
}

func (builder *CalendarPeriodBuilder) Build() *CalendarPeriod {
	req := &CalendarPeriod{}
	if builder.periodStartDateFlag {
		req.PeriodStartDate = &builder.periodStartDate

	}
	if builder.periodEndDateFlag {
		req.PeriodEndDate = &builder.periodEndDate

	}
	if builder.periodKeyFlag {
		req.PeriodKey = &builder.periodKey

	}
	if builder.periodNameFlag {
		req.PeriodName = builder.periodName
	}
	if builder.payrollCycleFlag {
		req.PayrollCycle = &builder.payrollCycle

	}
	if builder.timeZoneFlag {
		req.TimeZone = &builder.timeZone

	}
	if builder.payDateFlag {
		req.PayDate = &builder.payDate

	}
	if builder.payrollCalendarIdFlag {
		req.PayrollCalendarId = &builder.payrollCalendarId

	}
	if builder.cutOffDateFlag {
		req.CutOffDate = &builder.cutOffDate

	}
	if builder.taxablePeriodFlag {
		req.TaxablePeriod = &builder.taxablePeriod

	}
	if builder.manualModifiedFlag {
		req.ManualModified = &builder.manualModified

	}
	if builder.attendanceStartDateFlag {
		req.AttendanceStartDate = &builder.attendanceStartDate

	}
	if builder.attendanceEndDateFlag {
		req.AttendanceEndDate = &builder.attendanceEndDate

	}
	if builder.cutOffDateForPaylistFlag {
		req.CutOffDateForPaylist = &builder.cutOffDateForPaylist

	}
	return req
}

type CalendarSuccessItem struct {
	Id *string `json:"id,omitempty"` // 日历ID

	Periods []*CalendarPeriod `json:"periods,omitempty"` // 期间列表
}

type CalendarSuccessItemBuilder struct {
	id     string // 日历ID
	idFlag bool

	periods     []*CalendarPeriod // 期间列表
	periodsFlag bool
}

func NewCalendarSuccessItemBuilder() *CalendarSuccessItemBuilder {
	builder := &CalendarSuccessItemBuilder{}
	return builder
}

// 日历ID
//
// 示例值：6823630319749580302
func (builder *CalendarSuccessItemBuilder) Id(id string) *CalendarSuccessItemBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 期间列表
//
// 示例值：
func (builder *CalendarSuccessItemBuilder) Periods(periods []*CalendarPeriod) *CalendarSuccessItemBuilder {
	builder.periods = periods
	builder.periodsFlag = true
	return builder
}

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

	}
	if builder.periodsFlag {
		req.Periods = builder.periods
	}
	return req
}

type CollectionActivityDataWithDetails struct {
	ActivityId *string `json:"activity_id,omitempty"` // 活动id（对于往期填报/往期更正，指的是被更正的那条填报活动明细对应的活动id，即原始的那个活动id）

	TemplateId *string `json:"template_id,omitempty"` // 填报活动关联的填报模板id

	TemplateVersionId *string `json:"template_version_id,omitempty"` // 填报活动关联的填报模板版本id

	CalendarPeriod *CalendarPeriod `json:"calendar_period,omitempty"` // 计薪期间（对于往期填报/往期更正，指的是被更正的那条填报活动明细对应的计薪期间，即原始的那个活动的计薪期间）

	CalendarEffectiveDate *string `json:"calendar_effective_date,omitempty"` // 生效日期，对应计薪期间的结束日期（取CalendarPeriod的结束日期。对于往期更正/往期补填场景，取目标（原始）period的结束日期。是一个date字段，YYYY-MM-DD）

	CountryRegions []*CountryRegion `json:"country_regions,omitempty"` // 国家/地区多值列表

	CollectionEmployeeDatas []*CollectionEmployeeData `json:"collection_employee_datas,omitempty"` // 员工的填报活动明细数据列表，不同活动员工可能会有多条明细数据

	ActivityApprovalPassTime *string `json:"activity_approval_pass_time,omitempty"` // 填报活动审批通过时间，毫秒时间戳
}

type CollectionActivityDataWithDetailsBuilder struct {
	activityId     string // 活动id（对于往期填报/往期更正，指的是被更正的那条填报活动明细对应的活动id，即原始的那个活动id）
	activityIdFlag bool

	templateId     string // 填报活动关联的填报模板id
	templateIdFlag bool

	templateVersionId     string // 填报活动关联的填报模板版本id
	templateVersionIdFlag bool

	calendarPeriod     *CalendarPeriod // 计薪期间（对于往期填报/往期更正，指的是被更正的那条填报活动明细对应的计薪期间，即原始的那个活动的计薪期间）
	calendarPeriodFlag bool

	calendarEffectiveDate     string // 生效日期，对应计薪期间的结束日期（取CalendarPeriod的结束日期。对于往期更正/往期补填场景，取目标（原始）period的结束日期。是一个date字段，YYYY-MM-DD）
	calendarEffectiveDateFlag bool

	countryRegions     []*CountryRegion // 国家/地区多值列表
	countryRegionsFlag bool

	collectionEmployeeDatas     []*CollectionEmployeeData // 员工的填报活动明细数据列表，不同活动员工可能会有多条明细数据
	collectionEmployeeDatasFlag bool

	activityApprovalPassTime     string // 填报活动审批通过时间，毫秒时间戳
	activityApprovalPassTimeFlag bool
}

func NewCollectionActivityDataWithDetailsBuilder() *CollectionActivityDataWithDetailsBuilder {
	builder := &CollectionActivityDataWithDetailsBuilder{}
	return builder
}

// 活动id（对于往期填报/往期更正，指的是被更正的那条填报活动明细对应的活动id，即原始的那个活动id）
//
// 示例值：7202076988667019308
func (builder *CollectionActivityDataWithDetailsBuilder) ActivityId(activityId string) *CollectionActivityDataWithDetailsBuilder {
	builder.activityId = activityId
	builder.activityIdFlag = true
	return builder
}

// 填报活动关联的填报模板id
//
// 示例值：7202076988667019308
func (builder *CollectionActivityDataWithDetailsBuilder) TemplateId(templateId string) *CollectionActivityDataWithDetailsBuilder {
	builder.templateId = templateId
	builder.templateIdFlag = true
	return builder
}

// 填报活动关联的填报模板版本id
//
// 示例值：7202076988667019308
func (builder *CollectionActivityDataWithDetailsBuilder) TemplateVersionId(templateVersionId string) *CollectionActivityDataWithDetailsBuilder {
	builder.templateVersionId = templateVersionId
	builder.templateVersionIdFlag = true
	return builder
}

// 计薪期间（对于往期填报/往期更正，指的是被更正的那条填报活动明细对应的计薪期间，即原始的那个活动的计薪期间）
//
// 示例值：
func (builder *CollectionActivityDataWithDetailsBuilder) CalendarPeriod(calendarPeriod *CalendarPeriod) *CollectionActivityDataWithDetailsBuilder {
	builder.calendarPeriod = calendarPeriod
	builder.calendarPeriodFlag = true
	return builder
}

// 生效日期，对应计薪期间的结束日期（取CalendarPeriod的结束日期。对于往期更正/往期补填场景，取目标（原始）period的结束日期。是一个date字段，YYYY-MM-DD）
//
// 示例值：2022-01-01
func (builder *CollectionActivityDataWithDetailsBuilder) CalendarEffectiveDate(calendarEffectiveDate string) *CollectionActivityDataWithDetailsBuilder {
	builder.calendarEffectiveDate = calendarEffectiveDate
	builder.calendarEffectiveDateFlag = true
	return builder
}

// 国家/地区多值列表
//
// 示例值：
func (builder *CollectionActivityDataWithDetailsBuilder) CountryRegions(countryRegions []*CountryRegion) *CollectionActivityDataWithDetailsBuilder {
	builder.countryRegions = countryRegions
	builder.countryRegionsFlag = true
	return builder
}

// 员工的填报活动明细数据列表，不同活动员工可能会有多条明细数据
//
// 示例值：
func (builder *CollectionActivityDataWithDetailsBuilder) CollectionEmployeeDatas(collectionEmployeeDatas []*CollectionEmployeeData) *CollectionActivityDataWithDetailsBuilder {
	builder.collectionEmployeeDatas = collectionEmployeeDatas
	builder.collectionEmployeeDatasFlag = true
	return builder
}

// 填报活动审批通过时间，毫秒时间戳
//
// 示例值：1723797063000
func (builder *CollectionActivityDataWithDetailsBuilder) ActivityApprovalPassTime(activityApprovalPassTime string) *CollectionActivityDataWithDetailsBuilder {
	builder.activityApprovalPassTime = activityApprovalPassTime
	builder.activityApprovalPassTimeFlag = true
	return builder
}

func (builder *CollectionActivityDataWithDetailsBuilder) Build() *CollectionActivityDataWithDetails {
	req := &CollectionActivityDataWithDetails{}
	if builder.activityIdFlag {
		req.ActivityId = &builder.activityId

	}
	if builder.templateIdFlag {
		req.TemplateId = &builder.templateId

	}
	if builder.templateVersionIdFlag {
		req.TemplateVersionId = &builder.templateVersionId

	}
	if builder.calendarPeriodFlag {
		req.CalendarPeriod = builder.calendarPeriod
	}
	if builder.calendarEffectiveDateFlag {
		req.CalendarEffectiveDate = &builder.calendarEffectiveDate

	}
	if builder.countryRegionsFlag {
		req.CountryRegions = builder.countryRegions
	}
	if builder.collectionEmployeeDatasFlag {
		req.CollectionEmployeeDatas = builder.collectionEmployeeDatas
	}
	if builder.activityApprovalPassTimeFlag {
		req.ActivityApprovalPassTime = &builder.activityApprovalPassTime

	}
	return req
}

type CollectionData struct {
	Id *string `json:"id,omitempty"` // 每一条明细数据的主键id

	CollectionType *int `json:"collection_type,omitempty"` // 1-本期填报，2-往期补填，3-往期更正

	DataPeriod *CollectionDataPeriod `json:"data_period,omitempty"` // 数据归属期

	CurrencyId *string `json:"currency_id,omitempty"` // 币种ID

	CurrencyCode *string `json:"currency_code,omitempty"` // 币种code

	CollectionItemValues []*CollectionItemValue `json:"collection_item_values,omitempty"` // 填报项具体值信息

	TemplateSnapshot *CollectionTemplateSnapshot `json:"template_snapshot,omitempty"` // 填报模板快照

	CreatedAt *string `json:"created_at,omitempty"` // 创建时间，毫秒时间戳

	ModifiedAt *string `json:"modified_at,omitempty"` // 更新时间，毫秒时间戳

	CreatorInfo *EmployeeInfo `json:"creator_info,omitempty"` // 创建人信息

	ModifierInfo *EmployeeInfo `json:"modifier_info,omitempty"` // 更新人信息

	CalendarPeriod *CalendarPeriod `json:"calendar_period,omitempty"` // 计薪期间

	EffectiveTime *string `json:"effective_time,omitempty"` // 生效时间，毫秒时间戳

	SourceActivityId *string `json:"source_activity_id,omitempty"` // 填写明细记录所在的填报活动id

	Status *int `json:"status,omitempty"` // 明细记录状态，1-生效，2-删除（系统内部会过滤数据，正常不会返回），3-撤销

	RelatedDataId *string `json:"related_data_id,omitempty"` // 关联dataID 如往期更正场景，该ID关联更正前记录
}

type CollectionDataBuilder struct {
	id     string // 每一条明细数据的主键id
	idFlag bool

	collectionType     int // 1-本期填报，2-往期补填，3-往期更正
	collectionTypeFlag bool

	dataPeriod     *CollectionDataPeriod // 数据归属期
	dataPeriodFlag bool

	currencyId     string // 币种ID
	currencyIdFlag bool

	currencyCode     string // 币种code
	currencyCodeFlag bool

	collectionItemValues     []*CollectionItemValue // 填报项具体值信息
	collectionItemValuesFlag bool

	templateSnapshot     *CollectionTemplateSnapshot // 填报模板快照
	templateSnapshotFlag bool

	createdAt     string // 创建时间，毫秒时间戳
	createdAtFlag bool

	modifiedAt     string // 更新时间，毫秒时间戳
	modifiedAtFlag bool

	creatorInfo     *EmployeeInfo // 创建人信息
	creatorInfoFlag bool

	modifierInfo     *EmployeeInfo // 更新人信息
	modifierInfoFlag bool

	calendarPeriod     *CalendarPeriod // 计薪期间
	calendarPeriodFlag bool

	effectiveTime     string // 生效时间，毫秒时间戳
	effectiveTimeFlag bool

	sourceActivityId     string // 填写明细记录所在的填报活动id
	sourceActivityIdFlag bool

	status     int // 明细记录状态，1-生效，2-删除（系统内部会过滤数据，正常不会返回），3-撤销
	statusFlag bool

	relatedDataId     string // 关联dataID 如往期更正场景，该ID关联更正前记录
	relatedDataIdFlag bool
}

func NewCollectionDataBuilder() *CollectionDataBuilder {
	builder := &CollectionDataBuilder{}
	return builder
}

// 每一条明细数据的主键id
//
// 示例值：7202076988667019308
func (builder *CollectionDataBuilder) Id(id string) *CollectionDataBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 1-本期填报，2-往期补填，3-往期更正
//
// 示例值：1
func (builder *CollectionDataBuilder) CollectionType(collectionType int) *CollectionDataBuilder {
	builder.collectionType = collectionType
	builder.collectionTypeFlag = true
	return builder
}

// 数据归属期
//
// 示例值：
func (builder *CollectionDataBuilder) DataPeriod(dataPeriod *CollectionDataPeriod) *CollectionDataBuilder {
	builder.dataPeriod = dataPeriod
	builder.dataPeriodFlag = true
	return builder
}

// 币种ID
//
// 示例值：7202076988667019308
func (builder *CollectionDataBuilder) CurrencyId(currencyId string) *CollectionDataBuilder {
	builder.currencyId = currencyId
	builder.currencyIdFlag = true
	return builder
}

// 币种code
//
// 示例值：CNY
func (builder *CollectionDataBuilder) CurrencyCode(currencyCode string) *CollectionDataBuilder {
	builder.currencyCode = currencyCode
	builder.currencyCodeFlag = true
	return builder
}

// 填报项具体值信息
//
// 示例值：
func (builder *CollectionDataBuilder) CollectionItemValues(collectionItemValues []*CollectionItemValue) *CollectionDataBuilder {
	builder.collectionItemValues = collectionItemValues
	builder.collectionItemValuesFlag = true
	return builder
}

// 填报模板快照
//
// 示例值：
func (builder *CollectionDataBuilder) TemplateSnapshot(templateSnapshot *CollectionTemplateSnapshot) *CollectionDataBuilder {
	builder.templateSnapshot = templateSnapshot
	builder.templateSnapshotFlag = true
	return builder
}

// 创建时间，毫秒时间戳
//
// 示例值：1723797063000
func (builder *CollectionDataBuilder) CreatedAt(createdAt string) *CollectionDataBuilder {
	builder.createdAt = createdAt
	builder.createdAtFlag = true
	return builder
}

// 更新时间，毫秒时间戳
//
// 示例值：1723797063000
func (builder *CollectionDataBuilder) ModifiedAt(modifiedAt string) *CollectionDataBuilder {
	builder.modifiedAt = modifiedAt
	builder.modifiedAtFlag = true
	return builder
}

// 创建人信息
//
// 示例值：
func (builder *CollectionDataBuilder) CreatorInfo(creatorInfo *EmployeeInfo) *CollectionDataBuilder {
	builder.creatorInfo = creatorInfo
	builder.creatorInfoFlag = true
	return builder
}

// 更新人信息
//
// 示例值：
func (builder *CollectionDataBuilder) ModifierInfo(modifierInfo *EmployeeInfo) *CollectionDataBuilder {
	builder.modifierInfo = modifierInfo
	builder.modifierInfoFlag = true
	return builder
}

// 计薪期间
//
// 示例值：
func (builder *CollectionDataBuilder) CalendarPeriod(calendarPeriod *CalendarPeriod) *CollectionDataBuilder {
	builder.calendarPeriod = calendarPeriod
	builder.calendarPeriodFlag = true
	return builder
}

// 生效时间，毫秒时间戳
//
// 示例值：1723797063000
func (builder *CollectionDataBuilder) EffectiveTime(effectiveTime string) *CollectionDataBuilder {
	builder.effectiveTime = effectiveTime
	builder.effectiveTimeFlag = true
	return builder
}

// 填写明细记录所在的填报活动id
//
// 示例值：7202076988667019308
func (builder *CollectionDataBuilder) SourceActivityId(sourceActivityId string) *CollectionDataBuilder {
	builder.sourceActivityId = sourceActivityId
	builder.sourceActivityIdFlag = true
	return builder
}

// 明细记录状态，1-生效，2-删除（系统内部会过滤数据，正常不会返回），3-撤销
//
// 示例值：1
func (builder *CollectionDataBuilder) Status(status int) *CollectionDataBuilder {
	builder.status = status
	builder.statusFlag = true
	return builder
}

// 关联dataID 如往期更正场景，该ID关联更正前记录
//
// 示例值：7202076988667019308
func (builder *CollectionDataBuilder) RelatedDataId(relatedDataId string) *CollectionDataBuilder {
	builder.relatedDataId = relatedDataId
	builder.relatedDataIdFlag = true
	return builder
}

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

	}
	if builder.collectionTypeFlag {
		req.CollectionType = &builder.collectionType

	}
	if builder.dataPeriodFlag {
		req.DataPeriod = builder.dataPeriod
	}
	if builder.currencyIdFlag {
		req.CurrencyId = &builder.currencyId

	}
	if builder.currencyCodeFlag {
		req.CurrencyCode = &builder.currencyCode

	}
	if builder.collectionItemValuesFlag {
		req.CollectionItemValues = builder.collectionItemValues
	}
	if builder.templateSnapshotFlag {
		req.TemplateSnapshot = builder.templateSnapshot
	}
	if builder.createdAtFlag {
		req.CreatedAt = &builder.createdAt

	}
	if builder.modifiedAtFlag {
		req.ModifiedAt = &builder.modifiedAt

	}
	if builder.creatorInfoFlag {
		req.CreatorInfo = builder.creatorInfo
	}
	if builder.modifierInfoFlag {
		req.ModifierInfo = builder.modifierInfo
	}
	if builder.calendarPeriodFlag {
		req.CalendarPeriod = builder.calendarPeriod
	}
	if builder.effectiveTimeFlag {
		req.EffectiveTime = &builder.effectiveTime

	}
	if builder.sourceActivityIdFlag {
		req.SourceActivityId = &builder.sourceActivityId

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

	}
	if builder.relatedDataIdFlag {
		req.RelatedDataId = &builder.relatedDataId

	}
	return req
}

type CollectionDataPeriod struct {
	StartDate *string `json:"start_date,omitempty"` // 数据归属期开始日期

	EndDate *string `json:"end_date,omitempty"` // 数据归属期结束日期
}

type CollectionDataPeriodBuilder struct {
	startDate     string // 数据归属期开始日期
	startDateFlag bool

	endDate     string // 数据归属期结束日期
	endDateFlag bool
}

func NewCollectionDataPeriodBuilder() *CollectionDataPeriodBuilder {
	builder := &CollectionDataPeriodBuilder{}
	return builder
}

// 数据归属期开始日期
//
// 示例值：2022-01-01
func (builder *CollectionDataPeriodBuilder) StartDate(startDate string) *CollectionDataPeriodBuilder {
	builder.startDate = startDate
	builder.startDateFlag = true
	return builder
}

// 数据归属期结束日期
//
// 示例值：2022-01-01
func (builder *CollectionDataPeriodBuilder) EndDate(endDate string) *CollectionDataPeriodBuilder {
	builder.endDate = endDate
	builder.endDateFlag = true
	return builder
}

func (builder *CollectionDataPeriodBuilder) Build() *CollectionDataPeriod {
	req := &CollectionDataPeriod{}
	if builder.startDateFlag {
		req.StartDate = &builder.startDate

	}
	if builder.endDateFlag {
		req.EndDate = &builder.endDate

	}
	return req
}

type CollectionDetail struct {
	EmploymentId *string `json:"employment_id,omitempty"` // 员工雇员ID

	Activities []*CollectionActivityDataWithDetails `json:"activities,omitempty"` // 一个员工的填报活动数据，一个员工可能会有多条活动数据
}

type CollectionDetailBuilder struct {
	employmentId     string // 员工雇员ID
	employmentIdFlag bool

	activities     []*CollectionActivityDataWithDetails // 一个员工的填报活动数据，一个员工可能会有多条活动数据
	activitiesFlag bool
}

func NewCollectionDetailBuilder() *CollectionDetailBuilder {
	builder := &CollectionDetailBuilder{}
	return builder
}

// 员工雇员ID
//
// 示例值：7202076988667019308
func (builder *CollectionDetailBuilder) EmploymentId(employmentId string) *CollectionDetailBuilder {
	builder.employmentId = employmentId
	builder.employmentIdFlag = true
	return builder
}

// 一个员工的填报活动数据，一个员工可能会有多条活动数据
//
// 示例值：
func (builder *CollectionDetailBuilder) Activities(activities []*CollectionActivityDataWithDetails) *CollectionDetailBuilder {
	builder.activities = activities
	builder.activitiesFlag = true
	return builder
}

func (builder *CollectionDetailBuilder) Build() *CollectionDetail {
	req := &CollectionDetail{}
	if builder.employmentIdFlag {
		req.EmploymentId = &builder.employmentId

	}
	if builder.activitiesFlag {
		req.Activities = builder.activities
	}
	return req
}

type CollectionEmployeeData struct {
	RowId *string `json:"row_id,omitempty"` // 填报明细行ID

	ActivityId *string `json:"activity_id,omitempty"` // 填报活动ID

	EmployeeInfo *EmployeeInfo `json:"employee_info,omitempty"` // 员工信息

	CollectionDatas []*CollectionData `json:"collection_datas,omitempty"` // 同个员工同个活动下可能有多条明细数据
}

type CollectionEmployeeDataBuilder struct {
	rowId     string // 填报明细行ID
	rowIdFlag bool

	activityId     string // 填报活动ID
	activityIdFlag bool

	employeeInfo     *EmployeeInfo // 员工信息
	employeeInfoFlag bool

	collectionDatas     []*CollectionData // 同个员工同个活动下可能有多条明细数据
	collectionDatasFlag bool
}

func NewCollectionEmployeeDataBuilder() *CollectionEmployeeDataBuilder {
	builder := &CollectionEmployeeDataBuilder{}
	return builder
}

// 填报明细行ID
//
// 示例值：1
func (builder *CollectionEmployeeDataBuilder) RowId(rowId string) *CollectionEmployeeDataBuilder {
	builder.rowId = rowId
	builder.rowIdFlag = true
	return builder
}

// 填报活动ID
//
// 示例值：7202076988667019308
func (builder *CollectionEmployeeDataBuilder) ActivityId(activityId string) *CollectionEmployeeDataBuilder {
	builder.activityId = activityId
	builder.activityIdFlag = true
	return builder
}

// 员工信息
//
// 示例值：
func (builder *CollectionEmployeeDataBuilder) EmployeeInfo(employeeInfo *EmployeeInfo) *CollectionEmployeeDataBuilder {
	builder.employeeInfo = employeeInfo
	builder.employeeInfoFlag = true
	return builder
}

// 同个员工同个活动下可能有多条明细数据
//
// 示例值：
func (builder *CollectionEmployeeDataBuilder) CollectionDatas(collectionDatas []*CollectionData) *CollectionEmployeeDataBuilder {
	builder.collectionDatas = collectionDatas
	builder.collectionDatasFlag = true
	return builder
}

func (builder *CollectionEmployeeDataBuilder) Build() *CollectionEmployeeData {
	req := &CollectionEmployeeData{}
	if builder.rowIdFlag {
		req.RowId = &builder.rowId

	}
	if builder.activityIdFlag {
		req.ActivityId = &builder.activityId

	}
	if builder.employeeInfoFlag {
		req.EmployeeInfo = builder.employeeInfo
	}
	if builder.collectionDatasFlag {
		req.CollectionDatas = builder.collectionDatas
	}
	return req
}

type CollectionItem struct {
	TemplateId *string `json:"template_id,omitempty"` // 填报模板ID

	TemplateVersionId *string `json:"template_version_id,omitempty"` // 填报模板版本ID

	ItemId *string `json:"item_id,omitempty"` // 填报项ID

	ItemName *I18n `json:"item_name,omitempty"` // 填报项名称

	FieldType *int `json:"field_type,omitempty"` // 填报项类型，1-文本，2-金额，3-数值，4-百分比，5-日期，6-日期范围

	DecimalPlaces *int `json:"decimal_places,omitempty"` // 小数位数

	CalcMethod *int `json:"calc_method,omitempty"` // 计算方式，1-加和，2-最新值

	Preset *bool `json:"preset,omitempty"` // 是否预置填报项

	IsRequired *bool `json:"is_required,omitempty"` // 是否必填
}

type CollectionItemBuilder struct {
	templateId     string // 填报模板ID
	templateIdFlag bool

	templateVersionId     string // 填报模板版本ID
	templateVersionIdFlag bool

	itemId     string // 填报项ID
	itemIdFlag bool

	itemName     *I18n // 填报项名称
	itemNameFlag bool

	fieldType     int // 填报项类型，1-文本，2-金额，3-数值，4-百分比，5-日期，6-日期范围
	fieldTypeFlag bool

	decimalPlaces     int // 小数位数
	decimalPlacesFlag bool

	calcMethod     int // 计算方式，1-加和，2-最新值
	calcMethodFlag bool

	preset     bool // 是否预置填报项
	presetFlag bool

	isRequired     bool // 是否必填
	isRequiredFlag bool
}

func NewCollectionItemBuilder() *CollectionItemBuilder {
	builder := &CollectionItemBuilder{}
	return builder
}

// 填报模板ID
//
// 示例值：7202076988667019308
func (builder *CollectionItemBuilder) TemplateId(templateId string) *CollectionItemBuilder {
	builder.templateId = templateId
	builder.templateIdFlag = true
	return builder
}

// 填报模板版本ID
//
// 示例值：7202076988667019308
func (builder *CollectionItemBuilder) TemplateVersionId(templateVersionId string) *CollectionItemBuilder {
	builder.templateVersionId = templateVersionId
	builder.templateVersionIdFlag = true
	return builder
}

// 填报项ID
//
// 示例值：7202076988667019308
func (builder *CollectionItemBuilder) ItemId(itemId string) *CollectionItemBuilder {
	builder.itemId = itemId
	builder.itemIdFlag = true
	return builder
}

// 填报项名称
//
// 示例值：
func (builder *CollectionItemBuilder) ItemName(itemName *I18n) *CollectionItemBuilder {
	builder.itemName = itemName
	builder.itemNameFlag = true
	return builder
}

// 填报项类型，1-文本，2-金额，3-数值，4-百分比，5-日期，6-日期范围
//
// 示例值：1
func (builder *CollectionItemBuilder) FieldType(fieldType int) *CollectionItemBuilder {
	builder.fieldType = fieldType
	builder.fieldTypeFlag = true
	return builder
}

// 小数位数
//
// 示例值：1
func (builder *CollectionItemBuilder) DecimalPlaces(decimalPlaces int) *CollectionItemBuilder {
	builder.decimalPlaces = decimalPlaces
	builder.decimalPlacesFlag = true
	return builder
}

// 计算方式，1-加和，2-最新值
//
// 示例值：1
func (builder *CollectionItemBuilder) CalcMethod(calcMethod int) *CollectionItemBuilder {
	builder.calcMethod = calcMethod
	builder.calcMethodFlag = true
	return builder
}

// 是否预置填报项
//
// 示例值：true
func (builder *CollectionItemBuilder) Preset(preset bool) *CollectionItemBuilder {
	builder.preset = preset
	builder.presetFlag = true
	return builder
}

// 是否必填
//
// 示例值：true
func (builder *CollectionItemBuilder) IsRequired(isRequired bool) *CollectionItemBuilder {
	builder.isRequired = isRequired
	builder.isRequiredFlag = true
	return builder
}

func (builder *CollectionItemBuilder) Build() *CollectionItem {
	req := &CollectionItem{}
	if builder.templateIdFlag {
		req.TemplateId = &builder.templateId

	}
	if builder.templateVersionIdFlag {
		req.TemplateVersionId = &builder.templateVersionId

	}
	if builder.itemIdFlag {
		req.ItemId = &builder.itemId

	}
	if builder.itemNameFlag {
		req.ItemName = builder.itemName
	}
	if builder.fieldTypeFlag {
		req.FieldType = &builder.fieldType

	}
	if builder.decimalPlacesFlag {
		req.DecimalPlaces = &builder.decimalPlaces

	}
	if builder.calcMethodFlag {
		req.CalcMethod = &builder.calcMethod

	}
	if builder.presetFlag {
		req.Preset = &builder.preset

	}
	if builder.isRequiredFlag {
		req.IsRequired = &builder.isRequired

	}
	return req
}

type CollectionItemValue struct {
	ItemId *string `json:"item_id,omitempty"` // 填报项ID

	Value *string `json:"value,omitempty"` // 填报项值

	FieldType *int `json:"field_type,omitempty"` // 填报项类型，1-文本，2-金额，3-数值，4-百分比，5-日期，6-日期范围

	CurrencyId *string `json:"currency_id,omitempty"` // 币种ID

	CurrencyCode *string `json:"currency_code,omitempty"` // 币种code
}

type CollectionItemValueBuilder struct {
	itemId     string // 填报项ID
	itemIdFlag bool

	value     string // 填报项值
	valueFlag bool

	fieldType     int // 填报项类型，1-文本，2-金额，3-数值，4-百分比，5-日期，6-日期范围
	fieldTypeFlag bool

	currencyId     string // 币种ID
	currencyIdFlag bool

	currencyCode     string // 币种code
	currencyCodeFlag bool
}

func NewCollectionItemValueBuilder() *CollectionItemValueBuilder {
	builder := &CollectionItemValueBuilder{}
	return builder
}

// 填报项ID
//
// 示例值：7202076988667019308
func (builder *CollectionItemValueBuilder) ItemId(itemId string) *CollectionItemValueBuilder {
	builder.itemId = itemId
	builder.itemIdFlag = true
	return builder
}

// 填报项值
//
// 示例值：text
func (builder *CollectionItemValueBuilder) Value(value string) *CollectionItemValueBuilder {
	builder.value = value
	builder.valueFlag = true
	return builder
}

// 填报项类型，1-文本，2-金额，3-数值，4-百分比，5-日期，6-日期范围
//
// 示例值：1
func (builder *CollectionItemValueBuilder) FieldType(fieldType int) *CollectionItemValueBuilder {
	builder.fieldType = fieldType
	builder.fieldTypeFlag = true
	return builder
}

// 币种ID
//
// 示例值：7202076988667019308
func (builder *CollectionItemValueBuilder) CurrencyId(currencyId string) *CollectionItemValueBuilder {
	builder.currencyId = currencyId
	builder.currencyIdFlag = true
	return builder
}

// 币种code
//
// 示例值：CNY
func (builder *CollectionItemValueBuilder) CurrencyCode(currencyCode string) *CollectionItemValueBuilder {
	builder.currencyCode = currencyCode
	builder.currencyCodeFlag = true
	return builder
}

func (builder *CollectionItemValueBuilder) Build() *CollectionItemValue {
	req := &CollectionItemValue{}
	if builder.itemIdFlag {
		req.ItemId = &builder.itemId

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

	}
	if builder.fieldTypeFlag {
		req.FieldType = &builder.fieldType

	}
	if builder.currencyIdFlag {
		req.CurrencyId = &builder.currencyId

	}
	if builder.currencyCodeFlag {
		req.CurrencyCode = &builder.currencyCode

	}
	return req
}

type CollectionTemplate struct {
	TemplateId *string `json:"template_id,omitempty"` // 填报模板ID

	TemplateName *I18n `json:"template_name,omitempty"` // 填报模板名称

	VersionId *string `json:"version_id,omitempty"` // 填报模板版本ID（主键ID）

	Items []*CollectionItem `json:"items,omitempty"` // 填报项列表

	CountryRegions []*CountryRegion `json:"country_regions,omitempty"` // 国家地区多值列表

	IsActive *bool `json:"is_active,omitempty"` // 启停用状态

	EffectiveDate *string `json:"effective_date,omitempty"` // 生效日期

	CreatedTime *string `json:"created_time,omitempty"` // 模板创建时间，毫秒时间戳

	ModifiedTime *string `json:"modified_time,omitempty"` // 模板更新时间，毫秒时间戳
}

type CollectionTemplateBuilder struct {
	templateId     string // 填报模板ID
	templateIdFlag bool

	templateName     *I18n // 填报模板名称
	templateNameFlag bool

	versionId     string // 填报模板版本ID（主键ID）
	versionIdFlag bool

	items     []*CollectionItem // 填报项列表
	itemsFlag bool

	countryRegions     []*CountryRegion // 国家地区多值列表
	countryRegionsFlag bool

	isActive     bool // 启停用状态
	isActiveFlag bool

	effectiveDate     string // 生效日期
	effectiveDateFlag bool

	createdTime     string // 模板创建时间，毫秒时间戳
	createdTimeFlag bool

	modifiedTime     string // 模板更新时间，毫秒时间戳
	modifiedTimeFlag bool
}

func NewCollectionTemplateBuilder() *CollectionTemplateBuilder {
	builder := &CollectionTemplateBuilder{}
	return builder
}

// 填报模板ID
//
// 示例值：7202076988667019308
func (builder *CollectionTemplateBuilder) TemplateId(templateId string) *CollectionTemplateBuilder {
	builder.templateId = templateId
	builder.templateIdFlag = true
	return builder
}

// 填报模板名称
//
// 示例值：
func (builder *CollectionTemplateBuilder) TemplateName(templateName *I18n) *CollectionTemplateBuilder {
	builder.templateName = templateName
	builder.templateNameFlag = true
	return builder
}

// 填报模板版本ID（主键ID）
//
// 示例值：7202076988667019308
func (builder *CollectionTemplateBuilder) VersionId(versionId string) *CollectionTemplateBuilder {
	builder.versionId = versionId
	builder.versionIdFlag = true
	return builder
}

// 填报项列表
//
// 示例值：
func (builder *CollectionTemplateBuilder) Items(items []*CollectionItem) *CollectionTemplateBuilder {
	builder.items = items
	builder.itemsFlag = true
	return builder
}

// 国家地区多值列表
//
// 示例值：
func (builder *CollectionTemplateBuilder) CountryRegions(countryRegions []*CountryRegion) *CollectionTemplateBuilder {
	builder.countryRegions = countryRegions
	builder.countryRegionsFlag = true
	return builder
}

// 启停用状态
//
// 示例值：true
func (builder *CollectionTemplateBuilder) IsActive(isActive bool) *CollectionTemplateBuilder {
	builder.isActive = isActive
	builder.isActiveFlag = true
	return builder
}

// 生效日期
//
// 示例值：2022-01-01
func (builder *CollectionTemplateBuilder) EffectiveDate(effectiveDate string) *CollectionTemplateBuilder {
	builder.effectiveDate = effectiveDate
	builder.effectiveDateFlag = true
	return builder
}

// 模板创建时间，毫秒时间戳
//
// 示例值：1723797063000
func (builder *CollectionTemplateBuilder) CreatedTime(createdTime string) *CollectionTemplateBuilder {
	builder.createdTime = createdTime
	builder.createdTimeFlag = true
	return builder
}

// 模板更新时间，毫秒时间戳
//
// 示例值：1723797063000
func (builder *CollectionTemplateBuilder) ModifiedTime(modifiedTime string) *CollectionTemplateBuilder {
	builder.modifiedTime = modifiedTime
	builder.modifiedTimeFlag = true
	return builder
}

func (builder *CollectionTemplateBuilder) Build() *CollectionTemplate {
	req := &CollectionTemplate{}
	if builder.templateIdFlag {
		req.TemplateId = &builder.templateId

	}
	if builder.templateNameFlag {
		req.TemplateName = builder.templateName
	}
	if builder.versionIdFlag {
		req.VersionId = &builder.versionId

	}
	if builder.itemsFlag {
		req.Items = builder.items
	}
	if builder.countryRegionsFlag {
		req.CountryRegions = builder.countryRegions
	}
	if builder.isActiveFlag {
		req.IsActive = &builder.isActive

	}
	if builder.effectiveDateFlag {
		req.EffectiveDate = &builder.effectiveDate

	}
	if builder.createdTimeFlag {
		req.CreatedTime = &builder.createdTime

	}
	if builder.modifiedTimeFlag {
		req.ModifiedTime = &builder.modifiedTime

	}
	return req
}

type CollectionTemplateSnapshot struct {
	TemplateId *string `json:"template_id,omitempty"` // 填报模板ID

	TemplateName *I18n `json:"template_name,omitempty"` // 填报模板名称

	TemplateVersionId *string `json:"template_version_id,omitempty"` // 填报模板版本ID（主键ID）

	Items []*CollectionItem `json:"items,omitempty"` // 填报项列表

	ActivityId *string `json:"activity_id,omitempty"` // 填报活动id
}

type CollectionTemplateSnapshotBuilder struct {
	templateId     string // 填报模板ID
	templateIdFlag bool

	templateName     *I18n // 填报模板名称
	templateNameFlag bool

	templateVersionId     string // 填报模板版本ID（主键ID）
	templateVersionIdFlag bool

	items     []*CollectionItem // 填报项列表
	itemsFlag bool

	activityId     string // 填报活动id
	activityIdFlag bool
}

func NewCollectionTemplateSnapshotBuilder() *CollectionTemplateSnapshotBuilder {
	builder := &CollectionTemplateSnapshotBuilder{}
	return builder
}

// 填报模板ID
//
// 示例值：7202076988667019308
func (builder *CollectionTemplateSnapshotBuilder) TemplateId(templateId string) *CollectionTemplateSnapshotBuilder {
	builder.templateId = templateId
	builder.templateIdFlag = true
	return builder
}

// 填报模板名称
//
// 示例值：
func (builder *CollectionTemplateSnapshotBuilder) TemplateName(templateName *I18n) *CollectionTemplateSnapshotBuilder {
	builder.templateName = templateName
	builder.templateNameFlag = true
	return builder
}

// 填报模板版本ID（主键ID）
//
// 示例值：7202076988667019308
func (builder *CollectionTemplateSnapshotBuilder) TemplateVersionId(templateVersionId string) *CollectionTemplateSnapshotBuilder {
	builder.templateVersionId = templateVersionId
	builder.templateVersionIdFlag = true
	return builder
}

// 填报项列表
//
// 示例值：
func (builder *CollectionTemplateSnapshotBuilder) Items(items []*CollectionItem) *CollectionTemplateSnapshotBuilder {
	builder.items = items
	builder.itemsFlag = true
	return builder
}

// 填报活动id
//
// 示例值：7202076988667019308
func (builder *CollectionTemplateSnapshotBuilder) ActivityId(activityId string) *CollectionTemplateSnapshotBuilder {
	builder.activityId = activityId
	builder.activityIdFlag = true
	return builder
}

func (builder *CollectionTemplateSnapshotBuilder) Build() *CollectionTemplateSnapshot {
	req := &CollectionTemplateSnapshot{}
	if builder.templateIdFlag {
		req.TemplateId = &builder.templateId

	}
	if builder.templateNameFlag {
		req.TemplateName = builder.templateName
	}
	if builder.templateVersionIdFlag {
		req.TemplateVersionId = &builder.templateVersionId

	}
	if builder.itemsFlag {
		req.Items = builder.items
	}
	if builder.activityIdFlag {
		req.ActivityId = &builder.activityId

	}
	return req
}

type CompensationCost struct {
	CompensationCostValue *string `json:"compensation_cost_value,omitempty"` // 成本项值

	I18nNames []*I18nContent `json:"i18n_names,omitempty"` // 成本项名称
}

type CompensationCostBuilder struct {
	compensationCostValue     string // 成本项值
	compensationCostValueFlag bool

	i18nNames     []*I18nContent // 成本项名称
	i18nNamesFlag bool
}

func NewCompensationCostBuilder() *CompensationCostBuilder {
	builder := &CompensationCostBuilder{}
	return builder
}

// 成本项值
//
// 示例值：123456.78
func (builder *CompensationCostBuilder) CompensationCostValue(compensationCostValue string) *CompensationCostBuilder {
	builder.compensationCostValue = compensationCostValue
	builder.compensationCostValueFlag = true
	return builder
}

// 成本项名称
//
// 示例值：
func (builder *CompensationCostBuilder) I18nNames(i18nNames []*I18nContent) *CompensationCostBuilder {
	builder.i18nNames = i18nNames
	builder.i18nNamesFlag = true
	return builder
}

func (builder *CompensationCostBuilder) Build() *CompensationCost {
	req := &CompensationCost{}
	if builder.compensationCostValueFlag {
		req.CompensationCostValue = &builder.compensationCostValue

	}
	if builder.i18nNamesFlag {
		req.I18nNames = builder.i18nNames
	}
	return req
}

type CompensationCostItem struct {
	NumberOfIndividualsForPayment *int `json:"number_of_individuals_for_payment,omitempty"` // 发薪人数

	CompensationCosts []*CompensationCost `json:"compensation_costs,omitempty"` // 成本项数据
}

type CompensationCostItemBuilder struct {
	numberOfIndividualsForPayment     int // 发薪人数
	numberOfIndividualsForPaymentFlag bool

	compensationCosts     []*CompensationCost // 成本项数据
	compensationCostsFlag bool
}

func NewCompensationCostItemBuilder() *CompensationCostItemBuilder {
	builder := &CompensationCostItemBuilder{}
	return builder
}

// 发薪人数
//
// 示例值：100
func (builder *CompensationCostItemBuilder) NumberOfIndividualsForPayment(numberOfIndividualsForPayment int) *CompensationCostItemBuilder {
	builder.numberOfIndividualsForPayment = numberOfIndividualsForPayment
	builder.numberOfIndividualsForPaymentFlag = true
	return builder
}

// 成本项数据
//
// 示例值：
func (builder *CompensationCostItemBuilder) CompensationCosts(compensationCosts []*CompensationCost) *CompensationCostItemBuilder {
	builder.compensationCosts = compensationCosts
	builder.compensationCostsFlag = true
	return builder
}

func (builder *CompensationCostItemBuilder) Build() *CompensationCostItem {
	req := &CompensationCostItem{}
	if builder.numberOfIndividualsForPaymentFlag {
		req.NumberOfIndividualsForPayment = &builder.numberOfIndividualsForPayment

	}
	if builder.compensationCostsFlag {
		req.CompensationCosts = builder.compensationCosts
	}
	return req
}

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

	Names []*I18nContent `json:"names,omitempty"` // 方案名称

	ApplicableCountryRegion *string `json:"applicable_country_region,omitempty"` // 适用国家

	Dimensions []*Dimension `json:"dimensions,omitempty"` // 成本分摊方案对应的汇总维度列表

	CostItems []*CostItem `json:"cost_items,omitempty"` // 成本分摊方案对应的成本项列表
}

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

	names     []*I18nContent // 方案名称
	namesFlag bool

	applicableCountryRegion     string // 适用国家
	applicableCountryRegionFlag bool

	dimensions     []*Dimension // 成本分摊方案对应的汇总维度列表
	dimensionsFlag bool

	costItems     []*CostItem // 成本分摊方案对应的成本项列表
	costItemsFlag bool
}

func NewCostAllocationPlanBuilder() *CostAllocationPlanBuilder {
	builder := &CostAllocationPlanBuilder{}
	return builder
}

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

// 方案名称
//
// 示例值：
func (builder *CostAllocationPlanBuilder) Names(names []*I18nContent) *CostAllocationPlanBuilder {
	builder.names = names
	builder.namesFlag = true
	return builder
}

// 适用国家
//
// 示例值：6823630319749580302
func (builder *CostAllocationPlanBuilder) ApplicableCountryRegion(applicableCountryRegion string) *CostAllocationPlanBuilder {
	builder.applicableCountryRegion = applicableCountryRegion
	builder.applicableCountryRegionFlag = true
	return builder
}

// 成本分摊方案对应的汇总维度列表
//
// 示例值：
func (builder *CostAllocationPlanBuilder) Dimensions(dimensions []*Dimension) *CostAllocationPlanBuilder {
	builder.dimensions = dimensions
	builder.dimensionsFlag = true
	return builder
}

// 成本分摊方案对应的成本项列表
//
// 示例值：
func (builder *CostAllocationPlanBuilder) CostItems(costItems []*CostItem) *CostAllocationPlanBuilder {
	builder.costItems = costItems
	builder.costItemsFlag = true
	return builder
}

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

	}
	if builder.namesFlag {
		req.Names = builder.names
	}
	if builder.applicableCountryRegionFlag {
		req.ApplicableCountryRegion = &builder.applicableCountryRegion

	}
	if builder.dimensionsFlag {
		req.Dimensions = builder.dimensions
	}
	if builder.costItemsFlag {
		req.CostItems = builder.costItems
	}
	return req
}

type CostAllocationReportData struct {
	DataSummaryDimensions []*DataSummaryDimension `json:"data_summary_dimensions,omitempty"` // 数据维度汇总

	CompensationCostItem *CompensationCostItem `json:"compensation_cost_item,omitempty"` // 成本项数据

	EmploymentId *string `json:"employment_id,omitempty"` // 员工id
}

type CostAllocationReportDataBuilder struct {
	dataSummaryDimensions     []*DataSummaryDimension // 数据维度汇总
	dataSummaryDimensionsFlag bool

	compensationCostItem     *CompensationCostItem // 成本项数据
	compensationCostItemFlag bool

	employmentId     string // 员工id
	employmentIdFlag bool
}

func NewCostAllocationReportDataBuilder() *CostAllocationReportDataBuilder {
	builder := &CostAllocationReportDataBuilder{}
	return builder
}

// 数据维度汇总
//
// 示例值：
func (builder *CostAllocationReportDataBuilder) DataSummaryDimensions(dataSummaryDimensions []*DataSummaryDimension) *CostAllocationReportDataBuilder {
	builder.dataSummaryDimensions = dataSummaryDimensions
	builder.dataSummaryDimensionsFlag = true
	return builder
}

// 成本项数据
//
// 示例值：
func (builder *CostAllocationReportDataBuilder) CompensationCostItem(compensationCostItem *CompensationCostItem) *CostAllocationReportDataBuilder {
	builder.compensationCostItem = compensationCostItem
	builder.compensationCostItemFlag = true
	return builder
}

// 员工id
//
// 示例值：72321836123692186
func (builder *CostAllocationReportDataBuilder) EmploymentId(employmentId string) *CostAllocationReportDataBuilder {
	builder.employmentId = employmentId
	builder.employmentIdFlag = true
	return builder
}

func (builder *CostAllocationReportDataBuilder) Build() *CostAllocationReportData {
	req := &CostAllocationReportData{}
	if builder.dataSummaryDimensionsFlag {
		req.DataSummaryDimensions = builder.dataSummaryDimensions
	}
	if builder.compensationCostItemFlag {
		req.CompensationCostItem = builder.compensationCostItem
	}
	if builder.employmentIdFlag {
		req.EmploymentId = &builder.employmentId

	}
	return req
}

type CostCorrectDetail struct {
	EmployeeId *string `json:"employee_id,omitempty"` // 员工employeeID

	ActiveStatus *int `json:"active_status,omitempty"` // 生效状态，1生效，2失效

	Dimensions []*DimensionValue `json:"dimensions,omitempty"` // 员工汇总维度值列表

	CostItems []*CostItemValue `json:"cost_items,omitempty"` // 员工成本项值列表
}

type CostCorrectDetailBuilder struct {
	employeeId     string // 员工employeeID
	employeeIdFlag bool

	activeStatus     int // 生效状态，1生效，2失效
	activeStatusFlag bool

	dimensions     []*DimensionValue // 员工汇总维度值列表
	dimensionsFlag bool

	costItems     []*CostItemValue // 员工成本项值列表
	costItemsFlag bool
}

func NewCostCorrectDetailBuilder() *CostCorrectDetailBuilder {
	builder := &CostCorrectDetailBuilder{}
	return builder
}

// 员工employeeID
//
// 示例值：7433424967234601004
func (builder *CostCorrectDetailBuilder) EmployeeId(employeeId string) *CostCorrectDetailBuilder {
	builder.employeeId = employeeId
	builder.employeeIdFlag = true
	return builder
}

// 生效状态，1生效，2失效
//
// 示例值：1
func (builder *CostCorrectDetailBuilder) ActiveStatus(activeStatus int) *CostCorrectDetailBuilder {
	builder.activeStatus = activeStatus
	builder.activeStatusFlag = true
	return builder
}

// 员工汇总维度值列表
//
// 示例值：
func (builder *CostCorrectDetailBuilder) Dimensions(dimensions []*DimensionValue) *CostCorrectDetailBuilder {
	builder.dimensions = dimensions
	builder.dimensionsFlag = true
	return builder
}

// 员工成本项值列表
//
// 示例值：
func (builder *CostCorrectDetailBuilder) CostItems(costItems []*CostItemValue) *CostCorrectDetailBuilder {
	builder.costItems = costItems
	builder.costItemsFlag = true
	return builder
}

func (builder *CostCorrectDetailBuilder) Build() *CostCorrectDetail {
	req := &CostCorrectDetail{}
	if builder.employeeIdFlag {
		req.EmployeeId = &builder.employeeId

	}
	if builder.activeStatusFlag {
		req.ActiveStatus = &builder.activeStatus

	}
	if builder.dimensionsFlag {
		req.Dimensions = builder.dimensions
	}
	if builder.costItemsFlag {
		req.CostItems = builder.costItems
	}
	return req
}

type CostItem struct {
	Id *string `json:"id,omitempty"` // 成本项的唯一标识

	Name []*I18nContent `json:"name,omitempty"` // 成本项名称

	EnableCorrect *bool `json:"enable_correct,omitempty"` // 成本项是否启用更正
}

type CostItemBuilder struct {
	id     string // 成本项的唯一标识
	idFlag bool

	name     []*I18nContent // 成本项名称
	nameFlag bool

	enableCorrect     bool // 成本项是否启用更正
	enableCorrectFlag bool
}

func NewCostItemBuilder() *CostItemBuilder {
	builder := &CostItemBuilder{}
	return builder
}

// 成本项的唯一标识
//
// 示例值：7433424967234601004
func (builder *CostItemBuilder) Id(id string) *CostItemBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 成本项名称
//
// 示例值：
func (builder *CostItemBuilder) Name(name []*I18nContent) *CostItemBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 成本项是否启用更正
//
// 示例值：true
func (builder *CostItemBuilder) EnableCorrect(enableCorrect bool) *CostItemBuilder {
	builder.enableCorrect = enableCorrect
	builder.enableCorrectFlag = true
	return builder
}

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

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.enableCorrectFlag {
		req.EnableCorrect = &builder.enableCorrect

	}
	return req
}

type CostItemValue struct {
	Id *string `json:"id,omitempty"` // 成本项ID

	Value *string `json:"value,omitempty"` // 成本项值
}

type CostItemValueBuilder struct {
	id     string // 成本项ID
	idFlag bool

	value     string // 成本项值
	valueFlag bool
}

func NewCostItemValueBuilder() *CostItemValueBuilder {
	builder := &CostItemValueBuilder{}
	return builder
}

// 成本项ID
//
// 示例值：7433424967234601004
func (builder *CostItemValueBuilder) Id(id string) *CostItemValueBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 成本项值
//
// 示例值：1.00
func (builder *CostItemValueBuilder) Value(value string) *CostItemValueBuilder {
	builder.value = value
	builder.valueFlag = true
	return builder
}

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

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

	}
	return req
}

type CountryRegion struct {
	Id *string `json:"id,omitempty"` // 国家地区ID

	Alpha3Code *string `json:"alpha3_code,omitempty"` // 国家地区三字码
}

type CountryRegionBuilder struct {
	id     string // 国家地区ID
	idFlag bool

	alpha3Code     string // 国家地区三字码
	alpha3CodeFlag bool
}

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

// 国家地区ID
//
// 示例值：7202076988667019308
func (builder *CountryRegionBuilder) Id(id string) *CountryRegionBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 国家地区三字码
//
// 示例值：CHN
func (builder *CountryRegionBuilder) Alpha3Code(alpha3Code string) *CountryRegionBuilder {
	builder.alpha3Code = alpha3Code
	builder.alpha3CodeFlag = true
	return builder
}

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

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

	}
	return req
}

type DataSummaryDimension struct {
	DimensionLevel *int `json:"dimension_level,omitempty"` // 层级

	DimensionType *int `json:"dimension_type,omitempty"` // 类型

	DimensionValueId *string `json:"dimension_value_id,omitempty"` // 维度ID，需要再次转换

	EnumDimension *EnumObject `json:"enum_dimension,omitempty"` // 算薪项汇总维度时，当算薪项是特定枚举值，会使用该字段返回枚举值ID以及枚举值Key

	DimensionValueLookupInfo *DimensionValueLookupInfo `json:"dimension_value_lookup_info,omitempty"` // 维度引用对象的基础信息，当维度为引用类型字段才会有值，目前支持的引用对象类型见type

	DimensionNames []*I18nContent `json:"dimension_names,omitempty"` // 维度名称，自定义维度使用

	DimensionTitles []*I18nContent `json:"dimension_titles,omitempty"` // 数据维度表头，自定义维度使用
}

type DataSummaryDimensionBuilder struct {
	dimensionLevel     int // 层级
	dimensionLevelFlag bool

	dimensionType     int // 类型
	dimensionTypeFlag bool

	dimensionValueId     string // 维度ID，需要再次转换
	dimensionValueIdFlag bool

	enumDimension     *EnumObject // 算薪项汇总维度时，当算薪项是特定枚举值，会使用该字段返回枚举值ID以及枚举值Key
	enumDimensionFlag bool

	dimensionValueLookupInfo     *DimensionValueLookupInfo // 维度引用对象的基础信息，当维度为引用类型字段才会有值，目前支持的引用对象类型见type
	dimensionValueLookupInfoFlag bool

	dimensionNames     []*I18nContent // 维度名称，自定义维度使用
	dimensionNamesFlag bool

	dimensionTitles     []*I18nContent // 数据维度表头，自定义维度使用
	dimensionTitlesFlag bool
}

func NewDataSummaryDimensionBuilder() *DataSummaryDimensionBuilder {
	builder := &DataSummaryDimensionBuilder{}
	return builder
}

// 层级
//
// 示例值：1
func (builder *DataSummaryDimensionBuilder) DimensionLevel(dimensionLevel int) *DataSummaryDimensionBuilder {
	builder.dimensionLevel = dimensionLevel
	builder.dimensionLevelFlag = true
	return builder
}

// 类型
//
// 示例值：1
func (builder *DataSummaryDimensionBuilder) DimensionType(dimensionType int) *DataSummaryDimensionBuilder {
	builder.dimensionType = dimensionType
	builder.dimensionTypeFlag = true
	return builder
}

// 维度ID，需要再次转换
//
// 示例值：6823630319749580306
func (builder *DataSummaryDimensionBuilder) DimensionValueId(dimensionValueId string) *DataSummaryDimensionBuilder {
	builder.dimensionValueId = dimensionValueId
	builder.dimensionValueIdFlag = true
	return builder
}

// 算薪项汇总维度时，当算薪项是特定枚举值，会使用该字段返回枚举值ID以及枚举值Key
//
// 示例值：
func (builder *DataSummaryDimensionBuilder) EnumDimension(enumDimension *EnumObject) *DataSummaryDimensionBuilder {
	builder.enumDimension = enumDimension
	builder.enumDimensionFlag = true
	return builder
}

// 维度引用对象的基础信息，当维度为引用类型字段才会有值，目前支持的引用对象类型见type
//
// 示例值：
func (builder *DataSummaryDimensionBuilder) DimensionValueLookupInfo(dimensionValueLookupInfo *DimensionValueLookupInfo) *DataSummaryDimensionBuilder {
	builder.dimensionValueLookupInfo = dimensionValueLookupInfo
	builder.dimensionValueLookupInfoFlag = true
	return builder
}

// 维度名称，自定义维度使用
//
// 示例值：
func (builder *DataSummaryDimensionBuilder) DimensionNames(dimensionNames []*I18nContent) *DataSummaryDimensionBuilder {
	builder.dimensionNames = dimensionNames
	builder.dimensionNamesFlag = true
	return builder
}

// 数据维度表头，自定义维度使用
//
// 示例值：
func (builder *DataSummaryDimensionBuilder) DimensionTitles(dimensionTitles []*I18nContent) *DataSummaryDimensionBuilder {
	builder.dimensionTitles = dimensionTitles
	builder.dimensionTitlesFlag = true
	return builder
}

func (builder *DataSummaryDimensionBuilder) Build() *DataSummaryDimension {
	req := &DataSummaryDimension{}
	if builder.dimensionLevelFlag {
		req.DimensionLevel = &builder.dimensionLevel

	}
	if builder.dimensionTypeFlag {
		req.DimensionType = &builder.dimensionType

	}
	if builder.dimensionValueIdFlag {
		req.DimensionValueId = &builder.dimensionValueId

	}
	if builder.enumDimensionFlag {
		req.EnumDimension = builder.enumDimension
	}
	if builder.dimensionValueLookupInfoFlag {
		req.DimensionValueLookupInfo = builder.dimensionValueLookupInfo
	}
	if builder.dimensionNamesFlag {
		req.DimensionNames = builder.dimensionNames
	}
	if builder.dimensionTitlesFlag {
		req.DimensionTitles = builder.dimensionTitles
	}
	return req
}

type Datasource struct {
	Code *string `json:"code,omitempty"` // 数据源编码

	I18nNames []*I18nContent `json:"i18n_names,omitempty"` // 数据源名称

	ActiveStatus *int `json:"active_status,omitempty"` // 启停用状态

	Fields []*DatasourceField `json:"fields,omitempty"` // 数据源字段列表

	I18nDescription []*I18nContent `json:"i18n_description,omitempty"` // 数据源描述

	DataPeriodType *int `json:"data_period_type,omitempty"` // 数据期间类型（数据写入维度）
}

type DatasourceBuilder struct {
	code     string // 数据源编码
	codeFlag bool

	i18nNames     []*I18nContent // 数据源名称
	i18nNamesFlag bool

	activeStatus     int // 启停用状态
	activeStatusFlag bool

	fields     []*DatasourceField // 数据源字段列表
	fieldsFlag bool

	i18nDescription     []*I18nContent // 数据源描述
	i18nDescriptionFlag bool

	dataPeriodType     int // 数据期间类型（数据写入维度）
	dataPeriodTypeFlag bool
}

func NewDatasourceBuilder() *DatasourceBuilder {
	builder := &DatasourceBuilder{}
	return builder
}

// 数据源编码
//
// 示例值：test_datasource__c
func (builder *DatasourceBuilder) Code(code string) *DatasourceBuilder {
	builder.code = code
	builder.codeFlag = true
	return builder
}

// 数据源名称
//
// 示例值：
func (builder *DatasourceBuilder) I18nNames(i18nNames []*I18nContent) *DatasourceBuilder {
	builder.i18nNames = i18nNames
	builder.i18nNamesFlag = true
	return builder
}

// 启停用状态
//
// 示例值：1
func (builder *DatasourceBuilder) ActiveStatus(activeStatus int) *DatasourceBuilder {
	builder.activeStatus = activeStatus
	builder.activeStatusFlag = true
	return builder
}

// 数据源字段列表
//
// 示例值：
func (builder *DatasourceBuilder) Fields(fields []*DatasourceField) *DatasourceBuilder {
	builder.fields = fields
	builder.fieldsFlag = true
	return builder
}

// 数据源描述
//
// 示例值：
func (builder *DatasourceBuilder) I18nDescription(i18nDescription []*I18nContent) *DatasourceBuilder {
	builder.i18nDescription = i18nDescription
	builder.i18nDescriptionFlag = true
	return builder
}

// 数据期间类型（数据写入维度）
//
// 示例值：
func (builder *DatasourceBuilder) DataPeriodType(dataPeriodType int) *DatasourceBuilder {
	builder.dataPeriodType = dataPeriodType
	builder.dataPeriodTypeFlag = true
	return builder
}

func (builder *DatasourceBuilder) Build() *Datasource {
	req := &Datasource{}
	if builder.codeFlag {
		req.Code = &builder.code

	}
	if builder.i18nNamesFlag {
		req.I18nNames = builder.i18nNames
	}
	if builder.activeStatusFlag {
		req.ActiveStatus = &builder.activeStatus

	}
	if builder.fieldsFlag {
		req.Fields = builder.fields
	}
	if builder.i18nDescriptionFlag {
		req.I18nDescription = builder.i18nDescription
	}
	if builder.dataPeriodTypeFlag {
		req.DataPeriodType = &builder.dataPeriodType

	}
	return req
}

type DatasourceField struct {
	Code *string `json:"code,omitempty"` // 数据源字段编码

	I18nNames []*I18nContent `json:"i18n_names,omitempty"` // 数据源字段名称

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

	ActiveStatus *int `json:"active_status,omitempty"` // 字段启停用状态

	I18nDescription []*I18nContent `json:"i18n_description,omitempty"` // 数据源字段描述

	DecimalPlaces *int `json:"decimal_places,omitempty"` // 保留小数位数。目前只有number、money类型字段需要设置保留小数
}

type DatasourceFieldBuilder struct {
	code     string // 数据源字段编码
	codeFlag bool

	i18nNames     []*I18nContent // 数据源字段名称
	i18nNamesFlag bool

	fieldType     int // 字段类型
	fieldTypeFlag bool

	activeStatus     int // 字段启停用状态
	activeStatusFlag bool

	i18nDescription     []*I18nContent // 数据源字段描述
	i18nDescriptionFlag bool

	decimalPlaces     int // 保留小数位数。目前只有number、money类型字段需要设置保留小数
	decimalPlacesFlag bool
}

func NewDatasourceFieldBuilder() *DatasourceFieldBuilder {
	builder := &DatasourceFieldBuilder{}
	return builder
}

// 数据源字段编码
//
// 示例值：test__c
func (builder *DatasourceFieldBuilder) Code(code string) *DatasourceFieldBuilder {
	builder.code = code
	builder.codeFlag = true
	return builder
}

// 数据源字段名称
//
// 示例值：
func (builder *DatasourceFieldBuilder) I18nNames(i18nNames []*I18nContent) *DatasourceFieldBuilder {
	builder.i18nNames = i18nNames
	builder.i18nNamesFlag = true
	return builder
}

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

// 字段启停用状态
//
// 示例值：1
func (builder *DatasourceFieldBuilder) ActiveStatus(activeStatus int) *DatasourceFieldBuilder {
	builder.activeStatus = activeStatus
	builder.activeStatusFlag = true
	return builder
}

// 数据源字段描述
//
// 示例值：
func (builder *DatasourceFieldBuilder) I18nDescription(i18nDescription []*I18nContent) *DatasourceFieldBuilder {
	builder.i18nDescription = i18nDescription
	builder.i18nDescriptionFlag = true
	return builder
}

// 保留小数位数。目前只有number、money类型字段需要设置保留小数
//
// 示例值：1
func (builder *DatasourceFieldBuilder) DecimalPlaces(decimalPlaces int) *DatasourceFieldBuilder {
	builder.decimalPlaces = decimalPlaces
	builder.decimalPlacesFlag = true
	return builder
}

func (builder *DatasourceFieldBuilder) Build() *DatasourceField {
	req := &DatasourceField{}
	if builder.codeFlag {
		req.Code = &builder.code

	}
	if builder.i18nNamesFlag {
		req.I18nNames = builder.i18nNames
	}
	if builder.fieldTypeFlag {
		req.FieldType = &builder.fieldType

	}
	if builder.activeStatusFlag {
		req.ActiveStatus = &builder.activeStatus

	}
	if builder.i18nDescriptionFlag {
		req.I18nDescription = builder.i18nDescription
	}
	if builder.decimalPlacesFlag {
		req.DecimalPlaces = &builder.decimalPlaces

	}
	return req
}

type DatasourceRecord struct {
	ActiveStatus *int `json:"active_status,omitempty"` // 记录的启停用状态

	FieldValues []*DatasourceRecordField `json:"field_values,omitempty"` // 记录的字段值列表
}

type DatasourceRecordBuilder struct {
	activeStatus     int // 记录的启停用状态
	activeStatusFlag bool

	fieldValues     []*DatasourceRecordField // 记录的字段值列表
	fieldValuesFlag bool
}

func NewDatasourceRecordBuilder() *DatasourceRecordBuilder {
	builder := &DatasourceRecordBuilder{}
	return builder
}

// 记录的启停用状态
//
// 示例值：1
func (builder *DatasourceRecordBuilder) ActiveStatus(activeStatus int) *DatasourceRecordBuilder {
	builder.activeStatus = activeStatus
	builder.activeStatusFlag = true
	return builder
}

// 记录的字段值列表
//
// 示例值：
func (builder *DatasourceRecordBuilder) FieldValues(fieldValues []*DatasourceRecordField) *DatasourceRecordBuilder {
	builder.fieldValues = fieldValues
	builder.fieldValuesFlag = true
	return builder
}

func (builder *DatasourceRecordBuilder) Build() *DatasourceRecord {
	req := &DatasourceRecord{}
	if builder.activeStatusFlag {
		req.ActiveStatus = &builder.activeStatus

	}
	if builder.fieldValuesFlag {
		req.FieldValues = builder.fieldValues
	}
	return req
}

type DatasourceRecordField struct {
	FieldCode *string `json:"field_code,omitempty"` // 数据源字段编码

	Value *string `json:"value,omitempty"` // 字段值 通过string传输，确保字段的值符合协议。  - money：金额  eg: "12.23"  超过设定精度会被四舍五入，目前只支持人民币¥元 - number：数值 eg: "12.87" 超过设定精度会被四舍五入 - text：文本 eg: "我是一段文本"。文本字符个数不允许超过500，一条记录的文本总的字符个数不允许超过3000. - date：日期 yyyy-MM-dd  eg: "2024-05-09" - percentage：百分比 "10" 代表10%，最多保留两位小数，超过后四舍五入

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

type DatasourceRecordFieldBuilder struct {
	fieldCode     string // 数据源字段编码
	fieldCodeFlag bool

	value     string // 字段值 通过string传输，确保字段的值符合协议。  - money：金额  eg: "12.23"  超过设定精度会被四舍五入，目前只支持人民币¥元 - number：数值 eg: "12.87" 超过设定精度会被四舍五入 - text：文本 eg: "我是一段文本"。文本字符个数不允许超过500，一条记录的文本总的字符个数不允许超过3000. - date：日期 yyyy-MM-dd  eg: "2024-05-09" - percentage：百分比 "10" 代表10%，最多保留两位小数，超过后四舍五入
	valueFlag bool

	fieldType     int // 字段类型
	fieldTypeFlag bool
}

func NewDatasourceRecordFieldBuilder() *DatasourceRecordFieldBuilder {
	builder := &DatasourceRecordFieldBuilder{}
	return builder
}

// 数据源字段编码
//
// 示例值：test__c
func (builder *DatasourceRecordFieldBuilder) FieldCode(fieldCode string) *DatasourceRecordFieldBuilder {
	builder.fieldCode = fieldCode
	builder.fieldCodeFlag = true
	return builder
}

// 字段值 通过string传输，确保字段的值符合协议。  - money：金额  eg: "12.23"  超过设定精度会被四舍五入，目前只支持人民币¥元 - number：数值 eg: "12.87" 超过设定精度会被四舍五入 - text：文本 eg: "我是一段文本"。文本字符个数不允许超过500，一条记录的文本总的字符个数不允许超过3000. - date：日期 yyyy-MM-dd  eg: "2024-05-09" - percentage：百分比 "10" 代表10%，最多保留两位小数，超过后四舍五入
//
// 示例值：123
func (builder *DatasourceRecordFieldBuilder) Value(value string) *DatasourceRecordFieldBuilder {
	builder.value = value
	builder.valueFlag = true
	return builder
}

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

func (builder *DatasourceRecordFieldBuilder) Build() *DatasourceRecordField {
	req := &DatasourceRecordField{}
	if builder.fieldCodeFlag {
		req.FieldCode = &builder.fieldCode

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

	}
	if builder.fieldTypeFlag {
		req.FieldType = &builder.fieldType

	}
	return req
}

type DatasourceRecordFieldFilter struct {
	FieldCode *string `json:"field_code,omitempty"` // 查询条件的字段编码

	FieldValues []string `json:"field_values,omitempty"` // 条件值列表

	Operator *int `json:"operator,omitempty"` // 查询操作符
}

type DatasourceRecordFieldFilterBuilder struct {
	fieldCode     string // 查询条件的字段编码
	fieldCodeFlag bool

	fieldValues     []string // 条件值列表
	fieldValuesFlag bool

	operator     int // 查询操作符
	operatorFlag bool
}

func NewDatasourceRecordFieldFilterBuilder() *DatasourceRecordFieldFilterBuilder {
	builder := &DatasourceRecordFieldFilterBuilder{}
	return builder
}

// 查询条件的字段编码
//
// 示例值：test__c
func (builder *DatasourceRecordFieldFilterBuilder) FieldCode(fieldCode string) *DatasourceRecordFieldFilterBuilder {
	builder.fieldCode = fieldCode
	builder.fieldCodeFlag = true
	return builder
}

// 条件值列表
//
// 示例值：
func (builder *DatasourceRecordFieldFilterBuilder) FieldValues(fieldValues []string) *DatasourceRecordFieldFilterBuilder {
	builder.fieldValues = fieldValues
	builder.fieldValuesFlag = true
	return builder
}

// 查询操作符
//
// 示例值：1
func (builder *DatasourceRecordFieldFilterBuilder) Operator(operator int) *DatasourceRecordFieldFilterBuilder {
	builder.operator = operator
	builder.operatorFlag = true
	return builder
}

func (builder *DatasourceRecordFieldFilterBuilder) Build() *DatasourceRecordFieldFilter {
	req := &DatasourceRecordFieldFilter{}
	if builder.fieldCodeFlag {
		req.FieldCode = &builder.fieldCode

	}
	if builder.fieldValuesFlag {
		req.FieldValues = builder.fieldValues
	}
	if builder.operatorFlag {
		req.Operator = &builder.operator

	}
	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 Dimension struct {
	I18nNames []*I18nContent `json:"i18n_names,omitempty"` // 汇总维度信息

	ApiName *string `json:"api_name,omitempty"` // 汇总维度字段名称

	ObjApiName *string `json:"obj_api_name,omitempty"` // 汇总维度对象名称
}

type DimensionBuilder struct {
	i18nNames     []*I18nContent // 汇总维度信息
	i18nNamesFlag bool

	apiName     string // 汇总维度字段名称
	apiNameFlag bool

	objApiName     string // 汇总维度对象名称
	objApiNameFlag bool
}

func NewDimensionBuilder() *DimensionBuilder {
	builder := &DimensionBuilder{}
	return builder
}

// 汇总维度信息
//
// 示例值：
func (builder *DimensionBuilder) I18nNames(i18nNames []*I18nContent) *DimensionBuilder {
	builder.i18nNames = i18nNames
	builder.i18nNamesFlag = true
	return builder
}

// 汇总维度字段名称
//
// 示例值：company
func (builder *DimensionBuilder) ApiName(apiName string) *DimensionBuilder {
	builder.apiName = apiName
	builder.apiNameFlag = true
	return builder
}

// 汇总维度对象名称
//
// 示例值：jobData
func (builder *DimensionBuilder) ObjApiName(objApiName string) *DimensionBuilder {
	builder.objApiName = objApiName
	builder.objApiNameFlag = true
	return builder
}

func (builder *DimensionBuilder) Build() *Dimension {
	req := &Dimension{}
	if builder.i18nNamesFlag {
		req.I18nNames = builder.i18nNames
	}
	if builder.apiNameFlag {
		req.ApiName = &builder.apiName

	}
	if builder.objApiNameFlag {
		req.ObjApiName = &builder.objApiName

	}
	return req
}

type DimensionValue struct {
	ObjApiName *string `json:"obj_api_name,omitempty"` // 汇总维度对象标识

	ApiName *string `json:"api_name,omitempty"` // 汇总维度字段标识

	Value *string `json:"value,omitempty"` // 汇总维度值
}

type DimensionValueBuilder struct {
	objApiName     string // 汇总维度对象标识
	objApiNameFlag bool

	apiName     string // 汇总维度字段标识
	apiNameFlag bool

	value     string // 汇总维度值
	valueFlag bool
}

func NewDimensionValueBuilder() *DimensionValueBuilder {
	builder := &DimensionValueBuilder{}
	return builder
}

// 汇总维度对象标识
//
// 示例值：jobData
func (builder *DimensionValueBuilder) ObjApiName(objApiName string) *DimensionValueBuilder {
	builder.objApiName = objApiName
	builder.objApiNameFlag = true
	return builder
}

// 汇总维度字段标识
//
// 示例值：company
func (builder *DimensionValueBuilder) ApiName(apiName string) *DimensionValueBuilder {
	builder.apiName = apiName
	builder.apiNameFlag = true
	return builder
}

// 汇总维度值
//
// 示例值：测试公司
func (builder *DimensionValueBuilder) Value(value string) *DimensionValueBuilder {
	builder.value = value
	builder.valueFlag = true
	return builder
}

func (builder *DimensionValueBuilder) Build() *DimensionValue {
	req := &DimensionValue{}
	if builder.objApiNameFlag {
		req.ObjApiName = &builder.objApiName

	}
	if builder.apiNameFlag {
		req.ApiName = &builder.apiName

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

	}
	return req
}

type DimensionValueLookupInfo struct {
	Type *string `json:"type,omitempty"` // 引用对象类型

	Id *string `json:"id,omitempty"` // 引用对象的id，可根据相关API查询到对象的完整信息

	Code *string `json:"code,omitempty"` // 引用对象的code，目前下面的对象会有code
}

type DimensionValueLookupInfoBuilder struct {
	type_    string // 引用对象类型
	typeFlag bool

	id     string // 引用对象的id，可根据相关API查询到对象的完整信息
	idFlag bool

	code     string // 引用对象的code，目前下面的对象会有code
	codeFlag bool
}

func NewDimensionValueLookupInfoBuilder() *DimensionValueLookupInfoBuilder {
	builder := &DimensionValueLookupInfoBuilder{}
	return builder
}

// 引用对象类型
//
// 示例值：work_calendar
func (builder *DimensionValueLookupInfoBuilder) Type(type_ string) *DimensionValueLookupInfoBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

// 引用对象的id，可根据相关API查询到对象的完整信息
//
// 示例值：6961286846093788621
func (builder *DimensionValueLookupInfoBuilder) Id(id string) *DimensionValueLookupInfoBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

// 引用对象的code，目前下面的对象会有code
//
// 示例值：D1230011115
func (builder *DimensionValueLookupInfoBuilder) Code(code string) *DimensionValueLookupInfoBuilder {
	builder.code = code
	builder.codeFlag = true
	return builder
}

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

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

	}
	if builder.codeFlag {
		req.Code = &builder.code

	}
	return req
}

type DmpChangeEvent struct {
	EmployeeNumber *string `json:"employee_number,omitempty"` // 员工工号

	OldVersionData []*DmpTimelineField `json:"old_version_data,omitempty"` // 变更前版本信息

	NewVersionData []*DmpTimelineField `json:"new_version_data,omitempty"` // 变更后版本信息
}

type DmpChangeEventBuilder struct {
	employeeNumber     string // 员工工号
	employeeNumberFlag bool

	oldVersionData     []*DmpTimelineField // 变更前版本信息
	oldVersionDataFlag bool

	newVersionData     []*DmpTimelineField // 变更后版本信息
	newVersionDataFlag bool
}

func NewDmpChangeEventBuilder() *DmpChangeEventBuilder {
	builder := &DmpChangeEventBuilder{}
	return builder
}

// 员工工号
//
// 示例值：12345
func (builder *DmpChangeEventBuilder) EmployeeNumber(employeeNumber string) *DmpChangeEventBuilder {
	builder.employeeNumber = employeeNumber
	builder.employeeNumberFlag = true
	return builder
}

// 变更前版本信息
//
// 示例值：
func (builder *DmpChangeEventBuilder) OldVersionData(oldVersionData []*DmpTimelineField) *DmpChangeEventBuilder {
	builder.oldVersionData = oldVersionData
	builder.oldVersionDataFlag = true
	return builder
}

// 变更后版本信息
//
// 示例值：
func (builder *DmpChangeEventBuilder) NewVersionData(newVersionData []*DmpTimelineField) *DmpChangeEventBuilder {
	builder.newVersionData = newVersionData
	builder.newVersionDataFlag = true
	return builder
}

func (builder *DmpChangeEventBuilder) Build() *DmpChangeEvent {
	req := &DmpChangeEvent{}
	if builder.employeeNumberFlag {
		req.EmployeeNumber = &builder.employeeNumber

	}
	if builder.oldVersionDataFlag {
		req.OldVersionData = builder.oldVersionData
	}
	if builder.newVersionDataFlag {
		req.NewVersionData = builder.newVersionData
	}
	return req
}

type DmpField struct {
	Key *string `json:"key,omitempty"` // 字段名称

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

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

type DmpFieldBuilder struct {
	key     string // 字段名称
	keyFlag bool

	value     string // 字段值
	valueFlag bool

	type_    int // 字段类型
	typeFlag bool
}

func NewDmpFieldBuilder() *DmpFieldBuilder {
	builder := &DmpFieldBuilder{}
	return builder
}

// 字段名称
//
// 示例值：Employee Number
func (builder *DmpFieldBuilder) Key(key string) *DmpFieldBuilder {
	builder.key = key
	builder.keyFlag = true
	return builder
}

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

// 字段类型
//
// 示例值：0
func (builder *DmpFieldBuilder) Type(type_ int) *DmpFieldBuilder {
	builder.type_ = type_
	builder.typeFlag = true
	return builder
}

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

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

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

	}
	return req
}

type DmpOriginalData struct {
	EmployeeNumber *string `json:"employee_number,omitempty"` // 员工工号

	TimePeriods []*DmpTimelineField `json:"time_periods,omitempty"` // 时间轴信息
}

type DmpOriginalDataBuilder struct {
	employeeNumber     string // 员工工号
	employeeNumberFlag bool

	timePeriods     []*DmpTimelineField // 时间轴信息
	timePeriodsFlag bool
}

func NewDmpOriginalDataBuilder() *DmpOriginalDataBuilder {
	builder := &DmpOriginalDataBuilder{}
	return builder
}

// 员工工号
//
// 示例值：12345
func (builder *DmpOriginalDataBuilder) EmployeeNumber(employeeNumber string) *DmpOriginalDataBuilder {
	builder.employeeNumber = employeeNumber
	builder.employeeNumberFlag = true
	return builder
}

// 时间轴信息
//
// 示例值：
func (builder *DmpOriginalDataBuilder) TimePeriods(timePeriods []*DmpTimelineField) *DmpOriginalDataBuilder {
	builder.timePeriods = timePeriods
	builder.timePeriodsFlag = true
	return builder
}

func (builder *DmpOriginalDataBuilder) Build() *DmpOriginalData {
	req := &DmpOriginalData{}
	if builder.employeeNumberFlag {
		req.EmployeeNumber = &builder.employeeNumber

	}
	if builder.timePeriodsFlag {
		req.TimePeriods = builder.timePeriods
	}
	return req
}

type DmpTimelineField struct {
	FromDate *string `json:"from_date,omitempty"` // 生效日期

	ToDate *string `json:"to_date,omitempty"` // 失效日期

	Fields []*DmpField `json:"fields,omitempty"` // 字段信息
}

type DmpTimelineFieldBuilder struct {
	fromDate     string // 生效日期
	fromDateFlag bool

	toDate     string // 失效日期
	toDateFlag bool

	fields     []*DmpField // 字段信息
	fieldsFlag bool
}

func NewDmpTimelineFieldBuilder() *DmpTimelineFieldBuilder {
	builder := &DmpTimelineFieldBuilder{}
	return builder
}

// 生效日期
//
// 示例值：2000-01-01
func (builder *DmpTimelineFieldBuilder) FromDate(fromDate string) *DmpTimelineFieldBuilder {
	builder.fromDate = fromDate
	builder.fromDateFlag = true
	return builder
}

// 失效日期
//
// 示例值：2000-01-01
func (builder *DmpTimelineFieldBuilder) ToDate(toDate string) *DmpTimelineFieldBuilder {
	builder.toDate = toDate
	builder.toDateFlag = true
	return builder
}

// 字段信息
//
// 示例值：
func (builder *DmpTimelineFieldBuilder) Fields(fields []*DmpField) *DmpTimelineFieldBuilder {
	builder.fields = fields
	builder.fieldsFlag = true
	return builder
}

func (builder *DmpTimelineFieldBuilder) Build() *DmpTimelineField {
	req := &DmpTimelineField{}
	if builder.fromDateFlag {
		req.FromDate = &builder.fromDate

	}
	if builder.toDateFlag {
		req.ToDate = &builder.toDate

	}
	if builder.fieldsFlag {
		req.Fields = builder.fields
	}
	return req
}

type DonationsTaxData struct {
	EmployeeId *int `json:"employee_id,omitempty"` // 员工工号（老工号）

	LegalName *string `json:"legal_name,omitempty"` // 法定姓名

	IdentityType *string `json:"identity_type,omitempty"` // 证件类型

	IdentityNumber *string `json:"identity_number,omitempty"` // 证件号码

	IssuingCompany *string `json:"issuing_company,omitempty"` // 发薪公司主体

	NonTaxResidence *string `json:"non_tax_residence,omitempty"` // 非居民纳税标签

	TotalDonationAmount *string `json:"total_donation_amount,omitempty"` // 本月实际捐赠金额

	TaxFreeDonationAmount30 *string `json:"tax_free_donation_amount30,omitempty"` // 本月实际免税捐赠-30%

	TaxFreeDonationAmount100 *string `json:"tax_free_donation_amount100,omitempty"` // 本月实际免税捐赠-100%
}

type DonationsTaxDataBuilder struct {
	employeeId     int // 员工工号（老工号）
	employeeIdFlag bool

	legalName     string // 法定姓名
	legalNameFlag bool

	identityType     string // 证件类型
	identityTypeFlag bool

	identityNumber     string // 证件号码
	identityNumberFlag bool

	issuingCompany     string // 发薪公司主体
	issuingCompanyFlag bool

	nonTaxResidence     string // 非居民纳税标签
	nonTaxResidenceFlag bool

	totalDonationAmount     string // 本月实际捐赠金额
	totalDonationAmountFlag bool

	taxFreeDonationAmount30     string // 本月实际免税捐赠-30%
	taxFreeDonationAmount30Flag bool

	taxFreeDonationAmount100     string // 本月实际免税捐赠-100%
	taxFreeDonationAmount100Flag bool
}

func NewDonationsTaxDataBuilder() *DonationsTaxDataBuilder {
	builder := &DonationsTaxDataBuilder{}
	return builder
}

// 员工工号（老工号）
//
// 示例值：111
func (builder *DonationsTaxDataBuilder) EmployeeId(employeeId int) *DonationsTaxDataBuilder {
	builder.employeeId = employeeId
	builder.employeeIdFlag = true
	return builder
}

// 法定姓名
//
// 示例值：张三
func (builder *DonationsTaxDataBuilder) LegalName(legalName string) *DonationsTaxDataBuilder {
	builder.legalName = legalName
	builder.legalNameFlag = true
	return builder
}

// 证件类型
//
// 示例值：居民身份证
func (builder *DonationsTaxDataBuilder) IdentityType(identityType string) *DonationsTaxDataBuilder {
	builder.identityType = identityType
	builder.identityTypeFlag = true
	return builder
}

// 证件号码
//
// 示例值：123456789
func (builder *DonationsTaxDataBuilder) IdentityNumber(identityNumber string) *DonationsTaxDataBuilder {
	builder.identityNumber = identityNumber
	builder.identityNumberFlag = true
	return builder
}

// 发薪公司主体
//
// 示例值：字节跳动
func (builder *DonationsTaxDataBuilder) IssuingCompany(issuingCompany string) *DonationsTaxDataBuilder {
	builder.issuingCompany = issuingCompany
	builder.issuingCompanyFlag = true
	return builder
}

// 非居民纳税标签
//
// 示例值：是
func (builder *DonationsTaxDataBuilder) NonTaxResidence(nonTaxResidence string) *DonationsTaxDataBuilder {
	builder.nonTaxResidence = nonTaxResidence
	builder.nonTaxResidenceFlag = true
	return builder
}

// 本月实际捐赠金额
//
// 示例值：123.45
func (builder *DonationsTaxDataBuilder) TotalDonationAmount(totalDonationAmount string) *DonationsTaxDataBuilder {
	builder.totalDonationAmount = totalDonationAmount
	builder.totalDonationAmountFlag = true
	return builder
}

// 本月实际免税捐赠-30%
//
// 示例值：123.45
func (builder *DonationsTaxDataBuilder) TaxFreeDonationAmount30(taxFreeDonationAmount30 string) *DonationsTaxDataBuilder {
	builder.taxFreeDonationAmount30 = taxFreeDonationAmount30
	builder.taxFreeDonationAmount30Flag = true
	return builder
}

// 本月实际免税捐赠-100%
//
// 示例值：123.45
func (builder *DonationsTaxDataBuilder) TaxFreeDonationAmount100(taxFreeDonationAmount100 string) *DonationsTaxDataBuilder {
	builder.taxFreeDonationAmount100 = taxFreeDonationAmount100
	builder.taxFreeDonationAmount100Flag = true
	return builder
}

func (builder *DonationsTaxDataBuilder) Build() *DonationsTaxData {
	req := &DonationsTaxData{}
	if builder.employeeIdFlag {
		req.EmployeeId = &builder.employeeId

	}
	if builder.legalNameFlag {
		req.LegalName = &builder.legalName

	}
	if builder.identityTypeFlag {
		req.IdentityType = &builder.identityType

	}
	if builder.identityNumberFlag {
		req.IdentityNumber = &builder.identityNumber

	}
	if builder.issuingCompanyFlag {
		req.IssuingCompany = &builder.issuingCompany

	}
	if builder.nonTaxResidenceFlag {
		req.NonTaxResidence = &builder.nonTaxResidence

	}
	if builder.totalDonationAmountFlag {
		req.TotalDonationAmount = &builder.totalDonationAmount

	}
	if builder.taxFreeDonationAmount30Flag {
		req.TaxFreeDonationAmount30 = &builder.taxFreeDonationAmount30

	}
	if builder.taxFreeDonationAmount100Flag {
		req.TaxFreeDonationAmount100 = &builder.taxFreeDonationAmount100

	}
	return req
}

type EmployeeInfo struct {
	UserId *string `json:"user_id,omitempty"` // saas user id

	Name *I18n `json:"name,omitempty"` // 姓名

	EmployeeNumber *string `json:"employee_number,omitempty"` // 工号

	EmployeeId *string `json:"employee_id,omitempty"` // 员工雇员ID
}

type EmployeeInfoBuilder struct {
	userId     string // saas user id
	userIdFlag bool

	name     *I18n // 姓名
	nameFlag bool

	employeeNumber     string // 工号
	employeeNumberFlag bool

	employeeId     string // 员工雇员ID
	employeeIdFlag bool
}

func NewEmployeeInfoBuilder() *EmployeeInfoBuilder {
	builder := &EmployeeInfoBuilder{}
	return builder
}

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

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

// 工号
//
// 示例值：100000166
func (builder *EmployeeInfoBuilder) EmployeeNumber(employeeNumber string) *EmployeeInfoBuilder {
	builder.employeeNumber = employeeNumber
	builder.employeeNumberFlag = true
	return builder
}

// 员工雇员ID
//
// 示例值：7087900867940451884
func (builder *EmployeeInfoBuilder) EmployeeId(employeeId string) *EmployeeInfoBuilder {
	builder.employeeId = employeeId
	builder.employeeIdFlag = true
	return builder
}

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

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.employeeNumberFlag {
		req.EmployeeNumber = &builder.employeeNumber

	}
	if builder.employeeIdFlag {
		req.EmployeeId = &builder.employeeId

	}
	return req
}

type EnumObject struct {
	EnumValueId *string `json:"enum_value_id,omitempty"` // 枚举对象ID

	EnumKey *string `json:"enum_key,omitempty"` // 枚举对象
}

type EnumObjectBuilder struct {
	enumValueId     string // 枚举对象ID
	enumValueIdFlag bool

	enumKey     string // 枚举对象
	enumKeyFlag bool
}

func NewEnumObjectBuilder() *EnumObjectBuilder {
	builder := &EnumObjectBuilder{}
	return builder
}

// 枚举对象ID
//
// 示例值：7188920315914207276
func (builder *EnumObjectBuilder) EnumValueId(enumValueId string) *EnumObjectBuilder {
	builder.enumValueId = enumValueId
	builder.enumValueIdFlag = true
	return builder
}

// 枚举对象
//
// 示例值：company
func (builder *EnumObjectBuilder) EnumKey(enumKey string) *EnumObjectBuilder {
	builder.enumKey = enumKey
	builder.enumKeyFlag = true
	return builder
}

func (builder *EnumObjectBuilder) Build() *EnumObject {
	req := &EnumObject{}
	if builder.enumValueIdFlag {
		req.EnumValueId = &builder.enumValueId

	}
	if builder.enumKeyFlag {
		req.EnumKey = &builder.enumKey

	}
	return req
}

type FailInfo struct {
	Idx *int `json:"idx,omitempty"` // 写入失败的数据行索引

	ErrorCode *int `json:"error_code,omitempty"` // 写入失败的原因错误码
}

type FailInfoBuilder struct {
	idx     int // 写入失败的数据行索引
	idxFlag bool

	errorCode     int // 写入失败的原因错误码
	errorCodeFlag bool
}

func NewFailInfoBuilder() *FailInfoBuilder {
	builder := &FailInfoBuilder{}
	return builder
}

// 写入失败的数据行索引
//
// 示例值：0
func (builder *FailInfoBuilder) Idx(idx int) *FailInfoBuilder {
	builder.idx = idx
	builder.idxFlag = true
	return builder
}

// 写入失败的原因错误码
//
// 示例值：0
func (builder *FailInfoBuilder) ErrorCode(errorCode int) *FailInfoBuilder {
	builder.errorCode = errorCode
	builder.errorCodeFlag = true
	return builder
}

func (builder *FailInfoBuilder) Build() *FailInfo {
	req := &FailInfo{}
	if builder.idxFlag {
		req.Idx = &builder.idx

	}
	if builder.errorCodeFlag {
		req.ErrorCode = &builder.errorCode

	}
	return req
}

type I18n struct {
	ZhCn *string `json:"zh_cn,omitempty"` // 中文名称

	EnUs *string `json:"en_us,omitempty"` // 英文名称
}

type I18nBuilder struct {
	zhCn     string // 中文名称
	zhCnFlag bool

	enUs     string // 英文名称
	enUsFlag bool
}

func NewI18nBuilder() *I18nBuilder {
	builder := &I18nBuilder{}
	return builder
}

// 中文名称
//
// 示例值：CHN-审核
func (builder *I18nBuilder) ZhCn(zhCn string) *I18nBuilder {
	builder.zhCn = zhCn
	builder.zhCnFlag = true
	return builder
}

// 英文名称
//
// 示例值：english name
func (builder *I18nBuilder) EnUs(enUs string) *I18nBuilder {
	builder.enUs = enUs
	builder.enUsFlag = true
	return builder
}

func (builder *I18nBuilder) Build() *I18n {
	req := &I18n{}
	if builder.zhCnFlag {
		req.ZhCn = &builder.zhCn

	}
	if builder.enUsFlag {
		req.EnUs = &builder.enUs

	}
	return req
}

type I18nContent struct {
	Locale *string `json:"locale,omitempty"` // 语种

	Value *string `json:"value,omitempty"` // 语种对应的值

	Id *string `json:"id,omitempty"` // 名称对应的实体id
}

type I18nContentBuilder struct {
	locale     string // 语种
	localeFlag bool

	value     string // 语种对应的值
	valueFlag bool

	id     string // 名称对应的实体id
	idFlag bool
}

func NewI18nContentBuilder() *I18nContentBuilder {
	builder := &I18nContentBuilder{}
	return builder
}

// 语种
//
// 示例值：zh_cn
func (builder *I18nContentBuilder) Locale(locale string) *I18nContentBuilder {
	builder.locale = locale
	builder.localeFlag = true
	return builder
}

// 语种对应的值
//
// 示例值：名称
func (builder *I18nContentBuilder) Value(value string) *I18nContentBuilder {
	builder.value = value
	builder.valueFlag = true
	return builder
}

// 名称对应的实体id
//
// 示例值：723123123123123213
func (builder *I18nContentBuilder) Id(id string) *I18nContentBuilder {
	builder.id = id
	builder.idFlag = true
	return builder
}

func (builder *I18nContentBuilder) Build() *I18nContent {
	req := &I18nContent{}
	if builder.localeFlag {
		req.Locale = &builder.locale

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

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

	}
	return req
}

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

	ZhName *string `json:"zh_name,omitempty"` // 中文名

	EnName *string `json:"en_name,omitempty"` // 英文名
}

type IdWithNameBuilder struct {
	id     string // id
	idFlag bool

	zhName     string // 中文名
	zhNameFlag bool

	enName     string // 英文名
	enNameFlag bool
}

func NewIdWithNameBuilder() *IdWithNameBuilder {
	builder := &IdWithNameBuilder{}
	return builder
}

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

// 中文名
//
// 示例值：1
func (builder *IdWithNameBuilder) ZhName(zhName string) *IdWithNameBuilder {
	builder.zhName = zhName
	builder.zhNameFlag = true
	return builder
}

// 英文名
//
// 示例值：1
func (builder *IdWithNameBuilder) EnName(enName string) *IdWithNameBuilder {
	builder.enName = enName
	builder.enNameFlag = true
	return builder
}

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

	}
	if builder.zhNameFlag {
		req.ZhName = &builder.zhName

	}
	if builder.enNameFlag {
		req.EnName = &builder.enName

	}
	return req
}

type IntRange struct {
	GreateThan *int `json:"greate_than,omitempty"` // 大于

	GreateEqualThan *int `json:"greate_equal_than,omitempty"` // 大于等于

	LessThan *int `json:"less_than,omitempty"` // 小于

	LessEqualThan *int `json:"less_equal_than,omitempty"` // 小于等于
}

type IntRangeBuilder struct {
	greateThan     int // 大于
	greateThanFlag bool

	greateEqualThan     int // 大于等于
	greateEqualThanFlag bool

	lessThan     int // 小于
	lessThanFlag bool

	lessEqualThan     int // 小于等于
	lessEqualThanFlag bool
}

func NewIntRangeBuilder() *IntRangeBuilder {
	builder := &IntRangeBuilder{}
	return builder
}

// 大于
//
// 示例值：1
func (builder *IntRangeBuilder) GreateThan(greateThan int) *IntRangeBuilder {
	builder.greateThan = greateThan
	builder.greateThanFlag = true
	return builder
}

// 大于等于
//
// 示例值：1
func (builder *IntRangeBuilder) GreateEqualThan(greateEqualThan int) *IntRangeBuilder {
	builder.greateEqualThan = greateEqualThan
	builder.greateEqualThanFlag = true
	return builder
}

// 小于
//
// 示例值：1
func (builder *IntRangeBuilder) LessThan(lessThan int) *IntRangeBuilder {
	builder.lessThan = lessThan
	builder.lessThanFlag = true
	return builder
}

// 小于等于
//
// 示例值：1
func (builder *IntRangeBuilder) LessEqualThan(lessEqualThan int) *IntRangeBuilder {
	builder.lessEqualThan = lessEqualThan
	builder.lessEqualThanFlag = true
	return builder
}

func (builder *IntRangeBuilder) Build() *IntRange {
	req := &IntRange{}
	if builder.greateThanFlag {
		req.GreateThan = &builder.greateThan

	}
	if builder.greateEqualThanFlag {
		req.GreateEqualThan = &builder.greateEqualThan

	}
	if builder.lessThanFlag {
		req.LessThan = &builder.lessThan

	}
	if builder.lessEqualThanFlag {
		req.LessEqualThan = &builder.lessEqualThan

	}
	return req
}

type PayGroup struct {
	PayGroupId *string `json:"pay_group_id,omitempty"` // 薪资组ID

	Name *I18n `json:"name,omitempty"` // 薪资组名称

	Code *string `json:"code,omitempty"` // 薪资组编码

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

	CountryRegion *CountryRegion `json:"country_region,omitempty"` // 薪资组所属国家/地区

	IsGlobalRegion *bool `json:"is_global_region,omitempty"` // 是否为全球范围
}

type PayGroupBuilder struct {
	payGroupId     string // 薪资组ID
	payGroupIdFlag bool

	name     *I18n // 薪资组名称
	nameFlag bool

	code     string // 薪资组编码
	codeFlag bool

	status     string // 薪资组状态
	statusFlag bool

	countryRegion     *CountryRegion // 薪资组所属国家/地区
	countryRegionFlag bool

	isGlobalRegion     bool // 是否为全球范围
	isGlobalRegionFlag bool
}

func NewPayGroupBuilder() *PayGroupBuilder {
	builder := &PayGroupBuilder{}
	return builder
}

// 薪资组ID
//
// 示例值：6823630319749580301
func (builder *PayGroupBuilder) PayGroupId(payGroupId string) *PayGroupBuilder {
	builder.payGroupId = payGroupId
	builder.payGroupIdFlag = true
	return builder
}

// 薪资组名称
//
// 示例值：CHN - 审核
func (builder *PayGroupBuilder) Name(name *I18n) *PayGroupBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 薪资组编码
//
// 示例值：PAY_GROUP-3-8
func (builder *PayGroupBuilder) Code(code string) *PayGroupBuilder {
	builder.code = code
	builder.codeFlag = true
	return builder
}

// 薪资组状态
//
// 示例值：true
func (builder *PayGroupBuilder) Status(status string) *PayGroupBuilder {
	builder.status = status
	builder.statusFlag = true
	return builder
}

// 薪资组所属国家/地区
//
// 示例值：
func (builder *PayGroupBuilder) CountryRegion(countryRegion *CountryRegion) *PayGroupBuilder {
	builder.countryRegion = countryRegion
	builder.countryRegionFlag = true
	return builder
}

// 是否为全球范围
//
// 示例值：
func (builder *PayGroupBuilder) IsGlobalRegion(isGlobalRegion bool) *PayGroupBuilder {
	builder.isGlobalRegion = isGlobalRegion
	builder.isGlobalRegionFlag = true
	return builder
}

func (builder *PayGroupBuilder) Build() *PayGroup {
	req := &PayGroup{}
	if builder.payGroupIdFlag {
		req.PayGroupId = &builder.payGroupId

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.codeFlag {
		req.Code = &builder.code

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

	}
	if builder.countryRegionFlag {
		req.CountryRegion = builder.countryRegion
	}
	if builder.isGlobalRegionFlag {
		req.IsGlobalRegion = &builder.isGlobalRegion

	}
	return req
}

type Paygroup struct {
	PayGroupId *string `json:"pay_group_id,omitempty"` // 薪资组ID

	Name *I18n `json:"name,omitempty"` // 薪资组名称

	Code *string `json:"code,omitempty"` // 薪资组编码

	Status *int `json:"status,omitempty"` // 薪资组状态

	CountryRegion *CountryRegion `json:"country_region,omitempty"` // 薪资组所属国家/地区

	IsGlobalRegion *bool `json:"is_global_region,omitempty"` // 是否适用全球
}

type PaygroupBuilder struct {
	payGroupId     string // 薪资组ID
	payGroupIdFlag bool

	name     *I18n // 薪资组名称
	nameFlag bool

	code     string // 薪资组编码
	codeFlag bool

	status     int // 薪资组状态
	statusFlag bool

	countryRegion     *CountryRegion // 薪资组所属国家/地区
	countryRegionFlag bool

	isGlobalRegion     bool // 是否适用全球
	isGlobalRegionFlag bool
}

func NewPaygroupBuilder() *PaygroupBuilder {
	builder := &PaygroupBuilder{}
	return builder
}

// 薪资组ID
//
// 示例值：6823630319749580301
func (builder *PaygroupBuilder) PayGroupId(payGroupId string) *PaygroupBuilder {
	builder.payGroupId = payGroupId
	builder.payGroupIdFlag = true
	return builder
}

// 薪资组名称
//
// 示例值：CHN - 审核
func (builder *PaygroupBuilder) Name(name *I18n) *PaygroupBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

// 薪资组编码
//
// 示例值：PAY_GROUP-3-8
func (builder *PaygroupBuilder) Code(code string) *PaygroupBuilder {
	builder.code = code
	builder.codeFlag = true
	return builder
}

// 薪资组状态
//
// 示例值：1
func (builder *PaygroupBuilder) Status(status int) *PaygroupBuilder {
	builder.status = status
	builder.statusFlag = true
	return builder
}

// 薪资组所属国家/地区
//
// 示例值：
func (builder *PaygroupBuilder) CountryRegion(countryRegion *CountryRegion) *PaygroupBuilder {
	builder.countryRegion = countryRegion
	builder.countryRegionFlag = true
	return builder
}

// 是否适用全球
//
// 示例值：
func (builder *PaygroupBuilder) IsGlobalRegion(isGlobalRegion bool) *PaygroupBuilder {
	builder.isGlobalRegion = isGlobalRegion
	builder.isGlobalRegionFlag = true
	return builder
}

func (builder *PaygroupBuilder) Build() *Paygroup {
	req := &Paygroup{}
	if builder.payGroupIdFlag {
		req.PayGroupId = &builder.payGroupId

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.codeFlag {
		req.Code = &builder.code

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

	}
	if builder.countryRegionFlag {
		req.CountryRegion = builder.countryRegion
	}
	if builder.isGlobalRegionFlag {
		req.IsGlobalRegion = &builder.isGlobalRegion

	}
	return req
}

type PaymentAccountingItem struct {
	Id *string `json:"id,omitempty"` // 算薪项唯一标识

	AccountingItemNames []*I18nContent `json:"accounting_item_names,omitempty"` // 算薪项名称

	AccountingItemValue *AccountingItemValue `json:"accounting_item_value,omitempty"` // 算薪项值

	SegmentValues []*SegmentValue `json:"segment_values,omitempty"` // 算薪项分段数据

	AccountingItemType *int `json:"accounting_item_type,omitempty"` // 算薪项类型，1-文本；2-金额；3-数值；4-百分比；5-日期；6-引用
}

type PaymentAccountingItemBuilder struct {
	id     string // 算薪项唯一标识
	idFlag bool

	accountingItemNames     []*I18nContent // 算薪项名称
	accountingItemNamesFlag bool

	accountingItemValue     *AccountingItemValue // 算薪项值
	accountingItemValueFlag bool

	segmentValues     []*SegmentValue // 算薪项分段数据
	segmentValuesFlag bool

	accountingItemType     int // 算薪项类型，1-文本；2-金额；3-数值；4-百分比；5-日期；6-引用
	accountingItemTypeFlag bool
}

func NewPaymentAccountingItemBuilder() *PaymentAccountingItemBuilder {
	builder := &PaymentAccountingItemBuilder{}
	return builder
}

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

// 算薪项名称
//
// 示例值：
func (builder *PaymentAccountingItemBuilder) AccountingItemNames(accountingItemNames []*I18nContent) *PaymentAccountingItemBuilder {
	builder.accountingItemNames = accountingItemNames
	builder.accountingItemNamesFlag = true
	return builder
}

// 算薪项值
//
// 示例值：
func (builder *PaymentAccountingItemBuilder) AccountingItemValue(accountingItemValue *AccountingItemValue) *PaymentAccountingItemBuilder {
	builder.accountingItemValue = accountingItemValue
	builder.accountingItemValueFlag = true
	return builder
}

// 算薪项分段数据
//
// 示例值：
func (builder *PaymentAccountingItemBuilder) SegmentValues(segmentValues []*SegmentValue) *PaymentAccountingItemBuilder {
	builder.segmentValues = segmentValues
	builder.segmentValuesFlag = true
	return builder
}

// 算薪项类型，1-文本；2-金额；3-数值；4-百分比；5-日期；6-引用
//
// 示例值：1
func (builder *PaymentAccountingItemBuilder) AccountingItemType(accountingItemType int) *PaymentAccountingItemBuilder {
	builder.accountingItemType = accountingItemType
	builder.accountingItemTypeFlag = true
	return builder
}

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

	}
	if builder.accountingItemNamesFlag {
		req.AccountingItemNames = builder.accountingItemNames
	}
	if builder.accountingItemValueFlag {
		req.AccountingItemValue = builder.accountingItemValue
	}
	if builder.segmentValuesFlag {
		req.SegmentValues = builder.segmentValues
	}
	if builder.accountingItemTypeFlag {
		req.AccountingItemType = &builder.accountingItemType

	}
	return req
}

type PaymentActivity struct {
	ActivityId *string `json:"activity_id,omitempty"` // 发薪活动唯一标识

	ActivityNames []*I18nContent `json:"activity_names,omitempty"` // 发薪活动名称

	PayDate *string `json:"pay_date,omitempty"` // 发薪活动发薪日期

	TotalNumberOfPayroll *int `json:"total_number_of_payroll,omitempty"` // 发薪总笔数

	NumberOfCalculationActivities *int `json:"number_of_calculation_activities,omitempty"` // 关联的算薪活动个数

	CalculationActivities []*CalculationActivity `json:"calculation_activities,omitempty"` // 发薪活动关联的算薪活动详情

	ActivityStatus *int `json:"activity_status,omitempty"` // 发薪活动审批状态，其中：100-待确认发薪名单；150-待提交审批；200-审批中；300-审批被拒绝；350-审批被撤回；360-审批被撤销；375-审批通过；400-已封存。
}

type PaymentActivityBuilder struct {
	activityId     string // 发薪活动唯一标识
	activityIdFlag bool

	activityNames     []*I18nContent // 发薪活动名称
	activityNamesFlag bool

	payDate     string // 发薪活动发薪日期
	payDateFlag bool

	totalNumberOfPayroll     int // 发薪总笔数
	totalNumberOfPayrollFlag bool

	numberOfCalculationActivities     int // 关联的算薪活动个数
	numberOfCalculationActivitiesFlag bool

	calculationActivities     []*CalculationActivity // 发薪活动关联的算薪活动详情
	calculationActivitiesFlag bool

	activityStatus     int // 发薪活动审批状态，其中：100-待确认发薪名单；150-待提交审批；200-审批中；300-审批被拒绝；350-审批被撤回；360-审批被撤销；375-审批通过；400-已封存。
	activityStatusFlag bool
}

func NewPaymentActivityBuilder() *PaymentActivityBuilder {
	builder := &PaymentActivityBuilder{}
	return builder
}

// 发薪活动唯一标识
//
// 示例值：7202076988667019308
func (builder *PaymentActivityBuilder) ActivityId(activityId string) *PaymentActivityBuilder {
	builder.activityId = activityId
	builder.activityIdFlag = true
	return builder
}

// 发薪活动名称
//
// 示例值：
func (builder *PaymentActivityBuilder) ActivityNames(activityNames []*I18nContent) *PaymentActivityBuilder {
	builder.activityNames = activityNames
	builder.activityNamesFlag = true
	return builder
}

// 发薪活动发薪日期
//
// 示例值：2020-10-31
func (builder *PaymentActivityBuilder) PayDate(payDate string) *PaymentActivityBuilder {
	builder.payDate = payDate
	builder.payDateFlag = true
	return builder
}

// 发薪总笔数
//
// 示例值：100
func (builder *PaymentActivityBuilder) TotalNumberOfPayroll(totalNumberOfPayroll int) *PaymentActivityBuilder {
	builder.totalNumberOfPayroll = totalNumberOfPayroll
	builder.totalNumberOfPayrollFlag = true
	return builder
}

// 关联的算薪活动个数
//
// 示例值：1000
func (builder *PaymentActivityBuilder) NumberOfCalculationActivities(numberOfCalculationActivities int) *PaymentActivityBuilder {
	builder.numberOfCalculationActivities = numberOfCalculationActivities
	builder.numberOfCalculationActivitiesFlag = true
	return builder
}

// 发薪活动关联的算薪活动详情
//
// 示例值：
func (builder *PaymentActivityBuilder) CalculationActivities(calculationActivities []*CalculationActivity) *PaymentActivityBuilder {
	builder.calculationActivities = calculationActivities
	builder.calculationActivitiesFlag = true
	return builder
}

// 发薪活动审批状态，其中：100-待确认发薪名单；150-待提交审批；200-审批中；300-审批被拒绝；350-审批被撤回；360-审批被撤销；375-审批通过；400-已封存。
//
// 示例值：400
func (builder *PaymentActivityBuilder) ActivityStatus(activityStatus int) *PaymentActivityBuilder {
	builder.activityStatus = activityStatus
	builder.activityStatusFlag = true
	return builder
}

func (builder *PaymentActivityBuilder) Build() *PaymentActivity {
	req := &PaymentActivity{}
	if builder.activityIdFlag {
		req.ActivityId = &builder.activityId

	}
	if builder.activityNamesFlag {
		req.ActivityNames = builder.activityNames
	}
	if builder.payDateFlag {
		req.PayDate = &builder.payDate

	}
	if builder.totalNumberOfPayrollFlag {
		req.TotalNumberOfPayroll = &builder.totalNumberOfPayroll

	}
	if builder.numberOfCalculationActivitiesFlag {
		req.NumberOfCalculationActivities = &builder.numberOfCalculationActivities

	}
	if builder.calculationActivitiesFlag {
		req.CalculationActivities = builder.calculationActivities
	}
	if builder.activityStatusFlag {
		req.ActivityStatus = &builder.activityStatus

	}
	return req
}

type PaymentActivityDetail struct {
	EmployeeId *string `json:"employee_id,omitempty"` // 员工的唯一标识

	PaymentDetails []*PaymentAccountingItem `json:"payment_details,omitempty"` // 发薪明细详情
}

type PaymentActivityDetailBuilder struct {
	employeeId     string // 员工的唯一标识
	employeeIdFlag bool

	paymentDetails     []*PaymentAccountingItem // 发薪明细详情
	paymentDetailsFlag bool
}

func NewPaymentActivityDetailBuilder() *PaymentActivityDetailBuilder {
	builder := &PaymentActivityDetailBuilder{}
	return builder
}

// 员工的唯一标识
//
// 示例值：7202076988667019308
func (builder *PaymentActivityDetailBuilder) EmployeeId(employeeId string) *PaymentActivityDetailBuilder {
	builder.employeeId = employeeId
	builder.employeeIdFlag = true
	return builder
}

// 发薪明细详情
//
// 示例值：
func (builder *PaymentActivityDetailBuilder) PaymentDetails(paymentDetails []*PaymentAccountingItem) *PaymentActivityDetailBuilder {
	builder.paymentDetails = paymentDetails
	builder.paymentDetailsFlag = true
	return builder
}

func (builder *PaymentActivityDetailBuilder) Build() *PaymentActivityDetail {
	req := &PaymentActivityDetail{}
	if builder.employeeIdFlag {
		req.EmployeeId = &builder.employeeId

	}
	if builder.paymentDetailsFlag {
		req.PaymentDetails = builder.paymentDetails
	}
	return req
}

type PaymentDetail struct {
	EmployeeId *string `json:"employee_id,omitempty"` // 员工的唯一标识

	ActivityId *string `json:"activity_id,omitempty"` // 发薪明细所在的发薪活动 ID

	PaymentAccountingItems []*PaymentAccountingItem `json:"payment_accounting_items,omitempty"` // 发薪明细详情
}

type PaymentDetailBuilder struct {
	employeeId     string // 员工的唯一标识
	employeeIdFlag bool

	activityId     string // 发薪明细所在的发薪活动 ID
	activityIdFlag bool

	paymentAccountingItems     []*PaymentAccountingItem // 发薪明细详情
	paymentAccountingItemsFlag bool
}

func NewPaymentDetailBuilder() *PaymentDetailBuilder {
	builder := &PaymentDetailBuilder{}
	return builder
}

// 员工的唯一标识
//
// 示例值：7202076988667019308
func (builder *PaymentDetailBuilder) EmployeeId(employeeId string) *PaymentDetailBuilder {
	builder.employeeId = employeeId
	builder.employeeIdFlag = true
	return builder
}

// 发薪明细所在的发薪活动 ID
//
// 示例值：7202076988667019308
func (builder *PaymentDetailBuilder) ActivityId(activityId string) *PaymentDetailBuilder {
	builder.activityId = activityId
	builder.activityIdFlag = true
	return builder
}

// 发薪明细详情
//
// 示例值：
func (builder *PaymentDetailBuilder) PaymentAccountingItems(paymentAccountingItems []*PaymentAccountingItem) *PaymentDetailBuilder {
	builder.paymentAccountingItems = paymentAccountingItems
	builder.paymentAccountingItemsFlag = true
	return builder
}

func (builder *PaymentDetailBuilder) Build() *PaymentDetail {
	req := &PaymentDetail{}
	if builder.employeeIdFlag {
		req.EmployeeId = &builder.employeeId

	}
	if builder.activityIdFlag {
		req.ActivityId = &builder.activityId

	}
	if builder.paymentAccountingItemsFlag {
		req.PaymentAccountingItems = builder.paymentAccountingItems
	}
	return req
}

type SegmentValue struct {
	StartTime *string `json:"start_time,omitempty"` // 分段开始时间-毫秒级时间戳，[start_time, end_time] 是一个左闭右闭区间。

	EndTime *string `json:"end_time,omitempty"` // 分段结束时间-毫秒级时间戳，[start_time, end_time] 是一个左闭右闭区间。

	ReferenceValues []*I18nContent `json:"reference_values,omitempty"` // 引用类型算薪项分段展示值

	OriginalValue *string `json:"original_value,omitempty"` // 算薪项分段原始值
}

type SegmentValueBuilder struct {
	startTime     string // 分段开始时间-毫秒级时间戳，[start_time, end_time] 是一个左闭右闭区间。
	startTimeFlag bool

	endTime     string // 分段结束时间-毫秒级时间戳，[start_time, end_time] 是一个左闭右闭区间。
	endTimeFlag bool

	referenceValues     []*I18nContent // 引用类型算薪项分段展示值
	referenceValuesFlag bool

	originalValue     string // 算薪项分段原始值
	originalValueFlag bool
}

func NewSegmentValueBuilder() *SegmentValueBuilder {
	builder := &SegmentValueBuilder{}
	return builder
}

// 分段开始时间-毫秒级时间戳，[start_time, end_time] 是一个左闭右闭区间。
//
// 示例值：7220356259681386540
func (builder *SegmentValueBuilder) StartTime(startTime string) *SegmentValueBuilder {
	builder.startTime = startTime
	builder.startTimeFlag = true
	return builder
}

// 分段结束时间-毫秒级时间戳，[start_time, end_time] 是一个左闭右闭区间。
//
// 示例值：7220356259681386540
func (builder *SegmentValueBuilder) EndTime(endTime string) *SegmentValueBuilder {
	builder.endTime = endTime
	builder.endTimeFlag = true
	return builder
}

// 引用类型算薪项分段展示值
//
// 示例值：
func (builder *SegmentValueBuilder) ReferenceValues(referenceValues []*I18nContent) *SegmentValueBuilder {
	builder.referenceValues = referenceValues
	builder.referenceValuesFlag = true
	return builder
}

// 算薪项分段原始值
//
// 示例值：10000
func (builder *SegmentValueBuilder) OriginalValue(originalValue string) *SegmentValueBuilder {
	builder.originalValue = originalValue
	builder.originalValueFlag = true
	return builder
}

func (builder *SegmentValueBuilder) Build() *SegmentValue {
	req := &SegmentValue{}
	if builder.startTimeFlag {
		req.StartTime = &builder.startTime

	}
	if builder.endTimeFlag {
		req.EndTime = &builder.endTime

	}
	if builder.referenceValuesFlag {
		req.ReferenceValues = builder.referenceValues
	}
	if builder.originalValueFlag {
		req.OriginalValue = &builder.originalValue

	}
	return req
}

type VerifActItemValue struct {
	ItemId *string `json:"item_id,omitempty"` // item_id

	Value *string `json:"value,omitempty"` // 值

	IsRef *bool `json:"is_ref,omitempty"` // 是否引用项

	Name *IdWithName `json:"name,omitempty"` // 引用项名称
}

type VerifActItemValueBuilder struct {
	itemId     string // item_id
	itemIdFlag bool

	value     string // 值
	valueFlag bool

	isRef     bool // 是否引用项
	isRefFlag bool

	name     *IdWithName // 引用项名称
	nameFlag bool
}

func NewVerifActItemValueBuilder() *VerifActItemValueBuilder {
	builder := &VerifActItemValueBuilder{}
	return builder
}

// item_id
//
// 示例值：1
func (builder *VerifActItemValueBuilder) ItemId(itemId string) *VerifActItemValueBuilder {
	builder.itemId = itemId
	builder.itemIdFlag = true
	return builder
}

// 值
//
// 示例值：1
func (builder *VerifActItemValueBuilder) Value(value string) *VerifActItemValueBuilder {
	builder.value = value
	builder.valueFlag = true
	return builder
}

// 是否引用项
//
// 示例值：
func (builder *VerifActItemValueBuilder) IsRef(isRef bool) *VerifActItemValueBuilder {
	builder.isRef = isRef
	builder.isRefFlag = true
	return builder
}

// 引用项名称
//
// 示例值：
func (builder *VerifActItemValueBuilder) Name(name *IdWithName) *VerifActItemValueBuilder {
	builder.name = name
	builder.nameFlag = true
	return builder
}

func (builder *VerifActItemValueBuilder) Build() *VerifActItemValue {
	req := &VerifActItemValue{}
	if builder.itemIdFlag {
		req.ItemId = &builder.itemId

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

	}
	if builder.isRefFlag {
		req.IsRef = &builder.isRef

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

type VerifActProration struct {
	StartDate *string `json:"start_date,omitempty"` // 开始日期 "2025-05-01"

	EndDate *string `json:"end_date,omitempty"` // 结束日期 "2025-05-01"

	CutoffDate *string `json:"cutoff_date,omitempty"` // 数据锁定日期 "2025-05-01"

	ItemValues []*VerifActItemValue `json:"item_values,omitempty"` // 分段值，数值、金额等类型数据项会保留六位小数
}

type VerifActProrationBuilder struct {
	startDate     string // 开始日期 "2025-05-01"
	startDateFlag bool

	endDate     string // 结束日期 "2025-05-01"
	endDateFlag bool

	cutoffDate     string // 数据锁定日期 "2025-05-01"
	cutoffDateFlag bool

	itemValues     []*VerifActItemValue // 分段值，数值、金额等类型数据项会保留六位小数
	itemValuesFlag bool
}

func NewVerifActProrationBuilder() *VerifActProrationBuilder {
	builder := &VerifActProrationBuilder{}
	return builder
}

// 开始日期 "2025-05-01"
//
// 示例值：1
func (builder *VerifActProrationBuilder) StartDate(startDate string) *VerifActProrationBuilder {
	builder.startDate = startDate
	builder.startDateFlag = true
	return builder
}

// 结束日期 "2025-05-01"
//
// 示例值：1
func (builder *VerifActProrationBuilder) EndDate(endDate string) *VerifActProrationBuilder {
	builder.endDate = endDate
	builder.endDateFlag = true
	return builder
}

// 数据锁定日期 "2025-05-01"
//
// 示例值：1
func (builder *VerifActProrationBuilder) CutoffDate(cutoffDate string) *VerifActProrationBuilder {
	builder.cutoffDate = cutoffDate
	builder.cutoffDateFlag = true
	return builder
}

// 分段值，数值、金额等类型数据项会保留六位小数
//
// 示例值：
func (builder *VerifActProrationBuilder) ItemValues(itemValues []*VerifActItemValue) *VerifActProrationBuilder {
	builder.itemValues = itemValues
	builder.itemValuesFlag = true
	return builder
}

func (builder *VerifActProrationBuilder) Build() *VerifActProration {
	req := &VerifActProration{}
	if builder.startDateFlag {
		req.StartDate = &builder.startDate

	}
	if builder.endDateFlag {
		req.EndDate = &builder.endDate

	}
	if builder.cutoffDateFlag {
		req.CutoffDate = &builder.cutoffDate

	}
	if builder.itemValuesFlag {
		req.ItemValues = builder.itemValues
	}
	return req
}

type VerifDataSourceRule struct {
	ApiName *string `json:"api_name,omitempty"` // 数据源key

	DatasourceName *IdWithName `json:"datasource_name,omitempty"` // 数据源名称

	ObjectType *int `json:"object_type,omitempty"` // 集成对象

	DatasourceItems []*VerifDatasourceItem `json:"datasource_items,omitempty"` // 数据源明细字段
}

type VerifDataSourceRuleBuilder struct {
	apiName     string // 数据源key
	apiNameFlag bool

	datasourceName     *IdWithName // 数据源名称
	datasourceNameFlag bool

	objectType     int // 集成对象
	objectTypeFlag bool

	datasourceItems     []*VerifDatasourceItem // 数据源明细字段
	datasourceItemsFlag bool
}

func NewVerifDataSourceRuleBuilder() *VerifDataSourceRuleBuilder {
	builder := &VerifDataSourceRuleBuilder{}
	return builder
}

// 数据源key
//
// 示例值：1
func (builder *VerifDataSourceRuleBuilder) ApiName(apiName string) *VerifDataSourceRuleBuilder {
	builder.apiName = apiName
	builder.apiNameFlag = true
	return builder
}

// 数据源名称
//
// 示例值：
func (builder *VerifDataSourceRuleBuilder) DatasourceName(datasourceName *IdWithName) *VerifDataSourceRuleBuilder {
	builder.datasourceName = datasourceName
	builder.datasourceNameFlag = true
	return builder
}

// 集成对象
//
// 示例值：1
func (builder *VerifDataSourceRuleBuilder) ObjectType(objectType int) *VerifDataSourceRuleBuilder {
	builder.objectType = objectType
	builder.objectTypeFlag = true
	return builder
}

// 数据源明细字段
//
// 示例值：
func (builder *VerifDataSourceRuleBuilder) DatasourceItems(datasourceItems []*VerifDatasourceItem) *VerifDataSourceRuleBuilder {
	builder.datasourceItems = datasourceItems
	builder.datasourceItemsFlag = true
	return builder
}

func (builder *VerifDataSourceRuleBuilder) Build() *VerifDataSourceRule {
	req := &VerifDataSourceRule{}
	if builder.apiNameFlag {
		req.ApiName = &builder.apiName

	}
	if builder.datasourceNameFlag {
		req.DatasourceName = builder.datasourceName
	}
	if builder.objectTypeFlag {
		req.ObjectType = &builder.objectType

	}
	if builder.datasourceItemsFlag {
		req.DatasourceItems = builder.datasourceItems
	}
	return req
}

type VerifDatasourceConfig struct {
	FilterType *int `json:"filter_type,omitempty"` // 字段类型

	FilterRule *VerifFilterRule `json:"filter_rule,omitempty"` // 筛选条件

	IsCollect *bool `json:"is_collect,omitempty"` // 是否汇总

	IsProration *bool `json:"is_proration,omitempty"` // 是否分段

	IsRetro *bool `json:"is_retro,omitempty"` // 是否追溯

	Items []*VerifItem `json:"items,omitempty"` // 数据项配置

	DataSourceRule *VerifDataSourceRule `json:"data_source_rule,omitempty"` // 数据源配置
}

type VerifDatasourceConfigBuilder struct {
	filterType     int // 字段类型
	filterTypeFlag bool

	filterRule     *VerifFilterRule // 筛选条件
	filterRuleFlag bool

	isCollect     bool // 是否汇总
	isCollectFlag bool

	isProration     bool // 是否分段
	isProrationFlag bool

	isRetro     bool // 是否追溯
	isRetroFlag bool

	items     []*VerifItem // 数据项配置
	itemsFlag bool

	dataSourceRule     *VerifDataSourceRule // 数据源配置
	dataSourceRuleFlag bool
}

func NewVerifDatasourceConfigBuilder() *VerifDatasourceConfigBuilder {
	builder := &VerifDatasourceConfigBuilder{}
	return builder
}

// 字段类型
//
// 示例值：1
func (builder *VerifDatasourceConfigBuilder) FilterType(filterType int) *VerifDatasourceConfigBuilder {
	builder.filterType = filterType
	builder.filterTypeFlag = true
	return builder
}

// 筛选条件
//
// 示例值：
func (builder *VerifDatasourceConfigBuilder) FilterRule(filterRule *VerifFilterRule) *VerifDatasourceConfigBuilder {
	builder.filterRule = filterRule
	builder.filterRuleFlag = true
	return builder
}

// 是否汇总
//
// 示例值：
func (builder *VerifDatasourceConfigBuilder) IsCollect(isCollect bool) *VerifDatasourceConfigBuilder {
	builder.isCollect = isCollect
	builder.isCollectFlag = true
	return builder
}

// 是否分段
//
// 示例值：
func (builder *VerifDatasourceConfigBuilder) IsProration(isProration bool) *VerifDatasourceConfigBuilder {
	builder.isProration = isProration
	builder.isProrationFlag = true
	return builder
}

// 是否追溯
//
// 示例值：
func (builder *VerifDatasourceConfigBuilder) IsRetro(isRetro bool) *VerifDatasourceConfigBuilder {
	builder.isRetro = isRetro
	builder.isRetroFlag = true
	return builder
}

// 数据项配置
//
// 示例值：
func (builder *VerifDatasourceConfigBuilder) Items(items []*VerifItem) *VerifDatasourceConfigBuilder {
	builder.items = items
	builder.itemsFlag = true
	return builder
}

// 数据源配置
//
// 示例值：
func (builder *VerifDatasourceConfigBuilder) DataSourceRule(dataSourceRule *VerifDataSourceRule) *VerifDatasourceConfigBuilder {
	builder.dataSourceRule = dataSourceRule
	builder.dataSourceRuleFlag = true
	return builder
}

func (builder *VerifDatasourceConfigBuilder) Build() *VerifDatasourceConfig {
	req := &VerifDatasourceConfig{}
	if builder.filterTypeFlag {
		req.FilterType = &builder.filterType

	}
	if builder.filterRuleFlag {
		req.FilterRule = builder.filterRule
	}
	if builder.isCollectFlag {
		req.IsCollect = &builder.isCollect

	}
	if builder.isProrationFlag {
		req.IsProration = &builder.isProration

	}
	if builder.isRetroFlag {
		req.IsRetro = &builder.isRetro

	}
	if builder.itemsFlag {
		req.Items = builder.items
	}
	if builder.dataSourceRuleFlag {
		req.DataSourceRule = builder.dataSourceRule
	}
	return req
}

type VerifDatasourceItem struct {
	Name *IdWithName `json:"name,omitempty"` // 名称

	FieldId *string `json:"field_id,omitempty"` // id

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

	ObjectApiName *string `json:"object_api_name,omitempty"` // 对象 api_name

	FieldApiName *string `json:"field_api_name,omitempty"` // 字段 api_name

	DecimalPlaces *int `json:"decimal_places,omitempty"` // 小数位

	ObjectType *int `json:"object_type,omitempty"` // 对象类型

	SourceType *int `json:"source_type,omitempty"` // 对象来源
}

type VerifDatasourceItemBuilder struct {
	name     *IdWithName // 名称
	nameFlag bool

	fieldId     string // id
	fieldIdFlag bool

	fieldType     int // 字段类型
	fieldTypeFlag bool

	objectApiName     string // 对象 api_name
	objectApiNameFlag bool

	fieldApiName     string // 字段 api_name
	fieldApiNameFlag bool

	decimalPlaces     int // 小数位
	decimalPlacesFlag bool

	objectType     int // 对象类型
	objectTypeFlag bool

	sourceType     int // 对象来源
	sourceTypeFlag bool
}

func NewVerifDatasourceItemBuilder() *VerifDatasourceItemBuilder {
	builder := &VerifDatasourceItemBuilder{}
	return builder
}

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

// id
//
// 示例值：1
func (builder *VerifDatasourceItemBuilder) FieldId(fieldId string) *VerifDatasourceItemBuilder {
	builder.fieldId = fieldId
	builder.fieldIdFlag = true
	return builder
}

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

// 对象 api_name
//
// 示例值：1
func (builder *VerifDatasourceItemBuilder) ObjectApiName(objectApiName string) *VerifDatasourceItemBuilder {
	builder.objectApiName = objectApiName
	builder.objectApiNameFlag = true
	return builder
}

// 字段 api_name
//
// 示例值：1
func (builder *VerifDatasourceItemBuilder) FieldApiName(fieldApiName string) *VerifDatasourceItemBuilder {
	builder.fieldApiName = fieldApiName
	builder.fieldApiNameFlag = true
	return builder
}

// 小数位
//
// 示例值：1
func (builder *VerifDatasourceItemBuilder) DecimalPlaces(decimalPlaces int) *VerifDatasourceItemBuilder {
	builder.decimalPlaces = decimalPlaces
	builder.decimalPlacesFlag = true
	return builder
}

// 对象类型
//
// 示例值：1
func (builder *VerifDatasourceItemBuilder) ObjectType(objectType int) *VerifDatasourceItemBuilder {
	builder.objectType = objectType
	builder.objectTypeFlag = true
	return builder
}

// 对象来源
//
// 示例值：1
func (builder *VerifDatasourceItemBuilder) SourceType(sourceType int) *VerifDatasourceItemBuilder {
	builder.sourceType = sourceType
	builder.sourceTypeFlag = true
	return builder
}

func (builder *VerifDatasourceItemBuilder) Build() *VerifDatasourceItem {
	req := &VerifDatasourceItem{}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.fieldIdFlag {
		req.FieldId = &builder.fieldId

	}
	if builder.fieldTypeFlag {
		req.FieldType = &builder.fieldType

	}
	if builder.objectApiNameFlag {
		req.ObjectApiName = &builder.objectApiName

	}
	if builder.fieldApiNameFlag {
		req.FieldApiName = &builder.fieldApiName

	}
	if builder.decimalPlacesFlag {
		req.DecimalPlaces = &builder.decimalPlaces

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

	}
	if builder.sourceTypeFlag {
		req.SourceType = &builder.sourceType

	}
	return req
}

type VerifFieldSourceConfig struct {
	FormulaId *string `json:"formula_id,omitempty"` //  公式id

	FormulaItemId *string `json:"formula_item_id,omitempty"` // 公式数据项id

	FormulaText *string `json:"formula_text,omitempty"` // 公式表达式

	ApiName *string `json:"api_name,omitempty"` // api_name

	SourceAggregationType *int `json:"source_aggregation_type,omitempty"` // 多条数据时计算方式

	RefType *int `json:"ref_type,omitempty"` //  引用类型
}

type VerifFieldSourceConfigBuilder struct {
	formulaId     string //  公式id
	formulaIdFlag bool

	formulaItemId     string // 公式数据项id
	formulaItemIdFlag bool

	formulaText     string // 公式表达式
	formulaTextFlag bool

	apiName     string // api_name
	apiNameFlag bool

	sourceAggregationType     int // 多条数据时计算方式
	sourceAggregationTypeFlag bool

	refType     int //  引用类型
	refTypeFlag bool
}

func NewVerifFieldSourceConfigBuilder() *VerifFieldSourceConfigBuilder {
	builder := &VerifFieldSourceConfigBuilder{}
	return builder
}

//  公式id
//
// 示例值：1
func (builder *VerifFieldSourceConfigBuilder) FormulaId(formulaId string) *VerifFieldSourceConfigBuilder {
	builder.formulaId = formulaId
	builder.formulaIdFlag = true
	return builder
}

// 公式数据项id
//
// 示例值：1
func (builder *VerifFieldSourceConfigBuilder) FormulaItemId(formulaItemId string) *VerifFieldSourceConfigBuilder {
	builder.formulaItemId = formulaItemId
	builder.formulaItemIdFlag = true
	return builder
}

// 公式表达式
//
// 示例值：1
func (builder *VerifFieldSourceConfigBuilder) FormulaText(formulaText string) *VerifFieldSourceConfigBuilder {
	builder.formulaText = formulaText
	builder.formulaTextFlag = true
	return builder
}

// api_name
//
// 示例值：1
func (builder *VerifFieldSourceConfigBuilder) ApiName(apiName string) *VerifFieldSourceConfigBuilder {
	builder.apiName = apiName
	builder.apiNameFlag = true
	return builder
}

// 多条数据时计算方式
//
// 示例值：1
func (builder *VerifFieldSourceConfigBuilder) SourceAggregationType(sourceAggregationType int) *VerifFieldSourceConfigBuilder {
	builder.sourceAggregationType = sourceAggregationType
	builder.sourceAggregationTypeFlag = true
	return builder
}

//  引用类型
//
// 示例值：1
func (builder *VerifFieldSourceConfigBuilder) RefType(refType int) *VerifFieldSourceConfigBuilder {
	builder.refType = refType
	builder.refTypeFlag = true
	return builder
}

func (builder *VerifFieldSourceConfigBuilder) Build() *VerifFieldSourceConfig {
	req := &VerifFieldSourceConfig{}
	if builder.formulaIdFlag {
		req.FormulaId = &builder.formulaId

	}
	if builder.formulaItemIdFlag {
		req.FormulaItemId = &builder.formulaItemId

	}
	if builder.formulaTextFlag {
		req.FormulaText = &builder.formulaText

	}
	if builder.apiNameFlag {
		req.ApiName = &builder.apiName

	}
	if builder.sourceAggregationTypeFlag {
		req.SourceAggregationType = &builder.sourceAggregationType

	}
	if builder.refTypeFlag {
		req.RefType = &builder.refType

	}
	return req
}

type VerifFilterCondition struct {
	LeftValue *VerifFilterValue `json:"left_value,omitempty"` // 左值

	OperatorType *int `json:"operator_type,omitempty"` // 操作符

	RightValues []*VerifFilterValue `json:"right_values,omitempty"` // 右值
}

type VerifFilterConditionBuilder struct {
	leftValue     *VerifFilterValue // 左值
	leftValueFlag bool

	operatorType     int // 操作符
	operatorTypeFlag bool

	rightValues     []*VerifFilterValue // 右值
	rightValuesFlag bool
}

func NewVerifFilterConditionBuilder() *VerifFilterConditionBuilder {
	builder := &VerifFilterConditionBuilder{}
	return builder
}

// 左值
//
// 示例值：
func (builder *VerifFilterConditionBuilder) LeftValue(leftValue *VerifFilterValue) *VerifFilterConditionBuilder {
	builder.leftValue = leftValue
	builder.leftValueFlag = true
	return builder
}

// 操作符
//
// 示例值：1
func (builder *VerifFilterConditionBuilder) OperatorType(operatorType int) *VerifFilterConditionBuilder {
	builder.operatorType = operatorType
	builder.operatorTypeFlag = true
	return builder
}

// 右值
//
// 示例值：
func (builder *VerifFilterConditionBuilder) RightValues(rightValues []*VerifFilterValue) *VerifFilterConditionBuilder {
	builder.rightValues = rightValues
	builder.rightValuesFlag = true
	return builder
}

func (builder *VerifFilterConditionBuilder) Build() *VerifFilterCondition {
	req := &VerifFilterCondition{}
	if builder.leftValueFlag {
		req.LeftValue = builder.leftValue
	}
	if builder.operatorTypeFlag {
		req.OperatorType = &builder.operatorType

	}
	if builder.rightValuesFlag {
		req.RightValues = builder.rightValues
	}
	return req
}

type VerifFilterRule struct {
	FilterConditions []*VerifFilterCondition `json:"filter_conditions,omitempty"` // 筛选条件

	FilterRelationship *string `json:"filter_relationship,omitempty"` // 条件之间的关联关系
}

type VerifFilterRuleBuilder struct {
	filterConditions     []*VerifFilterCondition // 筛选条件
	filterConditionsFlag bool

	filterRelationship     string // 条件之间的关联关系
	filterRelationshipFlag bool
}

func NewVerifFilterRuleBuilder() *VerifFilterRuleBuilder {
	builder := &VerifFilterRuleBuilder{}
	return builder
}

// 筛选条件
//
// 示例值：
func (builder *VerifFilterRuleBuilder) FilterConditions(filterConditions []*VerifFilterCondition) *VerifFilterRuleBuilder {
	builder.filterConditions = filterConditions
	builder.filterConditionsFlag = true
	return builder
}

// 条件之间的关联关系
//
// 示例值：(1 or 2 and ( 3 or 4 ))
func (builder *VerifFilterRuleBuilder) FilterRelationship(filterRelationship string) *VerifFilterRuleBuilder {
	builder.filterRelationship = filterRelationship
	builder.filterRelationshipFlag = true
	return builder
}

func (builder *VerifFilterRuleBuilder) Build() *VerifFilterRule {
	req := &VerifFilterRule{}
	if builder.filterConditionsFlag {
		req.FilterConditions = builder.filterConditions
	}
	if builder.filterRelationshipFlag {
		req.FilterRelationship = &builder.filterRelationship

	}
	return req
}

type VerifFilterValue struct {
	ApiName *string `json:"api_name,omitempty"` // 左值api_name

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

	Value *string `json:"value,omitempty"` // 右值

	RefId *string `json:"ref_id,omitempty"` // 外部id（左值为引用项时有值）

	Currency *IdWithName `json:"currency,omitempty"` // 币种
}

type VerifFilterValueBuilder struct {
	apiName     string // 左值api_name
	apiNameFlag bool

	fieldType     int // 字段类型
	fieldTypeFlag bool

	value     string // 右值
	valueFlag bool

	refId     string // 外部id（左值为引用项时有值）
	refIdFlag bool

	currency     *IdWithName // 币种
	currencyFlag bool
}

func NewVerifFilterValueBuilder() *VerifFilterValueBuilder {
	builder := &VerifFilterValueBuilder{}
	return builder
}

// 左值api_name
//
// 示例值：api_name
func (builder *VerifFilterValueBuilder) ApiName(apiName string) *VerifFilterValueBuilder {
	builder.apiName = apiName
	builder.apiNameFlag = true
	return builder
}

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

// 右值
//
// 示例值：1
func (builder *VerifFilterValueBuilder) Value(value string) *VerifFilterValueBuilder {
	builder.value = value
	builder.valueFlag = true
	return builder
}

// 外部id（左值为引用项时有值）
//
// 示例值：1
func (builder *VerifFilterValueBuilder) RefId(refId string) *VerifFilterValueBuilder {
	builder.refId = refId
	builder.refIdFlag = true
	return builder
}

// 币种
//
// 示例值：
func (builder *VerifFilterValueBuilder) Currency(currency *IdWithName) *VerifFilterValueBuilder {
	builder.currency = currency
	builder.currencyFlag = true
	return builder
}

func (builder *VerifFilterValueBuilder) Build() *VerifFilterValue {
	req := &VerifFilterValue{}
	if builder.apiNameFlag {
		req.ApiName = &builder.apiName

	}
	if builder.fieldTypeFlag {
		req.FieldType = &builder.fieldType

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

	}
	if builder.refIdFlag {
		req.RefId = &builder.refId

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

type VerifItem struct {
	ItemId *string `json:"item_id,omitempty"` // 数据项id

	ItemName *IdWithName `json:"item_name,omitempty"` // 名称

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

	DecimalPlaces *int `json:"decimal_places,omitempty"` // 小数位

	AggregationType *int `json:"aggregation_type,omitempty"` // 分段汇总

	Seq *int `json:"seq,omitempty"` // 顺序

	SourceType *int `json:"source_type,omitempty"` // 字段类型

	SourceConfig *VerifSourceConfig `json:"source_config,omitempty"` // 字段配置

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

type VerifItemBuilder struct {
	itemId     string // 数据项id
	itemIdFlag bool

	itemName     *IdWithName // 名称
	itemNameFlag bool

	fieldType     int // 字段类型
	fieldTypeFlag bool

	decimalPlaces     int // 小数位
	decimalPlacesFlag bool

	aggregationType     int // 分段汇总
	aggregationTypeFlag bool

	seq     int // 顺序
	seqFlag bool

	sourceType     int // 字段类型
	sourceTypeFlag bool

	sourceConfig     *VerifSourceConfig // 字段配置
	sourceConfigFlag bool

	status     int // 状态
	statusFlag bool
}

func NewVerifItemBuilder() *VerifItemBuilder {
	builder := &VerifItemBuilder{}
	return builder
}

// 数据项id
//
// 示例值：1
func (builder *VerifItemBuilder) ItemId(itemId string) *VerifItemBuilder {
	builder.itemId = itemId
	builder.itemIdFlag = true
	return builder
}

// 名称
//
// 示例值：
func (builder *VerifItemBuilder) ItemName(itemName *IdWithName) *VerifItemBuilder {
	builder.itemName = itemName
	builder.itemNameFlag = true
	return builder
}

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

// 小数位
//
// 示例值：1
func (builder *VerifItemBuilder) DecimalPlaces(decimalPlaces int) *VerifItemBuilder {
	builder.decimalPlaces = decimalPlaces
	builder.decimalPlacesFlag = true
	return builder
}

// 分段汇总
//
// 示例值：1
func (builder *VerifItemBuilder) AggregationType(aggregationType int) *VerifItemBuilder {
	builder.aggregationType = aggregationType
	builder.aggregationTypeFlag = true
	return builder
}

// 顺序
//
// 示例值：1
func (builder *VerifItemBuilder) Seq(seq int) *VerifItemBuilder {
	builder.seq = seq
	builder.seqFlag = true
	return builder
}

// 字段类型
//
// 示例值：1
func (builder *VerifItemBuilder) SourceType(sourceType int) *VerifItemBuilder {
	builder.sourceType = sourceType
	builder.sourceTypeFlag = true
	return builder
}

// 字段配置
//
// 示例值：
func (builder *VerifItemBuilder) SourceConfig(sourceConfig *VerifSourceConfig) *VerifItemBuilder {
	builder.sourceConfig = sourceConfig
	builder.sourceConfigFlag = true
	return builder
}

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

func (builder *VerifItemBuilder) Build() *VerifItem {
	req := &VerifItem{}
	if builder.itemIdFlag {
		req.ItemId = &builder.itemId

	}
	if builder.itemNameFlag {
		req.ItemName = builder.itemName
	}
	if builder.fieldTypeFlag {
		req.FieldType = &builder.fieldType

	}
	if builder.decimalPlacesFlag {
		req.DecimalPlaces = &builder.decimalPlaces

	}
	if builder.aggregationTypeFlag {
		req.AggregationType = &builder.aggregationType

	}
	if builder.seqFlag {
		req.Seq = &builder.seq

	}
	if builder.sourceTypeFlag {
		req.SourceType = &builder.sourceType

	}
	if builder.sourceConfigFlag {
		req.SourceConfig = builder.sourceConfig
	}
	if builder.statusFlag {
		req.Status = &builder.status

	}
	return req
}

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

	ZhName *string `json:"zh_name,omitempty"` // 中文名称

	EnName *string `json:"en_name,omitempty"` // 英文名称

	CalendarSource *int `json:"calendar_source,omitempty"` // 算薪日历来源
}

type VerifPayCalendarBuilder struct {
	id     string // id
	idFlag bool

	zhName     string // 中文名称
	zhNameFlag bool

	enName     string // 英文名称
	enNameFlag bool

	calendarSource     int // 算薪日历来源
	calendarSourceFlag bool
}

func NewVerifPayCalendarBuilder() *VerifPayCalendarBuilder {
	builder := &VerifPayCalendarBuilder{}
	return builder
}

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

// 中文名称
//
// 示例值：1
func (builder *VerifPayCalendarBuilder) ZhName(zhName string) *VerifPayCalendarBuilder {
	builder.zhName = zhName
	builder.zhNameFlag = true
	return builder
}

// 英文名称
//
// 示例值：1
func (builder *VerifPayCalendarBuilder) EnName(enName string) *VerifPayCalendarBuilder {
	builder.enName = enName
	builder.enNameFlag = true
	return builder
}

// 算薪日历来源
//
// 示例值：1
func (builder *VerifPayCalendarBuilder) CalendarSource(calendarSource int) *VerifPayCalendarBuilder {
	builder.calendarSource = calendarSource
	builder.calendarSourceFlag = true
	return builder
}

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

	}
	if builder.zhNameFlag {
		req.ZhName = &builder.zhName

	}
	if builder.enNameFlag {
		req.EnName = &builder.enName

	}
	if builder.calendarSourceFlag {
		req.CalendarSource = &builder.calendarSource

	}
	return req
}

type VerifPlanSnapshot struct {
	IsRetro *bool `json:"is_retro,omitempty"` // 是否追溯

	IsCollect *bool `json:"is_collect,omitempty"` // 是否汇总

	IsProration *bool `json:"is_proration,omitempty"` // 是否分段

	CountryRegion *IdWithName `json:"country_region,omitempty"` // 国家/地区

	Currency *IdWithName `json:"currency,omitempty"` // 币种

	CalendarType *int `json:"calendar_type,omitempty"` // 核对周期日历类型

	PayCalendars []*VerifPayCalendar `json:"pay_calendars,omitempty"` // 算薪日历

	ScopeType *int `json:"scope_type,omitempty"` // 核对人员范围

	PayGroups []*IdWithName `json:"pay_groups,omitempty"` // 薪资组

	FilterType *int `json:"filter_type,omitempty"` // 数据范围

	FilterRule *VerifFilterRule `json:"filter_rule,omitempty"` // 筛选条件

	ApprovalType *int `json:"approval_type,omitempty"` // 复核类型

	Items []*VerifItem `json:"items,omitempty"` // 数据项配置

	DataSourceRule *VerifDataSourceRule `json:"data_source_rule,omitempty"` // 数据源配置
}

type VerifPlanSnapshotBuilder struct {
	isRetro     bool // 是否追溯
	isRetroFlag bool

	isCollect     bool // 是否汇总
	isCollectFlag bool

	isProration     bool // 是否分段
	isProrationFlag bool

	countryRegion     *IdWithName // 国家/地区
	countryRegionFlag bool

	currency     *IdWithName // 币种
	currencyFlag bool

	calendarType     int // 核对周期日历类型
	calendarTypeFlag bool

	payCalendars     []*VerifPayCalendar // 算薪日历
	payCalendarsFlag bool

	scopeType     int // 核对人员范围
	scopeTypeFlag bool

	payGroups     []*IdWithName // 薪资组
	payGroupsFlag bool

	filterType     int // 数据范围
	filterTypeFlag bool

	filterRule     *VerifFilterRule // 筛选条件
	filterRuleFlag bool

	approvalType     int // 复核类型
	approvalTypeFlag bool

	items     []*VerifItem // 数据项配置
	itemsFlag bool

	dataSourceRule     *VerifDataSourceRule // 数据源配置
	dataSourceRuleFlag bool
}

func NewVerifPlanSnapshotBuilder() *VerifPlanSnapshotBuilder {
	builder := &VerifPlanSnapshotBuilder{}
	return builder
}

// 是否追溯
//
// 示例值：
func (builder *VerifPlanSnapshotBuilder) IsRetro(isRetro bool) *VerifPlanSnapshotBuilder {
	builder.isRetro = isRetro
	builder.isRetroFlag = true
	return builder
}

// 是否汇总
//
// 示例值：
func (builder *VerifPlanSnapshotBuilder) IsCollect(isCollect bool) *VerifPlanSnapshotBuilder {
	builder.isCollect = isCollect
	builder.isCollectFlag = true
	return builder
}

// 是否分段
//
// 示例值：
func (builder *VerifPlanSnapshotBuilder) IsProration(isProration bool) *VerifPlanSnapshotBuilder {
	builder.isProration = isProration
	builder.isProrationFlag = true
	return builder
}

// 国家/地区
//
// 示例值：
func (builder *VerifPlanSnapshotBuilder) CountryRegion(countryRegion *IdWithName) *VerifPlanSnapshotBuilder {
	builder.countryRegion = countryRegion
	builder.countryRegionFlag = true
	return builder
}

// 币种
//
// 示例值：
func (builder *VerifPlanSnapshotBuilder) Currency(currency *IdWithName) *VerifPlanSnapshotBuilder {
	builder.currency = currency
	builder.currencyFlag = true
	return builder
}

// 核对周期日历类型
//
// 示例值：1
func (builder *VerifPlanSnapshotBuilder) CalendarType(calendarType int) *VerifPlanSnapshotBuilder {
	builder.calendarType = calendarType
	builder.calendarTypeFlag = true
	return builder
}

// 算薪日历
//
// 示例值：
func (builder *VerifPlanSnapshotBuilder) PayCalendars(payCalendars []*VerifPayCalendar) *VerifPlanSnapshotBuilder {
	builder.payCalendars = payCalendars
	builder.payCalendarsFlag = true
	return builder
}

// 核对人员范围
//
// 示例值：1
func (builder *VerifPlanSnapshotBuilder) ScopeType(scopeType int) *VerifPlanSnapshotBuilder {
	builder.scopeType = scopeType
	builder.scopeTypeFlag = true
	return builder
}

// 薪资组
//
// 示例值：
func (builder *VerifPlanSnapshotBuilder) PayGroups(payGroups []*IdWithName) *VerifPlanSnapshotBuilder {
	builder.payGroups = payGroups
	builder.payGroupsFlag = true
	return builder
}

// 数据范围
//
// 示例值：1
func (builder *VerifPlanSnapshotBuilder) FilterType(filterType int) *VerifPlanSnapshotBuilder {
	builder.filterType = filterType
	builder.filterTypeFlag = true
	return builder
}

// 筛选条件
//
// 示例值：
func (builder *VerifPlanSnapshotBuilder) FilterRule(filterRule *VerifFilterRule) *VerifPlanSnapshotBuilder {
	builder.filterRule = filterRule
	builder.filterRuleFlag = true
	return builder
}

// 复核类型
//
// 示例值：1
func (builder *VerifPlanSnapshotBuilder) ApprovalType(approvalType int) *VerifPlanSnapshotBuilder {
	builder.approvalType = approvalType
	builder.approvalTypeFlag = true
	return builder
}

// 数据项配置
//
// 示例值：
func (builder *VerifPlanSnapshotBuilder) Items(items []*VerifItem) *VerifPlanSnapshotBuilder {
	builder.items = items
	builder.itemsFlag = true
	return builder
}

// 数据源配置
//
// 示例值：
func (builder *VerifPlanSnapshotBuilder) DataSourceRule(dataSourceRule *VerifDataSourceRule) *VerifPlanSnapshotBuilder {
	builder.dataSourceRule = dataSourceRule
	builder.dataSourceRuleFlag = true
	return builder
}

func (builder *VerifPlanSnapshotBuilder) Build() *VerifPlanSnapshot {
	req := &VerifPlanSnapshot{}
	if builder.isRetroFlag {
		req.IsRetro = &builder.isRetro

	}
	if builder.isCollectFlag {
		req.IsCollect = &builder.isCollect

	}
	if builder.isProrationFlag {
		req.IsProration = &builder.isProration

	}
	if builder.countryRegionFlag {
		req.CountryRegion = builder.countryRegion
	}
	if builder.currencyFlag {
		req.Currency = builder.currency
	}
	if builder.calendarTypeFlag {
		req.CalendarType = &builder.calendarType

	}
	if builder.payCalendarsFlag {
		req.PayCalendars = builder.payCalendars
	}
	if builder.scopeTypeFlag {
		req.ScopeType = &builder.scopeType

	}
	if builder.payGroupsFlag {
		req.PayGroups = builder.payGroups
	}
	if builder.filterTypeFlag {
		req.FilterType = &builder.filterType

	}
	if builder.filterRuleFlag {
		req.FilterRule = builder.filterRule
	}
	if builder.approvalTypeFlag {
		req.ApprovalType = &builder.approvalType

	}
	if builder.itemsFlag {
		req.Items = builder.items
	}
	if builder.dataSourceRuleFlag {
		req.DataSourceRule = builder.dataSourceRule
	}
	return req
}

type VerifSourceConfig struct {
	FormulaConfig *VerifFieldSourceConfig `json:"formula_config,omitempty"` // 公式数据项，source_type = 2 有值

	RefSourceConfig *VerifFieldSourceConfig `json:"ref_source_config,omitempty"` // 引用数据项，source_type = 1 有值
}

type VerifSourceConfigBuilder struct {
	formulaConfig     *VerifFieldSourceConfig // 公式数据项，source_type = 2 有值
	formulaConfigFlag bool

	refSourceConfig     *VerifFieldSourceConfig // 引用数据项，source_type = 1 有值
	refSourceConfigFlag bool
}

func NewVerifSourceConfigBuilder() *VerifSourceConfigBuilder {
	builder := &VerifSourceConfigBuilder{}
	return builder
}

// 公式数据项，source_type = 2 有值
//
// 示例值：
func (builder *VerifSourceConfigBuilder) FormulaConfig(formulaConfig *VerifFieldSourceConfig) *VerifSourceConfigBuilder {
	builder.formulaConfig = formulaConfig
	builder.formulaConfigFlag = true
	return builder
}

// 引用数据项，source_type = 1 有值
//
// 示例值：
func (builder *VerifSourceConfigBuilder) RefSourceConfig(refSourceConfig *VerifFieldSourceConfig) *VerifSourceConfigBuilder {
	builder.refSourceConfig = refSourceConfig
	builder.refSourceConfigFlag = true
	return builder
}

func (builder *VerifSourceConfigBuilder) Build() *VerifSourceConfig {
	req := &VerifSourceConfig{}
	if builder.formulaConfigFlag {
		req.FormulaConfig = builder.formulaConfig
	}
	if builder.refSourceConfigFlag {
		req.RefSourceConfig = builder.refSourceConfig
	}
	return req
}

type VerificationActivity struct {
	ActivityId *string `json:"activity_id,omitempty"` // 活动id

	PlanId *string `json:"plan_id,omitempty"` // 方案id

	VersionId *string `json:"version_id,omitempty"` // 方案版本id

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

	ActivityStatus *int `json:"activity_status,omitempty"` // 状态

	PayPeriodSeq *string `json:"pay_period_seq,omitempty"` // 算薪期间

	RetroPeriodSeq *string `json:"retro_period_seq,omitempty"` // 追溯期间

	PlanSnapshot *VerifPlanSnapshot `json:"plan_snapshot,omitempty"` // 快照

	UpdateTime *int `json:"update_time,omitempty"` // 更新时间，时间戳

	ApproveTime *int `json:"approve_time,omitempty"` // 审批通过时间，时间戳
}

type VerificationActivityBuilder struct {
	activityId     string // 活动id
	activityIdFlag bool

	planId     string // 方案id
	planIdFlag bool

	versionId     string // 方案版本id
	versionIdFlag bool

	name     *IdWithName // 名称
	nameFlag bool

	activityStatus     int // 状态
	activityStatusFlag bool

	payPeriodSeq     string // 算薪期间
	payPeriodSeqFlag bool

	retroPeriodSeq     string // 追溯期间
	retroPeriodSeqFlag bool

	planSnapshot     *VerifPlanSnapshot // 快照
	planSnapshotFlag bool

	updateTime     int // 更新时间，时间戳
	updateTimeFlag bool

	approveTime     int // 审批通过时间，时间戳
	approveTimeFlag bool
}

func NewVerificationActivityBuilder() *VerificationActivityBuilder {
	builder := &VerificationActivityBuilder{}
	return builder
}

// 活动id
//
// 示例值：1
func (builder *VerificationActivityBuilder) ActivityId(activityId string) *VerificationActivityBuilder {
	builder.activityId = activityId
	builder.activityIdFlag = true
	return builder
}

// 方案id
//
// 示例值：1
func (builder *VerificationActivityBuilder) PlanId(planId string) *VerificationActivityBuilder {
	builder.planId = planId
	builder.planIdFlag = true
	return builder
}

// 方案版本id
//
// 示例值：1
func (builder *VerificationActivityBuilder) VersionId(versionId string) *VerificationActivityBuilder {
	builder.versionId = versionId
	builder.versionIdFlag = true
	return builder
}

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

// 状态
//
// 示例值：1
func (builder *VerificationActivityBuilder) ActivityStatus(activityStatus int) *VerificationActivityBuilder {
	builder.activityStatus = activityStatus
	builder.activityStatusFlag = true
	return builder
}

// 算薪期间
//
// 示例值：1
func (builder *VerificationActivityBuilder) PayPeriodSeq(payPeriodSeq string) *VerificationActivityBuilder {
	builder.payPeriodSeq = payPeriodSeq
	builder.payPeriodSeqFlag = true
	return builder
}

// 追溯期间
//
// 示例值：1
func (builder *VerificationActivityBuilder) RetroPeriodSeq(retroPeriodSeq string) *VerificationActivityBuilder {
	builder.retroPeriodSeq = retroPeriodSeq
	builder.retroPeriodSeqFlag = true
	return builder
}

// 快照
//
// 示例值：
func (builder *VerificationActivityBuilder) PlanSnapshot(planSnapshot *VerifPlanSnapshot) *VerificationActivityBuilder {
	builder.planSnapshot = planSnapshot
	builder.planSnapshotFlag = true
	return builder
}

// 更新时间，时间戳
//
// 示例值：1
func (builder *VerificationActivityBuilder) UpdateTime(updateTime int) *VerificationActivityBuilder {
	builder.updateTime = updateTime
	builder.updateTimeFlag = true
	return builder
}

// 审批通过时间，时间戳
//
// 示例值：1
func (builder *VerificationActivityBuilder) ApproveTime(approveTime int) *VerificationActivityBuilder {
	builder.approveTime = approveTime
	builder.approveTimeFlag = true
	return builder
}

func (builder *VerificationActivityBuilder) Build() *VerificationActivity {
	req := &VerificationActivity{}
	if builder.activityIdFlag {
		req.ActivityId = &builder.activityId

	}
	if builder.planIdFlag {
		req.PlanId = &builder.planId

	}
	if builder.versionIdFlag {
		req.VersionId = &builder.versionId

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.activityStatusFlag {
		req.ActivityStatus = &builder.activityStatus

	}
	if builder.payPeriodSeqFlag {
		req.PayPeriodSeq = &builder.payPeriodSeq

	}
	if builder.retroPeriodSeqFlag {
		req.RetroPeriodSeq = &builder.retroPeriodSeq

	}
	if builder.planSnapshotFlag {
		req.PlanSnapshot = builder.planSnapshot
	}
	if builder.updateTimeFlag {
		req.UpdateTime = &builder.updateTime

	}
	if builder.approveTimeFlag {
		req.ApproveTime = &builder.approveTime

	}
	return req
}

type VerificationActivityRow struct {
	RowId *string `json:"row_id,omitempty"` // row id

	EmploymentId *string `json:"employment_id,omitempty"` // 员工 Employment id

	ActivityId *string `json:"activity_id,omitempty"` // 活动id

	EmployeeNumber *string `json:"employee_number,omitempty"` // 新工号

	EmployeeId *string `json:"employee_id,omitempty"` // 旧工号

	WorkingHoursType *IdWithName `json:"working_hours_type,omitempty"` // 工时类型

	PayGroup *IdWithName `json:"pay_group,omitempty"` // 薪资组

	StartDate *string `json:"start_date,omitempty"` // 开始日期 "2025-05-01"

	EndDate *string `json:"end_date,omitempty"` // 结束日期 "2025-05-01"

	CutoffDate *string `json:"cutoff_date,omitempty"` // 数据锁定日期 "2025-05-01"

	ItemValues []*VerifActItemValue `json:"item_values,omitempty"` // 汇总值， 数值、金额等类型数据项会按配置截取小数位

	Prorations []*VerifActProration `json:"prorations,omitempty"` // 分段值，plan.is_proration=true时有值
}

type VerificationActivityRowBuilder struct {
	rowId     string // row id
	rowIdFlag bool

	employmentId     string // 员工 Employment id
	employmentIdFlag bool

	activityId     string // 活动id
	activityIdFlag bool

	employeeNumber     string // 新工号
	employeeNumberFlag bool

	employeeId     string // 旧工号
	employeeIdFlag bool

	workingHoursType     *IdWithName // 工时类型
	workingHoursTypeFlag bool

	payGroup     *IdWithName // 薪资组
	payGroupFlag bool

	startDate     string // 开始日期 "2025-05-01"
	startDateFlag bool

	endDate     string // 结束日期 "2025-05-01"
	endDateFlag bool

	cutoffDate     string // 数据锁定日期 "2025-05-01"
	cutoffDateFlag bool

	itemValues     []*VerifActItemValue // 汇总值， 数值、金额等类型数据项会按配置截取小数位
	itemValuesFlag bool

	prorations     []*VerifActProration // 分段值，plan.is_proration=true时有值
	prorationsFlag bool
}

func NewVerificationActivityRowBuilder() *VerificationActivityRowBuilder {
	builder := &VerificationActivityRowBuilder{}
	return builder
}

// row id
//
// 示例值：1
func (builder *VerificationActivityRowBuilder) RowId(rowId string) *VerificationActivityRowBuilder {
	builder.rowId = rowId
	builder.rowIdFlag = true
	return builder
}

// 员工 Employment id
//
// 示例值：1
func (builder *VerificationActivityRowBuilder) EmploymentId(employmentId string) *VerificationActivityRowBuilder {
	builder.employmentId = employmentId
	builder.employmentIdFlag = true
	return builder
}

// 活动id
//
// 示例值：1
func (builder *VerificationActivityRowBuilder) ActivityId(activityId string) *VerificationActivityRowBuilder {
	builder.activityId = activityId
	builder.activityIdFlag = true
	return builder
}

// 新工号
//
// 示例值：1
func (builder *VerificationActivityRowBuilder) EmployeeNumber(employeeNumber string) *VerificationActivityRowBuilder {
	builder.employeeNumber = employeeNumber
	builder.employeeNumberFlag = true
	return builder
}

// 旧工号
//
// 示例值：1
func (builder *VerificationActivityRowBuilder) EmployeeId(employeeId string) *VerificationActivityRowBuilder {
	builder.employeeId = employeeId
	builder.employeeIdFlag = true
	return builder
}

// 工时类型
//
// 示例值：
func (builder *VerificationActivityRowBuilder) WorkingHoursType(workingHoursType *IdWithName) *VerificationActivityRowBuilder {
	builder.workingHoursType = workingHoursType
	builder.workingHoursTypeFlag = true
	return builder
}

// 薪资组
//
// 示例值：
func (builder *VerificationActivityRowBuilder) PayGroup(payGroup *IdWithName) *VerificationActivityRowBuilder {
	builder.payGroup = payGroup
	builder.payGroupFlag = true
	return builder
}

// 开始日期 "2025-05-01"
//
// 示例值：1
func (builder *VerificationActivityRowBuilder) StartDate(startDate string) *VerificationActivityRowBuilder {
	builder.startDate = startDate
	builder.startDateFlag = true
	return builder
}

// 结束日期 "2025-05-01"
//
// 示例值：1
func (builder *VerificationActivityRowBuilder) EndDate(endDate string) *VerificationActivityRowBuilder {
	builder.endDate = endDate
	builder.endDateFlag = true
	return builder
}

// 数据锁定日期 "2025-05-01"
//
// 示例值：1
func (builder *VerificationActivityRowBuilder) CutoffDate(cutoffDate string) *VerificationActivityRowBuilder {
	builder.cutoffDate = cutoffDate
	builder.cutoffDateFlag = true
	return builder
}

// 汇总值， 数值、金额等类型数据项会按配置截取小数位
//
// 示例值：
func (builder *VerificationActivityRowBuilder) ItemValues(itemValues []*VerifActItemValue) *VerificationActivityRowBuilder {
	builder.itemValues = itemValues
	builder.itemValuesFlag = true
	return builder
}

// 分段值，plan.is_proration=true时有值
//
// 示例值：
func (builder *VerificationActivityRowBuilder) Prorations(prorations []*VerifActProration) *VerificationActivityRowBuilder {
	builder.prorations = prorations
	builder.prorationsFlag = true
	return builder
}

func (builder *VerificationActivityRowBuilder) Build() *VerificationActivityRow {
	req := &VerificationActivityRow{}
	if builder.rowIdFlag {
		req.RowId = &builder.rowId

	}
	if builder.employmentIdFlag {
		req.EmploymentId = &builder.employmentId

	}
	if builder.activityIdFlag {
		req.ActivityId = &builder.activityId

	}
	if builder.employeeNumberFlag {
		req.EmployeeNumber = &builder.employeeNumber

	}
	if builder.employeeIdFlag {
		req.EmployeeId = &builder.employeeId

	}
	if builder.workingHoursTypeFlag {
		req.WorkingHoursType = builder.workingHoursType
	}
	if builder.payGroupFlag {
		req.PayGroup = builder.payGroup
	}
	if builder.startDateFlag {
		req.StartDate = &builder.startDate

	}
	if builder.endDateFlag {
		req.EndDate = &builder.endDate

	}
	if builder.cutoffDateFlag {
		req.CutoffDate = &builder.cutoffDate

	}
	if builder.itemValuesFlag {
		req.ItemValues = builder.itemValues
	}
	if builder.prorationsFlag {
		req.Prorations = builder.prorations
	}
	return req
}

type VerificationPlan struct {
	PlanId *string `json:"plan_id,omitempty"` // 方案ID

	VersionId *string `json:"version_id,omitempty"` // 版本ID

	TimeZone *string `json:"time_zone,omitempty"` // 时区，Asia/Shanghai

	IsActive *bool `json:"is_active,omitempty"` // 是否启用

	EffectivePeriodSeq *string `json:"effective_period_seq,omitempty"` // 生效期间，"2006-08"

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

	CountryRegionId *IdWithName `json:"country_region_id,omitempty"` // 国家/地区

	CurrencyId *IdWithName `json:"currency_id,omitempty"` // 币种

	CalendarType *int `json:"calendar_type,omitempty"` // 核对周期日历类型

	PayCalendars []*VerifPayCalendar `json:"pay_calendars,omitempty"` // 算薪日历

	ScopeType *int `json:"scope_type,omitempty"` // 核对人员范围

	PayGroups []*IdWithName `json:"pay_groups,omitempty"` // 薪资组

	DatasourceConfig *VerifDatasourceConfig `json:"datasource_config,omitempty"` // 数据源配置

	ApprovalType *int `json:"approval_type,omitempty"` // 复核类型

	Ovbservers []string `json:"ovbservers,omitempty"` // 观察员 wk employment id

	Admins []string `json:"admins,omitempty"` // 管理员 wk employment id

	Reviewers []string `json:"reviewers,omitempty"` // 复核员 wk employment id

	PlanType *int `json:"plan_type,omitempty"` // 方案类型

	UpdateTime *int `json:"update_time,omitempty"` // 更新时间戳
}

type VerificationPlanBuilder struct {
	planId     string // 方案ID
	planIdFlag bool

	versionId     string // 版本ID
	versionIdFlag bool

	timeZone     string // 时区，Asia/Shanghai
	timeZoneFlag bool

	isActive     bool // 是否启用
	isActiveFlag bool

	effectivePeriodSeq     string // 生效期间，"2006-08"
	effectivePeriodSeqFlag bool

	name     *IdWithName // 名称
	nameFlag bool

	countryRegionId     *IdWithName // 国家/地区
	countryRegionIdFlag bool

	currencyId     *IdWithName // 币种
	currencyIdFlag bool

	calendarType     int // 核对周期日历类型
	calendarTypeFlag bool

	payCalendars     []*VerifPayCalendar // 算薪日历
	payCalendarsFlag bool

	scopeType     int // 核对人员范围
	scopeTypeFlag bool

	payGroups     []*IdWithName // 薪资组
	payGroupsFlag bool

	datasourceConfig     *VerifDatasourceConfig // 数据源配置
	datasourceConfigFlag bool

	approvalType     int // 复核类型
	approvalTypeFlag bool

	ovbservers     []string // 观察员 wk employment id
	ovbserversFlag bool

	admins     []string // 管理员 wk employment id
	adminsFlag bool

	reviewers     []string // 复核员 wk employment id
	reviewersFlag bool

	planType     int // 方案类型
	planTypeFlag bool

	updateTime     int // 更新时间戳
	updateTimeFlag bool
}

func NewVerificationPlanBuilder() *VerificationPlanBuilder {
	builder := &VerificationPlanBuilder{}
	return builder
}

// 方案ID
//
// 示例值：1
func (builder *VerificationPlanBuilder) PlanId(planId string) *VerificationPlanBuilder {
	builder.planId = planId
	builder.planIdFlag = true
	return builder
}

// 版本ID
//
// 示例值：1
func (builder *VerificationPlanBuilder) VersionId(versionId string) *VerificationPlanBuilder {
	builder.versionId = versionId
	builder.versionIdFlag = true
	return builder
}

// 时区，Asia/Shanghai
//
// 示例值：1
func (builder *VerificationPlanBuilder) TimeZone(timeZone string) *VerificationPlanBuilder {
	builder.timeZone = timeZone
	builder.timeZoneFlag = true
	return builder
}

// 是否启用
//
// 示例值：
func (builder *VerificationPlanBuilder) IsActive(isActive bool) *VerificationPlanBuilder {
	builder.isActive = isActive
	builder.isActiveFlag = true
	return builder
}

// 生效期间，"2006-08"
//
// 示例值：1
func (builder *VerificationPlanBuilder) EffectivePeriodSeq(effectivePeriodSeq string) *VerificationPlanBuilder {
	builder.effectivePeriodSeq = effectivePeriodSeq
	builder.effectivePeriodSeqFlag = true
	return builder
}

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

// 国家/地区
//
// 示例值：
func (builder *VerificationPlanBuilder) CountryRegionId(countryRegionId *IdWithName) *VerificationPlanBuilder {
	builder.countryRegionId = countryRegionId
	builder.countryRegionIdFlag = true
	return builder
}

// 币种
//
// 示例值：
func (builder *VerificationPlanBuilder) CurrencyId(currencyId *IdWithName) *VerificationPlanBuilder {
	builder.currencyId = currencyId
	builder.currencyIdFlag = true
	return builder
}

// 核对周期日历类型
//
// 示例值：1
func (builder *VerificationPlanBuilder) CalendarType(calendarType int) *VerificationPlanBuilder {
	builder.calendarType = calendarType
	builder.calendarTypeFlag = true
	return builder
}

// 算薪日历
//
// 示例值：
func (builder *VerificationPlanBuilder) PayCalendars(payCalendars []*VerifPayCalendar) *VerificationPlanBuilder {
	builder.payCalendars = payCalendars
	builder.payCalendarsFlag = true
	return builder
}

// 核对人员范围
//
// 示例值：1
func (builder *VerificationPlanBuilder) ScopeType(scopeType int) *VerificationPlanBuilder {
	builder.scopeType = scopeType
	builder.scopeTypeFlag = true
	return builder
}

// 薪资组
//
// 示例值：
func (builder *VerificationPlanBuilder) PayGroups(payGroups []*IdWithName) *VerificationPlanBuilder {
	builder.payGroups = payGroups
	builder.payGroupsFlag = true
	return builder
}

// 数据源配置
//
// 示例值：
func (builder *VerificationPlanBuilder) DatasourceConfig(datasourceConfig *VerifDatasourceConfig) *VerificationPlanBuilder {
	builder.datasourceConfig = datasourceConfig
	builder.datasourceConfigFlag = true
	return builder
}

// 复核类型
//
// 示例值：1
func (builder *VerificationPlanBuilder) ApprovalType(approvalType int) *VerificationPlanBuilder {
	builder.approvalType = approvalType
	builder.approvalTypeFlag = true
	return builder
}

// 观察员 wk employment id
//
// 示例值：
func (builder *VerificationPlanBuilder) Ovbservers(ovbservers []string) *VerificationPlanBuilder {
	builder.ovbservers = ovbservers
	builder.ovbserversFlag = true
	return builder
}

// 管理员 wk employment id
//
// 示例值：
func (builder *VerificationPlanBuilder) Admins(admins []string) *VerificationPlanBuilder {
	builder.admins = admins
	builder.adminsFlag = true
	return builder
}

// 复核员 wk employment id
//
// 示例值：
func (builder *VerificationPlanBuilder) Reviewers(reviewers []string) *VerificationPlanBuilder {
	builder.reviewers = reviewers
	builder.reviewersFlag = true
	return builder
}

// 方案类型
//
// 示例值：1
func (builder *VerificationPlanBuilder) PlanType(planType int) *VerificationPlanBuilder {
	builder.planType = planType
	builder.planTypeFlag = true
	return builder
}

// 更新时间戳
//
// 示例值：1
func (builder *VerificationPlanBuilder) UpdateTime(updateTime int) *VerificationPlanBuilder {
	builder.updateTime = updateTime
	builder.updateTimeFlag = true
	return builder
}

func (builder *VerificationPlanBuilder) Build() *VerificationPlan {
	req := &VerificationPlan{}
	if builder.planIdFlag {
		req.PlanId = &builder.planId

	}
	if builder.versionIdFlag {
		req.VersionId = &builder.versionId

	}
	if builder.timeZoneFlag {
		req.TimeZone = &builder.timeZone

	}
	if builder.isActiveFlag {
		req.IsActive = &builder.isActive

	}
	if builder.effectivePeriodSeqFlag {
		req.EffectivePeriodSeq = &builder.effectivePeriodSeq

	}
	if builder.nameFlag {
		req.Name = builder.name
	}
	if builder.countryRegionIdFlag {
		req.CountryRegionId = builder.countryRegionId
	}
	if builder.currencyIdFlag {
		req.CurrencyId = builder.currencyId
	}
	if builder.calendarTypeFlag {
		req.CalendarType = &builder.calendarType

	}
	if builder.payCalendarsFlag {
		req.PayCalendars = builder.payCalendars
	}
	if builder.scopeTypeFlag {
		req.ScopeType = &builder.scopeType

	}
	if builder.payGroupsFlag {
		req.PayGroups = builder.payGroups
	}
	if builder.datasourceConfigFlag {
		req.DatasourceConfig = builder.datasourceConfig
	}
	if builder.approvalTypeFlag {
		req.ApprovalType = &builder.approvalType

	}
	if builder.ovbserversFlag {
		req.Ovbservers = builder.ovbservers
	}
	if builder.adminsFlag {
		req.Admins = builder.admins
	}
	if builder.reviewersFlag {
		req.Reviewers = builder.reviewers
	}
	if builder.planTypeFlag {
		req.PlanType = &builder.planType

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

	}
	return req
}

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

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

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

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

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

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

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

}

type ListAcctItemRespData struct {
	Items []*AcctItem `json:"items,omitempty"` // 算薪项列表

	PageToken *string `json:"page_token,omitempty"` // 下一页开始

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

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

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

type ListCostAllocationDetailReqBuilder struct {
	apiReq *larkcore.ApiReq
}

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

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

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

// 成本分摊方案ID
//
// 示例值：72131231231231231
func (builder *ListCostAllocationDetailReqBuilder) CostAllocationPlanId(costAllocationPlanId string) *ListCostAllocationDetailReqBuilder {
	builder.apiReq.QueryParams.Set("cost_allocation_plan_id", fmt.Sprint(costAllocationPlanId))
	return builder
}

// 期间
//
// 示例值：2024-06
func (builder *ListCostAllocationDetailReqBuilder) PayPeriod(payPeriod string) *ListCostAllocationDetailReqBuilder {
	builder.apiReq.QueryParams.Set("pay_period", fmt.Sprint(payPeriod))
	return builder
}

// 报表类型
//
// 示例值：0
func (builder *ListCostAllocationDetailReqBuilder) ReportType(reportType int) *ListCostAllocationDetailReqBuilder {
	builder.apiReq.QueryParams.Set("report_type", fmt.Sprint(reportType))
	return builder
}

func (builder *ListCostAllocationDetailReqBuilder) Build() *ListCostAllocationDetailReq {
	req := &ListCostAllocationDetailReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type ListCostAllocationDetailReq struct {
	apiReq *larkcore.ApiReq
}

type ListCostAllocationDetailRespData struct {
	CostAllocationReportDatas []*CostAllocationReportData `json:"cost_allocation_report_datas,omitempty"` // 报表明细数据

	CostAllocationReportNames []*I18nContent `json:"cost_allocation_report_names,omitempty"` // 报表名称

	PayPeriod *string `json:"pay_period,omitempty"` // 期间

	PageToken *string `json:"page_token,omitempty"` //

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

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

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

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

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

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

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

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

// 期间
//
// 示例值：2023-11
func (builder *ListCostAllocationPlanReqBuilder) PayPeriod(payPeriod string) *ListCostAllocationPlanReqBuilder {
	builder.apiReq.QueryParams.Set("pay_period", fmt.Sprint(payPeriod))
	return builder
}

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

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

}

type ListCostAllocationPlanRespData struct {
	Items []*CostAllocationPlan `json:"items,omitempty"` // 方案

	PageToken *string `json:"page_token,omitempty"` // 下一页开始

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

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

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

type ListCostAllocationReportReqBuilder struct {
	apiReq *larkcore.ApiReq
}

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

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

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

// 成本分摊方案ID
//
// 示例值：6823630319749580304
func (builder *ListCostAllocationReportReqBuilder) CostAllocationPlanId(costAllocationPlanId string) *ListCostAllocationReportReqBuilder {
	builder.apiReq.QueryParams.Set("cost_allocation_plan_id", fmt.Sprint(costAllocationPlanId))
	return builder
}

// 期间
//
// 示例值：2023-11
func (builder *ListCostAllocationReportReqBuilder) PayPeriod(payPeriod string) *ListCostAllocationReportReqBuilder {
	builder.apiReq.QueryParams.Set("pay_period", fmt.Sprint(payPeriod))
	return builder
}

// 报表类型
//
// 示例值：1
func (builder *ListCostAllocationReportReqBuilder) ReportType(reportType int) *ListCostAllocationReportReqBuilder {
	builder.apiReq.QueryParams.Set("report_type", fmt.Sprint(reportType))
	return builder
}

func (builder *ListCostAllocationReportReqBuilder) Build() *ListCostAllocationReportReq {
	req := &ListCostAllocationReportReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type ListCostAllocationReportReq struct {
	apiReq *larkcore.ApiReq
}

type ListCostAllocationReportRespData struct {
	PayPeriod *string `json:"pay_period,omitempty"` // 期间

	PageToken *string `json:"page_token,omitempty"` // 下一页开始

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

	CostAllocationReportNames []*I18nContent `json:"cost_allocation_report_names,omitempty"` // 报表名称

	CostAllocationReportDatas []*CostAllocationReportData `json:"cost_allocation_report_datas,omitempty"` // 汇总数据
}

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

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

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

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

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

//
//
// 示例值：
func (builder *ListDatasourceReqBuilder) PageSize(pageSize int) *ListDatasourceReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

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

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

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

}

type ListDatasourceRespData struct {
	PageToken *string `json:"page_token,omitempty"` //

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

	Datasources []*Datasource `json:"datasources,omitempty"` // 数据源列表
}

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

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

type QueryDatasourceRecordReqBodyBuilder struct {
	sourceCode     string // 数据源编码
	sourceCodeFlag bool

	selectedFields     []string // 指定查询的数据源字段。如不传，默认返回所有数据源字段
	selectedFieldsFlag bool

	fieldFilters     []*DatasourceRecordFieldFilter // 查询过滤器列表，多个过滤器之间为And关系。本期员工月维度汇总类型数据源，只支持employment_id、payroll_period fieldKey的查询，其中payroll_period必传
	fieldFiltersFlag bool
}

func NewQueryDatasourceRecordReqBodyBuilder() *QueryDatasourceRecordReqBodyBuilder {
	builder := &QueryDatasourceRecordReqBodyBuilder{}
	return builder
}

// 数据源编码
//
//示例值：test__c
func (builder *QueryDatasourceRecordReqBodyBuilder) SourceCode(sourceCode string) *QueryDatasourceRecordReqBodyBuilder {
	builder.sourceCode = sourceCode
	builder.sourceCodeFlag = true
	return builder
}

// 指定查询的数据源字段。如不传，默认返回所有数据源字段
//
//示例值：
func (builder *QueryDatasourceRecordReqBodyBuilder) SelectedFields(selectedFields []string) *QueryDatasourceRecordReqBodyBuilder {
	builder.selectedFields = selectedFields
	builder.selectedFieldsFlag = true
	return builder
}

// 查询过滤器列表，多个过滤器之间为And关系。本期员工月维度汇总类型数据源，只支持employment_id、payroll_period fieldKey的查询，其中payroll_period必传
//
//示例值：
func (builder *QueryDatasourceRecordReqBodyBuilder) FieldFilters(fieldFilters []*DatasourceRecordFieldFilter) *QueryDatasourceRecordReqBodyBuilder {
	builder.fieldFilters = fieldFilters
	builder.fieldFiltersFlag = true
	return builder
}

func (builder *QueryDatasourceRecordReqBodyBuilder) Build() *QueryDatasourceRecordReqBody {
	req := &QueryDatasourceRecordReqBody{}
	if builder.sourceCodeFlag {
		req.SourceCode = &builder.sourceCode
	}
	if builder.selectedFieldsFlag {
		req.SelectedFields = builder.selectedFields
	}
	if builder.fieldFiltersFlag {
		req.FieldFilters = builder.fieldFilters
	}
	return req
}

type QueryDatasourceRecordPathReqBodyBuilder struct {
	sourceCode         string
	sourceCodeFlag     bool
	selectedFields     []string
	selectedFieldsFlag bool
	fieldFilters       []*DatasourceRecordFieldFilter
	fieldFiltersFlag   bool
}

func NewQueryDatasourceRecordPathReqBodyBuilder() *QueryDatasourceRecordPathReqBodyBuilder {
	builder := &QueryDatasourceRecordPathReqBodyBuilder{}
	return builder
}

// 数据源编码
//
// 示例值：test__c
func (builder *QueryDatasourceRecordPathReqBodyBuilder) SourceCode(sourceCode string) *QueryDatasourceRecordPathReqBodyBuilder {
	builder.sourceCode = sourceCode
	builder.sourceCodeFlag = true
	return builder
}

// 指定查询的数据源字段。如不传，默认返回所有数据源字段
//
// 示例值：
func (builder *QueryDatasourceRecordPathReqBodyBuilder) SelectedFields(selectedFields []string) *QueryDatasourceRecordPathReqBodyBuilder {
	builder.selectedFields = selectedFields
	builder.selectedFieldsFlag = true
	return builder
}

// 查询过滤器列表，多个过滤器之间为And关系。本期员工月维度汇总类型数据源，只支持employment_id、payroll_period fieldKey的查询，其中payroll_period必传
//
// 示例值：
func (builder *QueryDatasourceRecordPathReqBodyBuilder) FieldFilters(fieldFilters []*DatasourceRecordFieldFilter) *QueryDatasourceRecordPathReqBodyBuilder {
	builder.fieldFilters = fieldFilters
	builder.fieldFiltersFlag = true
	return builder
}

func (builder *QueryDatasourceRecordPathReqBodyBuilder) Build() (*QueryDatasourceRecordReqBody, error) {
	req := &QueryDatasourceRecordReqBody{}
	if builder.sourceCodeFlag {
		req.SourceCode = &builder.sourceCode
	}
	if builder.selectedFieldsFlag {
		req.SelectedFields = builder.selectedFields
	}
	if builder.fieldFiltersFlag {
		req.FieldFilters = builder.fieldFilters
	}
	return req, nil
}

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

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

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

//
//
// 示例值：
func (builder *QueryDatasourceRecordReqBuilder) PageSize(pageSize int) *QueryDatasourceRecordReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

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

// 获取外部数据源记录
func (builder *QueryDatasourceRecordReqBuilder) Body(body *QueryDatasourceRecordReqBody) *QueryDatasourceRecordReqBuilder {
	builder.body = body
	return builder
}

func (builder *QueryDatasourceRecordReqBuilder) Build() *QueryDatasourceRecordReq {
	req := &QueryDatasourceRecordReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.Limit = builder.limit
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	req.apiReq.Body = builder.body
	return req
}

type QueryDatasourceRecordReqBody struct {
	SourceCode *string `json:"source_code,omitempty"` // 数据源编码

	SelectedFields []string `json:"selected_fields,omitempty"` // 指定查询的数据源字段。如不传，默认返回所有数据源字段

	FieldFilters []*DatasourceRecordFieldFilter `json:"field_filters,omitempty"` // 查询过滤器列表，多个过滤器之间为And关系。本期员工月维度汇总类型数据源，只支持employment_id、payroll_period fieldKey的查询，其中payroll_period必传
}

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

}

type QueryDatasourceRecordRespData struct {
	PageToken *string `json:"page_token,omitempty"` //

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

	Records []*DatasourceRecord `json:"records,omitempty"` // 数据记录列表
}

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

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

type SaveDatasourceRecordReqBodyBuilder struct {
	sourceCode     string // 数据源code
	sourceCodeFlag bool

	records     []*DatasourceRecord // 需保存的记录列表
	recordsFlag bool
}

func NewSaveDatasourceRecordReqBodyBuilder() *SaveDatasourceRecordReqBodyBuilder {
	builder := &SaveDatasourceRecordReqBodyBuilder{}
	return builder
}

// 数据源code
//
//示例值：test__c
func (builder *SaveDatasourceRecordReqBodyBuilder) SourceCode(sourceCode string) *SaveDatasourceRecordReqBodyBuilder {
	builder.sourceCode = sourceCode
	builder.sourceCodeFlag = true
	return builder
}

// 需保存的记录列表
//
//示例值：
func (builder *SaveDatasourceRecordReqBodyBuilder) Records(records []*DatasourceRecord) *SaveDatasourceRecordReqBodyBuilder {
	builder.records = records
	builder.recordsFlag = true
	return builder
}

func (builder *SaveDatasourceRecordReqBodyBuilder) Build() *SaveDatasourceRecordReqBody {
	req := &SaveDatasourceRecordReqBody{}
	if builder.sourceCodeFlag {
		req.SourceCode = &builder.sourceCode
	}
	if builder.recordsFlag {
		req.Records = builder.records
	}
	return req
}

type SaveDatasourceRecordPathReqBodyBuilder struct {
	sourceCode     string
	sourceCodeFlag bool
	records        []*DatasourceRecord
	recordsFlag    bool
}

func NewSaveDatasourceRecordPathReqBodyBuilder() *SaveDatasourceRecordPathReqBodyBuilder {
	builder := &SaveDatasourceRecordPathReqBodyBuilder{}
	return builder
}

// 数据源code
//
// 示例值：test__c
func (builder *SaveDatasourceRecordPathReqBodyBuilder) SourceCode(sourceCode string) *SaveDatasourceRecordPathReqBodyBuilder {
	builder.sourceCode = sourceCode
	builder.sourceCodeFlag = true
	return builder
}

// 需保存的记录列表
//
// 示例值：
func (builder *SaveDatasourceRecordPathReqBodyBuilder) Records(records []*DatasourceRecord) *SaveDatasourceRecordPathReqBodyBuilder {
	builder.records = records
	builder.recordsFlag = true
	return builder
}

func (builder *SaveDatasourceRecordPathReqBodyBuilder) Build() (*SaveDatasourceRecordReqBody, error) {
	req := &SaveDatasourceRecordReqBody{}
	if builder.sourceCodeFlag {
		req.SourceCode = &builder.sourceCode
	}
	if builder.recordsFlag {
		req.Records = builder.records
	}
	return req, nil
}

type SaveDatasourceRecordReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *SaveDatasourceRecordReqBody
}

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

// 外部数据记录批量保存接口
func (builder *SaveDatasourceRecordReqBuilder) Body(body *SaveDatasourceRecordReqBody) *SaveDatasourceRecordReqBuilder {
	builder.body = body
	return builder
}

func (builder *SaveDatasourceRecordReqBuilder) Build() *SaveDatasourceRecordReq {
	req := &SaveDatasourceRecordReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.Body = builder.body
	return req
}

type SaveDatasourceRecordReqBody struct {
	SourceCode *string `json:"source_code,omitempty"` // 数据源code

	Records []*DatasourceRecord `json:"records,omitempty"` // 需保存的记录列表
}

type SaveDatasourceRecordReq struct {
	apiReq *larkcore.ApiReq
	Body   *SaveDatasourceRecordReqBody `body:""`
}

type SaveDatasourceRecordRespData struct {
	AffectCounts *string `json:"affect_counts,omitempty"` // 更新的记录条数
}

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

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

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

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

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

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

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

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

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

}

type ListPaygroupRespData struct {
	Items []*Paygroup `json:"items,omitempty"` // 薪资组列表

	PageToken *string `json:"page_token,omitempty"` // 分页标识符

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

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

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

type ArchivePaymentActivityReqBodyBuilder struct {
	activityId     string // 发薪活动ID
	activityIdFlag bool
}

func NewArchivePaymentActivityReqBodyBuilder() *ArchivePaymentActivityReqBodyBuilder {
	builder := &ArchivePaymentActivityReqBodyBuilder{}
	return builder
}

// 发薪活动ID
//
//示例值：111111
func (builder *ArchivePaymentActivityReqBodyBuilder) ActivityId(activityId string) *ArchivePaymentActivityReqBodyBuilder {
	builder.activityId = activityId
	builder.activityIdFlag = true
	return builder
}

func (builder *ArchivePaymentActivityReqBodyBuilder) Build() *ArchivePaymentActivityReqBody {
	req := &ArchivePaymentActivityReqBody{}
	if builder.activityIdFlag {
		req.ActivityId = &builder.activityId
	}
	return req
}

type ArchivePaymentActivityPathReqBodyBuilder struct {
	activityId     string
	activityIdFlag bool
}

func NewArchivePaymentActivityPathReqBodyBuilder() *ArchivePaymentActivityPathReqBodyBuilder {
	builder := &ArchivePaymentActivityPathReqBodyBuilder{}
	return builder
}

// 发薪活动ID
//
// 示例值：111111
func (builder *ArchivePaymentActivityPathReqBodyBuilder) ActivityId(activityId string) *ArchivePaymentActivityPathReqBodyBuilder {
	builder.activityId = activityId
	builder.activityIdFlag = true
	return builder
}

func (builder *ArchivePaymentActivityPathReqBodyBuilder) Build() (*ArchivePaymentActivityReqBody, error) {
	req := &ArchivePaymentActivityReqBody{}
	if builder.activityIdFlag {
		req.ActivityId = &builder.activityId
	}
	return req, nil
}

type ArchivePaymentActivityReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *ArchivePaymentActivityReqBody
}

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

// 封存发薪活动
func (builder *ArchivePaymentActivityReqBuilder) Body(body *ArchivePaymentActivityReqBody) *ArchivePaymentActivityReqBuilder {
	builder.body = body
	return builder
}

func (builder *ArchivePaymentActivityReqBuilder) Build() *ArchivePaymentActivityReq {
	req := &ArchivePaymentActivityReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.Body = builder.body
	return req
}

type ArchivePaymentActivityReqBody struct {
	ActivityId *string `json:"activity_id,omitempty"` // 发薪活动ID
}

type ArchivePaymentActivityReq struct {
	apiReq *larkcore.ApiReq
	Body   *ArchivePaymentActivityReqBody `body:""`
}

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

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

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

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

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

// 发薪日开始时间，格式：YYYY-MM-dd，[pay_period_start_date, pay_period_end_date] 是一个左闭右闭区间。
//
// 示例值：2024-01-01
func (builder *ListPaymentActivityReqBuilder) PayPeriodStartDate(payPeriodStartDate string) *ListPaymentActivityReqBuilder {
	builder.apiReq.QueryParams.Set("pay_period_start_date", fmt.Sprint(payPeriodStartDate))
	return builder
}

// 发薪日结束时间，格式：YYYY-MM-dd，[pay_period_start_date, pay_period_end_date] 是一个左闭右闭区间。
//
// 示例值：2024-01-31
func (builder *ListPaymentActivityReqBuilder) PayPeriodEndDate(payPeriodEndDate string) *ListPaymentActivityReqBuilder {
	builder.apiReq.QueryParams.Set("pay_period_end_date", fmt.Sprint(payPeriodEndDate))
	return builder
}

// 分页大小，传值范围为 [1, 100]
//
// 示例值：
func (builder *ListPaymentActivityReqBuilder) PageSize(pageSize int) *ListPaymentActivityReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

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

// 发薪活动审批状态列表，其中：100-待确认发薪名单；150-待提交审批；200-审批中；300-审批被拒绝；350-审批被撤回；360-审批被撤销；375-审批通过；400-已封存。
//
// 示例值：
func (builder *ListPaymentActivityReqBuilder) Statuses(statuses []int) *ListPaymentActivityReqBuilder {
	for _, v := range statuses {
		builder.apiReq.QueryParams.Add("statuses", fmt.Sprint(v))
	}
	return builder
}

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

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

}

type ListPaymentActivityRespData struct {
	PaymentActivitys []*PaymentActivity `json:"payment_activitys,omitempty"` // 发薪活动列表

	PageToken *string `json:"page_token,omitempty"` //

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

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

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

type ListPaymentActivityDetailReqBuilder struct {
	apiReq *larkcore.ApiReq
}

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

// 页码，第一页从 1 开始
//
// 示例值：100
func (builder *ListPaymentActivityDetailReqBuilder) PageIndex(pageIndex int) *ListPaymentActivityDetailReqBuilder {
	builder.apiReq.QueryParams.Set("page_index", fmt.Sprint(pageIndex))
	return builder
}

// 每页大小，范围为：[1, 100]
//
// 示例值：
func (builder *ListPaymentActivityDetailReqBuilder) PageSize(pageSize int) *ListPaymentActivityDetailReqBuilder {
	builder.apiReq.QueryParams.Set("page_size", fmt.Sprint(pageSize))
	return builder
}

// 发薪活动唯一标识
//
// 示例值：7202076988667019308
func (builder *ListPaymentActivityDetailReqBuilder) ActivityId(activityId string) *ListPaymentActivityDetailReqBuilder {
	builder.apiReq.QueryParams.Set("activity_id", fmt.Sprint(activityId))
	return builder
}

// 是否需要查询算薪明细的分段信息，如果不传该参数或传 false ，那么只返回发薪活动明细数据；如果该参数传了 true，那么同时返回发薪明细对应的算薪明细分段数据。
//
// 示例值：
func (builder *ListPaymentActivityDetailReqBuilder) IncludeSegmentData(includeSegmentData bool) *ListPaymentActivityDetailReqBuilder {
	builder.apiReq.QueryParams.Set("include_segment_data", fmt.Sprint(includeSegmentData))
	return builder
}

// 算薪项 ID 列表。当前参数传空时，接口会返回发薪明细中所有的算薪项；当前参数不为空时，接口只返回发薪明细中与 acct_item_ids 存在交集的算薪项。
//
// 示例值：
func (builder *ListPaymentActivityDetailReqBuilder) AcctItemIds(acctItemIds []string) *ListPaymentActivityDetailReqBuilder {
	for _, v := range acctItemIds {
		builder.apiReq.QueryParams.Add("acct_item_ids", fmt.Sprint(v))
	}
	return builder
}

func (builder *ListPaymentActivityDetailReqBuilder) Build() *ListPaymentActivityDetailReq {
	req := &ListPaymentActivityDetailReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.QueryParams = builder.apiReq.QueryParams
	return req
}

type ListPaymentActivityDetailReq struct {
	apiReq *larkcore.ApiReq
}

type ListPaymentActivityDetailRespData struct {
	PaymentActivityDetails []*PaymentActivityDetail `json:"payment_activity_details,omitempty"` // 发薪明细列表

	Total *int `json:"total,omitempty"` // 发薪明细总数
}

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

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

type QueryPaymentDetailReqBodyBuilder struct {
	pageIndex     int // 页码，第一页从 1 开始
	pageIndexFlag bool

	pageSize     int // 每页大小，范围为：[1, 100]
	pageSizeFlag bool

	acctItemIds     []string // 算薪项 ID 列表。当前参数传空时，接口会返回发薪明细中所有的算薪项；当前参数不为空时，接口只返回发薪明细中与 acct_item_ids 存在交集的算薪项。
	acctItemIdsFlag bool

	employeeIds     []string // 员工的飞书人事雇佣 ID 列表。
	employeeIdsFlag bool

	payPeriodStartDate     string // 发薪日开始时间，格式：YYYY-MM-dd，[pay_period_start_date, pay_period_end_date] 是一个左闭右闭区间。
	payPeriodStartDateFlag bool

	payPeriodEndDate     string // 发薪日结束时间，格式：YYYY-MM-dd，[pay_period_start_date, pay_period_end_date] 是一个左闭右闭区间，pay_period_start_date 不得晚于 pay_period_end_date ，且 [pay_period_start_date, pay_period_end_date] 最大间隔为 12 个月。
	payPeriodEndDateFlag bool

	activityIds     []string // 发薪活动 ID 列表
	activityIdsFlag bool

	includeSegmentData     bool // 是否需要查询算薪明细的分段信息，如果不传该参数或传 false ，那么只返回发薪活动明细数据；如果该参数传了 true，那么同时返回发薪明细对应的算薪明细分段数据。
	includeSegmentDataFlag bool
}

func NewQueryPaymentDetailReqBodyBuilder() *QueryPaymentDetailReqBodyBuilder {
	builder := &QueryPaymentDetailReqBodyBuilder{}
	return builder
}

// 页码，第一页从 1 开始
//
//示例值：100
func (builder *QueryPaymentDetailReqBodyBuilder) PageIndex(pageIndex int) *QueryPaymentDetailReqBodyBuilder {
	builder.pageIndex = pageIndex
	builder.pageIndexFlag = true
	return builder
}

// 每页大小，范围为：[1, 100]
//
//示例值：
func (builder *QueryPaymentDetailReqBodyBuilder) PageSize(pageSize int) *QueryPaymentDetailReqBodyBuilder {
	builder.pageSize = pageSize
	builder.pageSizeFlag = true
	return builder
}

// 算薪项 ID 列表。当前参数传空时，接口会返回发薪明细中所有的算薪项；当前参数不为空时，接口只返回发薪明细中与 acct_item_ids 存在交集的算薪项。
//
//示例值：
func (builder *QueryPaymentDetailReqBodyBuilder) AcctItemIds(acctItemIds []string) *QueryPaymentDetailReqBodyBuilder {
	builder.acctItemIds = acctItemIds
	builder.acctItemIdsFlag = true
	return builder
}

// 员工的飞书人事雇佣 ID 列表。
//
//示例值：
func (builder *QueryPaymentDetailReqBodyBuilder) EmployeeIds(employeeIds []string) *QueryPaymentDetailReqBodyBuilder {
	builder.employeeIds = employeeIds
	builder.employeeIdsFlag = true
	return builder
}

// 发薪日开始时间，格式：YYYY-MM-dd，[pay_period_start_date, pay_period_end_date] 是一个左闭右闭区间。
//
//示例值：2024-01-01
func (builder *QueryPaymentDetailReqBodyBuilder) PayPeriodStartDate(payPeriodStartDate string) *QueryPaymentDetailReqBodyBuilder {
	builder.payPeriodStartDate = payPeriodStartDate
	builder.payPeriodStartDateFlag = true
	return builder
}

// 发薪日结束时间，格式：YYYY-MM-dd，[pay_period_start_date, pay_period_end_date] 是一个左闭右闭区间，pay_period_start_date 不得晚于 pay_period_end_date ，且 [pay_period_start_date, pay_period_end_date] 最大间隔为 12 个月。
//
//示例值：2024-01-31
func (builder *QueryPaymentDetailReqBodyBuilder) PayPeriodEndDate(payPeriodEndDate string) *QueryPaymentDetailReqBodyBuilder {
	builder.payPeriodEndDate = payPeriodEndDate
	builder.payPeriodEndDateFlag = true
	return builder
}

// 发薪活动 ID 列表
//
//示例值：
func (builder *QueryPaymentDetailReqBodyBuilder) ActivityIds(activityIds []string) *QueryPaymentDetailReqBodyBuilder {
	builder.activityIds = activityIds
	builder.activityIdsFlag = true
	return builder
}

// 是否需要查询算薪明细的分段信息，如果不传该参数或传 false ，那么只返回发薪活动明细数据；如果该参数传了 true，那么同时返回发薪明细对应的算薪明细分段数据。
//
//示例值：
func (builder *QueryPaymentDetailReqBodyBuilder) IncludeSegmentData(includeSegmentData bool) *QueryPaymentDetailReqBodyBuilder {
	builder.includeSegmentData = includeSegmentData
	builder.includeSegmentDataFlag = true
	return builder
}

func (builder *QueryPaymentDetailReqBodyBuilder) Build() *QueryPaymentDetailReqBody {
	req := &QueryPaymentDetailReqBody{}
	if builder.pageIndexFlag {
		req.PageIndex = &builder.pageIndex
	}
	if builder.pageSizeFlag {
		req.PageSize = &builder.pageSize
	}
	if builder.acctItemIdsFlag {
		req.AcctItemIds = builder.acctItemIds
	}
	if builder.employeeIdsFlag {
		req.EmployeeIds = builder.employeeIds
	}
	if builder.payPeriodStartDateFlag {
		req.PayPeriodStartDate = &builder.payPeriodStartDate
	}
	if builder.payPeriodEndDateFlag {
		req.PayPeriodEndDate = &builder.payPeriodEndDate
	}
	if builder.activityIdsFlag {
		req.ActivityIds = builder.activityIds
	}
	if builder.includeSegmentDataFlag {
		req.IncludeSegmentData = &builder.includeSegmentData
	}
	return req
}

type QueryPaymentDetailPathReqBodyBuilder struct {
	pageIndex              int
	pageIndexFlag          bool
	pageSize               int
	pageSizeFlag           bool
	acctItemIds            []string
	acctItemIdsFlag        bool
	employeeIds            []string
	employeeIdsFlag        bool
	payPeriodStartDate     string
	payPeriodStartDateFlag bool
	payPeriodEndDate       string
	payPeriodEndDateFlag   bool
	activityIds            []string
	activityIdsFlag        bool
	includeSegmentData     bool
	includeSegmentDataFlag bool
}

func NewQueryPaymentDetailPathReqBodyBuilder() *QueryPaymentDetailPathReqBodyBuilder {
	builder := &QueryPaymentDetailPathReqBodyBuilder{}
	return builder
}

// 页码，第一页从 1 开始
//
// 示例值：100
func (builder *QueryPaymentDetailPathReqBodyBuilder) PageIndex(pageIndex int) *QueryPaymentDetailPathReqBodyBuilder {
	builder.pageIndex = pageIndex
	builder.pageIndexFlag = true
	return builder
}

// 每页大小，范围为：[1, 100]
//
// 示例值：
func (builder *QueryPaymentDetailPathReqBodyBuilder) PageSize(pageSize int) *QueryPaymentDetailPathReqBodyBuilder {
	builder.pageSize = pageSize
	builder.pageSizeFlag = true
	return builder
}

// 算薪项 ID 列表。当前参数传空时，接口会返回发薪明细中所有的算薪项；当前参数不为空时，接口只返回发薪明细中与 acct_item_ids 存在交集的算薪项。
//
// 示例值：
func (builder *QueryPaymentDetailPathReqBodyBuilder) AcctItemIds(acctItemIds []string) *QueryPaymentDetailPathReqBodyBuilder {
	builder.acctItemIds = acctItemIds
	builder.acctItemIdsFlag = true
	return builder
}

// 员工的飞书人事雇佣 ID 列表。
//
// 示例值：
func (builder *QueryPaymentDetailPathReqBodyBuilder) EmployeeIds(employeeIds []string) *QueryPaymentDetailPathReqBodyBuilder {
	builder.employeeIds = employeeIds
	builder.employeeIdsFlag = true
	return builder
}

// 发薪日开始时间，格式：YYYY-MM-dd，[pay_period_start_date, pay_period_end_date] 是一个左闭右闭区间。
//
// 示例值：2024-01-01
func (builder *QueryPaymentDetailPathReqBodyBuilder) PayPeriodStartDate(payPeriodStartDate string) *QueryPaymentDetailPathReqBodyBuilder {
	builder.payPeriodStartDate = payPeriodStartDate
	builder.payPeriodStartDateFlag = true
	return builder
}

// 发薪日结束时间，格式：YYYY-MM-dd，[pay_period_start_date, pay_period_end_date] 是一个左闭右闭区间，pay_period_start_date 不得晚于 pay_period_end_date ，且 [pay_period_start_date, pay_period_end_date] 最大间隔为 12 个月。
//
// 示例值：2024-01-31
func (builder *QueryPaymentDetailPathReqBodyBuilder) PayPeriodEndDate(payPeriodEndDate string) *QueryPaymentDetailPathReqBodyBuilder {
	builder.payPeriodEndDate = payPeriodEndDate
	builder.payPeriodEndDateFlag = true
	return builder
}

// 发薪活动 ID 列表
//
// 示例值：
func (builder *QueryPaymentDetailPathReqBodyBuilder) ActivityIds(activityIds []string) *QueryPaymentDetailPathReqBodyBuilder {
	builder.activityIds = activityIds
	builder.activityIdsFlag = true
	return builder
}

// 是否需要查询算薪明细的分段信息，如果不传该参数或传 false ，那么只返回发薪活动明细数据；如果该参数传了 true，那么同时返回发薪明细对应的算薪明细分段数据。
//
// 示例值：
func (builder *QueryPaymentDetailPathReqBodyBuilder) IncludeSegmentData(includeSegmentData bool) *QueryPaymentDetailPathReqBodyBuilder {
	builder.includeSegmentData = includeSegmentData
	builder.includeSegmentDataFlag = true
	return builder
}

func (builder *QueryPaymentDetailPathReqBodyBuilder) Build() (*QueryPaymentDetailReqBody, error) {
	req := &QueryPaymentDetailReqBody{}
	if builder.pageIndexFlag {
		req.PageIndex = &builder.pageIndex
	}
	if builder.pageSizeFlag {
		req.PageSize = &builder.pageSize
	}
	if builder.acctItemIdsFlag {
		req.AcctItemIds = builder.acctItemIds
	}
	if builder.employeeIdsFlag {
		req.EmployeeIds = builder.employeeIds
	}
	if builder.payPeriodStartDateFlag {
		req.PayPeriodStartDate = &builder.payPeriodStartDate
	}
	if builder.payPeriodEndDateFlag {
		req.PayPeriodEndDate = &builder.payPeriodEndDate
	}
	if builder.activityIdsFlag {
		req.ActivityIds = builder.activityIds
	}
	if builder.includeSegmentDataFlag {
		req.IncludeSegmentData = &builder.includeSegmentData
	}
	return req, nil
}

type QueryPaymentDetailReqBuilder struct {
	apiReq *larkcore.ApiReq
	body   *QueryPaymentDetailReqBody
}

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

//
func (builder *QueryPaymentDetailReqBuilder) Body(body *QueryPaymentDetailReqBody) *QueryPaymentDetailReqBuilder {
	builder.body = body
	return builder
}

func (builder *QueryPaymentDetailReqBuilder) Build() *QueryPaymentDetailReq {
	req := &QueryPaymentDetailReq{}
	req.apiReq = &larkcore.ApiReq{}
	req.apiReq.Body = builder.body
	return req
}

type QueryPaymentDetailReqBody struct {
	PageIndex *int `json:"page_index,omitempty"` // 页码，第一页从 1 开始

	PageSize *int `json:"page_size,omitempty"` // 每页大小，范围为：[1, 100]

	AcctItemIds []string `json:"acct_item_ids,omitempty"` // 算薪项 ID 列表。当前参数传空时，接口会返回发薪明细中所有的算薪项；当前参数不为空时，接口只返回发薪明细中与 acct_item_ids 存在交集的算薪项。

	EmployeeIds []string `json:"employee_ids,omitempty"` // 员工的飞书人事雇佣 ID 列表。

	PayPeriodStartDate *string `json:"pay_period_start_date,omitempty"` // 发薪日开始时间，格式：YYYY-MM-dd，[pay_period_start_date, pay_period_end_date] 是一个左闭右闭区间。

	PayPeriodEndDate *string `json:"pay_period_end_date,omitempty"` // 发薪日结束时间，格式：YYYY-MM-dd，[pay_period_start_date, pay_period_end_date] 是一个左闭右闭区间，pay_period_start_date 不得晚于 pay_period_end_date ，且 [pay_period_start_date, pay_period_end_date] 最大间隔为 12 个月。

	ActivityIds []string `json:"activity_ids,omitempty"` // 发薪活动 ID 列表

	IncludeSegmentData *bool `json:"include_segment_data,omitempty"` // 是否需要查询算薪明细的分段信息，如果不传该参数或传 false ，那么只返回发薪活动明细数据；如果该参数传了 true，那么同时返回发薪明细对应的算薪明细分段数据。
}

type QueryPaymentDetailReq struct {
	apiReq *larkcore.ApiReq
	Body   *QueryPaymentDetailReqBody `body:""`
}

type QueryPaymentDetailRespData struct {
	PaymentDetails []*PaymentDetail `json:"payment_details,omitempty"` // 发薪明细列表

	Total *int `json:"total,omitempty"` // 发薪明细总数
}

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

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

type P2PaymentActivityApprovedV1Data struct {
	ActivityId *string `json:"activity_id,omitempty"` // 审批通过的发薪活动 ID
}

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

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

type P2PaymentActivityStatusChangedV1Data struct {
	ActivityId *string `json:"activity_id,omitempty"` // 发薪活动ID

	Status *int `json:"status,omitempty"` // 发薪活动状态，其中：400-已封存。
}

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

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

type ListAcctItemIterator struct {
	nextPageToken *string
	items         []*AcctItem
	index         int
	limit         int
	ctx           context.Context
	req           *ListAcctItemReq
	listFunc      func(ctx context.Context, req *ListAcctItemReq, options ...larkcore.RequestOptionFunc) (*ListAcctItemResp, error)
	options       []larkcore.RequestOptionFunc
	curlNum       int
}

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

type ListCostAllocationPlanIterator struct {
	nextPageToken *string
	items         []*CostAllocationPlan
	index         int
	limit         int
	ctx           context.Context
	req           *ListCostAllocationPlanReq
	listFunc      func(ctx context.Context, req *ListCostAllocationPlanReq, options ...larkcore.RequestOptionFunc) (*ListCostAllocationPlanResp, error)
	options       []larkcore.RequestOptionFunc
	curlNum       int
}

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

type ListDatasourceIterator struct {
	nextPageToken *string
	items         []*Datasource
	index         int
	limit         int
	ctx           context.Context
	req           *ListDatasourceReq
	listFunc      func(ctx context.Context, req *ListDatasourceReq, options ...larkcore.RequestOptionFunc) (*ListDatasourceResp, error)
	options       []larkcore.RequestOptionFunc
	curlNum       int
}

func (iterator *ListDatasourceIterator) Next() (bool, *Datasource, 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.Datasources) == 0 {
			return false, nil, nil
		}

		iterator.nextPageToken = resp.Data.PageToken
		iterator.items = resp.Data.Datasources
		iterator.index = 0
	}

	block := iterator.items[iterator.index]
	iterator.index++
	iterator.curlNum++
	return true, block, nil
}

func (iterator *ListDatasourceIterator) NextPageToken() *string {
	return iterator.nextPageToken
}

type QueryDatasourceRecordIterator struct {
	nextPageToken *string
	items         []*DatasourceRecord
	index         int
	limit         int
	ctx           context.Context
	req           *QueryDatasourceRecordReq
	listFunc      func(ctx context.Context, req *QueryDatasourceRecordReq, options ...larkcore.RequestOptionFunc) (*QueryDatasourceRecordResp, error)
	options       []larkcore.RequestOptionFunc
	curlNum       int
}

func (iterator *QueryDatasourceRecordIterator) Next() (bool, *DatasourceRecord, 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.Records) == 0 {
			return false, nil, nil
		}

		iterator.nextPageToken = resp.Data.PageToken
		iterator.items = resp.Data.Records
		iterator.index = 0
	}

	block := iterator.items[iterator.index]
	iterator.index++
	iterator.curlNum++
	return true, block, nil
}

func (iterator *QueryDatasourceRecordIterator) NextPageToken() *string {
	return iterator.nextPageToken
}

type ListPaygroupIterator struct {
	nextPageToken *string
	items         []*Paygroup
	index         int
	limit         int
	ctx           context.Context
	req           *ListPaygroupReq
	listFunc      func(ctx context.Context, req *ListPaygroupReq, options ...larkcore.RequestOptionFunc) (*ListPaygroupResp, error)
	options       []larkcore.RequestOptionFunc
	curlNum       int
}

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

type ListPaymentActivityIterator struct {
	nextPageToken *string
	items         []*PaymentActivity
	index         int
	limit         int
	ctx           context.Context
	req           *ListPaymentActivityReq
	listFunc      func(ctx context.Context, req *ListPaymentActivityReq, options ...larkcore.RequestOptionFunc) (*ListPaymentActivityResp, error)
	options       []larkcore.RequestOptionFunc
	curlNum       int
}

func (iterator *ListPaymentActivityIterator) Next() (bool, *PaymentActivity, 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.PaymentActivitys) == 0 {
			return false, nil, nil
		}

		iterator.nextPageToken = resp.Data.PageToken
		iterator.items = resp.Data.PaymentActivitys
		iterator.index = 0
	}

	block := iterator.items[iterator.index]
	iterator.index++
	iterator.curlNum++
	return true, block, nil
}

func (iterator *ListPaymentActivityIterator) NextPageToken() *string {
	return iterator.nextPageToken
}
