com.tryfinch.api.models.Provider.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of finch-java-core Show documentation
Show all versions of finch-java-core Show documentation
The Finch HRIS API provides a unified way to connect to a multitide of HRIS
systems. The API requires an access token issued by Finch.
By default, Organization and Payroll requests use Finch's
[Data Syncs](/developer-resources/Data-Syncs). If a request is made before the
initial sync has completed, Finch will request data live from the provider. The
latency on live requests may range from seconds to minutes depending on the
provider and batch size. For automated integrations, Deductions requests (both
read and write) are always made live to the provider. Latencies may range from
seconds to minutes depending on the provider and batch size.
Employer products are specified by the product parameter, a space-separated list
of products that your application requests from an employer authenticating
through Finch Connect. Valid product names are—
- `company`: Read basic company data
- `directory`: Read company directory and organization structure
- `individual`: Read individual data, excluding income and employment data
- `employment`: Read individual employment and income data
- `payment`: Read payroll and contractor related payments by the company
- `pay_statement`: Read detailed pay statements for each individual
- `benefits`: Create and manage deductions and contributions and enrollment for
an employer
[![Open in Postman](https://run.pstmn.io/button.svg)](https://god.gw.postman.com/run-collection/21027137-08db0929-883d-4094-a9ce-dbf5a9bee4a4?action=collection%2Ffork&collection-url=entityId%3D21027137-08db0929-883d-4094-a9ce-dbf5a9bee4a4%26entityType%3Dcollection%26workspaceId%3D1edf19bc-e0a8-41e9-ac55-481a4b50790b)
// File generated from our OpenAPI spec by Stainless.
package com.tryfinch.api.models
import com.fasterxml.jackson.annotation.JsonAnyGetter
import com.fasterxml.jackson.annotation.JsonAnySetter
import com.fasterxml.jackson.annotation.JsonCreator
import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.databind.annotation.JsonDeserialize
import com.tryfinch.api.core.Enum
import com.tryfinch.api.core.ExcludeMissing
import com.tryfinch.api.core.JsonField
import com.tryfinch.api.core.JsonMissing
import com.tryfinch.api.core.JsonValue
import com.tryfinch.api.core.NoAutoDetect
import com.tryfinch.api.core.toUnmodifiable
import com.tryfinch.api.errors.FinchInvalidDataException
import java.util.Objects
import java.util.Optional
@JsonDeserialize(builder = Provider.Builder::class)
@NoAutoDetect
class Provider
private constructor(
private val id: JsonField,
private val displayName: JsonField,
private val products: JsonField>,
private val icon: JsonField,
private val logo: JsonField,
private val mfaRequired: JsonField,
private val primaryColor: JsonField,
private val manual: JsonField,
private val beta: JsonField,
private val authenticationMethods: JsonField>,
private val additionalProperties: Map,
) {
private var validated: Boolean = false
private var hashCode: Int = 0
/** The id of the payroll provider used in Connect. */
fun id(): Optional = Optional.ofNullable(id.getNullable("id"))
/** The display name of the payroll provider. */
fun displayName(): Optional =
Optional.ofNullable(displayName.getNullable("display_name"))
/** The list of Finch products supported on this payroll provider. */
fun products(): Optional> = Optional.ofNullable(products.getNullable("products"))
/** The url to the official icon of the payroll provider. */
fun icon(): Optional = Optional.ofNullable(icon.getNullable("icon"))
/** The url to the official logo of the payroll provider. */
fun logo(): Optional = Optional.ofNullable(logo.getNullable("logo"))
/** whether MFA is required for the provider. */
fun mfaRequired(): Optional =
Optional.ofNullable(mfaRequired.getNullable("mfa_required"))
/** The hex code for the primary color of the payroll provider. */
fun primaryColor(): Optional =
Optional.ofNullable(primaryColor.getNullable("primary_color"))
/**
* [DEPRECATED] Whether the Finch integration with this provider uses the Assisted Connect Flow
* by default. This field is now deprecated. Please check for a `type` of `assisted` in the
* `authentication_methods` field instead.
*/
fun manual(): Optional = Optional.ofNullable(manual.getNullable("manual"))
/** `true` if the integration is in a beta state, `false` otherwise */
fun beta(): Optional = Optional.ofNullable(beta.getNullable("beta"))
/** The list of authentication methods supported by the provider. */
fun authenticationMethods(): Optional> =
Optional.ofNullable(authenticationMethods.getNullable("authentication_methods"))
/** The id of the payroll provider used in Connect. */
@JsonProperty("id") @ExcludeMissing fun _id() = id
/** The display name of the payroll provider. */
@JsonProperty("display_name") @ExcludeMissing fun _displayName() = displayName
/** The list of Finch products supported on this payroll provider. */
@JsonProperty("products") @ExcludeMissing fun _products() = products
/** The url to the official icon of the payroll provider. */
@JsonProperty("icon") @ExcludeMissing fun _icon() = icon
/** The url to the official logo of the payroll provider. */
@JsonProperty("logo") @ExcludeMissing fun _logo() = logo
/** whether MFA is required for the provider. */
@JsonProperty("mfa_required") @ExcludeMissing fun _mfaRequired() = mfaRequired
/** The hex code for the primary color of the payroll provider. */
@JsonProperty("primary_color") @ExcludeMissing fun _primaryColor() = primaryColor
/**
* [DEPRECATED] Whether the Finch integration with this provider uses the Assisted Connect Flow
* by default. This field is now deprecated. Please check for a `type` of `assisted` in the
* `authentication_methods` field instead.
*/
@JsonProperty("manual") @ExcludeMissing fun _manual() = manual
/** `true` if the integration is in a beta state, `false` otherwise */
@JsonProperty("beta") @ExcludeMissing fun _beta() = beta
/** The list of authentication methods supported by the provider. */
@JsonProperty("authentication_methods")
@ExcludeMissing
fun _authenticationMethods() = authenticationMethods
@JsonAnyGetter
@ExcludeMissing
fun _additionalProperties(): Map = additionalProperties
fun validate(): Provider = apply {
if (!validated) {
id()
displayName()
products()
icon()
logo()
mfaRequired()
primaryColor()
manual()
beta()
authenticationMethods().map { it.forEach { it.validate() } }
validated = true
}
}
fun toBuilder() = Builder().from(this)
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}
return other is Provider &&
this.id == other.id &&
this.displayName == other.displayName &&
this.products == other.products &&
this.icon == other.icon &&
this.logo == other.logo &&
this.mfaRequired == other.mfaRequired &&
this.primaryColor == other.primaryColor &&
this.manual == other.manual &&
this.beta == other.beta &&
this.authenticationMethods == other.authenticationMethods &&
this.additionalProperties == other.additionalProperties
}
override fun hashCode(): Int {
if (hashCode == 0) {
hashCode =
Objects.hash(
id,
displayName,
products,
icon,
logo,
mfaRequired,
primaryColor,
manual,
beta,
authenticationMethods,
additionalProperties,
)
}
return hashCode
}
override fun toString() =
"Provider{id=$id, displayName=$displayName, products=$products, icon=$icon, logo=$logo, mfaRequired=$mfaRequired, primaryColor=$primaryColor, manual=$manual, beta=$beta, authenticationMethods=$authenticationMethods, additionalProperties=$additionalProperties}"
companion object {
@JvmStatic fun builder() = Builder()
}
class Builder {
private var id: JsonField = JsonMissing.of()
private var displayName: JsonField = JsonMissing.of()
private var products: JsonField> = JsonMissing.of()
private var icon: JsonField = JsonMissing.of()
private var logo: JsonField = JsonMissing.of()
private var mfaRequired: JsonField = JsonMissing.of()
private var primaryColor: JsonField = JsonMissing.of()
private var manual: JsonField = JsonMissing.of()
private var beta: JsonField = JsonMissing.of()
private var authenticationMethods: JsonField> = JsonMissing.of()
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
internal fun from(provider: Provider) = apply {
this.id = provider.id
this.displayName = provider.displayName
this.products = provider.products
this.icon = provider.icon
this.logo = provider.logo
this.mfaRequired = provider.mfaRequired
this.primaryColor = provider.primaryColor
this.manual = provider.manual
this.beta = provider.beta
this.authenticationMethods = provider.authenticationMethods
additionalProperties(provider.additionalProperties)
}
/** The id of the payroll provider used in Connect. */
fun id(id: String) = id(JsonField.of(id))
/** The id of the payroll provider used in Connect. */
@JsonProperty("id") @ExcludeMissing fun id(id: JsonField) = apply { this.id = id }
/** The display name of the payroll provider. */
fun displayName(displayName: String) = displayName(JsonField.of(displayName))
/** The display name of the payroll provider. */
@JsonProperty("display_name")
@ExcludeMissing
fun displayName(displayName: JsonField) = apply { this.displayName = displayName }
/** The list of Finch products supported on this payroll provider. */
fun products(products: List) = products(JsonField.of(products))
/** The list of Finch products supported on this payroll provider. */
@JsonProperty("products")
@ExcludeMissing
fun products(products: JsonField>) = apply { this.products = products }
/** The url to the official icon of the payroll provider. */
fun icon(icon: String) = icon(JsonField.of(icon))
/** The url to the official icon of the payroll provider. */
@JsonProperty("icon")
@ExcludeMissing
fun icon(icon: JsonField) = apply { this.icon = icon }
/** The url to the official logo of the payroll provider. */
fun logo(logo: String) = logo(JsonField.of(logo))
/** The url to the official logo of the payroll provider. */
@JsonProperty("logo")
@ExcludeMissing
fun logo(logo: JsonField) = apply { this.logo = logo }
/** whether MFA is required for the provider. */
fun mfaRequired(mfaRequired: Boolean) = mfaRequired(JsonField.of(mfaRequired))
/** whether MFA is required for the provider. */
@JsonProperty("mfa_required")
@ExcludeMissing
fun mfaRequired(mfaRequired: JsonField) = apply { this.mfaRequired = mfaRequired }
/** The hex code for the primary color of the payroll provider. */
fun primaryColor(primaryColor: String) = primaryColor(JsonField.of(primaryColor))
/** The hex code for the primary color of the payroll provider. */
@JsonProperty("primary_color")
@ExcludeMissing
fun primaryColor(primaryColor: JsonField) = apply {
this.primaryColor = primaryColor
}
/**
* [DEPRECATED] Whether the Finch integration with this provider uses the Assisted Connect
* Flow by default. This field is now deprecated. Please check for a `type` of `assisted` in
* the `authentication_methods` field instead.
*/
fun manual(manual: Boolean) = manual(JsonField.of(manual))
/**
* [DEPRECATED] Whether the Finch integration with this provider uses the Assisted Connect
* Flow by default. This field is now deprecated. Please check for a `type` of `assisted` in
* the `authentication_methods` field instead.
*/
@JsonProperty("manual")
@ExcludeMissing
fun manual(manual: JsonField) = apply { this.manual = manual }
/** `true` if the integration is in a beta state, `false` otherwise */
fun beta(beta: Boolean) = beta(JsonField.of(beta))
/** `true` if the integration is in a beta state, `false` otherwise */
@JsonProperty("beta")
@ExcludeMissing
fun beta(beta: JsonField) = apply { this.beta = beta }
/** The list of authentication methods supported by the provider. */
fun authenticationMethods(authenticationMethods: List) =
authenticationMethods(JsonField.of(authenticationMethods))
/** The list of authentication methods supported by the provider. */
@JsonProperty("authentication_methods")
@ExcludeMissing
fun authenticationMethods(authenticationMethods: JsonField>) =
apply {
this.authenticationMethods = authenticationMethods
}
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
this.additionalProperties.putAll(additionalProperties)
}
@JsonAnySetter
fun putAdditionalProperty(key: String, value: JsonValue) = apply {
this.additionalProperties.put(key, value)
}
fun putAllAdditionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.putAll(additionalProperties)
}
fun build(): Provider =
Provider(
id,
displayName,
products.map { it.toUnmodifiable() },
icon,
logo,
mfaRequired,
primaryColor,
manual,
beta,
authenticationMethods.map { it.toUnmodifiable() },
additionalProperties.toUnmodifiable(),
)
}
@JsonDeserialize(builder = AuthenticationMethod.Builder::class)
@NoAutoDetect
class AuthenticationMethod
private constructor(
private val type: JsonField,
private val benefitsSupport: JsonField,
private val supportedFields: JsonField,
private val additionalProperties: Map,
) {
private var validated: Boolean = false
private var hashCode: Int = 0
/** The type of authentication method. */
fun type(): Optional = Optional.ofNullable(type.getNullable("type"))
/**
* Each benefit type and their supported features. If the benefit type is not supported, the
* property will be null
*/
fun benefitsSupport(): Optional =
Optional.ofNullable(benefitsSupport.getNullable("benefits_support"))
/** The supported data fields returned by our HR and payroll endpoints */
fun supportedFields(): Optional =
Optional.ofNullable(supportedFields.getNullable("supported_fields"))
/** The type of authentication method. */
@JsonProperty("type") @ExcludeMissing fun _type() = type
/**
* Each benefit type and their supported features. If the benefit type is not supported, the
* property will be null
*/
@JsonProperty("benefits_support") @ExcludeMissing fun _benefitsSupport() = benefitsSupport
/** The supported data fields returned by our HR and payroll endpoints */
@JsonProperty("supported_fields") @ExcludeMissing fun _supportedFields() = supportedFields
@JsonAnyGetter
@ExcludeMissing
fun _additionalProperties(): Map = additionalProperties
fun validate(): AuthenticationMethod = apply {
if (!validated) {
type()
benefitsSupport().map { it.validate() }
supportedFields().map { it.validate() }
validated = true
}
}
fun toBuilder() = Builder().from(this)
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}
return other is AuthenticationMethod &&
this.type == other.type &&
this.benefitsSupport == other.benefitsSupport &&
this.supportedFields == other.supportedFields &&
this.additionalProperties == other.additionalProperties
}
override fun hashCode(): Int {
if (hashCode == 0) {
hashCode =
Objects.hash(
type,
benefitsSupport,
supportedFields,
additionalProperties,
)
}
return hashCode
}
override fun toString() =
"AuthenticationMethod{type=$type, benefitsSupport=$benefitsSupport, supportedFields=$supportedFields, additionalProperties=$additionalProperties}"
companion object {
@JvmStatic fun builder() = Builder()
}
class Builder {
private var type: JsonField = JsonMissing.of()
private var benefitsSupport: JsonField = JsonMissing.of()
private var supportedFields: JsonField = JsonMissing.of()
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
internal fun from(authenticationMethod: AuthenticationMethod) = apply {
this.type = authenticationMethod.type
this.benefitsSupport = authenticationMethod.benefitsSupport
this.supportedFields = authenticationMethod.supportedFields
additionalProperties(authenticationMethod.additionalProperties)
}
/** The type of authentication method. */
fun type(type: Type) = type(JsonField.of(type))
/** The type of authentication method. */
@JsonProperty("type")
@ExcludeMissing
fun type(type: JsonField) = apply { this.type = type }
/**
* Each benefit type and their supported features. If the benefit type is not supported,
* the property will be null
*/
fun benefitsSupport(benefitsSupport: BenefitsSupport) =
benefitsSupport(JsonField.of(benefitsSupport))
/**
* Each benefit type and their supported features. If the benefit type is not supported,
* the property will be null
*/
@JsonProperty("benefits_support")
@ExcludeMissing
fun benefitsSupport(benefitsSupport: JsonField) = apply {
this.benefitsSupport = benefitsSupport
}
/** The supported data fields returned by our HR and payroll endpoints */
fun supportedFields(supportedFields: SupportedFields) =
supportedFields(JsonField.of(supportedFields))
/** The supported data fields returned by our HR and payroll endpoints */
@JsonProperty("supported_fields")
@ExcludeMissing
fun supportedFields(supportedFields: JsonField) = apply {
this.supportedFields = supportedFields
}
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
this.additionalProperties.putAll(additionalProperties)
}
@JsonAnySetter
fun putAdditionalProperty(key: String, value: JsonValue) = apply {
this.additionalProperties.put(key, value)
}
fun putAllAdditionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.putAll(additionalProperties)
}
fun build(): AuthenticationMethod =
AuthenticationMethod(
type,
benefitsSupport,
supportedFields,
additionalProperties.toUnmodifiable(),
)
}
/** The supported data fields returned by our HR and payroll endpoints */
@JsonDeserialize(builder = SupportedFields.Builder::class)
@NoAutoDetect
class SupportedFields
private constructor(
private val company: JsonField,
private val directory: JsonField,
private val individual: JsonField,
private val employment: JsonField,
private val payment: JsonField,
private val payStatement: JsonField,
private val additionalProperties: Map,
) {
private var validated: Boolean = false
private var hashCode: Int = 0
fun company(): Optional =
Optional.ofNullable(company.getNullable("company"))
fun directory(): Optional =
Optional.ofNullable(directory.getNullable("directory"))
fun individual(): Optional =
Optional.ofNullable(individual.getNullable("individual"))
fun employment(): Optional =
Optional.ofNullable(employment.getNullable("employment"))
fun payment(): Optional =
Optional.ofNullable(payment.getNullable("payment"))
fun payStatement(): Optional =
Optional.ofNullable(payStatement.getNullable("pay_statement"))
@JsonProperty("company") @ExcludeMissing fun _company() = company
@JsonProperty("directory") @ExcludeMissing fun _directory() = directory
@JsonProperty("individual") @ExcludeMissing fun _individual() = individual
@JsonProperty("employment") @ExcludeMissing fun _employment() = employment
@JsonProperty("payment") @ExcludeMissing fun _payment() = payment
@JsonProperty("pay_statement") @ExcludeMissing fun _payStatement() = payStatement
@JsonAnyGetter
@ExcludeMissing
fun _additionalProperties(): Map = additionalProperties
fun validate(): SupportedFields = apply {
if (!validated) {
company().map { it.validate() }
directory().map { it.validate() }
individual().map { it.validate() }
employment().map { it.validate() }
payment().map { it.validate() }
payStatement().map { it.validate() }
validated = true
}
}
fun toBuilder() = Builder().from(this)
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}
return other is SupportedFields &&
this.company == other.company &&
this.directory == other.directory &&
this.individual == other.individual &&
this.employment == other.employment &&
this.payment == other.payment &&
this.payStatement == other.payStatement &&
this.additionalProperties == other.additionalProperties
}
override fun hashCode(): Int {
if (hashCode == 0) {
hashCode =
Objects.hash(
company,
directory,
individual,
employment,
payment,
payStatement,
additionalProperties,
)
}
return hashCode
}
override fun toString() =
"SupportedFields{company=$company, directory=$directory, individual=$individual, employment=$employment, payment=$payment, payStatement=$payStatement, additionalProperties=$additionalProperties}"
companion object {
@JvmStatic fun builder() = Builder()
}
class Builder {
private var company: JsonField = JsonMissing.of()
private var directory: JsonField = JsonMissing.of()
private var individual: JsonField = JsonMissing.of()
private var employment: JsonField = JsonMissing.of()
private var payment: JsonField = JsonMissing.of()
private var payStatement: JsonField = JsonMissing.of()
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
internal fun from(supportedFields: SupportedFields) = apply {
this.company = supportedFields.company
this.directory = supportedFields.directory
this.individual = supportedFields.individual
this.employment = supportedFields.employment
this.payment = supportedFields.payment
this.payStatement = supportedFields.payStatement
additionalProperties(supportedFields.additionalProperties)
}
fun company(company: SupportedCompanyFields) = company(JsonField.of(company))
@JsonProperty("company")
@ExcludeMissing
fun company(company: JsonField) = apply {
this.company = company
}
fun directory(directory: SupportedDirectoryFields) =
directory(JsonField.of(directory))
@JsonProperty("directory")
@ExcludeMissing
fun directory(directory: JsonField) = apply {
this.directory = directory
}
fun individual(individual: SupportedIndividualFields) =
individual(JsonField.of(individual))
@JsonProperty("individual")
@ExcludeMissing
fun individual(individual: JsonField) = apply {
this.individual = individual
}
fun employment(employment: SupportedEmploymentFields) =
employment(JsonField.of(employment))
@JsonProperty("employment")
@ExcludeMissing
fun employment(employment: JsonField) = apply {
this.employment = employment
}
fun payment(payment: SupportedPaymentFields) = payment(JsonField.of(payment))
@JsonProperty("payment")
@ExcludeMissing
fun payment(payment: JsonField) = apply {
this.payment = payment
}
fun payStatement(payStatement: SupportedPayStatementFields) =
payStatement(JsonField.of(payStatement))
@JsonProperty("pay_statement")
@ExcludeMissing
fun payStatement(payStatement: JsonField) = apply {
this.payStatement = payStatement
}
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
this.additionalProperties.putAll(additionalProperties)
}
@JsonAnySetter
fun putAdditionalProperty(key: String, value: JsonValue) = apply {
this.additionalProperties.put(key, value)
}
fun putAllAdditionalProperties(additionalProperties: Map) =
apply {
this.additionalProperties.putAll(additionalProperties)
}
fun build(): SupportedFields =
SupportedFields(
company,
directory,
individual,
employment,
payment,
payStatement,
additionalProperties.toUnmodifiable(),
)
}
@JsonDeserialize(builder = SupportedCompanyFields.Builder::class)
@NoAutoDetect
class SupportedCompanyFields
private constructor(
private val id: JsonField,
private val legalName: JsonField,
private val entity: JsonField,
private val primaryEmail: JsonField,
private val primaryPhoneNumber: JsonField,
private val ein: JsonField,
private val accounts: JsonField,
private val departments: JsonField,
private val locations: JsonField,
private val additionalProperties: Map,
) {
private var validated: Boolean = false
private var hashCode: Int = 0
fun id(): Optional = Optional.ofNullable(id.getNullable("id"))
fun legalName(): Optional =
Optional.ofNullable(legalName.getNullable("legal_name"))
fun entity(): Optional = Optional.ofNullable(entity.getNullable("entity"))
fun primaryEmail(): Optional =
Optional.ofNullable(primaryEmail.getNullable("primary_email"))
fun primaryPhoneNumber(): Optional =
Optional.ofNullable(primaryPhoneNumber.getNullable("primary_phone_number"))
fun ein(): Optional = Optional.ofNullable(ein.getNullable("ein"))
fun accounts(): Optional =
Optional.ofNullable(accounts.getNullable("accounts"))
fun departments(): Optional =
Optional.ofNullable(departments.getNullable("departments"))
fun locations(): Optional =
Optional.ofNullable(locations.getNullable("locations"))
@JsonProperty("id") @ExcludeMissing fun _id() = id
@JsonProperty("legal_name") @ExcludeMissing fun _legalName() = legalName
@JsonProperty("entity") @ExcludeMissing fun _entity() = entity
@JsonProperty("primary_email") @ExcludeMissing fun _primaryEmail() = primaryEmail
@JsonProperty("primary_phone_number")
@ExcludeMissing
fun _primaryPhoneNumber() = primaryPhoneNumber
@JsonProperty("ein") @ExcludeMissing fun _ein() = ein
@JsonProperty("accounts") @ExcludeMissing fun _accounts() = accounts
@JsonProperty("departments") @ExcludeMissing fun _departments() = departments
@JsonProperty("locations") @ExcludeMissing fun _locations() = locations
@JsonAnyGetter
@ExcludeMissing
fun _additionalProperties(): Map = additionalProperties
fun validate(): SupportedCompanyFields = apply {
if (!validated) {
id()
legalName()
entity().map { it.validate() }
primaryEmail()
primaryPhoneNumber()
ein()
accounts().map { it.validate() }
departments().map { it.validate() }
locations().map { it.validate() }
validated = true
}
}
fun toBuilder() = Builder().from(this)
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}
return other is SupportedCompanyFields &&
this.id == other.id &&
this.legalName == other.legalName &&
this.entity == other.entity &&
this.primaryEmail == other.primaryEmail &&
this.primaryPhoneNumber == other.primaryPhoneNumber &&
this.ein == other.ein &&
this.accounts == other.accounts &&
this.departments == other.departments &&
this.locations == other.locations &&
this.additionalProperties == other.additionalProperties
}
override fun hashCode(): Int {
if (hashCode == 0) {
hashCode =
Objects.hash(
id,
legalName,
entity,
primaryEmail,
primaryPhoneNumber,
ein,
accounts,
departments,
locations,
additionalProperties,
)
}
return hashCode
}
override fun toString() =
"SupportedCompanyFields{id=$id, legalName=$legalName, entity=$entity, primaryEmail=$primaryEmail, primaryPhoneNumber=$primaryPhoneNumber, ein=$ein, accounts=$accounts, departments=$departments, locations=$locations, additionalProperties=$additionalProperties}"
companion object {
@JvmStatic fun builder() = Builder()
}
class Builder {
private var id: JsonField = JsonMissing.of()
private var legalName: JsonField = JsonMissing.of()
private var entity: JsonField = JsonMissing.of()
private var primaryEmail: JsonField = JsonMissing.of()
private var primaryPhoneNumber: JsonField = JsonMissing.of()
private var ein: JsonField = JsonMissing.of()
private var accounts: JsonField = JsonMissing.of()
private var departments: JsonField = JsonMissing.of()
private var locations: JsonField = JsonMissing.of()
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
internal fun from(supportedCompanyFields: SupportedCompanyFields) = apply {
this.id = supportedCompanyFields.id
this.legalName = supportedCompanyFields.legalName
this.entity = supportedCompanyFields.entity
this.primaryEmail = supportedCompanyFields.primaryEmail
this.primaryPhoneNumber = supportedCompanyFields.primaryPhoneNumber
this.ein = supportedCompanyFields.ein
this.accounts = supportedCompanyFields.accounts
this.departments = supportedCompanyFields.departments
this.locations = supportedCompanyFields.locations
additionalProperties(supportedCompanyFields.additionalProperties)
}
fun id(id: Boolean) = id(JsonField.of(id))
@JsonProperty("id")
@ExcludeMissing
fun id(id: JsonField) = apply { this.id = id }
fun legalName(legalName: Boolean) = legalName(JsonField.of(legalName))
@JsonProperty("legal_name")
@ExcludeMissing
fun legalName(legalName: JsonField) = apply {
this.legalName = legalName
}
fun entity(entity: Entity) = entity(JsonField.of(entity))
@JsonProperty("entity")
@ExcludeMissing
fun entity(entity: JsonField) = apply { this.entity = entity }
fun primaryEmail(primaryEmail: Boolean) =
primaryEmail(JsonField.of(primaryEmail))
@JsonProperty("primary_email")
@ExcludeMissing
fun primaryEmail(primaryEmail: JsonField) = apply {
this.primaryEmail = primaryEmail
}
fun primaryPhoneNumber(primaryPhoneNumber: Boolean) =
primaryPhoneNumber(JsonField.of(primaryPhoneNumber))
@JsonProperty("primary_phone_number")
@ExcludeMissing
fun primaryPhoneNumber(primaryPhoneNumber: JsonField) = apply {
this.primaryPhoneNumber = primaryPhoneNumber
}
fun ein(ein: Boolean) = ein(JsonField.of(ein))
@JsonProperty("ein")
@ExcludeMissing
fun ein(ein: JsonField) = apply { this.ein = ein }
fun accounts(accounts: Accounts) = accounts(JsonField.of(accounts))
@JsonProperty("accounts")
@ExcludeMissing
fun accounts(accounts: JsonField) = apply { this.accounts = accounts }
fun departments(departments: Departments) =
departments(JsonField.of(departments))
@JsonProperty("departments")
@ExcludeMissing
fun departments(departments: JsonField) = apply {
this.departments = departments
}
fun locations(locations: Locations) = locations(JsonField.of(locations))
@JsonProperty("locations")
@ExcludeMissing
fun locations(locations: JsonField) = apply {
this.locations = locations
}
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
this.additionalProperties.putAll(additionalProperties)
}
@JsonAnySetter
fun putAdditionalProperty(key: String, value: JsonValue) = apply {
this.additionalProperties.put(key, value)
}
fun putAllAdditionalProperties(additionalProperties: Map) =
apply {
this.additionalProperties.putAll(additionalProperties)
}
fun build(): SupportedCompanyFields =
SupportedCompanyFields(
id,
legalName,
entity,
primaryEmail,
primaryPhoneNumber,
ein,
accounts,
departments,
locations,
additionalProperties.toUnmodifiable(),
)
}
@JsonDeserialize(builder = Accounts.Builder::class)
@NoAutoDetect
class Accounts
private constructor(
private val routingNumber: JsonField,
private val accountName: JsonField,
private val institutionName: JsonField,
private val accountType: JsonField,
private val accountNumber: JsonField,
private val additionalProperties: Map,
) {
private var validated: Boolean = false
private var hashCode: Int = 0
fun routingNumber(): Optional =
Optional.ofNullable(routingNumber.getNullable("routing_number"))
fun accountName(): Optional =
Optional.ofNullable(accountName.getNullable("account_name"))
fun institutionName(): Optional =
Optional.ofNullable(institutionName.getNullable("institution_name"))
fun accountType(): Optional =
Optional.ofNullable(accountType.getNullable("account_type"))
fun accountNumber(): Optional =
Optional.ofNullable(accountNumber.getNullable("account_number"))
@JsonProperty("routing_number")
@ExcludeMissing
fun _routingNumber() = routingNumber
@JsonProperty("account_name") @ExcludeMissing fun _accountName() = accountName
@JsonProperty("institution_name")
@ExcludeMissing
fun _institutionName() = institutionName
@JsonProperty("account_type") @ExcludeMissing fun _accountType() = accountType
@JsonProperty("account_number")
@ExcludeMissing
fun _accountNumber() = accountNumber
@JsonAnyGetter
@ExcludeMissing
fun _additionalProperties(): Map = additionalProperties
fun validate(): Accounts = apply {
if (!validated) {
routingNumber()
accountName()
institutionName()
accountType()
accountNumber()
validated = true
}
}
fun toBuilder() = Builder().from(this)
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}
return other is Accounts &&
this.routingNumber == other.routingNumber &&
this.accountName == other.accountName &&
this.institutionName == other.institutionName &&
this.accountType == other.accountType &&
this.accountNumber == other.accountNumber &&
this.additionalProperties == other.additionalProperties
}
override fun hashCode(): Int {
if (hashCode == 0) {
hashCode =
Objects.hash(
routingNumber,
accountName,
institutionName,
accountType,
accountNumber,
additionalProperties,
)
}
return hashCode
}
override fun toString() =
"Accounts{routingNumber=$routingNumber, accountName=$accountName, institutionName=$institutionName, accountType=$accountType, accountNumber=$accountNumber, additionalProperties=$additionalProperties}"
companion object {
@JvmStatic fun builder() = Builder()
}
class Builder {
private var routingNumber: JsonField = JsonMissing.of()
private var accountName: JsonField = JsonMissing.of()
private var institutionName: JsonField = JsonMissing.of()
private var accountType: JsonField = JsonMissing.of()
private var accountNumber: JsonField = JsonMissing.of()
private var additionalProperties: MutableMap =
mutableMapOf()
@JvmSynthetic
internal fun from(accounts: Accounts) = apply {
this.routingNumber = accounts.routingNumber
this.accountName = accounts.accountName
this.institutionName = accounts.institutionName
this.accountType = accounts.accountType
this.accountNumber = accounts.accountNumber
additionalProperties(accounts.additionalProperties)
}
fun routingNumber(routingNumber: Boolean) =
routingNumber(JsonField.of(routingNumber))
@JsonProperty("routing_number")
@ExcludeMissing
fun routingNumber(routingNumber: JsonField) = apply {
this.routingNumber = routingNumber
}
fun accountName(accountName: Boolean) =
accountName(JsonField.of(accountName))
@JsonProperty("account_name")
@ExcludeMissing
fun accountName(accountName: JsonField) = apply {
this.accountName = accountName
}
fun institutionName(institutionName: Boolean) =
institutionName(JsonField.of(institutionName))
@JsonProperty("institution_name")
@ExcludeMissing
fun institutionName(institutionName: JsonField) = apply {
this.institutionName = institutionName
}
fun accountType(accountType: Boolean) =
accountType(JsonField.of(accountType))
@JsonProperty("account_type")
@ExcludeMissing
fun accountType(accountType: JsonField) = apply {
this.accountType = accountType
}
fun accountNumber(accountNumber: Boolean) =
accountNumber(JsonField.of(accountNumber))
@JsonProperty("account_number")
@ExcludeMissing
fun accountNumber(accountNumber: JsonField) = apply {
this.accountNumber = accountNumber
}
fun additionalProperties(additionalProperties: Map) =
apply {
this.additionalProperties.clear()
this.additionalProperties.putAll(additionalProperties)
}
@JsonAnySetter
fun putAdditionalProperty(key: String, value: JsonValue) = apply {
this.additionalProperties.put(key, value)
}
fun putAllAdditionalProperties(
additionalProperties: Map
) = apply { this.additionalProperties.putAll(additionalProperties) }
fun build(): Accounts =
Accounts(
routingNumber,
accountName,
institutionName,
accountType,
accountNumber,
additionalProperties.toUnmodifiable(),
)
}
}
@JsonDeserialize(builder = Departments.Builder::class)
@NoAutoDetect
class Departments
private constructor(
private val name: JsonField,
private val parent: JsonField,
private val additionalProperties: Map,
) {
private var validated: Boolean = false
private var hashCode: Int = 0
fun name(): Optional = Optional.ofNullable(name.getNullable("name"))
fun parent(): Optional =
Optional.ofNullable(parent.getNullable("parent"))
@JsonProperty("name") @ExcludeMissing fun _name() = name
@JsonProperty("parent") @ExcludeMissing fun _parent() = parent
@JsonAnyGetter
@ExcludeMissing
fun _additionalProperties(): Map = additionalProperties
fun validate(): Departments = apply {
if (!validated) {
name()
parent().map { it.validate() }
validated = true
}
}
fun toBuilder() = Builder().from(this)
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}
return other is Departments &&
this.name == other.name &&
this.parent == other.parent &&
this.additionalProperties == other.additionalProperties
}
override fun hashCode(): Int {
if (hashCode == 0) {
hashCode =
Objects.hash(
name,
parent,
additionalProperties,
)
}
return hashCode
}
override fun toString() =
"Departments{name=$name, parent=$parent, additionalProperties=$additionalProperties}"
companion object {
@JvmStatic fun builder() = Builder()
}
class Builder {
private var name: JsonField = JsonMissing.of()
private var parent: JsonField = JsonMissing.of()
private var additionalProperties: MutableMap =
mutableMapOf()
@JvmSynthetic
internal fun from(departments: Departments) = apply {
this.name = departments.name
this.parent = departments.parent
additionalProperties(departments.additionalProperties)
}
fun name(name: Boolean) = name(JsonField.of(name))
@JsonProperty("name")
@ExcludeMissing
fun name(name: JsonField) = apply { this.name = name }
fun parent(parent: Parent) = parent(JsonField.of(parent))
@JsonProperty("parent")
@ExcludeMissing
fun parent(parent: JsonField) = apply { this.parent = parent }
fun additionalProperties(additionalProperties: Map) =
apply {
this.additionalProperties.clear()
this.additionalProperties.putAll(additionalProperties)
}
@JsonAnySetter
fun putAdditionalProperty(key: String, value: JsonValue) = apply {
this.additionalProperties.put(key, value)
}
fun putAllAdditionalProperties(
additionalProperties: Map
) = apply { this.additionalProperties.putAll(additionalProperties) }
fun build(): Departments =
Departments(
name,
parent,
additionalProperties.toUnmodifiable(),
)
}
@JsonDeserialize(builder = Parent.Builder::class)
@NoAutoDetect
class Parent
private constructor(
private val name: JsonField,
private val additionalProperties: Map,
) {
private var validated: Boolean = false
private var hashCode: Int = 0
fun name(): Optional =
Optional.ofNullable(name.getNullable("name"))
@JsonProperty("name") @ExcludeMissing fun _name() = name
@JsonAnyGetter
@ExcludeMissing
fun _additionalProperties(): Map = additionalProperties
fun validate(): Parent = apply {
if (!validated) {
name()
validated = true
}
}
fun toBuilder() = Builder().from(this)
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}
return other is Parent &&
this.name == other.name &&
this.additionalProperties == other.additionalProperties
}
override fun hashCode(): Int {
if (hashCode == 0) {
hashCode = Objects.hash(name, additionalProperties)
}
return hashCode
}
override fun toString() =
"Parent{name=$name, additionalProperties=$additionalProperties}"
companion object {
@JvmStatic fun builder() = Builder()
}
class Builder {
private var name: JsonField = JsonMissing.of()
private var additionalProperties: MutableMap =
mutableMapOf()
@JvmSynthetic
internal fun from(parent: Parent) = apply {
this.name = parent.name
additionalProperties(parent.additionalProperties)
}
fun name(name: Boolean) = name(JsonField.of(name))
@JsonProperty("name")
@ExcludeMissing
fun name(name: JsonField) = apply { this.name = name }
fun additionalProperties(additionalProperties: Map) =
apply {
this.additionalProperties.clear()
this.additionalProperties.putAll(additionalProperties)
}
@JsonAnySetter
fun putAdditionalProperty(key: String, value: JsonValue) = apply {
this.additionalProperties.put(key, value)
}
fun putAllAdditionalProperties(
additionalProperties: Map
) = apply { this.additionalProperties.putAll(additionalProperties) }
fun build(): Parent =
Parent(name, additionalProperties.toUnmodifiable())
}
}
}
@JsonDeserialize(builder = Entity.Builder::class)
@NoAutoDetect
class Entity
private constructor(
private val type: JsonField,
private val subtype: JsonField,
private val additionalProperties: Map,
) {
private var validated: Boolean = false
private var hashCode: Int = 0
fun type(): Optional = Optional.ofNullable(type.getNullable("type"))
fun subtype(): Optional =
Optional.ofNullable(subtype.getNullable("subtype"))
@JsonProperty("type") @ExcludeMissing fun _type() = type
@JsonProperty("subtype") @ExcludeMissing fun _subtype() = subtype
@JsonAnyGetter
@ExcludeMissing
fun _additionalProperties(): Map = additionalProperties
fun validate(): Entity = apply {
if (!validated) {
type()
subtype()
validated = true
}
}
fun toBuilder() = Builder().from(this)
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}
return other is Entity &&
this.type == other.type &&
this.subtype == other.subtype &&
this.additionalProperties == other.additionalProperties
}
override fun hashCode(): Int {
if (hashCode == 0) {
hashCode =
Objects.hash(
type,
subtype,
additionalProperties,
)
}
return hashCode
}
override fun toString() =
"Entity{type=$type, subtype=$subtype, additionalProperties=$additionalProperties}"
companion object {
@JvmStatic fun builder() = Builder()
}
class Builder {
private var type: JsonField = JsonMissing.of()
private var subtype: JsonField = JsonMissing.of()
private var additionalProperties: MutableMap =
mutableMapOf()
@JvmSynthetic
internal fun from(entity: Entity) = apply {
this.type = entity.type
this.subtype = entity.subtype
additionalProperties(entity.additionalProperties)
}
fun type(type: Boolean) = type(JsonField.of(type))
@JsonProperty("type")
@ExcludeMissing
fun type(type: JsonField) = apply { this.type = type }
fun subtype(subtype: Boolean) = subtype(JsonField.of(subtype))
@JsonProperty("subtype")
@ExcludeMissing
fun subtype(subtype: JsonField) = apply { this.subtype = subtype }
fun additionalProperties(additionalProperties: Map) =
apply {
this.additionalProperties.clear()
this.additionalProperties.putAll(additionalProperties)
}
@JsonAnySetter
fun putAdditionalProperty(key: String, value: JsonValue) = apply {
this.additionalProperties.put(key, value)
}
fun putAllAdditionalProperties(
additionalProperties: Map
) = apply { this.additionalProperties.putAll(additionalProperties) }
fun build(): Entity =
Entity(
type,
subtype,
additionalProperties.toUnmodifiable(),
)
}
}
@JsonDeserialize(builder = Locations.Builder::class)
@NoAutoDetect
class Locations
private constructor(
private val line1: JsonField,
private val line2: JsonField,
private val city: JsonField,
private val state: JsonField,
private val postalCode: JsonField,
private val country: JsonField,
private val additionalProperties: Map,
) {
private var validated: Boolean = false
private var hashCode: Int = 0
fun line1(): Optional = Optional.ofNullable(line1.getNullable("line1"))
fun line2(): Optional = Optional.ofNullable(line2.getNullable("line2"))
fun city(): Optional = Optional.ofNullable(city.getNullable("city"))
fun state(): Optional = Optional.ofNullable(state.getNullable("state"))
fun postalCode(): Optional =
Optional.ofNullable(postalCode.getNullable("postal_code"))
fun country(): Optional =
Optional.ofNullable(country.getNullable("country"))
@JsonProperty("line1") @ExcludeMissing fun _line1() = line1
@JsonProperty("line2") @ExcludeMissing fun _line2() = line2
@JsonProperty("city") @ExcludeMissing fun _city() = city
@JsonProperty("state") @ExcludeMissing fun _state() = state
@JsonProperty("postal_code") @ExcludeMissing fun _postalCode() = postalCode
@JsonProperty("country") @ExcludeMissing fun _country() = country
@JsonAnyGetter
@ExcludeMissing
fun _additionalProperties(): Map = additionalProperties
fun validate(): Locations = apply {
if (!validated) {
line1()
line2()
city()
state()
postalCode()
country()
validated = true
}
}
fun toBuilder() = Builder().from(this)
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}
return other is Locations &&
this.line1 == other.line1 &&
this.line2 == other.line2 &&
this.city == other.city &&
this.state == other.state &&
this.postalCode == other.postalCode &&
this.country == other.country &&
this.additionalProperties == other.additionalProperties
}
override fun hashCode(): Int {
if (hashCode == 0) {
hashCode =
Objects.hash(
line1,
line2,
city,
state,
postalCode,
country,
additionalProperties,
)
}
return hashCode
}
override fun toString() =
"Locations{line1=$line1, line2=$line2, city=$city, state=$state, postalCode=$postalCode, country=$country, additionalProperties=$additionalProperties}"
companion object {
@JvmStatic fun builder() = Builder()
}
class Builder {
private var line1: JsonField = JsonMissing.of()
private var line2: JsonField = JsonMissing.of()
private var city: JsonField = JsonMissing.of()
private var state: JsonField = JsonMissing.of()
private var postalCode: JsonField = JsonMissing.of()
private var country: JsonField = JsonMissing.of()
private var additionalProperties: MutableMap =
mutableMapOf()
@JvmSynthetic
internal fun from(locations: Locations) = apply {
this.line1 = locations.line1
this.line2 = locations.line2
this.city = locations.city
this.state = locations.state
this.postalCode = locations.postalCode
this.country = locations.country
additionalProperties(locations.additionalProperties)
}
fun line1(line1: Boolean) = line1(JsonField.of(line1))
@JsonProperty("line1")
@ExcludeMissing
fun line1(line1: JsonField) = apply { this.line1 = line1 }
fun line2(line2: Boolean) = line2(JsonField.of(line2))
@JsonProperty("line2")
@ExcludeMissing
fun line2(line2: JsonField) = apply { this.line2 = line2 }
fun city(city: Boolean) = city(JsonField.of(city))
@JsonProperty("city")
@ExcludeMissing
fun city(city: JsonField) = apply { this.city = city }
fun state(state: Boolean) = state(JsonField.of(state))
@JsonProperty("state")
@ExcludeMissing
fun state(state: JsonField) = apply { this.state = state }
fun postalCode(postalCode: Boolean) = postalCode(JsonField.of(postalCode))
@JsonProperty("postal_code")
@ExcludeMissing
fun postalCode(postalCode: JsonField) = apply {
this.postalCode = postalCode
}
fun country(country: Boolean) = country(JsonField.of(country))
@JsonProperty("country")
@ExcludeMissing
fun country(country: JsonField) = apply { this.country = country }
fun additionalProperties(additionalProperties: Map) =
apply {
this.additionalProperties.clear()
this.additionalProperties.putAll(additionalProperties)
}
@JsonAnySetter
fun putAdditionalProperty(key: String, value: JsonValue) = apply {
this.additionalProperties.put(key, value)
}
fun putAllAdditionalProperties(
additionalProperties: Map
) = apply { this.additionalProperties.putAll(additionalProperties) }
fun build(): Locations =
Locations(
line1,
line2,
city,
state,
postalCode,
country,
additionalProperties.toUnmodifiable(),
)
}
}
}
@JsonDeserialize(builder = SupportedDirectoryFields.Builder::class)
@NoAutoDetect
class SupportedDirectoryFields
private constructor(
private val paging: JsonField,
private val individuals: JsonField,
private val additionalProperties: Map,
) {
private var validated: Boolean = false
private var hashCode: Int = 0
fun paging(): Optional = Optional.ofNullable(paging.getNullable("paging"))
fun individuals(): Optional =
Optional.ofNullable(individuals.getNullable("individuals"))
@JsonProperty("paging") @ExcludeMissing fun _paging() = paging
@JsonProperty("individuals") @ExcludeMissing fun _individuals() = individuals
@JsonAnyGetter
@ExcludeMissing
fun _additionalProperties(): Map = additionalProperties
fun validate(): SupportedDirectoryFields = apply {
if (!validated) {
paging().map { it.validate() }
individuals().map { it.validate() }
validated = true
}
}
fun toBuilder() = Builder().from(this)
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}
return other is SupportedDirectoryFields &&
this.paging == other.paging &&
this.individuals == other.individuals &&
this.additionalProperties == other.additionalProperties
}
override fun hashCode(): Int {
if (hashCode == 0) {
hashCode =
Objects.hash(
paging,
individuals,
additionalProperties,
)
}
return hashCode
}
override fun toString() =
"SupportedDirectoryFields{paging=$paging, individuals=$individuals, additionalProperties=$additionalProperties}"
companion object {
@JvmStatic fun builder() = Builder()
}
class Builder {
private var paging: JsonField = JsonMissing.of()
private var individuals: JsonField = JsonMissing.of()
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
internal fun from(supportedDirectoryFields: SupportedDirectoryFields) = apply {
this.paging = supportedDirectoryFields.paging
this.individuals = supportedDirectoryFields.individuals
additionalProperties(supportedDirectoryFields.additionalProperties)
}
fun paging(paging: Paging) = paging(JsonField.of(paging))
@JsonProperty("paging")
@ExcludeMissing
fun paging(paging: JsonField) = apply { this.paging = paging }
fun individuals(individuals: Individuals) =
individuals(JsonField.of(individuals))
@JsonProperty("individuals")
@ExcludeMissing
fun individuals(individuals: JsonField) = apply {
this.individuals = individuals
}
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
this.additionalProperties.putAll(additionalProperties)
}
@JsonAnySetter
fun putAdditionalProperty(key: String, value: JsonValue) = apply {
this.additionalProperties.put(key, value)
}
fun putAllAdditionalProperties(additionalProperties: Map) =
apply {
this.additionalProperties.putAll(additionalProperties)
}
fun build(): SupportedDirectoryFields =
SupportedDirectoryFields(
paging,
individuals,
additionalProperties.toUnmodifiable(),
)
}
@JsonDeserialize(builder = Individuals.Builder::class)
@NoAutoDetect
class Individuals
private constructor(
private val id: JsonField,
private val firstName: JsonField,
private val middleName: JsonField,
private val lastName: JsonField,
private val isActive: JsonField,
private val department: JsonField,
private val manager: JsonField,
private val additionalProperties: Map,
) {
private var validated: Boolean = false
private var hashCode: Int = 0
fun id(): Optional = Optional.ofNullable(id.getNullable("id"))
fun firstName(): Optional =
Optional.ofNullable(firstName.getNullable("first_name"))
fun middleName(): Optional =
Optional.ofNullable(middleName.getNullable("middle_name"))
fun lastName(): Optional =
Optional.ofNullable(lastName.getNullable("last_name"))
fun isActive(): Optional =
Optional.ofNullable(isActive.getNullable("is_active"))
fun department(): Optional =
Optional.ofNullable(department.getNullable("department"))
fun manager(): Optional =
Optional.ofNullable(manager.getNullable("manager"))
@JsonProperty("id") @ExcludeMissing fun _id() = id
@JsonProperty("first_name") @ExcludeMissing fun _firstName() = firstName
@JsonProperty("middle_name") @ExcludeMissing fun _middleName() = middleName
@JsonProperty("last_name") @ExcludeMissing fun _lastName() = lastName
@JsonProperty("is_active") @ExcludeMissing fun _isActive() = isActive
@JsonProperty("department") @ExcludeMissing fun _department() = department
@JsonProperty("manager") @ExcludeMissing fun _manager() = manager
@JsonAnyGetter
@ExcludeMissing
fun _additionalProperties(): Map