diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index a26ebfc1..8f3e0a49 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.14.0"
+ ".": "0.15.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index b57e87a9..cce5f555 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 19
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/prelude/prelude-86fc45f417e6468f6a6087f9e35b264b0a350e31385bc078a2027a1f1abd1d15.yml
+configured_endpoints: 27
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/prelude/prelude-33b70f86404b99046db5c61d3142b149dd7dec7eefe5e62ff3b397c7274aa5dc.yml
openapi_spec_hash: fb72aba38ec55a3b6b5162c9f5b4228d
-config_hash: 3dbe79c14ecd9a153418249f9155d159
+config_hash: 707d65d2f456a2b5ba5b2c565b60128a
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2d26bd82..8317f99e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## 0.15.0 (2026-09-18)
+
+Full Changelog: [v0.14.0...v0.15.0](https://github.com/prelude-so/java-sdk/compare/v0.14.0...v0.15.0)
+
+### Features
+
+* **api:** manual updates ([9121aca](https://github.com/prelude-so/java-sdk/commit/9121acadfe49924dbf383d9ba7a363a4282afdb4))
+
## 0.14.0 (2026-09-15)
Full Changelog: [v0.13.0...v0.14.0](https://github.com/prelude-so/java-sdk/compare/v0.13.0...v0.14.0)
diff --git a/README.md b/README.md
index efdba809..b560586c 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/so.prelude.sdk/prelude-java/0.14.0)
-[](https://javadoc.io/doc/so.prelude.sdk/prelude-java/0.14.0)
+[](https://central.sonatype.com/artifact/so.prelude.sdk/prelude-java/0.15.0)
+[](https://javadoc.io/doc/so.prelude.sdk/prelude-java/0.15.0)
@@ -13,7 +13,7 @@ It is generated with [Stainless](https://www.stainless.com/).
-The REST API documentation can be found on [docs.prelude.so](https://docs.prelude.so). Javadocs are available on [javadoc.io](https://javadoc.io/doc/so.prelude.sdk/prelude-java/0.14.0).
+The REST API documentation can be found on [docs.prelude.so](https://docs.prelude.so). Javadocs are available on [javadoc.io](https://javadoc.io/doc/so.prelude.sdk/prelude-java/0.15.0).
@@ -24,7 +24,7 @@ The REST API documentation can be found on [docs.prelude.so](https://docs.prelud
### Gradle
```kotlin
-implementation("so.prelude.sdk:prelude-java:0.14.0")
+implementation("so.prelude.sdk:prelude-java:0.15.0")
```
### Maven
@@ -33,7 +33,7 @@ implementation("so.prelude.sdk:prelude-java:0.14.0")
so.prelude.sdk
prelude-java
- 0.14.0
+ 0.15.0
```
@@ -48,6 +48,7 @@ This library requires Java 8 or later.
```java
import so.prelude.sdk.client.PreludeClient;
import so.prelude.sdk.client.okhttp.PreludeOkHttpClient;
+import so.prelude.sdk.models.Target;
import so.prelude.sdk.models.VerificationCreateParams;
import so.prelude.sdk.models.VerificationCreateResponse;
@@ -56,8 +57,8 @@ import so.prelude.sdk.models.VerificationCreateResponse;
PreludeClient client = PreludeOkHttpClient.fromEnv();
VerificationCreateParams params = VerificationCreateParams.builder()
- .target(VerificationCreateParams.Target.builder()
- .type(VerificationCreateParams.Target.Type.PHONE_NUMBER)
+ .target(Target.builder()
+ .type(Target.Type.PHONE_NUMBER)
.value("+30123456789")
.build())
.build();
@@ -152,6 +153,7 @@ The default client is synchronous. To switch to asynchronous execution, call the
import java.util.concurrent.CompletableFuture;
import so.prelude.sdk.client.PreludeClient;
import so.prelude.sdk.client.okhttp.PreludeOkHttpClient;
+import so.prelude.sdk.models.Target;
import so.prelude.sdk.models.VerificationCreateParams;
import so.prelude.sdk.models.VerificationCreateResponse;
@@ -160,8 +162,8 @@ import so.prelude.sdk.models.VerificationCreateResponse;
PreludeClient client = PreludeOkHttpClient.fromEnv();
VerificationCreateParams params = VerificationCreateParams.builder()
- .target(VerificationCreateParams.Target.builder()
- .type(VerificationCreateParams.Target.Type.PHONE_NUMBER)
+ .target(Target.builder()
+ .type(Target.Type.PHONE_NUMBER)
.value("+30123456789")
.build())
.build();
@@ -174,6 +176,7 @@ Or create an asynchronous client from the beginning:
import java.util.concurrent.CompletableFuture;
import so.prelude.sdk.client.PreludeClientAsync;
import so.prelude.sdk.client.okhttp.PreludeOkHttpClientAsync;
+import so.prelude.sdk.models.Target;
import so.prelude.sdk.models.VerificationCreateParams;
import so.prelude.sdk.models.VerificationCreateResponse;
@@ -182,8 +185,8 @@ import so.prelude.sdk.models.VerificationCreateResponse;
PreludeClientAsync client = PreludeOkHttpClientAsync.fromEnv();
VerificationCreateParams params = VerificationCreateParams.builder()
- .target(VerificationCreateParams.Target.builder()
- .type(VerificationCreateParams.Target.Type.PHONE_NUMBER)
+ .target(Target.builder()
+ .type(Target.Type.PHONE_NUMBER)
.value("+30123456789")
.build())
.build();
@@ -201,12 +204,13 @@ To access this data, prefix any HTTP method call on a client or service with `wi
```java
import so.prelude.sdk.core.http.Headers;
import so.prelude.sdk.core.http.HttpResponseFor;
+import so.prelude.sdk.models.Target;
import so.prelude.sdk.models.VerificationCreateParams;
import so.prelude.sdk.models.VerificationCreateResponse;
VerificationCreateParams params = VerificationCreateParams.builder()
- .target(VerificationCreateParams.Target.builder()
- .type(VerificationCreateParams.Target.Type.PHONE_NUMBER)
+ .target(Target.builder()
+ .type(Target.Type.PHONE_NUMBER)
.value("+30123456789")
.build())
.build();
@@ -486,10 +490,11 @@ To set undocumented parameters on _nested_ headers, query params, or body classe
```java
import so.prelude.sdk.core.JsonValue;
+import so.prelude.sdk.models.Target;
import so.prelude.sdk.models.VerificationCreateParams;
VerificationCreateParams params = VerificationCreateParams.builder()
- .target(VerificationCreateParams.Target.builder()
+ .target(Target.builder()
.putAdditionalProperty("secretProperty", JsonValue.from("42"))
.build())
.build();
@@ -597,9 +602,9 @@ To access a property's raw JSON value, which may be undocumented, call its `_` p
```java
import java.util.Optional;
import so.prelude.sdk.core.JsonField;
-import so.prelude.sdk.models.VerificationCreateParams;
+import so.prelude.sdk.models.Target;
-JsonField target = client.verification().create(params)._target();
+JsonField target = client.verification().create(params)._target();
if (target.isMissing()) {
// The property is absent from the JSON response
diff --git a/build.gradle.kts b/build.gradle.kts
index 9913f290..f2d0c2e9 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "so.prelude.sdk"
- version = "0.14.0" // x-release-please-version
+ version = "0.15.0" // x-release-please-version
}
subprojects {
diff --git a/prelude-java-core/src/main/kotlin/so/prelude/sdk/client/PreludeClient.kt b/prelude-java-core/src/main/kotlin/so/prelude/sdk/client/PreludeClient.kt
index 278c33cf..b8026f85 100644
--- a/prelude-java-core/src/main/kotlin/so/prelude/sdk/client/PreludeClient.kt
+++ b/prelude-java-core/src/main/kotlin/so/prelude/sdk/client/PreludeClient.kt
@@ -4,6 +4,7 @@ package so.prelude.sdk.client
import java.util.function.Consumer
import so.prelude.sdk.core.ClientOptions
+import so.prelude.sdk.services.blocking.IntelService
import so.prelude.sdk.services.blocking.LookupService
import so.prelude.sdk.services.blocking.NotifyService
import so.prelude.sdk.services.blocking.TransactionalService
@@ -68,6 +69,8 @@ interface PreludeClient {
/** Evaluate email addresses and phone numbers for trustworthiness. */
fun watch(): WatchService
+ fun intel(): IntelService
+
/**
* Closes this client, relinquishing any underlying resources.
*
@@ -111,5 +114,7 @@ interface PreludeClient {
/** Evaluate email addresses and phone numbers for trustworthiness. */
fun watch(): WatchService.WithRawResponse
+
+ fun intel(): IntelService.WithRawResponse
}
}
diff --git a/prelude-java-core/src/main/kotlin/so/prelude/sdk/client/PreludeClientAsync.kt b/prelude-java-core/src/main/kotlin/so/prelude/sdk/client/PreludeClientAsync.kt
index 2fd36276..25002405 100644
--- a/prelude-java-core/src/main/kotlin/so/prelude/sdk/client/PreludeClientAsync.kt
+++ b/prelude-java-core/src/main/kotlin/so/prelude/sdk/client/PreludeClientAsync.kt
@@ -4,6 +4,7 @@ package so.prelude.sdk.client
import java.util.function.Consumer
import so.prelude.sdk.core.ClientOptions
+import so.prelude.sdk.services.async.IntelServiceAsync
import so.prelude.sdk.services.async.LookupServiceAsync
import so.prelude.sdk.services.async.NotifyServiceAsync
import so.prelude.sdk.services.async.TransactionalServiceAsync
@@ -68,6 +69,8 @@ interface PreludeClientAsync {
/** Evaluate email addresses and phone numbers for trustworthiness. */
fun watch(): WatchServiceAsync
+ fun intel(): IntelServiceAsync
+
/**
* Closes this client, relinquishing any underlying resources.
*
@@ -115,5 +118,7 @@ interface PreludeClientAsync {
/** Evaluate email addresses and phone numbers for trustworthiness. */
fun watch(): WatchServiceAsync.WithRawResponse
+
+ fun intel(): IntelServiceAsync.WithRawResponse
}
}
diff --git a/prelude-java-core/src/main/kotlin/so/prelude/sdk/client/PreludeClientAsyncImpl.kt b/prelude-java-core/src/main/kotlin/so/prelude/sdk/client/PreludeClientAsyncImpl.kt
index 2fab033f..9a1a1c18 100644
--- a/prelude-java-core/src/main/kotlin/so/prelude/sdk/client/PreludeClientAsyncImpl.kt
+++ b/prelude-java-core/src/main/kotlin/so/prelude/sdk/client/PreludeClientAsyncImpl.kt
@@ -5,6 +5,8 @@ package so.prelude.sdk.client
import java.util.function.Consumer
import so.prelude.sdk.core.ClientOptions
import so.prelude.sdk.core.getPackageVersion
+import so.prelude.sdk.services.async.IntelServiceAsync
+import so.prelude.sdk.services.async.IntelServiceAsyncImpl
import so.prelude.sdk.services.async.LookupServiceAsync
import so.prelude.sdk.services.async.LookupServiceAsyncImpl
import so.prelude.sdk.services.async.NotifyServiceAsync
@@ -59,6 +61,10 @@ class PreludeClientAsyncImpl(private val clientOptions: ClientOptions) : Prelude
WatchServiceAsyncImpl(clientOptionsWithUserAgent)
}
+ private val intel: IntelServiceAsync by lazy {
+ IntelServiceAsyncImpl(clientOptionsWithUserAgent)
+ }
+
override fun sync(): PreludeClient = sync
override fun withRawResponse(): PreludeClientAsync.WithRawResponse = withRawResponse
@@ -88,6 +94,8 @@ class PreludeClientAsyncImpl(private val clientOptions: ClientOptions) : Prelude
/** Evaluate email addresses and phone numbers for trustworthiness. */
override fun watch(): WatchServiceAsync = watch
+ override fun intel(): IntelServiceAsync = intel
+
override fun close() = clientOptions.close()
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
@@ -118,6 +126,10 @@ class PreludeClientAsyncImpl(private val clientOptions: ClientOptions) : Prelude
WatchServiceAsyncImpl.WithRawResponseImpl(clientOptions)
}
+ private val intel: IntelServiceAsync.WithRawResponse by lazy {
+ IntelServiceAsyncImpl.WithRawResponseImpl(clientOptions)
+ }
+
override fun withOptions(
modifier: Consumer
): PreludeClientAsync.WithRawResponse =
@@ -146,5 +158,7 @@ class PreludeClientAsyncImpl(private val clientOptions: ClientOptions) : Prelude
/** Evaluate email addresses and phone numbers for trustworthiness. */
override fun watch(): WatchServiceAsync.WithRawResponse = watch
+
+ override fun intel(): IntelServiceAsync.WithRawResponse = intel
}
}
diff --git a/prelude-java-core/src/main/kotlin/so/prelude/sdk/client/PreludeClientImpl.kt b/prelude-java-core/src/main/kotlin/so/prelude/sdk/client/PreludeClientImpl.kt
index f3848303..9d0e26ea 100644
--- a/prelude-java-core/src/main/kotlin/so/prelude/sdk/client/PreludeClientImpl.kt
+++ b/prelude-java-core/src/main/kotlin/so/prelude/sdk/client/PreludeClientImpl.kt
@@ -5,6 +5,8 @@ package so.prelude.sdk.client
import java.util.function.Consumer
import so.prelude.sdk.core.ClientOptions
import so.prelude.sdk.core.getPackageVersion
+import so.prelude.sdk.services.blocking.IntelService
+import so.prelude.sdk.services.blocking.IntelServiceImpl
import so.prelude.sdk.services.blocking.LookupService
import so.prelude.sdk.services.blocking.LookupServiceImpl
import so.prelude.sdk.services.blocking.NotifyService
@@ -53,6 +55,8 @@ class PreludeClientImpl(private val clientOptions: ClientOptions) : PreludeClien
private val watch: WatchService by lazy { WatchServiceImpl(clientOptionsWithUserAgent) }
+ private val intel: IntelService by lazy { IntelServiceImpl(clientOptionsWithUserAgent) }
+
override fun async(): PreludeClientAsync = async
override fun withRawResponse(): PreludeClient.WithRawResponse = withRawResponse
@@ -81,6 +85,8 @@ class PreludeClientImpl(private val clientOptions: ClientOptions) : PreludeClien
/** Evaluate email addresses and phone numbers for trustworthiness. */
override fun watch(): WatchService = watch
+ override fun intel(): IntelService = intel
+
override fun close() = clientOptions.close()
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
@@ -110,6 +116,10 @@ class PreludeClientImpl(private val clientOptions: ClientOptions) : PreludeClien
WatchServiceImpl.WithRawResponseImpl(clientOptions)
}
+ private val intel: IntelService.WithRawResponse by lazy {
+ IntelServiceImpl.WithRawResponseImpl(clientOptions)
+ }
+
override fun withOptions(
modifier: Consumer
): PreludeClient.WithRawResponse =
@@ -138,5 +148,7 @@ class PreludeClientImpl(private val clientOptions: ClientOptions) : PreludeClien
/** Evaluate email addresses and phone numbers for trustworthiness. */
override fun watch(): WatchService.WithRawResponse = watch
+
+ override fun intel(): IntelService.WithRawResponse = intel
}
}
diff --git a/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/IntelKycMatchParams.kt b/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/IntelKycMatchParams.kt
new file mode 100644
index 00000000..ea08364f
--- /dev/null
+++ b/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/IntelKycMatchParams.kt
@@ -0,0 +1,973 @@
+// File generated from our OpenAPI spec by Stainless.
+
+package so.prelude.sdk.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 java.time.LocalDate
+import java.util.Collections
+import java.util.Objects
+import java.util.Optional
+import kotlin.jvm.optionals.getOrNull
+import so.prelude.sdk.core.ExcludeMissing
+import so.prelude.sdk.core.JsonField
+import so.prelude.sdk.core.JsonMissing
+import so.prelude.sdk.core.JsonValue
+import so.prelude.sdk.core.Params
+import so.prelude.sdk.core.http.Headers
+import so.prelude.sdk.core.http.QueryParams
+import so.prelude.sdk.errors.PreludeInvalidDataException
+
+/**
+ * Verify identity attributes against the subscriber record held by the end-user's mobile operator.
+ * Send a phone number along with the attributes to check; Prelude resolves the operator internally
+ * and returns a per-attribute match. Currently available for France only (Orange, SFR, Bouygues)
+ * and must be enabled for your account.
+ */
+class IntelKycMatchParams
+private constructor(
+ private val phone: String?,
+ private val body: Body,
+ private val additionalHeaders: Headers,
+ private val additionalQueryParams: QueryParams,
+) : Params {
+
+ /** An E.164 formatted phone number whose subscriber identity to match against. */
+ fun phone(): Optional = Optional.ofNullable(phone)
+
+ /**
+ * The street address.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun address(): Optional = body.address()
+
+ /**
+ * The date of birth in ISO 8601 (`YYYY-MM-DD`) format. Compared exactly.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun birthdate(): Optional = body.birthdate()
+
+ /**
+ * The ISO 3166-1 alpha-2 country code. Compared exactly.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun country(): Optional = body.country()
+
+ /**
+ * The email address.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun email(): Optional = body.email()
+
+ /**
+ * The end-user's family (last) name.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun familyName(): Optional = body.familyName()
+
+ /**
+ * The end-user's given (first) name.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun givenName(): Optional = body.givenName()
+
+ /**
+ * The locality (city).
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun locality(): Optional = body.locality()
+
+ /**
+ * The postal code. Compared exactly.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun postalCode(): Optional = body.postalCode()
+
+ /**
+ * The region, state, or province.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun region(): Optional = body.region()
+
+ /**
+ * Returns the raw JSON value of [address].
+ *
+ * Unlike [address], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _address(): JsonField = body._address()
+
+ /**
+ * Returns the raw JSON value of [birthdate].
+ *
+ * Unlike [birthdate], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _birthdate(): JsonField = body._birthdate()
+
+ /**
+ * Returns the raw JSON value of [country].
+ *
+ * Unlike [country], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _country(): JsonField = body._country()
+
+ /**
+ * Returns the raw JSON value of [email].
+ *
+ * Unlike [email], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _email(): JsonField = body._email()
+
+ /**
+ * Returns the raw JSON value of [familyName].
+ *
+ * Unlike [familyName], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _familyName(): JsonField = body._familyName()
+
+ /**
+ * Returns the raw JSON value of [givenName].
+ *
+ * Unlike [givenName], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _givenName(): JsonField = body._givenName()
+
+ /**
+ * Returns the raw JSON value of [locality].
+ *
+ * Unlike [locality], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _locality(): JsonField = body._locality()
+
+ /**
+ * Returns the raw JSON value of [postalCode].
+ *
+ * Unlike [postalCode], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _postalCode(): JsonField = body._postalCode()
+
+ /**
+ * Returns the raw JSON value of [region].
+ *
+ * Unlike [region], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _region(): JsonField = body._region()
+
+ fun _additionalBodyProperties(): Map = body._additionalProperties()
+
+ /** Additional headers to send with the request. */
+ fun _additionalHeaders(): Headers = additionalHeaders
+
+ /** Additional query param to send with the request. */
+ fun _additionalQueryParams(): QueryParams = additionalQueryParams
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ @JvmStatic fun none(): IntelKycMatchParams = builder().build()
+
+ /** Returns a mutable builder for constructing an instance of [IntelKycMatchParams]. */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [IntelKycMatchParams]. */
+ class Builder internal constructor() {
+
+ private var phone: String? = null
+ private var body: Body.Builder = Body.builder()
+ private var additionalHeaders: Headers.Builder = Headers.builder()
+ private var additionalQueryParams: QueryParams.Builder = QueryParams.builder()
+
+ @JvmSynthetic
+ internal fun from(intelKycMatchParams: IntelKycMatchParams) = apply {
+ phone = intelKycMatchParams.phone
+ body = intelKycMatchParams.body.toBuilder()
+ additionalHeaders = intelKycMatchParams.additionalHeaders.toBuilder()
+ additionalQueryParams = intelKycMatchParams.additionalQueryParams.toBuilder()
+ }
+
+ /** An E.164 formatted phone number whose subscriber identity to match against. */
+ fun phone(phone: String?) = apply { this.phone = phone }
+
+ /** Alias for calling [Builder.phone] with `phone.orElse(null)`. */
+ fun phone(phone: Optional) = phone(phone.getOrNull())
+
+ /**
+ * Sets the entire request body.
+ *
+ * This is generally only useful if you are already constructing the body separately.
+ * Otherwise, it's more convenient to use the top-level setters instead:
+ * - [address]
+ * - [birthdate]
+ * - [country]
+ * - [email]
+ * - [familyName]
+ * - etc.
+ */
+ fun body(body: Body) = apply { this.body = body.toBuilder() }
+
+ /** The street address. */
+ fun address(address: String) = apply { body.address(address) }
+
+ /**
+ * Sets [Builder.address] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.address] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun address(address: JsonField) = apply { body.address(address) }
+
+ /** The date of birth in ISO 8601 (`YYYY-MM-DD`) format. Compared exactly. */
+ fun birthdate(birthdate: LocalDate) = apply { body.birthdate(birthdate) }
+
+ /**
+ * Sets [Builder.birthdate] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.birthdate] with a well-typed [LocalDate] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun birthdate(birthdate: JsonField) = apply { body.birthdate(birthdate) }
+
+ /** The ISO 3166-1 alpha-2 country code. Compared exactly. */
+ fun country(country: String) = apply { body.country(country) }
+
+ /**
+ * Sets [Builder.country] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.country] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun country(country: JsonField) = apply { body.country(country) }
+
+ /** The email address. */
+ fun email(email: String) = apply { body.email(email) }
+
+ /**
+ * Sets [Builder.email] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.email] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun email(email: JsonField) = apply { body.email(email) }
+
+ /** The end-user's family (last) name. */
+ fun familyName(familyName: String) = apply { body.familyName(familyName) }
+
+ /**
+ * Sets [Builder.familyName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.familyName] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun familyName(familyName: JsonField) = apply { body.familyName(familyName) }
+
+ /** The end-user's given (first) name. */
+ fun givenName(givenName: String) = apply { body.givenName(givenName) }
+
+ /**
+ * Sets [Builder.givenName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.givenName] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun givenName(givenName: JsonField) = apply { body.givenName(givenName) }
+
+ /** The locality (city). */
+ fun locality(locality: String) = apply { body.locality(locality) }
+
+ /**
+ * Sets [Builder.locality] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.locality] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun locality(locality: JsonField) = apply { body.locality(locality) }
+
+ /** The postal code. Compared exactly. */
+ fun postalCode(postalCode: String) = apply { body.postalCode(postalCode) }
+
+ /**
+ * Sets [Builder.postalCode] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.postalCode] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun postalCode(postalCode: JsonField) = apply { body.postalCode(postalCode) }
+
+ /** The region, state, or province. */
+ fun region(region: String) = apply { body.region(region) }
+
+ /**
+ * Sets [Builder.region] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.region] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun region(region: JsonField) = apply { body.region(region) }
+
+ 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()
+ putAllAdditionalHeaders(additionalHeaders)
+ }
+
+ fun additionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.clear()
+ putAllAdditionalHeaders(additionalHeaders)
+ }
+
+ fun putAdditionalHeader(name: String, value: String) = apply {
+ additionalHeaders.put(name, value)
+ }
+
+ fun putAdditionalHeaders(name: String, values: Iterable) = apply {
+ additionalHeaders.put(name, values)
+ }
+
+ fun putAllAdditionalHeaders(additionalHeaders: Headers) = apply {
+ this.additionalHeaders.putAll(additionalHeaders)
+ }
+
+ fun putAllAdditionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.putAll(additionalHeaders)
+ }
+
+ fun replaceAdditionalHeaders(name: String, value: String) = apply {
+ additionalHeaders.replace(name, value)
+ }
+
+ fun replaceAdditionalHeaders(name: String, values: Iterable) = apply {
+ additionalHeaders.replace(name, values)
+ }
+
+ fun replaceAllAdditionalHeaders(additionalHeaders: Headers) = apply {
+ this.additionalHeaders.replaceAll(additionalHeaders)
+ }
+
+ fun replaceAllAdditionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.replaceAll(additionalHeaders)
+ }
+
+ fun removeAdditionalHeaders(name: String) = apply { additionalHeaders.remove(name) }
+
+ fun removeAllAdditionalHeaders(names: Set) = apply {
+ additionalHeaders.removeAll(names)
+ }
+
+ fun additionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.clear()
+ putAllAdditionalQueryParams(additionalQueryParams)
+ }
+
+ fun additionalQueryParams(additionalQueryParams: Map>) = apply {
+ this.additionalQueryParams.clear()
+ putAllAdditionalQueryParams(additionalQueryParams)
+ }
+
+ fun putAdditionalQueryParam(key: String, value: String) = apply {
+ additionalQueryParams.put(key, value)
+ }
+
+ fun putAdditionalQueryParams(key: String, values: Iterable) = apply {
+ additionalQueryParams.put(key, values)
+ }
+
+ fun putAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.putAll(additionalQueryParams)
+ }
+
+ fun putAllAdditionalQueryParams(additionalQueryParams: Map>) =
+ apply {
+ this.additionalQueryParams.putAll(additionalQueryParams)
+ }
+
+ fun replaceAdditionalQueryParams(key: String, value: String) = apply {
+ additionalQueryParams.replace(key, value)
+ }
+
+ fun replaceAdditionalQueryParams(key: String, values: Iterable) = apply {
+ additionalQueryParams.replace(key, values)
+ }
+
+ fun replaceAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.replaceAll(additionalQueryParams)
+ }
+
+ fun replaceAllAdditionalQueryParams(additionalQueryParams: Map>) =
+ apply {
+ this.additionalQueryParams.replaceAll(additionalQueryParams)
+ }
+
+ fun removeAdditionalQueryParams(key: String) = apply { additionalQueryParams.remove(key) }
+
+ fun removeAllAdditionalQueryParams(keys: Set) = apply {
+ additionalQueryParams.removeAll(keys)
+ }
+
+ /**
+ * Returns an immutable instance of [IntelKycMatchParams].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ */
+ fun build(): IntelKycMatchParams =
+ IntelKycMatchParams(
+ phone,
+ body.build(),
+ additionalHeaders.build(),
+ additionalQueryParams.build(),
+ )
+ }
+
+ fun _body(): Body = body
+
+ fun _pathParam(index: Int): String =
+ when (index) {
+ 0 -> phone ?: ""
+ else -> ""
+ }
+
+ override fun _headers(): Headers = additionalHeaders
+
+ override fun _queryParams(): QueryParams = additionalQueryParams
+
+ /**
+ * The identity attributes to verify. Only the fields you want checked need to be sent; at least
+ * one attribute is required. Each operator can answer a subset of these attributes - any
+ * attribute the operator does not support resolves to `not_available` rather than `false`.
+ */
+ class Body
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val address: JsonField,
+ private val birthdate: JsonField,
+ private val country: JsonField,
+ private val email: JsonField,
+ private val familyName: JsonField,
+ private val givenName: JsonField,
+ private val locality: JsonField,
+ private val postalCode: JsonField,
+ private val region: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("address") @ExcludeMissing address: JsonField = JsonMissing.of(),
+ @JsonProperty("birthdate")
+ @ExcludeMissing
+ birthdate: JsonField = JsonMissing.of(),
+ @JsonProperty("country") @ExcludeMissing country: JsonField = JsonMissing.of(),
+ @JsonProperty("email") @ExcludeMissing email: JsonField = JsonMissing.of(),
+ @JsonProperty("family_name")
+ @ExcludeMissing
+ familyName: JsonField = JsonMissing.of(),
+ @JsonProperty("given_name")
+ @ExcludeMissing
+ givenName: JsonField = JsonMissing.of(),
+ @JsonProperty("locality")
+ @ExcludeMissing
+ locality: JsonField = JsonMissing.of(),
+ @JsonProperty("postal_code")
+ @ExcludeMissing
+ postalCode: JsonField = JsonMissing.of(),
+ @JsonProperty("region") @ExcludeMissing region: JsonField = JsonMissing.of(),
+ ) : this(
+ address,
+ birthdate,
+ country,
+ email,
+ familyName,
+ givenName,
+ locality,
+ postalCode,
+ region,
+ mutableMapOf(),
+ )
+
+ /**
+ * The street address.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun address(): Optional = address.getOptional("address")
+
+ /**
+ * The date of birth in ISO 8601 (`YYYY-MM-DD`) format. Compared exactly.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun birthdate(): Optional = birthdate.getOptional("birthdate")
+
+ /**
+ * The ISO 3166-1 alpha-2 country code. Compared exactly.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun country(): Optional = country.getOptional("country")
+
+ /**
+ * The email address.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun email(): Optional = email.getOptional("email")
+
+ /**
+ * The end-user's family (last) name.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun familyName(): Optional = familyName.getOptional("family_name")
+
+ /**
+ * The end-user's given (first) name.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun givenName(): Optional = givenName.getOptional("given_name")
+
+ /**
+ * The locality (city).
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun locality(): Optional = locality.getOptional("locality")
+
+ /**
+ * The postal code. Compared exactly.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun postalCode(): Optional = postalCode.getOptional("postal_code")
+
+ /**
+ * The region, state, or province.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun region(): Optional = region.getOptional("region")
+
+ /**
+ * Returns the raw JSON value of [address].
+ *
+ * Unlike [address], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("address") @ExcludeMissing fun _address(): JsonField = address
+
+ /**
+ * Returns the raw JSON value of [birthdate].
+ *
+ * Unlike [birthdate], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("birthdate")
+ @ExcludeMissing
+ fun _birthdate(): JsonField = birthdate
+
+ /**
+ * Returns the raw JSON value of [country].
+ *
+ * Unlike [country], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("country") @ExcludeMissing fun _country(): JsonField = country
+
+ /**
+ * Returns the raw JSON value of [email].
+ *
+ * Unlike [email], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("email") @ExcludeMissing fun _email(): JsonField = email
+
+ /**
+ * Returns the raw JSON value of [familyName].
+ *
+ * Unlike [familyName], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("family_name")
+ @ExcludeMissing
+ fun _familyName(): JsonField = familyName
+
+ /**
+ * Returns the raw JSON value of [givenName].
+ *
+ * Unlike [givenName], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("given_name") @ExcludeMissing fun _givenName(): JsonField = givenName
+
+ /**
+ * Returns the raw JSON value of [locality].
+ *
+ * Unlike [locality], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("locality") @ExcludeMissing fun _locality(): JsonField = locality
+
+ /**
+ * Returns the raw JSON value of [postalCode].
+ *
+ * Unlike [postalCode], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("postal_code")
+ @ExcludeMissing
+ fun _postalCode(): JsonField = postalCode
+
+ /**
+ * Returns the raw JSON value of [region].
+ *
+ * Unlike [region], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("region") @ExcludeMissing fun _region(): JsonField = region
+
+ @JsonAnySetter
+ private fun putAdditionalProperty(key: String, value: JsonValue) {
+ additionalProperties.put(key, value)
+ }
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map =
+ Collections.unmodifiableMap(additionalProperties)
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /** Returns a mutable builder for constructing an instance of [Body]. */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [Body]. */
+ class Builder internal constructor() {
+
+ private var address: JsonField = JsonMissing.of()
+ private var birthdate: JsonField = JsonMissing.of()
+ private var country: JsonField = JsonMissing.of()
+ private var email: JsonField = JsonMissing.of()
+ private var familyName: JsonField = JsonMissing.of()
+ private var givenName: JsonField = JsonMissing.of()
+ private var locality: JsonField = JsonMissing.of()
+ private var postalCode: JsonField = JsonMissing.of()
+ private var region: JsonField = JsonMissing.of()
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(body: Body) = apply {
+ address = body.address
+ birthdate = body.birthdate
+ country = body.country
+ email = body.email
+ familyName = body.familyName
+ givenName = body.givenName
+ locality = body.locality
+ postalCode = body.postalCode
+ region = body.region
+ additionalProperties = body.additionalProperties.toMutableMap()
+ }
+
+ /** The street address. */
+ fun address(address: String) = address(JsonField.of(address))
+
+ /**
+ * Sets [Builder.address] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.address] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun address(address: JsonField) = apply { this.address = address }
+
+ /** The date of birth in ISO 8601 (`YYYY-MM-DD`) format. Compared exactly. */
+ fun birthdate(birthdate: LocalDate) = birthdate(JsonField.of(birthdate))
+
+ /**
+ * Sets [Builder.birthdate] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.birthdate] with a well-typed [LocalDate] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun birthdate(birthdate: JsonField) = apply { this.birthdate = birthdate }
+
+ /** The ISO 3166-1 alpha-2 country code. Compared exactly. */
+ fun country(country: String) = country(JsonField.of(country))
+
+ /**
+ * Sets [Builder.country] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.country] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun country(country: JsonField) = apply { this.country = country }
+
+ /** The email address. */
+ fun email(email: String) = email(JsonField.of(email))
+
+ /**
+ * Sets [Builder.email] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.email] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun email(email: JsonField) = apply { this.email = email }
+
+ /** The end-user's family (last) name. */
+ fun familyName(familyName: String) = familyName(JsonField.of(familyName))
+
+ /**
+ * Sets [Builder.familyName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.familyName] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun familyName(familyName: JsonField) = apply { this.familyName = familyName }
+
+ /** The end-user's given (first) name. */
+ fun givenName(givenName: String) = givenName(JsonField.of(givenName))
+
+ /**
+ * Sets [Builder.givenName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.givenName] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun givenName(givenName: JsonField) = apply { this.givenName = givenName }
+
+ /** The locality (city). */
+ fun locality(locality: String) = locality(JsonField.of(locality))
+
+ /**
+ * Sets [Builder.locality] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.locality] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun locality(locality: JsonField) = apply { this.locality = locality }
+
+ /** The postal code. Compared exactly. */
+ fun postalCode(postalCode: String) = postalCode(JsonField.of(postalCode))
+
+ /**
+ * Sets [Builder.postalCode] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.postalCode] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun postalCode(postalCode: JsonField) = apply { this.postalCode = postalCode }
+
+ /** The region, state, or province. */
+ fun region(region: String) = region(JsonField.of(region))
+
+ /**
+ * Sets [Builder.region] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.region] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun region(region: JsonField) = apply { this.region = region }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ putAllAdditionalProperties(additionalProperties)
+ }
+
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) }
+
+ fun removeAllAdditionalProperties(keys: Set) = apply {
+ keys.forEach(::removeAdditionalProperty)
+ }
+
+ /**
+ * Returns an immutable instance of [Body].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ */
+ fun build(): Body =
+ Body(
+ address,
+ birthdate,
+ country,
+ email,
+ familyName,
+ givenName,
+ locality,
+ postalCode,
+ region,
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws PreludeInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
+ fun validate(): Body = apply {
+ if (validated) {
+ return@apply
+ }
+
+ address()
+ birthdate()
+ country()
+ email()
+ familyName()
+ givenName()
+ locality()
+ postalCode()
+ region()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: PreludeInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic
+ internal fun validity(): Int =
+ (if (address.asKnown().isPresent) 1 else 0) +
+ (if (birthdate.asKnown().isPresent) 1 else 0) +
+ (if (country.asKnown().isPresent) 1 else 0) +
+ (if (email.asKnown().isPresent) 1 else 0) +
+ (if (familyName.asKnown().isPresent) 1 else 0) +
+ (if (givenName.asKnown().isPresent) 1 else 0) +
+ (if (locality.asKnown().isPresent) 1 else 0) +
+ (if (postalCode.asKnown().isPresent) 1 else 0) +
+ (if (region.asKnown().isPresent) 1 else 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is Body &&
+ address == other.address &&
+ birthdate == other.birthdate &&
+ country == other.country &&
+ email == other.email &&
+ familyName == other.familyName &&
+ givenName == other.givenName &&
+ locality == other.locality &&
+ postalCode == other.postalCode &&
+ region == other.region &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(
+ address,
+ birthdate,
+ country,
+ email,
+ familyName,
+ givenName,
+ locality,
+ postalCode,
+ region,
+ additionalProperties,
+ )
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "Body{address=$address, birthdate=$birthdate, country=$country, email=$email, familyName=$familyName, givenName=$givenName, locality=$locality, postalCode=$postalCode, region=$region, additionalProperties=$additionalProperties}"
+ }
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is IntelKycMatchParams &&
+ phone == other.phone &&
+ body == other.body &&
+ additionalHeaders == other.additionalHeaders &&
+ additionalQueryParams == other.additionalQueryParams
+ }
+
+ override fun hashCode(): Int =
+ Objects.hash(phone, body, additionalHeaders, additionalQueryParams)
+
+ override fun toString() =
+ "IntelKycMatchParams{phone=$phone, body=$body, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
+}
diff --git a/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/IntelKycMatchResponse.kt b/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/IntelKycMatchResponse.kt
new file mode 100644
index 00000000..07c5a856
--- /dev/null
+++ b/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/IntelKycMatchResponse.kt
@@ -0,0 +1,2274 @@
+// File generated from our OpenAPI spec by Stainless.
+
+package so.prelude.sdk.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 java.util.Collections
+import java.util.Objects
+import java.util.Optional
+import kotlin.jvm.optionals.getOrNull
+import so.prelude.sdk.core.Enum
+import so.prelude.sdk.core.ExcludeMissing
+import so.prelude.sdk.core.JsonField
+import so.prelude.sdk.core.JsonMissing
+import so.prelude.sdk.core.JsonValue
+import so.prelude.sdk.errors.PreludeInvalidDataException
+
+/**
+ * The per-attribute match result. Each `_match` field is one of `true`, `false`, or
+ * `not_available` (the operator could not answer for that attribute). Fuzzy attributes additionally
+ * return a `_match_score` (0-99 similarity) when they do not match exactly; the score is
+ * omitted on a match or when `not_available`.
+ */
+class IntelKycMatchResponse
+@JsonCreator(mode = JsonCreator.Mode.DISABLED)
+private constructor(
+ private val addressMatch: JsonField,
+ private val addressMatchScore: JsonField,
+ private val birthdateMatch: JsonField,
+ private val countryCode: JsonField,
+ private val countryMatch: JsonField,
+ private val emailMatch: JsonField,
+ private val emailMatchScore: JsonField,
+ private val familyNameMatch: JsonField,
+ private val familyNameMatchScore: JsonField,
+ private val givenNameMatch: JsonField,
+ private val givenNameMatchScore: JsonField,
+ private val localityMatch: JsonField,
+ private val localityMatchScore: JsonField,
+ private val operator: JsonField,
+ private val phoneNumber: JsonField,
+ private val postalCodeMatch: JsonField,
+ private val regionMatch: JsonField,
+ private val regionMatchScore: JsonField,
+ private val requestId: JsonField,
+ private val additionalProperties: MutableMap,
+) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("address_match")
+ @ExcludeMissing
+ addressMatch: JsonField = JsonMissing.of(),
+ @JsonProperty("address_match_score")
+ @ExcludeMissing
+ addressMatchScore: JsonField = JsonMissing.of(),
+ @JsonProperty("birthdate_match")
+ @ExcludeMissing
+ birthdateMatch: JsonField = JsonMissing.of(),
+ @JsonProperty("country_code")
+ @ExcludeMissing
+ countryCode: JsonField = JsonMissing.of(),
+ @JsonProperty("country_match")
+ @ExcludeMissing
+ countryMatch: JsonField = JsonMissing.of(),
+ @JsonProperty("email_match")
+ @ExcludeMissing
+ emailMatch: JsonField = JsonMissing.of(),
+ @JsonProperty("email_match_score")
+ @ExcludeMissing
+ emailMatchScore: JsonField = JsonMissing.of(),
+ @JsonProperty("family_name_match")
+ @ExcludeMissing
+ familyNameMatch: JsonField = JsonMissing.of(),
+ @JsonProperty("family_name_match_score")
+ @ExcludeMissing
+ familyNameMatchScore: JsonField = JsonMissing.of(),
+ @JsonProperty("given_name_match")
+ @ExcludeMissing
+ givenNameMatch: JsonField = JsonMissing.of(),
+ @JsonProperty("given_name_match_score")
+ @ExcludeMissing
+ givenNameMatchScore: JsonField = JsonMissing.of(),
+ @JsonProperty("locality_match")
+ @ExcludeMissing
+ localityMatch: JsonField = JsonMissing.of(),
+ @JsonProperty("locality_match_score")
+ @ExcludeMissing
+ localityMatchScore: JsonField = JsonMissing.of(),
+ @JsonProperty("operator") @ExcludeMissing operator: JsonField = JsonMissing.of(),
+ @JsonProperty("phone_number")
+ @ExcludeMissing
+ phoneNumber: JsonField = JsonMissing.of(),
+ @JsonProperty("postal_code_match")
+ @ExcludeMissing
+ postalCodeMatch: JsonField = JsonMissing.of(),
+ @JsonProperty("region_match")
+ @ExcludeMissing
+ regionMatch: JsonField = JsonMissing.of(),
+ @JsonProperty("region_match_score")
+ @ExcludeMissing
+ regionMatchScore: JsonField = JsonMissing.of(),
+ @JsonProperty("request_id") @ExcludeMissing requestId: JsonField = JsonMissing.of(),
+ ) : this(
+ addressMatch,
+ addressMatchScore,
+ birthdateMatch,
+ countryCode,
+ countryMatch,
+ emailMatch,
+ emailMatchScore,
+ familyNameMatch,
+ familyNameMatchScore,
+ givenNameMatch,
+ givenNameMatchScore,
+ localityMatch,
+ localityMatchScore,
+ operator,
+ phoneNumber,
+ postalCodeMatch,
+ regionMatch,
+ regionMatchScore,
+ requestId,
+ mutableMapOf(),
+ )
+
+ /**
+ * Whether the street address matched the operator's record.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun addressMatch(): Optional = addressMatch.getOptional("address_match")
+
+ /**
+ * Similarity score (0-99) for the address. Returned only on a non-match.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun addressMatchScore(): Optional = addressMatchScore.getOptional("address_match_score")
+
+ /**
+ * Whether the date of birth matched the operator's record. Compared exactly; never scored.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun birthdateMatch(): Optional = birthdateMatch.getOptional("birthdate_match")
+
+ /**
+ * The country code of the phone number.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun countryCode(): Optional = countryCode.getOptional("country_code")
+
+ /**
+ * Whether the country matched the operator's record. Compared exactly; never scored.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun countryMatch(): Optional = countryMatch.getOptional("country_match")
+
+ /**
+ * Whether the email address matched the operator's record.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun emailMatch(): Optional = emailMatch.getOptional("email_match")
+
+ /**
+ * Similarity score (0-99) for the email. Returned only on a non-match.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun emailMatchScore(): Optional = emailMatchScore.getOptional("email_match_score")
+
+ /**
+ * Whether the family name matched the operator's record.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun familyNameMatch(): Optional =
+ familyNameMatch.getOptional("family_name_match")
+
+ /**
+ * Similarity score (0-99) for the family name. Returned only on a non-match.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun familyNameMatchScore(): Optional =
+ familyNameMatchScore.getOptional("family_name_match_score")
+
+ /**
+ * Whether the given name matched the operator's record.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun givenNameMatch(): Optional = givenNameMatch.getOptional("given_name_match")
+
+ /**
+ * Similarity score (0-99) for the given name. Returned only on a non-match.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun givenNameMatchScore(): Optional =
+ givenNameMatchScore.getOptional("given_name_match_score")
+
+ /**
+ * Whether the locality matched the operator's record.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun localityMatch(): Optional = localityMatch.getOptional("locality_match")
+
+ /**
+ * Similarity score (0-99) for the locality. Returned only on a non-match.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun localityMatchScore(): Optional =
+ localityMatchScore.getOptional("locality_match_score")
+
+ /**
+ * The mobile operator that answered the match.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun operator(): Optional = operator.getOptional("operator")
+
+ /**
+ * The phone number that was matched, in E.164 format.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun phoneNumber(): Optional = phoneNumber.getOptional("phone_number")
+
+ /**
+ * Whether the postal code matched the operator's record. Compared exactly; never scored.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun postalCodeMatch(): Optional =
+ postalCodeMatch.getOptional("postal_code_match")
+
+ /**
+ * Whether the region matched the operator's record.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun regionMatch(): Optional = regionMatch.getOptional("region_match")
+
+ /**
+ * Similarity score (0-99) for the region. Returned only on a non-match.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun regionMatchScore(): Optional = regionMatchScore.getOptional("region_match_score")
+
+ /**
+ * A string that identifies this specific request. Report it back to us to help us diagnose your
+ * issues.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun requestId(): Optional = requestId.getOptional("request_id")
+
+ /**
+ * Returns the raw JSON value of [addressMatch].
+ *
+ * Unlike [addressMatch], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("address_match")
+ @ExcludeMissing
+ fun _addressMatch(): JsonField = addressMatch
+
+ /**
+ * Returns the raw JSON value of [addressMatchScore].
+ *
+ * Unlike [addressMatchScore], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("address_match_score")
+ @ExcludeMissing
+ fun _addressMatchScore(): JsonField = addressMatchScore
+
+ /**
+ * Returns the raw JSON value of [birthdateMatch].
+ *
+ * Unlike [birthdateMatch], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("birthdate_match")
+ @ExcludeMissing
+ fun _birthdateMatch(): JsonField = birthdateMatch
+
+ /**
+ * Returns the raw JSON value of [countryCode].
+ *
+ * Unlike [countryCode], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("country_code")
+ @ExcludeMissing
+ fun _countryCode(): JsonField = countryCode
+
+ /**
+ * Returns the raw JSON value of [countryMatch].
+ *
+ * Unlike [countryMatch], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("country_match")
+ @ExcludeMissing
+ fun _countryMatch(): JsonField = countryMatch
+
+ /**
+ * Returns the raw JSON value of [emailMatch].
+ *
+ * Unlike [emailMatch], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("email_match")
+ @ExcludeMissing
+ fun _emailMatch(): JsonField = emailMatch
+
+ /**
+ * Returns the raw JSON value of [emailMatchScore].
+ *
+ * Unlike [emailMatchScore], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("email_match_score")
+ @ExcludeMissing
+ fun _emailMatchScore(): JsonField = emailMatchScore
+
+ /**
+ * Returns the raw JSON value of [familyNameMatch].
+ *
+ * Unlike [familyNameMatch], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("family_name_match")
+ @ExcludeMissing
+ fun _familyNameMatch(): JsonField = familyNameMatch
+
+ /**
+ * Returns the raw JSON value of [familyNameMatchScore].
+ *
+ * Unlike [familyNameMatchScore], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("family_name_match_score")
+ @ExcludeMissing
+ fun _familyNameMatchScore(): JsonField = familyNameMatchScore
+
+ /**
+ * Returns the raw JSON value of [givenNameMatch].
+ *
+ * Unlike [givenNameMatch], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("given_name_match")
+ @ExcludeMissing
+ fun _givenNameMatch(): JsonField = givenNameMatch
+
+ /**
+ * Returns the raw JSON value of [givenNameMatchScore].
+ *
+ * Unlike [givenNameMatchScore], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("given_name_match_score")
+ @ExcludeMissing
+ fun _givenNameMatchScore(): JsonField = givenNameMatchScore
+
+ /**
+ * Returns the raw JSON value of [localityMatch].
+ *
+ * Unlike [localityMatch], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("locality_match")
+ @ExcludeMissing
+ fun _localityMatch(): JsonField = localityMatch
+
+ /**
+ * Returns the raw JSON value of [localityMatchScore].
+ *
+ * Unlike [localityMatchScore], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("locality_match_score")
+ @ExcludeMissing
+ fun _localityMatchScore(): JsonField = localityMatchScore
+
+ /**
+ * Returns the raw JSON value of [operator].
+ *
+ * Unlike [operator], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("operator") @ExcludeMissing fun _operator(): JsonField = operator
+
+ /**
+ * Returns the raw JSON value of [phoneNumber].
+ *
+ * Unlike [phoneNumber], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("phone_number")
+ @ExcludeMissing
+ fun _phoneNumber(): JsonField = phoneNumber
+
+ /**
+ * Returns the raw JSON value of [postalCodeMatch].
+ *
+ * Unlike [postalCodeMatch], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("postal_code_match")
+ @ExcludeMissing
+ fun _postalCodeMatch(): JsonField = postalCodeMatch
+
+ /**
+ * Returns the raw JSON value of [regionMatch].
+ *
+ * Unlike [regionMatch], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("region_match")
+ @ExcludeMissing
+ fun _regionMatch(): JsonField = regionMatch
+
+ /**
+ * Returns the raw JSON value of [regionMatchScore].
+ *
+ * Unlike [regionMatchScore], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("region_match_score")
+ @ExcludeMissing
+ fun _regionMatchScore(): JsonField = regionMatchScore
+
+ /**
+ * Returns the raw JSON value of [requestId].
+ *
+ * Unlike [requestId], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("request_id") @ExcludeMissing fun _requestId(): JsonField = requestId
+
+ @JsonAnySetter
+ private fun putAdditionalProperty(key: String, value: JsonValue) {
+ additionalProperties.put(key, value)
+ }
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map =
+ Collections.unmodifiableMap(additionalProperties)
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /** Returns a mutable builder for constructing an instance of [IntelKycMatchResponse]. */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [IntelKycMatchResponse]. */
+ class Builder internal constructor() {
+
+ private var addressMatch: JsonField = JsonMissing.of()
+ private var addressMatchScore: JsonField = JsonMissing.of()
+ private var birthdateMatch: JsonField = JsonMissing.of()
+ private var countryCode: JsonField = JsonMissing.of()
+ private var countryMatch: JsonField = JsonMissing.of()
+ private var emailMatch: JsonField = JsonMissing.of()
+ private var emailMatchScore: JsonField = JsonMissing.of()
+ private var familyNameMatch: JsonField = JsonMissing.of()
+ private var familyNameMatchScore: JsonField = JsonMissing.of()
+ private var givenNameMatch: JsonField = JsonMissing.of()
+ private var givenNameMatchScore: JsonField = JsonMissing.of()
+ private var localityMatch: JsonField = JsonMissing.of()
+ private var localityMatchScore: JsonField = JsonMissing.of()
+ private var operator: JsonField = JsonMissing.of()
+ private var phoneNumber: JsonField = JsonMissing.of()
+ private var postalCodeMatch: JsonField = JsonMissing.of()
+ private var regionMatch: JsonField = JsonMissing.of()
+ private var regionMatchScore: JsonField = JsonMissing.of()
+ private var requestId: JsonField = JsonMissing.of()
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(intelKycMatchResponse: IntelKycMatchResponse) = apply {
+ addressMatch = intelKycMatchResponse.addressMatch
+ addressMatchScore = intelKycMatchResponse.addressMatchScore
+ birthdateMatch = intelKycMatchResponse.birthdateMatch
+ countryCode = intelKycMatchResponse.countryCode
+ countryMatch = intelKycMatchResponse.countryMatch
+ emailMatch = intelKycMatchResponse.emailMatch
+ emailMatchScore = intelKycMatchResponse.emailMatchScore
+ familyNameMatch = intelKycMatchResponse.familyNameMatch
+ familyNameMatchScore = intelKycMatchResponse.familyNameMatchScore
+ givenNameMatch = intelKycMatchResponse.givenNameMatch
+ givenNameMatchScore = intelKycMatchResponse.givenNameMatchScore
+ localityMatch = intelKycMatchResponse.localityMatch
+ localityMatchScore = intelKycMatchResponse.localityMatchScore
+ operator = intelKycMatchResponse.operator
+ phoneNumber = intelKycMatchResponse.phoneNumber
+ postalCodeMatch = intelKycMatchResponse.postalCodeMatch
+ regionMatch = intelKycMatchResponse.regionMatch
+ regionMatchScore = intelKycMatchResponse.regionMatchScore
+ requestId = intelKycMatchResponse.requestId
+ additionalProperties = intelKycMatchResponse.additionalProperties.toMutableMap()
+ }
+
+ /** Whether the street address matched the operator's record. */
+ fun addressMatch(addressMatch: AddressMatch) = addressMatch(JsonField.of(addressMatch))
+
+ /**
+ * Sets [Builder.addressMatch] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.addressMatch] with a well-typed [AddressMatch] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun addressMatch(addressMatch: JsonField) = apply {
+ this.addressMatch = addressMatch
+ }
+
+ /** Similarity score (0-99) for the address. Returned only on a non-match. */
+ fun addressMatchScore(addressMatchScore: Long) =
+ addressMatchScore(JsonField.of(addressMatchScore))
+
+ /**
+ * Sets [Builder.addressMatchScore] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.addressMatchScore] with a well-typed [Long] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun addressMatchScore(addressMatchScore: JsonField) = apply {
+ this.addressMatchScore = addressMatchScore
+ }
+
+ /**
+ * Whether the date of birth matched the operator's record. Compared exactly; never scored.
+ */
+ fun birthdateMatch(birthdateMatch: BirthdateMatch) =
+ birthdateMatch(JsonField.of(birthdateMatch))
+
+ /**
+ * Sets [Builder.birthdateMatch] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.birthdateMatch] with a well-typed [BirthdateMatch] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun birthdateMatch(birthdateMatch: JsonField) = apply {
+ this.birthdateMatch = birthdateMatch
+ }
+
+ /** The country code of the phone number. */
+ fun countryCode(countryCode: String) = countryCode(JsonField.of(countryCode))
+
+ /**
+ * Sets [Builder.countryCode] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.countryCode] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun countryCode(countryCode: JsonField) = apply { this.countryCode = countryCode }
+
+ /** Whether the country matched the operator's record. Compared exactly; never scored. */
+ fun countryMatch(countryMatch: CountryMatch) = countryMatch(JsonField.of(countryMatch))
+
+ /**
+ * Sets [Builder.countryMatch] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.countryMatch] with a well-typed [CountryMatch] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun countryMatch(countryMatch: JsonField) = apply {
+ this.countryMatch = countryMatch
+ }
+
+ /** Whether the email address matched the operator's record. */
+ fun emailMatch(emailMatch: EmailMatch) = emailMatch(JsonField.of(emailMatch))
+
+ /**
+ * Sets [Builder.emailMatch] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.emailMatch] with a well-typed [EmailMatch] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun emailMatch(emailMatch: JsonField) = apply { this.emailMatch = emailMatch }
+
+ /** Similarity score (0-99) for the email. Returned only on a non-match. */
+ fun emailMatchScore(emailMatchScore: Long) = emailMatchScore(JsonField.of(emailMatchScore))
+
+ /**
+ * Sets [Builder.emailMatchScore] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.emailMatchScore] with a well-typed [Long] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun emailMatchScore(emailMatchScore: JsonField) = apply {
+ this.emailMatchScore = emailMatchScore
+ }
+
+ /** Whether the family name matched the operator's record. */
+ fun familyNameMatch(familyNameMatch: FamilyNameMatch) =
+ familyNameMatch(JsonField.of(familyNameMatch))
+
+ /**
+ * Sets [Builder.familyNameMatch] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.familyNameMatch] with a well-typed [FamilyNameMatch]
+ * value instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun familyNameMatch(familyNameMatch: JsonField) = apply {
+ this.familyNameMatch = familyNameMatch
+ }
+
+ /** Similarity score (0-99) for the family name. Returned only on a non-match. */
+ fun familyNameMatchScore(familyNameMatchScore: Long) =
+ familyNameMatchScore(JsonField.of(familyNameMatchScore))
+
+ /**
+ * Sets [Builder.familyNameMatchScore] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.familyNameMatchScore] with a well-typed [Long] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun familyNameMatchScore(familyNameMatchScore: JsonField) = apply {
+ this.familyNameMatchScore = familyNameMatchScore
+ }
+
+ /** Whether the given name matched the operator's record. */
+ fun givenNameMatch(givenNameMatch: GivenNameMatch) =
+ givenNameMatch(JsonField.of(givenNameMatch))
+
+ /**
+ * Sets [Builder.givenNameMatch] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.givenNameMatch] with a well-typed [GivenNameMatch] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun givenNameMatch(givenNameMatch: JsonField) = apply {
+ this.givenNameMatch = givenNameMatch
+ }
+
+ /** Similarity score (0-99) for the given name. Returned only on a non-match. */
+ fun givenNameMatchScore(givenNameMatchScore: Long) =
+ givenNameMatchScore(JsonField.of(givenNameMatchScore))
+
+ /**
+ * Sets [Builder.givenNameMatchScore] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.givenNameMatchScore] with a well-typed [Long] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun givenNameMatchScore(givenNameMatchScore: JsonField) = apply {
+ this.givenNameMatchScore = givenNameMatchScore
+ }
+
+ /** Whether the locality matched the operator's record. */
+ fun localityMatch(localityMatch: LocalityMatch) = localityMatch(JsonField.of(localityMatch))
+
+ /**
+ * Sets [Builder.localityMatch] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.localityMatch] with a well-typed [LocalityMatch] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun localityMatch(localityMatch: JsonField) = apply {
+ this.localityMatch = localityMatch
+ }
+
+ /** Similarity score (0-99) for the locality. Returned only on a non-match. */
+ fun localityMatchScore(localityMatchScore: Long) =
+ localityMatchScore(JsonField.of(localityMatchScore))
+
+ /**
+ * Sets [Builder.localityMatchScore] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.localityMatchScore] with a well-typed [Long] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun localityMatchScore(localityMatchScore: JsonField) = apply {
+ this.localityMatchScore = localityMatchScore
+ }
+
+ /** The mobile operator that answered the match. */
+ fun operator(operator: String) = operator(JsonField.of(operator))
+
+ /**
+ * Sets [Builder.operator] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.operator] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun operator(operator: JsonField) = apply { this.operator = operator }
+
+ /** The phone number that was matched, in E.164 format. */
+ fun phoneNumber(phoneNumber: String) = phoneNumber(JsonField.of(phoneNumber))
+
+ /**
+ * Sets [Builder.phoneNumber] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.phoneNumber] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun phoneNumber(phoneNumber: JsonField) = apply { this.phoneNumber = phoneNumber }
+
+ /**
+ * Whether the postal code matched the operator's record. Compared exactly; never scored.
+ */
+ fun postalCodeMatch(postalCodeMatch: PostalCodeMatch) =
+ postalCodeMatch(JsonField.of(postalCodeMatch))
+
+ /**
+ * Sets [Builder.postalCodeMatch] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.postalCodeMatch] with a well-typed [PostalCodeMatch]
+ * value instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun postalCodeMatch(postalCodeMatch: JsonField) = apply {
+ this.postalCodeMatch = postalCodeMatch
+ }
+
+ /** Whether the region matched the operator's record. */
+ fun regionMatch(regionMatch: RegionMatch) = regionMatch(JsonField.of(regionMatch))
+
+ /**
+ * Sets [Builder.regionMatch] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.regionMatch] with a well-typed [RegionMatch] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun regionMatch(regionMatch: JsonField) = apply {
+ this.regionMatch = regionMatch
+ }
+
+ /** Similarity score (0-99) for the region. Returned only on a non-match. */
+ fun regionMatchScore(regionMatchScore: Long) =
+ regionMatchScore(JsonField.of(regionMatchScore))
+
+ /**
+ * Sets [Builder.regionMatchScore] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.regionMatchScore] with a well-typed [Long] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun regionMatchScore(regionMatchScore: JsonField) = apply {
+ this.regionMatchScore = regionMatchScore
+ }
+
+ /**
+ * A string that identifies this specific request. Report it back to us to help us diagnose
+ * your issues.
+ */
+ fun requestId(requestId: String) = requestId(JsonField.of(requestId))
+
+ /**
+ * Sets [Builder.requestId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.requestId] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun requestId(requestId: JsonField) = apply { this.requestId = requestId }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ putAllAdditionalProperties(additionalProperties)
+ }
+
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) }
+
+ fun removeAllAdditionalProperties(keys: Set) = apply {
+ keys.forEach(::removeAdditionalProperty)
+ }
+
+ /**
+ * Returns an immutable instance of [IntelKycMatchResponse].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ */
+ fun build(): IntelKycMatchResponse =
+ IntelKycMatchResponse(
+ addressMatch,
+ addressMatchScore,
+ birthdateMatch,
+ countryCode,
+ countryMatch,
+ emailMatch,
+ emailMatchScore,
+ familyNameMatch,
+ familyNameMatchScore,
+ givenNameMatch,
+ givenNameMatchScore,
+ localityMatch,
+ localityMatchScore,
+ operator,
+ phoneNumber,
+ postalCodeMatch,
+ regionMatch,
+ regionMatchScore,
+ requestId,
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws PreludeInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
+ fun validate(): IntelKycMatchResponse = apply {
+ if (validated) {
+ return@apply
+ }
+
+ addressMatch().ifPresent { it.validate() }
+ addressMatchScore()
+ birthdateMatch().ifPresent { it.validate() }
+ countryCode()
+ countryMatch().ifPresent { it.validate() }
+ emailMatch().ifPresent { it.validate() }
+ emailMatchScore()
+ familyNameMatch().ifPresent { it.validate() }
+ familyNameMatchScore()
+ givenNameMatch().ifPresent { it.validate() }
+ givenNameMatchScore()
+ localityMatch().ifPresent { it.validate() }
+ localityMatchScore()
+ operator()
+ phoneNumber()
+ postalCodeMatch().ifPresent { it.validate() }
+ regionMatch().ifPresent { it.validate() }
+ regionMatchScore()
+ requestId()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: PreludeInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic
+ internal fun validity(): Int =
+ (addressMatch.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (addressMatchScore.asKnown().isPresent) 1 else 0) +
+ (birthdateMatch.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (countryCode.asKnown().isPresent) 1 else 0) +
+ (countryMatch.asKnown().getOrNull()?.validity() ?: 0) +
+ (emailMatch.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (emailMatchScore.asKnown().isPresent) 1 else 0) +
+ (familyNameMatch.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (familyNameMatchScore.asKnown().isPresent) 1 else 0) +
+ (givenNameMatch.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (givenNameMatchScore.asKnown().isPresent) 1 else 0) +
+ (localityMatch.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (localityMatchScore.asKnown().isPresent) 1 else 0) +
+ (if (operator.asKnown().isPresent) 1 else 0) +
+ (if (phoneNumber.asKnown().isPresent) 1 else 0) +
+ (postalCodeMatch.asKnown().getOrNull()?.validity() ?: 0) +
+ (regionMatch.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (regionMatchScore.asKnown().isPresent) 1 else 0) +
+ (if (requestId.asKnown().isPresent) 1 else 0)
+
+ /** Whether the street address matched the operator's record. */
+ class AddressMatch @JsonCreator private constructor(private val value: JsonField) :
+ Enum {
+
+ /**
+ * Returns this class instance's raw value.
+ *
+ * This is usually only useful if this instance was deserialized from data that doesn't
+ * match any known member, and you want to know that value. For example, if the SDK is on an
+ * older version than the API, then the API may respond with new members that the SDK is
+ * unaware of.
+ */
+ @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
+
+ companion object {
+
+ @JvmField val TRUE = of("true")
+
+ @JvmField val FALSE = of("false")
+
+ @JvmField val NOT_AVAILABLE = of("not_available")
+
+ @JvmStatic fun of(value: String) = AddressMatch(JsonField.of(value))
+ }
+
+ /** An enum containing [AddressMatch]'s known values. */
+ enum class Known {
+ TRUE,
+ FALSE,
+ NOT_AVAILABLE,
+ }
+
+ /**
+ * An enum containing [AddressMatch]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [AddressMatch] can contain an unknown value in a couple of cases:
+ * - It was deserialized from data that doesn't match any known member. For example, if the
+ * SDK is on an older version than the API, then the API may respond with new members that
+ * the SDK is unaware of.
+ * - It was constructed with an arbitrary value using the [of] method.
+ */
+ enum class Value {
+ TRUE,
+ FALSE,
+ NOT_AVAILABLE,
+ /**
+ * An enum member indicating that [AddressMatch] was instantiated with an unknown value.
+ */
+ _UNKNOWN,
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN]
+ * if the class was instantiated with an unknown value.
+ *
+ * Use the [known] method instead if you're certain the value is always known or if you want
+ * to throw for the unknown case.
+ */
+ fun value(): Value =
+ when (this) {
+ TRUE -> Value.TRUE
+ FALSE -> Value.FALSE
+ NOT_AVAILABLE -> Value.NOT_AVAILABLE
+ else -> Value._UNKNOWN
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value.
+ *
+ * Use the [value] method instead if you're uncertain the value is always known and don't
+ * want to throw for the unknown case.
+ *
+ * @throws PreludeInvalidDataException if this class instance's value is a not a known
+ * member.
+ */
+ fun known(): Known =
+ when (this) {
+ TRUE -> Known.TRUE
+ FALSE -> Known.FALSE
+ NOT_AVAILABLE -> Known.NOT_AVAILABLE
+ else -> throw PreludeInvalidDataException("Unknown AddressMatch: $value")
+ }
+
+ /**
+ * Returns this class instance's primitive wire representation.
+ *
+ * This differs from the [toString] method because that method is primarily for debugging
+ * and generally doesn't throw.
+ *
+ * @throws PreludeInvalidDataException if this class instance's value does not have the
+ * expected primitive type.
+ */
+ fun asString(): String =
+ _value().asString().orElseThrow { PreludeInvalidDataException("Value is not a String") }
+
+ private var validated: Boolean = false
+
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws PreludeInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
+ fun validate(): AddressMatch = apply {
+ if (validated) {
+ return@apply
+ }
+
+ known()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: PreludeInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is AddressMatch && value == other.value
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
+ /** Whether the date of birth matched the operator's record. Compared exactly; never scored. */
+ class BirthdateMatch @JsonCreator private constructor(private val value: JsonField) :
+ Enum {
+
+ /**
+ * Returns this class instance's raw value.
+ *
+ * This is usually only useful if this instance was deserialized from data that doesn't
+ * match any known member, and you want to know that value. For example, if the SDK is on an
+ * older version than the API, then the API may respond with new members that the SDK is
+ * unaware of.
+ */
+ @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
+
+ companion object {
+
+ @JvmField val TRUE = of("true")
+
+ @JvmField val FALSE = of("false")
+
+ @JvmField val NOT_AVAILABLE = of("not_available")
+
+ @JvmStatic fun of(value: String) = BirthdateMatch(JsonField.of(value))
+ }
+
+ /** An enum containing [BirthdateMatch]'s known values. */
+ enum class Known {
+ TRUE,
+ FALSE,
+ NOT_AVAILABLE,
+ }
+
+ /**
+ * An enum containing [BirthdateMatch]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [BirthdateMatch] can contain an unknown value in a couple of cases:
+ * - It was deserialized from data that doesn't match any known member. For example, if the
+ * SDK is on an older version than the API, then the API may respond with new members that
+ * the SDK is unaware of.
+ * - It was constructed with an arbitrary value using the [of] method.
+ */
+ enum class Value {
+ TRUE,
+ FALSE,
+ NOT_AVAILABLE,
+ /**
+ * An enum member indicating that [BirthdateMatch] was instantiated with an unknown
+ * value.
+ */
+ _UNKNOWN,
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN]
+ * if the class was instantiated with an unknown value.
+ *
+ * Use the [known] method instead if you're certain the value is always known or if you want
+ * to throw for the unknown case.
+ */
+ fun value(): Value =
+ when (this) {
+ TRUE -> Value.TRUE
+ FALSE -> Value.FALSE
+ NOT_AVAILABLE -> Value.NOT_AVAILABLE
+ else -> Value._UNKNOWN
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value.
+ *
+ * Use the [value] method instead if you're uncertain the value is always known and don't
+ * want to throw for the unknown case.
+ *
+ * @throws PreludeInvalidDataException if this class instance's value is a not a known
+ * member.
+ */
+ fun known(): Known =
+ when (this) {
+ TRUE -> Known.TRUE
+ FALSE -> Known.FALSE
+ NOT_AVAILABLE -> Known.NOT_AVAILABLE
+ else -> throw PreludeInvalidDataException("Unknown BirthdateMatch: $value")
+ }
+
+ /**
+ * Returns this class instance's primitive wire representation.
+ *
+ * This differs from the [toString] method because that method is primarily for debugging
+ * and generally doesn't throw.
+ *
+ * @throws PreludeInvalidDataException if this class instance's value does not have the
+ * expected primitive type.
+ */
+ fun asString(): String =
+ _value().asString().orElseThrow { PreludeInvalidDataException("Value is not a String") }
+
+ private var validated: Boolean = false
+
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws PreludeInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
+ fun validate(): BirthdateMatch = apply {
+ if (validated) {
+ return@apply
+ }
+
+ known()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: PreludeInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is BirthdateMatch && value == other.value
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
+ /** Whether the country matched the operator's record. Compared exactly; never scored. */
+ class CountryMatch @JsonCreator private constructor(private val value: JsonField) :
+ Enum {
+
+ /**
+ * Returns this class instance's raw value.
+ *
+ * This is usually only useful if this instance was deserialized from data that doesn't
+ * match any known member, and you want to know that value. For example, if the SDK is on an
+ * older version than the API, then the API may respond with new members that the SDK is
+ * unaware of.
+ */
+ @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
+
+ companion object {
+
+ @JvmField val TRUE = of("true")
+
+ @JvmField val FALSE = of("false")
+
+ @JvmField val NOT_AVAILABLE = of("not_available")
+
+ @JvmStatic fun of(value: String) = CountryMatch(JsonField.of(value))
+ }
+
+ /** An enum containing [CountryMatch]'s known values. */
+ enum class Known {
+ TRUE,
+ FALSE,
+ NOT_AVAILABLE,
+ }
+
+ /**
+ * An enum containing [CountryMatch]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [CountryMatch] can contain an unknown value in a couple of cases:
+ * - It was deserialized from data that doesn't match any known member. For example, if the
+ * SDK is on an older version than the API, then the API may respond with new members that
+ * the SDK is unaware of.
+ * - It was constructed with an arbitrary value using the [of] method.
+ */
+ enum class Value {
+ TRUE,
+ FALSE,
+ NOT_AVAILABLE,
+ /**
+ * An enum member indicating that [CountryMatch] was instantiated with an unknown value.
+ */
+ _UNKNOWN,
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN]
+ * if the class was instantiated with an unknown value.
+ *
+ * Use the [known] method instead if you're certain the value is always known or if you want
+ * to throw for the unknown case.
+ */
+ fun value(): Value =
+ when (this) {
+ TRUE -> Value.TRUE
+ FALSE -> Value.FALSE
+ NOT_AVAILABLE -> Value.NOT_AVAILABLE
+ else -> Value._UNKNOWN
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value.
+ *
+ * Use the [value] method instead if you're uncertain the value is always known and don't
+ * want to throw for the unknown case.
+ *
+ * @throws PreludeInvalidDataException if this class instance's value is a not a known
+ * member.
+ */
+ fun known(): Known =
+ when (this) {
+ TRUE -> Known.TRUE
+ FALSE -> Known.FALSE
+ NOT_AVAILABLE -> Known.NOT_AVAILABLE
+ else -> throw PreludeInvalidDataException("Unknown CountryMatch: $value")
+ }
+
+ /**
+ * Returns this class instance's primitive wire representation.
+ *
+ * This differs from the [toString] method because that method is primarily for debugging
+ * and generally doesn't throw.
+ *
+ * @throws PreludeInvalidDataException if this class instance's value does not have the
+ * expected primitive type.
+ */
+ fun asString(): String =
+ _value().asString().orElseThrow { PreludeInvalidDataException("Value is not a String") }
+
+ private var validated: Boolean = false
+
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws PreludeInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
+ fun validate(): CountryMatch = apply {
+ if (validated) {
+ return@apply
+ }
+
+ known()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: PreludeInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is CountryMatch && value == other.value
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
+ /** Whether the email address matched the operator's record. */
+ class EmailMatch @JsonCreator private constructor(private val value: JsonField) : Enum {
+
+ /**
+ * Returns this class instance's raw value.
+ *
+ * This is usually only useful if this instance was deserialized from data that doesn't
+ * match any known member, and you want to know that value. For example, if the SDK is on an
+ * older version than the API, then the API may respond with new members that the SDK is
+ * unaware of.
+ */
+ @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
+
+ companion object {
+
+ @JvmField val TRUE = of("true")
+
+ @JvmField val FALSE = of("false")
+
+ @JvmField val NOT_AVAILABLE = of("not_available")
+
+ @JvmStatic fun of(value: String) = EmailMatch(JsonField.of(value))
+ }
+
+ /** An enum containing [EmailMatch]'s known values. */
+ enum class Known {
+ TRUE,
+ FALSE,
+ NOT_AVAILABLE,
+ }
+
+ /**
+ * An enum containing [EmailMatch]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [EmailMatch] can contain an unknown value in a couple of cases:
+ * - It was deserialized from data that doesn't match any known member. For example, if the
+ * SDK is on an older version than the API, then the API may respond with new members that
+ * the SDK is unaware of.
+ * - It was constructed with an arbitrary value using the [of] method.
+ */
+ enum class Value {
+ TRUE,
+ FALSE,
+ NOT_AVAILABLE,
+ /**
+ * An enum member indicating that [EmailMatch] was instantiated with an unknown value.
+ */
+ _UNKNOWN,
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN]
+ * if the class was instantiated with an unknown value.
+ *
+ * Use the [known] method instead if you're certain the value is always known or if you want
+ * to throw for the unknown case.
+ */
+ fun value(): Value =
+ when (this) {
+ TRUE -> Value.TRUE
+ FALSE -> Value.FALSE
+ NOT_AVAILABLE -> Value.NOT_AVAILABLE
+ else -> Value._UNKNOWN
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value.
+ *
+ * Use the [value] method instead if you're uncertain the value is always known and don't
+ * want to throw for the unknown case.
+ *
+ * @throws PreludeInvalidDataException if this class instance's value is a not a known
+ * member.
+ */
+ fun known(): Known =
+ when (this) {
+ TRUE -> Known.TRUE
+ FALSE -> Known.FALSE
+ NOT_AVAILABLE -> Known.NOT_AVAILABLE
+ else -> throw PreludeInvalidDataException("Unknown EmailMatch: $value")
+ }
+
+ /**
+ * Returns this class instance's primitive wire representation.
+ *
+ * This differs from the [toString] method because that method is primarily for debugging
+ * and generally doesn't throw.
+ *
+ * @throws PreludeInvalidDataException if this class instance's value does not have the
+ * expected primitive type.
+ */
+ fun asString(): String =
+ _value().asString().orElseThrow { PreludeInvalidDataException("Value is not a String") }
+
+ private var validated: Boolean = false
+
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws PreludeInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
+ fun validate(): EmailMatch = apply {
+ if (validated) {
+ return@apply
+ }
+
+ known()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: PreludeInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is EmailMatch && value == other.value
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
+ /** Whether the family name matched the operator's record. */
+ class FamilyNameMatch @JsonCreator private constructor(private val value: JsonField) :
+ Enum {
+
+ /**
+ * Returns this class instance's raw value.
+ *
+ * This is usually only useful if this instance was deserialized from data that doesn't
+ * match any known member, and you want to know that value. For example, if the SDK is on an
+ * older version than the API, then the API may respond with new members that the SDK is
+ * unaware of.
+ */
+ @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
+
+ companion object {
+
+ @JvmField val TRUE = of("true")
+
+ @JvmField val FALSE = of("false")
+
+ @JvmField val NOT_AVAILABLE = of("not_available")
+
+ @JvmStatic fun of(value: String) = FamilyNameMatch(JsonField.of(value))
+ }
+
+ /** An enum containing [FamilyNameMatch]'s known values. */
+ enum class Known {
+ TRUE,
+ FALSE,
+ NOT_AVAILABLE,
+ }
+
+ /**
+ * An enum containing [FamilyNameMatch]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [FamilyNameMatch] can contain an unknown value in a couple of cases:
+ * - It was deserialized from data that doesn't match any known member. For example, if the
+ * SDK is on an older version than the API, then the API may respond with new members that
+ * the SDK is unaware of.
+ * - It was constructed with an arbitrary value using the [of] method.
+ */
+ enum class Value {
+ TRUE,
+ FALSE,
+ NOT_AVAILABLE,
+ /**
+ * An enum member indicating that [FamilyNameMatch] was instantiated with an unknown
+ * value.
+ */
+ _UNKNOWN,
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN]
+ * if the class was instantiated with an unknown value.
+ *
+ * Use the [known] method instead if you're certain the value is always known or if you want
+ * to throw for the unknown case.
+ */
+ fun value(): Value =
+ when (this) {
+ TRUE -> Value.TRUE
+ FALSE -> Value.FALSE
+ NOT_AVAILABLE -> Value.NOT_AVAILABLE
+ else -> Value._UNKNOWN
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value.
+ *
+ * Use the [value] method instead if you're uncertain the value is always known and don't
+ * want to throw for the unknown case.
+ *
+ * @throws PreludeInvalidDataException if this class instance's value is a not a known
+ * member.
+ */
+ fun known(): Known =
+ when (this) {
+ TRUE -> Known.TRUE
+ FALSE -> Known.FALSE
+ NOT_AVAILABLE -> Known.NOT_AVAILABLE
+ else -> throw PreludeInvalidDataException("Unknown FamilyNameMatch: $value")
+ }
+
+ /**
+ * Returns this class instance's primitive wire representation.
+ *
+ * This differs from the [toString] method because that method is primarily for debugging
+ * and generally doesn't throw.
+ *
+ * @throws PreludeInvalidDataException if this class instance's value does not have the
+ * expected primitive type.
+ */
+ fun asString(): String =
+ _value().asString().orElseThrow { PreludeInvalidDataException("Value is not a String") }
+
+ private var validated: Boolean = false
+
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws PreludeInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
+ fun validate(): FamilyNameMatch = apply {
+ if (validated) {
+ return@apply
+ }
+
+ known()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: PreludeInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is FamilyNameMatch && value == other.value
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
+ /** Whether the given name matched the operator's record. */
+ class GivenNameMatch @JsonCreator private constructor(private val value: JsonField) :
+ Enum {
+
+ /**
+ * Returns this class instance's raw value.
+ *
+ * This is usually only useful if this instance was deserialized from data that doesn't
+ * match any known member, and you want to know that value. For example, if the SDK is on an
+ * older version than the API, then the API may respond with new members that the SDK is
+ * unaware of.
+ */
+ @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
+
+ companion object {
+
+ @JvmField val TRUE = of("true")
+
+ @JvmField val FALSE = of("false")
+
+ @JvmField val NOT_AVAILABLE = of("not_available")
+
+ @JvmStatic fun of(value: String) = GivenNameMatch(JsonField.of(value))
+ }
+
+ /** An enum containing [GivenNameMatch]'s known values. */
+ enum class Known {
+ TRUE,
+ FALSE,
+ NOT_AVAILABLE,
+ }
+
+ /**
+ * An enum containing [GivenNameMatch]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [GivenNameMatch] can contain an unknown value in a couple of cases:
+ * - It was deserialized from data that doesn't match any known member. For example, if the
+ * SDK is on an older version than the API, then the API may respond with new members that
+ * the SDK is unaware of.
+ * - It was constructed with an arbitrary value using the [of] method.
+ */
+ enum class Value {
+ TRUE,
+ FALSE,
+ NOT_AVAILABLE,
+ /**
+ * An enum member indicating that [GivenNameMatch] was instantiated with an unknown
+ * value.
+ */
+ _UNKNOWN,
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN]
+ * if the class was instantiated with an unknown value.
+ *
+ * Use the [known] method instead if you're certain the value is always known or if you want
+ * to throw for the unknown case.
+ */
+ fun value(): Value =
+ when (this) {
+ TRUE -> Value.TRUE
+ FALSE -> Value.FALSE
+ NOT_AVAILABLE -> Value.NOT_AVAILABLE
+ else -> Value._UNKNOWN
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value.
+ *
+ * Use the [value] method instead if you're uncertain the value is always known and don't
+ * want to throw for the unknown case.
+ *
+ * @throws PreludeInvalidDataException if this class instance's value is a not a known
+ * member.
+ */
+ fun known(): Known =
+ when (this) {
+ TRUE -> Known.TRUE
+ FALSE -> Known.FALSE
+ NOT_AVAILABLE -> Known.NOT_AVAILABLE
+ else -> throw PreludeInvalidDataException("Unknown GivenNameMatch: $value")
+ }
+
+ /**
+ * Returns this class instance's primitive wire representation.
+ *
+ * This differs from the [toString] method because that method is primarily for debugging
+ * and generally doesn't throw.
+ *
+ * @throws PreludeInvalidDataException if this class instance's value does not have the
+ * expected primitive type.
+ */
+ fun asString(): String =
+ _value().asString().orElseThrow { PreludeInvalidDataException("Value is not a String") }
+
+ private var validated: Boolean = false
+
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws PreludeInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
+ fun validate(): GivenNameMatch = apply {
+ if (validated) {
+ return@apply
+ }
+
+ known()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: PreludeInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is GivenNameMatch && value == other.value
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
+ /** Whether the locality matched the operator's record. */
+ class LocalityMatch @JsonCreator private constructor(private val value: JsonField) :
+ Enum {
+
+ /**
+ * Returns this class instance's raw value.
+ *
+ * This is usually only useful if this instance was deserialized from data that doesn't
+ * match any known member, and you want to know that value. For example, if the SDK is on an
+ * older version than the API, then the API may respond with new members that the SDK is
+ * unaware of.
+ */
+ @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
+
+ companion object {
+
+ @JvmField val TRUE = of("true")
+
+ @JvmField val FALSE = of("false")
+
+ @JvmField val NOT_AVAILABLE = of("not_available")
+
+ @JvmStatic fun of(value: String) = LocalityMatch(JsonField.of(value))
+ }
+
+ /** An enum containing [LocalityMatch]'s known values. */
+ enum class Known {
+ TRUE,
+ FALSE,
+ NOT_AVAILABLE,
+ }
+
+ /**
+ * An enum containing [LocalityMatch]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [LocalityMatch] can contain an unknown value in a couple of cases:
+ * - It was deserialized from data that doesn't match any known member. For example, if the
+ * SDK is on an older version than the API, then the API may respond with new members that
+ * the SDK is unaware of.
+ * - It was constructed with an arbitrary value using the [of] method.
+ */
+ enum class Value {
+ TRUE,
+ FALSE,
+ NOT_AVAILABLE,
+ /**
+ * An enum member indicating that [LocalityMatch] was instantiated with an unknown
+ * value.
+ */
+ _UNKNOWN,
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN]
+ * if the class was instantiated with an unknown value.
+ *
+ * Use the [known] method instead if you're certain the value is always known or if you want
+ * to throw for the unknown case.
+ */
+ fun value(): Value =
+ when (this) {
+ TRUE -> Value.TRUE
+ FALSE -> Value.FALSE
+ NOT_AVAILABLE -> Value.NOT_AVAILABLE
+ else -> Value._UNKNOWN
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value.
+ *
+ * Use the [value] method instead if you're uncertain the value is always known and don't
+ * want to throw for the unknown case.
+ *
+ * @throws PreludeInvalidDataException if this class instance's value is a not a known
+ * member.
+ */
+ fun known(): Known =
+ when (this) {
+ TRUE -> Known.TRUE
+ FALSE -> Known.FALSE
+ NOT_AVAILABLE -> Known.NOT_AVAILABLE
+ else -> throw PreludeInvalidDataException("Unknown LocalityMatch: $value")
+ }
+
+ /**
+ * Returns this class instance's primitive wire representation.
+ *
+ * This differs from the [toString] method because that method is primarily for debugging
+ * and generally doesn't throw.
+ *
+ * @throws PreludeInvalidDataException if this class instance's value does not have the
+ * expected primitive type.
+ */
+ fun asString(): String =
+ _value().asString().orElseThrow { PreludeInvalidDataException("Value is not a String") }
+
+ private var validated: Boolean = false
+
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws PreludeInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
+ fun validate(): LocalityMatch = apply {
+ if (validated) {
+ return@apply
+ }
+
+ known()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: PreludeInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is LocalityMatch && value == other.value
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
+ /** Whether the postal code matched the operator's record. Compared exactly; never scored. */
+ class PostalCodeMatch @JsonCreator private constructor(private val value: JsonField) :
+ Enum {
+
+ /**
+ * Returns this class instance's raw value.
+ *
+ * This is usually only useful if this instance was deserialized from data that doesn't
+ * match any known member, and you want to know that value. For example, if the SDK is on an
+ * older version than the API, then the API may respond with new members that the SDK is
+ * unaware of.
+ */
+ @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
+
+ companion object {
+
+ @JvmField val TRUE = of("true")
+
+ @JvmField val FALSE = of("false")
+
+ @JvmField val NOT_AVAILABLE = of("not_available")
+
+ @JvmStatic fun of(value: String) = PostalCodeMatch(JsonField.of(value))
+ }
+
+ /** An enum containing [PostalCodeMatch]'s known values. */
+ enum class Known {
+ TRUE,
+ FALSE,
+ NOT_AVAILABLE,
+ }
+
+ /**
+ * An enum containing [PostalCodeMatch]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [PostalCodeMatch] can contain an unknown value in a couple of cases:
+ * - It was deserialized from data that doesn't match any known member. For example, if the
+ * SDK is on an older version than the API, then the API may respond with new members that
+ * the SDK is unaware of.
+ * - It was constructed with an arbitrary value using the [of] method.
+ */
+ enum class Value {
+ TRUE,
+ FALSE,
+ NOT_AVAILABLE,
+ /**
+ * An enum member indicating that [PostalCodeMatch] was instantiated with an unknown
+ * value.
+ */
+ _UNKNOWN,
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN]
+ * if the class was instantiated with an unknown value.
+ *
+ * Use the [known] method instead if you're certain the value is always known or if you want
+ * to throw for the unknown case.
+ */
+ fun value(): Value =
+ when (this) {
+ TRUE -> Value.TRUE
+ FALSE -> Value.FALSE
+ NOT_AVAILABLE -> Value.NOT_AVAILABLE
+ else -> Value._UNKNOWN
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value.
+ *
+ * Use the [value] method instead if you're uncertain the value is always known and don't
+ * want to throw for the unknown case.
+ *
+ * @throws PreludeInvalidDataException if this class instance's value is a not a known
+ * member.
+ */
+ fun known(): Known =
+ when (this) {
+ TRUE -> Known.TRUE
+ FALSE -> Known.FALSE
+ NOT_AVAILABLE -> Known.NOT_AVAILABLE
+ else -> throw PreludeInvalidDataException("Unknown PostalCodeMatch: $value")
+ }
+
+ /**
+ * Returns this class instance's primitive wire representation.
+ *
+ * This differs from the [toString] method because that method is primarily for debugging
+ * and generally doesn't throw.
+ *
+ * @throws PreludeInvalidDataException if this class instance's value does not have the
+ * expected primitive type.
+ */
+ fun asString(): String =
+ _value().asString().orElseThrow { PreludeInvalidDataException("Value is not a String") }
+
+ private var validated: Boolean = false
+
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws PreludeInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
+ fun validate(): PostalCodeMatch = apply {
+ if (validated) {
+ return@apply
+ }
+
+ known()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: PreludeInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is PostalCodeMatch && value == other.value
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
+ /** Whether the region matched the operator's record. */
+ class RegionMatch @JsonCreator private constructor(private val value: JsonField) :
+ Enum {
+
+ /**
+ * Returns this class instance's raw value.
+ *
+ * This is usually only useful if this instance was deserialized from data that doesn't
+ * match any known member, and you want to know that value. For example, if the SDK is on an
+ * older version than the API, then the API may respond with new members that the SDK is
+ * unaware of.
+ */
+ @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
+
+ companion object {
+
+ @JvmField val TRUE = of("true")
+
+ @JvmField val FALSE = of("false")
+
+ @JvmField val NOT_AVAILABLE = of("not_available")
+
+ @JvmStatic fun of(value: String) = RegionMatch(JsonField.of(value))
+ }
+
+ /** An enum containing [RegionMatch]'s known values. */
+ enum class Known {
+ TRUE,
+ FALSE,
+ NOT_AVAILABLE,
+ }
+
+ /**
+ * An enum containing [RegionMatch]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [RegionMatch] can contain an unknown value in a couple of cases:
+ * - It was deserialized from data that doesn't match any known member. For example, if the
+ * SDK is on an older version than the API, then the API may respond with new members that
+ * the SDK is unaware of.
+ * - It was constructed with an arbitrary value using the [of] method.
+ */
+ enum class Value {
+ TRUE,
+ FALSE,
+ NOT_AVAILABLE,
+ /**
+ * An enum member indicating that [RegionMatch] was instantiated with an unknown value.
+ */
+ _UNKNOWN,
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN]
+ * if the class was instantiated with an unknown value.
+ *
+ * Use the [known] method instead if you're certain the value is always known or if you want
+ * to throw for the unknown case.
+ */
+ fun value(): Value =
+ when (this) {
+ TRUE -> Value.TRUE
+ FALSE -> Value.FALSE
+ NOT_AVAILABLE -> Value.NOT_AVAILABLE
+ else -> Value._UNKNOWN
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value.
+ *
+ * Use the [value] method instead if you're uncertain the value is always known and don't
+ * want to throw for the unknown case.
+ *
+ * @throws PreludeInvalidDataException if this class instance's value is a not a known
+ * member.
+ */
+ fun known(): Known =
+ when (this) {
+ TRUE -> Known.TRUE
+ FALSE -> Known.FALSE
+ NOT_AVAILABLE -> Known.NOT_AVAILABLE
+ else -> throw PreludeInvalidDataException("Unknown RegionMatch: $value")
+ }
+
+ /**
+ * Returns this class instance's primitive wire representation.
+ *
+ * This differs from the [toString] method because that method is primarily for debugging
+ * and generally doesn't throw.
+ *
+ * @throws PreludeInvalidDataException if this class instance's value does not have the
+ * expected primitive type.
+ */
+ fun asString(): String =
+ _value().asString().orElseThrow { PreludeInvalidDataException("Value is not a String") }
+
+ private var validated: Boolean = false
+
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws PreludeInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
+ fun validate(): RegionMatch = apply {
+ if (validated) {
+ return@apply
+ }
+
+ known()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: PreludeInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is RegionMatch && value == other.value
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is IntelKycMatchResponse &&
+ addressMatch == other.addressMatch &&
+ addressMatchScore == other.addressMatchScore &&
+ birthdateMatch == other.birthdateMatch &&
+ countryCode == other.countryCode &&
+ countryMatch == other.countryMatch &&
+ emailMatch == other.emailMatch &&
+ emailMatchScore == other.emailMatchScore &&
+ familyNameMatch == other.familyNameMatch &&
+ familyNameMatchScore == other.familyNameMatchScore &&
+ givenNameMatch == other.givenNameMatch &&
+ givenNameMatchScore == other.givenNameMatchScore &&
+ localityMatch == other.localityMatch &&
+ localityMatchScore == other.localityMatchScore &&
+ operator == other.operator &&
+ phoneNumber == other.phoneNumber &&
+ postalCodeMatch == other.postalCodeMatch &&
+ regionMatch == other.regionMatch &&
+ regionMatchScore == other.regionMatchScore &&
+ requestId == other.requestId &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(
+ addressMatch,
+ addressMatchScore,
+ birthdateMatch,
+ countryCode,
+ countryMatch,
+ emailMatch,
+ emailMatchScore,
+ familyNameMatch,
+ familyNameMatchScore,
+ givenNameMatch,
+ givenNameMatchScore,
+ localityMatch,
+ localityMatchScore,
+ operator,
+ phoneNumber,
+ postalCodeMatch,
+ regionMatch,
+ regionMatchScore,
+ requestId,
+ additionalProperties,
+ )
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "IntelKycMatchResponse{addressMatch=$addressMatch, addressMatchScore=$addressMatchScore, birthdateMatch=$birthdateMatch, countryCode=$countryCode, countryMatch=$countryMatch, emailMatch=$emailMatch, emailMatchScore=$emailMatchScore, familyNameMatch=$familyNameMatch, familyNameMatchScore=$familyNameMatchScore, givenNameMatch=$givenNameMatch, givenNameMatchScore=$givenNameMatchScore, localityMatch=$localityMatch, localityMatchScore=$localityMatchScore, operator=$operator, phoneNumber=$phoneNumber, postalCodeMatch=$postalCodeMatch, regionMatch=$regionMatch, regionMatchScore=$regionMatchScore, requestId=$requestId, additionalProperties=$additionalProperties}"
+}
diff --git a/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/NotifyReplyParams.kt b/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/NotifyReplyParams.kt
new file mode 100644
index 00000000..400d07b1
--- /dev/null
+++ b/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/NotifyReplyParams.kt
@@ -0,0 +1,733 @@
+// File generated from our OpenAPI spec by Stainless.
+
+package so.prelude.sdk.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 java.util.Collections
+import java.util.Objects
+import java.util.Optional
+import so.prelude.sdk.core.ExcludeMissing
+import so.prelude.sdk.core.JsonField
+import so.prelude.sdk.core.JsonMissing
+import so.prelude.sdk.core.JsonValue
+import so.prelude.sdk.core.Params
+import so.prelude.sdk.core.checkRequired
+import so.prelude.sdk.core.http.Headers
+import so.prelude.sdk.core.http.QueryParams
+import so.prelude.sdk.errors.PreludeInvalidDataException
+
+/**
+ * Send a free-form text reply to an inbound WhatsApp message within the 24-hour conversation
+ * window. See [WhatsApp 2-Way Messaging](/notify/v2/documentation/whatsapp) for details.
+ */
+class NotifyReplyParams
+private constructor(
+ private val body: Body,
+ private val additionalHeaders: Headers,
+ private val additionalQueryParams: QueryParams,
+) : Params {
+
+ /**
+ * The inbound message ID (prefixed with `im_`) to reply to. This ID is provided in the
+ * `inbound.message.received` webhook event.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun replyTo(): String = body.replyTo()
+
+ /**
+ * The reply message body sent as a free-form WhatsApp text.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun text(): String = body.text()
+
+ /**
+ * The recipient's phone number in E.164 format. Must match the phone number that sent the
+ * original inbound message.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun to(): String = body.to()
+
+ /**
+ * The URL where webhooks will be sent for delivery events of this reply.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun callbackUrl(): Optional = body.callbackUrl()
+
+ /**
+ * A user-defined identifier to correlate this reply with your internal systems. It is returned
+ * in the response and any webhook events that refer to this message.
+ *
+ * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun correlationId(): Optional = body.correlationId()
+
+ /**
+ * Returns the raw JSON value of [replyTo].
+ *
+ * Unlike [replyTo], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _replyTo(): JsonField = body._replyTo()
+
+ /**
+ * Returns the raw JSON value of [text].
+ *
+ * Unlike [text], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _text(): JsonField = body._text()
+
+ /**
+ * Returns the raw JSON value of [to].
+ *
+ * Unlike [to], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _to(): JsonField = body._to()
+
+ /**
+ * Returns the raw JSON value of [callbackUrl].
+ *
+ * Unlike [callbackUrl], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _callbackUrl(): JsonField