diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 89c23bac..1f73031b 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "3.1.1"
+ ".": "3.2.0"
}
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 524d097e..9b31127e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,33 @@
# Changelog
+## 3.2.0 (2025-01-08)
+
+Full Changelog: [v3.1.1...v3.2.0](https://github.com/Finch-API/finch-api-java/compare/v3.1.1...v3.2.0)
+
+### Features
+
+* **client:** add various convenience setters to models ([#387](https://github.com/Finch-API/finch-api-java/issues/387)) ([051f37d](https://github.com/Finch-API/finch-api-java/commit/051f37d5ce901f5a05797d50dad3fc177a893012))
+* **client:** allow setting arbitrary JSON for top-level body params ([051f37d](https://github.com/Finch-API/finch-api-java/commit/051f37d5ce901f5a05797d50dad3fc177a893012))
+* **client:** expose getters for `JsonField` of body params ([051f37d](https://github.com/Finch-API/finch-api-java/commit/051f37d5ce901f5a05797d50dad3fc177a893012))
+
+
+### Bug Fixes
+
+* **client:** consistently throw on omitting required fields ([051f37d](https://github.com/Finch-API/finch-api-java/commit/051f37d5ce901f5a05797d50dad3fc177a893012))
+* **client:** convert `JsonField` containing list type to mutable in builder ([051f37d](https://github.com/Finch-API/finch-api-java/commit/051f37d5ce901f5a05797d50dad3fc177a893012))
+
+
+### Chores
+
+* **internal:** codegen related update ([#389](https://github.com/Finch-API/finch-api-java/issues/389)) ([75e1dfd](https://github.com/Finch-API/finch-api-java/commit/75e1dfd7cb81654e68221e8426d8d4d27ce8b6e6))
+
+
+### Styles
+
+* **internal:** explicitly add some method return types ([051f37d](https://github.com/Finch-API/finch-api-java/commit/051f37d5ce901f5a05797d50dad3fc177a893012))
+* **internal:** move headers and query params setters below others ([051f37d](https://github.com/Finch-API/finch-api-java/commit/051f37d5ce901f5a05797d50dad3fc177a893012))
+* **internal:** simplify existing convenience setters on params ([051f37d](https://github.com/Finch-API/finch-api-java/commit/051f37d5ce901f5a05797d50dad3fc177a893012))
+
## 3.1.1 (2025-01-07)
Full Changelog: [v3.1.0...v3.1.1](https://github.com/Finch-API/finch-api-java/compare/v3.1.0...v3.1.1)
diff --git a/README.md b/README.md
index d69de054..4850869b 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
-[](https://central.sonatype.com/artifact/com.tryfinch.api/finch-java/3.1.1)
+[](https://central.sonatype.com/artifact/com.tryfinch.api/finch-java/3.2.0)
@@ -27,7 +27,7 @@ The REST API documentation can be foundĀ [in the Finch Documentation Center](htt
```kotlin
-implementation("com.tryfinch.api:finch-java:3.1.1")
+implementation("com.tryfinch.api:finch-java:3.2.0")
```
#### Maven
@@ -36,7 +36,7 @@ implementation("com.tryfinch.api:finch-java:3.1.1")
com.tryfinch.api
finch-java
- 3.1.1
+ 3.2.0
```
@@ -369,7 +369,7 @@ $ export FINCH_LOG=debug
This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:
-1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals)_.
+1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_
2. Changes that we do not expect to impact the vast majority of users in practice.
We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
diff --git a/build.gradle.kts b/build.gradle.kts
index 23a67a69..61e2ae01 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -4,7 +4,7 @@ plugins {
allprojects {
group = "com.tryfinch.api"
- version = "3.1.1" // x-release-please-version
+ version = "3.2.0" // x-release-please-version
}
diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/core/ClientOptions.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/core/ClientOptions.kt
index 743402d6..b397c26c 100644
--- a/finch-java-core/src/main/kotlin/com/tryfinch/api/core/ClientOptions.kt
+++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/core/ClientOptions.kt
@@ -79,6 +79,29 @@ private constructor(
fun baseUrl(baseUrl: String) = apply { this.baseUrl = baseUrl }
+ fun responseValidation(responseValidation: Boolean) = apply {
+ this.responseValidation = responseValidation
+ }
+
+ fun maxRetries(maxRetries: Int) = apply { this.maxRetries = maxRetries }
+
+ fun accessToken(accessToken: String?) = apply { this.accessToken = accessToken }
+
+ fun accessToken(accessToken: Optional) = accessToken(accessToken.orElse(null))
+
+ fun clientId(clientId: String?) = apply { this.clientId = clientId }
+
+ fun clientId(clientId: Optional) = clientId(clientId.orElse(null))
+
+ fun clientSecret(clientSecret: String?) = apply { this.clientSecret = clientSecret }
+
+ fun clientSecret(clientSecret: Optional) = clientSecret(clientSecret.orElse(null))
+
+ fun webhookSecret(webhookSecret: String?) = apply { this.webhookSecret = webhookSecret }
+
+ fun webhookSecret(webhookSecret: Optional) =
+ webhookSecret(webhookSecret.orElse(null))
+
fun headers(headers: Headers) = apply {
this.headers.clear()
putAllHeaders(headers)
@@ -159,29 +182,6 @@ private constructor(
fun removeAllQueryParams(keys: Set) = apply { queryParams.removeAll(keys) }
- fun responseValidation(responseValidation: Boolean) = apply {
- this.responseValidation = responseValidation
- }
-
- fun maxRetries(maxRetries: Int) = apply { this.maxRetries = maxRetries }
-
- fun accessToken(accessToken: String?) = apply { this.accessToken = accessToken }
-
- fun accessToken(accessToken: Optional) = accessToken(accessToken.orElse(null))
-
- fun clientId(clientId: String?) = apply { this.clientId = clientId }
-
- fun clientId(clientId: Optional) = clientId(clientId.orElse(null))
-
- fun clientSecret(clientSecret: String?) = apply { this.clientSecret = clientSecret }
-
- fun clientSecret(clientSecret: Optional) = clientSecret(clientSecret.orElse(null))
-
- fun webhookSecret(webhookSecret: String?) = apply { this.webhookSecret = webhookSecret }
-
- fun webhookSecret(webhookSecret: Optional) =
- webhookSecret(webhookSecret.orElse(null))
-
fun fromEnv() = apply {
System.getenv("FINCH_CLIENT_ID")?.let { clientId(it) }
System.getenv("FINCH_CLIENT_SECRET")?.let { clientSecret(it) }
diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccessTokenCreateParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccessTokenCreateParams.kt
index 1ea13c0a..726764c7 100644
--- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccessTokenCreateParams.kt
+++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccessTokenCreateParams.kt
@@ -7,6 +7,8 @@ import com.fasterxml.jackson.annotation.JsonAnySetter
import com.fasterxml.jackson.annotation.JsonCreator
import com.fasterxml.jackson.annotation.JsonProperty
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.http.Headers
@@ -32,12 +34,20 @@ constructor(
fun redirectUri(): Optional = body.redirectUri()
- fun _additionalHeaders(): Headers = additionalHeaders
+ fun _code(): JsonField = body._code()
- fun _additionalQueryParams(): QueryParams = additionalQueryParams
+ fun _clientId(): JsonField = body._clientId()
+
+ fun _clientSecret(): JsonField = body._clientSecret()
+
+ fun _redirectUri(): JsonField = body._redirectUri()
fun _additionalBodyProperties(): Map = body._additionalProperties()
+ fun _additionalHeaders(): Headers = additionalHeaders
+
+ fun _additionalQueryParams(): QueryParams = additionalQueryParams
+
@JvmSynthetic internal fun getBody(): AccessTokenCreateBody = body
@JvmSynthetic internal fun getHeaders(): Headers = additionalHeaders
@@ -48,28 +58,60 @@ constructor(
class AccessTokenCreateBody
@JsonCreator
internal constructor(
- @JsonProperty("code") private val code: String,
- @JsonProperty("client_id") private val clientId: String?,
- @JsonProperty("client_secret") private val clientSecret: String?,
- @JsonProperty("redirect_uri") private val redirectUri: String?,
+ @JsonProperty("code")
+ @ExcludeMissing
+ private val code: JsonField = JsonMissing.of(),
+ @JsonProperty("client_id")
+ @ExcludeMissing
+ private val clientId: JsonField = JsonMissing.of(),
+ @JsonProperty("client_secret")
+ @ExcludeMissing
+ private val clientSecret: JsonField = JsonMissing.of(),
+ @JsonProperty("redirect_uri")
+ @ExcludeMissing
+ private val redirectUri: JsonField = JsonMissing.of(),
@JsonAnySetter
private val additionalProperties: Map = immutableEmptyMap(),
) {
- @JsonProperty("code") fun code(): String = code
+ fun code(): String = code.getRequired("code")
+
+ fun clientId(): Optional = Optional.ofNullable(clientId.getNullable("client_id"))
+
+ fun clientSecret(): Optional =
+ Optional.ofNullable(clientSecret.getNullable("client_secret"))
+
+ fun redirectUri(): Optional =
+ Optional.ofNullable(redirectUri.getNullable("redirect_uri"))
- @JsonProperty("client_id") fun clientId(): Optional = Optional.ofNullable(clientId)
+ @JsonProperty("code") @ExcludeMissing fun _code(): JsonField = code
+
+ @JsonProperty("client_id") @ExcludeMissing fun _clientId(): JsonField = clientId
@JsonProperty("client_secret")
- fun clientSecret(): Optional = Optional.ofNullable(clientSecret)
+ @ExcludeMissing
+ fun _clientSecret(): JsonField = clientSecret
@JsonProperty("redirect_uri")
- fun redirectUri(): Optional = Optional.ofNullable(redirectUri)
+ @ExcludeMissing
+ fun _redirectUri(): JsonField = redirectUri
@JsonAnyGetter
@ExcludeMissing
fun _additionalProperties(): Map = additionalProperties
+ private var validated: Boolean = false
+
+ fun validate(): AccessTokenCreateBody = apply {
+ if (!validated) {
+ code()
+ clientId()
+ clientSecret()
+ redirectUri()
+ validated = true
+ }
+ }
+
fun toBuilder() = Builder().from(this)
companion object {
@@ -79,10 +121,10 @@ constructor(
class Builder {
- private var code: String? = null
- private var clientId: String? = null
- private var clientSecret: String? = null
- private var redirectUri: String? = null
+ private var code: JsonField? = null
+ private var clientId: JsonField = JsonMissing.of()
+ private var clientSecret: JsonField = JsonMissing.of()
+ private var redirectUri: JsonField = JsonMissing.of()
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
@@ -94,20 +136,25 @@ constructor(
additionalProperties = accessTokenCreateBody.additionalProperties.toMutableMap()
}
- fun code(code: String) = apply { this.code = code }
+ fun code(code: String) = code(JsonField.of(code))
- fun clientId(clientId: String?) = apply { this.clientId = clientId }
+ fun code(code: JsonField) = apply { this.code = code }
- fun clientId(clientId: Optional) = clientId(clientId.orElse(null))
+ fun clientId(clientId: String) = clientId(JsonField.of(clientId))
- fun clientSecret(clientSecret: String?) = apply { this.clientSecret = clientSecret }
+ fun clientId(clientId: JsonField) = apply { this.clientId = clientId }
- fun clientSecret(clientSecret: Optional) =
- clientSecret(clientSecret.orElse(null))
+ fun clientSecret(clientSecret: String) = clientSecret(JsonField.of(clientSecret))
- fun redirectUri(redirectUri: String?) = apply { this.redirectUri = redirectUri }
+ fun clientSecret(clientSecret: JsonField) = apply {
+ this.clientSecret = clientSecret
+ }
- fun redirectUri(redirectUri: Optional) = redirectUri(redirectUri.orElse(null))
+ fun redirectUri(redirectUri: String) = redirectUri(JsonField.of(redirectUri))
+
+ fun redirectUri(redirectUri: JsonField) = apply {
+ this.redirectUri = redirectUri
+ }
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
@@ -179,17 +226,40 @@ constructor(
fun code(code: String) = apply { body.code(code) }
- fun clientId(clientId: String?) = apply { body.clientId(clientId) }
+ fun code(code: JsonField) = apply { body.code(code) }
+
+ fun clientId(clientId: String) = apply { body.clientId(clientId) }
- fun clientId(clientId: Optional) = clientId(clientId.orElse(null))
+ fun clientId(clientId: JsonField) = apply { body.clientId(clientId) }
- fun clientSecret(clientSecret: String?) = apply { body.clientSecret(clientSecret) }
+ fun clientSecret(clientSecret: String) = apply { body.clientSecret(clientSecret) }
+
+ fun clientSecret(clientSecret: JsonField) = apply {
+ body.clientSecret(clientSecret)
+ }
- fun clientSecret(clientSecret: Optional) = clientSecret(clientSecret.orElse(null))
+ fun redirectUri(redirectUri: String) = apply { body.redirectUri(redirectUri) }
- fun redirectUri(redirectUri: String?) = apply { body.redirectUri(redirectUri) }
+ fun redirectUri(redirectUri: JsonField) = apply { body.redirectUri(redirectUri) }
- fun redirectUri(redirectUri: Optional) = redirectUri(redirectUri.orElse(null))
+ fun additionalBodyProperties(additionalBodyProperties: Map) = apply {
+ body.additionalProperties(additionalBodyProperties)
+ }
+
+ fun putAdditionalBodyProperty(key: String, value: JsonValue) = apply {
+ body.putAdditionalProperty(key, value)
+ }
+
+ fun putAllAdditionalBodyProperties(additionalBodyProperties: Map) =
+ apply {
+ body.putAllAdditionalProperties(additionalBodyProperties)
+ }
+
+ fun removeAdditionalBodyProperty(key: String) = apply { body.removeAdditionalProperty(key) }
+
+ fun removeAllAdditionalBodyProperties(keys: Set) = apply {
+ body.removeAllAdditionalProperties(keys)
+ }
fun additionalHeaders(additionalHeaders: Headers) = apply {
this.additionalHeaders.clear()
@@ -289,25 +359,6 @@ constructor(
additionalQueryParams.removeAll(keys)
}
- fun additionalBodyProperties(additionalBodyProperties: Map) = apply {
- body.additionalProperties(additionalBodyProperties)
- }
-
- fun putAdditionalBodyProperty(key: String, value: JsonValue) = apply {
- body.putAdditionalProperty(key, value)
- }
-
- fun putAllAdditionalBodyProperties(additionalBodyProperties: Map) =
- apply {
- body.putAllAdditionalProperties(additionalBodyProperties)
- }
-
- fun removeAdditionalBodyProperty(key: String) = apply { body.removeAdditionalProperty(key) }
-
- fun removeAllAdditionalBodyProperties(keys: Set) = apply {
- body.removeAllAdditionalProperties(keys)
- }
-
fun build(): AccessTokenCreateParams =
AccessTokenCreateParams(
body.build(),
diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountCreateResponse.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountCreateResponse.kt
index 328ed3c2..253bb585 100644
--- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountCreateResponse.kt
+++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountCreateResponse.kt
@@ -64,25 +64,29 @@ private constructor(
/** The ID of the provider associated with the `access_token` */
fun providerId(): String = providerId.getRequired("provider_id")
- @JsonProperty("access_token") @ExcludeMissing fun _accessToken() = accessToken
+ @JsonProperty("access_token")
+ @ExcludeMissing
+ fun _accessToken(): JsonField = accessToken
/** [DEPRECATED] Use `connection_id` to associate a connection with an access token */
- @JsonProperty("account_id") @ExcludeMissing fun _accountId() = accountId
+ @JsonProperty("account_id") @ExcludeMissing fun _accountId(): JsonField = accountId
@JsonProperty("authentication_type")
@ExcludeMissing
- fun _authenticationType() = authenticationType
+ fun _authenticationType(): JsonField = authenticationType
/** [DEPRECATED] Use `connection_id` to associate a connection with an access token */
- @JsonProperty("company_id") @ExcludeMissing fun _companyId() = companyId
+ @JsonProperty("company_id") @ExcludeMissing fun _companyId(): JsonField = companyId
/** The ID of the new connection */
- @JsonProperty("connection_id") @ExcludeMissing fun _connectionId() = connectionId
+ @JsonProperty("connection_id")
+ @ExcludeMissing
+ fun _connectionId(): JsonField = connectionId
- @JsonProperty("products") @ExcludeMissing fun _products() = products
+ @JsonProperty("products") @ExcludeMissing fun _products(): JsonField> = products
/** The ID of the provider associated with the `access_token` */
- @JsonProperty("provider_id") @ExcludeMissing fun _providerId() = providerId
+ @JsonProperty("provider_id") @ExcludeMissing fun _providerId(): JsonField = providerId
@JsonAnyGetter
@ExcludeMissing
@@ -112,13 +116,13 @@ private constructor(
class Builder {
- private var accessToken: JsonField = JsonMissing.of()
- private var accountId: JsonField = JsonMissing.of()
- private var authenticationType: JsonField = JsonMissing.of()
- private var companyId: JsonField = JsonMissing.of()
- private var connectionId: JsonField = JsonMissing.of()
- private var products: JsonField> = JsonMissing.of()
- private var providerId: JsonField = JsonMissing.of()
+ private var accessToken: JsonField? = null
+ private var accountId: JsonField? = null
+ private var authenticationType: JsonField? = null
+ private var companyId: JsonField? = null
+ private var connectionId: JsonField? = null
+ private var products: JsonField>? = null
+ private var providerId: JsonField? = null
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
@@ -128,7 +132,7 @@ private constructor(
authenticationType = accountCreateResponse.authenticationType
companyId = accountCreateResponse.companyId
connectionId = accountCreateResponse.connectionId
- products = accountCreateResponse.products
+ products = accountCreateResponse.products.map { it.toMutableList() }
providerId = accountCreateResponse.providerId
additionalProperties = accountCreateResponse.additionalProperties.toMutableMap()
}
@@ -166,7 +170,22 @@ private constructor(
fun products(products: List) = products(JsonField.of(products))
- fun products(products: JsonField>) = apply { this.products = products }
+ fun products(products: JsonField>) = apply {
+ this.products = products.map { it.toMutableList() }
+ }
+
+ fun addProduct(product: String) = apply {
+ products =
+ (products ?: JsonField.of(mutableListOf())).apply {
+ asKnown()
+ .orElseThrow {
+ IllegalStateException(
+ "Field was set to non-list type: ${javaClass.simpleName}"
+ )
+ }
+ .add(product)
+ }
+ }
/** The ID of the provider associated with the `access_token` */
fun providerId(providerId: String) = providerId(JsonField.of(providerId))
@@ -195,13 +214,16 @@ private constructor(
fun build(): AccountCreateResponse =
AccountCreateResponse(
- accessToken,
- accountId,
- authenticationType,
- companyId,
- connectionId,
- products.map { it.toImmutable() },
- providerId,
+ checkNotNull(accessToken) { "`accessToken` is required but was not set" },
+ checkNotNull(accountId) { "`accountId` is required but was not set" },
+ checkNotNull(authenticationType) {
+ "`authenticationType` is required but was not set"
+ },
+ checkNotNull(companyId) { "`companyId` is required but was not set" },
+ checkNotNull(connectionId) { "`connectionId` is required but was not set" },
+ checkNotNull(products) { "`products` is required but was not set" }
+ .map { it.toImmutable() },
+ checkNotNull(providerId) { "`providerId` is required but was not set" },
additionalProperties.toImmutable(),
)
}
diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountUpdateEvent.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountUpdateEvent.kt
index cee081a2..c01ee175 100644
--- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountUpdateEvent.kt
+++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountUpdateEvent.kt
@@ -62,20 +62,22 @@ private constructor(
* [DEPRECATED] Unique Finch ID of the employer account used to make this connection. Use
* `connection_id` instead to identify the connection associated with this event.
*/
- @JsonProperty("account_id") @ExcludeMissing fun _accountId() = accountId
+ @JsonProperty("account_id") @ExcludeMissing fun _accountId(): JsonField = accountId
/**
* [DEPRECATED] Unique Finch ID of the company for which data has been updated. Use
* `connection_id` instead to identify the connection associated with this event.
*/
- @JsonProperty("company_id") @ExcludeMissing fun _companyId() = companyId
+ @JsonProperty("company_id") @ExcludeMissing fun _companyId(): JsonField = companyId
/** Unique Finch ID of the connection associated with the webhook event. */
- @JsonProperty("connection_id") @ExcludeMissing fun _connectionId() = connectionId
+ @JsonProperty("connection_id")
+ @ExcludeMissing
+ fun _connectionId(): JsonField = connectionId
- @JsonProperty("data") @ExcludeMissing fun _data() = data
+ @JsonProperty("data") @ExcludeMissing fun _data(): JsonField = data
- @JsonProperty("event_type") @ExcludeMissing fun _eventType() = eventType
+ @JsonProperty("event_type") @ExcludeMissing fun _eventType(): JsonField = eventType
@JsonAnyGetter
@ExcludeMissing
@@ -110,8 +112,8 @@ private constructor(
class Builder {
- private var accountId: JsonField = JsonMissing.of()
- private var companyId: JsonField = JsonMissing.of()
+ private var accountId: JsonField? = null
+ private var companyId: JsonField? = null
private var connectionId: JsonField = JsonMissing.of()
private var data: JsonField = JsonMissing.of()
private var eventType: JsonField = JsonMissing.of()
@@ -188,8 +190,8 @@ private constructor(
fun build(): AccountUpdateEvent =
AccountUpdateEvent(
- accountId,
- companyId,
+ checkNotNull(accountId) { "`accountId` is required but was not set" },
+ checkNotNull(companyId) { "`companyId` is required but was not set" },
connectionId,
data,
eventType,
@@ -218,9 +220,11 @@ private constructor(
@JsonProperty("authentication_method")
@ExcludeMissing
- fun _authenticationMethod() = authenticationMethod
+ fun _authenticationMethod(): JsonField = authenticationMethod
- @JsonProperty("status") @ExcludeMissing fun _status() = status
+ @JsonProperty("status")
+ @ExcludeMissing
+ fun _status(): JsonField = status
@JsonAnyGetter
@ExcludeMissing
@@ -245,8 +249,8 @@ private constructor(
class Builder {
- private var authenticationMethod: JsonField = JsonMissing.of()
- private var status: JsonField = JsonMissing.of()
+ private var authenticationMethod: JsonField? = null
+ private var status: JsonField? = null
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
@@ -289,8 +293,10 @@ private constructor(
fun build(): Data =
Data(
- authenticationMethod,
- status,
+ checkNotNull(authenticationMethod) {
+ "`authenticationMethod` is required but was not set"
+ },
+ checkNotNull(status) { "`status` is required but was not set" },
additionalProperties.toImmutable(),
)
}
@@ -332,15 +338,15 @@ private constructor(
*/
@JsonProperty("benefits_support")
@ExcludeMissing
- fun _benefitsSupport() = benefitsSupport
+ fun _benefitsSupport(): JsonField = benefitsSupport
/** The supported data fields returned by our HR and payroll endpoints */
@JsonProperty("supported_fields")
@ExcludeMissing
- fun _supportedFields() = supportedFields
+ fun _supportedFields(): JsonField = supportedFields
/** The type of authentication method. */
- @JsonProperty("type") @ExcludeMissing fun _type() = type
+ @JsonProperty("type") @ExcludeMissing fun _type(): JsonField = type
@JsonAnyGetter
@ExcludeMissing
@@ -383,8 +389,15 @@ private constructor(
* 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))
+ fun benefitsSupport(benefitsSupport: BenefitsSupport?) =
+ benefitsSupport(JsonField.ofNullable(benefitsSupport))
+
+ /**
+ * Each benefit type and their supported features. If the benefit type is not
+ * supported, the property will be null
+ */
+ fun benefitsSupport(benefitsSupport: Optional) =
+ benefitsSupport(benefitsSupport.orElse(null))
/**
* Each benefit type and their supported features. If the benefit type is not
@@ -395,8 +408,12 @@ private constructor(
}
/** The supported data fields returned by our HR and payroll endpoints */
- fun supportedFields(supportedFields: SupportedFields) =
- supportedFields(JsonField.of(supportedFields))
+ fun supportedFields(supportedFields: SupportedFields?) =
+ supportedFields(JsonField.ofNullable(supportedFields))
+
+ /** The supported data fields returned by our HR and payroll endpoints */
+ fun supportedFields(supportedFields: Optional) =
+ supportedFields(supportedFields.orElse(null))
/** The supported data fields returned by our HR and payroll endpoints */
fun supportedFields(supportedFields: JsonField) = apply {
@@ -491,19 +508,33 @@ private constructor(
fun payment(): Optional =
Optional.ofNullable(payment.getNullable("payment"))
- @JsonProperty("company") @ExcludeMissing fun _company() = company
+ @JsonProperty("company")
+ @ExcludeMissing
+ fun _company(): JsonField = company
- @JsonProperty("directory") @ExcludeMissing fun _directory() = directory
+ @JsonProperty("directory")
+ @ExcludeMissing
+ fun _directory(): JsonField = directory
- @JsonProperty("employment") @ExcludeMissing fun _employment() = employment
+ @JsonProperty("employment")
+ @ExcludeMissing
+ fun _employment(): JsonField = employment
- @JsonProperty("individual") @ExcludeMissing fun _individual() = individual
+ @JsonProperty("individual")
+ @ExcludeMissing
+ fun _individual(): JsonField = individual
- @JsonProperty("pay_group") @ExcludeMissing fun _payGroup() = payGroup
+ @JsonProperty("pay_group")
+ @ExcludeMissing
+ fun _payGroup(): JsonField = payGroup
- @JsonProperty("pay_statement") @ExcludeMissing fun _payStatement() = payStatement
+ @JsonProperty("pay_statement")
+ @ExcludeMissing
+ fun _payStatement(): JsonField = payStatement
- @JsonProperty("payment") @ExcludeMissing fun _payment() = payment
+ @JsonProperty("payment")
+ @ExcludeMissing
+ fun _payment(): JsonField = payment
@JsonAnyGetter
@ExcludeMissing
@@ -697,27 +728,37 @@ private constructor(
fun primaryPhoneNumber(): Optional =
Optional.ofNullable(primaryPhoneNumber.getNullable("primary_phone_number"))
- @JsonProperty("id") @ExcludeMissing fun _id() = id
+ @JsonProperty("id") @ExcludeMissing fun _id(): JsonField = id
- @JsonProperty("accounts") @ExcludeMissing fun _accounts() = accounts
+ @JsonProperty("accounts")
+ @ExcludeMissing
+ fun _accounts(): JsonField = accounts
- @JsonProperty("departments") @ExcludeMissing fun _departments() = departments
+ @JsonProperty("departments")
+ @ExcludeMissing
+ fun _departments(): JsonField = departments
- @JsonProperty("ein") @ExcludeMissing fun _ein() = ein
+ @JsonProperty("ein") @ExcludeMissing fun _ein(): JsonField = ein
- @JsonProperty("entity") @ExcludeMissing fun _entity() = entity
+ @JsonProperty("entity")
+ @ExcludeMissing
+ fun _entity(): JsonField = entity
- @JsonProperty("legal_name") @ExcludeMissing fun _legalName() = legalName
+ @JsonProperty("legal_name")
+ @ExcludeMissing
+ fun _legalName(): JsonField = legalName
- @JsonProperty("locations") @ExcludeMissing fun _locations() = locations
+ @JsonProperty("locations")
+ @ExcludeMissing
+ fun _locations(): JsonField = locations
@JsonProperty("primary_email")
@ExcludeMissing
- fun _primaryEmail() = primaryEmail
+ fun _primaryEmail(): JsonField = primaryEmail
@JsonProperty("primary_phone_number")
@ExcludeMissing
- fun _primaryPhoneNumber() = primaryPhoneNumber
+ fun _primaryPhoneNumber(): JsonField = primaryPhoneNumber
@JsonAnyGetter
@ExcludeMissing
@@ -905,23 +946,23 @@ private constructor(
@JsonProperty("account_name")
@ExcludeMissing
- fun _accountName() = accountName
+ fun _accountName(): JsonField = accountName
@JsonProperty("account_number")
@ExcludeMissing
- fun _accountNumber() = accountNumber
+ fun _accountNumber(): JsonField = accountNumber
@JsonProperty("account_type")
@ExcludeMissing
- fun _accountType() = accountType
+ fun _accountType(): JsonField = accountType
@JsonProperty("institution_name")
@ExcludeMissing
- fun _institutionName() = institutionName
+ fun _institutionName(): JsonField = institutionName
@JsonProperty("routing_number")
@ExcludeMissing
- fun _routingNumber() = routingNumber
+ fun _routingNumber(): JsonField = routingNumber
@JsonAnyGetter
@ExcludeMissing
@@ -1074,9 +1115,11 @@ private constructor(
fun parent(): Optional =
Optional.ofNullable(parent.getNullable("parent"))
- @JsonProperty("name") @ExcludeMissing fun _name() = name
+ @JsonProperty("name") @ExcludeMissing fun _name(): JsonField = name
- @JsonProperty("parent") @ExcludeMissing fun _parent() = parent
+ @JsonProperty("parent")
+ @ExcludeMissing
+ fun _parent(): JsonField = parent
@JsonAnyGetter
@ExcludeMissing
@@ -1167,7 +1210,9 @@ private constructor(
fun name(): Optional =
Optional.ofNullable(name.getNullable("name"))
- @JsonProperty("name") @ExcludeMissing fun _name() = name
+ @JsonProperty("name")
+ @ExcludeMissing
+ fun _name(): JsonField = name
@JsonAnyGetter
@ExcludeMissing
@@ -1291,9 +1336,11 @@ private constructor(
fun type(): Optional =
Optional.ofNullable(type.getNullable("type"))
- @JsonProperty("subtype") @ExcludeMissing fun _subtype() = subtype
+ @JsonProperty("subtype")
+ @ExcludeMissing
+ fun _subtype(): JsonField = subtype
- @JsonProperty("type") @ExcludeMissing fun _type() = type
+ @JsonProperty("type") @ExcludeMissing fun _type(): JsonField = type
@JsonAnyGetter
@ExcludeMissing
@@ -1433,17 +1480,27 @@ private constructor(
fun state(): Optional =
Optional.ofNullable(state.getNullable("state"))
- @JsonProperty("city") @ExcludeMissing fun _city() = city
+ @JsonProperty("city") @ExcludeMissing fun _city(): JsonField = city
- @JsonProperty("country") @ExcludeMissing fun _country() = country
+ @JsonProperty("country")
+ @ExcludeMissing
+ fun _country(): JsonField = country
- @JsonProperty("line1") @ExcludeMissing fun _line1() = line1
+ @JsonProperty("line1")
+ @ExcludeMissing
+ fun _line1(): JsonField = line1
- @JsonProperty("line2") @ExcludeMissing fun _line2() = line2
+ @JsonProperty("line2")
+ @ExcludeMissing
+ fun _line2(): JsonField = line2
- @JsonProperty("postal_code") @ExcludeMissing fun _postalCode() = postalCode
+ @JsonProperty("postal_code")
+ @ExcludeMissing
+ fun _postalCode(): JsonField = postalCode
- @JsonProperty("state") @ExcludeMissing fun _state() = state
+ @JsonProperty("state")
+ @ExcludeMissing
+ fun _state(): JsonField = state
@JsonAnyGetter
@ExcludeMissing
@@ -1611,9 +1668,13 @@ private constructor(
fun paging(): Optional =
Optional.ofNullable(paging.getNullable("paging"))
- @JsonProperty("individuals") @ExcludeMissing fun _individuals() = individuals
+ @JsonProperty("individuals")
+ @ExcludeMissing
+ fun _individuals(): JsonField = individuals
- @JsonProperty("paging") @ExcludeMissing fun _paging() = paging
+ @JsonProperty("paging")
+ @ExcludeMissing
+ fun _paging(): JsonField = paging
@JsonAnyGetter
@ExcludeMissing
@@ -1743,19 +1804,31 @@ private constructor(
fun middleName(): Optional =
Optional.ofNullable(middleName.getNullable("middle_name"))
- @JsonProperty("id") @ExcludeMissing fun _id() = id
+ @JsonProperty("id") @ExcludeMissing fun _id(): JsonField = id
- @JsonProperty("department") @ExcludeMissing fun _department() = department
+ @JsonProperty("department")
+ @ExcludeMissing
+ fun _department(): JsonField = department
- @JsonProperty("first_name") @ExcludeMissing fun _firstName() = firstName
+ @JsonProperty("first_name")
+ @ExcludeMissing
+ fun _firstName(): JsonField = firstName
- @JsonProperty("is_active") @ExcludeMissing fun _isActive() = isActive
+ @JsonProperty("is_active")
+ @ExcludeMissing
+ fun _isActive(): JsonField = isActive
- @JsonProperty("last_name") @ExcludeMissing fun _lastName() = lastName
+ @JsonProperty("last_name")
+ @ExcludeMissing
+ fun _lastName(): JsonField = lastName
- @JsonProperty("manager") @ExcludeMissing fun _manager() = manager
+ @JsonProperty("manager")
+ @ExcludeMissing
+ fun _manager(): JsonField = manager
- @JsonProperty("middle_name") @ExcludeMissing fun _middleName() = middleName
+ @JsonProperty("middle_name")
+ @ExcludeMissing
+ fun _middleName(): JsonField = middleName
@JsonAnyGetter
@ExcludeMissing
@@ -1899,7 +1972,7 @@ private constructor(
fun id(): Optional = Optional.ofNullable(id.getNullable("id"))
- @JsonProperty("id") @ExcludeMissing fun _id() = id
+ @JsonProperty("id") @ExcludeMissing fun _id(): JsonField = id
@JsonAnyGetter
@ExcludeMissing
@@ -2023,9 +2096,13 @@ private constructor(
fun offset(): Optional =
Optional.ofNullable(offset.getNullable("offset"))
- @JsonProperty("count") @ExcludeMissing fun _count() = count
+ @JsonProperty("count")
+ @ExcludeMissing
+ fun _count(): JsonField = count
- @JsonProperty("offset") @ExcludeMissing fun _offset() = offset
+ @JsonProperty("offset")
+ @ExcludeMissing
+ fun _offset(): JsonField = offset
@JsonAnyGetter
@ExcludeMissing
@@ -2244,45 +2321,69 @@ private constructor(
fun title(): Optional = Optional.ofNullable(title.getNullable("title"))
- @JsonProperty("id") @ExcludeMissing fun _id() = id
+ @JsonProperty("id") @ExcludeMissing fun _id(): JsonField = id
- @JsonProperty("class_code") @ExcludeMissing fun _classCode() = classCode
+ @JsonProperty("class_code")
+ @ExcludeMissing
+ fun _classCode(): JsonField = classCode
@JsonProperty("custom_fields")
@ExcludeMissing
- fun _customFields() = customFields
+ fun _customFields(): JsonField = customFields
- @JsonProperty("department") @ExcludeMissing fun _department() = department
+ @JsonProperty("department")
+ @ExcludeMissing
+ fun _department(): JsonField = department
- @JsonProperty("employment") @ExcludeMissing fun _employment() = employment
+ @JsonProperty("employment")
+ @ExcludeMissing
+ fun _employment(): JsonField = employment
@JsonProperty("employment_status")
@ExcludeMissing
- fun _employmentStatus() = employmentStatus
+ fun _employmentStatus(): JsonField = employmentStatus
- @JsonProperty("end_date") @ExcludeMissing fun _endDate() = endDate
+ @JsonProperty("end_date")
+ @ExcludeMissing
+ fun _endDate(): JsonField = endDate
- @JsonProperty("first_name") @ExcludeMissing fun _firstName() = firstName
+ @JsonProperty("first_name")
+ @ExcludeMissing
+ fun _firstName(): JsonField = firstName
- @JsonProperty("income") @ExcludeMissing fun _income() = income
+ @JsonProperty("income")
+ @ExcludeMissing
+ fun _income(): JsonField = income
@JsonProperty("income_history")
@ExcludeMissing
- fun _incomeHistory() = incomeHistory
+ fun _incomeHistory(): JsonField = incomeHistory
- @JsonProperty("is_active") @ExcludeMissing fun _isActive() = isActive
+ @JsonProperty("is_active")
+ @ExcludeMissing
+ fun _isActive(): JsonField = isActive
- @JsonProperty("last_name") @ExcludeMissing fun _lastName() = lastName
+ @JsonProperty("last_name")
+ @ExcludeMissing
+ fun _lastName(): JsonField = lastName
- @JsonProperty("location") @ExcludeMissing fun _location() = location
+ @JsonProperty("location")
+ @ExcludeMissing
+ fun _location(): JsonField = location
- @JsonProperty("manager") @ExcludeMissing fun _manager() = manager
+ @JsonProperty("manager")
+ @ExcludeMissing
+ fun _manager(): JsonField = manager
- @JsonProperty("middle_name") @ExcludeMissing fun _middleName() = middleName
+ @JsonProperty("middle_name")
+ @ExcludeMissing
+ fun _middleName(): JsonField = middleName
- @JsonProperty("start_date") @ExcludeMissing fun _startDate() = startDate
+ @JsonProperty("start_date")
+ @ExcludeMissing
+ fun _startDate(): JsonField = startDate
- @JsonProperty("title") @ExcludeMissing fun _title() = title
+ @JsonProperty("title") @ExcludeMissing fun _title(): JsonField = title
@JsonAnyGetter
@ExcludeMissing
@@ -2523,7 +2624,7 @@ private constructor(
fun name(): Optional =
Optional.ofNullable(name.getNullable("name"))
- @JsonProperty("name") @ExcludeMissing fun _name() = name
+ @JsonProperty("name") @ExcludeMissing fun _name(): JsonField = name
@JsonAnyGetter
@ExcludeMissing
@@ -2627,9 +2728,11 @@ private constructor(
fun type(): Optional =
Optional.ofNullable(type.getNullable("type"))
- @JsonProperty("subtype") @ExcludeMissing fun _subtype() = subtype
+ @JsonProperty("subtype")
+ @ExcludeMissing
+ fun _subtype(): JsonField = subtype
- @JsonProperty("type") @ExcludeMissing fun _type() = type
+ @JsonProperty("type") @ExcludeMissing fun _type(): JsonField = type
@JsonAnyGetter
@ExcludeMissing
@@ -2752,11 +2855,15 @@ private constructor(
fun unit(): Optional =
Optional.ofNullable(unit.getNullable("unit"))
- @JsonProperty("amount") @ExcludeMissing fun _amount() = amount
+ @JsonProperty("amount")
+ @ExcludeMissing
+ fun _amount(): JsonField = amount
- @JsonProperty("currency") @ExcludeMissing fun _currency() = currency
+ @JsonProperty("currency")
+ @ExcludeMissing
+ fun _currency(): JsonField = currency
- @JsonProperty("unit") @ExcludeMissing fun _unit() = unit
+ @JsonProperty("unit") @ExcludeMissing fun _unit(): JsonField = unit
@JsonAnyGetter
@ExcludeMissing
@@ -2904,17 +3011,27 @@ private constructor(
fun state(): Optional =
Optional.ofNullable(state.getNullable("state"))
- @JsonProperty("city") @ExcludeMissing fun _city() = city
+ @JsonProperty("city") @ExcludeMissing fun _city(): JsonField = city
- @JsonProperty("country") @ExcludeMissing fun _country() = country
+ @JsonProperty("country")
+ @ExcludeMissing
+ fun _country(): JsonField = country
- @JsonProperty("line1") @ExcludeMissing fun _line1() = line1
+ @JsonProperty("line1")
+ @ExcludeMissing
+ fun _line1(): JsonField = line1
- @JsonProperty("line2") @ExcludeMissing fun _line2() = line2
+ @JsonProperty("line2")
+ @ExcludeMissing
+ fun _line2(): JsonField = line2
- @JsonProperty("postal_code") @ExcludeMissing fun _postalCode() = postalCode
+ @JsonProperty("postal_code")
+ @ExcludeMissing
+ fun _postalCode(): JsonField = postalCode
- @JsonProperty("state") @ExcludeMissing fun _state() = state
+ @JsonProperty("state")
+ @ExcludeMissing
+ fun _state(): JsonField = state
@JsonAnyGetter
@ExcludeMissing
@@ -3058,7 +3175,7 @@ private constructor(
fun id(): Optional = Optional.ofNullable(id.getNullable("id"))
- @JsonProperty("id") @ExcludeMissing fun _id() = id
+ @JsonProperty("id") @ExcludeMissing fun _id(): JsonField = id
@JsonAnyGetter
@ExcludeMissing
@@ -3240,37 +3357,51 @@ private constructor(
fun ssn(): Optional = Optional.ofNullable(ssn.getNullable("ssn"))
- @JsonProperty("id") @ExcludeMissing fun _id() = id
+ @JsonProperty("id") @ExcludeMissing fun _id(): JsonField = id
- @JsonProperty("dob") @ExcludeMissing fun _dob() = dob
+ @JsonProperty("dob") @ExcludeMissing fun _dob(): JsonField = dob
- @JsonProperty("emails") @ExcludeMissing fun _emails() = emails
+ @JsonProperty("emails")
+ @ExcludeMissing
+ fun _emails(): JsonField = emails
@JsonProperty("encrypted_ssn")
@ExcludeMissing
- fun _encryptedSsn() = encryptedSsn
+ fun _encryptedSsn(): JsonField = encryptedSsn
- @JsonProperty("ethnicity") @ExcludeMissing fun _ethnicity() = ethnicity
+ @JsonProperty("ethnicity")
+ @ExcludeMissing
+ fun _ethnicity(): JsonField = ethnicity
- @JsonProperty("first_name") @ExcludeMissing fun _firstName() = firstName
+ @JsonProperty("first_name")
+ @ExcludeMissing
+ fun _firstName(): JsonField = firstName
- @JsonProperty("gender") @ExcludeMissing fun _gender() = gender
+ @JsonProperty("gender")
+ @ExcludeMissing
+ fun _gender(): JsonField = gender
- @JsonProperty("last_name") @ExcludeMissing fun _lastName() = lastName
+ @JsonProperty("last_name")
+ @ExcludeMissing
+ fun _lastName(): JsonField = lastName
- @JsonProperty("middle_name") @ExcludeMissing fun _middleName() = middleName
+ @JsonProperty("middle_name")
+ @ExcludeMissing
+ fun _middleName(): JsonField = middleName
@JsonProperty("phone_numbers")
@ExcludeMissing
- fun _phoneNumbers() = phoneNumbers
+ fun _phoneNumbers(): JsonField = phoneNumbers
@JsonProperty("preferred_name")
@ExcludeMissing
- fun _preferredName() = preferredName
+ fun _preferredName(): JsonField = preferredName
- @JsonProperty("residence") @ExcludeMissing fun _residence() = residence
+ @JsonProperty("residence")
+ @ExcludeMissing
+ fun _residence(): JsonField = residence
- @JsonProperty("ssn") @ExcludeMissing fun _ssn() = ssn
+ @JsonProperty("ssn") @ExcludeMissing fun _ssn(): JsonField = ssn
@JsonAnyGetter
@ExcludeMissing
@@ -3475,9 +3606,9 @@ private constructor(
fun type(): Optional =
Optional.ofNullable(type.getNullable("type"))
- @JsonProperty("data") @ExcludeMissing fun _data() = data
+ @JsonProperty("data") @ExcludeMissing fun _data(): JsonField = data
- @JsonProperty("type") @ExcludeMissing fun _type() = type
+ @JsonProperty("type") @ExcludeMissing fun _type(): JsonField = type
@JsonAnyGetter
@ExcludeMissing
@@ -3591,9 +3722,9 @@ private constructor(
fun type(): Optional =
Optional.ofNullable(type.getNullable("type"))
- @JsonProperty("data") @ExcludeMissing fun _data() = data
+ @JsonProperty("data") @ExcludeMissing fun _data(): JsonField = data
- @JsonProperty("type") @ExcludeMissing fun _type() = type
+ @JsonProperty("type") @ExcludeMissing fun _type(): JsonField = type
@JsonAnyGetter
@ExcludeMissing
@@ -3732,17 +3863,27 @@ private constructor(
fun state(): Optional =
Optional.ofNullable(state.getNullable("state"))
- @JsonProperty("city") @ExcludeMissing fun _city() = city
+ @JsonProperty("city") @ExcludeMissing fun _city(): JsonField = city
- @JsonProperty("country") @ExcludeMissing fun _country() = country
+ @JsonProperty("country")
+ @ExcludeMissing
+ fun _country(): JsonField = country
- @JsonProperty("line1") @ExcludeMissing fun _line1() = line1
+ @JsonProperty("line1")
+ @ExcludeMissing
+ fun _line1(): JsonField = line1
- @JsonProperty("line2") @ExcludeMissing fun _line2() = line2
+ @JsonProperty("line2")
+ @ExcludeMissing
+ fun _line2(): JsonField = line2
- @JsonProperty("postal_code") @ExcludeMissing fun _postalCode() = postalCode
+ @JsonProperty("postal_code")
+ @ExcludeMissing
+ fun _postalCode(): JsonField = postalCode
- @JsonProperty("state") @ExcludeMissing fun _state() = state
+ @JsonProperty("state")
+ @ExcludeMissing
+ fun _state(): JsonField = state
@JsonAnyGetter
@ExcludeMissing
@@ -3920,17 +4061,17 @@ private constructor(
fun payFrequencies(): Optional =
Optional.ofNullable(payFrequencies.getNullable("pay_frequencies"))
- @JsonProperty("id") @ExcludeMissing fun _id() = id
+ @JsonProperty("id") @ExcludeMissing fun _id(): JsonField = id
@JsonProperty("individual_ids")
@ExcludeMissing
- fun _individualIds() = individualIds
+ fun _individualIds(): JsonField = individualIds
- @JsonProperty("name") @ExcludeMissing fun _name() = name
+ @JsonProperty("name") @ExcludeMissing fun _name(): JsonField = name
@JsonProperty("pay_frequencies")
@ExcludeMissing
- fun _payFrequencies() = payFrequencies
+ fun _payFrequencies(): JsonField = payFrequencies
@JsonAnyGetter
@ExcludeMissing
@@ -4067,11 +4208,13 @@ private constructor(
fun payStatements(): Optional =
Optional.ofNullable(payStatements.getNullable("pay_statements"))
- @JsonProperty("paging") @ExcludeMissing fun _paging() = paging
+ @JsonProperty("paging")
+ @ExcludeMissing
+ fun _paging(): JsonField = paging
@JsonProperty("pay_statements")
@ExcludeMissing
- fun _payStatements() = payStatements
+ fun _payStatements(): JsonField = payStatements
@JsonAnyGetter
@ExcludeMissing
@@ -4171,9 +4314,13 @@ private constructor(
fun offset(): Boolean = offset.getRequired("offset")
- @JsonProperty("count") @ExcludeMissing fun _count() = count
+ @JsonProperty("count")
+ @ExcludeMissing
+ fun _count(): JsonField = count
- @JsonProperty("offset") @ExcludeMissing fun _offset() = offset
+ @JsonProperty("offset")
+ @ExcludeMissing
+ fun _offset(): JsonField = offset
@JsonAnyGetter
@ExcludeMissing
@@ -4198,8 +4345,8 @@ private constructor(
class Builder {
- private var count: JsonField = JsonMissing.of()
- private var offset: JsonField = JsonMissing.of()
+ private var count: JsonField? = null
+ private var offset: JsonField? = null
private var additionalProperties: MutableMap =
mutableMapOf()
@@ -4242,8 +4389,8 @@ private constructor(
fun build(): Paging =
Paging(
- count,
- offset,
+ checkNotNull(count) { "`count` is required but was not set" },
+ checkNotNull(offset) { "`offset` is required but was not set" },
additionalProperties.toImmutable(),
)
}
@@ -4341,33 +4488,45 @@ private constructor(
fun type(): Optional =
Optional.ofNullable(type.getNullable("type"))
- @JsonProperty("earnings") @ExcludeMissing fun _earnings() = earnings
+ @JsonProperty("earnings")
+ @ExcludeMissing
+ fun _earnings(): JsonField = earnings
@JsonProperty("employee_deductions")
@ExcludeMissing
- fun _employeeDeductions() = employeeDeductions
+ fun _employeeDeductions(): JsonField =
+ employeeDeductions
@JsonProperty("employer_contributions")
@ExcludeMissing
- fun _employerContributions() = employerContributions
+ fun _employerContributions(): JsonField =
+ employerContributions
- @JsonProperty("gross_pay") @ExcludeMissing fun _grossPay() = grossPay
+ @JsonProperty("gross_pay")
+ @ExcludeMissing
+ fun _grossPay(): JsonField = grossPay
@JsonProperty("individual_id")
@ExcludeMissing
- fun _individualId() = individualId
+ fun _individualId(): JsonField = individualId
- @JsonProperty("net_pay") @ExcludeMissing fun _netPay() = netPay
+ @JsonProperty("net_pay")
+ @ExcludeMissing
+ fun _netPay(): JsonField = netPay
@JsonProperty("payment_method")
@ExcludeMissing
- fun _paymentMethod() = paymentMethod
+ fun _paymentMethod(): JsonField = paymentMethod
- @JsonProperty("taxes") @ExcludeMissing fun _taxes() = taxes
+ @JsonProperty("taxes")
+ @ExcludeMissing
+ fun _taxes(): JsonField = taxes
- @JsonProperty("total_hours") @ExcludeMissing fun _totalHours() = totalHours
+ @JsonProperty("total_hours")
+ @ExcludeMissing
+ fun _totalHours(): JsonField = totalHours
- @JsonProperty("type") @ExcludeMissing fun _type() = type
+ @JsonProperty("type") @ExcludeMissing fun _type(): JsonField = type
@JsonAnyGetter
@ExcludeMissing
@@ -4562,13 +4721,21 @@ private constructor(
fun type(): Optional =
Optional.ofNullable(type.getNullable("type"))
- @JsonProperty("amount") @ExcludeMissing fun _amount() = amount
+ @JsonProperty("amount")
+ @ExcludeMissing
+ fun _amount(): JsonField = amount
- @JsonProperty("currency") @ExcludeMissing fun _currency() = currency
+ @JsonProperty("currency")
+ @ExcludeMissing
+ fun _currency(): JsonField = currency
- @JsonProperty("name") @ExcludeMissing fun _name() = name
+ @JsonProperty("name")
+ @ExcludeMissing
+ fun _name(): JsonField = name
- @JsonProperty("type") @ExcludeMissing fun _type() = type
+ @JsonProperty("type")
+ @ExcludeMissing
+ fun _type(): JsonField