
com.moderntreasury.api.models.WealthAndEmploymentDetails.kt Maven / Gradle / Ivy
// File generated from our OpenAPI spec by Stainless.
package com.moderntreasury.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.moderntreasury.api.core.Enum
import com.moderntreasury.api.core.ExcludeMissing
import com.moderntreasury.api.core.JsonField
import com.moderntreasury.api.core.JsonMissing
import com.moderntreasury.api.core.JsonValue
import com.moderntreasury.api.core.NoAutoDetect
import com.moderntreasury.api.core.toImmutable
import com.moderntreasury.api.errors.ModernTreasuryInvalidDataException
import java.time.OffsetDateTime
import java.util.Objects
@JsonDeserialize(builder = WealthAndEmploymentDetails.Builder::class)
@NoAutoDetect
class WealthAndEmploymentDetails
private constructor(
private val id: JsonField,
private val object_: JsonField,
private val liveMode: JsonField,
private val createdAt: JsonField,
private val updatedAt: JsonField,
private val discardedAt: JsonField,
private val employmentStatus: JsonField,
private val occupation: JsonField,
private val industry: JsonField,
private val incomeSource: JsonField,
private val incomeState: JsonField,
private val incomeCountry: JsonField,
private val employerName: JsonField,
private val employerState: JsonField,
private val employerCountry: JsonField,
private val sourceOfFunds: JsonField,
private val wealthSource: JsonField,
private val annualIncome: JsonField,
private val additionalProperties: Map,
) {
private var validated: Boolean = false
fun id(): String = id.getRequired("id")
fun object_(): String = object_.getRequired("object")
/**
* This field will be true if this object exists in the live environment or false if it exists
* in the test environment.
*/
fun liveMode(): Boolean = liveMode.getRequired("live_mode")
fun createdAt(): OffsetDateTime = createdAt.getRequired("created_at")
fun updatedAt(): OffsetDateTime = updatedAt.getRequired("updated_at")
fun discardedAt(): OffsetDateTime? = discardedAt.getNullable("discarded_at")
/** The employment status of the individual. */
fun employmentStatus(): EmploymentStatus? = employmentStatus.getNullable("employment_status")
/** The occupation of the individual. */
fun occupation(): Occupation? = occupation.getNullable("occupation")
/** The industry of the individual. */
fun industry(): Industry? = industry.getNullable("industry")
/** The source of the individual's income. */
fun incomeSource(): IncomeSource? = incomeSource.getNullable("income_source")
/** The state in which the individual's income is earned. */
fun incomeState(): String? = incomeState.getNullable("income_state")
/** The country in which the individual's income is earned. */
fun incomeCountry(): String? = incomeCountry.getNullable("income_country")
/** The name of the employer. */
fun employerName(): String? = employerName.getNullable("employer_name")
/** The state in which the employer is located. */
fun employerState(): String? = employerState.getNullable("employer_state")
/** The country in which the employer is located. */
fun employerCountry(): String? = employerCountry.getNullable("employer_country")
/** The source of the individual's funds. */
fun sourceOfFunds(): SourceOfFunds? = sourceOfFunds.getNullable("source_of_funds")
/** The source of the individual's wealth. */
fun wealthSource(): WealthSource? = wealthSource.getNullable("wealth_source")
/** The annual income of the individual. */
fun annualIncome(): Long? = annualIncome.getNullable("annual_income")
@JsonProperty("id") @ExcludeMissing fun _id() = id
@JsonProperty("object") @ExcludeMissing fun _object_() = object_
/**
* This field will be true if this object exists in the live environment or false if it exists
* in the test environment.
*/
@JsonProperty("live_mode") @ExcludeMissing fun _liveMode() = liveMode
@JsonProperty("created_at") @ExcludeMissing fun _createdAt() = createdAt
@JsonProperty("updated_at") @ExcludeMissing fun _updatedAt() = updatedAt
@JsonProperty("discarded_at") @ExcludeMissing fun _discardedAt() = discardedAt
/** The employment status of the individual. */
@JsonProperty("employment_status") @ExcludeMissing fun _employmentStatus() = employmentStatus
/** The occupation of the individual. */
@JsonProperty("occupation") @ExcludeMissing fun _occupation() = occupation
/** The industry of the individual. */
@JsonProperty("industry") @ExcludeMissing fun _industry() = industry
/** The source of the individual's income. */
@JsonProperty("income_source") @ExcludeMissing fun _incomeSource() = incomeSource
/** The state in which the individual's income is earned. */
@JsonProperty("income_state") @ExcludeMissing fun _incomeState() = incomeState
/** The country in which the individual's income is earned. */
@JsonProperty("income_country") @ExcludeMissing fun _incomeCountry() = incomeCountry
/** The name of the employer. */
@JsonProperty("employer_name") @ExcludeMissing fun _employerName() = employerName
/** The state in which the employer is located. */
@JsonProperty("employer_state") @ExcludeMissing fun _employerState() = employerState
/** The country in which the employer is located. */
@JsonProperty("employer_country") @ExcludeMissing fun _employerCountry() = employerCountry
/** The source of the individual's funds. */
@JsonProperty("source_of_funds") @ExcludeMissing fun _sourceOfFunds() = sourceOfFunds
/** The source of the individual's wealth. */
@JsonProperty("wealth_source") @ExcludeMissing fun _wealthSource() = wealthSource
/** The annual income of the individual. */
@JsonProperty("annual_income") @ExcludeMissing fun _annualIncome() = annualIncome
@JsonAnyGetter
@ExcludeMissing
fun _additionalProperties(): Map = additionalProperties
fun validate(): WealthAndEmploymentDetails = apply {
if (!validated) {
id()
object_()
liveMode()
createdAt()
updatedAt()
discardedAt()
employmentStatus()
occupation()
industry()
incomeSource()
incomeState()
incomeCountry()
employerName()
employerState()
employerCountry()
sourceOfFunds()
wealthSource()
annualIncome()
validated = true
}
}
fun toBuilder() = Builder().from(this)
companion object {
fun builder() = Builder()
}
class Builder {
private var id: JsonField = JsonMissing.of()
private var object_: JsonField = JsonMissing.of()
private var liveMode: JsonField = JsonMissing.of()
private var createdAt: JsonField = JsonMissing.of()
private var updatedAt: JsonField = JsonMissing.of()
private var discardedAt: JsonField = JsonMissing.of()
private var employmentStatus: JsonField = JsonMissing.of()
private var occupation: JsonField = JsonMissing.of()
private var industry: JsonField = JsonMissing.of()
private var incomeSource: JsonField = JsonMissing.of()
private var incomeState: JsonField = JsonMissing.of()
private var incomeCountry: JsonField = JsonMissing.of()
private var employerName: JsonField = JsonMissing.of()
private var employerState: JsonField = JsonMissing.of()
private var employerCountry: JsonField = JsonMissing.of()
private var sourceOfFunds: JsonField = JsonMissing.of()
private var wealthSource: JsonField = JsonMissing.of()
private var annualIncome: JsonField = JsonMissing.of()
private var additionalProperties: MutableMap = mutableMapOf()
internal fun from(wealthAndEmploymentDetails: WealthAndEmploymentDetails) = apply {
this.id = wealthAndEmploymentDetails.id
this.object_ = wealthAndEmploymentDetails.object_
this.liveMode = wealthAndEmploymentDetails.liveMode
this.createdAt = wealthAndEmploymentDetails.createdAt
this.updatedAt = wealthAndEmploymentDetails.updatedAt
this.discardedAt = wealthAndEmploymentDetails.discardedAt
this.employmentStatus = wealthAndEmploymentDetails.employmentStatus
this.occupation = wealthAndEmploymentDetails.occupation
this.industry = wealthAndEmploymentDetails.industry
this.incomeSource = wealthAndEmploymentDetails.incomeSource
this.incomeState = wealthAndEmploymentDetails.incomeState
this.incomeCountry = wealthAndEmploymentDetails.incomeCountry
this.employerName = wealthAndEmploymentDetails.employerName
this.employerState = wealthAndEmploymentDetails.employerState
this.employerCountry = wealthAndEmploymentDetails.employerCountry
this.sourceOfFunds = wealthAndEmploymentDetails.sourceOfFunds
this.wealthSource = wealthAndEmploymentDetails.wealthSource
this.annualIncome = wealthAndEmploymentDetails.annualIncome
additionalProperties(wealthAndEmploymentDetails.additionalProperties)
}
fun id(id: String) = id(JsonField.of(id))
@JsonProperty("id") @ExcludeMissing fun id(id: JsonField) = apply { this.id = id }
fun object_(object_: String) = object_(JsonField.of(object_))
@JsonProperty("object")
@ExcludeMissing
fun object_(object_: JsonField) = apply { this.object_ = object_ }
/**
* This field will be true if this object exists in the live environment or false if it
* exists in the test environment.
*/
fun liveMode(liveMode: Boolean) = liveMode(JsonField.of(liveMode))
/**
* This field will be true if this object exists in the live environment or false if it
* exists in the test environment.
*/
@JsonProperty("live_mode")
@ExcludeMissing
fun liveMode(liveMode: JsonField) = apply { this.liveMode = liveMode }
fun createdAt(createdAt: OffsetDateTime) = createdAt(JsonField.of(createdAt))
@JsonProperty("created_at")
@ExcludeMissing
fun createdAt(createdAt: JsonField) = apply { this.createdAt = createdAt }
fun updatedAt(updatedAt: OffsetDateTime) = updatedAt(JsonField.of(updatedAt))
@JsonProperty("updated_at")
@ExcludeMissing
fun updatedAt(updatedAt: JsonField) = apply { this.updatedAt = updatedAt }
fun discardedAt(discardedAt: OffsetDateTime) = discardedAt(JsonField.of(discardedAt))
@JsonProperty("discarded_at")
@ExcludeMissing
fun discardedAt(discardedAt: JsonField) = apply {
this.discardedAt = discardedAt
}
/** The employment status of the individual. */
fun employmentStatus(employmentStatus: EmploymentStatus) =
employmentStatus(JsonField.of(employmentStatus))
/** The employment status of the individual. */
@JsonProperty("employment_status")
@ExcludeMissing
fun employmentStatus(employmentStatus: JsonField) = apply {
this.employmentStatus = employmentStatus
}
/** The occupation of the individual. */
fun occupation(occupation: Occupation) = occupation(JsonField.of(occupation))
/** The occupation of the individual. */
@JsonProperty("occupation")
@ExcludeMissing
fun occupation(occupation: JsonField) = apply { this.occupation = occupation }
/** The industry of the individual. */
fun industry(industry: Industry) = industry(JsonField.of(industry))
/** The industry of the individual. */
@JsonProperty("industry")
@ExcludeMissing
fun industry(industry: JsonField) = apply { this.industry = industry }
/** The source of the individual's income. */
fun incomeSource(incomeSource: IncomeSource) = incomeSource(JsonField.of(incomeSource))
/** The source of the individual's income. */
@JsonProperty("income_source")
@ExcludeMissing
fun incomeSource(incomeSource: JsonField) = apply {
this.incomeSource = incomeSource
}
/** The state in which the individual's income is earned. */
fun incomeState(incomeState: String) = incomeState(JsonField.of(incomeState))
/** The state in which the individual's income is earned. */
@JsonProperty("income_state")
@ExcludeMissing
fun incomeState(incomeState: JsonField) = apply { this.incomeState = incomeState }
/** The country in which the individual's income is earned. */
fun incomeCountry(incomeCountry: String) = incomeCountry(JsonField.of(incomeCountry))
/** The country in which the individual's income is earned. */
@JsonProperty("income_country")
@ExcludeMissing
fun incomeCountry(incomeCountry: JsonField) = apply {
this.incomeCountry = incomeCountry
}
/** The name of the employer. */
fun employerName(employerName: String) = employerName(JsonField.of(employerName))
/** The name of the employer. */
@JsonProperty("employer_name")
@ExcludeMissing
fun employerName(employerName: JsonField) = apply {
this.employerName = employerName
}
/** The state in which the employer is located. */
fun employerState(employerState: String) = employerState(JsonField.of(employerState))
/** The state in which the employer is located. */
@JsonProperty("employer_state")
@ExcludeMissing
fun employerState(employerState: JsonField) = apply {
this.employerState = employerState
}
/** The country in which the employer is located. */
fun employerCountry(employerCountry: String) =
employerCountry(JsonField.of(employerCountry))
/** The country in which the employer is located. */
@JsonProperty("employer_country")
@ExcludeMissing
fun employerCountry(employerCountry: JsonField) = apply {
this.employerCountry = employerCountry
}
/** The source of the individual's funds. */
fun sourceOfFunds(sourceOfFunds: SourceOfFunds) = sourceOfFunds(JsonField.of(sourceOfFunds))
/** The source of the individual's funds. */
@JsonProperty("source_of_funds")
@ExcludeMissing
fun sourceOfFunds(sourceOfFunds: JsonField) = apply {
this.sourceOfFunds = sourceOfFunds
}
/** The source of the individual's wealth. */
fun wealthSource(wealthSource: WealthSource) = wealthSource(JsonField.of(wealthSource))
/** The source of the individual's wealth. */
@JsonProperty("wealth_source")
@ExcludeMissing
fun wealthSource(wealthSource: JsonField) = apply {
this.wealthSource = wealthSource
}
/** The annual income of the individual. */
fun annualIncome(annualIncome: Long) = annualIncome(JsonField.of(annualIncome))
/** The annual income of the individual. */
@JsonProperty("annual_income")
@ExcludeMissing
fun annualIncome(annualIncome: JsonField) = apply { this.annualIncome = annualIncome }
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(): WealthAndEmploymentDetails =
WealthAndEmploymentDetails(
id,
object_,
liveMode,
createdAt,
updatedAt,
discardedAt,
employmentStatus,
occupation,
industry,
incomeSource,
incomeState,
incomeCountry,
employerName,
employerState,
employerCountry,
sourceOfFunds,
wealthSource,
annualIncome,
additionalProperties.toImmutable(),
)
}
class EmploymentStatus
@JsonCreator
private constructor(
private val value: JsonField,
) : Enum {
@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
companion object {
val EMPLOYED = of("employed")
val RETIRED = of("retired")
val SELF_EMPLOYED = of("self_employed")
val STUDENT = of("student")
val UNEMPLOYED = of("unemployed")
fun of(value: String) = EmploymentStatus(JsonField.of(value))
}
enum class Known {
EMPLOYED,
RETIRED,
SELF_EMPLOYED,
STUDENT,
UNEMPLOYED,
}
enum class Value {
EMPLOYED,
RETIRED,
SELF_EMPLOYED,
STUDENT,
UNEMPLOYED,
_UNKNOWN,
}
fun value(): Value =
when (this) {
EMPLOYED -> Value.EMPLOYED
RETIRED -> Value.RETIRED
SELF_EMPLOYED -> Value.SELF_EMPLOYED
STUDENT -> Value.STUDENT
UNEMPLOYED -> Value.UNEMPLOYED
else -> Value._UNKNOWN
}
fun known(): Known =
when (this) {
EMPLOYED -> Known.EMPLOYED
RETIRED -> Known.RETIRED
SELF_EMPLOYED -> Known.SELF_EMPLOYED
STUDENT -> Known.STUDENT
UNEMPLOYED -> Known.UNEMPLOYED
else -> throw ModernTreasuryInvalidDataException("Unknown EmploymentStatus: $value")
}
fun asString(): String = _value().asStringOrThrow()
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}
return /* spotless:off */ other is EmploymentStatus && value == other.value /* spotless:on */
}
override fun hashCode() = value.hashCode()
override fun toString() = value.toString()
}
class IncomeSource
@JsonCreator
private constructor(
private val value: JsonField,
) : Enum {
@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
companion object {
val FAMILY_SUPPORT = of("family_support")
val GOVERNMENT_BENEFITS = of("government_benefits")
val INHERITANCE = of("inheritance")
val INVESTMENTS = of("investments")
val RENTAL_INCOME = of("rental_income")
val RETIREMENT = of("retirement")
val SALARY = of("salary")
val SELF_EMPLOYED = of("self_employed")
fun of(value: String) = IncomeSource(JsonField.of(value))
}
enum class Known {
FAMILY_SUPPORT,
GOVERNMENT_BENEFITS,
INHERITANCE,
INVESTMENTS,
RENTAL_INCOME,
RETIREMENT,
SALARY,
SELF_EMPLOYED,
}
enum class Value {
FAMILY_SUPPORT,
GOVERNMENT_BENEFITS,
INHERITANCE,
INVESTMENTS,
RENTAL_INCOME,
RETIREMENT,
SALARY,
SELF_EMPLOYED,
_UNKNOWN,
}
fun value(): Value =
when (this) {
FAMILY_SUPPORT -> Value.FAMILY_SUPPORT
GOVERNMENT_BENEFITS -> Value.GOVERNMENT_BENEFITS
INHERITANCE -> Value.INHERITANCE
INVESTMENTS -> Value.INVESTMENTS
RENTAL_INCOME -> Value.RENTAL_INCOME
RETIREMENT -> Value.RETIREMENT
SALARY -> Value.SALARY
SELF_EMPLOYED -> Value.SELF_EMPLOYED
else -> Value._UNKNOWN
}
fun known(): Known =
when (this) {
FAMILY_SUPPORT -> Known.FAMILY_SUPPORT
GOVERNMENT_BENEFITS -> Known.GOVERNMENT_BENEFITS
INHERITANCE -> Known.INHERITANCE
INVESTMENTS -> Known.INVESTMENTS
RENTAL_INCOME -> Known.RENTAL_INCOME
RETIREMENT -> Known.RETIREMENT
SALARY -> Known.SALARY
SELF_EMPLOYED -> Known.SELF_EMPLOYED
else -> throw ModernTreasuryInvalidDataException("Unknown IncomeSource: $value")
}
fun asString(): String = _value().asStringOrThrow()
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}
return /* spotless:off */ other is IncomeSource && value == other.value /* spotless:on */
}
override fun hashCode() = value.hashCode()
override fun toString() = value.toString()
}
class Industry
@JsonCreator
private constructor(
private val value: JsonField,
) : Enum {
@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
companion object {
val ACCOUNTING = of("accounting")
val AGRICULTURE = of("agriculture")
val AUTOMOTIVE = of("automotive")
val CHEMICAL_MANUFACTURING = of("chemical_manufacturing")
val CONSTRUCTION = of("construction")
val EDUCATIONAL_MEDICAL = of("educational_medical")
val FOOD_SERVICE = of("food_service")
val FINANCE = of("finance")
val GASOLINE = of("gasoline")
val HEALTH_STORES = of("health_stores")
val LAUNDRY = of("laundry")
val MAINTENANCE = of("maintenance")
val MANUFACTURING = of("manufacturing")
val MERCHANT_WHOLESALE = of("merchant_wholesale")
val MINING = of("mining")
val PERFORMING_ARTS = of("performing_arts")
val PROFESSIONAL_NON_LEGAL = of("professional_non_legal")
val PUBLIC_ADMINISTRATION = of("public_administration")
val PUBLISHING = of("publishing")
val REAL_ESTATE = of("real_estate")
val RECREATION_GAMBLING = of("recreation_gambling")
val RELIGIOUS_CHARITY = of("religious_charity")
val RENTAL_SERVICES = of("rental_services")
val RETAIL_CLOTHING = of("retail_clothing")
val RETAIL_ELECTRONICS = of("retail_electronics")
val RETAIL_FOOD = of("retail_food")
val RETAIL_FURNISHING = of("retail_furnishing")
val RETAIL_HOME = of("retail_home")
val RETAIL_NON_STORE = of("retail_non_store")
val RETAIL_SPORTING = of("retail_sporting")
val TRANSPORTATION = of("transportation")
val TRAVEL = of("travel")
val UTILITIES = of("utilities")
fun of(value: String) = Industry(JsonField.of(value))
}
enum class Known {
ACCOUNTING,
AGRICULTURE,
AUTOMOTIVE,
CHEMICAL_MANUFACTURING,
CONSTRUCTION,
EDUCATIONAL_MEDICAL,
FOOD_SERVICE,
FINANCE,
GASOLINE,
HEALTH_STORES,
LAUNDRY,
MAINTENANCE,
MANUFACTURING,
MERCHANT_WHOLESALE,
MINING,
PERFORMING_ARTS,
PROFESSIONAL_NON_LEGAL,
PUBLIC_ADMINISTRATION,
PUBLISHING,
REAL_ESTATE,
RECREATION_GAMBLING,
RELIGIOUS_CHARITY,
RENTAL_SERVICES,
RETAIL_CLOTHING,
RETAIL_ELECTRONICS,
RETAIL_FOOD,
RETAIL_FURNISHING,
RETAIL_HOME,
RETAIL_NON_STORE,
RETAIL_SPORTING,
TRANSPORTATION,
TRAVEL,
UTILITIES,
}
enum class Value {
ACCOUNTING,
AGRICULTURE,
AUTOMOTIVE,
CHEMICAL_MANUFACTURING,
CONSTRUCTION,
EDUCATIONAL_MEDICAL,
FOOD_SERVICE,
FINANCE,
GASOLINE,
HEALTH_STORES,
LAUNDRY,
MAINTENANCE,
MANUFACTURING,
MERCHANT_WHOLESALE,
MINING,
PERFORMING_ARTS,
PROFESSIONAL_NON_LEGAL,
PUBLIC_ADMINISTRATION,
PUBLISHING,
REAL_ESTATE,
RECREATION_GAMBLING,
RELIGIOUS_CHARITY,
RENTAL_SERVICES,
RETAIL_CLOTHING,
RETAIL_ELECTRONICS,
RETAIL_FOOD,
RETAIL_FURNISHING,
RETAIL_HOME,
RETAIL_NON_STORE,
RETAIL_SPORTING,
TRANSPORTATION,
TRAVEL,
UTILITIES,
_UNKNOWN,
}
fun value(): Value =
when (this) {
ACCOUNTING -> Value.ACCOUNTING
AGRICULTURE -> Value.AGRICULTURE
AUTOMOTIVE -> Value.AUTOMOTIVE
CHEMICAL_MANUFACTURING -> Value.CHEMICAL_MANUFACTURING
CONSTRUCTION -> Value.CONSTRUCTION
EDUCATIONAL_MEDICAL -> Value.EDUCATIONAL_MEDICAL
FOOD_SERVICE -> Value.FOOD_SERVICE
FINANCE -> Value.FINANCE
GASOLINE -> Value.GASOLINE
HEALTH_STORES -> Value.HEALTH_STORES
LAUNDRY -> Value.LAUNDRY
MAINTENANCE -> Value.MAINTENANCE
MANUFACTURING -> Value.MANUFACTURING
MERCHANT_WHOLESALE -> Value.MERCHANT_WHOLESALE
MINING -> Value.MINING
PERFORMING_ARTS -> Value.PERFORMING_ARTS
PROFESSIONAL_NON_LEGAL -> Value.PROFESSIONAL_NON_LEGAL
PUBLIC_ADMINISTRATION -> Value.PUBLIC_ADMINISTRATION
PUBLISHING -> Value.PUBLISHING
REAL_ESTATE -> Value.REAL_ESTATE
RECREATION_GAMBLING -> Value.RECREATION_GAMBLING
RELIGIOUS_CHARITY -> Value.RELIGIOUS_CHARITY
RENTAL_SERVICES -> Value.RENTAL_SERVICES
RETAIL_CLOTHING -> Value.RETAIL_CLOTHING
RETAIL_ELECTRONICS -> Value.RETAIL_ELECTRONICS
RETAIL_FOOD -> Value.RETAIL_FOOD
RETAIL_FURNISHING -> Value.RETAIL_FURNISHING
RETAIL_HOME -> Value.RETAIL_HOME
RETAIL_NON_STORE -> Value.RETAIL_NON_STORE
RETAIL_SPORTING -> Value.RETAIL_SPORTING
TRANSPORTATION -> Value.TRANSPORTATION
TRAVEL -> Value.TRAVEL
UTILITIES -> Value.UTILITIES
else -> Value._UNKNOWN
}
fun known(): Known =
when (this) {
ACCOUNTING -> Known.ACCOUNTING
AGRICULTURE -> Known.AGRICULTURE
AUTOMOTIVE -> Known.AUTOMOTIVE
CHEMICAL_MANUFACTURING -> Known.CHEMICAL_MANUFACTURING
CONSTRUCTION -> Known.CONSTRUCTION
EDUCATIONAL_MEDICAL -> Known.EDUCATIONAL_MEDICAL
FOOD_SERVICE -> Known.FOOD_SERVICE
FINANCE -> Known.FINANCE
GASOLINE -> Known.GASOLINE
HEALTH_STORES -> Known.HEALTH_STORES
LAUNDRY -> Known.LAUNDRY
MAINTENANCE -> Known.MAINTENANCE
MANUFACTURING -> Known.MANUFACTURING
MERCHANT_WHOLESALE -> Known.MERCHANT_WHOLESALE
MINING -> Known.MINING
PERFORMING_ARTS -> Known.PERFORMING_ARTS
PROFESSIONAL_NON_LEGAL -> Known.PROFESSIONAL_NON_LEGAL
PUBLIC_ADMINISTRATION -> Known.PUBLIC_ADMINISTRATION
PUBLISHING -> Known.PUBLISHING
REAL_ESTATE -> Known.REAL_ESTATE
RECREATION_GAMBLING -> Known.RECREATION_GAMBLING
RELIGIOUS_CHARITY -> Known.RELIGIOUS_CHARITY
RENTAL_SERVICES -> Known.RENTAL_SERVICES
RETAIL_CLOTHING -> Known.RETAIL_CLOTHING
RETAIL_ELECTRONICS -> Known.RETAIL_ELECTRONICS
RETAIL_FOOD -> Known.RETAIL_FOOD
RETAIL_FURNISHING -> Known.RETAIL_FURNISHING
RETAIL_HOME -> Known.RETAIL_HOME
RETAIL_NON_STORE -> Known.RETAIL_NON_STORE
RETAIL_SPORTING -> Known.RETAIL_SPORTING
TRANSPORTATION -> Known.TRANSPORTATION
TRAVEL -> Known.TRAVEL
UTILITIES -> Known.UTILITIES
else -> throw ModernTreasuryInvalidDataException("Unknown Industry: $value")
}
fun asString(): String = _value().asStringOrThrow()
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}
return /* spotless:off */ other is Industry && value == other.value /* spotless:on */
}
override fun hashCode() = value.hashCode()
override fun toString() = value.toString()
}
class Occupation
@JsonCreator
private constructor(
private val value: JsonField,
) : Enum {
@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
companion object {
val CONSULTING = of("consulting")
val EXECUTIVE = of("executive")
val FINANCE_ACCOUNTING = of("finance_accounting")
val FOOD_SERVICES = of("food_services")
val GOVERNMENT = of("government")
val HEALTHCARE = of("healthcare")
val LEGAL_SERVICES = of("legal_services")
val MANUFACTURING = of("manufacturing")
val OTHER = of("other")
val SALES = of("sales")
val SCIENCE_ENGINEERING = of("science_engineering")
val TECHNOLOGY = of("technology")
fun of(value: String) = Occupation(JsonField.of(value))
}
enum class Known {
CONSULTING,
EXECUTIVE,
FINANCE_ACCOUNTING,
FOOD_SERVICES,
GOVERNMENT,
HEALTHCARE,
LEGAL_SERVICES,
MANUFACTURING,
OTHER,
SALES,
SCIENCE_ENGINEERING,
TECHNOLOGY,
}
enum class Value {
CONSULTING,
EXECUTIVE,
FINANCE_ACCOUNTING,
FOOD_SERVICES,
GOVERNMENT,
HEALTHCARE,
LEGAL_SERVICES,
MANUFACTURING,
OTHER,
SALES,
SCIENCE_ENGINEERING,
TECHNOLOGY,
_UNKNOWN,
}
fun value(): Value =
when (this) {
CONSULTING -> Value.CONSULTING
EXECUTIVE -> Value.EXECUTIVE
FINANCE_ACCOUNTING -> Value.FINANCE_ACCOUNTING
FOOD_SERVICES -> Value.FOOD_SERVICES
GOVERNMENT -> Value.GOVERNMENT
HEALTHCARE -> Value.HEALTHCARE
LEGAL_SERVICES -> Value.LEGAL_SERVICES
MANUFACTURING -> Value.MANUFACTURING
OTHER -> Value.OTHER
SALES -> Value.SALES
SCIENCE_ENGINEERING -> Value.SCIENCE_ENGINEERING
TECHNOLOGY -> Value.TECHNOLOGY
else -> Value._UNKNOWN
}
fun known(): Known =
when (this) {
CONSULTING -> Known.CONSULTING
EXECUTIVE -> Known.EXECUTIVE
FINANCE_ACCOUNTING -> Known.FINANCE_ACCOUNTING
FOOD_SERVICES -> Known.FOOD_SERVICES
GOVERNMENT -> Known.GOVERNMENT
HEALTHCARE -> Known.HEALTHCARE
LEGAL_SERVICES -> Known.LEGAL_SERVICES
MANUFACTURING -> Known.MANUFACTURING
OTHER -> Known.OTHER
SALES -> Known.SALES
SCIENCE_ENGINEERING -> Known.SCIENCE_ENGINEERING
TECHNOLOGY -> Known.TECHNOLOGY
else -> throw ModernTreasuryInvalidDataException("Unknown Occupation: $value")
}
fun asString(): String = _value().asStringOrThrow()
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}
return /* spotless:off */ other is Occupation && value == other.value /* spotless:on */
}
override fun hashCode() = value.hashCode()
override fun toString() = value.toString()
}
class SourceOfFunds
@JsonCreator
private constructor(
private val value: JsonField,
) : Enum {
@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
companion object {
val ALIMONY = of("alimony")
val ANNUITY = of("annuity")
val BUSINESS_OWNER = of("business_owner")
val GENERAL_EMPLOYEE = of("general_employee")
val GOVERNMENT_BENEFITS = of("government_benefits")
val HOMEMAKER = of("homemaker")
val INHERITANCE_GIFT = of("inheritance_gift")
val INVESTMENT = of("investment")
val LEGAL_SETTLEMENT = of("legal_settlement")
val LOTTERY = of("lottery")
val REAL_ESTATE = of("real_estate")
val RETIRED = of("retired")
val RETIREMENT = of("retirement")
val SALARY = of("salary")
val SELF_EMPLOYED = of("self_employed")
val SENIOR_EXECUTIVE = of("senior_executive")
val TRUST_INCOME = of("trust_income")
fun of(value: String) = SourceOfFunds(JsonField.of(value))
}
enum class Known {
ALIMONY,
ANNUITY,
BUSINESS_OWNER,
GENERAL_EMPLOYEE,
GOVERNMENT_BENEFITS,
HOMEMAKER,
INHERITANCE_GIFT,
INVESTMENT,
LEGAL_SETTLEMENT,
LOTTERY,
REAL_ESTATE,
RETIRED,
RETIREMENT,
SALARY,
SELF_EMPLOYED,
SENIOR_EXECUTIVE,
TRUST_INCOME,
}
enum class Value {
ALIMONY,
ANNUITY,
BUSINESS_OWNER,
GENERAL_EMPLOYEE,
GOVERNMENT_BENEFITS,
HOMEMAKER,
INHERITANCE_GIFT,
INVESTMENT,
LEGAL_SETTLEMENT,
LOTTERY,
REAL_ESTATE,
RETIRED,
RETIREMENT,
SALARY,
SELF_EMPLOYED,
SENIOR_EXECUTIVE,
TRUST_INCOME,
_UNKNOWN,
}
fun value(): Value =
when (this) {
ALIMONY -> Value.ALIMONY
ANNUITY -> Value.ANNUITY
BUSINESS_OWNER -> Value.BUSINESS_OWNER
GENERAL_EMPLOYEE -> Value.GENERAL_EMPLOYEE
GOVERNMENT_BENEFITS -> Value.GOVERNMENT_BENEFITS
HOMEMAKER -> Value.HOMEMAKER
INHERITANCE_GIFT -> Value.INHERITANCE_GIFT
INVESTMENT -> Value.INVESTMENT
LEGAL_SETTLEMENT -> Value.LEGAL_SETTLEMENT
LOTTERY -> Value.LOTTERY
REAL_ESTATE -> Value.REAL_ESTATE
RETIRED -> Value.RETIRED
RETIREMENT -> Value.RETIREMENT
SALARY -> Value.SALARY
SELF_EMPLOYED -> Value.SELF_EMPLOYED
SENIOR_EXECUTIVE -> Value.SENIOR_EXECUTIVE
TRUST_INCOME -> Value.TRUST_INCOME
else -> Value._UNKNOWN
}
fun known(): Known =
when (this) {
ALIMONY -> Known.ALIMONY
ANNUITY -> Known.ANNUITY
BUSINESS_OWNER -> Known.BUSINESS_OWNER
GENERAL_EMPLOYEE -> Known.GENERAL_EMPLOYEE
GOVERNMENT_BENEFITS -> Known.GOVERNMENT_BENEFITS
HOMEMAKER -> Known.HOMEMAKER
INHERITANCE_GIFT -> Known.INHERITANCE_GIFT
INVESTMENT -> Known.INVESTMENT
LEGAL_SETTLEMENT -> Known.LEGAL_SETTLEMENT
LOTTERY -> Known.LOTTERY
REAL_ESTATE -> Known.REAL_ESTATE
RETIRED -> Known.RETIRED
RETIREMENT -> Known.RETIREMENT
SALARY -> Known.SALARY
SELF_EMPLOYED -> Known.SELF_EMPLOYED
SENIOR_EXECUTIVE -> Known.SENIOR_EXECUTIVE
TRUST_INCOME -> Known.TRUST_INCOME
else -> throw ModernTreasuryInvalidDataException("Unknown SourceOfFunds: $value")
}
fun asString(): String = _value().asStringOrThrow()
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}
return /* spotless:off */ other is SourceOfFunds && value == other.value /* spotless:on */
}
override fun hashCode() = value.hashCode()
override fun toString() = value.toString()
}
class WealthSource
@JsonCreator
private constructor(
private val value: JsonField,
) : Enum {
@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
companion object {
val BUSINESS_SALE = of("business_sale")
val FAMILY_SUPPORT = of("family_support")
val GOVERNMENT_BENEFITS = of("government_benefits")
val INHERITANCE = of("inheritance")
val INVESTMENTS = of("investments")
val OTHER = of("other")
val RENTAL_INCOME = of("rental_income")
val RETIREMENT = of("retirement")
val SALARY = of("salary")
val SELF_EMPLOYED = of("self_employed")
fun of(value: String) = WealthSource(JsonField.of(value))
}
enum class Known {
BUSINESS_SALE,
FAMILY_SUPPORT,
GOVERNMENT_BENEFITS,
INHERITANCE,
INVESTMENTS,
OTHER,
RENTAL_INCOME,
RETIREMENT,
SALARY,
SELF_EMPLOYED,
}
enum class Value {
BUSINESS_SALE,
FAMILY_SUPPORT,
GOVERNMENT_BENEFITS,
INHERITANCE,
INVESTMENTS,
OTHER,
RENTAL_INCOME,
RETIREMENT,
SALARY,
SELF_EMPLOYED,
_UNKNOWN,
}
fun value(): Value =
when (this) {
BUSINESS_SALE -> Value.BUSINESS_SALE
FAMILY_SUPPORT -> Value.FAMILY_SUPPORT
GOVERNMENT_BENEFITS -> Value.GOVERNMENT_BENEFITS
INHERITANCE -> Value.INHERITANCE
INVESTMENTS -> Value.INVESTMENTS
OTHER -> Value.OTHER
RENTAL_INCOME -> Value.RENTAL_INCOME
RETIREMENT -> Value.RETIREMENT
SALARY -> Value.SALARY
SELF_EMPLOYED -> Value.SELF_EMPLOYED
else -> Value._UNKNOWN
}
fun known(): Known =
when (this) {
BUSINESS_SALE -> Known.BUSINESS_SALE
FAMILY_SUPPORT -> Known.FAMILY_SUPPORT
GOVERNMENT_BENEFITS -> Known.GOVERNMENT_BENEFITS
INHERITANCE -> Known.INHERITANCE
INVESTMENTS -> Known.INVESTMENTS
OTHER -> Known.OTHER
RENTAL_INCOME -> Known.RENTAL_INCOME
RETIREMENT -> Known.RETIREMENT
SALARY -> Known.SALARY
SELF_EMPLOYED -> Known.SELF_EMPLOYED
else -> throw ModernTreasuryInvalidDataException("Unknown WealthSource: $value")
}
fun asString(): String = _value().asStringOrThrow()
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}
return /* spotless:off */ other is WealthSource && value == other.value /* spotless:on */
}
override fun hashCode() = value.hashCode()
override fun toString() = value.toString()
}
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}
return /* spotless:off */ other is WealthAndEmploymentDetails && id == other.id && object_ == other.object_ && liveMode == other.liveMode && createdAt == other.createdAt && updatedAt == other.updatedAt && discardedAt == other.discardedAt && employmentStatus == other.employmentStatus && occupation == other.occupation && industry == other.industry && incomeSource == other.incomeSource && incomeState == other.incomeState && incomeCountry == other.incomeCountry && employerName == other.employerName && employerState == other.employerState && employerCountry == other.employerCountry && sourceOfFunds == other.sourceOfFunds && wealthSource == other.wealthSource && annualIncome == other.annualIncome && additionalProperties == other.additionalProperties /* spotless:on */
}
/* spotless:off */
private val hashCode: Int by lazy { Objects.hash(id, object_, liveMode, createdAt, updatedAt, discardedAt, employmentStatus, occupation, industry, incomeSource, incomeState, incomeCountry, employerName, employerState, employerCountry, sourceOfFunds, wealthSource, annualIncome, additionalProperties) }
/* spotless:on */
override fun hashCode(): Int = hashCode
override fun toString() =
"WealthAndEmploymentDetails{id=$id, object_=$object_, liveMode=$liveMode, createdAt=$createdAt, updatedAt=$updatedAt, discardedAt=$discardedAt, employmentStatus=$employmentStatus, occupation=$occupation, industry=$industry, incomeSource=$incomeSource, incomeState=$incomeState, incomeCountry=$incomeCountry, employerName=$employerName, employerState=$employerState, employerCountry=$employerCountry, sourceOfFunds=$sourceOfFunds, wealthSource=$wealthSource, annualIncome=$annualIncome, additionalProperties=$additionalProperties}"
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy