@@ -67,7 +67,8 @@ private constructor(
6767 fun employment (): Optional <Employment > = body.employment()
6868
6969 /* *
70- * The detailed employment status of the individual.
70+ * The detailed employment status of the individual. Available options: `active`, `deceased`,
71+ * `leave`, `onboarding`, `prehire`, `retired`, `terminated`.
7172 *
7273 * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if the
7374 * server responded with an unexpected value).
@@ -373,10 +374,14 @@ private constructor(
373374 * Custom fields for the individual. These are fields which are defined by the employer in
374375 * the system. Custom fields are not currently supported for assisted connections.
375376 */
376- fun customFields (customFields : List <CustomField >) = apply {
377+ fun customFields (customFields : List <CustomField >? ) = apply {
377378 body.customFields(customFields)
378379 }
379380
381+ /* * Alias for calling [Builder.customFields] with `customFields.orElse(null)`. */
382+ fun customFields (customFields : Optional <List <CustomField >>) =
383+ customFields(customFields.getOrNull())
384+
380385 /* *
381386 * Sets [Builder.customFields] to an arbitrary JSON value.
382387 *
@@ -425,7 +430,10 @@ private constructor(
425430 */
426431 fun employment (employment : JsonField <Employment >) = apply { body.employment(employment) }
427432
428- /* * The detailed employment status of the individual. */
433+ /* *
434+ * The detailed employment status of the individual. Available options: `active`,
435+ * `deceased`, `leave`, `onboarding`, `prehire`, `retired`, `terminated`.
436+ */
429437 fun employmentStatus (employmentStatus : EmploymentStatus ? ) = apply {
430438 body.employmentStatus(employmentStatus)
431439 }
@@ -617,7 +625,10 @@ private constructor(
617625 fun middleName (middleName : JsonField <String >) = apply { body.middleName(middleName) }
618626
619627 /* * The source system's unique employment identifier for this individual */
620- fun sourceId (sourceId : String ) = apply { body.sourceId(sourceId) }
628+ fun sourceId (sourceId : String? ) = apply { body.sourceId(sourceId) }
629+
630+ /* * Alias for calling [Builder.sourceId] with `sourceId.orElse(null)`. */
631+ fun sourceId (sourceId : Optional <String >) = sourceId(sourceId.getOrNull())
621632
622633 /* *
623634 * Sets [Builder.sourceId] to an arbitrary JSON value.
@@ -925,7 +936,8 @@ private constructor(
925936 fun employment (): Optional <Employment > = employment.getOptional(" employment" )
926937
927938 /* *
928- * The detailed employment status of the individual.
939+ * The detailed employment status of the individual. Available options: `active`,
940+ * `deceased`, `leave`, `onboarding`, `prehire`, `retired`, `terminated`.
929941 *
930942 * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if the
931943 * server responded with an unexpected value).
@@ -1259,8 +1271,12 @@ private constructor(
12591271 * Custom fields for the individual. These are fields which are defined by the employer
12601272 * in the system. Custom fields are not currently supported for assisted connections.
12611273 */
1262- fun customFields (customFields : List <CustomField >) =
1263- customFields(JsonField .of(customFields))
1274+ fun customFields (customFields : List <CustomField >? ) =
1275+ customFields(JsonField .ofNullable(customFields))
1276+
1277+ /* * Alias for calling [Builder.customFields] with `customFields.orElse(null)`. */
1278+ fun customFields (customFields : Optional <List <CustomField >>) =
1279+ customFields(customFields.getOrNull())
12641280
12651281 /* *
12661282 * Sets [Builder.customFields] to an arbitrary JSON value.
@@ -1319,7 +1335,10 @@ private constructor(
13191335 this .employment = employment
13201336 }
13211337
1322- /* * The detailed employment status of the individual. */
1338+ /* *
1339+ * The detailed employment status of the individual. Available options: `active`,
1340+ * `deceased`, `leave`, `onboarding`, `prehire`, `retired`, `terminated`.
1341+ */
13231342 fun employmentStatus (employmentStatus : EmploymentStatus ? ) =
13241343 employmentStatus(JsonField .ofNullable(employmentStatus))
13251344
@@ -1521,7 +1540,10 @@ private constructor(
15211540 fun middleName (middleName : JsonField <String >) = apply { this .middleName = middleName }
15221541
15231542 /* * The source system's unique employment identifier for this individual */
1524- fun sourceId (sourceId : String ) = sourceId(JsonField .of(sourceId))
1543+ fun sourceId (sourceId : String? ) = sourceId(JsonField .ofNullable(sourceId))
1544+
1545+ /* * Alias for calling [Builder.sourceId] with `sourceId.orElse(null)`. */
1546+ fun sourceId (sourceId : Optional <String >) = sourceId(sourceId.getOrNull())
15251547
15261548 /* *
15271549 * Sets [Builder.sourceId] to an arbitrary JSON value.
@@ -2455,7 +2477,10 @@ private constructor(
24552477 " Employment{subtype=$subtype , type=$type , additionalProperties=$additionalProperties }"
24562478 }
24572479
2458- /* * The detailed employment status of the individual. */
2480+ /* *
2481+ * The detailed employment status of the individual. Available options: `active`, `deceased`,
2482+ * `leave`, `onboarding`, `prehire`, `retired`, `terminated`.
2483+ */
24592484 class EmploymentStatus @JsonCreator private constructor(private val value : JsonField <String >) :
24602485 Enum {
24612486
0 commit comments