@@ -219,12 +219,12 @@ private constructor(
219219 private val location: JsonField <Location >,
220220 private val manager: JsonField <Manager >,
221221 private val middleName: JsonField <String >,
222- private val sourceId: JsonField <String >,
223222 private val startDate: JsonField <String >,
224223 private val title: JsonField <String >,
225224 private val workId: JsonField <String >,
226225 private val income: JsonField <Income >,
227226 private val incomeHistory: JsonField <List <Income ?>>,
227+ private val sourceId: JsonField <String >,
228228 private val additionalProperties: MutableMap <String , JsonValue >,
229229 ) {
230230
@@ -266,9 +266,6 @@ private constructor(
266266 @JsonProperty(" middle_name" )
267267 @ExcludeMissing
268268 middleName: JsonField <String > = JsonMissing .of(),
269- @JsonProperty(" source_id" )
270- @ExcludeMissing
271- sourceId: JsonField <String > = JsonMissing .of(),
272269 @JsonProperty(" start_date" )
273270 @ExcludeMissing
274271 startDate: JsonField <String > = JsonMissing .of(),
@@ -278,6 +275,9 @@ private constructor(
278275 @JsonProperty(" income_history" )
279276 @ExcludeMissing
280277 incomeHistory: JsonField <List <Income ?>> = JsonMissing .of(),
278+ @JsonProperty(" source_id" )
279+ @ExcludeMissing
280+ sourceId: JsonField <String > = JsonMissing .of(),
281281 ) : this (
282282 id,
283283 classCode,
@@ -293,12 +293,12 @@ private constructor(
293293 location,
294294 manager,
295295 middleName,
296- sourceId,
297296 startDate,
298297 title,
299298 workId,
300299 income,
301300 incomeHistory,
301+ sourceId,
302302 mutableMapOf (),
303303 )
304304
@@ -412,14 +412,6 @@ private constructor(
412412 */
413413 fun middleName (): Optional <String > = middleName.getOptional(" middle_name" )
414414
415- /* *
416- * The source system's unique employment identifier for this individual
417- *
418- * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if the
419- * server responded with an unexpected value).
420- */
421- fun sourceId (): Optional <String > = sourceId.getOptional(" source_id" )
422-
423415 /* *
424416 * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if the
425417 * server responded with an unexpected value).
@@ -460,6 +452,14 @@ private constructor(
460452 */
461453 fun incomeHistory (): Optional <List <Income ?>> = incomeHistory.getOptional(" income_history" )
462454
455+ /* *
456+ * The source system's unique employment identifier for this individual
457+ *
458+ * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if the
459+ * server responded with an unexpected value).
460+ */
461+ fun sourceId (): Optional <String > = sourceId.getOptional(" source_id" )
462+
463463 /* *
464464 * Returns the raw JSON value of [id].
465465 *
@@ -573,13 +573,6 @@ private constructor(
573573 @ExcludeMissing
574574 fun _middleName (): JsonField <String > = middleName
575575
576- /* *
577- * Returns the raw JSON value of [sourceId].
578- *
579- * Unlike [sourceId], this method doesn't throw if the JSON field has an unexpected type.
580- */
581- @JsonProperty(" source_id" ) @ExcludeMissing fun _sourceId (): JsonField <String > = sourceId
582-
583576 /* *
584577 * Returns the raw JSON value of [startDate].
585578 *
@@ -621,6 +614,13 @@ private constructor(
621614 @ExcludeMissing
622615 fun _incomeHistory (): JsonField <List <Income ?>> = incomeHistory
623616
617+ /* *
618+ * Returns the raw JSON value of [sourceId].
619+ *
620+ * Unlike [sourceId], this method doesn't throw if the JSON field has an unexpected type.
621+ */
622+ @JsonProperty(" source_id" ) @ExcludeMissing fun _sourceId (): JsonField <String > = sourceId
623+
624624 @JsonAnySetter
625625 private fun putAdditionalProperty (key : String , value : JsonValue ) {
626626 additionalProperties.put(key, value)
@@ -654,7 +654,6 @@ private constructor(
654654 * .location()
655655 * .manager()
656656 * .middleName()
657- * .sourceId()
658657 * .startDate()
659658 * .title()
660659 * .workId()
@@ -680,12 +679,12 @@ private constructor(
680679 private var location: JsonField <Location >? = null
681680 private var manager: JsonField <Manager >? = null
682681 private var middleName: JsonField <String >? = null
683- private var sourceId: JsonField <String >? = null
684682 private var startDate: JsonField <String >? = null
685683 private var title: JsonField <String >? = null
686684 private var workId: JsonField <String >? = null
687685 private var income: JsonField <Income > = JsonMissing .of()
688686 private var incomeHistory: JsonField <MutableList <Income ?>>? = null
687+ private var sourceId: JsonField <String > = JsonMissing .of()
689688 private var additionalProperties: MutableMap <String , JsonValue > = mutableMapOf ()
690689
691690 @JvmSynthetic
@@ -704,12 +703,12 @@ private constructor(
704703 location = unionMember0.location
705704 manager = unionMember0.manager
706705 middleName = unionMember0.middleName
707- sourceId = unionMember0.sourceId
708706 startDate = unionMember0.startDate
709707 title = unionMember0.title
710708 workId = unionMember0.workId
711709 income = unionMember0.income
712710 incomeHistory = unionMember0.incomeHistory.map { it.toMutableList() }
711+ sourceId = unionMember0.sourceId
713712 additionalProperties = unionMember0.additionalProperties.toMutableMap()
714713 }
715714
@@ -962,21 +961,6 @@ private constructor(
962961 */
963962 fun middleName (middleName : JsonField <String >) = apply { this .middleName = middleName }
964963
965- /* * The source system's unique employment identifier for this individual */
966- fun sourceId (sourceId : String? ) = sourceId(JsonField .ofNullable(sourceId))
967-
968- /* * Alias for calling [Builder.sourceId] with `sourceId.orElse(null)`. */
969- fun sourceId (sourceId : Optional <String >) = sourceId(sourceId.getOrNull())
970-
971- /* *
972- * Sets [Builder.sourceId] to an arbitrary JSON value.
973- *
974- * You should usually call [Builder.sourceId] with a well-typed [String] value instead.
975- * This method is primarily for setting the field to an undocumented or not yet
976- * supported value.
977- */
978- fun sourceId (sourceId : JsonField <String >) = apply { this .sourceId = sourceId }
979-
980964 fun startDate (startDate : String? ) = startDate(JsonField .ofNullable(startDate))
981965
982966 /* * Alias for calling [Builder.startDate] with `startDate.orElse(null)`. */
@@ -1074,6 +1058,21 @@ private constructor(
10741058 }
10751059 }
10761060
1061+ /* * The source system's unique employment identifier for this individual */
1062+ fun sourceId (sourceId : String? ) = sourceId(JsonField .ofNullable(sourceId))
1063+
1064+ /* * Alias for calling [Builder.sourceId] with `sourceId.orElse(null)`. */
1065+ fun sourceId (sourceId : Optional <String >) = sourceId(sourceId.getOrNull())
1066+
1067+ /* *
1068+ * Sets [Builder.sourceId] to an arbitrary JSON value.
1069+ *
1070+ * You should usually call [Builder.sourceId] with a well-typed [String] value instead.
1071+ * This method is primarily for setting the field to an undocumented or not yet
1072+ * supported value.
1073+ */
1074+ fun sourceId (sourceId : JsonField <String >) = apply { this .sourceId = sourceId }
1075+
10771076 fun additionalProperties (additionalProperties : Map <String , JsonValue >) = apply {
10781077 this .additionalProperties.clear()
10791078 putAllAdditionalProperties(additionalProperties)
@@ -1114,7 +1113,6 @@ private constructor(
11141113 * .location()
11151114 * .manager()
11161115 * .middleName()
1117- * .sourceId()
11181116 * .startDate()
11191117 * .title()
11201118 * .workId()
@@ -1138,12 +1136,12 @@ private constructor(
11381136 checkRequired(" location" , location),
11391137 checkRequired(" manager" , manager),
11401138 checkRequired(" middleName" , middleName),
1141- checkRequired(" sourceId" , sourceId),
11421139 checkRequired(" startDate" , startDate),
11431140 checkRequired(" title" , title),
11441141 checkRequired(" workId" , workId),
11451142 income,
11461143 (incomeHistory ? : JsonMissing .of()).map { it.toImmutable() },
1144+ sourceId,
11471145 additionalProperties.toMutableMap(),
11481146 )
11491147 }
@@ -1169,12 +1167,12 @@ private constructor(
11691167 location().ifPresent { it.validate() }
11701168 manager().ifPresent { it.validate() }
11711169 middleName()
1172- sourceId()
11731170 startDate()
11741171 title()
11751172 workId()
11761173 income().ifPresent { it.validate() }
11771174 incomeHistory().ifPresent { it.forEach { it?.validate() } }
1175+ sourceId()
11781176 validated = true
11791177 }
11801178
@@ -1208,12 +1206,13 @@ private constructor(
12081206 (location.asKnown().getOrNull()?.validity() ? : 0 ) +
12091207 (manager.asKnown().getOrNull()?.validity() ? : 0 ) +
12101208 (if (middleName.asKnown().isPresent) 1 else 0 ) +
1211- (if (sourceId.asKnown().isPresent) 1 else 0 ) +
12121209 (if (startDate.asKnown().isPresent) 1 else 0 ) +
12131210 (if (title.asKnown().isPresent) 1 else 0 ) +
12141211 (if (workId.asKnown().isPresent) 1 else 0 ) +
12151212 (income.asKnown().getOrNull()?.validity() ? : 0 ) +
1216- (incomeHistory.asKnown().getOrNull()?.sumOf { (it?.validity() ? : 0 ).toInt() } ? : 0 )
1213+ (incomeHistory.asKnown().getOrNull()?.sumOf { (it?.validity() ? : 0 ).toInt() }
1214+ ? : 0 ) +
1215+ (if (sourceId.asKnown().isPresent) 1 else 0 )
12171216
12181217 class CustomField
12191218 private constructor (
@@ -2637,17 +2636,17 @@ private constructor(
26372636 return true
26382637 }
26392638
2640- return /* spotless:off */ other is UnionMember0 && id == other.id && classCode == other.classCode && customFields == other.customFields && department == other.department && employment == other.employment && employmentStatus == other.employmentStatus && endDate == other.endDate && firstName == other.firstName && isActive == other.isActive && lastName == other.lastName && latestRehireDate == other.latestRehireDate && location == other.location && manager == other.manager && middleName == other.middleName && sourceId == other.sourceId && startDate == other.startDate && title == other.title && workId == other.workId && income == other.income && incomeHistory == other.incomeHistory && additionalProperties == other.additionalProperties /* spotless:on */
2639+ return /* spotless:off */ other is UnionMember0 && id == other.id && classCode == other.classCode && customFields == other.customFields && department == other.department && employment == other.employment && employmentStatus == other.employmentStatus && endDate == other.endDate && firstName == other.firstName && isActive == other.isActive && lastName == other.lastName && latestRehireDate == other.latestRehireDate && location == other.location && manager == other.manager && middleName == other.middleName && startDate == other.startDate && title == other.title && workId == other.workId && income == other.income && incomeHistory == other.incomeHistory && sourceId == other.sourceId && additionalProperties == other.additionalProperties /* spotless:on */
26412640 }
26422641
26432642 /* spotless:off */
2644- private val hashCode: Int by lazy { Objects .hash(id, classCode, customFields, department, employment, employmentStatus, endDate, firstName, isActive, lastName, latestRehireDate, location, manager, middleName, sourceId, startDate, title, workId, income, incomeHistory, additionalProperties) }
2643+ private val hashCode: Int by lazy { Objects .hash(id, classCode, customFields, department, employment, employmentStatus, endDate, firstName, isActive, lastName, latestRehireDate, location, manager, middleName, startDate, title, workId, income, incomeHistory, sourceId , additionalProperties) }
26452644 /* spotless:on */
26462645
26472646 override fun hashCode (): Int = hashCode
26482647
26492648 override fun toString () =
2650- " UnionMember0{id=$id , classCode=$classCode , customFields=$customFields , department=$department , employment=$employment , employmentStatus=$employmentStatus , endDate=$endDate , firstName=$firstName , isActive=$isActive , lastName=$lastName , latestRehireDate=$latestRehireDate , location=$location , manager=$manager , middleName=$middleName , sourceId= $sourceId , startDate=$startDate , title=$title , workId=$workId , income=$income , incomeHistory=$incomeHistory , additionalProperties=$additionalProperties }"
2649+ " UnionMember0{id=$id , classCode=$classCode , customFields=$customFields , department=$department , employment=$employment , employmentStatus=$employmentStatus , endDate=$endDate , firstName=$firstName , isActive=$isActive , lastName=$lastName , latestRehireDate=$latestRehireDate , location=$location , manager=$manager , middleName=$middleName , startDate=$startDate , title=$title , workId=$workId , income=$income , incomeHistory=$incomeHistory , sourceId= $sourceId , additionalProperties=$additionalProperties }"
26512650 }
26522651
26532652 class BatchError
0 commit comments